@luzmo/lucero 1.0.1-alpha.2 → 1.0.1-alpha.20
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 +4 -4
- package/components/accordion/index.js +8 -8
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +7 -7
- package/components/action-button/index.cjs +2 -2
- package/components/action-button/index.js +5 -5
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +1 -1
- package/components/{action-group-DJGMcRHb.cjs → action-group-C54IxNZk.cjs} +1 -1
- package/components/{action-group-DBImibFn.js → action-group-C9dsPJg-.js} +2 -2
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +6 -6
- package/components/{async-directive-BfcqVjDp.js → async-directive-BwIAw5tB.js} +1 -1
- package/components/{async-directive-BX1T1e1_.cjs → async-directive-DLz6JB0v.cjs} +1 -1
- package/components/avatar/index.cjs +1 -1
- package/components/avatar/index.js +5 -5
- package/components/{base-WsynuqaS.js → base-CFWO09N1.js} +62 -55
- package/components/{base-CBCg3yyw.cjs → base-Cy0MQrPT.cjs} +6 -6
- package/components/button/index.cjs +2 -2
- package/components/button/index.js +24 -24
- package/components/{button-base-DbkDzb71.js → button-base-B8bWcklV.js} +38 -38
- package/components/{button-base-XgPLmwP-.cjs → button-base-tf95Lyl4.cjs} +3 -3
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +2 -2
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.js +1 -1
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.js +4 -4
- package/components/{checkbox-mixin-Do7EgtpQ.js → checkbox-mixin-BOTvuPEu.js} +2 -2
- package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-BVPpXtsq.cjs} +1 -1
- package/components/{class-map-NbVXqBU0.js → class-map-CGfNk3Ee.js} +1 -1
- package/components/{class-map-Di1D_rCm.cjs → class-map-D-Y-hsN5.cjs} +1 -1
- package/components/{clear-button-Qi1pMA5S.cjs → clear-button-CuPbWwZY.cjs} +1 -1
- package/components/{clear-button-DoeRUWQ3.js → clear-button-DzZ5ulBW.js} +4 -4
- package/components/{close-button-BFMBEw3q.cjs → close-button-BTo4yrFR.cjs} +1 -1
- package/components/{close-button-BWXdHSx3.js → close-button-CuQdsez5.js} +4 -4
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +5 -5
- package/components/{color-controller-DTp1juRz.js → color-controller-B0uX6Zso.js} +116 -84
- package/components/{color-controller-_ZwyhvaU.cjs → color-controller-CoUL5f9K.cjs} +1 -1
- package/components/color-field/color-field.d.ts +8 -0
- package/components/color-field/index.cjs +4 -4
- package/components/color-field/index.js +36 -24
- package/components/color-handle/index.cjs +1 -1
- package/components/color-handle/index.js +2 -2
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +1 -1
- package/components/{color-loupe-CaA_Lfkk.cjs → color-loupe-CrM2DVY3.cjs} +1 -1
- package/components/{color-loupe-CmMsXbjT.js → color-loupe-DmQe3SpP.js} +1 -1
- package/components/color-menu/index.cjs +7 -7
- package/components/color-menu/index.js +44 -44
- package/components/color-palette/color-palette.d.ts +53 -0
- package/components/color-palette/index.cjs +18 -0
- package/components/color-palette/index.d.ts +7 -0
- package/components/color-palette/index.js +88 -0
- package/components/color-palette-group/color-palette-group.d.ts +79 -0
- package/components/color-palette-group/index.cjs +28 -0
- package/components/color-palette-group/index.d.ts +7 -0
- package/components/color-palette-group/index.js +205 -0
- package/components/color-picker/color-picker.d.ts +31 -2
- package/components/color-picker/index.cjs +4 -3
- package/components/color-picker/index.js +16 -12
- 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 +11 -11
- package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-CO-VPlqq.js} +4 -4
- package/components/{dependency-manger-C5HCkMMB.cjs → dependency-manger-uthev62E.cjs} +1 -1
- package/components/{directive-helpers-Cm6gitnu.js → directive-helpers-D4KMv2dC.js} +1 -1
- package/components/{directive-helpers-DyIRTWwA.cjs → directive-helpers-t-TVum7J.cjs} +1 -1
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +2 -2
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +1 -1
- package/components/{field-group-DkGst3r5.cjs → field-group-5WQMBOk4.cjs} +1 -1
- package/components/{field-group-DXfBWrkO.js → field-group-D4B0IOdA.js} +2 -2
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +1 -1
- package/components/{field-label-CZ2zzChK.js → field-label-DxmPiC5p.js} +2 -2
- package/components/{field-label-mO1AkUgR.cjs → field-label-Dz9kisdW.cjs} +1 -1
- package/components/{focus-visible-DBlJGoEW.js → focus-visible-BvScGDCE.js} +20 -20
- package/components/focus-visible-D4BXb5RB.cjs +18 -0
- package/components/{focusable-EbipgXRh.cjs → focusable-B_KwfEec.cjs} +1 -1
- package/components/{focusable-BxtpnzWp.js → focusable-C5JjRZmT.js} +2 -2
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +4 -4
- package/components/{if-defined-DOaE2coe.js → if-defined-DULpqYwi.js} +1 -1
- package/components/{if-defined-C9YGdo33.cjs → if-defined-DaXWqfzc.cjs} +1 -1
- package/components/{index-BwxgAdzi.cjs → index-CNK8wHXu.cjs} +1 -1
- package/components/{index-A-yOTB_d.js → index-Cf6G4q52.js} +6 -6
- package/components/{index-HjQa8tew.js → index-D3ICqC7S.js} +6 -6
- package/components/{index-BLWuwZXx.cjs → index-hqVbNKYy.cjs} +3 -3
- package/components/index.cjs +1 -1
- package/components/index.js +141 -137
- package/components/infield-button/index.cjs +1 -1
- package/components/infield-button/index.js +3 -3
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +1 -1
- package/components/{language-resolution-8yZa5r_P.js → language-resolution-B-wjV5bb.js} +9 -8
- package/components/{language-resolution-DJzmyzZq.cjs → language-resolution-EUER43cg.cjs} +1 -1
- package/components/{like-anchor-sod1C1fR.cjs → like-anchor-Bu3pXbjT.cjs} +1 -1
- package/components/{like-anchor-Bvn_vLQ8.js → like-anchor-DCFJN0LV.js} +2 -2
- package/components/{luzmo-icons-DbwDQtuO.js → luzmo-icons-CiSek5iM.js} +25 -25
- package/components/{luzmo-icons-DletXGWU.cjs → luzmo-icons-CtA-TJPd.cjs} +2 -2
- package/components/{manage-help-text-syYnjKGL.js → manage-help-text-CHfMLzSa.js} +2 -2
- package/components/{manage-help-text-DhgARkZX.cjs → manage-help-text-DNqdEkTA.cjs} +1 -1
- package/components/menu/index.cjs +38 -13
- package/components/menu/index.js +132 -98
- package/components/menu/menu-item.d.ts +8 -1
- package/components/multi-language-field/index.cjs +1 -1
- package/components/multi-language-field/index.js +3 -3
- package/components/number-field/index.cjs +3 -3
- package/components/number-field/index.js +8 -8
- package/components/{observe-slot-text-BPfIQQtz.js → observe-slot-text-C3moTjwy.js} +1 -1
- package/components/{observe-slot-text-Ceb7SvYT.cjs → observe-slot-text-D2VAEFSd.cjs} +1 -1
- package/components/options/index.cjs +4 -4
- package/components/options/index.js +22 -22
- package/components/overlay/index.cjs +1 -1
- package/components/overlay/index.js +5 -5
- package/components/overlay-B3ajDLLq.cjs +47 -0
- package/components/{overlay-Cig9r6uU.js → overlay-CUKs69yr.js} +74 -76
- package/components/{pending-state-DTX7ggyF.js → pending-state-B2wWssTo.js} +2 -2
- package/components/{pending-state-CaH1si5b.cjs → pending-state-bJr-nEJl.cjs} +1 -1
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/{picker-BmoXv1jt.js → picker-BsQJBF9j.js} +38 -37
- package/components/{picker-DWsBWdPN.cjs → picker-X96xmLAw.cjs} +7 -7
- package/components/picker-button/index.cjs +1 -1
- package/components/picker-button/index.js +5 -5
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +1 -1
- package/components/{popover-KFfO0IYL.cjs → popover-fwJeZHMQ.cjs} +1 -1
- package/components/{popover-DjX0aAnY.js → popover-iD8f5Jkp.js} +2 -2
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +1 -1
- package/components/{progress-circle-BvRJNuNo.cjs → progress-circle-DZxaMe8L.cjs} +1 -1
- package/components/{progress-circle-DXH9z8-6.js → progress-circle-USIIU1up.js} +3 -3
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.js +4 -4
- package/components/search/index.cjs +4 -4
- package/components/search/index.js +4 -4
- package/components/select/index.cjs +15 -15
- package/components/select/index.js +80 -79
- package/components/{sized-mixin-D4ACoVUr.js → sized-mixin-CJbBHWRQ.js} +1 -1
- package/components/{sized-mixin-CPxE5C96.cjs → sized-mixin-WPHH0a_D.cjs} +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +2 -2
- package/components/{state-Deh-vKYE.js → state-DwIwYPvt.js} +1 -1
- package/components/{state-D8JEtYqe.cjs → state-vf0PJN3_.cjs} +1 -1
- package/components/{strategies-9indNIEb.js → strategies-Bk97oVn1.js} +15 -50
- package/components/strategies-CNgBb6dM.cjs +18 -0
- package/components/{streaming-listener-CP-JE6Fa.js → streaming-listener-BQ68fKMa.js} +2 -2
- package/components/{streaming-listener-B00MvALi.cjs → streaming-listener-DeGQYM-9.cjs} +1 -1
- package/components/{style-map-IgqIKvlE.js → style-map-Bnhf_mVZ.js} +1 -1
- package/components/{style-map-CeilmSgs.cjs → style-map-DuMd5xlY.cjs} +1 -1
- package/components/swatch/index.cjs +5 -5
- package/components/swatch/index.js +12 -12
- package/components/switch/index.cjs +1 -1
- package/components/switch/index.js +4 -4
- package/components/tabs/index.cjs +3 -3
- package/components/tabs/index.js +9 -9
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +4 -4
- package/components/text-field/index.cjs +2 -2
- package/components/text-field/index.js +4 -4
- package/components/{text-field-D5d_Gt0t.cjs → text-field-BkFPYo7S.cjs} +3 -3
- package/components/{text-field-BIADXoLC.js → text-field-C2n3rzCK.js} +9 -9
- package/components/{text-field.module-ColtFhf_.js → text-field.module-C2KVUJcX.js} +1 -1
- package/components/{text-field.module-p_VF2tC_.cjs → text-field.module-DXhFA9G-.cjs} +1 -1
- package/components/toast/index.cjs +3 -3
- package/components/toast/index.js +4 -4
- package/components/tooltip/index.cjs +2 -2
- package/components/tooltip/index.js +55 -32
- package/components/tooltip/tooltip.d.ts +12 -1
- package/components/unit-input/index.cjs +3 -3
- package/components/unit-input/index.js +21 -21
- package/components/utils.cjs +1 -1
- package/components/utils.js +5 -5
- package/custom-elements.json +1 -1
- package/index.d.ts +2 -0
- package/package.json +12 -2
- package/components/focus-visible-B0P9aY_G.cjs +0 -18
- package/components/overlay-KSKMzzkh.cjs +0 -47
- package/components/strategies-BACP6MhR.cjs +0 -18
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
const d = Symbol(
|
|
19
19
|
"dependency manager loaded"
|
|
20
20
|
);
|
|
21
|
-
class
|
|
21
|
+
class o {
|
|
22
22
|
constructor(e) {
|
|
23
23
|
this.dependencies = {}, this._loaded = !1, this.host = e;
|
|
24
24
|
}
|
|
@@ -40,8 +40,8 @@ class a {
|
|
|
40
40
|
* @param alreadyLoaded {boolean} - force the managemented custom element to be listed as loaded
|
|
41
41
|
*/
|
|
42
42
|
add(e, s) {
|
|
43
|
-
const t = !!s || !!customElements.get(e) || this.dependencies[e];
|
|
44
|
-
t
|
|
43
|
+
const t = !!s || typeof customElements < "u" && !!customElements.get(e) || this.dependencies[e];
|
|
44
|
+
!t && typeof customElements < "u" && customElements.whenDefined(e).then(() => {
|
|
45
45
|
this.add(e, !0);
|
|
46
46
|
}), this.dependencies = {
|
|
47
47
|
...this.dependencies,
|
|
@@ -50,5 +50,5 @@ class a {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
export {
|
|
53
|
-
|
|
53
|
+
o as D
|
|
54
54
|
};
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";const d=Symbol("dependency manager loaded");class n{constructor(e){this.dependencies={},this._loaded=!1,this.host=e}get loaded(){return this._loaded}set loaded(e){e!==this.loaded&&(this._loaded=e,this.host.requestUpdate(d,!this.loaded))}add(e,s){const t=!!s
|
|
18
|
+
"use strict";const d=Symbol("dependency manager loaded");class n{constructor(e){this.dependencies={},this._loaded=!1,this.host=e}get loaded(){return this._loaded}set loaded(e){e!==this.loaded&&(this._loaded=e,this.host.requestUpdate(d,!this.loaded))}add(e,s){const t=!!s||typeof customElements<"u"&&!!customElements.get(e)||this.dependencies[e];!t&&typeof customElements<"u"&&customElements.whenDefined(e).then(()=>{this.add(e,!0)}),this.dependencies={...this.dependencies,[e]:t},this.loaded=Object.values(this.dependencies).every(Boolean)}}exports.DependencyManagerController=n;
|
|
@@ -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";const o=require("./base-
|
|
18
|
+
"use strict";const o=require("./base-Cy0MQrPT.cjs");/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2020 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../base-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../base-Cy0MQrPT.cjs"),d=require("../sized-mixin-WPHH0a_D.cjs"),c=require("../divider.module-DDvBo9zo.cjs");var p=Object.defineProperty,n=(o,e,l,f)=>{for(var t=void 0,s=o.length-1,u;s>=0;s--)(u=o[s])&&(t=u(e,l,t)||t);return t&&p(e,l,t),t};const a=class a extends d.SizedMixin(i.LuzmoElement,{validSizes:["s","m","l"],noDefaultSize:!0}){constructor(){super(...arguments),this.vertical=!1}render(){return i.x``}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","separator")}updated(e){super.updated(e),e.has("vertical")&&(this.vertical?this.setAttribute("aria-orientation","vertical"):this.removeAttribute("aria-orientation"))}};a.styles=[i.r(c.dividerStyles)];let r=a;n([i.n({type:Boolean,reflect:!0})],r.prototype,"vertical");n([i.n({type:String,reflect:!0,attribute:"static-color"})],r.prototype,"staticColor");customElements.get("luzmo-divider")||customElements.define("luzmo-divider",r);exports.LuzmoDivider=r;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a as z, r as s, x as d, n as c } from "../base-
|
|
19
|
-
import { S as f } from "../sized-mixin-
|
|
18
|
+
import { a as z, r as s, x as d, n as c } from "../base-CFWO09N1.js";
|
|
19
|
+
import { S as f } from "../sized-mixin-CJbBHWRQ.js";
|
|
20
20
|
import { d as b } from "../divider.module-DoQWQEIJ.js";
|
|
21
21
|
const n = () => {
|
|
22
22
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../field-group-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../field-group-5WQMBOk4.cjs");customElements.get("luzmo-field-group")||customElements.define("luzmo-field-group",e.LuzmoFieldGroup);exports.LuzmoFieldGroup=e.LuzmoFieldGroup;
|
|
@@ -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
|
-
import { L as r } from "../field-group-
|
|
18
|
+
import { L as r } from "../field-group-D4B0IOdA.js";
|
|
19
19
|
const l = () => {
|
|
20
20
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
21
21
|
const o = document.createElement("style");
|
|
@@ -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";const e=require("./base-
|
|
18
|
+
"use strict";const e=require("./base-Cy0MQrPT.cjs"),d=require("./manage-help-text-DNqdEkTA.cjs"),u='.luzmo-FieldGroup--toplabel{flex-direction:column}.luzmo-FieldGroup--sidelabel{flex-direction:row}.group{flex-flow:column wrap;display:flex}:host([vertical]) .group{flex-direction:column}:host([horizontal]) .group{flex-direction:row}:host([horizontal]) .group slot:not([name])::slotted(:not(:last-child)){margin-inline-end:var(--field-group-margin)}:host([horizontal]) .group .luzmo-HelpText{flex-basis:100%}:host{--field-group-margin: 16px;--field-group-readonly-delimiter: ","}:host([horizontal][dir=rtl]) slot:not([name])::slotted(*:not(:last-child)),:host([dir=rtl]:not([vertical])) slot:not([name])::slotted(*:not(:last-child)){margin:0 0 0 var(--field-group-margin)}:host([horizontal][dir=ltr]) slot:not([name])::slotted(*:not(:last-child)),:host([dir=ltr]:not([vertical])) slot:not([name])::slotted(*:not(:last-child)){margin:0 var(--field-group-margin) 0 0}';var p=Object.defineProperty,r=(i,t,n,h)=>{for(var l=void 0,a=i.length-1,s;a>=0;a--)(s=i[a])&&(l=s(t,n,l)||l);return l&&p(t,n,l),l};class o extends d.ManageHelpText(e.LuzmoElement,{mode:"external"}){constructor(){super(...arguments),this.horizontal=!1,this.invalid=!1,this.label="",this.vertical=!1}static get styles(){return[e.r(u)]}handleSlotchange(){}render(){return e.x`
|
|
19
19
|
<div class="group" role="presentation">
|
|
20
20
|
<slot @slotchange=${this.handleSlotchange}></slot>
|
|
21
21
|
</div>
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a as d, r as p, x as u, n as l } from "./base-
|
|
19
|
-
import { M as h } from "./manage-help-text-
|
|
18
|
+
import { a as d, r as p, x as u, n as l } from "./base-CFWO09N1.js";
|
|
19
|
+
import { M as h } from "./manage-help-text-CHfMLzSa.js";
|
|
20
20
|
const f = '.luzmo-FieldGroup--toplabel{flex-direction:column}.luzmo-FieldGroup--sidelabel{flex-direction:row}.group{flex-flow:column wrap;display:flex}:host([vertical]) .group{flex-direction:column}:host([horizontal]) .group{flex-direction:row}:host([horizontal]) .group slot:not([name])::slotted(:not(:last-child)){margin-inline-end:var(--field-group-margin)}:host([horizontal]) .group .luzmo-HelpText{flex-basis:100%}:host{--field-group-margin: 16px;--field-group-readonly-delimiter: ","}:host([horizontal][dir=rtl]) slot:not([name])::slotted(*:not(:last-child)),:host([dir=rtl]:not([vertical])) slot:not([name])::slotted(*:not(:last-child)){margin:0 0 0 var(--field-group-margin)}:host([horizontal][dir=ltr]) slot:not([name])::slotted(*:not(:last-child)),:host([dir=ltr]:not([vertical])) slot:not([name])::slotted(*:not(:last-child)){margin:0 var(--field-group-margin) 0 0}';
|
|
21
21
|
var m = Object.defineProperty, o = (i, t, s, c) => {
|
|
22
22
|
for (var e = void 0, a = i.length - 1, n; a >= 0; a--)
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../field-label-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../field-label-Dz9kisdW.cjs");customElements.get("luzmo-field-label")||customElements.define("luzmo-field-label",e.LuzmoFieldLabel);exports.LuzmoFieldLabel=e.LuzmoFieldLabel;
|
|
@@ -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
|
-
import { L as r } from "../field-label-
|
|
18
|
+
import { L as r } from "../field-label-DxmPiC5p.js";
|
|
19
19
|
const l = () => {
|
|
20
20
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
21
21
|
const o = document.createElement("style");
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a as b, r as g, E as m, x as d, n as r } from "./base-
|
|
18
|
+
import { a as b, r as g, E as m, x as d, n as r } from "./base-CFWO09N1.js";
|
|
19
19
|
import { e as h } from "./query-D_KR_GUc.js";
|
|
20
20
|
import { c, a as u } from "./condition-attribute-with-id-Dv4lSRbe.js";
|
|
21
21
|
import { r as p } from "./random-id-ByCz1xaq.js";
|
|
22
22
|
import { E as z, e as v } from "./element-resolution-FCUT-wql.js";
|
|
23
|
-
import { S as x } from "./sized-mixin-
|
|
23
|
+
import { S as x } from "./sized-mixin-CJbBHWRQ.js";
|
|
24
24
|
const k = ":host{box-sizing:border-box;min-block-size:var(--luzmo-field-label-min-height, var(--field-label-min-height));padding-block:var(--luzmo-field-label-padding-block, var(--luzmo-field-label-top-to-text, var(--field-label-top-to-text)) var(--luzmo-field-label-bottom-to-text, var(--field-label-bottom-to-text)));padding-inline:0;padding-inline:var(--luzmo-field-label-padding-inline, 0);margin-block:0;margin-block:var(--luzmo-field-label-margin-block, var(--luzmo-field-label-margin-block-start, 0) var(--luzmo-field-label-margin-block-end, 0));margin-inline:0;margin-inline:var(--luzmo-field-label-margin-inline, var(--luzmo-field-label-margin-inline-start, 0) var(--luzmo-field-label-margin-inline-end, 0));font-size:var(--luzmo-field-label-font-size, var(--field-label-font-size));font-weight:var(--luzmo-field-label-font-weight, var(--field-label-font-weight));line-height:var(--luzmo-field-label-line-height, var(--field-label-line-height));-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;color:var(--luzmo-field-label-color, var(--field-label-color));display:block;font-family:var(--luzmo-field-label-font-family, var(--luzmo-font-family))}:host(:lang(ja)),:host(:lang(ko)),:host(:lang(zh)){--luzmo-field-label-line-height: var( --luzmo-field-label-line-height-cjk, var(--field-label-line-height-cjk) )}:host([disabled]),:host([disabled]) .required-icon{--luzmo-field-label-color: var( --highcontrast-field-label-disabled-content-color, var( --luzmo-disabled-content-color, var(--field-label-disabled-content-color) ) )}.required-icon{display:inline-block;margin-block:0;margin-inline:var(--luzmo-field-label-text-to-asterisk, var(--field-label-text-to-asterisk)) 0;vertical-align:initial;vertical-align:var(--luzmo-field-label-asterisk-vertical-align, baseline)}:host([side-aligned=start]),:host([side-aligned=end]){vertical-align:top;margin-block-start:0;margin-block-end:0;margin-inline-end:var(--luzmo-field-label-side-padding-right, var(--field-label-side-padding-right));display:inline-flex;align-items:center;font-size:var(--luzmo-field-label-side-aligned-font-size, var(--field-label-side-aligned-font-size));block-size:var(--luzmo-field-label-side-aligned-height, var(--field-label-side-aligned-height))}:host([side-aligned=end]){text-align:end}@media (forced-colors: active){:host{--highcontrast-field-label-disabled-content-color: GrayText}}:host{--field-label-color: var(--luzmo-font-color);--field-label-font-weight: var(--luzmo-font-weight);--field-label-line-height: var(--luzmo-line-height);--field-label-line-height-cjk: 1.5;--field-label-disabled-content-color: var(--luzmo-font-color-disabled)}:host{--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height);--field-label-top-to-text: calc(var(--luzmo-spacing-2));--field-label-bottom-to-text: var(--luzmo-spacing-2);--field-label-side-aligned-font-size: var(--luzmo-font-size);--field-label-font-size: var(--luzmo-font-size-s);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: 0px}:host([size=s]){--field-label-min-height: var(--luzmo-component-height-xxs);--field-label-side-aligned-height: var(--luzmo-component-height-s);--field-label-top-to-text: calc(var(--luzmo-spacing-1));--field-label-bottom-to-text: var(--luzmo-spacing-1);--field-label-side-aligned-font-size: var(--luzmo-font-size-s);--field-label-font-size: var(--luzmo-font-size-xs);--field-label-side-padding-right: var(--luzmo-spacing-3);--field-label-text-to-asterisk: 0px}:host([size=l]){--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height-l);--field-label-top-to-text: var(--luzmo-spacing-3);--field-label-bottom-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--field-label-side-aligned-font-size: var(--luzmo-font-size-l);--field-label-font-size: var(--luzmo-font-size);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}:host([size=xl]){--field-label-min-height: var(--luzmo-component-height-s);--field-label-side-aligned-height: var(--luzmo-component-height-xl);--field-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--field-label-bottom-to-text: var(--luzmo-spacing-3);--field-label-side-aligned-font-size: var(--luzmo-font-size-xl);--field-label-font-size: var(--luzmo-font-size-l);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}label{display:inline-block}";
|
|
25
25
|
var y = Object.defineProperty, o = (s, e, t, l) => {
|
|
26
26
|
for (var i = void 0, a = s.length - 1, f; a >= 0; a--)
|
|
@@ -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";const t=require("./base-
|
|
18
|
+
"use strict";const t=require("./base-Cy0MQrPT.cjs"),g=require("./query-BL-TJj7K.cjs"),f=require("./condition-attribute-with-id-DrQYZzFS.cjs"),h=require("./random-id-CqvckpWe.cjs"),b=require("./element-resolution-BvRLGqIU.cjs"),c=require("./sized-mixin-WPHH0a_D.cjs"),m=":host{box-sizing:border-box;min-block-size:var(--luzmo-field-label-min-height, var(--field-label-min-height));padding-block:var(--luzmo-field-label-padding-block, var(--luzmo-field-label-top-to-text, var(--field-label-top-to-text)) var(--luzmo-field-label-bottom-to-text, var(--field-label-bottom-to-text)));padding-inline:0;padding-inline:var(--luzmo-field-label-padding-inline, 0);margin-block:0;margin-block:var(--luzmo-field-label-margin-block, var(--luzmo-field-label-margin-block-start, 0) var(--luzmo-field-label-margin-block-end, 0));margin-inline:0;margin-inline:var(--luzmo-field-label-margin-inline, var(--luzmo-field-label-margin-inline-start, 0) var(--luzmo-field-label-margin-inline-end, 0));font-size:var(--luzmo-field-label-font-size, var(--field-label-font-size));font-weight:var(--luzmo-field-label-font-weight, var(--field-label-font-weight));line-height:var(--luzmo-field-label-line-height, var(--field-label-line-height));-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;color:var(--luzmo-field-label-color, var(--field-label-color));display:block;font-family:var(--luzmo-field-label-font-family, var(--luzmo-font-family))}:host(:lang(ja)),:host(:lang(ko)),:host(:lang(zh)){--luzmo-field-label-line-height: var( --luzmo-field-label-line-height-cjk, var(--field-label-line-height-cjk) )}:host([disabled]),:host([disabled]) .required-icon{--luzmo-field-label-color: var( --highcontrast-field-label-disabled-content-color, var( --luzmo-disabled-content-color, var(--field-label-disabled-content-color) ) )}.required-icon{display:inline-block;margin-block:0;margin-inline:var(--luzmo-field-label-text-to-asterisk, var(--field-label-text-to-asterisk)) 0;vertical-align:initial;vertical-align:var(--luzmo-field-label-asterisk-vertical-align, baseline)}:host([side-aligned=start]),:host([side-aligned=end]){vertical-align:top;margin-block-start:0;margin-block-end:0;margin-inline-end:var(--luzmo-field-label-side-padding-right, var(--field-label-side-padding-right));display:inline-flex;align-items:center;font-size:var(--luzmo-field-label-side-aligned-font-size, var(--field-label-side-aligned-font-size));block-size:var(--luzmo-field-label-side-aligned-height, var(--field-label-side-aligned-height))}:host([side-aligned=end]){text-align:end}@media (forced-colors: active){:host{--highcontrast-field-label-disabled-content-color: GrayText}}:host{--field-label-color: var(--luzmo-font-color);--field-label-font-weight: var(--luzmo-font-weight);--field-label-line-height: var(--luzmo-line-height);--field-label-line-height-cjk: 1.5;--field-label-disabled-content-color: var(--luzmo-font-color-disabled)}:host{--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height);--field-label-top-to-text: calc(var(--luzmo-spacing-2));--field-label-bottom-to-text: var(--luzmo-spacing-2);--field-label-side-aligned-font-size: var(--luzmo-font-size);--field-label-font-size: var(--luzmo-font-size-s);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: 0px}:host([size=s]){--field-label-min-height: var(--luzmo-component-height-xxs);--field-label-side-aligned-height: var(--luzmo-component-height-s);--field-label-top-to-text: calc(var(--luzmo-spacing-1));--field-label-bottom-to-text: var(--luzmo-spacing-1);--field-label-side-aligned-font-size: var(--luzmo-font-size-s);--field-label-font-size: var(--luzmo-font-size-xs);--field-label-side-padding-right: var(--luzmo-spacing-3);--field-label-text-to-asterisk: 0px}:host([size=l]){--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height-l);--field-label-top-to-text: var(--luzmo-spacing-3);--field-label-bottom-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--field-label-side-aligned-font-size: var(--luzmo-font-size-l);--field-label-font-size: var(--luzmo-font-size);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}:host([size=xl]){--field-label-min-height: var(--luzmo-component-height-s);--field-label-side-aligned-height: var(--luzmo-component-height-xl);--field-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--field-label-bottom-to-text: var(--luzmo-spacing-3);--field-label-side-aligned-font-size: var(--luzmo-font-size-xl);--field-label-font-size: var(--luzmo-font-size-l);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}label{display:inline-block}";var u=Object.defineProperty,r=(s,e,a,l)=>{for(var i=void 0,o=s.length-1,d;o>=0;o--)(d=s[o])&&(i=d(e,a,i)||i);return i&&u(e,a,i),i};const z=()=>t.x`
|
|
19
19
|
<div class="icon-container required-icon">*</div>
|
|
20
20
|
`;class n extends c.SizedMixin(t.LuzmoElement,{noDefaultSize:!0}){constructor(){super(...arguments),this.disabled=!1,this.id="",this.for="",this.required=!1,this.resolvedElement=new b.ElementResolutionController(this)}static get styles(){return[t.r(m)]}handleClick(e){if(!this.target||this.disabled||e.defaultPrevented)return;this.target.focus();const a=this.getRootNode(),l=this.target,i=l.getRootNode(),o=i.host;i===a&&l.forceFocusVisible?l.forceFocusVisible():o&&o.forceFocusVisible&&o.forceFocusVisible()}applyTargetLabel(e){if(this.target=e||this.target,this.target){const a=this.target.applyFocusElementLabel,l=this.target.focusElement||this.target,i=l.getRootNode();a!==void 0?a(this.labelText,this):i===this.getRootNode()?(e?f.conditionAttributeWithId:f.conditionAttributeWithoutId)(l,"aria-labelledby",[this.id]):e?l.setAttribute("aria-label",this.labelText):l.removeAttribute("aria-label")}}async manageTarget(){this.applyTargetLabel();const e=this.resolvedElement.element;if(!e){this.target=e;return}e.localName.search("-")>0&&await customElements.whenDefined(e.localName),e.updateComplete!==void 0&&await e.updateComplete,this.applyTargetLabel(e)}get labelText(){const e=this.slotEl.assignedNodes({flatten:!0});return e.length===0?"":e.map(l=>(l.textContent||"").trim()).join(" ")}render(){return t.x`
|
|
21
21
|
<label>
|
|
@@ -15,23 +15,23 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
let
|
|
18
|
+
let l = !0;
|
|
19
19
|
try {
|
|
20
|
-
document.body.querySelector(":focus-visible");
|
|
20
|
+
typeof document < "u" && document.body.querySelector(":focus-visible");
|
|
21
21
|
} catch {
|
|
22
|
-
|
|
22
|
+
l = !1, Promise.resolve().then(() => c);
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
var
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
24
|
+
const r = (n) => {
|
|
25
|
+
var i, s;
|
|
26
|
+
const u = (e) => {
|
|
27
|
+
if (e.shadowRoot == null || Object.hasOwn(e.dataset, "jsFocusVisible"))
|
|
28
28
|
return () => {
|
|
29
29
|
};
|
|
30
30
|
if (self.applyFocusVisiblePolyfill)
|
|
31
|
-
self.applyFocusVisiblePolyfill(
|
|
31
|
+
self.applyFocusVisiblePolyfill(e.shadowRoot), e.manageAutoFocus && e.manageAutoFocus();
|
|
32
32
|
else {
|
|
33
33
|
const t = () => {
|
|
34
|
-
self.applyFocusVisiblePolyfill &&
|
|
34
|
+
self.applyFocusVisiblePolyfill && e.shadowRoot && self.applyFocusVisiblePolyfill(e.shadowRoot), e.manageAutoFocus && e.manageAutoFocus();
|
|
35
35
|
};
|
|
36
36
|
return self.addEventListener(
|
|
37
37
|
"focus-visible-polyfill-ready",
|
|
@@ -46,29 +46,29 @@ const c = (a) => {
|
|
|
46
46
|
}
|
|
47
47
|
return () => {
|
|
48
48
|
};
|
|
49
|
-
},
|
|
50
|
-
class
|
|
49
|
+
}, o = Symbol("endPolyfillCoordination");
|
|
50
|
+
class a extends (s = n, i = o, s) {
|
|
51
51
|
constructor() {
|
|
52
|
-
super(...arguments), this[
|
|
52
|
+
super(...arguments), this[i] = null;
|
|
53
53
|
}
|
|
54
54
|
// Attempt to coordinate with the polyfill when connected to the
|
|
55
55
|
// document:
|
|
56
56
|
connectedCallback() {
|
|
57
|
-
super.connectedCallback && super.connectedCallback(),
|
|
58
|
-
this[
|
|
57
|
+
super.connectedCallback && super.connectedCallback(), l || requestAnimationFrame(() => {
|
|
58
|
+
this[o] == null && (this[o] = u(this));
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
disconnectedCallback() {
|
|
62
|
-
super.disconnectedCallback && super.disconnectedCallback(),
|
|
63
|
-
this[
|
|
62
|
+
super.disconnectedCallback && super.disconnectedCallback(), l || requestAnimationFrame(() => {
|
|
63
|
+
this[o] != null && (this[o](), this[o] = null);
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
return
|
|
68
|
-
},
|
|
67
|
+
return a;
|
|
68
|
+
}, c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
69
69
|
__proto__: null,
|
|
70
|
-
FocusVisiblePolyfillMixin:
|
|
70
|
+
FocusVisiblePolyfillMixin: r
|
|
71
71
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
72
72
|
export {
|
|
73
|
-
|
|
73
|
+
r as F
|
|
74
74
|
};
|
|
@@ -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";let o=!0;try{typeof document<"u"&&document.body.querySelector(":focus-visible")}catch{o=!1,Promise.resolve().then(()=>a)}const u=n=>{var i,s;const c=e=>{if(e.shadowRoot==null||Object.hasOwn(e.dataset,"jsFocusVisible"))return()=>{};if(self.applyFocusVisiblePolyfill)self.applyFocusVisiblePolyfill(e.shadowRoot),e.manageAutoFocus&&e.manageAutoFocus();else{const t=()=>{self.applyFocusVisiblePolyfill&&e.shadowRoot&&self.applyFocusVisiblePolyfill(e.shadowRoot),e.manageAutoFocus&&e.manageAutoFocus()};return self.addEventListener("focus-visible-polyfill-ready",t,{once:!0}),()=>{self.removeEventListener("focus-visible-polyfill-ready",t)}}return()=>{}},l=Symbol("endPolyfillCoordination");class r extends(s=n,i=l,s){constructor(){super(...arguments),this[i]=null}connectedCallback(){super.connectedCallback&&super.connectedCallback(),o||requestAnimationFrame(()=>{this[l]==null&&(this[l]=c(this))})}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),o||requestAnimationFrame(()=>{this[l]!=null&&(this[l](),this[l]=null)})}}return r},a=Object.freeze(Object.defineProperty({__proto__:null,FocusVisiblePolyfillMixin:u},Symbol.toStringTag,{value:"Module"}));exports.FocusVisiblePolyfillMixin=u;
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";const n=require("./base-
|
|
18
|
+
"use strict";const n=require("./base-Cy0MQrPT.cjs"),d=require("./focus-visible-D4BXb5RB.cjs");var b=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(a,t,e,i)=>{for(var s=i>1?void 0:i?f(t,e):t,l=a.length-1,o;l>=0;l--)(o=a[l])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&b(t,e,s),s};function h(){return new Promise(a=>requestAnimationFrame(()=>a()))}class u extends d.FocusVisiblePolyfillMixin(n.LuzmoElement){constructor(){super(...arguments),this.disabled=!1,this.autofocus=!1,this._tabIndex=0,this.manipulatingTabindex=!1,this.autofocusReady=Promise.resolve()}get tabIndex(){if(this.focusElement===this){const e=this.hasAttribute("tabindex")?Number(this.getAttribute("tabindex")):Number.NaN;return Number.isNaN(e)?-1:e}const t=Number.parseFloat(this.hasAttribute("tabindex")&&this.getAttribute("tabindex")||"0");return this.disabled||t<0?-1:this.focusElement?this._tabIndex:t}set tabIndex(t){var e;if(this.manipulatingTabindex){this.manipulatingTabindex=!1;return}if(this.focusElement===this){if(this.disabled)this._tabIndex=t;else if(t!==this._tabIndex){this._tabIndex=t;const i=""+t;this.manipulatingTabindex=!0,this.setAttribute("tabindex",i)}return}if(t===-1?this.addEventListener("pointerdown",this.onPointerdownManagementOfTabIndex):(this.manipulatingTabindex=!0,this.removeEventListener("pointerdown",this.onPointerdownManagementOfTabIndex)),t===-1||this.disabled){if(this.manipulatingTabindex=!0,this.setAttribute("tabindex","-1"),this.removeAttribute("focusable"),this.selfManageFocusElement)return;t===-1?(e=this.focusElement)==null||e.removeAttribute("tabindex"):(this._tabIndex=t,this.manageFocusElementTabindex(t));return}this.setAttribute("focusable",""),this.hasAttribute("tabindex")?this.removeAttribute("tabindex"):this.manipulatingTabindex=!1,this._tabIndex=t,this.manageFocusElementTabindex(t)}onPointerdownManagementOfTabIndex(){this.tabIndex===-1&&setTimeout(()=>{this.tabIndex=0,this.focus({preventScroll:!0}),this.tabIndex=-1})}async manageFocusElementTabindex(t){this.focusElement||await this.updateComplete,t===null?this.focusElement.removeAttribute("tabindex"):this.focusElement!==this&&(this.focusElement.tabIndex=t)}get focusElement(){throw new Error("Must implement focusElement getter!")}get selfManageFocusElement(){return!1}focus(t){this.disabled||!this.focusElement||(this.focusElement===this?Reflect.apply(HTMLElement.prototype.focus,this,[t]):this.focusElement.focus(t))}blur(){const t=this.focusElement||this;t===this?HTMLElement.prototype.blur.apply(this):t.blur()}click(){if(this.disabled)return;const t=this.focusElement||this;t===this?HTMLElement.prototype.click.apply(this):t.click()}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent("keydown",{code:"Tab"})),this.focusElement.focus())}firstUpdated(t){super.firstUpdated(t),(!this.hasAttribute("tabindex")||this.getAttribute("tabindex")!=="-1")&&this.setAttribute("focusable","")}update(t){t.has("disabled")&&this.handleDisabledChanged(this.disabled,t.get("disabled")),super.update(t)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.blur()}async handleDisabledChanged(t,e){const i=()=>this.focusElement!==this&&this.focusElement.disabled!==void 0;t?(this.manipulatingTabindex=!0,this.setAttribute("tabindex","-1"),await this.updateComplete,i()?this.focusElement.disabled=!0:this.setAttribute("aria-disabled","true")):e&&(this.manipulatingTabindex=!0,this.focusElement===this?this.setAttribute("tabindex",""+this._tabIndex):this.removeAttribute("tabindex"),await this.updateComplete,i()?this.focusElement.disabled=!1:this.removeAttribute("aria-disabled"))}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.autofocusReady,t}connectedCallback(){super.connectedCallback(),this.autofocus&&(this.autofocusReady=new Promise(async t=>{await h(),await h(),t()}),this.updateComplete.then(()=>{this.manageAutoFocus()}))}}r([n.n({type:Boolean,reflect:!0})],u.prototype,"disabled",2);r([n.n({type:Boolean})],u.prototype,"autofocus",2);r([n.n({type:Number})],u.prototype,"tabIndex",1);exports.Focusable=u;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a as d, n as o } from "./base-
|
|
19
|
-
import { F as b } from "./focus-visible-
|
|
18
|
+
import { a as d, n as o } from "./base-CFWO09N1.js";
|
|
19
|
+
import { F as b } from "./focus-visible-BvScGDCE.js";
|
|
20
20
|
var f = Object.defineProperty, m = Object.getOwnPropertyDescriptor, l = (a, t, e, i) => {
|
|
21
21
|
for (var s = i > 1 ? void 0 : i ? m(t, e) : t, n = a.length - 1, u; n >= 0; n--)
|
|
22
22
|
(u = a[n]) && (s = (i ? u(t, e, s) : u(s)) || s);
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../luzmo-icons-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../luzmo-icons-CtA-TJPd.cjs"),o=require("../base-Cy0MQrPT.cjs"),m=require("../if-defined-DaXWqfzc.cjs"),d=":host{pointer-events:none;transform:none;transform:var(--luzmo-icon-transform, none);block-size:var(--luzmo-icon-block-size, var(--luzmo-icon-size, var(--icon-size)));font-size:var(--luzmo-icon-block-size, var(--luzmo-icon-size, var(--icon-size)));color:inherit;color:var(--luzmo-icon-color, inherit);fill:currentColor;text-align:center;display:inline-block}::slotted(svg),:host(:not([block])) svg,:host(:not([block])) img{vertical-align:var(--luzmo-icon-vertical-align, -.125em)!important}:host([block]){display:block;--icon-vertical-align: 0;vertical-align:0}:host([block]) ::slotted(svg),:host([block]) svg,:host([block]) img{--icon-vertical-align: 0;vertical-align:var(--luzmo-icon-vertical-align, 0)}:host([size=xxs]){--icon-size: var(--luzmo-icon-size-xxs)}:host([size=xs]){--icon-size: var(--luzmo-icon-size-xs)}:host([size=s]){--icon-size: var(--luzmo-icon-size-s)}:host,:host([size=m]){--icon-size: var(--luzmo-icon-size-m)}:host([size=l]){--icon-size: var(--luzmo-icon-size-l)}:host([size=xl]){--icon-size: var(--luzmo-icon-size-xl)}:host([size=xxl]){--icon-size: var(--luzmo-icon-size-xxl)}:host(:not(:root)){overflow:visible}@media (forced-colors: active){:host{forced-color-adjust:auto}}img,svg,::slotted(*){height:100%;vertical-align:top;color:inherit}@media (forced-colors: active){img,svg,::slotted(*){forced-color-adjust:auto}}";var h=Object.defineProperty,u=(i,t,n,z)=>{for(var e=void 0,s=i.length-1,l;s>=0;s--)(l=i[s])&&(e=l(t,n,e)||e);return e&&h(t,n,e),e};class a extends o.LuzmoElement{constructor(){super(...arguments),this.label=""}static get styles(){return[o.r(d)]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}update(t){t.has("label")&&(this.label?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")),super.update(t)}render(){return o.x` <slot></slot> `}}u([o.n({reflect:!0})],a.prototype,"label");u([o.n({reflect:!0})],a.prototype,"size");var f=Object.defineProperty,c=(i,t,n,z)=>{for(var e=void 0,s=i.length-1,l;s>=0;s--)(l=i[s])&&(e=l(t,n,e)||e);return e&&f(t,n,e),e};class r extends a{constructor(){super(...arguments),this.block=!1}render(){return this.icon?v.T3(this.icon,this.options):this.src?o.x` <img src=${this.src} alt=${m.o(this.label)} /> `:super.render()}}c([o.n()],r.prototype,"src");c([o.n()],r.prototype,"options");c([o.n()],r.prototype,"icon");c([o.n({type:Boolean})],r.prototype,"block");typeof customElements<"u"&&!customElements.get("luzmo-icon")&&customElements.define("luzmo-icon",r);exports.LuzmoIcon=r;
|
package/components/icon/index.js
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import {
|
|
19
|
-
import { a as b, r as g, x as m, n as i } from "../base-
|
|
20
|
-
import { o as p } from "../if-defined-
|
|
18
|
+
import { T as f } from "../luzmo-icons-CiSek5iM.js";
|
|
19
|
+
import { a as b, r as g, x as m, n as i } from "../base-CFWO09N1.js";
|
|
20
|
+
import { o as p } from "../if-defined-DULpqYwi.js";
|
|
21
21
|
const d = () => {
|
|
22
22
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
23
23
|
const l = document.createElement("style");
|
|
@@ -82,7 +82,7 @@ n([
|
|
|
82
82
|
n([
|
|
83
83
|
i({ type: Boolean })
|
|
84
84
|
], s.prototype, "block");
|
|
85
|
-
customElements.get("luzmo-icon")
|
|
85
|
+
typeof customElements < "u" && !customElements.get("luzmo-icon") && customElements.define("luzmo-icon", s);
|
|
86
86
|
export {
|
|
87
87
|
s as LuzmoIcon
|
|
88
88
|
};
|
|
@@ -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";const e=require("./base-
|
|
18
|
+
"use strict";const e=require("./base-Cy0MQrPT.cjs");/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2018 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -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";const b=require("./base-CBCg3yyw.cjs"),D=require("./query-BL-TJj7K.cjs"),C=require("./if-defined-C9YGdo33.cjs"),O=require("./style-map-CeilmSgs.cjs");require("./color-handle/index.cjs");const W=require("./focusable-EbipgXRh.cjs"),j=require("./language-resolution-DJzmyzZq.cjs"),U=require("./streaming-listener-B00MvALi.cjs");function c(r,t){V(r)&&(r="100%");const e=G(r);return r=t===360?r:Math.min(t,Math.max(0,parseFloat(r))),e&&(r=parseInt(String(r*t),10)/100),Math.abs(r-t)<1e-6?1:(t===360?r=(r<0?r%t+t:r%t)/parseFloat(String(t)):r=r%t/parseFloat(String(t)),r)}function w(r){return Math.min(1,Math.max(0,r))}function V(r){return typeof r=="string"&&r.indexOf(".")!==-1&&parseFloat(r)===1}function G(r){return typeof r=="string"&&r.indexOf("%")!==-1}function T(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function S(r){return Number(r)<=1?`${Number(r)*100}%`:r}function k(r){return r.length===1?"0"+r:String(r)}function K(r,t,e){return{r:c(r,255)*255,g:c(t,255)*255,b:c(e,255)*255}}function A(r,t,e){r=c(r,255),t=c(t,255),e=c(e,255);const s=Math.max(r,t,e),o=Math.min(r,t,e);let i=0,n=0;const a=(s+o)/2;if(s===o)n=0,i=0;else{const l=s-o;switch(n=a>.5?l/(2-s-o):l/(s+o),s){case r:i=(t-e)/l+(t<e?6:0);break;case t:i=(e-r)/l+2;break;case e:i=(r-t)/l+4;break}i/=6}return{h:i,s:n,l:a}}function R(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*(6*e):e<1/2?t:e<2/3?r+(t-r)*(2/3-e)*6:r}function X(r,t,e){let s,o,i;if(r=c(r,360),t=c(t,100),e=c(e,100),t===0)o=e,i=e,s=e;else{const n=e<.5?e*(1+t):e+t-e*t,a=2*e-n;s=R(a,n,r+1/3),o=R(a,n,r),i=R(a,n,r-1/3)}return{r:s*255,g:o*255,b:i*255}}function F(r,t,e){r=c(r,255),t=c(t,255),e=c(e,255);const s=Math.max(r,t,e),o=Math.min(r,t,e);let i=0;const n=s,a=s-o,l=s===0?0:a/s;if(s===o)i=0;else{switch(s){case r:i=(t-e)/a+(t<e?6:0);break;case t:i=(e-r)/a+2;break;case e:i=(r-t)/a+4;break}i/=6}return{h:i,s:l,v:n}}function Y(r,t,e){r=c(r,360)*6,t=c(t,100),e=c(e,100);const s=Math.floor(r),o=r-s,i=e*(1-t),n=e*(1-o*t),a=e*(1-(1-o)*t),l=s%6,v=[e,n,i,i,a,e][l],d=[a,e,e,n,i,i][l],y=[i,i,a,e,e,n][l];return{r:v*255,g:d*255,b:y*255}}function E(r,t,e,s){const o=[k(Math.round(r).toString(16)),k(Math.round(t).toString(16)),k(Math.round(e).toString(16))];return s&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Z(r,t,e,s,o){const i=[k(Math.round(r).toString(16)),k(Math.round(t).toString(16)),k(Math.round(e).toString(16)),k(Q(s))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function J(r,t,e,s){const o=r/100,i=t/100,n=e/100,a=s/100,l=255*(1-o)*(1-a),v=255*(1-i)*(1-a),d=255*(1-n)*(1-a);return{r:l,g:v,b:d}}function _(r,t,e){let s=1-r/255,o=1-t/255,i=1-e/255,n=Math.min(s,o,i);return n===1?(s=0,o=0,i=0):(s=(s-n)/(1-n)*100,o=(o-n)/(1-n)*100,i=(i-n)/(1-n)*100),n*=100,{c:Math.round(s),m:Math.round(o),y:Math.round(i),k:Math.round(n)}}function Q(r){return Math.round(parseFloat(r)*255).toString(16)}function I(r){return g(r)/255}function g(r){return parseInt(r,16)}function tt(r){return{r:r>>16,g:(r&65280)>>8,b:r&255}}const P={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function et(r){let t={r:0,g:0,b:0},e=1,s=null,o=null,i=null,n=!1,a=!1;return typeof r=="string"&&(r=it(r)),typeof r=="object"&&(f(r.r)&&f(r.g)&&f(r.b)?(t=K(r.r,r.g,r.b),n=!0,a=String(r.r).substr(-1)==="%"?"prgb":"rgb"):f(r.h)&&f(r.s)&&f(r.v)?(s=S(r.s),o=S(r.v),t=Y(r.h,s,o),n=!0,a="hsv"):f(r.h)&&f(r.s)&&f(r.l)?(s=S(r.s),i=S(r.l),t=X(r.h,s,i),n=!0,a="hsl"):f(r.c)&&f(r.m)&&f(r.y)&&f(r.k)&&(t=J(r.c,r.m,r.y,r.k),n=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(r,"a")&&(e=r.a)),e=T(e),{ok:n,format:r.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:e}}const rt="[-\\+]?\\d+%?",st="[-\\+]?\\d*\\.\\d+%?",x="(?:"+st+")|(?:"+rt+")",z="[\\s|\\(]+("+x+")[,|\\s]+("+x+")[,|\\s]+("+x+")\\s*\\)?",M="[\\s|\\(]+("+x+")[,|\\s]+("+x+")[,|\\s]+("+x+")[,|\\s]+("+x+")\\s*\\)?",m={CSS_UNIT:new RegExp(x),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+M),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+M),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+M),cmyk:new RegExp("cmyk"+M),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function it(r){if(r=r.trim().toLowerCase(),r.length===0)return!1;let t=!1;if(P[r])r=P[r],t=!0;else if(r==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let e=m.rgb.exec(r);return e?{r:e[1],g:e[2],b:e[3]}:(e=m.rgba.exec(r),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=m.hsl.exec(r),e?{h:e[1],s:e[2],l:e[3]}:(e=m.hsla.exec(r),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=m.hsv.exec(r),e?{h:e[1],s:e[2],v:e[3]}:(e=m.hsva.exec(r),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=m.cmyk.exec(r),e?{c:e[1],m:e[2],y:e[3],k:e[4]}:(e=m.hex8.exec(r),e?{r:g(e[1]),g:g(e[2]),b:g(e[3]),a:I(e[4]),format:t?"name":"hex8"}:(e=m.hex6.exec(r),e?{r:g(e[1]),g:g(e[2]),b:g(e[3]),format:t?"name":"hex"}:(e=m.hex4.exec(r),e?{r:g(e[1]+e[1]),g:g(e[2]+e[2]),b:g(e[3]+e[3]),a:I(e[4]+e[4]),format:t?"name":"hex8"}:(e=m.hex3.exec(r),e?{r:g(e[1]+e[1]),g:g(e[2]+e[2]),b:g(e[3]+e[3]),format:t?"name":"hex"}:!1))))))))))}function f(r){return typeof r=="number"?!Number.isNaN(r):m.CSS_UNIT.test(r)}class h{constructor(t="",e={}){if(t instanceof h)return t;typeof t=="number"&&(t=tt(t)),this.originalInput=t;const s=et(t);this.originalInput=t,this.r=s.r,this.g=s.g,this.b=s.b,this.a=s.a,this.roundA=Math.round(100*this.a)/100,this.format=e.format??s.format,this.gradientType=e.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=s.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let e,s,o;const i=t.r/255,n=t.g/255,a=t.b/255;return i<=.03928?e=i/12.92:e=Math.pow((i+.055)/1.055,2.4),n<=.03928?s=n/12.92:s=Math.pow((n+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),.2126*e+.7152*s+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=T(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=F(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=F(this.r,this.g,this.b),e=Math.round(t.h*360),s=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?`hsv(${e}, ${s}%, ${o}%)`:`hsva(${e}, ${s}%, ${o}%, ${this.roundA})`}toHsl(){const t=A(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=A(this.r,this.g,this.b),e=Math.round(t.h*360),s=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?`hsl(${e}, ${s}%, ${o}%)`:`hsla(${e}, ${s}%, ${o}%, ${this.roundA})`}toHex(t=!1){return E(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return Z(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),e=Math.round(this.g),s=Math.round(this.b);return this.a===1?`rgb(${t}, ${e}, ${s})`:`rgba(${t}, ${e}, ${s}, ${this.roundA})`}toPercentageRgb(){const t=e=>`${Math.round(c(e,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=e=>Math.round(c(e,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{..._(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:e,y:s,k:o}=_(this.r,this.g,this.b);return`cmyk(${t}, ${e}, ${s}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+E(this.r,this.g,this.b,!1);for(const[e,s]of Object.entries(P))if(t===s)return e;return!1}toString(t){const e=!!t;t=t??this.format;let s=!1;const o=this.a<1&&this.a>=0;return!e&&o&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(s=this.toRgbString()),t==="prgb"&&(s=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(s=this.toHexString()),t==="hex3"&&(s=this.toHexString(!0)),t==="hex4"&&(s=this.toHex8String(!0)),t==="hex8"&&(s=this.toHex8String()),t==="name"&&(s=this.toName()),t==="hsl"&&(s=this.toHslString()),t==="hsv"&&(s=this.toHsvString()),t==="cmyk"&&(s=this.toCmykString()),s||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new h(this.toString())}lighten(t=10){const e=this.toHsl();return e.l+=t/100,e.l=w(e.l),new h(e)}brighten(t=10){const e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(t/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(t/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(t/100)))),new h(e)}darken(t=10){const e=this.toHsl();return e.l-=t/100,e.l=w(e.l),new h(e)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const e=this.toHsl();return e.s-=t/100,e.s=w(e.s),new h(e)}saturate(t=10){const e=this.toHsl();return e.s+=t/100,e.s=w(e.s),new h(e)}greyscale(){return this.desaturate(100)}spin(t){const e=this.toHsl(),s=(e.h+t)%360;return e.h=s<0?360+s:s,new h(e)}mix(t,e=50){const s=this.toRgb(),o=new h(t).toRgb(),i=e/100,n={r:(o.r-s.r)*i+s.r,g:(o.g-s.g)*i+s.g,b:(o.b-s.b)*i+s.b,a:(o.a-s.a)*i+s.a};return new h(n)}analogous(t=6,e=30){const s=this.toHsl(),o=360/e,i=[this];for(s.h=(s.h-(o*t>>1)+720)%360;--t;)s.h=(s.h+o)%360,i.push(new h(s));return i}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new h(t)}monochromatic(t=6){const e=this.toHsv(),{h:s}=e,{s:o}=e;let{v:i}=e;const n=[],a=1/t;for(;t--;)n.push(new h({h:s,s:o,v:i})),i=(i+a)%1;return n}splitcomplement(){const t=this.toHsl(),{h:e}=t;return[this,new h({h:(e+72)%360,s:t.s,l:t.l}),new h({h:(e+216)%360,s:t.s,l:t.l})]}onBackground(t){const e=this.toRgb(),s=new h(t).toRgb(),o=e.a+s.a*(1-e.a);return new h({r:(e.r*e.a+s.r*s.a*(1-e.a))/o,g:(e.g*e.a+s.g*s.a*(1-e.a))/o,b:(e.b*e.a+s.b*s.a*(1-e.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const e=this.toHsl(),{h:s}=e,o=[this],i=360/t;for(let n=1;n<t;n++)o.push(new h({h:(s+n*i)%360,s:e.s,l:e.l}));return o}equals(t){const e=new h(t);return this.format==="cmyk"||e.format==="cmyk"?this.toCmykString()===e.toCmykString():this.toRgbString()===e.toRgbString()}}const N=/^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/,q=/(^hs[v|l]a?\s?\()\d{1,3}\.?\d*?(,?\s?)\d{1,3}/,B=/(^hs[v|l]a?\()\d{1,3}/,H=(r,t)=>t?r.toHexString():r.toHex();class ot{constructor(t,{applyColorToState:e,extractColorFromState:s,maintains:o}){this.maintains="hue",this._hue=0,this._opacity=1,this.getColorProcesses={rgb:(i,n)=>n?i.toRgbString():i.toRgb(),prgb:(i,n)=>n?i.toPercentageRgbString():i.toPercentageRgb(),hex8:(i,n)=>n?i.toHex8String():i.toHex8(),name:i=>i.toName()||i.toRgbString(),hsl:(i,n)=>{if(this.maintains==="hue"){if(n)return i.toHslString().replace(B,`$1${this.hue}`);const{s:d,l:y,a:$}=i.toHsl();return{h:this.hue,s:d,l:y,a:$}}if(n)return i.toHslString().replace(q,`$1${this.hue}$2${this.saturation}`);const{s:a,l,a:v}=i.toHsl();return{h:this.hue,s:a,l,a:v}},hsv:(i,n)=>{if(this.maintains==="hue"){if(n)return i.toHsvString().replace(B,`$1${this.hue}`);const{s:d,v:y,a:$}=i.toHsv();return{h:this.hue,s:d,v:y,a:$}}if(n)return i.toHsvString().replace(q,`$1${this.hue}$2${this.saturation}`);const{s:a,v:l,a:v}=i.toHsv();return{h:this.hue,s:a,v:l,a:v}},hex:H,hex3:H,hex4:H,hex6:H},this._color=new h({h:0,s:1,v:1}),this._previousColor=new h({h:0,s:1,v:1}),this._format={format:"",isString:!1},this.host=t,this.applyColorToState=e,this.extractColorFromState=s,this.maintains=o||this.maintains}setColorProcess(t,e,s,o){this.maintains==="hue"?this.setColorMaintainHue(t,e,s,o):this.maintains==="saturation"&&this.setColorMaintainSaturation(t,e,s,o)}setColorMaintainHue(t,e,s,o){const{h:i,s:n,v:a,a:l}=this._color.toHsv();let v;if(o&&s.startsWith("hs")){const d=N.exec(e);if(d!==null){const[,y]=d;v=Number(y)}}else if(!o&&s.startsWith("hs")){const d=t.originalInput;v=Object.values(d)[0]}this.hue=v||i,this.opacity=l??1,this.applyColorToState({h:i,s:n,v:a,a:l})}setColorMaintainSaturation(t,e,s,o){const{a:i}=this._color.toHsv();if(o&&s.startsWith("hs")){const n=N.exec(e);if(n!==null){const[,a,l]=n;this.hue=Number(a),this.saturation=Number(l)}}else if(!o&&s.startsWith("hs")){const n=t.originalInput,a=Object.values(n);this.hue=a[0],this.saturation=a[1]}else{const{h:n}=t.toHsv();this.hue=n}this.opacity=i??1,this.applyColorToState(t.toHsv())}applyColorFromState(){this._color=new h(this.extractColorFromState(this))}get hue(){return this._hue}set hue(t){const e=Math.min(360,Math.max(0,t));if(e===this.hue)return;const s=this.hue,{s:o,v:i,a:n}=this._color.toHsv();this._color=new h({h:e,s:o,v:i,a:n}),this._hue=e,this.host.requestUpdate("hue",s)}get opacity(){return this._opacity}set opacity(t){const e=Math.min(1,Math.max(0,t));if(e===this.opacity)return;const s=this.opacity,{h:o,s:i,v:n}=this._color.toHsv();this._color=new h({h:o,s:i,v:n,a:e}),this._opacity=e,this.host.requestUpdate("opacity",s)}get value(){return this.color}get color(){return this.getColorProcesses[this._format.format||"hex"](this._color,this._format.isString)}set color(t){if(t===this.color)return;const e=this._color;this._color=new h(t);const s=this._color.format;let o=typeof t=="string"||t instanceof String;s.startsWith("hex")&&(o=t.startsWith("#")),this._format={format:s,isString:o},this.setColorProcess(this._color,t,s,o),this.host.requestUpdate("color",e)}getColor(t){const e={hsl:"toHsl"};return this._color[e[t]]()}setColor(t){this._color=t;const e=typeof this._color.originalInput=="string"||this._color.originalInput instanceof String;this.setColorProcess(this._color,t,this._color.format,e)}getHslString(){return this._color.toHslString()}savePreviousColor(){this._previousColor=this._color.clone()}restorePreviousColor(){this.setColor(this._previousColor)}}const nt='.opacity-checkerboard{position:absolute;block-size:100%;inline-size:100%;background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2)}:host{--luzmo-color-slider-gradient-fallback: rgb(255 0 0) 0%, rgb(255 255 0) 17%, rgb(0 255 0) 33%, rgb(0 255 255) 50%, rgb(0 0 255) 67%, rgb(255 0 255) 83%, rgb(255 0 0) 100%;touch-action:none}:host([vertical]) .handle{inset-block-start:unset;inset-block-end:0}:host([vertical]) .slider{-webkit-appearance:slider-vertical;-moz-appearance:slider-vertical;appearance:slider-vertical}:host(:focus){outline:none}.gradient{overflow:hidden}::slotted(*){width:100%;height:100%}@media (forced-colors: active){:host{--highcontrast-color-slider-border-color: CanvasText;--highcontrast-color-slider-border-color-disabled: GrayText;--highcontrast-color-slider-background-color-disabled: Canvas;forced-color-adjust:none}}:host{--luzmo-color-handle-hitarea-border-radius: var( --luzmo-color-slider-handle-hitarea-border-radius, 0px );min-inline-size:var(--luzmo-color-slider-minimum-length, 80px);inline-size:var(--luzmo-color-slider-length, 192px);block-size:var(--luzmo-color-slider-control-track-width, 24px);-webkit-user-select:none;user-select:none;cursor:default;display:block;position:relative}:host([focused]){z-index:2}:host([disabled]){pointer-events:none}:host([disabled]) .gradient{display:none}:host([vertical]){min-block-size:var(--luzmo-color-slider-vertical-minimum-height, var(--luzmo-color-slider-minimum-length, 80px));block-size:var(--luzmo-color-slider-vertical-height, var(--luzmo-color-slider-length, 192px));min-inline-size:0;inline-size:var(--luzmo-color-slider-vertical-control-track-width, var(--luzmo-color-slider-control-track-height, 24px));display:inline-block}:host([vertical]) .handle{inset-inline-start:50%}.handle{inset-block-start:50%;inset-inline-start:0}.checkerboard{--luzmo-color-slider-border-color-local: var( --highcontrast-color-slider-border-color, var(--luzmo-color-slider-border-color, var(--luzmo-border-color)) )}.checkerboard:before{content:"";z-index:1;box-shadow:inset 0 0 0 var(--luzmo-color-slider-border-width, var(--luzmo-border-width)) var(--luzmo-color-slider-border-color-local);border-radius:var(--luzmo-color-slider-border-rounding, var(--luzmo-border-radius-s));position:absolute;top:0;right:0;bottom:0;left:0}:host([disabled]) .checkerboard{--luzmo-color-slider-border-color-local: var( --highcontrast-color-slider-border-color-disabled, var(--luzmo-color-slider-border-color-disabled, var(--luzmo-dimmed-color)) );background:var(--highcontrast-color-slider-background-color-disabled, var(--luzmo-color-slider-background-color-disabled, var(--luzmo-dimmed-color)))}.checkerboard,.gradient{inline-size:100%;block-size:100%;border-radius:var(--luzmo-color-slider-border-rounding, var(--luzmo-border-radius-s))}.gradient:dir(rtl),:host([dir=rtl]) .gradient{transform:scaleX(-1)}.slider{opacity:0;inline-size:100%;block-size:100%;z-index:0;pointer-events:none;margin:0;position:absolute;inset-block-start:0;inset-inline-start:0}';var at=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,p=(r,t,e,s)=>{for(var o=s>1?void 0:s?ht(t,e):t,i=r.length-1,n;i>=0;i--)(n=r[i])&&(o=(s?n(t,e,o):n(o))||o);return s&&o&&at(t,e,o),o};class u extends W.Focusable{constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.label="hue",this.vertical=!1,this.languageResolver=new j.LanguageResolutionController(this),this.colorController=new ot(this,{applyColorToState:()=>{if(this.mode==="opacity"){const t=new h(this.colorController.color);this.sliderHandlePosition=100*t.getAlpha()}else this.sliderHandlePosition=100*(this.colorController.hue/360)},extractColorFromState:t=>this.mode==="opacity"?{...t.getColor("hsl"),a:this.value}:{...t.getColor("hsl"),h:this.value},maintains:"saturation"}),this.sliderHandlePosition=0,this.step=1,this.isLTR=!0,this._altered=0,this._pointerDown=!1}static get styles(){return[b.r(nt)]}get value(){return this.mode==="opacity"?this.colorController.opacity:this.colorController.hue}set value(t){this.mode==="opacity"?this.colorController.opacity=t:this.colorController.hue=t}get color(){return this.colorController.color}set color(t){this.colorController.color=t}get altered(){return this._altered}set altered(t){this._altered=t,this.step=Math.max(1,this.altered*10)}get focusElement(){return this.input}handleKeydown(t){const{key:e}=t;this.focused=!0,this.altered=[t.shiftKey,t.ctrlKey,t.altKey].filter(n=>!!n).length;let s=0;switch(e){case"ArrowUp":{s=this.step;break}case"ArrowDown":{s=-this.step;break}case"ArrowLeft":{s=this.step*(this.isLTR?-1:1);break}case"ArrowRight":{s=this.step*(this.isLTR?1:-1);break}default:return}t.preventDefault();const i=100/(this.mode==="opacity"?100:360);this.sliderHandlePosition=Math.min(100,Math.max(0,this.sliderHandlePosition+s*i)),this.value=this.mode==="opacity"?Math.min(1,Math.max(0,this.value+s/100)):Math.min(360,Math.max(0,this.value+s)),this.colorController.applyColorFromState(),s!==0&&(this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleInput(t){const{valueAsNumber:e}=t.target;this.value=e,this.sliderHandlePosition=100*(this.mode==="opacity"?this.value:this.value/360),this.colorController.applyColorFromState()}handleChange(t){this.handleInput(t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}focus(t={}){super.focus(t),this.forwardFocus()}forwardFocus(){this.input.focus()}handleFocus(){this.focused=!0}handleBlur(){this._pointerDown||(this.altered=0,this.focused=!1)}handlePointerdown(t){if(t.button!==0){t.preventDefault();return}this._pointerDown=!0,this.colorController.savePreviousColor(),this.boundingClientRect=this.getBoundingClientRect(),t.target.setPointerCapture(t.pointerId),t.pointerType==="mouse"&&(this.focused=!0)}handlePointermove(t){this.sliderHandlePosition=this.calculateHandlePosition(t),this.value=(this.mode==="opacity"?1:360)*(this.sliderHandlePosition/100),this.colorController.applyColorFromState(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0,cancelable:!0}))}handlePointerup(t){this._pointerDown=!1,t.target.releasePointerCapture(t.pointerId),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||this.colorController.restorePreviousColor(),this.focus(),t.pointerType==="mouse"&&(this.focused=!1)}calculateHandlePosition(t){if(!this.boundingClientRect)return this.sliderHandlePosition;const e=this.boundingClientRect,s=this.vertical?e.top:e.left,o=this.vertical?t.clientY:t.clientX,i=this.vertical?e.height:e.width,n=Math.max(0,Math.min(1,(o-s)/i));return this.vertical||!this.isLTR?100-100*n:100*n}handleGradientPointerdown(t){t.button===0&&(t.stopPropagation(),t.preventDefault(),this.handle.dispatchEvent(new PointerEvent("pointerdown",t)),this.handlePointermove(t))}get handlePositionStyles(){return`${this.vertical?"inset-block-end":"inset-inline-start"}: ${this.sliderHandlePosition}%`}get getColorSliderStyle(){const t=this.vertical?"top":"right";if(this.mode==="opacity"){const e=new h(this.colorController.color).setAlpha(1).toRgbString();return{background:`linear-gradient(to ${t}, transparent, ${e})`}}return{background:`linear-gradient(to ${t}, var(--luzmo-color-slider-gradient, var(--luzmo-color-slider-gradient-fallback)))`}}render(){return b.x`
|
|
18
|
+
"use strict";const b=require("./base-Cy0MQrPT.cjs"),D=require("./query-BL-TJj7K.cjs"),C=require("./if-defined-DaXWqfzc.cjs"),O=require("./style-map-DuMd5xlY.cjs");require("./color-handle/index.cjs");const W=require("./focusable-B_KwfEec.cjs"),j=require("./language-resolution-EUER43cg.cjs"),U=require("./streaming-listener-DeGQYM-9.cjs");function c(r,t){V(r)&&(r="100%");const e=G(r);return r=t===360?r:Math.min(t,Math.max(0,parseFloat(r))),e&&(r=parseInt(String(r*t),10)/100),Math.abs(r-t)<1e-6?1:(t===360?r=(r<0?r%t+t:r%t)/parseFloat(String(t)):r=r%t/parseFloat(String(t)),r)}function w(r){return Math.min(1,Math.max(0,r))}function V(r){return typeof r=="string"&&r.indexOf(".")!==-1&&parseFloat(r)===1}function G(r){return typeof r=="string"&&r.indexOf("%")!==-1}function T(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function S(r){return Number(r)<=1?`${Number(r)*100}%`:r}function k(r){return r.length===1?"0"+r:String(r)}function K(r,t,e){return{r:c(r,255)*255,g:c(t,255)*255,b:c(e,255)*255}}function A(r,t,e){r=c(r,255),t=c(t,255),e=c(e,255);const s=Math.max(r,t,e),o=Math.min(r,t,e);let i=0,n=0;const a=(s+o)/2;if(s===o)n=0,i=0;else{const l=s-o;switch(n=a>.5?l/(2-s-o):l/(s+o),s){case r:i=(t-e)/l+(t<e?6:0);break;case t:i=(e-r)/l+2;break;case e:i=(r-t)/l+4;break}i/=6}return{h:i,s:n,l:a}}function R(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*(6*e):e<1/2?t:e<2/3?r+(t-r)*(2/3-e)*6:r}function X(r,t,e){let s,o,i;if(r=c(r,360),t=c(t,100),e=c(e,100),t===0)o=e,i=e,s=e;else{const n=e<.5?e*(1+t):e+t-e*t,a=2*e-n;s=R(a,n,r+1/3),o=R(a,n,r),i=R(a,n,r-1/3)}return{r:s*255,g:o*255,b:i*255}}function F(r,t,e){r=c(r,255),t=c(t,255),e=c(e,255);const s=Math.max(r,t,e),o=Math.min(r,t,e);let i=0;const n=s,a=s-o,l=s===0?0:a/s;if(s===o)i=0;else{switch(s){case r:i=(t-e)/a+(t<e?6:0);break;case t:i=(e-r)/a+2;break;case e:i=(r-t)/a+4;break}i/=6}return{h:i,s:l,v:n}}function Y(r,t,e){r=c(r,360)*6,t=c(t,100),e=c(e,100);const s=Math.floor(r),o=r-s,i=e*(1-t),n=e*(1-o*t),a=e*(1-(1-o)*t),l=s%6,v=[e,n,i,i,a,e][l],d=[a,e,e,n,i,i][l],y=[i,i,a,e,e,n][l];return{r:v*255,g:d*255,b:y*255}}function E(r,t,e,s){const o=[k(Math.round(r).toString(16)),k(Math.round(t).toString(16)),k(Math.round(e).toString(16))];return s&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Z(r,t,e,s,o){const i=[k(Math.round(r).toString(16)),k(Math.round(t).toString(16)),k(Math.round(e).toString(16)),k(Q(s))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function J(r,t,e,s){const o=r/100,i=t/100,n=e/100,a=s/100,l=255*(1-o)*(1-a),v=255*(1-i)*(1-a),d=255*(1-n)*(1-a);return{r:l,g:v,b:d}}function _(r,t,e){let s=1-r/255,o=1-t/255,i=1-e/255,n=Math.min(s,o,i);return n===1?(s=0,o=0,i=0):(s=(s-n)/(1-n)*100,o=(o-n)/(1-n)*100,i=(i-n)/(1-n)*100),n*=100,{c:Math.round(s),m:Math.round(o),y:Math.round(i),k:Math.round(n)}}function Q(r){return Math.round(parseFloat(r)*255).toString(16)}function I(r){return g(r)/255}function g(r){return parseInt(r,16)}function tt(r){return{r:r>>16,g:(r&65280)>>8,b:r&255}}const P={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function et(r){let t={r:0,g:0,b:0},e=1,s=null,o=null,i=null,n=!1,a=!1;return typeof r=="string"&&(r=it(r)),typeof r=="object"&&(f(r.r)&&f(r.g)&&f(r.b)?(t=K(r.r,r.g,r.b),n=!0,a=String(r.r).substr(-1)==="%"?"prgb":"rgb"):f(r.h)&&f(r.s)&&f(r.v)?(s=S(r.s),o=S(r.v),t=Y(r.h,s,o),n=!0,a="hsv"):f(r.h)&&f(r.s)&&f(r.l)?(s=S(r.s),i=S(r.l),t=X(r.h,s,i),n=!0,a="hsl"):f(r.c)&&f(r.m)&&f(r.y)&&f(r.k)&&(t=J(r.c,r.m,r.y,r.k),n=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(r,"a")&&(e=r.a)),e=T(e),{ok:n,format:r.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:e}}const rt="[-\\+]?\\d+%?",st="[-\\+]?\\d*\\.\\d+%?",x="(?:"+st+")|(?:"+rt+")",z="[\\s|\\(]+("+x+")[,|\\s]+("+x+")[,|\\s]+("+x+")\\s*\\)?",M="[\\s|\\(]+("+x+")[,|\\s]+("+x+")[,|\\s]+("+x+")[,|\\s]+("+x+")\\s*\\)?",m={CSS_UNIT:new RegExp(x),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+M),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+M),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+M),cmyk:new RegExp("cmyk"+M),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function it(r){if(r=r.trim().toLowerCase(),r.length===0)return!1;let t=!1;if(P[r])r=P[r],t=!0;else if(r==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let e=m.rgb.exec(r);return e?{r:e[1],g:e[2],b:e[3]}:(e=m.rgba.exec(r),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=m.hsl.exec(r),e?{h:e[1],s:e[2],l:e[3]}:(e=m.hsla.exec(r),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=m.hsv.exec(r),e?{h:e[1],s:e[2],v:e[3]}:(e=m.hsva.exec(r),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=m.cmyk.exec(r),e?{c:e[1],m:e[2],y:e[3],k:e[4]}:(e=m.hex8.exec(r),e?{r:g(e[1]),g:g(e[2]),b:g(e[3]),a:I(e[4]),format:t?"name":"hex8"}:(e=m.hex6.exec(r),e?{r:g(e[1]),g:g(e[2]),b:g(e[3]),format:t?"name":"hex"}:(e=m.hex4.exec(r),e?{r:g(e[1]+e[1]),g:g(e[2]+e[2]),b:g(e[3]+e[3]),a:I(e[4]+e[4]),format:t?"name":"hex8"}:(e=m.hex3.exec(r),e?{r:g(e[1]+e[1]),g:g(e[2]+e[2]),b:g(e[3]+e[3]),format:t?"name":"hex"}:!1))))))))))}function f(r){return typeof r=="number"?!Number.isNaN(r):m.CSS_UNIT.test(r)}class h{constructor(t="",e={}){if(t instanceof h)return t;typeof t=="number"&&(t=tt(t)),this.originalInput=t;const s=et(t);this.originalInput=t,this.r=s.r,this.g=s.g,this.b=s.b,this.a=s.a,this.roundA=Math.round(100*this.a)/100,this.format=e.format??s.format,this.gradientType=e.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=s.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let e,s,o;const i=t.r/255,n=t.g/255,a=t.b/255;return i<=.03928?e=i/12.92:e=Math.pow((i+.055)/1.055,2.4),n<=.03928?s=n/12.92:s=Math.pow((n+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),.2126*e+.7152*s+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=T(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=F(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=F(this.r,this.g,this.b),e=Math.round(t.h*360),s=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?`hsv(${e}, ${s}%, ${o}%)`:`hsva(${e}, ${s}%, ${o}%, ${this.roundA})`}toHsl(){const t=A(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=A(this.r,this.g,this.b),e=Math.round(t.h*360),s=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?`hsl(${e}, ${s}%, ${o}%)`:`hsla(${e}, ${s}%, ${o}%, ${this.roundA})`}toHex(t=!1){return E(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return Z(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),e=Math.round(this.g),s=Math.round(this.b);return this.a===1?`rgb(${t}, ${e}, ${s})`:`rgba(${t}, ${e}, ${s}, ${this.roundA})`}toPercentageRgb(){const t=e=>`${Math.round(c(e,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=e=>Math.round(c(e,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{..._(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:e,y:s,k:o}=_(this.r,this.g,this.b);return`cmyk(${t}, ${e}, ${s}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+E(this.r,this.g,this.b,!1);for(const[e,s]of Object.entries(P))if(t===s)return e;return!1}toString(t){const e=!!t;t=t??this.format;let s=!1;const o=this.a<1&&this.a>=0;return!e&&o&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(s=this.toRgbString()),t==="prgb"&&(s=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(s=this.toHexString()),t==="hex3"&&(s=this.toHexString(!0)),t==="hex4"&&(s=this.toHex8String(!0)),t==="hex8"&&(s=this.toHex8String()),t==="name"&&(s=this.toName()),t==="hsl"&&(s=this.toHslString()),t==="hsv"&&(s=this.toHsvString()),t==="cmyk"&&(s=this.toCmykString()),s||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new h(this.toString())}lighten(t=10){const e=this.toHsl();return e.l+=t/100,e.l=w(e.l),new h(e)}brighten(t=10){const e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(t/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(t/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(t/100)))),new h(e)}darken(t=10){const e=this.toHsl();return e.l-=t/100,e.l=w(e.l),new h(e)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const e=this.toHsl();return e.s-=t/100,e.s=w(e.s),new h(e)}saturate(t=10){const e=this.toHsl();return e.s+=t/100,e.s=w(e.s),new h(e)}greyscale(){return this.desaturate(100)}spin(t){const e=this.toHsl(),s=(e.h+t)%360;return e.h=s<0?360+s:s,new h(e)}mix(t,e=50){const s=this.toRgb(),o=new h(t).toRgb(),i=e/100,n={r:(o.r-s.r)*i+s.r,g:(o.g-s.g)*i+s.g,b:(o.b-s.b)*i+s.b,a:(o.a-s.a)*i+s.a};return new h(n)}analogous(t=6,e=30){const s=this.toHsl(),o=360/e,i=[this];for(s.h=(s.h-(o*t>>1)+720)%360;--t;)s.h=(s.h+o)%360,i.push(new h(s));return i}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new h(t)}monochromatic(t=6){const e=this.toHsv(),{h:s}=e,{s:o}=e;let{v:i}=e;const n=[],a=1/t;for(;t--;)n.push(new h({h:s,s:o,v:i})),i=(i+a)%1;return n}splitcomplement(){const t=this.toHsl(),{h:e}=t;return[this,new h({h:(e+72)%360,s:t.s,l:t.l}),new h({h:(e+216)%360,s:t.s,l:t.l})]}onBackground(t){const e=this.toRgb(),s=new h(t).toRgb(),o=e.a+s.a*(1-e.a);return new h({r:(e.r*e.a+s.r*s.a*(1-e.a))/o,g:(e.g*e.a+s.g*s.a*(1-e.a))/o,b:(e.b*e.a+s.b*s.a*(1-e.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const e=this.toHsl(),{h:s}=e,o=[this],i=360/t;for(let n=1;n<t;n++)o.push(new h({h:(s+n*i)%360,s:e.s,l:e.l}));return o}equals(t){const e=new h(t);return this.format==="cmyk"||e.format==="cmyk"?this.toCmykString()===e.toCmykString():this.toRgbString()===e.toRgbString()}}const N=/^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/,q=/(^hs[v|l]a?\s?\()\d{1,3}\.?\d*?(,?\s?)\d{1,3}/,B=/(^hs[v|l]a?\()\d{1,3}/,H=(r,t)=>t?r.toHexString():r.toHex();class ot{constructor(t,{applyColorToState:e,extractColorFromState:s,maintains:o}){this.maintains="hue",this._hue=0,this._opacity=1,this.getColorProcesses={rgb:(i,n)=>n?i.toRgbString():i.toRgb(),prgb:(i,n)=>n?i.toPercentageRgbString():i.toPercentageRgb(),hex8:(i,n)=>n?i.toHex8String():i.toHex8(),name:i=>i.toName()||i.toRgbString(),hsl:(i,n)=>{if(this.maintains==="hue"){if(n)return i.toHslString().replace(B,`$1${this.hue}`);const{s:d,l:y,a:$}=i.toHsl();return{h:this.hue,s:d,l:y,a:$}}if(n)return i.toHslString().replace(q,`$1${this.hue}$2${this.saturation}`);const{s:a,l,a:v}=i.toHsl();return{h:this.hue,s:a,l,a:v}},hsv:(i,n)=>{if(this.maintains==="hue"){if(n)return i.toHsvString().replace(B,`$1${this.hue}`);const{s:d,v:y,a:$}=i.toHsv();return{h:this.hue,s:d,v:y,a:$}}if(n)return i.toHsvString().replace(q,`$1${this.hue}$2${this.saturation}`);const{s:a,v:l,a:v}=i.toHsv();return{h:this.hue,s:a,v:l,a:v}},hex:H,hex3:H,hex4:H,hex6:H},this._color=new h({h:0,s:1,v:1}),this._previousColor=new h({h:0,s:1,v:1}),this._format={format:"",isString:!1},this.host=t,this.applyColorToState=e,this.extractColorFromState=s,this.maintains=o||this.maintains}setColorProcess(t,e,s,o){this.maintains==="hue"?this.setColorMaintainHue(t,e,s,o):this.maintains==="saturation"&&this.setColorMaintainSaturation(t,e,s,o)}setColorMaintainHue(t,e,s,o){const{h:i,s:n,v:a,a:l}=this._color.toHsv();let v;if(o&&s.startsWith("hs")){const d=N.exec(e);if(d!==null){const[,y]=d;v=Number(y)}}else if(!o&&s.startsWith("hs")){const d=t.originalInput;v=Object.values(d)[0]}this.hue=v||i,this.opacity=l??1,this.applyColorToState({h:i,s:n,v:a,a:l})}setColorMaintainSaturation(t,e,s,o){const{a:i}=this._color.toHsv();if(o&&s.startsWith("hs")){const n=N.exec(e);if(n!==null){const[,a,l]=n;this.hue=Number(a),this.saturation=Number(l)}}else if(!o&&s.startsWith("hs")){const n=t.originalInput,a=Object.values(n);this.hue=a[0],this.saturation=a[1]}else{const{h:n}=t.toHsv();this.hue=n}this.opacity=i??1,this.applyColorToState(t.toHsv())}applyColorFromState(){this._color=new h(this.extractColorFromState(this))}get hue(){return this._hue}set hue(t){const e=Math.min(360,Math.max(0,t));if(e===this.hue)return;const s=this.hue,{s:o,v:i,a:n}=this._color.toHsv();this._color=new h({h:e,s:o,v:i,a:n}),this._hue=e,this.host.requestUpdate("hue",s)}get opacity(){return this._opacity}set opacity(t){const e=Math.min(1,Math.max(0,t));if(e===this.opacity)return;const s=this.opacity,{h:o,s:i,v:n}=this._color.toHsv();this._color=new h({h:o,s:i,v:n,a:e}),this._opacity=e,this.host.requestUpdate("opacity",s)}get value(){return this.color}get color(){return this.getColorProcesses[this._format.format||"hex"](this._color,this._format.isString)}set color(t){if(t===this.color)return;const e=this._color;this._color=new h(t);const s=this._color.format;let o=typeof t=="string"||t instanceof String;s.startsWith("hex")&&(o=t.startsWith("#")),this._format={format:s,isString:o},this.setColorProcess(this._color,t,s,o),this.host.requestUpdate("color",e)}getColor(t){const e={hsl:"toHsl"};return this._color[e[t]]()}setColor(t){this._color=t;const e=typeof this._color.originalInput=="string"||this._color.originalInput instanceof String;this.setColorProcess(this._color,t,this._color.format,e)}getHslString(){return this._color.toHslString()}savePreviousColor(){this._previousColor=this._color.clone()}restorePreviousColor(){this.setColor(this._previousColor)}}const nt='.opacity-checkerboard{position:absolute;block-size:100%;inline-size:100%;background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2)}:host{--luzmo-color-slider-gradient-fallback: rgb(255 0 0) 0%, rgb(255 255 0) 17%, rgb(0 255 0) 33%, rgb(0 255 255) 50%, rgb(0 0 255) 67%, rgb(255 0 255) 83%, rgb(255 0 0) 100%;touch-action:none}:host([vertical]) .handle{inset-block-start:unset;inset-block-end:0}:host([vertical]) .slider{-webkit-appearance:slider-vertical;-moz-appearance:slider-vertical;appearance:slider-vertical}:host(:focus){outline:none}.gradient{overflow:hidden}::slotted(*){width:100%;height:100%}@media (forced-colors: active){:host{--highcontrast-color-slider-border-color: CanvasText;--highcontrast-color-slider-border-color-disabled: GrayText;--highcontrast-color-slider-background-color-disabled: Canvas;forced-color-adjust:none}}:host{--luzmo-color-handle-hitarea-border-radius: var( --luzmo-color-slider-handle-hitarea-border-radius, 0px );min-inline-size:var(--luzmo-color-slider-minimum-length, 80px);inline-size:var(--luzmo-color-slider-length, 192px);block-size:var(--luzmo-color-slider-control-track-width, 24px);-webkit-user-select:none;user-select:none;cursor:default;display:block;position:relative}:host([focused]){z-index:2}:host([disabled]){pointer-events:none}:host([disabled]) .gradient{display:none}:host([vertical]){min-block-size:var(--luzmo-color-slider-vertical-minimum-height, var(--luzmo-color-slider-minimum-length, 80px));block-size:var(--luzmo-color-slider-vertical-height, var(--luzmo-color-slider-length, 192px));min-inline-size:0;inline-size:var(--luzmo-color-slider-vertical-control-track-width, var(--luzmo-color-slider-control-track-height, 24px));display:inline-block}:host([vertical]) .handle{inset-inline-start:50%}.handle{inset-block-start:50%;inset-inline-start:0}.checkerboard{--luzmo-color-slider-border-color-local: var( --highcontrast-color-slider-border-color, var(--luzmo-color-slider-border-color, var(--luzmo-border-color)) )}.checkerboard:before{content:"";z-index:1;box-shadow:inset 0 0 0 var(--luzmo-color-slider-border-width, var(--luzmo-border-width)) var(--luzmo-color-slider-border-color-local);border-radius:var(--luzmo-color-slider-border-rounding, var(--luzmo-border-radius-s));position:absolute;top:0;right:0;bottom:0;left:0}:host([disabled]) .checkerboard{--luzmo-color-slider-border-color-local: var( --highcontrast-color-slider-border-color-disabled, var(--luzmo-color-slider-border-color-disabled, var(--luzmo-dimmed-color)) );background:var(--highcontrast-color-slider-background-color-disabled, var(--luzmo-color-slider-background-color-disabled, var(--luzmo-dimmed-color)))}.checkerboard,.gradient{inline-size:100%;block-size:100%;border-radius:var(--luzmo-color-slider-border-rounding, var(--luzmo-border-radius-s))}.gradient:dir(rtl),:host([dir=rtl]) .gradient{transform:scaleX(-1)}.slider{opacity:0;inline-size:100%;block-size:100%;z-index:0;pointer-events:none;margin:0;position:absolute;inset-block-start:0;inset-inline-start:0}';var at=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,p=(r,t,e,s)=>{for(var o=s>1?void 0:s?ht(t,e):t,i=r.length-1,n;i>=0;i--)(n=r[i])&&(o=(s?n(t,e,o):n(o))||o);return s&&o&&at(t,e,o),o};class u extends W.Focusable{constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.label="hue",this.vertical=!1,this.languageResolver=new j.LanguageResolutionController(this),this.colorController=new ot(this,{applyColorToState:()=>{if(this.mode==="opacity"){const t=new h(this.colorController.color);this.sliderHandlePosition=100*t.getAlpha()}else this.sliderHandlePosition=100*(this.colorController.hue/360)},extractColorFromState:t=>this.mode==="opacity"?{...t.getColor("hsl"),a:this.value}:{...t.getColor("hsl"),h:this.value},maintains:"saturation"}),this.sliderHandlePosition=0,this.step=1,this.isLTR=!0,this._altered=0,this._pointerDown=!1}static get styles(){return[b.r(nt)]}get value(){return this.mode==="opacity"?this.colorController.opacity:this.colorController.hue}set value(t){this.mode==="opacity"?this.colorController.opacity=t:this.colorController.hue=t}get color(){return this.colorController.color}set color(t){this.colorController.color=t}get altered(){return this._altered}set altered(t){this._altered=t,this.step=Math.max(1,this.altered*10)}get focusElement(){return this.input}handleKeydown(t){const{key:e}=t;this.focused=!0,this.altered=[t.shiftKey,t.ctrlKey,t.altKey].filter(n=>!!n).length;let s=0;switch(e){case"ArrowUp":{s=this.step;break}case"ArrowDown":{s=-this.step;break}case"ArrowLeft":{s=this.step*(this.isLTR?-1:1);break}case"ArrowRight":{s=this.step*(this.isLTR?1:-1);break}default:return}t.preventDefault();const i=100/(this.mode==="opacity"?100:360);this.sliderHandlePosition=Math.min(100,Math.max(0,this.sliderHandlePosition+s*i)),this.value=this.mode==="opacity"?Math.min(1,Math.max(0,this.value+s/100)):Math.min(360,Math.max(0,this.value+s)),this.colorController.applyColorFromState(),s!==0&&(this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleInput(t){const{valueAsNumber:e}=t.target;this.value=e,this.sliderHandlePosition=100*(this.mode==="opacity"?this.value:this.value/360),this.colorController.applyColorFromState()}handleChange(t){this.handleInput(t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}focus(t={}){super.focus(t),this.forwardFocus()}forwardFocus(){this.input.focus()}handleFocus(){this.focused=!0}handleBlur(){this._pointerDown||(this.altered=0,this.focused=!1)}handlePointerdown(t){if(t.button!==0){t.preventDefault();return}this._pointerDown=!0,this.colorController.savePreviousColor(),this.boundingClientRect=this.getBoundingClientRect(),t.target.setPointerCapture(t.pointerId),t.pointerType==="mouse"&&(this.focused=!0)}handlePointermove(t){this.sliderHandlePosition=this.calculateHandlePosition(t),this.value=(this.mode==="opacity"?1:360)*(this.sliderHandlePosition/100),this.colorController.applyColorFromState(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0,cancelable:!0}))}handlePointerup(t){this._pointerDown=!1,t.target.releasePointerCapture(t.pointerId),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||this.colorController.restorePreviousColor(),this.focus(),t.pointerType==="mouse"&&(this.focused=!1)}calculateHandlePosition(t){if(!this.boundingClientRect)return this.sliderHandlePosition;const e=this.boundingClientRect,s=this.vertical?e.top:e.left,o=this.vertical?t.clientY:t.clientX,i=this.vertical?e.height:e.width,n=Math.max(0,Math.min(1,(o-s)/i));return this.vertical||!this.isLTR?100-100*n:100*n}handleGradientPointerdown(t){t.button===0&&(t.stopPropagation(),t.preventDefault(),this.handle.dispatchEvent(new PointerEvent("pointerdown",t)),this.handlePointermove(t))}get handlePositionStyles(){return`${this.vertical?"inset-block-end":"inset-inline-start"}: ${this.sliderHandlePosition}%`}get getColorSliderStyle(){const t=this.vertical?"top":"right";if(this.mode==="opacity"){const e=new h(this.colorController.color).setAlpha(1).toRgbString();return{background:`linear-gradient(to ${t}, transparent, ${e})`}}return{background:`linear-gradient(to ${t}, var(--luzmo-color-slider-gradient, var(--luzmo-color-slider-gradient-fallback)))`}}render(){return b.x`
|
|
19
19
|
<div
|
|
20
20
|
class="opacity-checkerboard checkerboard"
|
|
21
21
|
role="presentation"
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
18
|
import { $ as de } from "./NumberFormatter-DgOUVrge.js";
|
|
19
|
-
import { a as Be, r as Ae, x as g, n as F } from "./base-
|
|
20
|
-
import { e as Re } from "./class-map-
|
|
21
|
-
import { o as Oe } from "./if-defined-
|
|
22
|
-
import { S as Pe } from "./sized-mixin-
|
|
19
|
+
import { a as Be, r as Ae, x as g, n as F } from "./base-CFWO09N1.js";
|
|
20
|
+
import { e as Re } from "./class-map-CGfNk3Ee.js";
|
|
21
|
+
import { o as Oe } from "./if-defined-DULpqYwi.js";
|
|
22
|
+
import { S as Pe } from "./sized-mixin-CJbBHWRQ.js";
|
|
23
23
|
import "./action-button/index.js";
|
|
24
24
|
import "./icon/index.js";
|
|
25
|
-
import {
|
|
26
|
-
import { r as D } from "./state-
|
|
25
|
+
import { k as We, S as Ye } from "./luzmo-icons-CiSek5iM.js";
|
|
26
|
+
import { r as D } from "./state-DwIwYPvt.js";
|
|
27
27
|
function Z(t, e) {
|
|
28
28
|
return t - e * Math.floor(t / e);
|
|
29
29
|
}
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { r as W, x as j, n as v } from "./base-
|
|
18
|
+
import { r as W, x as j, n as v } from "./base-CFWO09N1.js";
|
|
19
19
|
import { e as T } from "./query-D_KR_GUc.js";
|
|
20
|
-
import { o as C } from "./if-defined-
|
|
21
|
-
import { o as q } from "./style-map-
|
|
20
|
+
import { o as C } from "./if-defined-DULpqYwi.js";
|
|
21
|
+
import { o as q } from "./style-map-Bnhf_mVZ.js";
|
|
22
22
|
import "./color-handle/index.js";
|
|
23
|
-
import { F as U } from "./focusable-
|
|
24
|
-
import { L as V } from "./language-resolution-
|
|
25
|
-
import { s as G } from "./streaming-listener-
|
|
23
|
+
import { F as U } from "./focusable-C5JjRZmT.js";
|
|
24
|
+
import { L as V } from "./language-resolution-B-wjV5bb.js";
|
|
25
|
+
import { s as G } from "./streaming-listener-BQ68fKMa.js";
|
|
26
26
|
function c(r, t) {
|
|
27
27
|
K(r) && (r = "100%");
|
|
28
28
|
const e = X(r);
|