luxen-ui 0.1.2 → 0.2.1
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/cdn/custom-elements.json +183 -5
- package/cdn/elements/dialog/dialog.d.ts +4 -0
- package/cdn/elements/dialog/dialog.d.ts.map +1 -1
- package/cdn/elements/dialog/dialog.js +10 -6
- package/cdn/elements/dialog/dialog.js.map +1 -1
- package/cdn/elements/dialog/dialog.styles.js +1 -1
- package/cdn/elements/dialog/dialog.styles.js.map +1 -1
- package/cdn/elements/dropdown/dropdown.js +1 -1
- package/cdn/elements/dropdown/dropdown.js.map +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.js +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.js.map +1 -1
- package/cdn/elements/input-stepper/input-stepper.d.ts +3 -0
- package/cdn/elements/input-stepper/input-stepper.d.ts.map +1 -1
- package/cdn/elements/input-stepper/input-stepper.js.map +1 -1
- package/cdn/elements/popover/popover.d.ts +3 -1
- package/cdn/elements/popover/popover.d.ts.map +1 -1
- package/cdn/elements/popover/popover.js +2 -2
- package/cdn/elements/popover/popover.js.map +1 -1
- package/cdn/shared/controllers/popover.d.ts +1 -0
- package/cdn/shared/controllers/popover.d.ts.map +1 -1
- package/cdn/shared/controllers/popover.js +1 -1
- package/cdn/shared/controllers/popover.js.map +1 -1
- package/cdn/styles/elements/button.css +1 -1
- package/cdn/styles/elements/input-stepper/default.css +19 -16
- package/cdn/styles/elements/input-stepper/rounded.css +14 -11
- package/cdn/styles/index.css +5 -2
- package/dist/css/elements/button.css +1 -1
- package/dist/css/elements/input-stepper/default.css +19 -16
- package/dist/css/elements/input-stepper/rounded.css +14 -11
- package/dist/css/index.css +5 -2
- package/dist/custom-elements.json +183 -5
- package/dist/elements/dialog/dialog.css +4 -3
- package/dist/elements/dialog/dialog.d.ts +4 -0
- package/dist/elements/dialog/dialog.d.ts.map +1 -1
- package/dist/elements/dialog/dialog.js +17 -4
- package/dist/elements/dropdown/dropdown.css +4 -4
- package/dist/elements/dropdown-item/dropdown-item.css +2 -1
- package/dist/elements/input-stepper/input-stepper.d.ts +3 -0
- package/dist/elements/input-stepper/input-stepper.d.ts.map +1 -1
- package/dist/elements/input-stepper/input-stepper.js +3 -0
- package/dist/elements/popover/popover.css +9 -5
- package/dist/elements/popover/popover.d.ts +3 -1
- package/dist/elements/popover/popover.d.ts.map +1 -1
- package/dist/elements/popover/popover.js +15 -4
- package/dist/shared/controllers/popover.d.ts +1 -0
- package/dist/shared/controllers/popover.d.ts.map +1 -1
- package/dist/shared/controllers/popover.js +2 -1
- package/dist/skills/luxen-ui/references/dialog.md +3 -1
- package/package.json +3 -2
|
@@ -2048,7 +2048,7 @@
|
|
|
2048
2048
|
{
|
|
2049
2049
|
"kind": "variable",
|
|
2050
2050
|
"name": "u",
|
|
2051
|
-
"default": "class extends n{constructor(...e){super(...e),this.title=``,this.open=!1,this.lightDismiss=!1,this._mouseDownTarget=null,this._commandListener={handleEvent:e=>this._onCommand(e)}}static{this.styles=[o,s]}connectedCallback(){super.connectedCallback(),this.addEventListener(`command`,this._commandListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`command`,this._commandListener)}firstUpdated(){this.dialog.addEventListener(`cancel`,e=>this._onCancel(e)),this.dialog.addEventListener(`close`,()=>this._onNativeClose()),this.dialog.addEventListener(`mousedown`,e=>{this._mouseDownTarget=e.target}),this.dialog.addEventListener(`click`,e=>this._onDialogClick(e))}updated(e){if(e.has(`open`)){if(this.open&&!this.dialog.open)this.emit(`show`),this.toggleAttribute(`data-modal`,!0),this.dialog.showModal(),this._focusAutofocusTarget(),this._emitAfter(`after-show`);else if(!this.open&&this.dialog.open){if(!this.emit(`hide`,{cancelable:!0})){this.open=!0;return}this.dialog.close()}}}_onCommand(e){switch(e.command){case`--hide`:this.open=!1;break;case`--show`:this.open=!0;break}}_onCancel(e){this.emit(`hide`,{cancelable:!0})||e.preventDefault()}_onNativeClose(){this.open=!1,this.removeAttribute(`data-modal`),this._emitAfter(`after-hide`)}_onDialogClick(e){let t=e.target===this.dialog&&this._mouseDownTarget===this.dialog;if(this._mouseDownTarget=null,t){if(this.lightDismiss){c||(this.open=!1);return}this._nudgeDismiss()}}_nudgeDismiss(){matchMedia(`(prefers-reduced-motion: reduce)`).matches||(this._nudgeAnimation?.cancel(),this._nudgeAnimation=this.dialog.animate([{transform:`scale(1)`},{transform:`scale(1.02)`},{transform:`scale(1)`}],{duration:250,easing:`ease-in-out`}))}async _emitAfter(e){await new Promise(e=>requestAnimationFrame(()=>e(null)));let t=this.dialog.getAnimations({subtree:!1});await Promise.all(t.map(e=>e.finished.catch(()=>{}))),e===`after-show`===this.open&&this.emit(e)}_focusAutofocusTarget(){this.querySelector(`[autofocus]`)?.focus({preventScroll:!0})}render(){return e` <dialog part=\"dialog\" closedby=${this.lightDismiss&&c?`any`:t} > <header part=\"header\"> <h2 part=\"title\">${this.title}</h2> <slot name=\"close\"></slot> </header> <div part=\"body\"> <slot></slot> </div> <footer part=\"footer\"> <slot name=\"footer\"></slot> </footer> </dialog> `}}"
|
|
2051
|
+
"default": "class extends n{constructor(...e){super(...e),this.title=``,this.open=!1,this.lightDismiss=!1,this.withoutHeader=!1,this._mouseDownTarget=null,this._commandListener={handleEvent:e=>this._onCommand(e)}}static{this.styles=[o,s]}connectedCallback(){super.connectedCallback(),this.addEventListener(`command`,this._commandListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`command`,this._commandListener)}firstUpdated(){this.dialog.addEventListener(`cancel`,e=>this._onCancel(e)),this.dialog.addEventListener(`close`,()=>this._onNativeClose()),this.dialog.addEventListener(`mousedown`,e=>{this._mouseDownTarget=e.target}),this.dialog.addEventListener(`click`,e=>this._onDialogClick(e))}updated(e){if(e.has(`open`)){if(this.open&&!this.dialog.open)this.emit(`show`),this.toggleAttribute(`data-modal`,!0),this.dialog.showModal(),this._focusAutofocusTarget(),this._emitAfter(`after-show`);else if(!this.open&&this.dialog.open){if(!this.emit(`hide`,{cancelable:!0})){this.open=!0;return}this.dialog.close()}}}_onCommand(e){switch(e.command){case`--hide`:this.open=!1;break;case`--show`:this.open=!0;break}}_onCancel(e){this.emit(`hide`,{cancelable:!0})||e.preventDefault()}_onNativeClose(){this.open=!1,this.removeAttribute(`data-modal`),this._emitAfter(`after-hide`)}_onDialogClick(e){let t=e.target===this.dialog&&this._mouseDownTarget===this.dialog;if(this._mouseDownTarget=null,t){if(this.lightDismiss){c||(this.open=!1);return}this._nudgeDismiss()}}_nudgeDismiss(){matchMedia(`(prefers-reduced-motion: reduce)`).matches||(this._nudgeAnimation?.cancel(),this._nudgeAnimation=this.dialog.animate([{transform:`scale(1)`},{transform:`scale(1.02)`},{transform:`scale(1)`}],{duration:250,easing:`ease-in-out`}))}async _emitAfter(e){await new Promise(e=>requestAnimationFrame(()=>e(null)));let t=this.dialog.getAnimations({subtree:!1});await Promise.all(t.map(e=>e.finished.catch(()=>{}))),e===`after-show`===this.open&&this.emit(e)}_focusAutofocusTarget(){this.querySelector(`[autofocus]`)?.focus({preventScroll:!0})}render(){return e` <dialog part=\"dialog\" closedby=${this.lightDismiss&&c?`any`:t} > ${this.withoutHeader?t:e` <header part=\"header\"> <slot name=\"title\"> ${this.title?e`<h2 part=\"title\">${this.title}</h2>`:t} </slot> <slot name=\"close\"></slot> </header> `} <div part=\"body\"> <slot></slot> </div> <footer part=\"footer\"> <slot name=\"footer\"></slot> </footer> </dialog> `}}"
|
|
2052
2052
|
}
|
|
2053
2053
|
],
|
|
2054
2054
|
"exports": [
|
|
@@ -2294,7 +2294,7 @@
|
|
|
2294
2294
|
{
|
|
2295
2295
|
"kind": "variable",
|
|
2296
2296
|
"name": "u",
|
|
2297
|
-
"default": "class extends i{constructor(...t){super(...t),this._popoverId=e(`popover`),this._floating=new c(this,{getTriggerElement:()=>this._trigger,getFloatingElement:()=>this._popoverEl,getArrowElement:()=>this._arrowEl,onPlacementChange:e=>{this.dataset.placement=e}}),this.#e=``,this.#t=`bottom`,this.#n=8,this.#r=!1,this.#i=!1,this.#a=`click`,this._onPointerEnter=()=>{this._hasTrigger(`hover`)&&(this._floating.cleanupSafePolygon(),this.show())},this._onPointerLeave=e=>{!this._hasTrigger(`hover`)||!this.open||this._floating.handlePointerLeave(e,()=>this.hide())},this._onFocusIn=()=>{this._hasTrigger(`focus`)&&this.show()},this._onFocusOut=()=>{this._hasTrigger(`focus`)&&this.hide()},this._onClick=()=>{this._hasTrigger(`click`)&&this.toggle()},this._onKeyDown=e=>{this.open&&e.key===`Escape`&&(e.stopPropagation(),this.hide())},this._onToggle=e=>{e.newState===`closed`&&this.open&&(this.open=!1)}}static{this.styles=[s,l]}#e;get for(){return this.#e}set for(e){this.#e=e}#t;get placement(){return this.#t}set placement(e){this.#t=e}#n;get distance(){return this.#n}set distance(e){this.#n=e}#r;get open(){return this.#r}set open(e){this.#r=e}#i;get withoutArrow(){return this.#i}set withoutArrow(e){this.#i=e}#a;get
|
|
2297
|
+
"default": "class extends i{constructor(...t){super(...t),this._popoverId=e(`popover`),this._floating=new c(this,{getTriggerElement:()=>this._trigger,getFloatingElement:()=>this._popoverEl,getArrowElement:()=>this._arrowEl,onPlacementChange:e=>{this.dataset.placement=e}}),this.#e=``,this.#t=`bottom`,this.#n=8,this.#r=!1,this.#i=!1,this.#a=!1,this.#o=`click`,this._onPointerEnter=()=>{this._hasTrigger(`hover`)&&(this._floating.cleanupSafePolygon(),this.show())},this._onPointerLeave=e=>{!this._hasTrigger(`hover`)||!this.open||this._floating.handlePointerLeave(e,()=>this.hide())},this._onFocusIn=()=>{this._hasTrigger(`focus`)&&this.show()},this._onFocusOut=()=>{this._hasTrigger(`focus`)&&this.hide()},this._onClick=()=>{this._hasTrigger(`click`)&&this.toggle()},this._onKeyDown=e=>{this.open&&e.key===`Escape`&&(e.stopPropagation(),this.hide())},this._onToggle=e=>{e.newState===`closed`&&this.open&&(this.open=!1)}}static{this.styles=[s,l]}#e;get for(){return this.#e}set for(e){this.#e=e}#t;get placement(){return this.#t}set placement(e){this.#t=e}#n;get distance(){return this.#n}set distance(e){this.#n=e}#r;get open(){return this.#r}set open(e){this.#r=e}#i;get withoutArrow(){return this.#i}set withoutArrow(e){this.#i=e}#a;get fullWidth(){return this.#a}set fullWidth(e){this.#a=e}#o;get trigger(){return this.#o}set trigger(e){this.#o=e}_hasTrigger(e){return this.trigger.split(` `).includes(e)}get _trigger(){return this.for?this.getRootNode().getElementById(this.for):null}get _popoverEl(){return this.shadowRoot.querySelector(`[popover]`)}get _arrowEl(){return this.withoutArrow?null:this.shadowRoot.querySelector(`i`)}_getDuration(e){let t=parseFloat(getComputedStyle(this).getPropertyValue(e));return Number.isNaN(t)?150:t}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>this._addTriggerListeners())}disconnectedCallback(){super.disconnectedCallback(),this._removeTriggerListeners()}updated(e){e.has(`open`)&&this._handleOpenChange(),e.has(`for`)&&(this._removeTriggerListeners(e.get(`for`)),this._addTriggerListeners())}show(){this.open||=!0}hide(){this.open&&=!1}toggle(){this.open=!this.open}async _handleOpenChange(){let e=this._popoverEl;if(!e)return;let t={placement:this.placement,distance:this.distance,fullWidth:this.fullWidth};if(this.open){if(e.showPopover(),await this._floating.updatePosition(t),!this.open)return;await this._floating.animateShow(e,this._getDuration(`--show-duration`)),this._floating.startPositioning(t),this._trigger?.setAttribute(`aria-expanded`,`true`),this._trigger?.setAttribute(`aria-controls`,this._popoverId)}else this._floating.stopPositioning(),this._floating.cleanupSafePolygon(),this._trigger?.setAttribute(`aria-expanded`,`false`),this._trigger?.removeAttribute(`aria-controls`),await this._floating.animateHide(e,this._getDuration(`--hide-duration`)),e.matches(`:popover-open`)&&e.hidePopover()}_addTriggerListeners(){this._floating.addTriggerListeners({onPointerEnter:this._onPointerEnter,onPointerLeave:this._onPointerLeave,onFocusIn:this._onFocusIn,onFocusOut:this._onFocusOut,onClick:this._onClick,onKeyDown:this._onKeyDown})}_removeTriggerListeners(e){let t=e?this.getRootNode().getElementById(e):void 0;this._floating.removeTriggerListeners(t)}render(){return n` <div id=${this._popoverId} popover=\"auto\" part=\"body\" @toggle=${this._onToggle} > ${this.withoutArrow?r:n` <i part=\"arrow\" role=\"presentation\" ></i> `} <slot></slot> </div> `}}"
|
|
2298
2298
|
}
|
|
2299
2299
|
],
|
|
2300
2300
|
"exports": [
|
|
@@ -2544,7 +2544,7 @@
|
|
|
2544
2544
|
{
|
|
2545
2545
|
"kind": "variable",
|
|
2546
2546
|
"name": "Je",
|
|
2547
|
-
"default": "class{constructor(e,t){this._currentPlacement=``,this._host=e,this._config=t,e.addController(this)}hostConnected(){}hostDisconnected(){this.stopPositioning(),this.cleanupSafePolygon(),this.removeTriggerListeners()}get currentPlacement(){return this._currentPlacement}async updatePosition(e){let t=this._config.getTriggerElement(),n=this._config.getFloatingElement(),r=this._config.getArrowElement();if(!t||!n)return;let i=[Re(e.distance),Be(),ze(),...r?[Ve({element:r,padding:8})]:[]],{x:a,y:o,placement:s,middlewareData:c}=await He(t,n,{placement:e.placement,strategy:`fixed`,middleware:i});if(Object.assign(n.style,{position:`fixed`,left
|
|
2547
|
+
"default": "class{constructor(e,t){this._currentPlacement=``,this._host=e,this._config=t,e.addController(this)}hostConnected(){}hostDisconnected(){this.stopPositioning(),this.cleanupSafePolygon(),this.removeTriggerListeners()}get currentPlacement(){return this._currentPlacement}async updatePosition(e){let t=this._config.getTriggerElement(),n=this._config.getFloatingElement(),r=this._config.getArrowElement();if(!t||!n)return;let i=[Re(e.distance),Be(),ze(),...r?[Ve({element:r,padding:8})]:[]],{x:a,y:o,placement:s,middlewareData:c}=await He(t,n,{placement:e.placement,strategy:`fixed`,middleware:i});if(Object.assign(n.style,{position:`fixed`,left:e.fullWidth?`0px`:`${a}px`,top:`${o}px`,width:e.fullWidth?`100vw`:``}),s!==this._currentPlacement&&(this._currentPlacement=s,this._config.onPlacementChange?.(s)),c.arrow&&r){let{x:e,y:t}=c.arrow,n=Ke[s.split(`-`)[0]];Object.assign(r.style,{left:e==null?``:`${e}px`,top:t==null?``:`${t}px`,[n]:`${-r.offsetWidth/2}px`})}}startPositioning(e){let t=this._config.getTriggerElement(),n=this._config.getFloatingElement();!t||!n||(this._cleanupAutoUpdate?.(),this._cleanupAutoUpdate=Le(t,n,()=>this.updatePosition(e)))}stopPositioning(){this._cleanupAutoUpdate?.(),this._cleanupAutoUpdate=void 0}handlePointerLeave(e,t){let n=this._config.getFloatingElement(),r=this._config.getTriggerElement();if(!n||!r){t();return}let i=e.clientX,a=e.clientY,o=e=>{let{clientX:o,clientY:c}=e,l=[o,c],u=n.getBoundingClientRect(),d=r.getBoundingClientRect(),f=this._currentPlacement.split(`-`)[0];if(!We(l,u)&&!We(l,d)){if(f===`top`&&a>=d.bottom-1||f===`bottom`&&a<=d.top+1||f===`left`&&i>=d.right-1||f===`right`&&i<=d.left+1){s(),t();return}Ue(l,Ge(i,a,u,d,this._currentPlacement))||(s(),t())}},s=()=>{document.removeEventListener(`pointermove`,o)};document.addEventListener(`pointermove`,o),this._cleanupSafePolygon?.(),this._cleanupSafePolygon=s}cleanupSafePolygon(){this._cleanupSafePolygon?.(),this._cleanupSafePolygon=void 0}addTriggerListeners(e){let t=this._config.getTriggerElement();t&&(this._handlers=e,this._triggerElement=t,e.onPointerEnter&&t.addEventListener(`pointerenter`,e.onPointerEnter),e.onPointerLeave&&t.addEventListener(`pointerleave`,e.onPointerLeave),e.onFocusIn&&t.addEventListener(`focusin`,e.onFocusIn),e.onFocusOut&&t.addEventListener(`focusout`,e.onFocusOut),e.onClick&&t.addEventListener(`click`,e.onClick),e.onKeyDown&&t.addEventListener(`keydown`,e.onKeyDown))}removeTriggerListeners(e){let t=e??this._triggerElement,n=this._handlers;!t||!n||(n.onPointerEnter&&t.removeEventListener(`pointerenter`,n.onPointerEnter),n.onPointerLeave&&t.removeEventListener(`pointerleave`,n.onPointerLeave),n.onFocusIn&&t.removeEventListener(`focusin`,n.onFocusIn),n.onFocusOut&&t.removeEventListener(`focusout`,n.onFocusOut),n.onClick&&t.removeEventListener(`click`,n.onClick),n.onKeyDown&&t.removeEventListener(`keydown`,n.onKeyDown),e||(this._handlers=void 0,this._triggerElement=void 0))}async animateShow(e,t,n){let r=qe?.matches?0:t;e.getAnimations().forEach(e=>e.cancel()),e.animate(n??[{opacity:0,scale:.96},{opacity:1,scale:1}],{duration:r,fill:`forwards`})}async animateHide(e,t,n){let r=qe?.matches?0:t;await e.animate(n??[{opacity:1,scale:1},{opacity:0,scale:.96}],{duration:r,fill:`forwards`}).finished}}"
|
|
2548
2548
|
}
|
|
2549
2549
|
],
|
|
2550
2550
|
"exports": [
|
|
@@ -3251,6 +3251,10 @@
|
|
|
3251
3251
|
"description": "Dialog border radius. Default `6px`.",
|
|
3252
3252
|
"name": "--border-radius"
|
|
3253
3253
|
},
|
|
3254
|
+
{
|
|
3255
|
+
"description": "Padding applied to the header, footer, and inline-padding of the body. Default `1.5rem`. Set to `0` to remove all internal spacing (e.g. for edge-to-edge media).",
|
|
3256
|
+
"name": "--padding"
|
|
3257
|
+
},
|
|
3254
3258
|
{
|
|
3255
3259
|
"description": "Open transition duration. Default `200ms`.",
|
|
3256
3260
|
"name": "--show-duration"
|
|
@@ -3295,6 +3299,10 @@
|
|
|
3295
3299
|
"description": "Body content.",
|
|
3296
3300
|
"name": ""
|
|
3297
3301
|
},
|
|
3302
|
+
{
|
|
3303
|
+
"description": "Custom heading element. Overrides the default `<h2>` rendered from the `title` property.",
|
|
3304
|
+
"name": "title"
|
|
3305
|
+
},
|
|
3298
3306
|
{
|
|
3299
3307
|
"description": "Close button (typically `<button class=\"l-close\">`).",
|
|
3300
3308
|
"name": "close"
|
|
@@ -3380,6 +3388,15 @@
|
|
|
3380
3388
|
"description": "Close when the backdrop is clicked.",
|
|
3381
3389
|
"default": "false"
|
|
3382
3390
|
},
|
|
3391
|
+
{
|
|
3392
|
+
"kind": "field",
|
|
3393
|
+
"name": "withoutHeader",
|
|
3394
|
+
"type": {
|
|
3395
|
+
"text": "boolean"
|
|
3396
|
+
},
|
|
3397
|
+
"description": "Hide the header entirely (title and close slot).",
|
|
3398
|
+
"default": "false"
|
|
3399
|
+
},
|
|
3383
3400
|
{
|
|
3384
3401
|
"kind": "field",
|
|
3385
3402
|
"name": "_mouseDownTarget",
|
|
@@ -3644,6 +3661,14 @@
|
|
|
3644
3661
|
"module": "src/html/elements/dialog/dialog.ts"
|
|
3645
3662
|
}
|
|
3646
3663
|
},
|
|
3664
|
+
{
|
|
3665
|
+
"description": "Padding applied to the header, footer, and inline-padding of the body. Default `1.5rem`. Set to `0` to remove all internal spacing (e.g. for edge-to-edge media).",
|
|
3666
|
+
"name": "--padding",
|
|
3667
|
+
"inheritedFrom": {
|
|
3668
|
+
"name": "LuxenDialog",
|
|
3669
|
+
"module": "src/html/elements/dialog/dialog.ts"
|
|
3670
|
+
}
|
|
3671
|
+
},
|
|
3647
3672
|
{
|
|
3648
3673
|
"description": "Backdrop blur amount (any CSS length). Default `0` (no blur). Set to e.g. `4px` for a subtle frost.",
|
|
3649
3674
|
"name": "--backdrop-blur",
|
|
@@ -3719,6 +3744,14 @@
|
|
|
3719
3744
|
"name": "LuxenDialog",
|
|
3720
3745
|
"module": "src/html/elements/dialog/dialog.ts"
|
|
3721
3746
|
}
|
|
3747
|
+
},
|
|
3748
|
+
{
|
|
3749
|
+
"description": "Custom heading element. Overrides the default `<h2>` rendered from the `title` property.",
|
|
3750
|
+
"name": "title",
|
|
3751
|
+
"inheritedFrom": {
|
|
3752
|
+
"name": "LuxenDialog",
|
|
3753
|
+
"module": "src/html/elements/dialog/dialog.ts"
|
|
3754
|
+
}
|
|
3722
3755
|
}
|
|
3723
3756
|
],
|
|
3724
3757
|
"events": [
|
|
@@ -3798,6 +3831,19 @@
|
|
|
3798
3831
|
"name": "LuxenDialog",
|
|
3799
3832
|
"module": "src/html/elements/dialog/dialog.ts"
|
|
3800
3833
|
}
|
|
3834
|
+
},
|
|
3835
|
+
{
|
|
3836
|
+
"name": "without-header",
|
|
3837
|
+
"type": {
|
|
3838
|
+
"text": "boolean"
|
|
3839
|
+
},
|
|
3840
|
+
"default": "false",
|
|
3841
|
+
"description": "Hide the header entirely (title and close slot).",
|
|
3842
|
+
"fieldName": "withoutHeader",
|
|
3843
|
+
"inheritedFrom": {
|
|
3844
|
+
"name": "LuxenDialog",
|
|
3845
|
+
"module": "src/html/elements/dialog/dialog.ts"
|
|
3846
|
+
}
|
|
3801
3847
|
}
|
|
3802
3848
|
],
|
|
3803
3849
|
"members": [
|
|
@@ -3845,6 +3891,21 @@
|
|
|
3845
3891
|
"module": "src/html/elements/dialog/dialog.ts"
|
|
3846
3892
|
}
|
|
3847
3893
|
},
|
|
3894
|
+
{
|
|
3895
|
+
"kind": "field",
|
|
3896
|
+
"name": "withoutHeader",
|
|
3897
|
+
"type": {
|
|
3898
|
+
"text": "boolean"
|
|
3899
|
+
},
|
|
3900
|
+
"default": "false",
|
|
3901
|
+
"description": "Hide the header entirely (title and close slot).",
|
|
3902
|
+
"attribute": "without-header",
|
|
3903
|
+
"reflects": true,
|
|
3904
|
+
"inheritedFrom": {
|
|
3905
|
+
"name": "LuxenDialog",
|
|
3906
|
+
"module": "src/html/elements/dialog/dialog.ts"
|
|
3907
|
+
}
|
|
3908
|
+
},
|
|
3848
3909
|
{
|
|
3849
3910
|
"kind": "field",
|
|
3850
3911
|
"name": "dialog",
|
|
@@ -4700,6 +4761,16 @@
|
|
|
4700
4761
|
"kind": "class",
|
|
4701
4762
|
"description": "A stepper control that enhances a native `<input type=\"number\">` with\ndecrement/increment buttons and an optional animated number track.",
|
|
4702
4763
|
"name": "LuxenInputStepper",
|
|
4764
|
+
"cssProperties": [
|
|
4765
|
+
{
|
|
4766
|
+
"description": "Border color of the stepper container (default appearance) and of each button (rounded appearance). Defaults to `--l-color-border`.",
|
|
4767
|
+
"name": "--border-color"
|
|
4768
|
+
},
|
|
4769
|
+
{
|
|
4770
|
+
"description": "Border radius of the stepper container (default appearance). Defaults to `--radius-md`.",
|
|
4771
|
+
"name": "--border-radius"
|
|
4772
|
+
}
|
|
4773
|
+
],
|
|
4703
4774
|
"members": [
|
|
4704
4775
|
{
|
|
4705
4776
|
"kind": "method",
|
|
@@ -4965,7 +5036,7 @@
|
|
|
4965
5036
|
},
|
|
4966
5037
|
{
|
|
4967
5038
|
"description": "Border radius. Default `8px`.",
|
|
4968
|
-
"name": "--radius"
|
|
5039
|
+
"name": "--border-radius"
|
|
4969
5040
|
},
|
|
4970
5041
|
{
|
|
4971
5042
|
"description": "Maximum width. Default `320px`.",
|
|
@@ -5030,6 +5101,11 @@
|
|
|
5030
5101
|
"name": "withoutArrow",
|
|
5031
5102
|
"description": "Hide the directional arrow."
|
|
5032
5103
|
},
|
|
5104
|
+
{
|
|
5105
|
+
"kind": "field",
|
|
5106
|
+
"name": "fullWidth",
|
|
5107
|
+
"description": "Stretch the popover to the viewport width. Useful for mega menus."
|
|
5108
|
+
},
|
|
5033
5109
|
{
|
|
5034
5110
|
"kind": "field",
|
|
5035
5111
|
"name": "trigger",
|
|
@@ -8968,6 +9044,10 @@
|
|
|
8968
9044
|
"description": "Dialog border radius. Default `6px`.",
|
|
8969
9045
|
"name": "--border-radius"
|
|
8970
9046
|
},
|
|
9047
|
+
{
|
|
9048
|
+
"description": "Padding applied to the header, footer, and inline-padding of the body. Default `1.5rem`. Set to `0` to remove all internal spacing (e.g. for edge-to-edge media).",
|
|
9049
|
+
"name": "--padding"
|
|
9050
|
+
},
|
|
8971
9051
|
{
|
|
8972
9052
|
"description": "Open transition duration. Default `200ms`.",
|
|
8973
9053
|
"name": "--show-duration"
|
|
@@ -9012,6 +9092,10 @@
|
|
|
9012
9092
|
"description": "Body content.",
|
|
9013
9093
|
"name": ""
|
|
9014
9094
|
},
|
|
9095
|
+
{
|
|
9096
|
+
"description": "Custom heading element. Overrides the default `<h2>` rendered from the `title` property.",
|
|
9097
|
+
"name": "title"
|
|
9098
|
+
},
|
|
9015
9099
|
{
|
|
9016
9100
|
"description": "Close button (typically `<button class=\"l-close\">`).",
|
|
9017
9101
|
"name": "close"
|
|
@@ -9054,6 +9138,17 @@
|
|
|
9054
9138
|
"attribute": "light-dismiss",
|
|
9055
9139
|
"reflects": true
|
|
9056
9140
|
},
|
|
9141
|
+
{
|
|
9142
|
+
"kind": "field",
|
|
9143
|
+
"name": "withoutHeader",
|
|
9144
|
+
"type": {
|
|
9145
|
+
"text": "boolean"
|
|
9146
|
+
},
|
|
9147
|
+
"default": "false",
|
|
9148
|
+
"description": "Hide the header entirely (title and close slot).",
|
|
9149
|
+
"attribute": "without-header",
|
|
9150
|
+
"reflects": true
|
|
9151
|
+
},
|
|
9057
9152
|
{
|
|
9058
9153
|
"kind": "field",
|
|
9059
9154
|
"name": "dialog",
|
|
@@ -9231,6 +9326,15 @@
|
|
|
9231
9326
|
"default": "false",
|
|
9232
9327
|
"description": "Close when the backdrop is clicked.",
|
|
9233
9328
|
"fieldName": "lightDismiss"
|
|
9329
|
+
},
|
|
9330
|
+
{
|
|
9331
|
+
"name": "without-header",
|
|
9332
|
+
"type": {
|
|
9333
|
+
"text": "boolean"
|
|
9334
|
+
},
|
|
9335
|
+
"default": "false",
|
|
9336
|
+
"description": "Hide the header entirely (title and close slot).",
|
|
9337
|
+
"fieldName": "withoutHeader"
|
|
9234
9338
|
}
|
|
9235
9339
|
],
|
|
9236
9340
|
"superclass": {
|
|
@@ -9448,6 +9552,14 @@
|
|
|
9448
9552
|
"module": "src/html/elements/dialog/dialog.ts"
|
|
9449
9553
|
}
|
|
9450
9554
|
},
|
|
9555
|
+
{
|
|
9556
|
+
"description": "Padding applied to the header, footer, and inline-padding of the body. Default `1.5rem`. Set to `0` to remove all internal spacing (e.g. for edge-to-edge media).",
|
|
9557
|
+
"name": "--padding",
|
|
9558
|
+
"inheritedFrom": {
|
|
9559
|
+
"name": "LuxenDialog",
|
|
9560
|
+
"module": "src/html/elements/dialog/dialog.ts"
|
|
9561
|
+
}
|
|
9562
|
+
},
|
|
9451
9563
|
{
|
|
9452
9564
|
"description": "Backdrop blur amount (any CSS length). Default `0` (no blur). Set to e.g. `4px` for a subtle frost.",
|
|
9453
9565
|
"name": "--backdrop-blur",
|
|
@@ -9523,6 +9635,14 @@
|
|
|
9523
9635
|
"name": "LuxenDialog",
|
|
9524
9636
|
"module": "src/html/elements/dialog/dialog.ts"
|
|
9525
9637
|
}
|
|
9638
|
+
},
|
|
9639
|
+
{
|
|
9640
|
+
"description": "Custom heading element. Overrides the default `<h2>` rendered from the `title` property.",
|
|
9641
|
+
"name": "title",
|
|
9642
|
+
"inheritedFrom": {
|
|
9643
|
+
"name": "LuxenDialog",
|
|
9644
|
+
"module": "src/html/elements/dialog/dialog.ts"
|
|
9645
|
+
}
|
|
9526
9646
|
}
|
|
9527
9647
|
],
|
|
9528
9648
|
"members": [
|
|
@@ -9580,6 +9700,21 @@
|
|
|
9580
9700
|
"module": "src/html/elements/dialog/dialog.ts"
|
|
9581
9701
|
}
|
|
9582
9702
|
},
|
|
9703
|
+
{
|
|
9704
|
+
"kind": "field",
|
|
9705
|
+
"name": "withoutHeader",
|
|
9706
|
+
"type": {
|
|
9707
|
+
"text": "boolean"
|
|
9708
|
+
},
|
|
9709
|
+
"default": "false",
|
|
9710
|
+
"description": "Hide the header entirely (title and close slot).",
|
|
9711
|
+
"attribute": "without-header",
|
|
9712
|
+
"reflects": true,
|
|
9713
|
+
"inheritedFrom": {
|
|
9714
|
+
"name": "LuxenDialog",
|
|
9715
|
+
"module": "src/html/elements/dialog/dialog.ts"
|
|
9716
|
+
}
|
|
9717
|
+
},
|
|
9583
9718
|
{
|
|
9584
9719
|
"kind": "field",
|
|
9585
9720
|
"name": "dialog",
|
|
@@ -9837,6 +9972,19 @@
|
|
|
9837
9972
|
"name": "LuxenDialog",
|
|
9838
9973
|
"module": "src/html/elements/dialog/dialog.ts"
|
|
9839
9974
|
}
|
|
9975
|
+
},
|
|
9976
|
+
{
|
|
9977
|
+
"name": "without-header",
|
|
9978
|
+
"type": {
|
|
9979
|
+
"text": "boolean"
|
|
9980
|
+
},
|
|
9981
|
+
"default": "false",
|
|
9982
|
+
"description": "Hide the header entirely (title and close slot).",
|
|
9983
|
+
"fieldName": "withoutHeader",
|
|
9984
|
+
"inheritedFrom": {
|
|
9985
|
+
"name": "LuxenDialog",
|
|
9986
|
+
"module": "src/html/elements/dialog/dialog.ts"
|
|
9987
|
+
}
|
|
9840
9988
|
}
|
|
9841
9989
|
],
|
|
9842
9990
|
"superclass": {
|
|
@@ -10780,6 +10928,16 @@
|
|
|
10780
10928
|
"kind": "class",
|
|
10781
10929
|
"description": "A stepper control that enhances a native `<input type=\"number\">` with\ndecrement/increment buttons and an optional animated number track.",
|
|
10782
10930
|
"name": "LuxenInputStepper",
|
|
10931
|
+
"cssProperties": [
|
|
10932
|
+
{
|
|
10933
|
+
"description": "Border color of the stepper container (default appearance) and of each button (rounded appearance). Defaults to `--l-color-border`.",
|
|
10934
|
+
"name": "--border-color"
|
|
10935
|
+
},
|
|
10936
|
+
{
|
|
10937
|
+
"description": "Border radius of the stepper container (default appearance). Defaults to `--radius-md`.",
|
|
10938
|
+
"name": "--border-radius"
|
|
10939
|
+
}
|
|
10940
|
+
],
|
|
10783
10941
|
"members": [
|
|
10784
10942
|
{
|
|
10785
10943
|
"kind": "field",
|
|
@@ -11175,7 +11333,7 @@
|
|
|
11175
11333
|
},
|
|
11176
11334
|
{
|
|
11177
11335
|
"description": "Border radius. Default `8px`.",
|
|
11178
|
-
"name": "--radius"
|
|
11336
|
+
"name": "--border-radius"
|
|
11179
11337
|
},
|
|
11180
11338
|
{
|
|
11181
11339
|
"description": "Maximum width. Default `320px`.",
|
|
@@ -11278,6 +11436,17 @@
|
|
|
11278
11436
|
"attribute": "without-arrow",
|
|
11279
11437
|
"reflects": true
|
|
11280
11438
|
},
|
|
11439
|
+
{
|
|
11440
|
+
"kind": "field",
|
|
11441
|
+
"name": "fullWidth",
|
|
11442
|
+
"type": {
|
|
11443
|
+
"text": "boolean"
|
|
11444
|
+
},
|
|
11445
|
+
"default": "false",
|
|
11446
|
+
"description": "Stretch the popover to the viewport width. Useful for mega menus.",
|
|
11447
|
+
"attribute": "full-width",
|
|
11448
|
+
"reflects": true
|
|
11449
|
+
},
|
|
11281
11450
|
{
|
|
11282
11451
|
"kind": "field",
|
|
11283
11452
|
"name": "trigger",
|
|
@@ -11496,6 +11665,15 @@
|
|
|
11496
11665
|
"description": "Hide the directional arrow.",
|
|
11497
11666
|
"fieldName": "withoutArrow"
|
|
11498
11667
|
},
|
|
11668
|
+
{
|
|
11669
|
+
"name": "full-width",
|
|
11670
|
+
"type": {
|
|
11671
|
+
"text": "boolean"
|
|
11672
|
+
},
|
|
11673
|
+
"default": "false",
|
|
11674
|
+
"description": "Stretch the popover to the viewport width. Useful for mega menus.",
|
|
11675
|
+
"fieldName": "fullWidth"
|
|
11676
|
+
},
|
|
11499
11677
|
{
|
|
11500
11678
|
"name": "trigger",
|
|
11501
11679
|
"type": {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
--width: 31rem;
|
|
3
3
|
--border-radius: 6px;
|
|
4
|
+
--padding: 1.5rem;
|
|
4
5
|
--show-duration: 200ms;
|
|
5
6
|
--hide-duration: 200ms;
|
|
6
7
|
--backdrop: var(--l-backdrop);
|
|
@@ -58,7 +59,7 @@ dialog {
|
|
|
58
59
|
justify-content: space-between;
|
|
59
60
|
align-items: center;
|
|
60
61
|
gap: 1rem;
|
|
61
|
-
padding:
|
|
62
|
+
padding: var(--padding);
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
[part='title'] {
|
|
@@ -69,7 +70,7 @@ dialog {
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
[part='body'] {
|
|
72
|
-
padding:
|
|
73
|
+
padding-inline: var(--padding);
|
|
73
74
|
overflow-y: auto;
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -77,7 +78,7 @@ dialog {
|
|
|
77
78
|
display: flex;
|
|
78
79
|
place-content: end;
|
|
79
80
|
gap: 0.5rem;
|
|
80
|
-
padding:
|
|
81
|
+
padding: var(--padding);
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
::slotted(menu[slot='footer']) {
|
|
@@ -7,6 +7,7 @@ import { LuxenElement } from '../../shared/luxen-element';
|
|
|
7
7
|
* Invoker commands). There are no public `show()` / `close()` methods.
|
|
8
8
|
*
|
|
9
9
|
* @slot - Body content.
|
|
10
|
+
* @slot title - Custom heading element. Overrides the default `<h2>` rendered from the `title` property.
|
|
10
11
|
* @slot close - Close button (typically `<button class="l-close">`).
|
|
11
12
|
* @slot footer - Footer actions.
|
|
12
13
|
*
|
|
@@ -18,6 +19,7 @@ import { LuxenElement } from '../../shared/luxen-element';
|
|
|
18
19
|
*
|
|
19
20
|
* @cssproperty --width - Dialog width. Default `31rem`.
|
|
20
21
|
* @cssproperty --border-radius - Dialog border radius. Default `6px`.
|
|
22
|
+
* @cssproperty --padding - Padding applied to the header, footer, and inline-padding of the body. Default `1.5rem`. Set to `0` to remove all internal spacing (e.g. for edge-to-edge media).
|
|
21
23
|
* @cssproperty --show-duration - Open transition duration. Default `200ms`.
|
|
22
24
|
* @cssproperty --hide-duration - Close transition duration. Default `200ms`.
|
|
23
25
|
* @cssproperty --backdrop - Backdrop color.
|
|
@@ -36,6 +38,8 @@ export declare class LuxenDialog extends LuxenElement {
|
|
|
36
38
|
open: boolean;
|
|
37
39
|
/** Close when the backdrop is clicked. */
|
|
38
40
|
lightDismiss: boolean;
|
|
41
|
+
/** Hide the header entirely (title and close slot). */
|
|
42
|
+
withoutHeader: boolean;
|
|
39
43
|
dialog: HTMLDialogElement;
|
|
40
44
|
private _mouseDownTarget;
|
|
41
45
|
private _commandListener;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/html/elements/dialog/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAwB1D
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/html/elements/dialog/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAwB1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAC3C,MAAM,CAAC,MAAM,4BAAwB;IAErC,2CAA2C;IAE3C,KAAK,SAAM;IAEX,kCAAkC;IAElC,IAAI,UAAS;IAEb,0CAA0C;IAE1C,YAAY,UAAS;IAErB,uDAAuD;IAEvD,aAAa,UAAS;IAGtB,MAAM,EAAG,iBAAiB,CAAC;IAE3B,OAAO,CAAC,gBAAgB,CAA4B;IAEpD,OAAO,CAAC,gBAAgB,CAEtB;IAIF,iBAAiB;IAKjB,oBAAoB;IAKpB,YAAY;IASZ,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC;IA0BrC,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,eAAe,CAAC,CAAY;IAEpC,OAAO,CAAC,aAAa;YAcP,UAAU;IAUxB,OAAO,CAAC,qBAAqB;IAK7B,MAAM;CA0BP"}
|
|
@@ -28,6 +28,7 @@ if (typeof document !== 'undefined' && !(SCROLL_LOCK_SHEET in document)) {
|
|
|
28
28
|
* Invoker commands). There are no public `show()` / `close()` methods.
|
|
29
29
|
*
|
|
30
30
|
* @slot - Body content.
|
|
31
|
+
* @slot title - Custom heading element. Overrides the default `<h2>` rendered from the `title` property.
|
|
31
32
|
* @slot close - Close button (typically `<button class="l-close">`).
|
|
32
33
|
* @slot footer - Footer actions.
|
|
33
34
|
*
|
|
@@ -39,6 +40,7 @@ if (typeof document !== 'undefined' && !(SCROLL_LOCK_SHEET in document)) {
|
|
|
39
40
|
*
|
|
40
41
|
* @cssproperty --width - Dialog width. Default `31rem`.
|
|
41
42
|
* @cssproperty --border-radius - Dialog border radius. Default `6px`.
|
|
43
|
+
* @cssproperty --padding - Padding applied to the header, footer, and inline-padding of the body. Default `1.5rem`. Set to `0` to remove all internal spacing (e.g. for edge-to-edge media).
|
|
42
44
|
* @cssproperty --show-duration - Open transition duration. Default `200ms`.
|
|
43
45
|
* @cssproperty --hide-duration - Close transition duration. Default `200ms`.
|
|
44
46
|
* @cssproperty --backdrop - Backdrop color.
|
|
@@ -58,6 +60,8 @@ export class LuxenDialog extends LuxenElement {
|
|
|
58
60
|
this.open = false;
|
|
59
61
|
/** Close when the backdrop is clicked. */
|
|
60
62
|
this.lightDismiss = false;
|
|
63
|
+
/** Hide the header entirely (title and close slot). */
|
|
64
|
+
this.withoutHeader = false;
|
|
61
65
|
this._mouseDownTarget = null;
|
|
62
66
|
this._commandListener = {
|
|
63
67
|
handleEvent: (e) => this._onCommand(e),
|
|
@@ -175,10 +179,16 @@ export class LuxenDialog extends LuxenElement {
|
|
|
175
179
|
part="dialog"
|
|
176
180
|
closedby=${closedby}
|
|
177
181
|
>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
+
${this.withoutHeader
|
|
183
|
+
? nothing
|
|
184
|
+
: html `
|
|
185
|
+
<header part="header">
|
|
186
|
+
<slot name="title">
|
|
187
|
+
${this.title ? html `<h2 part="title">${this.title}</h2>` : nothing}
|
|
188
|
+
</slot>
|
|
189
|
+
<slot name="close"></slot>
|
|
190
|
+
</header>
|
|
191
|
+
`}
|
|
182
192
|
<div part="body">
|
|
183
193
|
<slot></slot>
|
|
184
194
|
</div>
|
|
@@ -199,6 +209,9 @@ __decorate([
|
|
|
199
209
|
__decorate([
|
|
200
210
|
property({ type: Boolean, reflect: true, attribute: 'light-dismiss' })
|
|
201
211
|
], LuxenDialog.prototype, "lightDismiss", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
property({ type: Boolean, reflect: true, attribute: 'without-header' })
|
|
214
|
+
], LuxenDialog.prototype, "withoutHeader", void 0);
|
|
202
215
|
__decorate([
|
|
203
216
|
query('dialog')
|
|
204
217
|
], LuxenDialog.prototype, "dialog", void 0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
--background: var(--l-color-bg-surface, Canvas);
|
|
3
|
-
--radius:
|
|
4
|
-
--shadow: 0 4px
|
|
3
|
+
--radius: 6px;
|
|
4
|
+
--shadow: 0 4px 6px -1px rgb(0 0 0 / 8%), 0 2px 4px -2px rgb(0 0 0 / 6%);
|
|
5
5
|
--show-duration: 150;
|
|
6
6
|
--hide-duration: 150;
|
|
7
7
|
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
box-sizing: border-box;
|
|
20
20
|
width: max-content;
|
|
21
21
|
min-width: anchor-size(width);
|
|
22
|
-
padding:
|
|
22
|
+
padding: 0.25rem;
|
|
23
23
|
margin: 0;
|
|
24
|
-
border: 1px solid var(--l-color-border, light-dark(#e5e7eb, #374151));
|
|
24
|
+
border: 1px solid var(--l-color-border-overlay, light-dark(#e5e7eb, #374151));
|
|
25
25
|
border-radius: var(--radius);
|
|
26
26
|
background: var(--background);
|
|
27
27
|
color: var(--l-color-text-primary, CanvasText);
|
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
gap: 8px;
|
|
14
|
-
padding:
|
|
14
|
+
padding: 0.375rem 0.5rem;
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
outline: none;
|
|
17
|
+
border-radius: 4px;
|
|
17
18
|
font-size: 0.875rem;
|
|
18
19
|
line-height: 1.5;
|
|
19
20
|
color: var(--l-color-text-primary, CanvasText);
|
|
@@ -14,6 +14,9 @@ export type InputStepperSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
16
|
* @event change - Fired when the value changes. Detail: `{ value: number }`.
|
|
17
|
+
*
|
|
18
|
+
* @cssproperty --border-color - Border color of the stepper container (default appearance) and of each button (rounded appearance). Defaults to `--l-color-border`.
|
|
19
|
+
* @cssproperty --border-radius - Border radius of the stepper container (default appearance). Defaults to `--radius-md`.
|
|
17
20
|
*/
|
|
18
21
|
export declare class LuxenInputStepper extends LuxenElement {
|
|
19
22
|
createRenderRoot(): this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-stepper.d.ts","sourceRoot":"","sources":["../../../src/html/elements/input-stepper/input-stepper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEhE
|
|
1
|
+
{"version":3,"file":"input-stepper.d.ts","sourceRoot":"","sources":["../../../src/html/elements/input-stepper/input-stepper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEhE;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IACxC,gBAAgB;IAIzB,wEAAwE;IAExE,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,wEAAwE;IAExE,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,kEAAkE;IAElE,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,oBAAoB;IAEpB,IAAI,EAAE,gBAAgB,CAAQ;IAE9B,iDAAiD;IAEjD,UAAU,UAAS;IAEnB,0CAA0C;IAE1C,aAAa,SAAkB;IAE/B,0CAA0C;IAE1C,aAAa,SAAiB;IAE9B,OAAO,CAAC,MAAM,CAAiC;IAC/C,OAAO,CAAC,aAAa,CAAkC;IACvD,OAAO,CAAC,aAAa,CAAkC;IACvD,OAAO,CAAC,aAAa,CAA+B;IACpD,OAAO,CAAC,aAAa,CAA+B;IACpD,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,eAAe,CAAS;IAEvB,iBAAiB;IAKjB,oBAAoB;IAKpB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAS9C,sCAAsC;IACtC,SAAS;IAOT,sCAAsC;IACtC,SAAS;IAST,OAAO,CAAC,MAAM;IAsCd,OAAO,CAAC,SAAS;IAwBjB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,oBAAoB;IAgB5B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,YAAY;IAmBpB,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,YAAY,CAA0B;IAC9C,OAAO,CAAC,YAAY,CAA0B;IAE9C,OAAO,CAAC,cAAc,CAWpB;CACH"}
|
|
@@ -20,6 +20,9 @@ import { LuxenElement } from '../../shared/luxen-element';
|
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
22
22
|
* @event change - Fired when the value changes. Detail: `{ value: number }`.
|
|
23
|
+
*
|
|
24
|
+
* @cssproperty --border-color - Border color of the stepper container (default appearance) and of each button (rounded appearance). Defaults to `--l-color-border`.
|
|
25
|
+
* @cssproperty --border-radius - Border radius of the stepper container (default appearance). Defaults to `--radius-md`.
|
|
23
26
|
*/
|
|
24
27
|
export class LuxenInputStepper extends LuxenElement {
|
|
25
28
|
constructor() {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
--background: var(--l-color-bg-surface, Canvas);
|
|
3
3
|
--color: inherit;
|
|
4
|
-
--radius:
|
|
4
|
+
--border-radius: 6px;
|
|
5
5
|
--max-width: 320px;
|
|
6
|
-
--shadow: 0 4px
|
|
6
|
+
--shadow: 0 4px 6px -1px rgb(0 0 0 / 8%), 0 2px 4px -2px rgb(0 0 0 / 6%);
|
|
7
7
|
--arrow-size: 8px;
|
|
8
8
|
--show-duration: 150ms;
|
|
9
9
|
--hide-duration: 150ms;
|
|
10
10
|
|
|
11
|
-
--_border-color: var(--l-color-border, light-dark(#e5e7eb, #374151));
|
|
11
|
+
--_border-color: var(--l-color-border-overlay, light-dark(#e5e7eb, #374151));
|
|
12
12
|
|
|
13
13
|
display: contents;
|
|
14
14
|
}
|
|
@@ -20,9 +20,8 @@
|
|
|
20
20
|
box-sizing: border-box;
|
|
21
21
|
width: max-content;
|
|
22
22
|
max-width: var(--max-width);
|
|
23
|
-
padding: 12px 16px;
|
|
24
23
|
border: 1px solid var(--_border-color);
|
|
25
|
-
border-radius: var(--radius);
|
|
24
|
+
border-radius: var(--border-radius);
|
|
26
25
|
background: var(--background);
|
|
27
26
|
color: var(--color);
|
|
28
27
|
font-size: 0.875rem;
|
|
@@ -30,6 +29,11 @@
|
|
|
30
29
|
box-shadow: var(--shadow);
|
|
31
30
|
}
|
|
32
31
|
|
|
32
|
+
:host([full-width]) [popover] {
|
|
33
|
+
width: 100vw;
|
|
34
|
+
max-width: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
33
37
|
i {
|
|
34
38
|
position: absolute;
|
|
35
39
|
display: block;
|
|
@@ -12,7 +12,7 @@ import type { Placement } from '@floating-ui/dom';
|
|
|
12
12
|
*
|
|
13
13
|
* @cssproperty --background - Background color. Default: `Canvas`.
|
|
14
14
|
* @cssproperty --color - Text color. Default: inherited.
|
|
15
|
-
* @cssproperty --radius - Border radius. Default `8px`.
|
|
15
|
+
* @cssproperty --border-radius - Border radius. Default `8px`.
|
|
16
16
|
* @cssproperty --max-width - Maximum width. Default `320px`.
|
|
17
17
|
* @cssproperty --shadow - Box shadow.
|
|
18
18
|
* @cssproperty --arrow-size - Arrow size. Default `8px`.
|
|
@@ -33,6 +33,8 @@ export declare class LuxenPopover extends LuxenElement {
|
|
|
33
33
|
accessor open: boolean;
|
|
34
34
|
/** Hide the directional arrow. */
|
|
35
35
|
accessor withoutArrow: boolean;
|
|
36
|
+
/** Stretch the popover to the viewport width. Useful for mega menus. */
|
|
37
|
+
accessor fullWidth: boolean;
|
|
36
38
|
/** Space-separated list of trigger modes: `click`, `hover`, `focus`, `manual`. */
|
|
37
39
|
accessor trigger: string;
|
|
38
40
|
private _hasTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/html/elements/popover/popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAQlD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAgB,MAAM,4BAAwB;IAE9C,OAAO,CAAC,UAAU,CAAuB;IAEzC,OAAO,CAAC,SAAS,CAOd;IAEH,yDAAyD;IAEzD,QAAQ,CAAC,GAAG,SAAM;IAElB,8CAA8C;IAE9C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAY;IAEzC,sDAAsD;IAEtD,QAAQ,CAAC,QAAQ,SAAK;IAEtB,6CAA6C;IAE7C,QAAQ,CAAC,IAAI,UAAS;IAEtB,kCAAkC;IAElC,QAAQ,CAAC,YAAY,UAAS;IAE9B,kFAAkF;IAElF,QAAQ,CAAC,OAAO,SAAW;IAE3B,OAAO,CAAC,WAAW;IAInB,OAAO,KAAK,QAAQ,GAEnB;IAED,OAAO,KAAK,UAAU,GAErB;IAED,OAAO,KAAK,QAAQ,GAEnB;IAED,OAAO,CAAC,YAAY;IAKX,iBAAiB;IAKjB,oBAAoB;IAKpB,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC;IAU9C,IAAI;IAIJ,IAAI;IAIJ,MAAM;YAIQ,iBAAiB;
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/html/elements/popover/popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAQlD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAgB,MAAM,4BAAwB;IAE9C,OAAO,CAAC,UAAU,CAAuB;IAEzC,OAAO,CAAC,SAAS,CAOd;IAEH,yDAAyD;IAEzD,QAAQ,CAAC,GAAG,SAAM;IAElB,8CAA8C;IAE9C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAY;IAEzC,sDAAsD;IAEtD,QAAQ,CAAC,QAAQ,SAAK;IAEtB,6CAA6C;IAE7C,QAAQ,CAAC,IAAI,UAAS;IAEtB,kCAAkC;IAElC,QAAQ,CAAC,YAAY,UAAS;IAE9B,wEAAwE;IAExE,QAAQ,CAAC,SAAS,UAAS;IAE3B,kFAAkF;IAElF,QAAQ,CAAC,OAAO,SAAW;IAE3B,OAAO,CAAC,WAAW;IAInB,OAAO,KAAK,QAAQ,GAEnB;IAED,OAAO,KAAK,UAAU,GAErB;IAED,OAAO,KAAK,QAAQ,GAEnB;IAED,OAAO,CAAC,YAAY;IAKX,iBAAiB;IAKjB,oBAAoB;IAKpB,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC;IAU9C,IAAI;IAIJ,IAAI;IAIJ,MAAM;YAIQ,iBAAiB;IA8B/B,OAAO,CAAC,eAAe,CAIrB;IAEF,OAAO,CAAC,eAAe,CAGrB;IAEF,OAAO,CAAC,UAAU,CAEhB;IACF,OAAO,CAAC,WAAW,CAEjB;IACF,OAAO,CAAC,QAAQ,CAEd;IAEF,OAAO,CAAC,UAAU,CAKhB;IAEF,2DAA2D;IAC3D,OAAO,CAAC,SAAS,CAKf;IAEF,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,uBAAuB;IAOtB,MAAM;CAoBhB"}
|