@luzmo/lucero 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +3 -3
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +6 -6
- package/components/action-button/index.cjs +1 -1
- package/components/action-button/index.js +3 -3
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +1 -1
- package/components/{action-group-enfc-YnW.js → action-group-DngGfcr_.js} +2 -2
- package/components/{action-group-Uimj-MJP.cjs → action-group-hy1HZxOi.cjs} +1 -1
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +5 -5
- package/components/{async-directive-D_Ter1F8.cjs → async-directive-B0s_zDWg.cjs} +1 -1
- package/components/{async-directive-DWRUSKKF.js → async-directive-C0KryStG.js} +1 -1
- package/components/avatar/index.cjs +1 -1
- package/components/avatar/index.js +5 -5
- package/components/base-CTSOJw6c.cjs +40 -0
- package/components/{base-CawdqE7p.js → base-DroC2Znx.js} +50 -42
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +6 -6
- package/components/{button-base-DSHx7XO8.js → button-base-BRZtaOk8.js} +4 -4
- package/components/{button-base-Cfb8QBjx.cjs → button-base-CJc7kjJK.cjs} +1 -1
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +2 -2
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.js +1 -1
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.js +3 -3
- package/components/{checkbox-mixin-DUhXwD46.cjs → checkbox-mixin-CcPwhZst.cjs} +1 -1
- package/components/{checkbox-mixin-BFGTmw17.js → checkbox-mixin-DbcpHFBw.js} +2 -2
- package/components/{class-map-CJko4aXp.js → class-map-CjcRhurN.js} +1 -1
- package/components/{class-map-Buyb1CLm.cjs → class-map-DuvNig0r.cjs} +1 -1
- package/components/{clear-button-CyzA8riE.cjs → clear-button-BkQsOIoW.cjs} +1 -1
- package/components/{clear-button-DB34Vybj.js → clear-button-Nwq4REOv.js} +3 -3
- package/components/{close-button-DN2cjFRq.js → close-button-7ut4xT4f.js} +3 -3
- package/components/{close-button-BQJ2wHkM.cjs → close-button-9l1TxW7Y.cjs} +1 -1
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +3 -3
- package/components/color-field/index.cjs +1 -1
- package/components/color-field/index.js +2 -2
- package/components/color-handle/index.cjs +1 -1
- package/components/color-handle/index.js +2 -2
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +1 -1
- package/components/{color-loupe-DxcqXoJ6.js → color-loupe-B0mH9Jyx.js} +1 -1
- package/components/{color-loupe-SskbNeMp.cjs → color-loupe-Ck2IRn4K.cjs} +1 -1
- package/components/color-menu/index.cjs +1 -1
- package/components/color-menu/index.js +3 -3
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.js +3 -3
- package/components/color-slider/index.cjs +1 -1
- package/components/color-slider/index.js +5 -5
- package/components/date-time-picker/index.cjs +1 -1
- package/components/date-time-picker/index.js +9 -9
- package/components/{directive-helpers-TkFq2eZF.cjs → directive-helpers-BQRjDUVe.cjs} +1 -1
- package/components/{directive-helpers-nlQRAaQt.js → directive-helpers-OG6wWKJt.js} +1 -1
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +2 -2
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +1 -1
- package/components/{field-group-DSY2HUoj.cjs → field-group-CIach2C_.cjs} +1 -1
- package/components/{field-group-DAhrTCfl.js → field-group-ClxYbp6Z.js} +2 -2
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +1 -1
- package/components/{field-label-CAFfGxEL.js → field-label-BaOJ2i-l.js} +2 -2
- package/components/{field-label-CjsQ3ujK.cjs → field-label-CkZCXvyb.cjs} +1 -1
- package/components/{focusable-DGWL1v1p.cjs → focusable-BW4I5ppi.cjs} +1 -1
- package/components/{focusable-cj2QhwDT.js → focusable-Dy9nRVST.js} +1 -1
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +2 -2
- package/components/{if-defined-BSAr_4u4.js → if-defined-CUCu7LSf.js} +1 -1
- package/components/{if-defined-B56xGmAg.cjs → if-defined-D7nbLM5n.cjs} +1 -1
- package/components/{index-vWdA-LXe.js → index-C6wHQ74z.js} +5 -5
- package/components/{index-BziWAe4P.cjs → index-CbaDCtQl.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +100 -95
- package/components/infield-button/index.cjs +1 -1
- package/components/infield-button/index.js +3 -3
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +1 -1
- package/components/{like-anchor-QBlvwFfT.js → like-anchor-CkIPVvtI.js} +2 -2
- package/components/{like-anchor-Bmabl9ra.cjs → like-anchor-s-5FEzRQ.cjs} +1 -1
- package/components/{manage-help-text-Cozl9Sgn.js → manage-help-text-BzyCpgqN.js} +2 -2
- package/components/{manage-help-text-OHXDgxyj.cjs → manage-help-text-DGwDhPtP.cjs} +1 -1
- package/components/menu/index.cjs +2 -2
- package/components/menu/index.js +7 -7
- package/components/multi-language-field/index.cjs +1 -1
- package/components/multi-language-field/index.js +3 -3
- package/components/multi-picker/index.cjs +1 -1
- package/components/multi-picker/index.js +8 -8
- package/components/number-field/index.cjs +1 -1
- package/components/number-field/index.js +3 -3
- package/components/{observe-slot-text-ggb4kKgY.js → observe-slot-text-BMloiRX5.js} +1 -1
- package/components/{observe-slot-text-CrYB2Pj-.cjs → observe-slot-text-BzdHQBH3.cjs} +1 -1
- package/components/overlay/index.cjs +4 -4
- package/components/overlay/index.js +8 -8
- package/components/{overlay-CJ9by37f.js → overlay-D4oZnKKd.js} +4 -4
- package/components/{overlay-Deh6Ki6I.cjs → overlay-DAVu8dy8.cjs} +1 -1
- package/components/{pending-state-Do522lTd.cjs → pending-state-CkibRs0D.cjs} +1 -1
- package/components/{pending-state-TJj1x9xn.js → pending-state-xRhujC3J.js} +2 -2
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/{picker-h9eY75xS.js → picker-D0wr8mRN.js} +8 -8
- package/components/{picker-dwg8oHVQ.cjs → picker-PMfW3n8Z.cjs} +1 -1
- package/components/picker-button/index.cjs +1 -1
- package/components/picker-button/index.js +4 -4
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +1 -1
- package/components/{popover-Bx4ZDHk4.js → popover-Cx4MhaoE.js} +2 -2
- package/components/{popover-Ddx-P2RQ.cjs → popover-DBQ1YYW6.cjs} +1 -1
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +1 -1
- package/components/{progress-circle-Be24kv6B.js → progress-circle-B25wyiBi.js} +3 -3
- package/components/{progress-circle-NNbCMK2i.cjs → progress-circle-BGubjTvj.cjs} +1 -1
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.js +3 -3
- package/components/search/index.cjs +1 -1
- package/components/search/index.js +3 -3
- package/components/{sized-mixin-D9LkrMjb.cjs → sized-mixin-CDhX3fJn.cjs} +1 -1
- package/components/{sized-mixin-BxMraZLS.js → sized-mixin-Y_QuYtjJ.js} +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +2 -2
- package/components/{state-CYxk12SV.js → state-BF7jO1DT.js} +1 -1
- package/components/{state-C5I1gP3G.cjs → state-Bq6oXknJ.cjs} +1 -1
- package/components/{streaming-listener-KVex1WWB.cjs → streaming-listener-Cm6s-WvF.cjs} +1 -1
- package/components/{streaming-listener-CCalHg57.js → streaming-listener-Dxbr_Jiv.js} +2 -2
- package/components/{style-map-uMq-yDJ3.cjs → style-map-Cp3I-AN3.cjs} +1 -1
- package/components/{style-map-Ct2LiEds.js → style-map-DqptyE0A.js} +1 -1
- package/components/swatch/index.cjs +1 -1
- package/components/swatch/index.js +4 -4
- package/components/switch/index.cjs +1 -1
- package/components/switch/index.js +4 -4
- package/components/tabs/index.cjs +93 -0
- package/components/tabs/index.d.ts +16 -0
- package/components/tabs/index.js +636 -0
- package/components/tabs/tab-panel.d.ts +17 -0
- package/components/tabs/tab.d.ts +29 -0
- package/components/tabs/tabs-overflow.d.ts +34 -0
- package/components/tabs/tabs.d.ts +105 -0
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +3 -3
- package/components/text-field/index.cjs +1 -1
- package/components/text-field/index.js +3 -3
- package/components/{text-field-mxJCYues.cjs → text-field-CThL0T_y.cjs} +1 -1
- package/components/{text-field-BTnBJoP9.js → text-field-DWC0tpq4.js} +7 -7
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +2 -2
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.js +3 -3
- package/components/unit-input/index.cjs +1 -1
- package/components/unit-input/index.js +3 -3
- package/components/utils.cjs +1 -1
- package/components/utils.js +4 -4
- package/custom-elements.json +1 -1
- package/index.d.ts +1 -0
- package/package.json +6 -1
- package/components/base-B7Pfl2if.cjs +0 -40
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a, r as s, x as d, n as i } from "../base-
|
|
18
|
+
import { a, r as s, x as d, n as i } from "../base-DroC2Znx.js";
|
|
19
19
|
const z = () => {
|
|
20
20
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
21
21
|
const o = document.createElement("style");
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { n as o, x as s } from "./base-
|
|
19
|
-
import { o as e } from "./if-defined-
|
|
18
|
+
import { n as o, x as s } from "./base-DroC2Znx.js";
|
|
19
|
+
import { o as e } from "./if-defined-CUCu7LSf.js";
|
|
20
20
|
var $ = Object.defineProperty, l = (i, r, p, d) => {
|
|
21
21
|
for (var t = void 0, a = i.length - 1, n; a >= 0; a--)
|
|
22
22
|
(n = i[a]) && (t = n(r, p, t) || t);
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";const t=require("./base-
|
|
18
|
+
"use strict";const t=require("./base-CTSOJw6c.cjs"),r=require("./if-defined-D7nbLM5n.cjs");var f=Object.defineProperty,n=(l,e,s,d)=>{for(var o=void 0,i=l.length-1,a;i>=0;i--)(a=l[i])&&(o=a(e,s,o)||o);return o&&f(e,s,o),o};function c(l){class e extends l{renderAnchor({id:d,className:o,ariaHidden:i,labelledby:a,tabindex:p,anchorContent:h=t.x`<slot></slot>`}){return t.x`
|
|
19
19
|
<a
|
|
20
20
|
id=${d}
|
|
21
21
|
class=${r.o(o)}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { x as r } from "./base-
|
|
19
|
-
import { o as d } from "./if-defined-
|
|
18
|
+
import { x as r } from "./base-DroC2Znx.js";
|
|
19
|
+
import { o as d } from "./if-defined-CUCu7LSf.js";
|
|
20
20
|
import { c as a } from "./condition-attribute-with-id-Dv4lSRbe.js";
|
|
21
21
|
import { r as n } from "./random-id-ByCz1xaq.js";
|
|
22
22
|
class l {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";const d=require("./base-
|
|
18
|
+
"use strict";const d=require("./base-CTSOJw6c.cjs"),r=require("./if-defined-D7nbLM5n.cjs"),a=require("./condition-attribute-with-id-DrQYZzFS.cjs"),s=require("./random-id-CqvckpWe.cjs");class l{constructor(e,{mode:i}={mode:"internal"}){this.mode="internal",this.handleSlotchange=({target:t})=>{this.handleHelpText(t),this.handleNegativeHelpText(t)},this.host=e,this.id=`luzmo-help-text-${s.randomID()}`,this.mode=i}get isInternal(){return this.mode==="internal"}render(e){return d.x`
|
|
19
19
|
<div
|
|
20
20
|
id=${r.o(this.isInternal?this.id:void 0)}
|
|
21
21
|
aria-live="assertive"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../base-B7Pfl2if.cjs"),v=require("../query-BL-TJj7K.cjs"),z=require("../sized-mixin-D9LkrMjb.cjs"),y=require("../divider.module-CXMNveQc.cjs"),S=require("../state-C5I1gP3G.cjs"),E=require("../query-assigned-nodes-BcKWmGzy.cjs"),k=require("../random-id-CqvckpWe.cjs"),M=require("../mutation-controller-DkOMCW-c.cjs"),A=require("../focusable-DGWL1v1p.cjs"),C=require("../like-anchor-Bmabl9ra.cjs"),D=require("../observe-slot-presence-bc9chhsi.cjs"),R=require("../observe-slot-text-CrYB2Pj-.cjs"),P=require("../dependency-manger-C5HCkMMB.cjs"),g=require("@luzmo/icons"),O=require("../slottable-request-event-BfUUt1Mh.cjs"),L=":host{--menu-item-top-to-action: var(--luzmo-spacing-1);--menu-item-top-to-checkbox: var(--luzmo-spacing-1);--menu-item-label-line-height: var(--luzmo-line-height);--menu-item-label-line-height-cjk: 1.5;--menu-item-label-to-description-spacing: 1px;--menu-item-focus-indicator-width: var(--luzmo-indicator-width);--menu-item-focus-indicator-color: var(--luzmo-indicator-color);--menu-item-label-to-value-area-min-spacing: var(--luzmo-spacing-3);--menu-item-label-content-color-default: var(--luzmo-font-color);--menu-item-label-content-color-hover: var(--luzmo-font-color-hover);--menu-item-label-content-color-down: var(--luzmo-font-color-down);--menu-item-label-content-color-focus: var(--luzmo-font-color-focus);--menu-item-highlight-label-background-color: var(--luzmo-primary);--menu-item-highlight-label-content-color: var(--luzmo-font-color);--menu-item-highlight-label-content-color-hover: var( --luzmo-font-color-hover );--menu-item-highlight-label-content-color-down: var(--luzmo-font-color-down);--menu-item-highlight-label-content-color-focus: var( --luzmo-font-color-focus );--menu-item-label-icon-color-default: var(--luzmo-font-color);--menu-item-label-icon-color-hover: var(--luzmo-font-color-hover);--menu-item-label-icon-color-down: var(--luzmo-font-color-down);--menu-item-label-icon-color-focus: var(--luzmo-font-color-focus);--menu-item-label-content-color-disabled: var(--luzmo-font-color-disabled);--menu-item-label-icon-color-disabled: var(--luzmo-font-color-disabled);--menu-item-description-line-height: var(--luzmo-line-height);--menu-item-description-line-height-cjk: 1.5;--menu-item-description-color-default: var(--luzmo-font-color);--menu-item-description-color-hover: var(--luzmo-font-color-hover);--menu-item-description-color-down: var(--luzmo-font-color-down);--menu-item-description-color-focus: var(--luzmo-font-color-focus);--menu-item-description-color-disabled: var(--luzmo-disabled-color);--menu-section-header-line-height: var(--luzmo-line-height);--menu-section-header-line-height-cjk: 1.5;--menu-section-header-font-weight: bold;--menu-section-header-color: var(--luzmo-font-color-hard);--menu-collapsible-icon-color: var(--luzmo-font-color-hard);--menu-checkmark-icon-color-default: var(--luzmo-primary);--menu-checkmark-icon-color-hover: var(--luzmo-primary-hover);--menu-checkmark-icon-color-down: var(--luzmo-primary-down);--menu-checkmark-icon-color-focus: var(--luzmo-primary-focus);--menu-drillin-icon-color-default: var(--luzmo-font-color);--menu-drillin-icon-color-hover: var(--luzmo-font-color-hover);--menu-drillin-icon-color-down: var(--luzmo-font-color-down);--menu-drillin-icon-color-focus: var(--luzmo-font-color-focus);--menu-item-value-color-default: var(--luzmo-font-color);--menu-item-value-color-hover: var(--luzmo-font-color-hover);--menu-item-value-color-down: var(--luzmo-font-color-down);--menu-item-value-color-focus: var(--luzmo-font-color-focus);--menu-checkmark-display-hidden: none;--menu-checkmark-display-shown: block;--menu-checkmark-display: block;--menu-item-collapsible-no-icon-submenu-item-padding-x-start: 28px;--menu-item-background-color-selected: var(--luzmo-background-color);--menu-item-background-color-default: var(--luzmo-background-color);--menu-item-background-color-hover: var(--luzmo-background-color-hover);--menu-item-background-color-down: var(--luzmo-background-color-down);--menu-item-background-color-key-focus: var(--luzmo-background-color-focus)}:host{--menu-item-min-height: var(--luzmo-component-height);--menu-item-icon-height: var(--luzmo-font-size);--menu-item-icon-width: var(--luzmo-font-size);--menu-item-label-font-size: var(--luzmo-font-size);--menu-item-label-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-label-inline-edge-to-content: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-top-edge-to-text: var(--luzmo-spacing-1);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-1);--menu-item-text-to-control: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-description-font-size: var(--luzmo-font-size-xs);--menu-section-header-font-size: var(--luzmo-font-size);--menu-section-header-min-width: var(--luzmo-component-height);--menu-item-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-checkmark-size: var(--luzmo-font-size-xs);--menu-item-angle-size: var(--luzmo-font-size);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-back-icon-margin: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=s]){--menu-item-min-height: var(--luzmo-component-height-s);--menu-item-icon-height: var(--luzmo-font-size-s);--menu-item-icon-width: var(--luzmo-font-size-s);--menu-item-label-font-size: var(--luzmo-font-size-s);--menu-item-label-text-to-visual: var(--luzmo-spacing-3);--menu-item-label-inline-edge-to-content: var(--luzmo-spacing-3);--menu-item-top-edge-to-text: var(--luzmo-spacing-1);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-1);--menu-item-text-to-control: var(--luzmo-spacing-2);--menu-item-description-font-size: var(--luzmo-font-size-xs);--menu-section-header-font-size: var(--luzmo-font-size-s);--menu-section-header-min-width: var(--luzmo-component-height-s);--menu-item-selectable-edge-to-text-not-selected: var(--luzmo-spacing-3);--menu-item-checkmark-size: var(--luzmo-font-size-xs);--menu-item-angle-size: var(--luzmo-font-size-s);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: var(--luzmo-spacing-3);--menu-back-icon-margin: var(--luzmo-spacing-3)}:host([size=l]){--menu-item-min-height: var(--luzmo-component-height-l);--menu-item-icon-height: var(--luzmo-font-size-l);--menu-item-icon-width: var(--luzmo-font-size-l);--menu-item-label-font-size: var(--luzmo-font-size-l);--menu-item-label-text-to-visual: var(--luzmo-spacing-4);--menu-item-label-inline-edge-to-content: var(--luzmo-spacing-4);--menu-item-top-edge-to-text: var(--luzmo-spacing-2);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-2);--menu-item-text-to-control: var(--luzmo-spacing-3);--menu-item-description-font-size: var(--luzmo-font-size-s);--menu-section-header-font-size: var(--luzmo-font-size-l);--menu-section-header-min-width: var(--luzmo-component-height-l);--menu-item-selectable-edge-to-text-not-selected: var(--luzmo-spacing-4);--menu-item-checkmark-size: var(--luzmo-font-size-s);--menu-item-angle-size: var(--luzmo-font-size-l);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: var(--luzmo-spacing-4);--menu-back-icon-margin: var(--luzmo-spacing-4)}:host([size=xl]){--menu-item-min-height: var(--luzmo-component-height-xl);--menu-item-icon-height: var(--luzmo-font-size-xl);--menu-item-icon-width: var(--luzmo-font-size-xl);--menu-item-label-font-size: var(--luzmo-font-size-xl);--menu-item-label-text-to-visual: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-label-inline-edge-to-content: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-top-edge-to-text: var(--luzmo-spacing-2);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-2);--menu-item-text-to-control: var(--luzmo-spacing-4);--menu-item-description-font-size: var(--luzmo-font-size);--menu-section-header-font-size: var(--luzmo-font-size-xl);--menu-section-header-min-width: var(--luzmo-component-height-xl);--menu-item-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-checkmark-size: var(--luzmo-font-size);--menu-item-angle-size: var(--luzmo-font-size-xl);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-back-icon-margin: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}:host([variant=highlight]){--menu-item-highlight-label-content-color: var(--luzmo-primary-inverse-color);--menu-checkmark-display: var(--menu-checkmark-display-hidden);--menu-item-highlight-label-content-color-hover: var( --luzmo-primary-inverse-color );--menu-item-highlight-label-content-color-down: var( --luzmo-primary-inverse-color );--menu-item-highlight-label-content-color-focus: var( --luzmo-primary-inverse-color )}:host([variant=highlight]) ::slotted(luzmo-menu-item[selected]){padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));background-color:var(--luzmo-menu-item-highlight-label-background-color, var(--menu-item-highlight-label-background-color, var(--luzmo-border-color)))}@media (forced-colors: active){:host{--highcontrast-menu-item-background-color-default: ButtonFace;--highcontrast-menu-item-color-default: ButtonText;--highcontrast-menu-item-background-color-focus: Highlight;--highcontrast-menu-item-color-focus: HighlightText;--highcontrast-menu-checkmark-icon-color-default: Highlight;--highcontrast-menu-item-color-disabled: GrayText;--highcontrast-menu-item-focus-indicator-color: Highlight;--highcontrast-menu-item-selected-background-color: Highlight;--highcontrast-menu-item-selected-color: HighlightText}@supports (color: SelectedItem){:host{--highcontrast-menu-item-selected-background-color: SelectedItem;--highcontrast-menu-item-selected-color: SelectedItemText}}}:host{inline-size:auto;inline-size:var(--luzmo-menu-inline-size, auto);box-sizing:border-box;margin:0;padding:0;list-style-type:none;display:inline-block;overflow:auto}:host:lang(ja),:host:lang(ko),:host:lang(zh){--menu-item-label-line-height: var( --luzmo-menu-item-label-line-height-cjk, var(--menu-item-label-line-height-cjk) );--menu-item-description-line-height: var( --luzmo-menu-item-description-line-height-cjk, var(--menu-item-description-line-height-cjk) );--menu-section-header-line-height: var( --luzmo-menu-section-header-line-height-cjk, var(--menu-section-header-line-height-cjk) )}:host([selects]) ::slotted(luzmo-menu-item){--menu-checkmark-display: var(--menu-checkmark-display-hidden);padding-inline-start:var(--luzmo-menu-item-selectable-edge-to-text-not-selected, var(--menu-item-selectable-edge-to-text-not-selected))}:host([selects]) ::slotted(luzmo-menu-item[selected]){--menu-checkmark-display: var(--menu-checkmark-display-shown);padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content))}.luzmo-Menu-backIcon{margin-block:var(--luzmo-menu-back-icon-margin-block, var(--menu-back-icon-margin));margin-inline:var(--luzmo-menu-back-icon-margin-inline, var(--menu-back-icon-margin));fill:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-icon-color-default, var(--menu-section-header-color)));color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-icon-color-default, var(--menu-section-header-color)))}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}.luzmo-Menu-sectionHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-section-header-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));min-inline-size:var(--luzmo-menu-section-header-min-width, var(--menu-section-header-min-width));padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text, var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text, var(--luzmo-menu-item-bottom-edge-to-text, var(--menu-item-bottom-edge-to-text)));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));grid-area:sectionHeadingArea/1/sectionHeadingArea/-1;display:block}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start, 0) var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start, 0) var(--luzmo-menu-back-padding-block-end, 0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-back .luzmo-Menu-sectionHeading{padding:0}.luzmo-Menu-backButton{cursor:pointer;background:none;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--luzmo-indicator-width) solid var(--luzmo-indicator-color);outline-offset:calc((var(--luzmo-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-heading-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));display:block}:host{display:inline-flex;flex-direction:column;width:100%}:host(:focus){outline:none}::slotted(*){flex-shrink:0}";var U=Object.defineProperty,T=Object.getOwnPropertyDescriptor,m=(r,e,t,o)=>{for(var i=o>1?void 0:o?T(e,t):e,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=(o?l(e,t,i):l(i))||i);return o&&i&&U(e,t,i),i};function _(r,e){return!!e&&(r===e||r.contains(e))}class c extends z.SizedMixin(a.LuzmoElement,{noDefaultSize:!0}){constructor(){super(),this.label="",this.ignore=!1,this.value="",this.valueSeparator=",",this.selectedItems=[],this.focusedItemIndex=0,this.focusInItemIndex=0,this._selected=[],this.cacheUpdated=Promise.resolve(),this.childItemSet=new Set,this.selectedItemsMap=new Map,this._hasUpdatedSelectedItemIndex=!1,this._willUpdateItems=!1,this.pointerUpTarget=null,this.descendentOverlays=new Map,this.handleSubmenuClosed=e=>{e.stopPropagation(),e.composedPath()[0].dispatchEvent(new Event("luzmo-menu-submenu-closed",{bubbles:!0,composed:!0}))},this.handleSubmenuOpened=e=>{e.stopPropagation(),e.composedPath()[0].dispatchEvent(new Event("luzmo-menu-submenu-opened",{bubbles:!0,composed:!0}));const o=this.childItems[this.focusedItemIndex];o&&(o.focused=!1);const i=e.composedPath().find(l=>this.childItemSet.has(l));if(!i)return;const n=this.childItems.indexOf(i);this.focusedItemIndex=n,this.focusInItemIndex=n},this.resolveCacheUpdated=()=>{},this.addEventListener("luzmo-menu-item-added-or-updated",this.onSelectableItemAddedOrUpdated),this.addEventListener("luzmo-menu-item-added-or-updated",this.onFocusableItemAddedOrUpdated,{capture:!0}),this.addEventListener("click",this.handleClick),this.addEventListener("pointerup",this.handlePointerup),this.addEventListener("focusin",this.handleFocusin),this.addEventListener("blur",this.handleBlur),this.addEventListener("luzmo-opened",this.handleSubmenuOpened),this.addEventListener("luzmo-closed",this.handleSubmenuClosed)}static get styles(){return[a.r(L)]}get isSubmenu(){return this.slot==="submenu"}get selected(){return this._selected}set selected(e){if(e===this.selected)return;const t=this.selected;this._selected=e,this.selectedItems=[],this.selectedItemsMap.clear(),this.childItems.forEach(o=>{this===o.menuData.selectionRoot&&(o.selected=this.selected.includes(o.value),o.selected&&(this.selectedItems.push(o),this.selectedItemsMap.set(o,!0)))}),this.requestUpdate("selected",t)}get childItems(){return this.cachedChildItems||(this.cachedChildItems=this.updateCachedMenuItems()),this.cachedChildItems}get childRole(){if(this.resolvedRole==="listbox")return"option";switch(this.resolvedSelects){case"single":return"menuitemradio";case"multiple":return"menuitemcheckbox";default:return"menuitem"}}get ownRole(){return"menu"}focus({preventScroll:e}={}){if(this.childItems.every(o=>o.disabled))return;if(this.childItems.some(o=>o.menuData.focusRoot!==this)){super.focus({preventScroll:e});return}this.focusMenuItemByOffset(0),super.focus({preventScroll:e});const t=this.selectedItems[0];t&&!e&&t.scrollIntoView({block:"nearest"})}handleFocusin(e){var i;if(this.childItems.some(n=>n.menuData.focusRoot!==this))return;const t=this.getRootNode().activeElement,o=((i=this.childItems[this.focusedItemIndex])==null?void 0:i.menuData.selectionRoot)||this;if((t!==o||e.target!==this)&&(o.focus({preventScroll:!0}),t&&this.focusedItemIndex===0)){const n=this.childItems.indexOf(t);this.focusMenuItemByOffset(Math.max(n,0))}this.startListeningToKeyboard()}startListeningToKeyboard(){this.addEventListener("keydown",this.handleKeydown)}handleBlur(e){_(this,e.relatedTarget)||(this.stopListeningToKeyboard(),this.childItems.forEach(t=>t.focused=!1),this.removeAttribute("aria-activedescendant"))}stopListeningToKeyboard(){this.removeEventListener("keydown",this.handleKeydown)}selectOrToggleItem(e){const t=this.resolvedSelects,o=new Map(this.selectedItemsMap),i=[...this.selected],n=[...this.selectedItems],l=this.value,d=this.childItems[this.focusedItemIndex];if(d&&(d.focused=!1,d.active=!1),this.focusedItemIndex=this.childItems.indexOf(e),this.forwardFocusVisibleToItem(e),t==="multiple"){this.selectedItemsMap.has(e)?this.selectedItemsMap.delete(e):this.selectedItemsMap.set(e,!0);const h=[],b=[];this.childItemSet.forEach(f=>{f.menuData.selectionRoot===this&&this.selectedItemsMap.has(f)&&(h.push(f.value),b.push(f))}),this._selected=h,this.selectedItems=b,this.value=this.selected.join(this.valueSeparator)}else this.selectedItemsMap.clear(),this.selectedItemsMap.set(e,!0),this.value=e.value,this._selected=[e.value],this.selectedItems=[e];if(!this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0,composed:!0}))){this._selected=i,this.selectedItems=n,this.selectedItemsMap=o,this.value=l;return}if(t==="single"){for(const h of o.keys())h!==e&&(h.selected=!1);e.selected=!0}else t==="multiple"&&(e.selected=!e.selected)}handleKeydown(e){if(e.defaultPrevented)return;const t=this.childItems[this.focusedItemIndex];t&&(t.focused=!0);const{key:o}=e;if(e.shiftKey&&e.target!==this&&this.hasAttribute("tabindex")){this.removeAttribute("tabindex");const i=n=>{!n.shiftKey&&!this.hasAttribute("tabindex")&&(this.tabIndex=0,document.removeEventListener("keyup",i),this.removeEventListener("focusout",i))};document.addEventListener("keyup",i),this.addEventListener("focusout",i)}if(o==="Tab"){this.prepareToCleanUp();return}if(o===" "&&(t!=null&&t.hasSubmenu)){t.openOverlay();return}if(o===" "||o==="Enter"){const i=this.childItems[this.focusedItemIndex];i&&i.menuData.selectionRoot===e.target&&(e.preventDefault(),i.click());return}if(o==="ArrowDown"||o==="ArrowUp"){const i=this.childItems[this.focusedItemIndex];i&&i.menuData.selectionRoot===e.target&&this.navigateWithinMenu(e);return}this.navigateBetweenRelatedMenus(e)}focusMenuItemByOffset(e){const t=e||1,o=this.childItems[this.focusedItemIndex];o&&(o.focused=!1,o.active=o.open),this.focusedItemIndex=(this.childItems.length+this.focusedItemIndex+e)%this.childItems.length;let i=this.childItems[this.focusedItemIndex],n=this.childItems.length;for(;i!=null&&i.disabled&&n;)n-=1,this.focusedItemIndex=(this.childItems.length+this.focusedItemIndex+t)%this.childItems.length,i=this.childItems[this.focusedItemIndex];return i!=null&&i.disabled||this.forwardFocusVisibleToItem(i),i}updateSelectedItemIndex(){let e=0;const t=new Map,o=[],i=[];let n=this.childItems.length;for(;n;){n-=1;const l=this.childItems[n];l.menuData.selectionRoot===this&&((l.selected||!this._hasUpdatedSelectedItemIndex&&this.selected.includes(l.value))&&(e=n,t.set(l,!0),o.unshift(l.value),i.unshift(l)),n!==e&&(l.focused=!1))}i.map((l,d)=>{d>0&&(l.focused=!1)}),this.selectedItemsMap=t,this._selected=o,this.selectedItems=i,this.value=this.selected.join(this.valueSeparator),this.focusedItemIndex=e,this.focusInItemIndex=e}closeDescendentOverlays(){this.descendentOverlays.forEach(e=>{e.open=!1}),this.descendentOverlays=new Map}render(){return this.renderMenuItemSlot()}connectedCallback(){super.connectedCallback(),!this.hasAttribute("role")&&!this.ignore&&this.setAttribute("role",this.ownRole),this.updateComplete.then(()=>this.updateItemFocus())}disconnectedCallback(){this.cachedChildItems=void 0,this.selectedItems=[],this.selectedItemsMap.clear(),this.childItemSet.clear(),this.descendentOverlays=new Map,super.disconnectedCallback()}handleDescendentOverlayOpened(e){const t=e.composedPath()[0];t.overlayElement&&this.descendentOverlays.set(t.overlayElement,t.overlayElement)}handleDescendentOverlayClosed(e){const t=e.composedPath()[0];t.overlayElement&&this.descendentOverlays.delete(t.overlayElement)}navigateWithinMenu(e){const{key:t}=e,o=this.childItems[this.focusedItemIndex],i=t==="ArrowDown"?1:-1,n=this.focusMenuItemByOffset(i);n!==o&&(e.preventDefault(),e.stopPropagation(),n.scrollIntoView({block:"nearest"}))}navigateBetweenRelatedMenus(e){const{key:t}=e;e.stopPropagation();const o=this.isLTR&&t==="ArrowRight"||!this.isLTR&&t==="ArrowLeft",i=this.isLTR&&t==="ArrowLeft"||!this.isLTR&&t==="ArrowRight";if(o){const n=this.childItems[this.focusedItemIndex];n!=null&&n.hasSubmenu&&n.openOverlay()}else i&&this.isSubmenu&&(this.dispatchEvent(new Event("close",{bubbles:!0})),this.updateSelectedItemIndex())}renderMenuItemSlot(){return a.x`
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../base-CTSOJw6c.cjs"),v=require("../query-BL-TJj7K.cjs"),z=require("../sized-mixin-CDhX3fJn.cjs"),y=require("../divider.module-CXMNveQc.cjs"),S=require("../state-Bq6oXknJ.cjs"),E=require("../query-assigned-nodes-BcKWmGzy.cjs"),k=require("../random-id-CqvckpWe.cjs"),M=require("../mutation-controller-DkOMCW-c.cjs"),A=require("../focusable-BW4I5ppi.cjs"),C=require("../like-anchor-s-5FEzRQ.cjs"),D=require("../observe-slot-presence-bc9chhsi.cjs"),R=require("../observe-slot-text-BzdHQBH3.cjs"),P=require("../dependency-manger-C5HCkMMB.cjs"),g=require("@luzmo/icons"),O=require("../slottable-request-event-BfUUt1Mh.cjs"),L=":host{--menu-item-top-to-action: var(--luzmo-spacing-1);--menu-item-top-to-checkbox: var(--luzmo-spacing-1);--menu-item-label-line-height: var(--luzmo-line-height);--menu-item-label-line-height-cjk: 1.5;--menu-item-label-to-description-spacing: 1px;--menu-item-focus-indicator-width: var(--luzmo-indicator-width);--menu-item-focus-indicator-color: var(--luzmo-indicator-color);--menu-item-label-to-value-area-min-spacing: var(--luzmo-spacing-3);--menu-item-label-content-color-default: var(--luzmo-font-color);--menu-item-label-content-color-hover: var(--luzmo-font-color-hover);--menu-item-label-content-color-down: var(--luzmo-font-color-down);--menu-item-label-content-color-focus: var(--luzmo-font-color-focus);--menu-item-highlight-label-background-color: var(--luzmo-primary);--menu-item-highlight-label-content-color: var(--luzmo-font-color);--menu-item-highlight-label-content-color-hover: var( --luzmo-font-color-hover );--menu-item-highlight-label-content-color-down: var(--luzmo-font-color-down);--menu-item-highlight-label-content-color-focus: var( --luzmo-font-color-focus );--menu-item-label-icon-color-default: var(--luzmo-font-color);--menu-item-label-icon-color-hover: var(--luzmo-font-color-hover);--menu-item-label-icon-color-down: var(--luzmo-font-color-down);--menu-item-label-icon-color-focus: var(--luzmo-font-color-focus);--menu-item-label-content-color-disabled: var(--luzmo-font-color-disabled);--menu-item-label-icon-color-disabled: var(--luzmo-font-color-disabled);--menu-item-description-line-height: var(--luzmo-line-height);--menu-item-description-line-height-cjk: 1.5;--menu-item-description-color-default: var(--luzmo-font-color);--menu-item-description-color-hover: var(--luzmo-font-color-hover);--menu-item-description-color-down: var(--luzmo-font-color-down);--menu-item-description-color-focus: var(--luzmo-font-color-focus);--menu-item-description-color-disabled: var(--luzmo-disabled-color);--menu-section-header-line-height: var(--luzmo-line-height);--menu-section-header-line-height-cjk: 1.5;--menu-section-header-font-weight: bold;--menu-section-header-color: var(--luzmo-font-color-hard);--menu-collapsible-icon-color: var(--luzmo-font-color-hard);--menu-checkmark-icon-color-default: var(--luzmo-primary);--menu-checkmark-icon-color-hover: var(--luzmo-primary-hover);--menu-checkmark-icon-color-down: var(--luzmo-primary-down);--menu-checkmark-icon-color-focus: var(--luzmo-primary-focus);--menu-drillin-icon-color-default: var(--luzmo-font-color);--menu-drillin-icon-color-hover: var(--luzmo-font-color-hover);--menu-drillin-icon-color-down: var(--luzmo-font-color-down);--menu-drillin-icon-color-focus: var(--luzmo-font-color-focus);--menu-item-value-color-default: var(--luzmo-font-color);--menu-item-value-color-hover: var(--luzmo-font-color-hover);--menu-item-value-color-down: var(--luzmo-font-color-down);--menu-item-value-color-focus: var(--luzmo-font-color-focus);--menu-checkmark-display-hidden: none;--menu-checkmark-display-shown: block;--menu-checkmark-display: block;--menu-item-collapsible-no-icon-submenu-item-padding-x-start: 28px;--menu-item-background-color-selected: var(--luzmo-background-color);--menu-item-background-color-default: var(--luzmo-background-color);--menu-item-background-color-hover: var(--luzmo-background-color-hover);--menu-item-background-color-down: var(--luzmo-background-color-down);--menu-item-background-color-key-focus: var(--luzmo-background-color-focus)}:host{--menu-item-min-height: var(--luzmo-component-height);--menu-item-icon-height: var(--luzmo-font-size);--menu-item-icon-width: var(--luzmo-font-size);--menu-item-label-font-size: var(--luzmo-font-size);--menu-item-label-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-label-inline-edge-to-content: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-top-edge-to-text: var(--luzmo-spacing-1);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-1);--menu-item-text-to-control: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-description-font-size: var(--luzmo-font-size-xs);--menu-section-header-font-size: var(--luzmo-font-size);--menu-section-header-min-width: var(--luzmo-component-height);--menu-item-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-checkmark-size: var(--luzmo-font-size-xs);--menu-item-angle-size: var(--luzmo-font-size);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-back-icon-margin: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=s]){--menu-item-min-height: var(--luzmo-component-height-s);--menu-item-icon-height: var(--luzmo-font-size-s);--menu-item-icon-width: var(--luzmo-font-size-s);--menu-item-label-font-size: var(--luzmo-font-size-s);--menu-item-label-text-to-visual: var(--luzmo-spacing-3);--menu-item-label-inline-edge-to-content: var(--luzmo-spacing-3);--menu-item-top-edge-to-text: var(--luzmo-spacing-1);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-1);--menu-item-text-to-control: var(--luzmo-spacing-2);--menu-item-description-font-size: var(--luzmo-font-size-xs);--menu-section-header-font-size: var(--luzmo-font-size-s);--menu-section-header-min-width: var(--luzmo-component-height-s);--menu-item-selectable-edge-to-text-not-selected: var(--luzmo-spacing-3);--menu-item-checkmark-size: var(--luzmo-font-size-xs);--menu-item-angle-size: var(--luzmo-font-size-s);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: var(--luzmo-spacing-3);--menu-back-icon-margin: var(--luzmo-spacing-3)}:host([size=l]){--menu-item-min-height: var(--luzmo-component-height-l);--menu-item-icon-height: var(--luzmo-font-size-l);--menu-item-icon-width: var(--luzmo-font-size-l);--menu-item-label-font-size: var(--luzmo-font-size-l);--menu-item-label-text-to-visual: var(--luzmo-spacing-4);--menu-item-label-inline-edge-to-content: var(--luzmo-spacing-4);--menu-item-top-edge-to-text: var(--luzmo-spacing-2);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-2);--menu-item-text-to-control: var(--luzmo-spacing-3);--menu-item-description-font-size: var(--luzmo-font-size-s);--menu-section-header-font-size: var(--luzmo-font-size-l);--menu-section-header-min-width: var(--luzmo-component-height-l);--menu-item-selectable-edge-to-text-not-selected: var(--luzmo-spacing-4);--menu-item-checkmark-size: var(--luzmo-font-size-s);--menu-item-angle-size: var(--luzmo-font-size-l);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: var(--luzmo-spacing-4);--menu-back-icon-margin: var(--luzmo-spacing-4)}:host([size=xl]){--menu-item-min-height: var(--luzmo-component-height-xl);--menu-item-icon-height: var(--luzmo-font-size-xl);--menu-item-icon-width: var(--luzmo-font-size-xl);--menu-item-label-font-size: var(--luzmo-font-size-xl);--menu-item-label-text-to-visual: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-label-inline-edge-to-content: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-top-edge-to-text: var(--luzmo-spacing-2);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-2);--menu-item-text-to-control: var(--luzmo-spacing-4);--menu-item-description-font-size: var(--luzmo-font-size);--menu-section-header-font-size: var(--luzmo-font-size-xl);--menu-section-header-min-width: var(--luzmo-component-height-xl);--menu-item-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-checkmark-size: var(--luzmo-font-size);--menu-item-angle-size: var(--luzmo-font-size-xl);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-back-icon-margin: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}:host([variant=highlight]){--menu-item-highlight-label-content-color: var(--luzmo-primary-inverse-color);--menu-checkmark-display: var(--menu-checkmark-display-hidden);--menu-item-highlight-label-content-color-hover: var( --luzmo-primary-inverse-color );--menu-item-highlight-label-content-color-down: var( --luzmo-primary-inverse-color );--menu-item-highlight-label-content-color-focus: var( --luzmo-primary-inverse-color )}:host([variant=highlight]) ::slotted(luzmo-menu-item[selected]){padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));background-color:var(--luzmo-menu-item-highlight-label-background-color, var(--menu-item-highlight-label-background-color, var(--luzmo-border-color)))}@media (forced-colors: active){:host{--highcontrast-menu-item-background-color-default: ButtonFace;--highcontrast-menu-item-color-default: ButtonText;--highcontrast-menu-item-background-color-focus: Highlight;--highcontrast-menu-item-color-focus: HighlightText;--highcontrast-menu-checkmark-icon-color-default: Highlight;--highcontrast-menu-item-color-disabled: GrayText;--highcontrast-menu-item-focus-indicator-color: Highlight;--highcontrast-menu-item-selected-background-color: Highlight;--highcontrast-menu-item-selected-color: HighlightText}@supports (color: SelectedItem){:host{--highcontrast-menu-item-selected-background-color: SelectedItem;--highcontrast-menu-item-selected-color: SelectedItemText}}}:host{inline-size:auto;inline-size:var(--luzmo-menu-inline-size, auto);box-sizing:border-box;margin:0;padding:0;list-style-type:none;display:inline-block;overflow:auto}:host:lang(ja),:host:lang(ko),:host:lang(zh){--menu-item-label-line-height: var( --luzmo-menu-item-label-line-height-cjk, var(--menu-item-label-line-height-cjk) );--menu-item-description-line-height: var( --luzmo-menu-item-description-line-height-cjk, var(--menu-item-description-line-height-cjk) );--menu-section-header-line-height: var( --luzmo-menu-section-header-line-height-cjk, var(--menu-section-header-line-height-cjk) )}:host([selects]) ::slotted(luzmo-menu-item){--menu-checkmark-display: var(--menu-checkmark-display-hidden);padding-inline-start:var(--luzmo-menu-item-selectable-edge-to-text-not-selected, var(--menu-item-selectable-edge-to-text-not-selected))}:host([selects]) ::slotted(luzmo-menu-item[selected]){--menu-checkmark-display: var(--menu-checkmark-display-shown);padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content))}.luzmo-Menu-backIcon{margin-block:var(--luzmo-menu-back-icon-margin-block, var(--menu-back-icon-margin));margin-inline:var(--luzmo-menu-back-icon-margin-inline, var(--menu-back-icon-margin));fill:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-icon-color-default, var(--menu-section-header-color)));color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-icon-color-default, var(--menu-section-header-color)))}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}.luzmo-Menu-sectionHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-section-header-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));min-inline-size:var(--luzmo-menu-section-header-min-width, var(--menu-section-header-min-width));padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text, var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text, var(--luzmo-menu-item-bottom-edge-to-text, var(--menu-item-bottom-edge-to-text)));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));grid-area:sectionHeadingArea/1/sectionHeadingArea/-1;display:block}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start, 0) var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start, 0) var(--luzmo-menu-back-padding-block-end, 0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-back .luzmo-Menu-sectionHeading{padding:0}.luzmo-Menu-backButton{cursor:pointer;background:none;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--luzmo-indicator-width) solid var(--luzmo-indicator-color);outline-offset:calc((var(--luzmo-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-heading-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));display:block}:host{display:inline-flex;flex-direction:column;width:100%}:host(:focus){outline:none}::slotted(*){flex-shrink:0}";var U=Object.defineProperty,T=Object.getOwnPropertyDescriptor,m=(r,e,t,o)=>{for(var i=o>1?void 0:o?T(e,t):e,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=(o?l(e,t,i):l(i))||i);return o&&i&&U(e,t,i),i};function _(r,e){return!!e&&(r===e||r.contains(e))}class c extends z.SizedMixin(a.LuzmoElement,{noDefaultSize:!0}){constructor(){super(),this.label="",this.ignore=!1,this.value="",this.valueSeparator=",",this.selectedItems=[],this.focusedItemIndex=0,this.focusInItemIndex=0,this._selected=[],this.cacheUpdated=Promise.resolve(),this.childItemSet=new Set,this.selectedItemsMap=new Map,this._hasUpdatedSelectedItemIndex=!1,this._willUpdateItems=!1,this.pointerUpTarget=null,this.descendentOverlays=new Map,this.handleSubmenuClosed=e=>{e.stopPropagation(),e.composedPath()[0].dispatchEvent(new Event("luzmo-menu-submenu-closed",{bubbles:!0,composed:!0}))},this.handleSubmenuOpened=e=>{e.stopPropagation(),e.composedPath()[0].dispatchEvent(new Event("luzmo-menu-submenu-opened",{bubbles:!0,composed:!0}));const o=this.childItems[this.focusedItemIndex];o&&(o.focused=!1);const i=e.composedPath().find(l=>this.childItemSet.has(l));if(!i)return;const n=this.childItems.indexOf(i);this.focusedItemIndex=n,this.focusInItemIndex=n},this.resolveCacheUpdated=()=>{},this.addEventListener("luzmo-menu-item-added-or-updated",this.onSelectableItemAddedOrUpdated),this.addEventListener("luzmo-menu-item-added-or-updated",this.onFocusableItemAddedOrUpdated,{capture:!0}),this.addEventListener("click",this.handleClick),this.addEventListener("pointerup",this.handlePointerup),this.addEventListener("focusin",this.handleFocusin),this.addEventListener("blur",this.handleBlur),this.addEventListener("luzmo-opened",this.handleSubmenuOpened),this.addEventListener("luzmo-closed",this.handleSubmenuClosed)}static get styles(){return[a.r(L)]}get isSubmenu(){return this.slot==="submenu"}get selected(){return this._selected}set selected(e){if(e===this.selected)return;const t=this.selected;this._selected=e,this.selectedItems=[],this.selectedItemsMap.clear(),this.childItems.forEach(o=>{this===o.menuData.selectionRoot&&(o.selected=this.selected.includes(o.value),o.selected&&(this.selectedItems.push(o),this.selectedItemsMap.set(o,!0)))}),this.requestUpdate("selected",t)}get childItems(){return this.cachedChildItems||(this.cachedChildItems=this.updateCachedMenuItems()),this.cachedChildItems}get childRole(){if(this.resolvedRole==="listbox")return"option";switch(this.resolvedSelects){case"single":return"menuitemradio";case"multiple":return"menuitemcheckbox";default:return"menuitem"}}get ownRole(){return"menu"}focus({preventScroll:e}={}){if(this.childItems.every(o=>o.disabled))return;if(this.childItems.some(o=>o.menuData.focusRoot!==this)){super.focus({preventScroll:e});return}this.focusMenuItemByOffset(0),super.focus({preventScroll:e});const t=this.selectedItems[0];t&&!e&&t.scrollIntoView({block:"nearest"})}handleFocusin(e){var i;if(this.childItems.some(n=>n.menuData.focusRoot!==this))return;const t=this.getRootNode().activeElement,o=((i=this.childItems[this.focusedItemIndex])==null?void 0:i.menuData.selectionRoot)||this;if((t!==o||e.target!==this)&&(o.focus({preventScroll:!0}),t&&this.focusedItemIndex===0)){const n=this.childItems.indexOf(t);this.focusMenuItemByOffset(Math.max(n,0))}this.startListeningToKeyboard()}startListeningToKeyboard(){this.addEventListener("keydown",this.handleKeydown)}handleBlur(e){_(this,e.relatedTarget)||(this.stopListeningToKeyboard(),this.childItems.forEach(t=>t.focused=!1),this.removeAttribute("aria-activedescendant"))}stopListeningToKeyboard(){this.removeEventListener("keydown",this.handleKeydown)}selectOrToggleItem(e){const t=this.resolvedSelects,o=new Map(this.selectedItemsMap),i=[...this.selected],n=[...this.selectedItems],l=this.value,d=this.childItems[this.focusedItemIndex];if(d&&(d.focused=!1,d.active=!1),this.focusedItemIndex=this.childItems.indexOf(e),this.forwardFocusVisibleToItem(e),t==="multiple"){this.selectedItemsMap.has(e)?this.selectedItemsMap.delete(e):this.selectedItemsMap.set(e,!0);const h=[],b=[];this.childItemSet.forEach(f=>{f.menuData.selectionRoot===this&&this.selectedItemsMap.has(f)&&(h.push(f.value),b.push(f))}),this._selected=h,this.selectedItems=b,this.value=this.selected.join(this.valueSeparator)}else this.selectedItemsMap.clear(),this.selectedItemsMap.set(e,!0),this.value=e.value,this._selected=[e.value],this.selectedItems=[e];if(!this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0,composed:!0}))){this._selected=i,this.selectedItems=n,this.selectedItemsMap=o,this.value=l;return}if(t==="single"){for(const h of o.keys())h!==e&&(h.selected=!1);e.selected=!0}else t==="multiple"&&(e.selected=!e.selected)}handleKeydown(e){if(e.defaultPrevented)return;const t=this.childItems[this.focusedItemIndex];t&&(t.focused=!0);const{key:o}=e;if(e.shiftKey&&e.target!==this&&this.hasAttribute("tabindex")){this.removeAttribute("tabindex");const i=n=>{!n.shiftKey&&!this.hasAttribute("tabindex")&&(this.tabIndex=0,document.removeEventListener("keyup",i),this.removeEventListener("focusout",i))};document.addEventListener("keyup",i),this.addEventListener("focusout",i)}if(o==="Tab"){this.prepareToCleanUp();return}if(o===" "&&(t!=null&&t.hasSubmenu)){t.openOverlay();return}if(o===" "||o==="Enter"){const i=this.childItems[this.focusedItemIndex];i&&i.menuData.selectionRoot===e.target&&(e.preventDefault(),i.click());return}if(o==="ArrowDown"||o==="ArrowUp"){const i=this.childItems[this.focusedItemIndex];i&&i.menuData.selectionRoot===e.target&&this.navigateWithinMenu(e);return}this.navigateBetweenRelatedMenus(e)}focusMenuItemByOffset(e){const t=e||1,o=this.childItems[this.focusedItemIndex];o&&(o.focused=!1,o.active=o.open),this.focusedItemIndex=(this.childItems.length+this.focusedItemIndex+e)%this.childItems.length;let i=this.childItems[this.focusedItemIndex],n=this.childItems.length;for(;i!=null&&i.disabled&&n;)n-=1,this.focusedItemIndex=(this.childItems.length+this.focusedItemIndex+t)%this.childItems.length,i=this.childItems[this.focusedItemIndex];return i!=null&&i.disabled||this.forwardFocusVisibleToItem(i),i}updateSelectedItemIndex(){let e=0;const t=new Map,o=[],i=[];let n=this.childItems.length;for(;n;){n-=1;const l=this.childItems[n];l.menuData.selectionRoot===this&&((l.selected||!this._hasUpdatedSelectedItemIndex&&this.selected.includes(l.value))&&(e=n,t.set(l,!0),o.unshift(l.value),i.unshift(l)),n!==e&&(l.focused=!1))}i.map((l,d)=>{d>0&&(l.focused=!1)}),this.selectedItemsMap=t,this._selected=o,this.selectedItems=i,this.value=this.selected.join(this.valueSeparator),this.focusedItemIndex=e,this.focusInItemIndex=e}closeDescendentOverlays(){this.descendentOverlays.forEach(e=>{e.open=!1}),this.descendentOverlays=new Map}render(){return this.renderMenuItemSlot()}connectedCallback(){super.connectedCallback(),!this.hasAttribute("role")&&!this.ignore&&this.setAttribute("role",this.ownRole),this.updateComplete.then(()=>this.updateItemFocus())}disconnectedCallback(){this.cachedChildItems=void 0,this.selectedItems=[],this.selectedItemsMap.clear(),this.childItemSet.clear(),this.descendentOverlays=new Map,super.disconnectedCallback()}handleDescendentOverlayOpened(e){const t=e.composedPath()[0];t.overlayElement&&this.descendentOverlays.set(t.overlayElement,t.overlayElement)}handleDescendentOverlayClosed(e){const t=e.composedPath()[0];t.overlayElement&&this.descendentOverlays.delete(t.overlayElement)}navigateWithinMenu(e){const{key:t}=e,o=this.childItems[this.focusedItemIndex],i=t==="ArrowDown"?1:-1,n=this.focusMenuItemByOffset(i);n!==o&&(e.preventDefault(),e.stopPropagation(),n.scrollIntoView({block:"nearest"}))}navigateBetweenRelatedMenus(e){const{key:t}=e;e.stopPropagation();const o=this.isLTR&&t==="ArrowRight"||!this.isLTR&&t==="ArrowLeft",i=this.isLTR&&t==="ArrowLeft"||!this.isLTR&&t==="ArrowRight";if(o){const n=this.childItems[this.focusedItemIndex];n!=null&&n.hasSubmenu&&n.openOverlay()}else i&&this.isSubmenu&&(this.dispatchEvent(new Event("close",{bubbles:!0})),this.updateSelectedItemIndex())}renderMenuItemSlot(){return a.x`
|
|
19
19
|
<slot
|
|
20
20
|
@luzmo-menu-submenu-opened=${this.handleDescendentOverlayOpened}
|
|
21
21
|
@luzmo-menu-submenu-closed=${this.handleDescendentOverlayClosed}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
@luzmo-menu-item-added-or-updated=${{handleEvent:t=>{t.clear(t.item)},capture:!0}}
|
|
48
48
|
@focusin=${t=>t.stopPropagation()}
|
|
49
49
|
></slot>
|
|
50
|
-
`;return this.hasSubmenu?(this.dependencyManager.add("luzmo-overlay"),this.dependencyManager.add("luzmo-popover"),Promise.resolve().then(()=>require("../overlay-
|
|
50
|
+
`;return this.hasSubmenu?(this.dependencyManager.add("luzmo-overlay"),this.dependencyManager.add("luzmo-popover"),Promise.resolve().then(()=>require("../overlay-DAVu8dy8.cjs")).then(t=>t.overlay),Promise.resolve().then(()=>require("../popover-DBQ1YYW6.cjs")),a.x`
|
|
51
51
|
<luzmo-overlay
|
|
52
52
|
.triggerElement=${this}
|
|
53
53
|
?disabled=${!this.hasSubmenu}
|
package/components/menu/index.js
CHANGED
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a as x, r as f, x as d, n as a, E as k } from "../base-
|
|
18
|
+
import { a as x, r as f, x as d, n as a, E as k } from "../base-DroC2Znx.js";
|
|
19
19
|
import { e as g } from "../query-D_KR_GUc.js";
|
|
20
|
-
import { S as I } from "../sized-mixin-
|
|
20
|
+
import { S as I } from "../sized-mixin-Y_QuYtjJ.js";
|
|
21
21
|
import { s as M } from "../divider.module-DwOuLGU3.js";
|
|
22
|
-
import { r as A } from "../state-
|
|
22
|
+
import { r as A } from "../state-BF7jO1DT.js";
|
|
23
23
|
import { n as C } from "../query-assigned-nodes-C76XVPWY.js";
|
|
24
24
|
import { r as w } from "../random-id-ByCz1xaq.js";
|
|
25
25
|
import { s as D } from "../mutation-controller-DH7YOCyj.js";
|
|
26
|
-
import { F as R } from "../focusable-
|
|
27
|
-
import { L as O } from "../like-anchor-
|
|
26
|
+
import { F as R } from "../focusable-Dy9nRVST.js";
|
|
27
|
+
import { L as O } from "../like-anchor-CkIPVvtI.js";
|
|
28
28
|
import { O as P } from "../observe-slot-presence-CmVi0zTc.js";
|
|
29
|
-
import { O as L } from "../observe-slot-text-
|
|
29
|
+
import { O as L } from "../observe-slot-text-BMloiRX5.js";
|
|
30
30
|
import { D as U } from "../dependency-manger-CEXvGQUV.js";
|
|
31
31
|
import { luzmoIcon as y, luzmoAngleRight as T, luzmoCheck as _ } from "@luzmo/icons";
|
|
32
32
|
import { S as $ } from "../slottable-request-event-DggLA4Rx.js";
|
|
@@ -688,7 +688,7 @@ class s extends O(
|
|
|
688
688
|
@focusin=${(t) => t.stopPropagation()}
|
|
689
689
|
></slot>
|
|
690
690
|
`;
|
|
691
|
-
return this.hasSubmenu ? (this.dependencyManager.add("luzmo-overlay"), this.dependencyManager.add("luzmo-popover"), import("../overlay-
|
|
691
|
+
return this.hasSubmenu ? (this.dependencyManager.add("luzmo-overlay"), this.dependencyManager.add("luzmo-popover"), import("../overlay-D4oZnKKd.js").then((t) => t.f), import("../popover-Cx4MhaoE.js"), d`
|
|
692
692
|
<luzmo-overlay
|
|
693
693
|
.triggerElement=${this}
|
|
694
694
|
?disabled=${!this.hasSubmenu}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../base-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../base-CTSOJw6c.cjs"),u=require("../sized-mixin-CDhX3fJn.cjs");require("../text-field/index.cjs");const p=require("../manage-help-text-DGwDhPtP.cjs"),h=":host{display:inline-block}:host luzmo-text-field{width:100%}";var d=Object.defineProperty,l=(n,i,r,g)=>{for(var a=void 0,o=n.length-1,s;o>=0;o--)(s=n[o])&&(a=s(i,r,a)||a);return a&&d(i,r,a),a};class t extends p.ManageHelpText(u.SizedMixin(e.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[e.r(h)]}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 e.x`
|
|
19
19
|
<luzmo-text-field
|
|
20
20
|
.value=${this._localizedValue}
|
|
21
21
|
.size=${this.size}
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a as m, r as c, x as d, n as e } from "../base-
|
|
19
|
-
import { S as p } from "../sized-mixin-
|
|
18
|
+
import { a as m, r as c, x as d, n as e } from "../base-DroC2Znx.js";
|
|
19
|
+
import { S as p } from "../sized-mixin-Y_QuYtjJ.js";
|
|
20
20
|
import "../text-field/index.js";
|
|
21
|
-
import { M as z } from "../manage-help-text-
|
|
21
|
+
import { M as z } from "../manage-help-text-BzyCpgqN.js";
|
|
22
22
|
const s = () => {
|
|
23
23
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
24
24
|
const r = document.createElement("style");
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../base-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../base-CTSOJw6c.cjs"),f=require("../state-Bq6oXknJ.cjs"),g=require("../query-BL-TJj7K.cjs"),S=require("../class-map-DuvNig0r.cjs"),p=require("../if-defined-D7nbLM5n.cjs"),$=require("../style-map-Cp3I-AN3.cjs"),w=require("../focusable-BW4I5ppi.cjs"),I=require("../dependency-manger-C5HCkMMB.cjs"),d=require("../strategies-D_cIzAJE.cjs"),C=require("../pending-state-CkibRs0D.cjs"),E=require("../sized-mixin-CDhX3fJn.cjs"),u=require("@luzmo/icons");require("../menu/index.cjs");require("../overlay/index.cjs");require("../progress-circle/index.cjs");require("../tooltip/index.cjs");var x=Object.defineProperty,L=Object.getOwnPropertyDescriptor,l=(c,e,t,i)=>{for(var o=i>1?void 0:i?L(e,t):e,a=c.length-1,r;a>=0;a--)(r=c[a])&&(o=(i?r(e,t,o):r(o))||o);return i&&o&&x(e,t,o),o};const q=()=>s.x`
|
|
19
19
|
<div class="disclosure-icon icon">
|
|
20
20
|
${u.luzmoIcon(u.luzmoAngleDown,{className:"indicator"})}
|
|
21
21
|
</div>
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { x as u, E as c, B as S, r as $, n as a } from "../base-
|
|
19
|
-
import { r as m } from "../state-
|
|
18
|
+
import { x as u, E as c, B as S, r as $, n as a } from "../base-DroC2Znx.js";
|
|
19
|
+
import { r as m } from "../state-BF7jO1DT.js";
|
|
20
20
|
import { e as f } from "../query-D_KR_GUc.js";
|
|
21
|
-
import { e as M } from "../class-map-
|
|
22
|
-
import { o as p } from "../if-defined-
|
|
23
|
-
import { o as I } from "../style-map-
|
|
24
|
-
import { F as C } from "../focusable-
|
|
21
|
+
import { e as M } from "../class-map-CjcRhurN.js";
|
|
22
|
+
import { o as p } from "../if-defined-CUCu7LSf.js";
|
|
23
|
+
import { o as I } from "../style-map-DqptyE0A.js";
|
|
24
|
+
import { F as C } from "../focusable-Dy9nRVST.js";
|
|
25
25
|
import { D as E } from "../dependency-manger-CEXvGQUV.js";
|
|
26
26
|
import { M as L, I as k, s as v, p as A } from "../strategies-CzfvQU_H.js";
|
|
27
|
-
import { P as D } from "../pending-state-
|
|
28
|
-
import { S as F } from "../sized-mixin-
|
|
27
|
+
import { P as D } from "../pending-state-xRhujC3J.js";
|
|
28
|
+
import { S as F } from "../sized-mixin-Y_QuYtjJ.js";
|
|
29
29
|
import { luzmoIcon as g, luzmoAngleDown as _, luzmoAlert as B } from "@luzmo/icons";
|
|
30
30
|
import "../menu/index.js";
|
|
31
31
|
import "../overlay/index.js";
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../NumberFormatter-DewVDY5w.cjs"),g=require("../NumberParser-Dik4a0h-.cjs"),h=require("@luzmo/icons"),s=require("../base-B7Pfl2if.cjs"),x=require("../query-BL-TJj7K.cjs"),c=require("../platform-BiXhwqk3.cjs"),z=require("../language-resolution-DJzmyzZq.cjs"),y=require("../streaming-listener-KVex1WWB.cjs");require("../infield-button/index.cjs");const k=require("../text-field-mxJCYues.cjs"),F='#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-negative-color);--stepper-border-color-hover-invalid: var(--luzmo-negative-color-hover);--stepper-border-color-focus-invalid: var(--luzmo-negative-color-focus);--stepper-border-color-focus-hover-invalid: var(--luzmo-negative-color-focus);--stepper-border-color-keyboard-focus-invalid: var( --luzmo-negative-color-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(--luzmo-border-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 C=Object.defineProperty,_=Object.getOwnPropertyDescriptor,l=(m,e,t,o)=>{for(var r=o>1?void 0:o?_(e,t):e,i=m.length-1,u;i>=0;i--)(u=m[i])&&(r=(o?u(e,t,r):u(r))||r);return o&&r&&C(e,t,r),r};const q=5,N=100,b="-",w={"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 a extends k.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 z.LanguageResolutionController(this),this.wasIndeterminate=!1,this.hasRecentlyReceivedPointerDown=!1,this.applyFocusElementLabel=e=>{this.appliedLabel=e},this.isComposing=!1}static get styles(){return[...super.styles,s.r(F)]}set value(e){const t=this.validateInput(e);if(t===this.value)return;this.lastCommitedValue=t;const o=this._value;this._value=t,this.requestUpdate("value",o)}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=>w[i]||i).join("");const o=[...this.valueBeforeFocus].filter(i=>this.decimalsChars.has(i)),r=new Set(o);if(c.isIOS()&&this.inputElement.inputMode==="decimal"&&t!==this.valueBeforeFocus){const u=this.numberFormatter.formatToParts(1000.1).find(n=>n.type==="decimal").value;for(const n of r)!(n===u)&&!this.isIntentDecimal&&(t=t.replaceAll(new RegExp(n,"g"),""));let p=!1;const d=[...t];for(let n=d.length-1;n>=0;n--){const v=d[n];this.decimalsChars.has(v)&&(p?d[n]="":(d[n]=u,p=!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(),o=this.buttons.children[1].getBoundingClientRect();this.findChange=r=>{r.clientX>=t.x&&r.clientY>=t.y&&r.clientX<=t.x+t.width&&r.clientY<=t.y+t.height?this.change=i=>this.increment(i.shiftKey?this.stepModifier:1):r.clientX>=o.x&&r.clientY>=o.y&&r.clientX<=o.x+o.width&&r.clientY<=o.y+o.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%q===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 o=this.value;o+=e*this._step,Number.isNaN(this.value)&&(o=t),o=this.valueWithLimits(o),this.requestUpdate(),this._value=this.validateInput(o),this.inputElement.value=this.numberFormatter.format(o),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()},N)),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?b:this._trackingValue,this.isComposing=!1)}e.stopPropagation();return}this.indeterminate&&(this.wasIndeterminate=!0,this.indeterminateValue=this.value,this.inputElement.value=this.inputElement.value.replace(b,"")),e.data&&this.decimalsChars.has(e.data)&&(this.isIntentDecimal=!0);const{value:t,selectionStart:o}=this.inputElement,r=[...t].map(d=>w[d]||d).join("");if(this.numberParser.isValidPartialNumber(r)){this.lastCommitedValue=this.lastCommitedValue??this.value;const d=this.convertValueToNumber(r);!r&&this.indeterminateValue?(this.indeterminate=!0,this._value=this.indeterminateValue):(this.indeterminate=!1,this._value=this.validateInput(d)),this._trackingValue=r,this.inputElement.value=r,this.inputElement.setSelectionRange(o,o);return}this.inputElement.value=this.indeterminate?b:this._trackingValue,e.stopPropagation();const i=r.length,u=this._trackingValue.length,p=(o||i)-(i-u);this.inputElement.setSelectionRange(p,p)}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 o=this.min===void 0?0:this.min,r=Number.parseFloat(this.valueFormatter.format((e-o)%this.step));if(r===0||(Math.round(r/this.step)===1?e+=this.step-r:e-=r),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?"":b;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:o,...r}=this.formatOptions;e!=="unit"&&(r.style=e),this._numberFormatterFocused=new f.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.languageResolver.language,r);try{this._numberFormatter=new f.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(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 f.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5("en",{useGrouping:!1,maximumFractionDigits:e})}return this._valueFormatter}get numberParser(){if(!this._numberParser||!this._numberParserFocused){const{style:e,unit:t,unitDisplay:o,...r}=this.formatOptions;e!=="unit"&&(r.style=e),this._numberParserFocused=new g.$6c7bd7858deea686$export$cd11ab140839f11d(this.languageResolver.language,r);try{this._numberParser=new g.$6c7bd7858deea686$export$cd11ab140839f11d(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",s.x`
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../NumberFormatter-DewVDY5w.cjs"),g=require("../NumberParser-Dik4a0h-.cjs"),h=require("@luzmo/icons"),s=require("../base-CTSOJw6c.cjs"),x=require("../query-BL-TJj7K.cjs"),c=require("../platform-BiXhwqk3.cjs"),z=require("../language-resolution-DJzmyzZq.cjs"),y=require("../streaming-listener-Cm6s-WvF.cjs");require("../infield-button/index.cjs");const k=require("../text-field-CThL0T_y.cjs"),F='#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-negative-color);--stepper-border-color-hover-invalid: var(--luzmo-negative-color-hover);--stepper-border-color-focus-invalid: var(--luzmo-negative-color-focus);--stepper-border-color-focus-hover-invalid: var(--luzmo-negative-color-focus);--stepper-border-color-keyboard-focus-invalid: var( --luzmo-negative-color-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(--luzmo-border-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 C=Object.defineProperty,_=Object.getOwnPropertyDescriptor,l=(m,e,t,o)=>{for(var r=o>1?void 0:o?_(e,t):e,i=m.length-1,u;i>=0;i--)(u=m[i])&&(r=(o?u(e,t,r):u(r))||r);return o&&r&&C(e,t,r),r};const q=5,N=100,b="-",w={"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 a extends k.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 z.LanguageResolutionController(this),this.wasIndeterminate=!1,this.hasRecentlyReceivedPointerDown=!1,this.applyFocusElementLabel=e=>{this.appliedLabel=e},this.isComposing=!1}static get styles(){return[...super.styles,s.r(F)]}set value(e){const t=this.validateInput(e);if(t===this.value)return;this.lastCommitedValue=t;const o=this._value;this._value=t,this.requestUpdate("value",o)}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=>w[i]||i).join("");const o=[...this.valueBeforeFocus].filter(i=>this.decimalsChars.has(i)),r=new Set(o);if(c.isIOS()&&this.inputElement.inputMode==="decimal"&&t!==this.valueBeforeFocus){const u=this.numberFormatter.formatToParts(1000.1).find(n=>n.type==="decimal").value;for(const n of r)!(n===u)&&!this.isIntentDecimal&&(t=t.replaceAll(new RegExp(n,"g"),""));let p=!1;const d=[...t];for(let n=d.length-1;n>=0;n--){const v=d[n];this.decimalsChars.has(v)&&(p?d[n]="":(d[n]=u,p=!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(),o=this.buttons.children[1].getBoundingClientRect();this.findChange=r=>{r.clientX>=t.x&&r.clientY>=t.y&&r.clientX<=t.x+t.width&&r.clientY<=t.y+t.height?this.change=i=>this.increment(i.shiftKey?this.stepModifier:1):r.clientX>=o.x&&r.clientY>=o.y&&r.clientX<=o.x+o.width&&r.clientY<=o.y+o.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%q===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 o=this.value;o+=e*this._step,Number.isNaN(this.value)&&(o=t),o=this.valueWithLimits(o),this.requestUpdate(),this._value=this.validateInput(o),this.inputElement.value=this.numberFormatter.format(o),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()},N)),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?b:this._trackingValue,this.isComposing=!1)}e.stopPropagation();return}this.indeterminate&&(this.wasIndeterminate=!0,this.indeterminateValue=this.value,this.inputElement.value=this.inputElement.value.replace(b,"")),e.data&&this.decimalsChars.has(e.data)&&(this.isIntentDecimal=!0);const{value:t,selectionStart:o}=this.inputElement,r=[...t].map(d=>w[d]||d).join("");if(this.numberParser.isValidPartialNumber(r)){this.lastCommitedValue=this.lastCommitedValue??this.value;const d=this.convertValueToNumber(r);!r&&this.indeterminateValue?(this.indeterminate=!0,this._value=this.indeterminateValue):(this.indeterminate=!1,this._value=this.validateInput(d)),this._trackingValue=r,this.inputElement.value=r,this.inputElement.setSelectionRange(o,o);return}this.inputElement.value=this.indeterminate?b:this._trackingValue,e.stopPropagation();const i=r.length,u=this._trackingValue.length,p=(o||i)-(i-u);this.inputElement.setSelectionRange(p,p)}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 o=this.min===void 0?0:this.min,r=Number.parseFloat(this.valueFormatter.format((e-o)%this.step));if(r===0||(Math.round(r/this.step)===1?e+=this.step-r:e-=r),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?"":b;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:o,...r}=this.formatOptions;e!=="unit"&&(r.style=e),this._numberFormatterFocused=new f.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.languageResolver.language,r);try{this._numberFormatter=new f.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(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 f.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5("en",{useGrouping:!1,maximumFractionDigits:e})}return this._valueFormatter}get numberParser(){if(!this._numberParser||!this._numberParserFocused){const{style:e,unit:t,unitDisplay:o,...r}=this.formatOptions;e!=="unit"&&(r.style=e),this._numberParserFocused=new g.$6c7bd7858deea686$export$cd11ab140839f11d(this.languageResolver.language,r);try{this._numberParser=new g.$6c7bd7858deea686$export$cd11ab140839f11d(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",s.x`
|
|
19
19
|
${super.renderField()}
|
|
20
20
|
${this.hideStepper?s.E:s.x`
|
|
21
21
|
<span
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
import { $ as b } from "../NumberFormatter-DgOUVrge.js";
|
|
19
19
|
import { $ as f } from "../NumberParser-ci9J5EKv.js";
|
|
20
20
|
import { luzmoIcon as v, luzmoAngleUp as y, luzmoAngleDown as k } from "@luzmo/icons";
|
|
21
|
-
import { r as C, E as F, x as z, n } from "../base-
|
|
21
|
+
import { r as C, E as F, x as z, n } from "../base-DroC2Znx.js";
|
|
22
22
|
import { e as _ } from "../query-D_KR_GUc.js";
|
|
23
23
|
import { c as g, a as V, j as N } from "../platform-BM-uMWpX.js";
|
|
24
24
|
import { L as P, l as E } from "../language-resolution-8yZa5r_P.js";
|
|
25
|
-
import { s as q } from "../streaming-listener-
|
|
25
|
+
import { s as q } from "../streaming-listener-Dxbr_Jiv.js";
|
|
26
26
|
import "../infield-button/index.js";
|
|
27
|
-
import { a as S } from "../text-field-
|
|
27
|
+
import { a as S } from "../text-field-DWC0tpq4.js";
|
|
28
28
|
const w = () => {
|
|
29
29
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
30
30
|
const p = document.createElement("style");
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
18
|
import { s as m } from "./mutation-controller-DH7YOCyj.js";
|
|
19
|
-
import { n as x } from "./base-
|
|
19
|
+
import { n as x } from "./base-DroC2Znx.js";
|
|
20
20
|
import { n as b } from "./query-assigned-nodes-C76XVPWY.js";
|
|
21
21
|
var g = Object.defineProperty, p = (d, n, i, f) => {
|
|
22
22
|
for (var t = void 0, o = d.length - 1, r; o >= 0; o--)
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";const b=require("./mutation-controller-DkOMCW-c.cjs"),g=require("./base-
|
|
18
|
+
"use strict";const b=require("./mutation-controller-DkOMCW-c.cjs"),g=require("./base-CTSOJw6c.cjs"),x=require("./query-assigned-nodes-BcKWmGzy.cjs");var m=Object.defineProperty,h=(d,n,i,u)=>{for(var t=void 0,r=d.length-1,o;r>=0;r--)(o=d[r])&&(t=o(n,i,t)||t);return t&&m(n,i,t),t};const c=Symbol("assignedNodes");function v(d,n,i=[]){var u,t;const r=f=>e=>f.matches(e);class o extends(t=d,u=c,t){constructor(...e){super(e),this.slotHasContent=!1,new b.s(this,{config:{characterData:!0,subtree:!0},callback:l=>{for(const s of l)if(s.type==="characterData"){this.manageTextObservedSlot();return}}})}manageTextObservedSlot(){if(!this[c])return;const e=[...this[c]].filter(l=>{const s=l;return s.tagName?!i.some(r(s)):s.textContent?s.textContent.trim():!1});this.slotHasContent=e.length>0}update(e){if(!this.hasUpdated){const{childNodes:l}=this,s=[...l].filter(p=>{const a=p;return a.tagName?i.some(r(a))?!1:n?a.getAttribute("slot")===n:!a.hasAttribute("slot"):a.textContent?a.textContent.trim():!1});this.slotHasContent=s.length>0}super.update(e)}firstUpdated(e){super.firstUpdated(e),this.updateComplete.then(()=>{this.manageTextObservedSlot()})}}return h([g.n({type:Boolean,attribute:!1})],o.prototype,"slotHasContent"),h([x.n({slot:n,flatten:!0})],o.prototype,u),o}exports.ObserveSlotText=v;
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../overlay-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../overlay-DAVu8dy8.cjs"),o=require("../base-CTSOJw6c.cjs"),p=require("../state-Bq6oXknJ.cjs"),d=require("../query-BL-TJj7K.cjs"),f=require("../directive-C7oCP5Bh.cjs"),O=require("../async-directive-B0s_zDWg.cjs"),u=require("../slottable-request-event-BfUUt1Mh.cjs"),S=":host([disabled]) ::slotted([slot=trigger]){pointer-events:none}slot[name=longpress-describedby-descriptor]{display:none}";var $=Object.defineProperty,l=(c,e,t,r)=>{for(var i=void 0,a=c.length-1,h;a>=0;a--)(h=c[a])&&(i=h(e,t,i)||i);return i&&$(e,t,i),i};class n extends o.LuzmoElement{constructor(){super(...arguments),this.content="click hover longpress",this.offset=6,this.disabled=!1,this.receivesFocus="auto",this.clickContent=[],this.longpressContent=[],this.hoverContent=[],this.targetContent=[]}static get styles(){return[o.r(S)]}getAssignedElementsFromSlot(e){return e.assignedElements({flatten:!0})}handleTriggerContent(e){this.targetContent=this.getAssignedElementsFromSlot(e.target)}handleSlotContent(e){switch(e.target.name){case"click-content":{this.clickContent=this.getAssignedElementsFromSlot(e.target);break}case"longpress-content":{this.longpressContent=this.getAssignedElementsFromSlot(e.target);break}case"hover-content":{this.hoverContent=this.getAssignedElementsFromSlot(e.target);break}}}handleBeforetoggle(e){const{target:t}=e;let r;if(t===this.clickOverlayElement)r="click";else if(t===this.longpressOverlayElement)r="longpress";else if(t===this.hoverOverlayElement)r="hover";else return;e.newState==="open"?this.open=r:this.open===r&&(this.open=void 0)}update(e){var t,r,i,a,h,g;e.has("clickContent")&&(this.clickPlacement=((t=this.clickContent[0])==null?void 0:t.getAttribute("placement"))||((r=this.clickContent[0])==null?void 0:r.getAttribute("direction"))||void 0),e.has("hoverContent")&&(this.hoverPlacement=((i=this.hoverContent[0])==null?void 0:i.getAttribute("placement"))||((a=this.hoverContent[0])==null?void 0:a.getAttribute("direction"))||void 0),e.has("longpressContent")&&(this.longpressPlacement=((h=this.longpressContent[0])==null?void 0:h.getAttribute("placement"))||((g=this.longpressContent[0])==null?void 0:g.getAttribute("direction"))||void 0),super.update(e)}renderSlot(e){return o.x`
|
|
19
19
|
<slot name=${e} @slotchange=${this.handleSlotContent}></slot>
|
|
20
|
-
`}renderClickOverlay(){Promise.resolve().then(()=>require("../overlay-
|
|
20
|
+
`}renderClickOverlay(){Promise.resolve().then(()=>require("../overlay-DAVu8dy8.cjs")).then(t=>t.overlay);const e=this.renderSlot("click-content");return this.clickContent.length===0?e:o.x`
|
|
21
21
|
<luzmo-overlay
|
|
22
22
|
id="click-overlay"
|
|
23
23
|
?disabled=${this.disabled||this.clickContent.length===0}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
>
|
|
33
33
|
${e}
|
|
34
34
|
</luzmo-overlay>
|
|
35
|
-
`}renderHoverOverlay(){Promise.resolve().then(()=>require("../overlay-
|
|
35
|
+
`}renderHoverOverlay(){Promise.resolve().then(()=>require("../overlay-DAVu8dy8.cjs")).then(t=>t.overlay);const e=this.renderSlot("hover-content");return this.hoverContent.length===0?e:o.x`
|
|
36
36
|
<luzmo-overlay
|
|
37
37
|
id="hover-overlay"
|
|
38
38
|
?open=${this.open==="hover"&&this.hoverContent.length>0}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
>
|
|
48
48
|
${e}
|
|
49
49
|
</luzmo-overlay>
|
|
50
|
-
`}renderLongpressOverlay(){Promise.resolve().then(()=>require("../overlay-
|
|
50
|
+
`}renderLongpressOverlay(){Promise.resolve().then(()=>require("../overlay-DAVu8dy8.cjs")).then(t=>t.overlay);const e=this.renderSlot("longpress-content");return this.longpressContent.length===0?e:o.x`
|
|
51
51
|
<luzmo-overlay
|
|
52
52
|
id="longpress-overlay"
|
|
53
53
|
?disabled=${this.disabled||this.longpressContent.length===0}
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { e as f, I as O, s as $, L as S } from "../overlay-
|
|
19
|
-
import { C as G, H as M, b as J, c as K, d as Q, P as W, V as X, g as Y, a as Z, n as ee, o as te, p as oe } from "../overlay-
|
|
20
|
-
import { a as E, r as w, x as c, n as u, E as z, B as b } from "../base-
|
|
21
|
-
import { r as h } from "../state-
|
|
18
|
+
import { e as f, I as O, s as $, L as S } from "../overlay-D4oZnKKd.js";
|
|
19
|
+
import { C as G, H as M, b as J, c as K, d as Q, P as W, V as X, g as Y, a as Z, n as ee, o as te, p as oe } from "../overlay-D4oZnKKd.js";
|
|
20
|
+
import { a as E, r as w, x as c, n as u, E as z, B as b } from "../base-DroC2Znx.js";
|
|
21
|
+
import { r as h } from "../state-BF7jO1DT.js";
|
|
22
22
|
import { e as g } from "../query-D_KR_GUc.js";
|
|
23
23
|
import { e as v } from "../directive-oAbCiebi.js";
|
|
24
|
-
import { f as A } from "../async-directive-
|
|
24
|
+
import { f as A } from "../async-directive-C0KryStG.js";
|
|
25
25
|
import { r as y } from "../slottable-request-event-DggLA4Rx.js";
|
|
26
26
|
import { S as le } from "../slottable-request-event-DggLA4Rx.js";
|
|
27
27
|
const k = () => {
|
|
@@ -89,7 +89,7 @@ class l extends E {
|
|
|
89
89
|
`;
|
|
90
90
|
}
|
|
91
91
|
renderClickOverlay() {
|
|
92
|
-
import("../overlay-
|
|
92
|
+
import("../overlay-D4oZnKKd.js").then((t) => t.f);
|
|
93
93
|
const e = this.renderSlot("click-content");
|
|
94
94
|
return this.clickContent.length === 0 ? e : c`
|
|
95
95
|
<luzmo-overlay
|
|
@@ -109,7 +109,7 @@ class l extends E {
|
|
|
109
109
|
`;
|
|
110
110
|
}
|
|
111
111
|
renderHoverOverlay() {
|
|
112
|
-
import("../overlay-
|
|
112
|
+
import("../overlay-D4oZnKKd.js").then((t) => t.f);
|
|
113
113
|
const e = this.renderSlot("hover-content");
|
|
114
114
|
return this.hoverContent.length === 0 ? e : c`
|
|
115
115
|
<luzmo-overlay
|
|
@@ -129,7 +129,7 @@ class l extends E {
|
|
|
129
129
|
`;
|
|
130
130
|
}
|
|
131
131
|
renderLongpressOverlay() {
|
|
132
|
-
import("../overlay-
|
|
132
|
+
import("../overlay-D4oZnKKd.js").then((t) => t.f);
|
|
133
133
|
const e = this.renderSlot("longpress-content");
|
|
134
134
|
return this.longpressContent.length === 0 ? e : c`
|
|
135
135
|
<luzmo-overlay
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a as ue, r as pe, x as ht, n as z } from "./base-
|
|
19
|
-
import { r as fe } from "./state-
|
|
18
|
+
import { a as ue, r as pe, x as ht, n as z } from "./base-DroC2Znx.js";
|
|
19
|
+
import { r as fe } from "./state-BF7jO1DT.js";
|
|
20
20
|
import { e as te } from "./query-D_KR_GUc.js";
|
|
21
21
|
import { o as me } from "./query-assigned-elements-DjfhL1cl.js";
|
|
22
|
-
import { o as Ct } from "./if-defined-
|
|
23
|
-
import { o as Ut } from "./style-map-
|
|
22
|
+
import { o as Ct } from "./if-defined-CUCu7LSf.js";
|
|
23
|
+
import { o as Ut } from "./style-map-DqptyE0A.js";
|
|
24
24
|
import { r as St } from "./random-id-ByCz1xaq.js";
|
|
25
25
|
import { E as ge, e as ve } from "./element-resolution-FCUT-wql.js";
|
|
26
26
|
import { u as lt } from "./focusable-selectors-B4YgbghQ.js";
|