@luzmo/lucero 1.0.3-alpha.6 → 1.0.3-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +1 -1
- package/components/{action-menu-DAzm6TyR.js → action-menu-BlR6cLpi.js} +2 -2
- package/components/{action-menu-BdCk6AXo.cjs → action-menu-C1C1Gx39.cjs} +1 -1
- package/components/color-area/color-area.d.ts +7 -0
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +1 -1
- package/components/{color-area-DA3ps2-c.cjs → color-area-C3Y2d5cu.cjs} +2 -2
- package/components/{color-area-DViRjuKo.js → color-area-mWOctRNt.js} +8 -6
- package/components/color-menu/index.cjs +1 -1
- package/components/color-menu/index.js +1 -1
- package/components/{color-menu-DwbTxeqv.cjs → color-menu-BAKmi_EI.cjs} +1 -1
- package/components/{color-menu-Lxc9PTzl.js → color-menu-Cryp_5Gh.js} +1 -1
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.js +1 -1
- package/components/{color-picker-CSWiU-X5.cjs → color-picker-DL7rqWnW.cjs} +1 -1
- package/components/{color-picker-DqjfTvYf.js → color-picker-DgjqWiVd.js} +2 -2
- package/components/date-range-picker/index.cjs +1 -1
- package/components/date-range-picker/index.js +1 -1
- package/components/{date-range-picker-BOTudFdP.cjs → date-range-picker-DdY9hGsU.cjs} +1 -1
- package/components/{date-range-picker-DaV1vcVx.js → date-range-picker-DocjwZKA.js} +1 -1
- package/components/date-time-picker/index.cjs +1 -1
- package/components/date-time-picker/index.js +1 -1
- package/components/{date-time-picker-qVon-GIh.js → date-time-picker-CPbIj4TN.js} +1 -1
- package/components/{date-time-picker-DpQWIAg0.cjs → date-time-picker-DdujhIkd.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +14 -14
- package/components/menu/index.cjs +1 -1
- package/components/menu/index.d.ts +6 -4
- package/components/menu/index.js +1 -1
- package/components/menu/menu-item.d.ts +14 -0
- package/components/{menu--ukVtSq7.js → menu-Cdz2FEB7.js} +16 -7
- package/components/{menu-DAA51y45.cjs → menu-DFKS4sRU.cjs} +7 -7
- package/components/overlay/index.cjs +1 -1
- package/components/overlay/index.js +2 -2
- package/components/overlay/placement-controller.d.ts +8 -0
- package/components/{overlay-CMd2Dnpv.cjs → overlay-BGI4wOGe.cjs} +1 -1
- package/components/{overlay-8tN0KPbR.js → overlay-BbQuYBxp.js} +121 -115
- package/components/overlay-DU_p8MNs.cjs +47 -0
- package/components/{overlay-CwR_36OV.js → overlay-mdk7-NOt.js} +1 -1
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +1 -1
- package/components/picker/picker.d.ts +7 -0
- package/components/{picker-C4RVOxLq.cjs → picker-CssPvvau.cjs} +13 -13
- package/components/{picker-agQW7YNo.js → picker-DOiM_cUu.js} +18 -15
- package/components/prompt-box/index.cjs +1 -1
- package/components/prompt-box/index.js +1 -1
- package/components/{prompt-box-BjjBnJ7C.cjs → prompt-box-6Z5LIjCF.cjs} +1 -1
- package/components/{prompt-box-CCh9aOjY.js → prompt-box-Bj0qIPOy.js} +3 -3
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -1
- package/components/select/select.d.ts +7 -0
- package/components/{select-BNDNv50o.js → select-C2gh8zRr.js} +10 -7
- package/components/{select-L6dKp-qu.cjs → select-qAKOLhmQ.cjs} +6 -6
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +1 -1
- package/components/{tags-DQLiHnTr.js → tags-CBL5oFEo.js} +6 -3
- package/components/{tags-DBD74tKB.cjs → tags-CndS4S2k.cjs} +2 -2
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.js +1 -1
- package/components/tooltip/tooltip.d.ts +30 -2
- package/components/{tooltip-DY1trLtg.cjs → tooltip-6y-g7e9V.cjs} +3 -3
- package/components/{tooltip-C3O4AQ1l.js → tooltip-CVSSKlDP.js} +23 -8
- package/custom-elements.json +1 -1
- package/package.json +1 -1
- package/components/overlay-DdrfkOry.cjs +0 -47
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*! * Lucero - The design system for Luzmo.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2025 Luzmo
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
+
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
+
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
+
*
|
|
10
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
+
* SOFTWARE.
|
|
17
|
+
* */
|
|
18
|
+
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./decorate-B2wePfNm.cjs`),n=require(`./condition-attribute-with-id-DauPaLSS.cjs`),r=require(`./random-id-B51lUxUB.cjs`),i=require(`./element-resolution-C0aiOB0Y.cjs`),a=require(`./slottable-request-event-gAcEQan2.cjs`),o=require(`./focusable-selectors-5n5liBn0.cjs`),s=require(`./platform-B7Sk7Qon.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`);function p(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 m=(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=Array(i),c=Array(i),l=typeof document<`u`?document.createComment(`placeholder for reparented element`):null;do{let i=e[o];r&&(c[o]=r(i)),s[o]=l.cloneNode();let u=i.parentElement||i.getRootNode();u&&u!==i&&u.replaceChild(s[o],i),t.insertAdjacentElement(n,i),o+=a}while(--i>0);return function(){return p(s,e,c)}},h=1e3,g=1e3,_=new class{constructor(e={}){this.warmUpDelay=h,this.coolDownDelay=g,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}},v=()=>{},y=(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 b(){return new Promise(e=>requestAnimationFrame(()=>e()))}var x=class e extends t.n{constructor(...e){super(...e),this.dispose=v,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(()=>Z);let a=arguments.length===2,o=r||t,s=new this,c=!1,l=m([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=v},!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}},S=e=>e.querySelector(o.n),C=e=>e.assignedElements().find(e=>e.matches(o.n)),w=class extends Event{constructor(){super(`beforetoggle`,{bubbles:!1,composed:!1}),this.currentState=`open`,this.newState=`closed`}},T=class extends Event{constructor(){super(`beforetoggle`,{bubbles:!1,composed:!1}),this.currentState=`closed`,this.newState=`open`}},E=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}}},D=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,x.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 O(e){class t extends e{async manageDialogOpen(){let e=this.open;if(await b(),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?T:w;this.dispatchEvent(new i),e&&(n.matches(o.n)&&(t=n),t||=S(n),t||n.querySelectorAll(`slot`).forEach(e=>{t||=C(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 E(r,this,{interaction:this.type,publish:!1}));return}if(!this.isConnected||e!==this.open)return;let i=async()=>{let n=this.triggerElement instanceof D;this.dispatchEvent(new E(r,this,{interaction:this.type,publish:n})),t.dispatchEvent(new E(r,this,{interaction:this.type,publish:!1})),this.triggerElement&&!n&&this.triggerElement.dispatchEvent(new E(r,this,{interaction:this.type,publish:!0})),this.state=e?`opened`:`closed`,this.returnFocus(),await b(),await b(),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)=>{y(e,n(e,t),r(e,t))}),t}dialogApplyFocus(e,t){this.applyFocus(e,t)}}return t}function k(e){class t extends e{async managePopoverOpen(){await this.managePosition()}async manageDelay(e){if(e===!1||e!==this.open){_.close(this);return}this.delayed&&await _.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?T:w;this.dispatchEvent(new t)}e===!0&&(n.matches(o.n)&&(t=n),t||=S(n),!t&&n.querySelectorAll(`slot`).forEach(e=>{t||=C(e)}))}},r=(t,n)=>async()=>{if(this.open!==e)return;let r=e?`luzmo-opened`:`luzmo-closed`;if(t.dispatchEvent(new E(r,this,{interaction:this.type})),n>0)return;let i=this.triggerElement instanceof D;this.dispatchEvent(new E(r,this,{interaction:this.type,publish:i})),this.triggerElement&&!i&&this.triggerElement.dispatchEvent(new E(r,this,{interaction:this.type,publish:!0})),this.state=e?`opened`:`closed`,this.returnFocus(),await b(),await b(),e===this.open&&e===!1&&this.requestSlottable()};return this.elements.forEach((e,t)=>{y(e,n(e,t),r(e,t))}),t}}return t}var ee=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){_.close(this);return}this.delayed&&await _.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){ee||await this.shouldHidePopover(e),this.shouldShowPopover(e),await b()}makeTransition(e){if(this.open!==e)return null;let t=null,n=(n,r)=>()=>{if(n.open=e,r===0){let t=e?T:w;this.dispatchEvent(new t)}e&&(n.matches(o.n)&&(t=n),t||=S(n),!t&&n.querySelectorAll(`slot`).forEach(e=>{t||=C(e)}))},r=(t,n)=>()=>{if(this.open!==e)return;let r=e?`luzmo-opened`:`luzmo-closed`;if(n>0){t.dispatchEvent(new E(r,this,{interaction:this.type,publish:!1}));return}let i=async()=>{if(this.open!==e)return;await b();let n=this.triggerElement instanceof D;this.dispatchEvent(new E(r,this,{interaction:this.type,publish:n})),t.dispatchEvent(new E(r,this,{interaction:this.type,publish:!1})),this.triggerElement&&!n&&this.triggerElement.dispatchEvent(new E(r,this,{interaction:this.type,publish:!0})),this.state=e?`opened`:`closed`,this.returnFocus(),await b(),await b(),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)=>{y(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)}},te=`: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 #00000026)}: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 #00000026)}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter:drop-shadow(0px 2px 6px #00000026)}}@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,I=100,L=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],R=Symbol(`placement updated`),z=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:L(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(I,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)}},B=function(e){return e.click=`click`,e.hover=`hover`,e.longpress=`longpress`,e}({}),V=Symbol(`lastInteractionType`),H=`remove-focus-ring-safari-hack`,U=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[V]=this.type;return}e&&Promise.resolve().then(()=>require(`./overlay/index.cjs`)).then(()=>{this.overlay=document.createElement(`luzmo-overlay`),this.overlay.open=!0,this.target[V]=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()}},W=class extends U{constructor(...e){super(...e),this.type=B.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})}},G=300,K=class extends U{constructor(...e){super(...e),this.type=B.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[V]===B.click){this.target.classList.add(H);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=v}}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=v}}doPointerleave(){this.pointerentered=!1;let e=this.target;this.focusedin&&e.matches(`:focus-visible`)||(this.hoverTimeout=setTimeout(()=>{this.open=!1},G))}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(H)}},q=300,J={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`},Y=class extends U{constructor(...e){super(...e),this.type=B.longpress,this.longpressState=null,this.releaseDescription=v,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`}}))},q)))}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!==v||this.overlay.elements.length===0)return;let t=document.createElement(`div`);t.id=`longpress-describedby-descriptor-${r.t()}`,t.textContent=J[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=v}}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}))}},X={click:W,longpress:Y,hover:K},Z=e.t({LuzmoOverlay:()=>$}),ne=typeof document<`u`&&`showPopover`in document.createElement(`div`),Q=O(x);Q=ne?j(Q):k(Q);var $=class e extends Q{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)(te)]}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 D)}get placementController(){return this._placementController||=new z(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 b(),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 b(),await b(),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 X[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
|
+
<dialog
|
|
20
|
+
class="dialog"
|
|
21
|
+
part="dialog"
|
|
22
|
+
placement=${(0,u.ifDefined)(this.requiresPositioning?this.placement||`right`:void 0)}
|
|
23
|
+
style=${(0,d.styleMap)(this.dialogStyleMap)}
|
|
24
|
+
@close=${this.handleBrowserClose}
|
|
25
|
+
@cancel=${this.handleDialogCancel}
|
|
26
|
+
@beforetoggle=${this.handleBeforetoggle}
|
|
27
|
+
?is-visible=${this.state!==`closed`}
|
|
28
|
+
>
|
|
29
|
+
${this.renderContent()}
|
|
30
|
+
</dialog>
|
|
31
|
+
`}renderPopover(){return c.html`
|
|
32
|
+
<div
|
|
33
|
+
class="dialog"
|
|
34
|
+
part="dialog"
|
|
35
|
+
placement=${(0,u.ifDefined)(this.requiresPositioning?this.placement||`right`:void 0)}
|
|
36
|
+
popover=${(0,u.ifDefined)(this.popoverValue)}
|
|
37
|
+
style=${(0,d.styleMap)(this.dialogStyleMap)}
|
|
38
|
+
@beforetoggle=${this.handleBeforetoggle}
|
|
39
|
+
@close=${this.handleBrowserClose}
|
|
40
|
+
?is-visible=${this.state!==`closed`}
|
|
41
|
+
>
|
|
42
|
+
${this.renderContent()}
|
|
43
|
+
</div>
|
|
44
|
+
`}render(){return c.html`
|
|
45
|
+
${this.type===`modal`||this.type===`page`?this.renderDialog():this.renderPopover()}
|
|
46
|
+
<slot name="longpress-describedby-descriptor"></slot>
|
|
47
|
+
`}connectedCallback(){super.connectedCallback(),this.addEventListener(`close`,()=>{this.open=!1}),this.addEventListener(`luzmo-close`,()=>{this.open=!1}),this.hasUpdated&&this.bindEvents()}disconnectedCallback(){this.strategy?.releaseDescription(),this.open=!1,super.disconnectedCallback()}};t.t([(0,l.property)({type:Boolean})],$.prototype,`delayed`,null),t.t([(0,l.query)(`.dialog`)],$.prototype,`dialogEl`,void 0),t.t([(0,l.property)({type:Boolean})],$.prototype,`disabled`,null),t.t([(0,l.queryAssignedElements)({flatten:!0,selector:`:not([slot="longpress-describedby-descriptor"], slot)`})],$.prototype,`elements`,void 0),t.t([(0,l.property)({type:Number})],$.prototype,`offset`,void 0),t.t([(0,l.property)({type:Boolean,reflect:!0})],$.prototype,`open`,null),t.t([(0,l.property)()],$.prototype,`placement`,void 0),t.t([(0,l.property)({attribute:`receives-focus`})],$.prototype,`receivesFocus`,void 0),t.t([(0,l.query)(`slot`)],$.prototype,`slotEl`,void 0),t.t([(0,l.state)()],$.prototype,`state`,null),t.t([(0,l.property)({type:Number,attribute:`tip-padding`})],$.prototype,`tipPadding`,void 0),t.t([(0,l.property)()],$.prototype,`trigger`,void 0),t.t([(0,l.property)({attribute:!1})],$.prototype,`triggerElement`,void 0),t.t([(0,l.property)({attribute:!1})],$.prototype,`triggerInteraction`,void 0),t.t([(0,l.property)()],$.prototype,`type`,void 0),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return _}});
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* */
|
|
18
18
|
import { n as e, t } from "./decorate-aGxJUVxg.js";
|
|
19
19
|
import { n } from "./slottable-request-event-DZ2Z_BLk.js";
|
|
20
|
-
import { h as r, l as i, r as a, t as o } from "./overlay-
|
|
20
|
+
import { h as r, l as i, r as a, t as o } from "./overlay-BbQuYBxp.js";
|
|
21
21
|
import { html as s, nothing as c, render as l, unsafeCSS as u } from "lit";
|
|
22
22
|
import { property as d, query as f, state as p } from "lit/decorators.js";
|
|
23
23
|
import { AsyncDirective as m, directive as h } from "lit/async-directive.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`});const e=require(`../picker-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../picker-CssPvvau.cjs`);customElements.get(`luzmo-picker`)||customElements.define(`luzmo-picker`,e.n),exports.DESCRIPTION_ID=e.t,exports.LuzmoPicker=e.n,exports.LuzmoPickerBase=e.r;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
e.setAttribute("data-luzmo-vars", ""), e.textContent = "html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: color-mix(in oklch, var(--luzmo-border-color-full), black 25%);--luzmo-border-color-full-down: color-mix(in oklch, var(--luzmo-border-color-full), black 45%);--luzmo-border-color-full-focus: color-mix(in oklch, var(--luzmo-border-color-full), black 25%);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: color-mix(in oklch, var(--luzmo-font-color), black 8%);--luzmo-font-color-down: color-mix(in oklch, var(--luzmo-font-color), black 20%);--luzmo-font-color-focus: color-mix(in oklch, var(--luzmo-font-color), black 8%);--luzmo-primary: #4434ff;--luzmo-primary-hover: color-mix(in oklch, var(--luzmo-primary), black 8%);--luzmo-primary-down: color-mix(in oklch, var(--luzmo-primary), black 20%);--luzmo-primary-focus: color-mix(in oklch, var(--luzmo-primary), black 8%);--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 5%), black 1.5%);--luzmo-background-color-down: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 7%), black 1%);--luzmo-background-color-focus: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 5%), black 1.5%);--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: color-mix(in oklch, var(--luzmo-background-color-highlight), black 10%);--luzmo-background-color-highlight-down: color-mix(in oklch, var(--luzmo-background-color-highlight), black 20%);--luzmo-background-color-highlight-focus: color-mix(in oklch, var(--luzmo-background-color-highlight), black 10%);--luzmo-secondary: #d000d0;--luzmo-secondary-hover: color-mix(in oklch, var(--luzmo-secondary), black 8%);--luzmo-secondary-down: color-mix(in oklch, var(--luzmo-secondary), black 20%);--luzmo-secondary-focus: color-mix(in oklch, var(--luzmo-secondary), black 8%);--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 208, 0, 208;--luzmo-scrollbar-size: 6px;--luzmo-scrollbar-thumb-background: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-scrollbar-thumb-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-hover-background: rgba( var(--luzmo-border-color-rgb), 0.4 );--luzmo-scrollbar-track-background: transparent;--luzmo-scrollbar-track-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-width: thin;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: color-mix(in oklch, var(--luzmo-negative-color), black 8%);--luzmo-negative-color-down: color-mix(in oklch, var(--luzmo-negative-color), black 20%);--luzmo-negative-color-focus: color-mix(in oklch, var(--luzmo-negative-color), black 8%);--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-negative-inverse-color: #ffffff;--luzmo-positive-color: rgb(18, 133, 90);--luzmo-positive-color-hover: color-mix(in oklch, var(--luzmo-positive-color), black 8%);--luzmo-positive-color-down: color-mix(in oklch, var(--luzmo-positive-color), black 20%);--luzmo-positive-color-focus: color-mix(in oklch, var(--luzmo-positive-color), black 8%);--luzmo-positive-color-rgb: 18, 133, 90;--luzmo-positive-inverse-color: #ffffff;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: color-mix(in oklch, var(--luzmo-selected-color), black 25%);--luzmo-selected-color-down: color-mix(in oklch, var(--luzmo-selected-color), black 45%);--luzmo-selected-color-focus: color-mix(in oklch, var(--luzmo-selected-color), black 25%);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: color-mix(in oklch, var(--luzmo-selected-color-hard), black 25%);--luzmo-selected-color-hard-down: color-mix(in oklch, var(--luzmo-selected-color-hard), black 45%);--luzmo-selected-color-hard-focus: color-mix(in oklch, var(--luzmo-selected-color-hard), black 25%);--luzmo-informative-color: #1670dd;--luzmo-informative-color-rgb: 22, 112, 221;--luzmo-notice-color: rgb(229, 127, 0);--luzmo-seafoam-color: rgb(0, 140, 140);--luzmo-indigo-color: rgb(68, 52, 255);--luzmo-purple-color: rgb(112, 48, 210);--luzmo-fuchsia-color: rgb(205, 30, 170);--luzmo-magenta-color: rgb(203, 36, 98);--luzmo-yellow-color: rgb(228, 208, 0);--luzmo-gray-color: rgb(110, 110, 110);--luzmo-red-color: rgb(202, 34, 28);--luzmo-orange-color: rgb(218, 123, 17);--luzmo-chartreuse-color: rgb(85, 135, 0);--luzmo-celery-color: rgb(48, 134, 22);--luzmo-green-color: rgb(18, 133, 90);--luzmo-cyan-color: rgb(0, 134, 180);--luzmo-blue-color: rgb(22, 112, 221);--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 10px;--luzmo-icon-size-xs: 12px;--luzmo-icon-size-s: 14px;--luzmo-icon-size-m: 16px;--luzmo-icon-size-l: 18px;--luzmo-icon-size-xl: 20px;--luzmo-icon-size-xxl: 32px}", document.head.appendChild(e);
|
|
22
22
|
}
|
|
23
23
|
})();
|
|
24
|
-
import { n as e, r as t, t as n } from "../picker-
|
|
24
|
+
import { n as e, r as t, t as n } from "../picker-DOiM_cUu.js";
|
|
25
25
|
//#region src/components/picker/index.ts
|
|
26
26
|
customElements.get("luzmo-picker") || customElements.define("luzmo-picker", e);
|
|
27
27
|
//#endregion
|
|
@@ -128,6 +128,13 @@ export declare class LuzmoPickerBase extends LuzmoPickerBase_base {
|
|
|
128
128
|
protected updated(changes: PropertyValues<this>): void;
|
|
129
129
|
protected firstUpdated(changes: PropertyValues<this>): void;
|
|
130
130
|
protected get dismissHelper(): TemplateResult;
|
|
131
|
+
private _popoverDependencyRegistered;
|
|
132
|
+
/**
|
|
133
|
+
* Register the popover dependency once (from `connectedCallback`), off the
|
|
134
|
+
* render path, so renders never stack `whenDefined` callbacks in the
|
|
135
|
+
* dependency manager.
|
|
136
|
+
*/
|
|
137
|
+
private ensurePopoverDependency;
|
|
131
138
|
protected renderContainer(menu: TemplateResult): TemplateResult;
|
|
132
139
|
protected get renderMenu(): TemplateResult;
|
|
133
140
|
protected shouldScheduleManageSelection(event?: Event): void;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./decorate-B2wePfNm.cjs`),t=require(`./sized-mixin-StFA4y0J.cjs`),n=require(`./focusable-CupEoHmn.cjs`),r=require(`./dependency-manger-CHy9t__e.cjs`),i=require(`./strategies-kuvLVIKO.cjs`),a=require(`./pending-state-DIeF18qg.cjs`);require(`./menu-DAA51y45.cjs`),require(`./overlay-CMd2Dnpv.cjs`),require(`./progress-circle/index.cjs`),require(`./tooltip-DY1trLtg.cjs`);let o=require(`lit`),s=require(`lit/decorators.js`),c=require(`@luzmo/icons`),l=require(`lit/directives/if-defined.js`),u=require(`lit/directives/class-map.js`),d=require(`lit/directives/style-map.js`);var f=`#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}.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 rgba(var(--luzmo-border-color-rgb), .06);--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)))}`,p=()=>o.html`
|
|
18
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./decorate-B2wePfNm.cjs`),t=require(`./sized-mixin-StFA4y0J.cjs`),n=require(`./focusable-CupEoHmn.cjs`),r=require(`./dependency-manger-CHy9t__e.cjs`),i=require(`./strategies-kuvLVIKO.cjs`),a=require(`./pending-state-DIeF18qg.cjs`);require(`./menu-DFKS4sRU.cjs`),require(`./overlay-BGI4wOGe.cjs`),require(`./progress-circle/index.cjs`),require(`./tooltip-6y-g7e9V.cjs`);let o=require(`lit`),s=require(`lit/decorators.js`),c=require(`@luzmo/icons`),l=require(`lit/directives/if-defined.js`),u=require(`lit/directives/class-map.js`),d=require(`lit/directives/style-map.js`);var f=`#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}.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 rgba(var(--luzmo-border-color-rgb), .06);--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)))}`,p=()=>o.html`
|
|
19
19
|
<div class="disclosure-icon icon">
|
|
20
20
|
${(0,c.luzmoIcon)(c.luzmoAngleDown,{className:`indicator`})}
|
|
21
21
|
</div>
|
|
@@ -23,7 +23,7 @@ require(`./chunk-D-qHiVGv.cjs`);const e=require(`./decorate-B2wePfNm.cjs`),t=req
|
|
|
23
23
|
<div class="icon-container validation-icon icon">
|
|
24
24
|
${(0,c.luzmoIcon)(c.luzmoAlert)}
|
|
25
25
|
</div>
|
|
26
|
-
`,h=`option-picker`,g=class extends t.n(n.t,{noDefaultSize:!0}){get selectedItem(){return this._selectedItem}get selectedItemContent(){return this._selectedItemContent||{icon:[],content:[]}}get selfManageFocusElement(){return this._selfManageFocusElement}get menuItems(){return this.optionsMenu.childItems}constructor(){super(),this.disabled=!1,this.focused=!1,this.invalid=!1,this.pending=!1,this.pendingLabel=`Pending`,this.open=!1,this.readonly=!1,this.placement=`bottom-start`,this.quiet=!1,this.value=``,this.selects=`single`,this.dependencyManager=new r.t(this),this.isMobile=new i.r(this,i.n),this.listRole=`listbox`,this.itemRole=`option`,this.hasRenderedOverlay=!1,this._selfManageFocusElement=!1,this.deprecatedMenu=null,this.selectionPromise=Promise.resolve(),this.willManageSelection=!1,this.recentlyConnected=!1,this.enterKeydownOn=null,this.handleSlottableRequest=e=>{},this.applyFocusElementLabel=(e,t)=>{this.appliedLabel=e,this.labelAlignment=t.sideAligned?`inline`:void 0},this.handleEscape=e=>{e.code===`Escape`&&this.open&&(e.stopPropagation(),e.preventDefault(),this.toggle(!1))},this.handleKeydown=e=>{if(this.focused=!0,e.code===`Escape`){this.handleEscape(e);return}e.code!==`ArrowDown`&&e.code!==`ArrowUp`||(e.stopPropagation(),e.preventDefault(),this.toggle(!0))},this.renderAngleIcon=()=>p(),this.renderAlertIcon=()=>m(),this.handleEnterKeydown=e=>{if(e.code===`Enter`){if(this.enterKeydownOn){e.preventDefault();return}this.enterKeydownOn=e.target,this.addEventListener(`keyup`,e=>{e.code===`Enter`&&(this.enterKeydownOn=null)},{once:!0})}},this.pendingStateController=new a.t(this)}set selectedItem(e){let t=e?.querySelector(`[slot="icon"]`);if(this.selectedItemContent=e?e.itemChildren:void 0,e===this.selectedItem)return;let n=this.selectedItem;this._selectedItem=e,this._selectedItemIcon=t?.icon??void 0,this.requestUpdate(`selectedItem`,n)}get focusElement(){return this.open?this.optionsMenu:this.button}forceFocusVisible(){this.disabled||(this.focused=!0)}click(){this.disabled||this.toggle()}handleButtonBlur(){this.focused=!1}focus(e){super.focus(e),!this.disabled&&this.focusElement&&(this.focused=this.hasVisibleFocusInTree())}handleHelperFocus(){this.focused=!0,this.button.focus()}handleChange(e){this.strategy&&(this.strategy.preventNextToggle=`no`);let[t]=e.target.selectedItems;e.stopPropagation(),e.cancelable?this.setValueFromItem(t,e):(this.open=!1,this.strategy&&(this.strategy.open=!1))}handleButtonFocus(e){this.strategy?.handleButtonFocus(e)}toggle(e){this.readonly||this.pending||(this.open=e===void 0?!this.open:e,this.strategy&&(this.strategy.open=this.open),this._selfManageFocusElement=this.open)}close(){this.readonly||this.strategy&&(this.open=!1,this.strategy.open=!1)}bindEvents(){this.strategy?.abort(),this.strategy=new i.t.desktop(this.button,this),this.strategy?.overlay&&(this.strategy.overlay.type=`auto`,this.strategy.overlay.placement=this.placement)}connectedCallback(){super.connectedCallback(),this.recentlyConnected=this.hasUpdated}disconnectedCallback(){this.close(),this.strategy?.releaseDescription(),super.disconnectedCallback()}async setValueFromItem(e,t){this.open=!1,this.strategy&&(this.strategy.open=!1);let n=this.selectedItem,r=this.value;if(this.selectedItem=e,this.value=e?.value??``,await this.updateComplete,!this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,cancelable:!0,composed:!0,detail:this.value}))&&this.selects){t&&t.preventDefault(),this.setMenuItemSelected(this.selectedItem,!1),n&&this.setMenuItemSelected(n,!0),this.selectedItem=n,this.value=r,this.open=!0,this.strategy&&(this.strategy.open=!0);return}else if(!this.selects){this.selectedItem=n,this.value=r;return}n&&this.setMenuItemSelected(n,!1),this.setMenuItemSelected(e,!!this.selects)}setMenuItemSelected(e,t){this.selects!=null&&(e.selected=t)}get containerStyles(){return this.isMobile.matches?{"--swc-menu-width":`100%`}:{}}set selectedItemContent(e){if(e===this.selectedItemContent)return;let t=this.selectedItemContent;this._selectedItemContent=e,this.requestUpdate(`selectedItemContent`,t)}handleTooltipSlotchange(e){this.tooltipEl=e.target.assignedElements()[0]}renderLabelContent(e){return this.value&&this.selectedItem?e:o.html`
|
|
26
|
+
`,h=`option-picker`,g=class extends t.n(n.t,{noDefaultSize:!0}){get selectedItem(){return this._selectedItem}get selectedItemContent(){return this._selectedItemContent||{icon:[],content:[]}}get selfManageFocusElement(){return this._selfManageFocusElement}get menuItems(){return this.optionsMenu.childItems}constructor(){super(),this.disabled=!1,this.focused=!1,this.invalid=!1,this.pending=!1,this.pendingLabel=`Pending`,this.open=!1,this.readonly=!1,this.placement=`bottom-start`,this.quiet=!1,this.value=``,this.selects=`single`,this.dependencyManager=new r.t(this),this.isMobile=new i.r(this,i.n),this.listRole=`listbox`,this.itemRole=`option`,this.hasRenderedOverlay=!1,this._selfManageFocusElement=!1,this.deprecatedMenu=null,this.selectionPromise=Promise.resolve(),this.willManageSelection=!1,this.recentlyConnected=!1,this.enterKeydownOn=null,this.handleSlottableRequest=e=>{},this.applyFocusElementLabel=(e,t)=>{this.appliedLabel=e,this.labelAlignment=t.sideAligned?`inline`:void 0},this.handleEscape=e=>{e.code===`Escape`&&this.open&&(e.stopPropagation(),e.preventDefault(),this.toggle(!1))},this.handleKeydown=e=>{if(this.focused=!0,e.code===`Escape`){this.handleEscape(e);return}e.code!==`ArrowDown`&&e.code!==`ArrowUp`||(e.stopPropagation(),e.preventDefault(),this.toggle(!0))},this.renderAngleIcon=()=>p(),this.renderAlertIcon=()=>m(),this._popoverDependencyRegistered=!1,this.handleEnterKeydown=e=>{if(e.code===`Enter`){if(this.enterKeydownOn){e.preventDefault();return}this.enterKeydownOn=e.target,this.addEventListener(`keyup`,e=>{e.code===`Enter`&&(this.enterKeydownOn=null)},{once:!0})}},this.pendingStateController=new a.t(this)}set selectedItem(e){let t=e?.querySelector(`[slot="icon"]`);if(this.selectedItemContent=e?e.itemChildren:void 0,e===this.selectedItem)return;let n=this.selectedItem;this._selectedItem=e,this._selectedItemIcon=t?.icon??void 0,this.requestUpdate(`selectedItem`,n)}get focusElement(){return this.open?this.optionsMenu:this.button}forceFocusVisible(){this.disabled||(this.focused=!0)}click(){this.disabled||this.toggle()}handleButtonBlur(){this.focused=!1}focus(e){super.focus(e),!this.disabled&&this.focusElement&&(this.focused=this.hasVisibleFocusInTree())}handleHelperFocus(){this.focused=!0,this.button.focus()}handleChange(e){this.strategy&&(this.strategy.preventNextToggle=`no`);let[t]=e.target.selectedItems;e.stopPropagation(),e.cancelable?this.setValueFromItem(t,e):(this.open=!1,this.strategy&&(this.strategy.open=!1))}handleButtonFocus(e){this.strategy?.handleButtonFocus(e)}toggle(e){this.readonly||this.pending||(this.open=e===void 0?!this.open:e,this.strategy&&(this.strategy.open=this.open),this._selfManageFocusElement=this.open)}close(){this.readonly||this.strategy&&(this.open=!1,this.strategy.open=!1)}bindEvents(){this.strategy?.abort(),this.strategy=new i.t.desktop(this.button,this),this.strategy?.overlay&&(this.strategy.overlay.type=`auto`,this.strategy.overlay.placement=this.placement)}connectedCallback(){super.connectedCallback(),this.recentlyConnected=this.hasUpdated,this.ensurePopoverDependency()}disconnectedCallback(){this.close(),this.strategy?.releaseDescription(),super.disconnectedCallback()}async setValueFromItem(e,t){this.open=!1,this.strategy&&(this.strategy.open=!1);let n=this.selectedItem,r=this.value;if(this.selectedItem=e,this.value=e?.value??``,await this.updateComplete,!this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,cancelable:!0,composed:!0,detail:this.value}))&&this.selects){t&&t.preventDefault(),this.setMenuItemSelected(this.selectedItem,!1),n&&this.setMenuItemSelected(n,!0),this.selectedItem=n,this.value=r,this.open=!0,this.strategy&&(this.strategy.open=!0);return}else if(!this.selects){this.selectedItem=n,this.value=r;return}n&&this.setMenuItemSelected(n,!1),this.setMenuItemSelected(e,!!this.selects)}setMenuItemSelected(e,t){this.selects!=null&&(e.selected=t)}get containerStyles(){return this.isMobile.matches?{"--swc-menu-width":`100%`}:{}}set selectedItemContent(e){if(e===this.selectedItemContent)return;let t=this.selectedItemContent;this._selectedItemContent=e,this.requestUpdate(`selectedItemContent`,t)}handleTooltipSlotchange(e){this.tooltipEl=e.target.assignedElements()[0]}renderLabelContent(e){return this.value&&this.selectedItem?e:o.html`
|
|
27
27
|
<slot name="label" id="label">
|
|
28
28
|
<span aria-hidden=${(0,l.ifDefined)(this.appliedLabel?void 0:`true`)}>
|
|
29
29
|
${this.label}
|
|
@@ -40,15 +40,15 @@ require(`./chunk-D-qHiVGv.cjs`);const e=require(`./decorate-B2wePfNm.cjs`),t=req
|
|
|
40
40
|
${this.renderLabelContent(this.selectedItemContent.content)}
|
|
41
41
|
</div>
|
|
42
42
|
${this.value&&this.selectedItem?o.html`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
<div
|
|
44
|
+
aria-hidden="true"
|
|
45
|
+
class="visually-hidden"
|
|
46
|
+
id="applied-label"
|
|
47
|
+
>
|
|
48
|
+
${t}
|
|
49
|
+
<slot name="label"></slot>
|
|
50
|
+
</div>
|
|
51
|
+
`:o.html` <span hidden id="applied-label">${t}</span> `}
|
|
52
52
|
${this.invalid&&!this.pending?o.html` ${this.renderAlertIcon()} `:o.nothing}
|
|
53
53
|
${this.pendingStateController.renderPendingState()}
|
|
54
54
|
${this.readonly?o.nothing:this.renderAngleIcon()}
|
|
@@ -93,9 +93,9 @@ require(`./chunk-D-qHiVGv.cjs`);const e=require(`./decorate-B2wePfNm.cjs`),t=req
|
|
|
93
93
|
@click=${this.close}
|
|
94
94
|
></button>
|
|
95
95
|
</div>
|
|
96
|
-
`}renderContainer(e){let t=o.html`
|
|
96
|
+
`}ensurePopoverDependency(){this._popoverDependencyRegistered||(this._popoverDependencyRegistered=!0,this.dependencyManager.add(`luzmo-popover`),Promise.resolve().then(()=>require(`./popover/index.cjs`)))}renderContainer(e){let t=o.html`
|
|
97
97
|
${this.dismissHelper} ${e} ${this.dismissHelper}
|
|
98
|
-
`;return
|
|
98
|
+
`;return o.html`
|
|
99
99
|
<luzmo-popover
|
|
100
100
|
id="popover"
|
|
101
101
|
size=${this.size}
|
|
@@ -21,10 +21,10 @@ import { t as n } from "./focusable-BmS8IzhH.js";
|
|
|
21
21
|
import { t as r } from "./dependency-manger-DMrulWcJ.js";
|
|
22
22
|
import { n as i, r as a, t as o } from "./strategies-DhxJGIZT.js";
|
|
23
23
|
import { t as s } from "./pending-state-DFcNf5rd.js";
|
|
24
|
-
import "./menu
|
|
25
|
-
import "./overlay-
|
|
24
|
+
import "./menu-Cdz2FEB7.js";
|
|
25
|
+
import "./overlay-mdk7-NOt.js";
|
|
26
26
|
import "./progress-circle/index.js";
|
|
27
|
-
import "./tooltip-
|
|
27
|
+
import "./tooltip-CVSSKlDP.js";
|
|
28
28
|
import { html as c, nothing as l, render as u, unsafeCSS as d } from "lit";
|
|
29
29
|
import { property as f, query as p, state as m } from "lit/decorators.js";
|
|
30
30
|
import { luzmoAlert as h, luzmoAngleDown as g, luzmoIcon as _ } from "@luzmo/icons";
|
|
@@ -67,7 +67,7 @@ var x = "#button{cursor:pointer;-webkit-user-select:none;user-select:none;font-f
|
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
e.code !== "ArrowDown" && e.code !== "ArrowUp" || (e.stopPropagation(), e.preventDefault(), this.toggle(!0));
|
|
70
|
-
}, this.renderAngleIcon = () => S(), this.renderAlertIcon = () => C(), this.handleEnterKeydown = (e) => {
|
|
70
|
+
}, this.renderAngleIcon = () => S(), this.renderAlertIcon = () => C(), this._popoverDependencyRegistered = !1, this.handleEnterKeydown = (e) => {
|
|
71
71
|
if (e.code === "Enter") {
|
|
72
72
|
if (this.enterKeydownOn) {
|
|
73
73
|
e.preventDefault();
|
|
@@ -121,7 +121,7 @@ var x = "#button{cursor:pointer;-webkit-user-select:none;user-select:none;font-f
|
|
|
121
121
|
this.strategy?.abort(), this.strategy = new o.desktop(this.button, this), this.strategy?.overlay && (this.strategy.overlay.type = "auto", this.strategy.overlay.placement = this.placement);
|
|
122
122
|
}
|
|
123
123
|
connectedCallback() {
|
|
124
|
-
super.connectedCallback(), this.recentlyConnected = this.hasUpdated;
|
|
124
|
+
super.connectedCallback(), this.recentlyConnected = this.hasUpdated, this.ensurePopoverDependency();
|
|
125
125
|
}
|
|
126
126
|
disconnectedCallback() {
|
|
127
127
|
this.close(), this.strategy?.releaseDescription(), super.disconnectedCallback();
|
|
@@ -183,15 +183,15 @@ var x = "#button{cursor:pointer;-webkit-user-select:none;user-select:none;font-f
|
|
|
183
183
|
${this.renderLabelContent(this.selectedItemContent.content)}
|
|
184
184
|
</div>
|
|
185
185
|
${this.value && this.selectedItem ? c`
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
186
|
+
<div
|
|
187
|
+
aria-hidden="true"
|
|
188
|
+
class="visually-hidden"
|
|
189
|
+
id="applied-label"
|
|
190
|
+
>
|
|
191
|
+
${t}
|
|
192
|
+
<slot name="label"></slot>
|
|
193
|
+
</div>
|
|
194
|
+
` : c` <span hidden id="applied-label">${t}</span> `}
|
|
195
195
|
${this.invalid && !this.pending ? c` ${this.renderAlertIcon()} ` : l}
|
|
196
196
|
${this.pendingStateController.renderPendingState()}
|
|
197
197
|
${this.readonly ? l : this.renderAngleIcon()}
|
|
@@ -265,11 +265,14 @@ var x = "#button{cursor:pointer;-webkit-user-select:none;user-select:none;font-f
|
|
|
265
265
|
</div>
|
|
266
266
|
`;
|
|
267
267
|
}
|
|
268
|
+
ensurePopoverDependency() {
|
|
269
|
+
this._popoverDependencyRegistered || (this._popoverDependencyRegistered = !0, this.dependencyManager.add("luzmo-popover"), import("./popover/index.js"));
|
|
270
|
+
}
|
|
268
271
|
renderContainer(e) {
|
|
269
272
|
let t = c`
|
|
270
273
|
${this.dismissHelper} ${e} ${this.dismissHelper}
|
|
271
274
|
`;
|
|
272
|
-
return
|
|
275
|
+
return c`
|
|
273
276
|
<luzmo-popover
|
|
274
277
|
id="popover"
|
|
275
278
|
size=${this.size}
|
|
@@ -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`});const e=require(`../prompt-box-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../prompt-box-6Z5LIjCF.cjs`);exports.ELEMENT_MIME_TYPE=e.n,exports.LuzmoPromptBox=e.t;
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
e.setAttribute("data-luzmo-vars", ""), e.textContent = "html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: color-mix(in oklch, var(--luzmo-border-color-full), black 25%);--luzmo-border-color-full-down: color-mix(in oklch, var(--luzmo-border-color-full), black 45%);--luzmo-border-color-full-focus: color-mix(in oklch, var(--luzmo-border-color-full), black 25%);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: color-mix(in oklch, var(--luzmo-font-color), black 8%);--luzmo-font-color-down: color-mix(in oklch, var(--luzmo-font-color), black 20%);--luzmo-font-color-focus: color-mix(in oklch, var(--luzmo-font-color), black 8%);--luzmo-primary: #4434ff;--luzmo-primary-hover: color-mix(in oklch, var(--luzmo-primary), black 8%);--luzmo-primary-down: color-mix(in oklch, var(--luzmo-primary), black 20%);--luzmo-primary-focus: color-mix(in oklch, var(--luzmo-primary), black 8%);--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 5%), black 1.5%);--luzmo-background-color-down: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 7%), black 1%);--luzmo-background-color-focus: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 5%), black 1.5%);--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: color-mix(in oklch, var(--luzmo-background-color-highlight), black 10%);--luzmo-background-color-highlight-down: color-mix(in oklch, var(--luzmo-background-color-highlight), black 20%);--luzmo-background-color-highlight-focus: color-mix(in oklch, var(--luzmo-background-color-highlight), black 10%);--luzmo-secondary: #d000d0;--luzmo-secondary-hover: color-mix(in oklch, var(--luzmo-secondary), black 8%);--luzmo-secondary-down: color-mix(in oklch, var(--luzmo-secondary), black 20%);--luzmo-secondary-focus: color-mix(in oklch, var(--luzmo-secondary), black 8%);--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 208, 0, 208;--luzmo-scrollbar-size: 6px;--luzmo-scrollbar-thumb-background: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-scrollbar-thumb-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-hover-background: rgba( var(--luzmo-border-color-rgb), 0.4 );--luzmo-scrollbar-track-background: transparent;--luzmo-scrollbar-track-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-width: thin;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: color-mix(in oklch, var(--luzmo-negative-color), black 8%);--luzmo-negative-color-down: color-mix(in oklch, var(--luzmo-negative-color), black 20%);--luzmo-negative-color-focus: color-mix(in oklch, var(--luzmo-negative-color), black 8%);--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-negative-inverse-color: #ffffff;--luzmo-positive-color: rgb(18, 133, 90);--luzmo-positive-color-hover: color-mix(in oklch, var(--luzmo-positive-color), black 8%);--luzmo-positive-color-down: color-mix(in oklch, var(--luzmo-positive-color), black 20%);--luzmo-positive-color-focus: color-mix(in oklch, var(--luzmo-positive-color), black 8%);--luzmo-positive-color-rgb: 18, 133, 90;--luzmo-positive-inverse-color: #ffffff;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: color-mix(in oklch, var(--luzmo-selected-color), black 25%);--luzmo-selected-color-down: color-mix(in oklch, var(--luzmo-selected-color), black 45%);--luzmo-selected-color-focus: color-mix(in oklch, var(--luzmo-selected-color), black 25%);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: color-mix(in oklch, var(--luzmo-selected-color-hard), black 25%);--luzmo-selected-color-hard-down: color-mix(in oklch, var(--luzmo-selected-color-hard), black 45%);--luzmo-selected-color-hard-focus: color-mix(in oklch, var(--luzmo-selected-color-hard), black 25%);--luzmo-informative-color: #1670dd;--luzmo-informative-color-rgb: 22, 112, 221;--luzmo-notice-color: rgb(229, 127, 0);--luzmo-seafoam-color: rgb(0, 140, 140);--luzmo-indigo-color: rgb(68, 52, 255);--luzmo-purple-color: rgb(112, 48, 210);--luzmo-fuchsia-color: rgb(205, 30, 170);--luzmo-magenta-color: rgb(203, 36, 98);--luzmo-yellow-color: rgb(228, 208, 0);--luzmo-gray-color: rgb(110, 110, 110);--luzmo-red-color: rgb(202, 34, 28);--luzmo-orange-color: rgb(218, 123, 17);--luzmo-chartreuse-color: rgb(85, 135, 0);--luzmo-celery-color: rgb(48, 134, 22);--luzmo-green-color: rgb(18, 133, 90);--luzmo-cyan-color: rgb(0, 134, 180);--luzmo-blue-color: rgb(22, 112, 221);--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 10px;--luzmo-icon-size-xs: 12px;--luzmo-icon-size-s: 14px;--luzmo-icon-size-m: 16px;--luzmo-icon-size-l: 18px;--luzmo-icon-size-xl: 20px;--luzmo-icon-size-xxl: 32px}", document.head.appendChild(e);
|
|
22
22
|
}
|
|
23
23
|
})();
|
|
24
|
-
import { n as e, t } from "../prompt-box-
|
|
24
|
+
import { n as e, t } from "../prompt-box-Bj0qIPOy.js";
|
|
25
25
|
export { e as ELEMENT_MIME_TYPE, t as LuzmoPromptBox };
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./decorate-B2wePfNm.cjs`),t=require(`./sized-mixin-StFA4y0J.cjs`);require(`./icon-B7hKwn_q.cjs`),require(`./action-button-Cr_QN4On.cjs`);const n=require(`./overlay-
|
|
18
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./decorate-B2wePfNm.cjs`),t=require(`./sized-mixin-StFA4y0J.cjs`);require(`./icon-B7hKwn_q.cjs`),require(`./action-button-Cr_QN4On.cjs`);const n=require(`./overlay-DU_p8MNs.cjs`);require(`./overlay-BGI4wOGe.cjs`),require(`./button-C5hcfigl.cjs`),require(`./text-field-A4Obzs4l.cjs`),require(`./tags-CndS4S2k.cjs`);const r=require(`./voice-recorder-BUtmSvPO.cjs`);let i=require(`lit`),a=require(`lit/decorators.js`),o=require(`@luzmo/icons`);var s=class{constructor(e){this._attachments=[],this._idCounter=0,this._host=e,e.addController(this)}hostConnected(){}hostDisconnected(){this._revokeAllPreviewUrls()}get attachments(){return this._attachments}get hasAttachments(){return this._attachments.length>0}get imageAttachments(){return this._attachments.filter(e=>this._isImageFile(e.file))}get fileAttachments(){return this._attachments.filter(e=>!this._isImageFile(e.file))}addFiles(e){if(this._host.disabled||this._host.readonly||this._host.pending)return[];let t=[];for(let n of e){if(this._isImageFile(n)&&!this._host.allowImages||!this._isImageFile(n)&&!this._host.allowFiles||!this._isFileTypeAccepted(n))continue;let e=this._generateId(),r={file:n,id:e};this._isImageFile(n)&&(r.previewUrl=URL.createObjectURL(n)),this._attachments=[...this._attachments,r],t.push(e)}return t.length>0&&(this._dispatchChange(),this._host.requestUpdate()),t}removeAttachment(e){let t=this._attachments.find(t=>t.id===e);t&&(t.previewUrl&&URL.revokeObjectURL(t.previewUrl),this._attachments=this._attachments.filter(t=>t.id!==e),this._dispatchChange(),this._host.requestUpdate())}clearAttachments(){this._revokeAllPreviewUrls(),this._attachments=[],this._dispatchChange(),this._host.requestUpdate()}getAttachments(){return[...this._attachments]}handlePastedImages(e){if(!this._host.allowImages||this._host.disabled||this._host.readonly||this._host.pending||!e)return!1;let t=[];for(let n of e.items)if(n.type.startsWith(`image/`)){let e=n.getAsFile();e&&t.push(e)}return t.length>0?(this.addFiles(t),!0):!1}getAcceptAttribute(){if(this._host.acceptedFileTypes.length>0)return this._host.acceptedFileTypes.join(`,`);let e=[];return this._host.allowImages&&e.push(`image/*`),this._host.allowFiles&&e.push(`*/*`),e.join(`,`)}isImageFile(e){return this._isImageFile(e)}_isImageFile(e){return e.type.startsWith(`image/`)}_isFileTypeAccepted(e){if(this._host.acceptedFileTypes.length===0)return!0;let t=e.name.toLowerCase(),n=e.type.toLowerCase();for(let e of this._host.acceptedFileTypes){let r=e.toLowerCase();if(r.endsWith(`/*`)){let e=r.slice(0,-2);if(n.startsWith(e+`/`))return!0}else if(n===r)return!0;else if(r.startsWith(`.`)&&t.endsWith(r))return!0}return!1}_generateId(){return`attachment-${++this._idCounter}-${Date.now()}`}_revokeAllPreviewUrls(){for(let e of this._attachments)e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}_dispatchChange(){this._host.dispatchEvent(new CustomEvent(`luzmo-attachments-change`,{bubbles:!0,composed:!0,detail:{attachments:this._attachments}}))}},c=class{constructor(e){this._voiceRecorder=null,this.isRecording=!1,this.duration=0,this.audioLevel=0,this.shouldFocusFinishButton=!1,this._host=e,e.addController(this)}hostConnected(){}hostDisconnected(){this._destroy()}async start(e){if(!r.t.isSupported()){this._host.dispatchEvent(new CustomEvent(`luzmo-record-error`,{bubbles:!0,composed:!0,detail:{error:`Voice recording is not supported in this browser`}}));return}if(this.isRecording){this.stop();return}this.shouldFocusFinishButton=e,this._init(),this._voiceRecorder&&(await this._voiceRecorder.startRecording()&&(this.isRecording=!0,this.duration=0,this.audioLevel=0,this._host.requestUpdate()),this._host.dispatchEvent(new CustomEvent(`luzmo-record`,{bubbles:!0,composed:!0,detail:{isRecording:this.isRecording}})))}stop(){this._voiceRecorder?.stopRecording()}cancel(){this._voiceRecorder?.cancelRecording(),this.isRecording=!1,this.duration=0,this.audioLevel=0,this._host.requestUpdate(),this._host.dispatchEvent(new CustomEvent(`luzmo-record-cancel`,{bubbles:!0,composed:!0}))}formatDuration(){return r.t.formatDuration(this.duration)}static isSupported(){return r.t.isSupported()}_init(){this._voiceRecorder||(this._voiceRecorder=new r.t({maxDuration:3e5}),this._voiceRecorder.onStart(()=>{this.isRecording=!0,this._host.requestUpdate()}).onStop(e=>{this.isRecording=!1,this.duration=0,this.audioLevel=0,this._host.requestUpdate(),this._host.dispatchEvent(new CustomEvent(`luzmo-recording-complete`,{bubbles:!0,composed:!0,detail:{audioBlob:e.audioBlob,duration:e.duration,mimeType:e.mimeType}}))}).onError(e=>{this.isRecording=!1,this.duration=0,this.audioLevel=0,this._host.requestUpdate(),this._host.dispatchEvent(new CustomEvent(`luzmo-record-error`,{bubbles:!0,composed:!0,detail:{error:e}}))}).onAudioLevel(e=>{this.audioLevel=e,this._host.requestUpdate()}).onDurationUpdate(e=>{this.duration=e,this._host.requestUpdate()}))}_destroy(){this._voiceRecorder&&=(this._voiceRecorder.destroy(),null),this.isRecording=!1,this.duration=0,this.audioLevel=0}};function l(e,t){let n=document.createRange();return n.setStart(e,t),n.collapse(!0),n}function u(e,t,n){let r=e.getBoundingClientRect(),i=t-r.left,a=n-r.top;return i*i+a*a}function d(e,t,n,r){let i=0,a=t;for(;a-i>1;){let t=i+a>>>1,r=document.createRange();r.setStart(e,t),r.collapse(!0),r.getBoundingClientRect().left<n?i=t:a=t}let o=l(e,i),s=u(o,n,r),c=l(e,a),d=u(c,n,r);return d<s&&(o=c,s=d),{range:o,distSq:s}}function f(e,t,n,r){let i=null,a=1/0;for(let[o,s]of e.childNodes.entries())if(s!==r){if(s.nodeType===Node.TEXT_NODE){let e=(s.textContent??``).length;if(e===0)continue;let r=d(s,e,t,n);r.distSq<a&&(a=r.distSq,i=r.range)}else if(s.nodeType===Node.ELEMENT_NODE){let r=s.getBoundingClientRect();if(r.width===0&&r.height===0)continue;let c=r.left+r.width/2,u=l(e,o),d=l(e,o+1),f=t<c?u:d,p=n-(r.top+r.height/2),m=t<c?t-r.left:t-r.right,h=m*m+p*p;h<a&&(a=h,i=f)}}if(!i){let t=document.createRange();return t.selectNodeContents(e),t.collapse(!1),t}return i}function p(e,t,n,r,i){if(Number.isNaN(n)||Number.isNaN(r))return null;let a=null,o=e;if(o?.caretPositionFromPoint){let e=o.caretPositionFromPoint(n,r);e&&(a=l(e.offsetNode,e.offset))}else o?.caretRangeFromPoint&&(a=o.caretRangeFromPoint(n,r));if(!a)if(`caretPositionFromPoint`in document){let e=document.caretPositionFromPoint(n,r);e&&(a=l(e.offsetNode,e.offset))}else `caretRangeFromPoint`in document&&(a=document.caretRangeFromPoint(n,r));return(!a||!t.contains(a.startContainer))&&(a=f(t,n,r,i)),a}function m(e){if(e){let t=e.getSelection?.();if(t&&t.rangeCount>0)return t.getRangeAt(0)}let t=document.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0);if(!e||e.contains(n.startContainer))return n;let r=t;if(e&&r.getComposedRanges)try{let t=r.getComposedRanges(e);if(t.length>0){let e=t[0],n=document.createRange();return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}}catch{}return null}function h(e,t){let n=document.getSelection();if(n)try{n.setBaseAndExtent(e,t,e,t)}catch{let r=document.createRange();r.setStart(e,t),r.collapse(!0),n.removeAllRanges(),n.addRange(r)}}function g(e){return e===` `||e===`
|
|
19
19
|
`||e===`\xA0`}function ee(e){let t=m(e);if(!t||!t.collapsed)return!1;let n=t.startContainer,r=t.startOffset;if(n.nodeType===Node.TEXT_NODE){if(r>=2)return g(n.textContent?.charAt(r-2)??``);let e=n.previousSibling;if(!e||e.nodeType===Node.ELEMENT_NODE&&e.classList?.contains(`element-badge`))return!0;let t=e.textContent??``;return t.length===0?!0:g(t.at(-1)??``)}if(n.nodeType===Node.ELEMENT_NODE){if(r===0)return!0;let e=n.childNodes[r-1];if(!e||e.nodeType===Node.ELEMENT_NODE&&e.classList?.contains(`element-badge`))return!0;if(e.nodeType===Node.TEXT_NODE){let t=e.textContent??``;return t.length===0?!0:g(t.at(-1)??``)}}return!1}function _(e,t){let n=m(e);if(!n){if(!t)return null;let e=t.getBoundingClientRect();return{x:e.left,y:e.bottom}}let r=n.cloneRange();r.collapse(!0);let i=r.startContainer,a=r.startOffset;if(i.nodeType===Node.TEXT_NODE&&a>0){let e=document.createRange();e.setStart(i,a-1),e.setEnd(i,a);let t=e.getBoundingClientRect();if(t.width>0||t.height>0)return{x:t.left,y:t.bottom}}let o=r.getBoundingClientRect();if(o.width===0&&o.height===0&&o.x===0){if(t){let e=t.getBoundingClientRect();return{x:e.left,y:e.bottom}}return null}return{x:o.left,y:o.bottom}}function v(e,t){let n=m(e);if(!n||!n.collapsed)return null;let r=n.startContainer,i=n.startOffset;if(r.nodeType!==Node.TEXT_NODE)return null;let a=(r.textContent??``).slice(0,Math.max(0,i)),o=a.lastIndexOf(t);return o===-1?null:a.slice(Math.max(0,o+1))}function y(e,t){if(e.focus(),!t)return;let n=e.querySelector(`[data-element-id="${t}"]`);if(!n)return;let r=n.nextSibling;if(r&&r.nodeType===Node.TEXT_NODE){let e=r.textContent??``,t=e.indexOf(` `);h(r,t===-1?e.length:t+1);return}let i=document.getSelection();if(!i)return;let a=document.createRange();a.setStartAfter(n),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}function b(e,t,n,r){let i=m(e);if(i){let e=i.startContainer,r=i.startOffset;if(e.nodeType===Node.TEXT_NODE&&t.contains(e)){let t=e.textContent??``,i=t.slice(0,Math.max(0,r)).lastIndexOf(n);if(i!==-1){e.textContent=t.slice(0,Math.max(0,i))+t.slice(Math.max(0,r)),h(e,i);return}}}let a=n+(r??``),o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),s;for(;s=o.nextNode();){let e=s.textContent??``,n=e.lastIndexOf(a);if(n!==-1){s.textContent=e.slice(0,Math.max(0,n))+e.slice(Math.max(0,n+a.length)),t.focus(),h(s,n);return}}}var x=`application/x-luzmo-element`,S=class{constructor(e){this._elements=new Map,this._idCounter=0,this._dragCaret=null,this.isDragOver=!1,this.richInputElement=null,this.handleRichInput=()=>{this.syncValue(),this._host.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))},this.handleRichPaste=e=>{if(e.preventDefault(),this._cannotEditRichContent())return;if(this._host.allowImages&&e.clipboardData&&this._host.handlePastedImages(e.clipboardData)){e.stopPropagation();return}let t=e.clipboardData?.getData(`text/plain`)??``;if(t){let e=m(this._host.shadowRoot);if(e){e.deleteContents(),e.insertNode(document.createTextNode(t)),e.collapse(!1);let n=document.getSelection();n&&(n.removeAllRanges(),n.addRange(e))}this.syncValue(),this._host.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))}},this.handleRichDragOver=e=>{this._cannotEditRichContent()||e.dataTransfer?.types.includes(`application/x-luzmo-element`)&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`copy`),this.isDragOver=!0,this._host.requestUpdate(),this._positionCaretAtPoint(e.clientX,e.clientY),this._showDragCaret(e.clientX,e.clientY))},this.handleRichDragLeave=e=>{let t=e.relatedTarget;(!t||!this.richInputElement?.contains(t))&&(this.isDragOver=!1,this._hideDragCaret(),this._host.requestUpdate())},this.handleRichDrop=e=>{if(e.preventDefault(),this.isDragOver=!1,this._hideDragCaret(),this._cannotEditRichContent()){this._host.requestUpdate();return}let t=e.dataTransfer?.getData(x);if(!t){this._host.requestUpdate();return}try{let n=JSON.parse(t);if(n.elementType&&n.label){this.richInputElement?.focus();let t=this.richInputElement?p(this._host.shadowRoot,this.richInputElement,e.clientX,e.clientY,this._dragCaret):null;this._insertElementAtRange(n.elementType,n.label,n.data??null,void 0,t)}this._host.requestUpdate()}catch{this._host.requestUpdate()}},this._host=e,e.addController(this)}hostConnected(){}hostDisconnected(){}get elements(){return this._elements}get elementCount(){return this._elements.size}getSegments(){return!this._host.allowElements||!this.richInputElement?[{type:`text`,value:this._host.value}]:this._parseSegments()}setSegments(e){if(!this._host.allowElements){this._host.value=this._segmentsToPlainText(e);return}this._elements.clear(),this._host.updateComplete.then(()=>{if(this.richInputElement){this.richInputElement.innerHTML=``;for(let t of e)if(t.type===`text`&&t.value)this.richInputElement.append(document.createTextNode(t.value));else if(t.type===`element`&&t.value){let e={...t.value};e.id||=this._generateId(),this._elements.set(e.id,e),this.richInputElement.append(this._createBadgeNode(e))}this.syncValue()}})}insertElement(e,t,n,r){return this._insertElementAtRange(e,t,n,r,null)}_insertElementAtRange(e,t,n,r,i){if(this._cannotEditRichContent()||this._host.acceptedElementTypes.length>0&&!this._host.acceptedElementTypes.includes(e)||!this.richInputElement)return``;let a=this._generateId(),o={id:a,elementType:e,label:t,data:n,icon:r};this._elements.set(a,o);let s=this._createBadgeNode(o),c=this.richInputElement,l=!1,u=i===null?this._getSelectionRange():i;if(u&&c.contains(u.commonAncestorContainer)){u.deleteContents(),u.insertNode(s);let e=s.previousSibling;if(e?.nodeType===Node.TEXT_NODE){let t=e.previousSibling;t?.classList?.contains(`element-badge`)&&this._ensureSpaceAfter(t)}this._ensureSpaceAfter(s),y(c,a),l=!0}return l||(c.append(s),this._ensureSpaceAfter(s),y(c,a)),this.syncValue(),this._host.dispatchEvent(new CustomEvent(`luzmo-element-inserted`,{bubbles:!0,composed:!0,detail:{element:o}})),a}_getSelectionRange(){return m(this._host.shadowRoot)}removeElement(e){let t=this._elements.get(e);if(!t)return;this._elements.delete(e);let n=this.richInputElement?.querySelector(`[data-element-id="${e}"]`);if(n){let e=n.nextSibling;if(n.remove(),e&&e.nodeType===Node.TEXT_NODE){let t=(e.textContent??``).replaceAll(``,``);t?e.textContent=t:e.remove()}this.syncValue()}this._host.dispatchEvent(new CustomEvent(`luzmo-element-removed`,{bubbles:!0,composed:!0,detail:{element:t}}))}getElements(){return[...this._elements.values()]}clearElements(){this._elements.clear(),this.richInputElement&&(this.richInputElement.innerHTML=``)}handleBadgeDelete(e){let t=m(this._host.shadowRoot);if(!t||!t.collapsed)return!1;let n=e===`Backspace`?this._findBadgeBefore(t.startContainer,t.startOffset):e===`Delete`?this._findBadgeAfter(t.startContainer,t.startOffset):null;return n?.dataset.elementId?(this.removeElement(n.dataset.elementId),!0):!1}_findBadgeBefore(e,t){if(e.nodeType===Node.ELEMENT_NODE){let n=e.childNodes[t-1];if(n?.classList?.contains(`element-badge`))return n}else if(e.nodeType===Node.TEXT_NODE)if(t===0){let t=e.previousSibling;if(t?.classList?.contains(`element-badge`))return t}else{let n=(e.textContent??``).slice(0,t);if(/^[\u200B\uFEFF]*$/.test(n)){let t=e.previousSibling;if(t?.classList?.contains(`element-badge`))return t}}return null}_findBadgeAfter(e,t){if(e.nodeType===Node.ELEMENT_NODE){let n=e.childNodes[t];if(n?.classList?.contains(`element-badge`))return n}else if(e.nodeType===Node.TEXT_NODE){let n=e.textContent??``;if(t===n.length){let t=e.nextSibling;if(t?.classList?.contains(`element-badge`))return t}else{let r=n.slice(t);if(/^[\u200B\uFEFF]*$/.test(r)){let t=e.nextSibling;if(t?.classList?.contains(`element-badge`))return t}}}return null}_segmentsToPlainText(e){return e.map(e=>e.type===`text`?e.value??``:e.value?.label??``).join(``)}_cannotEditRichContent(){return!this._host.allowElements||this._host.disabled||this._host.readonly||this._host.pending}_cleanupSemanticallyEmptyRichInput(e){let t=this.richInputElement;if(!t)return;let n=this._elements.size===0&&e.trim().length===0,r=this._dragCaret?.parentNode===t;!n||r||t.innerHTML===``||(t.innerHTML=``,this._host.value=``)}syncValue(){if(!this.richInputElement)return;let e=this._parseSegments(),t=this._segmentsToPlainText(e);this._host.value=t,this._cleanupSemanticallyEmptyRichInput(t),this._host.requestUpdate()}_parseSegments(){if(!this.richInputElement)return[];let e=[];for(let t of this.richInputElement.childNodes)if(t.nodeType===Node.TEXT_NODE){let n=(t.textContent??``).replaceAll(``,``);n&&e.push({type:`text`,value:n})}else if(t.nodeType===Node.ELEMENT_NODE){let n=t;if(n.classList.contains(`drag-caret`))continue;if(n.classList.contains(`element-badge`)){let t=n.dataset.elementId??``,r=this._elements.get(t);r&&e.push({type:`element`,value:{...r}})}else if(n.tagName===`BR`)e.push({type:`text`,value:`
|
|
20
20
|
`});else{let t=n.textContent??``;t&&e.push({type:`text`,value:t})}}return e}_createBadgeNode(e){let t=document.createElement(`span`);if(t.className=`element-badge`,t.setAttribute(`contenteditable`,`false`),t.dataset.elementId=e.id,t.dataset.elementType=e.elementType,e.icon){let n=document.createElement(`luzmo-icon`);n.icon=e.icon,n.setAttribute(`size`,`xxs`),n.className=`element-badge-icon`,t.append(n)}let n=document.createElement(`span`);n.className=`element-badge-label`,n.textContent=e.label,t.append(n);let r=document.createElement(`button`);return r.type=`button`,r.setAttribute(`role`,`button`),r.tabIndex=-1,r.className=`element-badge-remove`,r.setAttribute(`contenteditable`,`false`),r.setAttribute(`aria-label`,`Remove ${e.label}`),r.textContent=`×`,r.addEventListener(`click`,t=>{t.preventDefault(),t.stopPropagation(),this.removeElement(e.id)}),t.append(r),t}_ensureSpaceAfter(e){let t=e.nextSibling;if(t&&t.nodeType===Node.TEXT_NODE&&t.textContent){let e=t.textContent;if(e.startsWith(``)&&e.length>1)return;if(e.startsWith(` `)){t.textContent=``+e;return}if(/^\u200B+$/.test(e)){t.textContent=e+` `;return}}e.parentNode?.insertBefore(document.createTextNode(` `),t??null)}_showDragCaret(e,t){if(!this.richInputElement){this._hideDragCaret();return}let n=p(this._host.shadowRoot,this.richInputElement,e,t,this._dragCaret);if(!n){this._hideDragCaret();return}let r=n.getBoundingClientRect(),i=this.richInputElement.getBoundingClientRect(),a=r.left-i.left+this.richInputElement.scrollLeft,o=r.top-i.top+this.richInputElement.scrollTop,s=r.height;if(s===0){let e=getComputedStyle(this.richInputElement);s=Number.parseFloat(e.lineHeight)||Number.parseFloat(e.fontSize)||16,o=t-i.top+this.richInputElement.scrollTop-s/2}this._dragCaret||(this._dragCaret=document.createElement(`div`),this._dragCaret.className=`drag-caret`);let c=this._dragCaret;c.style.position=`absolute`,c.style.top=`${o}px`,c.style.left=`${a}px`,c.style.height=`${s}px`,c.parentNode||(this.richInputElement.style.position=`relative`,this.richInputElement.append(c))}_hideDragCaret(){this._dragCaret?.remove()}_generateId(){return`el-${++this._idCounter}-${Date.now()}`}_positionCaretAtPoint(e,t){if(!this.richInputElement)return;let n=p(this._host.shadowRoot,this.richInputElement,e,t,this._dragCaret);if(n){let e=document.getSelection();e&&(e.removeAllRanges(),e.addRange(n))}}},C=class{constructor(e){this._triggers=[],this.activeTrigger=null,this.searchString=``,this.virtualElement=null,this.highlightedIndex=0,this.pointerMovedSinceKeyNav=!0,this.hoveredIndex=-1,this.filteredOptions=[],this.richInputElement=null,this.handleOverlayClosed=()=>{this.close()},this.handleOverlayKeydown=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),this.close(),this.richInputElement?.focus())},this.handlePointerMove=()=>{this.pointerMovedSinceKeyNav=!0},this._handleTriggerSelect=e=>{if(!this.activeTrigger)return;let{elementType:t,label:n,data:r,icon:i}=e.detail;this.selectOption({label:n,value:n,data:r,icon:i,elementType:t})},this._handleDocumentPointerDown=e=>{let t=e.composedPath(),n=this._host.shadowRoot?.querySelector(`luzmo-overlay[part="trigger-menu-overlay"]`);n&&t.includes(n)||this.richInputElement&&t.includes(this.richInputElement)||(this.close(),this.richInputElement?.focus())},this._host=e,e.addController(this)}hostConnected(){this._host.addEventListener(`luzmo-trigger-select`,this._handleTriggerSelect)}hostDisconnected(){document.removeEventListener(`pointerdown`,this._handleDocumentPointerDown,!0),this._host.removeEventListener(`luzmo-trigger-select`,this._handleTriggerSelect)}get triggers(){return this._triggers}set triggers(e){this._triggers=e,this.activeTrigger&&this._updateFilteredOptions()}get activeConfig(){if(this.activeTrigger)return this._triggers.find(e=>e.key===this.activeTrigger)}get hasTriggers(){return this._triggers.length>0}getSlotName(e){return this._triggers.find(t=>t.key===e)?.slotName}get allSlotNames(){return this._triggers.map(e=>e.slotName).filter(e=>!!e)}handleInput(e){if(this.activeTrigger){let e=v(this._host.shadowRoot,this.activeTrigger)??this._extractTriggerSearchFromContent(this.activeTrigger);e===null?this.close():(this.searchString=e,this._updateFilteredOptions(),this.highlightedIndex=this._findSelectableIndex(0,1),this._dispatchChange(!0),this._host.requestUpdate(),document.dispatchEvent(new Event(`luzmo-update-overlays`)))}else this._detectTrigger(e)}open(e){if(!this._triggers.find(t=>t.key===e))return;let t=_(this._host.shadowRoot,this.richInputElement);if(!t)return;this.activeTrigger=e,this.searchString=``,this._updateFilteredOptions(),this.highlightedIndex=this._findSelectableIndex(0,1);let r=this.richInputElement?.getBoundingClientRect().top??t.y;this.virtualElement?this.virtualElement.updateBoundingClientRect(t.x,t.y,r):this.virtualElement=new n.m(t.x,t.y,r),this._dispatchChange(!0),this._host.requestUpdate(),requestAnimationFrame(()=>{document.addEventListener(`pointerdown`,this._handleDocumentPointerDown,!0)})}close(){if(this.activeTrigger===null)return;document.removeEventListener(`pointerdown`,this._handleDocumentPointerDown,!0);let e=this.activeTrigger;this.activeTrigger=null,this.searchString=``,this.filteredOptions=[],this.highlightedIndex=0,this.hoveredIndex=-1,this._host.dispatchEvent(new CustomEvent(`luzmo-trigger-change`,{bubbles:!0,composed:!0,detail:{trigger:e,open:!1,searchString:``}})),this._host.requestUpdate()}handleKeydown(e){return this.activeTrigger?e.key===`Escape`?(e.preventDefault(),this.close(),this.richInputElement?.focus(),!0):e.key===`Tab`?(this.close(),!1):e.key===`ArrowDown`?(e.preventDefault(),this._moveHighlight(1),!0):e.key===`ArrowUp`?(e.preventDefault(),this._moveHighlight(-1),!0):e.key===`Enter`&&!e.shiftKey?(e.preventDefault(),this._selectHighlighted(),!0):!1:!1}_detectTrigger(e){if(this._host.disabled||this._host.readonly||this._host.pending)return;let t=e?.data??``;t.length!==1||!this._isTriggerKey(t)||ee(this._host.shadowRoot)&&this.open(t)}_extractTriggerSearchFromContent(e){let t=this.richInputElement?.textContent??``;if(!t)return null;let n=t.lastIndexOf(e);if(n===-1)return null;let r=t.slice(n+1);return r.includes(` `)||r.includes(`
|
|
21
21
|
`)?null:r}_isTriggerKey(e){return this._triggers.some(t=>t.key===e)}_updateFilteredOptions(){let e=this.activeConfig;if(!e?.options){this.filteredOptions=[];return}if(e.lazy){this.filteredOptions=e.options;return}if(!this.searchString){this.filteredOptions=e.options;return}let t=this.searchString.toLowerCase(),n=[],r=null;for(let i of e.options){if(i.header){r=i;continue}(i.label.toLowerCase().includes(t)||(i.description?.toLowerCase().includes(t)??!1))&&(r&&=(n.push(r),null),n.push(i))}this.filteredOptions=n}_findSelectableIndex(e,t){let n=this.filteredOptions.length;if(n===0)return-1;let r=(e%n+n)%n;for(let e=0;e<n;e++){if(!this.filteredOptions[r].header)return r;r=((r+t)%n+n)%n}return-1}_moveHighlight(e){let t=this.filteredOptions.length;if(t===0)return;let n=(this.highlightedIndex+e+t)%t;n=this._findSelectableIndex(n,e),n!==-1&&(this.pointerMovedSinceKeyNav=!1,this.hoveredIndex=-1,this.highlightedIndex=n,this._host.requestUpdate(),requestAnimationFrame(()=>{this._host.shadowRoot?.querySelector(`.trigger-option.highlighted`)?.scrollIntoView({block:`nearest`})}))}_selectHighlighted(){let e=this.filteredOptions[this.highlightedIndex];if(!e){this.close();return}this.selectOption(e)}selectOption(e){if(!this.activeTrigger||!this.richInputElement)return;let t=this.activeTrigger,n=this.richInputElement,r=this._host.shadowRoot;b(r,n,t,this.searchString);let i=e.elementType??t,a=this._host.insertElement(i,e.label,e.data??null,e.icon);y(n,a),this.close(),this._host.updateComplete.then(()=>{requestAnimationFrame(()=>{y(n,a)})})}_dispatchChange(e){this.activeTrigger&&this._host.dispatchEvent(new CustomEvent(`luzmo-trigger-change`,{bubbles:!0,composed:!0,detail:{trigger:this.activeTrigger,open:e,searchString:this.searchString}}))}},w=!1,T=0;function E(){w=!0}function D(){w=!1}function O(){document.addEventListener(`keydown`,E,!0),document.addEventListener(`mousedown`,D,!0),document.addEventListener(`pointerdown`,D,!0)}function k(){document.removeEventListener(`keydown`,E,!0),document.removeEventListener(`mousedown`,D,!0),document.removeEventListener(`pointerdown`,D,!0)}function A(){T===0&&typeof window<`u`&&O(),T++}function j(){T--,T<=0&&(T=0,k())}function M(){return w}function N(e,t,n){return i.html`
|
|
@@ -19,11 +19,11 @@ import { n as e, t } from "./decorate-aGxJUVxg.js";
|
|
|
19
19
|
import { n } from "./sized-mixin-DaBoZkVS.js";
|
|
20
20
|
import "./icon-CwBAE1eU.js";
|
|
21
21
|
import "./action-button-DC-ZFZTm.js";
|
|
22
|
-
import { m as r } from "./overlay-
|
|
23
|
-
import "./overlay-
|
|
22
|
+
import { m as r } from "./overlay-BbQuYBxp.js";
|
|
23
|
+
import "./overlay-mdk7-NOt.js";
|
|
24
24
|
import "./button-D1a4B85S.js";
|
|
25
25
|
import "./text-field-BoGAvXvh.js";
|
|
26
|
-
import "./tags-
|
|
26
|
+
import "./tags-CBL5oFEo.js";
|
|
27
27
|
import { t as i } from "./voice-recorder-477xPHRU.js";
|
|
28
28
|
import { html as a, nothing as o, unsafeCSS as s } from "lit";
|
|
29
29
|
import { property as c, query as l, state as u } 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`});const e=require(`../select-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../select-qAKOLhmQ.cjs`);exports.LuzmoSelect=e.t;
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
e.setAttribute("data-luzmo-vars", ""), e.textContent = "html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: color-mix(in oklch, var(--luzmo-border-color-full), black 25%);--luzmo-border-color-full-down: color-mix(in oklch, var(--luzmo-border-color-full), black 45%);--luzmo-border-color-full-focus: color-mix(in oklch, var(--luzmo-border-color-full), black 25%);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: color-mix(in oklch, var(--luzmo-font-color), black 8%);--luzmo-font-color-down: color-mix(in oklch, var(--luzmo-font-color), black 20%);--luzmo-font-color-focus: color-mix(in oklch, var(--luzmo-font-color), black 8%);--luzmo-primary: #4434ff;--luzmo-primary-hover: color-mix(in oklch, var(--luzmo-primary), black 8%);--luzmo-primary-down: color-mix(in oklch, var(--luzmo-primary), black 20%);--luzmo-primary-focus: color-mix(in oklch, var(--luzmo-primary), black 8%);--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 5%), black 1.5%);--luzmo-background-color-down: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 7%), black 1%);--luzmo-background-color-focus: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 5%), black 1.5%);--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: color-mix(in oklch, var(--luzmo-background-color-highlight), black 10%);--luzmo-background-color-highlight-down: color-mix(in oklch, var(--luzmo-background-color-highlight), black 20%);--luzmo-background-color-highlight-focus: color-mix(in oklch, var(--luzmo-background-color-highlight), black 10%);--luzmo-secondary: #d000d0;--luzmo-secondary-hover: color-mix(in oklch, var(--luzmo-secondary), black 8%);--luzmo-secondary-down: color-mix(in oklch, var(--luzmo-secondary), black 20%);--luzmo-secondary-focus: color-mix(in oklch, var(--luzmo-secondary), black 8%);--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 208, 0, 208;--luzmo-scrollbar-size: 6px;--luzmo-scrollbar-thumb-background: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-scrollbar-thumb-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-hover-background: rgba( var(--luzmo-border-color-rgb), 0.4 );--luzmo-scrollbar-track-background: transparent;--luzmo-scrollbar-track-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-width: thin;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: color-mix(in oklch, var(--luzmo-negative-color), black 8%);--luzmo-negative-color-down: color-mix(in oklch, var(--luzmo-negative-color), black 20%);--luzmo-negative-color-focus: color-mix(in oklch, var(--luzmo-negative-color), black 8%);--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-negative-inverse-color: #ffffff;--luzmo-positive-color: rgb(18, 133, 90);--luzmo-positive-color-hover: color-mix(in oklch, var(--luzmo-positive-color), black 8%);--luzmo-positive-color-down: color-mix(in oklch, var(--luzmo-positive-color), black 20%);--luzmo-positive-color-focus: color-mix(in oklch, var(--luzmo-positive-color), black 8%);--luzmo-positive-color-rgb: 18, 133, 90;--luzmo-positive-inverse-color: #ffffff;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: color-mix(in oklch, var(--luzmo-selected-color), black 25%);--luzmo-selected-color-down: color-mix(in oklch, var(--luzmo-selected-color), black 45%);--luzmo-selected-color-focus: color-mix(in oklch, var(--luzmo-selected-color), black 25%);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: color-mix(in oklch, var(--luzmo-selected-color-hard), black 25%);--luzmo-selected-color-hard-down: color-mix(in oklch, var(--luzmo-selected-color-hard), black 45%);--luzmo-selected-color-hard-focus: color-mix(in oklch, var(--luzmo-selected-color-hard), black 25%);--luzmo-informative-color: #1670dd;--luzmo-informative-color-rgb: 22, 112, 221;--luzmo-notice-color: rgb(229, 127, 0);--luzmo-seafoam-color: rgb(0, 140, 140);--luzmo-indigo-color: rgb(68, 52, 255);--luzmo-purple-color: rgb(112, 48, 210);--luzmo-fuchsia-color: rgb(205, 30, 170);--luzmo-magenta-color: rgb(203, 36, 98);--luzmo-yellow-color: rgb(228, 208, 0);--luzmo-gray-color: rgb(110, 110, 110);--luzmo-red-color: rgb(202, 34, 28);--luzmo-orange-color: rgb(218, 123, 17);--luzmo-chartreuse-color: rgb(85, 135, 0);--luzmo-celery-color: rgb(48, 134, 22);--luzmo-green-color: rgb(18, 133, 90);--luzmo-cyan-color: rgb(0, 134, 180);--luzmo-blue-color: rgb(22, 112, 221);--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 10px;--luzmo-icon-size-xs: 12px;--luzmo-icon-size-s: 14px;--luzmo-icon-size-m: 16px;--luzmo-icon-size-l: 18px;--luzmo-icon-size-xl: 20px;--luzmo-icon-size-xxl: 32px}", document.head.appendChild(e);
|
|
22
22
|
}
|
|
23
23
|
})();
|
|
24
|
-
import { t as e } from "../select-
|
|
24
|
+
import { t as e } from "../select-C2gh8zRr.js";
|
|
25
25
|
export { e as LuzmoSelect };
|