@luzmo/lucero 1.0.1-alpha.4 → 1.0.1-alpha.40
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 +6 -6
- package/components/accordion/index.js +14 -13
- package/components/action-bar/index.cjs +4 -4
- package/components/action-bar/index.js +20 -18
- package/components/action-button/index.cjs +3 -3
- package/components/action-button/index.js +7 -6
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +2 -2
- package/components/{action-group-DBImibFn.js → action-group-Bwt9w8Vh.js} +10 -9
- package/components/action-group-D917z7XF.cjs +20 -0
- package/components/action-menu/index.cjs +9 -9
- package/components/action-menu/index.js +10 -10
- package/components/avatar/index.cjs +3 -3
- package/components/avatar/index.js +7 -7
- package/components/base-5nDSSNeT.cjs +18 -0
- package/components/base-CdYjmV_8.js +96 -0
- package/components/button/button-base.d.ts +16 -0
- package/components/button/button.d.ts +38 -2
- package/components/button/index.cjs +2 -2
- package/components/button/index.js +37 -32
- package/components/{button-base-DbkDzb71.js → button-base-B5uul3tZ.js} +54 -39
- package/components/button-base-C7or8-FB.cjs +25 -0
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +11 -9
- package/components/calendar/index.cjs +96 -1
- package/components/calendar/index.js +538 -6
- package/components/checkbox/index.cjs +4 -4
- package/components/checkbox/index.js +10 -8
- package/components/{checkbox-mixin-Do7EgtpQ.js → checkbox-mixin-DUbGDm7f.js} +9 -9
- package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-DhN8CIXY.cjs} +3 -3
- package/components/{clear-button-DoeRUWQ3.js → clear-button-Bjp7N52G.js} +14 -13
- package/components/clear-button-C39c3PH0.cjs +18 -0
- package/components/close-button-C4zqQJRL.cjs +18 -0
- package/components/close-button-R-Cyxi_j.js +52 -0
- package/components/color-area/index.cjs +5 -5
- package/components/color-area/index.js +12 -11
- package/components/color-controller-7sNUf7SP.js +386 -0
- package/components/color-controller-ChN-A9Ft.cjs +18 -0
- package/components/color-field/color-field.d.ts +8 -0
- package/components/color-field/index.cjs +4 -4
- package/components/color-field/index.js +38 -25
- package/components/color-handle/index.cjs +2 -2
- package/components/color-handle/index.js +8 -6
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +2 -2
- package/components/color-loupe-CIEFp7ln.cjs +56 -0
- package/components/{color-loupe-CmMsXbjT.js → color-loupe-CLPX6xVb.js} +6 -4
- package/components/color-menu/index.cjs +8 -8
- package/components/color-menu/index.js +46 -46
- package/components/color-palette/color-palette.d.ts +6 -2
- package/components/color-palette/index.cjs +1 -1
- package/components/color-palette/index.js +35 -34
- package/components/color-palette-group/color-palette-group.d.ts +79 -0
- package/components/color-palette-group/index.cjs +28 -0
- package/components/color-palette-group/index.d.ts +7 -0
- package/components/color-palette-group/index.js +206 -0
- package/components/color-picker/color-picker.d.ts +31 -2
- package/components/color-picker/index.cjs +6 -5
- package/components/color-picker/index.js +16 -12
- package/components/color-slider/index.cjs +40 -1
- package/components/color-slider/index.js +452 -6
- package/components/date-time-picker/index.cjs +16 -16
- package/components/date-time-picker/index.js +105 -106
- package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-CO-VPlqq.js} +4 -4
- package/components/{dependency-manger-C5HCkMMB.cjs → dependency-manger-uthev62E.cjs} +1 -1
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +11 -9
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +2 -2
- package/components/field-group-BYHNJmv0.cjs +23 -0
- package/components/{field-group-DXfBWrkO.js → field-group-CHmw159R.js} +7 -5
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +2 -2
- package/components/{field-label-CZ2zzChK.js → field-label-Cy3xMWZ-.js} +9 -8
- package/components/field-label-DZoeqJJX.cjs +25 -0
- package/components/{focus-visible-DBlJGoEW.js → focus-visible-BvScGDCE.js} +20 -20
- package/components/focus-visible-D4BXb5RB.cjs +18 -0
- package/components/{focusable-BxtpnzWp.js → focusable-BjvsvVam.js} +3 -2
- package/components/focusable-CbVKgGfS.cjs +18 -0
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +22 -20
- package/components/index.cjs +1 -1
- package/components/index.js +140 -138
- package/components/infield-button/index.cjs +2 -2
- package/components/infield-button/index.js +6 -5
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +7 -5
- package/components/{language-resolution-8yZa5r_P.js → language-resolution-B-wjV5bb.js} +9 -8
- package/components/{directive-C7oCP5Bh.cjs → language-resolution-EUER43cg.cjs} +1 -5
- package/components/like-anchor-B2EqJPdw.cjs +32 -0
- package/components/{like-anchor-Bvn_vLQ8.js → like-anchor-CgqCU210.js} +23 -22
- package/components/{manage-help-text-DhgARkZX.cjs → manage-help-text-Bat9yGvF.cjs} +3 -3
- package/components/{manage-help-text-syYnjKGL.js → manage-help-text-C9sCHK3R.js} +8 -8
- package/components/menu/index.cjs +38 -13
- package/components/menu/index.js +138 -105
- package/components/menu/menu-item.d.ts +8 -1
- package/components/multi-language-field/index.cjs +2 -2
- package/components/multi-language-field/index.js +9 -7
- package/components/number-field/index.cjs +5 -5
- package/components/number-field/index.js +122 -85
- package/components/number-field/number-field.d.ts +145 -0
- package/components/observe-slot-presence-CNltc0C0.cjs +18 -0
- package/components/{observe-slot-presence-CmVi0zTc.js → observe-slot-presence-DFi6GE3H.js} +1 -1
- package/components/observe-slot-text-CBMHpuIK.cjs +18 -0
- package/components/{observe-slot-text-BPfIQQtz.js → observe-slot-text-DorVpCL4.js} +14 -15
- package/components/options/index.cjs +26 -58
- package/components/options/index.js +205 -849
- package/components/overlay/index.cjs +6 -6
- package/components/overlay/index.js +31 -32
- package/components/overlay-BhrVS5h7.cjs +47 -0
- package/components/overlay-C-No3oJQ.js +1736 -0
- package/components/{pending-state-CaH1si5b.cjs → pending-state-DQctFHI8.cjs} +2 -2
- package/components/{pending-state-DTX7ggyF.js → pending-state-Dx1u3EXA.js} +2 -2
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +3 -3
- package/components/{picker-BmoXv1jt.js → picker-Cm6_didQ.js} +44 -44
- package/components/picker-DxYgh4LR.cjs +123 -0
- package/components/picker-button/index.cjs +4 -4
- package/components/picker-button/index.js +8 -7
- package/components/{platform-BiXhwqk3.cjs → platform-BJnOJJag.cjs} +1 -1
- package/components/{platform-BM-uMWpX.js → platform-CqwNrovd.js} +12 -12
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +2 -2
- package/components/popover-lcZnODPK.cjs +30 -0
- package/components/{popover-DjX0aAnY.js → popover-ucIgjbQs.js} +8 -7
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +2 -2
- package/components/{progress-circle-DXH9z8-6.js → progress-circle-D5J0ZwY0.js} +8 -7
- package/components/progress-circle-DgMbqrzG.cjs +33 -0
- package/components/radio/index.cjs +2 -2
- package/components/radio/index.js +12 -11
- package/components/search/index.cjs +6 -6
- package/components/search/index.js +6 -6
- package/components/select/index.cjs +43 -42
- package/components/select/index.js +142 -126
- package/components/select/select.d.ts +1 -1
- package/components/{base-BjTwmyRF.cjs → sized-mixin-DcvJLFeo.cjs} +1 -5
- package/components/{sized-mixin-D4ACoVUr.js → sized-mixin-cJbo3PKR.js} +5 -5
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +48 -1101
- package/components/{strategies-9indNIEb.js → strategies-Bk97oVn1.js} +15 -50
- package/components/strategies-CNgBb6dM.cjs +18 -0
- package/components/{streaming-listener-CP-JE6Fa.js → streaming-listener-BlWm-XZU.js} +5 -6
- package/components/streaming-listener-D9Wc7skA.cjs +18 -0
- package/components/swatch/index.cjs +7 -7
- package/components/swatch/index.js +18 -17
- package/components/switch/index.cjs +2 -2
- package/components/switch/index.js +6 -5
- package/components/tabs/index.cjs +16 -24
- package/components/tabs/index.js +94 -162
- package/components/tags/index.cjs +4 -4
- package/components/tags/index.js +15 -14
- package/components/text-field/index.cjs +3 -3
- package/components/text-field/index.js +13 -11
- package/components/text-field/text-field.d.ts +1 -0
- package/components/{text-field-BIADXoLC.js → text-field-BHaLKkf1.js} +73 -99
- package/components/text-field-DFP7p8Rv.cjs +81 -0
- package/components/text-field.module-Bp4Mwuvj.js +21 -0
- package/components/text-field.module-eAEqjvZu.cjs +18 -0
- package/components/toast/index.cjs +11 -11
- package/components/toast/index.js +11 -9
- package/components/tooltip/index.cjs +4 -4
- package/components/tooltip/index.js +60 -36
- package/components/tooltip/tooltip.d.ts +12 -1
- package/components/unit-input/index.cjs +6 -6
- package/components/unit-input/index.js +12 -11
- package/components/utils.cjs +1 -1
- package/components/utils.js +6 -6
- package/custom-elements.json +1 -1
- package/index.d.ts +1 -0
- package/package.json +67 -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-DJGMcRHb.cjs +0 -20
- package/components/async-directive-BX1T1e1_.cjs +0 -22
- package/components/async-directive-BfcqVjDp.js +0 -82
- 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-XgPLmwP-.cjs +0 -25
- package/components/class-map-Di1D_rCm.cjs +0 -22
- package/components/class-map-NbVXqBU0.js +0 -51
- package/components/clear-button-Qi1pMA5S.cjs +0 -18
- package/components/close-button-BFMBEw3q.cjs +0 -18
- package/components/close-button-BWXdHSx3.js +0 -51
- package/components/color-controller-DTp1juRz.js +0 -3198
- package/components/color-controller-_ZwyhvaU.cjs +0 -18
- package/components/color-loupe-CaA_Lfkk.cjs +0 -56
- package/components/directive-helpers-Cm6gitnu.js +0 -62
- package/components/directive-helpers-DyIRTWwA.cjs +0 -22
- package/components/directive-oAbCiebi.js +0 -44
- package/components/field-group-DkGst3r5.cjs +0 -23
- 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-visible-B0P9aY_G.cjs +0 -18
- package/components/focusable-EbipgXRh.cjs +0 -18
- package/components/if-defined-C9YGdo33.cjs +0 -22
- package/components/if-defined-DOaE2coe.js +0 -27
- package/components/index-A-yOTB_d.js +0 -1490
- package/components/index-BLWuwZXx.cjs +0 -113
- package/components/index-BwxgAdzi.cjs +0 -57
- package/components/index-HjQa8tew.js +0 -1174
- package/components/language-resolution-DJzmyzZq.cjs +0 -18
- package/components/like-anchor-sod1C1fR.cjs +0 -32
- package/components/luzmo-icons-DbwDQtuO.js +0 -229
- package/components/luzmo-icons-DletXGWU.cjs +0 -29
- package/components/mutation-controller-DH7YOCyj.js +0 -52
- package/components/mutation-controller-DkOMCW-c.cjs +0 -22
- package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
- 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/picker-DWsBWdPN.cjs +0 -123
- package/components/popover-KFfO0IYL.cjs +0 -30
- package/components/progress-circle-BvRJNuNo.cjs +0 -33
- 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/sized-mixin-CPxE5C96.cjs +0 -18
- package/components/state-D8JEtYqe.cjs +0 -22
- package/components/state-Deh-vKYE.js +0 -29
- package/components/strategies-BACP6MhR.cjs +0 -18
- package/components/streaming-listener-B00MvALi.cjs +0 -18
- package/components/style-map-CeilmSgs.cjs +0 -22
- package/components/style-map-IgqIKvlE.js +0 -53
- package/components/text-field-D5d_Gt0t.cjs +0 -85
- package/components/text-field.module-ColtFhf_.js +0 -21
- package/components/text-field.module-p_VF2tC_.cjs +0 -18
- package/components/when-CDK1Tt5Y.js +0 -28
- package/components/when-CDZyJPvd.cjs +0 -22
package/components/tabs/index.js
CHANGED
|
@@ -15,43 +15,45 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
18
|
+
import { unsafeCSS as m, nothing as S, html as z, css as _ } from "lit";
|
|
19
|
+
import { property as d } from "lit/decorators/property.js";
|
|
20
|
+
import { a as g } from "../base-CdYjmV_8.js";
|
|
21
|
+
import { F as P } from "../focus-visible-BvScGDCE.js";
|
|
22
|
+
import { O as q } from "../observe-slot-presence-DFi6GE3H.js";
|
|
23
|
+
import { O as B } from "../observe-slot-text-DorVpCL4.js";
|
|
22
24
|
import { r as C } from "../random-id-ByCz1xaq.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
25
|
+
import { IntersectionController as F } from "@lit-labs/observers/intersection-controller.js";
|
|
26
|
+
import { ResizeController as T } from "@lit-labs/observers/resize-controller.js";
|
|
27
|
+
import { property as l, query as x, state as R, queryAssignedElements as U } from "lit/decorators.js";
|
|
28
|
+
import { classMap as f } from "lit/directives/class-map.js";
|
|
29
|
+
import { ifDefined as k } from "lit/directives/if-defined.js";
|
|
30
|
+
import { S as L } from "../sized-mixin-cJbo3PKR.js";
|
|
31
|
+
import { F as D } from "../focusable-BjvsvVam.js";
|
|
32
|
+
import { R as W } from "../roving-tabindex-DOg4z6ZU.js";
|
|
33
|
+
import { luzmoAngleLeft as H, luzmoAngleRight as M } from "@luzmo/icons";
|
|
32
34
|
import "../action-button/index.js";
|
|
33
35
|
import "../icon/index.js";
|
|
34
|
-
const
|
|
36
|
+
const A = () => {
|
|
35
37
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
36
38
|
const r = document.createElement("style");
|
|
37
|
-
r.setAttribute("data-luzmo-vars", ""), r.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-
|
|
39
|
+
r.setAttribute("data-luzmo-vars", ""), r.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-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(r);
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
var
|
|
42
|
+
A();
|
|
43
|
+
const O = ':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!important;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)))!important}#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)}';
|
|
44
|
+
var j = Object.defineProperty, p = (r, t, o, i) => {
|
|
43
45
|
for (var e = void 0, a = r.length - 1, s; a >= 0; a--)
|
|
44
46
|
(s = r[a]) && (e = s(t, o, e) || e);
|
|
45
|
-
return e &&
|
|
47
|
+
return e && j(t, o, e), e;
|
|
46
48
|
};
|
|
47
|
-
class h extends
|
|
48
|
-
q(
|
|
49
|
+
class h extends P(
|
|
50
|
+
B(q(g, '[slot="icon"]'), "")
|
|
49
51
|
) {
|
|
50
52
|
constructor() {
|
|
51
53
|
super(...arguments), this.disabled = !1, this.label = "", this.selected = !1, this.vertical = !1, this.value = "";
|
|
52
54
|
}
|
|
53
55
|
static get styles() {
|
|
54
|
-
return [
|
|
56
|
+
return [m(O)];
|
|
55
57
|
}
|
|
56
58
|
get hasIcon() {
|
|
57
59
|
return this.slotContentIsPresent;
|
|
@@ -60,8 +62,8 @@ class h extends _(
|
|
|
60
62
|
return !!this.label || this.slotHasContent;
|
|
61
63
|
}
|
|
62
64
|
render() {
|
|
63
|
-
return
|
|
64
|
-
${this.hasIcon ?
|
|
65
|
+
return z`
|
|
66
|
+
${this.hasIcon ? z` <slot name="icon"></slot> ` : S}
|
|
65
67
|
<label id="item-label" ?hidden=${!this.hasLabel}>
|
|
66
68
|
${this.slotHasContent ? S : this.label}
|
|
67
69
|
<slot>${this.label}</slot>
|
|
@@ -75,33 +77,33 @@ class h extends _(
|
|
|
75
77
|
super.updated(t), t.has("selected") && (this.setAttribute("aria-selected", this.selected ? "true" : "false"), this.setAttribute("tabindex", this.selected ? "0" : "-1")), t.has("disabled") && (this.disabled ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled"));
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
p([
|
|
81
|
+
d({ type: Boolean, reflect: !0 })
|
|
80
82
|
], h.prototype, "disabled");
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
p([
|
|
84
|
+
d({ reflect: !0 })
|
|
83
85
|
], h.prototype, "label");
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
p([
|
|
87
|
+
d({ type: Boolean, reflect: !0 })
|
|
86
88
|
], h.prototype, "selected");
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
p([
|
|
90
|
+
d({ type: Boolean, reflect: !0 })
|
|
89
91
|
], h.prototype, "vertical");
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
p([
|
|
93
|
+
d({ type: String, reflect: !0 })
|
|
92
94
|
], h.prototype, "value");
|
|
93
|
-
const
|
|
94
|
-
var
|
|
95
|
+
const N = ":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))}";
|
|
96
|
+
var X = Object.defineProperty, $ = (r, t, o, i) => {
|
|
95
97
|
for (var e = void 0, a = r.length - 1, s; a >= 0; a--)
|
|
96
98
|
(s = r[a]) && (e = s(t, o, e) || e);
|
|
97
|
-
return e &&
|
|
99
|
+
return e && X(t, o, e), e;
|
|
98
100
|
};
|
|
99
|
-
class
|
|
101
|
+
class y extends g {
|
|
100
102
|
constructor() {
|
|
101
103
|
super(...arguments), this.selected = !1, this.value = "";
|
|
102
104
|
}
|
|
103
105
|
static get styles() {
|
|
104
|
-
return [
|
|
106
|
+
return [m(N)];
|
|
105
107
|
}
|
|
106
108
|
handleFocusin() {
|
|
107
109
|
this.removeAttribute("tabindex");
|
|
@@ -110,7 +112,7 @@ class w extends g {
|
|
|
110
112
|
this.tabIndex = this.selected ? 0 : -1;
|
|
111
113
|
}
|
|
112
114
|
render() {
|
|
113
|
-
return
|
|
115
|
+
return z`
|
|
114
116
|
<slot
|
|
115
117
|
@focusin=${this.handleFocusin}
|
|
116
118
|
@focusout=${this.handleFocusout}
|
|
@@ -124,89 +126,19 @@ class w extends g {
|
|
|
124
126
|
t.has("selected") && (this.selected ? (this.removeAttribute("aria-hidden"), this.tabIndex = 0) : (this.setAttribute("aria-hidden", "true"), this.tabIndex = -1));
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
],
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
],
|
|
133
|
-
/**
|
|
134
|
-
|
|
135
|
-
* Copyright 2021 Google LLC
|
|
136
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
137
|
-
*/
|
|
138
|
-
class N {
|
|
139
|
-
constructor(t, { target: o, config: i, callback: e, skipInitial: a }) {
|
|
140
|
-
this.t = /* @__PURE__ */ new Set(), this.o = !1, this.i = !1, this.h = t, o !== null && this.t.add(o ?? t), this.o = a ?? this.o, this.callback = e, window.IntersectionObserver ? (this.u = new IntersectionObserver((s) => {
|
|
141
|
-
const f = this.i;
|
|
142
|
-
this.i = !1, this.o && f || (this.handleChanges(s), this.h.requestUpdate());
|
|
143
|
-
}, i), t.addController(this)) : console.warn("IntersectionController error: browser does not support IntersectionObserver.");
|
|
144
|
-
}
|
|
145
|
-
handleChanges(t) {
|
|
146
|
-
var o;
|
|
147
|
-
this.value = (o = this.callback) == null ? void 0 : o.call(this, t, this.u);
|
|
148
|
-
}
|
|
149
|
-
hostConnected() {
|
|
150
|
-
for (const t of this.t) this.observe(t);
|
|
151
|
-
}
|
|
152
|
-
hostDisconnected() {
|
|
153
|
-
this.disconnect();
|
|
154
|
-
}
|
|
155
|
-
async hostUpdated() {
|
|
156
|
-
const t = this.u.takeRecords();
|
|
157
|
-
t.length && this.handleChanges(t);
|
|
158
|
-
}
|
|
159
|
-
observe(t) {
|
|
160
|
-
this.t.add(t), this.u.observe(t), this.i = !0;
|
|
161
|
-
}
|
|
162
|
-
unobserve(t) {
|
|
163
|
-
this.t.delete(t), this.u.unobserve(t);
|
|
164
|
-
}
|
|
165
|
-
disconnect() {
|
|
166
|
-
this.u.disconnect();
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* @license
|
|
171
|
-
* Copyright 2021 Google LLC
|
|
172
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
173
|
-
*/
|
|
174
|
-
class $ {
|
|
175
|
-
constructor(t, { target: o, config: i, callback: e, skipInitial: a }) {
|
|
176
|
-
this.t = /* @__PURE__ */ 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((s) => {
|
|
177
|
-
this.handleChanges(s), this.h.requestUpdate();
|
|
178
|
-
}), t.addController(this)) : console.warn("ResizeController error: browser does not support ResizeObserver.");
|
|
179
|
-
}
|
|
180
|
-
handleChanges(t) {
|
|
181
|
-
var o;
|
|
182
|
-
this.value = (o = this.callback) == null ? void 0 : o.call(this, t, this.u);
|
|
183
|
-
}
|
|
184
|
-
hostConnected() {
|
|
185
|
-
for (const t of this.t) this.observe(t);
|
|
186
|
-
}
|
|
187
|
-
hostDisconnected() {
|
|
188
|
-
this.disconnect();
|
|
189
|
-
}
|
|
190
|
-
async hostUpdated() {
|
|
191
|
-
!this.o && this.i && this.handleChanges([]), this.i = !1;
|
|
192
|
-
}
|
|
193
|
-
observe(t) {
|
|
194
|
-
this.t.add(t), this.u.observe(t, this.l), this.i = !0, this.h.requestUpdate();
|
|
195
|
-
}
|
|
196
|
-
unobserve(t) {
|
|
197
|
-
this.t.delete(t), this.u.unobserve(t);
|
|
198
|
-
}
|
|
199
|
-
disconnect() {
|
|
200
|
-
this.u.disconnect();
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
const I = "#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)) )}", X = "#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}";
|
|
204
|
-
var Y = Object.defineProperty, c = (r, t, o, i) => {
|
|
129
|
+
$([
|
|
130
|
+
d({ type: Boolean, reflect: !0 })
|
|
131
|
+
], y.prototype, "selected");
|
|
132
|
+
$([
|
|
133
|
+
d({ type: String, reflect: !0 })
|
|
134
|
+
], y.prototype, "value");
|
|
135
|
+
const E = "#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)) )}", Y = "#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}";
|
|
136
|
+
var G = Object.defineProperty, c = (r, t, o, i) => {
|
|
205
137
|
for (var e = void 0, a = r.length - 1, s; a >= 0; a--)
|
|
206
138
|
(s = r[a]) && (e = s(t, o, e) || e);
|
|
207
|
-
return e &&
|
|
139
|
+
return e && G(t, o, e), e;
|
|
208
140
|
};
|
|
209
|
-
const
|
|
141
|
+
const v = {
|
|
210
142
|
baseSize: 100,
|
|
211
143
|
noSelectionStyle: "transform: translateX(0px) scaleX(0) scaleY(0)",
|
|
212
144
|
transformX(r, t) {
|
|
@@ -218,7 +150,7 @@ const m = {
|
|
|
218
150
|
return `transform: translateY(${r}px) scaleY(${o});`;
|
|
219
151
|
},
|
|
220
152
|
baseStyles() {
|
|
221
|
-
return
|
|
153
|
+
return _`
|
|
222
154
|
:host([direction='vertical-right']) #selection-indicator,
|
|
223
155
|
:host([direction='vertical']) #selection-indicator {
|
|
224
156
|
height: ${this.baseSize}px;
|
|
@@ -229,21 +161,21 @@ const m = {
|
|
|
229
161
|
`;
|
|
230
162
|
}
|
|
231
163
|
};
|
|
232
|
-
function
|
|
164
|
+
function K(r, t, o, i) {
|
|
233
165
|
const e = r + (t === "rtl" ? -1 : 1), a = o[e], s = i.scrollLeft + i.offsetWidth;
|
|
234
166
|
return a ? a.offsetLeft - i.offsetWidth : s;
|
|
235
167
|
}
|
|
236
|
-
function
|
|
168
|
+
function V(r, t, o, i) {
|
|
237
169
|
const e = r + (t === "rtl" ? 1 : -1), a = o[e], s = t === "rtl" ? -i.offsetWidth : 0;
|
|
238
170
|
return a ? a.offsetLeft + a.offsetWidth : s;
|
|
239
171
|
}
|
|
240
|
-
class n extends
|
|
172
|
+
class n extends L(D, { noDefaultSize: !0 }) {
|
|
241
173
|
constructor() {
|
|
242
|
-
super(), this.auto = !1, this.compact = !1, this.direction = "horizontal", this.emphasized = !1, this.label = "", this.enableTabsScroll = !1, this.quiet = !1, this.selectionIndicatorStyle =
|
|
174
|
+
super(), this.auto = !1, this.compact = !1, this.direction = "horizontal", this.emphasized = !1, this.label = "", this.enableTabsScroll = !1, this.quiet = !1, this.selectionIndicatorStyle = v.noSelectionStyle, this.shouldAnimate = !1, this.selected = "", this._tabs = [], this.resizeController = new T(this, {
|
|
243
175
|
callback: () => {
|
|
244
176
|
this.updateSelectionIndicator();
|
|
245
177
|
}
|
|
246
|
-
}), this.rovingTabindexController = new
|
|
178
|
+
}), this.rovingTabindexController = new W(this, {
|
|
247
179
|
focusInIndex: (t) => {
|
|
248
180
|
let o = 0;
|
|
249
181
|
return t.find((e, a) => {
|
|
@@ -290,7 +222,7 @@ class n extends T(U, { noDefaultSize: !0 }) {
|
|
|
290
222
|
}, this.updateSelectionIndicator = async () => {
|
|
291
223
|
const t = this.tabs.find((e) => e.selected);
|
|
292
224
|
if (!t) {
|
|
293
|
-
this.selectionIndicatorStyle =
|
|
225
|
+
this.selectionIndicatorStyle = v.noSelectionStyle;
|
|
294
226
|
return;
|
|
295
227
|
}
|
|
296
228
|
await Promise.all([
|
|
@@ -298,8 +230,8 @@ class n extends T(U, { noDefaultSize: !0 }) {
|
|
|
298
230
|
document.fonts ? document.fonts.ready : Promise.resolve()
|
|
299
231
|
]);
|
|
300
232
|
const { width: o, height: i } = t.getBoundingClientRect();
|
|
301
|
-
this.selectionIndicatorStyle = this.direction === "horizontal" ?
|
|
302
|
-
}, new
|
|
233
|
+
this.selectionIndicatorStyle = this.direction === "horizontal" ? v.transformX(t.offsetLeft, o) : v.transformY(t.offsetTop, i);
|
|
234
|
+
}, new F(this, {
|
|
303
235
|
config: {
|
|
304
236
|
root: null,
|
|
305
237
|
rootMargin: "0px",
|
|
@@ -312,9 +244,9 @@ class n extends T(U, { noDefaultSize: !0 }) {
|
|
|
312
244
|
}
|
|
313
245
|
static get styles() {
|
|
314
246
|
return [
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
247
|
+
m(E),
|
|
248
|
+
m(Y),
|
|
249
|
+
v.baseStyles()
|
|
318
250
|
];
|
|
319
251
|
}
|
|
320
252
|
set tabs(t) {
|
|
@@ -342,11 +274,11 @@ class n extends T(U, { noDefaultSize: !0 }) {
|
|
|
342
274
|
* @param behavior - The scroll behavior to use. Defaults to 'smooth'.
|
|
343
275
|
*/
|
|
344
276
|
scrollTabs(t, o = "smooth") {
|
|
345
|
-
var
|
|
277
|
+
var w;
|
|
346
278
|
if (t === 0) return;
|
|
347
|
-
const { scrollLeft: i, clientWidth: e, scrollWidth: a } = this.tabList, s = a - e - Math.abs(i),
|
|
348
|
-
(
|
|
349
|
-
left:
|
|
279
|
+
const { scrollLeft: i, clientWidth: e, scrollWidth: a } = this.tabList, s = a - e - Math.abs(i), I = this.dir === "ltr" ? this.limitDeltaToInterval(-i, s) : this.limitDeltaToInterval(-s, Math.abs(i));
|
|
280
|
+
(w = this.tabList) == null || w.scrollBy({
|
|
281
|
+
left: I(t),
|
|
350
282
|
top: 0,
|
|
351
283
|
behavior: o
|
|
352
284
|
});
|
|
@@ -367,12 +299,12 @@ class n extends T(U, { noDefaultSize: !0 }) {
|
|
|
367
299
|
}
|
|
368
300
|
getNecessaryAutoScroll(t) {
|
|
369
301
|
const o = this.tabs[t], i = o.offsetLeft + o.offsetWidth, e = this.tabList.scrollLeft + this.tabList.offsetWidth, a = o.offsetLeft, s = this.tabList.scrollLeft;
|
|
370
|
-
return i > e ?
|
|
302
|
+
return i > e ? K(
|
|
371
303
|
t,
|
|
372
304
|
this.dir,
|
|
373
305
|
this.tabs,
|
|
374
306
|
this.tabList
|
|
375
|
-
) : a < s ?
|
|
307
|
+
) : a < s ? V(
|
|
376
308
|
t,
|
|
377
309
|
this.dir,
|
|
378
310
|
this.tabs,
|
|
@@ -403,9 +335,9 @@ class n extends T(U, { noDefaultSize: !0 }) {
|
|
|
403
335
|
});
|
|
404
336
|
}
|
|
405
337
|
render() {
|
|
406
|
-
return
|
|
338
|
+
return z`
|
|
407
339
|
<div
|
|
408
|
-
class=${
|
|
340
|
+
class=${f({ scroll: this.enableTabsScroll })}
|
|
409
341
|
aria-label=${k(this.label ?? void 0)}
|
|
410
342
|
@click=${this.onClick}
|
|
411
343
|
@keydown=${this.onKeyDown}
|
|
@@ -506,18 +438,18 @@ c([
|
|
|
506
438
|
c([
|
|
507
439
|
l({ reflect: !0 })
|
|
508
440
|
], n.prototype, "selected");
|
|
509
|
-
const
|
|
510
|
-
var
|
|
441
|
+
const J = ':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}';
|
|
442
|
+
var Q = Object.defineProperty, b = (r, t, o, i) => {
|
|
511
443
|
for (var e = void 0, a = r.length - 1, s; a >= 0; a--)
|
|
512
444
|
(s = r[a]) && (e = s(t, o, e) || e);
|
|
513
|
-
return e &&
|
|
445
|
+
return e && Q(t, o, e), e;
|
|
514
446
|
};
|
|
515
|
-
class u extends
|
|
447
|
+
class u extends L(g) {
|
|
516
448
|
constructor() {
|
|
517
449
|
super(), this.compact = !1, this.labelPrevious = "Scroll to previous tabs", this.labelNext = "Scroll to next tabs", this.overflowState = {
|
|
518
450
|
canScrollLeft: !1,
|
|
519
451
|
canScrollRight: !1
|
|
520
|
-
}, this.scrollFactor = 0.5, this.resizeController = new
|
|
452
|
+
}, this.scrollFactor = 0.5, this.resizeController = new T(this, {
|
|
521
453
|
target: this,
|
|
522
454
|
callback: () => {
|
|
523
455
|
this._updateScrollState();
|
|
@@ -525,7 +457,7 @@ class u extends T(g) {
|
|
|
525
457
|
});
|
|
526
458
|
}
|
|
527
459
|
static get styles() {
|
|
528
|
-
return [
|
|
460
|
+
return [m(J), m(E)];
|
|
529
461
|
}
|
|
530
462
|
get scrollContent() {
|
|
531
463
|
return this.tabs;
|
|
@@ -562,16 +494,16 @@ class u extends T(g) {
|
|
|
562
494
|
}
|
|
563
495
|
render() {
|
|
564
496
|
const { canScrollRight: t, canScrollLeft: o } = this.overflowState, i = this.labelPrevious, e = this.labelNext;
|
|
565
|
-
return
|
|
497
|
+
return z`
|
|
566
498
|
<div
|
|
567
|
-
class=${
|
|
499
|
+
class=${f({
|
|
568
500
|
"tabs-overflow-container": !0,
|
|
569
501
|
"left-shadow": o,
|
|
570
502
|
"right-shadow": t
|
|
571
503
|
})}
|
|
572
504
|
>
|
|
573
505
|
<luzmo-action-button
|
|
574
|
-
class=${
|
|
506
|
+
class=${f({
|
|
575
507
|
"left-scroll": !0,
|
|
576
508
|
show: o
|
|
577
509
|
})}
|
|
@@ -581,10 +513,10 @@ class u extends T(g) {
|
|
|
581
513
|
tabindex="-1"
|
|
582
514
|
@click=${this._handleScrollClick}
|
|
583
515
|
>
|
|
584
|
-
<luzmo-icon slot="icon" .icon=${
|
|
516
|
+
<luzmo-icon slot="icon" .icon=${H}></luzmo-icon>
|
|
585
517
|
</luzmo-action-button>
|
|
586
518
|
<luzmo-action-button
|
|
587
|
-
class=${
|
|
519
|
+
class=${f({
|
|
588
520
|
"right-scroll": !0,
|
|
589
521
|
show: t
|
|
590
522
|
})}
|
|
@@ -593,7 +525,7 @@ class u extends T(g) {
|
|
|
593
525
|
tabindex="-1"
|
|
594
526
|
@click=${this._handleScrollClick}
|
|
595
527
|
>
|
|
596
|
-
<luzmo-icon slot="icon" .icon=${
|
|
528
|
+
<luzmo-icon slot="icon" .icon=${M}></luzmo-icon>
|
|
597
529
|
</luzmo-action-button>
|
|
598
530
|
<slot
|
|
599
531
|
@slotchange=${this._handleSlotChange}
|
|
@@ -603,34 +535,34 @@ class u extends T(g) {
|
|
|
603
535
|
`;
|
|
604
536
|
}
|
|
605
537
|
}
|
|
606
|
-
|
|
538
|
+
b([
|
|
607
539
|
l({ type: Boolean, reflect: !0 })
|
|
608
540
|
], u.prototype, "compact");
|
|
609
|
-
|
|
541
|
+
b([
|
|
610
542
|
l({ type: String, attribute: "label-previous" })
|
|
611
543
|
], u.prototype, "labelPrevious");
|
|
612
|
-
|
|
544
|
+
b([
|
|
613
545
|
l({ type: String, attribute: "label-next" })
|
|
614
546
|
], u.prototype, "labelNext");
|
|
615
|
-
|
|
547
|
+
b([
|
|
616
548
|
l({ reflect: !0 })
|
|
617
549
|
], u.prototype, "dir");
|
|
618
|
-
|
|
550
|
+
b([
|
|
619
551
|
R()
|
|
620
552
|
], u.prototype, "overflowState");
|
|
621
|
-
|
|
622
|
-
|
|
553
|
+
b([
|
|
554
|
+
U({ selector: "luzmo-tabs", flatten: !0 })
|
|
623
555
|
], u.prototype, "tabs");
|
|
624
|
-
|
|
556
|
+
b([
|
|
625
557
|
x(".tabs-overflow-container")
|
|
626
558
|
], u.prototype, "overflowContainer");
|
|
627
559
|
customElements.get("luzmo-tab") || customElements.define("luzmo-tab", h);
|
|
628
560
|
customElements.get("luzmo-tabs") || customElements.define("luzmo-tabs", n);
|
|
629
|
-
customElements.get("luzmo-tab-panel") || customElements.define("luzmo-tab-panel",
|
|
561
|
+
customElements.get("luzmo-tab-panel") || customElements.define("luzmo-tab-panel", y);
|
|
630
562
|
customElements.get("luzmo-tabs-overflow") || customElements.define("luzmo-tabs-overflow", u);
|
|
631
563
|
export {
|
|
632
564
|
h as LuzmoTab,
|
|
633
|
-
|
|
565
|
+
y as LuzmoTabPanel,
|
|
634
566
|
n as LuzmoTabs,
|
|
635
567
|
u as LuzmoTabsOverflow
|
|
636
568
|
};
|