@luzmo/lucero 1.0.1-alpha.22 → 1.0.1-alpha.23
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/accordion/index.cjs +2 -2
- package/components/accordion/index.js +1 -1
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +2 -2
- package/components/action-button/index.cjs +1 -1
- package/components/action-button/index.js +1 -1
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +1 -1
- package/components/{action-group-DS7x8jfJ.js → action-group-Bwt9w8Vh.js} +1 -1
- package/components/action-group-D917z7XF.cjs +20 -0
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +2 -2
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +3 -3
- package/components/{button-base-BGAqeDTT.js → button-base-B5uul3tZ.js} +1 -1
- package/components/{button-base-CShsEDFM.cjs → button-base-C7or8-FB.cjs} +1 -1
- package/components/{clear-button-CMhq1QsA.js → clear-button-BFtJVPzm.js} +1 -1
- package/components/{clear-button-BWJrTbkk.cjs → clear-button-_a8GjtJC.cjs} +1 -1
- package/components/{close-button-BiJwFZyW.js → close-button-D9qjjy2w.js} +1 -1
- package/components/{close-button-DrMdfzPW.cjs → close-button-TZ08VFmi.cjs} +1 -1
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +1 -1
- package/components/color-palette-group/index.cjs +1 -1
- package/components/color-palette-group/index.js +1 -1
- package/components/color-slider/index.cjs +1 -1
- package/components/color-slider/index.js +1 -1
- package/components/date-time-picker/index.cjs +3 -3
- package/components/date-time-picker/index.js +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +4 -4
- package/components/infield-button/index.cjs +1 -1
- package/components/infield-button/index.js +1 -1
- package/components/menu/index.cjs +3 -3
- package/components/menu/index.js +7 -7
- package/components/number-field/index.cjs +1 -1
- package/components/number-field/index.js +1 -1
- package/components/observe-slot-presence-CNltc0C0.cjs +18 -0
- package/components/{observe-slot-presence-CmVi0zTc.js → observe-slot-presence-DFi6GE3H.js} +1 -1
- package/components/observe-slot-text-CBMHpuIK.cjs +18 -0
- package/components/{observe-slot-text-CugmOzNZ.js → observe-slot-text-DorVpCL4.js} +11 -11
- package/components/options/index.cjs +26 -30
- package/components/options/index.js +198 -252
- package/components/overlay/index.cjs +2 -2
- package/components/overlay/index.js +24 -25
- package/components/picker-button/index.cjs +1 -1
- package/components/picker-button/index.js +2 -2
- package/components/{streaming-listener-BgU36S1Z.js → streaming-listener-BlWm-XZU.js} +4 -5
- package/components/streaming-listener-D9Wc7skA.cjs +18 -0
- package/components/swatch/index.cjs +6 -6
- package/components/swatch/index.js +2 -2
- package/components/tabs/index.cjs +18 -34
- package/components/tabs/index.js +192 -527
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +1 -1
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +1 -1
- package/package.json +1 -1
- package/components/action-group-D6rV7sfq.cjs +0 -20
- package/components/async-directive-CDQoI4mS.js +0 -81
- package/components/async-directive-CddlkYlZ.cjs +0 -22
- package/components/directive-DrvvqO47.cjs +0 -32
- package/components/directive-OK_Jd_xx.js +0 -314
- package/components/mutation-controller-DH7YOCyj.js +0 -52
- package/components/mutation-controller-DkOMCW-c.cjs +0 -22
- package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
- package/components/observe-slot-text-ByPG1Lqw.cjs +0 -18
- package/components/streaming-listener-CfUtuELp.cjs +0 -18
- package/components/when-CDK1Tt5Y.js +0 -28
- package/components/when-CDZyJPvd.cjs +0 -22
|
@@ -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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../overlay-nUwFClQq.cjs"),h=require("lit"),i=require("lit/decorators.js"),b=require("../base-5nDSSNeT.cjs"),
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../overlay-nUwFClQq.cjs"),h=require("lit"),i=require("lit/decorators.js"),b=require("../base-5nDSSNeT.cjs"),d=require("lit/async-directive.js"),u=require("../slottable-request-event-BfUUt1Mh.cjs"),O=":host([disabled]) ::slotted([slot=trigger]){pointer-events:none}slot[name=longpress-describedby-descriptor]{display:none}";var S=Object.defineProperty,l=(g,e,r,t)=>{for(var n=void 0,a=g.length-1,c;a>=0;a--)(c=g[a])&&(n=c(e,r,n)||n);return n&&S(e,r,n),n};class s extends b.LuzmoElement{constructor(){super(...arguments),this.content="click hover longpress",this.offset=6,this.disabled=!1,this.receivesFocus="auto",this.clickContent=[],this.longpressContent=[],this.hoverContent=[],this.targetContent=[]}static get styles(){return[h.unsafeCSS(O)]}getAssignedElementsFromSlot(e){return e.assignedElements({flatten:!0})}handleTriggerContent(e){this.targetContent=this.getAssignedElementsFromSlot(e.target)}handleSlotContent(e){switch(e.target.name){case"click-content":{this.clickContent=this.getAssignedElementsFromSlot(e.target);break}case"longpress-content":{this.longpressContent=this.getAssignedElementsFromSlot(e.target);break}case"hover-content":{this.hoverContent=this.getAssignedElementsFromSlot(e.target);break}}}handleBeforetoggle(e){const{target:r}=e;let t;if(r===this.clickOverlayElement)t="click";else if(r===this.longpressOverlayElement)t="longpress";else if(r===this.hoverOverlayElement)t="hover";else return;e.newState==="open"?this.open=t:this.open===t&&(this.open=void 0)}update(e){var r,t,n,a,c,p;e.has("clickContent")&&(this.clickPlacement=((r=this.clickContent[0])==null?void 0:r.getAttribute("placement"))||((t=this.clickContent[0])==null?void 0:t.getAttribute("direction"))||void 0),e.has("hoverContent")&&(this.hoverPlacement=((n=this.hoverContent[0])==null?void 0:n.getAttribute("placement"))||((a=this.hoverContent[0])==null?void 0:a.getAttribute("direction"))||void 0),e.has("longpressContent")&&(this.longpressPlacement=((c=this.longpressContent[0])==null?void 0:c.getAttribute("placement"))||((p=this.longpressContent[0])==null?void 0:p.getAttribute("direction"))||void 0),super.update(e)}renderSlot(e){return h.html`
|
|
19
19
|
<slot name=${e} @slotchange=${this.handleSlotContent}></slot>
|
|
20
20
|
`}renderClickOverlay(){var t;const e=this.renderSlot("click-content"),r=h.html`
|
|
21
21
|
<luzmo-overlay
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
@slotchange=${this.handleTriggerContent}
|
|
71
71
|
></slot>
|
|
72
72
|
${[this.renderClickOverlay(),this.renderHoverOverlay(),this.renderLongpressOverlay()]}
|
|
73
|
-
`}updated(e){if(super.updated(e),this.disabled&&e.has("disabled")){this.open=void 0;return}}async getUpdateComplete(){return await super.getUpdateComplete()}}l([i.property()],s.prototype,"content");l([i.property({attribute:"triggered-by"})],s.prototype,"triggeredBy");l([i.property({reflect:!0})],s.prototype,"placement");l([i.property()],s.prototype,"type");l([i.property({type:Number})],s.prototype,"offset");l([i.property({reflect:!0})],s.prototype,"open");l([i.property({type:Boolean,reflect:!0})],s.prototype,"disabled");l([i.property({attribute:"receives-focus"})],s.prototype,"receivesFocus");l([i.state()],s.prototype,"clickContent");l([i.state()],s.prototype,"longpressContent");l([i.state()],s.prototype,"hoverContent");l([i.state()],s.prototype,"targetContent");l([i.query("#click-overlay",!0)],s.prototype,"clickOverlayElement");l([i.query("#longpress-overlay",!0)],s.prototype,"longpressOverlayElement");l([i.query("#hover-overlay",!0)],s.prototype,"hoverOverlayElement");function
|
|
73
|
+
`}updated(e){if(super.updated(e),this.disabled&&e.has("disabled")){this.open=void 0;return}}async getUpdateComplete(){return await super.getUpdateComplete()}}l([i.property()],s.prototype,"content");l([i.property({attribute:"triggered-by"})],s.prototype,"triggeredBy");l([i.property({reflect:!0})],s.prototype,"placement");l([i.property()],s.prototype,"type");l([i.property({type:Number})],s.prototype,"offset");l([i.property({reflect:!0})],s.prototype,"open");l([i.property({type:Boolean,reflect:!0})],s.prototype,"disabled");l([i.property({attribute:"receives-focus"})],s.prototype,"receivesFocus");l([i.state()],s.prototype,"clickContent");l([i.state()],s.prototype,"longpressContent");l([i.state()],s.prototype,"hoverContent");l([i.state()],s.prototype,"targetContent");l([i.query("#click-overlay",!0)],s.prototype,"clickOverlayElement");l([i.query("#longpress-overlay",!0)],s.prototype,"longpressOverlayElement");l([i.query("#hover-overlay",!0)],s.prototype,"hoverOverlayElement");function $(g,e,r,t){return o.LuzmoOverlay.open(g,e,r,t)}class y extends d.AsyncDirective{render(e){return h.nothing}update(e,[r]){this.template=r,this.target!==e.element&&(this.target=e.element,this.renderBefore=this.target.children[0]),this.listenerHost=this.target,this.init()}handleSlottableRequest(e){if(e.target!==e.currentTarget)return;const r=e.data===u.removeSlottableRequest;h.render(r?void 0:this.template(),this.target,{renderBefore:this.renderBefore})}init(){var r;(r=this.listeners)==null||r.abort(),this.listeners=new AbortController;const{signal:e}=this.listeners;this.listenerHost.addEventListener("slottable-request",t=>this.handleSlottableRequest(t),{signal:e})}disconnected(){var e;(e=this.listeners)==null||e.abort()}reconnected(){this.init()}}const k=d.directive(y);class f extends y{constructor(){super(...arguments),this.defaultOptions={triggerInteraction:"click",overlayOptions:{type:"auto",offset:0}},this.options={...this.defaultOptions.overlayOptions}}render(e,r){return h.nothing}update(e,[r,t]){var p,v,m;this.options={...this.defaultOptions.overlayOptions,...t==null?void 0:t.overlayOptions},this.insertionOptions=t==null?void 0:t.insertionOptions,this.template=r,this.host=(p=e.options)==null?void 0:p.host;let n=!1;const a=(t==null?void 0:t.triggerInteraction)||this.defaultOptions.triggerInteraction,c=o.InteractionTypes[(v=this.strategy)==null?void 0:v.type]!==a;this.target!==e.element&&(this.target=e.element,n=!0),(n||c)&&((m=this.strategy)==null||m.abort(),this.strategy=new o.strategies[a](this.target,{isPersistent:!0,handleOverlayReady:C=>{this.listenerHost=this.overlay=C,this.init()}})),this.strategy.open=(t==null?void 0:t.open)??!1}handleSlottableRequest(e){var n,a;if(e.target!==e.currentTarget)return;const r=e.data===u.removeSlottableRequest,t={};if(this.host&&(t.host=this.host),h.render(r?void 0:this.template(),this.overlay,t),r)this.overlay.remove();else{o.LuzmoAbstractOverlay.applyOptions(this.overlay,{...this.options,trigger:this.target});const c=typeof((n=this.insertionOptions)==null?void 0:n.el)=="function"?this.insertionOptions.el():((a=this.insertionOptions)==null?void 0:a.el)||this.target,{where:p="afterend"}=this.insertionOptions||{};c.insertAdjacentElement(p,this.overlay)}}}const E=d.directive(f);customElements.get("luzmo-overlay")||customElements.define("luzmo-overlay",o.LuzmoOverlay);customElements.get("luzmo-overlay-trigger")||customElements.define("luzmo-overlay-trigger",s);exports.ClickController=o.ClickController;exports.HoverController=o.HoverController;exports.InteractionController=o.InteractionController;exports.InteractionTypes=o.InteractionTypes;exports.LONGPRESS_INSTRUCTIONS=o.LONGPRESS_INSTRUCTIONS;exports.LongpressController=o.LongpressController;exports.LuzmoAbstractOverlay=o.LuzmoAbstractOverlay;exports.LuzmoOverlay=o.LuzmoOverlay;exports.PlacementController=o.PlacementController;exports.SAFARI_FOCUS_RING_CLASS=o.SAFARI_FOCUS_RING_CLASS;exports.VirtualTrigger=o.VirtualTrigger;exports.guaranteedAllTransitionend=o.guaranteedAllTransitionend;exports.lastInteractionType=o.lastInteractionType;exports.nextFrame=o.nextFrame;exports.noop=o.noop;exports.overlayTimer=o.overlayTimer;exports.placementUpdatedSymbol=o.placementUpdatedSymbol;exports.SlottableRequestEvent=u.SlottableRequestEvent;exports.removeSlottableRequest=u.removeSlottableRequest;exports.LuzmoOverlayTrigger=s;exports.OverlayTriggerDirective=f;exports.SlottableRequestDirective=y;exports.openOverlay=$;exports.slottableRequest=k;exports.trigger=E;
|
|
@@ -16,14 +16,13 @@
|
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
18
|
import { e as f, I as O, s as S, L as $ } from "../overlay-DpWon1Rp.js";
|
|
19
|
-
import { C as
|
|
19
|
+
import { C as V, H as j, b as M, c as J, d as K, P as Q, S as W, V as X, g as Y, l as Z, a as ee, n as te, o as oe, p as re } from "../overlay-DpWon1Rp.js";
|
|
20
20
|
import { unsafeCSS as E, html as m, nothing as z, render as v } from "lit";
|
|
21
21
|
import { property as c, state as g, query as h } from "lit/decorators.js";
|
|
22
22
|
import { a as w } from "../base-CdYjmV_8.js";
|
|
23
|
-
import {
|
|
24
|
-
import { f as A } from "../async-directive-CDQoI4mS.js";
|
|
23
|
+
import { directive as b, AsyncDirective as A } from "lit/async-directive.js";
|
|
25
24
|
import { r as y } from "../slottable-request-event-DggLA4Rx.js";
|
|
26
|
-
import { S as
|
|
25
|
+
import { S as se } from "../slottable-request-event-DggLA4Rx.js";
|
|
27
26
|
const k = () => {
|
|
28
27
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
29
28
|
const i = document.createElement("style");
|
|
@@ -218,7 +217,7 @@ s([
|
|
|
218
217
|
s([
|
|
219
218
|
h("#hover-overlay", !0)
|
|
220
219
|
], r.prototype, "hoverOverlayElement");
|
|
221
|
-
function
|
|
220
|
+
function H(i, e, o, t) {
|
|
222
221
|
return f.open(
|
|
223
222
|
i,
|
|
224
223
|
e,
|
|
@@ -261,7 +260,7 @@ class x extends A {
|
|
|
261
260
|
this.init();
|
|
262
261
|
}
|
|
263
262
|
}
|
|
264
|
-
const
|
|
263
|
+
const U = b(x);
|
|
265
264
|
class R extends x {
|
|
266
265
|
constructor() {
|
|
267
266
|
super(...arguments), this.defaultOptions = {
|
|
@@ -314,33 +313,33 @@ class R extends x {
|
|
|
314
313
|
}
|
|
315
314
|
}
|
|
316
315
|
}
|
|
317
|
-
const
|
|
316
|
+
const N = b(R);
|
|
318
317
|
customElements.get("luzmo-overlay") || customElements.define("luzmo-overlay", f);
|
|
319
318
|
customElements.get("luzmo-overlay-trigger") || customElements.define("luzmo-overlay-trigger", r);
|
|
320
319
|
export {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
320
|
+
V as ClickController,
|
|
321
|
+
j as HoverController,
|
|
322
|
+
M as InteractionController,
|
|
324
323
|
O as InteractionTypes,
|
|
325
|
-
|
|
326
|
-
|
|
324
|
+
J as LONGPRESS_INSTRUCTIONS,
|
|
325
|
+
K as LongpressController,
|
|
327
326
|
$ as LuzmoAbstractOverlay,
|
|
328
327
|
f as LuzmoOverlay,
|
|
329
328
|
r as LuzmoOverlayTrigger,
|
|
330
329
|
R as OverlayTriggerDirective,
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
Q as PlacementController,
|
|
331
|
+
W as SAFARI_FOCUS_RING_CLASS,
|
|
333
332
|
x as SlottableRequestDirective,
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
333
|
+
se as SlottableRequestEvent,
|
|
334
|
+
X as VirtualTrigger,
|
|
335
|
+
Y as guaranteedAllTransitionend,
|
|
336
|
+
Z as lastInteractionType,
|
|
337
|
+
ee as nextFrame,
|
|
338
|
+
te as noop,
|
|
339
|
+
H as openOverlay,
|
|
340
|
+
oe as overlayTimer,
|
|
341
|
+
re as placementUpdatedSymbol,
|
|
343
342
|
y as removeSlottableRequest,
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
U as slottableRequest,
|
|
344
|
+
N as trigger
|
|
346
345
|
};
|
|
@@ -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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("lit"),l=require("../sized-mixin-DcvJLFeo.cjs"),b=require("@luzmo/icons"),a=require("lit/decorators.js"),s=require("lit/directives/class-map.js"),p=require("../observe-slot-presence-bc9chhsi.cjs"),k=require("../button-base-CShsEDFM.cjs");require("../icon/index.cjs");const v="@media (hover: hover){.root:hover{--picker-button-background-color: var( --luzmo-picker-button-background-color-hover, var(--picker-button-background-color-hover) );--picker-button-font-color: var( --luzmo-picker-button-font-color-hover, var(--picker-button-font-color-hover) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-hover, var(--picker-button-icon-color-hover) )}}:host([open]) .root,:host(:is(:active,[active])) .root{--picker-button-background-color: var( --luzmo-picker-button-background-color-down, var(--picker-button-background-color-down) );--picker-button-font-color: var( --luzmo-picker-button-font-color-down, var(--picker-button-font-color-down) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-down, var(--picker-button-icon-color-down) )}:host([focused]) .root,.root:focus,.root:focus-visible{--picker-button-background-color: var( --luzmo-picker-button-background-color-key-focus, var(--picker-button-background-color-key-focus) );--picker-button-font-color: var( --luzmo-picker-button-font-color-key-focus, var(--picker-button-font-color-key-focus) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-key-focus, var(--picker-button-icon-color-key-focus) )}:host([disabled]) .root{--picker-button-background-color: var( --luzmo-picker-button-background-color-disabled, var(--luzmo-background-color-disabled) );--picker-button-background-color-hover: var( --luzmo-picker-button-background-color-hover-disabled, var(--luzmo-background-color-disabled) );--picker-button-background-color-down: var( --luzmo-picker-button-background-color-down-disabled, var(--luzmo-background-color-disabled) );--picker-button-border-color: var( --luzmo-picker-button-border-color-disabled, var(--luzmo-background-color-disabled) );--picker-button-font-color: var( --luzmo-picker-button-font-color-disabled, var(--luzmo-font-color-disabled) );--picker-button-font-color-hover: var( --luzmo-picker-button-font-color-hover-disabled, var(--luzmo-font-color-disabled) );--picker-button-font-color-down: var( --luzmo-picker-button-font-color-down-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color-hover: var( --luzmo-picker-button-icon-color-hover-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color-down: var( --luzmo-picker-button-icon-color-down-disabled, var(--luzmo-font-color-disabled) )}:host([quiet]) .root{--luzmo-picker-button-background-color: var( --luzmo-picker-button-background-color-quiet, transparent );--luzmo-picker-button-background-color-hover: var( --luzmo-picker-button-background-color-hover-quiet, transparent );--luzmo-picker-button-background-color-down: var( --luzmo-picker-button-background-color-down-quiet, transparent );--luzmo-picker-button-background-color-key-focus: var( --luzmo-picker-button-background-color-key-focus-quiet, transparent );--luzmo-picker-button-border-color: var( --luzmo-picker-button-border-color-quiet, transparent )}.root{background-color:initial;block-size:var(--luzmo-picker-button-width, var(--picker-button-width));box-sizing:border-box;padding:var(--luzmo-picker-button-padding, var(--picker-button-padding));border-style:none;justify-content:center;align-items:center;display:flex}.root.uiicononly{inline-size:var(--luzmo-picker-button-height, var(--picker-button-height))}.luzmo-picker-button-label{color:var(--luzmo-picker-button-font-color, var(--picker-button-font-color));white-space:nowrap;font-family:var(--luzmo-picker-button-font-family, var(--picker-button-font-family));font-style:var(--luzmo-picker-button-font-style, var(--picker-button-font-style));font-weight:var(--luzmo-picker-button-font-weight, var(--picker-button-font-weight));font-size:var(--luzmo-picker-button-font-size, var(--picker-button-font-size));flex:auto;padding-block-start:var(--luzmo-picker-button-label-padding, var(--picker-button-label-padding));padding-block-end:var(--luzmo-picker-button-label-padding, var(--picker-button-label-padding));overflow:hidden}.uiicononly .luzmo-picker-button-label{display:none}:host(:focus-visible) .luzmo-picker-button-fill{border-color:var(--luzmo-picker-button-indicator-color, var(--picker-button-indicator-color));background-color:var(--luzmo-picker-button-background-color-key-focus, var(--picker-button-background-color-key-focus))}.luzmo-picker-button-fill{box-sizing:border-box;block-size:100%;inline-size:100%;justify-content:center;align-items:center;gap:var(--luzmo-picker-button-gap, var(--picker-button-gap));background-color:var(--luzmo-picker-button-background-color, var(--picker-button-background-color));border-color:var(--luzmo-picker-button-border-color, var(--picker-button-border-color));border-width:var(--luzmo-picker-button-border-width, var(--picker-button-border-width));padding:var(--luzmo-picker-button-horizontal-padding, var(--picker-button-horizontal-padding));transition:border-color var(--luzmo-picker-button-background-animation-duration, var(--picker-button-background-animation-duration)) ease-in-out;border-style:solid;border-start-start-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-start-end-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-end-end-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-end-start-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));display:flex}:host([position=right]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided));border-end-start-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided))}:host([position=right][rounded]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided));border-end-start-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided))}:host([position=left]) .luzmo-picker-button-fill{border-start-end-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided));border-end-end-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided))}:host([position=left][rounded]) .luzmo-picker-button-fill{border-start-end-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided));border-end-end-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided))}:host([rounded]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-start-end-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-end-end-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-end-start-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded))}.uiicononly .luzmo-picker-button-fill{padding:0}.textuiicon .luzmo-picker-button-fill{inline-size:auto}.luzmo-picker-button-icon{color:var(--luzmo-picker-button-icon-color, var(--picker-button-icon-color));flex-shrink:0}.root{--picker-button-height: var(--luzmo-component-height);--picker-button-width: var(--luzmo-component-height);--picker-button-gap: calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--picker-button-label-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--picker-button-horizontal-padding: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--picker-button-indicator-color: var(--luzmo-indicator-color);--picker-button-icon-color: var(--luzmo-font-color);--picker-button-icon-color-hover: var(--luzmo-font-color-hover);--picker-button-icon-color-down: var(--luzmo-font-color-down);--picker-button-icon-color-key-focus: var(--luzmo-font-color-focus);--picker-button-font-color: var(--luzmo-font-color);--picker-button-font-color-hover: var(--luzmo-font-color-hover);--picker-button-font-color-down: var(--luzmo-font-color-down);--picker-button-font-color-key-focus: var(--neutral-content-color-focus);--picker-button-font-family: var(--luzmo-font-family);--picker-button-font-style: var(--luzmo-font-style);--picker-button-font-weight: var(--body-sans-serif-font-weight);--picker-button-font-size: var(--luzmo-font-size);--picker-button-border-radius-rounded: var(--luzmo-border-radius);--picker-button-background-animation-duration: var( --luzmo-animation-duration )}.root{--picker-button-background-color: var(--luzmo-background-color);--picker-button-background-color-hover: var(--luzmo-background-color-hover);--picker-button-background-color-down: var(--luzmo-background-color-down);--picker-button-background-color-key-focus: var( --luzmo-background-color-focus );--picker-button-border-color: var(--luzmo-border-color);--picker-button-border-radius: var(--luzmo-border-radius);--picker-button-border-radius-rounded-sided: var(--luzmo-border-radius);--picker-button-border-radius-sided: 0;--picker-button-border-width: var(--luzmo-border-width)}:host([size=s]) .root{--picker-button-height: var(--luzmo-component-height-s);--picker-button-width: var(--luzmo-component-height-s);--picker-button-label-padding: var(--luzmo-spacing-2);--picker-button-font-size: var(--luzmo-font-size-s);--picker-button-horizontal-padding: var(--luzmo-spacing-3)}:host([size=l]) .root{--picker-button-height: var(--luzmo-component-height-l);--picker-button-width: var(--luzmo-component-height-l);--picker-button-label-padding: var(--luzmo-spacing-3);--picker-button-font-size: var(--luzmo-font-size-l);--picker-button-horizontal-padding: var(--luzmo-spacing-4)}:host([size=xl]) .root{--picker-button-height: var(--luzmo-component-height-xl);--picker-button-width: var(--luzmo-component-height-xl);--picker-button-label-padding: var(--luzmo-spacing-4);--picker-button-font-size: var(--luzmo-font-size-xl);--picker-button-horizontal-padding: var(--luzmo-spacing-5)}:host{display:inline-flex}.root{display:flex}";var z=Object.defineProperty,d=(e,r,i,m)=>{for(var o=void 0,n=e.length-1,u;n>=0;n--)(u=e[n])&&(o=u(r,i,o)||o);return o&&z(r,i,o),o};class t extends l.SizedMixin(p.ObserveSlotPresence(k.LuzmoButtonBase,'[slot="label"]')){constructor(){super(...arguments),this.invalid=!1,this.position="right"}static get styles(){return[c.unsafeCSS(v)]}get hasText(){return this.slotContentIsPresent}render(){const r={root:!0,uiicononly:!this.hasText,textuiicon:this.hasText};return c.html`
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("lit"),l=require("../sized-mixin-DcvJLFeo.cjs"),b=require("@luzmo/icons"),a=require("lit/decorators.js"),s=require("lit/directives/class-map.js"),p=require("../observe-slot-presence-CNltc0C0.cjs"),k=require("../button-base-C7or8-FB.cjs");require("../icon/index.cjs");const v="@media (hover: hover){.root:hover{--picker-button-background-color: var( --luzmo-picker-button-background-color-hover, var(--picker-button-background-color-hover) );--picker-button-font-color: var( --luzmo-picker-button-font-color-hover, var(--picker-button-font-color-hover) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-hover, var(--picker-button-icon-color-hover) )}}:host([open]) .root,:host(:is(:active,[active])) .root{--picker-button-background-color: var( --luzmo-picker-button-background-color-down, var(--picker-button-background-color-down) );--picker-button-font-color: var( --luzmo-picker-button-font-color-down, var(--picker-button-font-color-down) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-down, var(--picker-button-icon-color-down) )}:host([focused]) .root,.root:focus,.root:focus-visible{--picker-button-background-color: var( --luzmo-picker-button-background-color-key-focus, var(--picker-button-background-color-key-focus) );--picker-button-font-color: var( --luzmo-picker-button-font-color-key-focus, var(--picker-button-font-color-key-focus) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-key-focus, var(--picker-button-icon-color-key-focus) )}:host([disabled]) .root{--picker-button-background-color: var( --luzmo-picker-button-background-color-disabled, var(--luzmo-background-color-disabled) );--picker-button-background-color-hover: var( --luzmo-picker-button-background-color-hover-disabled, var(--luzmo-background-color-disabled) );--picker-button-background-color-down: var( --luzmo-picker-button-background-color-down-disabled, var(--luzmo-background-color-disabled) );--picker-button-border-color: var( --luzmo-picker-button-border-color-disabled, var(--luzmo-background-color-disabled) );--picker-button-font-color: var( --luzmo-picker-button-font-color-disabled, var(--luzmo-font-color-disabled) );--picker-button-font-color-hover: var( --luzmo-picker-button-font-color-hover-disabled, var(--luzmo-font-color-disabled) );--picker-button-font-color-down: var( --luzmo-picker-button-font-color-down-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color: var( --luzmo-picker-button-icon-color-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color-hover: var( --luzmo-picker-button-icon-color-hover-disabled, var(--luzmo-font-color-disabled) );--picker-button-icon-color-down: var( --luzmo-picker-button-icon-color-down-disabled, var(--luzmo-font-color-disabled) )}:host([quiet]) .root{--luzmo-picker-button-background-color: var( --luzmo-picker-button-background-color-quiet, transparent );--luzmo-picker-button-background-color-hover: var( --luzmo-picker-button-background-color-hover-quiet, transparent );--luzmo-picker-button-background-color-down: var( --luzmo-picker-button-background-color-down-quiet, transparent );--luzmo-picker-button-background-color-key-focus: var( --luzmo-picker-button-background-color-key-focus-quiet, transparent );--luzmo-picker-button-border-color: var( --luzmo-picker-button-border-color-quiet, transparent )}.root{background-color:initial;block-size:var(--luzmo-picker-button-width, var(--picker-button-width));box-sizing:border-box;padding:var(--luzmo-picker-button-padding, var(--picker-button-padding));border-style:none;justify-content:center;align-items:center;display:flex}.root.uiicononly{inline-size:var(--luzmo-picker-button-height, var(--picker-button-height))}.luzmo-picker-button-label{color:var(--luzmo-picker-button-font-color, var(--picker-button-font-color));white-space:nowrap;font-family:var(--luzmo-picker-button-font-family, var(--picker-button-font-family));font-style:var(--luzmo-picker-button-font-style, var(--picker-button-font-style));font-weight:var(--luzmo-picker-button-font-weight, var(--picker-button-font-weight));font-size:var(--luzmo-picker-button-font-size, var(--picker-button-font-size));flex:auto;padding-block-start:var(--luzmo-picker-button-label-padding, var(--picker-button-label-padding));padding-block-end:var(--luzmo-picker-button-label-padding, var(--picker-button-label-padding));overflow:hidden}.uiicononly .luzmo-picker-button-label{display:none}:host(:focus-visible) .luzmo-picker-button-fill{border-color:var(--luzmo-picker-button-indicator-color, var(--picker-button-indicator-color));background-color:var(--luzmo-picker-button-background-color-key-focus, var(--picker-button-background-color-key-focus))}.luzmo-picker-button-fill{box-sizing:border-box;block-size:100%;inline-size:100%;justify-content:center;align-items:center;gap:var(--luzmo-picker-button-gap, var(--picker-button-gap));background-color:var(--luzmo-picker-button-background-color, var(--picker-button-background-color));border-color:var(--luzmo-picker-button-border-color, var(--picker-button-border-color));border-width:var(--luzmo-picker-button-border-width, var(--picker-button-border-width));padding:var(--luzmo-picker-button-horizontal-padding, var(--picker-button-horizontal-padding));transition:border-color var(--luzmo-picker-button-background-animation-duration, var(--picker-button-background-animation-duration)) ease-in-out;border-style:solid;border-start-start-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-start-end-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-end-end-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));border-end-start-radius:var(--luzmo-picker-button-border-radius, var(--picker-button-border-radius));display:flex}:host([position=right]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided));border-end-start-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided))}:host([position=right][rounded]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided));border-end-start-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided))}:host([position=left]) .luzmo-picker-button-fill{border-start-end-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided));border-end-end-radius:var(--luzmo-picker-button-border-radius-sided, var(--picker-button-border-radius-sided))}:host([position=left][rounded]) .luzmo-picker-button-fill{border-start-end-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided));border-end-end-radius:var(--luzmo-picker-button-border-radius-rounded-sided, var(--picker-button-border-radius-rounded-sided))}:host([rounded]) .luzmo-picker-button-fill{border-start-start-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-start-end-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-end-end-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded));border-end-start-radius:var(--luzmo-picker-button-border-radius-rounded, var(--picker-button-border-radius-rounded))}.uiicononly .luzmo-picker-button-fill{padding:0}.textuiicon .luzmo-picker-button-fill{inline-size:auto}.luzmo-picker-button-icon{color:var(--luzmo-picker-button-icon-color, var(--picker-button-icon-color));flex-shrink:0}.root{--picker-button-height: var(--luzmo-component-height);--picker-button-width: var(--luzmo-component-height);--picker-button-gap: calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--picker-button-label-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--picker-button-horizontal-padding: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--picker-button-indicator-color: var(--luzmo-indicator-color);--picker-button-icon-color: var(--luzmo-font-color);--picker-button-icon-color-hover: var(--luzmo-font-color-hover);--picker-button-icon-color-down: var(--luzmo-font-color-down);--picker-button-icon-color-key-focus: var(--luzmo-font-color-focus);--picker-button-font-color: var(--luzmo-font-color);--picker-button-font-color-hover: var(--luzmo-font-color-hover);--picker-button-font-color-down: var(--luzmo-font-color-down);--picker-button-font-color-key-focus: var(--neutral-content-color-focus);--picker-button-font-family: var(--luzmo-font-family);--picker-button-font-style: var(--luzmo-font-style);--picker-button-font-weight: var(--body-sans-serif-font-weight);--picker-button-font-size: var(--luzmo-font-size);--picker-button-border-radius-rounded: var(--luzmo-border-radius);--picker-button-background-animation-duration: var( --luzmo-animation-duration )}.root{--picker-button-background-color: var(--luzmo-background-color);--picker-button-background-color-hover: var(--luzmo-background-color-hover);--picker-button-background-color-down: var(--luzmo-background-color-down);--picker-button-background-color-key-focus: var( --luzmo-background-color-focus );--picker-button-border-color: var(--luzmo-border-color);--picker-button-border-radius: var(--luzmo-border-radius);--picker-button-border-radius-rounded-sided: var(--luzmo-border-radius);--picker-button-border-radius-sided: 0;--picker-button-border-width: var(--luzmo-border-width)}:host([size=s]) .root{--picker-button-height: var(--luzmo-component-height-s);--picker-button-width: var(--luzmo-component-height-s);--picker-button-label-padding: var(--luzmo-spacing-2);--picker-button-font-size: var(--luzmo-font-size-s);--picker-button-horizontal-padding: var(--luzmo-spacing-3)}:host([size=l]) .root{--picker-button-height: var(--luzmo-component-height-l);--picker-button-width: var(--luzmo-component-height-l);--picker-button-label-padding: var(--luzmo-spacing-3);--picker-button-font-size: var(--luzmo-font-size-l);--picker-button-horizontal-padding: var(--luzmo-spacing-4)}:host([size=xl]) .root{--picker-button-height: var(--luzmo-component-height-xl);--picker-button-width: var(--luzmo-component-height-xl);--picker-button-label-padding: var(--luzmo-spacing-4);--picker-button-font-size: var(--luzmo-font-size-xl);--picker-button-horizontal-padding: var(--luzmo-spacing-5)}:host{display:inline-flex}.root{display:flex}";var z=Object.defineProperty,d=(e,r,i,m)=>{for(var o=void 0,n=e.length-1,u;n>=0;n--)(u=e[n])&&(o=u(r,i,o)||o);return o&&z(r,i,o),o};class t extends l.SizedMixin(p.ObserveSlotPresence(k.LuzmoButtonBase,'[slot="label"]')){constructor(){super(...arguments),this.invalid=!1,this.position="right"}static get styles(){return[c.unsafeCSS(v)]}get hasText(){return this.slotContentIsPresent}render(){const r={root:!0,uiicononly:!this.hasText,textuiicon:this.hasText};return c.html`
|
|
19
19
|
<div class=${s.classMap(r)}>
|
|
20
20
|
<div class="luzmo-picker-button-fill">
|
|
21
21
|
<span
|
|
@@ -20,8 +20,8 @@ import { S as s } from "../sized-mixin-cJbo3PKR.js";
|
|
|
20
20
|
import { luzmoAngleDown as p } from "@luzmo/icons";
|
|
21
21
|
import { property as l } from "lit/decorators.js";
|
|
22
22
|
import { classMap as m } from "lit/directives/class-map.js";
|
|
23
|
-
import { O as z } from "../observe-slot-presence-
|
|
24
|
-
import { L as k } from "../button-base-
|
|
23
|
+
import { O as z } from "../observe-slot-presence-DFi6GE3H.js";
|
|
24
|
+
import { L as k } from "../button-base-B5uul3tZ.js";
|
|
25
25
|
import "../icon/index.js";
|
|
26
26
|
const a = () => {
|
|
27
27
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
@@ -16,11 +16,10 @@
|
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
18
|
import { nothing as a } from "lit";
|
|
19
|
-
import {
|
|
20
|
-
import { e as m } from "./directive-OK_Jd_xx.js";
|
|
19
|
+
import { directive as d, AsyncDirective as m } from "lit/async-directive.js";
|
|
21
20
|
const s = ["", () => {
|
|
22
21
|
}];
|
|
23
|
-
class l extends
|
|
22
|
+
class l extends m {
|
|
24
23
|
constructor() {
|
|
25
24
|
super(...arguments), this.start = s, this.streamInside = s, this.end = s, this.streamOutside = s, this.state = "off", this.handleStart = (e) => {
|
|
26
25
|
this.clearStream(), this.callHandler(this.start[1], e), !e.defaultPrevented && (this.removeListeners(), this.addListeners("on"));
|
|
@@ -83,9 +82,9 @@ class l extends d {
|
|
|
83
82
|
this.addListeners();
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
|
-
const
|
|
85
|
+
const f = d(
|
|
87
86
|
l
|
|
88
87
|
);
|
|
89
88
|
export {
|
|
90
|
-
|
|
89
|
+
f as s
|
|
91
90
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
"use strict";const d=require("lit"),n=require("lit/async-directive.js"),s=["",()=>{}];class m extends n.AsyncDirective{constructor(){super(...arguments),this.start=s,this.streamInside=s,this.end=s,this.streamOutside=s,this.state="off",this.handleStart=e=>{this.clearStream(),this.callHandler(this.start[1],e),!e.defaultPrevented&&(this.removeListeners(),this.addListeners("on"))},this.handleInside=e=>{this.handleStream(this.streamInside[1],e)},this.handleEnd=e=>{this.clearStream(),this.callHandler(this.end[1],e),this.removeListeners(),this.addListeners("off")},this.handleOutside=e=>{this.handleStream(this.streamOutside[1],e)}}render(e){return d.nothing}update(e,[{start:t,end:i,streamInside:h=s,streamOutside:a=s}]){var r;this.element!==e.element&&(this.element=e.element,this.removeListeners()),this.host=((r=e.options)==null?void 0:r.host)||this.element,this.start=t,this.end=i,this.streamInside=h,this.streamOutside=a,this.addListeners()}addListeners(e){this.state=e||this.state,this.state==="off"?(this.addListener(this.streamOutside[0],this.handleOutside),this.addListener(this.start[0],this.handleStart)):this.state==="on"&&(this.addListener(this.streamInside[0],this.handleInside),this.addListener(this.end[0],this.handleEnd))}callHandler(e,t){typeof e=="function"?e.call(this.host,t):e.handleEvent(t)}handleStream(e,t){this.stream||(this.callHandler(e,t),this.stream=requestAnimationFrame(()=>{this.stream=void 0}))}clearStream(){this.stream!=null&&(cancelAnimationFrame(this.stream),this.stream=void 0)}addListener(e,t){Array.isArray(e)?e.map(i=>{this.element.addEventListener(i,t)}):this.element.addEventListener(e,t)}removeListener(e,t){Array.isArray(e)?e.map(i=>{this.element.removeEventListener(i,t)}):this.element.removeEventListener(e,t)}removeListeners(){this.removeListener(this.start[0],this.handleStart),this.removeListener(this.streamInside[0],this.handleInside),this.removeListener(this.end[0],this.handleEnd),this.removeListener(this.streamOutside[0],this.handleOutside)}disconnected(){this.removeListeners()}reconnected(){this.addListeners()}}const l=n.directive(m);exports.streamingListener=l;
|
|
@@ -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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@luzmo/icons"),u=require("lit"),r=require("lit/decorators.js"),
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@luzmo/icons"),u=require("lit"),r=require("lit/decorators.js"),g=require("lit/directives/if-defined.js"),b=require("lit/directives/when.js"),v=require("../focusable-CbVKgGfS.cjs"),f=require("../sized-mixin-DcvJLFeo.cjs"),m=require("@lit-labs/observers/mutation-controller.js"),z=require("../base-5nDSSNeT.cjs"),y=require("../roving-tabindex-By_fCy_e.cjs"),x='@media (forced-colors: active){:host{--highcontrast-swatch-disabled-icon-color: GrayText;--highcontrast-swatch-focus-indicator-color: ButtonText;--highcontrast-swatch-background-color-selected: Background;--highcontrast-swatch-border-color-selected: Highlight;--highcontrast-swatch-border-color: ButtonText;--highcontrast-swatch-fill-foreground-color: ButtonText}.fill{forced-color-adjust:none}:host([disabled]){--highcontrast-swatch-border-color: GrayText}}:host{box-sizing:border-box;inline-size:var(--luzmo-swatch-size, var(--swatch-size));block-size:var(--luzmo-swatch-size, var(--swatch-size));-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:flex;position:relative}.disabled-icon{inline-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size));block-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size))}:host,:host:before{border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius))}:host([selected]){background-color:var(--highcontrast-swatch-background-color-selected, var(--luzmo-swatch-inner-border-color-selected, var(--swatch-inner-border-color-selected)))}:host([selected]) .fill:before{box-shadow:none;border-radius:0}:host([selected]):before{opacity:1}:host .is-image .fill:before{background-color:initial}:host([mixed-value]) .fill{background:none;background:var(--picked-color, transparent)}:host([mixed-value]) .mixed-value-icon{color:var(--swatch-dash-icon-color);display:block}:host([nothing]) .fill{background-color:initial;background-color:var(--picked-color, transparent);background-image:none}:host([nothing]) .fill:after{inline-size:var(--luzmo-swatch-slash-thickness, var(--swatch-slash-thickness));content:"";block-size:200%;background:var(--highcontrast-swatch-fill-foreground-color, var(--luzmo-swatch-slash-icon-color, var(--swatch-slash-icon-color)));position:absolute;transform:rotate(-45deg)}:host([nothing][shape=rectangle]) .fill:after{transform:rotate(-25deg)}:host([disabled]) .disabled-icon{display:block}:host:before{content:"";border-width:var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected));border-style:solid;border-color:var(--highcontrast-swatch-border-color-selected, var(--luzmo-swatch-border-color-selected, var(--swatch-border-color-selected)));opacity:0;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}:host:after{content:"";inset:calc(var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)) * -2);background-color:var(--luzmo-swatch-focus-indicator-background-color, var(--luzmo-background-color));z-index:-1;opacity:0;border-width:var(--luzmo-swatch-focus-indicator-width, var(--swatch-focus-indicator-width));border-style:solid;border-color:var(--highcontrast-swatch-focus-indicator-color, var(--luzmo-swatch-focus-indicator-color, var(--swatch-focus-indicator-color)));border-radius:var(--luzmo-swatch-focus-indicator-border-radius, var(--swatch-focus-indicator-border-radius));transition:opacity var(--luzmo-animation-duration) ease-in-out;position:absolute}:host(:focus-visible):after{opacity:1}.fill{inline-size:100%;block-size:100%;box-sizing:border-box;border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius));justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.fill:before{content:"";z-index:0;box-sizing:border-box;box-shadow:inset 0 0 0 var(--luzmo-swatch-border-thickness, var(--swatch-border-thickness)) var(--highcontrast-swatch-border-color, var(--luzmo-swatch-border-color, var(--swatch-border-color)));border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius));position:absolute;top:0;right:0;bottom:0;left:0}:host([border=none]) .fill:before,.fill:before{background-color:initial;background-color:var(--picked-color, transparent)}:host([border=none]) .fill:before{box-shadow:none}.mixed-value-icon{pointer-events:none;color:#0000;color:var(--picked-color, transparent);display:none}.disabled-icon{z-index:1;pointer-events:none;color:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)));stroke:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)));display:none;position:relative}.disabled-icon path:first-child{fill:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)))}.disabled-icon path:last-child{fill:var(--luzmo-swatch-icon-border-color, var(--swatch-icon-border-color))}:host([shape=rectangle]){inline-size:calc(var(--luzmo-swatch-size, var(--swatch-size)) * 2)}:host([rounding=none]),:host([rounding=none]) .fill,:host([rounding=none]) .fill:before,:host([rounding=none][selected]) .fill,:host([rounding=none][selected]) .fill:before,:host([rounding=none]):after,:host([rounding=none]):before{border-radius:0}:host([rounding=full][selected]:not([shape=rectangle])) .fill,:host([rounding=full][selected]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])),:host([rounding=full]:not([shape=rectangle])) .fill,:host([rounding=full]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])):after,:host([rounding=full]:not([shape=rectangle])):before{border-radius:100%}:host([selected]) .fill{width:calc(var(--luzmo-swatch-size, var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)));height:calc(var(--luzmo-swatch-size, var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)))}:host([selected][shape=rectangle]) .fill{width:calc(var(--luzmo-swatch-size, var(--swatch-size)) * 2 - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)))}::slotted([slot=image]){object-fit:contain;inline-size:100%;block-size:100%;transition:width var(--luzmo-animation-duration) ease-in-out,height var(--luzmo-animation-duration) ease-in-out}:host([size=xl]){--swatch-size: var(--luzmo-component-height-xl);--swatch-disabled-icon-size: 24px;--swatch-slash-thickness: 6px}:host([size=l]){--swatch-size: var(--luzmo-component-height-l);--swatch-disabled-icon-size: 20px;--swatch-slash-thickness: 5px}:host([size=s]){--swatch-size: var(--luzmo-component-height-s);--swatch-disabled-icon-size: 16px;--swatch-slash-thickness: 3px}:host([size=xs]){--swatch-size: var(--luzmo-component-height-xs);--swatch-disabled-icon-size: 16px;--swatch-slash-thickness: 2px}:host([size=xxs]){--swatch-size: var(--luzmo-component-height-xxs);--swatch-disabled-icon-size: 14px;--swatch-slash-thickness: 2px}:host{--swatch-size: var(--luzmo-component-height);--swatch-disabled-icon-size: 18px;--swatch-slash-thickness: 4px}:host{--swatch-border-radius: var(--luzmo-border-radius-s);--swatch-focus-indicator-border-radius: var(--luzmo-border-radius-s);--swatch-border-thickness: var(--luzmo-border-width);--swatch-border-thickness-selected: var(--luzmo-border-width);--swatch-focus-indicator-width: var(--luzmo-indicator-width);--swatch-focus-indicator-gap: var(--luzmo-indicator-gap);--swatch-border-color: var(--luzmo-border-color-down);--swatch-icon-border-color: var(--luzmo-border-color);--swatch-border-color-selected: var(--luzmo-border-color-full-down);--swatch-inner-border-color-selected: var(--luzmo-background-color);--swatch-disabled-icon-color: rgb(255, 255, 255);--swatch-dash-icon-color: var(--luzmo-font-color);--swatch-slash-icon-color: var(--luzmo-negative-color);--swatch-focus-indicator-color: var(--luzmo-primary)}.fill:before{background:var(--picked-color, transparent)}:host([border=none]) .fill:before{background:var(--picked-color, transparent)}:host .is-image .fill:before{background:#0000}:host .opacity-checkerboard{background:repeating-conic-gradient(var(--luzmo-swatch-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-swatch-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-swatch-checkerboard-position, left top)/calc(var(--luzmo-swatch-checkerboard-size, 8px) * 2) calc(var(--luzmo-swatch-checkerboard-size, 8px) * 2)}';var k=Object.defineProperty,S=Object.getOwnPropertyDescriptor,c=(h,e,t,o)=>{for(var s=o>1?void 0:o?S(e,t):e,i=h.length-1,a;i>=0;i--)(a=h[i])&&(s=(o?a(e,t,s):a(s))||s);return o&&s&&k(e,t,s),s};class l extends f.SizedMixin(v.Focusable,{validSizes:["xxs","xs","s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.color="",this.label="",this.mixedValue=!1,this.nothing=!1,this.role="button",this.selected=!1,this.readonly=!1,this.renderDisabled=()=>u.html`
|
|
19
19
|
<svg
|
|
20
20
|
xmlns="http://www.w3.org/2000/svg"
|
|
21
21
|
class="disabled-icon"
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
`,this.renderMixedValue=()=>p.luzmoIcon(p.luzmoDash)}static get styles(){return[u.unsafeCSS(x)]}get value(){return this._value||this.color||this.label}set value(e){if(e===this._value)return;const t=this.value;this._value=e,this.requestUpdate("value",t)}get focusElement(){return this}toggle(e){this.readonly||(this.selected=e??!this.selected)}handleClick(){if(this.disabled||this.mixedValue)return;this.toggle(),this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0}))||this.toggle()}handleKeydown(e){const{code:t}=e;switch(t){case"Space":{e.preventDefault(),this.addEventListener("keyup",this.handleKeyup);break}}}handleKeypress(e){const{code:t}=e;switch(t){case"Enter":case"NumpadEnter":{this.click();break}}}handleKeyup(e){const{code:t}=e;switch(t){case"Space":{this.removeEventListener("keyup",this.handleKeyup),this.click();break}}}render(){return u.html`
|
|
36
36
|
<div
|
|
37
37
|
class="opacity-checkerboard fill"
|
|
38
|
-
style=${
|
|
38
|
+
style=${g.ifDefined(this.color?`--picked-color: ${this.color}`:void 0)}
|
|
39
39
|
>
|
|
40
40
|
<slot name="image"></slot>
|
|
41
|
-
${b.
|
|
42
|
-
${b.
|
|
41
|
+
${b.when(this.disabled,this.renderDisabled)}
|
|
42
|
+
${b.when(this.mixedValue,this.renderMixedValue)}
|
|
43
43
|
</div>
|
|
44
|
-
`}willUpdate(e){var t;if(this.getAttribute("role")||this.setAttribute("role","button"),(e.has("selected")||e.has("role"))&&!this.readonly){const o=this.role==="button"?"aria-pressed":"aria-checked",s=this.role==="button"?"aria-checked":"aria-pressed";e.has("role")&&this.removeAttribute(s),this.setAttribute(o,this.selected?"true":"false")}(e.has("label")||e.has("color")||e.has("mixedValue"))&&(this.label!==this.color&&((t=this.label)!=null&&t.length)?this.setAttribute("aria-label",this.label):this.color?this.setAttribute("aria-label",this.color):this.mixedValue?this.setAttribute("aria-label","Mixed"):this.removeAttribute("aria-label"))}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keypress",this.handleKeypress),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}}
|
|
44
|
+
`}willUpdate(e){var t;if(this.getAttribute("role")||this.setAttribute("role","button"),(e.has("selected")||e.has("role"))&&!this.readonly){const o=this.role==="button"?"aria-pressed":"aria-checked",s=this.role==="button"?"aria-checked":"aria-pressed";e.has("role")&&this.removeAttribute(s),this.setAttribute(o,this.selected?"true":"false")}(e.has("label")||e.has("color")||e.has("mixedValue"))&&(this.label!==this.color&&((t=this.label)!=null&&t.length)?this.setAttribute("aria-label",this.label):this.color?this.setAttribute("aria-label",this.color):this.mixedValue?this.setAttribute("aria-label","Mixed"):this.removeAttribute("aria-label"))}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keypress",this.handleKeypress),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}}c([r.property({reflect:!0})],l.prototype,"border",2);c([r.property()],l.prototype,"color",2);c([r.property()],l.prototype,"label",2);c([r.property({type:Boolean,reflect:!0,attribute:"mixed-value"})],l.prototype,"mixedValue",2);c([r.property({type:Boolean,reflect:!0})],l.prototype,"nothing",2);c([r.property({reflect:!0})],l.prototype,"role",2);c([r.property({reflect:!0})],l.prototype,"rounding",2);c([r.property({type:Boolean,reflect:!0})],l.prototype,"selected",2);c([r.property({type:Boolean,reflect:!0})],l.prototype,"readonly",2);c([r.property({reflect:!0})],l.prototype,"shape",2);c([r.property()],l.prototype,"value",1);const C=":host{justify-content:flex-start;align-items:flex-start;gap:var(--luzmo-swatch-group-spacing-regular, var(--swatch-group-spacing-regular));flex-flow:wrap;display:inline-flex}:host([density=compact]){gap:var(--luzmo-swatch-group-spacing-compact, var(--swatch-group-spacing-compact))}:host([density=spacious]){gap:var(--luzmo-swatch-group-spacing-spacious, var(--swatch-group-spacing-spacious))}:host{--swatch-group-spacing-compact: 2px;--swatch-group-spacing-regular: 4px;--swatch-group-spacing-spacious: 8px}";var A=Object.defineProperty,E=Object.getOwnPropertyDescriptor,d=(h,e,t,o)=>{for(var s=o>1?void 0:o?E(e,t):e,i=h.length-1,a;i>=0;i--)(a=h[i])&&(s=(o?a(e,t,s):a(s))||s);return o&&s&&A(e,t,s),s};class n extends f.SizedMixin(z.LuzmoElement,{validSizes:["xs","s","m","l"],noDefaultSize:!0}){constructor(){super(),this._selected=[],this.selectedSet=new Set,this.rovingTabindexController=new y.RovingTabindexController(this,{focusInIndex:e=>{let t=-1;const o=e.findIndex((s,i)=>(!e[t]&&!s.disabled&&(t=i),s.selected&&!s.disabled));return e[o]?o:t},elements:()=>this.swatches,isFocusableElement:e=>!e.disabled}),this.manageChange=async()=>{const e=new Set;this.selectedSet=new Set(this.selected),await Promise.all(this.swatches.map(t=>t.updateComplete)),this.swatches.forEach(t=>{e.add(t.value),t.selected&&this.selectedSet.add(t.value)}),this.selectedSet.forEach(t=>{e.has(t)||this.selectedSet.delete(t)}),this._selected=[...this.selectedSet],this.rovingTabindexController.clearElementCache()},new m.MutationController(this,{config:{attributes:!0,childList:!0,subtree:!0},callback:()=>{this.manageChange()}})}static get styles(){return[u.unsafeCSS(C)]}get selected(){return this._selected}set selected(e){if(e===this.selected)return;const t=this.selected;this._selected=e,this.requestUpdate("selected",t)}focus(e){this.rovingTabindexController.focus(e)}handleChange(e){e.stopPropagation();const t=this.selected;if(!this.selects){e.preventDefault();return}if(this.selects==="single"){const{target:s}=e;if(s.tabIndex=0,s.selected=!0,this.selectedSet.has(s.value))return;this.selectedSet.clear(),this.selectedSet.add(s.value),this.rovingTabindexController.elements.forEach(i=>{i!==s&&(i.selected=!1)})}else if(this.selects==="multiple"){const{target:s}=e;s.selected?this.selectedSet.add(s.value):this.selectedSet.delete(s.value)}this._selected=[...this.selectedSet],this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0}))||(this._selected=t,e.preventDefault())}getPassthroughSwatchActions(e){const t={};e.has("selects")&&(this.selects||e.get("selects")!==void 0)&&(t.selects=this.selects),e.has("border")&&(this.border||e.get("border")!==void 0)&&(t.border=this.border),e.has("rounding")&&(this.rounding||e.get("rounding")!==void 0)&&(t.rounding=this.rounding),e.has("size")&&(this.size!=="m"||e.get("size")!==void 0)&&(t.size=this.size),e.has("shape")&&(this.shape||e.get("shape")!==void 0)&&(t.shape=this.shape);const o=[];return Object.keys(t).length>0&&o.push(s=>{"border"in t&&(s.border=t.border),"rounding"in t&&(s.rounding=t.rounding),"shape"in t&&(s.shape=t.shape),"size"in t&&(s.size=t.size)}),o}getSelectionSwatchActions(e){const t=[];if(!e.has("selects"))return t;this.selects?this.setAttribute("role",this.selects==="single"?"radiogroup":"group"):this.removeAttribute("role");const o={single:"radio",multiple:"checkbox"},s=this.selects?o[this.selects]:"button";return t.push(i=>{i.setAttribute("role",s)}),t}render(){return u.html`
|
|
45
45
|
<slot
|
|
46
46
|
@change=${this.handleChange}
|
|
47
47
|
@slotchange=${this.manageChange}
|
|
48
48
|
></slot>
|
|
49
|
-
`}willUpdate(e){const t=[...this.getPassthroughSwatchActions(e),...this.getSelectionSwatchActions(e)];let o=new Set(this.selected);const s=new Set;e.has("selected")&&t.push(a=>{s.add(a.value),a.selected=!!(o.has(a.value)||!this.hasUpdated&&a.selected)});const i=()=>{o=new Set(this.selected),this.swatches.forEach(a=>{t.forEach(
|
|
49
|
+
`}willUpdate(e){const t=[...this.getPassthroughSwatchActions(e),...this.getSelectionSwatchActions(e)];let o=new Set(this.selected);const s=new Set;e.has("selected")&&t.push(a=>{s.add(a.value),a.selected=!!(o.has(a.value)||!this.hasUpdated&&a.selected)});const i=()=>{o=new Set(this.selected),this.swatches.forEach(a=>{t.forEach(w=>{w(a)})}),e.has("selected")&&(this._selected=[...o.values()].filter(a=>s.has(a)))};this.hasUpdated?i():this.renderRoot.addEventListener("slotchange",()=>{requestAnimationFrame(i)},{once:!0})}}d([r.property({reflect:!0})],n.prototype,"border",2);d([r.property({reflect:!0})],n.prototype,"density",2);d([r.property({reflect:!0})],n.prototype,"rounding",2);d([r.property({type:Array})],n.prototype,"selected",1);d([r.property()],n.prototype,"selects",2);d([r.property({reflect:!0})],n.prototype,"shape",2);d([r.queryAssignedElements({flatten:!0})],n.prototype,"swatches",2);customElements.get("luzmo-swatch")||customElements.define("luzmo-swatch",l);customElements.get("luzmo-swatch-group")||customElements.define("luzmo-swatch-group",n);exports.LuzmoSwatch=l;exports.LuzmoSwatchGroup=n;
|
|
@@ -19,10 +19,10 @@ import { luzmoIcon as z, luzmoDash as v } from "@luzmo/icons";
|
|
|
19
19
|
import { html as u, unsafeCSS as m } from "lit";
|
|
20
20
|
import { property as l, queryAssignedElements as w } from "lit/decorators.js";
|
|
21
21
|
import { ifDefined as x } from "lit/directives/if-defined.js";
|
|
22
|
-
import {
|
|
22
|
+
import { when as b } from "lit/directives/when.js";
|
|
23
23
|
import { F as y } from "../focusable-BjvsvVam.js";
|
|
24
24
|
import { S as p } from "../sized-mixin-cJbo3PKR.js";
|
|
25
|
-
import {
|
|
25
|
+
import { MutationController as k } from "@lit-labs/observers/mutation-controller.js";
|
|
26
26
|
import { a as S } from "../base-CdYjmV_8.js";
|
|
27
27
|
import { R as C } from "../roving-tabindex-DOg4z6ZU.js";
|
|
28
28
|
const g = () => {
|