@luzmo/lucero 1.0.1-alpha.18 → 1.0.1-alpha.19
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/NumberFormatter-DewVDY5w.cjs +18 -0
- package/components/NumberFormatter-DgOUVrge.js +136 -0
- package/components/NumberParser-Dik4a0h-.cjs +18 -0
- package/components/NumberParser-ci9J5EKv.js +173 -0
- package/components/accordion/index.cjs +6 -183
- package/components/accordion/index.js +88 -136
- package/components/action-bar/index.cjs +4 -85
- package/components/action-bar/index.js +50 -72
- package/components/action-button/index.cjs +3 -205
- package/components/action-button/index.js +93 -167
- package/components/action-group/index.cjs +1 -7
- package/components/action-group/index.js +8 -12
- package/components/action-group-C54IxNZk.cjs +20 -0
- package/components/action-group-C9dsPJg-.js +258 -0
- package/components/action-menu/index.cjs +11 -91
- package/components/action-menu/index.js +47 -66
- package/components/async-directive-BwIAw5tB.js +82 -0
- package/components/async-directive-DLz6JB0v.cjs +22 -0
- package/components/avatar/index.cjs +3 -63
- package/components/avatar/index.js +42 -54
- package/components/{focusable-selectors-D0t_5P7C.cjs → base-BjTwmyRF.cjs} +5 -16
- package/components/base-CFWO09N1.js +684 -0
- package/components/base-Cy0MQrPT.cjs +40 -0
- package/components/base-D76d76ww.js +26 -0
- package/components/button/index.cjs +2 -134
- package/components/button/index.js +72 -106
- package/components/button-base-B8bWcklV.js +144 -0
- package/components/button-base-tf95Lyl4.cjs +25 -0
- package/components/button-group/index.cjs +1 -45
- package/components/button-group/index.js +25 -37
- package/components/calendar/index.cjs +1 -632
- package/components/calendar/index.js +7 -637
- package/components/checkbox/index.cjs +4 -111
- package/components/checkbox/index.js +53 -98
- package/components/checkbox-mixin-BOTvuPEu.js +70 -0
- package/components/checkbox-mixin-BVPpXtsq.cjs +27 -0
- package/components/class-map-CGfNk3Ee.js +51 -0
- package/components/class-map-D-Y-hsN5.cjs +22 -0
- package/components/clear-button-CuPbWwZY.cjs +18 -0
- package/components/clear-button-DzZ5ulBW.js +53 -0
- package/components/close-button-BTo4yrFR.cjs +18 -0
- package/components/close-button-CuQdsez5.js +51 -0
- package/components/color-area/index.cjs +13 -440
- package/components/color-area/index.js +187 -322
- package/components/color-controller-B0uX6Zso.js +3230 -0
- package/components/color-controller-CoUL5f9K.cjs +18 -0
- package/components/color-field/index.cjs +2 -95
- package/components/color-field/index.js +41 -77
- package/components/color-handle/index.cjs +3 -64
- package/components/color-handle/index.js +37 -58
- package/components/color-loupe/index.cjs +1 -7
- package/components/color-loupe/index.js +8 -12
- package/components/color-loupe-CrM2DVY3.cjs +56 -0
- package/components/color-loupe-DmQe3SpP.js +81 -0
- package/components/color-menu/index.cjs +12 -217
- package/components/color-menu/index.js +93 -187
- package/components/color-palette/index.cjs +1 -89
- package/components/color-palette/index.js +51 -78
- package/components/color-palette-group/index.cjs +3 -259
- package/components/color-palette-group/index.js +105 -193
- package/components/color-picker/index.cjs +6 -114
- package/components/color-picker/index.js +72 -92
- package/components/color-slider/index.cjs +1 -585
- package/components/color-slider/index.js +7 -590
- package/components/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
- package/components/condition-attribute-with-id-Dv4lSRbe.js +31 -0
- package/components/date-time-picker/index.cjs +31 -1357
- package/components/date-time-picker/index.js +637 -951
- package/components/{dependency-manger-XHpQjFgK.js → dependency-manger-CO-VPlqq.js} +14 -24
- package/components/dependency-manger-uthev62E.cjs +18 -0
- package/components/directive-C7oCP5Bh.cjs +22 -0
- package/components/directive-helpers-D4KMv2dC.js +62 -0
- package/components/directive-helpers-t-TVum7J.cjs +22 -0
- package/components/{slottable-request-event-CANixJnR.cjs → directive-oAbCiebi.js} +25 -14
- package/components/divider/index.cjs +1 -54
- package/components/divider/index.js +30 -49
- package/components/divider.module-DDvBo9zo.cjs +18 -0
- package/components/divider.module-DoQWQEIJ.js +21 -0
- package/components/element-resolution-BvRLGqIU.cjs +18 -0
- package/components/element-resolution-FCUT-wql.js +91 -0
- package/components/field-group/index.cjs +1 -7
- package/components/field-group/index.js +8 -12
- package/components/field-group-5WQMBOk4.cjs +23 -0
- package/components/field-group-D4B0IOdA.js +66 -0
- package/components/field-label/index.cjs +1 -7
- package/components/field-label/index.js +8 -12
- package/components/field-label-DxmPiC5p.js +106 -0
- package/components/field-label-Dz9kisdW.cjs +25 -0
- package/components/flow-D-0MTYCm.js +527 -0
- package/components/flow-DM3dNAKs.cjs +30 -0
- package/components/focus-group-DHeTq18L.js +218 -0
- package/components/focus-group-DnxZUBhQ.cjs +18 -0
- package/components/focus-visible-BvScGDCE.js +74 -0
- package/components/focus-visible-D4BXb5RB.cjs +18 -0
- package/components/focusable-B_KwfEec.cjs +18 -0
- package/components/focusable-C5JjRZmT.js +153 -0
- package/components/{focusable-selectors-IltOAOd9.js → focusable-selectors-B4YgbghQ.js} +4 -7
- package/components/focusable-selectors-BgFlyFcY.cjs +18 -0
- package/components/icon/index.cjs +1 -90
- package/components/icon/index.js +46 -74
- package/components/if-defined-DULpqYwi.js +27 -0
- package/components/if-defined-DaXWqfzc.cjs +22 -0
- package/components/index-CNK8wHXu.cjs +57 -0
- package/components/index-Cf6G4q52.js +1490 -0
- package/components/index-D3ICqC7S.js +1174 -0
- package/components/index-hqVbNKYy.cjs +113 -0
- package/components/index.cjs +1 -174
- package/components/index.js +172 -174
- package/components/infield-button/index.cjs +2 -46
- package/components/infield-button/index.js +30 -41
- package/components/label/index.cjs +1 -37
- package/components/label/index.js +24 -36
- package/components/{language-resolution-BSGJAWiQ.js → language-resolution-B-wjV5bb.js} +17 -21
- package/components/language-resolution-EUER43cg.cjs +18 -0
- package/components/like-anchor-Bu3pXbjT.cjs +32 -0
- package/components/like-anchor-DCFJN0LV.js +69 -0
- package/components/luzmo-icons-CiSek5iM.js +229 -0
- package/components/luzmo-icons-CtA-TJPd.cjs +29 -0
- package/components/manage-help-text-CHfMLzSa.js +92 -0
- package/components/manage-help-text-DNqdEkTA.cjs +30 -0
- package/components/menu/index.cjs +29 -1297
- package/components/menu/index.js +499 -954
- package/components/multi-language-field/index.cjs +2 -132
- package/components/multi-language-field/index.js +88 -118
- package/components/mutation-controller-DH7YOCyj.js +52 -0
- package/components/mutation-controller-DkOMCW-c.cjs +22 -0
- package/components/number-field/index.cjs +10 -613
- package/components/number-field/index.js +243 -442
- package/components/observe-slot-presence-CmVi0zTc.js +68 -0
- package/components/observe-slot-presence-bc9chhsi.cjs +18 -0
- package/components/observe-slot-text-C3moTjwy.js +87 -0
- package/components/observe-slot-text-D2VAEFSd.cjs +18 -0
- package/components/options/index.cjs +60 -693
- package/components/options/index.js +953 -519
- package/components/overlay/index.cjs +21 -367
- package/components/overlay/index.js +189 -273
- package/components/overlay-B3ajDLLq.cjs +47 -0
- package/components/overlay-CUKs69yr.js +2745 -0
- package/components/{pending-state-CXbe-Xul.js → pending-state-B2wWssTo.js} +13 -28
- package/components/pending-state-bJr-nEJl.cjs +26 -0
- package/components/picker/index.cjs +1 -9
- package/components/picker/index.js +11 -15
- package/components/picker-C0LvseZe.cjs +123 -0
- package/components/picker-W1qNmtsh.js +461 -0
- package/components/picker-button/index.cjs +4 -56
- package/components/picker-button/index.js +34 -45
- package/components/{condition-attribute-with-id-Cn815e9W.js → platform-BM-uMWpX.js} +49 -24
- package/components/platform-BiXhwqk3.cjs +18 -0
- package/components/popover/index.cjs +1 -7
- package/components/popover/index.js +8 -12
- package/components/popover-fwJeZHMQ.cjs +30 -0
- package/components/popover-iD8f5Jkp.js +67 -0
- package/components/progress-circle/index.cjs +1 -7
- package/components/progress-circle/index.js +8 -12
- package/components/progress-circle-DZxaMe8L.cjs +33 -0
- package/components/progress-circle-USIIU1up.js +97 -0
- package/components/query-BL-TJj7K.cjs +22 -0
- package/components/query-D_KR_GUc.js +51 -0
- package/components/query-assigned-elements-DjfhL1cl.js +36 -0
- package/components/query-assigned-elements-DsKsfk7G.cjs +22 -0
- package/components/query-assigned-nodes-BcKWmGzy.cjs +22 -0
- package/components/query-assigned-nodes-C76XVPWY.js +36 -0
- package/components/radio/index.cjs +2 -244
- package/components/radio/index.js +110 -192
- package/components/{random-id-BEc6QIUL.js → random-id-ByCz1xaq.js} +3 -3
- package/components/random-id-CqvckpWe.cjs +18 -0
- package/components/roving-tabindex-By_fCy_e.cjs +18 -0
- package/components/roving-tabindex-DOg4z6ZU.js +66 -0
- package/components/search/index.cjs +8 -115
- package/components/search/index.js +66 -96
- package/components/select/index.cjs +51 -720
- package/components/select/index.js +347 -563
- package/components/sized-mixin-CJbBHWRQ.js +63 -0
- package/components/sized-mixin-WPHH0a_D.cjs +18 -0
- package/components/slider/index.cjs +1 -119
- package/components/slider/index.js +1113 -100
- package/components/slottable-request-event-BfUUt1Mh.cjs +18 -0
- package/components/{slottable-request-event-D9WzrdWv.js → slottable-request-event-DggLA4Rx.js} +9 -12
- package/components/state-DwIwYPvt.js +29 -0
- package/components/state-vf0PJN3_.cjs +22 -0
- package/components/strategies-C6HsQpU2.cjs +18 -0
- package/components/strategies-CUMLHtQI.js +195 -0
- package/components/streaming-listener-BQ68fKMa.js +91 -0
- package/components/streaming-listener-DeGQYM-9.cjs +18 -0
- package/components/style-map-Bnhf_mVZ.js +53 -0
- package/components/style-map-DuMd5xlY.cjs +22 -0
- package/components/swatch/index.cjs +7 -436
- package/components/swatch/index.js +205 -350
- package/components/switch/index.cjs +2 -61
- package/components/switch/index.js +34 -51
- package/components/tabs/index.cjs +26 -693
- package/components/tabs/index.js +388 -521
- package/components/tags/index.cjs +4 -201
- package/components/tags/index.js +87 -152
- package/components/text-field/index.cjs +3 -49
- package/components/text-field/index.js +30 -44
- package/components/text-field-BkFPYo7S.cjs +85 -0
- package/components/text-field-C2n3rzCK.js +314 -0
- package/components/text-field.module-C2KVUJcX.js +21 -0
- package/components/text-field.module-DXhFA9G-.cjs +18 -0
- package/components/toast/index.cjs +12 -177
- package/components/toast/index.js +73 -145
- package/components/tooltip/index.cjs +6 -250
- package/components/tooltip/index.js +124 -177
- package/components/unit-input/index.cjs +8 -232
- package/components/unit-input/index.js +108 -201
- package/components/utils.cjs +1 -25
- package/components/utils.js +22 -22
- package/components/{random-id-BE6HA503.cjs → when-CDK1Tt5Y.js} +10 -7
- package/components/when-CDZyJPvd.cjs +22 -0
- package/package.json +1 -1
- package/components/action-group-DHp8RHDf.js +0 -392
- package/components/action-group-MPf19RPV.cjs +0 -391
- package/components/base-COw9n7UR.cjs +0 -119
- package/components/base-DmeVy0cq.js +0 -120
- package/components/button-base-7Ak55xFd.cjs +0 -206
- package/components/button-base-C3kf6BTK.js +0 -207
- package/components/checkbox-mixin-8cL-vfDy.js +0 -84
- package/components/checkbox-mixin-CE7dJj3J.cjs +0 -83
- package/components/clear-button-Co6oKSgl.js +0 -59
- package/components/clear-button-X_HDY2eH.cjs +0 -58
- package/components/close-button-DPBK6Kpu.cjs +0 -59
- package/components/close-button-Miw9ZjoJ.js +0 -60
- package/components/color-controller-BjDZaxhX.js +0 -491
- package/components/color-controller-C3c_vb2P.cjs +0 -490
- package/components/color-loupe-BQqNR8YD.cjs +0 -88
- package/components/color-loupe-B_DDFv8l.js +0 -89
- package/components/condition-attribute-with-id-DEc2Yjne.cjs +0 -43
- package/components/dependency-manger-CcIE1uvQ.cjs +0 -63
- package/components/divider.module-Cm5LcDRV.cjs +0 -20
- package/components/divider.module-DauH6k2_.js +0 -21
- package/components/element-resolution-DCsrhGZO.cjs +0 -112
- package/components/element-resolution-nMlmW4Jy.js +0 -113
- package/components/field-group-DNmY8W9v.cjs +0 -86
- package/components/field-group-DVdAWCQF.js +0 -87
- package/components/field-label-CKH9EXpR.cjs +0 -156
- package/components/field-label-Dpsecoc6.js +0 -157
- package/components/focus-group-BqDAk9Is.js +0 -337
- package/components/focus-group-DFzOlalL.cjs +0 -336
- package/components/focus-visible-B-B8-P9R.cjs +0 -104
- package/components/focus-visible-BUPRWlsh.js +0 -105
- package/components/focusable-BPrTcZPd.cjs +0 -262
- package/components/focusable-ChCLg1k4.js +0 -263
- package/components/language-resolution-iN9EImbb.cjs +0 -57
- package/components/like-anchor-D62faRNG.cjs +0 -79
- package/components/like-anchor-v3cJ9RWM.js +0 -80
- package/components/manage-help-text-BYx84zZR.cjs +0 -125
- package/components/manage-help-text-DOuMTGht.js +0 -126
- package/components/observe-slot-presence-9AwLGUQ_.cjs +0 -78
- package/components/observe-slot-presence-DcMdoumP.js +0 -79
- package/components/observe-slot-text-CSofZeeF.cjs +0 -104
- package/components/observe-slot-text-CjnkkBPn.js +0 -105
- package/components/overlay-CN8ISP1F.js +0 -2485
- package/components/overlay-LViy9VWM.cjs +0 -2484
- package/components/pending-state-e4RbXe9u.cjs +0 -75
- package/components/picker-DNde3awt.cjs +0 -672
- package/components/picker-PfUAF05y.js +0 -673
- package/components/platform-CxDar3Dn.cjs +0 -68
- package/components/platform-Cxn0WbyT.js +0 -69
- package/components/popover-BkbYhl3i.js +0 -74
- package/components/popover-BkgUf0kL.cjs +0 -74
- package/components/progress-circle-Hu_ivPHf.js +0 -133
- package/components/progress-circle-_Etqsj9f.cjs +0 -132
- package/components/roving-tabindex-AsmAh2In.cjs +0 -95
- package/components/roving-tabindex-DPF9NmrH.js +0 -96
- package/components/sized-mixin-DmkrNdWB.js +0 -80
- package/components/sized-mixin-UaTVa-AE.cjs +0 -79
- package/components/strategies-DlMlaSJR.cjs +0 -317
- package/components/strategies-DlPQoTFE.js +0 -318
- package/components/streaming-listener-D4sHaMub.cjs +0 -145
- package/components/streaming-listener-cAz5zJyk.js +0 -146
- package/components/text-field-11tcnftU.cjs +0 -338
- package/components/text-field-Chi9J2Cz.js +0 -339
- package/components/text-field.module-CMBS0jSL.js +0 -21
- package/components/text-field.module-DIJdV_sA.cjs +0 -20
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
/*! * Lucero - The design system for Luzmo.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2025 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
-
*
|
|
10
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
-
* SOFTWARE.
|
|
17
|
-
* */
|
|
18
|
-
import { f as isWebKit } from "./platform-Cxn0WbyT.js";
|
|
19
|
-
const IS_MOBILE = "(max-width: 743px) and (hover: none) and (pointer: coarse)";
|
|
20
|
-
class MatchMediaController {
|
|
21
|
-
constructor(host, query) {
|
|
22
|
-
this.key = Symbol("match-media-key");
|
|
23
|
-
this.matches = false;
|
|
24
|
-
this.host = host;
|
|
25
|
-
this.host.addController(this);
|
|
26
|
-
if (typeof window === "undefined") {
|
|
27
|
-
this.matches = false;
|
|
28
|
-
} else {
|
|
29
|
-
this.media = window.matchMedia(query);
|
|
30
|
-
this.matches = this.media.matches;
|
|
31
|
-
}
|
|
32
|
-
this.onChange = this.onChange.bind(this);
|
|
33
|
-
host.addController(this);
|
|
34
|
-
}
|
|
35
|
-
hostConnected() {
|
|
36
|
-
var _a;
|
|
37
|
-
(_a = this.media) == null ? void 0 : _a.addEventListener("change", this.onChange);
|
|
38
|
-
}
|
|
39
|
-
hostDisconnected() {
|
|
40
|
-
var _a;
|
|
41
|
-
(_a = this.media) == null ? void 0 : _a.removeEventListener("change", this.onChange);
|
|
42
|
-
}
|
|
43
|
-
onChange(event) {
|
|
44
|
-
if (this.matches === event.matches) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
this.matches = event.matches;
|
|
48
|
-
this.host.requestUpdate(this.key, !this.matches);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
var InteractionTypes = /* @__PURE__ */ ((InteractionTypes2) => {
|
|
52
|
-
InteractionTypes2[InteractionTypes2["desktop"] = 0] = "desktop";
|
|
53
|
-
InteractionTypes2[InteractionTypes2["mobile"] = 1] = "mobile";
|
|
54
|
-
return InteractionTypes2;
|
|
55
|
-
})(InteractionTypes || {});
|
|
56
|
-
const SAFARI_FOCUS_RING_CLASS = "remove-focus-ring-safari-hack";
|
|
57
|
-
class InteractionController {
|
|
58
|
-
constructor(target, host) {
|
|
59
|
-
this.target = target;
|
|
60
|
-
this.host = host;
|
|
61
|
-
this.preventNextToggle = "no";
|
|
62
|
-
this.pointerdownState = false;
|
|
63
|
-
this.enterKeydownOn = null;
|
|
64
|
-
this._open = false;
|
|
65
|
-
this.target = target;
|
|
66
|
-
this.host = host;
|
|
67
|
-
this.host.addController(this);
|
|
68
|
-
this.init();
|
|
69
|
-
}
|
|
70
|
-
get activelyOpening() {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
get open() {
|
|
74
|
-
return this._open;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Set `open`
|
|
78
|
-
*/
|
|
79
|
-
set open(open) {
|
|
80
|
-
if (this._open === open) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
this._open = open;
|
|
84
|
-
if (this.overlay) {
|
|
85
|
-
this.host.open = open;
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
customElements.whenDefined("luzmo-overlay").then(async () => {
|
|
89
|
-
const { LuzmoOverlay: LuzmoOverlay2 } = await import("./overlay/index.js");
|
|
90
|
-
this.overlay = new LuzmoOverlay2();
|
|
91
|
-
this.host.open = true;
|
|
92
|
-
this.host.requestUpdate();
|
|
93
|
-
});
|
|
94
|
-
import("./overlay/index.js");
|
|
95
|
-
}
|
|
96
|
-
get overlay() {
|
|
97
|
-
return this._overlay;
|
|
98
|
-
}
|
|
99
|
-
set overlay(overlay) {
|
|
100
|
-
if (!overlay) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
if (this.overlay === overlay) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
this._overlay = overlay;
|
|
107
|
-
this.initOverlay();
|
|
108
|
-
}
|
|
109
|
-
releaseDescription() {
|
|
110
|
-
}
|
|
111
|
-
handleBeforetoggle(event) {
|
|
112
|
-
var _a, _b;
|
|
113
|
-
if (event.composedPath()[0] !== event.target) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
if (event.newState === "closed") {
|
|
117
|
-
if (this.preventNextToggle === "no") {
|
|
118
|
-
this.open = false;
|
|
119
|
-
} else if (!this.pointerdownState) {
|
|
120
|
-
(_a = this.overlay) == null ? void 0 : _a.manuallyKeepOpen();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
if (!this.open) {
|
|
124
|
-
this.host.optionsMenu.updateSelectedItemIndex();
|
|
125
|
-
if (
|
|
126
|
-
// pickers can have submenus, selects can not
|
|
127
|
-
typeof ((_b = this.host.optionsMenu) == null ? void 0 : _b.closeDescendentOverlays) === "function"
|
|
128
|
-
) {
|
|
129
|
-
this.host.optionsMenu.closeDescendentOverlays();
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
initOverlay() {
|
|
134
|
-
if (this.overlay) {
|
|
135
|
-
this.overlay.addEventListener("beforetoggle", (event) => {
|
|
136
|
-
this.handleBeforetoggle(
|
|
137
|
-
event
|
|
138
|
-
);
|
|
139
|
-
});
|
|
140
|
-
this.overlay.type = this.host.isMobile.matches ? "modal" : "auto";
|
|
141
|
-
this.overlay.triggerElement = this.host;
|
|
142
|
-
this.overlay.placement = this.host.isMobile.matches ? void 0 : this.host.placement;
|
|
143
|
-
this.overlay.receivesFocus = "true";
|
|
144
|
-
this.overlay.willPreventClose = this.preventNextToggle !== "no" && this.open;
|
|
145
|
-
this.overlay.addEventListener(
|
|
146
|
-
"slottable-request",
|
|
147
|
-
this.host.handleSlottableRequest
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
handlePointerdown(_event) {
|
|
152
|
-
}
|
|
153
|
-
handleButtonFocus(event) {
|
|
154
|
-
if (this.preventNextToggle === "maybe" && event.relatedTarget === this.host.optionsMenu) {
|
|
155
|
-
this.preventNextToggle = "yes";
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
handleActivate(_event) {
|
|
159
|
-
}
|
|
160
|
-
/* c8 ignore next 3 */
|
|
161
|
-
init() {
|
|
162
|
-
}
|
|
163
|
-
abort() {
|
|
164
|
-
var _a;
|
|
165
|
-
this.releaseDescription();
|
|
166
|
-
(_a = this.abortController) == null ? void 0 : _a.abort();
|
|
167
|
-
}
|
|
168
|
-
hostConnected() {
|
|
169
|
-
this.init();
|
|
170
|
-
}
|
|
171
|
-
hostDisconnected() {
|
|
172
|
-
var _a;
|
|
173
|
-
(_a = this.abortController) == null ? void 0 : _a.abort();
|
|
174
|
-
}
|
|
175
|
-
hostUpdated() {
|
|
176
|
-
if (this.overlay && this.host.dependencyManager.loaded && this.host.open !== this.overlay.open) {
|
|
177
|
-
this.overlay.willPreventClose = this.preventNextToggle !== "no";
|
|
178
|
-
this.overlay.open = this.host.open;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
class DesktopController extends InteractionController {
|
|
183
|
-
constructor() {
|
|
184
|
-
super(...arguments);
|
|
185
|
-
this.type = InteractionTypes.desktop;
|
|
186
|
-
}
|
|
187
|
-
handlePointerdown(event) {
|
|
188
|
-
const target = event.target;
|
|
189
|
-
const clearButton = target.closest(".clear-icon");
|
|
190
|
-
if (clearButton) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
if (event.button !== 0 || event.pointerType === "touch") {
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
this.pointerdownState = this.open;
|
|
197
|
-
this.preventNextToggle = "maybe";
|
|
198
|
-
let cleanupAction = 0;
|
|
199
|
-
const cleanup = () => {
|
|
200
|
-
cancelAnimationFrame(cleanupAction);
|
|
201
|
-
cleanupAction = requestAnimationFrame(() => {
|
|
202
|
-
document.removeEventListener("pointerup", cleanup);
|
|
203
|
-
document.removeEventListener("pointercancel", cleanup);
|
|
204
|
-
this.target.removeEventListener("click", cleanup);
|
|
205
|
-
requestAnimationFrame(() => {
|
|
206
|
-
this.preventNextToggle = "no";
|
|
207
|
-
});
|
|
208
|
-
});
|
|
209
|
-
};
|
|
210
|
-
document.addEventListener("pointerup", cleanup);
|
|
211
|
-
document.addEventListener("pointercancel", cleanup);
|
|
212
|
-
this.target.addEventListener("click", cleanup);
|
|
213
|
-
this.handleActivate();
|
|
214
|
-
}
|
|
215
|
-
handleActivate(event) {
|
|
216
|
-
if (this.enterKeydownOn && this.enterKeydownOn !== this.target) {
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
if (this.preventNextToggle === "yes") {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
if ((event == null ? void 0 : event.type) === "click" && this.open !== this.pointerdownState) {
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
this.host.toggle();
|
|
226
|
-
}
|
|
227
|
-
init() {
|
|
228
|
-
var _a;
|
|
229
|
-
(_a = this.abortController) == null ? void 0 : _a.abort();
|
|
230
|
-
this.abortController = new AbortController();
|
|
231
|
-
const { signal } = this.abortController;
|
|
232
|
-
this.target.addEventListener(
|
|
233
|
-
"click",
|
|
234
|
-
(event) => this.handleActivate(event),
|
|
235
|
-
{
|
|
236
|
-
signal
|
|
237
|
-
}
|
|
238
|
-
);
|
|
239
|
-
this.target.addEventListener(
|
|
240
|
-
"pointerdown",
|
|
241
|
-
(event) => this.handlePointerdown(event),
|
|
242
|
-
{ signal }
|
|
243
|
-
);
|
|
244
|
-
this.target.addEventListener(
|
|
245
|
-
"focus",
|
|
246
|
-
(event) => this.handleButtonFocus(event),
|
|
247
|
-
{
|
|
248
|
-
signal
|
|
249
|
-
}
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
class MobileController extends InteractionController {
|
|
254
|
-
constructor() {
|
|
255
|
-
super(...arguments);
|
|
256
|
-
this.type = InteractionTypes.mobile;
|
|
257
|
-
}
|
|
258
|
-
handleClick(event) {
|
|
259
|
-
const target = event.target;
|
|
260
|
-
const clearButton = target.closest(".clear-button");
|
|
261
|
-
if (!clearButton) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
if (this.preventNextToggle === "no") {
|
|
265
|
-
this.open = !this.open;
|
|
266
|
-
}
|
|
267
|
-
this.preventNextToggle = "no";
|
|
268
|
-
}
|
|
269
|
-
handlePointerdown(event) {
|
|
270
|
-
const target = event.target;
|
|
271
|
-
const clearButton = target.closest(".clear-button");
|
|
272
|
-
if (!clearButton) {
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
this.preventNextToggle = this.open ? "yes" : "no";
|
|
276
|
-
if (isWebKit()) {
|
|
277
|
-
this.target.classList.add(SAFARI_FOCUS_RING_CLASS);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
handleFocusOut() {
|
|
281
|
-
if (this.host.open) {
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
if (isWebKit() && this.target.classList.contains(SAFARI_FOCUS_RING_CLASS)) {
|
|
285
|
-
this.target.classList.remove(SAFARI_FOCUS_RING_CLASS);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
init() {
|
|
289
|
-
var _a;
|
|
290
|
-
(_a = this.abortController) == null ? void 0 : _a.abort();
|
|
291
|
-
this.abortController = new AbortController();
|
|
292
|
-
const { signal } = this.abortController;
|
|
293
|
-
this.target.addEventListener(
|
|
294
|
-
"click",
|
|
295
|
-
(event) => this.handleClick(event),
|
|
296
|
-
{
|
|
297
|
-
signal
|
|
298
|
-
}
|
|
299
|
-
);
|
|
300
|
-
this.target.addEventListener(
|
|
301
|
-
"pointerdown",
|
|
302
|
-
(event) => this.handlePointerdown(event),
|
|
303
|
-
{ signal }
|
|
304
|
-
);
|
|
305
|
-
this.target.addEventListener("focusout", () => this.handleFocusOut(), {
|
|
306
|
-
signal
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
const strategies = {
|
|
311
|
-
desktop: DesktopController,
|
|
312
|
-
mobile: MobileController
|
|
313
|
-
};
|
|
314
|
-
export {
|
|
315
|
-
IS_MOBILE as I,
|
|
316
|
-
MatchMediaController as M,
|
|
317
|
-
strategies as s
|
|
318
|
-
};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/*! * Lucero - The design system for Luzmo.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2025 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
-
*
|
|
10
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
-
* SOFTWARE.
|
|
17
|
-
* */
|
|
18
|
-
"use strict";
|
|
19
|
-
const lit = require("lit");
|
|
20
|
-
const asyncDirective_js = require("lit/async-directive.js");
|
|
21
|
-
const defaultListener = ["", () => {
|
|
22
|
-
}];
|
|
23
|
-
class StreamingListenerDirective extends asyncDirective_js.AsyncDirective {
|
|
24
|
-
constructor() {
|
|
25
|
-
super(...arguments);
|
|
26
|
-
this.start = defaultListener;
|
|
27
|
-
this.streamInside = defaultListener;
|
|
28
|
-
this.end = defaultListener;
|
|
29
|
-
this.streamOutside = defaultListener;
|
|
30
|
-
this.state = "off";
|
|
31
|
-
this.handleStart = (event) => {
|
|
32
|
-
this.clearStream();
|
|
33
|
-
this.callHandler(this.start[1], event);
|
|
34
|
-
if (event.defaultPrevented) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
this.removeListeners();
|
|
38
|
-
this.addListeners("on");
|
|
39
|
-
};
|
|
40
|
-
this.handleInside = (event) => {
|
|
41
|
-
this.handleStream(this.streamInside[1], event);
|
|
42
|
-
};
|
|
43
|
-
this.handleEnd = (event) => {
|
|
44
|
-
this.clearStream();
|
|
45
|
-
this.callHandler(this.end[1], event);
|
|
46
|
-
this.removeListeners();
|
|
47
|
-
this.addListeners("off");
|
|
48
|
-
};
|
|
49
|
-
this.handleOutside = (event) => {
|
|
50
|
-
this.handleStream(this.streamOutside[1], event);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
/* c8 ignore next 4 */
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
55
|
-
render(_configGroup) {
|
|
56
|
-
return lit.nothing;
|
|
57
|
-
}
|
|
58
|
-
update(part, [
|
|
59
|
-
{
|
|
60
|
-
start,
|
|
61
|
-
end,
|
|
62
|
-
streamInside = defaultListener,
|
|
63
|
-
streamOutside = defaultListener
|
|
64
|
-
}
|
|
65
|
-
]) {
|
|
66
|
-
var _a;
|
|
67
|
-
if (this.element !== part.element) {
|
|
68
|
-
this.element = part.element;
|
|
69
|
-
this.removeListeners();
|
|
70
|
-
}
|
|
71
|
-
this.host = ((_a = part.options) == null ? void 0 : _a.host) || this.element;
|
|
72
|
-
this.start = start;
|
|
73
|
-
this.end = end;
|
|
74
|
-
this.streamInside = streamInside;
|
|
75
|
-
this.streamOutside = streamOutside;
|
|
76
|
-
this.addListeners();
|
|
77
|
-
}
|
|
78
|
-
addListeners(state) {
|
|
79
|
-
this.state = state || this.state;
|
|
80
|
-
if (this.state === "off") {
|
|
81
|
-
this.addListener(this.streamOutside[0], this.handleOutside);
|
|
82
|
-
this.addListener(this.start[0], this.handleStart);
|
|
83
|
-
} else if (this.state === "on") {
|
|
84
|
-
this.addListener(this.streamInside[0], this.handleInside);
|
|
85
|
-
this.addListener(this.end[0], this.handleEnd);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
callHandler(value, event) {
|
|
89
|
-
if (typeof value === "function") {
|
|
90
|
-
value.call(this.host, event);
|
|
91
|
-
} else {
|
|
92
|
-
value.handleEvent(event);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
handleStream(value, event) {
|
|
96
|
-
if (this.stream) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
this.callHandler(value, event);
|
|
100
|
-
this.stream = requestAnimationFrame(() => {
|
|
101
|
-
this.stream = void 0;
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
clearStream() {
|
|
105
|
-
if (this.stream != null) {
|
|
106
|
-
cancelAnimationFrame(this.stream);
|
|
107
|
-
this.stream = void 0;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
addListener(type, fn) {
|
|
111
|
-
if (Array.isArray(type)) {
|
|
112
|
-
type.map((eventName) => {
|
|
113
|
-
this.element.addEventListener(eventName, fn);
|
|
114
|
-
});
|
|
115
|
-
} else {
|
|
116
|
-
this.element.addEventListener(type, fn);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
removeListener(type, fn) {
|
|
120
|
-
if (Array.isArray(type)) {
|
|
121
|
-
type.map((eventName) => {
|
|
122
|
-
this.element.removeEventListener(eventName, fn);
|
|
123
|
-
});
|
|
124
|
-
} else {
|
|
125
|
-
this.element.removeEventListener(type, fn);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
removeListeners() {
|
|
129
|
-
this.removeListener(this.start[0], this.handleStart);
|
|
130
|
-
this.removeListener(this.streamInside[0], this.handleInside);
|
|
131
|
-
this.removeListener(this.end[0], this.handleEnd);
|
|
132
|
-
this.removeListener(this.streamOutside[0], this.handleOutside);
|
|
133
|
-
}
|
|
134
|
-
disconnected() {
|
|
135
|
-
this.removeListeners();
|
|
136
|
-
}
|
|
137
|
-
/* c8 ignore next 3 */
|
|
138
|
-
reconnected() {
|
|
139
|
-
this.addListeners();
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
const streamingListener = asyncDirective_js.directive(
|
|
143
|
-
StreamingListenerDirective
|
|
144
|
-
);
|
|
145
|
-
exports.streamingListener = streamingListener;
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
/*! * Lucero - The design system for Luzmo.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2025 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
-
*
|
|
10
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
-
* SOFTWARE.
|
|
17
|
-
* */
|
|
18
|
-
import { nothing } from "lit";
|
|
19
|
-
import { directive, AsyncDirective } from "lit/async-directive.js";
|
|
20
|
-
const defaultListener = ["", () => {
|
|
21
|
-
}];
|
|
22
|
-
class StreamingListenerDirective extends AsyncDirective {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
this.start = defaultListener;
|
|
26
|
-
this.streamInside = defaultListener;
|
|
27
|
-
this.end = defaultListener;
|
|
28
|
-
this.streamOutside = defaultListener;
|
|
29
|
-
this.state = "off";
|
|
30
|
-
this.handleStart = (event) => {
|
|
31
|
-
this.clearStream();
|
|
32
|
-
this.callHandler(this.start[1], event);
|
|
33
|
-
if (event.defaultPrevented) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
this.removeListeners();
|
|
37
|
-
this.addListeners("on");
|
|
38
|
-
};
|
|
39
|
-
this.handleInside = (event) => {
|
|
40
|
-
this.handleStream(this.streamInside[1], event);
|
|
41
|
-
};
|
|
42
|
-
this.handleEnd = (event) => {
|
|
43
|
-
this.clearStream();
|
|
44
|
-
this.callHandler(this.end[1], event);
|
|
45
|
-
this.removeListeners();
|
|
46
|
-
this.addListeners("off");
|
|
47
|
-
};
|
|
48
|
-
this.handleOutside = (event) => {
|
|
49
|
-
this.handleStream(this.streamOutside[1], event);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/* c8 ignore next 4 */
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
54
|
-
render(_configGroup) {
|
|
55
|
-
return nothing;
|
|
56
|
-
}
|
|
57
|
-
update(part, [
|
|
58
|
-
{
|
|
59
|
-
start,
|
|
60
|
-
end,
|
|
61
|
-
streamInside = defaultListener,
|
|
62
|
-
streamOutside = defaultListener
|
|
63
|
-
}
|
|
64
|
-
]) {
|
|
65
|
-
var _a;
|
|
66
|
-
if (this.element !== part.element) {
|
|
67
|
-
this.element = part.element;
|
|
68
|
-
this.removeListeners();
|
|
69
|
-
}
|
|
70
|
-
this.host = ((_a = part.options) == null ? void 0 : _a.host) || this.element;
|
|
71
|
-
this.start = start;
|
|
72
|
-
this.end = end;
|
|
73
|
-
this.streamInside = streamInside;
|
|
74
|
-
this.streamOutside = streamOutside;
|
|
75
|
-
this.addListeners();
|
|
76
|
-
}
|
|
77
|
-
addListeners(state) {
|
|
78
|
-
this.state = state || this.state;
|
|
79
|
-
if (this.state === "off") {
|
|
80
|
-
this.addListener(this.streamOutside[0], this.handleOutside);
|
|
81
|
-
this.addListener(this.start[0], this.handleStart);
|
|
82
|
-
} else if (this.state === "on") {
|
|
83
|
-
this.addListener(this.streamInside[0], this.handleInside);
|
|
84
|
-
this.addListener(this.end[0], this.handleEnd);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
callHandler(value, event) {
|
|
88
|
-
if (typeof value === "function") {
|
|
89
|
-
value.call(this.host, event);
|
|
90
|
-
} else {
|
|
91
|
-
value.handleEvent(event);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
handleStream(value, event) {
|
|
95
|
-
if (this.stream) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
this.callHandler(value, event);
|
|
99
|
-
this.stream = requestAnimationFrame(() => {
|
|
100
|
-
this.stream = void 0;
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
clearStream() {
|
|
104
|
-
if (this.stream != null) {
|
|
105
|
-
cancelAnimationFrame(this.stream);
|
|
106
|
-
this.stream = void 0;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
addListener(type, fn) {
|
|
110
|
-
if (Array.isArray(type)) {
|
|
111
|
-
type.map((eventName) => {
|
|
112
|
-
this.element.addEventListener(eventName, fn);
|
|
113
|
-
});
|
|
114
|
-
} else {
|
|
115
|
-
this.element.addEventListener(type, fn);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
removeListener(type, fn) {
|
|
119
|
-
if (Array.isArray(type)) {
|
|
120
|
-
type.map((eventName) => {
|
|
121
|
-
this.element.removeEventListener(eventName, fn);
|
|
122
|
-
});
|
|
123
|
-
} else {
|
|
124
|
-
this.element.removeEventListener(type, fn);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
removeListeners() {
|
|
128
|
-
this.removeListener(this.start[0], this.handleStart);
|
|
129
|
-
this.removeListener(this.streamInside[0], this.handleInside);
|
|
130
|
-
this.removeListener(this.end[0], this.handleEnd);
|
|
131
|
-
this.removeListener(this.streamOutside[0], this.handleOutside);
|
|
132
|
-
}
|
|
133
|
-
disconnected() {
|
|
134
|
-
this.removeListeners();
|
|
135
|
-
}
|
|
136
|
-
/* c8 ignore next 3 */
|
|
137
|
-
reconnected() {
|
|
138
|
-
this.addListeners();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
const streamingListener = directive(
|
|
142
|
-
StreamingListenerDirective
|
|
143
|
-
);
|
|
144
|
-
export {
|
|
145
|
-
streamingListener as s
|
|
146
|
-
};
|