@luzmo/lucero 0.0.3 → 0.0.4
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/lib/accordion/index.cjs +43 -0
- package/lib/accordion/index.js +182 -0
- package/lib/action-bar/index.cjs +39 -0
- package/lib/action-bar/index.js +108 -0
- package/lib/action-button/index.cjs +24 -0
- package/lib/action-button/index.js +162 -0
- package/lib/action-group/index.cjs +18 -0
- package/lib/action-group/index.js +29 -0
- package/lib/action-group-BoIH8s8R.js +259 -0
- package/lib/action-group-D4MxBrq8.cjs +20 -0
- package/lib/action-menu/index.cjs +56 -0
- package/lib/action-menu/index.js +127 -0
- package/lib/async-directive-CV2MII86.cjs +22 -0
- package/lib/async-directive-FGzMycjH.js +82 -0
- package/lib/avatar/index.cjs +24 -0
- package/lib/avatar/index.js +82 -0
- package/lib/base-BCmA9Wxv.cjs +30 -0
- package/lib/base-BjTwmyRF.cjs +22 -0
- package/lib/base-D76d76ww.js +26 -0
- package/lib/base-nYalvNMy.js +390 -0
- package/lib/button/index.cjs +20 -0
- package/lib/button/index.js +128 -0
- package/lib/button-base-B0iB_JTv.cjs +25 -0
- package/lib/button-base-DgtT6sU5.js +143 -0
- package/lib/button-group/index.cjs +18 -0
- package/lib/button-group/index.js +60 -0
- package/lib/checkbox/index.cjs +25 -0
- package/lib/checkbox/index.js +97 -0
- package/lib/checkbox-mixin-DegQlk5C.js +71 -0
- package/lib/checkbox-mixin-H0Hm-VLk.cjs +27 -0
- package/lib/clear-button-Ap5H3UyH.js +54 -0
- package/lib/clear-button-D0djuaLb.cjs +18 -0
- package/lib/close-button-BrfeZvjk.cjs +18 -0
- package/lib/close-button-CGISEF33.js +52 -0
- package/lib/color-Bg3tYsAQ.js +178 -0
- package/lib/color-DphK4hwx.cjs +18 -0
- package/lib/color-area/index.cjs +80 -0
- package/lib/color-area/index.js +373 -0
- package/lib/color-field/index.cjs +23 -0
- package/lib/color-field/index.js +81 -0
- package/lib/color-handle/index.cjs +24 -0
- package/lib/color-handle/index.js +74 -0
- package/lib/color-loupe/index.cjs +18 -0
- package/lib/color-loupe/index.js +29 -0
- package/lib/color-loupe-BICpNqFs.cjs +56 -0
- package/lib/color-loupe-DBEApMDT.js +82 -0
- package/lib/color-menu/index.cjs +86 -0
- package/lib/color-menu/index.js +204 -0
- package/lib/color-picker/index.cjs +48 -0
- package/lib/color-picker/index.js +142 -0
- package/lib/color-slider/index.cjs +57 -0
- package/lib/color-slider/index.js +318 -0
- package/lib/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
- package/lib/condition-attribute-with-id-Dv4lSRbe.js +31 -0
- package/lib/dependency-manger-C5HCkMMB.cjs +18 -0
- package/lib/dependency-manger-CEXvGQUV.js +54 -0
- package/lib/directive-C7oCP5Bh.cjs +22 -0
- package/lib/directive-helpers-BLDZnGQv.js +28 -0
- package/lib/directive-helpers-C2vOfhFx.cjs +22 -0
- package/lib/directive-oAbCiebi.js +44 -0
- package/lib/divider/index.cjs +18 -0
- package/lib/divider/index.js +62 -0
- package/lib/divider.module-CXMNveQc.cjs +18 -0
- package/lib/divider.module-DwOuLGU3.js +21 -0
- package/lib/element-resolution-BvRLGqIU.cjs +18 -0
- package/lib/element-resolution-FCUT-wql.js +91 -0
- package/lib/field-group/index.cjs +18 -0
- package/lib/field-group/index.js +29 -0
- package/lib/field-group-CBWafIUV.js +67 -0
- package/lib/field-group-TUFvhJkk.cjs +23 -0
- package/lib/field-label/index.cjs +18 -0
- package/lib/field-label/index.js +29 -0
- package/lib/field-label-BK_tk8vP.js +107 -0
- package/lib/field-label-BrJaeORz.cjs +25 -0
- package/lib/focus-group-DHeTq18L.js +218 -0
- package/lib/focus-group-DnxZUBhQ.cjs +18 -0
- package/lib/focus-visible-B0P9aY_G.cjs +18 -0
- package/lib/focus-visible-DBlJGoEW.js +74 -0
- package/lib/focusable-DbUg-3Vp.js +153 -0
- package/lib/focusable-Dv_6CFaY.cjs +18 -0
- package/lib/focusable-selectors-B4YgbghQ.js +31 -0
- package/lib/focusable-selectors-BgFlyFcY.cjs +18 -0
- package/lib/icon/index.cjs +18 -0
- package/lib/icon/index.js +89 -0
- package/lib/if-defined-CYpcjGCb.js +27 -0
- package/lib/if-defined-Cv6xanXh.cjs +22 -0
- package/lib/index-C1chwzNp.js +727 -0
- package/lib/index-DCKCHDTt.cjs +18 -0
- package/lib/index-ovT-qVzf.js +928 -0
- package/lib/index-yNcLzjhM.cjs +77 -0
- package/lib/index.cjs +18 -0
- package/lib/index.js +133 -0
- package/lib/infield-button/index.cjs +22 -0
- package/lib/infield-button/index.js +65 -0
- package/lib/label/index.cjs +18 -0
- package/lib/label/index.js +52 -0
- package/lib/legend-position/index.cjs +27 -0
- package/lib/legend-position/index.js +85 -0
- package/lib/like-anchor-K8W0QYwC.cjs +32 -0
- package/lib/like-anchor-cDeGGeHh.js +70 -0
- package/lib/lit-html-B3ugcwD9.js +248 -0
- package/lib/lit-html-p4Oxv2-5.cjs +24 -0
- package/lib/manage-help-text-2mSEy-AD.js +92 -0
- package/lib/manage-help-text-iOk-zmy8.cjs +30 -0
- package/lib/menu/index.cjs +18 -0
- package/lib/menu/index.js +32 -0
- package/lib/multi-language-field/index.cjs +39 -0
- package/lib/multi-language-field/index.js +149 -0
- package/lib/mutation-controller-DH7YOCyj.js +52 -0
- package/lib/mutation-controller-DkOMCW-c.cjs +22 -0
- package/lib/number-field/index.cjs +57 -0
- package/lib/number-field/index.js +736 -0
- package/lib/observe-slot-text-BmsCNJig.cjs +18 -0
- package/lib/observe-slot-text-BoFRF-VI.js +87 -0
- package/lib/overlay/index.cjs +73 -0
- package/lib/overlay/index.js +325 -0
- package/lib/overlay-C7QKFqRc.js +2702 -0
- package/lib/overlay-DScraBAi.cjs +47 -0
- package/lib/pending-state-D5KTK4_1.js +61 -0
- package/lib/pending-state-Dbc2HIM2.cjs +26 -0
- package/lib/picker/index.cjs +18 -0
- package/lib/picker/index.js +32 -0
- package/lib/picker--2OCYWnV.js +657 -0
- package/lib/picker-B9W7Haf4.cjs +127 -0
- package/lib/platform-CQzYNWKq.cjs +18 -0
- package/lib/platform-DQYMG7JI.js +54 -0
- package/lib/popover/index.cjs +18 -0
- package/lib/popover/index.js +29 -0
- package/lib/popover-CVbjhSnx.cjs +30 -0
- package/lib/popover-ZRVxogyp.js +68 -0
- package/lib/progress-circle/index.cjs +18 -0
- package/lib/progress-circle/index.js +29 -0
- package/lib/progress-circle-CiJoS8J7.cjs +33 -0
- package/lib/progress-circle-DpXiqW6a.js +98 -0
- package/lib/query-BL-TJj7K.cjs +22 -0
- package/lib/query-D_KR_GUc.js +51 -0
- package/lib/query-assigned-elements-DjfhL1cl.js +36 -0
- package/lib/query-assigned-elements-DsKsfk7G.cjs +22 -0
- package/lib/query-assigned-nodes-BcKWmGzy.cjs +22 -0
- package/lib/query-assigned-nodes-C76XVPWY.js +36 -0
- package/lib/radio/index.cjs +22 -0
- package/lib/radio/index.js +192 -0
- package/lib/random-id-ByCz1xaq.js +26 -0
- package/lib/random-id-CqvckpWe.cjs +18 -0
- package/lib/roving-tabindex-By_fCy_e.cjs +18 -0
- package/lib/roving-tabindex-DOg4z6ZU.js +66 -0
- package/lib/search/index.cjs +45 -0
- package/lib/search/index.js +132 -0
- package/lib/sized-mixin-BSYHt8nT.cjs +18 -0
- package/lib/sized-mixin-Dl0KoEcV.js +63 -0
- package/lib/slider/index.cjs +18 -0
- package/lib/slider/index.js +1159 -0
- package/lib/slottable-request-event-BfUUt1Mh.cjs +18 -0
- package/lib/slottable-request-event-DggLA4Rx.js +31 -0
- package/lib/state-BAO-13Bs.js +29 -0
- package/lib/state-DReJ3hB6.cjs +22 -0
- package/lib/streaming-listener-Bw4jE33f.cjs +18 -0
- package/lib/streaming-listener-DLo0wkMc.js +125 -0
- package/lib/style-map-BjBGQ_u3.cjs +22 -0
- package/lib/style-map-BqvQDFJt.js +53 -0
- package/lib/swatch/index.cjs +49 -0
- package/lib/swatch/index.js +343 -0
- package/lib/switch/index.cjs +22 -0
- package/lib/switch/index.js +74 -0
- package/lib/tags/index.cjs +32 -0
- package/lib/tags/index.js +174 -0
- package/lib/text-field/index.cjs +21 -0
- package/lib/text-field/index.js +62 -0
- package/lib/text-field-C6Aa7XOb.cjs +85 -0
- package/lib/text-field-DPk332j9.js +315 -0
- package/lib/toast/index.cjs +51 -0
- package/lib/toast/index.js +154 -0
- package/lib/tooltip/index.cjs +45 -0
- package/lib/tooltip/index.js +221 -0
- package/lib/unit-input/index.cjs +43 -0
- package/lib/unit-input/index.js +184 -0
- package/lib/when-CDK1Tt5Y.js +28 -0
- package/lib/when-CDZyJPvd.cjs +22 -0
- package/package.json +2 -2
|
@@ -0,0 +1,48 @@
|
|
|
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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../base-BCmA9Wxv.cjs"),c=require("../sized-mixin-BSYHt8nT.cjs"),s=require("lit"),d=require("../state-DReJ3hB6.cjs"),h=require("../query-BL-TJj7K.cjs");require("../overlay/index.cjs");const m=require("../slottable-request-event-BfUUt1Mh.cjs");require("../popover/index.cjs");require("../swatch/index.cjs");require("../color-menu/index.cjs");const v="luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";var g=Object.defineProperty,t=(p,r,n,z)=>{for(var l=void 0,i=p.length-1,u;i>=0;i--)(u=p[i])&&(l=u(r,n,l)||l);return l&&g(r,n,l),l};const a=class a extends c.SizedMixin(o.LuzmoElement){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.open=!1,this.disabled=!1,this.placement="left-start",this.rounding="full",this.swatches=[],this.noAlphaChannel=!1,this._renderMenu=!1}overlayCloseEvent(r){this.open=!1}overlayOpenEvent(r){this.open=!0}handleColorChange(r){this.color=this.menuElement.color,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}firstUpdated(r){this.overlayElement.addEventListener("slottable-request",n=>{this._renderMenu=n.data!==m.removeSlottableRequest})}updated(r){r.has("open")&&this.open===!0&&(this._renderMenu=!0)}renderColorMenu(){return s.html`
|
|
19
|
+
<luzmo-color-menu
|
|
20
|
+
.size=${this.size}
|
|
21
|
+
.color=${this.color}
|
|
22
|
+
.noAlphaChannel=${this.noAlphaChannel}
|
|
23
|
+
.swatches=${this.swatches}
|
|
24
|
+
@change=${this.handleColorChange}
|
|
25
|
+
></luzmo-color-menu>
|
|
26
|
+
`}render(){return s.html`
|
|
27
|
+
<luzmo-swatch
|
|
28
|
+
id="trigger"
|
|
29
|
+
.shape=${this.shape}
|
|
30
|
+
.rounding=${this.rounding}
|
|
31
|
+
.size=${this.size}
|
|
32
|
+
.color=${this.color}
|
|
33
|
+
.selected=${this.open&&!this.disabled}
|
|
34
|
+
?disabled=${this.disabled}
|
|
35
|
+
@luzmo-closed=${this.overlayCloseEvent}
|
|
36
|
+
@luzmo-opened=${this.overlayOpenEvent}
|
|
37
|
+
></luzmo-swatch>
|
|
38
|
+
<luzmo-overlay
|
|
39
|
+
trigger=${this.disabled?"":"trigger@click"}
|
|
40
|
+
type="auto"
|
|
41
|
+
.placement=${this.placement}
|
|
42
|
+
type="page"
|
|
43
|
+
>
|
|
44
|
+
<luzmo-popover style="position:relative">
|
|
45
|
+
${this._renderMenu?this.renderColorMenu():s.html``}
|
|
46
|
+
</luzmo-popover>
|
|
47
|
+
</luzmo-overlay>
|
|
48
|
+
`}};a.styles=s.unsafeCSS(v);let e=a;t([o.n({type:String,reflect:!0})],e.prototype,"color");t([o.n({type:Boolean,reflect:!0})],e.prototype,"open");t([o.n({type:Boolean,reflect:!0})],e.prototype,"disabled");t([o.n({type:String,reflect:!0})],e.prototype,"placement");t([o.n({type:String,reflect:!0})],e.prototype,"rounding");t([o.n({type:String,reflect:!0})],e.prototype,"shape");t([o.n({type:Array,reflect:!0})],e.prototype,"swatches");t([o.n({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],e.prototype,"noAlphaChannel");t([h.e("luzmo-color-menu")],e.prototype,"menuElement");t([h.e("luzmo-overlay")],e.prototype,"overlayElement");t([d.r()],e.prototype,"_renderMenu");customElements.get("luzmo-color-picker")||customElements.define("luzmo-color-picker",e);exports.LuzmoColorPicker=e;
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
import { L as z, n as l } from "../base-nYalvNMy.js";
|
|
19
|
+
import { S as d } from "../sized-mixin-Dl0KoEcV.js";
|
|
20
|
+
import { unsafeCSS as h, html as a } from "lit";
|
|
21
|
+
import { r as g } from "../state-BAO-13Bs.js";
|
|
22
|
+
import { e as c } from "../query-D_KR_GUc.js";
|
|
23
|
+
import "../overlay/index.js";
|
|
24
|
+
import { r as f } from "../slottable-request-event-DggLA4Rx.js";
|
|
25
|
+
import "../popover/index.js";
|
|
26
|
+
import "../swatch/index.js";
|
|
27
|
+
import "../color-menu/index.js";
|
|
28
|
+
const p = () => {
|
|
29
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
30
|
+
const t = document.createElement("style");
|
|
31
|
+
t.setAttribute("data-luzmo-vars", ""), t.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-color-negative: #ca221c;--luzmo-color-negative-hover: #b3241f;--luzmo-color-negative-down: #9f231f;--luzmo-color-negative-focus: #b3241f;--luzmo-color-negative-rgb: 202, 34, 28;--luzmo-color-positive: rgb(20, 150, 101);--luzmo-color-positive-hover: rgb(17, 128, 86);--luzmo-color-positive-down: rgb(16, 105, 71);--luzmo-color-positive-focus: rgb(17, 128, 86);--luzmo-color-positive-rgb: 20, 150, 101;--luzmo-color-selected: rgb(110, 110, 110);--luzmo-color-selected-hover: rgb(70, 70, 70);--luzmo-color-selected-down: rgb(40, 40, 40);--luzmo-color-selected-focus: rgb(70, 70, 70);--luzmo-color-selected-hard: #1e1e1e;--luzmo-color-selected-hard-hover: rgb(0, 0, 0);--luzmo-color-selected-hard-down: rgb(0, 0, 0);--luzmo-color-selected-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(t);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
p();
|
|
35
|
+
const b = "luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";
|
|
36
|
+
var v = Object.defineProperty, e = (t, r, i, x) => {
|
|
37
|
+
for (var n = void 0, u = t.length - 1, s; u >= 0; u--)
|
|
38
|
+
(s = t[u]) && (n = s(r, i, n) || n);
|
|
39
|
+
return n && v(r, i, n), n;
|
|
40
|
+
};
|
|
41
|
+
const m = class m extends d(z) {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(...arguments), this.color = "rgb(255, 0, 0)", this.open = !1, this.disabled = !1, this.placement = "left-start", this.rounding = "full", this.swatches = [], this.noAlphaChannel = !1, this._renderMenu = !1;
|
|
44
|
+
}
|
|
45
|
+
overlayCloseEvent(r) {
|
|
46
|
+
this.open = !1;
|
|
47
|
+
}
|
|
48
|
+
overlayOpenEvent(r) {
|
|
49
|
+
this.open = !0;
|
|
50
|
+
}
|
|
51
|
+
handleColorChange(r) {
|
|
52
|
+
this.color = this.menuElement.color, this.dispatchEvent(
|
|
53
|
+
new Event("change", {
|
|
54
|
+
bubbles: !0,
|
|
55
|
+
composed: !0
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
firstUpdated(r) {
|
|
60
|
+
this.overlayElement.addEventListener("slottable-request", (i) => {
|
|
61
|
+
this._renderMenu = i.data !== f;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
updated(r) {
|
|
65
|
+
r.has("open") && this.open === !0 && (this._renderMenu = !0);
|
|
66
|
+
}
|
|
67
|
+
renderColorMenu() {
|
|
68
|
+
return a`
|
|
69
|
+
<luzmo-color-menu
|
|
70
|
+
.size=${this.size}
|
|
71
|
+
.color=${this.color}
|
|
72
|
+
.noAlphaChannel=${this.noAlphaChannel}
|
|
73
|
+
.swatches=${this.swatches}
|
|
74
|
+
@change=${this.handleColorChange}
|
|
75
|
+
></luzmo-color-menu>
|
|
76
|
+
`;
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
return a`
|
|
80
|
+
<luzmo-swatch
|
|
81
|
+
id="trigger"
|
|
82
|
+
.shape=${this.shape}
|
|
83
|
+
.rounding=${this.rounding}
|
|
84
|
+
.size=${this.size}
|
|
85
|
+
.color=${this.color}
|
|
86
|
+
.selected=${this.open && !this.disabled}
|
|
87
|
+
?disabled=${this.disabled}
|
|
88
|
+
@luzmo-closed=${this.overlayCloseEvent}
|
|
89
|
+
@luzmo-opened=${this.overlayOpenEvent}
|
|
90
|
+
></luzmo-swatch>
|
|
91
|
+
<luzmo-overlay
|
|
92
|
+
trigger=${this.disabled ? "" : "trigger@click"}
|
|
93
|
+
type="auto"
|
|
94
|
+
.placement=${this.placement}
|
|
95
|
+
type="page"
|
|
96
|
+
>
|
|
97
|
+
<luzmo-popover style="position:relative">
|
|
98
|
+
${this._renderMenu ? this.renderColorMenu() : a``}
|
|
99
|
+
</luzmo-popover>
|
|
100
|
+
</luzmo-overlay>
|
|
101
|
+
`;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
m.styles = h(b);
|
|
105
|
+
let o = m;
|
|
106
|
+
e([
|
|
107
|
+
l({ type: String, reflect: !0 })
|
|
108
|
+
], o.prototype, "color");
|
|
109
|
+
e([
|
|
110
|
+
l({ type: Boolean, reflect: !0 })
|
|
111
|
+
], o.prototype, "open");
|
|
112
|
+
e([
|
|
113
|
+
l({ type: Boolean, reflect: !0 })
|
|
114
|
+
], o.prototype, "disabled");
|
|
115
|
+
e([
|
|
116
|
+
l({ type: String, reflect: !0 })
|
|
117
|
+
], o.prototype, "placement");
|
|
118
|
+
e([
|
|
119
|
+
l({ type: String, reflect: !0 })
|
|
120
|
+
], o.prototype, "rounding");
|
|
121
|
+
e([
|
|
122
|
+
l({ type: String, reflect: !0 })
|
|
123
|
+
], o.prototype, "shape");
|
|
124
|
+
e([
|
|
125
|
+
l({ type: Array, reflect: !0 })
|
|
126
|
+
], o.prototype, "swatches");
|
|
127
|
+
e([
|
|
128
|
+
l({ type: Boolean, reflect: !0, attribute: "no-alpha-channel" })
|
|
129
|
+
], o.prototype, "noAlphaChannel");
|
|
130
|
+
e([
|
|
131
|
+
c("luzmo-color-menu")
|
|
132
|
+
], o.prototype, "menuElement");
|
|
133
|
+
e([
|
|
134
|
+
c("luzmo-overlay")
|
|
135
|
+
], o.prototype, "overlayElement");
|
|
136
|
+
e([
|
|
137
|
+
g()
|
|
138
|
+
], o.prototype, "_renderMenu");
|
|
139
|
+
customElements.get("luzmo-color-picker") || customElements.define("luzmo-color-picker", o);
|
|
140
|
+
export {
|
|
141
|
+
o as LuzmoColorPicker
|
|
142
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("lit"),l=require("../base-BCmA9Wxv.cjs"),b=require("../query-BL-TJj7K.cjs"),d=require("../if-defined-Cv6xanXh.cjs"),m=require("../style-map-BjBGQ_u3.cjs");require("../color-handle/index.cjs");const g=require("../focusable-Dv_6CFaY.cjs"),v=require("../color-DphK4hwx.cjs"),p=require("../streaming-listener-Bw4jE33f.cjs"),h=require("../index-DCKCHDTt.cjs"),f='.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 y=Object.defineProperty,z=Object.getOwnPropertyDescriptor,i=(c,e,t,o)=>{for(var s=o>1?void 0:o?z(e,t):e,a=c.length-1,n;a>=0;a--)(n=c[a])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&y(e,t,s),s};class r extends g.Focusable{constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.label="hue",this.vertical=!1,this.languageResolver=new p.LanguageResolutionController(this),this.colorController=new v.ColorController(this,{applyColorToState:()=>{if(this.mode==="opacity"){const e=new h.TinyColor(this.colorController.color);this.sliderHandlePosition=100*e.getAlpha()}else this.sliderHandlePosition=100*(this.colorController.hue/360)},extractColorFromState:e=>this.mode==="opacity"?{...e.getColor("hsl"),a:this.value}:{...e.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[u.unsafeCSS(f)]}get value(){return this.mode==="opacity"?this.colorController.opacity:this.colorController.hue}set value(e){this.mode==="opacity"?this.colorController.opacity=e:this.colorController.hue=e}get color(){return this.colorController.color}set color(e){this.colorController.color=e}get altered(){return this._altered}set altered(e){this._altered=e,this.step=Math.max(1,this.altered*10)}get focusElement(){return this.input}handleKeydown(e){const{key:t}=e;this.focused=!0,this.altered=[e.shiftKey,e.ctrlKey,e.altKey].filter(n=>!!n).length;let o=0;switch(t){case"ArrowUp":{o=this.step;break}case"ArrowDown":{o=-this.step;break}case"ArrowLeft":{o=this.step*(this.isLTR?-1:1);break}case"ArrowRight":{o=this.step*(this.isLTR?1:-1);break}default:return}e.preventDefault();const a=100/(this.mode==="opacity"?100:360);this.sliderHandlePosition=Math.min(100,Math.max(0,this.sliderHandlePosition+o*a)),this.value=this.mode==="opacity"?Math.min(1,Math.max(0,this.value+o/100)):Math.min(360,Math.max(0,this.value+o)),this.colorController.applyColorFromState(),o!==0&&(this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleInput(e){const{valueAsNumber:t}=e.target;this.value=t,this.sliderHandlePosition=100*(this.mode==="opacity"?this.value:this.value/360),this.colorController.applyColorFromState()}handleChange(e){this.handleInput(e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}focus(e={}){super.focus(e),this.forwardFocus()}forwardFocus(){this.input.focus()}handleFocus(){this.focused=!0}handleBlur(){this._pointerDown||(this.altered=0,this.focused=!1)}handlePointerdown(e){if(e.button!==0){e.preventDefault();return}this._pointerDown=!0,this.colorController.savePreviousColor(),this.boundingClientRect=this.getBoundingClientRect(),e.target.setPointerCapture(e.pointerId),e.pointerType==="mouse"&&(this.focused=!0)}handlePointermove(e){this.sliderHandlePosition=this.calculateHandlePosition(e),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(e){this._pointerDown=!1,e.target.releasePointerCapture(e.pointerId),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||this.colorController.restorePreviousColor(),this.focus(),e.pointerType==="mouse"&&(this.focused=!1)}calculateHandlePosition(e){if(!this.boundingClientRect)return this.sliderHandlePosition;const t=this.boundingClientRect,o=this.vertical?t.top:t.left,s=this.vertical?e.clientY:e.clientX,a=this.vertical?t.height:t.width,n=Math.max(0,Math.min(1,(s-o)/a));return this.vertical||!this.isLTR?100-100*n:100*n}handleGradientPointerdown(e){e.button===0&&(e.stopPropagation(),e.preventDefault(),this.handle.dispatchEvent(new PointerEvent("pointerdown",e)),this.handlePointermove(e))}get handlePositionStyles(){return`${this.vertical?"inset-block-end":"inset-inline-start"}: ${this.sliderHandlePosition}%`}get getColorSliderStyle(){const e=this.vertical?"top":"right";if(this.mode==="opacity"){const t=new h.TinyColor(this.colorController.color).setAlpha(1).toRgbString();return{background:`linear-gradient(to ${e}, transparent, ${t})`}}return{background:`linear-gradient(to ${e}, var(--luzmo-color-slider-gradient, var(--luzmo-color-slider-gradient-fallback)))`}}render(){return u.html`
|
|
19
|
+
<div
|
|
20
|
+
class="opacity-checkerboard checkerboard"
|
|
21
|
+
role="presentation"
|
|
22
|
+
@pointerdown=${this.handleGradientPointerdown}
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
class="gradient"
|
|
26
|
+
role="presentation"
|
|
27
|
+
style=${m.o(this.getColorSliderStyle)}
|
|
28
|
+
>
|
|
29
|
+
<slot name="gradient"></slot>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<luzmo-color-handle
|
|
33
|
+
tabindex=${d.o(this.focused?void 0:"0")}
|
|
34
|
+
@focus=${this.forwardFocus}
|
|
35
|
+
?focused=${this.focused}
|
|
36
|
+
class="handle"
|
|
37
|
+
color=${this.mode==="opacity"?this.color:"hsl("+this.value+", 100%, 50%)"}
|
|
38
|
+
?disabled=${this.disabled}
|
|
39
|
+
style=${this.handlePositionStyles}
|
|
40
|
+
${p.streamingListener({start:["pointerdown",this.handlePointerdown],streamInside:["pointermove",this.handlePointermove],end:[["pointerup","pointercancel","pointerleave"],this.handlePointerup]})}
|
|
41
|
+
></luzmo-color-handle>
|
|
42
|
+
<input
|
|
43
|
+
type="range"
|
|
44
|
+
class="slider"
|
|
45
|
+
min="0"
|
|
46
|
+
max=${this.mode==="opacity"?"100":"360"}
|
|
47
|
+
aria-orientation=${d.o(this.vertical?"vertical":void 0)}
|
|
48
|
+
orient=${d.o(this.vertical?"vertical":void 0)}
|
|
49
|
+
step=${this.step}
|
|
50
|
+
aria-label=${this.label}
|
|
51
|
+
.value=${String(this.mode==="opacity"?this.value*100:this.value)}
|
|
52
|
+
aria-valuetext=${`${new Intl.NumberFormat(this.languageResolver.language,{maximumFractionDigits:0,minimumIntegerDigits:1,style:"unit",unit:this.mode==="opacity"?"percent":"degree",unitDisplay:"narrow"}).format(this.mode==="opacity"?this.value*100:this.value)}`}
|
|
53
|
+
@input=${this.handleInput}
|
|
54
|
+
@change=${this.handleChange}
|
|
55
|
+
@keydown=${this.handleKeydown}
|
|
56
|
+
/>
|
|
57
|
+
`}firstUpdated(e){super.firstUpdated(e),this.boundingClientRect=this.getBoundingClientRect(),this.addEventListener("focus",this.handleFocus),this.addEventListener("blur",this.handleBlur)}updated(e){e.has("mode")&&(this.handle.style.insetInlineStart="",this.handle.style.insetBlockEnd="",this.mode==="opacity"&&(this.colorController.color=new h.TinyColor(this.colorController.color).toRgbString(),this.handle.style.insetInlineStart=100*this.colorController.opacity+"%"))}}i([l.n({type:String,reflect:!0})],r.prototype,"dir",2);i([l.n({type:String,reflect:!0})],r.prototype,"mode",2);i([l.n({type:Boolean,reflect:!0})],r.prototype,"disabled",2);i([l.n({type:Boolean,reflect:!0})],r.prototype,"focused",2);i([b.e(".handle")],r.prototype,"handle",2);i([l.n({type:String})],r.prototype,"label",2);i([l.n({type:Boolean,reflect:!0})],r.prototype,"vertical",2);i([l.n({type:Number})],r.prototype,"value",1);i([l.n({type:Number,reflect:!0})],r.prototype,"sliderHandlePosition",2);i([l.n({type:String})],r.prototype,"color",1);i([l.n({type:Number})],r.prototype,"step",2);i([l.n({type:Boolean,attribute:"is-ltr"})],r.prototype,"isLTR",2);i([b.e("input")],r.prototype,"input",2);customElements.get("luzmo-color-slider")||customElements.define("luzmo-color-slider",r);exports.LuzmoColorSlider=r;
|
|
@@ -0,0 +1,318 @@
|
|
|
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
|
+
import { unsafeCSS as p, html as b } from "lit";
|
|
19
|
+
import { n as i } from "../base-nYalvNMy.js";
|
|
20
|
+
import { e as h } from "../query-D_KR_GUc.js";
|
|
21
|
+
import { o as d } from "../if-defined-CYpcjGCb.js";
|
|
22
|
+
import { o as g } from "../style-map-BqvQDFJt.js";
|
|
23
|
+
import "../color-handle/index.js";
|
|
24
|
+
import { F as z } from "../focusable-DbUg-3Vp.js";
|
|
25
|
+
import { C as f } from "../color-Bg3tYsAQ.js";
|
|
26
|
+
import { L as v, s as y } from "../streaming-listener-DLo0wkMc.js";
|
|
27
|
+
import { T as u } from "../index-C1chwzNp.js";
|
|
28
|
+
const m = () => {
|
|
29
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
30
|
+
const a = document.createElement("style");
|
|
31
|
+
a.setAttribute("data-luzmo-vars", ""), a.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-color-negative: #ca221c;--luzmo-color-negative-hover: #b3241f;--luzmo-color-negative-down: #9f231f;--luzmo-color-negative-focus: #b3241f;--luzmo-color-negative-rgb: 202, 34, 28;--luzmo-color-positive: rgb(20, 150, 101);--luzmo-color-positive-hover: rgb(17, 128, 86);--luzmo-color-positive-down: rgb(16, 105, 71);--luzmo-color-positive-focus: rgb(17, 128, 86);--luzmo-color-positive-rgb: 20, 150, 101;--luzmo-color-selected: rgb(110, 110, 110);--luzmo-color-selected-hover: rgb(70, 70, 70);--luzmo-color-selected-down: rgb(40, 40, 40);--luzmo-color-selected-focus: rgb(70, 70, 70);--luzmo-color-selected-hard: #1e1e1e;--luzmo-color-selected-hard-hover: rgb(0, 0, 0);--luzmo-color-selected-hard-down: rgb(0, 0, 0);--luzmo-color-selected-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(a);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
m();
|
|
35
|
+
const x = '.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}';
|
|
36
|
+
var w = Object.defineProperty, k = Object.getOwnPropertyDescriptor, l = (a, o, e, r) => {
|
|
37
|
+
for (var s = r > 1 ? void 0 : r ? k(o, e) : o, c = a.length - 1, n; c >= 0; c--)
|
|
38
|
+
(n = a[c]) && (s = (r ? n(o, e, s) : n(s)) || s);
|
|
39
|
+
return r && s && w(o, e, s), s;
|
|
40
|
+
};
|
|
41
|
+
class t extends z {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(...arguments), this.disabled = !1, this.focused = !1, this.label = "hue", this.vertical = !1, this.languageResolver = new v(this), this.colorController = new f(this, {
|
|
44
|
+
/* c8 ignore next 3 */
|
|
45
|
+
applyColorToState: () => {
|
|
46
|
+
if (this.mode === "opacity") {
|
|
47
|
+
const o = new u(this.colorController.color);
|
|
48
|
+
this.sliderHandlePosition = 100 * o.getAlpha();
|
|
49
|
+
} else
|
|
50
|
+
this.sliderHandlePosition = 100 * (this.colorController.hue / 360);
|
|
51
|
+
},
|
|
52
|
+
extractColorFromState: (o) => this.mode === "opacity" ? {
|
|
53
|
+
...o.getColor("hsl"),
|
|
54
|
+
a: this.value
|
|
55
|
+
} : {
|
|
56
|
+
...o.getColor("hsl"),
|
|
57
|
+
h: this.value
|
|
58
|
+
},
|
|
59
|
+
maintains: "saturation"
|
|
60
|
+
}), this.sliderHandlePosition = 0, this.step = 1, this.isLTR = !0, this._altered = 0, this._pointerDown = !1;
|
|
61
|
+
}
|
|
62
|
+
static get styles() {
|
|
63
|
+
return [p(x)];
|
|
64
|
+
}
|
|
65
|
+
get value() {
|
|
66
|
+
return this.mode === "opacity" ? this.colorController.opacity : this.colorController.hue;
|
|
67
|
+
}
|
|
68
|
+
set value(o) {
|
|
69
|
+
this.mode === "opacity" ? this.colorController.opacity = o : this.colorController.hue = o;
|
|
70
|
+
}
|
|
71
|
+
get color() {
|
|
72
|
+
return this.colorController.color;
|
|
73
|
+
}
|
|
74
|
+
set color(o) {
|
|
75
|
+
this.colorController.color = o;
|
|
76
|
+
}
|
|
77
|
+
get altered() {
|
|
78
|
+
return this._altered;
|
|
79
|
+
}
|
|
80
|
+
set altered(o) {
|
|
81
|
+
this._altered = o, this.step = Math.max(1, this.altered * 10);
|
|
82
|
+
}
|
|
83
|
+
get focusElement() {
|
|
84
|
+
return this.input;
|
|
85
|
+
}
|
|
86
|
+
handleKeydown(o) {
|
|
87
|
+
const { key: e } = o;
|
|
88
|
+
this.focused = !0, this.altered = [o.shiftKey, o.ctrlKey, o.altKey].filter(
|
|
89
|
+
(n) => !!n
|
|
90
|
+
).length;
|
|
91
|
+
let r = 0;
|
|
92
|
+
switch (e) {
|
|
93
|
+
case "ArrowUp": {
|
|
94
|
+
r = this.step;
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
case "ArrowDown": {
|
|
98
|
+
r = -this.step;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
case "ArrowLeft": {
|
|
102
|
+
r = this.step * (this.isLTR ? -1 : 1);
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
case "ArrowRight": {
|
|
106
|
+
r = this.step * (this.isLTR ? 1 : -1);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
default:
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
o.preventDefault();
|
|
113
|
+
const c = 100 / (this.mode === "opacity" ? 100 : 360);
|
|
114
|
+
this.sliderHandlePosition = Math.min(
|
|
115
|
+
100,
|
|
116
|
+
Math.max(0, this.sliderHandlePosition + r * c)
|
|
117
|
+
), this.value = this.mode === "opacity" ? Math.min(1, Math.max(0, this.value + r / 100)) : Math.min(360, Math.max(0, this.value + r)), this.colorController.applyColorFromState(), r !== 0 && (this.dispatchEvent(
|
|
118
|
+
new Event("input", {
|
|
119
|
+
bubbles: !0,
|
|
120
|
+
composed: !0
|
|
121
|
+
})
|
|
122
|
+
), this.dispatchEvent(
|
|
123
|
+
new Event("change", {
|
|
124
|
+
bubbles: !0,
|
|
125
|
+
composed: !0
|
|
126
|
+
})
|
|
127
|
+
));
|
|
128
|
+
}
|
|
129
|
+
handleInput(o) {
|
|
130
|
+
const { valueAsNumber: e } = o.target;
|
|
131
|
+
this.value = e, this.sliderHandlePosition = 100 * (this.mode === "opacity" ? this.value : this.value / 360), this.colorController.applyColorFromState();
|
|
132
|
+
}
|
|
133
|
+
handleChange(o) {
|
|
134
|
+
this.handleInput(o), this.dispatchEvent(
|
|
135
|
+
new Event("change", {
|
|
136
|
+
bubbles: !0,
|
|
137
|
+
composed: !0
|
|
138
|
+
})
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
focus(o = {}) {
|
|
142
|
+
super.focus(o), this.forwardFocus();
|
|
143
|
+
}
|
|
144
|
+
forwardFocus() {
|
|
145
|
+
this.input.focus();
|
|
146
|
+
}
|
|
147
|
+
handleFocus() {
|
|
148
|
+
this.focused = !0;
|
|
149
|
+
}
|
|
150
|
+
handleBlur() {
|
|
151
|
+
this._pointerDown || (this.altered = 0, this.focused = !1);
|
|
152
|
+
}
|
|
153
|
+
handlePointerdown(o) {
|
|
154
|
+
if (o.button !== 0) {
|
|
155
|
+
o.preventDefault();
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
this._pointerDown = !0, this.colorController.savePreviousColor(), this.boundingClientRect = this.getBoundingClientRect(), o.target.setPointerCapture(o.pointerId), o.pointerType === "mouse" && (this.focused = !0);
|
|
159
|
+
}
|
|
160
|
+
handlePointermove(o) {
|
|
161
|
+
this.sliderHandlePosition = this.calculateHandlePosition(o), this.value = (this.mode === "opacity" ? 1 : 360) * (this.sliderHandlePosition / 100), this.colorController.applyColorFromState(), this.dispatchEvent(
|
|
162
|
+
new Event("input", {
|
|
163
|
+
bubbles: !0,
|
|
164
|
+
composed: !0,
|
|
165
|
+
cancelable: !0
|
|
166
|
+
})
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
handlePointerup(o) {
|
|
170
|
+
this._pointerDown = !1, o.target.releasePointerCapture(o.pointerId), this.dispatchEvent(
|
|
171
|
+
new Event("change", {
|
|
172
|
+
bubbles: !0,
|
|
173
|
+
composed: !0,
|
|
174
|
+
cancelable: !0
|
|
175
|
+
})
|
|
176
|
+
) || this.colorController.restorePreviousColor(), this.focus(), o.pointerType === "mouse" && (this.focused = !1);
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Returns the value under the cursor
|
|
180
|
+
* @param: PointerEvent on slider
|
|
181
|
+
* @return: Slider value that correlates to the position under the pointer
|
|
182
|
+
*/
|
|
183
|
+
calculateHandlePosition(o) {
|
|
184
|
+
if (!this.boundingClientRect)
|
|
185
|
+
return this.sliderHandlePosition;
|
|
186
|
+
const e = this.boundingClientRect, r = this.vertical ? e.top : e.left, s = this.vertical ? o.clientY : o.clientX, c = this.vertical ? e.height : e.width, n = Math.max(0, Math.min(1, (s - r) / c));
|
|
187
|
+
return this.vertical || !this.isLTR ? 100 - 100 * n : 100 * n;
|
|
188
|
+
}
|
|
189
|
+
handleGradientPointerdown(o) {
|
|
190
|
+
o.button === 0 && (o.stopPropagation(), o.preventDefault(), this.handle.dispatchEvent(new PointerEvent("pointerdown", o)), this.handlePointermove(o));
|
|
191
|
+
}
|
|
192
|
+
get handlePositionStyles() {
|
|
193
|
+
return `${this.vertical ? "inset-block-end" : "inset-inline-start"}: ${this.sliderHandlePosition}%`;
|
|
194
|
+
}
|
|
195
|
+
get getColorSliderStyle() {
|
|
196
|
+
const o = this.vertical ? "top" : "right";
|
|
197
|
+
if (this.mode === "opacity") {
|
|
198
|
+
const e = new u(this.colorController.color).setAlpha(1).toRgbString();
|
|
199
|
+
return {
|
|
200
|
+
background: `linear-gradient(to ${o}, transparent, ${e})`
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
background: `linear-gradient(to ${o}, var(--luzmo-color-slider-gradient, var(--luzmo-color-slider-gradient-fallback)))`
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
render() {
|
|
208
|
+
return b`
|
|
209
|
+
<div
|
|
210
|
+
class="opacity-checkerboard checkerboard"
|
|
211
|
+
role="presentation"
|
|
212
|
+
@pointerdown=${this.handleGradientPointerdown}
|
|
213
|
+
>
|
|
214
|
+
<div
|
|
215
|
+
class="gradient"
|
|
216
|
+
role="presentation"
|
|
217
|
+
style=${g(this.getColorSliderStyle)}
|
|
218
|
+
>
|
|
219
|
+
<slot name="gradient"></slot>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
<luzmo-color-handle
|
|
223
|
+
tabindex=${d(this.focused ? void 0 : "0")}
|
|
224
|
+
@focus=${this.forwardFocus}
|
|
225
|
+
?focused=${this.focused}
|
|
226
|
+
class="handle"
|
|
227
|
+
color=${this.mode === "opacity" ? this.color : "hsl(" + this.value + ", 100%, 50%)"}
|
|
228
|
+
?disabled=${this.disabled}
|
|
229
|
+
style=${this.handlePositionStyles}
|
|
230
|
+
${y({
|
|
231
|
+
start: ["pointerdown", this.handlePointerdown],
|
|
232
|
+
streamInside: ["pointermove", this.handlePointermove],
|
|
233
|
+
end: [
|
|
234
|
+
["pointerup", "pointercancel", "pointerleave"],
|
|
235
|
+
this.handlePointerup
|
|
236
|
+
]
|
|
237
|
+
})}
|
|
238
|
+
></luzmo-color-handle>
|
|
239
|
+
<input
|
|
240
|
+
type="range"
|
|
241
|
+
class="slider"
|
|
242
|
+
min="0"
|
|
243
|
+
max=${this.mode === "opacity" ? "100" : "360"}
|
|
244
|
+
aria-orientation=${d(this.vertical ? "vertical" : void 0)}
|
|
245
|
+
orient=${d(this.vertical ? "vertical" : void 0)}
|
|
246
|
+
step=${this.step}
|
|
247
|
+
aria-label=${this.label}
|
|
248
|
+
.value=${String(
|
|
249
|
+
this.mode === "opacity" ? this.value * 100 : this.value
|
|
250
|
+
)}
|
|
251
|
+
aria-valuetext=${`${new Intl.NumberFormat(
|
|
252
|
+
this.languageResolver.language,
|
|
253
|
+
{
|
|
254
|
+
maximumFractionDigits: 0,
|
|
255
|
+
minimumIntegerDigits: 1,
|
|
256
|
+
style: "unit",
|
|
257
|
+
unit: this.mode === "opacity" ? "percent" : "degree",
|
|
258
|
+
unitDisplay: "narrow"
|
|
259
|
+
}
|
|
260
|
+
).format(this.mode === "opacity" ? this.value * 100 : this.value)}`}
|
|
261
|
+
@input=${this.handleInput}
|
|
262
|
+
@change=${this.handleChange}
|
|
263
|
+
@keydown=${this.handleKeydown}
|
|
264
|
+
/>
|
|
265
|
+
`;
|
|
266
|
+
}
|
|
267
|
+
firstUpdated(o) {
|
|
268
|
+
super.firstUpdated(o), this.boundingClientRect = this.getBoundingClientRect(), this.addEventListener("focus", this.handleFocus), this.addEventListener("blur", this.handleBlur);
|
|
269
|
+
}
|
|
270
|
+
updated(o) {
|
|
271
|
+
o.has("mode") && (this.handle.style.insetInlineStart = "", this.handle.style.insetBlockEnd = "", this.mode === "opacity" && (this.colorController.color = new u(
|
|
272
|
+
this.colorController.color
|
|
273
|
+
).toRgbString(), this.handle.style.insetInlineStart = 100 * this.colorController.opacity + "%"));
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
l([
|
|
277
|
+
i({ type: String, reflect: !0 })
|
|
278
|
+
], t.prototype, "dir", 2);
|
|
279
|
+
l([
|
|
280
|
+
i({ type: String, reflect: !0 })
|
|
281
|
+
], t.prototype, "mode", 2);
|
|
282
|
+
l([
|
|
283
|
+
i({ type: Boolean, reflect: !0 })
|
|
284
|
+
], t.prototype, "disabled", 2);
|
|
285
|
+
l([
|
|
286
|
+
i({ type: Boolean, reflect: !0 })
|
|
287
|
+
], t.prototype, "focused", 2);
|
|
288
|
+
l([
|
|
289
|
+
h(".handle")
|
|
290
|
+
], t.prototype, "handle", 2);
|
|
291
|
+
l([
|
|
292
|
+
i({ type: String })
|
|
293
|
+
], t.prototype, "label", 2);
|
|
294
|
+
l([
|
|
295
|
+
i({ type: Boolean, reflect: !0 })
|
|
296
|
+
], t.prototype, "vertical", 2);
|
|
297
|
+
l([
|
|
298
|
+
i({ type: Number })
|
|
299
|
+
], t.prototype, "value", 1);
|
|
300
|
+
l([
|
|
301
|
+
i({ type: Number, reflect: !0 })
|
|
302
|
+
], t.prototype, "sliderHandlePosition", 2);
|
|
303
|
+
l([
|
|
304
|
+
i({ type: String })
|
|
305
|
+
], t.prototype, "color", 1);
|
|
306
|
+
l([
|
|
307
|
+
i({ type: Number })
|
|
308
|
+
], t.prototype, "step", 2);
|
|
309
|
+
l([
|
|
310
|
+
i({ type: Boolean, attribute: "is-ltr" })
|
|
311
|
+
], t.prototype, "isLTR", 2);
|
|
312
|
+
l([
|
|
313
|
+
h("input")
|
|
314
|
+
], t.prototype, "input", 2);
|
|
315
|
+
customElements.get("luzmo-color-slider") || customElements.define("luzmo-color-slider", t);
|
|
316
|
+
export {
|
|
317
|
+
t as LuzmoColorSlider
|
|
318
|
+
};
|
|
@@ -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";function o(t,i,r){const e=t.getAttribute(i);let s=e?e.split(/\s+/):[];s=s.filter(n=>!r.includes(n)),s.length>0?t.setAttribute(i,s.join(" ")):t.removeAttribute(i)}function d(t,i,r){const e=Array.isArray(r)?r:[r],s=t.getAttribute(i),n=s?s.split(/\s+/):[];return e.every(c=>n.includes(c))?()=>{}:(n.push(...e),t.setAttribute(i,n.join(" ")),()=>o(t,i,e))}exports.conditionAttributeWithId=d;exports.conditionAttributeWithoutId=o;
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
function c(t, s, r) {
|
|
19
|
+
const e = t.getAttribute(s);
|
|
20
|
+
let i = e ? e.split(/\s+/) : [];
|
|
21
|
+
i = i.filter((n) => !r.includes(n)), i.length > 0 ? t.setAttribute(s, i.join(" ")) : t.removeAttribute(s);
|
|
22
|
+
}
|
|
23
|
+
function u(t, s, r) {
|
|
24
|
+
const e = Array.isArray(r) ? r : [r], i = t.getAttribute(s), n = i ? i.split(/\s+/) : [];
|
|
25
|
+
return e.every((o) => n.includes(o)) ? () => {
|
|
26
|
+
} : (n.push(...e), t.setAttribute(s, n.join(" ")), () => c(t, s, e));
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
c as a,
|
|
30
|
+
u as c
|
|
31
|
+
};
|