@luzmo/lucero 2.7.1 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -1
- package/components/{accordion-BJLsCC-2.js → accordion-C9cVd8A8.js} +1 -1
- package/components/{accordion-OQ0RoC_7.cjs → accordion-DulsAsi7.cjs} +1 -1
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +1 -1
- package/components/{action-bar-Dyt2tyjr.cjs → action-bar-BjTUUATD.cjs} +1 -1
- package/components/{action-bar-B-Y-gJ8B.js → action-bar-XpNzXzkl.js} +4 -4
- package/components/action-button/index.cjs +1 -1
- package/components/action-button/index.js +1 -1
- package/components/{action-button-CL4ZlryE.cjs → action-button-Cz4jSv__.cjs} +1 -1
- package/components/{action-button-BB3ZZFNN.js → action-button-LmKtPKfe.js} +1 -1
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +1 -1
- package/components/{action-group-HECoPCas.js → action-group-CPxKx_oR.js} +1 -1
- package/components/{action-group-Doll-3Bf.cjs → action-group-DBxQJRLs.cjs} +1 -1
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +1 -1
- package/components/{action-menu-DphCCjvX.cjs → action-menu-BFy0mEyu.cjs} +1 -1
- package/components/{action-menu-Bv9EA7__.js → action-menu-CT0OYS56.js} +3 -3
- package/components/avatar/index.cjs +1 -1
- package/components/avatar/index.js +1 -1
- package/components/{avatar-CVRQDsx6.js → avatar-BEk23sDA.js} +1 -1
- package/components/{avatar-DFzJbtId.cjs → avatar-C9EAInfy.cjs} +1 -1
- package/components/badge/index.cjs +1 -1
- package/components/badge/index.js +1 -1
- package/components/{badge-DzElGOcl.cjs → badge-CPpKOWh2.cjs} +1 -1
- package/components/{badge-BSfzmBRf.js → badge-bODlaAG_.js} +1 -1
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +2 -2
- package/components/{button-CpaltgRZ.js → button-5jzMIMLW.js} +3 -3
- package/components/{button-BGEWdRbY.cjs → button-CjgL13CD.cjs} +1 -1
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +1 -1
- package/components/{button-group-DMsT6N0P.js → button-group-B59rXxDn.js} +1 -1
- package/components/{button-group-C23OtGC0.cjs → button-group-DxMfPmBg.cjs} +1 -1
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.js +1 -1
- package/components/{calendar-BqyGW8gU.cjs → calendar-4h_Fe-mw.cjs} +1 -1
- package/components/{calendar-D4x5gp_0.js → calendar-5V1hrKWy.js} +2 -2
- package/components/chat-message/index.cjs +1 -1
- package/components/chat-message/index.js +1 -1
- package/components/{chat-message-5gP_qbiz.js → chat-message--nzqHl6e.js} +1 -1
- package/components/{chat-message-Dn5GKsSD.cjs → chat-message-BzSel33p.cjs} +1 -1
- package/components/chat-message-group/index.cjs +1 -1
- package/components/chat-message-group/index.js +1 -1
- package/components/{chat-message-group-Bp4mshBY.js → chat-message-group-BIXlrlYi.js} +1 -1
- package/components/{chat-message-group-CJddlS85.cjs → chat-message-group-DLkSlQah.cjs} +1 -1
- package/components/checkbox/checkbox.d.ts +2 -0
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.js +1 -1
- package/components/{checkbox-NSSgVzJg.cjs → checkbox-CFQqGnDX.cjs} +1 -1
- package/components/{checkbox-fW7WI915.js → checkbox-D884zXBt.js} +1 -1
- package/components/{close-button-7zS6PUzh.js → close-button-Bw8knwnc.js} +1 -1
- package/components/{close-button-B06i2hJn.cjs → close-button-DhHKKvHu.cjs} +1 -1
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +1 -1
- package/components/{color-area-CFBE-rG3.cjs → color-area-Dnq-HQ-1.cjs} +1 -1
- package/components/{color-area-GGa8KJyd.js → color-area-QSGfRi4o.js} +2 -2
- package/components/color-field/index.cjs +1 -1
- package/components/color-field/index.js +1 -1
- package/components/{color-field-l-aJ6O4a.cjs → color-field-B-GC4H0K.cjs} +1 -1
- package/components/{color-field-BZljmVHt.js → color-field-vmTnlDec.js} +1 -1
- package/components/color-menu/index.cjs +1 -1
- package/components/color-menu/index.js +1 -1
- package/components/{color-menu-C56xj5Oe.cjs → color-menu-DGWGb0iH.cjs} +1 -1
- package/components/{color-menu-CEtmpeN7.js → color-menu-DthtTlKd.js} +7 -7
- package/components/color-palette/index.cjs +1 -1
- package/components/color-palette/index.js +1 -1
- package/components/{color-palette-D5NZDz5I.cjs → color-palette-C4Y8VU9j.cjs} +1 -1
- package/components/{color-palette-UU7Feiwh.js → color-palette-UnwRum-W.js} +1 -1
- package/components/color-palette-group/index.cjs +1 -1
- package/components/color-palette-group/index.js +1 -1
- package/components/{color-palette-group-DhGh0Db8.cjs → color-palette-group-BiPNlMgu.cjs} +1 -1
- package/components/{color-palette-group-CwmC9iR1.js → color-palette-group-jhNz9Gto.js} +1 -1
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.js +1 -1
- package/components/{color-picker-CLGNQIkK.cjs → color-picker-Bu0IOUj-.cjs} +1 -1
- package/components/{color-picker-BDqJodTR.js → color-picker-DbAIgjDv.js} +4 -4
- package/components/color-slider/index.cjs +1 -1
- package/components/color-slider/index.js +1 -1
- package/components/{color-slider-DNd_ZrD6.js → color-slider-BGnaMhIf.js} +1 -1
- package/components/{color-slider-IYBn2DL7.cjs → color-slider-BuhOIoUI.cjs} +1 -1
- package/components/date-range-picker/index.cjs +1 -1
- package/components/date-range-picker/index.js +1 -1
- package/components/{date-range-picker-DyJdcFiA.cjs → date-range-picker-B7J_RFW6.cjs} +1 -1
- package/components/{date-range-picker-CoCz3uDz.js → date-range-picker-BilkNV82.js} +4 -4
- package/components/date-time-picker/index.cjs +1 -1
- package/components/date-time-picker/index.js +1 -1
- package/components/{date-time-picker-CEEeMXGn.cjs → date-time-picker-BNUIfpzG.cjs} +1 -1
- package/components/{date-time-picker-CsgO17tA.js → date-time-picker-DOsLR0EN.js} +4 -4
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +1 -1
- package/components/{divider-fWGUxO6A.cjs → divider-BS5chsgx.cjs} +1 -1
- package/components/{divider-Bt0NIqfu.js → divider-CJRCMeKA.js} +1 -1
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +1 -1
- package/components/{field-label-B3IsGUTv.cjs → field-label-61lILUqu.cjs} +1 -1
- package/components/{field-label-DOUnHwwh.js → field-label-B_VLKIJn.js} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +72 -71
- package/components/infield-button/index.cjs +1 -1
- package/components/infield-button/index.js +1 -1
- package/components/{infield-button-uD1GqTLW.cjs → infield-button-B0qcV4gq.cjs} +1 -1
- package/components/{infield-button-CeE_JxR6.js → infield-button-CcaKuxAs.js} +1 -1
- package/components/{interaction-BjXWVy_C.cjs → interaction--DdZDJnw.cjs} +1 -1
- package/components/{interaction-BpCLJ1OV.js → interaction-DF63SBSQ.js} +1 -1
- package/components/menu/index.cjs +1 -1
- package/components/menu/index.js +1 -1
- package/components/{menu-f2S0m6h9.js → menu-CM-ZA_ZM.js} +1 -1
- package/components/{menu-CoJ5oERs.cjs → menu-tDMNLuND.cjs} +1 -1
- package/components/multi-language-field/index.cjs +1 -1
- package/components/multi-language-field/index.js +1 -1
- package/components/{multi-language-field-SZObnneZ.js → multi-language-field-B6Ne8_Yw.js} +2 -2
- package/components/{multi-language-field-nJmWDtPL.cjs → multi-language-field-C5C5yS94.cjs} +1 -1
- package/components/notice/index.cjs +1 -1
- package/components/notice/index.js +1 -1
- package/components/{notice-CrLVNmqL.js → notice-62Wpb7BH.js} +2 -2
- package/components/{notice-f0p0TiGw.cjs → notice-DrrmwMlw.cjs} +1 -1
- package/components/number-field/index.cjs +1 -1
- package/components/number-field/index.js +1 -1
- package/components/{number-field-BEt0cfcB.js → number-field-CMM5MC2R.js} +2 -2
- package/components/{number-field-DrarDCm4.cjs → number-field-N6nInW0X.cjs} +1 -1
- package/components/options/index.cjs +1 -1
- package/components/options/index.js +1 -1
- package/components/{options-BH_Y3UB6.cjs → options-CsRLHwaY.cjs} +1 -1
- package/components/{options-BiA2h1-i.js → options-DtJTjiP8.js} +2 -2
- package/components/{pending-state-A6NrvaQj.cjs → pending-state-CQuz9Qiv.cjs} +1 -1
- package/components/{pending-state-BuYmUP6G.js → pending-state-KsPO-6Ei.js} +1 -1
- package/components/permission-box/index.cjs +18 -0
- package/components/permission-box/index.d.ts +9 -0
- package/components/permission-box/index.js +19 -0
- package/components/permission-box/permission-box.d.ts +157 -0
- package/components/permission-box/types.d.ts +73 -0
- package/components/permission-box-BsmcqGnU.cjs +176 -0
- package/components/permission-box-yUZKSyS9.js +405 -0
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +1 -1
- package/components/picker-button/index.cjs +1 -1
- package/components/picker-button/index.js +1 -1
- package/components/{picker-button-BWDfzx38.cjs → picker-button-CEo39nlA.cjs} +1 -1
- package/components/{picker-button-BhfY9gyk.js → picker-button-svME8NW2.js} +1 -1
- package/components/{picker-Dd25S3rP.cjs → picker-h0nO2GgS.cjs} +1 -1
- package/components/{picker-JhsRAtSd.js → picker-nWTz5f1J.js} +5 -5
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +1 -1
- package/components/{popover-CFzz83f8.cjs → popover-6Qy-GpJj.cjs} +1 -1
- package/components/{popover-CWrRLzOL.js → popover-BdoJqBC5.js} +1 -1
- package/components/progress-bar/index.cjs +1 -1
- package/components/progress-bar/index.js +1 -1
- package/components/{progress-bar-D6wIZV5l.js → progress-bar-Bc5zjNDp.js} +1 -1
- package/components/{progress-bar-9Qg0PYAq.cjs → progress-bar-BsBnhg4r.cjs} +1 -1
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +1 -1
- package/components/{progress-circle-DcGKwBTC.js → progress-circle-C5UOMP96.js} +1 -1
- package/components/{progress-circle-C_9UZs2Y.cjs → progress-circle-D-JW7zZS.cjs} +1 -1
- package/components/progress-steps/index.cjs +1 -1
- package/components/progress-steps/index.js +1 -1
- package/components/{progress-steps-Byem5ieS.js → progress-steps-BwV4fEcH.js} +1 -1
- package/components/{progress-steps-5MhpnGKv.cjs → progress-steps-l0tbGl3P.cjs} +1 -1
- package/components/prompt-box/index.cjs +1 -1
- package/components/prompt-box/index.js +1 -1
- package/components/{prompt-box-B1rmo4DX.cjs → prompt-box-B3gDbsQo.cjs} +1 -1
- package/components/{prompt-box-CL0ld3Na.js → prompt-box-BUMtyCsa.js} +4 -4
- package/components/question-box/index.cjs +1 -1
- package/components/question-box/index.js +1 -1
- package/components/question-box/question-box-templates.d.ts +1 -1
- package/components/{question-box-DmTWFlRn.cjs → question-box-C7oXNWje.cjs} +59 -59
- package/components/{question-box-CxzEveid.js → question-box-wYSFkVoP.js} +171 -179
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.js +1 -1
- package/components/{radio-CyxICbLM.js → radio-B_oHwHgO.js} +1 -1
- package/components/{radio-Dd-GgUMm.cjs → radio-DJmITM2m.cjs} +1 -1
- package/components/search/index.cjs +1 -1
- package/components/search/index.js +1 -1
- package/components/{search-1KUNWKWg.cjs → search-CXuXsgJt.cjs} +1 -1
- package/components/{search-_NUUJLz0.js → search-Dl5y1IqM.js} +2 -2
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -1
- package/components/{select-ChM3Zfxd.cjs → select-Dm7rf5Un.cjs} +1 -1
- package/components/{select-8gtm46qA.js → select-lS54kKFO.js} +6 -6
- package/components/{sized-mixin-CSajkMro.cjs → sized-mixin-BqV6ywDw.cjs} +1 -1
- package/components/{sized-mixin-BmxIAuoH.js → sized-mixin-Cb-47MjG.js} +17 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/{slider-B1cCAj1x.cjs → slider-B9rBCFmR.cjs} +1 -1
- package/components/{slider-CD-aGN9I.js → slider-BDLAmlBf.js} +3 -3
- package/components/split-view/controllers/pane-visibility-controller.d.ts +22 -0
- package/components/split-view/controllers/size-memory-controller.d.ts +28 -0
- package/components/split-view/index.cjs +1 -1
- package/components/split-view/index.d.ts +1 -0
- package/components/split-view/index.js +1 -1
- package/components/split-view/split-view-model.d.ts +2 -0
- package/components/split-view/split-view.d.ts +85 -7
- package/components/split-view-Dr0Bef6i.cjs +45 -0
- package/components/split-view-akatWAkc.js +565 -0
- package/components/status-light/index.cjs +1 -1
- package/components/status-light/index.js +1 -1
- package/components/{status-light-Do6z53mM.cjs → status-light-CtETRd_o.cjs} +1 -1
- package/components/{status-light-DqHhhZed.js → status-light-kt3QBqrC.js} +1 -1
- package/components/swatch/index.cjs +1 -1
- package/components/swatch/index.js +1 -1
- package/components/{swatch-DiNMN-SZ.cjs → swatch-BX6GGDBs.cjs} +1 -1
- package/components/{swatch-BBVsuSAV.js → swatch-bXSCI96I.js} +1 -1
- package/components/switch/index.cjs +1 -1
- package/components/switch/index.js +1 -1
- package/components/{switch-DMhCYTgq.cjs → switch-CnnJrKpy.cjs} +1 -1
- package/components/{switch-BBtewLDD.js → switch-Do9jl9ur.js} +1 -1
- package/components/table/index.cjs +1 -1
- package/components/table/index.js +1 -1
- package/components/{table-Bf-00FYb.cjs → table-CF5do4qb.cjs} +1 -1
- package/components/{table-CfFwBCp1.js → table-FWX6kbpt.js} +2 -2
- package/components/tabs/index.cjs +1 -1
- package/components/tabs/index.js +1 -1
- package/components/{tabs-Dkt0B_-A.js → tabs-CODc4EYJ.js} +2 -2
- package/components/{tabs-B0WHKMuF.cjs → tabs-sIusiEWI.cjs} +1 -1
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +1 -1
- package/components/{tags-Be4yrNPw.js → tags-BEfsznJy.js} +3 -3
- package/components/{tags-CHDNXpxh.cjs → tags-CWJqZufu.cjs} +1 -1
- package/components/text-field/index.cjs +1 -1
- package/components/text-field/index.js +2 -2
- package/components/{text-field-CBsx1CVo.js → text-field-5Ilezggg.js} +1 -1
- package/components/{text-field-CZixBD87.cjs → text-field-8IQu5JLQ.cjs} +1 -1
- package/components/{text-field-DwvDSctG.cjs → text-field-CLUvzUDH.cjs} +1 -1
- package/components/{text-field-SNbvQYOj.js → text-field-Cn51A87k.js} +2 -2
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -1
- package/components/{toast-CXZUVaYz.js → toast-B6x2SjM8.js} +1 -1
- package/components/{toast-B6yesIcI.cjs → toast-CpOVCCix.cjs} +1 -1
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.js +1 -1
- package/components/{tooltip-BE01O3Sg.cjs → tooltip-CjfQup1K.cjs} +1 -1
- package/components/{tooltip-g2jd5Wsv.js → tooltip-ElTGebA9.js} +1 -1
- package/components/top-nav/index.cjs +1 -1
- package/components/top-nav/index.js +1 -1
- package/components/{top-nav-B0E1K_zf.cjs → top-nav-BG6vbFst.cjs} +1 -1
- package/components/{top-nav-DiUCsUpZ.js → top-nav-BMFB1WB0.js} +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +8 -8
- package/custom-elements.json +1 -1
- package/index.d.ts +1 -0
- package/package.json +7 -1
- package/standalone/accordion.js +3 -3
- package/standalone/action-bar.js +4 -4
- package/standalone/action-button.js +1 -1
- package/standalone/action-group.js +1 -1
- package/standalone/action-menu.js +6 -6
- package/standalone/avatar.js +5 -5
- package/standalone/badge.js +1 -1
- package/standalone/button-group.js +1 -1
- package/standalone/button.js +1 -1
- package/standalone/calendar.js +1 -1
- package/standalone/chat-message-group.js +2 -2
- package/standalone/chat-message.js +3 -3
- package/standalone/checkbox.js +1 -1
- package/standalone/chunks/{action-button-C946JGIA.js → action-button-CFXQ66x-.js} +1 -1
- package/standalone/chunks/{action-group-DlClwXLO.js → action-group-CX3Dg0Bu.js} +2 -2
- package/standalone/chunks/{badge-DPFbBRCY.js → badge-C1_QvLsq.js} +1 -1
- package/standalone/chunks/{button-COqfQNJv.js → button-DFVs4O1S.js} +1 -1
- package/standalone/chunks/{button-BhSe7abg.js → button-PsWOoEKo.js} +1 -1
- package/standalone/chunks/{button-base-DLYrzCSm.js → button-base-BuAaSi-H.js} +2 -2
- package/standalone/chunks/{calendar-BVrT8uqP.js → calendar-C8QpCEII.js} +5 -5
- package/standalone/chunks/{checkbox-4PoS7Uft.js → checkbox-DYjPiIwY.js} +1 -1
- package/standalone/chunks/{checkbox-mixin-HnfmivU3.js → checkbox-mixin-BRuj7--C.js} +2 -2
- package/standalone/chunks/{clear-button-qIMg8hR4.js → clear-button-BfZbJISP.js} +1 -1
- package/standalone/chunks/{close-button-DEiL5kEh.js → close-button-DdAb7Vyz.js} +1 -1
- package/standalone/chunks/color-area-B_G8a0NX.js +66 -0
- package/standalone/chunks/{color-field-BKDaLJQo.js → color-field-DlZIotvM.js} +1 -1
- package/standalone/chunks/{color-handle-DO7dxFGx.js → color-handle-h3fYn_2h.js} +1 -1
- package/standalone/chunks/{color-loupe-_dC69K1Z.js → color-loupe-ceV5LQbI.js} +1 -1
- package/standalone/chunks/{color-menu-6LhE-qWn.js → color-menu-CGxmlgwZ.js} +2 -2
- package/standalone/chunks/{color-slider-MSADvkPC.js → color-slider-Uv4iIRws.js} +2 -2
- package/standalone/chunks/{divider-vAjIOfo1.js → divider-BLhmxGvJ.js} +1 -1
- package/standalone/chunks/{field-group-C1oDgW9m.js → field-group-Pc_Pu61V.js} +1 -1
- package/standalone/chunks/{field-label-Djcst_hn.js → field-label-CYs6sh7M.js} +3 -3
- package/standalone/chunks/icon-CYZJZELU.js +2 -0
- package/standalone/chunks/{infield-button-B8EkjwP9.js → infield-button-umqY7wh3.js} +1 -1
- package/standalone/chunks/interaction-CII_biy8.js +2 -0
- package/standalone/chunks/lucero-runtime-BkqJ2L5f.js +18 -0
- package/standalone/chunks/luzmoCheck-BQw4HZFw.js +2 -0
- package/standalone/chunks/{manage-help-text-DO3PkWgh.js → manage-help-text-CrQxXqBH.js} +1 -1
- package/standalone/chunks/{menu-DtUgXalL.js → menu-BQ1vUHja.js} +6 -6
- package/standalone/chunks/{number-field-aOOuxxRh.js → number-field-Cujj8njt.js} +2 -2
- package/standalone/chunks/{observe-slot-presence-BxmG6A0m.js → observe-slot-presence-CITwnhtc.js} +1 -1
- package/standalone/chunks/{options-CPaX-OWy.js → options-BlDY_bJv.js} +12 -12
- package/standalone/chunks/{overlay-CgQMEmrM.js → overlay-Bcwu868u.js} +6 -6
- package/standalone/chunks/{pending-state-DnTXKvtm.js → pending-state-BbjpQDWR.js} +1 -1
- package/standalone/chunks/{picker-5IvNnimu.js → picker-BOuknvzl.js} +7 -7
- package/standalone/chunks/{picker-button-BIqlIkET.js → picker-button-B7gJZHYC.js} +1 -1
- package/standalone/chunks/{popover-Ca-FBqiU.js → popover-Dum9nObN.js} +2 -2
- package/standalone/chunks/progress-circle-CZodXLYe.js +17 -0
- package/standalone/chunks/property-BsZepKFj.js +2 -0
- package/standalone/chunks/{radio-BJ3RhyUD.js → radio-fCBCSuw9.js} +2 -2
- package/standalone/chunks/{segments-factory-DWNY1AUE.js → segments-factory-PfCggJk6.js} +1 -1
- package/standalone/chunks/{skeleton-loader-CymPdQl3.js → skeleton-loader-zvitohC5.js} +1 -1
- package/standalone/chunks/swatch-BL10VQ4z.js +33 -0
- package/standalone/chunks/{template-property-CyrkVY0Q.js → template-property-BeYccnca.js} +1 -1
- package/standalone/chunks/{text-field-C4D5FNRe.js → text-field-KnOMaj3Y.js} +1 -1
- package/standalone/chunks/{text-field-DwD97PEo.js → text-field-pIdOTrtY.js} +15 -15
- package/standalone/chunks/tooltip-CYQLlhx8.js +41 -0
- package/standalone/clear-button.js +1 -1
- package/standalone/close-button.js +1 -1
- package/standalone/color-area.js +1 -1
- package/standalone/color-field.js +1 -1
- package/standalone/color-handle.js +1 -1
- package/standalone/color-loupe.js +1 -1
- package/standalone/color-menu.js +1 -1
- package/standalone/color-palette-group.js +3 -3
- package/standalone/color-palette.js +1 -1
- package/standalone/color-picker.js +2 -2
- package/standalone/color-slider.js +1 -1
- package/standalone/date-range-picker.js +7 -7
- package/standalone/date-time-picker.js +8 -8
- package/standalone/divider.js +1 -1
- package/standalone/field-group.js +1 -1
- package/standalone/field-label.js +1 -1
- package/standalone/icon.js +1 -1
- package/standalone/infield-button.js +1 -1
- package/standalone/label.js +1 -1
- package/standalone/lit.js +1 -1
- package/standalone/manifest.json +46 -44
- package/standalone/menu.js +1 -1
- package/standalone/multi-language-field.js +1 -1
- package/standalone/notice.js +2 -2
- package/standalone/number-field.js +1 -1
- package/standalone/options.js +1 -1
- package/standalone/overlay.js +1 -1
- package/standalone/permission-box.js +178 -0
- package/standalone/picker-button.js +1 -1
- package/standalone/picker.js +1 -1
- package/standalone/popover.js +1 -1
- package/standalone/progress-bar.js +2 -2
- package/standalone/progress-circle.js +1 -1
- package/standalone/progress-steps.js +2 -2
- package/standalone/prompt-box.js +3 -3
- package/standalone/question-box.js +33 -33
- package/standalone/radio.js +1 -1
- package/standalone/search.js +2 -2
- package/standalone/select.js +9 -9
- package/standalone/skeleton-loader.js +1 -1
- package/standalone/slider.js +11 -11
- package/standalone/split-view.js +5 -3
- package/standalone/status-light.js +1 -1
- package/standalone/swatch.js +1 -1
- package/standalone/switch.js +1 -1
- package/standalone/table.js +24 -24
- package/standalone/tabs.js +7 -7
- package/standalone/tags.js +2 -2
- package/standalone/text-field.js +1 -1
- package/standalone/toast.js +1 -1
- package/standalone/tooltip.js +1 -1
- package/standalone/top-nav.js +10 -10
- package/standalone/utils.js +1 -1
- package/styles/mixins/tests/visually-hidden.test.d.ts +1 -0
- package/utils/reactive-controllers/interaction.d.ts +5 -1
- package/utils/sized-mixin.d.ts +8 -0
- package/components/split-view-DDwpoN2O.js +0 -357
- package/components/split-view-DNVlr5VD.cjs +0 -43
- package/standalone/chunks/color-area-D-AVcZza.js +0 -66
- package/standalone/chunks/icon-D69mOw1X.js +0 -2
- package/standalone/chunks/interaction-BQyflxg-.js +0 -2
- package/standalone/chunks/lucero-runtime-DMlHjBe_.js +0 -18
- package/standalone/chunks/progress-circle-CFtVq9Ou.js +0 -17
- package/standalone/chunks/property-BsDbx7Z2.js +0 -2
- package/standalone/chunks/swatch-zFOV4NtM.js +0 -33
- package/standalone/chunks/tooltip-B-j8PrNl.js +0 -41
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-
|
|
18
|
+
require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-BqV6ywDw.cjs"),n=require("./focusable-BIHTrJd6.cjs"),r=require("./roving-tabindex-BUFR8hPH.cjs");let i=require("lit"),a=require("lit/decorators.js"),o=require("@luzmo/icons"),s=require("lit/directives/when.js"),c=require("lit/directives/if-defined.js"),l=require("@lit-labs/observers/mutation-controller.js");var u=`@media (forced-colors:active){:host{--highcontrast-swatch-disabled-icon-color:GrayText;--highcontrast-swatch-focus-indicator-color:ButtonText;--highcontrast-swatch-background-color-selected:Background;--highcontrast-swatch-border-color-selected:Highlight;--highcontrast-swatch-border-color:ButtonText;--highcontrast-swatch-fill-foreground-color:ButtonText}.fill{forced-color-adjust:none}:host([disabled]),:host([disabled]){--highcontrast-swatch-border-color:GrayText}}:host{box-sizing:border-box;inline-size:var(--luzmo-swatch-size,var(--swatch-size));block-size:var(--luzmo-swatch-size,var(--swatch-size));-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:flex;position:relative}.disabled-icon{inline-size:var(--luzmo-swatch-disabled-icon-size,var(--swatch-disabled-icon-size));block-size:var(--luzmo-swatch-disabled-icon-size,var(--swatch-disabled-icon-size))}:host,:host:before{border-radius:var(--luzmo-swatch-border-radius,var(--swatch-border-radius))}:host([selected]){background-color:var(--highcontrast-swatch-background-color-selected,var(--luzmo-swatch-inner-border-color-selected,var(--swatch-inner-border-color-selected)))}:host([selected]) .fill:before{box-shadow:none;border-radius:0}:host([selected]):before{opacity:1}:host .is-image .fill:before{background-color:initial}:host([mixed-value]) .fill{background:0 0;background:var(--picked-color,transparent)}:host([mixed-value]) .mixed-value-icon{color:var(--swatch-dash-icon-color);display:block}:host([nothing]) .fill{background-color:initial;background-color:var(--picked-color,transparent);background-image:none}:host([nothing]) .fill:after{inline-size:var(--luzmo-swatch-slash-thickness,var(--swatch-slash-thickness));content:"";background:var(--highcontrast-swatch-fill-foreground-color,var(--luzmo-swatch-slash-icon-color,var(--swatch-slash-icon-color)));block-size:200%;position:absolute;transform:rotate(-45deg)}:host([nothing][shape=rectangle]) .fill:after{transform:rotate(-25deg)}:host([disabled]) .disabled-icon,:host([disabled]) .disabled-icon{display:block}:host:before{content:"";opacity:0;pointer-events:none;position:absolute;inset:0;border-width:var(--luzmo-swatch-border-thickness-selected,var(--swatch-border-thickness-selected))!important;border-style:solid!important;border-color:var(--highcontrast-swatch-border-color-selected,var(--luzmo-swatch-border-color-selected,var(--swatch-border-color-selected)))!important}:host:after{content:"";inset:calc(var(--luzmo-swatch-focus-indicator-gap,var(--swatch-focus-indicator-gap)) * -2);background-color:var(--luzmo-swatch-focus-indicator-background-color,var(--luzmo-background-color));z-index:-1;opacity:0;border-radius:var(--luzmo-swatch-focus-indicator-border-radius,var(--swatch-focus-indicator-border-radius));transition:opacity var(--luzmo-animation-duration) ease-in-out;position:absolute;border-width:var(--luzmo-swatch-focus-indicator-width,var(--swatch-focus-indicator-width))!important;border-style:solid!important;border-color:var(--highcontrast-swatch-focus-indicator-color,var(--luzmo-swatch-focus-indicator-color,var(--swatch-focus-indicator-color)))!important}:host(:focus-visible):after{opacity:1}.fill{box-sizing:border-box;border-radius:var(--luzmo-swatch-border-radius,var(--swatch-border-radius));justify-content:center;align-items:center;block-size:100%;inline-size:100%;display:flex;position:relative;overflow:hidden}.fill:before{content:"";z-index:0;box-sizing:border-box;box-shadow:inset 0 0 0 var(--luzmo-swatch-border-thickness,var(--swatch-border-thickness)) var(--highcontrast-swatch-border-color,var(--luzmo-swatch-border-color,var(--swatch-border-color)));border-radius:var(--luzmo-swatch-border-radius,var(--swatch-border-radius));position:absolute;inset:0}:host([border=none]) .fill:before,.fill:before{background-color:initial;background-color:var(--picked-color,transparent)}:host([border=none]) .fill:before{box-shadow:none}.mixed-value-icon{pointer-events:none;color:var(--picked-color,transparent);display:none}.disabled-icon{z-index:1;pointer-events:none;color:var(--highcontrast-swatch-disabled-icon-color,var(--luzmo-swatch-disabled-icon-color,var(--swatch-disabled-icon-color)));stroke:var(--highcontrast-swatch-disabled-icon-color,var(--luzmo-swatch-disabled-icon-color,var(--swatch-disabled-icon-color)));display:none;position:relative}.disabled-icon path:first-child{fill:var(--highcontrast-swatch-disabled-icon-color,var(--luzmo-swatch-disabled-icon-color,var(--swatch-disabled-icon-color)))}.disabled-icon path:last-child{fill:var(--luzmo-swatch-icon-border-color,var(--swatch-icon-border-color))}:host([shape=rectangle]){inline-size:calc(var(--luzmo-swatch-size,var(--swatch-size)) * 2)}:host([rounding=none]),:host([rounding=none]) .fill,:host([rounding=none]) .fill:before,:host([rounding=none][selected]) .fill,:host([rounding=none][selected]) .fill:before,:host([rounding=none]):after,:host([rounding=none]):before{border-radius:0}:host([rounding=full][selected]:not([shape=rectangle])) .fill,:host([rounding=full][selected]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])),:host([rounding=full]:not([shape=rectangle])) .fill,:host([rounding=full]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])):after,:host([rounding=full]:not([shape=rectangle])):before{border-radius:100%}:host([selected]) .fill{width:calc(var(--luzmo-swatch-size,var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected,var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap,var(--swatch-focus-indicator-gap)));height:calc(var(--luzmo-swatch-size,var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected,var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap,var(--swatch-focus-indicator-gap)))}:host([selected][shape=rectangle]) .fill{width:calc(var(--luzmo-swatch-size,var(--swatch-size)) * 2 - 2 * var(--luzmo-swatch-border-thickness-selected,var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap,var(--swatch-focus-indicator-gap)))}::slotted([slot=image]){object-fit:contain;block-size:100%;inline-size:100%;transition:width var(--luzmo-animation-duration) ease-in-out, height var(--luzmo-animation-duration) ease-in-out}:host([size=xl]){--swatch-size:var(--luzmo-component-height-xl);--swatch-disabled-icon-size:24px;--swatch-slash-thickness:6px}:host([size=l]){--swatch-size:var(--luzmo-component-height-l);--swatch-disabled-icon-size:20px;--swatch-slash-thickness:5px}:host([size=s]){--swatch-size:var(--luzmo-component-height-s);--swatch-disabled-icon-size:16px;--swatch-slash-thickness:3px}:host([size=xs]){--swatch-size:var(--luzmo-component-height-xs);--swatch-disabled-icon-size:16px;--swatch-slash-thickness:2px}:host([size=xxs]){--swatch-size:var(--luzmo-component-height-xxs);--swatch-disabled-icon-size:14px;--swatch-slash-thickness:2px}:host{--swatch-size:var(--luzmo-component-height);--swatch-disabled-icon-size:18px;--swatch-slash-thickness:4px;--swatch-border-radius:var(--luzmo-border-radius-s);--swatch-focus-indicator-border-radius:var(--luzmo-border-radius-s);--swatch-border-thickness:var(--luzmo-border-width);--swatch-border-thickness-selected:var(--luzmo-border-width);--swatch-focus-indicator-width:var(--luzmo-indicator-width);--swatch-focus-indicator-gap:var(--luzmo-indicator-gap);--swatch-border-color:var(--luzmo-border-color-down);--swatch-icon-border-color:var(--luzmo-border-color);--swatch-border-color-selected:var(--luzmo-border-color-full-down);--swatch-inner-border-color-selected:var(--luzmo-background-color);--swatch-disabled-icon-color:#fff;--swatch-dash-icon-color:var(--luzmo-font-color);--swatch-slash-icon-color:var(--luzmo-negative-color);--swatch-focus-indicator-color:var(--luzmo-primary)}.fill:before,:host([border=none]) .fill:before{background:var(--picked-color,transparent)}:host .is-image .fill:before{background:0 0}:host .opacity-checkerboard{background:repeating-conic-gradient(var(--luzmo-swatch-checkerboard-light,#fff) 0 25%, var(--luzmo-swatch-checkerboard-dark,#e6e6e6) 0 50%) var(--luzmo-swatch-checkerboard-position,left top)/calc(var(--luzmo-swatch-checkerboard-size,8px) * 2) calc(var(--luzmo-swatch-checkerboard-size,8px) * 2)}`,d=class extends t.n(n.t,{validSizes:[`xxs`,`xs`,`s`,`m`,`l`,`xl`],noDefaultSize:!0}){constructor(...e){super(...e),this.color=``,this.label=``,this.mixedValue=!1,this.nothing=!1,this.role=`button`,this.selected=!1,this.readonly=!1,this.renderDisabled=()=>i.html`
|
|
19
19
|
<svg
|
|
20
20
|
xmlns="http://www.w3.org/2000/svg"
|
|
21
21
|
class="disabled-icon"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* */
|
|
18
18
|
import "./tokens.js";
|
|
19
19
|
import { n as e, t } from "./decorate-CpKsOs9z.js";
|
|
20
|
-
import { n } from "./sized-mixin-
|
|
20
|
+
import { n } from "./sized-mixin-Cb-47MjG.js";
|
|
21
21
|
import { t as r } from "./focusable-xjv79E40.js";
|
|
22
22
|
import { t as i } from "./roving-tabindex-BKMkfzY0.js";
|
|
23
23
|
import { html as a, unsafeCSS as o } from "lit";
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../switch-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../switch-CnnJrKpy.cjs");exports.LuzmoSwitch=e.t;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-CSajkMro.cjs"),n=require("./focusable-BIHTrJd6.cjs"),r=require("./checkbox-mixin-DAdnTm-F.cjs");let i=require("lit"),a=require("lit/decorators.js");var o=class extends r.t(n.t){get focusElement(){return this.inputElement}},s=`:host{--switch-focus-indicator-width:var(--luzmo-focus-indicator-width,var(--luzmo-indicator-width));min-block-size:var(--luzmo-switch-height,var(--switch-min-height));--switch-track-height:var(--switch-control-height);vertical-align:top;max-inline-size:100%;font-family:var(--luzmo-switch-font-family,var(--luzmo-font-family));align-items:flex-start;display:inline-flex;position:relative}#input{box-sizing:border-box;opacity:0;z-index:1;cursor:pointer;block-size:100%;inline-size:100%;margin:0;padding:0;position:absolute;inset-block-start:0;inset-inline-start:0}:host([checked]) #input+#switch:before{transform:translateX(calc(var(--luzmo-switch-control-width,var(--switch-control-width)) - 100%))}:host([dir=rtl][checked]) #input+#switch:before{transform:translateX(calc((var(--luzmo-switch-control-width,var(--switch-control-width)) - 100%) * -1))}:host([checked]) #input+#switch:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{transform:translateX(calc((var(--luzmo-switch-control-width,var(--switch-control-width)) - 100%) * -1))}:host([disabled]) #input,:host([disabled]) #input{cursor:not-allowed}#input:focus-visible+#switch:after{margin:calc(var(--luzmo-focus-indicator-gap,var(--switch-focus-indicator-gap)) * -1)}#label{color:var(--highcontrast-switch-label-color-default,var(--luzmo-switch-label-color-default,var(--switch-label-color-default)));margin-inline:var(--luzmo-switch-control-label-spacing,var(--switch-control-label-spacing));font-size:var(--luzmo-switch-font-size,var(--switch-font-size));line-height:var(--luzmo-switch-line-height,1.3);transition:color calc(var(--luzmo-animation-duration) * 2) ease-in-out;margin-block-start:var(--luzmo-switch-spacing-top-to-label,var(--switch-spacing-top-to-label));margin-block-end:0}#switch{box-sizing:border-box;inline-size:var(--luzmo-switch-control-width,var(--switch-control-width));margin-block:calc(var(--luzmo-switch-height,var(--switch-min-height)) - var(--luzmo-switch-control-height,var(--switch-control-height)) - var(--luzmo-switch-spacing-top-to-control,var(--switch-spacing-top-to-control)));vertical-align:middle;transition:background var(--luzmo-animation-duration) ease-in-out, border var(--luzmo-animation-duration) ease-in-out;block-size:var(--luzmo-switch-track-height,var(--switch-track-height));border-radius:calc(var(--luzmo-switch-control-height,var(--switch-control-height)) / 2);flex-grow:0;flex-shrink:0;margin-inline:0;display:inline-block;position:relative;inset-inline:0}#switch:before{box-sizing:border-box;transition:background var(--luzmo-animation-duration) ease-in-out, border var(--luzmo-animation-duration) ease-in-out, transform var(--luzmo-animation-duration) ease-in-out, box-shadow var(--luzmo-animation-duration) ease-in-out;inline-size:var(--luzmo-switch-control-height,var(--switch-control-height));block-size:var(--luzmo-switch-control-height,var(--switch-control-height));box-shadow:var(--luzmo-switch-control-box-shadow,var(--switch-control-box-shadow));border-width:var(--luzmo-switch-border-width,var(--luzmo-switch-border-width,var(--luzmo-border-width)));border-radius:calc(var(--luzmo-switch-control-height,var(--switch-control-height)) / 2);border-style:solid}#switch:after,#switch:before{content:"";display:block;position:absolute;inset-block-start:0;inset-inline-start:0}#switch:after{border-radius:calc(var(--luzmo-switch-control-height,var(--switch-control-height)) / 2 + var(--luzmo-focus-indicator-gap,var(--switch-focus-indicator-gap)) * 2);transition:opacity var(--luzmo-animation-duration) ease-out, margin var(--luzmo-animation-duration) ease-out;margin:0;inset-block-end:0;inset-inline-end:0}#switch{background-color:var(--highcontrast-switch-background-color,var(--luzmo-switch-background-color,var(--switch-background-color)))}#switch:before{background-color:var(--highcontrast-switch-handle-background-color,var(--luzmo-switch-handle-background-color,var(--switch-handle-background-color)));border-color:var(--highcontrast-switch-handle-border-color-default,var(--luzmo-switch-handle-border-color-default,var(--switch-handle-border-color-default)))}:host(:active) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-down,var(--luzmo-switch-handle-border-color-down,var(--switch-handle-border-color-down)))}:host(:active) #input~#label{color:var(--highcontrast-switch-label-color-down,var(--luzmo-switch-label-color-down,var(--switch-label-color-down)))}:host(:active[checked]) #input:enabled+#switch{background-color:var(--highcontrast-switch-background-color-selected-down,var(--luzmo-switch-background-color-selected-down,var(--switch-background-color-selected-down)))}:host(:active[checked]) #input:enabled+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-selected-down,var(--luzmo-switch-handle-border-color-selected-down,var(--switch-handle-border-color-selected-down)))}#input:focus-visible+#switch:after{box-shadow:0 0 0 var(--luzmo-switch-focus-indicator-width,var(--luzmo-focus-indicator-width,var(--switch-focus-indicator-width))) var(--highcontrast-switch-focus-indicator-color,var(--luzmo-switch-focus-indicator-color,var(--switch-focus-indicator-color)))}#input:focus-visible+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-focus,var(--luzmo-switch-handle-border-color-focus,var(--switch-handle-border-color-focus)))}:host([checked]) #input:focus-visible+#switch{background-color:var(--highcontrast-switch-background-color-selected-focus,var(--luzmo-switch-background-color-selected-focus,var(--switch-background-color-selected-focus)))}:host([checked]) #input:focus-visible+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-selected-focus,var(--luzmo-switch-handle-border-color-selected-focus,var(--switch-handle-border-color-selected-focus)))}#input:focus-visible~#label{color:var(--highcontrast-switch-label-color-focus,var(--luzmo-switch-label-color-focus,var(--switch-label-color-focus)))}@media (hover:hover){:host(:hover) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-hover,var(--luzmo-switch-handle-border-color-hover,var(--switch-handle-border-color-hover)));box-shadow:var(--luzmo-switch-control-box-shadow,var(--switch-control-box-shadow,none));background-color:var(--highcontrast-switch-background-color-hover,var(--luzmo-switch-background-color-hover,var(--switch-background-color-hover,var(--luzmo-background-color-hover))))}:host(:hover) #input~#label{color:var(--highcontrast-switch-label-color-hover,var(--luzmo-switch-label-color-hover,var(--switch-label-color-hover)))}:host([checked]:hover) #input:enabled+#switch{background-color:var(--highcontrast-switch-background-color-selected-hover,var(--luzmo-switch-background-color-selected-hover,var(--switch-background-color-selected-hover)))}:host([checked]:hover) #input:enabled+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-selected-hover,var(--luzmo-switch-handle-border-color-selected-hover,var(--switch-handle-border-color-selected-hover)))}:host([disabled]:hover) #input+#switch,:host([disabled]:hover) #input+#switch{background-color:var(--highcontrast-switch-background-color-disabled,var(--luzmo-switch-background-color-disabled,var(--switch-background-color-disabled)))}:host([disabled]:hover) #input+#switch:before,:host([disabled]:hover) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-disabled,var(--luzmo-switch-handle-border-color-disabled,var(--switch-handle-border-color-disabled)))}:host([disabled]:hover) #input~#label,:host([disabled]:hover) #input~#label{color:var(--highcontrast-switch-label-color-disabled,var(--luzmo-switch-label-color-disabled,var(--switch-label-color-disabled)))}:host([disabled][checked]:hover) #input+#switch,:host([disabled][checked]:hover) #input+#switch{background-color:var(--highcontrast-switch-background-color-selected-disabled,var(--luzmo-switch-background-color-selected-disabled,var(--switch-background-color-selected-disabled)))}:host([disabled][checked]:hover) #input+#switch:before,:host([disabled][checked]:hover) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-disabled,var(--luzmo-switch-handle-border-color-disabled,var(--switch-handle-border-color-disabled)))}:host([disabled][checked]:hover) #input~#label,:host([disabled][checked]:hover) #input~#label{color:var(--highcontrast-switch-label-color-disabled,var(--luzmo-switch-label-color-disabled,var(--switch-label-color-disabled)))}:host(:hover) #input:focus-visible+#switch:after{box-shadow:0 0 0 var(--luzmo-switch-focus-indicator-width,var(--luzmo-focus-indicator-width,var(--switch-focus-indicator-width))) var(--highcontrast-switch-focus-indicator-color,var(--luzmo-switch-focus-indicator-color,var(--switch-focus-indicator-color)))}:host(:hover) #input:focus-visible+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-focus,var(--luzmo-switch-handle-border-color-focus,var(--switch-handle-border-color-focus)))}:host([checked]:hover) #input:focus-visible+#switch{background-color:var(--highcontrast-switch-background-color-selected-focus,var(--luzmo-switch-background-color-selected-focus,var(--switch-background-color-selected-focus)))}:host([checked]:hover) #input:focus-visible+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-selected-focus,var(--luzmo-switch-handle-border-color-selected-focus,var(--switch-handle-border-color-selected-focus)))}:host(:hover) #input:focus-visible~#label{color:var(--highcontrast-switch-label-color-focus,var(--luzmo-switch-label-color-focus,var(--switch-label-color-focus)))}}:host([checked]) #input+#switch{background-color:var(--highcontrast-switch-background-color-selected-default,var(--luzmo-switch-background-color-selected-default,var(--switch-background-color-selected-default)))}:host([checked]) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-selected-default,var(--luzmo-switch-handle-border-color-selected-default,var(--switch-handle-border-color-selected-default)))}:host([disabled]) #input+#switch,:host([disabled]) #input+#switch{background-color:var(--highcontrast-switch-background-color-disabled,var(--luzmo-switch-background-color-disabled,var(--switch-background-color-disabled)))}:host([disabled]) #input+#switch:before,:host([disabled]) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-disabled,var(--luzmo-switch-handle-border-color-disabled,var(--switch-handle-border-color-disabled)))}:host([disabled][checked]) #input+#switch,:host([disabled][checked]) #input+#switch{background-color:var(--highcontrast-switch-background-color-selected-disabled,var(--luzmo-switch-background-color-selected-disabled,var(--switch-background-color-selected-disabled)))}:host([disabled][checked]) #input+#switch:before,:host([disabled][checked]) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-disabled,var(--luzmo-switch-handle-border-color-disabled,var(--switch-handle-border-color-disabled)))}:host([disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-switch-label-color-disabled,var(--luzmo-switch-label-color-disabled,var(--switch-label-color-disabled)))}@media (forced-colors:active){:host{--highcontrast-switch-label-color-default:ButtonText;--highcontrast-switch-label-color-hover:ButtonText;--highcontrast-switch-label-color-down:ButtonText;--highcontrast-switch-label-color-focus:ButtonText;--highcontrast-switch-label-color-disabled:GrayText;--highcontrast-switch-handle-background-color:ButtonFace;--highcontrast-switch-handle-border-color-default:ButtonText;--highcontrast-switch-handle-border-color-hover:Highlight;--highcontrast-switch-handle-border-color-down:Highlight;--highcontrast-switch-handle-border-color-focus:Highlight;--highcontrast-switch-handle-border-color-disabled:Highlight;--highcontrast-switch-handle-border-color-selected-default:Highlight;--highcontrast-switch-handle-border-color-selected-hover:Highlight;--highcontrast-switch-handle-border-color-selected-down:Highlight;--highcontrast-switch-handle-border-color-selected-focus:Highlight;--highcontrast-switch-background-color:ButtonFace;--highcontrast-switch-background-color-selected-default:Highlight;--highcontrast-switch-background-color-selected-hover:Highlight;--highcontrast-switch-background-color-selected-down:Highlight;--highcontrast-switch-background-color-selected-focus:Highlight;--highcontrast-switch-background-color-selected-disabled:Highlight;--highcontrast-switch-focus-indicator-color:ButtonText;forced-color-adjust:none}#input:not(:checked)+#switch{box-shadow:inset 0 0 0 1px buttontext}}@media (forced-colors:active) and (hover:hover){:host(:hover) #input:not(:checked)+#switch{box-shadow:inset 0 0 0 1px highlight}:host([disabled][checked]:hover) #input+#switch,:host([disabled][checked]:hover) #input+#switch{background-color:graytext;box-shadow:inset 0 0 0 1px graytext}:host([disabled][checked]:hover) #input+#switch:before,:host([disabled][checked]:hover) #input+#switch:before{background-color:buttonface;border-color:graytext}}@media (forced-colors:active){:host([disabled]) #input:not(:checked)+#switch,:host([disabled]) #input:not(:checked)+#switch{background-color:buttonface;box-shadow:inset 0 0 0 1px graytext}:host([disabled]) #input:not(:checked)+#switch:before,:host([disabled]) #input:not(:checked)+#switch:before{background-color:buttonface;border-color:graytext}:host([disabled][checked]) #input+#switch,:host([disabled][checked]) #input+#switch{background-color:graytext;box-shadow:inset 0 0 0 1px graytext}:host([disabled][checked]) #input+#switch:before,:host([disabled][checked]) #input+#switch:before{background-color:buttonface;border-color:graytext}:host([disabled]) #input~#label,:host([disabled]) #input~#label{color:graytext}}:host{--switch-handle-border-color-default:var(--luzmo-selected-color);--switch-handle-border-color-hover:var(--luzmo-selected-color-hover);--switch-handle-border-color-down:var(--luzmo-selected-color-down);--switch-handle-border-color-focus:var(--luzmo-selected-color-focus);--switch-handle-border-color-selected-default:var(--luzmo-selected-color-hover);--switch-handle-border-color-selected-hover:var(--luzmo-selected-color-down);--switch-handle-border-color-selected-down:var(--luzmo-selected-color-hard-down);--switch-handle-border-color-selected-focus:var(--luzmo-selected-color-down);--switch-focus-indicator-gap:var(--luzmo-indicator-gap);--switch-label-color-default:var(--luzmo-selected-color-hard);--switch-label-color-hover:var(--luzmo-selected-color-hard-hover);--switch-label-color-down:var(--luzmo-selected-color-hard-down);--switch-label-color-focus:var(--luzmo-selected-color-hard-focus);--switch-label-color-disabled:var(--luzmo-disabled-color);--switch-background-color:var(--luzmo-border-color);--switch-background-color-disabled:var(--luzmo-background-color-disabled);--switch-background-color-selected-disabled:var(--luzmo-disabled-color);--switch-background-color-selected-default:var(--luzmo-selected-color-hover);--switch-background-color-selected-hover:var(--luzmo-selected-color-down);--switch-background-color-selected-down:var(--luzmo-selected-color-hard-down);--switch-background-color-selected-focus:var(--luzmo-selected-color-down);--switch-focus-indicator-width:var(--luzmo-indicator-width);--switch-focus-indicator-color:var(--luzmo-primary);--switch-handle-background-color:var(--luzmo-background-color);--switch-handle-border-color-disabled:var(--luzmo-disabled-color);--switch-spacing-top-to-control:calc((var(--switch-min-height) - var(--switch-control-height)) / 2)}:host([disabled]){--switch-label-color-default:var(--luzmo-disabled-color)}:host([emphasized]){--switch-background-color-selected-default:var(--luzmo-primary);--switch-background-color-selected-hover:var(--luzmo-primary-hover);--switch-background-color-selected-down:var(--luzmo-primary-down);--switch-background-color-selected-focus:var(--luzmo-primary-focus);--switch-handle-border-color-selected-default:var(--luzmo-primary);--switch-handle-border-color-selected-hover:var(--luzmo-primary-hover);--switch-handle-border-color-selected-down:var(--luzmo-primary-down);--switch-handle-border-color-selected-focus:var(--luzmo-primary-focus)}:host([size=s]){--switch-min-height:24px;--switch-control-width:23px;--switch-control-height:var(--luzmo-font-size-s);--switch-control-label-spacing:var(--luzmo-spacing-3);--switch-spacing-top-to-label:4px;--switch-font-size:var(--luzmo-font-size-s)}:host{--switch-min-height:32px;--switch-control-width:26px;--switch-control-height:var(--luzmo-font-size);--switch-control-label-spacing:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--switch-spacing-top-to-label:6px;--switch-font-size:var(--luzmo-font-size)}:host([size=l]){--switch-min-height:40px;--switch-control-width:28px;--switch-control-height:var(--luzmo-font-size-l);--switch-control-label-spacing:var(--luzmo-spacing-4);--switch-spacing-top-to-label:9px;--switch-font-size:var(--luzmo-font-size-l)}:host([size=xl]){--switch-min-height:48px;--switch-control-width:32px;--switch-control-height:var(--luzmo-font-size-xl);--switch-control-label-spacing:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--switch-spacing-top-to-label:12px;--switch-font-size:var(--luzmo-font-size-xl)}:host([disabled]){pointer-events:none}:host([thumb=overflow]){--luzmo-switch-border-width:0px;--switch-control-width:calc(var(--switch-control-height) * 2);--switch-control-box-shadow:0 .125rem .25rem var(--luzmo-shadow-color), inset 0 0 0 .0625rem rgba(var(--luzmo-border-color-rgb), .2)}:host([thumb=overflow]) #switch{margin-top:calc((var(--luzmo-switch-min-height,var(--switch-min-height)) - var(--luzmo-switch-track-height,var(--switch-track-height))) / 2)}:host([thumb=overflow]) #switch:before{inset-block-start:calc(-1 * (var(--luzmo-switch-control-height,var(--switch-control-height)) - var(--luzmo-switch-track-height,var(--switch-track-height))) / 2)}:host([thumb=overflow][size=s]){--switch-track-height:10px;--switch-control-height:16px;--switch-focus-indicator-gap:5px}:host([thumb=overflow]){--switch-track-height:10px;--switch-control-height:18px;--switch-focus-indicator-gap:6px}:host([thumb=overflow][size=l]){--switch-track-height:12px;--switch-control-height:20px;--switch-focus-indicator-gap:7px}:host([thumb=overflow][size=xl]){--switch-track-height:12px;--switch-control-height:22px;--switch-focus-indicator-gap:8px}`,c=class extends t.n(o){constructor(...e){super(...e),this.emphasized=!1,this.thumb=`overflow`}static get styles(){return window.hasOwnProperty(`ShadyDOM`),[(0,i.unsafeCSS)(s)]}render(){return i.html`
|
|
18
|
+
require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-BqV6ywDw.cjs"),n=require("./focusable-BIHTrJd6.cjs"),r=require("./checkbox-mixin-DAdnTm-F.cjs");let i=require("lit"),a=require("lit/decorators.js");var o=class extends r.t(n.t){get focusElement(){return this.inputElement}},s=`:host{--switch-focus-indicator-width:var(--luzmo-focus-indicator-width,var(--luzmo-indicator-width));min-block-size:var(--luzmo-switch-height,var(--switch-min-height));--switch-track-height:var(--switch-control-height);vertical-align:top;max-inline-size:100%;font-family:var(--luzmo-switch-font-family,var(--luzmo-font-family));align-items:flex-start;display:inline-flex;position:relative}#input{box-sizing:border-box;opacity:0;z-index:1;cursor:pointer;block-size:100%;inline-size:100%;margin:0;padding:0;position:absolute;inset-block-start:0;inset-inline-start:0}:host([checked]) #input+#switch:before{transform:translateX(calc(var(--luzmo-switch-control-width,var(--switch-control-width)) - 100%))}:host([dir=rtl][checked]) #input+#switch:before{transform:translateX(calc((var(--luzmo-switch-control-width,var(--switch-control-width)) - 100%) * -1))}:host([checked]) #input+#switch:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{transform:translateX(calc((var(--luzmo-switch-control-width,var(--switch-control-width)) - 100%) * -1))}:host([disabled]) #input,:host([disabled]) #input{cursor:not-allowed}#input:focus-visible+#switch:after{margin:calc(var(--luzmo-focus-indicator-gap,var(--switch-focus-indicator-gap)) * -1)}#label{color:var(--highcontrast-switch-label-color-default,var(--luzmo-switch-label-color-default,var(--switch-label-color-default)));margin-inline:var(--luzmo-switch-control-label-spacing,var(--switch-control-label-spacing));font-size:var(--luzmo-switch-font-size,var(--switch-font-size));line-height:var(--luzmo-switch-line-height,1.3);transition:color calc(var(--luzmo-animation-duration) * 2) ease-in-out;margin-block-start:var(--luzmo-switch-spacing-top-to-label,var(--switch-spacing-top-to-label));margin-block-end:0}#switch{box-sizing:border-box;inline-size:var(--luzmo-switch-control-width,var(--switch-control-width));margin-block:calc(var(--luzmo-switch-height,var(--switch-min-height)) - var(--luzmo-switch-control-height,var(--switch-control-height)) - var(--luzmo-switch-spacing-top-to-control,var(--switch-spacing-top-to-control)));vertical-align:middle;transition:background var(--luzmo-animation-duration) ease-in-out, border var(--luzmo-animation-duration) ease-in-out;block-size:var(--luzmo-switch-track-height,var(--switch-track-height));border-radius:calc(var(--luzmo-switch-control-height,var(--switch-control-height)) / 2);flex-grow:0;flex-shrink:0;margin-inline:0;display:inline-block;position:relative;inset-inline:0}#switch:before{box-sizing:border-box;transition:background var(--luzmo-animation-duration) ease-in-out, border var(--luzmo-animation-duration) ease-in-out, transform var(--luzmo-animation-duration) ease-in-out, box-shadow var(--luzmo-animation-duration) ease-in-out;inline-size:var(--luzmo-switch-control-height,var(--switch-control-height));block-size:var(--luzmo-switch-control-height,var(--switch-control-height));box-shadow:var(--luzmo-switch-control-box-shadow,var(--switch-control-box-shadow));border-width:var(--luzmo-switch-border-width,var(--luzmo-switch-border-width,var(--luzmo-border-width)));border-radius:calc(var(--luzmo-switch-control-height,var(--switch-control-height)) / 2);border-style:solid}#switch:after,#switch:before{content:"";display:block;position:absolute;inset-block-start:0;inset-inline-start:0}#switch:after{border-radius:calc(var(--luzmo-switch-control-height,var(--switch-control-height)) / 2 + var(--luzmo-focus-indicator-gap,var(--switch-focus-indicator-gap)) * 2);transition:opacity var(--luzmo-animation-duration) ease-out, margin var(--luzmo-animation-duration) ease-out;margin:0;inset-block-end:0;inset-inline-end:0}#switch{background-color:var(--highcontrast-switch-background-color,var(--luzmo-switch-background-color,var(--switch-background-color)))}#switch:before{background-color:var(--highcontrast-switch-handle-background-color,var(--luzmo-switch-handle-background-color,var(--switch-handle-background-color)));border-color:var(--highcontrast-switch-handle-border-color-default,var(--luzmo-switch-handle-border-color-default,var(--switch-handle-border-color-default)))}:host(:active) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-down,var(--luzmo-switch-handle-border-color-down,var(--switch-handle-border-color-down)))}:host(:active) #input~#label{color:var(--highcontrast-switch-label-color-down,var(--luzmo-switch-label-color-down,var(--switch-label-color-down)))}:host(:active[checked]) #input:enabled+#switch{background-color:var(--highcontrast-switch-background-color-selected-down,var(--luzmo-switch-background-color-selected-down,var(--switch-background-color-selected-down)))}:host(:active[checked]) #input:enabled+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-selected-down,var(--luzmo-switch-handle-border-color-selected-down,var(--switch-handle-border-color-selected-down)))}#input:focus-visible+#switch:after{box-shadow:0 0 0 var(--luzmo-switch-focus-indicator-width,var(--luzmo-focus-indicator-width,var(--switch-focus-indicator-width))) var(--highcontrast-switch-focus-indicator-color,var(--luzmo-switch-focus-indicator-color,var(--switch-focus-indicator-color)))}#input:focus-visible+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-focus,var(--luzmo-switch-handle-border-color-focus,var(--switch-handle-border-color-focus)))}:host([checked]) #input:focus-visible+#switch{background-color:var(--highcontrast-switch-background-color-selected-focus,var(--luzmo-switch-background-color-selected-focus,var(--switch-background-color-selected-focus)))}:host([checked]) #input:focus-visible+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-selected-focus,var(--luzmo-switch-handle-border-color-selected-focus,var(--switch-handle-border-color-selected-focus)))}#input:focus-visible~#label{color:var(--highcontrast-switch-label-color-focus,var(--luzmo-switch-label-color-focus,var(--switch-label-color-focus)))}@media (hover:hover){:host(:hover) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-hover,var(--luzmo-switch-handle-border-color-hover,var(--switch-handle-border-color-hover)));box-shadow:var(--luzmo-switch-control-box-shadow,var(--switch-control-box-shadow,none));background-color:var(--highcontrast-switch-background-color-hover,var(--luzmo-switch-background-color-hover,var(--switch-background-color-hover,var(--luzmo-background-color-hover))))}:host(:hover) #input~#label{color:var(--highcontrast-switch-label-color-hover,var(--luzmo-switch-label-color-hover,var(--switch-label-color-hover)))}:host([checked]:hover) #input:enabled+#switch{background-color:var(--highcontrast-switch-background-color-selected-hover,var(--luzmo-switch-background-color-selected-hover,var(--switch-background-color-selected-hover)))}:host([checked]:hover) #input:enabled+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-selected-hover,var(--luzmo-switch-handle-border-color-selected-hover,var(--switch-handle-border-color-selected-hover)))}:host([disabled]:hover) #input+#switch,:host([disabled]:hover) #input+#switch{background-color:var(--highcontrast-switch-background-color-disabled,var(--luzmo-switch-background-color-disabled,var(--switch-background-color-disabled)))}:host([disabled]:hover) #input+#switch:before,:host([disabled]:hover) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-disabled,var(--luzmo-switch-handle-border-color-disabled,var(--switch-handle-border-color-disabled)))}:host([disabled]:hover) #input~#label,:host([disabled]:hover) #input~#label{color:var(--highcontrast-switch-label-color-disabled,var(--luzmo-switch-label-color-disabled,var(--switch-label-color-disabled)))}:host([disabled][checked]:hover) #input+#switch,:host([disabled][checked]:hover) #input+#switch{background-color:var(--highcontrast-switch-background-color-selected-disabled,var(--luzmo-switch-background-color-selected-disabled,var(--switch-background-color-selected-disabled)))}:host([disabled][checked]:hover) #input+#switch:before,:host([disabled][checked]:hover) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-disabled,var(--luzmo-switch-handle-border-color-disabled,var(--switch-handle-border-color-disabled)))}:host([disabled][checked]:hover) #input~#label,:host([disabled][checked]:hover) #input~#label{color:var(--highcontrast-switch-label-color-disabled,var(--luzmo-switch-label-color-disabled,var(--switch-label-color-disabled)))}:host(:hover) #input:focus-visible+#switch:after{box-shadow:0 0 0 var(--luzmo-switch-focus-indicator-width,var(--luzmo-focus-indicator-width,var(--switch-focus-indicator-width))) var(--highcontrast-switch-focus-indicator-color,var(--luzmo-switch-focus-indicator-color,var(--switch-focus-indicator-color)))}:host(:hover) #input:focus-visible+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-focus,var(--luzmo-switch-handle-border-color-focus,var(--switch-handle-border-color-focus)))}:host([checked]:hover) #input:focus-visible+#switch{background-color:var(--highcontrast-switch-background-color-selected-focus,var(--luzmo-switch-background-color-selected-focus,var(--switch-background-color-selected-focus)))}:host([checked]:hover) #input:focus-visible+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-selected-focus,var(--luzmo-switch-handle-border-color-selected-focus,var(--switch-handle-border-color-selected-focus)))}:host(:hover) #input:focus-visible~#label{color:var(--highcontrast-switch-label-color-focus,var(--luzmo-switch-label-color-focus,var(--switch-label-color-focus)))}}:host([checked]) #input+#switch{background-color:var(--highcontrast-switch-background-color-selected-default,var(--luzmo-switch-background-color-selected-default,var(--switch-background-color-selected-default)))}:host([checked]) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-selected-default,var(--luzmo-switch-handle-border-color-selected-default,var(--switch-handle-border-color-selected-default)))}:host([disabled]) #input+#switch,:host([disabled]) #input+#switch{background-color:var(--highcontrast-switch-background-color-disabled,var(--luzmo-switch-background-color-disabled,var(--switch-background-color-disabled)))}:host([disabled]) #input+#switch:before,:host([disabled]) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-disabled,var(--luzmo-switch-handle-border-color-disabled,var(--switch-handle-border-color-disabled)))}:host([disabled][checked]) #input+#switch,:host([disabled][checked]) #input+#switch{background-color:var(--highcontrast-switch-background-color-selected-disabled,var(--luzmo-switch-background-color-selected-disabled,var(--switch-background-color-selected-disabled)))}:host([disabled][checked]) #input+#switch:before,:host([disabled][checked]) #input+#switch:before{border-color:var(--highcontrast-switch-handle-border-color-disabled,var(--luzmo-switch-handle-border-color-disabled,var(--switch-handle-border-color-disabled)))}:host([disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-switch-label-color-disabled,var(--luzmo-switch-label-color-disabled,var(--switch-label-color-disabled)))}@media (forced-colors:active){:host{--highcontrast-switch-label-color-default:ButtonText;--highcontrast-switch-label-color-hover:ButtonText;--highcontrast-switch-label-color-down:ButtonText;--highcontrast-switch-label-color-focus:ButtonText;--highcontrast-switch-label-color-disabled:GrayText;--highcontrast-switch-handle-background-color:ButtonFace;--highcontrast-switch-handle-border-color-default:ButtonText;--highcontrast-switch-handle-border-color-hover:Highlight;--highcontrast-switch-handle-border-color-down:Highlight;--highcontrast-switch-handle-border-color-focus:Highlight;--highcontrast-switch-handle-border-color-disabled:Highlight;--highcontrast-switch-handle-border-color-selected-default:Highlight;--highcontrast-switch-handle-border-color-selected-hover:Highlight;--highcontrast-switch-handle-border-color-selected-down:Highlight;--highcontrast-switch-handle-border-color-selected-focus:Highlight;--highcontrast-switch-background-color:ButtonFace;--highcontrast-switch-background-color-selected-default:Highlight;--highcontrast-switch-background-color-selected-hover:Highlight;--highcontrast-switch-background-color-selected-down:Highlight;--highcontrast-switch-background-color-selected-focus:Highlight;--highcontrast-switch-background-color-selected-disabled:Highlight;--highcontrast-switch-focus-indicator-color:ButtonText;forced-color-adjust:none}#input:not(:checked)+#switch{box-shadow:inset 0 0 0 1px buttontext}}@media (forced-colors:active) and (hover:hover){:host(:hover) #input:not(:checked)+#switch{box-shadow:inset 0 0 0 1px highlight}:host([disabled][checked]:hover) #input+#switch,:host([disabled][checked]:hover) #input+#switch{background-color:graytext;box-shadow:inset 0 0 0 1px graytext}:host([disabled][checked]:hover) #input+#switch:before,:host([disabled][checked]:hover) #input+#switch:before{background-color:buttonface;border-color:graytext}}@media (forced-colors:active){:host([disabled]) #input:not(:checked)+#switch,:host([disabled]) #input:not(:checked)+#switch{background-color:buttonface;box-shadow:inset 0 0 0 1px graytext}:host([disabled]) #input:not(:checked)+#switch:before,:host([disabled]) #input:not(:checked)+#switch:before{background-color:buttonface;border-color:graytext}:host([disabled][checked]) #input+#switch,:host([disabled][checked]) #input+#switch{background-color:graytext;box-shadow:inset 0 0 0 1px graytext}:host([disabled][checked]) #input+#switch:before,:host([disabled][checked]) #input+#switch:before{background-color:buttonface;border-color:graytext}:host([disabled]) #input~#label,:host([disabled]) #input~#label{color:graytext}}:host{--switch-handle-border-color-default:var(--luzmo-selected-color);--switch-handle-border-color-hover:var(--luzmo-selected-color-hover);--switch-handle-border-color-down:var(--luzmo-selected-color-down);--switch-handle-border-color-focus:var(--luzmo-selected-color-focus);--switch-handle-border-color-selected-default:var(--luzmo-selected-color-hover);--switch-handle-border-color-selected-hover:var(--luzmo-selected-color-down);--switch-handle-border-color-selected-down:var(--luzmo-selected-color-hard-down);--switch-handle-border-color-selected-focus:var(--luzmo-selected-color-down);--switch-focus-indicator-gap:var(--luzmo-indicator-gap);--switch-label-color-default:var(--luzmo-selected-color-hard);--switch-label-color-hover:var(--luzmo-selected-color-hard-hover);--switch-label-color-down:var(--luzmo-selected-color-hard-down);--switch-label-color-focus:var(--luzmo-selected-color-hard-focus);--switch-label-color-disabled:var(--luzmo-disabled-color);--switch-background-color:var(--luzmo-border-color);--switch-background-color-disabled:var(--luzmo-background-color-disabled);--switch-background-color-selected-disabled:var(--luzmo-disabled-color);--switch-background-color-selected-default:var(--luzmo-selected-color-hover);--switch-background-color-selected-hover:var(--luzmo-selected-color-down);--switch-background-color-selected-down:var(--luzmo-selected-color-hard-down);--switch-background-color-selected-focus:var(--luzmo-selected-color-down);--switch-focus-indicator-width:var(--luzmo-indicator-width);--switch-focus-indicator-color:var(--luzmo-primary);--switch-handle-background-color:var(--luzmo-background-color);--switch-handle-border-color-disabled:var(--luzmo-disabled-color);--switch-spacing-top-to-control:calc((var(--switch-min-height) - var(--switch-control-height)) / 2)}:host([disabled]){--switch-label-color-default:var(--luzmo-disabled-color)}:host([emphasized]){--switch-background-color-selected-default:var(--luzmo-primary);--switch-background-color-selected-hover:var(--luzmo-primary-hover);--switch-background-color-selected-down:var(--luzmo-primary-down);--switch-background-color-selected-focus:var(--luzmo-primary-focus);--switch-handle-border-color-selected-default:var(--luzmo-primary);--switch-handle-border-color-selected-hover:var(--luzmo-primary-hover);--switch-handle-border-color-selected-down:var(--luzmo-primary-down);--switch-handle-border-color-selected-focus:var(--luzmo-primary-focus)}:host([size=s]){--switch-min-height:24px;--switch-control-width:23px;--switch-control-height:var(--luzmo-font-size-s);--switch-control-label-spacing:var(--luzmo-spacing-3);--switch-spacing-top-to-label:4px;--switch-font-size:var(--luzmo-font-size-s)}:host{--switch-min-height:32px;--switch-control-width:26px;--switch-control-height:var(--luzmo-font-size);--switch-control-label-spacing:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--switch-spacing-top-to-label:6px;--switch-font-size:var(--luzmo-font-size)}:host([size=l]){--switch-min-height:40px;--switch-control-width:28px;--switch-control-height:var(--luzmo-font-size-l);--switch-control-label-spacing:var(--luzmo-spacing-4);--switch-spacing-top-to-label:9px;--switch-font-size:var(--luzmo-font-size-l)}:host([size=xl]){--switch-min-height:48px;--switch-control-width:32px;--switch-control-height:var(--luzmo-font-size-xl);--switch-control-label-spacing:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--switch-spacing-top-to-label:12px;--switch-font-size:var(--luzmo-font-size-xl)}:host([disabled]){pointer-events:none}:host([thumb=overflow]){--luzmo-switch-border-width:0px;--switch-control-width:calc(var(--switch-control-height) * 2);--switch-control-box-shadow:0 .125rem .25rem var(--luzmo-shadow-color), inset 0 0 0 .0625rem rgba(var(--luzmo-border-color-rgb), .2)}:host([thumb=overflow]) #switch{margin-top:calc((var(--luzmo-switch-min-height,var(--switch-min-height)) - var(--luzmo-switch-track-height,var(--switch-track-height))) / 2)}:host([thumb=overflow]) #switch:before{inset-block-start:calc(-1 * (var(--luzmo-switch-control-height,var(--switch-control-height)) - var(--luzmo-switch-track-height,var(--switch-track-height))) / 2)}:host([thumb=overflow][size=s]){--switch-track-height:10px;--switch-control-height:16px;--switch-focus-indicator-gap:5px}:host([thumb=overflow]){--switch-track-height:10px;--switch-control-height:18px;--switch-focus-indicator-gap:6px}:host([thumb=overflow][size=l]){--switch-track-height:12px;--switch-control-height:20px;--switch-focus-indicator-gap:7px}:host([thumb=overflow][size=xl]){--switch-track-height:12px;--switch-control-height:22px;--switch-focus-indicator-gap:8px}`,c=class extends t.n(o){constructor(...e){super(...e),this.emphasized=!1,this.thumb=`overflow`}static get styles(){return window.hasOwnProperty(`ShadyDOM`),[(0,i.unsafeCSS)(s)]}render(){return i.html`
|
|
19
19
|
${super.render()}
|
|
20
20
|
<span id="switch"></span>
|
|
21
21
|
<label id="label" for="input"><slot></slot></label>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* */
|
|
18
18
|
import "./tokens.js";
|
|
19
19
|
import { t as e } from "./decorate-CpKsOs9z.js";
|
|
20
|
-
import { n as t } from "./sized-mixin-
|
|
20
|
+
import { n as t } from "./sized-mixin-Cb-47MjG.js";
|
|
21
21
|
import { t as n } from "./focusable-xjv79E40.js";
|
|
22
22
|
import { t as r } from "./checkbox-mixin-BIuvxtEt.js";
|
|
23
23
|
import { html as i, unsafeCSS as a } from "lit";
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../table-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../table-CF5do4qb.cjs");exports.DEFAULT_TABLE_LABELS=e.u,exports.LuzmoTable=e.c,exports.LuzmoTableBody=e.s,exports.LuzmoTableCell=e.o,exports.LuzmoTableCheckboxCell=e.a,exports.LuzmoTableDisclosureCell=e.n,exports.LuzmoTableHead=e.i,exports.LuzmoTableHeadCell=e.r,exports.LuzmoTableRow=e.t,exports.LuzmoTableRowDetails=e.l;
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
18
|
import "../tokens.js";
|
|
19
|
-
export { u as DEFAULT_TABLE_LABELS, c as LuzmoTable, s as LuzmoTableBody, o as LuzmoTableCell, a as LuzmoTableCheckboxCell, n as LuzmoTableDisclosureCell, i as LuzmoTableHead, r as LuzmoTableHeadCell, t as LuzmoTableRow, l as LuzmoTableRowDetails } from "../table-
|
|
19
|
+
export { u as DEFAULT_TABLE_LABELS, c as LuzmoTable, s as LuzmoTableBody, o as LuzmoTableCell, a as LuzmoTableCheckboxCell, n as LuzmoTableDisclosureCell, i as LuzmoTableHead, r as LuzmoTableHeadCell, t as LuzmoTableRow, l as LuzmoTableRowDetails } from "../table-FWX6kbpt.js";
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-CSajkMro.cjs"),n=require("./roving-tabindex-BUFR8hPH.cjs"),r=require("./language-resolution-B7D3hQ6_.cjs"),i=require("./match-media-B_0cVVtk.cjs");require("./checkbox-NSSgVzJg.cjs");const a=require("./template-property-yhcAmPXk.cjs");let o=require("lit"),s=require("lit/decorators.js"),c=require("@luzmo/icons"),l=require("lit/directives/if-defined.js"),u=require("lit/directives/class-map.js"),d=require("lit/directives/style-map.js"),f=require("lit/directives/repeat.js"),p=require("@tanstack/table-core"),m=require("@tanstack/virtual-core");var h=`data-luzmo-table-announcer`,g,_=0,v=0,ee=()=>{let e=document.createElement(`div`);return e.setAttribute(h,``),e.setAttribute(`aria-live`,`polite`),e.setAttribute(`aria-atomic`,`true`),Object.assign(e.style,{position:`absolute`,inlineSize:`1px`,blockSize:`1px`,margin:`-1px`,padding:`0`,border:`0`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`}),e},te=class{constructor(e){e.addController(this)}announce(e){if(typeof document>`u`||!v)return;g??=ee(),g.isConnected||document.body.append(g);let t=g;t.textContent=``,cancelAnimationFrame(_),_=requestAnimationFrame(()=>{t.textContent=e})}hostConnected(){v+=1}hostDisconnected(){--v,v===0&&(cancelAnimationFrame(_),g?.remove(),g=void 0)}},y=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,b=e=>`luzmo-table-details-${[...e].map(e=>/^[A-Za-z0-9]$/.test(e)?e:`_${e.codePointAt(0).toString(16)}_`).join(``)}`,x=e=>y(e.minWidth)??(e.resizable?48:0),S=e=>y(e.maxWidth)??1e4,C=(e,t)=>Math.min(S(t),Math.max(x(t),Math.round(e))),ne=(e,t)=>{let n=y(t)??y(e.width);if(n!==void 0)return`${C(n,e)}px`;let r=y(e.minWidth)??(e.resizable?48:0),i=y(e.maxWidth);return i===void 0?r>0?`minmax(${r}px, 1fr)`:`minmax(0px, 1fr)`:`minmax(${r}px, ${i}px)`},re=(e,t,n)=>{let r=[];n.selects&&r.push(`var(--table-checkbox-cell-inline-size)`),n.expandable&&r.push(`var(--table-disclosure-cell-inline-size)`);for(let n of e)r.push(ne(n,y(t[n.id])));return r.join(` `)},w=(e,t)=>{let n=y(t)??y(e.width);return n===void 0?y(e.minWidth)??(e.resizable?48:0):C(n,e)},ie=(e,t,n)=>{let r=[];n.selects&&r.push(`var(--table-checkbox-cell-inline-size)`),n.expandable&&r.push(`var(--table-disclosure-cell-inline-size)`);let i=e.reduce((e,n)=>e+w(n,y(t[n.id])),0);return r.push(`${i}px`),`calc(${r.join(` + `)})`},ae=e=>({id:e.id,header:typeof e.header==`string`?e.header:e.id,width:y(e.width),minWidth:y(e.minWidth),maxWidth:y(e.maxWidth),resizable:e.resizable!==!1,lineClamp:y(e.lineClamp)}),oe=(e,t)=>{let n=e===`PageDown`||e===`PageUp`;switch(e){case`ArrowRight`:case`PageDown`:return{action:t?`increase`:`decrease`,amount:n?64:16};case`ArrowLeft`:case`PageUp`:return{action:t?`decrease`:`increase`,amount:n?64:16};case`Home`:return{action:`min`,amount:0};case`End`:return{action:`max`,amount:0};default:return}},se=(e,t,n)=>t.action===`min`?x(n):t.action===`max`?S(n):C(e+(t.action===`increase`?1:-1)*t.amount,n),T={selectAll:`Select All`,selectRow:`Select row {index}`,sortAscending:`Sorted by {column}, ascending`,sortDescending:`Sorted by {column}, descending`,expandRow:`Expand {label}`,collapseRow:`Collapse {label}`,resizeColumn:`Resize {column}`,columnWidth:`{column}, {width} pixels`},ce=e=>e.rowType===`information`||e._$rowType$===1,le=e=>e===`asc`?`ascending`:e===`desc`?`descending`:`none`,ue=e=>e===`asc`?`desc`:`asc`,E=(e={},t)=>{let n=Object.fromEntries(Object.entries(e).filter(([,e])=>typeof e==`string`&&e!==``)),r={...T,...n};return t&&(r.selectAll=t),r},D=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},de=(e,t)=>e.map((e,n)=>({item:e,value:t?t(e,n):String(n),index:n,information:ce(e)})),fe=(e,t)=>typeof e==`function`?e(t):e,pe=class{constructor(){this.records=[],this.sorting=[],this.manualSorting=!1,this.rowSelection={},this.selectedOrder=[],this.columns=[],this.table=(0,p.createTable)({data:[],columns:[],state:{},onStateChange:()=>{},renderFallbackValue:null,getCoreRowModel:(0,p.getCoreRowModel)(),getSortedRowModel:(0,p.getSortedRowModel)(),getRowId:e=>e.value,enableRowSelection:e=>!!this.selects&&!e.original.information,enableMultiRowSelection:()=>this.selects===`multiple`,onRowSelectionChange:e=>{this.pendingSelection=fe(e,this.rowSelection)}}),this.compare=(e,t)=>typeof e==`number`&&typeof t==`number`?e-t:(this.collator&&this.collatorLocale===this.locale||(this.collatorLocale=this.locale,this.collator=new Intl.Collator(this.locale,{numeric:!0,sensitivity:`base`})),this.collator.compare(String(e),String(t)))}setRecords(e){this.records=e}setSelected(e){this.selectedOrder=[...e],this.rowSelection=Object.fromEntries(e.map(e=>[e,!0]))}setSorting(e,t=!1){this.manualSorting=t,e?(this.columns.some(t=>t.id===e.key)||(this.columns=[...this.columns,this.createSortColumn(e.key)]),this.sorting=[{id:e.key,desc:e.direction===`desc`}]):this.sorting=[]}get rows(){this.sync();let e=this.table.getRowModel().rows.map(e=>e.original).filter(e=>!e.information);return e.length===this.records.length?e:this.records.map(t=>t.information?t:e.shift())}isSelected(e){return!!this.rowSelection[e]}get allSelected(){let e=this.selectableRecords;return e.length>0&&e.every(e=>this.isSelected(e.value))}get someSelected(){return this.selectableRecords.some(e=>this.isSelected(e.value))}toggle(e){this.sync();let t=this.findRow(e);if(t?.getCanSelect())return this.capture(()=>t.toggleSelected())}toggleAll(e){return this.sync(),this.capture(()=>this.table.toggleAllRowsSelected(e))}get selectableRecords(){return this.selects?this.records.filter(e=>!e.information):[]}findRow(e){return this.table.getCoreRowModel().rows.find(t=>t.original.value===e)}capture(e){this.pendingSelection=void 0,e();let t=this.pendingSelection??this.rowSelection;this.pendingSelection=void 0;let n=this.selectedOrder.filter(e=>t[e]),r=[...new Set([...this.records.map(e=>e.value),...Object.keys(t)])].filter(e=>t[e]&&!n.includes(e));return[...n,...r]}createSortColumn(e){return{id:e,accessorFn:t=>t.item[e],sortUndefined:`last`,sortingFn:(e,t,n)=>this.compare(e.getValue(n),t.getValue(n))}}sync(){this.table.setOptions(e=>({...e,data:this.records,columns:this.columns,manualSorting:this.manualSorting,state:{...this.table.initialState,sorting:this.sorting,rowSelection:this.rowSelection}}))}},me=new Set([`luzmo-table-cell`,`luzmo-table-head-cell`,`luzmo-table-checkbox-cell`]),O=e=>e.find(e=>e instanceof HTMLElement&&e.classList.contains(`resize-handle`)),k=class{constructor(e,t){this.handlePointerDown=e=>{if(!this.options.owns(e)||e.button!==0)return;let t=e.composedPath(),n=O(t),r=this.cellFromPath(t);if(!n||r?.localName!==`luzmo-table-head-cell`||!r.resizable)return;let i=r;e.preventDefault();let a=this.options.headCells().indexOf(i),o=i.toLayout(Math.max(a,0));this.drag={id:o.id,pointerId:e.pointerId,startWidth:i.getBoundingClientRect().width,startX:e.clientX};try{n.setPointerCapture(e.pointerId)}catch{}},this.handlePointerMove=e=>{let t=this.drag;if(!t||e.pointerId!==t.pointerId)return;let n=this.options.layouts().find(e=>e.id===t.id);if(!n)return;let r=(e.clientX-t.startX)*(this.options.isLTR()?1:-1);this.setColumnWidth(n,t.startWidth+r,!1)},this.handlePointerUp=e=>{let t=this.drag;if(!t||e.pointerId!==t.pointerId)return;let n=this.options.layouts().find(e=>e.id===t.id);if(this.drag=void 0,!n)return;let r=(e.clientX-t.startX)*(this.options.isLTR()?1:-1);this.setColumnWidth(n,t.startWidth+r,!0)},this.host=e,this.options=t,e.addController(this)}hostConnected(){this.host.addEventListener(`pointerdown`,this.handlePointerDown),this.host.addEventListener(`pointermove`,this.handlePointerMove),this.host.addEventListener(`pointerup`,this.handlePointerUp),this.host.addEventListener(`pointercancel`,this.handlePointerUp)}hostDisconnected(){this.host.removeEventListener(`pointerdown`,this.handlePointerDown),this.host.removeEventListener(`pointermove`,this.handlePointerMove),this.host.removeEventListener(`pointerup`,this.handlePointerUp),this.host.removeEventListener(`pointercancel`,this.handlePointerUp),this.drag=void 0}handleKeydown(e){if(e.defaultPrevented||!this.options.owns(e))return;let t=e.composedPath();if(!O(t))return;let n=oe(e.code,this.options.isLTR()),r=this.cellFromPath(t);n&&r?.localName===`luzmo-table-head-cell`&&(e.preventDefault(),e.stopPropagation(),this.resizeColumn(r,n))}resizeColumn(e,t){let n=this.options.headCells().indexOf(e),r=e.toLayout(Math.max(n,0)),i=e.currentWidth||Math.round(e.getBoundingClientRect().width);this.setColumnWidth(r,se(i,t,r),!0)}setColumnWidth(e,t,n){let r=C(t,e),i={...this.host.columnWidths,[e.id]:r};this.host.columnWidths=i;let a=this.options.headCells().find((t,n)=>t.toLayout(n).id===e.id);if(a&&(a.currentWidth=r),!n)return;let o=E(this.options.labels(),this.options.selectAllLabel());this.host.dispatchEvent(new CustomEvent(`luzmo-column-resized`,{bubbles:!0,composed:!0,detail:{columnId:e.id,width:r,columnWidths:{...i}}})),this.options.announce(D(o.columnWidth,{column:e.header,width:this.formatWidth(r)}))}formatWidth(e){let t=this.options.language();return this.widthFormatter&&this.formatterLanguage===t||(this.formatterLanguage=t,this.widthFormatter=new Intl.NumberFormat(t)),this.widthFormatter.format(e)}cellFromPath(e){return e.find(e=>e instanceof HTMLElement&&me.has(e.localName))}},he=`textarea, select, [contenteditable=""], [contenteditable="true"], input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"])`,ge=class extends n.t{constructor(e,{rows:t,isLTR:n,...r}){super(e,r),this.handleFocusout=e=>{let t=e.relatedTarget;t instanceof HTMLElement&&(this.elements.includes(t)||this.elements.some(e=>e.contains(t)))||queueMicrotask(()=>{this.activeGridCell()||this.hostNoLongerContainsFocus()})},this.handleKeydown=e=>{if(e.defaultPrevented||!this.acceptsEventCode(e.code)||!this.owns(e))return;let t=e.composedPath()[0];if(t instanceof HTMLElement&&t.matches(he))return;let n=this.cellFromPath(e.composedPath());if(!n)return;let r=this.navigationTarget(n,e);r&&(e.preventDefault(),this.focusElement(r))},this.rows=t,this.isLTR=n}acceptsEventCode(e){return e===`ArrowLeft`||e===`ArrowRight`||e===`ArrowUp`||e===`ArrowDown`||e===`Home`||e===`End`}focusElement(e,t){let n=this.elements.indexOf(e);if(n===-1)return;let r=this.elements[this.currentIndex];r&&r!==e&&(r.tabIndex=-1),this.currentIndex=n,this.focus(t)}owns(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.localName===`luzmo-table`)return t===this.host;return!0}cellFromPath(e){let t=new Set(this.rows().flat());return e.find(e=>e instanceof HTMLElement&&t.has(e))}activeGridCell(){let e=this.host.ownerDocument.activeElement;for(;e instanceof HTMLElement&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e instanceof HTMLElement&&this.rows().flat().includes(e)?e:void 0}navigationTarget(e,t){let n=this.rows(),r=n.findIndex(t=>t.includes(e));if(r===-1)return;let i=n[r].indexOf(e),a=n.length-1,o=(e,t)=>{let r=n[Math.min(Math.max(e,0),a)];return r[Math.min(Math.max(t,0),r.length-1)]},s=t=>{let i=n[Math.min(Math.max(t,0),a)];return this.cellForKey(i,this.columnKey(n[r],e))},c=this.isLTR()?1:-1,l=t.ctrlKey||t.metaKey;switch(t.code){case`ArrowRight`:return o(r,i+c);case`ArrowLeft`:return o(r,i-c);case`ArrowDown`:return s(r+1);case`ArrowUp`:return s(r-1);case`Home`:return o(l?0:r,0);case`End`:return l?o(a,n[a].length-1):o(r,n[r].length-1);default:return}}columnKey(e,t){if(t.classList.contains(`resize-handle`)){let n=e[e.indexOf(t)-1];return n?this.columnKey(e,n):`data:0`}if(t.localName===`luzmo-table-checkbox-cell`)return`select`;if(t.localName===`luzmo-table-disclosure-cell`)return`expand`;if(t.classList.contains(`cell`))return`details`;let n=e.filter(e=>e.localName===`luzmo-table-cell`||e.localName===`luzmo-table-head-cell`);return`data:${Math.max(n.indexOf(t),0)}`}cellForKey(e,t){return t===`expand`?e.find(e=>e.localName===`luzmo-table-disclosure-cell`)??this.cellForKey(e,`data:0`):t===`details`?this.cellForKey(e,`data:0`):e.find(n=>!n.classList.contains(`resize-handle`)&&this.columnKey(e,n)===t)??e[0]}},A=Symbol(`table-details-closing`),j=e=>{let t=e.nextElementSibling;return t?.localName===`luzmo-table-row-details`?t:null},M=e=>e instanceof HTMLElement,_e=class{constructor(e,t){this.closingDetails=new Set,this.handleDetailsCollapsed=e=>{if(!this.options.owns(e))return;let t=e.target,n=[...this.closingDetails].find(e=>b(e)===t?.id);if(!n)return;let r=new Set(this.closingDetails);r.delete(n),this.closingDetails=r,this.host.requestUpdate(A)},this.host=e,this.options=t,e.addController(this)}get closing(){return this.closingDetails}hostConnected(){this.host.addEventListener(`luzmo-table-details-collapsed`,this.handleDetailsCollapsed)}hostDisconnected(){this.host.removeEventListener(`luzmo-table-details-collapsed`,this.handleDetailsCollapsed)}clear(){this.closingDetails=new Set,this.host.requestUpdate(A)}toggle(e){if(!e.expandable&&!j(e))return;let t=this.isDataMode(),n=t?e.value:e.value||String(this.declarativeRows().indexOf(e)),r=t?!this.host.expanded.includes(n):!e.expanded;if(t){let e=this.host.expanded;this.setClosing(n,!r),this.host.expanded=r?[...e,n]:e.filter(e=>e!==n),this.dispatchToggle(n,r)||(this.host.expanded=e,this.setClosing(n,!1));return}if(e.expanded=r,!this.dispatchToggle(n,r)){e.expanded=!r;return}let i=j(e);i&&(i.open=r),e.disclosureLabel=this.expandLabel(n,e.checkboxLabel||e.querySelector(`:scope > luzmo-table-cell`)?.textContent?.trim()||n,this.declarativeRows().indexOf(e))}collapseFromPath(e){let t=e.find(e=>M(e)&&e.localName===`luzmo-table-row-details`),n=(t?.previousElementSibling?.localName===`luzmo-table-row`?t.previousElementSibling:void 0)??e.find(e=>M(e)&&e.localName===`luzmo-table-row`);if(!n?.expanded)return;this.toggle(n);let r=n.shadowRoot?.querySelector(`luzmo-table-disclosure-cell`);r&&this.options.focusDisclosure(r)}setClosing(e,t){let n=new Set([...this.closingDetails].filter(t=>t!==e));t&&n.add(e),this.closingDetails=n,this.host.requestUpdate(A)}dispatchToggle(e,t){return this.host.dispatchEvent(new CustomEvent(`luzmo-table-row-toggle`,{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e,expanded:t}}))}expandLabel(e,t,n){let r=E(this.host.labels,this.host.selectAllLabel);return D(this.host.expanded.includes(e)||this.rowByValue(e)?.expanded?r.collapseRow:r.expandRow,{label:t,index:String(n+1)})}rowByValue(e){return this.rows().find(t=>t.value===e)}isDataMode(){return Array.isArray(this.host.items)}declarativeRows(){return[...this.host.querySelectorAll(`:scope > luzmo-table-body > luzmo-table-row`)]}rows(){return this.isDataMode()?[...this.host.shadowRoot?.querySelectorAll(`luzmo-table-row`)??[]]:this.declarativeRows()}},N=e=>e instanceof HTMLElement,P=class{constructor(e,t){this.handleBodyScroll=e=>{this.options.owns(e)&&e.composedPath().find(e=>N(e)&&e.localName===`luzmo-table-body`)&&this.host.requestUpdate()},this.host=e,this.options=t,e.addController(this)}hostConnected(){this.host.addEventListener(`luzmo-table-body-scroll`,this.handleBodyScroll)}hostDisconnected(){this.host.removeEventListener(`luzmo-table-body-scroll`,this.handleBodyScroll),this.bodyObserver?.disconnect(),this.observedBody=void 0}hostUpdated(){this.syncHeadScroll(),this.watchBodyScrollbar()}hasExpansion(){return this.isDataMode()?typeof this.host.renderDetails==`function`:this.declarativeRows().some(e=>e.nextElementSibling?.localName===`luzmo-table-row-details`)}layouts(){return this.isDataMode()&&!this.slottedHead()?this.host.columns.map(ae):this.headCells().map((e,t)=>e.toLayout(t))}headCells(){return[...this.head()?.querySelectorAll(`:scope > luzmo-table-head-cell`)??[]]}applyGridMetrics(){let e={selects:!!this.host.selects,expandable:this.hasExpansion()},t=this.layouts();this.host.style.setProperty(`--table-grid-columns`,re(t,this.host.columnWidths,e)||`none`),this.host.style.setProperty(`--table-min-inline-size`,ie(t,this.host.columnWidths,e))}syncPresentation(){this.syncHead(),this.syncColumns(),this.isDataMode()||this.syncDeclarativeRows()}syncHeadTabStops(){let e=this.head();if(!e)return;let t=e.shadowRoot?.querySelector(`luzmo-table-checkbox-cell`);t&&t.getAttribute(`aria-hidden`)!==`true`&&t.tabIndex!==0&&(t.tabIndex=0);for(let e of this.headCells())e.tabIndex!==0&&(e.tabIndex=0)}syncHead(){let e=this.body();e&&this.syncGridColumns(e);let t=this.head();if(!t)return;this.syncGridColumns(t),this.syncHeadScroll(e,t);let n=E(this.host.labels,this.host.selectAllLabel),r=this.options.model.allSelected,i=this.options.model.someSelected,a=this.host.selects===`multiple`;t.selects=this.host.selects,t.checked=a&&r,t.indeterminate=a&&i&&!r,t.selected=i,t.emphasized=this.host.emphasized,t.checkboxLabel=n.selectAll,t.checkboxSize=this.host.size,t.expandable=this.hasExpansion()}watchBodyScrollbar(){let e=this.body();e&&e!==this.observedBody&&(this.bodyObserver?.disconnect(),this.observedBody=e,this.bodyObserver??=new ResizeObserver(()=>{this.syncHeadScroll()}),this.bodyObserver.observe(e,{box:`content-box`}))}syncHeadScroll(e=this.body(),t=this.head()){if(!e||!t)return;let n=Math.max(0,e.offsetWidth-e.clientWidth),r=e.scrollWidth>e.clientWidth+1;t.style.paddingInlineEnd=n>0&&!r?`${n}px`:``,t.style.transform=`translateX(${-e.scrollLeft}px)`}syncColumns(){let e=this.layouts(),t=E(this.host.labels,this.host.selectAllLabel);this.headCells().forEach((n,r)=>{let i=e[r];if(!i)return;let a=n.textContent?.trim()||i.header;if(n.resizeLabel=D(t.resizeColumn,{column:a}),!n.resizable)return;let o=y(this.host.columnWidths[i.id])??i.width,s=Math.round(n.getBoundingClientRect().width),c=o??s;c>0&&n.currentWidth!==c&&(n.currentWidth=c)});for(let t of this.rows()){this.syncGridColumns(t);let n=j(t);n&&this.syncGridColumns(n),!t.spanAll&&[...t.children].filter(e=>N(e)&&e.localName===`luzmo-table-cell`).forEach((t,n)=>{let r=e[n]?.lineClamp;t.columnLineClamp!==r&&(t.columnLineClamp=r)})}}syncDeclarativeRows(){let e=this.host.selects,t=E(this.host.labels,this.host.selectAllLabel),n=this.hasExpansion(),r=this.declarativeRows();r.forEach((i,a)=>{this.syncGridColumns(i);let o=i.value||String(a),s=j(i),c=a===r.length-1;i.toggleAttribute(`data-last-row`,c),s&&(this.syncGridColumns(s),s.toggleAttribute(`data-last-row`,c));let l=i.querySelector(`:scope > luzmo-table-cell`)?.textContent?.trim()||o;i.selectable=!!e,i.selectionColumn=!!e,i.selected=!!e&&this.options.model.isSelected(o),i.selectsSingle=e===`single`,i.emphasized=this.host.emphasized,i.checkboxSize=this.host.size,i.checkboxLabel=l,i.expandable=!!s,i.expansionColumn=n&&!s,i.detailsId=s?.id??``,i.disclosureLabel=D(i.expanded?t.collapseRow:t.expandRow,{label:l,index:String(a+1)}),s&&(s.id||(s.id=b(o),i.detailsId=s.id),s.open=i.expanded)})}syncGridColumns(e){for(let t of[`--table-grid-columns`,`--table-min-inline-size`])e.style.setProperty(t,this.host.style.getPropertyValue(t))}isDataMode(){return Array.isArray(this.host.items)}slottedHead(){return this.host.querySelector(`:scope > luzmo-table-head`)}head(){return this.slottedHead()??(this.isDataMode()?this.host.shadowRoot?.querySelector(`luzmo-table-head`)??null:null)}body(){return this.isDataMode()?this.host.shadowRoot?.querySelector(`luzmo-table-body`)??null:this.host.querySelector(`:scope > luzmo-table-body`)}declarativeRows(){return[...this.host.querySelectorAll(`:scope > luzmo-table-body > luzmo-table-row`)]}rows(){return this.isDataMode()?[...this.host.shadowRoot?.querySelectorAll(`luzmo-table-row`)??[]]:this.declarativeRows()}},F=Symbol(`table-virtual-range-updated`),I=40,ve=4,L=e=>e.getBoundingClientRect().height,ye=class{constructor(e,t){this.connected=!1,this.keys=[],this.estimatedSize=I,this.host=e,this.options=t,e.addController(this)}get enabled(){return!!this.virtualizer}set enabled(e){e!==this.enabled&&(e?(this.virtualizer=new m.Virtualizer(this.createOptions()),this.connected&&(this.cleanup=this.virtualizer._didMount())):(this.cleanup?.(),this.cleanup=void 0,this.virtualizer=void 0,this.range=void 0))}sync(e){return this.virtualizer?(e!==this.keys&&(this.keys=e,this.virtualizer.setOptions(this.createOptions())),this.virtualizer.getVirtualItems()):[]}get totalSize(){return this.virtualizer?.getTotalSize()??0}scrollToIndex(e){this.virtualizer?.scrollToIndex(e,{align:`start`})}hostConnected(){this.connected=!0,this.virtualizer&&!this.cleanup&&(this.cleanup=this.virtualizer._didMount())}hostUpdated(){if(!this.virtualizer)return;this.virtualizer._willUpdate();let e=this.options.getRowElements();this.syncEstimate(e);for(let t of e)this.virtualizer.measureElement(t)}hostDisconnected(){this.connected=!1,this.cleanup?.(),this.cleanup=void 0}syncEstimate(e){let t=e.filter(e=>this.options.isRendered(e)).map(e=>L(e)).filter(Boolean).sort((e,t)=>e-t);if(t.length===0)return;let n=t[Math.floor(t.length/2)];Math.abs(n-this.estimatedSize)>=.5&&(this.estimatedSize=n,this.virtualizer?.measure())}createOptions(){return{count:this.keys.length,getScrollElement:this.options.getScrollElement,estimateSize:()=>this.estimatedSize,getItemKey:e=>this.keys[e]??e,overscan:ve,useAnimationFrameWithResizeObserver:!0,scrollToFn:m.elementScroll,observeElementRect:m.observeElementRect,observeElementOffset:m.observeElementOffset,measureElement:e=>this.options.isRendered(e)&&L(e)||this.estimatedSize,onChange:e=>{let t=this.reportRange(e);queueMicrotask(()=>{t?this.host.requestUpdate(F,!1):this.host.requestUpdate()})}}}reportRange(e){let t=e.range;if(!t||t.endIndex<t.startIndex)return!1;let n=t.startIndex,r=t.endIndex;return this.range?.first===n&&this.range.last===r?!1:(this.range={first:n,last:r},this.options.onRangeChanged({first:n,last:r}),!0)}},be=`:host{grid-template-columns:var(--table-grid-columns);min-inline-size:var(--table-min-inline-size,0);box-sizing:border-box;display:grid;overflow:hidden;border-block-start:none!important;border-inline:none!important;border-block-end-width:var(--table-row-divider-width)!important;border-block-end-style:solid!important;border-block-end-color:var(--highcontrast-table-row-divider-color,var(--luzmo-table-border-color,var(--table-row-divider-color)))!important}:host([data-last-row]){border-block-end-width:0!important}:host([hidden]){display:none!important}.cell{outline:none;grid-column:1/-1;grid-template-rows:1fr;min-inline-size:0;display:grid;overflow:hidden}:host([data-last-row]) .cell{--table-focus-end-start-radius:var(--table-corner-radius);--table-focus-end-end-radius:var(--table-corner-radius)}.cell:focus-visible{outline:var(--luzmo-indicator-width,2px) solid var(--highcontrast-table-details-focus-indicator-color,var(--luzmo-indicator-color,currentColor));outline-offset:calc(var(--luzmo-indicator-width,2px) * -1);border-start-start-radius:var(--table-focus-start-start-radius,0);border-start-end-radius:var(--table-focus-start-end-radius,0);border-end-end-radius:var(--table-focus-end-end-radius,0);border-end-start-radius:var(--table-focus-end-start-radius,0)}.content{padding-block:var(--table-details-padding-block);padding-inline:var(--table-details-padding-inline);overflow:hidden}:host([opening]) .content,:host([closing]) .content{min-block-size:0}:host([opening]) .cell{animation:table-details-open var(--luzmo-animation-duration) ease-out}:host([closing]) .cell{animation:table-details-close var(--luzmo-animation-duration) ease-in}@keyframes table-details-open{0%{opacity:0;grid-template-rows:0fr}}@keyframes table-details-close{to{opacity:0;grid-template-rows:0fr}}@media (prefers-reduced-motion:reduce){:host([opening]) .cell,:host([closing]) .cell{animation:none}}:host{--table-row-divider-color:var(--luzmo-border-color);--table-row-divider-width:var(--luzmo-border-width);--table-details-padding-block:var(--luzmo-spacing-4);--table-details-padding-inline:var(--luzmo-table-cell-padding-inline,var(--table-cell-padding-inline))}@media (forced-colors:active){:host{--highcontrast-table-row-divider-color:CanvasText;--highcontrast-table-details-focus-indicator-color:Highlight}}`;function R(e,t){return[...Array.isArray(e)?e:e?[e]:[],(0,o.unsafeCSS)(t)]}var z=class extends e.n{constructor(...e){super(...e),this.role=`row`,this.open=!1,this._phase=`closed`,this.reducedMotion=new i.r(this,`(prefers-reduced-motion: reduce)`),this.handleAnimationEnd=e=>{e.target===this.renderRoot.querySelector(`.cell`)&&(this._phase===`closing`?this._finishClosing():this._phase===`opening`&&(this._phase=`open`),this.requestUpdate())},this._finishClosing=()=>{this._phase===`closing`&&(window.clearTimeout(this._closeFallback),this._phase=`closed`,this.hidden=!0,this.dispatchEvent(new Event(`luzmo-table-details-collapsed`,{bubbles:!0,composed:!0})),this.requestUpdate())}}static get styles(){return R(super.styles,be)}disconnectedCallback(){window.clearTimeout(this._closeFallback),super.disconnectedCallback()}willUpdate(e){super.willUpdate(e),(e.has(`open`)||!this.hasUpdated)&&(this.open?(this.hidden=!1,this._phase=this.hasUpdated&&!this.reducedMotion.matches?`opening`:`open`):!this.hasUpdated||this.reducedMotion.matches||this._phase===`closed`?(this._phase=`closed`,this.hidden=!0):this._phase=`closing`)}render(){return o.html`
|
|
18
|
+
require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-BqV6ywDw.cjs"),n=require("./roving-tabindex-BUFR8hPH.cjs"),r=require("./language-resolution-B7D3hQ6_.cjs"),i=require("./match-media-B_0cVVtk.cjs");require("./checkbox-CFQqGnDX.cjs");const a=require("./template-property-yhcAmPXk.cjs");let o=require("lit"),s=require("lit/decorators.js"),c=require("@luzmo/icons"),l=require("lit/directives/if-defined.js"),u=require("lit/directives/class-map.js"),d=require("lit/directives/style-map.js"),f=require("lit/directives/repeat.js"),p=require("@tanstack/table-core"),m=require("@tanstack/virtual-core");var h=`data-luzmo-table-announcer`,g,_=0,v=0,ee=()=>{let e=document.createElement(`div`);return e.setAttribute(h,``),e.setAttribute(`aria-live`,`polite`),e.setAttribute(`aria-atomic`,`true`),Object.assign(e.style,{position:`absolute`,inlineSize:`1px`,blockSize:`1px`,margin:`-1px`,padding:`0`,border:`0`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`}),e},te=class{constructor(e){e.addController(this)}announce(e){if(typeof document>`u`||!v)return;g??=ee(),g.isConnected||document.body.append(g);let t=g;t.textContent=``,cancelAnimationFrame(_),_=requestAnimationFrame(()=>{t.textContent=e})}hostConnected(){v+=1}hostDisconnected(){--v,v===0&&(cancelAnimationFrame(_),g?.remove(),g=void 0)}},y=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,b=e=>`luzmo-table-details-${[...e].map(e=>/^[A-Za-z0-9]$/.test(e)?e:`_${e.codePointAt(0).toString(16)}_`).join(``)}`,x=e=>y(e.minWidth)??(e.resizable?48:0),S=e=>y(e.maxWidth)??1e4,C=(e,t)=>Math.min(S(t),Math.max(x(t),Math.round(e))),ne=(e,t)=>{let n=y(t)??y(e.width);if(n!==void 0)return`${C(n,e)}px`;let r=y(e.minWidth)??(e.resizable?48:0),i=y(e.maxWidth);return i===void 0?r>0?`minmax(${r}px, 1fr)`:`minmax(0px, 1fr)`:`minmax(${r}px, ${i}px)`},re=(e,t,n)=>{let r=[];n.selects&&r.push(`var(--table-checkbox-cell-inline-size)`),n.expandable&&r.push(`var(--table-disclosure-cell-inline-size)`);for(let n of e)r.push(ne(n,y(t[n.id])));return r.join(` `)},w=(e,t)=>{let n=y(t)??y(e.width);return n===void 0?y(e.minWidth)??(e.resizable?48:0):C(n,e)},ie=(e,t,n)=>{let r=[];n.selects&&r.push(`var(--table-checkbox-cell-inline-size)`),n.expandable&&r.push(`var(--table-disclosure-cell-inline-size)`);let i=e.reduce((e,n)=>e+w(n,y(t[n.id])),0);return r.push(`${i}px`),`calc(${r.join(` + `)})`},ae=e=>({id:e.id,header:typeof e.header==`string`?e.header:e.id,width:y(e.width),minWidth:y(e.minWidth),maxWidth:y(e.maxWidth),resizable:e.resizable!==!1,lineClamp:y(e.lineClamp)}),oe=(e,t)=>{let n=e===`PageDown`||e===`PageUp`;switch(e){case`ArrowRight`:case`PageDown`:return{action:t?`increase`:`decrease`,amount:n?64:16};case`ArrowLeft`:case`PageUp`:return{action:t?`decrease`:`increase`,amount:n?64:16};case`Home`:return{action:`min`,amount:0};case`End`:return{action:`max`,amount:0};default:return}},se=(e,t,n)=>t.action===`min`?x(n):t.action===`max`?S(n):C(e+(t.action===`increase`?1:-1)*t.amount,n),T={selectAll:`Select All`,selectRow:`Select row {index}`,sortAscending:`Sorted by {column}, ascending`,sortDescending:`Sorted by {column}, descending`,expandRow:`Expand {label}`,collapseRow:`Collapse {label}`,resizeColumn:`Resize {column}`,columnWidth:`{column}, {width} pixels`},ce=e=>e.rowType===`information`||e._$rowType$===1,le=e=>e===`asc`?`ascending`:e===`desc`?`descending`:`none`,ue=e=>e===`asc`?`desc`:`asc`,E=(e={},t)=>{let n=Object.fromEntries(Object.entries(e).filter(([,e])=>typeof e==`string`&&e!==``)),r={...T,...n};return t&&(r.selectAll=t),r},D=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},de=(e,t)=>e.map((e,n)=>({item:e,value:t?t(e,n):String(n),index:n,information:ce(e)})),fe=(e,t)=>typeof e==`function`?e(t):e,pe=class{constructor(){this.records=[],this.sorting=[],this.manualSorting=!1,this.rowSelection={},this.selectedOrder=[],this.columns=[],this.table=(0,p.createTable)({data:[],columns:[],state:{},onStateChange:()=>{},renderFallbackValue:null,getCoreRowModel:(0,p.getCoreRowModel)(),getSortedRowModel:(0,p.getSortedRowModel)(),getRowId:e=>e.value,enableRowSelection:e=>!!this.selects&&!e.original.information,enableMultiRowSelection:()=>this.selects===`multiple`,onRowSelectionChange:e=>{this.pendingSelection=fe(e,this.rowSelection)}}),this.compare=(e,t)=>typeof e==`number`&&typeof t==`number`?e-t:(this.collator&&this.collatorLocale===this.locale||(this.collatorLocale=this.locale,this.collator=new Intl.Collator(this.locale,{numeric:!0,sensitivity:`base`})),this.collator.compare(String(e),String(t)))}setRecords(e){this.records=e}setSelected(e){this.selectedOrder=[...e],this.rowSelection=Object.fromEntries(e.map(e=>[e,!0]))}setSorting(e,t=!1){this.manualSorting=t,e?(this.columns.some(t=>t.id===e.key)||(this.columns=[...this.columns,this.createSortColumn(e.key)]),this.sorting=[{id:e.key,desc:e.direction===`desc`}]):this.sorting=[]}get rows(){this.sync();let e=this.table.getRowModel().rows.map(e=>e.original).filter(e=>!e.information);return e.length===this.records.length?e:this.records.map(t=>t.information?t:e.shift())}isSelected(e){return!!this.rowSelection[e]}get allSelected(){let e=this.selectableRecords;return e.length>0&&e.every(e=>this.isSelected(e.value))}get someSelected(){return this.selectableRecords.some(e=>this.isSelected(e.value))}toggle(e){this.sync();let t=this.findRow(e);if(t?.getCanSelect())return this.capture(()=>t.toggleSelected())}toggleAll(e){return this.sync(),this.capture(()=>this.table.toggleAllRowsSelected(e))}get selectableRecords(){return this.selects?this.records.filter(e=>!e.information):[]}findRow(e){return this.table.getCoreRowModel().rows.find(t=>t.original.value===e)}capture(e){this.pendingSelection=void 0,e();let t=this.pendingSelection??this.rowSelection;this.pendingSelection=void 0;let n=this.selectedOrder.filter(e=>t[e]),r=[...new Set([...this.records.map(e=>e.value),...Object.keys(t)])].filter(e=>t[e]&&!n.includes(e));return[...n,...r]}createSortColumn(e){return{id:e,accessorFn:t=>t.item[e],sortUndefined:`last`,sortingFn:(e,t,n)=>this.compare(e.getValue(n),t.getValue(n))}}sync(){this.table.setOptions(e=>({...e,data:this.records,columns:this.columns,manualSorting:this.manualSorting,state:{...this.table.initialState,sorting:this.sorting,rowSelection:this.rowSelection}}))}},me=new Set([`luzmo-table-cell`,`luzmo-table-head-cell`,`luzmo-table-checkbox-cell`]),O=e=>e.find(e=>e instanceof HTMLElement&&e.classList.contains(`resize-handle`)),k=class{constructor(e,t){this.handlePointerDown=e=>{if(!this.options.owns(e)||e.button!==0)return;let t=e.composedPath(),n=O(t),r=this.cellFromPath(t);if(!n||r?.localName!==`luzmo-table-head-cell`||!r.resizable)return;let i=r;e.preventDefault();let a=this.options.headCells().indexOf(i),o=i.toLayout(Math.max(a,0));this.drag={id:o.id,pointerId:e.pointerId,startWidth:i.getBoundingClientRect().width,startX:e.clientX};try{n.setPointerCapture(e.pointerId)}catch{}},this.handlePointerMove=e=>{let t=this.drag;if(!t||e.pointerId!==t.pointerId)return;let n=this.options.layouts().find(e=>e.id===t.id);if(!n)return;let r=(e.clientX-t.startX)*(this.options.isLTR()?1:-1);this.setColumnWidth(n,t.startWidth+r,!1)},this.handlePointerUp=e=>{let t=this.drag;if(!t||e.pointerId!==t.pointerId)return;let n=this.options.layouts().find(e=>e.id===t.id);if(this.drag=void 0,!n)return;let r=(e.clientX-t.startX)*(this.options.isLTR()?1:-1);this.setColumnWidth(n,t.startWidth+r,!0)},this.host=e,this.options=t,e.addController(this)}hostConnected(){this.host.addEventListener(`pointerdown`,this.handlePointerDown),this.host.addEventListener(`pointermove`,this.handlePointerMove),this.host.addEventListener(`pointerup`,this.handlePointerUp),this.host.addEventListener(`pointercancel`,this.handlePointerUp)}hostDisconnected(){this.host.removeEventListener(`pointerdown`,this.handlePointerDown),this.host.removeEventListener(`pointermove`,this.handlePointerMove),this.host.removeEventListener(`pointerup`,this.handlePointerUp),this.host.removeEventListener(`pointercancel`,this.handlePointerUp),this.drag=void 0}handleKeydown(e){if(e.defaultPrevented||!this.options.owns(e))return;let t=e.composedPath();if(!O(t))return;let n=oe(e.code,this.options.isLTR()),r=this.cellFromPath(t);n&&r?.localName===`luzmo-table-head-cell`&&(e.preventDefault(),e.stopPropagation(),this.resizeColumn(r,n))}resizeColumn(e,t){let n=this.options.headCells().indexOf(e),r=e.toLayout(Math.max(n,0)),i=e.currentWidth||Math.round(e.getBoundingClientRect().width);this.setColumnWidth(r,se(i,t,r),!0)}setColumnWidth(e,t,n){let r=C(t,e),i={...this.host.columnWidths,[e.id]:r};this.host.columnWidths=i;let a=this.options.headCells().find((t,n)=>t.toLayout(n).id===e.id);if(a&&(a.currentWidth=r),!n)return;let o=E(this.options.labels(),this.options.selectAllLabel());this.host.dispatchEvent(new CustomEvent(`luzmo-column-resized`,{bubbles:!0,composed:!0,detail:{columnId:e.id,width:r,columnWidths:{...i}}})),this.options.announce(D(o.columnWidth,{column:e.header,width:this.formatWidth(r)}))}formatWidth(e){let t=this.options.language();return this.widthFormatter&&this.formatterLanguage===t||(this.formatterLanguage=t,this.widthFormatter=new Intl.NumberFormat(t)),this.widthFormatter.format(e)}cellFromPath(e){return e.find(e=>e instanceof HTMLElement&&me.has(e.localName))}},he=`textarea, select, [contenteditable=""], [contenteditable="true"], input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"])`,ge=class extends n.t{constructor(e,{rows:t,isLTR:n,...r}){super(e,r),this.handleFocusout=e=>{let t=e.relatedTarget;t instanceof HTMLElement&&(this.elements.includes(t)||this.elements.some(e=>e.contains(t)))||queueMicrotask(()=>{this.activeGridCell()||this.hostNoLongerContainsFocus()})},this.handleKeydown=e=>{if(e.defaultPrevented||!this.acceptsEventCode(e.code)||!this.owns(e))return;let t=e.composedPath()[0];if(t instanceof HTMLElement&&t.matches(he))return;let n=this.cellFromPath(e.composedPath());if(!n)return;let r=this.navigationTarget(n,e);r&&(e.preventDefault(),this.focusElement(r))},this.rows=t,this.isLTR=n}acceptsEventCode(e){return e===`ArrowLeft`||e===`ArrowRight`||e===`ArrowUp`||e===`ArrowDown`||e===`Home`||e===`End`}focusElement(e,t){let n=this.elements.indexOf(e);if(n===-1)return;let r=this.elements[this.currentIndex];r&&r!==e&&(r.tabIndex=-1),this.currentIndex=n,this.focus(t)}owns(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.localName===`luzmo-table`)return t===this.host;return!0}cellFromPath(e){let t=new Set(this.rows().flat());return e.find(e=>e instanceof HTMLElement&&t.has(e))}activeGridCell(){let e=this.host.ownerDocument.activeElement;for(;e instanceof HTMLElement&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e instanceof HTMLElement&&this.rows().flat().includes(e)?e:void 0}navigationTarget(e,t){let n=this.rows(),r=n.findIndex(t=>t.includes(e));if(r===-1)return;let i=n[r].indexOf(e),a=n.length-1,o=(e,t)=>{let r=n[Math.min(Math.max(e,0),a)];return r[Math.min(Math.max(t,0),r.length-1)]},s=t=>{let i=n[Math.min(Math.max(t,0),a)];return this.cellForKey(i,this.columnKey(n[r],e))},c=this.isLTR()?1:-1,l=t.ctrlKey||t.metaKey;switch(t.code){case`ArrowRight`:return o(r,i+c);case`ArrowLeft`:return o(r,i-c);case`ArrowDown`:return s(r+1);case`ArrowUp`:return s(r-1);case`Home`:return o(l?0:r,0);case`End`:return l?o(a,n[a].length-1):o(r,n[r].length-1);default:return}}columnKey(e,t){if(t.classList.contains(`resize-handle`)){let n=e[e.indexOf(t)-1];return n?this.columnKey(e,n):`data:0`}if(t.localName===`luzmo-table-checkbox-cell`)return`select`;if(t.localName===`luzmo-table-disclosure-cell`)return`expand`;if(t.classList.contains(`cell`))return`details`;let n=e.filter(e=>e.localName===`luzmo-table-cell`||e.localName===`luzmo-table-head-cell`);return`data:${Math.max(n.indexOf(t),0)}`}cellForKey(e,t){return t===`expand`?e.find(e=>e.localName===`luzmo-table-disclosure-cell`)??this.cellForKey(e,`data:0`):t===`details`?this.cellForKey(e,`data:0`):e.find(n=>!n.classList.contains(`resize-handle`)&&this.columnKey(e,n)===t)??e[0]}},A=Symbol(`table-details-closing`),j=e=>{let t=e.nextElementSibling;return t?.localName===`luzmo-table-row-details`?t:null},M=e=>e instanceof HTMLElement,_e=class{constructor(e,t){this.closingDetails=new Set,this.handleDetailsCollapsed=e=>{if(!this.options.owns(e))return;let t=e.target,n=[...this.closingDetails].find(e=>b(e)===t?.id);if(!n)return;let r=new Set(this.closingDetails);r.delete(n),this.closingDetails=r,this.host.requestUpdate(A)},this.host=e,this.options=t,e.addController(this)}get closing(){return this.closingDetails}hostConnected(){this.host.addEventListener(`luzmo-table-details-collapsed`,this.handleDetailsCollapsed)}hostDisconnected(){this.host.removeEventListener(`luzmo-table-details-collapsed`,this.handleDetailsCollapsed)}clear(){this.closingDetails=new Set,this.host.requestUpdate(A)}toggle(e){if(!e.expandable&&!j(e))return;let t=this.isDataMode(),n=t?e.value:e.value||String(this.declarativeRows().indexOf(e)),r=t?!this.host.expanded.includes(n):!e.expanded;if(t){let e=this.host.expanded;this.setClosing(n,!r),this.host.expanded=r?[...e,n]:e.filter(e=>e!==n),this.dispatchToggle(n,r)||(this.host.expanded=e,this.setClosing(n,!1));return}if(e.expanded=r,!this.dispatchToggle(n,r)){e.expanded=!r;return}let i=j(e);i&&(i.open=r),e.disclosureLabel=this.expandLabel(n,e.checkboxLabel||e.querySelector(`:scope > luzmo-table-cell`)?.textContent?.trim()||n,this.declarativeRows().indexOf(e))}collapseFromPath(e){let t=e.find(e=>M(e)&&e.localName===`luzmo-table-row-details`),n=(t?.previousElementSibling?.localName===`luzmo-table-row`?t.previousElementSibling:void 0)??e.find(e=>M(e)&&e.localName===`luzmo-table-row`);if(!n?.expanded)return;this.toggle(n);let r=n.shadowRoot?.querySelector(`luzmo-table-disclosure-cell`);r&&this.options.focusDisclosure(r)}setClosing(e,t){let n=new Set([...this.closingDetails].filter(t=>t!==e));t&&n.add(e),this.closingDetails=n,this.host.requestUpdate(A)}dispatchToggle(e,t){return this.host.dispatchEvent(new CustomEvent(`luzmo-table-row-toggle`,{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e,expanded:t}}))}expandLabel(e,t,n){let r=E(this.host.labels,this.host.selectAllLabel);return D(this.host.expanded.includes(e)||this.rowByValue(e)?.expanded?r.collapseRow:r.expandRow,{label:t,index:String(n+1)})}rowByValue(e){return this.rows().find(t=>t.value===e)}isDataMode(){return Array.isArray(this.host.items)}declarativeRows(){return[...this.host.querySelectorAll(`:scope > luzmo-table-body > luzmo-table-row`)]}rows(){return this.isDataMode()?[...this.host.shadowRoot?.querySelectorAll(`luzmo-table-row`)??[]]:this.declarativeRows()}},N=e=>e instanceof HTMLElement,P=class{constructor(e,t){this.handleBodyScroll=e=>{this.options.owns(e)&&e.composedPath().find(e=>N(e)&&e.localName===`luzmo-table-body`)&&this.host.requestUpdate()},this.host=e,this.options=t,e.addController(this)}hostConnected(){this.host.addEventListener(`luzmo-table-body-scroll`,this.handleBodyScroll)}hostDisconnected(){this.host.removeEventListener(`luzmo-table-body-scroll`,this.handleBodyScroll),this.bodyObserver?.disconnect(),this.observedBody=void 0}hostUpdated(){this.syncHeadScroll(),this.watchBodyScrollbar()}hasExpansion(){return this.isDataMode()?typeof this.host.renderDetails==`function`:this.declarativeRows().some(e=>e.nextElementSibling?.localName===`luzmo-table-row-details`)}layouts(){return this.isDataMode()&&!this.slottedHead()?this.host.columns.map(ae):this.headCells().map((e,t)=>e.toLayout(t))}headCells(){return[...this.head()?.querySelectorAll(`:scope > luzmo-table-head-cell`)??[]]}applyGridMetrics(){let e={selects:!!this.host.selects,expandable:this.hasExpansion()},t=this.layouts();this.host.style.setProperty(`--table-grid-columns`,re(t,this.host.columnWidths,e)||`none`),this.host.style.setProperty(`--table-min-inline-size`,ie(t,this.host.columnWidths,e))}syncPresentation(){this.syncHead(),this.syncColumns(),this.isDataMode()||this.syncDeclarativeRows()}syncHeadTabStops(){let e=this.head();if(!e)return;let t=e.shadowRoot?.querySelector(`luzmo-table-checkbox-cell`);t&&t.getAttribute(`aria-hidden`)!==`true`&&t.tabIndex!==0&&(t.tabIndex=0);for(let e of this.headCells())e.tabIndex!==0&&(e.tabIndex=0)}syncHead(){let e=this.body();e&&this.syncGridColumns(e);let t=this.head();if(!t)return;this.syncGridColumns(t),this.syncHeadScroll(e,t);let n=E(this.host.labels,this.host.selectAllLabel),r=this.options.model.allSelected,i=this.options.model.someSelected,a=this.host.selects===`multiple`;t.selects=this.host.selects,t.checked=a&&r,t.indeterminate=a&&i&&!r,t.selected=i,t.emphasized=this.host.emphasized,t.checkboxLabel=n.selectAll,t.checkboxSize=this.host.size,t.expandable=this.hasExpansion()}watchBodyScrollbar(){let e=this.body();e&&e!==this.observedBody&&(this.bodyObserver?.disconnect(),this.observedBody=e,this.bodyObserver??=new ResizeObserver(()=>{this.syncHeadScroll()}),this.bodyObserver.observe(e,{box:`content-box`}))}syncHeadScroll(e=this.body(),t=this.head()){if(!e||!t)return;let n=Math.max(0,e.offsetWidth-e.clientWidth),r=e.scrollWidth>e.clientWidth+1;t.style.paddingInlineEnd=n>0&&!r?`${n}px`:``,t.style.transform=`translateX(${-e.scrollLeft}px)`}syncColumns(){let e=this.layouts(),t=E(this.host.labels,this.host.selectAllLabel);this.headCells().forEach((n,r)=>{let i=e[r];if(!i)return;let a=n.textContent?.trim()||i.header;if(n.resizeLabel=D(t.resizeColumn,{column:a}),!n.resizable)return;let o=y(this.host.columnWidths[i.id])??i.width,s=Math.round(n.getBoundingClientRect().width),c=o??s;c>0&&n.currentWidth!==c&&(n.currentWidth=c)});for(let t of this.rows()){this.syncGridColumns(t);let n=j(t);n&&this.syncGridColumns(n),!t.spanAll&&[...t.children].filter(e=>N(e)&&e.localName===`luzmo-table-cell`).forEach((t,n)=>{let r=e[n]?.lineClamp;t.columnLineClamp!==r&&(t.columnLineClamp=r)})}}syncDeclarativeRows(){let e=this.host.selects,t=E(this.host.labels,this.host.selectAllLabel),n=this.hasExpansion(),r=this.declarativeRows();r.forEach((i,a)=>{this.syncGridColumns(i);let o=i.value||String(a),s=j(i),c=a===r.length-1;i.toggleAttribute(`data-last-row`,c),s&&(this.syncGridColumns(s),s.toggleAttribute(`data-last-row`,c));let l=i.querySelector(`:scope > luzmo-table-cell`)?.textContent?.trim()||o;i.selectable=!!e,i.selectionColumn=!!e,i.selected=!!e&&this.options.model.isSelected(o),i.selectsSingle=e===`single`,i.emphasized=this.host.emphasized,i.checkboxSize=this.host.size,i.checkboxLabel=l,i.expandable=!!s,i.expansionColumn=n&&!s,i.detailsId=s?.id??``,i.disclosureLabel=D(i.expanded?t.collapseRow:t.expandRow,{label:l,index:String(a+1)}),s&&(s.id||(s.id=b(o),i.detailsId=s.id),s.open=i.expanded)})}syncGridColumns(e){for(let t of[`--table-grid-columns`,`--table-min-inline-size`])e.style.setProperty(t,this.host.style.getPropertyValue(t))}isDataMode(){return Array.isArray(this.host.items)}slottedHead(){return this.host.querySelector(`:scope > luzmo-table-head`)}head(){return this.slottedHead()??(this.isDataMode()?this.host.shadowRoot?.querySelector(`luzmo-table-head`)??null:null)}body(){return this.isDataMode()?this.host.shadowRoot?.querySelector(`luzmo-table-body`)??null:this.host.querySelector(`:scope > luzmo-table-body`)}declarativeRows(){return[...this.host.querySelectorAll(`:scope > luzmo-table-body > luzmo-table-row`)]}rows(){return this.isDataMode()?[...this.host.shadowRoot?.querySelectorAll(`luzmo-table-row`)??[]]:this.declarativeRows()}},F=Symbol(`table-virtual-range-updated`),I=40,ve=4,L=e=>e.getBoundingClientRect().height,ye=class{constructor(e,t){this.connected=!1,this.keys=[],this.estimatedSize=I,this.host=e,this.options=t,e.addController(this)}get enabled(){return!!this.virtualizer}set enabled(e){e!==this.enabled&&(e?(this.virtualizer=new m.Virtualizer(this.createOptions()),this.connected&&(this.cleanup=this.virtualizer._didMount())):(this.cleanup?.(),this.cleanup=void 0,this.virtualizer=void 0,this.range=void 0))}sync(e){return this.virtualizer?(e!==this.keys&&(this.keys=e,this.virtualizer.setOptions(this.createOptions())),this.virtualizer.getVirtualItems()):[]}get totalSize(){return this.virtualizer?.getTotalSize()??0}scrollToIndex(e){this.virtualizer?.scrollToIndex(e,{align:`start`})}hostConnected(){this.connected=!0,this.virtualizer&&!this.cleanup&&(this.cleanup=this.virtualizer._didMount())}hostUpdated(){if(!this.virtualizer)return;this.virtualizer._willUpdate();let e=this.options.getRowElements();this.syncEstimate(e);for(let t of e)this.virtualizer.measureElement(t)}hostDisconnected(){this.connected=!1,this.cleanup?.(),this.cleanup=void 0}syncEstimate(e){let t=e.filter(e=>this.options.isRendered(e)).map(e=>L(e)).filter(Boolean).sort((e,t)=>e-t);if(t.length===0)return;let n=t[Math.floor(t.length/2)];Math.abs(n-this.estimatedSize)>=.5&&(this.estimatedSize=n,this.virtualizer?.measure())}createOptions(){return{count:this.keys.length,getScrollElement:this.options.getScrollElement,estimateSize:()=>this.estimatedSize,getItemKey:e=>this.keys[e]??e,overscan:ve,useAnimationFrameWithResizeObserver:!0,scrollToFn:m.elementScroll,observeElementRect:m.observeElementRect,observeElementOffset:m.observeElementOffset,measureElement:e=>this.options.isRendered(e)&&L(e)||this.estimatedSize,onChange:e=>{let t=this.reportRange(e);queueMicrotask(()=>{t?this.host.requestUpdate(F,!1):this.host.requestUpdate()})}}}reportRange(e){let t=e.range;if(!t||t.endIndex<t.startIndex)return!1;let n=t.startIndex,r=t.endIndex;return this.range?.first===n&&this.range.last===r?!1:(this.range={first:n,last:r},this.options.onRangeChanged({first:n,last:r}),!0)}},be=`:host{grid-template-columns:var(--table-grid-columns);min-inline-size:var(--table-min-inline-size,0);box-sizing:border-box;display:grid;overflow:hidden;border-block-start:none!important;border-inline:none!important;border-block-end-width:var(--table-row-divider-width)!important;border-block-end-style:solid!important;border-block-end-color:var(--highcontrast-table-row-divider-color,var(--luzmo-table-border-color,var(--table-row-divider-color)))!important}:host([data-last-row]){border-block-end-width:0!important}:host([hidden]){display:none!important}.cell{outline:none;grid-column:1/-1;grid-template-rows:1fr;min-inline-size:0;display:grid;overflow:hidden}:host([data-last-row]) .cell{--table-focus-end-start-radius:var(--table-corner-radius);--table-focus-end-end-radius:var(--table-corner-radius)}.cell:focus-visible{outline:var(--luzmo-indicator-width,2px) solid var(--highcontrast-table-details-focus-indicator-color,var(--luzmo-indicator-color,currentColor));outline-offset:calc(var(--luzmo-indicator-width,2px) * -1);border-start-start-radius:var(--table-focus-start-start-radius,0);border-start-end-radius:var(--table-focus-start-end-radius,0);border-end-end-radius:var(--table-focus-end-end-radius,0);border-end-start-radius:var(--table-focus-end-start-radius,0)}.content{padding-block:var(--table-details-padding-block);padding-inline:var(--table-details-padding-inline);overflow:hidden}:host([opening]) .content,:host([closing]) .content{min-block-size:0}:host([opening]) .cell{animation:table-details-open var(--luzmo-animation-duration) ease-out}:host([closing]) .cell{animation:table-details-close var(--luzmo-animation-duration) ease-in}@keyframes table-details-open{0%{opacity:0;grid-template-rows:0fr}}@keyframes table-details-close{to{opacity:0;grid-template-rows:0fr}}@media (prefers-reduced-motion:reduce){:host([opening]) .cell,:host([closing]) .cell{animation:none}}:host{--table-row-divider-color:var(--luzmo-border-color);--table-row-divider-width:var(--luzmo-border-width);--table-details-padding-block:var(--luzmo-spacing-4);--table-details-padding-inline:var(--luzmo-table-cell-padding-inline,var(--table-cell-padding-inline))}@media (forced-colors:active){:host{--highcontrast-table-row-divider-color:CanvasText;--highcontrast-table-details-focus-indicator-color:Highlight}}`;function R(e,t){return[...Array.isArray(e)?e:e?[e]:[],(0,o.unsafeCSS)(t)]}var z=class extends e.n{constructor(...e){super(...e),this.role=`row`,this.open=!1,this._phase=`closed`,this.reducedMotion=new i.r(this,`(prefers-reduced-motion: reduce)`),this.handleAnimationEnd=e=>{e.target===this.renderRoot.querySelector(`.cell`)&&(this._phase===`closing`?this._finishClosing():this._phase===`opening`&&(this._phase=`open`),this.requestUpdate())},this._finishClosing=()=>{this._phase===`closing`&&(window.clearTimeout(this._closeFallback),this._phase=`closed`,this.hidden=!0,this.dispatchEvent(new Event(`luzmo-table-details-collapsed`,{bubbles:!0,composed:!0})),this.requestUpdate())}}static get styles(){return R(super.styles,be)}disconnectedCallback(){window.clearTimeout(this._closeFallback),super.disconnectedCallback()}willUpdate(e){super.willUpdate(e),(e.has(`open`)||!this.hasUpdated)&&(this.open?(this.hidden=!1,this._phase=this.hasUpdated&&!this.reducedMotion.matches?`opening`:`open`):!this.hasUpdated||this.reducedMotion.matches||this._phase===`closed`?(this._phase=`closed`,this.hidden=!0):this._phase=`closing`)}render(){return o.html`
|
|
19
19
|
<div
|
|
20
20
|
class="cell"
|
|
21
21
|
role="gridcell"
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
* */
|
|
18
18
|
import "./tokens.js";
|
|
19
19
|
import { n as e, t } from "./decorate-CpKsOs9z.js";
|
|
20
|
-
import { n } from "./sized-mixin-
|
|
20
|
+
import { n } from "./sized-mixin-Cb-47MjG.js";
|
|
21
21
|
import { t as r } from "./roving-tabindex-BKMkfzY0.js";
|
|
22
22
|
import { r as i, t as a } from "./language-resolution-7rc0khIK.js";
|
|
23
23
|
import { r as o } from "./match-media-UNh23w4s.js";
|
|
24
|
-
import "./checkbox-
|
|
24
|
+
import "./checkbox-D884zXBt.js";
|
|
25
25
|
import { n as s } from "./template-property-Bks4Db5C.js";
|
|
26
26
|
import { html as c, nothing as l, unsafeCSS as u } from "lit";
|
|
27
27
|
import { property as d, query as f, state as p } from "lit/decorators.js";
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../tabs-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../tabs-sIusiEWI.cjs");exports.LuzmoTab=e.i,exports.LuzmoTabPanel=e.r,exports.LuzmoTabs=e.n,exports.LuzmoTabsOverflow=e.t;
|
package/components/tabs/index.js
CHANGED
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
18
|
import "../tokens.js";
|
|
19
|
-
export { i as LuzmoTab, r as LuzmoTabPanel, n as LuzmoTabs, t as LuzmoTabsOverflow } from "../tabs-
|
|
19
|
+
export { i as LuzmoTab, r as LuzmoTabPanel, n as LuzmoTabs, t as LuzmoTabsOverflow } from "../tabs-CODc4EYJ.js";
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
* */
|
|
18
18
|
import "./tokens.js";
|
|
19
19
|
import { n as e, t } from "./decorate-CpKsOs9z.js";
|
|
20
|
-
import { n } from "./sized-mixin-
|
|
20
|
+
import { n } from "./sized-mixin-Cb-47MjG.js";
|
|
21
21
|
import { t as r } from "./focus-visible-D6TRtUd7.js";
|
|
22
22
|
import { t as i } from "./focusable-xjv79E40.js";
|
|
23
23
|
import { t as a } from "./roving-tabindex-BKMkfzY0.js";
|
|
24
24
|
import "./icon-DADJww_a.js";
|
|
25
25
|
import { t as o } from "./observe-slot-text-Dzkb_VqN.js";
|
|
26
26
|
import { t as s } from "./random-id-CO3s9i3n.js";
|
|
27
|
-
import "./action-button-
|
|
27
|
+
import "./action-button-LmKtPKfe.js";
|
|
28
28
|
import { t as c } from "./observe-slot-presence-t2N_C6Ud.js";
|
|
29
29
|
import { t as l } from "./scaled-indicator-CsfzvTDr.js";
|
|
30
30
|
import { html as u, nothing as d, unsafeCSS as f } from "lit";
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-
|
|
18
|
+
require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-BqV6ywDw.cjs"),n=require("./focus-visible-BQAhwoxi.cjs"),r=require("./focusable-BIHTrJd6.cjs"),i=require("./roving-tabindex-BUFR8hPH.cjs");require("./icon-BlbMP3mJ.cjs");const a=require("./observe-slot-text-BqwCIv2a.cjs"),o=require("./random-id-BcUJAxUZ.cjs");require("./action-button-Cz4jSv__.cjs");const s=require("./observe-slot-presence-CS8pMePk.cjs"),c=require("./scaled-indicator-DLJIztx0.cjs");let l=require("lit"),u=require("lit/decorators.js"),d=require("@luzmo/icons"),f=require("lit/directives/if-defined.js"),p=require("lit/directives/class-map.js"),m=require("lit/decorators/property.js"),h=require("@lit-labs/observers/intersection-controller.js"),g=require("@lit-labs/observers/resize-controller.js");var _=`: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-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);border:var(--luzmo-tabs-focus-indicator-width,var(--tabs-focus-indicator-width)) solid transparent!important}@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;color:inherit;position:relative}#item-label{z-index:1;position:relative}:host([selected]),:host([selected]) ::slotted([slot=icon]),:host([selected]) #item-label{color:highlighttext}}:host([vertical]){flex-direction:column;justify-content:center;align-items:center;height:auto;display:flex}: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)}`,v=class extends n.t(a.t(s.t(e.n,`[slot="icon"]`),``)){constructor(...e){super(...e),this.disabled=!1,this.label=``,this.selected=!1,this.vertical=!1,this.value=``}static get styles(){return[(0,l.unsafeCSS)(_)]}get hasIcon(){return this.slotContentIsPresent}get hasLabel(){return!!this.label||this.slotHasContent}render(){return l.html`
|
|
19
19
|
${this.hasIcon?l.html` <slot name="icon"></slot> `:l.nothing}
|
|
20
20
|
<label id="item-label" ?hidden=${!this.hasLabel}>
|
|
21
21
|
<slot>${this.label}</slot>
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../tags-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../tags-CWJqZufu.cjs");exports.LuzmoTag=e.n,exports.LuzmoTags=e.t;
|
package/components/tags/index.js
CHANGED
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
* */
|
|
18
18
|
import "./tokens.js";
|
|
19
19
|
import { n as e, t } from "./decorate-CpKsOs9z.js";
|
|
20
|
-
import { n } from "./sized-mixin-
|
|
20
|
+
import { n } from "./sized-mixin-Cb-47MjG.js";
|
|
21
21
|
import { t as r } from "./focus-visible-D6TRtUd7.js";
|
|
22
22
|
import { t as i } from "./roving-tabindex-BKMkfzY0.js";
|
|
23
23
|
import { n as a } from "./language-resolution-7rc0khIK.js";
|
|
24
|
-
import "./tooltip-
|
|
25
|
-
import "./button-
|
|
24
|
+
import "./tooltip-ElTGebA9.js";
|
|
25
|
+
import "./button-5jzMIMLW.js";
|
|
26
26
|
import { html as o, nothing as s, unsafeCSS as c } from "lit";
|
|
27
27
|
import { property as l, queryAssignedNodes as u, state as d } from "lit/decorators.js";
|
|
28
28
|
// src/components/tags/tag.module.scss?inline
|