@luzmo/lucero 1.0.1-alpha.15 → 1.0.1-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.cjs +183 -6
- package/components/accordion/index.js +136 -88
- package/components/action-bar/index.cjs +85 -4
- package/components/action-bar/index.js +72 -50
- package/components/action-button/index.cjs +205 -3
- package/components/action-button/index.js +167 -93
- package/components/action-group/index.cjs +7 -1
- package/components/action-group/index.js +12 -8
- package/components/action-group-DHp8RHDf.js +392 -0
- package/components/action-group-MPf19RPV.cjs +391 -0
- package/components/action-menu/index.cjs +91 -11
- package/components/action-menu/index.js +66 -47
- package/components/avatar/index.cjs +63 -3
- package/components/avatar/index.js +54 -42
- package/components/base-COw9n7UR.cjs +119 -0
- package/components/base-DmeVy0cq.js +120 -0
- package/components/button/index.cjs +134 -2
- package/components/button/index.js +106 -72
- package/components/button-base-7Ak55xFd.cjs +206 -0
- package/components/button-base-C3kf6BTK.js +207 -0
- package/components/button-group/index.cjs +45 -1
- package/components/button-group/index.js +37 -25
- package/components/calendar/index.cjs +632 -1
- package/components/calendar/index.js +637 -7
- package/components/checkbox/index.cjs +111 -4
- package/components/checkbox/index.js +98 -53
- package/components/checkbox-mixin-8cL-vfDy.js +84 -0
- package/components/checkbox-mixin-CE7dJj3J.cjs +83 -0
- package/components/clear-button-Co6oKSgl.js +59 -0
- package/components/clear-button-X_HDY2eH.cjs +58 -0
- package/components/close-button-DPBK6Kpu.cjs +59 -0
- package/components/close-button-Miw9ZjoJ.js +60 -0
- package/components/color-area/index.cjs +440 -13
- package/components/color-area/index.js +322 -187
- package/components/color-controller-BjDZaxhX.js +491 -0
- package/components/color-controller-C3c_vb2P.cjs +490 -0
- package/components/color-field/index.cjs +95 -2
- package/components/color-field/index.js +77 -41
- package/components/color-handle/index.cjs +64 -3
- package/components/color-handle/index.js +58 -37
- package/components/color-loupe/index.cjs +7 -1
- package/components/color-loupe/index.js +12 -8
- package/components/color-loupe-BQqNR8YD.cjs +88 -0
- package/components/color-loupe-B_DDFv8l.js +89 -0
- package/components/color-menu/index.cjs +217 -12
- package/components/color-menu/index.js +187 -93
- package/components/color-palette/index.cjs +89 -1
- package/components/color-palette/index.js +78 -51
- package/components/color-palette-group/index.cjs +259 -3
- package/components/color-palette-group/index.js +193 -105
- package/components/color-picker/index.cjs +114 -6
- package/components/color-picker/index.js +92 -72
- package/components/color-slider/index.cjs +585 -1
- package/components/color-slider/index.js +590 -7
- package/components/{directive-oAbCiebi.js → condition-attribute-with-id-Cn815e9W.js} +22 -22
- package/components/condition-attribute-with-id-DEc2Yjne.cjs +43 -0
- package/components/date-time-picker/index.cjs +1357 -31
- package/components/date-time-picker/index.js +951 -637
- package/components/dependency-manger-CcIE1uvQ.cjs +63 -0
- package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-XHpQjFgK.js} +24 -14
- package/components/divider/index.cjs +54 -1
- package/components/divider/index.js +49 -30
- package/components/divider.module-Cm5LcDRV.cjs +20 -0
- package/components/divider.module-DauH6k2_.js +21 -0
- package/components/element-resolution-DCsrhGZO.cjs +112 -0
- package/components/element-resolution-nMlmW4Jy.js +113 -0
- package/components/field-group/index.cjs +7 -1
- package/components/field-group/index.js +12 -8
- package/components/field-group-DNmY8W9v.cjs +86 -0
- package/components/field-group-DVdAWCQF.js +87 -0
- package/components/field-label/index.cjs +7 -1
- package/components/field-label/index.js +12 -8
- package/components/field-label-CKH9EXpR.cjs +156 -0
- package/components/field-label-Dpsecoc6.js +157 -0
- package/components/focus-group-BqDAk9Is.js +337 -0
- package/components/focus-group-DFzOlalL.cjs +336 -0
- package/components/focus-visible-B-B8-P9R.cjs +104 -0
- package/components/focus-visible-BUPRWlsh.js +105 -0
- package/components/focusable-BPrTcZPd.cjs +262 -0
- package/components/focusable-ChCLg1k4.js +263 -0
- package/components/{directive-C7oCP5Bh.cjs → focusable-selectors-D0t_5P7C.cjs} +16 -5
- package/components/{focusable-selectors-B4YgbghQ.js → focusable-selectors-IltOAOd9.js} +7 -4
- package/components/icon/index.cjs +90 -1
- package/components/icon/index.js +74 -46
- package/components/index.cjs +174 -1
- package/components/index.js +174 -172
- package/components/infield-button/index.cjs +46 -2
- package/components/infield-button/index.js +41 -30
- package/components/label/index.cjs +37 -1
- package/components/label/index.js +36 -24
- package/components/{language-resolution-8yZa5r_P.js → language-resolution-BSGJAWiQ.js} +21 -16
- package/components/language-resolution-iN9EImbb.cjs +57 -0
- package/components/like-anchor-D62faRNG.cjs +79 -0
- package/components/like-anchor-v3cJ9RWM.js +80 -0
- package/components/manage-help-text-BYx84zZR.cjs +125 -0
- package/components/manage-help-text-DOuMTGht.js +126 -0
- package/components/menu/index.cjs +1297 -29
- package/components/menu/index.js +954 -499
- package/components/multi-language-field/index.cjs +132 -2
- package/components/multi-language-field/index.js +118 -88
- package/components/number-field/index.cjs +613 -10
- package/components/number-field/index.js +442 -243
- package/components/observe-slot-presence-9AwLGUQ_.cjs +78 -0
- package/components/observe-slot-presence-DcMdoumP.js +79 -0
- package/components/observe-slot-text-CSofZeeF.cjs +104 -0
- package/components/observe-slot-text-CjnkkBPn.js +105 -0
- package/components/options/index.cjs +693 -60
- package/components/options/index.js +519 -953
- package/components/overlay/index.cjs +367 -21
- package/components/overlay/index.js +273 -189
- package/components/overlay-CN8ISP1F.js +2485 -0
- package/components/overlay-LViy9VWM.cjs +2484 -0
- package/components/{pending-state-DTX7ggyF.js → pending-state-CXbe-Xul.js} +28 -13
- package/components/pending-state-e4RbXe9u.cjs +75 -0
- package/components/picker/index.cjs +9 -1
- package/components/picker/index.js +15 -11
- package/components/picker-DNde3awt.cjs +672 -0
- package/components/picker-PfUAF05y.js +673 -0
- package/components/picker-button/index.cjs +56 -4
- package/components/picker-button/index.js +45 -34
- package/components/platform-CxDar3Dn.cjs +68 -0
- package/components/platform-Cxn0WbyT.js +69 -0
- package/components/popover/index.cjs +7 -1
- package/components/popover/index.js +12 -8
- package/components/popover-BkbYhl3i.js +74 -0
- package/components/popover-BkgUf0kL.cjs +74 -0
- package/components/progress-circle/index.cjs +7 -1
- package/components/progress-circle/index.js +12 -8
- package/components/progress-circle-Hu_ivPHf.js +133 -0
- package/components/progress-circle-_Etqsj9f.cjs +132 -0
- package/components/radio/index.cjs +244 -2
- package/components/radio/index.js +192 -110
- package/components/{when-CDK1Tt5Y.js → random-id-BE6HA503.cjs} +7 -10
- package/components/{random-id-ByCz1xaq.js → random-id-BEc6QIUL.js} +3 -3
- package/components/roving-tabindex-AsmAh2In.cjs +95 -0
- package/components/roving-tabindex-DPF9NmrH.js +96 -0
- package/components/search/index.cjs +115 -8
- package/components/search/index.js +96 -66
- package/components/select/index.cjs +720 -51
- package/components/select/index.js +563 -347
- package/components/sized-mixin-DmkrNdWB.js +80 -0
- package/components/sized-mixin-UaTVa-AE.cjs +79 -0
- package/components/slider/index.cjs +119 -1
- package/components/slider/index.js +100 -1113
- package/components/{condition-attribute-with-id-Dv4lSRbe.js → slottable-request-event-CANixJnR.cjs} +15 -13
- package/components/{slottable-request-event-DggLA4Rx.js → slottable-request-event-D9WzrdWv.js} +12 -9
- package/components/strategies-DlMlaSJR.cjs +317 -0
- package/components/strategies-DlPQoTFE.js +318 -0
- package/components/streaming-listener-D4sHaMub.cjs +145 -0
- package/components/streaming-listener-cAz5zJyk.js +146 -0
- package/components/swatch/index.cjs +436 -7
- package/components/swatch/index.js +350 -205
- package/components/switch/index.cjs +61 -2
- package/components/switch/index.js +51 -34
- package/components/tabs/index.cjs +693 -26
- package/components/tabs/index.js +521 -388
- package/components/tags/index.cjs +201 -4
- package/components/tags/index.js +152 -87
- package/components/text-field/index.cjs +49 -3
- package/components/text-field/index.js +44 -30
- package/components/text-field-11tcnftU.cjs +338 -0
- package/components/text-field-Chi9J2Cz.js +339 -0
- package/components/text-field.module-CMBS0jSL.js +21 -0
- package/components/text-field.module-DIJdV_sA.cjs +20 -0
- package/components/toast/index.cjs +177 -12
- package/components/toast/index.js +145 -73
- package/components/tooltip/index.cjs +221 -6
- package/components/tooltip/index.js +155 -131
- package/components/tooltip/tooltip.d.ts +1 -12
- package/components/unit-input/index.cjs +232 -8
- package/components/unit-input/index.js +201 -108
- package/components/utils.cjs +25 -1
- package/components/utils.js +22 -22
- package/custom-elements.json +1 -1
- package/package.json +1 -1
- package/components/NumberFormatter-DewVDY5w.cjs +0 -18
- package/components/NumberFormatter-DgOUVrge.js +0 -136
- package/components/NumberParser-Dik4a0h-.cjs +0 -18
- package/components/NumberParser-ci9J5EKv.js +0 -173
- package/components/action-group-DBImibFn.js +0 -258
- package/components/action-group-DJGMcRHb.cjs +0 -20
- package/components/async-directive-BX1T1e1_.cjs +0 -22
- package/components/async-directive-BfcqVjDp.js +0 -82
- package/components/base-BjTwmyRF.cjs +0 -22
- package/components/base-CBCg3yyw.cjs +0 -40
- package/components/base-D76d76ww.js +0 -26
- package/components/base-WsynuqaS.js +0 -677
- package/components/button-base-DbkDzb71.js +0 -144
- package/components/button-base-XgPLmwP-.cjs +0 -25
- package/components/checkbox-mixin-BDN0dBtS.cjs +0 -27
- package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
- package/components/class-map-Di1D_rCm.cjs +0 -22
- package/components/class-map-NbVXqBU0.js +0 -51
- package/components/clear-button-BbVqNU-g.js +0 -53
- package/components/clear-button-DYdeFsS8.cjs +0 -18
- package/components/close-button-CpfKibqg.cjs +0 -18
- package/components/close-button-DzOZZmkY.js +0 -51
- package/components/color-controller-B0uX6Zso.js +0 -3230
- package/components/color-controller-CoUL5f9K.cjs +0 -18
- package/components/color-loupe-CaA_Lfkk.cjs +0 -56
- package/components/color-loupe-CmMsXbjT.js +0 -81
- package/components/condition-attribute-with-id-DrQYZzFS.cjs +0 -18
- package/components/dependency-manger-C5HCkMMB.cjs +0 -18
- package/components/directive-helpers-Cm6gitnu.js +0 -62
- package/components/directive-helpers-DyIRTWwA.cjs +0 -22
- package/components/divider.module-DDvBo9zo.cjs +0 -18
- package/components/divider.module-DoQWQEIJ.js +0 -21
- package/components/element-resolution-BvRLGqIU.cjs +0 -18
- package/components/element-resolution-FCUT-wql.js +0 -91
- package/components/field-group-DXfBWrkO.js +0 -66
- package/components/field-group-DkGst3r5.cjs +0 -23
- package/components/field-label-CZ2zzChK.js +0 -106
- package/components/field-label-mO1AkUgR.cjs +0 -25
- package/components/flow-D-0MTYCm.js +0 -527
- package/components/flow-DM3dNAKs.cjs +0 -30
- package/components/focus-group-DHeTq18L.js +0 -218
- package/components/focus-group-DnxZUBhQ.cjs +0 -18
- package/components/focus-visible-B0P9aY_G.cjs +0 -18
- package/components/focus-visible-DBlJGoEW.js +0 -74
- package/components/focusable-BxtpnzWp.js +0 -153
- package/components/focusable-EbipgXRh.cjs +0 -18
- package/components/focusable-selectors-BgFlyFcY.cjs +0 -18
- package/components/if-defined-C9YGdo33.cjs +0 -22
- package/components/if-defined-DOaE2coe.js +0 -27
- package/components/index-BQoI8AD3.cjs +0 -113
- package/components/index-BwxgAdzi.cjs +0 -57
- package/components/index-Cb9zsiz6.js +0 -1490
- package/components/index-HjQa8tew.js +0 -1174
- package/components/language-resolution-DJzmyzZq.cjs +0 -18
- package/components/like-anchor-Bvn_vLQ8.js +0 -69
- package/components/like-anchor-sod1C1fR.cjs +0 -32
- package/components/luzmo-icons-D47EGj-3.cjs +0 -29
- package/components/luzmo-icons-NEyaMpEM.js +0 -229
- package/components/manage-help-text-DhgARkZX.cjs +0 -30
- package/components/manage-help-text-syYnjKGL.js +0 -92
- package/components/mutation-controller-DH7YOCyj.js +0 -52
- package/components/mutation-controller-DkOMCW-c.cjs +0 -22
- package/components/observe-slot-presence-CmVi0zTc.js +0 -68
- package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
- package/components/observe-slot-text-BPfIQQtz.js +0 -87
- package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
- package/components/overlay-Cig9r6uU.js +0 -2747
- package/components/overlay-KSKMzzkh.cjs +0 -47
- package/components/pending-state-CaH1si5b.cjs +0 -26
- package/components/picker-CAYj4hBD.js +0 -461
- package/components/picker-apS0Zrly.cjs +0 -123
- package/components/platform-BM-uMWpX.js +0 -69
- package/components/platform-BiXhwqk3.cjs +0 -18
- package/components/popover-DjX0aAnY.js +0 -67
- package/components/popover-KFfO0IYL.cjs +0 -30
- package/components/progress-circle-BvRJNuNo.cjs +0 -33
- package/components/progress-circle-DXH9z8-6.js +0 -97
- package/components/query-BL-TJj7K.cjs +0 -22
- package/components/query-D_KR_GUc.js +0 -51
- package/components/query-assigned-elements-DjfhL1cl.js +0 -36
- package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
- package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
- package/components/query-assigned-nodes-C76XVPWY.js +0 -36
- package/components/random-id-CqvckpWe.cjs +0 -18
- package/components/roving-tabindex-By_fCy_e.cjs +0 -18
- package/components/roving-tabindex-DOg4z6ZU.js +0 -66
- package/components/sized-mixin-CPxE5C96.cjs +0 -18
- package/components/sized-mixin-D4ACoVUr.js +0 -63
- package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
- package/components/state-D8JEtYqe.cjs +0 -22
- package/components/state-Deh-vKYE.js +0 -29
- package/components/strategies-9indNIEb.js +0 -195
- package/components/strategies-BACP6MhR.cjs +0 -18
- package/components/streaming-listener-B00MvALi.cjs +0 -18
- package/components/streaming-listener-CP-JE6Fa.js +0 -91
- package/components/style-map-CeilmSgs.cjs +0 -22
- package/components/style-map-IgqIKvlE.js +0 -53
- package/components/text-field-BYF2RHY8.cjs +0 -85
- package/components/text-field-PYafEYeO.js +0 -314
- package/components/text-field.module-C2KVUJcX.js +0 -21
- package/components/text-field.module-DXhFA9G-.cjs +0 -18
- package/components/when-CDZyJPvd.cjs +0 -22
|
@@ -15,26 +15,185 @@
|
|
|
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
|
-
|
|
18
|
+
"use strict";
|
|
19
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
20
|
+
const lit = require("lit");
|
|
21
|
+
const property_js = require("lit/decorators/property.js");
|
|
22
|
+
const base = require("../base-COw9n7UR.cjs");
|
|
23
|
+
const focusVisible = require("../focus-visible-B-B8-P9R.cjs");
|
|
24
|
+
const observeSlotPresence = require("../observe-slot-presence-9AwLGUQ_.cjs");
|
|
25
|
+
const observeSlotText = require("../observe-slot-text-CSofZeeF.cjs");
|
|
26
|
+
const randomId = require("../random-id-BE6HA503.cjs");
|
|
27
|
+
const intersectionController_js = require("@lit-labs/observers/intersection-controller.js");
|
|
28
|
+
const resizeController_js = require("@lit-labs/observers/resize-controller.js");
|
|
29
|
+
const decorators_js = require("lit/decorators.js");
|
|
30
|
+
const classMap_js = require("lit/directives/class-map.js");
|
|
31
|
+
const ifDefined_js = require("lit/directives/if-defined.js");
|
|
32
|
+
const sizedMixin = require("../sized-mixin-UaTVa-AE.cjs");
|
|
33
|
+
const focusable = require("../focusable-BPrTcZPd.cjs");
|
|
34
|
+
const rovingTabindex = require("../roving-tabindex-AsmAh2In.cjs");
|
|
35
|
+
const icons = require("@luzmo/icons");
|
|
36
|
+
require("../action-button/index.cjs");
|
|
37
|
+
require("../icon/index.cjs");
|
|
38
|
+
const tabItemStyles = ':host{font-family:var(--luzmo-tab-font-family, var(--luzmo-font-family));box-sizing:border-box;block-size:calc(var(--luzmo-tabs-item-height, var(--tabs-item-height)) - var(--luzmo-tabs-divider-size, var(--tabs-divider-size)));z-index:1;white-space:nowrap;color:var(--highcontrast-tabs-color, var(--luzmo-tabs-color, var(--tabs-color)));transition:color var(--luzmo-tabs-animation-duration, var(--tabs-animation-duration)) ease-out;cursor:pointer;outline:none;-webkit-text-decoration:none;text-decoration:none;position:relative}::slotted([slot=icon]){block-size:var(--luzmo-tabs-icon-size, var(--tabs-icon-size));inline-size:var(--luzmo-tabs-icon-size, var(--tabs-icon-size));margin-block-start:var(--luzmo-tabs-top-to-icon, var(--tabs-top-to-icon))}[name=icon]+#item-label{margin-inline-start:var(--luzmo-tabs-icon-to-text, var(--tabs-icon-to-text))}:host:before{content:"";box-sizing:border-box;block-size:calc(100% - var(--luzmo-tabs-top-to-text, var(--tabs-top-to-text)));inline-size:calc(100% + var(--luzmo-tabs-focus-indicator-gap, var(--tabs-focus-indicator-gap)) * 2);border:var(--luzmo-tabs-focus-indicator-width, var(--tabs-focus-indicator-width)) solid transparent;border-radius:var(--luzmo-tabs-focus-indicator-border-radius, var(--tabs-focus-indicator-border-radius));pointer-events:none;position:absolute;inset-block-start:calc(var(--luzmo-tabs-top-to-text, var(--tabs-top-to-text)) / 2);inset-inline-start:calc(var(--luzmo-tabs-focus-indicator-gap, var(--tabs-focus-indicator-gap)) * -1);inset-inline-end:calc(var(--luzmo-tabs-focus-indicator-gap, var(--tabs-focus-indicator-gap)) * -1)}@media (hover: hover){:host(:hover){color:var(--highcontrast-tabs-color-hover, var(--luzmo-tabs-color-hover, var(--tabs-color-hover)))}}:host([selected]){color:var(--highcontrast-tabs-color-selected, var(--luzmo-tabs-color-selected, var(--tabs-color-selected)))}:host([disabled]){cursor:default;color:var(--highcontrast-tabs-color-disabled, var(--luzmo-tabs-color-disabled, var(--tabs-color-disabled)))}:host([disabled]) #item-label{cursor:default}:host(:focus-visible){color:var(--highcontrast-tabs-color-key-focus, var(--luzmo-tabs-color-key-focus, var(--tabs-color-key-focus)))}:host(:focus-visible):before{border-color:var(--highcontrast-tabs-focus-indicator-color, var(--luzmo-tabs-focus-indicator-color, var(--tabs-focus-indicator-color)))}#item-label{cursor:pointer;vertical-align:top;font-family:var(--luzmo-tabs-font-family, var(--tabs-font-family));font-style:var(--luzmo-tabs-font-style, var(--tabs-font-style));font-size:var(--luzmo-tabs-font-size, var(--tabs-font-size));font-weight:var(--luzmo-tabs-font-weight, var(--tabs-font-weight));line-height:var(--luzmo-tabs-line-height, var(--tabs-line-height));margin-block-start:var(--luzmo-tabs-top-to-text, var(--tabs-top-to-text));margin-block-end:var(--luzmo-tabs-bottom-to-text, var(--tabs-bottom-to-text));-webkit-text-decoration:none;text-decoration:none;display:inline-block}#item-label:empty{display:none}:host{scroll-margin-inline:var(--luzmo-tabs-item-horizontal-spacing, var(--tabs-item-horizontal-spacing))}:host([disabled]){pointer-events:none}#item-label[hidden]{display:none}@media (forced-colors: active){:host:before{background-color:ButtonFace}:host ::slotted([slot=icon]){z-index:1;position:relative;color:inherit}#item-label{position:relative;z-index:1}:host([selected]){color:HighlightText}:host([selected]) ::slotted([slot=icon]){color:HighlightText}:host([selected]) #item-label{color:HighlightText}}:host([vertical]){display:flex;flex-direction:column;justify-content:center;align-items:center;height:auto}:host([dir][vertical]) slot[name=icon]+#item-label{margin-inline-start:0;margin-block:calc(var(--luzmo-tabs-top-to-text, var(--tabs-top-to-text)) / 2) calc(var(--luzmo-tabs-bottom-to-text, var(--tabs-bottom-to-text)) / 2)}:host([vertical]) ::slotted([slot=icon]){margin-block-start:calc(var(--luzmo-tabs-top-to-icon, var(--tabs-top-to-icon)) / 2)}';
|
|
39
|
+
var __defProp$3 = Object.defineProperty;
|
|
40
|
+
var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
41
|
+
var result = void 0;
|
|
42
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
43
|
+
if (decorator = decorators[i])
|
|
44
|
+
result = decorator(target, key, result) || result;
|
|
45
|
+
if (result) __defProp$3(target, key, result);
|
|
46
|
+
return result;
|
|
47
|
+
};
|
|
48
|
+
class LuzmoTab extends focusVisible.FocusVisiblePolyfillMixin(
|
|
49
|
+
observeSlotText.ObserveSlotText(observeSlotPresence.ObserveSlotPresence(base.LuzmoElement, '[slot="icon"]'), "")
|
|
50
|
+
) {
|
|
51
|
+
constructor() {
|
|
52
|
+
super(...arguments);
|
|
53
|
+
this.disabled = false;
|
|
54
|
+
this.label = "";
|
|
55
|
+
this.selected = false;
|
|
56
|
+
this.vertical = false;
|
|
57
|
+
this.value = "";
|
|
58
|
+
}
|
|
59
|
+
static get styles() {
|
|
60
|
+
return [lit.unsafeCSS(tabItemStyles)];
|
|
61
|
+
}
|
|
62
|
+
get hasIcon() {
|
|
63
|
+
return this.slotContentIsPresent;
|
|
64
|
+
}
|
|
65
|
+
get hasLabel() {
|
|
66
|
+
return !!this.label || this.slotHasContent;
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
return lit.html`
|
|
70
|
+
${this.hasIcon ? lit.html` <slot name="icon"></slot> ` : lit.nothing}
|
|
20
71
|
<label id="item-label" ?hidden=${!this.hasLabel}>
|
|
21
|
-
${this.slotHasContent?
|
|
72
|
+
${this.slotHasContent ? lit.nothing : this.label}
|
|
22
73
|
<slot>${this.label}</slot>
|
|
23
74
|
</label>
|
|
24
|
-
|
|
75
|
+
`;
|
|
76
|
+
}
|
|
77
|
+
firstUpdated(changes) {
|
|
78
|
+
super.firstUpdated(changes);
|
|
79
|
+
this.setAttribute("role", "tab");
|
|
80
|
+
if (!this.hasAttribute("id")) {
|
|
81
|
+
this.id = `luzmo-tab-${randomId.randomID()}`;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
updated(changes) {
|
|
85
|
+
super.updated(changes);
|
|
86
|
+
if (changes.has("selected")) {
|
|
87
|
+
this.setAttribute("aria-selected", this.selected ? "true" : "false");
|
|
88
|
+
this.setAttribute("tabindex", this.selected ? "0" : "-1");
|
|
89
|
+
}
|
|
90
|
+
if (changes.has("disabled")) {
|
|
91
|
+
if (this.disabled) {
|
|
92
|
+
this.setAttribute("aria-disabled", "true");
|
|
93
|
+
} else {
|
|
94
|
+
this.removeAttribute("aria-disabled");
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
__decorateClass$3([
|
|
100
|
+
property_js.property({ type: Boolean, reflect: true })
|
|
101
|
+
], LuzmoTab.prototype, "disabled");
|
|
102
|
+
__decorateClass$3([
|
|
103
|
+
property_js.property({ reflect: true })
|
|
104
|
+
], LuzmoTab.prototype, "label");
|
|
105
|
+
__decorateClass$3([
|
|
106
|
+
property_js.property({ type: Boolean, reflect: true })
|
|
107
|
+
], LuzmoTab.prototype, "selected");
|
|
108
|
+
__decorateClass$3([
|
|
109
|
+
property_js.property({ type: Boolean, reflect: true })
|
|
110
|
+
], LuzmoTab.prototype, "vertical");
|
|
111
|
+
__decorateClass$3([
|
|
112
|
+
property_js.property({ type: String, reflect: true })
|
|
113
|
+
], LuzmoTab.prototype, "value");
|
|
114
|
+
const panelStyles = ":host{display:inline-flex;font-family:var(--luzmo-tab-panel-font-family, var(--luzmo-font-family))}:host(:not([selected])){display:none}:host(:focus-visible){outline:var(--luzmo-tab-panel-indicator-color, var(--luzmo-indicator-color)) solid var(--luzmo-tab-panel-indicator-width, var(--luzmo-indicator-width))}";
|
|
115
|
+
var __defProp$2 = Object.defineProperty;
|
|
116
|
+
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
117
|
+
var result = void 0;
|
|
118
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
119
|
+
if (decorator = decorators[i])
|
|
120
|
+
result = decorator(target, key, result) || result;
|
|
121
|
+
if (result) __defProp$2(target, key, result);
|
|
122
|
+
return result;
|
|
123
|
+
};
|
|
124
|
+
class LuzmoTabPanel extends base.LuzmoElement {
|
|
125
|
+
constructor() {
|
|
126
|
+
super(...arguments);
|
|
127
|
+
this.selected = false;
|
|
128
|
+
this.value = "";
|
|
129
|
+
}
|
|
130
|
+
static get styles() {
|
|
131
|
+
return [lit.unsafeCSS(panelStyles)];
|
|
132
|
+
}
|
|
133
|
+
handleFocusin() {
|
|
134
|
+
this.removeAttribute("tabindex");
|
|
135
|
+
}
|
|
136
|
+
handleFocusout() {
|
|
137
|
+
this.tabIndex = this.selected ? 0 : -1;
|
|
138
|
+
}
|
|
139
|
+
render() {
|
|
140
|
+
return lit.html`
|
|
25
141
|
<slot
|
|
26
142
|
@focusin=${this.handleFocusin}
|
|
27
143
|
@focusout=${this.handleFocusout}
|
|
28
144
|
></slot>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
*/class C{constructor(t,{target:o,config:i,callback:e,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,o!==null&&this.t.add(o??t),this.l=i,this.o=a??this.o,this.callback=e,window.ResizeObserver?(this.u=new ResizeObserver(r=>{this.handleChanges(r),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var o;this.value=(o=this.callback)==null?void 0:o.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}const T="#list{--tabs-item-height: calc( var(--luzmo-component-height) + var(--luzmo-spacing-5) );--tabs-item-horizontal-spacing: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-3) );--tabs-item-vertical-spacing: var(--luzmo-spacing-2);--tabs-start-to-edge: var(--luzmo-spacing-4);--tabs-top-to-text: calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--tabs-bottom-to-text: calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--tabs-icon-size: var(--luzmo-icon-size-s);--tabs-icon-to-text: var(--luzmo-spacing-3);--tabs-top-to-icon: var(--luzmo-spacing-4);--tabs-focus-indicator-gap: var(--luzmo-spacing-3);--tabs-font-size: var(--luzmo-font-size)}:host([size=s]) #list{--tabs-item-height: calc( var(--luzmo-component-height-s) + var(--luzmo-spacing-4) );--tabs-item-horizontal-spacing: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--tabs-item-vertical-spacing: var(--luzmo-spacing-2);--tabs-start-to-edge: var(--luzmo-spacing-4);--tabs-top-to-text: calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--tabs-bottom-to-text: var(--luzmo-spacing-4);--tabs-icon-size: var(--luzmo-icon-size-xs);--tabs-icon-to-text: var(--luzmo-spacing-3);--tabs-top-to-icon: var(--luzmo-spacing-4);--tabs-focus-indicator-gap: var(--luzmo-spacing-3);--tabs-font-size: var(--luzmo-font-size-s)}:host([size=l]) #list{--tabs-item-height: calc( var(--luzmo-component-height-l) + var(--luzmo-spacing-5) );--tabs-item-horizontal-spacing: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-4) );--tabs-item-vertical-spacing: var(--luzmo-spacing-2);--tabs-start-to-edge: calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--tabs-top-to-text: calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--tabs-bottom-to-text: calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--tabs-icon-size: var(--luzmo-icon-size-m);--tabs-icon-to-text: calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--tabs-top-to-icon: var(--luzmo-spacing-5);--tabs-focus-indicator-gap: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--tabs-font-size: var(--luzmo-font-size-l)}:host([size=xl]) #list{--tabs-item-height: calc( var(--luzmo-component-height-xl) + var(--luzmo-spacing-5) );--tabs-item-horizontal-spacing: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-4) );--tabs-item-vertical-spacing: var(--luzmo-spacing-2);--tabs-start-to-edge: calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--tabs-top-to-text: calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--tabs-bottom-to-text: calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--tabs-icon-size: var(--luzmo-icon-size-l);--tabs-icon-to-text: calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--tabs-top-to-icon: var(--luzmo-spacing-5);--tabs-focus-indicator-gap: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--tabs-font-size: var(--luzmo-font-size-xl)}:host([compact]) #list{--luzmo-tabs-item-height: var( --luzmo-tabs-item-height-compact, var(--luzmo-component-height) );--luzmo-tabs-top-to-text: var( --luzmo-tabs-top-to-text-compact, calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1)) );--luzmo-tabs-bottom-to-text: var( --luzmo-tabs-bottom-to-text-compact, calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1)) );--luzmo-tabs-top-to-icon: var( --luzmo-tabs-top-to-icon-compact, var(--luzmo-spacing-2) )}:host([size=s][compact]) #list{--luzmo-tabs-item-height: var( --luzmo-tabs-item-height-compact, var(--luzmo-component-height-s) );--luzmo-tabs-top-to-text: var( --luzmo-tabs-top-to-text-compact, var(--luzmo-spacing-2) );--luzmo-tabs-bottom-to-text: var( --luzmo-tabs-bottom-to-text-compact, var(--luzmo-spacing-2) );--luzmo-tabs-top-to-icon: var( --luzmo-tabs-top-to-icon-compact, var(--luzmo-spacing-1) )}:host([size=l][compact]) #list{--luzmo-tabs-item-height: var( --luzmo-tabs-item-height-compact, var(--luzmo-component-height-l) );--luzmo-tabs-top-to-text: var( --luzmo-tabs-top-to-text-compact, calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1)) );--luzmo-tabs-bottom-to-text: var( --luzmo-tabs-bottom-to-text-compact, calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1)) );--luzmo-tabs-top-to-icon: var( --luzmo-tabs-top-to-icon-compact, calc(var(--luzmo-spacing-3)) )}:host([size=xl][compact]) #list{--luzmo-tabs-item-height: var( --luzmo-tabs-item-height-compact, var(--luzmo-component-height-xl) );--luzmo-tabs-top-to-text: var( --luzmo-tabs-top-to-text-compact, var(--luzmo-spacing-4) );--luzmo-tabs-bottom-to-text: var( --luzmo-tabs-bottom-to-text-compact, var(--luzmo-spacing-4) );--luzmo-tabs-top-to-icon: var( --luzmo-tabs-top-to-icon-compact, calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1)) )}",F="#list{--tabs-color: var(--luzmo-font-color);--tabs-color-selected: var(--luzmo-font-color-down);--tabs-color-hover: var(--luzmo-font-color-hover);--tabs-color-key-focus: var(--luzmo-font-color-focus);--tabs-color-disabled: var(--luzmo-disabled-color);--tabs-font-family: var(--luzmo-font-family);--tabs-font-style: var(--luzmo-font-style);--tabs-font-size: var(--luzmo-font-size);--tabs-line-height: var(--luzmo-line-height);--tabs-focus-indicator-width: var(--luzmo-indicator-width);--tabs-focus-indicator-border-radius: var(--luzmo-border-radius);--tabs-focus-indicator-color: var(--luzmo-indicator-color);--tabs-selection-indicator-color: var(--luzmo-font-color-down);--tabs-list-background-direction: top;--tabs-divider-size: 2px;--tabs-divider-border-radius: 1px;--tabs-animation-duration: var(--luzmo-animation-duration);--tabs-animation-ease: ease-in-out}:host([emphasized]) #list{--luzmo-tabs-color-selected: var( --luzmo-tabs-color-selected-emphasized, var(--luzmo-primary) );--luzmo-tabs-color-hover: var( --luzmo-tabs-color-hover-emphasized, var(--luzmo-primary-hover) );--luzmo-tabs-color-key-focus: var( --luzmo-tabs-color-key-focus-emphasized, var(--luzmo-primary-focus) );--luzmo-tabs-selection-indicator-color: var( --luzmo-tabs-selection-indicator-color-emphasized, var(--luzmo-primary-down) )}:host([direction^=vertical]) #list{--luzmo-tabs-list-background-direction: var( --luzmo-tabs-list-background-direction-vertical, right )}:host([direction^=vertical-right]) #list{--luzmo-tabs-list-background-direction: var( --luzmo-tabs-list-background-direction-vertical-right, left )}:host([direction^=vertical]) #list:dir(rtl),:host([dir=rtl][direction^=vertical]) #list{--luzmo-tabs-list-background-direction: var( --luzmo-tabs-list-background-direction-vertical, left )}:host([direction^=vertical-right]) #list:dir(rtl),:host([dir=rtl][direction^=vertical-right]) #list{--luzmo-tabs-list-background-direction: var( --luzmo-tabs-list-background-direction-vertical, right )}#list{z-index:0;vertical-align:top;background:linear-gradient(to var(--luzmo-tabs-list-background-direction, var(--tabs-list-background-direction)),var(--highcontrast-tabs-divider-background-color, var(--luzmo-tabs-divider-background-color, var(--tabs-divider-background-color))) 0 var(--luzmo-tabs-divider-size, var(--tabs-divider-size)),transparent var(--luzmo-tabs-divider-size, var(--tabs-divider-size)));margin:0;padding-block:0;display:flex;position:relative}::slotted([selected]:not([slot])){color:var(--highcontrast-tabs-color-selected, var(--luzmo-tabs-color-selected, var(--tabs-color-selected)))}::slotted([disabled]:not([slot])){cursor:default;color:var(--highcontrast-tabs-color-disabled, var(--luzmo-tabs-color-disabled, var(--tabs-color-disabled)))}#selection-indicator{background-color:var(--highcontrast-tabs-selection-indicator-color, var(--luzmo-tabs-selection-indicator-color, var(--tabs-selection-indicator-color)));z-index:0;transition:transform var(--luzmo-tabs-animation-duration, var(--tabs-animation-duration)) var(--luzmo-tabs-animation-ease, var(--tabs-animation-ease));transform-origin:0 0;border-radius:var(--luzmo-tabs-divider-border-radius, var(--tabs-divider-border-radius));position:absolute;inset-inline-start:0}:host([direction^=horizontal]) #list{align-items:center}:host([direction^=horizontal]) #list ::slotted(:not([slot])){vertical-align:top}:host([direction^=horizontal]) ::slotted(:not(:first-child)){margin-inline-start:var(--luzmo-tabs-item-horizontal-spacing, var(--tabs-item-horizontal-spacing))}:host([direction^=horizontal]) #list #selection-indicator{block-size:var(--luzmo-tabs-divider-size, var(--tabs-divider-size));position:absolute;inset-block-end:0}:host([direction^=horizontal][compact]) #list{box-sizing:initial;align-items:end}:host([quiet]) #list{background:none;border-color:transparent;display:inline-flex}:host([quiet]) #selection-indicator{padding-inline-start:var(--luzmo-tabs-start-to-item-quiet)}:host([direction^=vertical]) #list,:host([direction^=vertical-right]) #list{flex-direction:column;padding:0;display:inline-flex}:host([direction^=vertical-right][quiet]) #list,:host([direction^=vertical][quiet]) #list{border-color:transparent}:host([direction^=vertical]) #list ::slotted(:not([slot])),:host([direction^=vertical-right]) #list ::slotted(:not([slot])){block-size:var(--luzmo-tabs-item-height, var(--tabs-item-height));line-height:var(--luzmo-tabs-item-height, var(--tabs-item-height));margin-block-end:var(--luzmo-tabs-item-vertical-spacing, var(--tabs-item-vertical-spacing));margin-inline-start:var(--luzmo-tabs-start-to-edge, var(--tabs-start-to-edge));margin-inline-end:var(--luzmo-tabs-start-to-edge, var(--tabs-start-to-edge));padding-block:0}:host([direction^=vertical]) #list ::slotted(:not([slot])):before,:host([direction^=vertical-right]) #list ::slotted(:not([slot])):before{inset-inline-start:calc(var(--luzmo-tabs-focus-indicator-gap, var(--tabs-focus-indicator-gap)) * -1)}:host([direction^=vertical]) #list #selection-indicator,:host([direction^=vertical-right]) #list #selection-indicator{inline-size:var(--luzmo-tabs-divider-size, var(--tabs-divider-size));position:absolute;inset-block-start:0;inset-inline-start:0}:host([direction^=vertical-right]) #list #selection-indicator{inset-inline:auto 0}@media (forced-colors: active){#list{--highcontrast-tabs-divider-background-color: var(--luzmo-border-color);--highcontrast-tabs-selection-indicator-color: Highlight;--highcontrast-tabs-focus-indicator-color: CanvasText;--highcontrast-tabs-focus-indicator-background-color: Highlight;--highcontrast-tabs-color: ButtonText;--highcontrast-tabs-color-hover: ButtonText;--highcontrast-tabs-color-selected: HighlightText;--highcontrast-tabs-color-key-focus: ButtonText;--highcontrast-tabs-color-disabled: GrayText;forced-color-adjust:none}#list ::slotted([selected]:not([slot])):before{background-color:var(--highcontrast-tabs-focus-indicator-background-color)}:host([direction^=vertical][compact]) #list #list ::slotted(:not([slot])):before{block-size:100%;inset-block-start:0}:host([quiet]) #list{background:linear-gradient(to var(--luzmo-tabs-list-background-direction, var(--tabs-list-background-direction)),var(--highcontrast-tabs-divider-background-color, var(--luzmo-tabs-divider-background-color, var(--tabs-divider-background-color))) 0 var(--luzmo-tabs-divider-size, var(--tabs-divider-size)),transparent var(--luzmo-tabs-divider-size, var(--tabs-divider-size)))}}#list{--tabs-font-weight: var(--luzmo-font-weight);--tabs-divider-background-color: var(--luzmo-border-color)}:host{display:grid;grid-template-columns:100%;position:relative}:host(:not([direction^=vertical])){grid-template-rows:auto 1fr}:host([direction^=vertical]){grid-template-columns:auto 1fr}:host([dir=rtl]) #selection-indicator{left:0;right:auto}:host([direction=vertical-right]) #list #selection-indicator{inset-inline:auto 0}#list{justify-content:var(--luzmo-tabs-list-justify-content)}:host([disabled]) #list{pointer-events:none}:host([disabled]) #list #selection-indicator{background-color:var(--luzmo-tabs-color-disabled, var(--tabs-color-disabled))}:host([disabled]) ::slotted(sp-tab){color:var(--luzmo-tabs-color-disabled, var(--tabs-color-disabled))}:host([direction=vertical-right]) #list #selection-indicator,:host([direction=vertical]) #list #selection-indicator{inset-block-start:0}#selection-indicator.first-position{transition:none}:host([dir][direction=horizontal]) #list.scroll{scrollbar-width:none;overflow:auto hidden}:host([dir][direction=horizontal]) #list.scroll::-webkit-scrollbar{display:none}";var R=Object.defineProperty,c=(l,t,o,i)=>{for(var e=void 0,a=l.length-1,r;a>=0;a--)(r=l[a])&&(e=r(t,o,e)||e);return e&&R(t,o,e),e};const h={baseSize:100,noSelectionStyle:"transform: translateX(0px) scaleX(0) scaleY(0)",transformX(l,t){const o=t/this.baseSize;return`transform: translateX(${l}px) scaleX(${o});`},transformY(l,t){const o=t/this.baseSize;return`transform: translateY(${l}px) scaleY(${o});`},baseStyles(){return s.i`
|
|
145
|
+
`;
|
|
146
|
+
}
|
|
147
|
+
firstUpdated() {
|
|
148
|
+
this.slot = "tab-panel";
|
|
149
|
+
this.setAttribute("role", "tabpanel");
|
|
150
|
+
this.tabIndex = 0;
|
|
151
|
+
if (!this.hasAttribute("id")) {
|
|
152
|
+
this.id = `luzmo-tab-panel-${randomId.randomID()}`;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
updated(changes) {
|
|
156
|
+
if (changes.has("selected")) {
|
|
157
|
+
if (this.selected) {
|
|
158
|
+
this.removeAttribute("aria-hidden");
|
|
159
|
+
this.tabIndex = 0;
|
|
160
|
+
} else {
|
|
161
|
+
this.setAttribute("aria-hidden", "true");
|
|
162
|
+
this.tabIndex = -1;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
__decorateClass$2([
|
|
168
|
+
property_js.property({ type: Boolean, reflect: true })
|
|
169
|
+
], LuzmoTabPanel.prototype, "selected");
|
|
170
|
+
__decorateClass$2([
|
|
171
|
+
property_js.property({ type: String, reflect: true })
|
|
172
|
+
], LuzmoTabPanel.prototype, "value");
|
|
173
|
+
const tabSizes = "#list{--tabs-item-height: calc( var(--luzmo-component-height) + var(--luzmo-spacing-5) );--tabs-item-horizontal-spacing: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-3) );--tabs-item-vertical-spacing: var(--luzmo-spacing-2);--tabs-start-to-edge: var(--luzmo-spacing-4);--tabs-top-to-text: calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--tabs-bottom-to-text: calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--tabs-icon-size: var(--luzmo-icon-size-s);--tabs-icon-to-text: var(--luzmo-spacing-3);--tabs-top-to-icon: var(--luzmo-spacing-4);--tabs-focus-indicator-gap: var(--luzmo-spacing-3);--tabs-font-size: var(--luzmo-font-size)}:host([size=s]) #list{--tabs-item-height: calc( var(--luzmo-component-height-s) + var(--luzmo-spacing-4) );--tabs-item-horizontal-spacing: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--tabs-item-vertical-spacing: var(--luzmo-spacing-2);--tabs-start-to-edge: var(--luzmo-spacing-4);--tabs-top-to-text: calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--tabs-bottom-to-text: var(--luzmo-spacing-4);--tabs-icon-size: var(--luzmo-icon-size-xs);--tabs-icon-to-text: var(--luzmo-spacing-3);--tabs-top-to-icon: var(--luzmo-spacing-4);--tabs-focus-indicator-gap: var(--luzmo-spacing-3);--tabs-font-size: var(--luzmo-font-size-s)}:host([size=l]) #list{--tabs-item-height: calc( var(--luzmo-component-height-l) + var(--luzmo-spacing-5) );--tabs-item-horizontal-spacing: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-4) );--tabs-item-vertical-spacing: var(--luzmo-spacing-2);--tabs-start-to-edge: calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--tabs-top-to-text: calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--tabs-bottom-to-text: calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--tabs-icon-size: var(--luzmo-icon-size-m);--tabs-icon-to-text: calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--tabs-top-to-icon: var(--luzmo-spacing-5);--tabs-focus-indicator-gap: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--tabs-font-size: var(--luzmo-font-size-l)}:host([size=xl]) #list{--tabs-item-height: calc( var(--luzmo-component-height-xl) + var(--luzmo-spacing-5) );--tabs-item-horizontal-spacing: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-4) );--tabs-item-vertical-spacing: var(--luzmo-spacing-2);--tabs-start-to-edge: calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--tabs-top-to-text: calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--tabs-bottom-to-text: calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--tabs-icon-size: var(--luzmo-icon-size-l);--tabs-icon-to-text: calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--tabs-top-to-icon: var(--luzmo-spacing-5);--tabs-focus-indicator-gap: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--tabs-font-size: var(--luzmo-font-size-xl)}:host([compact]) #list{--luzmo-tabs-item-height: var( --luzmo-tabs-item-height-compact, var(--luzmo-component-height) );--luzmo-tabs-top-to-text: var( --luzmo-tabs-top-to-text-compact, calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1)) );--luzmo-tabs-bottom-to-text: var( --luzmo-tabs-bottom-to-text-compact, calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1)) );--luzmo-tabs-top-to-icon: var( --luzmo-tabs-top-to-icon-compact, var(--luzmo-spacing-2) )}:host([size=s][compact]) #list{--luzmo-tabs-item-height: var( --luzmo-tabs-item-height-compact, var(--luzmo-component-height-s) );--luzmo-tabs-top-to-text: var( --luzmo-tabs-top-to-text-compact, var(--luzmo-spacing-2) );--luzmo-tabs-bottom-to-text: var( --luzmo-tabs-bottom-to-text-compact, var(--luzmo-spacing-2) );--luzmo-tabs-top-to-icon: var( --luzmo-tabs-top-to-icon-compact, var(--luzmo-spacing-1) )}:host([size=l][compact]) #list{--luzmo-tabs-item-height: var( --luzmo-tabs-item-height-compact, var(--luzmo-component-height-l) );--luzmo-tabs-top-to-text: var( --luzmo-tabs-top-to-text-compact, calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1)) );--luzmo-tabs-bottom-to-text: var( --luzmo-tabs-bottom-to-text-compact, calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1)) );--luzmo-tabs-top-to-icon: var( --luzmo-tabs-top-to-icon-compact, calc(var(--luzmo-spacing-3)) )}:host([size=xl][compact]) #list{--luzmo-tabs-item-height: var( --luzmo-tabs-item-height-compact, var(--luzmo-component-height-xl) );--luzmo-tabs-top-to-text: var( --luzmo-tabs-top-to-text-compact, var(--luzmo-spacing-4) );--luzmo-tabs-bottom-to-text: var( --luzmo-tabs-bottom-to-text-compact, var(--luzmo-spacing-4) );--luzmo-tabs-top-to-icon: var( --luzmo-tabs-top-to-icon-compact, calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1)) )}";
|
|
174
|
+
const tabStyles = "#list{--tabs-color: var(--luzmo-font-color);--tabs-color-selected: var(--luzmo-font-color-down);--tabs-color-hover: var(--luzmo-font-color-hover);--tabs-color-key-focus: var(--luzmo-font-color-focus);--tabs-color-disabled: var(--luzmo-disabled-color);--tabs-font-family: var(--luzmo-font-family);--tabs-font-style: var(--luzmo-font-style);--tabs-font-size: var(--luzmo-font-size);--tabs-line-height: var(--luzmo-line-height);--tabs-focus-indicator-width: var(--luzmo-indicator-width);--tabs-focus-indicator-border-radius: var(--luzmo-border-radius);--tabs-focus-indicator-color: var(--luzmo-indicator-color);--tabs-selection-indicator-color: var(--luzmo-font-color-down);--tabs-list-background-direction: top;--tabs-divider-size: 2px;--tabs-divider-border-radius: 1px;--tabs-animation-duration: var(--luzmo-animation-duration);--tabs-animation-ease: ease-in-out}:host([emphasized]) #list{--luzmo-tabs-color-selected: var( --luzmo-tabs-color-selected-emphasized, var(--luzmo-primary) );--luzmo-tabs-color-hover: var( --luzmo-tabs-color-hover-emphasized, var(--luzmo-primary-hover) );--luzmo-tabs-color-key-focus: var( --luzmo-tabs-color-key-focus-emphasized, var(--luzmo-primary-focus) );--luzmo-tabs-selection-indicator-color: var( --luzmo-tabs-selection-indicator-color-emphasized, var(--luzmo-primary-down) )}:host([direction^=vertical]) #list{--luzmo-tabs-list-background-direction: var( --luzmo-tabs-list-background-direction-vertical, right )}:host([direction^=vertical-right]) #list{--luzmo-tabs-list-background-direction: var( --luzmo-tabs-list-background-direction-vertical-right, left )}:host([direction^=vertical]) #list:dir(rtl),:host([dir=rtl][direction^=vertical]) #list{--luzmo-tabs-list-background-direction: var( --luzmo-tabs-list-background-direction-vertical, left )}:host([direction^=vertical-right]) #list:dir(rtl),:host([dir=rtl][direction^=vertical-right]) #list{--luzmo-tabs-list-background-direction: var( --luzmo-tabs-list-background-direction-vertical, right )}#list{z-index:0;vertical-align:top;background:linear-gradient(to var(--luzmo-tabs-list-background-direction, var(--tabs-list-background-direction)),var(--highcontrast-tabs-divider-background-color, var(--luzmo-tabs-divider-background-color, var(--tabs-divider-background-color))) 0 var(--luzmo-tabs-divider-size, var(--tabs-divider-size)),transparent var(--luzmo-tabs-divider-size, var(--tabs-divider-size)));margin:0;padding-block:0;display:flex;position:relative}::slotted([selected]:not([slot])){color:var(--highcontrast-tabs-color-selected, var(--luzmo-tabs-color-selected, var(--tabs-color-selected)))}::slotted([disabled]:not([slot])){cursor:default;color:var(--highcontrast-tabs-color-disabled, var(--luzmo-tabs-color-disabled, var(--tabs-color-disabled)))}#selection-indicator{background-color:var(--highcontrast-tabs-selection-indicator-color, var(--luzmo-tabs-selection-indicator-color, var(--tabs-selection-indicator-color)));z-index:0;transition:transform var(--luzmo-tabs-animation-duration, var(--tabs-animation-duration)) var(--luzmo-tabs-animation-ease, var(--tabs-animation-ease));transform-origin:0 0;border-radius:var(--luzmo-tabs-divider-border-radius, var(--tabs-divider-border-radius));position:absolute;inset-inline-start:0}:host([direction^=horizontal]) #list{align-items:center}:host([direction^=horizontal]) #list ::slotted(:not([slot])){vertical-align:top}:host([direction^=horizontal]) ::slotted(:not(:first-child)){margin-inline-start:var(--luzmo-tabs-item-horizontal-spacing, var(--tabs-item-horizontal-spacing))}:host([direction^=horizontal]) #list #selection-indicator{block-size:var(--luzmo-tabs-divider-size, var(--tabs-divider-size));position:absolute;inset-block-end:0}:host([direction^=horizontal][compact]) #list{box-sizing:initial;align-items:end}:host([quiet]) #list{background:none;border-color:transparent;display:inline-flex}:host([quiet]) #selection-indicator{padding-inline-start:var(--luzmo-tabs-start-to-item-quiet)}:host([direction^=vertical]) #list,:host([direction^=vertical-right]) #list{flex-direction:column;padding:0;display:inline-flex}:host([direction^=vertical-right][quiet]) #list,:host([direction^=vertical][quiet]) #list{border-color:transparent}:host([direction^=vertical]) #list ::slotted(:not([slot])),:host([direction^=vertical-right]) #list ::slotted(:not([slot])){block-size:var(--luzmo-tabs-item-height, var(--tabs-item-height));line-height:var(--luzmo-tabs-item-height, var(--tabs-item-height));margin-block-end:var(--luzmo-tabs-item-vertical-spacing, var(--tabs-item-vertical-spacing));margin-inline-start:var(--luzmo-tabs-start-to-edge, var(--tabs-start-to-edge));margin-inline-end:var(--luzmo-tabs-start-to-edge, var(--tabs-start-to-edge));padding-block:0}:host([direction^=vertical]) #list ::slotted(:not([slot])):before,:host([direction^=vertical-right]) #list ::slotted(:not([slot])):before{inset-inline-start:calc(var(--luzmo-tabs-focus-indicator-gap, var(--tabs-focus-indicator-gap)) * -1)}:host([direction^=vertical]) #list #selection-indicator,:host([direction^=vertical-right]) #list #selection-indicator{inline-size:var(--luzmo-tabs-divider-size, var(--tabs-divider-size));position:absolute;inset-block-start:0;inset-inline-start:0}:host([direction^=vertical-right]) #list #selection-indicator{inset-inline:auto 0}@media (forced-colors: active){#list{--highcontrast-tabs-divider-background-color: var(--luzmo-border-color);--highcontrast-tabs-selection-indicator-color: Highlight;--highcontrast-tabs-focus-indicator-color: CanvasText;--highcontrast-tabs-focus-indicator-background-color: Highlight;--highcontrast-tabs-color: ButtonText;--highcontrast-tabs-color-hover: ButtonText;--highcontrast-tabs-color-selected: HighlightText;--highcontrast-tabs-color-key-focus: ButtonText;--highcontrast-tabs-color-disabled: GrayText;forced-color-adjust:none}#list ::slotted([selected]:not([slot])):before{background-color:var(--highcontrast-tabs-focus-indicator-background-color)}:host([direction^=vertical][compact]) #list #list ::slotted(:not([slot])):before{block-size:100%;inset-block-start:0}:host([quiet]) #list{background:linear-gradient(to var(--luzmo-tabs-list-background-direction, var(--tabs-list-background-direction)),var(--highcontrast-tabs-divider-background-color, var(--luzmo-tabs-divider-background-color, var(--tabs-divider-background-color))) 0 var(--luzmo-tabs-divider-size, var(--tabs-divider-size)),transparent var(--luzmo-tabs-divider-size, var(--tabs-divider-size)))}}#list{--tabs-font-weight: var(--luzmo-font-weight);--tabs-divider-background-color: var(--luzmo-border-color)}:host{display:grid;grid-template-columns:100%;position:relative}:host(:not([direction^=vertical])){grid-template-rows:auto 1fr}:host([direction^=vertical]){grid-template-columns:auto 1fr}:host([dir=rtl]) #selection-indicator{left:0;right:auto}:host([direction=vertical-right]) #list #selection-indicator{inset-inline:auto 0}#list{justify-content:var(--luzmo-tabs-list-justify-content)}:host([disabled]) #list{pointer-events:none}:host([disabled]) #list #selection-indicator{background-color:var(--luzmo-tabs-color-disabled, var(--tabs-color-disabled))}:host([disabled]) ::slotted(sp-tab){color:var(--luzmo-tabs-color-disabled, var(--tabs-color-disabled))}:host([direction=vertical-right]) #list #selection-indicator,:host([direction=vertical]) #list #selection-indicator{inset-block-start:0}#selection-indicator.first-position{transition:none}:host([dir][direction=horizontal]) #list.scroll{scrollbar-width:none;overflow:auto hidden}:host([dir][direction=horizontal]) #list.scroll::-webkit-scrollbar{display:none}";
|
|
175
|
+
var __defProp$1 = Object.defineProperty;
|
|
176
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
177
|
+
var result = void 0;
|
|
178
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
179
|
+
if (decorator = decorators[i])
|
|
180
|
+
result = decorator(target, key, result) || result;
|
|
181
|
+
if (result) __defProp$1(target, key, result);
|
|
182
|
+
return result;
|
|
183
|
+
};
|
|
184
|
+
const ScaledIndicator = {
|
|
185
|
+
baseSize: 100,
|
|
186
|
+
noSelectionStyle: "transform: translateX(0px) scaleX(0) scaleY(0)",
|
|
187
|
+
transformX(left, width) {
|
|
188
|
+
const scale = width / this.baseSize;
|
|
189
|
+
return `transform: translateX(${left}px) scaleX(${scale});`;
|
|
190
|
+
},
|
|
191
|
+
transformY(top, height) {
|
|
192
|
+
const scale = height / this.baseSize;
|
|
193
|
+
return `transform: translateY(${top}px) scaleY(${scale});`;
|
|
194
|
+
},
|
|
195
|
+
baseStyles() {
|
|
196
|
+
return lit.css`
|
|
38
197
|
:host([direction='vertical-right']) #selection-indicator,
|
|
39
198
|
:host([direction='vertical']) #selection-indicator {
|
|
40
199
|
height: ${this.baseSize}px;
|
|
@@ -42,10 +201,269 @@
|
|
|
42
201
|
:host([dir][direction='horizontal']) #selection-indicator {
|
|
43
202
|
width: ${this.baseSize}px;
|
|
44
203
|
}
|
|
45
|
-
|
|
204
|
+
`;
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
function calculateScrollTargetForRightSide(index, direction, tabs, container) {
|
|
208
|
+
const nextIndex = index + (direction === "rtl" ? -1 : 1);
|
|
209
|
+
const nextTab = tabs[nextIndex];
|
|
210
|
+
const viewportEnd = container.scrollLeft + container.offsetWidth;
|
|
211
|
+
return nextTab ? nextTab.offsetLeft - container.offsetWidth : viewportEnd;
|
|
212
|
+
}
|
|
213
|
+
function calculateScrollTargetForLeftSide(index, direction, tabs, container) {
|
|
214
|
+
const prevIndex = index + (direction === "rtl" ? 1 : -1);
|
|
215
|
+
const prevTab = tabs[prevIndex];
|
|
216
|
+
const leftmostElement = direction === "rtl" ? -container.offsetWidth : 0;
|
|
217
|
+
return prevTab ? prevTab.offsetLeft + prevTab.offsetWidth : leftmostElement;
|
|
218
|
+
}
|
|
219
|
+
class LuzmoTabs extends sizedMixin.SizedMixin(focusable.Focusable, { noDefaultSize: true }) {
|
|
220
|
+
constructor() {
|
|
221
|
+
super();
|
|
222
|
+
this.auto = false;
|
|
223
|
+
this.compact = false;
|
|
224
|
+
this.direction = "horizontal";
|
|
225
|
+
this.emphasized = false;
|
|
226
|
+
this.label = "";
|
|
227
|
+
this.enableTabsScroll = false;
|
|
228
|
+
this.quiet = false;
|
|
229
|
+
this.selectionIndicatorStyle = ScaledIndicator.noSelectionStyle;
|
|
230
|
+
this.shouldAnimate = false;
|
|
231
|
+
this.selected = "";
|
|
232
|
+
this._tabs = [];
|
|
233
|
+
this.resizeController = new resizeController_js.ResizeController(this, {
|
|
234
|
+
callback: () => {
|
|
235
|
+
this.updateSelectionIndicator();
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
this.rovingTabindexController = new rovingTabindex.RovingTabindexController(this, {
|
|
239
|
+
focusInIndex: (elements) => {
|
|
240
|
+
let focusInIndex = 0;
|
|
241
|
+
const firstFocusableElement = elements.find((el, index) => {
|
|
242
|
+
const focusInElement = this.selected ? el.value === this.selected : !el.disabled;
|
|
243
|
+
focusInIndex = index;
|
|
244
|
+
return focusInElement;
|
|
245
|
+
});
|
|
246
|
+
return firstFocusableElement ? focusInIndex : -1;
|
|
247
|
+
},
|
|
248
|
+
direction: () => "both",
|
|
249
|
+
elementEnterAction: (el) => {
|
|
250
|
+
if (!this.auto) return;
|
|
251
|
+
this.shouldAnimate = true;
|
|
252
|
+
this.selectTarget(el);
|
|
253
|
+
},
|
|
254
|
+
elements: () => this.tabs,
|
|
255
|
+
isFocusableElement: (el) => !this.disabled && !el.disabled,
|
|
256
|
+
listenerScope: () => this.tabList
|
|
257
|
+
});
|
|
258
|
+
this.onTabsScroll = () => {
|
|
259
|
+
this.dispatchEvent(
|
|
260
|
+
new Event("luzmo-tabs-scroll", {
|
|
261
|
+
bubbles: true,
|
|
262
|
+
composed: true
|
|
263
|
+
})
|
|
264
|
+
);
|
|
265
|
+
};
|
|
266
|
+
this.onClick = (event) => {
|
|
267
|
+
if (this.disabled) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
const target = event.composedPath().find((el) => el.parentElement === this);
|
|
271
|
+
if (!target || target.disabled) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
this.shouldAnimate = true;
|
|
275
|
+
this.selectTarget(target);
|
|
276
|
+
};
|
|
277
|
+
this.onKeyDown = (event) => {
|
|
278
|
+
if (event.code === "Enter" || event.code === "Space") {
|
|
279
|
+
event.preventDefault();
|
|
280
|
+
const target = event.target;
|
|
281
|
+
if (target) {
|
|
282
|
+
this.selectTarget(target);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
this.updateCheckedState = () => {
|
|
287
|
+
this.tabs.forEach((element) => {
|
|
288
|
+
element.removeAttribute("selected");
|
|
289
|
+
});
|
|
290
|
+
if (this.selected) {
|
|
291
|
+
const currentChecked = this.tabs.find((el) => el.value === this.selected);
|
|
292
|
+
if (currentChecked) {
|
|
293
|
+
currentChecked.selected = true;
|
|
294
|
+
} else {
|
|
295
|
+
this.selected = "";
|
|
296
|
+
}
|
|
297
|
+
} else {
|
|
298
|
+
const firstTab = this.tabs[0];
|
|
299
|
+
if (firstTab) {
|
|
300
|
+
firstTab.setAttribute("tabindex", "0");
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
this.updateSelectionIndicator();
|
|
304
|
+
};
|
|
305
|
+
this.updateSelectionIndicator = async () => {
|
|
306
|
+
const selectedElement = this.tabs.find((el) => el.selected);
|
|
307
|
+
if (!selectedElement) {
|
|
308
|
+
this.selectionIndicatorStyle = ScaledIndicator.noSelectionStyle;
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
await Promise.all([
|
|
312
|
+
selectedElement.updateComplete,
|
|
313
|
+
document.fonts ? document.fonts.ready : Promise.resolve()
|
|
314
|
+
]);
|
|
315
|
+
const { width, height } = selectedElement.getBoundingClientRect();
|
|
316
|
+
this.selectionIndicatorStyle = this.direction === "horizontal" ? ScaledIndicator.transformX(selectedElement.offsetLeft, width) : ScaledIndicator.transformY(selectedElement.offsetTop, height);
|
|
317
|
+
};
|
|
318
|
+
new intersectionController_js.IntersectionController(this, {
|
|
319
|
+
config: {
|
|
320
|
+
root: null,
|
|
321
|
+
rootMargin: "0px",
|
|
322
|
+
threshold: [0, 1]
|
|
323
|
+
},
|
|
324
|
+
callback: () => {
|
|
325
|
+
this.updateSelectionIndicator();
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
static get styles() {
|
|
330
|
+
return [
|
|
331
|
+
lit.unsafeCSS(tabSizes),
|
|
332
|
+
lit.unsafeCSS(tabStyles),
|
|
333
|
+
ScaledIndicator.baseStyles()
|
|
334
|
+
];
|
|
335
|
+
}
|
|
336
|
+
set tabs(tabs) {
|
|
337
|
+
if (tabs === this.tabs) return;
|
|
338
|
+
this._tabs.forEach((tab) => {
|
|
339
|
+
this.resizeController.unobserve(tab);
|
|
340
|
+
});
|
|
341
|
+
tabs.forEach((tab) => {
|
|
342
|
+
this.resizeController.observe(tab);
|
|
343
|
+
});
|
|
344
|
+
this._tabs = tabs;
|
|
345
|
+
this.rovingTabindexController.clearElementCache();
|
|
346
|
+
}
|
|
347
|
+
get tabs() {
|
|
348
|
+
return this._tabs;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* @internal
|
|
352
|
+
*/
|
|
353
|
+
get focusElement() {
|
|
354
|
+
return this.rovingTabindexController.focusInElement || this;
|
|
355
|
+
}
|
|
356
|
+
limitDeltaToInterval(min, max) {
|
|
357
|
+
return (delta) => {
|
|
358
|
+
if (delta < min) return min;
|
|
359
|
+
if (delta > max) return max;
|
|
360
|
+
return delta;
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Scrolls through the tabs component, on the X-axis, by a given ammount of pixels/ delta. The given delta is limited to the scrollable area of the tabs component.
|
|
365
|
+
* @param delta - The ammount of pixels to scroll by. If the value is positive, the tabs will scroll to the right. If the value is negative, the tabs will scroll to the left.
|
|
366
|
+
* @param behavior - The scroll behavior to use. Defaults to 'smooth'.
|
|
367
|
+
*/
|
|
368
|
+
scrollTabs(delta, behavior = "smooth") {
|
|
369
|
+
var _a;
|
|
370
|
+
if (delta === 0) return;
|
|
371
|
+
const { scrollLeft, clientWidth, scrollWidth } = this.tabList;
|
|
372
|
+
const dirLimit = scrollWidth - clientWidth - Math.abs(scrollLeft);
|
|
373
|
+
const limitDelta = this.dir === "ltr" ? this.limitDeltaToInterval(-scrollLeft, dirLimit) : this.limitDeltaToInterval(-dirLimit, Math.abs(scrollLeft));
|
|
374
|
+
(_a = this.tabList) == null ? void 0 : _a.scrollBy({
|
|
375
|
+
left: limitDelta(delta),
|
|
376
|
+
top: 0,
|
|
377
|
+
behavior
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
get scrollState() {
|
|
381
|
+
if (this.tabList) {
|
|
382
|
+
const { scrollLeft, clientWidth, scrollWidth } = this.tabList;
|
|
383
|
+
const canScrollLeft = Math.abs(scrollLeft) > 0;
|
|
384
|
+
const canScrollRight = Math.ceil(Math.abs(scrollLeft)) < scrollWidth - clientWidth;
|
|
385
|
+
return {
|
|
386
|
+
canScrollLeft: this.dir === "ltr" ? canScrollLeft : canScrollRight,
|
|
387
|
+
canScrollRight: this.dir === "ltr" ? canScrollRight : canScrollLeft
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
return {};
|
|
391
|
+
}
|
|
392
|
+
async getUpdateComplete() {
|
|
393
|
+
const complete = await super.getUpdateComplete();
|
|
394
|
+
const tabs = [...this.children];
|
|
395
|
+
const tabUpdateCompletes = tabs.map((tab) => {
|
|
396
|
+
if (tab.updateComplete !== void 0) {
|
|
397
|
+
return tab.updateComplete;
|
|
398
|
+
}
|
|
399
|
+
return Promise.resolve(true);
|
|
400
|
+
});
|
|
401
|
+
await Promise.all(tabUpdateCompletes);
|
|
402
|
+
return complete;
|
|
403
|
+
}
|
|
404
|
+
getNecessaryAutoScroll(index) {
|
|
405
|
+
const selectedTab = this.tabs[index];
|
|
406
|
+
const selectionEnd = selectedTab.offsetLeft + selectedTab.offsetWidth;
|
|
407
|
+
const viewportEnd = this.tabList.scrollLeft + this.tabList.offsetWidth;
|
|
408
|
+
const selectionStart = selectedTab.offsetLeft;
|
|
409
|
+
const viewportStart = this.tabList.scrollLeft;
|
|
410
|
+
if (selectionEnd > viewportEnd) {
|
|
411
|
+
return calculateScrollTargetForRightSide(
|
|
412
|
+
index,
|
|
413
|
+
this.dir,
|
|
414
|
+
this.tabs,
|
|
415
|
+
this.tabList
|
|
416
|
+
);
|
|
417
|
+
} else if (selectionStart < viewportStart) {
|
|
418
|
+
return calculateScrollTargetForLeftSide(
|
|
419
|
+
index,
|
|
420
|
+
this.dir,
|
|
421
|
+
this.tabs,
|
|
422
|
+
this.tabList
|
|
423
|
+
);
|
|
424
|
+
}
|
|
425
|
+
return -1;
|
|
426
|
+
}
|
|
427
|
+
async scrollToSelection() {
|
|
428
|
+
if (!this.enableTabsScroll || !this.selected) {
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
await this.updateComplete;
|
|
432
|
+
const selectedIndex = this.tabs.findIndex(
|
|
433
|
+
(tab) => tab.value === this.selected
|
|
434
|
+
);
|
|
435
|
+
if (selectedIndex !== -1 && this.tabList) {
|
|
436
|
+
const scrollTarget = this.getNecessaryAutoScroll(selectedIndex);
|
|
437
|
+
if (scrollTarget !== -1) {
|
|
438
|
+
this.tabList.scrollTo({ left: scrollTarget });
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
updated(changedProperties) {
|
|
443
|
+
super.updated(changedProperties);
|
|
444
|
+
if (changedProperties.has("selected")) {
|
|
445
|
+
this.scrollToSelection();
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
managePanels({
|
|
449
|
+
target
|
|
450
|
+
}) {
|
|
451
|
+
const panels = target.assignedElements();
|
|
452
|
+
panels.map((panel) => {
|
|
453
|
+
const { value, id } = panel;
|
|
454
|
+
const tab = this.querySelector(`[role="tab"][value="${value}"]`);
|
|
455
|
+
if (tab) {
|
|
456
|
+
tab.setAttribute("aria-controls", id);
|
|
457
|
+
panel.setAttribute("aria-labelledby", tab.id);
|
|
458
|
+
}
|
|
459
|
+
panel.selected = value === this.selected;
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
render() {
|
|
463
|
+
return lit.html`
|
|
46
464
|
<div
|
|
47
|
-
class=${
|
|
48
|
-
aria-label=${
|
|
465
|
+
class=${classMap_js.classMap({ scroll: this.enableTabsScroll })}
|
|
466
|
+
aria-label=${ifDefined_js.ifDefined(this.label ?? void 0)}
|
|
49
467
|
@click=${this.onClick}
|
|
50
468
|
@keydown=${this.onKeyDown}
|
|
51
469
|
@scroll=${this.onTabsScroll}
|
|
@@ -56,38 +474,287 @@
|
|
|
56
474
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
57
475
|
<div
|
|
58
476
|
id="selection-indicator"
|
|
59
|
-
class=${
|
|
477
|
+
class=${ifDefined_js.ifDefined(this.shouldAnimate ? void 0 : "first-position")}
|
|
60
478
|
style=${this.selectionIndicatorStyle}
|
|
61
479
|
role="presentation"
|
|
62
480
|
></div>
|
|
63
481
|
</div>
|
|
64
482
|
<slot name="tab-panel" @slotchange=${this.managePanels}></slot>
|
|
65
|
-
|
|
483
|
+
`;
|
|
484
|
+
}
|
|
485
|
+
willUpdate(changes) {
|
|
486
|
+
if (!this.hasUpdated) {
|
|
487
|
+
const selectedChild = this.querySelector(
|
|
488
|
+
":scope > [selected]"
|
|
489
|
+
);
|
|
490
|
+
if (selectedChild) {
|
|
491
|
+
this.selectTarget(selectedChild);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
super.willUpdate(changes);
|
|
495
|
+
if (changes.has("selected")) {
|
|
496
|
+
if (this.tabs.length > 0) {
|
|
497
|
+
this.updateCheckedState();
|
|
498
|
+
}
|
|
499
|
+
if (changes.get("selected")) {
|
|
500
|
+
const previous = this.querySelector(
|
|
501
|
+
`[role="tabpanel"][value="${changes.get("selected")}"]`
|
|
502
|
+
);
|
|
503
|
+
if (previous) previous.selected = false;
|
|
504
|
+
}
|
|
505
|
+
const next = this.querySelector(
|
|
506
|
+
`[role="tabpanel"][value="${this.selected}"]`
|
|
507
|
+
);
|
|
508
|
+
if (next) next.selected = true;
|
|
509
|
+
}
|
|
510
|
+
if (changes.has("direction")) {
|
|
511
|
+
if (this.direction === "horizontal") {
|
|
512
|
+
this.removeAttribute("aria-orientation");
|
|
513
|
+
} else {
|
|
514
|
+
this.setAttribute("aria-orientation", "vertical");
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
if (changes.has("dir")) {
|
|
518
|
+
this.updateSelectionIndicator();
|
|
519
|
+
}
|
|
520
|
+
if (changes.has("disabled")) {
|
|
521
|
+
if (this.disabled) {
|
|
522
|
+
this.setAttribute("aria-disabled", "true");
|
|
523
|
+
} else {
|
|
524
|
+
this.removeAttribute("aria-disabled");
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
if (!this.shouldAnimate && changes.get("shouldAnimate") !== void 0) {
|
|
528
|
+
this.shouldAnimate = true;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
selectTarget(target) {
|
|
532
|
+
const value = target.getAttribute("value");
|
|
533
|
+
if (value) {
|
|
534
|
+
const selected = this.selected;
|
|
535
|
+
this.selected = value;
|
|
536
|
+
const applyDefault = this.dispatchEvent(
|
|
537
|
+
new Event("change", {
|
|
538
|
+
cancelable: true
|
|
539
|
+
})
|
|
540
|
+
);
|
|
541
|
+
if (!applyDefault) {
|
|
542
|
+
this.selected = selected;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
onSlotChange() {
|
|
547
|
+
this.tabs = this.slotEl.assignedElements().filter((el) => el.getAttribute("role") === "tab");
|
|
548
|
+
this.updateCheckedState();
|
|
549
|
+
}
|
|
550
|
+
connectedCallback() {
|
|
551
|
+
super.connectedCallback();
|
|
552
|
+
window.addEventListener("resize", this.updateSelectionIndicator);
|
|
553
|
+
if ("fonts" in document) {
|
|
554
|
+
document.fonts.addEventListener("loadingdone", this.updateSelectionIndicator);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
disconnectedCallback() {
|
|
558
|
+
window.removeEventListener("resize", this.updateSelectionIndicator);
|
|
559
|
+
if ("fonts" in document) {
|
|
560
|
+
document.fonts.removeEventListener("loadingdone", this.updateSelectionIndicator);
|
|
561
|
+
}
|
|
562
|
+
super.disconnectedCallback();
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
__decorateClass$1([
|
|
566
|
+
decorators_js.property({ type: Boolean })
|
|
567
|
+
], LuzmoTabs.prototype, "auto");
|
|
568
|
+
__decorateClass$1([
|
|
569
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
570
|
+
], LuzmoTabs.prototype, "compact");
|
|
571
|
+
__decorateClass$1([
|
|
572
|
+
decorators_js.property({ reflect: true })
|
|
573
|
+
], LuzmoTabs.prototype, "dir");
|
|
574
|
+
__decorateClass$1([
|
|
575
|
+
decorators_js.property({ reflect: true })
|
|
576
|
+
], LuzmoTabs.prototype, "direction");
|
|
577
|
+
__decorateClass$1([
|
|
578
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
579
|
+
], LuzmoTabs.prototype, "emphasized");
|
|
580
|
+
__decorateClass$1([
|
|
581
|
+
decorators_js.property()
|
|
582
|
+
], LuzmoTabs.prototype, "label");
|
|
583
|
+
__decorateClass$1([
|
|
584
|
+
decorators_js.property({ type: Boolean })
|
|
585
|
+
], LuzmoTabs.prototype, "enableTabsScroll");
|
|
586
|
+
__decorateClass$1([
|
|
587
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
588
|
+
], LuzmoTabs.prototype, "quiet");
|
|
589
|
+
__decorateClass$1([
|
|
590
|
+
decorators_js.property({ attribute: false })
|
|
591
|
+
], LuzmoTabs.prototype, "selectionIndicatorStyle");
|
|
592
|
+
__decorateClass$1([
|
|
593
|
+
decorators_js.property({ attribute: false })
|
|
594
|
+
], LuzmoTabs.prototype, "shouldAnimate");
|
|
595
|
+
__decorateClass$1([
|
|
596
|
+
decorators_js.query("slot")
|
|
597
|
+
], LuzmoTabs.prototype, "slotEl");
|
|
598
|
+
__decorateClass$1([
|
|
599
|
+
decorators_js.query("#list")
|
|
600
|
+
], LuzmoTabs.prototype, "tabList");
|
|
601
|
+
__decorateClass$1([
|
|
602
|
+
decorators_js.property({ reflect: true })
|
|
603
|
+
], LuzmoTabs.prototype, "selected");
|
|
604
|
+
const styles = ':host{top:0;right:0;bottom:0;left:0;width:100%;--tabs-divider-size: 2px;--tab-item-height-m: calc( var(--luzmo-component-height) + var(--luzmo-spacing-5) );--tabs-overflow-button-height: calc( var(--tab-item-height-m) - var( --luzmo-tabs-divider-size, var(--tabs-divider-size) ) );--tabs-overflow-button-size: var(--tab-item-height-m);--tabs-overflow-icon-color: var(--luzmo-font-color-focus);--tabs-overflow-shadow-color: var(--luzmo-background-color);--tabs-overflow-shadow-width: 50px;--luzmo-action-button-icon-size: var(--luzmo-font-size);--tabs-overflow-next-button-right: calc(-1 * var(--luzmo-spacing-4));--tabs-overflow-previous-button-left: calc(-1 * var(--luzmo-spacing-4))}:host([size=s]){--tab-item-height-s: calc( var(--luzmo-component-height-s) + var(--luzmo-spacing-4) );--tabs-overflow-button-height: calc( var(--tab-item-height-s) - var( --luzmo-tabs-divider-size, var(--tabs-divider-size) ) );--tabs-overflow-button-size: var(--tab-item-height-s);--luzmo-action-button-icon-size: var(--luzmo-font-size-s);--tabs-overflow-next-button-right: calc(-1 * var(--luzmo-spacing-3));--tabs-overflow-previous-button-left: calc(-1 * var(--luzmo-spacing-3))}:host([size=l]){--tab-item-height-l: calc( var(--luzmo-component-height-l) + var(--luzmo-spacing-5) );--tabs-overflow-button-height: calc( var(--tab-item-height-l) - var( --luzmo-tabs-divider-size, var(--tabs-divider-size) ) );--tabs-overflow-button-size: var(--tab-item-height-l);--luzmo-action-button-icon-size: var(--luzmo-font-size-l);--tabs-overflow-next-button-right: calc( -1 * calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1)) );--tabs-overflow-previous-button-left: calc( -1 * calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1)) )}:host([size=xl]){--tab-item-height-xl: calc( var(--luzmo-component-height-xl) + var(--luzmo-spacing-5) );--tabs-overflow-button-height: calc( var(--tab-item-height-xl) - var( --luzmo-tabs-divider-size, var(--tabs-divider-size) ) );--tabs-overflow-button-size: var(--tab-item-height-xl);--luzmo-action-button-icon-size: var(--luzmo-font-size-xl);--tabs-overflow-next-button-right: calc( -1 * calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-2)) );--tabs-overflow-previous-button-left: calc( -1 * calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-2)) )}:host([compact]){--tabs-overflow-button-height: calc( var(--tab-item-compact-height-m) - var( --luzmo-tabs-divider-size, var(--tabs-divider-size) ) );--luzmo-action-button-icon-size: var(--luzmo-font-size-s)}luzmo-action-button{width:var(--luzmo-tabs-overflow-button-size, var(--tabs-overflow-button-size));height:var(--luzmo-tabs-overflow-button-height, var(--tabs-overflow-button-height));position:absolute;z-index:2;border:none;text-align:center;box-shadow:none;background:transparent;color:var(--luzmo-tabs-overflow-icon-color, var(--tabs-overflow-icon-color))}luzmo-action-button.left-scroll{visibility:hidden;left:var(--luzmo-tabs-overflow-previous-button-left, var(--tabs-overflow-previous-button-left))}luzmo-action-button.right-scroll{visibility:hidden;right:var(--luzmo-tabs-overflow-next-button-right, var(--tabs-overflow-next-button-right))}luzmo-action-button.left-scroll.show,luzmo-action-button.right-scroll.show{visibility:visible}.tabs-overflow-container{position:relative}.tabs-overflow-container:before,.tabs-overflow-container:after{content:"";visibility:hidden;position:absolute;z-index:1;height:var(--luzmo-tabs-overflow-button-height, var(--tabs-overflow-button-height));width:var(--luzmo-tabs-overflow-shadow-width, var(--tabs-overflow-shadow-width));pointer-events:none;inset-block-start:0}.tabs-overflow-container:before{background:transparent linear-gradient(270deg,transparent,var(--luzmo-tabs-overflow-shadow-color, var(--tabs-overflow-shadow-color))) 0 0 no-repeat padding-box;left:0}.tabs-overflow-container:after{background:transparent linear-gradient(90deg,transparent,var(--luzmo-tabs-overflow-shadow-color, var(--tabs-overflow-shadow-color))) 0 0 no-repeat padding-box;right:0}.tabs-overflow-container.left-shadow:before,.tabs-overflow-container.right-shadow:after{visibility:visible}';
|
|
605
|
+
var __defProp = Object.defineProperty;
|
|
606
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
607
|
+
var result = void 0;
|
|
608
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
609
|
+
if (decorator = decorators[i])
|
|
610
|
+
result = decorator(target, key, result) || result;
|
|
611
|
+
if (result) __defProp(target, key, result);
|
|
612
|
+
return result;
|
|
613
|
+
};
|
|
614
|
+
class LuzmoTabsOverflow extends sizedMixin.SizedMixin(base.LuzmoElement) {
|
|
615
|
+
constructor() {
|
|
616
|
+
super();
|
|
617
|
+
this.compact = false;
|
|
618
|
+
this.labelPrevious = "Scroll to previous tabs";
|
|
619
|
+
this.labelNext = "Scroll to next tabs";
|
|
620
|
+
this.overflowState = {
|
|
621
|
+
canScrollLeft: false,
|
|
622
|
+
canScrollRight: false
|
|
623
|
+
};
|
|
624
|
+
this.scrollFactor = 0.5;
|
|
625
|
+
this.resizeController = new resizeController_js.ResizeController(this, {
|
|
626
|
+
target: this,
|
|
627
|
+
callback: () => {
|
|
628
|
+
this._updateScrollState();
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
static get styles() {
|
|
633
|
+
return [lit.unsafeCSS(styles), lit.unsafeCSS(tabSizes)];
|
|
634
|
+
}
|
|
635
|
+
get scrollContent() {
|
|
636
|
+
return this.tabs;
|
|
637
|
+
}
|
|
638
|
+
firstUpdated(changes) {
|
|
639
|
+
super.firstUpdated(changes);
|
|
640
|
+
const [tabs] = this.scrollContent;
|
|
641
|
+
if (tabs) {
|
|
642
|
+
tabs.enableTabsScroll = true;
|
|
643
|
+
}
|
|
644
|
+
this.resizeController.observe(this.overflowContainer);
|
|
645
|
+
}
|
|
646
|
+
async _handleSlotChange() {
|
|
647
|
+
const [tabsElement] = this.scrollContent;
|
|
648
|
+
await (tabsElement == null ? void 0 : tabsElement.updateComplete);
|
|
649
|
+
this._updateScrollState();
|
|
650
|
+
}
|
|
651
|
+
_updateScrollState() {
|
|
652
|
+
const { scrollContent, overflowState } = this;
|
|
653
|
+
if (scrollContent) {
|
|
654
|
+
const [tabsElement] = this.scrollContent;
|
|
655
|
+
const { canScrollLeft, canScrollRight } = (tabsElement == null ? void 0 : tabsElement.scrollState) || {
|
|
656
|
+
canScrollLeft: false,
|
|
657
|
+
canScrollRight: false
|
|
658
|
+
};
|
|
659
|
+
this.overflowState = {
|
|
660
|
+
...overflowState,
|
|
661
|
+
canScrollLeft,
|
|
662
|
+
canScrollRight
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
_handleScrollClick(event) {
|
|
667
|
+
const currentTarget = event.currentTarget;
|
|
668
|
+
const [tabsElement] = this.scrollContent;
|
|
669
|
+
const dist = tabsElement.clientWidth * this.scrollFactor;
|
|
670
|
+
const left = currentTarget.classList.contains("left-scroll") ? -dist : dist;
|
|
671
|
+
tabsElement.scrollTabs(left, "smooth");
|
|
672
|
+
}
|
|
673
|
+
updated(changedProperties) {
|
|
674
|
+
super.updated(changedProperties);
|
|
675
|
+
if (changedProperties.has("dir")) {
|
|
676
|
+
this._updateScrollState();
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
render() {
|
|
680
|
+
const { canScrollRight, canScrollLeft } = this.overflowState;
|
|
681
|
+
const ariaLabelPrevious = this.labelPrevious;
|
|
682
|
+
const ariaLabelNext = this.labelNext;
|
|
683
|
+
return lit.html`
|
|
66
684
|
<div
|
|
67
|
-
class=${
|
|
685
|
+
class=${classMap_js.classMap({
|
|
686
|
+
"tabs-overflow-container": true,
|
|
687
|
+
"left-shadow": canScrollLeft,
|
|
688
|
+
"right-shadow": canScrollRight
|
|
689
|
+
})}
|
|
68
690
|
>
|
|
69
691
|
<luzmo-action-button
|
|
70
|
-
class=${
|
|
71
|
-
|
|
692
|
+
class=${classMap_js.classMap({
|
|
693
|
+
"left-scroll": true,
|
|
694
|
+
show: canScrollLeft
|
|
695
|
+
})}
|
|
696
|
+
aria-label=${ariaLabelPrevious}
|
|
72
697
|
quiet
|
|
73
698
|
dir="rtl"
|
|
74
699
|
tabindex="-1"
|
|
75
700
|
@click=${this._handleScrollClick}
|
|
76
701
|
>
|
|
77
|
-
<luzmo-icon slot="icon" .icon=${
|
|
702
|
+
<luzmo-icon slot="icon" .icon=${icons.luzmoAngleLeft}></luzmo-icon>
|
|
78
703
|
</luzmo-action-button>
|
|
79
704
|
<luzmo-action-button
|
|
80
|
-
class=${
|
|
81
|
-
|
|
705
|
+
class=${classMap_js.classMap({
|
|
706
|
+
"right-scroll": true,
|
|
707
|
+
show: canScrollRight
|
|
708
|
+
})}
|
|
709
|
+
aria-label=${ariaLabelNext}
|
|
82
710
|
quiet
|
|
83
711
|
tabindex="-1"
|
|
84
712
|
@click=${this._handleScrollClick}
|
|
85
713
|
>
|
|
86
|
-
<luzmo-icon slot="icon" .icon=${
|
|
714
|
+
<luzmo-icon slot="icon" .icon=${icons.luzmoAngleRight}></luzmo-icon>
|
|
87
715
|
</luzmo-action-button>
|
|
88
716
|
<slot
|
|
89
717
|
@slotchange=${this._handleSlotChange}
|
|
90
718
|
@luzmo-tabs-scroll=${this._updateScrollState}
|
|
91
719
|
></slot>
|
|
92
720
|
</div>
|
|
93
|
-
|
|
721
|
+
`;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
__decorateClass([
|
|
725
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
726
|
+
], LuzmoTabsOverflow.prototype, "compact");
|
|
727
|
+
__decorateClass([
|
|
728
|
+
decorators_js.property({ type: String, attribute: "label-previous" })
|
|
729
|
+
], LuzmoTabsOverflow.prototype, "labelPrevious");
|
|
730
|
+
__decorateClass([
|
|
731
|
+
decorators_js.property({ type: String, attribute: "label-next" })
|
|
732
|
+
], LuzmoTabsOverflow.prototype, "labelNext");
|
|
733
|
+
__decorateClass([
|
|
734
|
+
decorators_js.property({ reflect: true })
|
|
735
|
+
], LuzmoTabsOverflow.prototype, "dir");
|
|
736
|
+
__decorateClass([
|
|
737
|
+
decorators_js.state()
|
|
738
|
+
], LuzmoTabsOverflow.prototype, "overflowState");
|
|
739
|
+
__decorateClass([
|
|
740
|
+
decorators_js.queryAssignedElements({ selector: "luzmo-tabs", flatten: true })
|
|
741
|
+
], LuzmoTabsOverflow.prototype, "tabs");
|
|
742
|
+
__decorateClass([
|
|
743
|
+
decorators_js.query(".tabs-overflow-container")
|
|
744
|
+
], LuzmoTabsOverflow.prototype, "overflowContainer");
|
|
745
|
+
if (!customElements.get("luzmo-tab")) {
|
|
746
|
+
customElements.define("luzmo-tab", LuzmoTab);
|
|
747
|
+
}
|
|
748
|
+
if (!customElements.get("luzmo-tabs")) {
|
|
749
|
+
customElements.define("luzmo-tabs", LuzmoTabs);
|
|
750
|
+
}
|
|
751
|
+
if (!customElements.get("luzmo-tab-panel")) {
|
|
752
|
+
customElements.define("luzmo-tab-panel", LuzmoTabPanel);
|
|
753
|
+
}
|
|
754
|
+
if (!customElements.get("luzmo-tabs-overflow")) {
|
|
755
|
+
customElements.define("luzmo-tabs-overflow", LuzmoTabsOverflow);
|
|
756
|
+
}
|
|
757
|
+
exports.LuzmoTab = LuzmoTab;
|
|
758
|
+
exports.LuzmoTabPanel = LuzmoTabPanel;
|
|
759
|
+
exports.LuzmoTabs = LuzmoTabs;
|
|
760
|
+
exports.LuzmoTabsOverflow = LuzmoTabsOverflow;
|