@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
- const e=require("./color-controller-DbyPc33Y.cjs");require("./tokens.cjs");const t=require("./decorate-Dq34MBGe.cjs"),n=require("./condition-attribute-with-id-Cw92IbcP.cjs"),r=require("./random-id-BcUJAxUZ.cjs"),i=require("./element-resolution-BjaAlqwX.cjs"),a=require("./slottable-request-event-C6eb7Ch3.cjs"),o=require("./focusable-selectors-DJqGLTJo.cjs"),s=require("./platform-BAjeJp2W.cjs");let c=require("lit"),l=require("lit/decorators.js"),u=require("lit/directives/if-defined.js"),d=require("lit/directives/style-map.js"),f=require("@floating-ui/dom"),p=require("lit/async-directive.js");function m(e,t,n=[]){for(let[r,i]of t.entries()){let t=e[r],a=t.parentElement||t.getRootNode();n[r]&&n[r](i),a&&a!==t&&t.replaceWith(i),delete e[r]}return t}var h=(e,t,{position:n,prepareCallback:r}={position:`beforeend`})=>{let{length:i}=e;if(i===0)return()=>e;let a=1,o=0;(n===`afterbegin`||n===`afterend`)&&(a=-1,o=i-1);let s=[];s.length=i;let c=[];c.length=i;let l=typeof document>`u`?null:document.createComment(`placeholder for reparented element`);do{let i=e[o];r&&(c[o]=r(i)),s[o]=l.cloneNode();let u=i.parentElement||i.getRootNode();u&&u!==i&&i.replaceWith(s[o]),t.insertAdjacentElement(n,i),o+=a}while(--i>0);return function(){return m(s,e,c)}},g=1e3,_=1e3,v=new class{constructor(e={}){this.warmUpDelay=g,this.coolDownDelay=_,this.isWarm=!1,this.timeout=0,Object.assign(this,e)}openTimer(e){if(this.cancelCooldownTimer(),!this.component||e!==this.component)return this.component&&(this.close(this.component),this.cancelCooldownTimer()),this.component=e,this.isWarm?Promise.resolve(!1):(this.promise=new Promise(e=>{this.resolve=e,this.timeout=typeof window>`u`?0:window.setTimeout(()=>{this.resolve&&(this.resolve(!1),this.isWarm=!0)},this.warmUpDelay)}),this.promise);if(this.promise)return this.promise;throw Error(`Inconsistent state`)}close(e){this.component&&this.component===e&&(this.resetCooldownTimer(),this.timeout>0&&(clearTimeout(this.timeout),this.timeout=0),this.resolve&&(this.resolve(!0),delete this.resolve),delete this.promise,delete this.component)}resetCooldownTimer(){this.isWarm&&(this.cooldownTimeout&&typeof window<`u`&&window.clearTimeout(this.cooldownTimeout),this.cooldownTimeout=typeof window>`u`?void 0:window.setTimeout(()=>{this.isWarm=!1,delete this.cooldownTimeout},this.coolDownDelay))}cancelCooldownTimer(){this.cooldownTimeout&&typeof window<`u`&&window.clearTimeout(this.cooldownTimeout),delete this.cooldownTimeout}},y=()=>{},b=(e,t,n)=>{let r=new AbortController,i=new Map,a=()=>{r.abort(),n()},o,s,c=requestAnimationFrame(()=>{o=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{a()})})}),l=t=>{t.target===e&&(i.set(t.propertyName,i.get(t.propertyName)-1),i.get(t.propertyName)||i.delete(t.propertyName),i.size===0&&a())};e.addEventListener(`transitionrun`,t=>{t.target===e&&(i.has(t.propertyName)||i.set(t.propertyName,0),i.set(t.propertyName,i.get(t.propertyName)+1),cancelAnimationFrame(c),cancelAnimationFrame(o),cancelAnimationFrame(s))},{signal:r.signal}),e.addEventListener(`transitionend`,l,{signal:r.signal}),e.addEventListener(`transitioncancel`,l,{signal:r.signal}),t()};function x(){return new Promise(e=>requestAnimationFrame(()=>e()))}var S=class e extends t.n{constructor(...e){super(...e),this.dispose=y,this.offset=0,this.willPreventClose=!1}applyFocus(e,t){}get delayed(){return!1}set delayed(e){}get disabled(){return!1}set disabled(e){}get elementResolver(){return this._elementResolver}set elementResolver(e){this._elementResolver=e}ensureOnDOM(e){}makeTransition(e){return null}manageDelay(e){}manageDialogOpen(){}managePopoverOpen(){}managePosition(){}get open(){return!1}set open(e){}get placementController(){return this._placementController}set placementController(e){this._placementController=e}requestSlottable(){}returnFocus(){}get state(){return`closed`}set state(e){}manuallyKeepOpen(){}static update(){let e=new CustomEvent(`luzmo-update-overlays`,{bubbles:!0,composed:!0,cancelable:!0});document.dispatchEvent(e)}static async open(t,n,r,i){await Promise.resolve().then(()=>ae);let a=arguments.length===2,o=r||t,s=new this,c=!1,l=h([o],s,{position:`beforeend`,prepareCallback:e=>{let t=e.slot;return e.removeAttribute(`slot`),()=>{e.slot=t}}});if(s.dispose=()=>{s.addEventListener(`luzmo-closed`,()=>{c||=(l(),!0),requestAnimationFrame(()=>{s.remove()})}),s.open=!1,s.dispose=y},!a&&o&&i){let r=t,a=n,c=i;return e.applyOptions(s,{...c,delayed:c.delayed||o.hasAttribute(`delayed`),trigger:c.virtualTrigger||r,type:a===`modal`?`modal`:a===`hover`?`hint`:`auto`}),r.after(s),await s.updateComplete,s.open=!0,s.dispose}let u=n;return s.append(o),e.applyOptions(s,{...u,delayed:u.delayed||o.hasAttribute(`delayed`)}),s.updateComplete.then(()=>{s.open=!0}),s}static applyOptions(e,t){e.delayed=!!t.delayed,e.receivesFocus=t.receivesFocus??`auto`,e.triggerElement=t.trigger||null,e.type=t.type||`modal`,e.offset=t.offset??0,e.placement=t.placement,e.willPreventClose=!!t.notImmediatelyClosable}},C=e=>e.querySelector(o.n),w=e=>e.assignedElements().find(e=>e.matches(o.n)),T=class extends Event{constructor(){super(`beforetoggle`,{bubbles:!1,composed:!1}),this.currentState=`open`,this.newState=`closed`}},E=class extends Event{constructor(){super(`beforetoggle`,{bubbles:!1,composed:!1}),this.currentState=`closed`,this.newState=`open`}},D=class extends Event{constructor(e,t,{publish:n,interaction:r,reason:i}){super(e,{bubbles:n,composed:n}),this.overlay=t,this.detail={interaction:r,reason:i}}},O=class{constructor(e,t,n){this.x=0,this.y=0,this.x=e,this.y=t,this.rectTop=n}updateBoundingClientRect(e,t,n){this.x=e,this.y=t,this.rectTop=n,S.update()}getBoundingClientRect(){let e=this.rectTop??this.y;return{width:0,height:this.y-e,top:e,right:this.x,y:e,x:this.x,bottom:this.y,left:this.x,toJSON(){}}}};function ee(e){class t extends e{async manageDialogOpen(){let e=this.open;if(await x(),await this.managePosition(),this.open!==e)return;let t=await this.dialogMakeTransition(e);this.open===e&&await this.dialogApplyFocus(e,t)}dialogMakeTransition(e){let t=null,n=(n,r)=>()=>{if(n.open=e,!e){let e=()=>{n.removeEventListener(`close`,e)};n.addEventListener(`close`,e)}if(r>0)return;let i=e?E:T;this.dispatchEvent(new i),e&&(n.matches(o.n)&&(t=n),t||=C(n),t||n.querySelectorAll(`slot`).forEach(e=>{t||=w(e)}),!(!this.isConnected||this.dialogEl.open)&&this.dialogEl.showModal())},r=(t,n)=>()=>{if(this.open!==e)return;let r=e?`luzmo-opened`:`luzmo-closed`;if(n>0){t.dispatchEvent(new D(r,this,{interaction:this.type,publish:!1}));return}if(!this.isConnected||e!==this.open)return;let i=async()=>{let n=this.triggerElement instanceof O;this.dispatchEvent(new D(r,this,{interaction:this.type,publish:n})),t.dispatchEvent(new D(r,this,{interaction:this.type,publish:!1})),this.triggerElement&&!n&&this.triggerElement.dispatchEvent(new D(r,this,{interaction:this.type,publish:!0})),this.state=e?`opened`:`closed`,this.returnFocus(),await x(),await x(),e===this.open&&e===!1&&this.requestSlottable()};!e&&this.dialogEl.open?(this.dialogEl.addEventListener(`close`,()=>{i()},{once:!0}),this.dialogEl.close()):i()};return this.elements.forEach((e,t)=>{b(e,n(e,t),r(e,t))}),t}dialogApplyFocus(e,t){this.applyFocus(e,t)}}return t}function te(e){class t extends e{async managePopoverOpen(){await this.managePosition()}async manageDelay(e){if(e===!1||e!==this.open){v.close(this);return}this.delayed&&await v.openTimer(this)&&(this.open=!e)}ensureOnDOM(e){document.body.offsetHeight}makeTransition(e){if(this.open!==e)return null;let t=null,n=(n,r)=>()=>{if(e===this.open){if(n.open=e,r===0){let t=e?E:T;this.dispatchEvent(new t)}e===!0&&(n.matches(o.n)&&(t=n),t||=C(n),!t&&n.querySelectorAll(`slot`).forEach(e=>{t||=w(e)}))}},r=(t,n)=>async()=>{if(this.open!==e)return;let r=e?`luzmo-opened`:`luzmo-closed`;if(t.dispatchEvent(new D(r,this,{interaction:this.type})),n>0)return;let i=this.triggerElement instanceof O;this.dispatchEvent(new D(r,this,{interaction:this.type,publish:i})),this.triggerElement&&!i&&this.triggerElement.dispatchEvent(new D(r,this,{interaction:this.type,publish:!0})),this.state=e?`opened`:`closed`,this.returnFocus(),await x(),await x(),e===this.open&&e===!1&&this.requestSlottable()};return this.elements.forEach((e,t)=>{b(e,n(e,t),r(e,t))}),t}}return t}var k=typeof CSS<`u`&&CSS.supports(`(overlay: auto)`);function A(e){let t=!1;try{t=e.matches(`:popover-open`)}catch{}let n=!1;try{n=e.matches(`:open`)}catch{}return t||n}function j(e){class t extends e{async manageDelay(e){if(e===!1||e!==this.open){v.close(this);return}this.delayed&&await v.openTimer(this)&&(this.open=!e)}shouldHidePopover(e){if(e&&this.open!==e)return;let t=async({newState:e}={})=>{e!==`open`&&await this.placementController.resetOverlayPosition()};if(!A(this.dialogEl)){t();return}this.dialogEl.addEventListener(`toggle`,t,{once:!0})}shouldShowPopover(e){let t=!1;try{t=this.dialogEl.matches(`:popover-open`)}catch{}let n=!1;try{n=this.dialogEl.matches(`:open`)}catch{}e&&this.open===e&&!t&&!n&&this.isConnected&&(this.dialogEl.showPopover(),this.managePosition())}async ensureOnDOM(e){k||await this.shouldHidePopover(e),this.shouldShowPopover(e),await x()}makeTransition(e){if(this.open!==e)return null;let t=null,n=(n,r)=>()=>{if(n.open=e,r===0){let t=e?E:T;this.dispatchEvent(new t)}e&&(n.matches(o.n)&&(t=n),t||=C(n),!t&&n.querySelectorAll(`slot`).forEach(e=>{t||=w(e)}))},r=(t,n)=>()=>{if(this.open!==e)return;let r=e?`luzmo-opened`:`luzmo-closed`;if(n>0){t.dispatchEvent(new D(r,this,{interaction:this.type,publish:!1}));return}let i=async()=>{if(this.open!==e)return;await x();let n=this.triggerElement instanceof O;this.dispatchEvent(new D(r,this,{interaction:this.type,publish:n})),t.dispatchEvent(new D(r,this,{interaction:this.type,publish:!1})),this.triggerElement&&!n&&this.triggerElement.dispatchEvent(new D(r,this,{interaction:this.type,publish:!0})),this.state=e?`opened`:`closed`,this.returnFocus(),await x(),await x(),e===this.open&&e===!1&&this.requestSlottable()};if(this.open!==e)return;let a=A(this.dialogEl);e!==!0&&a&&this.isConnected?(this.dialogEl.addEventListener(`beforetoggle`,()=>{i()},{once:!0}),this.dialogEl.hidePopover()):i()};return this.elements.forEach((e,t)=>{b(e,n(e,t),r(e,t))}),t}}return t}var M=typeof document<`u`&&`showPopover`in document.createElement(`div`),N=new class{get document(){return this.root.ownerDocument||document}constructor(){this.root=typeof document>`u`?null:document.body,this.stack=[],this.handleScroll=e=>{typeof document<`u`&&e.target!==document&&e.target!==document.documentElement&&e.target!==document.body||this.stack.forEach(t=>{t.open&&(t.type===`auto`&&t.triggerElement instanceof HTMLElement&&t.triggerElement.closest(`luzmo-picker, luzmo-select, luzmo-action-menu`)&&e.stopPropagation(),typeof document<`u`&&document.dispatchEvent(new CustomEvent(`luzmo-update-overlays`,{bubbles:!0,composed:!0,cancelable:!0})))})},this.handlePointerdown=e=>{this.pointerdownPath=e.composedPath(),this.lastOverlay=this.stack.at(-1)},this.handlePointerup=()=>{let e=this.pointerdownPath;if(this.pointerdownPath=void 0,this.stack.length===0||!e?.length)return;let t=this.lastOverlay;this.lastOverlay=void 0;let n=this.stack.length-1,r=this.stack.filter((r,i)=>!e.find(e=>e===r||e===r?.triggerElement&&r?.type===`hint`||i===n&&r!==t&&r.triggerInteraction===`longpress`)&&!r.shouldPreventClose()&&r.type!==`manual`&&!(r.type===`modal`&&t!==r));r.reverse(),r.forEach(e=>{this.closeOverlay(e);let t=e.parentOverlayToForceClose;for(;t;)this.closeOverlay(t),t=t.parentOverlayToForceClose})},this.handleBeforetoggle=e=>{let{target:t,newState:n}=e;n!==`open`&&this.closeOverlay(t)},this.handleKeydown=e=>{if(e.code!==`Escape`||this.stack.length===0)return;let t=this.stack.at(-1);if(t?.type===`page`){e.preventDefault();return}if(t?.type===`manual`){this.closeOverlay(t);return}M||t&&this.closeOverlay(t)},typeof document<`u`&&this.bindEvents()}bindEvents(){typeof document<`u`&&(this.document.addEventListener(`pointerdown`,this.handlePointerdown),this.document.addEventListener(`pointerup`,this.handlePointerup),this.document.addEventListener(`keydown`,this.handleKeydown),this.document.addEventListener(`scroll`,this.handleScroll,{capture:!0}))}closeOverlay(e){let t=this.stack.indexOf(e);t!==-1&&this.stack.splice(t,1),e.open=!1}overlaysByTriggerElement(e){return this.stack.filter(t=>t.triggerElement===e)}add(e){if(this.stack.includes(e)){let t=this.stack.indexOf(e);t!==-1&&(this.stack.splice(t,1),this.stack.push(e));return}if(e.type===`auto`||e.type===`modal`||e.type===`page`){let t=`luzmo-overlay-query-path`,n=new Event(t,{composed:!0,bubbles:!0});e.addEventListener(t,e=>{let t=e.composedPath();this.stack.forEach(e=>{!t.find(t=>t===e)&&e.type!==`manual`&&e.type!==`modal`&&this.closeOverlay(e)})},{once:!0}),e.dispatchEvent(n)}else if(e.type===`hint`){if(this.stack.some(t=>t.type!==`manual`&&t.triggerElement&&t.triggerElement===e.triggerElement)){e.open=!1;return}this.stack.forEach(e=>{e.type===`hint`&&this.closeOverlay(e)})}requestAnimationFrame(()=>{this.stack.push(e),e.addEventListener(`beforetoggle`,this.handleBeforetoggle,{once:!0})})}remove(e){this.closeOverlay(e)}},ne=`:host{pointer-events:none;--luzmo-overlay-animation-distance:.5rem;display:contents}:host(:has(>luzmo-tooltip)){--luzmo-overlay-animation-distance:var(--luzmo-tooltip-animation-distance,4px)}.dialog{box-sizing:border-box;--luzmo-overlay-open:true;background:0 0;border:0;max-width:calc(100vw - 16px);height:auto;max-height:calc(100dvh - 16px);margin:0;padding:0;display:flex;position:fixed;inset:0 auto auto 0;overflow:visible;opacity:1!important}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--luzmo-popover-filter:drop-shadow(0px 2px 6px var(--luzmo-shadow-color))}:host(:not([open])) .dialog{--luzmo-overlay-open:false}.dialog::backdrop{display:none}.dialog:before{content:"";position:absolute;inset:-999em;pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(luzmo-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--luzmo-popover-filter:drop-shadow(0px 2px 6px var(--luzmo-shadow-color))}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter:drop-shadow(0px 2px 6px var(--luzmo-shadow-color))}}@supports (overlay:auto){.dialog{transition:all var(--luzmo-overlay-animation-duration,.13s), translate 0s, display var(--luzmo-overlay-animation-duration,.13s);transition-behavior:allow-discrete;display:none}:is(.dialog:popover-open,.dialog:modal){display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--luzmo-overlay-z-index-base,1000) + var(--luzmo-overlay-open-count))}}`;function P(e){if(e===void 0)return 0;let t=window.devicePixelRatio||1;return Math.round(e*t)/t}var F=8,re=100,I=e=>({left:[`right`,`bottom`,`top`],"left-start":[`right-start`,`bottom`,`top`],"left-end":[`right-end`,`bottom`,`top`],right:[`left`,`bottom`,`top`],"right-start":[`left-start`,`bottom`,`top`],"right-end":[`left-end`,`bottom`,`top`],top:[`bottom`,`left`,`right`],"top-start":[`bottom-start`,`left`,`right`],"top-end":[`bottom-end`,`left`,`right`],bottom:[`top`,`left`,`right`],"bottom-start":[`top-start`,`left`,`right`],"bottom-end":[`top-end`,`left`,`right`]})[e]??[e],L=Symbol(`placement updated`),R=class{constructor(e){this.originalPlacements=new WeakMap,this.placementGeneration=0,this.allowPlacementUpdate=!1,this.closeForAncestorUpdate=()=>{!this.allowPlacementUpdate&&this.options.type!==`modal`&&this.cleanup&&this.target.dispatchEvent(new Event(`close`,{bubbles:!0})),this.allowPlacementUpdate=!1},this.updatePlacement=()=>{this.computePlacement()},this.resetOverlayPosition=()=>{!this.target||!this.options||(this.clearOverlayPosition(),this.host.offsetHeight,this.computePlacement())},this.host=e,this.host.addController(this)}placeOverlay(e=this.target,t=this.options){if(this.cleanup?.(),this.cleanup=void 0,this.target=e,this.options=t,!e||!t)return;let n=(0,f.autoUpdate)(t.trigger,e,this.closeForAncestorUpdate,{ancestorResize:!1,elementResize:!1,layoutShift:!1}),r=(0,f.autoUpdate)(t.trigger,e,this.updatePlacement,{ancestorScroll:!1}),i=window.visualViewport,a=0,o=!1,c=()=>{o||a||(a=requestAnimationFrame(()=>{a=0,!o&&this.updatePlacement()}))};i&&s.u()&&(i.addEventListener(`resize`,c,{passive:!0}),i.addEventListener(`scroll`,c,{passive:!0})),this.cleanup=()=>{this.placementGeneration+=1,o=!0,this.host.elements?.forEach(e=>{e.addEventListener(`luzmo-closed`,()=>{let t=this.originalPlacements.get(e);t&&e.setAttribute(`placement`,t),this.originalPlacements.delete(e)},{once:!0})}),n(),r(),i&&s.u()&&(i.removeEventListener(`resize`,c),i.removeEventListener(`scroll`,c),a&&=(cancelAnimationFrame(a),0))}}async computePlacement(){let{options:e,target:t}=this,n=this.placementGeneration,r=()=>this.placementGeneration===n&&!!this.target&&this.target===t;if(await(document.fonts?document.fonts.ready:Promise.resolve()),!r()||s.u()&&(await new Promise(e=>requestAnimationFrame(e)),!r()))return;let i=e.trigger instanceof HTMLElement?(0,f.flip)():(0,f.flip)({padding:F,fallbackPlacements:I(e.placement)}),[a=0,o=0]=Array.isArray(e?.offset)?e.offset:[e.offset,0],c=this.host.elements.find(e=>e.tipElement)?.tipElement,l=[(0,f.offset)({mainAxis:a,crossAxis:o}),(0,f.shift)({padding:F}),i,(0,f.size)({padding:F,apply:({availableWidth:e,availableHeight:n,rects:{floating:r}})=>{let i=Math.max(re,Math.floor(n)),a=r.height;this.initialHeight=this.isConstrained&&this.initialHeight||a,this.isConstrained=a<this.initialHeight||i<=a;let o=this.isConstrained?`${i}px`:``;Object.assign(t.style,{maxWidth:`${Math.floor(e)}px`,maxHeight:o})}}),...c?[(0,f.arrow)({element:c,padding:e.tipPadding||F})]:[]],{x:u,y:d,placement:p,middlewareData:m}=await(0,f.computePosition)(e.trigger,t,{placement:e.placement,middleware:l,strategy:`fixed`});if(!r())return;let h=u,g=d,_=window.visualViewport;if(_&&s.u()&&(h-=_.offsetLeft,g-=_.offsetTop),Object.assign(t.style,{top:`0px`,left:`0px`,translate:`${P(h)}px ${P(g)}px`}),t.setAttribute(`actual-placement`,p),this.host.elements?.forEach(e=>{this.originalPlacements.has(e)||this.originalPlacements.set(e,e.getAttribute(`placement`)),e.setAttribute(`placement`,p)}),c&&m.arrow){let{x:e,y:t}=m.arrow;Object.assign(c.style,{top:p.startsWith(`right`)||p.startsWith(`left`)?`0px`:``,left:p.startsWith(`bottom`)||p.startsWith(`top`)?`0px`:``,translate:`${P(e)}px ${P(t)}px`})}}clearOverlayPosition(){this.target&&(this.target.style.removeProperty(`max-height`),this.target.style.removeProperty(`max-width`),this.initialHeight=void 0,this.isConstrained=!1)}hostConnected(){document.addEventListener(`luzmo-update-overlays`,this.resetOverlayPosition)}hostUpdated(){this.host.open||(this.cleanup?.(),this.cleanup=void 0)}hostDisconnected(){this.cleanup?.(),this.cleanup=void 0,document.removeEventListener(`luzmo-update-overlays`,this.resetOverlayPosition)}},z=function(e){return e.click=`click`,e.hover=`hover`,e.longpress=`longpress`,e}({}),B=Symbol(`lastInteractionType`),V=`remove-focus-ring-safari-hack`,H=class{get activelyOpening(){return!1}get open(){return this.overlay?.open??this.isLazilyOpen}set open(e){if(e!==this.open){if(this.isLazilyOpen=e,this.overlay){this.overlay.open=e,this.target[B]=this.type;return}e&&Promise.resolve().then(()=>require("./overlay/index.cjs")).then(()=>{this.overlay=document.createElement(`luzmo-overlay`),this.overlay.open=!0,this.target[B]=this.type})}}get overlay(){return this._overlay}set overlay(e){e&&this.overlay!==e&&(this.overlay&&this.overlay.removeController(this),this._overlay=e,this.overlay.addController(this),this.initOverlay(),this.prepareDescription(this.target),this.handleOverlayReady?.(this.overlay))}constructor(e,{overlay:t,isPersistent:n,handleOverlayReady:r}){this.target=e,this.isLazilyOpen=!1,this.isPersistent=!1,this.isPersistent=!!n,this.handleOverlayReady=r,this.isPersistent&&this.init(),this.overlay=t}prepareDescription(e){}releaseDescription(){}shouldCompleteOpen(){}init(){}initOverlay(){}abort(){this.releaseDescription(),this.abortController?.abort()}hostConnected(){this.init()}hostDisconnected(){this.isPersistent||this.abort()}},U=class extends H{constructor(...e){super(...e),this.type=z.click,this.preventNextToggle=!1}handleClick(){this.preventNextToggle||(this.open=!this.open),this.preventNextToggle=!1}handlePointerdown(){this.preventNextToggle=this.open}init(){this.abortController?.abort(),this.abortController=new AbortController;let{signal:e}=this.abortController;this.target.addEventListener(`click`,()=>this.handleClick(),{signal:e}),this.target.addEventListener(`pointerdown`,()=>this.handlePointerdown(),{signal:e})}},W=300,G=class extends H{constructor(...e){super(...e),this.type=z.hover,this.elementIds=[],this.focusedin=!1,this.pointerentered=!1}handleKeyup(e){(e.code===`Tab`||e.code===`Escape`)&&(this.open=!0,this.removeSafariFocusRingClass())}handleTargetFocusin(){if(this.target.matches(`:focus-visible`)){if(s.u()&&this.target[B]===z.click){this.target.classList.add(V);return}this.open=!0,this.focusedin=!0,this.removeSafariFocusRingClass()}}handleTargetFocusout(){this.removeSafariFocusRingClass(),this.focusedin=!1,!this.pointerentered&&(this.open=!1)}handleTargetPointerenter(){this.hoverTimeout&&=(clearTimeout(this.hoverTimeout),void 0),!this.overlay?.disabled&&(this.open=!0,this.pointerentered=!0)}handleTargetPointerleave(){this.doPointerleave()}handleHostPointerenter(){this.hoverTimeout&&=(clearTimeout(this.hoverTimeout),void 0)}handleHostPointerleave(){this.doPointerleave()}prepareDescription(){if(this.overlay.elements.length===0)return;let e=this.target.getRootNode(),t=this.overlay.elements[0].getRootNode();e===this.overlay.getRootNode()?this.prepareOverlayRelativeDescription():e===t&&this.prepareContentRelativeDescription()}prepareOverlayRelativeDescription(){let e=n.t(this.target,`aria-describedby`,[this.overlay.id]);this.releaseDescription=()=>{e(),this.releaseDescription=y}}prepareContentRelativeDescription(){let e=[],t=this.overlay.elements.map(t=>(e.push(t.id),t.id||=`${this.overlay.tagName.toLowerCase()}-helper-${r.t()}`,t.id));this.elementIds=e;let i=n.t(this.target,`aria-describedby`,t);this.releaseDescription=()=>{i(),this.overlay.elements.map((e,t)=>{e.id=this.elementIds[t]}),this.releaseDescription=y}}doPointerleave(){this.pointerentered=!1;let e=this.target;this.focusedin&&e.matches(`:focus-visible`)||(this.hoverTimeout=setTimeout(()=>{this.open=!1},W))}init(){this.abortController?.abort(),this.abortController=new AbortController;let{signal:e}=this.abortController;this.target.addEventListener(`keyup`,e=>this.handleKeyup(e),{signal:e}),this.target.addEventListener(`focusin`,()=>this.handleTargetFocusin(),{signal:e}),this.target.addEventListener(`focusout`,()=>this.handleTargetFocusout(),{signal:e}),this.target.addEventListener(`pointerenter`,()=>this.handleTargetPointerenter(),{signal:e}),this.target.addEventListener(`pointerleave`,()=>this.handleTargetPointerleave(),{signal:e}),this.overlay&&this.initOverlay()}initOverlay(){if(!this.abortController)return;let{signal:e}=this.abortController;this.overlay.addEventListener(`pointerenter`,()=>this.handleHostPointerenter(),{signal:e}),this.overlay.addEventListener(`pointerleave`,()=>this.handleHostPointerleave(),{signal:e})}removeSafariFocusRingClass(){s.u()&&this.target.classList.contains(`remove-focus-ring-safari-hack`)&&this.target.classList.remove(V)}},ie=300,K={touch:`Double tap and long press for additional options`,keyboard:`Press Space or Alt+Down Arrow for additional options`,mouse:`Click and hold for additional options`},q=class extends H{constructor(...e){super(...e),this.type=z.longpress,this.longpressState=null,this.releaseDescription=y,this.handlePointerup=()=>{clearTimeout(this.timeout),this.target&&(this.longpressState=this.overlay?.state===`opening`?`pressed`:null,document.removeEventListener(`pointerup`,this.handlePointerup),document.removeEventListener(`pointercancel`,this.handlePointerup))}}get activelyOpening(){return this.longpressState===`opening`||this.longpressState===`pressed`}handleLongpress(){this.open=!0,this.longpressState=this.longpressState===`potential`?`opening`:`pressed`}handlePointerdown(e){this.target&&e.button===0&&(this.longpressState=`potential`,document.addEventListener(`pointerup`,this.handlePointerup),document.addEventListener(`pointercancel`,this.handlePointerup),!(`holdAffordance`in this.target)&&(this.timeout=setTimeout(()=>{this.target&&this.target.dispatchEvent(new CustomEvent(`longpress`,{bubbles:!0,composed:!0,detail:{source:`pointer`}}))},ie)))}handleKeydown(e){let{code:t,altKey:n}=e;n&&t===`ArrowDown`&&(e.stopPropagation(),e.stopImmediatePropagation())}handleKeyup(e){let{code:t,altKey:n}=e;if(t===`Space`||n&&t===`ArrowDown`){if(!this.target)return;e.stopPropagation(),this.target.dispatchEvent(new CustomEvent(`longpress`,{bubbles:!0,composed:!0,detail:{source:`keyboard`}})),setTimeout(()=>{this.longpressState=null})}}prepareDescription(e){if(this.releaseDescription!==y||this.overlay.elements.length===0)return;let t=document.createElement(`div`);t.id=`longpress-describedby-descriptor-${r.t()}`,t.textContent=K[s.a()||s.t()?`touch`:`keyboard`],t.slot=`longpress-describedby-descriptor`;let i=e.getRootNode();i===this.overlay.getRootNode()?this.overlay.append(t):(t.hidden=!(`host`in i),e.after(t));let a=n.t(e,`aria-describedby`,[t.id]);this.releaseDescription=()=>{a(),t.remove(),this.releaseDescription=y}}shouldCompleteOpen(){this.longpressState=this.longpressState===`pressed`?null:this.longpressState}init(){this.abortController?.abort(),this.abortController=new AbortController;let{signal:e}=this.abortController;this.target.addEventListener(`longpress`,()=>this.handleLongpress(),{signal:e}),this.target.addEventListener(`pointerdown`,e=>this.handlePointerdown(e),{signal:e}),this.prepareDescription(this.target),!this.target.holdAffordance&&(this.target.addEventListener(`keydown`,e=>this.handleKeydown(e),{signal:e}),this.target.addEventListener(`keyup`,e=>this.handleKeyup(e),{signal:e}))}},J={click:U,longpress:q,hover:G},ae=e.n({LuzmoOverlay:()=>X}),oe=typeof document<`u`&&`showPopover`in document.createElement(`div`),Y=ee(S);Y=oe?j(Y):te(Y);var X=class e extends Y{constructor(...e){super(...e),this._delayed=!1,this._disabled=!1,this.offset=0,this._open=!1,this.lastRequestSlottableState=!1,this.receivesFocus=`auto`,this._state=`closed`,this.triggerElement=null,this.type=`auto`,this.wasOpen=!1,this.closeOnFocusOut=e=>{if(!e.relatedTarget)return;let t=new Event(`overlay-relation-query`,{bubbles:!0,composed:!0});e.relatedTarget.addEventListener(t.type,e=>{e.composedPath().includes(this)||(this.open=!1)}),e.relatedTarget.dispatchEvent(t)}}static{this.styles=[(0,c.unsafeCSS)(ne)]}get delayed(){return this.elements.at(-1)?.hasAttribute(`delayed`)||this._delayed}set delayed(e){this._delayed=e}get disabled(){return this._disabled}set disabled(e){this._disabled=e,e?(this.strategy?.abort(),this.wasOpen=this.open,this.open=!1):(this.bindEvents(),this.open=this.open||this.wasOpen,this.wasOpen=!1)}get hasNonVirtualTrigger(){return!!this.triggerElement&&!(this.triggerElement instanceof O)}get placementController(){return this._placementController||=new R(this),this._placementController}get open(){return this._open}set open(t){t&&this.disabled||t!==this.open&&(this.strategy?.activelyOpening&&!t||(this._open=t,this.open&&(e.openCount+=1),this.requestUpdate(`open`,!this.open),this.open&&this.requestSlottable()))}static{this.openCount=1}get state(){return this._state}set state(e){if(e===this.state)return;let t=this.state;this._state=e,(this.state===`opened`||this.state===`closed`)&&this.strategy?.shouldCompleteOpen(),this.requestUpdate(`state`,t)}get elementResolver(){return this._elementResolver||=new i.t(this),this._elementResolver}get usesDialog(){return this.type===`modal`||this.type===`page`}get popoverValue(){if(`popover`in this)switch(this.type){case`modal`:case`page`:return;case`hint`:return`manual`;default:return this.type}}get requiresPositioning(){return!(this.type===`page`||!this.open||!this.triggerElement||!this.placement&&this.type!==`hint`)}managePosition(){if(!this.requiresPositioning||!this.open)return;let e=this.offset||0,t=this.triggerElement,n=this.placement||`right`,r=this.tipPadding;this.placementController.placeOverlay(this.dialogEl,{offset:e,placement:n,tipPadding:r,trigger:t,type:this.type})}async managePopoverOpen(){super.managePopoverOpen();let e=this.open;if(this.open!==e||(await this.manageDelay(e),this.open!==e)||(this.triggerInteraction===`longpress`&&await x(),await this.ensureOnDOM(e),this.open!==e))return;let t=await this.makeTransition(e);this.open===e&&await this.applyFocus(e,t)}async applyFocus(e,t){if(!(this.receivesFocus===`false`||this.type===`hint`)){if(await x(),await x(),e===this.open&&!this.open){this.hasNonVirtualTrigger&&this.contains(this.getRootNode().activeElement)&&this.triggerElement.focus();return}t?.focus()}}returnFocus(){this.open||this.type===`hint`||this.receivesFocus!==`false`&&this.triggerElement?.focus&&(this.contains(this.getRootNode().activeElement)||(()=>{let e=[],t=typeof document>`u`?null:document.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;for(;t;){let n=t.assignedSlot||t.parentElement||t.getRootNode()?.host;n&&e.push(n),t=n}return e})().includes(this)||typeof document<`u`&&document.activeElement===document.body)&&this.triggerElement.focus()}async manageOpen(e){if(!(!this.isConnected&&this.open)&&(this.hasUpdated||await this.updateComplete,this.open?(N.add(this),this.willPreventClose&&(document.addEventListener(`pointerup`,()=>{this.dialogEl.classList.toggle(`not-immediately-closable`,!1),this.willPreventClose=!1},{once:!0}),this.dialogEl.classList.toggle(`not-immediately-closable`,!0))):(e&&this.dispose(),N.remove(this)),this.open&&this.state!==`opened`?this.state=`opening`:!this.open&&this.state!==`closed`&&(this.state=`closing`),this.usesDialog?this.manageDialogOpen():this.managePopoverOpen(),this.type===`auto`)){let e=this.getRootNode();this.open?e.addEventListener(`focusout`,this.closeOnFocusOut,{capture:!0}):e.removeEventListener(`focusout`,this.closeOnFocusOut,{capture:!0})}}bindEvents(){this.strategy?.abort(),this.strategy=void 0,this.hasNonVirtualTrigger&&this.triggerInteraction&&(this.strategy=new J[this.triggerInteraction](this.triggerElement,{overlay:this}))}handleBeforetoggle(e){e.newState!==`open`&&this.handleBrowserClose(e)}handleBrowserClose(e){if(e.stopPropagation(),!this.strategy?.activelyOpening){this.open=!1;return}this.manuallyKeepOpen()}handleDialogCancel(e){if(this.type===`page`){e.preventDefault();return}this.handleBrowserClose(e)}manuallyKeepOpen(){this.open=!0,this.placementController.allowPlacementUpdate=!0,this.manageOpen(!1)}handleSlotchange(){this.elements.length===0?this.strategy?.releaseDescription():this.hasNonVirtualTrigger&&this.strategy?.prepareDescription(this.triggerElement)}shouldPreventClose(){let e=this.willPreventClose;return this.willPreventClose=!1,e}requestSlottable(){this.lastRequestSlottableState!==this.open&&(this.open||document.body.offsetHeight,this.dispatchEvent(new a.t(`overlay-content`,this.open?{}:a.n)),this.lastRequestSlottableState=this.open)}willUpdate(e){if(this.hasAttribute(`id`)||this.setAttribute(`id`,`${this.tagName.toLowerCase()}-${r.t()}`),e.has(`open`)&&(this.hasUpdated||this.open)&&this.manageOpen(e.get(`open`)),e.has(`trigger`)){let[e,t]=this.trigger?.split(`@`)||[];this.elementResolver.selector=e?`#${e}`:``,this.triggerInteraction=t}let t=!1;e.has(i.n)&&(t=this.triggerElement,this.triggerElement=this.elementResolver.element),e.has(`triggerElement`)&&(t=e.get(`triggerElement`)),t!==!1&&this.bindEvents()}updated(e){super.updated(e),e.has(`placement`)&&(this.placement?this.dialogEl.setAttribute(`actual-placement`,this.placement):this.dialogEl.removeAttribute(`actual-placement`),this.open&&e.get(`placement`)!==void 0&&this.placementController.resetOverlayPosition()),e.has(`state`)&&this.state===`closed`&&e.get(`state`)!==void 0&&this.placementController.clearOverlayPosition()}renderContent(){return c.html` <slot @slotchange=${this.handleSlotchange}></slot> `}get dialogStyleMap(){return{"--luzmo-overlay-open-count":e.openCount.toString()}}renderDialog(){return c.html`
18
+ const e=require("./color-controller-DbyPc33Y.cjs");require("./tokens.cjs");const t=require("./decorate-Dq34MBGe.cjs"),n=require("./condition-attribute-with-id-Cw92IbcP.cjs"),r=require("./random-id-BcUJAxUZ.cjs"),i=require("./element-resolution-BjaAlqwX.cjs"),a=require("./slottable-request-event-C6eb7Ch3.cjs"),o=require("./focusable-selectors-DJqGLTJo.cjs"),s=require("./platform-BAjeJp2W.cjs");let c=require("lit"),l=require("lit/decorators.js"),u=require("lit/directives/if-defined.js"),d=require("lit/directives/style-map.js"),f=require("@floating-ui/dom"),p=require("lit/async-directive.js");function m(e,t,n=[]){for(let[r,i]of t.entries()){let t=e[r],a=t.parentElement||t.getRootNode();n[r]&&n[r](i),a&&a!==t&&t.replaceWith(i),delete e[r]}return t}var h=(e,t,{position:n,prepareCallback:r}={position:`beforeend`})=>{let{length:i}=e;if(i===0)return()=>e;let a=1,o=0;(n===`afterbegin`||n===`afterend`)&&(a=-1,o=i-1);let s=[];s.length=i;let c=[];c.length=i;let l=typeof document>`u`?null:document.createComment(`placeholder for reparented element`);do{let i=e[o];r&&(c[o]=r(i)),s[o]=l.cloneNode();let u=i.parentElement||i.getRootNode();u&&u!==i&&i.replaceWith(s[o]),t.insertAdjacentElement(n,i),o+=a}while(--i>0);return function(){return m(s,e,c)}},g=1e3,_=1e3,v=new class{constructor(e={}){this.warmUpDelay=g,this.coolDownDelay=_,this.isWarm=!1,this.timeout=0,Object.assign(this,e)}openTimer(e){if(this.cancelCooldownTimer(),!this.component||e!==this.component)return this.component&&(this.close(this.component),this.cancelCooldownTimer()),this.component=e,this.isWarm?Promise.resolve(!1):(this.promise=new Promise(e=>{this.resolve=e,this.timeout=typeof window>`u`?0:window.setTimeout(()=>{this.resolve&&(this.resolve(!1),this.isWarm=!0)},this.warmUpDelay)}),this.promise);if(this.promise)return this.promise;throw Error(`Inconsistent state`)}close(e){this.component&&this.component===e&&(this.resetCooldownTimer(),this.timeout>0&&(clearTimeout(this.timeout),this.timeout=0),this.resolve&&(this.resolve(!0),delete this.resolve),delete this.promise,delete this.component)}resetCooldownTimer(){this.isWarm&&(this.cooldownTimeout&&typeof window<`u`&&window.clearTimeout(this.cooldownTimeout),this.cooldownTimeout=typeof window>`u`?void 0:window.setTimeout(()=>{this.isWarm=!1,delete this.cooldownTimeout},this.coolDownDelay))}cancelCooldownTimer(){this.cooldownTimeout&&typeof window<`u`&&window.clearTimeout(this.cooldownTimeout),delete this.cooldownTimeout}},y=()=>{},b=(e,t,n)=>{let r=new AbortController,i=new Map,a=()=>{r.abort(),n()},o,s,c=requestAnimationFrame(()=>{o=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{a()})})}),l=t=>{t.target===e&&(i.set(t.propertyName,i.get(t.propertyName)-1),i.get(t.propertyName)||i.delete(t.propertyName),i.size===0&&a())};e.addEventListener(`transitionrun`,t=>{t.target===e&&(i.has(t.propertyName)||i.set(t.propertyName,0),i.set(t.propertyName,i.get(t.propertyName)+1),cancelAnimationFrame(c),cancelAnimationFrame(o),cancelAnimationFrame(s))},{signal:r.signal}),e.addEventListener(`transitionend`,l,{signal:r.signal}),e.addEventListener(`transitioncancel`,l,{signal:r.signal}),t()};function x(){return new Promise(e=>requestAnimationFrame(()=>e()))}var S=class e extends t.n{constructor(...e){super(...e),this.dispose=y,this.offset=0,this.willPreventClose=!1}applyFocus(e,t){}get delayed(){return!1}set delayed(e){}get disabled(){return!1}set disabled(e){}get elementResolver(){return this._elementResolver}set elementResolver(e){this._elementResolver=e}ensureOnDOM(e){}makeTransition(e){return null}manageDelay(e){}manageDialogOpen(){}managePopoverOpen(){}managePosition(){}get open(){return!1}set open(e){}get placementController(){return this._placementController}set placementController(e){this._placementController=e}requestSlottable(){}returnFocus(){}get state(){return`closed`}set state(e){}manuallyKeepOpen(){}static update(){let e=new CustomEvent(`luzmo-update-overlays`,{bubbles:!0,composed:!0,cancelable:!0});document.dispatchEvent(e)}static async open(t,n,r,i){await Promise.resolve().then(()=>ae);let a=arguments.length===2,o=r||t,s=new this,c=!1,l=h([o],s,{position:`beforeend`,prepareCallback:e=>{let t=e.slot;return e.removeAttribute(`slot`),()=>{e.slot=t}}});if(s.dispose=()=>{s.addEventListener(`luzmo-closed`,()=>{c||=(l(),!0),requestAnimationFrame(()=>{s.remove()})}),s.open=!1,s.dispose=y},!a&&o&&i){let r=t,a=n,c=i;return e.applyOptions(s,{...c,delayed:c.delayed||o.hasAttribute(`delayed`),trigger:c.virtualTrigger||r,type:a===`modal`?`modal`:a===`hover`?`hint`:`auto`}),r.after(s),await s.updateComplete,s.open=!0,s.dispose}let u=n;return s.append(o),e.applyOptions(s,{...u,delayed:u.delayed||o.hasAttribute(`delayed`)}),s.updateComplete.then(()=>{s.open=!0}),s}static applyOptions(e,t){e.delayed=!!t.delayed,e.receivesFocus=t.receivesFocus??`auto`,e.triggerElement=t.trigger||null,e.type=t.type||`modal`,e.offset=t.offset??0,e.placement=t.placement,e.willPreventClose=!!t.notImmediatelyClosable}},C=e=>e.querySelector(o.n),w=e=>e.assignedElements().find(e=>e.matches(o.n)),T=class extends Event{constructor(){super(`beforetoggle`,{bubbles:!1,composed:!1}),this.currentState=`open`,this.newState=`closed`}},E=class extends Event{constructor(){super(`beforetoggle`,{bubbles:!1,composed:!1}),this.currentState=`closed`,this.newState=`open`}},D=class extends Event{constructor(e,t,{publish:n,interaction:r,reason:i}){super(e,{bubbles:n,composed:n}),this.overlay=t,this.detail={interaction:r,reason:i}}},O=class{constructor(e,t,n){this.x=0,this.y=0,this.x=e,this.y=t,this.rectTop=n}updateBoundingClientRect(e,t,n){this.x=e,this.y=t,this.rectTop=n,S.update()}getBoundingClientRect(){let e=this.rectTop??this.y;return{width:0,height:this.y-e,top:e,right:this.x,y:e,x:this.x,bottom:this.y,left:this.x,toJSON(){}}}};function ee(e){class t extends e{async manageDialogOpen(){let e=this.open;if(await x(),await this.managePosition(),this.open!==e)return;let t=await this.dialogMakeTransition(e);this.open===e&&await this.dialogApplyFocus(e,t)}dialogMakeTransition(e){let t=null,n=(n,r)=>()=>{if(n.open=e,!e){let e=()=>{n.removeEventListener(`close`,e)};n.addEventListener(`close`,e)}if(r>0)return;let i=e?E:T;this.dispatchEvent(new i),e&&(n.matches(o.n)&&(t=n),t||=C(n),t||n.querySelectorAll(`slot`).forEach(e=>{t||=w(e)}),!(!this.isConnected||this.dialogEl.open)&&this.dialogEl.showModal())},r=(t,n)=>()=>{if(this.open!==e)return;let r=e?`luzmo-opened`:`luzmo-closed`;if(n>0){t.dispatchEvent(new D(r,this,{interaction:this.type,publish:!1}));return}if(!this.isConnected||e!==this.open)return;let i=async()=>{let n=this.triggerElement instanceof O;this.dispatchEvent(new D(r,this,{interaction:this.type,publish:n})),t.dispatchEvent(new D(r,this,{interaction:this.type,publish:!1})),this.triggerElement&&!n&&this.triggerElement.dispatchEvent(new D(r,this,{interaction:this.type,publish:!0})),this.state=e?`opened`:`closed`,this.returnFocus(),await x(),await x(),e===this.open&&e===!1&&this.requestSlottable()};!e&&this.dialogEl.open?(this.dialogEl.addEventListener(`close`,()=>{i()},{once:!0}),this.dialogEl.close()):i()};return this.elements.forEach((e,t)=>{b(e,n(e,t),r(e,t))}),t}dialogApplyFocus(e,t){this.applyFocus(e,t)}}return t}function te(e){class t extends e{async managePopoverOpen(){await this.managePosition()}async manageDelay(e){if(e===!1||e!==this.open){v.close(this);return}this.delayed&&await v.openTimer(this)&&(this.open=!e)}ensureOnDOM(e){document.body.offsetHeight}makeTransition(e){if(this.open!==e)return null;let t=null,n=(n,r)=>()=>{if(e===this.open){if(n.open=e,r===0){let t=e?E:T;this.dispatchEvent(new t)}e===!0&&(n.matches(o.n)&&(t=n),t||=C(n),!t&&n.querySelectorAll(`slot`).forEach(e=>{t||=w(e)}))}},r=(t,n)=>async()=>{if(this.open!==e)return;let r=e?`luzmo-opened`:`luzmo-closed`;if(t.dispatchEvent(new D(r,this,{interaction:this.type})),n>0)return;let i=this.triggerElement instanceof O;this.dispatchEvent(new D(r,this,{interaction:this.type,publish:i})),this.triggerElement&&!i&&this.triggerElement.dispatchEvent(new D(r,this,{interaction:this.type,publish:!0})),this.state=e?`opened`:`closed`,this.returnFocus(),await x(),await x(),e===this.open&&e===!1&&this.requestSlottable()};return this.elements.forEach((e,t)=>{b(e,n(e,t),r(e,t))}),t}}return t}var k=typeof CSS<`u`&&CSS.supports(`(overlay: auto)`);function A(e){let t=!1;try{t=e.matches(`:popover-open`)}catch{}let n=!1;try{n=e.matches(`:open`)}catch{}return t||n}function j(e){class t extends e{async manageDelay(e){if(e===!1||e!==this.open){v.close(this);return}this.delayed&&await v.openTimer(this)&&(this.open=!e)}shouldHidePopover(e){if(e&&this.open!==e)return;let t=async({newState:e}={})=>{e!==`open`&&await this.placementController.resetOverlayPosition()};if(!A(this.dialogEl)){t();return}this.dialogEl.addEventListener(`toggle`,t,{once:!0})}shouldShowPopover(e){let t=!1;try{t=this.dialogEl.matches(`:popover-open`)}catch{}let n=!1;try{n=this.dialogEl.matches(`:open`)}catch{}e&&this.open===e&&!t&&!n&&this.isConnected&&(this.dialogEl.showPopover(),this.managePosition())}async ensureOnDOM(e){k||await this.shouldHidePopover(e),this.shouldShowPopover(e),await x()}makeTransition(e){if(this.open!==e)return null;let t=null,n=(n,r)=>()=>{if(n.open=e,r===0){let t=e?E:T;this.dispatchEvent(new t)}e&&(n.matches(o.n)&&(t=n),t||=C(n),!t&&n.querySelectorAll(`slot`).forEach(e=>{t||=w(e)}))},r=(t,n)=>()=>{if(this.open!==e)return;let r=e?`luzmo-opened`:`luzmo-closed`;if(n>0){t.dispatchEvent(new D(r,this,{interaction:this.type,publish:!1}));return}let i=async()=>{if(this.open!==e)return;await x();let n=this.triggerElement instanceof O;this.dispatchEvent(new D(r,this,{interaction:this.type,publish:n})),t.dispatchEvent(new D(r,this,{interaction:this.type,publish:!1})),this.triggerElement&&!n&&this.triggerElement.dispatchEvent(new D(r,this,{interaction:this.type,publish:!0})),this.state=e?`opened`:`closed`,this.returnFocus(),await x(),await x(),e===this.open&&e===!1&&this.requestSlottable()};if(this.open!==e)return;let a=A(this.dialogEl);e!==!0&&a&&this.isConnected?(this.dialogEl.addEventListener(`beforetoggle`,()=>{i()},{once:!0}),this.dialogEl.hidePopover()):i()};return this.elements.forEach((e,t)=>{b(e,n(e,t),r(e,t))}),t}}return t}var M=typeof document<`u`&&`showPopover`in document.createElement(`div`),N=new class{get document(){return this.root.ownerDocument||document}constructor(){this.root=typeof document>`u`?null:document.body,this.stack=[],this.handleScroll=e=>{typeof document<`u`&&e.target!==document&&e.target!==document.documentElement&&e.target!==document.body||this.stack.forEach(t=>{t.open&&(t.type===`auto`&&t.triggerElement instanceof HTMLElement&&t.triggerElement.closest(`luzmo-picker, luzmo-select, luzmo-action-menu`)&&e.stopPropagation(),typeof document<`u`&&document.dispatchEvent(new CustomEvent(`luzmo-update-overlays`,{bubbles:!0,composed:!0,cancelable:!0})))})},this.handlePointerdown=e=>{this.pointerdownPath=e.composedPath(),this.lastOverlay=this.stack.at(-1)},this.handlePointerup=()=>{let e=this.pointerdownPath;if(this.pointerdownPath=void 0,this.stack.length===0||!e?.length)return;let t=this.lastOverlay;this.lastOverlay=void 0;let n=this.stack.length-1,r=this.stack.filter((r,i)=>!e.find(e=>e===r||e===r?.triggerElement&&r?.type===`hint`||i===n&&r!==t&&r.triggerInteraction===`longpress`)&&!r.shouldPreventClose()&&r.type!==`manual`&&!(r.type===`modal`&&t!==r));r.reverse(),r.forEach(e=>{this.closeOverlay(e);let t=e.parentOverlayToForceClose;for(;t;)this.closeOverlay(t),t=t.parentOverlayToForceClose})},this.handleBeforetoggle=e=>{let{target:t,newState:n}=e;n!==`open`&&this.closeOverlay(t)},this.handleKeydown=e=>{if(e.code!==`Escape`||this.stack.length===0)return;let t=this.stack.at(-1);if(t?.type===`page`){e.preventDefault();return}if(t?.type===`manual`){this.closeOverlay(t);return}M||t&&this.closeOverlay(t)},typeof document<`u`&&this.bindEvents()}bindEvents(){typeof document<`u`&&(this.document.addEventListener(`pointerdown`,this.handlePointerdown),this.document.addEventListener(`pointerup`,this.handlePointerup),this.document.addEventListener(`keydown`,this.handleKeydown),this.document.addEventListener(`scroll`,this.handleScroll,{capture:!0}))}closeOverlay(e){let t=this.stack.indexOf(e);t!==-1&&this.stack.splice(t,1),e.open=!1}overlaysByTriggerElement(e){return this.stack.filter(t=>t.triggerElement===e)}add(e){if(this.stack.includes(e)){let t=this.stack.indexOf(e);t!==-1&&(this.stack.splice(t,1),this.stack.push(e));return}if(e.type===`auto`||e.type===`modal`||e.type===`page`){let t=`luzmo-overlay-query-path`,n=new Event(t,{composed:!0,bubbles:!0});e.addEventListener(t,e=>{let t=e.composedPath();this.stack.forEach(e=>{!t.find(t=>t===e)&&e.type!==`manual`&&e.type!==`modal`&&this.closeOverlay(e)})},{once:!0}),e.dispatchEvent(n)}else if(e.type===`hint`){if(this.stack.some(t=>t.type!==`manual`&&t.triggerElement&&t.triggerElement===e.triggerElement)){e.open=!1;return}this.stack.forEach(e=>{e.type===`hint`&&this.closeOverlay(e)})}requestAnimationFrame(()=>{this.stack.push(e),e.addEventListener(`beforetoggle`,this.handleBeforetoggle,{once:!0})})}remove(e){this.closeOverlay(e)}},ne=`:host{pointer-events:none;--luzmo-overlay-animation-distance:.5rem;display:contents}:host(:has(>luzmo-tooltip)){--luzmo-overlay-animation-distance:var(--luzmo-tooltip-animation-distance,4px)}.dialog{box-sizing:border-box;--luzmo-overlay-open:true;background:0 0;border:0;max-width:calc(100vw - 16px);height:auto;max-height:calc(100dvh - 16px);margin:0;padding:0;display:flex;position:fixed;inset:0 auto auto 0;overflow:visible;opacity:1!important}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--luzmo-popover-filter:drop-shadow(0px 2px 6px var(--luzmo-shadow-color))}:host(:not([open])) .dialog{--luzmo-overlay-open:false}.dialog::backdrop{display:none}.dialog:before{content:"";position:absolute;inset:-999em;pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(luzmo-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--luzmo-popover-filter:drop-shadow(0px 2px 6px var(--luzmo-shadow-color))}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter:drop-shadow(0px 2px 6px var(--luzmo-shadow-color))}}@supports (overlay:auto){.dialog{transition:all var(--luzmo-overlay-animation-duration,.13s), translate 0s, display var(--luzmo-overlay-animation-duration,.13s);transition-behavior:allow-discrete;display:none}:is(.dialog:popover-open,.dialog:modal){display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--luzmo-overlay-z-index-base,1000) + var(--luzmo-overlay-open-count))}}`;function P(e){if(e===void 0)return 0;let t=window.devicePixelRatio||1;return Math.round(e*t)/t}var F=8,re=100,I=e=>({left:[`right`,`bottom`,`top`],"left-start":[`right-start`,`bottom`,`top`],"left-end":[`right-end`,`bottom`,`top`],right:[`left`,`bottom`,`top`],"right-start":[`left-start`,`bottom`,`top`],"right-end":[`left-end`,`bottom`,`top`],top:[`bottom`,`left`,`right`],"top-start":[`bottom-start`,`left`,`right`],"top-end":[`bottom-end`,`left`,`right`],bottom:[`top`,`left`,`right`],"bottom-start":[`top-start`,`left`,`right`],"bottom-end":[`top-end`,`left`,`right`]})[e]??[e],L=Symbol(`placement updated`),R=class{constructor(e){this.originalPlacements=new WeakMap,this.placementGeneration=0,this.allowPlacementUpdate=!1,this.closeForAncestorUpdate=e=>{s.u()&&e?.currentTarget===window.visualViewport||(!this.allowPlacementUpdate&&this.options.type!==`modal`&&this.cleanup&&this.target.dispatchEvent(new Event(`close`,{bubbles:!0})),this.allowPlacementUpdate=!1)},this.updatePlacement=()=>{this.computePlacement()},this.resetOverlayPosition=()=>{!this.target||!this.options||(this.clearOverlayPosition(),this.host.offsetHeight,this.computePlacement())},this.host=e,this.host.addController(this)}placeOverlay(e=this.target,t=this.options){if(this.cleanup?.(),this.cleanup=void 0,this.target=e,this.options=t,!e||!t)return;let n=(0,f.autoUpdate)(t.trigger,e,this.closeForAncestorUpdate,{ancestorResize:!1,elementResize:!1,layoutShift:!1}),r=(0,f.autoUpdate)(t.trigger,e,this.updatePlacement,{ancestorScroll:!1}),i=window.visualViewport,a=0,o=!1,c=()=>{o||a||(a=requestAnimationFrame(()=>{a=0,!o&&this.updatePlacement()}))};i&&s.u()&&(i.addEventListener(`resize`,c,{passive:!0}),i.addEventListener(`scroll`,c,{passive:!0})),this.cleanup=()=>{this.placementGeneration+=1,o=!0,this.host.elements?.forEach(e=>{e.addEventListener(`luzmo-closed`,()=>{let t=this.originalPlacements.get(e);t&&e.setAttribute(`placement`,t),this.originalPlacements.delete(e)},{once:!0})}),n(),r(),i&&s.u()&&(i.removeEventListener(`resize`,c),i.removeEventListener(`scroll`,c),a&&=(cancelAnimationFrame(a),0))}}async computePlacement(){let{options:e,target:t}=this,n=this.placementGeneration,r=()=>this.placementGeneration===n&&!!this.target&&this.target===t;if(await(document.fonts?document.fonts.ready:Promise.resolve()),!r()||s.u()&&(await new Promise(e=>requestAnimationFrame(e)),!r()))return;let i=e.trigger instanceof HTMLElement?(0,f.flip)():(0,f.flip)({padding:F,fallbackPlacements:I(e.placement)}),[a=0,o=0]=Array.isArray(e?.offset)?e.offset:[e.offset,0],c=this.host.elements.find(e=>e.tipElement)?.tipElement,l=[(0,f.offset)({mainAxis:a,crossAxis:o}),(0,f.shift)({padding:F}),i,(0,f.size)({padding:F,apply:({availableWidth:e,availableHeight:n,rects:{floating:r}})=>{let i=Math.max(re,Math.floor(n)),a=r.height;this.initialHeight=this.isConstrained&&this.initialHeight||a,this.isConstrained=a<this.initialHeight||i<=a;let o=this.isConstrained?`${i}px`:``;Object.assign(t.style,{maxWidth:`${Math.floor(e)}px`,maxHeight:o})}}),...c?[(0,f.arrow)({element:c,padding:e.tipPadding||F})]:[]],{x:u,y:d,placement:p,middlewareData:m}=await(0,f.computePosition)(e.trigger,t,{placement:e.placement,middleware:l,strategy:`fixed`});if(!r())return;let h=u,g=d,_=window.visualViewport;if(_&&s.u()&&(h-=_.offsetLeft,g-=_.offsetTop),Object.assign(t.style,{top:`0px`,left:`0px`,translate:`${P(h)}px ${P(g)}px`}),t.setAttribute(`actual-placement`,p),this.host.elements?.forEach(e=>{this.originalPlacements.has(e)||this.originalPlacements.set(e,e.getAttribute(`placement`)),e.setAttribute(`placement`,p)}),c&&m.arrow){let{x:e,y:t}=m.arrow;Object.assign(c.style,{top:p.startsWith(`right`)||p.startsWith(`left`)?`0px`:``,left:p.startsWith(`bottom`)||p.startsWith(`top`)?`0px`:``,translate:`${P(e)}px ${P(t)}px`})}}clearOverlayPosition(){this.target&&(this.target.style.removeProperty(`max-height`),this.target.style.removeProperty(`max-width`),this.initialHeight=void 0,this.isConstrained=!1)}hostConnected(){document.addEventListener(`luzmo-update-overlays`,this.resetOverlayPosition)}hostUpdated(){this.host.open||(this.cleanup?.(),this.cleanup=void 0)}hostDisconnected(){this.cleanup?.(),this.cleanup=void 0,document.removeEventListener(`luzmo-update-overlays`,this.resetOverlayPosition)}},z=function(e){return e.click=`click`,e.hover=`hover`,e.longpress=`longpress`,e}({}),B=Symbol(`lastInteractionType`),V=`remove-focus-ring-safari-hack`,H=class{get activelyOpening(){return!1}get open(){return this.overlay?.open??this.isLazilyOpen}set open(e){if(e!==this.open){if(this.isLazilyOpen=e,this.overlay){this.overlay.open=e,this.target[B]=this.type;return}e&&Promise.resolve().then(()=>require("./overlay/index.cjs")).then(()=>{this.overlay=document.createElement(`luzmo-overlay`),this.overlay.open=!0,this.target[B]=this.type})}}get overlay(){return this._overlay}set overlay(e){e&&this.overlay!==e&&(this.overlay&&this.overlay.removeController(this),this._overlay=e,this.overlay.addController(this),this.initOverlay(),this.prepareDescription(this.target),this.handleOverlayReady?.(this.overlay))}constructor(e,{overlay:t,isPersistent:n,handleOverlayReady:r}){this.target=e,this.isLazilyOpen=!1,this.isPersistent=!1,this.isPersistent=!!n,this.handleOverlayReady=r,this.isPersistent&&this.init(),this.overlay=t}prepareDescription(e){}releaseDescription(){}shouldCompleteOpen(){}init(){}initOverlay(){}abort(){this.releaseDescription(),this.abortController?.abort()}hostConnected(){this.init()}hostDisconnected(){this.isPersistent||this.abort()}},U=class extends H{constructor(...e){super(...e),this.type=z.click,this.preventNextToggle=!1}handleClick(){this.preventNextToggle||(this.open=!this.open),this.preventNextToggle=!1}handlePointerdown(){this.preventNextToggle=this.open}init(){this.abortController?.abort(),this.abortController=new AbortController;let{signal:e}=this.abortController;this.target.addEventListener(`click`,()=>this.handleClick(),{signal:e}),this.target.addEventListener(`pointerdown`,()=>this.handlePointerdown(),{signal:e})}},W=300,G=class extends H{constructor(...e){super(...e),this.type=z.hover,this.elementIds=[],this.focusedin=!1,this.pointerentered=!1}handleKeyup(e){(e.code===`Tab`||e.code===`Escape`)&&(this.open=!0,this.removeSafariFocusRingClass())}handleTargetFocusin(){if(this.target.matches(`:focus-visible`)){if(s.u()&&this.target[B]===z.click){this.target.classList.add(V);return}this.open=!0,this.focusedin=!0,this.removeSafariFocusRingClass()}}handleTargetFocusout(){this.removeSafariFocusRingClass(),this.focusedin=!1,!this.pointerentered&&(this.open=!1)}handleTargetPointerenter(){this.hoverTimeout&&=(clearTimeout(this.hoverTimeout),void 0),!this.overlay?.disabled&&(this.open=!0,this.pointerentered=!0)}handleTargetPointerleave(){this.doPointerleave()}handleHostPointerenter(){this.hoverTimeout&&=(clearTimeout(this.hoverTimeout),void 0)}handleHostPointerleave(){this.doPointerleave()}prepareDescription(){if(this.overlay.elements.length===0)return;let e=this.target.getRootNode(),t=this.overlay.elements[0].getRootNode();e===this.overlay.getRootNode()?this.prepareOverlayRelativeDescription():e===t&&this.prepareContentRelativeDescription()}prepareOverlayRelativeDescription(){let e=n.t(this.target,`aria-describedby`,[this.overlay.id]);this.releaseDescription=()=>{e(),this.releaseDescription=y}}prepareContentRelativeDescription(){let e=[],t=this.overlay.elements.map(t=>(e.push(t.id),t.id||=`${this.overlay.tagName.toLowerCase()}-helper-${r.t()}`,t.id));this.elementIds=e;let i=n.t(this.target,`aria-describedby`,t);this.releaseDescription=()=>{i(),this.overlay.elements.map((e,t)=>{e.id=this.elementIds[t]}),this.releaseDescription=y}}doPointerleave(){this.pointerentered=!1;let e=this.target;this.focusedin&&e.matches(`:focus-visible`)||(this.hoverTimeout=setTimeout(()=>{this.open=!1},W))}init(){this.abortController?.abort(),this.abortController=new AbortController;let{signal:e}=this.abortController;this.target.addEventListener(`keyup`,e=>this.handleKeyup(e),{signal:e}),this.target.addEventListener(`focusin`,()=>this.handleTargetFocusin(),{signal:e}),this.target.addEventListener(`focusout`,()=>this.handleTargetFocusout(),{signal:e}),this.target.addEventListener(`pointerenter`,()=>this.handleTargetPointerenter(),{signal:e}),this.target.addEventListener(`pointerleave`,()=>this.handleTargetPointerleave(),{signal:e}),this.overlay&&this.initOverlay()}initOverlay(){if(!this.abortController)return;let{signal:e}=this.abortController;this.overlay.addEventListener(`pointerenter`,()=>this.handleHostPointerenter(),{signal:e}),this.overlay.addEventListener(`pointerleave`,()=>this.handleHostPointerleave(),{signal:e})}removeSafariFocusRingClass(){s.u()&&this.target.classList.contains(`remove-focus-ring-safari-hack`)&&this.target.classList.remove(V)}},ie=300,K={touch:`Double tap and long press for additional options`,keyboard:`Press Space or Alt+Down Arrow for additional options`,mouse:`Click and hold for additional options`},q=class extends H{constructor(...e){super(...e),this.type=z.longpress,this.longpressState=null,this.releaseDescription=y,this.handlePointerup=()=>{clearTimeout(this.timeout),this.target&&(this.longpressState=this.overlay?.state===`opening`?`pressed`:null,document.removeEventListener(`pointerup`,this.handlePointerup),document.removeEventListener(`pointercancel`,this.handlePointerup))}}get activelyOpening(){return this.longpressState===`opening`||this.longpressState===`pressed`}handleLongpress(){this.open=!0,this.longpressState=this.longpressState===`potential`?`opening`:`pressed`}handlePointerdown(e){this.target&&e.button===0&&(this.longpressState=`potential`,document.addEventListener(`pointerup`,this.handlePointerup),document.addEventListener(`pointercancel`,this.handlePointerup),!(`holdAffordance`in this.target)&&(this.timeout=setTimeout(()=>{this.target&&this.target.dispatchEvent(new CustomEvent(`longpress`,{bubbles:!0,composed:!0,detail:{source:`pointer`}}))},ie)))}handleKeydown(e){let{code:t,altKey:n}=e;n&&t===`ArrowDown`&&(e.stopPropagation(),e.stopImmediatePropagation())}handleKeyup(e){let{code:t,altKey:n}=e;if(t===`Space`||n&&t===`ArrowDown`){if(!this.target)return;e.stopPropagation(),this.target.dispatchEvent(new CustomEvent(`longpress`,{bubbles:!0,composed:!0,detail:{source:`keyboard`}})),setTimeout(()=>{this.longpressState=null})}}prepareDescription(e){if(this.releaseDescription!==y||this.overlay.elements.length===0)return;let t=document.createElement(`div`);t.id=`longpress-describedby-descriptor-${r.t()}`,t.textContent=K[s.a()||s.t()?`touch`:`keyboard`],t.slot=`longpress-describedby-descriptor`;let i=e.getRootNode();i===this.overlay.getRootNode()?this.overlay.append(t):(t.hidden=!(`host`in i),e.after(t));let a=n.t(e,`aria-describedby`,[t.id]);this.releaseDescription=()=>{a(),t.remove(),this.releaseDescription=y}}shouldCompleteOpen(){this.longpressState=this.longpressState===`pressed`?null:this.longpressState}init(){this.abortController?.abort(),this.abortController=new AbortController;let{signal:e}=this.abortController;this.target.addEventListener(`longpress`,()=>this.handleLongpress(),{signal:e}),this.target.addEventListener(`pointerdown`,e=>this.handlePointerdown(e),{signal:e}),this.prepareDescription(this.target),!this.target.holdAffordance&&(this.target.addEventListener(`keydown`,e=>this.handleKeydown(e),{signal:e}),this.target.addEventListener(`keyup`,e=>this.handleKeyup(e),{signal:e}))}},J={click:U,longpress:q,hover:G},ae=e.n({LuzmoOverlay:()=>X}),oe=typeof document<`u`&&`showPopover`in document.createElement(`div`),Y=ee(S);Y=oe?j(Y):te(Y);var X=class e extends Y{constructor(...e){super(...e),this._delayed=!1,this._disabled=!1,this.offset=0,this._open=!1,this.lastRequestSlottableState=!1,this.receivesFocus=`auto`,this._state=`closed`,this.triggerElement=null,this.type=`auto`,this.wasOpen=!1,this.closeOnFocusOut=e=>{if(!e.relatedTarget)return;let t=new Event(`overlay-relation-query`,{bubbles:!0,composed:!0});e.relatedTarget.addEventListener(t.type,e=>{e.composedPath().includes(this)||(this.open=!1)}),e.relatedTarget.dispatchEvent(t)}}static{this.styles=[(0,c.unsafeCSS)(ne)]}get delayed(){return this.elements.at(-1)?.hasAttribute(`delayed`)||this._delayed}set delayed(e){this._delayed=e}get disabled(){return this._disabled}set disabled(e){this._disabled=e,e?(this.strategy?.abort(),this.wasOpen=this.open,this.open=!1):(this.bindEvents(),this.open=this.open||this.wasOpen,this.wasOpen=!1)}get hasNonVirtualTrigger(){return!!this.triggerElement&&!(this.triggerElement instanceof O)}get placementController(){return this._placementController||=new R(this),this._placementController}get open(){return this._open}set open(t){t&&this.disabled||t!==this.open&&(this.strategy?.activelyOpening&&!t||(this._open=t,this.open&&(e.openCount+=1),this.requestUpdate(`open`,!this.open),this.open&&this.requestSlottable()))}static{this.openCount=1}get state(){return this._state}set state(e){if(e===this.state)return;let t=this.state;this._state=e,(this.state===`opened`||this.state===`closed`)&&this.strategy?.shouldCompleteOpen(),this.requestUpdate(`state`,t)}get elementResolver(){return this._elementResolver||=new i.t(this),this._elementResolver}get usesDialog(){return this.type===`modal`||this.type===`page`}get popoverValue(){if(`popover`in this)switch(this.type){case`modal`:case`page`:return;case`hint`:return`manual`;default:return this.type}}get requiresPositioning(){return!(this.type===`page`||!this.open||!this.triggerElement||!this.placement&&this.type!==`hint`)}managePosition(){if(!this.requiresPositioning||!this.open)return;let e=this.offset||0,t=this.triggerElement,n=this.placement||`right`,r=this.tipPadding;this.placementController.placeOverlay(this.dialogEl,{offset:e,placement:n,tipPadding:r,trigger:t,type:this.type})}async managePopoverOpen(){super.managePopoverOpen();let e=this.open;if(this.open!==e||(await this.manageDelay(e),this.open!==e)||(this.triggerInteraction===`longpress`&&await x(),await this.ensureOnDOM(e),this.open!==e))return;let t=await this.makeTransition(e);this.open===e&&await this.applyFocus(e,t)}async applyFocus(e,t){if(!(this.receivesFocus===`false`||this.type===`hint`)){if(await x(),await x(),e===this.open&&!this.open){this.hasNonVirtualTrigger&&this.contains(this.getRootNode().activeElement)&&this.triggerElement.focus();return}t?.focus()}}returnFocus(){this.open||this.type===`hint`||this.receivesFocus!==`false`&&this.triggerElement?.focus&&(this.contains(this.getRootNode().activeElement)||(()=>{let e=[],t=typeof document>`u`?null:document.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;for(;t;){let n=t.assignedSlot||t.parentElement||t.getRootNode()?.host;n&&e.push(n),t=n}return e})().includes(this)||typeof document<`u`&&document.activeElement===document.body)&&this.triggerElement.focus()}async manageOpen(e){if(!(!this.isConnected&&this.open)&&(this.hasUpdated||await this.updateComplete,this.open?(N.add(this),this.willPreventClose&&(document.addEventListener(`pointerup`,()=>{this.dialogEl.classList.toggle(`not-immediately-closable`,!1),this.willPreventClose=!1},{once:!0}),this.dialogEl.classList.toggle(`not-immediately-closable`,!0))):(e&&this.dispose(),N.remove(this)),this.open&&this.state!==`opened`?this.state=`opening`:!this.open&&this.state!==`closed`&&(this.state=`closing`),this.usesDialog?this.manageDialogOpen():this.managePopoverOpen(),this.type===`auto`)){let e=this.getRootNode();this.open?e.addEventListener(`focusout`,this.closeOnFocusOut,{capture:!0}):e.removeEventListener(`focusout`,this.closeOnFocusOut,{capture:!0})}}bindEvents(){this.strategy?.abort(),this.strategy=void 0,this.hasNonVirtualTrigger&&this.triggerInteraction&&(this.strategy=new J[this.triggerInteraction](this.triggerElement,{overlay:this}))}handleBeforetoggle(e){e.newState!==`open`&&this.handleBrowserClose(e)}handleBrowserClose(e){if(e.stopPropagation(),!this.strategy?.activelyOpening){this.open=!1;return}this.manuallyKeepOpen()}handleDialogCancel(e){if(this.type===`page`){e.preventDefault();return}this.handleBrowserClose(e)}manuallyKeepOpen(){this.open=!0,this.placementController.allowPlacementUpdate=!0,this.manageOpen(!1)}handleSlotchange(){this.elements.length===0?this.strategy?.releaseDescription():this.hasNonVirtualTrigger&&this.strategy?.prepareDescription(this.triggerElement)}shouldPreventClose(){let e=this.willPreventClose;return this.willPreventClose=!1,e}requestSlottable(){this.lastRequestSlottableState!==this.open&&(this.open||document.body.offsetHeight,this.dispatchEvent(new a.t(`overlay-content`,this.open?{}:a.n)),this.lastRequestSlottableState=this.open)}willUpdate(e){if(this.hasAttribute(`id`)||this.setAttribute(`id`,`${this.tagName.toLowerCase()}-${r.t()}`),e.has(`open`)&&(this.hasUpdated||this.open)&&this.manageOpen(e.get(`open`)),e.has(`trigger`)){let[e,t]=this.trigger?.split(`@`)||[];this.elementResolver.selector=e?`#${e}`:``,this.triggerInteraction=t}let t=!1;e.has(i.n)&&(t=this.triggerElement,this.triggerElement=this.elementResolver.element),e.has(`triggerElement`)&&(t=e.get(`triggerElement`)),t!==!1&&this.bindEvents()}updated(e){super.updated(e),e.has(`placement`)&&(this.placement?this.dialogEl.setAttribute(`actual-placement`,this.placement):this.dialogEl.removeAttribute(`actual-placement`),this.open&&e.get(`placement`)!==void 0&&this.placementController.resetOverlayPosition()),e.has(`state`)&&this.state===`closed`&&e.get(`state`)!==void 0&&this.placementController.clearOverlayPosition()}renderContent(){return c.html` <slot @slotchange=${this.handleSlotchange}></slot> `}get dialogStyleMap(){return{"--luzmo-overlay-open-count":e.openCount.toString()}}renderDialog(){return c.html`
19
19
  <dialog
20
20
  class="dialog"
21
21
  part="dialog"
@@ -611,8 +611,8 @@ var R = 8, ve = 100, ye = (e) => ({
611
611
  ]
612
612
  })[e] ?? [e], be = Symbol("placement updated"), z = class {
613
613
  constructor(e) {
614
- this.originalPlacements = /* @__PURE__ */ new WeakMap(), this.placementGeneration = 0, this.allowPlacementUpdate = !1, this.closeForAncestorUpdate = () => {
615
- !this.allowPlacementUpdate && this.options.type !== "modal" && this.cleanup && this.target.dispatchEvent(new Event("close", { bubbles: !0 })), this.allowPlacementUpdate = !1;
614
+ this.originalPlacements = /* @__PURE__ */ new WeakMap(), this.placementGeneration = 0, this.allowPlacementUpdate = !1, this.closeForAncestorUpdate = (e) => {
615
+ f() && e?.currentTarget === window.visualViewport || (!this.allowPlacementUpdate && this.options.type !== "modal" && this.cleanup && this.target.dispatchEvent(new Event("close", { bubbles: !0 })), this.allowPlacementUpdate = !1);
616
616
  }, this.updatePlacement = () => {
617
617
  this.computePlacement();
618
618
  }, this.resetOverlayPosition = () => {
@@ -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("../picker-DKFG8i-B.cjs");customElements.get(`luzmo-picker`)||customElements.define(`luzmo-picker`,e.n),exports.DESCRIPTION_ID=e.t,exports.LuzmoPicker=e.n,exports.LuzmoPickerBase=e.r;
18
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../picker-BliQJlY_.cjs");customElements.get(`luzmo-picker`)||customElements.define(`luzmo-picker`,e.n),exports.DESCRIPTION_ID=e.t,exports.LuzmoPicker=e.n,exports.LuzmoPickerBase=e.r;
@@ -16,7 +16,7 @@
16
16
  * SOFTWARE.
17
17
  * */
18
18
  import "../tokens.js";
19
- import { n as e, r as t, t as n } from "../picker-DKAbXYoQ.js";
19
+ import { n as e, r as t, t as n } from "../picker-D0fMBZLb.js";
20
20
  //#region src/components/picker/index.ts
21
21
  customElements.get("luzmo-picker") || customElements.define("luzmo-picker", e);
22
22
  //#endregion
@@ -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
- const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./focusable-B6h03pAe.cjs"),r=require("./language-resolution-CSjktYg5.cjs"),i=require("./dependency-manger-BSaHw9ju.cjs"),a=require("./strategies-BwNbUXYS.cjs");require("./progress-circle-bO_VAX3N.cjs");const o=require("./pending-state-CGHvTtKR.cjs");require("./menu-CrhA2iPZ.cjs"),require("./overlay-4YVoQOyd.cjs"),require("./tooltip-DjOW52n2.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"),f=require("lit/directives/style-map.js");var p=`#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-picker-font-size,var(--picker-font-size));margin-inline-end:var(--luzmo-picker-spacing-text-to-icon,var(--picker-spacing-text-to-icon))}@media (forced-colors:active){:host{--highcontrast-picker-focus-indicator-color:Highlight;--highcontrast-picker-border-color-default:ButtonBorder;--highcontrast-picker-border-color-hover:Highlight;--highcontrast-picker-border-color-disabled:GrayText;--highcontrast-picker-content-color-default:ButtonText;--highcontrast-picker-content-color-disabled:GrayText;--highcontrast-picker-background-color:ButtonFace}#button:focus-visible{--highcontrast-picker-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(--picker-minimum-width-multiplier) * var(--luzmo-picker-block-size,var(--picker-block-size)));block-size:var(--luzmo-picker-block-size,var(--picker-block-size));border-width:var(--luzmo-picker-border-width,var(--picker-border-width));border-radius:var(--luzmo-picker-border-radius,var(--picker-border-radius));box-shadow:var(--luzmo-picker-box-shadow,var(--picker-box-shadow));transition:background-color var(--luzmo-picker-animation-duration,var(--picker-animation-duration)), box-shadow var(--luzmo-picker-animation-duration,var(--picker-animation-duration)), border-color var(--luzmo-picker-animation-duration,var(--picker-animation-duration)) ease-in-out;color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default,var(--picker-font-color-default)));background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-default,var(--picker-background-color-default)));border-style:solid;border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-default,var(--picker-border-color-default)));margin-block-start:var(--luzmo-picker-spacing-label-to-picker,var(--picker-spacing-label-to-picker));padding-block:0;padding-inline-start:var(--luzmo-picker-spacing-edge-to-text,var(--picker-spacing-edge-to-text));padding-inline-end:var(--luzmo-picker-spacing-edge-to-disclosure-icon,var(--picker-spacing-edge-to-disclosure-icon));display:flex}#button:after{pointer-events:none;content:"";block-size:calc(100% + var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) * 2 + var(--luzmo-picker-border-width,var(--picker-border-width)) * 2);inline-size:calc(100% + var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) * 2 + var(--luzmo-picker-border-width,var(--picker-border-width)) * 2);border-style:solid;border-width:var(--luzmo-picker-focus-indicator-width,var(--picker-focus-indicator-width));border-radius:calc(var(--luzmo-picker-border-radius,var(--picker-border-radius)) + var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) + var(--luzmo-picker-border-width,var(--picker-border-width)));border-color:#0000;margin-block-start:calc((var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) + var(--luzmo-picker-focus-indicator-width,var(--picker-focus-indicator-width)) + var(--luzmo-picker-border-width,var(--picker-border-width))) * -1);margin-inline-start:calc((var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) + var(--luzmo-picker-focus-indicator-width,var(--picker-focus-indicator-width)) + var(--luzmo-picker-border-width,var(--picker-border-width))) * -1);position:absolute;inset-block:0;inset-inline:0}#button:active{background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-active,var(--picker-background-color-active)));border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-active,var(--picker-border-color-active)))}#button:active:after{border-color:#0000}#button.placeholder:active .label{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-active,var(--picker-font-color-active)))}#button:focus-visible{background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-key-focus,var(--picker-background-color-key-focus)));border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-key-focus,var(--picker-border-color-key-focus)));color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-key-focus,var(--picker-font-color-key-focus)));outline:none}#button:focus-visible:after{border-color:var(--highcontrast-picker-focus-indicator-color,var(--luzmo-picker-focus-indicator-color,var(--picker-focus-indicator-color)))}#button.placeholder:focus-visible{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-key-focus,var(--picker-font-color-key-focus)))}#button:focus-visible .disclosure-icon{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-key-focus,var(--picker-icon-color-key-focus)))}:host([open]) #button:not(:disabled,.is-disabled){color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default-open,var(--picker-font-color-default-open)));background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-default-open,var(--picker-background-color-default-open)));border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-default-open,var(--picker-border-color-default-open)))}:host([open]) #button:not(:disabled,.is-disabled) .disclosure-icon{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-default-open,var(--picker-icon-color-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-error-default,var(--picker-border-color-error-default)))}:host([invalid]) #button:not(:disabled,.is-disabled) .validation-icon{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-error,var(--picker-icon-color-error)))}:host([invalid]) #button:not(:disabled,.is-disabled):active{border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-error-active,var(--picker-border-color-error-active)))}:host([invalid][open]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-error-default-open,var(--picker-border-color-error-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):focus-visible{border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-error-key-focus,var(--picker-border-color-error-key-focus)))}:host([pending]) #button .disclosure-icon{color:var(--highcontrast-picker-content-color-disabled,var(--luzmo-picker-icon-color-disabled,var(--picker-icon-color-disabled)))}.icon{flex-shrink:0}.label{white-space:nowrap;font-size:var(--luzmo-picker-font-size,var(--picker-font-size));line-height:var(--luzmo-picker-line-height,var(--picker-line-height));font-weight:var(--luzmo-picker-font-weight,var(--picker-font-weight));text-overflow:ellipsis;text-align:start;flex:auto;overflow:hidden}:host([data-luzmo-language-script=Latn]) .label{text-box:trim-both cap alphabetic;margin-block:-.35em;padding-block:.35em}.label.placeholder{font-weight:var(--luzmo-picker-placeholder-font-weight,var(--picker-font-weight));font-style:var(--luzmo-picker-placeholder-font-style,var(--picker-placeholder-font-style));transition:color var(--luzmo-picker-animation-duration,var(--picker-animation-duration)) ease-in-out;color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default,var(--picker-font-color-default)))}.label.placeholder:active{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-active,var(--picker-font-color-active)))}.disclosure-icon{vertical-align:top;transition:color var(--luzmo-picker-animation-duration,var(--picker-animation-duration)) ease-out;color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-default,var(--picker-icon-color-default)));flex-shrink:0;margin-inline-start:var(--luzmo-picker-spacing-icon-to-disclosure-icon,var(--picker-spacing-icon-to-disclosure-icon));display:inline-block;position:relative}.disclosure-icon:active{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-active,var(--picker-icon-color-active)))}luzmo-progress-circle,.validation-icon{margin-inline-start:var(--luzmo-picker-spacing-text-to-icon,var(--picker-spacing-text-to-icon))}.icon-container{height:100%;font-size:var(--luzmo-picker-disclosure-icon-size,var(--picker-disclosure-icon-size));align-items:center;display:flex;position:relative}.icon-container.disclosure-icon{margin-inline-end:0}.label~.disclosure-icon{margin-inline-start:var(--luzmo-picker-spacing-text-to-icon,var(--picker-spacing-text-to-icon))}:host([quiet]) #button{inline-size:auto;min-inline-size:0;padding-inline:var(--luzmo-picker-spacing-edge-to-text-quiet,var(--picker-spacing-edge-to-text-quiet));color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default,var(--picker-font-color-default)));background-color:initial;background-color:var(--highcontrast-picker-background-color,transparent);box-shadow:none;border:none;border-radius:0;margin-block-start:calc(var(--luzmo-picker-spacing-label-to-picker-quiet,var(--picker-spacing-label-to-picker-quiet)) + 1px)}:host([quiet]) #button.label-inline{margin-block-start:0}:host([quiet]) #button .disclosure-icon{margin-inline-end:var(--luzmo-picker-spacing-edge-to-disclosure-icon-quiet,var(--picker-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-picker-content-color-default,var(--luzmo-picker-font-color-hover,var(--picker-font-color-hover)));background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-hover,var(--picker-background-color-hover)));border-color:var(--highcontrast-picker-border-color-hover,var(--luzmo-picker-border-color-hover,var(--picker-border-color-hover)))}#button:hover .disclosure-icon{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-hover,var(--picker-icon-color-hover)))}:host([open]):not([quiet]) #button:not(:disabled,.is-disabled):hover{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-hover-open,var(--picker-font-color-hover-open)));background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-hover-open,var(--picker-background-color-hover-open)));border-color:var(--highcontrast-picker-border-color-hover,var(--luzmo-picker-border-color-hover-open,var(--picker-border-color-hover-open)))}:host([open]) #button:not(:disabled,.is-disabled):hover .disclosure-icon{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-hover-open,var(--picker-icon-color-hover-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-picker-border-color-hover,var(--luzmo-picker-border-color-error-hover,var(--picker-border-color-error-hover)))}:host([invalid][open]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-picker-border-color-hover,var(--luzmo-picker-border-color-error-hover-open,var(--picker-border-color-error-hover-open)))}.label.placeholder:hover{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-hover,var(--picker-font-color-hover)))}:host([quiet]) #button:hover{background-color:initial;background-color:var(--highcontrast-picker-background-color,transparent)!important}}:host([quiet]) #button:focus-visible{background-color:initial;background-color:var(--highcontrast-picker-background-color,transparent)}:host([quiet]) #button:focus-visible:after{box-shadow:0 var(--luzmo-picker-focus-indicator-width,var(--picker-focus-indicator-width)) 0 0 var(--highcontrast-picker-focus-indicator-color,var(--luzmo-picker-focus-indicator-color,var(--picker-focus-indicator-color)));margin:calc((var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) + var(--luzmo-picker-border-width,var(--picker-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-picker-background-color,transparent)}.label-inline{vertical-align:top;display:inline-flex}:host([disabled]) #button,#button:disabled{cursor:default;background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-disabled,var(--picker-background-color-disabled)));border-color:#0000;border-color:var(--highcontrast-picker-border-color-disabled,transparent);color:var(--highcontrast-picker-content-color-disabled,var(--luzmo-picker-font-color-disabled,var(--picker-font-color-disabled)))}:host([disabled]) #button .icon,:host([disabled]) #button .disclosure-icon,:host([disabled]) #button .validation-icon,#button:disabled .icon,#button:disabled .disclosure-icon,#button:disabled .validation-icon{color:var(--highcontrast-picker-content-color-disabled,var(--luzmo-picker-icon-color-disabled,var(--picker-icon-color-disabled)))}:host([disabled]) #button .label.placeholder,#button:disabled .label.placeholder{color:var(--highcontrast-picker-content-color-disabled,var(--luzmo-picker-font-color-disabled,var(--picker-font-color-disabled)))}:host{--picker-box-shadow:0px 1px 3px 0px var(--luzmo-shadow-color);--picker-background-color-default:var(--luzmo-background-color);--picker-background-color-default-open:var(--luzmo-background-color-hover);--picker-background-color-active:var(--luzmo-background-color-down);--picker-background-color-hover:var(--luzmo-background-color-hover);--picker-background-color-hover-open:var(--luzmo-background-color-down);--picker-background-color-key-focus:var(--luzmo-background-color-down);--picker-border-color-default:var(--luzmo-border-color);--picker-border-color-default-open:var(--luzmo-border-color-hover);--picker-border-color-hover:var(--luzmo-border-color);--picker-border-color-hover-open:var(--luzmo-border-color-hover);--picker-border-color-active:var(--luzmo-border-color);--picker-border-color-key-focus:var(--luzmo-border-color);--picker-border-width:var(--luzmo-border-width);--picker-font-size:var(--luzmo-font-size);--picker-font-weight:var(--luzmo-font-weight);--picker-placeholder-font-style:var(--luzmo-font-style);--picker-line-height:var(--luzmo-line-height);--picker-block-size:32px;--picker-border-radius:var(--luzmo-border-radius);--picker-spacing-edge-to-text:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-text-to-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-text-to-icon-inline-end:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-icon-to-disclosure-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-edge-to-text-quiet:0px;--picker-spacing-label-to-picker:0px;--picker-spacing-label-to-picker-quiet:calc(-1 * var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-edge-to-disclosure-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-edge-to-disclosure-icon-quiet:0px;--picker-animation-duration:var(--luzmo-animation-duration);--picker-font-color-default:var(--luzmo-font-color);--picker-font-color-default-open:var(--luzmo-font-color-hover);--picker-font-color-hover:var(--luzmo-font-color-hover);--picker-font-color-hover-open:var(--luzmo-font-color-down);--picker-font-color-active:var(--luzmo-font-color-focus);--picker-font-color-key-focus:var(--luzmo-font-color-focus);--picker-icon-color-default:var(--luzmo-font-color);--picker-icon-color-default-open:var(--luzmo-font-color-hover);--picker-icon-color-hover:var(--luzmo-font-color-hover);--picker-icon-color-hover-open:var(--luzmo-font-color-hover);--picker-icon-color-active:var(--luzmo-font-color-focus);--picker-icon-color-key-focus:var(--luzmo-font-color-focus);--picker-border-color-error-default:var(--luzmo-negative-color);--picker-border-color-error-default-open:var(--luzmo-negative-color-down);--picker-border-color-error-hover:var(--luzmo-negative-color-hover);--picker-border-color-error-hover-open:var(--luzmo-negative-color-down);--picker-border-color-error-active:var(--luzmo-negative-color-down);--picker-border-color-error-key-focus:var(--luzmo-negative-color-focus);--picker-icon-color-error:var(--luzmo-negative-color);--picker-background-color-disabled:var(--luzmo-background-color-disabled);--picker-font-color-disabled:var(--luzmo-disabled-color);--picker-icon-color-disabled:var(--luzmo-disabled-color);--picker-focus-indicator-gap:var(--luzmo-indicator-gap);--picker-focus-indicator-width:var(--luzmo-indicator-width);--picker-focus-indicator-color:var(--luzmo-indicator-color);--picker-disclosure-icon-size:var(--luzmo-font-size-s)}:host([size=s]){--picker-block-size:28px;--picker-font-size:var(--luzmo-font-size-s);--picker-border-radius:var(--luzmo-border-radius);--picker-spacing-edge-to-text:var(--luzmo-spacing-3);--picker-spacing-text-to-icon:var(--luzmo-spacing-3);--picker-spacing-text-to-icon-inline-end:var(--luzmo-spacing-3);--picker-spacing-icon-to-disclosure-icon:var(--luzmo-spacing-3);--picker-spacing-label-to-picker-quiet:calc(-1 * var(--luzmo-spacing-3));--picker-spacing-edge-to-disclosure-icon:var(--luzmo-spacing-3);--picker-disclosure-icon-size:var(--luzmo-font-size-s)}:host([size=l]){--picker-block-size:40px;--picker-font-size:var(--luzmo-font-size-l);--picker-border-radius:var(--luzmo-border-radius);--picker-spacing-edge-to-text:var(--luzmo-spacing-4);--picker-spacing-text-to-icon:var(--luzmo-spacing-4);--picker-spacing-text-to-icon-inline-end:var(--luzmo-spacing-4);--picker-spacing-icon-to-disclosure-icon:var(--luzmo-spacing-4);--picker-spacing-label-to-picker-quiet:calc(-1 * var(--luzmo-spacing-4));--picker-spacing-edge-to-disclosure-icon:var(--luzmo-spacing-4);--picker-disclosure-icon-size:var(--luzmo-font-size)}:host([size=xl]){--picker-block-size:48px;--picker-font-size:var(--luzmo-font-size-xl);--picker-border-radius:var(--luzmo-border-radius-l);--picker-spacing-edge-to-text:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-spacing-text-to-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-spacing-text-to-icon-inline-end:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-spacing-icon-to-disclosure-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-spacing-label-to-picker-quiet:calc(-1 * var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-spacing-edge-to-disclosure-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-disclosure-icon-size:var(--luzmo-font-size-l)}:host([variant=highlight]) ::slotted(luzmo-menu-item[selected]){--menu-item-highlight-label-content-color:var(--luzmo-primary-inverse-color);--menu-item-label-icon-color-default:var(--luzmo-primary-inverse-color);--menu-checkmark-display:var(--menu-checkmark-display-hidden);background-color:var(--luzmo-menu-item-highlight-label-background-color,var(--menu-item-highlight-label-background-color,var(--luzmo-border-color)));padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content,var(--menu-item-label-inline-edge-to-content))}:host{vertical-align:top;max-inline-size:100%;inline-size:var(--luzmo-picker-inline-size,var(--picker-inline-size));min-inline-size:calc(var(--picker-minimum-width-multiplier) * var(--luzmo-picker-block-size,var(--picker-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}.picker,.validation-icon{flex-shrink:0}luzmo-overlay{pointer-events:none}luzmo-menu{pointer-events:initial}:host>luzmo-menu{display:none}:host([focused]:not([quiet])) #button #label.placeholder{color:var(--picker-placeholder-text-color-key-focus,var(--alias-placeholder-text-color-hover))}#label.visually-hidden~.picker{margin-inline-start:auto}:host([focused]:not([quiet],[pending])) #button .picker{color:var(--picker-icon-color-key-focus,var(--alias-icon-color-focus))}.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-picker-background-color,var(--luzmo-picker-background-color-default,var(--picker-background-color-default)));border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-default,var(--picker-border-color-default)));color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default,var(--picker-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-picker-background-color,var(--luzmo-picker-background-color-default,var(--picker-background-color-default)));border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-default,var(--picker-border-color-default)));color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default,var(--picker-font-color-default)))}`,m=()=>s.html`
18
+ const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./focusable-B6h03pAe.cjs"),r=require("./language-resolution-CSjktYg5.cjs"),i=require("./dependency-manger-BSaHw9ju.cjs"),a=require("./strategies-BwNbUXYS.cjs");require("./progress-circle-bO_VAX3N.cjs");const o=require("./pending-state-CGHvTtKR.cjs");require("./menu-CrhA2iPZ.cjs"),require("./overlay-Dn7EbA_W.cjs"),require("./tooltip-DjOW52n2.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"),f=require("lit/directives/style-map.js");var p=`#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-picker-font-size,var(--picker-font-size));margin-inline-end:var(--luzmo-picker-spacing-text-to-icon,var(--picker-spacing-text-to-icon))}@media (forced-colors:active){:host{--highcontrast-picker-focus-indicator-color:Highlight;--highcontrast-picker-border-color-default:ButtonBorder;--highcontrast-picker-border-color-hover:Highlight;--highcontrast-picker-border-color-disabled:GrayText;--highcontrast-picker-content-color-default:ButtonText;--highcontrast-picker-content-color-disabled:GrayText;--highcontrast-picker-background-color:ButtonFace}#button:focus-visible{--highcontrast-picker-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(--picker-minimum-width-multiplier) * var(--luzmo-picker-block-size,var(--picker-block-size)));block-size:var(--luzmo-picker-block-size,var(--picker-block-size));border-width:var(--luzmo-picker-border-width,var(--picker-border-width));border-radius:var(--luzmo-picker-border-radius,var(--picker-border-radius));box-shadow:var(--luzmo-picker-box-shadow,var(--picker-box-shadow));transition:background-color var(--luzmo-picker-animation-duration,var(--picker-animation-duration)), box-shadow var(--luzmo-picker-animation-duration,var(--picker-animation-duration)), border-color var(--luzmo-picker-animation-duration,var(--picker-animation-duration)) ease-in-out;color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default,var(--picker-font-color-default)));background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-default,var(--picker-background-color-default)));border-style:solid;border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-default,var(--picker-border-color-default)));margin-block-start:var(--luzmo-picker-spacing-label-to-picker,var(--picker-spacing-label-to-picker));padding-block:0;padding-inline-start:var(--luzmo-picker-spacing-edge-to-text,var(--picker-spacing-edge-to-text));padding-inline-end:var(--luzmo-picker-spacing-edge-to-disclosure-icon,var(--picker-spacing-edge-to-disclosure-icon));display:flex}#button:after{pointer-events:none;content:"";block-size:calc(100% + var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) * 2 + var(--luzmo-picker-border-width,var(--picker-border-width)) * 2);inline-size:calc(100% + var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) * 2 + var(--luzmo-picker-border-width,var(--picker-border-width)) * 2);border-style:solid;border-width:var(--luzmo-picker-focus-indicator-width,var(--picker-focus-indicator-width));border-radius:calc(var(--luzmo-picker-border-radius,var(--picker-border-radius)) + var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) + var(--luzmo-picker-border-width,var(--picker-border-width)));border-color:#0000;margin-block-start:calc((var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) + var(--luzmo-picker-focus-indicator-width,var(--picker-focus-indicator-width)) + var(--luzmo-picker-border-width,var(--picker-border-width))) * -1);margin-inline-start:calc((var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) + var(--luzmo-picker-focus-indicator-width,var(--picker-focus-indicator-width)) + var(--luzmo-picker-border-width,var(--picker-border-width))) * -1);position:absolute;inset-block:0;inset-inline:0}#button:active{background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-active,var(--picker-background-color-active)));border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-active,var(--picker-border-color-active)))}#button:active:after{border-color:#0000}#button.placeholder:active .label{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-active,var(--picker-font-color-active)))}#button:focus-visible{background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-key-focus,var(--picker-background-color-key-focus)));border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-key-focus,var(--picker-border-color-key-focus)));color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-key-focus,var(--picker-font-color-key-focus)));outline:none}#button:focus-visible:after{border-color:var(--highcontrast-picker-focus-indicator-color,var(--luzmo-picker-focus-indicator-color,var(--picker-focus-indicator-color)))}#button.placeholder:focus-visible{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-key-focus,var(--picker-font-color-key-focus)))}#button:focus-visible .disclosure-icon{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-key-focus,var(--picker-icon-color-key-focus)))}:host([open]) #button:not(:disabled,.is-disabled){color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default-open,var(--picker-font-color-default-open)));background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-default-open,var(--picker-background-color-default-open)));border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-default-open,var(--picker-border-color-default-open)))}:host([open]) #button:not(:disabled,.is-disabled) .disclosure-icon{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-default-open,var(--picker-icon-color-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-error-default,var(--picker-border-color-error-default)))}:host([invalid]) #button:not(:disabled,.is-disabled) .validation-icon{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-error,var(--picker-icon-color-error)))}:host([invalid]) #button:not(:disabled,.is-disabled):active{border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-error-active,var(--picker-border-color-error-active)))}:host([invalid][open]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-error-default-open,var(--picker-border-color-error-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):focus-visible{border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-error-key-focus,var(--picker-border-color-error-key-focus)))}:host([pending]) #button .disclosure-icon{color:var(--highcontrast-picker-content-color-disabled,var(--luzmo-picker-icon-color-disabled,var(--picker-icon-color-disabled)))}.icon{flex-shrink:0}.label{white-space:nowrap;font-size:var(--luzmo-picker-font-size,var(--picker-font-size));line-height:var(--luzmo-picker-line-height,var(--picker-line-height));font-weight:var(--luzmo-picker-font-weight,var(--picker-font-weight));text-overflow:ellipsis;text-align:start;flex:auto;overflow:hidden}:host([data-luzmo-language-script=Latn]) .label{text-box:trim-both cap alphabetic;margin-block:-.35em;padding-block:.35em}.label.placeholder{font-weight:var(--luzmo-picker-placeholder-font-weight,var(--picker-font-weight));font-style:var(--luzmo-picker-placeholder-font-style,var(--picker-placeholder-font-style));transition:color var(--luzmo-picker-animation-duration,var(--picker-animation-duration)) ease-in-out;color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default,var(--picker-font-color-default)))}.label.placeholder:active{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-active,var(--picker-font-color-active)))}.disclosure-icon{vertical-align:top;transition:color var(--luzmo-picker-animation-duration,var(--picker-animation-duration)) ease-out;color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-default,var(--picker-icon-color-default)));flex-shrink:0;margin-inline-start:var(--luzmo-picker-spacing-icon-to-disclosure-icon,var(--picker-spacing-icon-to-disclosure-icon));display:inline-block;position:relative}.disclosure-icon:active{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-active,var(--picker-icon-color-active)))}luzmo-progress-circle,.validation-icon{margin-inline-start:var(--luzmo-picker-spacing-text-to-icon,var(--picker-spacing-text-to-icon))}.icon-container{height:100%;font-size:var(--luzmo-picker-disclosure-icon-size,var(--picker-disclosure-icon-size));align-items:center;display:flex;position:relative}.icon-container.disclosure-icon{margin-inline-end:0}.label~.disclosure-icon{margin-inline-start:var(--luzmo-picker-spacing-text-to-icon,var(--picker-spacing-text-to-icon))}:host([quiet]) #button{inline-size:auto;min-inline-size:0;padding-inline:var(--luzmo-picker-spacing-edge-to-text-quiet,var(--picker-spacing-edge-to-text-quiet));color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default,var(--picker-font-color-default)));background-color:initial;background-color:var(--highcontrast-picker-background-color,transparent);box-shadow:none;border:none;border-radius:0;margin-block-start:calc(var(--luzmo-picker-spacing-label-to-picker-quiet,var(--picker-spacing-label-to-picker-quiet)) + 1px)}:host([quiet]) #button.label-inline{margin-block-start:0}:host([quiet]) #button .disclosure-icon{margin-inline-end:var(--luzmo-picker-spacing-edge-to-disclosure-icon-quiet,var(--picker-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-picker-content-color-default,var(--luzmo-picker-font-color-hover,var(--picker-font-color-hover)));background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-hover,var(--picker-background-color-hover)));border-color:var(--highcontrast-picker-border-color-hover,var(--luzmo-picker-border-color-hover,var(--picker-border-color-hover)))}#button:hover .disclosure-icon{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-hover,var(--picker-icon-color-hover)))}:host([open]):not([quiet]) #button:not(:disabled,.is-disabled):hover{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-hover-open,var(--picker-font-color-hover-open)));background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-hover-open,var(--picker-background-color-hover-open)));border-color:var(--highcontrast-picker-border-color-hover,var(--luzmo-picker-border-color-hover-open,var(--picker-border-color-hover-open)))}:host([open]) #button:not(:disabled,.is-disabled):hover .disclosure-icon{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-icon-color-hover-open,var(--picker-icon-color-hover-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-picker-border-color-hover,var(--luzmo-picker-border-color-error-hover,var(--picker-border-color-error-hover)))}:host([invalid][open]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-picker-border-color-hover,var(--luzmo-picker-border-color-error-hover-open,var(--picker-border-color-error-hover-open)))}.label.placeholder:hover{color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-hover,var(--picker-font-color-hover)))}:host([quiet]) #button:hover{background-color:initial;background-color:var(--highcontrast-picker-background-color,transparent)!important}}:host([quiet]) #button:focus-visible{background-color:initial;background-color:var(--highcontrast-picker-background-color,transparent)}:host([quiet]) #button:focus-visible:after{box-shadow:0 var(--luzmo-picker-focus-indicator-width,var(--picker-focus-indicator-width)) 0 0 var(--highcontrast-picker-focus-indicator-color,var(--luzmo-picker-focus-indicator-color,var(--picker-focus-indicator-color)));margin:calc((var(--luzmo-picker-focus-indicator-gap,var(--picker-focus-indicator-gap)) + var(--luzmo-picker-border-width,var(--picker-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-picker-background-color,transparent)}.label-inline{vertical-align:top;display:inline-flex}:host([disabled]) #button,#button:disabled{cursor:default;background-color:var(--highcontrast-picker-background-color,var(--luzmo-picker-background-color-disabled,var(--picker-background-color-disabled)));border-color:#0000;border-color:var(--highcontrast-picker-border-color-disabled,transparent);color:var(--highcontrast-picker-content-color-disabled,var(--luzmo-picker-font-color-disabled,var(--picker-font-color-disabled)))}:host([disabled]) #button .icon,:host([disabled]) #button .disclosure-icon,:host([disabled]) #button .validation-icon,#button:disabled .icon,#button:disabled .disclosure-icon,#button:disabled .validation-icon{color:var(--highcontrast-picker-content-color-disabled,var(--luzmo-picker-icon-color-disabled,var(--picker-icon-color-disabled)))}:host([disabled]) #button .label.placeholder,#button:disabled .label.placeholder{color:var(--highcontrast-picker-content-color-disabled,var(--luzmo-picker-font-color-disabled,var(--picker-font-color-disabled)))}:host{--picker-box-shadow:0px 1px 3px 0px var(--luzmo-shadow-color);--picker-background-color-default:var(--luzmo-background-color);--picker-background-color-default-open:var(--luzmo-background-color-hover);--picker-background-color-active:var(--luzmo-background-color-down);--picker-background-color-hover:var(--luzmo-background-color-hover);--picker-background-color-hover-open:var(--luzmo-background-color-down);--picker-background-color-key-focus:var(--luzmo-background-color-down);--picker-border-color-default:var(--luzmo-border-color);--picker-border-color-default-open:var(--luzmo-border-color-hover);--picker-border-color-hover:var(--luzmo-border-color);--picker-border-color-hover-open:var(--luzmo-border-color-hover);--picker-border-color-active:var(--luzmo-border-color);--picker-border-color-key-focus:var(--luzmo-border-color);--picker-border-width:var(--luzmo-border-width);--picker-font-size:var(--luzmo-font-size);--picker-font-weight:var(--luzmo-font-weight);--picker-placeholder-font-style:var(--luzmo-font-style);--picker-line-height:var(--luzmo-line-height);--picker-block-size:32px;--picker-border-radius:var(--luzmo-border-radius);--picker-spacing-edge-to-text:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-text-to-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-text-to-icon-inline-end:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-icon-to-disclosure-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-edge-to-text-quiet:0px;--picker-spacing-label-to-picker:0px;--picker-spacing-label-to-picker-quiet:calc(-1 * var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-edge-to-disclosure-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--picker-spacing-edge-to-disclosure-icon-quiet:0px;--picker-animation-duration:var(--luzmo-animation-duration);--picker-font-color-default:var(--luzmo-font-color);--picker-font-color-default-open:var(--luzmo-font-color-hover);--picker-font-color-hover:var(--luzmo-font-color-hover);--picker-font-color-hover-open:var(--luzmo-font-color-down);--picker-font-color-active:var(--luzmo-font-color-focus);--picker-font-color-key-focus:var(--luzmo-font-color-focus);--picker-icon-color-default:var(--luzmo-font-color);--picker-icon-color-default-open:var(--luzmo-font-color-hover);--picker-icon-color-hover:var(--luzmo-font-color-hover);--picker-icon-color-hover-open:var(--luzmo-font-color-hover);--picker-icon-color-active:var(--luzmo-font-color-focus);--picker-icon-color-key-focus:var(--luzmo-font-color-focus);--picker-border-color-error-default:var(--luzmo-negative-color);--picker-border-color-error-default-open:var(--luzmo-negative-color-down);--picker-border-color-error-hover:var(--luzmo-negative-color-hover);--picker-border-color-error-hover-open:var(--luzmo-negative-color-down);--picker-border-color-error-active:var(--luzmo-negative-color-down);--picker-border-color-error-key-focus:var(--luzmo-negative-color-focus);--picker-icon-color-error:var(--luzmo-negative-color);--picker-background-color-disabled:var(--luzmo-background-color-disabled);--picker-font-color-disabled:var(--luzmo-disabled-color);--picker-icon-color-disabled:var(--luzmo-disabled-color);--picker-focus-indicator-gap:var(--luzmo-indicator-gap);--picker-focus-indicator-width:var(--luzmo-indicator-width);--picker-focus-indicator-color:var(--luzmo-indicator-color);--picker-disclosure-icon-size:var(--luzmo-font-size-s)}:host([size=s]){--picker-block-size:28px;--picker-font-size:var(--luzmo-font-size-s);--picker-border-radius:var(--luzmo-border-radius);--picker-spacing-edge-to-text:var(--luzmo-spacing-3);--picker-spacing-text-to-icon:var(--luzmo-spacing-3);--picker-spacing-text-to-icon-inline-end:var(--luzmo-spacing-3);--picker-spacing-icon-to-disclosure-icon:var(--luzmo-spacing-3);--picker-spacing-label-to-picker-quiet:calc(-1 * var(--luzmo-spacing-3));--picker-spacing-edge-to-disclosure-icon:var(--luzmo-spacing-3);--picker-disclosure-icon-size:var(--luzmo-font-size-s)}:host([size=l]){--picker-block-size:40px;--picker-font-size:var(--luzmo-font-size-l);--picker-border-radius:var(--luzmo-border-radius);--picker-spacing-edge-to-text:var(--luzmo-spacing-4);--picker-spacing-text-to-icon:var(--luzmo-spacing-4);--picker-spacing-text-to-icon-inline-end:var(--luzmo-spacing-4);--picker-spacing-icon-to-disclosure-icon:var(--luzmo-spacing-4);--picker-spacing-label-to-picker-quiet:calc(-1 * var(--luzmo-spacing-4));--picker-spacing-edge-to-disclosure-icon:var(--luzmo-spacing-4);--picker-disclosure-icon-size:var(--luzmo-font-size)}:host([size=xl]){--picker-block-size:48px;--picker-font-size:var(--luzmo-font-size-xl);--picker-border-radius:var(--luzmo-border-radius-l);--picker-spacing-edge-to-text:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-spacing-text-to-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-spacing-text-to-icon-inline-end:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-spacing-icon-to-disclosure-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-spacing-label-to-picker-quiet:calc(-1 * var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-spacing-edge-to-disclosure-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--picker-disclosure-icon-size:var(--luzmo-font-size-l)}:host([variant=highlight]) ::slotted(luzmo-menu-item[selected]){--menu-item-highlight-label-content-color:var(--luzmo-primary-inverse-color);--menu-item-label-icon-color-default:var(--luzmo-primary-inverse-color);--menu-checkmark-display:var(--menu-checkmark-display-hidden);background-color:var(--luzmo-menu-item-highlight-label-background-color,var(--menu-item-highlight-label-background-color,var(--luzmo-border-color)));padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content,var(--menu-item-label-inline-edge-to-content))}:host{vertical-align:top;max-inline-size:100%;inline-size:var(--luzmo-picker-inline-size,var(--picker-inline-size));min-inline-size:calc(var(--picker-minimum-width-multiplier) * var(--luzmo-picker-block-size,var(--picker-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}.picker,.validation-icon{flex-shrink:0}luzmo-overlay{pointer-events:none}luzmo-menu{pointer-events:initial}:host>luzmo-menu{display:none}:host([focused]:not([quiet])) #button #label.placeholder{color:var(--picker-placeholder-text-color-key-focus,var(--alias-placeholder-text-color-hover))}#label.visually-hidden~.picker{margin-inline-start:auto}:host([focused]:not([quiet],[pending])) #button .picker{color:var(--picker-icon-color-key-focus,var(--alias-icon-color-focus))}.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-picker-background-color,var(--luzmo-picker-background-color-default,var(--picker-background-color-default)));border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-default,var(--picker-border-color-default)));color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default,var(--picker-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-picker-background-color,var(--luzmo-picker-background-color-default,var(--picker-background-color-default)));border-color:var(--highcontrast-picker-border-color-default,var(--luzmo-picker-border-color-default,var(--picker-border-color-default)));color:var(--highcontrast-picker-content-color-default,var(--luzmo-picker-font-color-default,var(--picker-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>
@@ -24,7 +24,7 @@ import { i as a, n as o, r as s, t as c } from "./strategies-Cl59wdNZ.js";
24
24
  import "./progress-circle-By6qUQYe.js";
25
25
  import { t as l } from "./pending-state-D_b45qvi.js";
26
26
  import "./menu-fdJseu1y.js";
27
- import "./overlay-BvMcppFH.js";
27
+ import "./overlay-DpHIYJtd.js";
28
28
  import "./tooltip-xTa9Q5JW.js";
29
29
  import { html as u, nothing as d, render as f, unsafeCSS as p } from "lit";
30
30
  import { property as m, query as h, state as g } from "lit/decorators.js";
@@ -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("../progress-steps-9tRZ0dxp.cjs");exports.LuzmoProgressSteps=e.t;
18
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../progress-steps-Y-Tgh_fQ.cjs");exports.DEFAULT_PROGRESS_STEPS_LABELS=e.n,exports.LuzmoProgressSteps=e.t;
@@ -5,4 +5,5 @@ declare global {
5
5
  }
6
6
  }
7
7
  export { LuzmoProgressSteps } from './progress-steps';
8
- export type { LocalizedString, ProgressStepsLabels, ProgressStepsStatuses, ProgressTreeNode, ProgressTreeNodeDescriptionMetadata } from './types';
8
+ export { DEFAULT_PROGRESS_STEPS_LABELS } from './types';
9
+ export type { LocalizedString, ProgressStepsDisplayMode, ProgressStepsLabels, ProgressStepsStatuses, ProgressStepsToggleDetail, ProgressTreeNode, ProgressTreeNodeDescriptionMetadata } from './types';
@@ -16,5 +16,5 @@
16
16
  * SOFTWARE.
17
17
  * */
18
18
  import "../tokens.js";
19
- import { t as e } from "../progress-steps-CX9mnyHH.js";
20
- export { e as LuzmoProgressSteps };
19
+ import { n as e, t } from "../progress-steps-ohguJaPa.js";
20
+ export { e as DEFAULT_PROGRESS_STEPS_LABELS, t as LuzmoProgressSteps };
@@ -0,0 +1,23 @@
1
+ import type { ProgressTreeNode } from './types';
2
+ export type ProgressHeadline = {
3
+ mainStep: ProgressTreeNode;
4
+ subStep: ProgressTreeNode | null;
5
+ };
6
+ export declare function hasSteps(progress: ProgressTreeNode | null): boolean;
7
+ /**
8
+ * The step to show while a run is in progress: the newest running main step,
9
+ * plus the deepest, newest running node below it.
10
+ */
11
+ export declare function findActiveHeadline(progress: ProgressTreeNode | null): ProgressHeadline | null;
12
+ /** Failed steps at any depth below the root. */
13
+ export declare function countFailedSteps(progress: ProgressTreeNode | null): number;
14
+ /** Whether any main step has succeeded or failed. */
15
+ export declare function hasEndedSteps(progress: ProgressTreeNode | null): boolean;
16
+ /** Whether the root itself says the run has ended. */
17
+ export declare function isRunReported(progress: ProgressTreeNode | null): boolean;
18
+ /**
19
+ * Replaces `{{key}}` placeholders in a node's description with its metadata,
20
+ * resolving localized values for the given locale. Falls back to the step
21
+ * identifier when the node has no description.
22
+ */
23
+ export declare function interpolateDescription(node: ProgressTreeNode, locale: string): string;
@@ -1,148 +1,121 @@
1
- import { TemplateResult } from 'lit';
1
+ import { CSSResultArray, nothing, PropertyValues, TemplateResult } from 'lit';
2
2
  import { LuzmoElement } from '../../utils/base';
3
- import type { ProgressStepsDisplayMode, ProgressStepsLabels, ProgressTreeNode } from './types';
3
+ import { type ProgressStepsDisplayMode, type ProgressStepsLabels, type ProgressTreeNode } from './types';
4
4
  declare const LuzmoProgressSteps_base: typeof LuzmoElement & {
5
5
  new (...args: any[]): import("../..").SizedElementInterface;
6
6
  prototype: import("../..").SizedElementInterface;
7
7
  };
8
8
  /**
9
9
  * @element luzmo-progress-steps
10
- * @summary A component for displaying real-time Progress status steps with substeps
10
+ * @summary Shows the progress of a multi-step process, such as an AI response,
11
+ * as a single line that expands into the full step history.
12
+ *
13
+ * While a run is in progress, the line shows the newest running step and its
14
+ * newest running substep. Once the run finishes, it shows how many steps ran.
15
+ * Activating the line opens the history.
11
16
  *
12
17
  * @attr size - The size of the component: s, m, l or xl
13
18
  * @attr locale - Locale for resolving localized strings (default: 'en')
14
- * @attr collapsed - When true, collapses all auto-expanded steps
15
- * @attr condensed - When true, hides all steps behind a single "{n} steps completed" toggle line
16
- * @attr display-mode - Display mode: 'detailed' (default) shows substeps and descriptions, 'compact' shows only step names
19
+ * @attr collapsed - Signals the run has finished, so the line settles into its summary as soon as no step runs
20
+ * @attr condensed - Deprecated, no effect: every state is condensed into one line
21
+ * @attr display-mode - 'detailed' (default) lists substeps in the history, 'compact' lists main steps only
22
+ * @attr no-animate - Disables the shimmer and transitions
23
+ * @attr open - Whether the step history is shown
24
+ *
25
+ * @fires luzmo-step-expanded - The user opened the step history. `detail.nodeId` is the progress root id.
26
+ * @fires luzmo-step-collapsed - The user closed the step history. `detail.nodeId` is the progress root id.
17
27
  *
18
- * @fires luzmo-step-expanded - Fired when a step is expanded
19
- * @fires luzmo-step-collapsed - Fired when a step is collapsed
28
+ * @cssprop --luzmo-progress-steps-font-size - Font size of the summary line
29
+ * @cssprop --luzmo-progress-steps-font-size-small - Font size of the step history
30
+ * @cssprop --luzmo-progress-steps-font-color - Color of emphasized text
31
+ * @cssprop --luzmo-progress-steps-font-color-dimmed - Color of the summary line and substeps
32
+ * @cssprop --luzmo-progress-steps-error-color - Color of failed steps
33
+ * @cssprop --luzmo-progress-steps-warning-color - Color of the failure icon in the summary line
34
+ * @cssprop --luzmo-progress-steps-substep-connector-color - Color of the timeline rail in the history and the spinner track
20
35
  */
21
36
  export declare class LuzmoProgressSteps extends LuzmoProgressSteps_base {
22
- static styles: import("lit").CSSResult[];
37
+ static get styles(): CSSResultArray;
23
38
  /**
24
- * The progress tree from the backend.
25
- * The root node's children are rendered as main steps.
39
+ * The progress tree. The root's children are the main steps.
40
+ * Replace the whole tree on every update; keep the root `id` for the same run.
26
41
  */
27
42
  progress: ProgressTreeNode | null;
28
43
  /**
29
44
  * Locale for resolving localized strings in description metadata.
30
- * Defaults to 'en'.
31
45
  */
32
46
  locale: string;
33
47
  /**
34
- * When true, collapses all auto-expanded steps.
35
- * Manually expanded steps remain open.
48
+ * Signals that the run has finished. The summary line then settles as soon
49
+ * as no step is running, instead of after a short quiet period.
36
50
  */
37
51
  collapsed: boolean;
38
52
  /**
39
- * Display mode for the progress steps.
40
- * - 'detailed' (default): Shows full descriptions and substeps with expand/collapse
41
- * - 'compact': Shows only step names without substeps or expand/collapse
53
+ * - 'detailed' (default): the history lists main steps with their substeps
54
+ * - 'compact': the history lists main steps only
42
55
  */
43
56
  displayMode: ProgressStepsDisplayMode;
44
57
  /**
45
- * When true, hides all steps behind a single "{n} steps completed" toggle line.
46
- * Clicking the toggle expands/collapses the full step list.
58
+ * @deprecated Has no effect. Every state is condensed into one line.
47
59
  */
48
60
  condensed: boolean;
49
61
  /**
50
- * Labels used for visible text and screen readers.
51
- * The default values are in English and can be overridden to localize the content.
52
- * Use `{{count}}` in `stepCompleted` / `stepsCompleted` as a placeholder for the step count.
62
+ * Visible and announced copy. Partial overrides are merged over the
63
+ * English defaults. `{{count}}` is replaced in the count labels.
53
64
  */
54
- labels: ProgressStepsLabels;
65
+ labels: Partial<ProgressStepsLabels>;
55
66
  /**
56
- * When true, disables all entry animations (stepFadeIn, substepFadeIn).
57
- * @default false
67
+ * Disables the shimmer and transitions.
58
68
  */
59
69
  noAnimate: boolean;
60
70
  /**
61
- * Whether the condensed toggle has been expanded by the user.
62
- * @internal
63
- */
64
- private _condensedExpanded;
65
- /**
66
- * Set of node IDs that are manually expanded by the user
67
- * @internal
68
- */
69
- private _expandedNodes;
70
- /**
71
- * Nodes that were auto-expanded because they were in-progress.
72
- * @internal
73
- */
74
- private _autoExpandedNodes;
75
- /**
76
- * Nodes explicitly expanded by the user.
77
- * @internal
78
- */
79
- private _manuallyExpandedNodes;
80
- willUpdate(changedProperties: Map<string, unknown>): void;
81
- /**
82
- * Handles progress changes, clearing state when progress is reset or root changes
83
- * @internal
84
- */
85
- private _handleProgressChange;
86
- /**
87
- * Clears all expansion state for a fresh progress tree
88
- * @internal
89
- */
90
- private _clearExpansionState;
91
- /**
92
- * Handle auto-expand for in-progress nodes
93
- * @internal
94
- */
95
- private _handleAutoExpandCollapse;
96
- /**
97
- * Collapse all auto-expanded nodes that weren't manually expanded
98
- * @internal
99
- */
100
- private _collapseAutoExpandedNodes;
101
- /**
102
- * Re-expand in-progress nodes when collapsed changes to false
103
- * @internal
104
- */
105
- private _reExpandInProgressNodes;
106
- /** @internal */
107
- private _reExpandInProgressNodesRecursive;
108
- /**
109
- * Map backend status to CSS-friendly status
110
- * @internal
111
- */
112
- private _mapStatus;
113
- /**
114
- * Resolve a localized string to the current locale
115
- * @internal
116
- */
117
- private _resolveLocalizedString;
118
- /**
119
- * Interpolate description with metadata values
120
- * Replaces {{key}} placeholders with values from descriptionMetadata
121
- * @internal
122
- */
123
- private _interpolateDescription;
124
- /** @internal */
125
- private _toggleNodeExpansion;
126
- /** @internal */
127
- private _isNodeExpanded;
128
- /** @internal */
129
- private _renderStepIcon;
130
- /** @internal */
131
- private _renderChevron;
132
- /** @internal */
133
- private _renderSubsteps;
134
- /** @internal */
71
+ * Whether the step history is shown. Closes when a run with another root
72
+ * `id` starts.
73
+ */
74
+ open: boolean;
75
+ private _phase;
76
+ private _current;
77
+ private _leaving;
78
+ private _subStepTransition;
79
+ private _announcement;
80
+ private _languageResolver;
81
+ private _numberFormatter?;
82
+ private _pending;
83
+ private _shownAt;
84
+ private _dwellTimer?;
85
+ private _settleTimer?;
86
+ private _leaveTimer?;
87
+ private _announceTimer?;
88
+ connectedCallback(): void;
89
+ disconnectedCallback(): void;
90
+ protected willUpdate(changes: PropertyValues): void;
91
+ private get _labels();
92
+ /** Moves between running and finished based on the latest tree. */
93
+ private _syncPhase;
94
+ private _queue;
95
+ private _showPending;
96
+ private _finish;
97
+ private _show;
98
+ private _announce;
99
+ private _resetRun;
100
+ private _clearDwellTimer;
101
+ private _clearSettleTimer;
102
+ private _clearTimers;
103
+ private _formatCount;
104
+ /** Formats counts for the resolved page language; cached until it changes. */
105
+ private get _numberFormat();
106
+ private _summaryText;
107
+ private _setOpen;
108
+ private handleToggle;
109
+ private handleKeydown;
110
+ private _statusLabel;
111
+ private _renderStatusIcon;
112
+ private _renderContent;
113
+ /** A dot on the timeline rail; only a failed step gets an icon. */
114
+ private _renderStepMarker;
135
115
  private _renderSubstep;
136
- /** @internal */
116
+ private _renderSubsteps;
137
117
  private _renderStep;
138
- /** @internal */
139
- private _toggleCondensed;
140
- /** @internal */
141
- private _handleCondensedKeydown;
142
- /** @internal */
143
- private _renderCondensed;
144
- /** @internal */
145
- private _renderSteps;
146
- render(): TemplateResult;
118
+ private _renderDetails;
119
+ render(): TemplateResult | typeof nothing;
147
120
  }
148
121
  export {};