@luzmo/lucero 1.0.1-alpha.17 → 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 -221
- package/components/tooltip/index.js +131 -155
- package/components/tooltip/tooltip.d.ts +12 -1
- 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/custom-elements.json +1 -1
- 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
|
@@ -0,0 +1,258 @@
|
|
|
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 { a as d, r as p, x as g, n as c } from "./base-CFWO09N1.js";
|
|
19
|
+
import { s as h } from "./mutation-controller-DH7YOCyj.js";
|
|
20
|
+
import { e as b } from "./query-D_KR_GUc.js";
|
|
21
|
+
import { R as m } from "./roving-tabindex-DOg4z6ZU.js";
|
|
22
|
+
import { S as v } from "./sized-mixin-CJbBHWRQ.js";
|
|
23
|
+
const z = ":host{gap:var(--luzmo-action-group-horizontal-spacing-regular, var(--action-group-horizontal-spacing-regular));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:3}:host(:not([vertical]):not([compact])) ::slotted(*){flex-shrink:0}:host([vertical]){gap:var(--luzmo-action-group-vertical-spacing-regular, var(--action-group-vertical-spacing-regular));flex-direction:column;display:inline-flex}:host([compact]){gap:var(--luzmo-action-group-gap-size-compact, var(--action-group-gap-size-compact))}:host([compact]:not([quiet])){flex-wrap:nowrap}:host([compact]:not([quiet])) ::slotted(*){border-radius:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset));z-index:0;position:relative}:host([compact]:not([quiet])) ::slotted(:first-child){--luzmo-actionbutton-focus-indicator-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0px 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-start-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-inline-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact]:not([quiet])) ::slotted(:not(:first-child)){--luzmo-actionbutton-focus-indicator-border-radius: 0px;margin-inline-start:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact));margin-inline-end:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact))}:host([compact]:not([quiet])) ::slotted(:last-child){--luzmo-actionbutton-focus-indicator-border-radius: 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0px;border-start-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-inline-start:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact));margin-inline-end:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset))}:host([compact]:not([quiet])) ::slotted([selected]){z-index:1}@media (hover: hover){:host([compact]:not([quiet])) ::slotted(:hover){z-index:2}}:host([compact]:not([quiet])) ::slotted(:focus-visible){z-index:3}:host([compact]:not([quiet])[vertical]){gap:var(--luzmo-action-group-gap-size-compact, var(--action-group-gap-size-compact))}:host([compact][vertical]:not([quiet])) ::slotted(*){border-radius:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:first-child){--luzmo-actionbutton-focus-indicator-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0px 0px;border-start-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-start-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-block-start:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-block-end:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-inline-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:not(:first-child)){margin-block-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset));margin-block-end:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-inline-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset));margin-inline-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:last-child){--luzmo-actionbutton-focus-indicator-border-radius: 0px 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-block-start:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-block-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([justified]) ::slotted(*){flex:1}:host{--action-group-gap-size-compact: 0px;--action-group-horizontal-spacing-compact: -1px;--action-group-vertical-spacing-compact: -1px;--action-group-button-spacing-reset: 0px;--action-group-border-radius-reset: 0px;--action-group-border-radius: var(--luzmo-border-radius);--action-group-horizontal-spacing-regular: var(--luzmo-spacing-3);--action-group-vertical-spacing-regular: var(--luzmo-spacing-3)}:host([size=xs]),:host([size=s]){--action-group-horizontal-spacing-regular: var(--luzmo-spacing-2);--action-group-vertical-spacing-regular: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--action-group-horizontal-spacing-regular: var(--luzmo-spacing-3);--action-group-vertical-spacing-regular: var(--luzmo-spacing-3)}:host([dir][compact][vertical]) ::slotted(:nth-child(n)){margin-right:0;margin-left:0}:host([justified]) ::slotted(:not([role])),:host([vertical]) ::slotted(:not([role])){display:flex;flex-direction:column;align-items:stretch}:host([compact]:not([quiet])) ::slotted(:not([role])){--overriden-border-radius: 0;--luzmo-action-button-border-radius: var(--overriden-border-radius)}:host([compact][vertical]:not([quiet])) ::slotted(:not([role]):first-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0 0}:host([compact][vertical]:not([quiet])) ::slotted(:not([role]):last-child){--overriden-border-radius: 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:not([role]):first-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:not([role]):first-child){--overriden-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:not([role]):last-child){--overriden-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:not([role]):last-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([compact]:not([quiet])) ::slotted(*){--luzmo-action-button-focus-ring-border-radius: 0}:host([compact][vertical]:not([quiet])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0 0}:host([compact][vertical]:not([quiet])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}";
|
|
24
|
+
var f = Object.defineProperty, x = Object.getOwnPropertyDescriptor, s = (n, t, r, e) => {
|
|
25
|
+
for (var o = e > 1 ? void 0 : e ? x(t, r) : t, a = n.length - 1, i; a >= 0; a--)
|
|
26
|
+
(i = n[a]) && (o = (e ? i(t, r, o) : i(o)) || o);
|
|
27
|
+
return e && o && f(t, r, o), o;
|
|
28
|
+
};
|
|
29
|
+
const l = [];
|
|
30
|
+
class u extends v(d, {
|
|
31
|
+
validSizes: ["xs", "s", "m", "l", "xl"],
|
|
32
|
+
noDefaultSize: !0
|
|
33
|
+
}) {
|
|
34
|
+
constructor() {
|
|
35
|
+
super(), this._buttons = [], this._buttonSelector = "luzmo-action-button, luzmo-action-menu", this.rovingTabindexController = new m(
|
|
36
|
+
this,
|
|
37
|
+
{
|
|
38
|
+
focusInIndex: (t) => {
|
|
39
|
+
let r = -1;
|
|
40
|
+
const e = t.findIndex((o, a) => (!t[r] && !o.disabled && (r = a), o.selected && !o.disabled));
|
|
41
|
+
return t[e] ? e : r;
|
|
42
|
+
},
|
|
43
|
+
elements: () => this.buttons,
|
|
44
|
+
isFocusableElement: (t) => !t.disabled
|
|
45
|
+
}
|
|
46
|
+
), this.compact = !1, this.emphasized = !1, this.justified = !1, this.label = "", this.quiet = !1, this.vertical = !1, this._selected = l, this.hasManaged = !1, this.manageButtons = () => {
|
|
47
|
+
if (!this.slotElement)
|
|
48
|
+
return;
|
|
49
|
+
const r = this.slotElement.assignedElements({
|
|
50
|
+
flatten: !0
|
|
51
|
+
}).reduce((e, o) => {
|
|
52
|
+
if (o.matches(this._buttonSelector))
|
|
53
|
+
e.push(o);
|
|
54
|
+
else {
|
|
55
|
+
const a = [
|
|
56
|
+
...o.querySelectorAll(`:scope > ${this._buttonSelector}`)
|
|
57
|
+
];
|
|
58
|
+
e.push(...a);
|
|
59
|
+
}
|
|
60
|
+
return e;
|
|
61
|
+
}, []);
|
|
62
|
+
if (this.buttons = r, this.selects || !this.hasManaged) {
|
|
63
|
+
const e = [];
|
|
64
|
+
this.buttons.forEach((o) => {
|
|
65
|
+
o.selected && e.push(o.value);
|
|
66
|
+
}), this.setSelected([...this.selected, ...e]);
|
|
67
|
+
}
|
|
68
|
+
this.manageChildren(), this.manageSelects(), this.hasManaged = !0;
|
|
69
|
+
}, new h(this, {
|
|
70
|
+
config: {
|
|
71
|
+
childList: !0,
|
|
72
|
+
subtree: !0
|
|
73
|
+
},
|
|
74
|
+
callback: () => {
|
|
75
|
+
this.manageButtons();
|
|
76
|
+
},
|
|
77
|
+
skipInitial: !0
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
static get styles() {
|
|
81
|
+
return [p(z)];
|
|
82
|
+
}
|
|
83
|
+
set buttons(t) {
|
|
84
|
+
t !== this.buttons && (this._buttons = t, this.rovingTabindexController.clearElementCache());
|
|
85
|
+
}
|
|
86
|
+
get buttons() {
|
|
87
|
+
return this._buttons;
|
|
88
|
+
}
|
|
89
|
+
set selected(t) {
|
|
90
|
+
this.requestUpdate("selected", this._selected), this._selected = t, this.updateComplete.then(() => {
|
|
91
|
+
this.applySelects(), this.manageChildren();
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
get selected() {
|
|
95
|
+
return this._selected;
|
|
96
|
+
}
|
|
97
|
+
dispatchChange(t) {
|
|
98
|
+
this.dispatchEvent(
|
|
99
|
+
new Event("change", {
|
|
100
|
+
bubbles: !0,
|
|
101
|
+
composed: !0,
|
|
102
|
+
cancelable: !0
|
|
103
|
+
})
|
|
104
|
+
) || (this.setSelected(t), this.buttons.map((e) => {
|
|
105
|
+
e.selected = this.selected.includes(e.value);
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
setSelected(t, r) {
|
|
109
|
+
if (t === this.selected)
|
|
110
|
+
return;
|
|
111
|
+
const e = this.selected;
|
|
112
|
+
this.requestUpdate("selected", e), this._selected = t, r && this.dispatchChange(e);
|
|
113
|
+
}
|
|
114
|
+
focus(t) {
|
|
115
|
+
this.rovingTabindexController.focus(t);
|
|
116
|
+
}
|
|
117
|
+
deselectSelectedButtons() {
|
|
118
|
+
this.buttons.forEach((t) => {
|
|
119
|
+
t.selected && (t.selected = !1, t.tabIndex = -1, t.setAttribute(
|
|
120
|
+
this.selects ? "aria-checked" : (
|
|
121
|
+
/* c8 ignore */
|
|
122
|
+
"aria-pressed"
|
|
123
|
+
),
|
|
124
|
+
"false"
|
|
125
|
+
));
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
handleActionButtonChange(t) {
|
|
129
|
+
t.stopPropagation(), t.preventDefault();
|
|
130
|
+
}
|
|
131
|
+
handleClick(t) {
|
|
132
|
+
const r = t.target;
|
|
133
|
+
if (r.value !== void 0)
|
|
134
|
+
switch (this.selects) {
|
|
135
|
+
case "single": {
|
|
136
|
+
this.deselectSelectedButtons(), r.selected = !0, r.tabIndex = 0, r.setAttribute("aria-checked", "true"), this.setSelected([r.value], !0);
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
case "multiple": {
|
|
140
|
+
const e = [...this.selected];
|
|
141
|
+
r.selected = !r.selected, r.setAttribute("aria-checked", r.selected ? "true" : "false"), r.selected ? e.push(r.value) : e.splice(this.selected.indexOf(r.value), 1), this.setSelected(e, !0), this.buttons.forEach((o) => {
|
|
142
|
+
o.tabIndex = -1;
|
|
143
|
+
}), r.tabIndex = 0;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
async applySelects() {
|
|
149
|
+
await this.manageSelects(!0);
|
|
150
|
+
}
|
|
151
|
+
async manageSelects(t) {
|
|
152
|
+
if (this.buttons.length === 0)
|
|
153
|
+
return;
|
|
154
|
+
const r = this.buttons;
|
|
155
|
+
switch (this.selects) {
|
|
156
|
+
case "single": {
|
|
157
|
+
this.setAttribute("role", "radiogroup");
|
|
158
|
+
const e = [], o = r.map(async (i) => {
|
|
159
|
+
await i.updateComplete, i.setAttribute("role", "radio"), i.setAttribute(
|
|
160
|
+
"aria-checked",
|
|
161
|
+
i.selected ? "true" : "false"
|
|
162
|
+
), i.selected && e.push(i);
|
|
163
|
+
});
|
|
164
|
+
if (t)
|
|
165
|
+
break;
|
|
166
|
+
await Promise.all(o);
|
|
167
|
+
const a = e.map((i) => i.value);
|
|
168
|
+
this.setSelected(a || l);
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
case "multiple": {
|
|
172
|
+
this.getAttribute("role") === "radiogroup" && this.removeAttribute("role");
|
|
173
|
+
const e = [], o = r.map(async (i) => {
|
|
174
|
+
await i.updateComplete, i.setAttribute("role", "checkbox"), i.setAttribute(
|
|
175
|
+
"aria-checked",
|
|
176
|
+
i.selected ? "true" : "false"
|
|
177
|
+
), i.selected && e.push(i.value);
|
|
178
|
+
});
|
|
179
|
+
if (t)
|
|
180
|
+
break;
|
|
181
|
+
await Promise.all(o);
|
|
182
|
+
const a = e.length > 0 ? e : l;
|
|
183
|
+
this.setSelected(a);
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
default:
|
|
187
|
+
if (this.selected.length > 0) {
|
|
188
|
+
const e = [], o = r.map(async (a) => {
|
|
189
|
+
await a.updateComplete, a.setAttribute("role", "button"), a.selected ? (a.setAttribute("aria-pressed", "true"), e.push(a)) : a.removeAttribute("aria-pressed");
|
|
190
|
+
});
|
|
191
|
+
if (t)
|
|
192
|
+
break;
|
|
193
|
+
await Promise.all(o), this.setSelected(e.map((a) => a.value));
|
|
194
|
+
} else {
|
|
195
|
+
this.buttons.forEach((e) => {
|
|
196
|
+
e.setAttribute("role", "button");
|
|
197
|
+
});
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
this.hasAttribute("role") || this.setAttribute("role", "toolbar");
|
|
202
|
+
}
|
|
203
|
+
render() {
|
|
204
|
+
return g`
|
|
205
|
+
<slot role="presentation" @slotchange=${this.manageButtons}></slot>
|
|
206
|
+
`;
|
|
207
|
+
}
|
|
208
|
+
firstUpdated(t) {
|
|
209
|
+
super.firstUpdated(t), this.addEventListener("click", this.handleClick);
|
|
210
|
+
}
|
|
211
|
+
updated(t) {
|
|
212
|
+
super.updated(t), t.has("selects") && (this.manageSelects(), this.manageChildren(), this.selects ? this.renderRoot.addEventListener(
|
|
213
|
+
"change",
|
|
214
|
+
this.handleActionButtonChange
|
|
215
|
+
) : this.renderRoot.removeEventListener(
|
|
216
|
+
"change",
|
|
217
|
+
this.handleActionButtonChange
|
|
218
|
+
)), (t.has("quiet") || t.has("emphasized") || t.has("size") || t.has("staticColor")) && this.manageChildren(t), t.has("label") && (this.label || t.get("label") !== void 0) && (this.label.length > 0 ? this.setAttribute("aria-label", this.label) : this.removeAttribute("aria-label"));
|
|
219
|
+
}
|
|
220
|
+
manageChildren(t) {
|
|
221
|
+
this.buttons.forEach((r) => {
|
|
222
|
+
(this.quiet || t != null && t.get("quiet")) && (r.quiet = this.quiet), (this.emphasized || t != null && t.get("emphasized")) && (r.emphasized = this.emphasized), (this.staticColor || t != null && t.get("staticColor")) && (r.staticColor = this.staticColor), (this.selects || !this.hasManaged) && (r.selected = this.selected.includes(r.value)), this.size && (this.size !== "m" || (t == null ? void 0 : t.get("size")) !== void 0) && (r.size = this.size);
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
s([
|
|
227
|
+
c({ type: Boolean, reflect: !0 })
|
|
228
|
+
], u.prototype, "compact", 2);
|
|
229
|
+
s([
|
|
230
|
+
c({ type: Boolean, reflect: !0 })
|
|
231
|
+
], u.prototype, "emphasized", 2);
|
|
232
|
+
s([
|
|
233
|
+
c({ type: Boolean, reflect: !0 })
|
|
234
|
+
], u.prototype, "justified", 2);
|
|
235
|
+
s([
|
|
236
|
+
c({ type: String })
|
|
237
|
+
], u.prototype, "label", 2);
|
|
238
|
+
s([
|
|
239
|
+
c({ type: Boolean, reflect: !0 })
|
|
240
|
+
], u.prototype, "quiet", 2);
|
|
241
|
+
s([
|
|
242
|
+
c({ type: String })
|
|
243
|
+
], u.prototype, "selects", 2);
|
|
244
|
+
s([
|
|
245
|
+
c({ reflect: !0, attribute: "static-color" })
|
|
246
|
+
], u.prototype, "staticColor", 2);
|
|
247
|
+
s([
|
|
248
|
+
c({ type: Boolean, reflect: !0 })
|
|
249
|
+
], u.prototype, "vertical", 2);
|
|
250
|
+
s([
|
|
251
|
+
c({ type: Array })
|
|
252
|
+
], u.prototype, "selected", 1);
|
|
253
|
+
s([
|
|
254
|
+
b("slot")
|
|
255
|
+
], u.prototype, "slotElement", 2);
|
|
256
|
+
export {
|
|
257
|
+
u as L
|
|
258
|
+
};
|
|
@@ -15,57 +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
|
-
"use strict";
|
|
19
|
-
|
|
20
|
-
const icons = require("@luzmo/icons");
|
|
21
|
-
const lit = require("lit");
|
|
22
|
-
const decorators_js = require("lit/decorators.js");
|
|
23
|
-
const ifDefined_js = require("lit/directives/if-defined.js");
|
|
24
|
-
const observeSlotPresence = require("../observe-slot-presence-9AwLGUQ_.cjs");
|
|
25
|
-
const observeSlotText = require("../observe-slot-text-CSofZeeF.cjs");
|
|
26
|
-
const slottableRequestEvent = require("../slottable-request-event-CANixJnR.cjs");
|
|
27
|
-
const picker = require("../picker-DNde3awt.cjs");
|
|
28
|
-
require("../action-button/index.cjs");
|
|
29
|
-
require("../icon/index.cjs");
|
|
30
|
-
require("../overlay/index.cjs");
|
|
31
|
-
require("../popover/index.cjs");
|
|
32
|
-
const actionMenuStyles = ":host{display:inline-flex}:host([quiet]){min-width:0}:host>luzmo-menu{display:none}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{max-width:none}:host([dir=ltr]) ::slotted([slot=icon]),:host([dir=ltr]) .icon{margin-left:calc(-1 * (var(--luzmo-action-button-textonly-padding-left-adjusted) - var(--luzmo-action-button-padding-left-adjusted)))}:host([dir=rtl]) ::slotted([slot=icon]),:host([dir=rtl]) .icon{margin-right:calc(-1 * (var(--luzmo-action-button-textonly-padding-left-adjusted) - var(--luzmo-action-button-padding-left-adjusted)))}:host([dir]) slot[icon-only]::slotted([slot=icon]),:host([dir]) slot[icon-only] .icon{margin-inline:calc((var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)) - var(--luzmo-action-button-edge-to-visual-only, var(--action-button-edge-to-visual-only))) * -1)}luzmo-overlay:not(:defined){display:none}";
|
|
33
|
-
var __defProp = Object.defineProperty;
|
|
34
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
35
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
36
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
37
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
38
|
-
if (decorator = decorators[i])
|
|
39
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
40
|
-
if (kind && result) __defProp(target, key, result);
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
class LuzmoActionMenu extends observeSlotPresence.ObserveSlotPresence(
|
|
44
|
-
observeSlotText.ObserveSlotText(picker.LuzmoPickerBase, "label"),
|
|
45
|
-
'[slot="label-only"]'
|
|
46
|
-
) {
|
|
47
|
-
constructor() {
|
|
48
|
-
super(...arguments);
|
|
49
|
-
this.selects = void 0;
|
|
50
|
-
this.listRole = "menu";
|
|
51
|
-
this.itemRole = "menuitem";
|
|
52
|
-
this.handleSlottableRequest = (event) => {
|
|
53
|
-
this.dispatchEvent(new slottableRequestEvent.SlottableRequestEvent(event.name, event.data));
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
static get styles() {
|
|
57
|
-
return [lit.unsafeCSS(actionMenuStyles)];
|
|
58
|
-
}
|
|
59
|
-
get hasLabel() {
|
|
60
|
-
return this.slotHasContent;
|
|
61
|
-
}
|
|
62
|
-
get labelOnly() {
|
|
63
|
-
return this.slotContentIsPresent;
|
|
64
|
-
}
|
|
65
|
-
get buttonContent() {
|
|
66
|
-
return [
|
|
67
|
-
lit.html`
|
|
68
|
-
${this.labelOnly ? lit.html`` : lit.html`
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../luzmo-icons-CtA-TJPd.cjs"),o=require("../base-Cy0MQrPT.cjs"),b=require("../state-vf0PJN3_.cjs"),u=require("../if-defined-DaXWqfzc.cjs"),m=require("../observe-slot-presence-bc9chhsi.cjs"),p=require("../observe-slot-text-D2VAEFSd.cjs"),v=require("../slottable-request-event-BfUUt1Mh.cjs"),d=require("../picker-C0LvseZe.cjs");require("../action-button/index.cjs");require("../icon/index.cjs");require("../overlay/index.cjs");require("../popover/index.cjs");const y=":host{display:inline-flex}:host([quiet]){min-width:0}:host>luzmo-menu{display:none}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{max-width:none}:host([dir=ltr]) ::slotted([slot=icon]),:host([dir=ltr]) .icon{margin-left:calc(-1 * (var(--luzmo-action-button-textonly-padding-left-adjusted) - var(--luzmo-action-button-padding-left-adjusted)))}:host([dir=rtl]) ::slotted([slot=icon]),:host([dir=rtl]) .icon{margin-right:calc(-1 * (var(--luzmo-action-button-textonly-padding-left-adjusted) - var(--luzmo-action-button-padding-left-adjusted)))}:host([dir]) slot[icon-only]::slotted([slot=icon]),:host([dir]) slot[icon-only] .icon{margin-inline:calc((var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)) - var(--luzmo-action-button-edge-to-visual-only, var(--action-button-edge-to-visual-only))) * -1)}luzmo-overlay:not(:defined){display:none}";var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,c=(l,t,s,i)=>{for(var e=i>1?void 0:i?g(t,s):t,r=l.length-1,a;r>=0;r--)(a=l[r])&&(e=(i?a(t,s,e):a(e))||e);return i&&e&&f(t,s,e),e};class n extends m.ObserveSlotPresence(p.ObserveSlotText(d.LuzmoPickerBase,"label"),'[slot="label-only"]'){constructor(){super(...arguments),this.selects=void 0,this.listRole="menu",this.itemRole="menuitem",this.handleSlottableRequest=t=>{this.dispatchEvent(new v.SlottableRequestEvent(t.name,t.data))}}static get styles(){return[o.r(y)]}get hasLabel(){return this.slotHasContent}get labelOnly(){return this.slotContentIsPresent}get buttonContent(){return[o.x`
|
|
19
|
+
${this.labelOnly?o.x``:o.x`
|
|
69
20
|
<slot
|
|
70
21
|
name="icon"
|
|
71
22
|
slot="icon"
|
|
@@ -74,7 +25,7 @@ class LuzmoActionMenu extends observeSlotPresence.ObserveSlotPresence(
|
|
|
74
25
|
>
|
|
75
26
|
<luzmo-icon
|
|
76
27
|
class="icon"
|
|
77
|
-
.icon=${
|
|
28
|
+
.icon=${h.K}
|
|
78
29
|
size=${this.size}
|
|
79
30
|
></luzmo-icon>
|
|
80
31
|
</slot>
|
|
@@ -82,55 +33,24 @@ class LuzmoActionMenu extends observeSlotPresence.ObserveSlotPresence(
|
|
|
82
33
|
<slot name="label" ?hidden=${!this.hasLabel}></slot>
|
|
83
34
|
<slot name="label-only"></slot>
|
|
84
35
|
<slot name="tooltip" @slotchange=${this.handleTooltipSlotchange}></slot>
|
|
85
|
-
`
|
|
86
|
-
];
|
|
87
|
-
}
|
|
88
|
-
render() {
|
|
89
|
-
if (this.tooltipEl) {
|
|
90
|
-
this.tooltipEl.disabled = this.open;
|
|
91
|
-
}
|
|
92
|
-
return lit.html`
|
|
36
|
+
`]}render(){return this.tooltipEl&&(this.tooltipEl.disabled=this.open),o.x`
|
|
93
37
|
<luzmo-action-button
|
|
94
|
-
aria-describedby=${
|
|
38
|
+
aria-describedby=${d.DESCRIPTION_ID}
|
|
95
39
|
?quiet=${this.quiet}
|
|
96
|
-
static-color=${
|
|
40
|
+
static-color=${u.o(this.staticColor)}
|
|
97
41
|
aria-haspopup="true"
|
|
98
|
-
aria-controls=${
|
|
99
|
-
aria-expanded=${this.open
|
|
100
|
-
aria-label=${
|
|
42
|
+
aria-controls=${u.o(this.open?"menu":void 0)}
|
|
43
|
+
aria-expanded=${this.open?"true":"false"}
|
|
44
|
+
aria-label=${u.o(this.label||void 0)}
|
|
101
45
|
id="button"
|
|
102
46
|
class="button"
|
|
103
47
|
size=${this.size}
|
|
104
48
|
@blur=${this.handleButtonBlur}
|
|
105
49
|
@focus=${this.handleButtonFocus}
|
|
106
|
-
@keydown=${{
|
|
107
|
-
handleEvent: this.handleEnterKeydown,
|
|
108
|
-
capture: true
|
|
109
|
-
}}
|
|
50
|
+
@keydown=${{handleEvent:this.handleEnterKeydown,capture:!0}}
|
|
110
51
|
?disabled=${this.disabled}
|
|
111
52
|
>
|
|
112
53
|
${this.buttonContent}
|
|
113
54
|
</luzmo-action-button>
|
|
114
55
|
${this.renderMenu} ${this.renderDescriptionSlot}
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
update(changedProperties) {
|
|
118
|
-
if (changedProperties.has("invalid")) {
|
|
119
|
-
this.invalid = false;
|
|
120
|
-
}
|
|
121
|
-
super.update(changedProperties);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
__decorateClass([
|
|
125
|
-
decorators_js.property({ type: String })
|
|
126
|
-
], LuzmoActionMenu.prototype, "selects", 2);
|
|
127
|
-
__decorateClass([
|
|
128
|
-
decorators_js.property({ reflect: true, attribute: "static-color" })
|
|
129
|
-
], LuzmoActionMenu.prototype, "staticColor", 2);
|
|
130
|
-
__decorateClass([
|
|
131
|
-
decorators_js.state()
|
|
132
|
-
], LuzmoActionMenu.prototype, "labelOnly", 1);
|
|
133
|
-
if (!customElements.get("luzmo-action-menu")) {
|
|
134
|
-
customElements.define("luzmo-action-menu", LuzmoActionMenu);
|
|
135
|
-
}
|
|
136
|
-
exports.LuzmoActionMenu = LuzmoActionMenu;
|
|
56
|
+
`}update(t){t.has("invalid")&&(this.invalid=!1),super.update(t)}}c([o.n({type:String})],n.prototype,"selects",2);c([o.n({reflect:!0,attribute:"static-color"})],n.prototype,"staticColor",2);c([b.r()],n.prototype,"labelOnly",1);customElements.get("luzmo-action-menu")||customElements.define("luzmo-action-menu",n);exports.LuzmoActionMenu=n;
|
|
@@ -15,53 +15,42 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
initializeGlobalLuzmoCSSVariables();
|
|
27
|
-
import { luzmoEllipsisHorizontal } from "@luzmo/icons";
|
|
28
|
-
import { unsafeCSS, html } from "lit";
|
|
29
|
-
import { property, state } from "lit/decorators.js";
|
|
30
|
-
import { ifDefined } from "lit/directives/if-defined.js";
|
|
31
|
-
import { O as ObserveSlotPresence } from "../observe-slot-presence-DcMdoumP.js";
|
|
32
|
-
import { O as ObserveSlotText } from "../observe-slot-text-CjnkkBPn.js";
|
|
33
|
-
import { S as SlottableRequestEvent } from "../slottable-request-event-D9WzrdWv.js";
|
|
34
|
-
import { L as LuzmoPickerBase, D as DESCRIPTION_ID } from "../picker-PfUAF05y.js";
|
|
18
|
+
import { K as z } from "../luzmo-icons-CiSek5iM.js";
|
|
19
|
+
import { r as b, x as r, n as c } from "../base-CFWO09N1.js";
|
|
20
|
+
import { r as h } from "../state-DwIwYPvt.js";
|
|
21
|
+
import { o as a } from "../if-defined-DULpqYwi.js";
|
|
22
|
+
import { O as p } from "../observe-slot-presence-CmVi0zTc.js";
|
|
23
|
+
import { O as f } from "../observe-slot-text-C3moTjwy.js";
|
|
24
|
+
import { S as g } from "../slottable-request-event-DggLA4Rx.js";
|
|
25
|
+
import { L as x, D as v } from "../picker-W1qNmtsh.js";
|
|
35
26
|
import "../action-button/index.js";
|
|
36
27
|
import "../icon/index.js";
|
|
37
28
|
import "../overlay/index.js";
|
|
38
29
|
import "../popover/index.js";
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
45
|
-
if (decorator = decorators[i])
|
|
46
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
47
|
-
if (kind && result) __defProp(target, key, result);
|
|
48
|
-
return result;
|
|
30
|
+
const d = () => {
|
|
31
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
32
|
+
const l = document.createElement("style");
|
|
33
|
+
l.setAttribute("data-luzmo-vars", ""), l.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(l);
|
|
34
|
+
}
|
|
49
35
|
};
|
|
50
|
-
|
|
51
|
-
|
|
36
|
+
d();
|
|
37
|
+
const y = ":host{display:inline-flex}:host([quiet]){min-width:0}:host>luzmo-menu{display:none}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{max-width:none}:host([dir=ltr]) ::slotted([slot=icon]),:host([dir=ltr]) .icon{margin-left:calc(-1 * (var(--luzmo-action-button-textonly-padding-left-adjusted) - var(--luzmo-action-button-padding-left-adjusted)))}:host([dir=rtl]) ::slotted([slot=icon]),:host([dir=rtl]) .icon{margin-right:calc(-1 * (var(--luzmo-action-button-textonly-padding-left-adjusted) - var(--luzmo-action-button-padding-left-adjusted)))}:host([dir]) slot[icon-only]::slotted([slot=icon]),:host([dir]) slot[icon-only] .icon{margin-inline:calc((var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)) - var(--luzmo-action-button-edge-to-visual-only, var(--action-button-edge-to-visual-only))) * -1)}luzmo-overlay:not(:defined){display:none}";
|
|
38
|
+
var w = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, m = (l, o, n, t) => {
|
|
39
|
+
for (var e = t > 1 ? void 0 : t ? $(o, n) : o, u = l.length - 1, s; u >= 0; u--)
|
|
40
|
+
(s = l[u]) && (e = (t ? s(o, n, e) : s(e)) || e);
|
|
41
|
+
return t && e && w(o, n, e), e;
|
|
42
|
+
};
|
|
43
|
+
class i extends p(
|
|
44
|
+
f(x, "label"),
|
|
52
45
|
'[slot="label-only"]'
|
|
53
46
|
) {
|
|
54
47
|
constructor() {
|
|
55
|
-
super(...arguments)
|
|
56
|
-
|
|
57
|
-
this.listRole = "menu";
|
|
58
|
-
this.itemRole = "menuitem";
|
|
59
|
-
this.handleSlottableRequest = (event) => {
|
|
60
|
-
this.dispatchEvent(new SlottableRequestEvent(event.name, event.data));
|
|
48
|
+
super(...arguments), this.selects = void 0, this.listRole = "menu", this.itemRole = "menuitem", this.handleSlottableRequest = (o) => {
|
|
49
|
+
this.dispatchEvent(new g(o.name, o.data));
|
|
61
50
|
};
|
|
62
51
|
}
|
|
63
52
|
static get styles() {
|
|
64
|
-
return [
|
|
53
|
+
return [b(y)];
|
|
65
54
|
}
|
|
66
55
|
get hasLabel() {
|
|
67
56
|
return this.slotHasContent;
|
|
@@ -71,8 +60,8 @@ class LuzmoActionMenu extends ObserveSlotPresence(
|
|
|
71
60
|
}
|
|
72
61
|
get buttonContent() {
|
|
73
62
|
return [
|
|
74
|
-
|
|
75
|
-
${this.labelOnly ?
|
|
63
|
+
r`
|
|
64
|
+
${this.labelOnly ? r`` : r`
|
|
76
65
|
<slot
|
|
77
66
|
name="icon"
|
|
78
67
|
slot="icon"
|
|
@@ -81,7 +70,7 @@ class LuzmoActionMenu extends ObserveSlotPresence(
|
|
|
81
70
|
>
|
|
82
71
|
<luzmo-icon
|
|
83
72
|
class="icon"
|
|
84
|
-
.icon=${
|
|
73
|
+
.icon=${z}
|
|
85
74
|
size=${this.size}
|
|
86
75
|
></luzmo-icon>
|
|
87
76
|
</slot>
|
|
@@ -93,18 +82,15 @@ class LuzmoActionMenu extends ObserveSlotPresence(
|
|
|
93
82
|
];
|
|
94
83
|
}
|
|
95
84
|
render() {
|
|
96
|
-
|
|
97
|
-
this.tooltipEl.disabled = this.open;
|
|
98
|
-
}
|
|
99
|
-
return html`
|
|
85
|
+
return this.tooltipEl && (this.tooltipEl.disabled = this.open), r`
|
|
100
86
|
<luzmo-action-button
|
|
101
|
-
aria-describedby=${
|
|
87
|
+
aria-describedby=${v}
|
|
102
88
|
?quiet=${this.quiet}
|
|
103
|
-
static-color=${
|
|
89
|
+
static-color=${a(this.staticColor)}
|
|
104
90
|
aria-haspopup="true"
|
|
105
|
-
aria-controls=${
|
|
91
|
+
aria-controls=${a(this.open ? "menu" : void 0)}
|
|
106
92
|
aria-expanded=${this.open ? "true" : "false"}
|
|
107
|
-
aria-label=${
|
|
93
|
+
aria-label=${a(this.label || void 0)}
|
|
108
94
|
id="button"
|
|
109
95
|
class="button"
|
|
110
96
|
size=${this.size}
|
|
@@ -112,7 +98,7 @@ class LuzmoActionMenu extends ObserveSlotPresence(
|
|
|
112
98
|
@focus=${this.handleButtonFocus}
|
|
113
99
|
@keydown=${{
|
|
114
100
|
handleEvent: this.handleEnterKeydown,
|
|
115
|
-
capture:
|
|
101
|
+
capture: !0
|
|
116
102
|
}}
|
|
117
103
|
?disabled=${this.disabled}
|
|
118
104
|
>
|
|
@@ -121,25 +107,20 @@ class LuzmoActionMenu extends ObserveSlotPresence(
|
|
|
121
107
|
${this.renderMenu} ${this.renderDescriptionSlot}
|
|
122
108
|
`;
|
|
123
109
|
}
|
|
124
|
-
update(
|
|
125
|
-
|
|
126
|
-
this.invalid = false;
|
|
127
|
-
}
|
|
128
|
-
super.update(changedProperties);
|
|
110
|
+
update(o) {
|
|
111
|
+
o.has("invalid") && (this.invalid = !1), super.update(o);
|
|
129
112
|
}
|
|
130
113
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
],
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
],
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
],
|
|
140
|
-
|
|
141
|
-
customElements.define("luzmo-action-menu", LuzmoActionMenu);
|
|
142
|
-
}
|
|
114
|
+
m([
|
|
115
|
+
c({ type: String })
|
|
116
|
+
], i.prototype, "selects", 2);
|
|
117
|
+
m([
|
|
118
|
+
c({ reflect: !0, attribute: "static-color" })
|
|
119
|
+
], i.prototype, "staticColor", 2);
|
|
120
|
+
m([
|
|
121
|
+
h()
|
|
122
|
+
], i.prototype, "labelOnly", 1);
|
|
123
|
+
customElements.get("luzmo-action-menu") || customElements.define("luzmo-action-menu", i);
|
|
143
124
|
export {
|
|
144
|
-
LuzmoActionMenu
|
|
125
|
+
i as LuzmoActionMenu
|
|
145
126
|
};
|