@luzmo/lucero 2.3.0-beta.0 → 2.4.0

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 (111) hide show
  1. package/components/action-menu/index.cjs +1 -1
  2. package/components/action-menu/index.js +1 -1
  3. package/components/{action-menu-De9S9nlo.js → action-menu-C0sHNsjG.js} +2 -2
  4. package/components/{action-menu-D3L0k49M.cjs → action-menu-CwzRbF61.cjs} +1 -1
  5. package/components/chat-message/index.cjs +1 -1
  6. package/components/chat-message/index.js +1 -1
  7. package/components/chat-message-Dgo6h0rD.cjs +148 -0
  8. package/components/{chat-message-D6U-sprD.js → chat-message-T6QIK2Bl.js} +526 -562
  9. package/components/color-picker/index.cjs +1 -1
  10. package/components/color-picker/index.js +1 -1
  11. package/components/{color-picker-CRokyPy-.cjs → color-picker-BAikpqUT.cjs} +1 -1
  12. package/components/{color-picker-C2kni9Zo.js → color-picker-CSuAPo5X.js} +1 -1
  13. package/components/date-range-picker/index.cjs +1 -1
  14. package/components/date-range-picker/index.js +1 -1
  15. package/components/{date-range-picker-Dfn3MnfA.cjs → date-range-picker-D149LIGC.cjs} +1 -1
  16. package/components/{date-range-picker-CVRHT56i.js → date-range-picker-DKVmGpUC.js} +1 -1
  17. package/components/date-time-picker/index.cjs +1 -1
  18. package/components/date-time-picker/index.js +1 -1
  19. package/components/{date-time-picker-C4oIN9Of.js → date-time-picker-6c19YzwF.js} +1 -1
  20. package/components/{date-time-picker-DYT04Zyv.cjs → date-time-picker-CRpvRk9T.cjs} +1 -1
  21. package/components/index.cjs +1 -1
  22. package/components/index.js +24 -24
  23. package/components/overlay/index.cjs +1 -1
  24. package/components/overlay/index.js +1 -1
  25. package/components/overlay/placement-controller.d.ts +2 -1
  26. package/components/{overlay-4YVoQOyd.cjs → overlay-Dn7EbA_W.cjs} +1 -1
  27. package/components/{overlay-BvMcppFH.js → overlay-DpHIYJtd.js} +2 -2
  28. package/components/picker/index.cjs +1 -1
  29. package/components/picker/index.js +1 -1
  30. package/components/{picker-DKFG8i-B.cjs → picker-BliQJlY_.cjs} +1 -1
  31. package/components/{picker-DKAbXYoQ.js → picker-D0fMBZLb.js} +1 -1
  32. package/components/progress-steps/index.cjs +1 -1
  33. package/components/progress-steps/index.d.ts +2 -1
  34. package/components/progress-steps/index.js +2 -2
  35. package/components/progress-steps/progress-steps-model.d.ts +23 -0
  36. package/components/progress-steps/progress-steps.d.ts +82 -109
  37. package/components/progress-steps/types.d.ts +18 -3
  38. package/components/progress-steps-Y-Tgh_fQ.cjs +98 -0
  39. package/components/progress-steps-ohguJaPa.js +368 -0
  40. package/components/prompt-box/index.cjs +1 -1
  41. package/components/prompt-box/index.js +1 -1
  42. package/components/{prompt-box-CAEo3tqw.js → prompt-box-Cz_m2wso.js} +1 -1
  43. package/components/{prompt-box-DfWfrlF6.cjs → prompt-box-sp9_-Hnx.cjs} +1 -1
  44. package/components/select/index.cjs +1 -1
  45. package/components/select/index.js +1 -1
  46. package/components/{select-CAst7yfM.js → select-BUgHi69P.js} +1 -1
  47. package/components/{select-DkvHL37E.cjs → select-DsGVB01K.cjs} +1 -1
  48. package/custom-elements.json +1 -1
  49. package/package.json +1 -1
  50. package/standalone/accordion.js +1 -1
  51. package/standalone/action-bar.js +1 -1
  52. package/standalone/action-button.js +1 -1
  53. package/standalone/action-menu.js +1 -1
  54. package/standalone/avatar.js +1 -1
  55. package/standalone/calendar.js +1 -1
  56. package/standalone/chat-message.js +27 -27
  57. package/standalone/checkbox.js +1 -1
  58. package/standalone/chunks/{action-button-DCt8NsDy.js → action-button-BzzPBqt5.js} +1 -1
  59. package/standalone/chunks/{button-UUPI5TRz.js → button-Dykw3TSO.js} +1 -1
  60. package/standalone/chunks/{calendar-rx4pQ28E.js → calendar-ZwUYkzVq.js} +1 -1
  61. package/standalone/chunks/{checkbox-Dz-0cBEf.js → checkbox-OQtakoP8.js} +1 -1
  62. package/standalone/chunks/{clear-button-DAHm73iN.js → clear-button-pVGfwye8.js} +1 -1
  63. package/standalone/chunks/{close-button-DB1Q3IfL.js → close-button-RpPiwBdf.js} +1 -1
  64. package/standalone/chunks/{color-field-BQ4y3biw.js → color-field-CrCF4kqZ.js} +1 -1
  65. package/standalone/chunks/{color-menu-DRO2lf0w.js → color-menu-B5UOMYmX.js} +1 -1
  66. package/standalone/chunks/{icon-Csu47YgC.js → icon-Dy6J1QeX.js} +1 -1
  67. package/standalone/chunks/keyed-CNWmQd2J.js +2 -0
  68. package/standalone/chunks/{luzmo-icons-BKu82bUU.js → luzmo-icons-CJa-aByT.js} +2 -2
  69. package/standalone/chunks/{menu-CVdQKzxC.js → menu-nolJetlp.js} +1 -1
  70. package/standalone/chunks/{number-field-BWvsvU01.js → number-field-C3DYfl1s.js} +1 -1
  71. package/standalone/chunks/{options-DzlW2-9n.js → options-BjRSj630.js} +5 -5
  72. package/standalone/chunks/{overlay-I_DOZNsB.js → overlay-C4ir0iyC.js} +1 -1
  73. package/standalone/chunks/{overlay-COmLsmL3.js → overlay-C_XW8yry.js} +1 -1
  74. package/standalone/chunks/{picker-button-D22V8uCk.js → picker-button-BeXTIgUt.js} +1 -1
  75. package/standalone/chunks/{picker-DGOvxfUV.js → picker-hbMQOkUX.js} +1 -1
  76. package/standalone/chunks/{segments-factory-Bj8uOVOG.js → segments-factory-Ch3AAizU.js} +1 -1
  77. package/standalone/chunks/{swatch-B-lwyWNi.js → swatch-m_4GcO2_.js} +1 -1
  78. package/standalone/chunks/{text-field-DgyP9fxu.js → text-field-BnZtyodU.js} +1 -1
  79. package/standalone/chunks/{text-field-BWZK7Km7.js → text-field-BrlDeJsx.js} +1 -1
  80. package/standalone/clear-button.js +1 -1
  81. package/standalone/close-button.js +1 -1
  82. package/standalone/color-field.js +1 -1
  83. package/standalone/color-menu.js +1 -1
  84. package/standalone/color-picker.js +1 -1
  85. package/standalone/date-range-picker.js +1 -1
  86. package/standalone/date-time-picker.js +1 -1
  87. package/standalone/icon.js +1 -1
  88. package/standalone/lit.js +1 -1
  89. package/standalone/manifest.json +22 -21
  90. package/standalone/menu.js +1 -1
  91. package/standalone/multi-language-field.js +1 -1
  92. package/standalone/notice.js +1 -1
  93. package/standalone/number-field.js +1 -1
  94. package/standalone/options.js +1 -1
  95. package/standalone/overlay.js +1 -1
  96. package/standalone/picker-button.js +1 -1
  97. package/standalone/picker.js +1 -1
  98. package/standalone/progress-steps.js +79 -77
  99. package/standalone/prompt-box.js +9 -9
  100. package/standalone/question-box.js +1 -1
  101. package/standalone/search.js +1 -1
  102. package/standalone/select.js +1 -1
  103. package/standalone/slider.js +1 -1
  104. package/standalone/swatch.js +1 -1
  105. package/standalone/tabs.js +1 -1
  106. package/standalone/tags.js +1 -1
  107. package/standalone/text-field.js +1 -1
  108. package/standalone/toast.js +1 -1
  109. package/components/chat-message-BDfomRm-.cjs +0 -148
  110. package/components/progress-steps-9tRZ0dxp.cjs +0 -96
  111. package/components/progress-steps-CX9mnyHH.js +0 -263
@@ -15,7 +15,7 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs");require("./icon-zOPAWCdx.cjs"),require("./action-button-CX1uYbQp.cjs");const n=require("./overlay-4YVoQOyd.cjs");require("./button-Bvnidb4x.cjs"),require("./text-field-CbN4nydd.cjs"),require("./skeleton-loader-CNcwCh4V.cjs");const r=require("./voice-recorder-B1tBrGTV.cjs");let i=require("lit"),a=require("lit/decorators.js"),o=require("@luzmo/icons");var s=class{constructor(e){this._attachments=[],this._idCounter=0,this._host=e,e.addController(this)}hostConnected(){}hostDisconnected(){this._revokeAllPreviewUrls()}get attachments(){return this._attachments}get hasAttachments(){return this._attachments.length>0}get imageAttachments(){return this._attachments.filter(e=>this._isImageFile(e.file))}get fileAttachments(){return this._attachments.filter(e=>!this._isImageFile(e.file))}addFiles(e){if(this._host.disabled||this._host.readonly||this._host.pending)return[];let t=[];for(let n of e){if(this._isImageFile(n)&&!this._host.allowImages||!this._isImageFile(n)&&!this._host.allowFiles||!this._isFileTypeAccepted(n))continue;let e=this._generateId(),r={file:n,id:e};this._isImageFile(n)&&(r.previewUrl=URL.createObjectURL(n)),this._attachments=[...this._attachments,r],t.push(e)}return t.length>0&&(this._dispatchChange(),this._host.requestUpdate()),t}removeAttachment(e){let t=this._attachments.find(t=>t.id===e);t&&(t.previewUrl&&URL.revokeObjectURL(t.previewUrl),this._attachments=this._attachments.filter(t=>t.id!==e),this._dispatchChange(),this._host.requestUpdate())}setAttachmentLoading(e,t){let n=this._attachments.findIndex(t=>t.id===e);if(n===-1)return;let r=this._attachments[n];!!r.loading!==t&&(this._attachments=[...this._attachments.slice(0,n),{...r,loading:t},...this._attachments.slice(n+1)],this._dispatchChange(),this._host.requestUpdate())}clearAttachments(){this._revokeAllPreviewUrls(),this._attachments=[],this._dispatchChange(),this._host.requestUpdate()}getAttachments(){return[...this._attachments]}handlePastedImages(e){if(!this._host.allowImages||this._host.disabled||this._host.readonly||this._host.pending||!e)return!1;let t=[];for(let n of e.items)if(n.type.startsWith(`image/`)){let e=n.getAsFile();e&&t.push(e)}return t.length>0?(this.addFiles(t),!0):!1}getAcceptAttribute(){if(this._host.acceptedFileTypes.length>0)return this._host.acceptedFileTypes.join(`,`);let e=[];return this._host.allowImages&&e.push(`image/*`),this._host.allowFiles&&e.push(`*/*`),e.join(`,`)}isImageFile(e){return this._isImageFile(e)}_isImageFile(e){return e.type.startsWith(`image/`)}_isFileTypeAccepted(e){if(this._host.acceptedFileTypes.length===0)return!0;let t=e.name.toLowerCase(),n=e.type.toLowerCase();for(let e of this._host.acceptedFileTypes){let r=e.toLowerCase();if(r.endsWith(`/*`)){let e=r.slice(0,-2);if(n.startsWith(e+`/`))return!0}else if(n===r)return!0;else if(r.startsWith(`.`)&&t.endsWith(r))return!0}return!1}_generateId(){return`attachment-${++this._idCounter}-${Date.now()}`}_revokeAllPreviewUrls(){for(let e of this._attachments)e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}_dispatchChange(){this._host.dispatchEvent(new CustomEvent(`luzmo-attachments-change`,{bubbles:!0,composed:!0,detail:{attachments:this._attachments}}))}},c=class{constructor(e){this._voiceRecorder=null,this.isRecording=!1,this.duration=0,this.audioLevel=0,this.shouldFocusFinishButton=!1,this._host=e,e.addController(this)}hostConnected(){}hostDisconnected(){this._destroy()}async start(e){if(!r.t.isSupported()){this._host.dispatchEvent(new CustomEvent(`luzmo-record-error`,{bubbles:!0,composed:!0,detail:{error:`Voice recording is not supported in this browser`}}));return}if(this.isRecording){this.stop();return}this.shouldFocusFinishButton=e,this._init(),this._voiceRecorder&&(await this._voiceRecorder.startRecording()&&(this.isRecording=!0,this.duration=0,this.audioLevel=0,this._host.requestUpdate()),this._host.dispatchEvent(new CustomEvent(`luzmo-record`,{bubbles:!0,composed:!0,detail:{isRecording:this.isRecording}})))}stop(){this._voiceRecorder?.stopRecording()}cancel(){this._voiceRecorder?.cancelRecording(),this.isRecording=!1,this.duration=0,this.audioLevel=0,this._host.requestUpdate(),this._host.dispatchEvent(new CustomEvent(`luzmo-record-cancel`,{bubbles:!0,composed:!0}))}formatDuration(){return r.t.formatDuration(this.duration)}static isSupported(){return r.t.isSupported()}_init(){this._voiceRecorder||(this._voiceRecorder=new r.t({maxDuration:3e5}),this._voiceRecorder.onStart(()=>{this.isRecording=!0,this._host.requestUpdate()}).onStop(e=>{this.isRecording=!1,this.duration=0,this.audioLevel=0,this._host.requestUpdate(),this._host.dispatchEvent(new CustomEvent(`luzmo-recording-complete`,{bubbles:!0,composed:!0,detail:{audioBlob:e.audioBlob,duration:e.duration,mimeType:e.mimeType}}))}).onError(e=>{this.isRecording=!1,this.duration=0,this.audioLevel=0,this._host.requestUpdate(),this._host.dispatchEvent(new CustomEvent(`luzmo-record-error`,{bubbles:!0,composed:!0,detail:{error:e}}))}).onAudioLevel(e=>{this.audioLevel=e,this._host.requestUpdate()}).onDurationUpdate(e=>{this.duration=e,this._host.requestUpdate()}))}_destroy(){this._voiceRecorder&&=(this._voiceRecorder.destroy(),null),this.isRecording=!1,this.duration=0,this.audioLevel=0}};function l(e,t){let n=document.createRange();return n.setStart(e,t),n.collapse(!0),n}function u(e,t,n){let r=e.getBoundingClientRect(),i=t-r.left,a=n-r.top;return i*i+a*a}function d(e,t,n,r){let i=0,a=t;for(;a-i>1;){let t=i+a>>>1,r=document.createRange();r.setStart(e,t),r.collapse(!0),r.getBoundingClientRect().left<n?i=t:a=t}let o=l(e,i),s=u(o,n,r),c=l(e,a),d=u(c,n,r);return d<s&&(o=c,s=d),{range:o,distSq:s}}function f(e,t,n,r){let i=null,a=1/0;for(let[o,s]of e.childNodes.entries())if(s!==r){if(s.nodeType===Node.TEXT_NODE){let e=(s.textContent??``).length;if(e===0)continue;let r=d(s,e,t,n);r.distSq<a&&(a=r.distSq,i=r.range)}else if(s.nodeType===Node.ELEMENT_NODE){let r=s.getBoundingClientRect();if(r.width===0&&r.height===0)continue;let c=r.left+r.width/2,u=l(e,o),d=l(e,o+1),f=t<c?u:d,p=n-(r.top+r.height/2),m=t<c?t-r.left:t-r.right,h=m*m+p*p;h<a&&(a=h,i=f)}}if(!i){let t=document.createRange();return t.selectNodeContents(e),t.collapse(!1),t}return i}function p(e,t,n,r,i){if(Number.isNaN(n)||Number.isNaN(r))return null;let a=null,o=e;if(o?.caretPositionFromPoint){let e=o.caretPositionFromPoint(n,r);e&&(a=l(e.offsetNode,e.offset))}else o?.caretRangeFromPoint&&(a=o.caretRangeFromPoint(n,r));if(!a)if(`caretPositionFromPoint`in document){let e=document.caretPositionFromPoint(n,r);e&&(a=l(e.offsetNode,e.offset))}else`caretRangeFromPoint`in document&&(a=document.caretRangeFromPoint(n,r));return(!a||!t.contains(a.startContainer))&&(a=f(t,n,r,i)),a}function m(e){if(e){let t=e.getSelection?.();if(t&&t.rangeCount>0)return t.getRangeAt(0)}let t=document.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0);if(!e||e.contains(n.startContainer))return n;let r=t;if(e&&r.getComposedRanges)try{let t=r.getComposedRanges(e);if(t.length>0){let e=t[0],n=document.createRange();return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}}catch{}return null}function h(e,t){let n=document.getSelection();if(n)try{n.setBaseAndExtent(e,t,e,t)}catch{let r=document.createRange();r.setStart(e,t),r.collapse(!0),n.removeAllRanges(),n.addRange(r)}}function g(e){return e===` `||e===`
18
+ require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs");require("./icon-zOPAWCdx.cjs"),require("./action-button-CX1uYbQp.cjs");const n=require("./overlay-Dn7EbA_W.cjs");require("./button-Bvnidb4x.cjs"),require("./text-field-CbN4nydd.cjs"),require("./skeleton-loader-CNcwCh4V.cjs");const r=require("./voice-recorder-B1tBrGTV.cjs");let i=require("lit"),a=require("lit/decorators.js"),o=require("@luzmo/icons");var s=class{constructor(e){this._attachments=[],this._idCounter=0,this._host=e,e.addController(this)}hostConnected(){}hostDisconnected(){this._revokeAllPreviewUrls()}get attachments(){return this._attachments}get hasAttachments(){return this._attachments.length>0}get imageAttachments(){return this._attachments.filter(e=>this._isImageFile(e.file))}get fileAttachments(){return this._attachments.filter(e=>!this._isImageFile(e.file))}addFiles(e){if(this._host.disabled||this._host.readonly||this._host.pending)return[];let t=[];for(let n of e){if(this._isImageFile(n)&&!this._host.allowImages||!this._isImageFile(n)&&!this._host.allowFiles||!this._isFileTypeAccepted(n))continue;let e=this._generateId(),r={file:n,id:e};this._isImageFile(n)&&(r.previewUrl=URL.createObjectURL(n)),this._attachments=[...this._attachments,r],t.push(e)}return t.length>0&&(this._dispatchChange(),this._host.requestUpdate()),t}removeAttachment(e){let t=this._attachments.find(t=>t.id===e);t&&(t.previewUrl&&URL.revokeObjectURL(t.previewUrl),this._attachments=this._attachments.filter(t=>t.id!==e),this._dispatchChange(),this._host.requestUpdate())}setAttachmentLoading(e,t){let n=this._attachments.findIndex(t=>t.id===e);if(n===-1)return;let r=this._attachments[n];!!r.loading!==t&&(this._attachments=[...this._attachments.slice(0,n),{...r,loading:t},...this._attachments.slice(n+1)],this._dispatchChange(),this._host.requestUpdate())}clearAttachments(){this._revokeAllPreviewUrls(),this._attachments=[],this._dispatchChange(),this._host.requestUpdate()}getAttachments(){return[...this._attachments]}handlePastedImages(e){if(!this._host.allowImages||this._host.disabled||this._host.readonly||this._host.pending||!e)return!1;let t=[];for(let n of e.items)if(n.type.startsWith(`image/`)){let e=n.getAsFile();e&&t.push(e)}return t.length>0?(this.addFiles(t),!0):!1}getAcceptAttribute(){if(this._host.acceptedFileTypes.length>0)return this._host.acceptedFileTypes.join(`,`);let e=[];return this._host.allowImages&&e.push(`image/*`),this._host.allowFiles&&e.push(`*/*`),e.join(`,`)}isImageFile(e){return this._isImageFile(e)}_isImageFile(e){return e.type.startsWith(`image/`)}_isFileTypeAccepted(e){if(this._host.acceptedFileTypes.length===0)return!0;let t=e.name.toLowerCase(),n=e.type.toLowerCase();for(let e of this._host.acceptedFileTypes){let r=e.toLowerCase();if(r.endsWith(`/*`)){let e=r.slice(0,-2);if(n.startsWith(e+`/`))return!0}else if(n===r)return!0;else if(r.startsWith(`.`)&&t.endsWith(r))return!0}return!1}_generateId(){return`attachment-${++this._idCounter}-${Date.now()}`}_revokeAllPreviewUrls(){for(let e of this._attachments)e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}_dispatchChange(){this._host.dispatchEvent(new CustomEvent(`luzmo-attachments-change`,{bubbles:!0,composed:!0,detail:{attachments:this._attachments}}))}},c=class{constructor(e){this._voiceRecorder=null,this.isRecording=!1,this.duration=0,this.audioLevel=0,this.shouldFocusFinishButton=!1,this._host=e,e.addController(this)}hostConnected(){}hostDisconnected(){this._destroy()}async start(e){if(!r.t.isSupported()){this._host.dispatchEvent(new CustomEvent(`luzmo-record-error`,{bubbles:!0,composed:!0,detail:{error:`Voice recording is not supported in this browser`}}));return}if(this.isRecording){this.stop();return}this.shouldFocusFinishButton=e,this._init(),this._voiceRecorder&&(await this._voiceRecorder.startRecording()&&(this.isRecording=!0,this.duration=0,this.audioLevel=0,this._host.requestUpdate()),this._host.dispatchEvent(new CustomEvent(`luzmo-record`,{bubbles:!0,composed:!0,detail:{isRecording:this.isRecording}})))}stop(){this._voiceRecorder?.stopRecording()}cancel(){this._voiceRecorder?.cancelRecording(),this.isRecording=!1,this.duration=0,this.audioLevel=0,this._host.requestUpdate(),this._host.dispatchEvent(new CustomEvent(`luzmo-record-cancel`,{bubbles:!0,composed:!0}))}formatDuration(){return r.t.formatDuration(this.duration)}static isSupported(){return r.t.isSupported()}_init(){this._voiceRecorder||(this._voiceRecorder=new r.t({maxDuration:3e5}),this._voiceRecorder.onStart(()=>{this.isRecording=!0,this._host.requestUpdate()}).onStop(e=>{this.isRecording=!1,this.duration=0,this.audioLevel=0,this._host.requestUpdate(),this._host.dispatchEvent(new CustomEvent(`luzmo-recording-complete`,{bubbles:!0,composed:!0,detail:{audioBlob:e.audioBlob,duration:e.duration,mimeType:e.mimeType}}))}).onError(e=>{this.isRecording=!1,this.duration=0,this.audioLevel=0,this._host.requestUpdate(),this._host.dispatchEvent(new CustomEvent(`luzmo-record-error`,{bubbles:!0,composed:!0,detail:{error:e}}))}).onAudioLevel(e=>{this.audioLevel=e,this._host.requestUpdate()}).onDurationUpdate(e=>{this.duration=e,this._host.requestUpdate()}))}_destroy(){this._voiceRecorder&&=(this._voiceRecorder.destroy(),null),this.isRecording=!1,this.duration=0,this.audioLevel=0}};function l(e,t){let n=document.createRange();return n.setStart(e,t),n.collapse(!0),n}function u(e,t,n){let r=e.getBoundingClientRect(),i=t-r.left,a=n-r.top;return i*i+a*a}function d(e,t,n,r){let i=0,a=t;for(;a-i>1;){let t=i+a>>>1,r=document.createRange();r.setStart(e,t),r.collapse(!0),r.getBoundingClientRect().left<n?i=t:a=t}let o=l(e,i),s=u(o,n,r),c=l(e,a),d=u(c,n,r);return d<s&&(o=c,s=d),{range:o,distSq:s}}function f(e,t,n,r){let i=null,a=1/0;for(let[o,s]of e.childNodes.entries())if(s!==r){if(s.nodeType===Node.TEXT_NODE){let e=(s.textContent??``).length;if(e===0)continue;let r=d(s,e,t,n);r.distSq<a&&(a=r.distSq,i=r.range)}else if(s.nodeType===Node.ELEMENT_NODE){let r=s.getBoundingClientRect();if(r.width===0&&r.height===0)continue;let c=r.left+r.width/2,u=l(e,o),d=l(e,o+1),f=t<c?u:d,p=n-(r.top+r.height/2),m=t<c?t-r.left:t-r.right,h=m*m+p*p;h<a&&(a=h,i=f)}}if(!i){let t=document.createRange();return t.selectNodeContents(e),t.collapse(!1),t}return i}function p(e,t,n,r,i){if(Number.isNaN(n)||Number.isNaN(r))return null;let a=null,o=e;if(o?.caretPositionFromPoint){let e=o.caretPositionFromPoint(n,r);e&&(a=l(e.offsetNode,e.offset))}else o?.caretRangeFromPoint&&(a=o.caretRangeFromPoint(n,r));if(!a)if(`caretPositionFromPoint`in document){let e=document.caretPositionFromPoint(n,r);e&&(a=l(e.offsetNode,e.offset))}else`caretRangeFromPoint`in document&&(a=document.caretRangeFromPoint(n,r));return(!a||!t.contains(a.startContainer))&&(a=f(t,n,r,i)),a}function m(e){if(e){let t=e.getSelection?.();if(t&&t.rangeCount>0)return t.getRangeAt(0)}let t=document.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0);if(!e||e.contains(n.startContainer))return n;let r=t;if(e&&r.getComposedRanges)try{let t=r.getComposedRanges(e);if(t.length>0){let e=t[0],n=document.createRange();return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}}catch{}return null}function h(e,t){let n=document.getSelection();if(n)try{n.setBaseAndExtent(e,t,e,t)}catch{let r=document.createRange();r.setStart(e,t),r.collapse(!0),n.removeAllRanges(),n.addRange(r)}}function g(e){return e===` `||e===`
19
19
  `||e===`\xA0`}function ee(e){let t=m(e);if(!t||!t.collapsed)return!1;let n=t.startContainer,r=t.startOffset;if(n.nodeType===Node.TEXT_NODE){if(r>=2)return g(n.textContent?.charAt(r-2)??``);let e=n.previousSibling;if(!e||e.nodeType===Node.ELEMENT_NODE&&e.classList?.contains(`element-badge`))return!0;let t=e.textContent??``;return t.length===0||g(t.at(-1)??``)}if(n.nodeType===Node.ELEMENT_NODE){if(r===0)return!0;let e=n.childNodes[r-1];if(!e||e.nodeType===Node.ELEMENT_NODE&&e.classList?.contains(`element-badge`))return!0;if(e.nodeType===Node.TEXT_NODE){let t=e.textContent??``;return t.length===0||g(t.at(-1)??``)}}return!1}function te(e,t){let n=m(e);if(!n){if(!t)return null;let e=t.getBoundingClientRect();return{x:e.left,y:e.bottom}}let r=n.cloneRange();r.collapse(!0);let i=r.startContainer,a=r.startOffset;if(i.nodeType===Node.TEXT_NODE&&a>0){let e=document.createRange();e.setStart(i,a-1),e.setEnd(i,a);let t=e.getBoundingClientRect();if(t.width>0||t.height>0)return{x:t.left,y:t.bottom}}let o=r.getBoundingClientRect();if(o.width===0&&o.height===0&&o.x===0){if(t){let e=t.getBoundingClientRect();return{x:e.left,y:e.bottom}}return null}return{x:o.left,y:o.bottom}}function _(e,t){let n=m(e);if(!n||!n.collapsed)return null;let r=n.startContainer,i=n.startOffset;if(r.nodeType!==Node.TEXT_NODE)return null;let a=(r.textContent??``).slice(0,Math.max(0,i)),o=a.lastIndexOf(t);return o===-1?null:a.slice(Math.max(0,o+1))}function v(e,t){if(e.focus(),!t)return;let n=e.querySelector(`[data-element-id="${t}"]`);if(!n)return;let r=n.nextSibling;if(r&&r.nodeType===Node.TEXT_NODE){let e=r.textContent??``,t=e.indexOf(` `);h(r,t===-1?e.length:t+1);return}let i=document.getSelection();if(!i)return;let a=document.createRange();a.setStartAfter(n),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}function ne(e,t,n,r){let i=m(e);if(i){let e=i.startContainer,r=i.startOffset;if(e.nodeType===Node.TEXT_NODE&&t.contains(e)){let t=e.textContent??``,i=t.slice(0,Math.max(0,r)).lastIndexOf(n);if(i!==-1){e.textContent=t.slice(0,Math.max(0,i))+t.slice(Math.max(0,r)),h(e,i);return}}}let a=n+(r??``),o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),s;for(;s=o.nextNode();){let e=s.textContent??``,n=e.lastIndexOf(a);if(n!==-1){s.textContent=e.slice(0,Math.max(0,n))+e.slice(Math.max(0,n+a.length)),t.focus(),h(s,n);return}}}var y=`application/x-luzmo-element`,b=class{constructor(e){this._elements=new Map,this._idCounter=0,this._dragCaret=null,this.isDragOver=!1,this.richInputElement=null,this.handleRichInput=()=>{this.syncValue(),this._host.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))},this.handleRichPaste=e=>{if(e.preventDefault(),this._cannotEditRichContent())return;if(this._host.allowImages&&e.clipboardData&&this._host.handlePastedImages(e.clipboardData)){e.stopPropagation();return}let t=e.clipboardData?.getData(`text/plain`)??``;if(t){let e=m(this._host.shadowRoot);if(e){e.deleteContents(),e.insertNode(document.createTextNode(t)),e.collapse(!1);let n=document.getSelection();n&&(n.removeAllRanges(),n.addRange(e))}this.syncValue(),this._host.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))}},this.handleRichDragOver=e=>{this._cannotEditRichContent()||e.dataTransfer?.types.includes(`application/x-luzmo-element`)&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`copy`),this.isDragOver=!0,this._host.requestUpdate(),this._positionCaretAtPoint(e.clientX,e.clientY),this._showDragCaret(e.clientX,e.clientY))},this.handleRichDragLeave=e=>{let t=e.relatedTarget;(!t||!this.richInputElement?.contains(t))&&(this.isDragOver=!1,this._hideDragCaret(),this._host.requestUpdate())},this.handleRichDrop=e=>{if(e.preventDefault(),this.isDragOver=!1,this._hideDragCaret(),this._cannotEditRichContent()){this._host.requestUpdate();return}let t=e.dataTransfer?.getData(y);if(!t){this._host.requestUpdate();return}try{let n=JSON.parse(t);if(n.elementType&&n.label){this.richInputElement?.focus();let t=this.richInputElement?p(this._host.shadowRoot,this.richInputElement,e.clientX,e.clientY,this._dragCaret):null;this._insertElementAtRange(n.elementType,n.label,n.data??null,void 0,t)}this._host.requestUpdate()}catch{this._host.requestUpdate()}},this._host=e,e.addController(this)}hostConnected(){}hostDisconnected(){}get elements(){return this._elements}get elementCount(){return this._elements.size}getSegments(){return!this._host.allowElements||!this.richInputElement?[{type:`text`,value:this._host.value}]:this._parseSegments()}setSegments(e){if(!this._host.allowElements){this._host.value=this._segmentsToPlainText(e);return}this._elements.clear(),this._host.updateComplete.then(()=>{if(this.richInputElement){this.richInputElement.innerHTML=``;for(let t of e)if(t.type===`text`&&t.value)this.richInputElement.append(document.createTextNode(t.value));else if(t.type===`element`&&t.value){let e={...t.value};e.id||=this._generateId(),this._elements.set(e.id,e),this.richInputElement.append(this._createBadgeNode(e))}this.syncValue()}})}insertElement(e,t,n,r){return this._insertElementAtRange(e,t,n,r,null)}_insertElementAtRange(e,t,n,r,i){if(this._cannotEditRichContent()||this._host.acceptedElementTypes.length>0&&!this._host.acceptedElementTypes.includes(e)||!this.richInputElement)return``;let a=this._generateId(),o={id:a,elementType:e,label:t,data:n,icon:r};this._elements.set(a,o);let s=this._createBadgeNode(o),c=this.richInputElement,l=!1,u=i===null?this._getSelectionRange():i;if(u&&c.contains(u.commonAncestorContainer)){u.deleteContents(),u.insertNode(s);let e=s.previousSibling;if(e?.nodeType===Node.TEXT_NODE){let t=e.previousSibling;t?.classList?.contains(`element-badge`)&&this._ensureSpaceAfter(t)}this._ensureSpaceAfter(s),v(c,a),l=!0}return l||(c.append(s),this._ensureSpaceAfter(s),v(c,a)),this.syncValue(),this._host.dispatchEvent(new CustomEvent(`luzmo-element-inserted`,{bubbles:!0,composed:!0,detail:{element:o}})),a}_getSelectionRange(){return m(this._host.shadowRoot)}removeElement(e){let t=this._elements.get(e);if(!t)return;this._elements.delete(e);let n=this.richInputElement?.querySelector(`[data-element-id="${e}"]`);if(n){let e=n.nextSibling;if(n.remove(),e&&e.nodeType===Node.TEXT_NODE){let t=(e.textContent??``).replaceAll(`​`,``);t?e.textContent=t:e.remove()}this.syncValue()}this._host.dispatchEvent(new CustomEvent(`luzmo-element-removed`,{bubbles:!0,composed:!0,detail:{element:t}}))}getElements(){return[...this._elements.values()]}clearElements(){this._elements.clear(),this.richInputElement&&(this.richInputElement.innerHTML=``)}handleBadgeDelete(e){let t=m(this._host.shadowRoot);if(!t||!t.collapsed)return!1;let n=e===`Backspace`?this._findBadgeBefore(t.startContainer,t.startOffset):e===`Delete`?this._findBadgeAfter(t.startContainer,t.startOffset):null;return n?.dataset.elementId?(this.removeElement(n.dataset.elementId),!0):!1}_findBadgeBefore(e,t){if(e.nodeType===Node.ELEMENT_NODE){let n=e.childNodes[t-1];if(n?.classList?.contains(`element-badge`))return n}else if(e.nodeType===Node.TEXT_NODE)if(t===0){let t=e.previousSibling;if(t?.classList?.contains(`element-badge`))return t}else{let n=(e.textContent??``).slice(0,t);if(/^[\u200B\uFEFF]*$/.test(n)){let t=e.previousSibling;if(t?.classList?.contains(`element-badge`))return t}}return null}_findBadgeAfter(e,t){if(e.nodeType===Node.ELEMENT_NODE){let n=e.childNodes[t];if(n?.classList?.contains(`element-badge`))return n}else if(e.nodeType===Node.TEXT_NODE){let n=e.textContent??``;if(t===n.length){let t=e.nextSibling;if(t?.classList?.contains(`element-badge`))return t}else{let r=n.slice(t);if(/^[\u200B\uFEFF]*$/.test(r)){let t=e.nextSibling;if(t?.classList?.contains(`element-badge`))return t}}}return null}_segmentsToPlainText(e){return e.map(e=>e.type===`text`?e.value??``:e.value?.label??``).join(``)}_cannotEditRichContent(){return!this._host.allowElements||this._host.disabled||this._host.readonly||this._host.pending}_cleanupSemanticallyEmptyRichInput(e){let t=this.richInputElement;if(!t)return;let n=this._elements.size===0&&e.trim().length===0,r=this._dragCaret?.parentNode===t;!n||r||t.innerHTML===``||(t.innerHTML=``,this._host.value=``)}syncValue(){if(!this.richInputElement)return;let e=this._parseSegments(),t=this._segmentsToPlainText(e);this._host.value=t,this._cleanupSemanticallyEmptyRichInput(t),this._host.requestUpdate()}_parseSegments(){if(!this.richInputElement)return[];let e=[];for(let t of this.richInputElement.childNodes)if(t.nodeType===Node.TEXT_NODE){let n=(t.textContent??``).replaceAll(`​`,``);n&&e.push({type:`text`,value:n})}else if(t.nodeType===Node.ELEMENT_NODE){let n=t;if(n.classList.contains(`drag-caret`))continue;if(n.classList.contains(`element-badge`)){let t=n.dataset.elementId??``,r=this._elements.get(t);r&&e.push({type:`element`,value:{...r}})}else if(n.tagName===`BR`)e.push({type:`text`,value:`
20
20
  `});else{let t=n.textContent??``;t&&e.push({type:`text`,value:t})}}return e}_createBadgeNode(e){let t=document.createElement(`span`);if(t.className=`element-badge`,t.setAttribute(`contenteditable`,`false`),t.dataset.elementId=e.id,t.dataset.elementType=e.elementType,e.icon){let n=document.createElement(`luzmo-icon`);n.icon=e.icon,n.setAttribute(`size`,`xxs`),n.className=`element-badge-icon`,t.append(n)}let n=document.createElement(`span`);n.className=`element-badge-label`,n.textContent=e.label,t.append(n);let r=document.createElement(`button`);return r.type=`button`,r.setAttribute(`role`,`button`),r.tabIndex=-1,r.className=`element-badge-remove`,r.setAttribute(`contenteditable`,`false`),r.setAttribute(`aria-label`,`Remove ${e.label}`),r.textContent=`×`,r.addEventListener(`click`,t=>{t.preventDefault(),t.stopPropagation(),this.removeElement(e.id)}),t.append(r),t}_ensureSpaceAfter(e){let t=e.nextSibling;if(t&&t.nodeType===Node.TEXT_NODE&&t.textContent){let e=t.textContent;if(e.startsWith(`​`)&&e.length>1)return;if(e.startsWith(` `)){t.textContent=`​`+e;return}if(/^\u200B+$/.test(e)){t.textContent=e+` `;return}}e.parentNode?.insertBefore(document.createTextNode(`​ `),t??null)}_showDragCaret(e,t){if(!this.richInputElement){this._hideDragCaret();return}let n=p(this._host.shadowRoot,this.richInputElement,e,t,this._dragCaret);if(!n){this._hideDragCaret();return}let r=n.getBoundingClientRect(),i=this.richInputElement.getBoundingClientRect(),a=r.left-i.left+this.richInputElement.scrollLeft,o=r.top-i.top+this.richInputElement.scrollTop,s=r.height;if(s===0){let e=getComputedStyle(this.richInputElement);s=Number.parseFloat(e.lineHeight)||Number.parseFloat(e.fontSize)||16,o=t-i.top+this.richInputElement.scrollTop-s/2}this._dragCaret||(this._dragCaret=document.createElement(`div`),this._dragCaret.className=`drag-caret`);let c=this._dragCaret;c.style.position=`absolute`,c.style.top=`${o}px`,c.style.left=`${a}px`,c.style.height=`${s}px`,c.parentNode||(this.richInputElement.style.position=`relative`,this.richInputElement.append(c))}_hideDragCaret(){this._dragCaret?.remove()}_generateId(){return`el-${++this._idCounter}-${Date.now()}`}_positionCaretAtPoint(e,t){if(!this.richInputElement)return;let n=p(this._host.shadowRoot,this.richInputElement,e,t,this._dragCaret);if(n){let e=document.getSelection();e&&(e.removeAllRanges(),e.addRange(n))}}},x=class{constructor(e){this._triggers=[],this.activeTrigger=null,this.searchString=``,this.virtualElement=null,this.highlightedIndex=0,this.pointerMovedSinceKeyNav=!0,this.hoveredIndex=-1,this.filteredOptions=[],this.richInputElement=null,this.handleOverlayClosed=()=>{this.close()},this.handleOverlayKeydown=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),this.close(),this.richInputElement?.focus())},this.handlePointerMove=()=>{this.pointerMovedSinceKeyNav=!0},this._handleTriggerSelect=e=>{if(!this.activeTrigger)return;let{elementType:t,label:n,data:r,icon:i}=e.detail;this.selectOption({label:n,value:n,data:r,icon:i,elementType:t})},this._handleDocumentPointerDown=e=>{let t=e.composedPath(),n=this._host.shadowRoot?.querySelector(`luzmo-overlay[part="trigger-menu-overlay"]`);n&&t.includes(n)||this.richInputElement&&t.includes(this.richInputElement)||(this.close(),this.richInputElement?.focus())},this._host=e,e.addController(this)}hostConnected(){this._host.addEventListener(`luzmo-trigger-select`,this._handleTriggerSelect)}hostDisconnected(){document.removeEventListener(`pointerdown`,this._handleDocumentPointerDown,!0),this._host.removeEventListener(`luzmo-trigger-select`,this._handleTriggerSelect)}get triggers(){return this._triggers}set triggers(e){this._triggers=e,this.activeTrigger&&this._updateFilteredOptions()}get activeConfig(){if(this.activeTrigger)return this._triggers.find(e=>e.key===this.activeTrigger)}get hasTriggers(){return this._triggers.length>0}getSlotName(e){return this._triggers.find(t=>t.key===e)?.slotName}get allSlotNames(){return this._triggers.map(e=>e.slotName).filter(e=>!!e)}handleInput(e){if(this.activeTrigger){let e=_(this._host.shadowRoot,this.activeTrigger)??this._extractTriggerSearchFromContent(this.activeTrigger);e===null?this.close():(this.searchString=e,this._updateFilteredOptions(),this.highlightedIndex=this._findSelectableIndex(0,1),this._dispatchChange(!0),this._host.requestUpdate(),document.dispatchEvent(new Event(`luzmo-update-overlays`)))}else this._detectTrigger(e)}open(e){if(!this._triggers.find(t=>t.key===e))return;let t=te(this._host.shadowRoot,this.richInputElement);if(!t)return;this.activeTrigger=e,this.searchString=``,this._updateFilteredOptions(),this.highlightedIndex=this._findSelectableIndex(0,1);let r=this.richInputElement?.getBoundingClientRect().top??t.y;this.virtualElement?this.virtualElement.updateBoundingClientRect(t.x,t.y,r):this.virtualElement=new n.v(t.x,t.y,r),this._dispatchChange(!0),this._host.requestUpdate(),requestAnimationFrame(()=>{document.addEventListener(`pointerdown`,this._handleDocumentPointerDown,!0)})}close(){if(this.activeTrigger===null)return;document.removeEventListener(`pointerdown`,this._handleDocumentPointerDown,!0);let e=this.activeTrigger;this.activeTrigger=null,this.searchString=``,this.filteredOptions=[],this.highlightedIndex=0,this.hoveredIndex=-1,this._host.dispatchEvent(new CustomEvent(`luzmo-trigger-change`,{bubbles:!0,composed:!0,detail:{trigger:e,open:!1,searchString:``}})),this._host.requestUpdate()}handleKeydown(e){return this.activeTrigger?e.key===`Escape`?(e.preventDefault(),this.close(),this.richInputElement?.focus(),!0):e.key===`Tab`?(this.close(),!1):e.key===`ArrowDown`?(e.preventDefault(),this._moveHighlight(1),!0):e.key===`ArrowUp`?(e.preventDefault(),this._moveHighlight(-1),!0):e.key===`Enter`&&!e.shiftKey?(e.preventDefault(),this._selectHighlighted(),!0):!1:!1}_detectTrigger(e){if(this._host.disabled||this._host.readonly||this._host.pending)return;let t=e?.data??``;t.length!==1||!this._isTriggerKey(t)||ee(this._host.shadowRoot)&&this.open(t)}_extractTriggerSearchFromContent(e){let t=this.richInputElement?.textContent??``;if(!t)return null;let n=t.lastIndexOf(e);if(n===-1)return null;let r=t.slice(n+1);return r.includes(` `)||r.includes(`
21
21
  `)?null:r}_isTriggerKey(e){return this._triggers.some(t=>t.key===e)}_updateFilteredOptions(){let e=this.activeConfig;if(!e?.options){this.filteredOptions=[];return}if(e.lazy){this.filteredOptions=e.options;return}if(!this.searchString){this.filteredOptions=e.options;return}let t=this.searchString.toLowerCase(),n=[],r=null;for(let i of e.options){if(i.header){r=i;continue}(i.label.toLowerCase().includes(t)||(i.description?.toLowerCase().includes(t)??!1))&&(r&&=(n.push(r),null),n.push(i))}this.filteredOptions=n}_findSelectableIndex(e,t){let n=this.filteredOptions.length;if(n===0)return-1;let r=(e%n+n)%n;for(let e=0;e<n;e++){if(!this.filteredOptions[r].header)return r;r=((r+t)%n+n)%n}return-1}_moveHighlight(e){let t=this.filteredOptions.length;if(t===0)return;let n=(this.highlightedIndex+e+t)%t;n=this._findSelectableIndex(n,e),n!==-1&&(this.pointerMovedSinceKeyNav=!1,this.hoveredIndex=-1,this.highlightedIndex=n,this._host.requestUpdate(),requestAnimationFrame(()=>{this._host.shadowRoot?.querySelector(`.trigger-option.highlighted`)?.scrollIntoView({block:`nearest`})}))}_selectHighlighted(){let e=this.filteredOptions[this.highlightedIndex];if(!e){this.close();return}this.selectOption(e)}selectOption(e){if(!this.activeTrigger||!this.richInputElement)return;let t=this.activeTrigger,n=this.richInputElement,r=this._host.shadowRoot;ne(r,n,t,this.searchString);let i=e.elementType??t,a=this._host.insertElement(i,e.label,e.data??null,e.icon);v(n,a),this.close(),this._host.updateComplete.then(()=>{requestAnimationFrame(()=>{v(n,a)})})}_dispatchChange(e){this.activeTrigger&&this._host.dispatchEvent(new CustomEvent(`luzmo-trigger-change`,{bubbles:!0,composed:!0,detail:{trigger:this.activeTrigger,open:e,searchString:this.searchString}}))}},S=!1,C=0;function w(){S=!0}function T(){S=!1}function re(){document.addEventListener(`keydown`,w,!0),document.addEventListener(`mousedown`,T,!0),document.addEventListener(`pointerdown`,T,!0)}function E(){document.removeEventListener(`keydown`,w,!0),document.removeEventListener(`mousedown`,T,!0),document.removeEventListener(`pointerdown`,T,!0)}function D(){C===0&&typeof window<`u`&&re(),C++}function O(){C--,C<=0&&(C=0,E())}function k(){return S}function A(e,t,n){return i.html`
@@ -15,4 +15,4 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../select-DkvHL37E.cjs");exports.LuzmoSelect=e.t;
18
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../select-DsGVB01K.cjs");exports.LuzmoSelect=e.t;
@@ -16,5 +16,5 @@
16
16
  * SOFTWARE.
17
17
  * */
18
18
  import "../tokens.js";
19
- import { t as e } from "../select-CAst7yfM.js";
19
+ import { t as e } from "../select-BUgHi69P.js";
20
20
  export { e as LuzmoSelect };
@@ -25,7 +25,7 @@ import { t as r } from "./dependency-manger-wHEXoU92.js";
25
25
  import { i, n as a, t as o } from "./strategies-Cl59wdNZ.js";
26
26
  import "./progress-circle-By6qUQYe.js";
27
27
  import { t as s } from "./pending-state-D_b45qvi.js";
28
- import "./overlay-BvMcppFH.js";
28
+ import "./overlay-DpHIYJtd.js";
29
29
  import "./tooltip-xTa9Q5JW.js";
30
30
  import { r as c } from "./options-D_ifU0DH.js";
31
31
  import { html as l, nothing as u, render as d, unsafeCSS as f } from "lit";
@@ -15,7 +15,7 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./focusable-B6h03pAe.cjs");require("./icon-zOPAWCdx.cjs"),require("./popover-BsdqkvKI.cjs");const r=require("./dependency-manger-BSaHw9ju.cjs"),i=require("./strategies-BwNbUXYS.cjs");require("./progress-circle-bO_VAX3N.cjs");const a=require("./pending-state-CGHvTtKR.cjs");require("./overlay-4YVoQOyd.cjs"),require("./tooltip-DjOW52n2.cjs");const o=require("./options-CP9V2CSJ.cjs");let s=require("lit"),c=require("lit/decorators.js"),l=require("@luzmo/icons"),u=require("lit/directives/if-defined.js"),d=require("lit/directives/class-map.js");var f=(e,t)=>{let n=getComputedStyle(e).getPropertyValue(t);for(;!n&&e.parentElement;)e=e.parentElement,n=getComputedStyle(e).getPropertyValue(t);return n.trim()},p=`:host{font-family:var(--luzmo-select-font-family,var(--select-font-family));font-size:var(--luzmo-select-font-size,var(--select-font-size))}#button{cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--luzmo-button-font-family,var(--luzmo-font-family));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:var(--luzmo-button-line-height,var(--luzmo-line-height,1.3));text-transform:none;vertical-align:top;-webkit-appearance:button;transition:background var(--luzmo-button-animation-duration,var(--luzmo-animation-duration)) ease-out, border-color var(--luzmo-button-animation-duration,var(--luzmo-animation-duration)) ease-out, color var(--luzmo-button-animation-duration,var(--luzmo-animation-duration)) ease-out, box-shadow var(--luzmo-button-animation-duration,var(--luzmo-animation-duration)) ease-out;justify-content:center;align-items:center;margin:0;-webkit-text-decoration:none;text-decoration:none;display:inline-flex;position:relative;overflow:visible}#button::-moz-focus-inner{border-style:none;padding:0}#button:focus{outline:none}#icon{font-size:var(--luzmo-select-font-size,var(--select-font-size));margin-inline-end:var(--luzmo-select-spacing-text-to-icon,var(--select-spacing-text-to-icon))}@media (forced-colors:active){:host{--highcontrast-select-focus-indicator-color:Highlight;--highcontrast-select-border-color-default:ButtonBorder;--highcontrast-select-border-color-hover:Highlight;--highcontrast-select-border-color-disabled:GrayText;--highcontrast-select-content-color-default:ButtonText;--highcontrast-select-content-color-disabled:GrayText;--highcontrast-select-background-color:ButtonFace}#button:focus-visible{--highcontrast-select-border-color-hover:ButtonText}#button .label,#button:after{forced-color-adjust:none}}#button{box-sizing:border-box;max-inline-size:100%;min-inline-size:calc(var(--select-minimum-width-multiplier) * var(--luzmo-select-button-block-size,var(--select-button-block-size)));block-size:var(--luzmo-select-button-block-size,var(--select-button-block-size));border-width:var(--luzmo-select-button-border-width,var(--select-button-border-width));border-radius:var(--luzmo-select-button-border-radius,var(--select-button-border-radius));box-shadow:var(--luzmo-select-button-box-shadow,var(--select-button-box-shadow));transition:background-color var(--luzmo-select-animation-duration,var(--select-animation-duration)), box-shadow var(--luzmo-select-animation-duration,var(--select-animation-duration)), border-color var(--luzmo-select-animation-duration,var(--select-animation-duration)) ease-in-out;color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default,var(--select-font-color-default)));background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-default,var(--select-background-color-default)));border-style:solid;border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-default,var(--select-border-color-default)));margin-block-start:var(--luzmo-select-spacing-label-to-select,var(--select-spacing-label-to-select));padding-block:0;padding-inline-start:var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content));padding-inline-end:var(--luzmo-select-spacing-edge-to-disclosure-icon,var(--select-spacing-edge-to-disclosure-icon));display:flex}#button:after{pointer-events:none;content:"";block-size:calc(100% + var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) * 2 + var(--luzmo-select-button-border-width,var(--select-button-border-width)) * 2);inline-size:calc(100% + var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) * 2 + var(--luzmo-select-button-border-width,var(--select-button-border-width)) * 2);border-style:solid;border-width:var(--luzmo-select-focus-indicator-width,var(--select-focus-indicator-width));border-radius:calc(var(--luzmo-select-button-border-radius,var(--select-button-border-radius)) + var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) + var(--luzmo-select-button-border-width,var(--select-button-border-width)));border-color:#0000;margin-block-start:calc((var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) + var(--luzmo-select-focus-indicator-width,var(--select-focus-indicator-width)) + var(--luzmo-select-button-border-width,var(--select-button-border-width))) * -1);margin-inline-start:calc((var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) + var(--luzmo-select-focus-indicator-width,var(--select-focus-indicator-width)) + var(--luzmo-select-button-border-width,var(--select-button-border-width))) * -1);position:absolute;inset-block:0;inset-inline:0}#button:active{background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-active,var(--select-background-color-active)));border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-active,var(--select-border-color-active)))}#button:active:after{border-color:#0000}#button.placeholder:active .label{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-active,var(--select-font-color-active)))}#button:focus-visible{background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-key-focus,var(--select-background-color-key-focus)));border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-key-focus,var(--select-border-color-key-focus)));color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-key-focus,var(--select-font-color-key-focus)));outline:none}#button:focus-visible:after{border-color:var(--highcontrast-select-focus-indicator-color,var(--luzmo-select-focus-indicator-color,var(--select-focus-indicator-color)))}#button.placeholder:focus-visible{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-key-focus,var(--select-font-color-key-focus)))}#button:focus-visible .disclosure-icon,#button:focus-visible .clear-icon{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-key-focus,var(--select-icon-color-key-focus)))}:host([open]) #button:not(:disabled,.is-disabled){color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default-open,var(--select-font-color-default-open)));background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-default-open,var(--select-background-color-default-open)));border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-default-open,var(--select-border-color-default-open)))}:host([open]) #button:not(:disabled,.is-disabled) .disclosure-icon,:host([open]) #button:not(:disabled,.is-disabled) .clear-icon{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-default-open,var(--select-icon-color-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-error-default,var(--select-border-color-error-default)))}:host([invalid]) #button:not(:disabled,.is-disabled) .validation-icon{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-error,var(--select-icon-color-error)))}:host([invalid]) #button:not(:disabled,.is-disabled):active{border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-error-active,var(--select-border-color-error-active)))}:host([invalid][open]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-error-default-open,var(--select-border-color-error-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):focus-visible{border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-error-key-focus,var(--select-border-color-error-key-focus)))}:host([pending]) #button .disclosure-icon,:host([pending]) #button .clear-icon{color:var(--highcontrast-select-content-color-disabled,var(--luzmo-select-icon-color-disabled,var(--select-icon-color-disabled)))}.icon{flex-shrink:0}.label{white-space:nowrap;font-size:var(--luzmo-select-font-size,var(--select-font-size));line-height:var(--luzmo-select-button-line-height,var(--select-button-line-height));font-weight:var(--luzmo-select-font-weight,var(--select-font-weight));text-overflow:ellipsis;text-align:start;flex:auto;overflow:hidden}.label.placeholder{font-weight:var(--luzmo-select-placeholder-font-weight,var(--select-font-weight));font-style:var(--luzmo-select-placeholder-font-style,var(--select-placeholder-font-style));transition:color var(--luzmo-select-animation-duration,var(--select-animation-duration)) ease-in-out;color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default,var(--select-font-color-default)))}.label.placeholder:active{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-active,var(--select-font-color-active)))}.clear-icon,.disclosure-icon{vertical-align:top;transition:color var(--luzmo-select-animation-duration,var(--select-animation-duration)) ease-out;color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-default,var(--select-icon-color-default)));flex-shrink:0;display:inline-block;position:relative}.disclosure-icon{margin-inline-start:var(--luzmo-select-spacing-icon-to-disclosure-icon,var(--select-spacing-icon-to-disclosure-icon))}.clear-icon{margin-inline-start:var(--luzmo-select-spacing-icon-to-clear-icon,var(--select-spacing-icon-to-clear-icon))}.disclosure-icon:active{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-active,var(--select-icon-color-active)))}luzmo-progress-circle,.validation-icon{margin-inline-start:var(--luzmo-select-spacing-text-to-icon,var(--select-spacing-text-to-icon))}.icon-container{height:100%;font-size:var(--luzmo-select-disclosure-icon-size,var(--select-disclosure-icon-size));align-items:center;display:flex;position:relative}.icon-container.disclosure-icon{margin-inline-end:0}.label~.disclosure-icon,.label~.clear-icon{margin-inline-start:var(--luzmo-select-spacing-text-to-icon,var(--select-spacing-text-to-icon))}:host([quiet]) #button{inline-size:auto;min-inline-size:0;padding-inline:var(--luzmo-select-inline-edge-to-content-quiet,var(--select-inline-edge-to-content-quiet));color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default,var(--select-font-color-default)));background-color:initial;background-color:var(--highcontrast-select-background-color,transparent);box-shadow:none;border:none;border-radius:0;margin-block-start:calc(var(--luzmo-select-spacing-label-to-select-quiet,var(--select-spacing-label-to-select-quiet)) + 1px)}:host([quiet]) #button.label-inline{margin-block-start:0}:host([quiet]) #button .disclosure-icon{margin-inline-end:var(--luzmo-select-spacing-edge-to-disclosure-icon-quiet,var(--select-spacing-edge-to-disclosure-icon-quiet))}:host([quiet]) #button:after{border:none;block-size:auto;inline-size:auto}@media (hover:hover){#button:hover{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-hover,var(--select-font-color-hover)));background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-hover,var(--select-background-color-hover)));border-color:var(--highcontrast-select-border-color-hover,var(--luzmo-select-border-color-hover,var(--select-border-color-hover)))}#button:hover .disclosure-icon,#button:hover .clear-icon{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-hover,var(--select-icon-color-hover)))}#button:hover .clear-icon:hover{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-clear-icon-color-hover,var(--select-icon-color-focus)))}:host([open]):not([quiet]) #button:not(:disabled,.is-disabled):hover{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-hover-open,var(--select-font-color-hover-open)));background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-hover-open,var(--select-background-color-hover-open)));border-color:var(--highcontrast-select-border-color-hover,var(--luzmo-select-border-color-hover-open,var(--select-border-color-hover-open)))}:host([open]) #button:not(:disabled,.is-disabled):hover .disclosure-icon,:host([open]) #button:not(:disabled,.is-disabled):hover .clear-icon{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-hover-open,var(--select-icon-color-hover-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-select-border-color-hover,var(--luzmo-select-border-color-error-hover,var(--select-border-color-error-hover)))}:host([invalid][open]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-select-border-color-hover,var(--luzmo-select-border-color-error-hover-open,var(--select-border-color-error-hover-open)))}.label.placeholder:hover{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-hover,var(--select-font-color-hover)))}:host([quiet]) #button:hover{background-color:initial;background-color:var(--highcontrast-select-background-color,transparent)!important}}:host([quiet]) #button:focus-visible{background-color:initial;background-color:var(--highcontrast-select-background-color,transparent)}:host([quiet]) #button:focus-visible:after{box-shadow:0 var(--luzmo-select-focus-indicator-width,var(--select-focus-indicator-width)) 0 0 var(--highcontrast-select-focus-indicator-color,var(--luzmo-select-focus-indicator-color,var(--select-focus-indicator-color)));margin:calc((var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) + var(--luzmo-select-button-border-width,var(--select-button-border-width))) * -1) 0;border:none;border-radius:0}:host([quiet][open]) #button,:host([quiet][disabled]) #button#button,:host([quiet]) #button#button:disabled,:host([quiet]) #button:active{background-color:initial;background-color:var(--highcontrast-select-background-color,transparent)}.label-inline{vertical-align:top;display:inline-flex}:host([disabled]) #button,#button:disabled{cursor:default;background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-disabled,var(--select-background-color-disabled)));border-color:#0000;border-color:var(--highcontrast-select-border-color-disabled,transparent);color:var(--highcontrast-select-content-color-disabled,var(--luzmo-select-font-color-disabled,var(--select-font-color-disabled)))}:host([disabled]) #button .icon,:host([disabled]) #button .disclosure-icon,:host([disabled]) #button .clear-icon,:host([disabled]) #button .validation-icon,#button:disabled .icon,#button:disabled .disclosure-icon,#button:disabled .clear-icon,#button:disabled .validation-icon{color:var(--highcontrast-select-content-color-disabled,var(--luzmo-select-icon-color-disabled,var(--select-icon-color-disabled)))}:host([disabled]) #button .label.placeholder,#button:disabled .label.placeholder{color:var(--highcontrast-select-content-color-disabled,var(--luzmo-select-font-color-disabled,var(--select-font-color-disabled)))}#popover{max-width:var(--luzmo-select-popover-max-width,var(--select-popover-max-width));min-width:var(--luzmo-select-popover-min-width,var(--select-popover-min-width));width:var(--luzmo-select-popover-width,var(--select-popover-width))}#popover.search-on{padding:0 0 var(--luzmo-popover-content-area-spacing-vertical,var(--popover-content-area-spacing-vertical)) 0!important}#search-container{border-bottom:var(--luzmo-select-search-container-border-bottom-width,var(--select-search-container-border-bottom-width)) solid var(--luzmo-select-search-container-border-bottom-color,var(--select-search-container-border-bottom-color));flex:none;display:flex;position:relative}#search-icon{left:var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content));color:var(--luzmo-select-search-icon-color,var(--select-search-icon-color));font-size:var(--luzmo-select-search-icon-height,var(--select-search-icon-height));width:var(--luzmo-select-search-icon-width,var(--select-search-icon-width));text-align:center;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0}#search:focus-within+#search-icon,#search:focus+#search-icon{color:var(--luzmo-select-search-icon-color-focus,var(--select-search-icon-color-focus))}#search{box-sizing:border-box;border-top-left-radius:var(--luzmo-popover-border-radius,var(--popover-border-radius));border-top-right-radius:var(--luzmo-popover-border-radius,var(--popover-border-radius));background-color:var(--luzmo-select-search-background-color,var(--select-search-background-color));width:100%;color:var(--luzmo-select-search-color,var(--select-search-color));height:var(--luzmo-select-button-block-size,var(--select-button-block-size));line-height:var(--luzmo-select-button-block-size,var(--select-button-block-size));padding-left:calc(var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content)) + var(--luzmo-select-spacing-search-icon-to-text,var(--select-spacing-search-icon-to-text)) + var(--luzmo-select-search-icon-width,var(--select-search-icon-width)));padding-right:var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content));font-size:var(--luzmo-select-font-size,var(--select-font-size));font-family:var(--luzmo-select-font-family,var(--select-font-family));line-height:var(--luzmo-select-button-line-height,var(--select-button-line-height));font-weight:var(--luzmo-select-font-weight,var(--select-font-weight));border:var(--luzmo-select-search-input-border-bottom-width,var(--select-search-input-border-bottom-width)) solid var(--luzmo-select-search-input-border-bottom-color,var(--select-search-input-border-bottom-color));outline:none}#no-results{color:var(--luzmo-select-no-results-color,var(--select-no-results-color));font-style:var(--luzmo-select-no-results-font-style,var(--select-no-results-font-style));height:var(--luzmo-select-no-results-height,var(--select-no-results-height));padding-inline:var(--luzmo-select-no-results-spacing-edge-to-text,var(--select-no-results-spacing-edge-to-text));align-items:center;display:flex}:host{--select-popover-max-width:300px;--select-popover-min-width:160px;--select-font-family:var(--luzmo-font-family);--select-font-size:var(--luzmo-font-size);--select-font-weight:var(--luzmo-font-weight);--select-spacing-search-icon-to-text:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-search-icon-height:var(--luzmo-font-size);--select-search-icon-width:var(--luzmo-font-size);--select-search-icon-color:var(--luzmo-disabled-color);--select-search-icon-color-focus:var(--luzmo-font-color);--select-search-color:var(--luzmo-font-color);--select-search-background-color:var(--luzmo-background-color);--select-search-container-border-bottom-width:var(--luzmo-border-width);--select-search-container-border-bottom-color:var(--luzmo-border-color);--select-search-input-border-bottom-width:var(--luzmo-border-width);--select-search-input-border-bottom-color:transparent;--select-background-color-default:var(--luzmo-background-color);--select-background-color-default-open:var(--luzmo-background-color-hover);--select-background-color-active:var(--luzmo-background-color-down);--select-background-color-hover:var(--luzmo-background-color-hover);--select-background-color-hover-open:var(--luzmo-background-color-down);--select-background-color-key-focus:var(--luzmo-background-color-down);--select-border-color-default:var(--luzmo-border-color);--select-border-color-default-open:var(--luzmo-border-color-hover);--select-border-color-hover:var(--luzmo-border-color);--select-border-color-hover-open:var(--luzmo-border-color-hover);--select-border-color-active:var(--luzmo-border-color);--select-border-color-key-focus:var(--luzmo-border-color);--select-button-border-width:var(--luzmo-border-width);--select-placeholder-font-style:var(--luzmo-font-style);--select-button-line-height:var(--luzmo-line-height);--select-button-box-shadow:0px 1px 3px 0px var(--luzmo-shadow-color);--select-button-block-size:var(--luzmo-component-height);--select-button-border-radius:var(--luzmo-border-radius);--select-button-border-radius-reset:0;--select-inline-edge-to-content:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-text-to-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-text-to-icon-inline-end:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-icon-to-disclosure-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-icon-to-clear-icon:var(--select-spacing-icon-to-disclosure-icon);--select-inline-edge-to-content-quiet:0px;--select-spacing-label-to-select:0px;--select-spacing-label-to-select-quiet:calc(-1 * var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-edge-to-disclosure-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-edge-to-disclosure-icon-quiet:0px;--select-animation-duration:var(--luzmo-animation-duration);--select-font-color-default:var(--luzmo-font-color);--select-font-color-default-open:var(--luzmo-font-color-hover);--select-font-color-hover:var(--luzmo-font-color-hover);--select-font-color-hover-open:var(--luzmo-font-color-down);--select-font-color-active:var(--luzmo-font-color-focus);--select-font-color-key-focus:var(--luzmo-font-color-focus);--select-icon-color-default:var(--luzmo-font-color);--select-icon-color-default-open:var(--luzmo-font-color-hover);--select-icon-color-hover:var(--luzmo-font-color-hover);--select-icon-color-hover-open:var(--luzmo-font-color-hover);--select-icon-color-active:var(--luzmo-font-color-focus);--select-icon-color-key-focus:var(--luzmo-font-color-focus);--select-border-color-error-default:var(--luzmo-negative-color);--select-border-color-error-default-open:var(--luzmo-negative-color-down);--select-border-color-error-hover:var(--luzmo-negative-color-hover);--select-border-color-error-hover-open:var(--luzmo-negative-color-down);--select-border-color-error-active:var(--luzmo-negative-color-down);--select-border-color-error-key-focus:var(--luzmo-negative-color-focus);--select-icon-color-error:var(--luzmo-negative-color);--select-background-color-disabled:var(--luzmo-background-color-disabled);--select-font-color-disabled:var(--luzmo-disabled-color);--select-icon-color-disabled:var(--luzmo-disabled-color);--select-focus-indicator-gap:var(--luzmo-indicator-gap);--select-focus-indicator-width:var(--luzmo-indicator-width);--select-focus-indicator-color:var(--luzmo-indicator-color);--select-disclosure-icon-size:var(--luzmo-font-size-s);--select-no-results-height:var(--select-button-block-size);--select-no-results-color:var(--select-font-color-disabled);--select-no-results-font-style:italic;--select-no-results-spacing-edge-to-text:var(--select-inline-edge-to-content)}:host([size=s]){--select-button-block-size:var(--luzmo-component-height-s);--select-font-size:var(--luzmo-font-size-s);--select-search-icon-height:var(--luzmo-font-size-s);--select-search-icon-width:var(--luzmo-font-size-s);--select-popover-max-width:280px;--select-popover-min-width:140px;--select-spacing-search-icon-to-text:var(--luzmo-spacing-3);--select-inline-edge-to-content:var(--luzmo-spacing-3);--select-spacing-text-to-icon:var(--luzmo-spacing-3);--select-spacing-text-to-icon-inline-end:var(--luzmo-spacing-3);--select-spacing-icon-to-disclosure-icon:var(--luzmo-spacing-3);--select-spacing-label-to-select-quiet:calc(-1 * var(--luzmo-spacing-3));--select-spacing-edge-to-disclosure-icon:var(--luzmo-spacing-3);--select-disclosure-icon-size:var(--luzmo-font-size-s)}:host([size=l]){--select-button-block-size:var(--luzmo-component-height-l);--select-font-size:var(--luzmo-font-size-l);--select-search-icon-height:var(--luzmo-font-size-l);--select-search-icon-width:var(--luzmo-font-size-l);--select-popover-max-width:360px;--select-popover-min-width:220px;--select-spacing-search-icon-to-text:var(--luzmo-spacing-4);--select-inline-edge-to-content:var(--luzmo-spacing-4);--select-spacing-text-to-icon:var(--luzmo-spacing-4);--select-spacing-text-to-icon-inline-end:var(--luzmo-spacing-4);--select-spacing-icon-to-disclosure-icon:var(--luzmo-spacing-4);--select-spacing-label-to-select-quiet:calc(-1 * var(--luzmo-spacing-4));--select-spacing-edge-to-disclosure-icon:var(--luzmo-spacing-4);--select-disclosure-icon-size:var(--luzmo-font-size)}:host([size=xl]){--select-button-block-size:var(--luzmo-component-height-xl);--select-font-size:var(--luzmo-font-size-xl);--select-search-icon-height:var(--luzmo-font-size-xl);--select-search-icon-width:var(--luzmo-font-size-xl);--select-popover-max-width:400px;--select-popover-min-width:260px;--select-spacing-search-icon-to-text:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-inline-edge-to-content:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-spacing-text-to-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-spacing-text-to-icon-inline-end:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-spacing-icon-to-disclosure-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-spacing-label-to-select-quiet:calc(-1 * var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-spacing-edge-to-disclosure-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-disclosure-icon-size:var(--luzmo-font-size-l)}:host([variant=highlight]) ::slotted(luzmo-option[selected]){--option-highlight-label-content-color:var(--luzmo-primary-inverse-color);--option-label-icon-color-default:var(--luzmo-primary-inverse-color);--menu-checkmark-display:var(--menu-checkmark-display-hidden);background-color:var(--luzmo-option-highlight-label-background-color,var(--option-highlight-label-background-color,var(--luzmo-border-color)));padding-inline-start:var(--luzmo-option-label-inline-edge-to-content,var(--option-label-inline-edge-to-content))}:host{vertical-align:top;max-inline-size:100%;inline-size:var(--luzmo-select-inline-size,var(--select-inline-size));min-inline-size:calc(var(--select-minimum-width-multiplier) * var(--luzmo-select-block-size,var(--select-block-size)));display:inline-flex}:host([quiet]){width:auto;min-width:0}:host([disabled]){pointer-events:none}#button{width:100%;min-width:100%;max-width:100%}#icon:not([hidden]){display:inline-flex}:host([readonly]) #button{user-select:inherit}.validation-icon{flex-shrink:0}luzmo-overlay{pointer-events:none}luzmo-options{pointer-events:initial}:host>#no-results,:host>luzmo-options{display:none}:host([focused]:not([quiet])) #button #label.placeholder{color:var(--select-placeholder-text-color-key-focus,var(--alias-placeholder-text-color-hover))}.visually-hidden{clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0 -1px -1px 0;padding:0;position:absolute;overflow:hidden}luzmo-overlay:not(:defined){display:none}#button.remove-focus-ring-safari-hack:focus-visible{background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-default,var(--select-background-color-default)));border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-default,var(--select-border-color-default)));color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default,var(--select-font-color-default)))}#button.remove-focus-ring-safari-hack:after{border:none}#button.remove-focus-ring-safari-hack:focus-visible:after{box-shadow:none}#button.remove-focus-ring-safari-hack:active{background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-default,var(--select-background-color-default)));border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-default,var(--select-border-color-default)));color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default,var(--select-font-color-default)))}`,m=()=>s.html`
18
+ require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./focusable-B6h03pAe.cjs");require("./icon-zOPAWCdx.cjs"),require("./popover-BsdqkvKI.cjs");const r=require("./dependency-manger-BSaHw9ju.cjs"),i=require("./strategies-BwNbUXYS.cjs");require("./progress-circle-bO_VAX3N.cjs");const a=require("./pending-state-CGHvTtKR.cjs");require("./overlay-Dn7EbA_W.cjs"),require("./tooltip-DjOW52n2.cjs");const o=require("./options-CP9V2CSJ.cjs");let s=require("lit"),c=require("lit/decorators.js"),l=require("@luzmo/icons"),u=require("lit/directives/if-defined.js"),d=require("lit/directives/class-map.js");var f=(e,t)=>{let n=getComputedStyle(e).getPropertyValue(t);for(;!n&&e.parentElement;)e=e.parentElement,n=getComputedStyle(e).getPropertyValue(t);return n.trim()},p=`:host{font-family:var(--luzmo-select-font-family,var(--select-font-family));font-size:var(--luzmo-select-font-size,var(--select-font-size))}#button{cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--luzmo-button-font-family,var(--luzmo-font-family));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:var(--luzmo-button-line-height,var(--luzmo-line-height,1.3));text-transform:none;vertical-align:top;-webkit-appearance:button;transition:background var(--luzmo-button-animation-duration,var(--luzmo-animation-duration)) ease-out, border-color var(--luzmo-button-animation-duration,var(--luzmo-animation-duration)) ease-out, color var(--luzmo-button-animation-duration,var(--luzmo-animation-duration)) ease-out, box-shadow var(--luzmo-button-animation-duration,var(--luzmo-animation-duration)) ease-out;justify-content:center;align-items:center;margin:0;-webkit-text-decoration:none;text-decoration:none;display:inline-flex;position:relative;overflow:visible}#button::-moz-focus-inner{border-style:none;padding:0}#button:focus{outline:none}#icon{font-size:var(--luzmo-select-font-size,var(--select-font-size));margin-inline-end:var(--luzmo-select-spacing-text-to-icon,var(--select-spacing-text-to-icon))}@media (forced-colors:active){:host{--highcontrast-select-focus-indicator-color:Highlight;--highcontrast-select-border-color-default:ButtonBorder;--highcontrast-select-border-color-hover:Highlight;--highcontrast-select-border-color-disabled:GrayText;--highcontrast-select-content-color-default:ButtonText;--highcontrast-select-content-color-disabled:GrayText;--highcontrast-select-background-color:ButtonFace}#button:focus-visible{--highcontrast-select-border-color-hover:ButtonText}#button .label,#button:after{forced-color-adjust:none}}#button{box-sizing:border-box;max-inline-size:100%;min-inline-size:calc(var(--select-minimum-width-multiplier) * var(--luzmo-select-button-block-size,var(--select-button-block-size)));block-size:var(--luzmo-select-button-block-size,var(--select-button-block-size));border-width:var(--luzmo-select-button-border-width,var(--select-button-border-width));border-radius:var(--luzmo-select-button-border-radius,var(--select-button-border-radius));box-shadow:var(--luzmo-select-button-box-shadow,var(--select-button-box-shadow));transition:background-color var(--luzmo-select-animation-duration,var(--select-animation-duration)), box-shadow var(--luzmo-select-animation-duration,var(--select-animation-duration)), border-color var(--luzmo-select-animation-duration,var(--select-animation-duration)) ease-in-out;color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default,var(--select-font-color-default)));background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-default,var(--select-background-color-default)));border-style:solid;border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-default,var(--select-border-color-default)));margin-block-start:var(--luzmo-select-spacing-label-to-select,var(--select-spacing-label-to-select));padding-block:0;padding-inline-start:var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content));padding-inline-end:var(--luzmo-select-spacing-edge-to-disclosure-icon,var(--select-spacing-edge-to-disclosure-icon));display:flex}#button:after{pointer-events:none;content:"";block-size:calc(100% + var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) * 2 + var(--luzmo-select-button-border-width,var(--select-button-border-width)) * 2);inline-size:calc(100% + var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) * 2 + var(--luzmo-select-button-border-width,var(--select-button-border-width)) * 2);border-style:solid;border-width:var(--luzmo-select-focus-indicator-width,var(--select-focus-indicator-width));border-radius:calc(var(--luzmo-select-button-border-radius,var(--select-button-border-radius)) + var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) + var(--luzmo-select-button-border-width,var(--select-button-border-width)));border-color:#0000;margin-block-start:calc((var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) + var(--luzmo-select-focus-indicator-width,var(--select-focus-indicator-width)) + var(--luzmo-select-button-border-width,var(--select-button-border-width))) * -1);margin-inline-start:calc((var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) + var(--luzmo-select-focus-indicator-width,var(--select-focus-indicator-width)) + var(--luzmo-select-button-border-width,var(--select-button-border-width))) * -1);position:absolute;inset-block:0;inset-inline:0}#button:active{background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-active,var(--select-background-color-active)));border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-active,var(--select-border-color-active)))}#button:active:after{border-color:#0000}#button.placeholder:active .label{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-active,var(--select-font-color-active)))}#button:focus-visible{background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-key-focus,var(--select-background-color-key-focus)));border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-key-focus,var(--select-border-color-key-focus)));color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-key-focus,var(--select-font-color-key-focus)));outline:none}#button:focus-visible:after{border-color:var(--highcontrast-select-focus-indicator-color,var(--luzmo-select-focus-indicator-color,var(--select-focus-indicator-color)))}#button.placeholder:focus-visible{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-key-focus,var(--select-font-color-key-focus)))}#button:focus-visible .disclosure-icon,#button:focus-visible .clear-icon{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-key-focus,var(--select-icon-color-key-focus)))}:host([open]) #button:not(:disabled,.is-disabled){color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default-open,var(--select-font-color-default-open)));background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-default-open,var(--select-background-color-default-open)));border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-default-open,var(--select-border-color-default-open)))}:host([open]) #button:not(:disabled,.is-disabled) .disclosure-icon,:host([open]) #button:not(:disabled,.is-disabled) .clear-icon{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-default-open,var(--select-icon-color-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-error-default,var(--select-border-color-error-default)))}:host([invalid]) #button:not(:disabled,.is-disabled) .validation-icon{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-error,var(--select-icon-color-error)))}:host([invalid]) #button:not(:disabled,.is-disabled):active{border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-error-active,var(--select-border-color-error-active)))}:host([invalid][open]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-error-default-open,var(--select-border-color-error-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):focus-visible{border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-error-key-focus,var(--select-border-color-error-key-focus)))}:host([pending]) #button .disclosure-icon,:host([pending]) #button .clear-icon{color:var(--highcontrast-select-content-color-disabled,var(--luzmo-select-icon-color-disabled,var(--select-icon-color-disabled)))}.icon{flex-shrink:0}.label{white-space:nowrap;font-size:var(--luzmo-select-font-size,var(--select-font-size));line-height:var(--luzmo-select-button-line-height,var(--select-button-line-height));font-weight:var(--luzmo-select-font-weight,var(--select-font-weight));text-overflow:ellipsis;text-align:start;flex:auto;overflow:hidden}.label.placeholder{font-weight:var(--luzmo-select-placeholder-font-weight,var(--select-font-weight));font-style:var(--luzmo-select-placeholder-font-style,var(--select-placeholder-font-style));transition:color var(--luzmo-select-animation-duration,var(--select-animation-duration)) ease-in-out;color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default,var(--select-font-color-default)))}.label.placeholder:active{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-active,var(--select-font-color-active)))}.clear-icon,.disclosure-icon{vertical-align:top;transition:color var(--luzmo-select-animation-duration,var(--select-animation-duration)) ease-out;color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-default,var(--select-icon-color-default)));flex-shrink:0;display:inline-block;position:relative}.disclosure-icon{margin-inline-start:var(--luzmo-select-spacing-icon-to-disclosure-icon,var(--select-spacing-icon-to-disclosure-icon))}.clear-icon{margin-inline-start:var(--luzmo-select-spacing-icon-to-clear-icon,var(--select-spacing-icon-to-clear-icon))}.disclosure-icon:active{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-active,var(--select-icon-color-active)))}luzmo-progress-circle,.validation-icon{margin-inline-start:var(--luzmo-select-spacing-text-to-icon,var(--select-spacing-text-to-icon))}.icon-container{height:100%;font-size:var(--luzmo-select-disclosure-icon-size,var(--select-disclosure-icon-size));align-items:center;display:flex;position:relative}.icon-container.disclosure-icon{margin-inline-end:0}.label~.disclosure-icon,.label~.clear-icon{margin-inline-start:var(--luzmo-select-spacing-text-to-icon,var(--select-spacing-text-to-icon))}:host([quiet]) #button{inline-size:auto;min-inline-size:0;padding-inline:var(--luzmo-select-inline-edge-to-content-quiet,var(--select-inline-edge-to-content-quiet));color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default,var(--select-font-color-default)));background-color:initial;background-color:var(--highcontrast-select-background-color,transparent);box-shadow:none;border:none;border-radius:0;margin-block-start:calc(var(--luzmo-select-spacing-label-to-select-quiet,var(--select-spacing-label-to-select-quiet)) + 1px)}:host([quiet]) #button.label-inline{margin-block-start:0}:host([quiet]) #button .disclosure-icon{margin-inline-end:var(--luzmo-select-spacing-edge-to-disclosure-icon-quiet,var(--select-spacing-edge-to-disclosure-icon-quiet))}:host([quiet]) #button:after{border:none;block-size:auto;inline-size:auto}@media (hover:hover){#button:hover{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-hover,var(--select-font-color-hover)));background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-hover,var(--select-background-color-hover)));border-color:var(--highcontrast-select-border-color-hover,var(--luzmo-select-border-color-hover,var(--select-border-color-hover)))}#button:hover .disclosure-icon,#button:hover .clear-icon{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-hover,var(--select-icon-color-hover)))}#button:hover .clear-icon:hover{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-clear-icon-color-hover,var(--select-icon-color-focus)))}:host([open]):not([quiet]) #button:not(:disabled,.is-disabled):hover{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-hover-open,var(--select-font-color-hover-open)));background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-hover-open,var(--select-background-color-hover-open)));border-color:var(--highcontrast-select-border-color-hover,var(--luzmo-select-border-color-hover-open,var(--select-border-color-hover-open)))}:host([open]) #button:not(:disabled,.is-disabled):hover .disclosure-icon,:host([open]) #button:not(:disabled,.is-disabled):hover .clear-icon{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-icon-color-hover-open,var(--select-icon-color-hover-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-select-border-color-hover,var(--luzmo-select-border-color-error-hover,var(--select-border-color-error-hover)))}:host([invalid][open]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-select-border-color-hover,var(--luzmo-select-border-color-error-hover-open,var(--select-border-color-error-hover-open)))}.label.placeholder:hover{color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-hover,var(--select-font-color-hover)))}:host([quiet]) #button:hover{background-color:initial;background-color:var(--highcontrast-select-background-color,transparent)!important}}:host([quiet]) #button:focus-visible{background-color:initial;background-color:var(--highcontrast-select-background-color,transparent)}:host([quiet]) #button:focus-visible:after{box-shadow:0 var(--luzmo-select-focus-indicator-width,var(--select-focus-indicator-width)) 0 0 var(--highcontrast-select-focus-indicator-color,var(--luzmo-select-focus-indicator-color,var(--select-focus-indicator-color)));margin:calc((var(--luzmo-select-focus-indicator-gap,var(--select-focus-indicator-gap)) + var(--luzmo-select-button-border-width,var(--select-button-border-width))) * -1) 0;border:none;border-radius:0}:host([quiet][open]) #button,:host([quiet][disabled]) #button#button,:host([quiet]) #button#button:disabled,:host([quiet]) #button:active{background-color:initial;background-color:var(--highcontrast-select-background-color,transparent)}.label-inline{vertical-align:top;display:inline-flex}:host([disabled]) #button,#button:disabled{cursor:default;background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-disabled,var(--select-background-color-disabled)));border-color:#0000;border-color:var(--highcontrast-select-border-color-disabled,transparent);color:var(--highcontrast-select-content-color-disabled,var(--luzmo-select-font-color-disabled,var(--select-font-color-disabled)))}:host([disabled]) #button .icon,:host([disabled]) #button .disclosure-icon,:host([disabled]) #button .clear-icon,:host([disabled]) #button .validation-icon,#button:disabled .icon,#button:disabled .disclosure-icon,#button:disabled .clear-icon,#button:disabled .validation-icon{color:var(--highcontrast-select-content-color-disabled,var(--luzmo-select-icon-color-disabled,var(--select-icon-color-disabled)))}:host([disabled]) #button .label.placeholder,#button:disabled .label.placeholder{color:var(--highcontrast-select-content-color-disabled,var(--luzmo-select-font-color-disabled,var(--select-font-color-disabled)))}#popover{max-width:var(--luzmo-select-popover-max-width,var(--select-popover-max-width));min-width:var(--luzmo-select-popover-min-width,var(--select-popover-min-width));width:var(--luzmo-select-popover-width,var(--select-popover-width))}#popover.search-on{padding:0 0 var(--luzmo-popover-content-area-spacing-vertical,var(--popover-content-area-spacing-vertical)) 0!important}#search-container{border-bottom:var(--luzmo-select-search-container-border-bottom-width,var(--select-search-container-border-bottom-width)) solid var(--luzmo-select-search-container-border-bottom-color,var(--select-search-container-border-bottom-color));flex:none;display:flex;position:relative}#search-icon{left:var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content));color:var(--luzmo-select-search-icon-color,var(--select-search-icon-color));font-size:var(--luzmo-select-search-icon-height,var(--select-search-icon-height));width:var(--luzmo-select-search-icon-width,var(--select-search-icon-width));text-align:center;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0}#search:focus-within+#search-icon,#search:focus+#search-icon{color:var(--luzmo-select-search-icon-color-focus,var(--select-search-icon-color-focus))}#search{box-sizing:border-box;border-top-left-radius:var(--luzmo-popover-border-radius,var(--popover-border-radius));border-top-right-radius:var(--luzmo-popover-border-radius,var(--popover-border-radius));background-color:var(--luzmo-select-search-background-color,var(--select-search-background-color));width:100%;color:var(--luzmo-select-search-color,var(--select-search-color));height:var(--luzmo-select-button-block-size,var(--select-button-block-size));line-height:var(--luzmo-select-button-block-size,var(--select-button-block-size));padding-left:calc(var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content)) + var(--luzmo-select-spacing-search-icon-to-text,var(--select-spacing-search-icon-to-text)) + var(--luzmo-select-search-icon-width,var(--select-search-icon-width)));padding-right:var(--luzmo-select-inline-edge-to-content,var(--select-inline-edge-to-content));font-size:var(--luzmo-select-font-size,var(--select-font-size));font-family:var(--luzmo-select-font-family,var(--select-font-family));line-height:var(--luzmo-select-button-line-height,var(--select-button-line-height));font-weight:var(--luzmo-select-font-weight,var(--select-font-weight));border:var(--luzmo-select-search-input-border-bottom-width,var(--select-search-input-border-bottom-width)) solid var(--luzmo-select-search-input-border-bottom-color,var(--select-search-input-border-bottom-color));outline:none}#no-results{color:var(--luzmo-select-no-results-color,var(--select-no-results-color));font-style:var(--luzmo-select-no-results-font-style,var(--select-no-results-font-style));height:var(--luzmo-select-no-results-height,var(--select-no-results-height));padding-inline:var(--luzmo-select-no-results-spacing-edge-to-text,var(--select-no-results-spacing-edge-to-text));align-items:center;display:flex}:host{--select-popover-max-width:300px;--select-popover-min-width:160px;--select-font-family:var(--luzmo-font-family);--select-font-size:var(--luzmo-font-size);--select-font-weight:var(--luzmo-font-weight);--select-spacing-search-icon-to-text:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-search-icon-height:var(--luzmo-font-size);--select-search-icon-width:var(--luzmo-font-size);--select-search-icon-color:var(--luzmo-disabled-color);--select-search-icon-color-focus:var(--luzmo-font-color);--select-search-color:var(--luzmo-font-color);--select-search-background-color:var(--luzmo-background-color);--select-search-container-border-bottom-width:var(--luzmo-border-width);--select-search-container-border-bottom-color:var(--luzmo-border-color);--select-search-input-border-bottom-width:var(--luzmo-border-width);--select-search-input-border-bottom-color:transparent;--select-background-color-default:var(--luzmo-background-color);--select-background-color-default-open:var(--luzmo-background-color-hover);--select-background-color-active:var(--luzmo-background-color-down);--select-background-color-hover:var(--luzmo-background-color-hover);--select-background-color-hover-open:var(--luzmo-background-color-down);--select-background-color-key-focus:var(--luzmo-background-color-down);--select-border-color-default:var(--luzmo-border-color);--select-border-color-default-open:var(--luzmo-border-color-hover);--select-border-color-hover:var(--luzmo-border-color);--select-border-color-hover-open:var(--luzmo-border-color-hover);--select-border-color-active:var(--luzmo-border-color);--select-border-color-key-focus:var(--luzmo-border-color);--select-button-border-width:var(--luzmo-border-width);--select-placeholder-font-style:var(--luzmo-font-style);--select-button-line-height:var(--luzmo-line-height);--select-button-box-shadow:0px 1px 3px 0px var(--luzmo-shadow-color);--select-button-block-size:var(--luzmo-component-height);--select-button-border-radius:var(--luzmo-border-radius);--select-button-border-radius-reset:0;--select-inline-edge-to-content:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-text-to-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-text-to-icon-inline-end:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-icon-to-disclosure-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-icon-to-clear-icon:var(--select-spacing-icon-to-disclosure-icon);--select-inline-edge-to-content-quiet:0px;--select-spacing-label-to-select:0px;--select-spacing-label-to-select-quiet:calc(-1 * var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-edge-to-disclosure-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--select-spacing-edge-to-disclosure-icon-quiet:0px;--select-animation-duration:var(--luzmo-animation-duration);--select-font-color-default:var(--luzmo-font-color);--select-font-color-default-open:var(--luzmo-font-color-hover);--select-font-color-hover:var(--luzmo-font-color-hover);--select-font-color-hover-open:var(--luzmo-font-color-down);--select-font-color-active:var(--luzmo-font-color-focus);--select-font-color-key-focus:var(--luzmo-font-color-focus);--select-icon-color-default:var(--luzmo-font-color);--select-icon-color-default-open:var(--luzmo-font-color-hover);--select-icon-color-hover:var(--luzmo-font-color-hover);--select-icon-color-hover-open:var(--luzmo-font-color-hover);--select-icon-color-active:var(--luzmo-font-color-focus);--select-icon-color-key-focus:var(--luzmo-font-color-focus);--select-border-color-error-default:var(--luzmo-negative-color);--select-border-color-error-default-open:var(--luzmo-negative-color-down);--select-border-color-error-hover:var(--luzmo-negative-color-hover);--select-border-color-error-hover-open:var(--luzmo-negative-color-down);--select-border-color-error-active:var(--luzmo-negative-color-down);--select-border-color-error-key-focus:var(--luzmo-negative-color-focus);--select-icon-color-error:var(--luzmo-negative-color);--select-background-color-disabled:var(--luzmo-background-color-disabled);--select-font-color-disabled:var(--luzmo-disabled-color);--select-icon-color-disabled:var(--luzmo-disabled-color);--select-focus-indicator-gap:var(--luzmo-indicator-gap);--select-focus-indicator-width:var(--luzmo-indicator-width);--select-focus-indicator-color:var(--luzmo-indicator-color);--select-disclosure-icon-size:var(--luzmo-font-size-s);--select-no-results-height:var(--select-button-block-size);--select-no-results-color:var(--select-font-color-disabled);--select-no-results-font-style:italic;--select-no-results-spacing-edge-to-text:var(--select-inline-edge-to-content)}:host([size=s]){--select-button-block-size:var(--luzmo-component-height-s);--select-font-size:var(--luzmo-font-size-s);--select-search-icon-height:var(--luzmo-font-size-s);--select-search-icon-width:var(--luzmo-font-size-s);--select-popover-max-width:280px;--select-popover-min-width:140px;--select-spacing-search-icon-to-text:var(--luzmo-spacing-3);--select-inline-edge-to-content:var(--luzmo-spacing-3);--select-spacing-text-to-icon:var(--luzmo-spacing-3);--select-spacing-text-to-icon-inline-end:var(--luzmo-spacing-3);--select-spacing-icon-to-disclosure-icon:var(--luzmo-spacing-3);--select-spacing-label-to-select-quiet:calc(-1 * var(--luzmo-spacing-3));--select-spacing-edge-to-disclosure-icon:var(--luzmo-spacing-3);--select-disclosure-icon-size:var(--luzmo-font-size-s)}:host([size=l]){--select-button-block-size:var(--luzmo-component-height-l);--select-font-size:var(--luzmo-font-size-l);--select-search-icon-height:var(--luzmo-font-size-l);--select-search-icon-width:var(--luzmo-font-size-l);--select-popover-max-width:360px;--select-popover-min-width:220px;--select-spacing-search-icon-to-text:var(--luzmo-spacing-4);--select-inline-edge-to-content:var(--luzmo-spacing-4);--select-spacing-text-to-icon:var(--luzmo-spacing-4);--select-spacing-text-to-icon-inline-end:var(--luzmo-spacing-4);--select-spacing-icon-to-disclosure-icon:var(--luzmo-spacing-4);--select-spacing-label-to-select-quiet:calc(-1 * var(--luzmo-spacing-4));--select-spacing-edge-to-disclosure-icon:var(--luzmo-spacing-4);--select-disclosure-icon-size:var(--luzmo-font-size)}:host([size=xl]){--select-button-block-size:var(--luzmo-component-height-xl);--select-font-size:var(--luzmo-font-size-xl);--select-search-icon-height:var(--luzmo-font-size-xl);--select-search-icon-width:var(--luzmo-font-size-xl);--select-popover-max-width:400px;--select-popover-min-width:260px;--select-spacing-search-icon-to-text:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-inline-edge-to-content:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-spacing-text-to-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-spacing-text-to-icon-inline-end:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-spacing-icon-to-disclosure-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-spacing-label-to-select-quiet:calc(-1 * var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-spacing-edge-to-disclosure-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--select-disclosure-icon-size:var(--luzmo-font-size-l)}:host([variant=highlight]) ::slotted(luzmo-option[selected]){--option-highlight-label-content-color:var(--luzmo-primary-inverse-color);--option-label-icon-color-default:var(--luzmo-primary-inverse-color);--menu-checkmark-display:var(--menu-checkmark-display-hidden);background-color:var(--luzmo-option-highlight-label-background-color,var(--option-highlight-label-background-color,var(--luzmo-border-color)));padding-inline-start:var(--luzmo-option-label-inline-edge-to-content,var(--option-label-inline-edge-to-content))}:host{vertical-align:top;max-inline-size:100%;inline-size:var(--luzmo-select-inline-size,var(--select-inline-size));min-inline-size:calc(var(--select-minimum-width-multiplier) * var(--luzmo-select-block-size,var(--select-block-size)));display:inline-flex}:host([quiet]){width:auto;min-width:0}:host([disabled]){pointer-events:none}#button{width:100%;min-width:100%;max-width:100%}#icon:not([hidden]){display:inline-flex}:host([readonly]) #button{user-select:inherit}.validation-icon{flex-shrink:0}luzmo-overlay{pointer-events:none}luzmo-options{pointer-events:initial}:host>#no-results,:host>luzmo-options{display:none}:host([focused]:not([quiet])) #button #label.placeholder{color:var(--select-placeholder-text-color-key-focus,var(--alias-placeholder-text-color-hover))}.visually-hidden{clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0 -1px -1px 0;padding:0;position:absolute;overflow:hidden}luzmo-overlay:not(:defined){display:none}#button.remove-focus-ring-safari-hack:focus-visible{background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-default,var(--select-background-color-default)));border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-default,var(--select-border-color-default)));color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default,var(--select-font-color-default)))}#button.remove-focus-ring-safari-hack:after{border:none}#button.remove-focus-ring-safari-hack:focus-visible:after{box-shadow:none}#button.remove-focus-ring-safari-hack:active{background-color:var(--highcontrast-select-background-color,var(--luzmo-select-background-color-default,var(--select-background-color-default)));border-color:var(--highcontrast-select-border-color-default,var(--luzmo-select-border-color-default,var(--select-border-color-default)));color:var(--highcontrast-select-content-color-default,var(--luzmo-select-font-color-default,var(--select-font-color-default)))}`,m=()=>s.html`
19
19
  <div class="disclosure-icon icon">
20
20
  ${(0,l.luzmoIcon)(l.luzmoAngleDown,{className:`indicator`})}
21
21
  </div>