@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,32 @@
|
|
|
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 u, a as m, b as c, c as z, M as n } from "../index-ovT-qVzf.js";
|
|
19
|
+
const l = () => {
|
|
20
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
21
|
+
const o = document.createElement("style");
|
|
22
|
+
o.setAttribute("data-luzmo-vars", ""), o.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(o);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
l();
|
|
26
|
+
export {
|
|
27
|
+
u as LuzmoMenu,
|
|
28
|
+
m as LuzmoMenuDivider,
|
|
29
|
+
c as LuzmoMenuGroup,
|
|
30
|
+
z as LuzmoMenuItem,
|
|
31
|
+
n as MenuItemAddedOrUpdatedEvent
|
|
32
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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"),t=require("../base-BCmA9Wxv.cjs"),p=require("../sized-mixin-BSYHt8nT.cjs");require("../text-field/index.cjs");const h=require("../manage-help-text-iOk-zmy8.cjs"),d=":host{display:inline-block}:host luzmo-text-field{width:100%}";var g=Object.defineProperty,l=(n,i,r,y)=>{for(var a=void 0,o=n.length-1,s;o>=0;o--)(s=n[o])&&(a=s(i,r,a)||a);return a&&g(i,r,a),a};class e extends h.ManageHelpText(p.SizedMixin(t.LuzmoElement,{noDefaultSize:!0})){constructor(){super(...arguments),this.allowedKeys="",this.i18nPlaceholder={},this.type="text",this.grows=!1,this.maxlength=-1,this.minlength=-1,this.multiline=!1,this.rows=-1,this.quiet=!1,this.disabled=!1,this.required=!1,this.readonly=!1,this.language="en",this.defaultLanguage="en",this.value={}}static get styles(){return[u.unsafeCSS(d)]}get _localizedValue(){const i={...this.value};return i[this.language]??i[this.defaultLanguage]??Object.values(i)[0]??""}get _localizedPlaceholder(){const i={...this.i18nPlaceholder};return i[this.language]??i[this.defaultLanguage]??Object.values(i)[0]??""}handleChange(i){i.stopPropagation(),i.preventDefault();const r=i.target;this.value[this.language]!==r.value&&(this.value={...this.value,[this.language]:r.value},this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:this.value}})))}render(){return u.html`
|
|
19
|
+
<luzmo-text-field
|
|
20
|
+
.value=${this._localizedValue}
|
|
21
|
+
.size=${this.size}
|
|
22
|
+
.placeholder=${this._localizedPlaceholder}
|
|
23
|
+
.name=${this.name}
|
|
24
|
+
.allowedKeys=${this.allowedKeys}
|
|
25
|
+
.type=${this.type}
|
|
26
|
+
.pattern=${this.pattern}
|
|
27
|
+
.maxlength=${this.maxlength}
|
|
28
|
+
.minlength=${this.minlength}
|
|
29
|
+
?multiline=${this.multiline}
|
|
30
|
+
?grows=${this.grows}
|
|
31
|
+
.rows=${this.rows}
|
|
32
|
+
?quiet=${this.quiet}
|
|
33
|
+
?disabled=${this.disabled}
|
|
34
|
+
?readonly=${this.readonly}
|
|
35
|
+
?required=${this.required}
|
|
36
|
+
@input=${this.handleChange}
|
|
37
|
+
@change=${this.handleChange}
|
|
38
|
+
></luzmo-text-field>
|
|
39
|
+
`}}l([t.n({attribute:"allowed-keys"})],e.prototype,"allowedKeys");l([t.n({type:String,reflect:!0})],e.prototype,"name");l([t.n({type:Object,attribute:"i18n-placeholder"})],e.prototype,"i18nPlaceholder");l([t.n({attribute:"type",reflect:!0})],e.prototype,"type");l([t.n()],e.prototype,"pattern");l([t.n({type:Boolean,reflect:!0})],e.prototype,"grows");l([t.n({type:Number})],e.prototype,"maxlength");l([t.n({type:Number})],e.prototype,"minlength");l([t.n({type:Boolean,reflect:!0})],e.prototype,"multiline");l([t.n({type:Number})],e.prototype,"rows");l([t.n({type:Boolean,reflect:!0})],e.prototype,"quiet");l([t.n({type:Boolean,reflect:!0})],e.prototype,"disabled");l([t.n({type:Boolean,reflect:!0})],e.prototype,"required");l([t.n({type:Boolean,reflect:!0})],e.prototype,"readonly");l([t.n({type:String,reflect:!0})],e.prototype,"autocomplete");l([t.n({type:String,reflect:!0})],e.prototype,"language");l([t.n({type:String,reflect:!0})],e.prototype,"defaultLanguage");l([t.n({type:Object,reflect:!0})],e.prototype,"value");customElements.get("luzmo-multi-language-field")||customElements.define("luzmo-multi-language-field",e);exports.LuzmoMultiLangField=e;
|
|
@@ -0,0 +1,149 @@
|
|
|
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 m, html as c } from "lit";
|
|
19
|
+
import { L as d, n as e } from "../base-nYalvNMy.js";
|
|
20
|
+
import { S as p } from "../sized-mixin-Dl0KoEcV.js";
|
|
21
|
+
import "../text-field/index.js";
|
|
22
|
+
import { M as z } from "../manage-help-text-2mSEy-AD.js";
|
|
23
|
+
const s = () => {
|
|
24
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
25
|
+
const r = document.createElement("style");
|
|
26
|
+
r.setAttribute("data-luzmo-vars", ""), r.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(r);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
s();
|
|
30
|
+
const g = ":host{display:inline-block}:host luzmo-text-field{width:100%}";
|
|
31
|
+
var h = Object.defineProperty, l = (r, t, i, f) => {
|
|
32
|
+
for (var u = void 0, a = r.length - 1, n; a >= 0; a--)
|
|
33
|
+
(n = r[a]) && (u = n(t, i, u) || u);
|
|
34
|
+
return u && h(t, i, u), u;
|
|
35
|
+
};
|
|
36
|
+
class o extends z(
|
|
37
|
+
p(d, {
|
|
38
|
+
noDefaultSize: !0
|
|
39
|
+
})
|
|
40
|
+
) {
|
|
41
|
+
constructor() {
|
|
42
|
+
super(...arguments), this.allowedKeys = "", this.i18nPlaceholder = {}, this.type = "text", this.grows = !1, this.maxlength = -1, this.minlength = -1, this.multiline = !1, this.rows = -1, this.quiet = !1, this.disabled = !1, this.required = !1, this.readonly = !1, this.language = "en", this.defaultLanguage = "en", this.value = {};
|
|
43
|
+
}
|
|
44
|
+
static get styles() {
|
|
45
|
+
return [m(g)];
|
|
46
|
+
}
|
|
47
|
+
get _localizedValue() {
|
|
48
|
+
const t = { ...this.value };
|
|
49
|
+
return t[this.language] ?? t[this.defaultLanguage] ?? Object.values(t)[0] ?? "";
|
|
50
|
+
}
|
|
51
|
+
get _localizedPlaceholder() {
|
|
52
|
+
const t = { ...this.i18nPlaceholder };
|
|
53
|
+
return t[this.language] ?? t[this.defaultLanguage] ?? Object.values(t)[0] ?? "";
|
|
54
|
+
}
|
|
55
|
+
handleChange(t) {
|
|
56
|
+
t.stopPropagation(), t.preventDefault();
|
|
57
|
+
const i = t.target;
|
|
58
|
+
this.value[this.language] !== i.value && (this.value = { ...this.value, [this.language]: i.value }, this.dispatchEvent(
|
|
59
|
+
new CustomEvent("change", {
|
|
60
|
+
bubbles: !0,
|
|
61
|
+
composed: !0,
|
|
62
|
+
cancelable: !0,
|
|
63
|
+
detail: { value: this.value }
|
|
64
|
+
})
|
|
65
|
+
));
|
|
66
|
+
}
|
|
67
|
+
render() {
|
|
68
|
+
return c`
|
|
69
|
+
<luzmo-text-field
|
|
70
|
+
.value=${this._localizedValue}
|
|
71
|
+
.size=${this.size}
|
|
72
|
+
.placeholder=${this._localizedPlaceholder}
|
|
73
|
+
.name=${this.name}
|
|
74
|
+
.allowedKeys=${this.allowedKeys}
|
|
75
|
+
.type=${this.type}
|
|
76
|
+
.pattern=${this.pattern}
|
|
77
|
+
.maxlength=${this.maxlength}
|
|
78
|
+
.minlength=${this.minlength}
|
|
79
|
+
?multiline=${this.multiline}
|
|
80
|
+
?grows=${this.grows}
|
|
81
|
+
.rows=${this.rows}
|
|
82
|
+
?quiet=${this.quiet}
|
|
83
|
+
?disabled=${this.disabled}
|
|
84
|
+
?readonly=${this.readonly}
|
|
85
|
+
?required=${this.required}
|
|
86
|
+
@input=${this.handleChange}
|
|
87
|
+
@change=${this.handleChange}
|
|
88
|
+
></luzmo-text-field>
|
|
89
|
+
`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
l([
|
|
93
|
+
e({ attribute: "allowed-keys" })
|
|
94
|
+
], o.prototype, "allowedKeys");
|
|
95
|
+
l([
|
|
96
|
+
e({ type: String, reflect: !0 })
|
|
97
|
+
], o.prototype, "name");
|
|
98
|
+
l([
|
|
99
|
+
e({ type: Object, attribute: "i18n-placeholder" })
|
|
100
|
+
], o.prototype, "i18nPlaceholder");
|
|
101
|
+
l([
|
|
102
|
+
e({ attribute: "type", reflect: !0 })
|
|
103
|
+
], o.prototype, "type");
|
|
104
|
+
l([
|
|
105
|
+
e()
|
|
106
|
+
], o.prototype, "pattern");
|
|
107
|
+
l([
|
|
108
|
+
e({ type: Boolean, reflect: !0 })
|
|
109
|
+
], o.prototype, "grows");
|
|
110
|
+
l([
|
|
111
|
+
e({ type: Number })
|
|
112
|
+
], o.prototype, "maxlength");
|
|
113
|
+
l([
|
|
114
|
+
e({ type: Number })
|
|
115
|
+
], o.prototype, "minlength");
|
|
116
|
+
l([
|
|
117
|
+
e({ type: Boolean, reflect: !0 })
|
|
118
|
+
], o.prototype, "multiline");
|
|
119
|
+
l([
|
|
120
|
+
e({ type: Number })
|
|
121
|
+
], o.prototype, "rows");
|
|
122
|
+
l([
|
|
123
|
+
e({ type: Boolean, reflect: !0 })
|
|
124
|
+
], o.prototype, "quiet");
|
|
125
|
+
l([
|
|
126
|
+
e({ type: Boolean, reflect: !0 })
|
|
127
|
+
], o.prototype, "disabled");
|
|
128
|
+
l([
|
|
129
|
+
e({ type: Boolean, reflect: !0 })
|
|
130
|
+
], o.prototype, "required");
|
|
131
|
+
l([
|
|
132
|
+
e({ type: Boolean, reflect: !0 })
|
|
133
|
+
], o.prototype, "readonly");
|
|
134
|
+
l([
|
|
135
|
+
e({ type: String, reflect: !0 })
|
|
136
|
+
], o.prototype, "autocomplete");
|
|
137
|
+
l([
|
|
138
|
+
e({ type: String, reflect: !0 })
|
|
139
|
+
], o.prototype, "language");
|
|
140
|
+
l([
|
|
141
|
+
e({ type: String, reflect: !0 })
|
|
142
|
+
], o.prototype, "defaultLanguage");
|
|
143
|
+
l([
|
|
144
|
+
e({ type: Object, reflect: !0 })
|
|
145
|
+
], o.prototype, "value");
|
|
146
|
+
customElements.get("luzmo-multi-language-field") || customElements.define("luzmo-multi-language-field", o);
|
|
147
|
+
export {
|
|
148
|
+
o as LuzmoMultiLangField
|
|
149
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2021 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/
|
|
23
|
+
class a {
|
|
24
|
+
constructor(t, { target: s, config: e, callback: i, skipInitial: h }) {
|
|
25
|
+
this.t = /* @__PURE__ */ new Set(), this.o = !1, this.i = !1, this.h = t, s !== null && this.t.add(s ?? t), this.l = e, this.o = h ?? this.o, this.callback = i, window.MutationObserver ? (this.u = new MutationObserver((o) => {
|
|
26
|
+
this.handleChanges(o), this.h.requestUpdate();
|
|
27
|
+
}), t.addController(this)) : console.warn("MutationController error: browser does not support MutationObserver.");
|
|
28
|
+
}
|
|
29
|
+
handleChanges(t) {
|
|
30
|
+
var s;
|
|
31
|
+
this.value = (s = this.callback) == null ? void 0 : s.call(this, t, this.u);
|
|
32
|
+
}
|
|
33
|
+
hostConnected() {
|
|
34
|
+
for (const t of this.t) this.observe(t);
|
|
35
|
+
}
|
|
36
|
+
hostDisconnected() {
|
|
37
|
+
this.disconnect();
|
|
38
|
+
}
|
|
39
|
+
async hostUpdated() {
|
|
40
|
+
const t = this.u.takeRecords();
|
|
41
|
+
(t.length || !this.o && this.i) && this.handleChanges(t), this.i = !1;
|
|
42
|
+
}
|
|
43
|
+
observe(t) {
|
|
44
|
+
this.t.add(t), this.u.observe(t, this.l), this.i = !0, this.h.requestUpdate();
|
|
45
|
+
}
|
|
46
|
+
disconnect() {
|
|
47
|
+
this.u.disconnect();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
a as s
|
|
52
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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";/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2021 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/class n{constructor(t,{target:s,config:e,callback:i,skipInitial:h}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,s!==null&&this.t.add(s??t),this.l=e,this.o=h??this.o,this.callback=i,window.MutationObserver?(this.u=new MutationObserver(o=>{this.handleChanges(o),this.h.requestUpdate()}),t.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(t){var s;this.value=(s=this.callback)==null?void 0:s.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){const t=this.u.takeRecords();(t.length||!this.o&&this.i)&&this.handleChanges(t),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}}exports.s=n;
|
|
@@ -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 f=require("@luzmo/icons"),v=require("../platform-CQzYNWKq.cjs"),k=require("../streaming-listener-Bw4jE33f.cjs"),g=require("lit"),c=require("../base-BCmA9Wxv.cjs"),G=require("../query-BL-TJj7K.cjs");require("../infield-button/index.cjs");const W=require("../text-field-C6Aa7XOb.cjs");let P=new Map,C=!1;try{C=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let x=!1;try{x=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const M={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class w{format(e){let t="";if(!C&&this.options.signDisplay!=null?t=X(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!x){var r;let{unit:o,unitDisplay:i="short",locale:a}=this.resolvedOptions();if(!o)return t;let n=(r=M[o])===null||r===void 0?void 0:r[i];t+=n[a]||n.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),o=this.numberFormatter.formatToParts(t);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!C&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!x&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Y(e,t),this.options=t}}function Y(s,e={}){let{numberingSystem:t}=e;if(t&&s.includes("-nu-")&&(s.includes("-u-")||(s+="-u-"),s+=`-nu-${t}`),e.style==="unit"&&!x){var r;let{unit:a,unitDisplay:n="short"}=e;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=M[a])===null||r===void 0)&&r[n]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${n}`);e={...e,style:"decimal"}}let o=s+(e?Object.entries(e).sort((a,n)=>a[0]<n[0]?-1:1).join():"");if(P.has(o))return P.get(o);let i=new Intl.NumberFormat(s,e);return P.set(o,i),i}function X(s,e,t){if(e==="auto")return s.format(t);if(e==="never")return s.format(Math.abs(t));{let r=!1;if(e==="always"?r=t>0||Object.is(t,0):e==="exceptZero"&&(Object.is(t,-0)||Object.is(t,0)?t=Math.abs(t):r=t>0),r){let o=s.format(-t),i=s.format(t),a=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(a,"+").replace("!!!",i)}else return s.format(t)}}const Z=new RegExp("^.*\\(.*\\).*$"),J=["latn","arab","hanidec","deva","beng"];class N{parse(e){return S(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,r){return S(this.locale,this.options,e).isValidPartialNumber(e,t,r)}getNumberingSystem(e){return S(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}const D=new Map;function S(s,e,t){let r=V(s,e);if(!s.includes("-nu-")&&!r.isValidPartialNumber(t)){for(let o of J)if(o!==r.options.numberingSystem){let i=V(s+(s.includes("-u-")?"-nu-":"-u-nu-")+o,e);if(i.isValidPartialNumber(t))return i}}return r}function V(s,e){let t=s+(e?Object.entries(e).sort((o,i)=>o[0]<i[0]?-1:1).join():""),r=D.get(t);return r||(r=new Q(s,e),D.set(t,r)),r}class Q{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=y(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let a=t.indexOf("-");t=t.replace("-","");let n=t.indexOf(".");n===-1&&(n=t.length),t=t.replace(".",""),n-2===0?t=`0.${t}`:n-2===-1?t=`0.0${t}`:n-2===-2?t="0.00":t=`${t.slice(0,n-2)}.${t.slice(n-2)}`,a>-1&&(t=`-${t}`)}let r=t?+t:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){var o,i;let a={...this.options,style:"decimal",minimumFractionDigits:Math.min(((o=this.options.minimumFractionDigits)!==null&&o!==void 0?o:0)+2,20),maximumFractionDigits:Math.min(((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)+2,20)};return new N(this.locale,a).parse(new w(this.locale,a).format(r))}return this.options.currencySign==="accounting"&&Z.test(e)&&(r=-1*r),r}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("،",this.symbols.decimal)),this.symbols.group&&(e=y(e,".",this.symbols.group))),this.options.locale==="fr-FR"&&(e=y(e,"."," ")),e}isValidPartialNumber(e,t=-1/0,r=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&r>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=y(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,t={}){this.locale=e,this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=te(e,this.formatter,this.options,t);var r,o;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((o=this.options.maximumFractionDigits)!==null&&o!==void 0?o:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const R=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),ee=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function te(s,e,t,r){var o,i,a,n;let d=new Intl.NumberFormat(s,{...t,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),u=d.formatToParts(-10000.111),m=d.formatToParts(10000.111),O=ee.map(l=>d.formatToParts(l));var F;let L=(F=(o=u.find(l=>l.type==="minusSign"))===null||o===void 0?void 0:o.value)!==null&&F!==void 0?F:"-",$=(i=m.find(l=>l.type==="plusSign"))===null||i===void 0?void 0:i.value;!$&&((r==null?void 0:r.signDisplay)==="exceptZero"||(r==null?void 0:r.signDisplay)==="always")&&($="+");let T=(a=new Intl.NumberFormat(s,{...t,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(l=>l.type==="decimal"))===null||a===void 0?void 0:a.value,A=(n=u.find(l=>l.type==="group"))===null||n===void 0?void 0:n.value,U=u.filter(l=>!R.has(l.type)).map(l=>q(l.value)),j=O.flatMap(l=>l.filter(b=>!R.has(b.type)).map(b=>q(b.value))),_=[...new Set([...U,...j])].sort((l,b)=>b.length-l.length),B=_.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${_.join("|")}|[\\p{White_Space}]`,"gu"),E=[...new Intl.NumberFormat(t.locale,{useGrouping:!1}).format(9876543210)].reverse(),H=new Map(E.map((l,b)=>[l,b])),K=new RegExp(`[${E.join("")}]`,"g");return{minusSign:L,plusSign:$,decimal:T,group:A,literals:B,numeral:K,index:l=>String(H.get(l))}}function y(s,e,t){return s.replaceAll?s.replaceAll(e,t):s.split(e).join(t)}function q(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const re='#text-field{--stepper-width: calc( var(--luzmo-stepper-height, var(--stepper-height)) * var( --luzmo-stepper-min-width-multiplier, var(--stepper-min-width-multiplier) ) + var(--luzmo-stepper-button-width, var(--stepper-button-width)) + var(--luzmo-stepper-border-width, var(--stepper-border-width)) * 2 );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color, var( --luzmo-stepper-buttons-border-color, var(--stepper-buttons-border-color) ) );--luzmo-infield-button-border-width: var( --luzmo-stepper-button-border-width, var(--stepper-button-border-width) );--luzmo-infield-button-border-radius-reset: var( --stepper-button-border-radius-reset );--luzmo-text-field-border-width: var( --luzmo-stepper-border-width, var(--stepper-border-width) );inline-size:var(--luzmo-stepper-width, var(--stepper-width));block-size:var(--luzmo-stepper-height, var(--stepper-height));border-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));border-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));flex-flow:row;display:inline-flex;position:relative}#text-field:after{content:"";inline-size:100%;block-size:var(--luzmo-stepper-focus-indicator-width, var(--stepper-focus-indicator-width));position:absolute;inset-block-end:calc((var(--luzmo-stepper-focus-indicator-gap, var(--stepper-focus-indicator-gap)) + var(--luzmo-stepper-focus-indicator-width, var(--stepper-focus-indicator-width))) * -1);inset-inline-start:0}:host([focused]) #text-field,#text-field:focus{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-focus, var(--luzmo-stepper-border-color-focus, var(--stepper-border-color-focus)) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus, var( --luzmo-stepper-buttons-border-color-focus, var(--stepper-buttons-border-color-focus) ) )}:host([focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus .input{outline:none}:host([focused]:not([disabled])) #text-field .buttons,:host([focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus .buttons,:host(:not([disabled])) #text-field:focus .input{border-color:var(--highcontrast-stepper-border-color-focus, var(--luzmo-stepper-border-color-focus, var(--stepper-border-color-focus)))}:host([keyboard-focused]) #text-field,#text-field:focus-visible{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-keyboard-focus, var( --luzmo-stepper-buttons-border-color-keyboard-focus, var(--stepper-buttons-border-color-keyboard-focus) ) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-keyboard-focus, var( --luzmo-stepper-buttons-border-color-keyboard-focus, var(--stepper-buttons-border-color-keyboard-focus) ) )}:host([keyboard-focused]:not([disabled])) #text-field,:host(:not([disabled])) #text-field:focus-visible{outline:var(--luzmo-stepper-focus-indicator-width, var(--stepper-focus-indicator-width)) solid;outline-color:var(--highcontrast-stepper-focus-indicator-color, var(--luzmo-stepper-focus-indicator-color, var(--stepper-focus-indicator-color)));outline-offset:var(--luzmo-stepper-focus-indicator-gap, var(--stepper-focus-indicator-gap))}:host([keyboard-focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus-visible .input{outline:none}:host([keyboard-focused]:not([disabled])) #text-field .buttons,:host([keyboard-focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus-visible .buttons,:host(:not([disabled])) #text-field:focus-visible .input{border-color:var(--highcontrast-stepper-border-color-keyboard-focus, var(--luzmo-stepper-border-color-keyboard-focus, var(--stepper-border-color-keyboard-focus)))}:host([invalid]:not([disabled])) #text-field{--luzmo-stepper-border-color: var( --luzmo-stepper-border-color-invalid, var(--stepper-border-color-invalid) );--luzmo-stepper-border-color-hover: var( --luzmo-stepper-border-color-hover-invalid, var(--stepper-border-color-hover-invalid) );--luzmo-stepper-border-color-focus: var( --luzmo-stepper-border-color-focus-invalid, var(--stepper-border-color-focus-invalid) );--luzmo-stepper-border-color-focus-hover: var( --luzmo-stepper-border-color-focus-hover-invalid, var(--stepper-border-color-focus-hover-invalid) );--luzmo-stepper-border-color-keyboard-focus: var( --luzmo-stepper-border-color-keyboard-focus-invalid, var(--stepper-border-color-keyboard-focus-invalid) );--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-invalid, var(--stepper-border-color-invalid) );--luzmo-text-field-icon-spacing-inline-start-invalid: 0}:host([invalid][focused]:not([disabled])) #text-field,:host([invalid]:not([disabled])) #text-field:focus{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-focus-invalid, var(--stepper-border-color-focus-invalid) )}:host([invalid][keyboard-focused]:not([disabled])) #text-field,:host([invalid]:not([disabled])) #text-field:focus-visible{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-keyboard-focus-invalid, var(--stepper-border-color-keyboard-focus-invalid) )}:host([disabled]) #text-field{--luzmo-stepper-border-color: var(--stepper-button-border-color-disabled);--luzmo-stepper-border-color-hover: var( --stepper-button-border-color-disabled );--luzmo-stepper-border-color-focus: var( --stepper-button-border-color-disabled );--luzmo-stepper-border-color-focus-hover: var( --stepper-button-border-color-disabled );--luzmo-stepper-border-color-keyboard-focus: var( --stepper-button-border-color-disabled );--luzmo-stepper-buttons-background-color: var( --stepper-buttons-background-color-disabled );--luzmo-infield-button-border-width: var( --stepper-button-border-width-disabled );--luzmo-infield-button-border-color: var( --stepper-button-border-color-disabled );--luzmo-text-field-border-color-disabled: var( --stepper-button-border-color-disabled )}#text-field .input{border-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));border-inline-end-width:0;border-start-end-radius:0;border-end-end-radius:0}#text-field.hide-stepper .input{border-inline-end-width:var(--luzmo-stepper-border-width, var(--stepper-border-width));border-start-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));border-end-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius))}#text-field .buttons{box-sizing:border-box;block-size:var(--luzmo-stepper-height, var(--stepper-height));inline-size:var(--luzmo-stepper-button-width, var(--stepper-button-width));border-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));border-style:var(--luzmo-stepper-buttons-border-style, var(--stepper-buttons-border-style));border-width:var(--highcontrast-stepper-buttons-border-width, var(--luzmo-stepper-buttons-border-width, var(--stepper-buttons-border-width)));background-color:var(--highcontrast-stepper-buttons-background-color, var(--luzmo-stepper-buttons-background-color, var(--stepper-buttons-background-color)));transition:border-color var(--luzmo-stepper-animation-duration, var(--stepper-animation-duration)) ease-in-out;border-inline-start-width:0;border-start-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));border-end-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));flex-direction:column;justify-content:center;display:flex}:host([quiet]) #text-field{border-start-start-radius:0;border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0}:host([quiet]) #text-field .input{--luzmo-text-field-focus-indicator-color: transparent}:host([quiet]) #text-field.hide-stepper .input{border-inline-end-width:0;border-end-end-radius:0}:host([quiet]) #text-field .buttons{--luzmo-infield-button-border-color: transparent;border-width:0;border-block-end-width:var(--luzmo-stepper-border-width, var(--stepper-border-width));border-block-end-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));border-block-end-style:solid;border-end-end-radius:0}:host([quiet]) #text-field .button{--luzmo-infield-button-width-stacked: var( --luzmo-stepper-button-width-quiet, var(--stepper-button-width) );--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-quiet, var(--stepper-button-border-color-quiet) );--luzmo-infield-button-stacked-bottom-border-block-end-width: var( --luzmo-stepper-border-width, var(--stepper-border-width) );--luzmo-infield-button-stacked-bottom-border-radius-end-end: 0;--luzmo-infield-button-stacked-bottom-border-radius-end-start: 0;--luzmo-infield-button-fill-justify-content: flex-end;padding:0}:host([quiet]) #text-field .buttons,:host([quiet]) #text-field .input{background-color:initial}:host([quiet][focused]) #text-field,:host([quiet]) #text-field:focus{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus, var(--luzmo-stepper-border-color-focus, var(--stepper-border-color-focus)) )}:host([quiet][keyboard-focused]:not([disabled])) #text-field{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-keyboard-focus, var( --luzmo-stepper-border-color-keyboard-focus, var(--stepper-border-color-keyboard-focus) ) );outline:none}:host([quiet][keyboard-focused]:not([disabled])) #text-field:after{background-color:var(--highcontrast-stepper-focus-indicator-color, var(--luzmo-stepper-focus-indicator-color, var(--stepper-focus-indicator-color)))}@media (hover: hover){:host(:hover:not([disabled])) #text-field{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-hover, var(--luzmo-stepper-border-color-hover, var(--stepper-border-color-hover)) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-hover, var( --luzmo-stepper-buttons-border-color-hover, var(--stepper-buttons-border-color-hover) ) )}:host([focused]:hover) #text-field,:host(:hover) #text-field:focus{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-focus-hover, var( --luzmo-stepper-buttons-border-color-focus-hover, var(--stepper-buttons-border-color-focus-hover) ) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus-hover, var( --luzmo-stepper-buttons-border-color-focus-hover, var(--stepper-buttons-border-color-focus-hover) ) )}:host([focused]:hover) #text-field .buttons,:host([focused]:hover) #text-field .input,:host(:hover) #text-field:focus .buttons,:host(:hover) #text-field:focus .input{border-color:var(--highcontrast-stepper-border-color-focus-hover, var(--luzmo-stepper-border-color-focus-hover, var(--stepper-border-color-focus-hover)))}:host([invalid]:not([disabled]):hover) #text-field{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-hover-invalid, var(--stepper-border-color-hover-invalid) )}:host([invalid][focused]:not([disabled]):hover) #text-field,:host([invalid]:not([disabled]):hover) #text-field:focus{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-focus-hover-invalid, var(--stepper-border-color-focus-hover-invalid) )}:host([quiet]:not([disabled]):hover) #text-field{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-hover, var(--luzmo-stepper-border-color-hover, var(--stepper-border-color-hover)) )}:host([quiet]:not([disabled]):hover) #text-field .buttons{background-color:initial}:host([quiet][focused]:hover) #text-field,:host([quiet]:hover) #text-field:focus{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus-hover, var( --luzmo-stepper-border-color-focus-hover, var(--stepper-border-color-focus-hover) ) )}:host([quiet][keyboard-focused]:not([disabled]):hover) #text-field{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-hover, var(--luzmo-stepper-border-color-hover, var(--stepper-border-color-hover)) )}}@media (forced-colors: active){:host{--highcontrast-stepper-border-color: CanvasText;--highcontrast-stepper-border-color-hover: Highlight;--highcontrast-stepper-border-color-focus: Highlight;--highcontrast-stepper-border-color-focus-hover: Highlight;--highcontrast-stepper-border-color-keyboard-focus: CanvasText;--highcontrast-stepper-button-background-color-default: Canvas;--highcontrast-stepper-button-background-color-hover: Canvas;--highcontrast-stepper-button-background-color-focus: Canvas;--highcontrast-stepper-button-background-color-keyboard-focus: Canvas;--highcontrast-stepper-focus-indicator-color: Highlight}:host([invalid]) #text-field{--highcontrast-stepper-border-color: Highlight;--highcontrast-stepper-border-color-hover: Highlight;--highcontrast-stepper-border-color-focus: Highlight;--highcontrast-stepper-border-color-focus-hover: Highlight;--highcontrast-stepper-border-color-keyboard-focus: Highlight;--highcontrast-infield-button-border-color: Highlight}:host([disabled]) #text-field{--highcontrast-stepper-border-color: GrayText;--highcontrast-infield-button-border-color: GrayText;--highcontrast-stepper-buttons-border-width: var( --luzmo-stepper-border-width, var(--stepper-border-width) )}}:host{--text-field-minimum-width-multiplier: 1.75;--stepper-border-width: var(--luzmo-border-width);--stepper-border-color: var(--luzmo-border-color);--stepper-border-color-hover: var(--luzmo-border-color-full-hover);--stepper-border-color-focus: var(--luzmo-border-color-full-focus);--stepper-border-color-focus-hover: var(--luzmo-border-color-full-focus);--stepper-border-color-keyboard-focus: var(--luzmo-border-color-full-focus);--stepper-border-radius: var(--luzmo-border-radius-s);--stepper-min-width-multiplier: 1.5;--stepper-animation-duration: var(--luzmo-animation-duration);--stepper-buttons-background-color: var(--luzmo-background-color);--stepper-buttons-border-style: none;--stepper-buttons-border-width: 0;--stepper-buttons-border-color: var(--luzmo-border-color);--stepper-buttons-border-color-hover: var(--luzmo-border-color-full-hover);--stepper-buttons-border-color-focus: var(--luzmo-border-color-full-focus);--stepper-buttons-border-color-keyboard-focus: var( --luzmo-border-color-focus );--stepper-button-padding: 0px;--stepper-button-border-radius-reset: 0;--stepper-button-border-width: var(--luzmo-border-width);--stepper-button-background-color-focus: var(--luzmo-background-color-focus);--stepper-button-background-color-keyboard-focus: var( --luzmo-background-color-focus );--stepper-border-color-invalid: var(--luzmo-color-negative);--stepper-border-color-hover-invalid: var(--luzmo-color-negative-hover);--stepper-border-color-focus-invalid: var(--luzmo-color-negative-focus);--stepper-border-color-focus-hover-invalid: var(--luzmo-color-negative-focus);--stepper-border-color-keyboard-focus-invalid: var( --luzmo-color-negative-focus );--stepper-focus-indicator-width: var(--luzmo-indicator-width);--stepper-focus-indicator-gap: calc(-1 * var(--luzmo-border-width));--stepper-focus-indicator-color: var(--luzmo-indicator-color);--stepper-button-border-color-quiet: transparent;--stepper-button-border-color-disabled: var(--luzmo-border-color-disabled);--stepper-button-border-width-disabled: var(--luzmo-border-width);--stepper-buttons-background-color-disabled: var( --luzmo-background-color-disabled );--stepper-button-width: 28px;--stepper-height: var(--luzmo-component-height)}:host([size=s]) #text-field{--stepper-button-width: 16px;--stepper-height: var(--luzmo-component-height-s)}:host([size=m]) #text-field{--stepper-button-width: 20px;--stepper-height: var(--luzmo-component-height)}:host([size=l]) #text-field{--stepper-button-width: 28px;--stepper-height: var(--luzmo-component-height-l)}:host([size=xl]) #text-field{--stepper-button-width: 36px;--stepper-height: var(--luzmo-component-height-xl)}:host{inline-size:var(--luzmo-stepper-width, var(--stepper-width));--swc-number-field-width: calc( var(--luzmo-stepper-height, var(--stepper-height)) * var( --luzmo-stepper-min-width-multiplier, var(--text-field-minimum-width-multiplier) ) + var(--luzmo-stepper-button-width, var(--stepper-button-width)) + var(--luzmo-stepper-border-width, var(--stepper-border-width)) * 2 );--luzmo-infield-button-border-width: var(--unset-value-resets-inheritance);--stepper-width: var(--swc-number-field-width)}:host([size=s]){--stepper-width: calc(var(--swc-number-field-width) / 5 * 4)}:host([size=l]){--stepper-width: calc(var(--swc-number-field-width) * 1.25)}:host([size=xl]){--stepper-width: calc(var(--swc-number-field-width) * 1.25 * 1.25)}#text-field{inline-size:100%}.input{font-variant-numeric:tabular-nums}:host([readonly]) .buttons{pointer-events:none;visibility:hidden}:host([readonly]:not([disabled],[invalid],[focused],[keyboard-focused])) #text-field:hover .input{border-color:transparent}:host([hide-stepper]:not([quiet])) #text-field input{border:var(--luzmo-text-field-border-width, var(--text-field-border-width)) solid var(--luzmo-text-field-border-color, var(--text-field-border-color));border-radius:var(--text-field-corner-radius)}:host([quiet]) #text-field .button{--luzmo-infield-button-border-color: var( --luzmo-infield-border-color-quiet, transparent );--luzmo-infield-button-edge-to-fill: 0;--luzmo-infield-button-border-width: var( --luzmo-infield-button-border-width-quiet, 0 )}';var oe=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,h=(s,e,t,r)=>{for(var o=r>1?void 0:r?ie(e,t):e,i=s.length-1,a;i>=0;i--)(a=s[i])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&oe(e,t,o),o};const se=5,ae=100,z="-",I={"1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","0":"0","、":",",",":",","。":".",".":".","%":"%","+":"+",ー:"-",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9",零:"0"};class p extends W.LuzmoTextFieldBase{constructor(){super(...arguments),this.focused=!1,this._forcedUnit="",this.formatOptions={},this.hideStepper=!1,this.indeterminate=!1,this.keyboardFocused=!1,this.managedInput=!1,this.stepModifier=10,this._value=Number.NaN,this._trackingValue="",this.decimalsChars=new Set([".",","]),this.valueBeforeFocus="",this.isIntentDecimal=!1,this.changeCount=0,this.languageResolver=new k.LanguageResolutionController(this),this.wasIndeterminate=!1,this.hasRecentlyReceivedPointerDown=!1,this.applyFocusElementLabel=e=>{this.appliedLabel=e},this.isComposing=!1}static get styles(){return[...super.styles,g.unsafeCSS(re)]}set value(e){const t=this.validateInput(e);if(t===this.value)return;this.lastCommitedValue=t;const r=this._value;this._value=t,this.requestUpdate("value",r)}get value(){return this._value}get inputValue(){return this.indeterminate?this.formattedValue:this.inputElement.value}setValue(e=this.value){const t=this.lastCommitedValue;this.value=e,!(t===void 0||t===this.value)&&(this.lastCommitedValue=this.value,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}get valueAsString(){return this._value.toString()}set valueAsString(e){this.value=this.numberParser.parse(e)}get formattedValue(){return Number.isNaN(this.value)?"":this.numberFormatter.format(this.value)+(this.focused?"":this._forcedUnit)}convertValueToNumber(e){let t=[...e].map(i=>I[i]||i).join("");const r=[...this.valueBeforeFocus].filter(i=>this.decimalsChars.has(i)),o=new Set(r);if(v.isIOS()&&this.inputElement.inputMode==="decimal"&&t!==this.valueBeforeFocus){const a=this.numberFormatter.formatToParts(1000.1).find(u=>u.type==="decimal").value;for(const u of o)!(u===a)&&!this.isIntentDecimal&&(t=t.replaceAll(new RegExp(u,"g"),""));let n=!1;const d=[...t];for(let u=d.length-1;u>=0;u--){const m=d[u];this.decimalsChars.has(m)&&(n?d[u]="":(d[u]=a,n=!0))}t=d.join("")}return this.numberParser.parse(t)}get _step(){var e;return this.step!==void 0?this.step:((e=this.formatOptions)==null?void 0:e.style)==="percent"?.01:1}handlePointerdown(e){if(e.button!==0){e.preventDefault();return}this.managedInput=!0,this.buttons.setPointerCapture(e.pointerId);const t=this.buttons.children[0].getBoundingClientRect(),r=this.buttons.children[1].getBoundingClientRect();this.findChange=o=>{o.clientX>=t.x&&o.clientY>=t.y&&o.clientX<=t.x+t.width&&o.clientY<=t.y+t.height?this.change=i=>this.increment(i.shiftKey?this.stepModifier:1):o.clientX>=r.x&&o.clientY>=r.y&&o.clientX<=r.x+r.width&&o.clientY<=r.y+r.height&&(this.change=i=>this.decrement(i.shiftKey?this.stepModifier:1))},this.findChange(e),this.startChange(e)}startChange(e){this.changeCount=0,this.doChange(e),this.safty=setTimeout(()=>{this.doNextChange(e)},400)}doChange(e){this.change(e)}handlePointermove(e){this.findChange(e)}handlePointerup(e){this.buttons.releasePointerCapture(e.pointerId),cancelAnimationFrame(this.nextChange),clearTimeout(this.safty),this.managedInput=!1,this.setValue()}doNextChange(e){return this.changeCount+=1,this.changeCount%se===0&&this.doChange(e),requestAnimationFrame(()=>{this.nextChange=this.doNextChange(e)})}stepBy(e){if(this.disabled||this.readonly)return;const t=this.min===void 0?0:this.min;let r=this.value;r+=e*this._step,Number.isNaN(this.value)&&(r=t),r=this.valueWithLimits(r),this.requestUpdate(),this._value=this.validateInput(r),this.inputElement.value=this.numberFormatter.format(r),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.indeterminate=!1,this.focus()}increment(e=1){this.stepBy(1*e)}decrement(e=1){this.stepBy(-1*e)}handleKeydown(e){if(!this.isComposing)switch(e.code){case"ArrowUp":{e.preventDefault(),this.increment(e.shiftKey?this.stepModifier:1),this.setValue();break}case"ArrowDown":{e.preventDefault(),this.decrement(e.shiftKey?this.stepModifier:1),this.setValue();break}}}onScroll(e){e.preventDefault(),this.managedInput=!0;const t=e.shiftKey?e.deltaX/Math.abs(e.deltaX):e.deltaY/Math.abs(e.deltaY);t!==0&&!Number.isNaN(t)&&(this.stepBy(t*(e.shiftKey?this.stepModifier:1)),clearTimeout(this.queuedChangeEvent),this.queuedChangeEvent=setTimeout(()=>{this.setValue()},ae)),this.managedInput=!1}onFocus(){super.onFocus(),this._trackingValue=this.inputValue,this.keyboardFocused=!this.readonly&&!0,this.addEventListener("wheel",this.onScroll,{passive:!1}),this.valueBeforeFocus=this.inputElement.value}onBlur(e){super.onBlur(e),this.keyboardFocused=!this.readonly&&!1,this.removeEventListener("wheel",this.onScroll),this.isIntentDecimal=!1}handleFocusin(){this.focused=!this.readonly&&!0,this.keyboardFocused=!this.readonly&&!0}handleFocusout(){this.focused=!this.readonly&&!1,this.keyboardFocused=!this.readonly&&!1}handleChange(){const e=this.convertValueToNumber(this.inputValue);if(this.wasIndeterminate&&(this.wasIndeterminate=!1,this.indeterminateValue=void 0,Number.isNaN(e))){this.indeterminate=!0;return}this.setValue(e),this.inputElement.value=this.formattedValue}handleCompositionStart(){this.isComposing=!0}handleCompositionEnd(){this.isComposing=!1,requestAnimationFrame(()=>{this.inputElement.dispatchEvent(new Event("input",{composed:!0,bubbles:!0}))})}handleInputElementPointerdown(){this.hasRecentlyReceivedPointerDown=!0,this.updateComplete.then(()=>{requestAnimationFrame(()=>{this.hasRecentlyReceivedPointerDown=!1})})}handleInput(e){if(this.isComposing){if(e.data){const d=this.convertValueToNumber(e.data);Number.isNaN(d)&&(this.inputElement.value=this.indeterminate?z:this._trackingValue,this.isComposing=!1)}e.stopPropagation();return}this.indeterminate&&(this.wasIndeterminate=!0,this.indeterminateValue=this.value,this.inputElement.value=this.inputElement.value.replace(z,"")),e.data&&this.decimalsChars.has(e.data)&&(this.isIntentDecimal=!0);const{value:t,selectionStart:r}=this.inputElement,o=[...t].map(d=>I[d]||d).join("");if(this.numberParser.isValidPartialNumber(o)){this.lastCommitedValue=this.lastCommitedValue??this.value;const d=this.convertValueToNumber(o);!o&&this.indeterminateValue?(this.indeterminate=!0,this._value=this.indeterminateValue):(this.indeterminate=!1,this._value=this.validateInput(d)),this._trackingValue=o,this.inputElement.value=o,this.inputElement.setSelectionRange(r,r);return}this.inputElement.value=this.indeterminate?z:this._trackingValue,e.stopPropagation();const i=o.length,a=this._trackingValue.length,n=(r||i)-(i-a);this.inputElement.setSelectionRange(n,n)}valueWithLimits(e){let t=e;return this.min!==void 0&&(t=Math.max(this.min,t)),this.max!==void 0&&(t=Math.min(this.max,t)),t}validateInput(e){e=this.valueWithLimits(e);const t=e<0?-1:1;if(e*=t,this.step){const r=this.min===void 0?0:this.min,o=Number.parseFloat(this.valueFormatter.format((e-r)%this.step));if(o===0||(Math.round(o/this.step)===1?e+=this.step-o:e-=o),this.max!==void 0)for(;e>this.max;)e-=this.step;e=Number.parseFloat(this.valueFormatter.format(e))}return e*=t,e}get displayValue(){const e=this.focused?"":z;return this.indeterminate?e:this.formattedValue}clearNumberFormatterCache(){this._numberFormatter=void 0,this._numberParser=void 0}get numberFormatter(){if(!this._numberFormatter||!this._numberFormatterFocused){const{style:e,unit:t,unitDisplay:r,...o}=this.formatOptions;e!=="unit"&&(o.style=e),this._numberFormatterFocused=new w(this.languageResolver.language,o);try{this._numberFormatter=new w(this.languageResolver.language,this.formatOptions),this._forcedUnit="",this._numberFormatter.format(1)}catch{e==="unit"&&(this._forcedUnit=t),this._numberFormatter=this._numberFormatterFocused}}return this.focused?this._numberFormatterFocused:this._numberFormatter}clearValueFormatterCache(){this._valueFormatter=void 0}get valueFormatter(){if(!this._valueFormatter){const e=this.step?this.step===Math.floor(this.step)?0:this.step.toString().split(".")[1].length:0;this._valueFormatter=new w("en",{useGrouping:!1,maximumFractionDigits:e})}return this._valueFormatter}get numberParser(){if(!this._numberParser||!this._numberParserFocused){const{style:e,unit:t,unitDisplay:r,...o}=this.formatOptions;e!=="unit"&&(o.style=e),this._numberParserFocused=new N(this.languageResolver.language,o);try{this._numberParser=new N(this.languageResolver.language,this.formatOptions),this._forcedUnit="",this._numberParser.parse("0")}catch{e==="unit"&&(this._forcedUnit=t),this._numberParser=this._numberParserFocused}}return this.focused?this._numberParserFocused:this._numberParser}renderField(){return this.autocomplete="off",g.html`
|
|
19
|
+
${super.renderField()}
|
|
20
|
+
${this.hideStepper?g.nothing:g.html`
|
|
21
|
+
<span
|
|
22
|
+
class="buttons"
|
|
23
|
+
@focusin=${this.handleFocusin}
|
|
24
|
+
@focusout=${this.handleFocusout}
|
|
25
|
+
${k.streamingListener({start:["pointerdown",this.handlePointerdown],streamInside:[["pointermove","pointerenter","pointerleave","pointerover","pointerout"],this.handlePointermove],end:[["pointerup","pointercancel","pointerleave"],this.handlePointerup]})}
|
|
26
|
+
>
|
|
27
|
+
<luzmo-infield-button
|
|
28
|
+
inline="end"
|
|
29
|
+
block="start"
|
|
30
|
+
class="button step-up"
|
|
31
|
+
aria-hidden="true"
|
|
32
|
+
label=${"Increase "+this.appliedLabel}
|
|
33
|
+
size=${this.size}
|
|
34
|
+
tabindex="-1"
|
|
35
|
+
?focused=${this.focused}
|
|
36
|
+
?disabled=${this.disabled||this.readonly||this.max!==void 0&&this.value===this.max}
|
|
37
|
+
?quiet=${this.quiet}
|
|
38
|
+
>
|
|
39
|
+
${f.luzmoIcon(f.luzmoAngleUp)}
|
|
40
|
+
</luzmo-infield-button>
|
|
41
|
+
<luzmo-infield-button
|
|
42
|
+
inline="end"
|
|
43
|
+
block="end"
|
|
44
|
+
class="button step-down"
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
label=${"Decrease "+this.appliedLabel}
|
|
47
|
+
size=${this.size}
|
|
48
|
+
tabindex="-1"
|
|
49
|
+
?focused=${this.focused}
|
|
50
|
+
?disabled=${this.disabled||this.readonly||this.min!==void 0&&this.value===this.min}
|
|
51
|
+
?quiet=${this.quiet}
|
|
52
|
+
>
|
|
53
|
+
${f.luzmoIcon(f.luzmoAngleDown)}
|
|
54
|
+
</luzmo-infield-button>
|
|
55
|
+
</span>
|
|
56
|
+
`}
|
|
57
|
+
`}update(e){if((e.has("formatOptions")||e.has("resolvedLanguage"))&&this.clearNumberFormatterCache(),e.has("value")||e.has("max")||e.has("min")||e.has("step")){const t=this.numberParser.parse(this.formattedValue.replace(this._forcedUnit,""));this.value=t,this.clearValueFormatterCache()}super.update(e)}willUpdate(e){this.multiline=!1,e.has(k.languageResolverUpdatedSymbol)&&this.clearNumberFormatterCache()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this.handleKeydown),this.addEventListener("compositionstart",this.handleCompositionStart),this.addEventListener("compositionend",this.handleCompositionEnd)}updated(e){if(!(!this.inputElement||!this.isConnected)){if(e.has("min")||e.has("formatOptions")){const t=this.min!==void 0&&this.min>=0,{maximumFractionDigits:r}=this.numberFormatter.resolvedOptions(),o=r&&r>0;let i="numeric";v.isIPhone()&&!t?i="text":(v.isIOS()&&o||v.isAndroid()&&o&&t)&&(i="decimal"),this.inputElement.inputMode=i}e.has("focused")&&this.focused&&!this.hasRecentlyReceivedPointerDown&&this.formatOptions.unit&&this.setSelectionRange(0,this.displayValue.length)}}}h([G.e(".buttons")],p.prototype,"buttons",2);h([c.n({type:Boolean,reflect:!0})],p.prototype,"focused",2);h([c.n({type:Object,attribute:"format-options"})],p.prototype,"formatOptions",2);h([c.n({type:Boolean,reflect:!0,attribute:"hide-stepper"})],p.prototype,"hideStepper",2);h([c.n({type:Boolean,reflect:!0})],p.prototype,"indeterminate",2);h([c.n({type:Boolean,reflect:!0,attribute:"keyboard-focused"})],p.prototype,"keyboardFocused",2);h([c.n({type:Number})],p.prototype,"max",2);h([c.n({type:Number})],p.prototype,"min",2);h([c.n({type:Number})],p.prototype,"step",2);h([c.n({type:Number,reflect:!0,attribute:"step-modifier"})],p.prototype,"stepModifier",2);h([c.n({type:Number})],p.prototype,"value",1);customElements.get("luzmo-number-field")||customElements.define("luzmo-number-field",p);exports.LuzmoNumberField=p;
|