@luzmo/lucero 2.7.1 → 2.8.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-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-a_TXvQLC.cjs} +1 -1
- package/components/{color-menu-CEtmpeN7.js → color-menu-tt_e0XSY.js} +5 -5
- 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-BDqJodTR.js → color-picker-C6-8JGHh.js} +4 -4
- package/components/{color-picker-CLGNQIkK.cjs → color-picker-D6KSj7M_.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/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-CD-aGN9I.js → slider-CRe19ziU.js} +2 -2
- package/components/{slider-B1cCAj1x.cjs → slider-CotjHgw-.cjs} +1 -1
- package/components/split-view/controllers/pane-visibility-controller.d.ts +22 -0
- package/components/split-view/controllers/size-memory-controller.d.ts +27 -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 +63 -6
- package/components/split-view-B8CDMni5.js +547 -0
- package/components/split-view-vqTtsWjc.cjs +45 -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-DKqadIPQ.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-BSYeKpnw.js} +2 -2
- package/standalone/chunks/{color-slider-MSADvkPC.js → color-slider-w5flr8ev.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/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 +45 -43
- 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/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/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
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
/*! * Lucero - The design system for Luzmo.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2026 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
-
*
|
|
10
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
-
* SOFTWARE.
|
|
17
|
-
* */
|
|
18
|
-
import "./tokens.js";
|
|
19
|
-
import { t as e } from "./decorate-CpKsOs9z.js";
|
|
20
|
-
import { t } from "./focusable-xjv79E40.js";
|
|
21
|
-
import { html as n, nothing as r, unsafeCSS as i } from "lit";
|
|
22
|
-
import { property as a, query as o } from "lit/decorators.js";
|
|
23
|
-
// src/components/split-view/split-view-model.ts
|
|
24
|
-
function s(e, t) {
|
|
25
|
-
let n = Math.max(0, t.primaryMin, e - t.secondaryMax), r = Math.min(e, t.primaryMax, e - t.secondaryMin);
|
|
26
|
-
if (n <= r) return {
|
|
27
|
-
min: n,
|
|
28
|
-
max: r
|
|
29
|
-
};
|
|
30
|
-
let i = Math.min(e, Math.max(0, e / 2));
|
|
31
|
-
return {
|
|
32
|
-
min: i,
|
|
33
|
-
max: i
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function c(e, t) {
|
|
37
|
-
return Math.min(t.max, Math.max(t.min, e));
|
|
38
|
-
}
|
|
39
|
-
// src/components/split-view/split-view.module.scss?inline
|
|
40
|
-
var l = ":host{min-block-size:0;min-inline-size:0;display:flex;position:relative}:host([vertical]){flex-direction:column}slot{display:contents}::slotted(*){min-block-size:0;min-inline-size:0}::slotted(:nth-child(n+3)){display:none!important}.separator{cursor:col-resize;block-size:100%;inline-size:var(--split-view-target-size);touch-action:none;z-index:1;outline:none;justify-content:center;align-items:center;display:flex;position:absolute;inset-block-start:0;inset-inline-start:calc(var(--splitter-position,0) * 1px - var(--split-view-target-size) / 2)}:host([vertical]) .separator{block-size:var(--split-view-target-size);cursor:row-resize;inline-size:100%;inset-block-start:calc(var(--splitter-position,0) * 1px - var(--split-view-target-size) / 2);inset-inline-start:0}.separator .divider{background-color:var(--luzmo-split-view-divider-color,var(--split-view-divider-color));block-size:100%;inline-size:var(--luzmo-split-view-divider-thickness,var(--split-view-divider-thickness));pointer-events:none}.separator .handle{background-color:var(--luzmo-split-view-divider-color,var(--split-view-handle-color));block-size:var(--split-view-handle-length);border-radius:var(--split-view-handle-radius);inline-size:var(--split-view-handle-thickness);pointer-events:none;display:none;position:absolute}:host([resizable]) .separator .handle{display:block}:host([vertical]) .separator .divider{block-size:var(--luzmo-split-view-divider-thickness,var(--split-view-divider-thickness));inline-size:100%}:host([vertical]) .separator .handle{block-size:var(--split-view-handle-thickness);inline-size:var(--split-view-handle-length)}:host(:not([vertical])) .separator.start-edge{inset-inline-start:0}:host(:not([vertical])) .separator.end-edge{inset-inline-start:calc(100% - var(--split-view-target-size))}:host(:not([vertical])) .separator.start-edge .divider,:host(:not([vertical])) .separator.end-edge .divider,:host([vertical]) .separator.start-edge .divider,:host([vertical]) .separator.end-edge .divider{position:absolute}:host(:not([vertical])) .separator.start-edge .divider{inset-inline-start:0}:host(:not([vertical])) .separator.start-edge .handle{inset-inline-start:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host(:not([vertical])) .separator.end-edge .divider{inset-inline-end:0}:host(:not([vertical])) .separator.end-edge .handle{inset-inline-end:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host([vertical]) .separator.start-edge{inset-block-start:0}:host([vertical]) .separator.end-edge{inset-block-start:calc(100% - var(--split-view-target-size))}:host([vertical]) .separator.start-edge .divider{inset-block-start:0}:host([vertical]) .separator.start-edge .handle{inset-block-start:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host([vertical]) .separator.end-edge .divider{inset-block-end:0}:host([vertical]) .separator.end-edge .handle{inset-block-end:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host([resizable]:not([disabled])) .separator:hover .divider,:host([resizable]:not([disabled])) .separator:hover .handle{background-color:var(--luzmo-split-view-divider-color-hover,var(--split-view-divider-color-hover))}:host([dragging]) .separator .divider,:host([dragging]) .separator .handle{background-color:var(--luzmo-split-view-divider-color-active,var(--split-view-divider-color-active))}.separator:focus-visible .divider{background-color:var(--luzmo-split-view-focus-color,var(--split-view-focus-color))}.separator:focus-visible .handle{outline:var(--split-view-focus-width) solid var(--luzmo-split-view-focus-color,var(--split-view-focus-color));outline-offset:var(--split-view-focus-offset)}:host(:not([resizable])) .separator,:host([disabled]) .separator{cursor:default}@media (forced-colors:active){:host{--highcontrast-split-view-divider-color:CanvasText;--highcontrast-split-view-focus-color:Highlight}.separator .divider,.separator .handle{background-color:var(--highcontrast-split-view-divider-color,var(--luzmo-split-view-divider-color,var(--split-view-divider-color)))}:host([resizable]:not([disabled])) .separator:hover .divider,:host([resizable]:not([disabled])) .separator:hover .handle,:host([dragging]) .separator .divider,:host([dragging]) .separator .handle{background-color:highlight}.separator:focus-visible .divider{background-color:var(--highcontrast-split-view-focus-color,var(--luzmo-split-view-focus-color,var(--split-view-focus-color)))}.separator:focus-visible .handle{outline-color:var(--highcontrast-split-view-focus-color,var(--luzmo-split-view-focus-color,var(--split-view-focus-color)))}}:host{--split-view-divider-color:var(--luzmo-border-color-full);--split-view-divider-color-hover:var(--luzmo-primary-hover);--split-view-divider-color-active:var(--luzmo-primary-down);--split-view-divider-thickness:var(--luzmo-border-width);--split-view-focus-color:var(--luzmo-primary-focus);--split-view-target-size:var(--luzmo-component-height-xs);--split-view-focus-offset:var(--luzmo-border-width);--split-view-focus-width:var(--luzmo-indicator-width,1px);--split-view-handle-color:var(--luzmo-font-color-extra-dimmed);--split-view-handle-length:var(--luzmo-component-height);--split-view-handle-thickness:var(--luzmo-spacing-2);--split-view-handle-radius:var(--luzmo-border-radius-full)}", u = 3840, d = 10, f = 50, p = 50, m = 0, h = class extends t {
|
|
41
|
-
constructor(...e) {
|
|
42
|
-
super(...e), this.vertical = !1, this.collapsible = !1, this.label = "Resize panels", this.primarySize = "50%", this._primaryMin = 0, this._primaryMax = u, this._secondaryMin = 0, this._secondaryMax = u, this._resizable = !1, this._splitterPos = 0, this._viewSize = 0, this._minPos = 0, this._maxPos = 0, this._enoughChildren = !1, this._positionInitialized = !1, this._initialSplitterPosSupplied = !1, this._activePanes = [], this._restorePositionOnReconnect = !1, this._paneInlineStyles = /* @__PURE__ */ new Map(), this._dragChanged = !1;
|
|
43
|
-
}
|
|
44
|
-
static get styles() {
|
|
45
|
-
let e = super.styles;
|
|
46
|
-
return [...Array.isArray(e) ? e : e ? [e] : [], i(l)];
|
|
47
|
-
}
|
|
48
|
-
set resizable(e) {
|
|
49
|
-
let t = !!e;
|
|
50
|
-
if (t === this._resizable) return;
|
|
51
|
-
let n = this._resizable;
|
|
52
|
-
this._resizable = t, t || this._cancelDrag(), this.requestUpdate("resizable", n);
|
|
53
|
-
}
|
|
54
|
-
get resizable() {
|
|
55
|
-
return this._resizable;
|
|
56
|
-
}
|
|
57
|
-
set primaryMin(e) {
|
|
58
|
-
let t = this._normalizeBound(e, 0);
|
|
59
|
-
if (t === this._primaryMin) return;
|
|
60
|
-
let n = this._primaryMin;
|
|
61
|
-
this._primaryMin = t, this.requestUpdate("primaryMin", n);
|
|
62
|
-
}
|
|
63
|
-
get primaryMin() {
|
|
64
|
-
return this._primaryMin;
|
|
65
|
-
}
|
|
66
|
-
set primaryMax(e) {
|
|
67
|
-
let t = this._normalizeBound(e, u);
|
|
68
|
-
if (t === this._primaryMax) return;
|
|
69
|
-
let n = this._primaryMax;
|
|
70
|
-
this._primaryMax = t, this.requestUpdate("primaryMax", n);
|
|
71
|
-
}
|
|
72
|
-
get primaryMax() {
|
|
73
|
-
return this._primaryMax;
|
|
74
|
-
}
|
|
75
|
-
set secondaryMin(e) {
|
|
76
|
-
let t = this._normalizeBound(e, 0);
|
|
77
|
-
if (t === this._secondaryMin) return;
|
|
78
|
-
let n = this._secondaryMin;
|
|
79
|
-
this._secondaryMin = t, this.requestUpdate("secondaryMin", n);
|
|
80
|
-
}
|
|
81
|
-
get secondaryMin() {
|
|
82
|
-
return this._secondaryMin;
|
|
83
|
-
}
|
|
84
|
-
set secondaryMax(e) {
|
|
85
|
-
let t = this._normalizeBound(e, u);
|
|
86
|
-
if (t === this._secondaryMax) return;
|
|
87
|
-
let n = this._secondaryMax;
|
|
88
|
-
this._secondaryMax = t, this.requestUpdate("secondaryMax", n);
|
|
89
|
-
}
|
|
90
|
-
get secondaryMax() {
|
|
91
|
-
return this._secondaryMax;
|
|
92
|
-
}
|
|
93
|
-
set splitterPos(e) {
|
|
94
|
-
this._positionInitialized || (this._initialSplitterPosSupplied = !0);
|
|
95
|
-
let t = Number.isFinite(e) ? e : 0, n = this.collapsible && (t === 0 || t === this._viewSize), r = this._positionInitialized && !n ? this._clampPosition(t) : t;
|
|
96
|
-
if (r === this._splitterPos) return;
|
|
97
|
-
let i = this._splitterPos;
|
|
98
|
-
this._splitterPos = r, this.requestUpdate("splitterPos", i);
|
|
99
|
-
}
|
|
100
|
-
get splitterPos() {
|
|
101
|
-
return this._splitterPos;
|
|
102
|
-
}
|
|
103
|
-
get focusElement() {
|
|
104
|
-
return this._separator ?? this;
|
|
105
|
-
}
|
|
106
|
-
connectedCallback() {
|
|
107
|
-
this._positionInitialized || (this._initialSplitterPosSupplied = this._initialSplitterPosSupplied || this.hasAttribute("splitter-pos")), super.connectedCallback(), typeof ResizeObserver < "u" && (this._resizeObserver ??= new ResizeObserver(() => {
|
|
108
|
-
this._recalculate(!1);
|
|
109
|
-
}), this._resizeObserver.observe(this)), this.updateComplete.then(() => {
|
|
110
|
-
this.isConnected && this.handleSlotChange();
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
disconnectedCallback() {
|
|
114
|
-
this._cancelDrag(!1), this._resizeObserver?.disconnect(), this._restorePaneStyles(), this._activePanes = [], this._restorePositionOnReconnect = !0, this._clearControlledElementId(), this._controlledElement = void 0, super.disconnectedCallback();
|
|
115
|
-
}
|
|
116
|
-
_normalizeBound(e, t) {
|
|
117
|
-
return Number.isFinite(e) && e >= 0 ? e : t;
|
|
118
|
-
}
|
|
119
|
-
_measureView() {
|
|
120
|
-
let e = this.getBoundingClientRect();
|
|
121
|
-
return this.vertical ? e.height : e.width;
|
|
122
|
-
}
|
|
123
|
-
_calculateBounds() {
|
|
124
|
-
this._viewSize = this._measureView();
|
|
125
|
-
let e = s(this._viewSize, {
|
|
126
|
-
primaryMin: this.primaryMin,
|
|
127
|
-
primaryMax: this.primaryMax,
|
|
128
|
-
secondaryMin: this.secondaryMin,
|
|
129
|
-
secondaryMax: this.secondaryMax
|
|
130
|
-
});
|
|
131
|
-
this._minPos = e.min, this._maxPos = e.max;
|
|
132
|
-
}
|
|
133
|
-
_clampPosition(e) {
|
|
134
|
-
return c(e, {
|
|
135
|
-
min: this._minPos,
|
|
136
|
-
max: this._maxPos
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
_resolveInitialPosition() {
|
|
140
|
-
let e = this.primarySize.trim();
|
|
141
|
-
if (/^\d+(?:\.\d+)?(?:px)?$/.test(e)) return Number.parseFloat(e);
|
|
142
|
-
if (/^\d+(?:\.\d+)?%$/.test(e)) return Number.parseFloat(e) / 100 * this._viewSize;
|
|
143
|
-
if (e === "auto" && this._controlledElement) {
|
|
144
|
-
let e = Number.parseFloat(this._controlledElement.style.getPropertyValue(this.vertical ? "block-size" : "inline-size"));
|
|
145
|
-
if (Number.isFinite(e) && e > 0) return e;
|
|
146
|
-
let t = Number.parseFloat(getComputedStyle(this._controlledElement).getPropertyValue(this.vertical ? "height" : "width"));
|
|
147
|
-
if (Number.isFinite(t) && t > 0) return t;
|
|
148
|
-
let n = this._controlledElement.getBoundingClientRect(), r = this.vertical ? n.height : n.width;
|
|
149
|
-
if (Number.isFinite(r) && r > 0) return r;
|
|
150
|
-
}
|
|
151
|
-
return this._viewSize / 2;
|
|
152
|
-
}
|
|
153
|
-
_applyPaneSizes() {
|
|
154
|
-
let [e, t] = this._activePanes, n = Math.round(this.splitterPos), r = Math.round(this._viewSize);
|
|
155
|
-
e && (e.style.flex = `0 0 ${n}px`, e.style.display = r > 0 && n <= 0 ? "none" : this._paneInlineStyles.get(e)?.display ?? ""), t && (t.style.flex = "1 1 0", t.style.display = r > 0 && n >= r ? "none" : this._paneInlineStyles.get(t)?.display ?? "");
|
|
156
|
-
}
|
|
157
|
-
_restorePaneStyles() {
|
|
158
|
-
for (let [e, t] of this._paneInlineStyles) e.style.display = t.display, e.style.flex = t.flex;
|
|
159
|
-
this._paneInlineStyles.clear();
|
|
160
|
-
}
|
|
161
|
-
_setActivePanes(e) {
|
|
162
|
-
let t = e.slice(0, 2), n = t.length !== this._activePanes.length || t.some((e, t) => e !== this._activePanes[t]);
|
|
163
|
-
if (n && (this._restorePaneStyles(), this._activePanes = t), n || this._paneInlineStyles.size === 0) for (let e of t) this._paneInlineStyles.set(e, {
|
|
164
|
-
display: e.style.display,
|
|
165
|
-
flex: e.style.flex
|
|
166
|
-
});
|
|
167
|
-
return n;
|
|
168
|
-
}
|
|
169
|
-
_recalculate(e) {
|
|
170
|
-
if (!this.isConnected || !this._enoughChildren) return;
|
|
171
|
-
let t = this._viewSize, n = this._positionInitialized && this.collapsible && this.splitterPos === 0, r = this._positionInitialized && this.collapsible && t > 0 && this.splitterPos === t;
|
|
172
|
-
this._calculateBounds();
|
|
173
|
-
let i;
|
|
174
|
-
this._positionInitialized ? i = e ? this._resolveInitialPosition() : n ? 0 : r ? this._viewSize : this._clampPosition(this.splitterPos) : (i = this._initialSplitterPosSupplied ? this.splitterPos : this._resolveInitialPosition(), this._positionInitialized = !0), this.splitterPos = i, this._applyPaneSizes();
|
|
175
|
-
}
|
|
176
|
-
_syncAriaControls() {
|
|
177
|
-
this._separator && this._controlledElement && (this._separator.ariaControlsElements = [this._controlledElement]);
|
|
178
|
-
}
|
|
179
|
-
_clearControlledElementId() {
|
|
180
|
-
this._controlledElement && this._controlledElement.id === this._controlledElementGeneratedId && this._controlledElement.removeAttribute("id"), this._controlledElementGeneratedId = void 0;
|
|
181
|
-
}
|
|
182
|
-
handleSlotChange() {
|
|
183
|
-
let e = this._paneSlot?.assignedElements() ?? [], t = this._setActivePanes(e), n = e[0];
|
|
184
|
-
n !== this._controlledElement && (this._clearControlledElementId(), this._controlledElement = n), this._controlledElement && !this._controlledElement.id && (m += 1, this._controlledElementGeneratedId = `luzmo-split-view-pane-${m}`, this._controlledElement.id = this._controlledElementGeneratedId);
|
|
185
|
-
let r = this._enoughChildren, i = e.length >= 2;
|
|
186
|
-
if (i !== this._enoughChildren && (this._enoughChildren = i, this.requestUpdate()), i) {
|
|
187
|
-
let e = !r || t && !this._restorePositionOnReconnect;
|
|
188
|
-
this._restorePositionOnReconnect = !1, this.updateComplete.then(() => {
|
|
189
|
-
this._recalculate(e), this._syncAriaControls();
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
_dispatchValueEvent(e) {
|
|
194
|
-
this.dispatchEvent(new Event(e, {
|
|
195
|
-
bubbles: !0,
|
|
196
|
-
composed: !0
|
|
197
|
-
}));
|
|
198
|
-
}
|
|
199
|
-
_setPosition(e, t = {}) {
|
|
200
|
-
let n = this._clampPosition(e);
|
|
201
|
-
return this.collapsible && t.collapse && (e <= 0 && (n = 0), e >= this._viewSize && (n = this._viewSize)), n !== this.splitterPos && (this.splitterPos > 0 && this.splitterPos < this._viewSize && (this._lastExpandedPosition = this.splitterPos), this.splitterPos = n, this._applyPaneSizes(), (t.emit ?? !0) && this._dispatchValueEvent("input"), !0);
|
|
202
|
-
}
|
|
203
|
-
handleKeydown(e) {
|
|
204
|
-
if (!this.resizable || this.disabled) return;
|
|
205
|
-
let t;
|
|
206
|
-
switch (e.key) {
|
|
207
|
-
case "ArrowLeft":
|
|
208
|
-
this.vertical || (t = this.splitterPos + (this.isLTR ? -10 : d));
|
|
209
|
-
break;
|
|
210
|
-
case "ArrowRight":
|
|
211
|
-
this.vertical || (t = this.splitterPos + (this.isLTR ? d : -10));
|
|
212
|
-
break;
|
|
213
|
-
case "ArrowUp":
|
|
214
|
-
this.vertical && (t = this.splitterPos - d);
|
|
215
|
-
break;
|
|
216
|
-
case "ArrowDown":
|
|
217
|
-
this.vertical && (t = this.splitterPos + d);
|
|
218
|
-
break;
|
|
219
|
-
case "PageUp":
|
|
220
|
-
t = this.splitterPos + (this.vertical ? -50 : f);
|
|
221
|
-
break;
|
|
222
|
-
case "PageDown":
|
|
223
|
-
t = this.splitterPos + (this.vertical ? f : -50);
|
|
224
|
-
break;
|
|
225
|
-
case "Home":
|
|
226
|
-
t = this.collapsible ? 0 : this._minPos;
|
|
227
|
-
break;
|
|
228
|
-
case "End":
|
|
229
|
-
t = this.collapsible ? this._viewSize : this._maxPos;
|
|
230
|
-
break;
|
|
231
|
-
case "Enter":
|
|
232
|
-
if (!this.collapsible) return;
|
|
233
|
-
t = this.splitterPos === 0 ? this._lastExpandedPosition ?? this._viewSize / 2 : 0;
|
|
234
|
-
break;
|
|
235
|
-
default: return;
|
|
236
|
-
}
|
|
237
|
-
t !== void 0 && (e.preventDefault(), this._setPosition(t, { collapse: !0 }) && this._dispatchValueEvent("change"));
|
|
238
|
-
}
|
|
239
|
-
_capturePointer(e, t) {
|
|
240
|
-
try {
|
|
241
|
-
e.setPointerCapture(t), this._capturedPointer = {
|
|
242
|
-
target: e,
|
|
243
|
-
pointerId: t
|
|
244
|
-
};
|
|
245
|
-
} catch {
|
|
246
|
-
this._capturedPointer = void 0;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
_releasePointer() {
|
|
250
|
-
let e = this._capturedPointer;
|
|
251
|
-
this._capturedPointer = void 0, e?.target.hasPointerCapture(e.pointerId) && e.target.releasePointerCapture(e.pointerId);
|
|
252
|
-
}
|
|
253
|
-
handlePointerDown(e) {
|
|
254
|
-
this.resizable && !this.disabled && e.button === 0 && this._dragStartPosition === void 0 && (this._dragPointerId = e.pointerId, this._dragStartPosition = this.splitterPos, this._dragChanged = !1, this.toggleAttribute("dragging", !0), this._capturePointer(e.currentTarget, e.pointerId));
|
|
255
|
-
}
|
|
256
|
-
_pointerPosition(e) {
|
|
257
|
-
let t = this.getBoundingClientRect();
|
|
258
|
-
return this.vertical ? e.clientY - t.top : this.isLTR ? e.clientX - t.left : t.right - e.clientX;
|
|
259
|
-
}
|
|
260
|
-
handlePointerMove(e) {
|
|
261
|
-
if (this._dragPointerId !== e.pointerId || this._dragStartPosition === void 0 || !this.resizable || this.disabled) return;
|
|
262
|
-
let t = this._pointerPosition(e);
|
|
263
|
-
this.collapsible && t < this._minPos - p && (t = 0), this.collapsible && t > this._maxPos + p && (t = this._viewSize), this._setPosition(t, { collapse: !0 }) && (this._dragChanged = !0);
|
|
264
|
-
}
|
|
265
|
-
_finishDrag() {
|
|
266
|
-
this._dragPointerId = void 0, this._releasePointer(), this._dragStartPosition = void 0, this._dragChanged = !1, this.toggleAttribute("dragging", !1);
|
|
267
|
-
}
|
|
268
|
-
handlePointerUp(e) {
|
|
269
|
-
if (this._dragPointerId !== e.pointerId || this._dragStartPosition === void 0) return;
|
|
270
|
-
let t = this._dragChanged;
|
|
271
|
-
this._finishDrag(), t && this._dispatchValueEvent("change");
|
|
272
|
-
}
|
|
273
|
-
_cancelDrag(e = !0) {
|
|
274
|
-
if (this._dragStartPosition === void 0) return;
|
|
275
|
-
let t = this._dragStartPosition, n = this._dragChanged;
|
|
276
|
-
this._finishDrag(), e && n && this._setPosition(t, { collapse: !0 });
|
|
277
|
-
}
|
|
278
|
-
handlePointerCancel(e) {
|
|
279
|
-
this._dragPointerId === e.pointerId && this._cancelDrag();
|
|
280
|
-
}
|
|
281
|
-
render() {
|
|
282
|
-
return n`
|
|
283
|
-
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
284
|
-
${this._enoughChildren ? n`
|
|
285
|
-
<div
|
|
286
|
-
class="separator ${this.splitterPos <= 0 ? "start-edge" : this._viewSize > 0 && this.splitterPos >= this._viewSize ? "end-edge" : ""}"
|
|
287
|
-
role="separator"
|
|
288
|
-
aria-label=${this.label}
|
|
289
|
-
aria-disabled=${this.resizable ? this.disabled ? "true" : "false" : r}
|
|
290
|
-
aria-orientation=${this.vertical ? "horizontal" : "vertical"}
|
|
291
|
-
aria-valuemin=${this.resizable ? this._positionAsPercentage(this.collapsible ? 0 : this._minPos) : r}
|
|
292
|
-
aria-valuemax=${this.resizable ? this._positionAsPercentage(this.collapsible ? this._viewSize : this._maxPos) : r}
|
|
293
|
-
aria-valuenow=${this.resizable ? this._positionAsPercentage(this.splitterPos) : r}
|
|
294
|
-
tabindex=${this.resizable ? this.disabled ? "-1" : "0" : r}
|
|
295
|
-
style=${`--splitter-position: ${this.splitterPos}`}
|
|
296
|
-
@keydown=${this.handleKeydown}
|
|
297
|
-
@pointerdown=${this.handlePointerDown}
|
|
298
|
-
@pointermove=${this.handlePointerMove}
|
|
299
|
-
@pointerup=${this.handlePointerUp}
|
|
300
|
-
@pointercancel=${this.handlePointerCancel}
|
|
301
|
-
@lostpointercapture=${this.handlePointerCancel}
|
|
302
|
-
>
|
|
303
|
-
<span class="divider" aria-hidden="true"></span>
|
|
304
|
-
<span class="handle" aria-hidden="true"></span>
|
|
305
|
-
</div>
|
|
306
|
-
` : r}
|
|
307
|
-
`;
|
|
308
|
-
}
|
|
309
|
-
_positionAsPercentage(e) {
|
|
310
|
-
return String(this._viewSize > 0 ? Math.round(e / this._viewSize * 100) : 0);
|
|
311
|
-
}
|
|
312
|
-
willUpdate(e) {
|
|
313
|
-
super.willUpdate(e), (e.has("vertical") || e.has("primaryMin") || e.has("primaryMax") || e.has("secondaryMin") || e.has("secondaryMax") || e.has("collapsible")) && this._recalculate(!1), e.has("primarySize") && this._recalculate(!0);
|
|
314
|
-
}
|
|
315
|
-
updated(e) {
|
|
316
|
-
super.updated(e), e.has("splitterPos") && this._applyPaneSizes(), this._syncAriaControls(), e.has("disabled") && this.disabled && this._cancelDrag();
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
// src/components/split-view/index.ts
|
|
320
|
-
e([a({
|
|
321
|
-
type: Boolean,
|
|
322
|
-
reflect: !0
|
|
323
|
-
})], h.prototype, "vertical", void 0), e([a({
|
|
324
|
-
type: Boolean,
|
|
325
|
-
reflect: !0
|
|
326
|
-
})], h.prototype, "resizable", null), e([a({
|
|
327
|
-
type: Boolean,
|
|
328
|
-
reflect: !0
|
|
329
|
-
})], h.prototype, "collapsible", void 0), e([a({
|
|
330
|
-
type: String,
|
|
331
|
-
reflect: !0
|
|
332
|
-
})], h.prototype, "label", void 0), e([a({
|
|
333
|
-
type: Number,
|
|
334
|
-
reflect: !0,
|
|
335
|
-
attribute: "primary-min"
|
|
336
|
-
})], h.prototype, "primaryMin", null), e([a({
|
|
337
|
-
type: Number,
|
|
338
|
-
reflect: !0,
|
|
339
|
-
attribute: "primary-max"
|
|
340
|
-
})], h.prototype, "primaryMax", null), e([a({
|
|
341
|
-
type: Number,
|
|
342
|
-
reflect: !0,
|
|
343
|
-
attribute: "secondary-min"
|
|
344
|
-
})], h.prototype, "secondaryMin", null), e([a({
|
|
345
|
-
type: Number,
|
|
346
|
-
reflect: !0,
|
|
347
|
-
attribute: "secondary-max"
|
|
348
|
-
})], h.prototype, "secondaryMax", null), e([a({
|
|
349
|
-
type: String,
|
|
350
|
-
reflect: !0,
|
|
351
|
-
attribute: "primary-size"
|
|
352
|
-
})], h.prototype, "primarySize", void 0), e([a({
|
|
353
|
-
type: Number,
|
|
354
|
-
reflect: !0,
|
|
355
|
-
attribute: "splitter-pos"
|
|
356
|
-
})], h.prototype, "splitterPos", null), e([o("slot")], h.prototype, "_paneSlot", void 0), e([o("[role=\"separator\"]")], h.prototype, "_separator", void 0), typeof customElements < "u" && !customElements.get("luzmo-split-view") && customElements.define("luzmo-split-view", h);
|
|
357
|
-
export { h as t };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*! * Lucero - The design system for Luzmo.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2026 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
-
*
|
|
10
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
-
* SOFTWARE.
|
|
17
|
-
* */
|
|
18
|
-
require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./focusable-BIHTrJd6.cjs");let n=require("lit"),r=require("lit/decorators.js");function i(e,t){let n=Math.max(0,t.primaryMin,e-t.secondaryMax),r=Math.min(e,t.primaryMax,e-t.secondaryMin);if(n<=r)return{min:n,max:r};let i=Math.min(e,Math.max(0,e/2));return{min:i,max:i}}function a(e,t){return Math.min(t.max,Math.max(t.min,e))}var o=`:host{min-block-size:0;min-inline-size:0;display:flex;position:relative}:host([vertical]){flex-direction:column}slot{display:contents}::slotted(*){min-block-size:0;min-inline-size:0}::slotted(:nth-child(n+3)){display:none!important}.separator{cursor:col-resize;block-size:100%;inline-size:var(--split-view-target-size);touch-action:none;z-index:1;outline:none;justify-content:center;align-items:center;display:flex;position:absolute;inset-block-start:0;inset-inline-start:calc(var(--splitter-position,0) * 1px - var(--split-view-target-size) / 2)}:host([vertical]) .separator{block-size:var(--split-view-target-size);cursor:row-resize;inline-size:100%;inset-block-start:calc(var(--splitter-position,0) * 1px - var(--split-view-target-size) / 2);inset-inline-start:0}.separator .divider{background-color:var(--luzmo-split-view-divider-color,var(--split-view-divider-color));block-size:100%;inline-size:var(--luzmo-split-view-divider-thickness,var(--split-view-divider-thickness));pointer-events:none}.separator .handle{background-color:var(--luzmo-split-view-divider-color,var(--split-view-handle-color));block-size:var(--split-view-handle-length);border-radius:var(--split-view-handle-radius);inline-size:var(--split-view-handle-thickness);pointer-events:none;display:none;position:absolute}:host([resizable]) .separator .handle{display:block}:host([vertical]) .separator .divider{block-size:var(--luzmo-split-view-divider-thickness,var(--split-view-divider-thickness));inline-size:100%}:host([vertical]) .separator .handle{block-size:var(--split-view-handle-thickness);inline-size:var(--split-view-handle-length)}:host(:not([vertical])) .separator.start-edge{inset-inline-start:0}:host(:not([vertical])) .separator.end-edge{inset-inline-start:calc(100% - var(--split-view-target-size))}:host(:not([vertical])) .separator.start-edge .divider,:host(:not([vertical])) .separator.end-edge .divider,:host([vertical]) .separator.start-edge .divider,:host([vertical]) .separator.end-edge .divider{position:absolute}:host(:not([vertical])) .separator.start-edge .divider{inset-inline-start:0}:host(:not([vertical])) .separator.start-edge .handle{inset-inline-start:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host(:not([vertical])) .separator.end-edge .divider{inset-inline-end:0}:host(:not([vertical])) .separator.end-edge .handle{inset-inline-end:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host([vertical]) .separator.start-edge{inset-block-start:0}:host([vertical]) .separator.end-edge{inset-block-start:calc(100% - var(--split-view-target-size))}:host([vertical]) .separator.start-edge .divider{inset-block-start:0}:host([vertical]) .separator.start-edge .handle{inset-block-start:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host([vertical]) .separator.end-edge .divider{inset-block-end:0}:host([vertical]) .separator.end-edge .handle{inset-block-end:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host([resizable]:not([disabled])) .separator:hover .divider,:host([resizable]:not([disabled])) .separator:hover .handle{background-color:var(--luzmo-split-view-divider-color-hover,var(--split-view-divider-color-hover))}:host([dragging]) .separator .divider,:host([dragging]) .separator .handle{background-color:var(--luzmo-split-view-divider-color-active,var(--split-view-divider-color-active))}.separator:focus-visible .divider{background-color:var(--luzmo-split-view-focus-color,var(--split-view-focus-color))}.separator:focus-visible .handle{outline:var(--split-view-focus-width) solid var(--luzmo-split-view-focus-color,var(--split-view-focus-color));outline-offset:var(--split-view-focus-offset)}:host(:not([resizable])) .separator,:host([disabled]) .separator{cursor:default}@media (forced-colors:active){:host{--highcontrast-split-view-divider-color:CanvasText;--highcontrast-split-view-focus-color:Highlight}.separator .divider,.separator .handle{background-color:var(--highcontrast-split-view-divider-color,var(--luzmo-split-view-divider-color,var(--split-view-divider-color)))}:host([resizable]:not([disabled])) .separator:hover .divider,:host([resizable]:not([disabled])) .separator:hover .handle,:host([dragging]) .separator .divider,:host([dragging]) .separator .handle{background-color:highlight}.separator:focus-visible .divider{background-color:var(--highcontrast-split-view-focus-color,var(--luzmo-split-view-focus-color,var(--split-view-focus-color)))}.separator:focus-visible .handle{outline-color:var(--highcontrast-split-view-focus-color,var(--luzmo-split-view-focus-color,var(--split-view-focus-color)))}}:host{--split-view-divider-color:var(--luzmo-border-color-full);--split-view-divider-color-hover:var(--luzmo-primary-hover);--split-view-divider-color-active:var(--luzmo-primary-down);--split-view-divider-thickness:var(--luzmo-border-width);--split-view-focus-color:var(--luzmo-primary-focus);--split-view-target-size:var(--luzmo-component-height-xs);--split-view-focus-offset:var(--luzmo-border-width);--split-view-focus-width:var(--luzmo-indicator-width,1px);--split-view-handle-color:var(--luzmo-font-color-extra-dimmed);--split-view-handle-length:var(--luzmo-component-height);--split-view-handle-thickness:var(--luzmo-spacing-2);--split-view-handle-radius:var(--luzmo-border-radius-full)}`,s=3840,c=10,l=50,u=50,d=0,f=class extends t.t{constructor(...e){super(...e),this.vertical=!1,this.collapsible=!1,this.label=`Resize panels`,this.primarySize=`50%`,this._primaryMin=0,this._primaryMax=s,this._secondaryMin=0,this._secondaryMax=s,this._resizable=!1,this._splitterPos=0,this._viewSize=0,this._minPos=0,this._maxPos=0,this._enoughChildren=!1,this._positionInitialized=!1,this._initialSplitterPosSupplied=!1,this._activePanes=[],this._restorePositionOnReconnect=!1,this._paneInlineStyles=new Map,this._dragChanged=!1}static get styles(){let e=super.styles;return[...Array.isArray(e)?e:e?[e]:[],(0,n.unsafeCSS)(o)]}set resizable(e){let t=!!e;if(t===this._resizable)return;let n=this._resizable;this._resizable=t,t||this._cancelDrag(),this.requestUpdate(`resizable`,n)}get resizable(){return this._resizable}set primaryMin(e){let t=this._normalizeBound(e,0);if(t===this._primaryMin)return;let n=this._primaryMin;this._primaryMin=t,this.requestUpdate(`primaryMin`,n)}get primaryMin(){return this._primaryMin}set primaryMax(e){let t=this._normalizeBound(e,s);if(t===this._primaryMax)return;let n=this._primaryMax;this._primaryMax=t,this.requestUpdate(`primaryMax`,n)}get primaryMax(){return this._primaryMax}set secondaryMin(e){let t=this._normalizeBound(e,0);if(t===this._secondaryMin)return;let n=this._secondaryMin;this._secondaryMin=t,this.requestUpdate(`secondaryMin`,n)}get secondaryMin(){return this._secondaryMin}set secondaryMax(e){let t=this._normalizeBound(e,s);if(t===this._secondaryMax)return;let n=this._secondaryMax;this._secondaryMax=t,this.requestUpdate(`secondaryMax`,n)}get secondaryMax(){return this._secondaryMax}set splitterPos(e){this._positionInitialized||(this._initialSplitterPosSupplied=!0);let t=Number.isFinite(e)?e:0,n=this.collapsible&&(t===0||t===this._viewSize),r=this._positionInitialized&&!n?this._clampPosition(t):t;if(r===this._splitterPos)return;let i=this._splitterPos;this._splitterPos=r,this.requestUpdate(`splitterPos`,i)}get splitterPos(){return this._splitterPos}get focusElement(){return this._separator??this}connectedCallback(){this._positionInitialized||(this._initialSplitterPosSupplied=this._initialSplitterPosSupplied||this.hasAttribute(`splitter-pos`)),super.connectedCallback(),typeof ResizeObserver<`u`&&(this._resizeObserver??=new ResizeObserver(()=>{this._recalculate(!1)}),this._resizeObserver.observe(this)),this.updateComplete.then(()=>{this.isConnected&&this.handleSlotChange()})}disconnectedCallback(){this._cancelDrag(!1),this._resizeObserver?.disconnect(),this._restorePaneStyles(),this._activePanes=[],this._restorePositionOnReconnect=!0,this._clearControlledElementId(),this._controlledElement=void 0,super.disconnectedCallback()}_normalizeBound(e,t){return Number.isFinite(e)&&e>=0?e:t}_measureView(){let e=this.getBoundingClientRect();return this.vertical?e.height:e.width}_calculateBounds(){this._viewSize=this._measureView();let e=i(this._viewSize,{primaryMin:this.primaryMin,primaryMax:this.primaryMax,secondaryMin:this.secondaryMin,secondaryMax:this.secondaryMax});this._minPos=e.min,this._maxPos=e.max}_clampPosition(e){return a(e,{min:this._minPos,max:this._maxPos})}_resolveInitialPosition(){let e=this.primarySize.trim();if(/^\d+(?:\.\d+)?(?:px)?$/.test(e))return Number.parseFloat(e);if(/^\d+(?:\.\d+)?%$/.test(e))return Number.parseFloat(e)/100*this._viewSize;if(e===`auto`&&this._controlledElement){let e=Number.parseFloat(this._controlledElement.style.getPropertyValue(this.vertical?`block-size`:`inline-size`));if(Number.isFinite(e)&&e>0)return e;let t=Number.parseFloat(getComputedStyle(this._controlledElement).getPropertyValue(this.vertical?`height`:`width`));if(Number.isFinite(t)&&t>0)return t;let n=this._controlledElement.getBoundingClientRect(),r=this.vertical?n.height:n.width;if(Number.isFinite(r)&&r>0)return r}return this._viewSize/2}_applyPaneSizes(){let[e,t]=this._activePanes,n=Math.round(this.splitterPos),r=Math.round(this._viewSize);e&&(e.style.flex=`0 0 ${n}px`,e.style.display=r>0&&n<=0?`none`:this._paneInlineStyles.get(e)?.display??``),t&&(t.style.flex=`1 1 0`,t.style.display=r>0&&n>=r?`none`:this._paneInlineStyles.get(t)?.display??``)}_restorePaneStyles(){for(let[e,t]of this._paneInlineStyles)e.style.display=t.display,e.style.flex=t.flex;this._paneInlineStyles.clear()}_setActivePanes(e){let t=e.slice(0,2),n=t.length!==this._activePanes.length||t.some((e,t)=>e!==this._activePanes[t]);if(n&&(this._restorePaneStyles(),this._activePanes=t),n||this._paneInlineStyles.size===0)for(let e of t)this._paneInlineStyles.set(e,{display:e.style.display,flex:e.style.flex});return n}_recalculate(e){if(!this.isConnected||!this._enoughChildren)return;let t=this._viewSize,n=this._positionInitialized&&this.collapsible&&this.splitterPos===0,r=this._positionInitialized&&this.collapsible&&t>0&&this.splitterPos===t;this._calculateBounds();let i;this._positionInitialized?i=e?this._resolveInitialPosition():n?0:r?this._viewSize:this._clampPosition(this.splitterPos):(i=this._initialSplitterPosSupplied?this.splitterPos:this._resolveInitialPosition(),this._positionInitialized=!0),this.splitterPos=i,this._applyPaneSizes()}_syncAriaControls(){this._separator&&this._controlledElement&&(this._separator.ariaControlsElements=[this._controlledElement])}_clearControlledElementId(){this._controlledElement&&this._controlledElement.id===this._controlledElementGeneratedId&&this._controlledElement.removeAttribute(`id`),this._controlledElementGeneratedId=void 0}handleSlotChange(){let e=this._paneSlot?.assignedElements()??[],t=this._setActivePanes(e),n=e[0];n!==this._controlledElement&&(this._clearControlledElementId(),this._controlledElement=n),this._controlledElement&&!this._controlledElement.id&&(d+=1,this._controlledElementGeneratedId=`luzmo-split-view-pane-${d}`,this._controlledElement.id=this._controlledElementGeneratedId);let r=this._enoughChildren,i=e.length>=2;if(i!==this._enoughChildren&&(this._enoughChildren=i,this.requestUpdate()),i){let e=!r||t&&!this._restorePositionOnReconnect;this._restorePositionOnReconnect=!1,this.updateComplete.then(()=>{this._recalculate(e),this._syncAriaControls()})}}_dispatchValueEvent(e){this.dispatchEvent(new Event(e,{bubbles:!0,composed:!0}))}_setPosition(e,t={}){let n=this._clampPosition(e);return this.collapsible&&t.collapse&&(e<=0&&(n=0),e>=this._viewSize&&(n=this._viewSize)),n!==this.splitterPos&&(this.splitterPos>0&&this.splitterPos<this._viewSize&&(this._lastExpandedPosition=this.splitterPos),this.splitterPos=n,this._applyPaneSizes(),(t.emit??!0)&&this._dispatchValueEvent(`input`),!0)}handleKeydown(e){if(!this.resizable||this.disabled)return;let t;switch(e.key){case`ArrowLeft`:this.vertical||(t=this.splitterPos+(this.isLTR?-10:c));break;case`ArrowRight`:this.vertical||(t=this.splitterPos+(this.isLTR?c:-10));break;case`ArrowUp`:this.vertical&&(t=this.splitterPos-c);break;case`ArrowDown`:this.vertical&&(t=this.splitterPos+c);break;case`PageUp`:t=this.splitterPos+(this.vertical?-50:l);break;case`PageDown`:t=this.splitterPos+(this.vertical?l:-50);break;case`Home`:t=this.collapsible?0:this._minPos;break;case`End`:t=this.collapsible?this._viewSize:this._maxPos;break;case`Enter`:if(!this.collapsible)return;t=this.splitterPos===0?this._lastExpandedPosition??this._viewSize/2:0;break;default:return}t!==void 0&&(e.preventDefault(),this._setPosition(t,{collapse:!0})&&this._dispatchValueEvent(`change`))}_capturePointer(e,t){try{e.setPointerCapture(t),this._capturedPointer={target:e,pointerId:t}}catch{this._capturedPointer=void 0}}_releasePointer(){let e=this._capturedPointer;this._capturedPointer=void 0,e?.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}handlePointerDown(e){this.resizable&&!this.disabled&&e.button===0&&this._dragStartPosition===void 0&&(this._dragPointerId=e.pointerId,this._dragStartPosition=this.splitterPos,this._dragChanged=!1,this.toggleAttribute(`dragging`,!0),this._capturePointer(e.currentTarget,e.pointerId))}_pointerPosition(e){let t=this.getBoundingClientRect();return this.vertical?e.clientY-t.top:this.isLTR?e.clientX-t.left:t.right-e.clientX}handlePointerMove(e){if(this._dragPointerId!==e.pointerId||this._dragStartPosition===void 0||!this.resizable||this.disabled)return;let t=this._pointerPosition(e);this.collapsible&&t<this._minPos-u&&(t=0),this.collapsible&&t>this._maxPos+u&&(t=this._viewSize),this._setPosition(t,{collapse:!0})&&(this._dragChanged=!0)}_finishDrag(){this._dragPointerId=void 0,this._releasePointer(),this._dragStartPosition=void 0,this._dragChanged=!1,this.toggleAttribute(`dragging`,!1)}handlePointerUp(e){if(this._dragPointerId!==e.pointerId||this._dragStartPosition===void 0)return;let t=this._dragChanged;this._finishDrag(),t&&this._dispatchValueEvent(`change`)}_cancelDrag(e=!0){if(this._dragStartPosition===void 0)return;let t=this._dragStartPosition,n=this._dragChanged;this._finishDrag(),e&&n&&this._setPosition(t,{collapse:!0})}handlePointerCancel(e){this._dragPointerId===e.pointerId&&this._cancelDrag()}render(){return n.html`
|
|
19
|
-
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
20
|
-
${this._enoughChildren?n.html`
|
|
21
|
-
<div
|
|
22
|
-
class="separator ${this.splitterPos<=0?`start-edge`:this._viewSize>0&&this.splitterPos>=this._viewSize?`end-edge`:``}"
|
|
23
|
-
role="separator"
|
|
24
|
-
aria-label=${this.label}
|
|
25
|
-
aria-disabled=${this.resizable?this.disabled?`true`:`false`:n.nothing}
|
|
26
|
-
aria-orientation=${this.vertical?`horizontal`:`vertical`}
|
|
27
|
-
aria-valuemin=${this.resizable?this._positionAsPercentage(this.collapsible?0:this._minPos):n.nothing}
|
|
28
|
-
aria-valuemax=${this.resizable?this._positionAsPercentage(this.collapsible?this._viewSize:this._maxPos):n.nothing}
|
|
29
|
-
aria-valuenow=${this.resizable?this._positionAsPercentage(this.splitterPos):n.nothing}
|
|
30
|
-
tabindex=${this.resizable?this.disabled?`-1`:`0`:n.nothing}
|
|
31
|
-
style=${`--splitter-position: ${this.splitterPos}`}
|
|
32
|
-
@keydown=${this.handleKeydown}
|
|
33
|
-
@pointerdown=${this.handlePointerDown}
|
|
34
|
-
@pointermove=${this.handlePointerMove}
|
|
35
|
-
@pointerup=${this.handlePointerUp}
|
|
36
|
-
@pointercancel=${this.handlePointerCancel}
|
|
37
|
-
@lostpointercapture=${this.handlePointerCancel}
|
|
38
|
-
>
|
|
39
|
-
<span class="divider" aria-hidden="true"></span>
|
|
40
|
-
<span class="handle" aria-hidden="true"></span>
|
|
41
|
-
</div>
|
|
42
|
-
`:n.nothing}
|
|
43
|
-
`}_positionAsPercentage(e){return String(this._viewSize>0?Math.round(e/this._viewSize*100):0)}willUpdate(e){super.willUpdate(e),(e.has(`vertical`)||e.has(`primaryMin`)||e.has(`primaryMax`)||e.has(`secondaryMin`)||e.has(`secondaryMax`)||e.has(`collapsible`))&&this._recalculate(!1),e.has(`primarySize`)&&this._recalculate(!0)}updated(e){super.updated(e),e.has(`splitterPos`)&&this._applyPaneSizes(),this._syncAriaControls(),e.has(`disabled`)&&this.disabled&&this._cancelDrag()}};e.t([(0,r.property)({type:Boolean,reflect:!0})],f.prototype,`vertical`,void 0),e.t([(0,r.property)({type:Boolean,reflect:!0})],f.prototype,`resizable`,null),e.t([(0,r.property)({type:Boolean,reflect:!0})],f.prototype,`collapsible`,void 0),e.t([(0,r.property)({type:String,reflect:!0})],f.prototype,`label`,void 0),e.t([(0,r.property)({type:Number,reflect:!0,attribute:`primary-min`})],f.prototype,`primaryMin`,null),e.t([(0,r.property)({type:Number,reflect:!0,attribute:`primary-max`})],f.prototype,`primaryMax`,null),e.t([(0,r.property)({type:Number,reflect:!0,attribute:`secondary-min`})],f.prototype,`secondaryMin`,null),e.t([(0,r.property)({type:Number,reflect:!0,attribute:`secondary-max`})],f.prototype,`secondaryMax`,null),e.t([(0,r.property)({type:String,reflect:!0,attribute:`primary-size`})],f.prototype,`primarySize`,void 0),e.t([(0,r.property)({type:Number,reflect:!0,attribute:`splitter-pos`})],f.prototype,`splitterPos`,null),e.t([(0,r.query)(`slot`)],f.prototype,`_paneSlot`,void 0),e.t([(0,r.query)(`[role="separator"]`)],f.prototype,`_separator`,void 0),typeof customElements<`u`&&!customElements.get(`luzmo-split-view`)&&customElements.define(`luzmo-split-view`,f),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import"../tokens.js";import{c as e,y as t}from"./lit-DWANyjiY.js";import{g as n,i as r,l as i,u as a,y as o}from"./lucero-runtime-DMlHjBe_.js";import{t as s}from"./language-resolution-BwIkGyuH.js";import{a as c,t as l}from"./platform-wNs7qaiE.js";import"./color-handle-DO7dxFGx.js";import{n as u,t as d}from"./interaction-BQyflxg-.js";import{t as f}from"./color-controller-BlFueK6Y.js";import{t as p}from"./streaming-listener-0FSzb9QY.js";var m=`@media (forced-colors:active){:host{--highcontrast-color-area-border-color-disabled:GrayText;--highcontrast-color-area-border-color:Canvas;--highcontrast-color-area-fill-color-disabled:Canvas}.gradient,:host([disabled]){forced-color-adjust:none}}:host{cursor:default;-webkit-user-select:none;user-select:none;min-inline-size:var(--luzmo-color-area-min-width,64px);min-block-size:var(--luzmo-color-area-min-height,64px);inline-size:var(--luzmo-color-area-width,192px);block-size:var(--luzmo-color-area-height,192px);box-sizing:border-box;border-radius:var(--luzmo-color-area-border-radius,var(--luzmo-border-radius-s));display:inline-block;position:relative;border:var(--luzmo-color-area-border-width,var(--luzmo-border-width)) solid var(--highcontrast-color-area-border-color,var(--luzmo-color-area-border-color,var(--luzmo-border-color)))!important}:host([focused]){z-index:1}:host([disabled]){pointer-events:none;background:var(--highcontrast-color-area-fill-color-disabled,var(--luzmo-color-area-disabled-background-color,var(--luzmo-dimmed-color)));border:var(--luzmo-color-area-border-width,var(--luzmo-border-width)) solid var(--highcontrast-color-area-border-color-disabled)!important}:host([disabled]) .gradient{display:none}.handle{transform:translate(calc(var(--luzmo-color-area-width,192px) - var(--luzmo-border-width)));inset-block-start:0}:host([dir=rtl]) .handle{inset-inline-end:0}.handle: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)){inset-inline-end:0}.gradient{border-radius:var(--luzmo-color-area-border-radius,var(--luzmo-border-radius-s));block-size:100%;inline-size:100%}.slider{opacity:0;z-index:0;pointer-events:none;block-size:100%;inline-size:100%;margin:0;position:absolute;inset-block-start:0;inset-inline-start:0}:host{touch-action:none}:host:before{pointer-events:none}.gradient{overflow:hidden}.handle{transform:translate(var(--luzmo-color-area-default-width), 0)}::slotted(*){width:100%;height:100%}:host([dir=rtl]) .gradient{transform:scaleX(-1)}.slider[orient=vertical]{appearance:slider-vertical}.slider:focus{z-index:1}.fieldset{border:0;margin:0;padding:0}`,h=class extends a{constructor(...e){super(...e),this.disabled=!1,this.focused=!1,this.labelX=`saturation`,this.labelY=`luminosity`,this.isLTR=!0,this.languageResolver=new s(this),this.colorController=new f(this,{manageAs:`hsv`}),this._interaction=new d(this,{value:()=>[this.x,this.y],isEqual:(e,t)=>e[0]===t[0]&&e[1]===t[1]}),this.activeAxis=`x`,this.step=.01,this.altered=0,this.activeKeys=/* @__PURE__ */ new Set,this._valueChanged=!1,this._pointerDown=!1,this.resizeRafId=0,this.handleResize=e=>{let t=e.at(-1);t&&(this.resizeRafId&&cancelAnimationFrame(this.resizeRafId),this.resizeRafId=requestAnimationFrame(()=>{this.resizeRafId=0,this.boundingClientRect=t.contentRect,this.requestUpdate()}))}}static get styles(){return[t(m)]}get hue(){return this.colorController.hue}set hue(e){this.colorController.hue=e}get value(){return this.colorController.colorValue}get color(){return this.colorController.colorValue}set color(e){this.colorController.color=e}get x(){return this.colorController.color.hsv.s/100}set x(e){if(e===this.x)return;let t=this.x;this.inputX?(this.inputX.value=e.toString(),this.colorController.color.set(`s`,this.inputX.valueAsNumber*100)):this.colorController.color.set(`s`,e*100),this.requestUpdate(`x`,t)}get y(){return this.colorController.color.hsv.v/100}set y(e){if(e===this.y)return;let t=this.y;this.inputY&&(this.inputY.value=e.toString(),this.colorController.color.set(`v`,this.inputY.valueAsNumber*100)),this.requestUpdate(`y`,t)}focus(e={}){super.focus(e),this.forwardFocus()}forwardFocus(){this.activeAxis===`x`?this.inputX.focus():this.inputY.focus()}handleFocus(){this.focused=!0,this._valueChanged=!1}handleBlur(){this.activeKeys.clear(),this._interaction.endKeyboard(),!this._pointerDown&&(this.altered=0,this.focused=!1,this._valueChanged=!1)}handleKeydown(e){let{code:t}=e;if(this.focused=!0,this.altered=[e.shiftKey,e.ctrlKey,e.altKey].filter(e=>!!e).length,t.search(`Arrow`)===0||t.search(`Page`)===0||t.search(`Home`)===0||t.search(`End`)===0){if(e.preventDefault(),this.disabled||!this._interaction.keyDown(t))return;if(this.disabled){this._interaction.end();return}this.activeKeys.add(t),this.handleKeypress()}}handleKeypress(){let e=0,t=0,n=Math.max(this.step,this.altered*5*this.step);this.activeKeys.forEach(r=>{switch(r){case`ArrowUp`:t=n;break;case`ArrowDown`:t=n*-1;break;case`ArrowLeft`:e=this.step*(this.isLTR?-1:1);break;case`ArrowRight`:e=this.step*(this.isLTR?1:-1);break;case`PageUp`:t=n*10;break;case`PageDown`:t=n*-10;break;case`Home`:e=n*(this.isLTR?-10:10);break;case`End`:e=n*(this.isLTR?10:-10)}}),e===0?t!==0&&(this.activeAxis=`y`,this.inputY.focus()):(this.activeAxis=`x`,this.inputX.focus()),this.x=Math.min(1,Math.max(this.x+e,0)),this.y=Math.min(1,Math.max(this.y+t,0)),this.colorController.savePreviousColor(),(e!==0||t!==0)&&(this._valueChanged=!0,this._interaction.commit(()=>this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),()=>{this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0,cancelable:!0}))||this.colorController.restorePreviousColor()}))}handleKeyup(e){e.preventDefault();let{code:t}=e;this.activeKeys.delete(t),this._interaction.keyUp(t)}handleInput(e){let{valueAsNumber:t,name:n}=e.target;this[n]=t}handleChange(e){this.handleInput(e),this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0,cancelable:!0}))}handlePointerdown(e){if(e.button!==0||!this._interaction.start(u(e))){e.preventDefault();return}if(this.disabled){this._interaction.end(),e.preventDefault();return}this._pointerDown=!0,this.colorController.savePreviousColor(),this.boundingClientRect=this.getBoundingClientRect();let t=e.target;try{t.setPointerCapture(e.pointerId),this._capturedPointer={target:t,pointerId:e.pointerId}}catch{}e.pointerType===`mouse`&&(this.focused=!0)}handlePointermove(e){if(!this._pointerDown)return;let[t,n]=this.calculateHandlePosition(e);this._valueChanged=!1,this.x=t,this.y=n,this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0,cancelable:!0}))}handlePointerup(e){e.preventDefault(),this._pointerDown&&this._finishPointer(()=>{this.inputX.focus(),e.pointerType===`mouse`&&(this.focused=!1)})}_finishPointer(e){this._pointerDown=!1;let t=this._capturedPointer;this._capturedPointer=void 0,t?.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId);let n=this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0,cancelable:!0}));e?.(),n||this.colorController.restorePreviousColor(),this._interaction.end()}endInteraction(){this._pointerDown?this._finishPointer():(this.activeKeys.clear(),this._interaction.end())}calculateHandlePosition(e){
|
|
3
|
-
/* c8 ignore next 3 */
|
|
4
|
-
if(!this.boundingClientRect)return[this.x,this.y];let t=this.boundingClientRect,n=t.left,r=t.top,i=e.clientX,a=e.clientY,o=t.width,s=t.height,c=Math.max(0,Math.min(1,(i-n)/o)),l=Math.max(0,Math.min(1,(a-r)/s));return[this.isLTR?c:1-c,1-l]}handleAreaPointerdown(e){e.button===0&&(e.stopPropagation(),e.preventDefault(),this.handle.dispatchEvent(new PointerEvent(`pointerdown`,e)),this.handlePointermove(e))}render(){let{width:t=0,height:n=0}=this.boundingClientRect||{},i=l()||c(),a=`Color Picker`,o=r(i?void 0:`2d slider`),s=this.labelX,u=this.labelY,d=new Intl.NumberFormat(this.languageResolver.language,{style:`percent`,unitDisplay:`narrow`}).format(this.x),f=new Intl.NumberFormat(this.languageResolver.language,{style:`percent`,unitDisplay:`narrow`}).format(this.y),m={background:`linear-gradient(to top, black 0%, hsla(${this.hue}, 100%, 0.01%, 0) 100%),linear-gradient(to right, white 0%, hsla(${this.hue}, 100%, 0.01%, 0) 100%), hsl(${this.hue}, 100%, 50%);`};return e`
|
|
5
|
-
<div
|
|
6
|
-
@pointerdown=${this.handleAreaPointerdown}
|
|
7
|
-
class="gradient"
|
|
8
|
-
style="background: ${m.background}"
|
|
9
|
-
>
|
|
10
|
-
<slot name="gradient"></slot>
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<luzmo-color-handle
|
|
14
|
-
tabindex=${r(this.focused?void 0:`0`)}
|
|
15
|
-
@focus=${this.forwardFocus}
|
|
16
|
-
?focused=${this.focused}
|
|
17
|
-
class="handle"
|
|
18
|
-
color=${this.colorController.getHslString()}
|
|
19
|
-
?disabled=${this.disabled}
|
|
20
|
-
style=${`transform: translate(${(this.isLTR?this.x:1-this.x)*t}px, ${n-this.y*n}px);`}
|
|
21
|
-
${p({start:[`pointerdown`,this.handlePointerdown],streamInside:[`pointermove`,this.handlePointermove],end:[[`pointerup`,`pointercancel`,`pointerleave`,`lostpointercapture`],this.handlePointerup]})}
|
|
22
|
-
></luzmo-color-handle>
|
|
23
|
-
|
|
24
|
-
<fieldset
|
|
25
|
-
class="fieldset"
|
|
26
|
-
aria-label=${r(i?a:void 0)}
|
|
27
|
-
>
|
|
28
|
-
<div role="presentation">
|
|
29
|
-
<input
|
|
30
|
-
type="range"
|
|
31
|
-
class="slider"
|
|
32
|
-
name="x"
|
|
33
|
-
aria-label=${i?s:`${s} ${a}`}
|
|
34
|
-
aria-roledescription=${o}
|
|
35
|
-
aria-orientation="horizontal"
|
|
36
|
-
aria-valuetext=${i?d:`${d}, ${s}${this._valueChanged?``:`, ${f}, ${u}`}`}
|
|
37
|
-
min="0"
|
|
38
|
-
max="1"
|
|
39
|
-
step=${this.step}
|
|
40
|
-
tabindex="-1"
|
|
41
|
-
.value=${String(this.x)}
|
|
42
|
-
@input=${this.handleInput}
|
|
43
|
-
@change=${this.handleChange}
|
|
44
|
-
/>
|
|
45
|
-
</div>
|
|
46
|
-
<div role="presentation">
|
|
47
|
-
<input
|
|
48
|
-
type="range"
|
|
49
|
-
class="slider"
|
|
50
|
-
name="y"
|
|
51
|
-
aria-label=${i?u:`${u} ${a}`}
|
|
52
|
-
aria-roledescription=${o}
|
|
53
|
-
aria-orientation="vertical"
|
|
54
|
-
aria-valuetext=${i?f:`${f}, ${u}${this._valueChanged?``:`, ${d}, ${s}`}`}
|
|
55
|
-
orient="vertical"
|
|
56
|
-
min="0"
|
|
57
|
-
max="1"
|
|
58
|
-
step=${this.step}
|
|
59
|
-
tabindex="-1"
|
|
60
|
-
.value=${String(this.y)}
|
|
61
|
-
@input=${this.handleInput}
|
|
62
|
-
@change=${this.handleChange}
|
|
63
|
-
/>
|
|
64
|
-
</div>
|
|
65
|
-
</fieldset>
|
|
66
|
-
`}firstUpdated(e){super.firstUpdated(e),this.boundingClientRect=this.getBoundingClientRect(),this.addEventListener(`focus`,this.handleFocus),this.addEventListener(`blur`,this.handleBlur),this.addEventListener(`keyup`,this.handleKeyup),this.addEventListener(`keydown`,this.handleKeydown)}updated(e){if(super.updated(e),this.x!==this.inputX.valueAsNumber&&this.colorController.color.set(`s`,this.inputX.valueAsNumber*100),this.y!==this.inputY.valueAsNumber&&this.colorController.color.set(`v`,(1-this.inputY.valueAsNumber)*100),e.has(`focused`)&&this.focused){let e=this.inputX.parentElement,t=this.inputY.parentElement;if(!e.shadowRoot&&!t.shadowRoot){e.attachShadow({mode:`open`}),t.attachShadow({mode:`open`});let n=`<div tabindex="-1"><slot></slot></div>`;e.shadowRoot.innerHTML=n,t.shadowRoot.innerHTML=n}}}connectedCallback(){super.connectedCallback(),!this.observer&&window.ResizeObserver&&(this.observer=new window.ResizeObserver(this.handleResize)),this.observer?.observe(this)}disconnectedCallback(){this._pointerDown=!1,this._capturedPointer=void 0,this.activeKeys.clear(),this.resizeRafId&&=(cancelAnimationFrame(this.resizeRafId),0),this.observer?.disconnect(),this.observer=void 0,super.disconnectedCallback()}};i([o({type:String,reflect:!0})],h.prototype,`dir`,void 0),i([o({type:Boolean,reflect:!0})],h.prototype,`disabled`,void 0),i([o({type:Boolean,reflect:!0})],h.prototype,`focused`,void 0),i([o({type:String,attribute:`label-x`})],h.prototype,`labelX`,void 0),i([o({type:String,attribute:`label-y`})],h.prototype,`labelY`,void 0),i([o({type:Boolean,attribute:`is-ltr`})],h.prototype,`isLTR`,void 0),i([n(`.handle`)],h.prototype,`handle`,void 0),i([o({type:Number})],h.prototype,`hue`,null),i([o({type:String})],h.prototype,`value`,null),i([o({type:String})],h.prototype,`color`,null),i([o({attribute:!1})],h.prototype,`activeAxis`,void 0),i([o({type:Number})],h.prototype,`x`,null),i([o({type:Number})],h.prototype,`y`,null),i([o({type:Number})],h.prototype,`step`,void 0),i([n(`[name="x"]`)],h.prototype,`inputX`,void 0),i([n(`[name="y"]`)],h.prototype,`inputY`,void 0),customElements.get(`luzmo-color-area`)||customElements.define(`luzmo-color-area`,h);export{h as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import"../tokens.js";import{c as e,y as t}from"./lit-DWANyjiY.js";import{i as n,l as r,u as i,y as a}from"./lucero-runtime-DMlHjBe_.js";import{t as o}from"./luzmo-icon-markup-DaKoHMY8.js";var s=`:host{pointer-events:none;transform:none;transform:var(--luzmo-icon-transform,none);block-size:var(--luzmo-icon-block-size,var(--luzmo-icon-size,var(--icon-size)));font-size:var(--luzmo-icon-block-size,var(--luzmo-icon-size,var(--icon-size)));color:var(--luzmo-icon-color,inherit);fill:currentColor;text-align:center;display:inline-block}::slotted(svg),:host(:not([block])) svg,:host(:not([block])) img{vertical-align:var(--luzmo-icon-vertical-align,-.125em)!important}:host([block]){--icon-vertical-align:top;vertical-align:top;display:flex}:host([block]) ::slotted(svg),:host([block]) svg,:host([block]) img{--icon-vertical-align:top;vertical-align:var(--luzmo-icon-vertical-align,top)}:host([size=xxs]){--icon-size:var(--luzmo-icon-size-xxs)}:host([size=xs]){--icon-size:var(--luzmo-icon-size-xs)}:host([size=s]){--icon-size:var(--luzmo-icon-size-s)}:host,:host([size=m]){--icon-size:var(--luzmo-icon-size-m)}:host([size=l]){--icon-size:var(--luzmo-icon-size-l)}:host([size=xl]){--icon-size:var(--luzmo-icon-size-xl)}:host([size=xxl]){--icon-size:var(--luzmo-icon-size-xxl)}:host(:not(:root)){overflow:visible}@media (forced-colors:active){:host{forced-color-adjust:auto}}img{object-fit:var(--luzmo-icon-img-object-fit,var(--icon-img-object-fit,fill));object-position:var(--luzmo-icon-img-object-position,var(--icon-img-object-position,50% 50%));width:100%}img,svg,::slotted(*){vertical-align:top;height:100%;color:inherit}@media (forced-colors:active){img,svg,::slotted(*){forced-color-adjust:auto}}`,c=class extends i{constructor(...e){super(...e),this.label=``}static get styles(){return[t(s)]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}update(e){e.has(`label`)&&(this.label?this.removeAttribute(`aria-hidden`):this.setAttribute(`aria-hidden`,`true`)),super.update(e)}render(){return e` <slot></slot> `}};r([a({reflect:!0})],c.prototype,`label`,void 0),r([a({reflect:!0})],c.prototype,`size`,void 0);var l=class extends c{constructor(...e){super(...e),this.block=!1}render(){return this.icon?o(this.icon,this.options):this.src?e` <img src=${this.src} alt=${n(this.label)} /> `:super.render()}};r([a()],l.prototype,`src`,void 0),r([a()],l.prototype,`options`,void 0),r([a()],l.prototype,`icon`,void 0),r([a({type:Boolean,reflect:!0})],l.prototype,`block`,void 0),typeof customElements<`u`&&!customElements.get(`luzmo-icon`)&&customElements.define(`luzmo-icon`,l);export{l as t};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{t as e}from"./rolldown-runtime-DWK5is8u.js";import{c as t,d as n,f as r,i,n as a}from"./lit-DWANyjiY.js";var o=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},s={attribute:!0,type:String,converter:r,reflect:!1,hasChanged:n},c=(e=s,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=/* @__PURE__ */ new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function l(e){return(t,n)=>typeof n==`object`?c(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function u(e){return l({...e,state:!0,attribute:!1})}function d(e){return(t,n)=>{let r=typeof t==`function`?t:t[n];Object.assign(r,e)}}var f=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function p(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return f(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return f(n,r,{get(){return a(this)}})}}var m;function h(e){return(t,n)=>f(t,n,{get(){return(this.renderRoot??(m??=document.createDocumentFragment())).querySelectorAll(e)}})}function g(e){return(t,n)=>f(t,n,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}function _(e){return(t,n)=>{let{slot:r,selector:i}=e??{},a=`slot`+(r?`[name=${r}]`:`:not([name])`);return f(t,n,{get(){let t=(this.renderRoot?.querySelector(a))?.assignedElements(e)??[];return i===void 0?t:t.filter(e=>e.matches(i))}})}}function v(e){return(t,n)=>{let{slot:r}=e??{},i=`slot`+(r?`[name=${r}]`:`:not([name])`);return f(t,n,{get(){return(this.renderRoot?.querySelector(i))?.assignedNodes(e)??[]}})}}var y=/* @__PURE__ */ new Set,b=()=>{if(typeof document>`u`)return;let e=document.documentElement.dir===`rtl`?document.documentElement.dir:`ltr`;y.forEach(t=>{t.setAttribute(`dir`,e)})},x=null;typeof document<`u`&&(x=new MutationObserver(b),x.observe(document.documentElement,{attributes:!0,attributeFilter:[`dir`]}));var S=e=>e.startManagingContentDirection!==void 0||e.tagName===`LUZMO-THEME`;function C(e){class t extends e{get isLTR(){return this.dir===`ltr`}hasVisibleFocusInTree(){if(typeof document>`u`)return!1;let e=((e=document)=>{let t=e.activeElement;for(;t?.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;let n=t?[t]:[];for(;t;){let e=t.assignedSlot||t.parentElement||t.getRootNode()?.host;e&&n.push(e),t=e}return n})(this.getRootNode())[0];if(!e)return!1;try{return e.matches(`:focus-visible`)||e.matches(`.focus-visible`)}catch{return e.matches(`.focus-visible`)}}connectedCallback(){if(typeof document>`u`)super.connectedCallback();else{if(!this.hasAttribute(`dir`)){let e=this.assignedSlot||this.parentNode;for(;e!==document?.documentElement&&!S(e);)e=e.assignedSlot||e.parentNode||e.host;if(this.dir=e.dir===`rtl`?e.dir:this.dir||`ltr`,e===document?.documentElement)y.add(this);else{let{localName:t}=e;t.search(`-`)>-1&&typeof customElements<`u`&&!customElements.get(t)?
|
|
3
|
-
/* c8 ignore next 5 */
|
|
4
|
-
customElements.whenDefined(t).then(()=>{e.startManagingContentDirection(this)}):e.startManagingContentDirection(this)}this._dirParent=e}super.connectedCallback()}}disconnectedCallback(){super.disconnectedCallback(),this._dirParent&&(this._dirParent===document?.documentElement?y.delete(this):typeof this._dirParent.stopManagingContentDirection==`function`&&this._dirParent.stopManagingContentDirection(this),this.removeAttribute(`dir`))}}return t}var w=class extends C(a){};function T(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var E={xxs:`xxs`,xs:`xs`,s:`s`,m:`m`,l:`l`,xl:`xl`,xxl:`xxl`};function D(e,{validSizes:t=[`s`,`m`,`l`,`xl`],noDefaultSize:n,defaultSize:r=`m`}={}){class i extends e{constructor(...e){super(...e),this._size=r}get size(){return this._size||r}set size(e){let i=n?null:r,a=e&&e.toLocaleLowerCase(),o=t.includes(a)?a:i;if(o&&this.setAttribute(`size`,o),this._size===o)return;let s=this._size;this._size=o,this.requestUpdate(`size`,s)}update(e){!this.hasAttribute(`size`)&&!n&&this.setAttribute(`size`,this.size),super.update(e)}}return T([l({type:String})],i.prototype,`size`,null),i}var O=/* @__PURE__ */ e({FocusVisiblePolyfillMixin:()=>A}),k=!0;try{typeof document<`u`&&document.body.querySelector(`:focus-visible`)}catch{k=!1,Promise.resolve().then(()=>O)}var A=e=>{let t=e=>{if(e.shadowRoot==null||Object.hasOwn(e.dataset,`jsFocusVisible`))return()=>{};if(self.applyFocusVisiblePolyfill)self.applyFocusVisiblePolyfill(e.shadowRoot),e.manageAutoFocus&&e.manageAutoFocus();else{let t=()=>{self.applyFocusVisiblePolyfill&&e.shadowRoot&&self.applyFocusVisiblePolyfill(e.shadowRoot),e.manageAutoFocus&&e.manageAutoFocus()};return self.addEventListener(`focus-visible-polyfill-ready`,t,{once:!0}),()=>{self.removeEventListener(`focus-visible-polyfill-ready`,t)}}return()=>{}},n=Symbol(`endPolyfillCoordination`);class r extends e{constructor(...e){super(...e),this[n]=null}connectedCallback(){super.connectedCallback&&super.connectedCallback(),k||requestAnimationFrame(()=>{this[n]??(this[n]=t(this))})}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),k||requestAnimationFrame(()=>{this[n]!=null&&(this[n](),this[n]=null)})}}return r};function j(){return new Promise(e=>requestAnimationFrame(()=>e()))}var M=class extends A(w){constructor(...e){super(...e),this.disabled=!1,this.autofocus=!1,this._tabIndex=0,this.manipulatingTabindex=!1,this.autofocusReady=Promise.resolve()}get tabIndex(){if(this.focusElement===this){let e=this.hasAttribute(`tabindex`)?Number(this.getAttribute(`tabindex`)):NaN;return Number.isNaN(e)?-1:e}let e=Number.parseFloat(this.hasAttribute(`tabindex`)&&this.getAttribute(`tabindex`)||`0`);return this.disabled||e<0?-1:this.focusElement?this._tabIndex:e}set tabIndex(e){if(this.manipulatingTabindex)this.manipulatingTabindex=!1;else if(this.focusElement===this){if(this.disabled)this._tabIndex=e;else if(e!==this._tabIndex){this._tabIndex=e;let t=``+e;this.manipulatingTabindex=!0,this.setAttribute(`tabindex`,t)}}else if(e===-1?this.addEventListener(`pointerdown`,this.onPointerdownManagementOfTabIndex):(this.manipulatingTabindex=!0,this.removeEventListener(`pointerdown`,this.onPointerdownManagementOfTabIndex)),e===-1||this.disabled){if(this.manipulatingTabindex=!0,this.setAttribute(`tabindex`,`-1`),this.removeAttribute(`focusable`),this.selfManageFocusElement)return;e===-1?this.focusElement?.removeAttribute(`tabindex`):(this._tabIndex=e,this.manageFocusElementTabindex(e))}else this.setAttribute(`focusable`,``),this.hasAttribute(`tabindex`)?this.removeAttribute(`tabindex`):this.manipulatingTabindex=!1,this._tabIndex=e,this.manageFocusElementTabindex(e)}onPointerdownManagementOfTabIndex(){this.tabIndex===-1&&setTimeout(()=>{this.tabIndex=0,this.focus({preventScroll:!0}),this.tabIndex=-1})}async manageFocusElementTabindex(e){this.focusElement||await this.updateComplete,e===null?this.focusElement.removeAttribute(`tabindex`):this.focusElement!==this&&(this.focusElement.tabIndex=e)}get focusElement(){throw Error(`Must implement focusElement getter!`)}get selfManageFocusElement(){return!1}focus(e){!this.disabled&&this.focusElement&&(this.focusElement===this?Reflect.apply(HTMLElement.prototype.focus,this,[e]):this.focusElement.focus(e))}blur(){let e=this.focusElement||this;e===this?HTMLElement.prototype.blur.apply(this):e.blur()}click(){if(this.disabled)return;let e=this.focusElement||this;e===this?HTMLElement.prototype.click.apply(this):e.click()}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent(`keydown`,{code:`Tab`})),this.focusElement.focus())}firstUpdated(e){super.firstUpdated(e),this.hasAttribute(`tabindex`)&&this.getAttribute(`tabindex`)===`-1`||this.setAttribute(`focusable`,``)}update(e){e.has(`disabled`)&&this.handleDisabledChanged(this.disabled,e.get(`disabled`)),super.update(e)}updated(e){super.updated(e),e.has(`disabled`)&&this.disabled&&this.blur()}async handleDisabledChanged(e,t){let n=()=>this.focusElement!==this&&this.focusElement.disabled!==void 0;e?(this.manipulatingTabindex=!0,this.setAttribute(`tabindex`,`-1`),await this.updateComplete,n()?this.focusElement.disabled=!0:this.setAttribute(`aria-disabled`,`true`)):t&&(this.manipulatingTabindex=!0,this.focusElement===this?this.setAttribute(`tabindex`,``+this._tabIndex):this.removeAttribute(`tabindex`),await this.updateComplete,n()?this.focusElement.disabled=!1:this.removeAttribute(`aria-disabled`))}async getUpdateComplete(){let e=await super.getUpdateComplete();return await this.autofocusReady,e}connectedCallback(){super.connectedCallback(),this.autofocus&&(this.autofocusReady=new Promise(async e=>{await j(),await j(),e()}),this.updateComplete.then(()=>{this.manageAutoFocus()}))}};T([l({type:Boolean,reflect:!0})],M.prototype,`disabled`,void 0),T([l({type:Boolean})],M.prototype,`autofocus`,void 0),T([l({type:Number})],M.prototype,`tabIndex`,null);var N=e=>e??i,P=class{constructor(e,{target:t,config:n,callback:r,skipInitial:i}){this.t=/* @__PURE__ */ new Set,this.o=!1,this.i=!1,this.h=e,t!==null&&this.t.add(t??e),this.l=n,this.o=i??this.o,this.callback=r,window.MutationObserver?(this.u=new MutationObserver(e=>{this.handleChanges(e),this.h.requestUpdate()}),e.addController(this)):console.warn(`MutationController error: browser does not support MutationObserver.`)}handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(let e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){let e=this.u.takeRecords();(e.length||!this.o&&this.i)&&this.handleChanges(e),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};function F(e){class n extends e{renderAnchor({id:e,className:n,ariaHidden:r,labelledby:i,tabindex:a,anchorContent:o=t`<slot></slot>`}){return t`
|
|
5
|
-
<a
|
|
6
|
-
id=${e}
|
|
7
|
-
class=${N(n)}
|
|
8
|
-
href=${N(this.href)}
|
|
9
|
-
download=${N(this.download)}
|
|
10
|
-
target=${N(this.target)}
|
|
11
|
-
aria-label=${N(this.label)}
|
|
12
|
-
aria-labelledby=${N(i)}
|
|
13
|
-
aria-hidden=${N(r?`true`:void 0)}
|
|
14
|
-
tabindex=${N(a)}
|
|
15
|
-
referrerpolicy=${N(this.referrerpolicy)}
|
|
16
|
-
rel=${N(this.rel)}
|
|
17
|
-
>${o}</a>
|
|
18
|
-
`}}return T([l()],n.prototype,`download`,void 0),T([l()],n.prototype,`label`,void 0),T([l()],n.prototype,`href`,void 0),T([l()],n.prototype,`target`,void 0),T([l()],n.prototype,`referrerpolicy`,void 0),T([l()],n.prototype,`rel`,void 0),n}function I(e,t,n=[]){let r=t?`slot[name="${t}"]`:`slot:not([name])`;class i extends e{constructor(...e){super(e),this.slotHasContent=!1,new P(this,{config:{characterData:!0,childList:!0,subtree:!0},callback:e=>{for(let t of e)if(t.type===`characterData`||t.type===`childList`){this.manageTextObservedSlot();return}}})}manageTextObservedSlot(){let e=this.renderRoot?.querySelector(r)??null;if(!e)return;let t=e.assignedNodes({flatten:!0}).filter(e=>{let t=e;return t.tagName?!n.some(e=>t.matches(e)):t.textContent?t.textContent.trim():!1});this.slotHasContent=t.length>0}update(e){if(!this.hasUpdated){let{childNodes:e}=this,r=[...e].filter(e=>{let r=e;return r.tagName?n.some(e=>r.matches(e))?!1:t?r.getAttribute(`slot`)===t:!r.hasAttribute(`slot`):r.textContent?r.textContent.trim():!1});this.slotHasContent=r.length>0}super.update(e)}firstUpdated(e){super.firstUpdated(e),this.updateComplete.then(()=>{this.manageTextObservedSlot()})}}return T([l({type:Boolean,attribute:!1})],i.prototype,`slotHasContent`,void 0),i}export{d as _,M as a,c as b,D as c,C as d,v as f,p as g,h,N as i,T as l,g as m,F as n,A as o,_ as p,P as r,E as s,I as t,w as u,u as v,o as x,l as y};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import"../tokens.js";import{c as e,y as t}from"./lit-DWANyjiY.js";import{c as n,g as r,i,l as a,u as o,y as s}from"./lucero-runtime-DMlHjBe_.js";import{t as c}from"./get-label-from-slot-Dfoiptqo.js";var l=`@media (forced-colors:active){:host{--highcontrast-progress-circle-fill-border-color:Highlight;--highcontrast-progress-circle-fill-border-color-over-background:Highlight}.track{--progress-circle-track-border-style:double}}:host{position:var(--luzmo-progress-circle-position,relative);direction:ltr;display:inline-block;position:relative;transform:translateZ(0)}:host,.track{inline-size:var(--luzmo-progress-circle-size,var(--progress-circle-size,32px));block-size:var(--luzmo-progress-circle-size,var(--progress-circle-size,32px))}.track{box-sizing:border-box;border-style:var(--highcontrast-progress-circle-track-border-style,var(--luzmo-progress-circle-track-border-style,var(--progress-circle-track-border-style,solid)));border-width:var(--luzmo-progress-circle-thickness,var(--progress-circle-thickness,2px));border-radius:var(--luzmo-progress-circle-size,var(--progress-circle-size,32px));border-color:var(--luzmo-progress-circle-track-border-color,var(--luzmo-border-color))}.fills{block-size:100%;inline-size:100%;position:absolute;inset-block-start:0;inset-inline-start:0}.fill{box-sizing:border-box;inline-size:var(--luzmo-progress-circle-size,var(--progress-circle-size,32px));block-size:var(--luzmo-progress-circle-size,var(--progress-circle-size,32px));border-style:solid;border-width:var(--luzmo-progress-circle-thickness,var(--progress-circle-thickness,3px));border-radius:var(--luzmo-progress-circle-size,var(--progress-circle-size,32px));border-color:var(--highcontrast-progress-circle-fill-border-color,var(--luzmo-progress-circle-fill-border-color,var(--luzmo-primary)))}:host([static-color=black]) .track{border-color:var(--luzmo-progress-circle-track-border-color-over-background,#00000040)}:host([static-color=black]) .fill{border-color:var(--highcontrast-progress-circle-fill-border-color-over-background,var(--luzmo-progress-circle-fill-border-color-over-background,#000))}:host([static-color=white]) .track{border-color:var(--luzmo-progress-circle-track-border-color-over-background,#ffffff26)}:host([static-color=white]) .fill{border-color:var(--highcontrast-progress-circle-fill-border-color-over-background,var(--luzmo-progress-circle-fill-border-color-over-background,#fff))}.fill-mask1,.fill-mask2{transform-origin:100%;block-size:100%;inline-size:50%;position:absolute;overflow:hidden;transform:rotate(180deg)}.fill-sub-mask1,.fill-sub-mask2{transform-origin:100%;block-size:100%;inline-size:100%;overflow:hidden;transform:rotate(-180deg)}.fill-mask2{transform:rotate(0)}:host([indeterminate]) .fills{will-change:transform;transform-origin:50%;animation:1s cubic-bezier(.25,.78,.48,.89) infinite luzmo-fills-rotate;transform:translateZ(0)}:host([indeterminate]) .fill-sub-mask1{will-change:transform;animation:1s linear infinite luzmo-fill-mask-1;transform:translateZ(0)}:host([indeterminate]) .fill-sub-mask2{will-change:transform;animation:1s linear infinite luzmo-fill-mask-2;transform:translateZ(0)}.fill-submask-2{animation:1s linear infinite luzmo-fill-mask-2}@keyframes luzmo-fill-mask-1{0%{transform:rotate(90deg)}1.69%{transform:rotate(72.3deg)}3.39%{transform:rotate(55.5deg)}5.08%{transform:rotate(40.3deg)}6.78%{transform:rotate(25deg)}8.47%{transform:rotate(10.6deg)}10.17%{transform:rotate(0)}11.86%{transform:rotate(0)}13.56%{transform:rotate(0)}15.25%{transform:rotate(0)}16.95%{transform:rotate(0)}18.64%{transform:rotate(0)}20.34%{transform:rotate(0)}22.03%{transform:rotate(0)}23.73%{transform:rotate(0)}25.42%{transform:rotate(0)}27.12%{transform:rotate(0)}28.81%{transform:rotate(0)}30.51%{transform:rotate(0)}32.2%{transform:rotate(0)}33.9%{transform:rotate(0)}35.59%{transform:rotate(0)}37.29%{transform:rotate(0)}38.98%{transform:rotate(0)}40.68%{transform:rotate(0)}42.37%{transform:rotate(5.3deg)}44.07%{transform:rotate(13.4deg)}45.76%{transform:rotate(20.6deg)}47.46%{transform:rotate(29deg)}49.15%{transform:rotate(36.5deg)}50.85%{transform:rotate(42.6deg)}52.54%{transform:rotate(48.8deg)}54.24%{transform:rotate(54.2deg)}55.93%{transform:rotate(59.4deg)}57.63%{transform:rotate(63.2deg)}59.32%{transform:rotate(67.2deg)}61.02%{transform:rotate(70.8deg)}62.71%{transform:rotate(73.8deg)}64.41%{transform:rotate(76.2deg)}66.1%{transform:rotate(78.7deg)}67.8%{transform:rotate(80.6deg)}69.49%{transform:rotate(82.6deg)}71.19%{transform:rotate(83.7deg)}72.88%{transform:rotate(85deg)}74.58%{transform:rotate(86.3deg)}76.27%{transform:rotate(87deg)}77.97%{transform:rotate(87.7deg)}79.66%{transform:rotate(88.3deg)}81.36%{transform:rotate(88.6deg)}83.05%{transform:rotate(89.2deg)}84.75%{transform:rotate(89.2deg)}86.44%{transform:rotate(89.5deg)}88.14%{transform:rotate(89.9deg)}89.83%{transform:rotate(89.7deg)}91.53%{transform:rotate(90.1deg)}93.22%{transform:rotate(90.2deg)}94.92%{transform:rotate(90.1deg)}96.61%{transform:rotate(90deg)}98.31%{transform:rotate(89.8deg)}to{transform:rotate(90deg)}}@keyframes luzmo-fill-mask-2{0%{transform:rotate(180deg)}1.69%{transform:rotate(180deg)}3.39%{transform:rotate(180deg)}5.08%{transform:rotate(180deg)}6.78%{transform:rotate(180deg)}8.47%{transform:rotate(180deg)}10.17%{transform:rotate(179.2deg)}11.86%{transform:rotate(164deg)}13.56%{transform:rotate(151.8deg)}15.25%{transform:rotate(140.8deg)}16.95%{transform:rotate(130.3deg)}18.64%{transform:rotate(120.4deg)}20.34%{transform:rotate(110.8deg)}22.03%{transform:rotate(101.6deg)}23.73%{transform:rotate(93.5deg)}25.42%{transform:rotate(85.4deg)}27.12%{transform:rotate(78.1deg)}28.81%{transform:rotate(71.2deg)}30.51%{transform:rotate(89.1deg)}32.2%{transform:rotate(105.5deg)}33.9%{transform:rotate(121.3deg)}35.59%{transform:rotate(135.5deg)}37.29%{transform:rotate(148.4deg)}38.98%{transform:rotate(161deg)}40.68%{transform:rotate(173.5deg)}42.37%{transform:rotate(180deg)}44.07%{transform:rotate(180deg)}45.76%{transform:rotate(180deg)}47.46%{transform:rotate(180deg)}49.15%{transform:rotate(180deg)}50.85%{transform:rotate(180deg)}52.54%{transform:rotate(180deg)}54.24%{transform:rotate(180deg)}55.93%{transform:rotate(180deg)}57.63%{transform:rotate(180deg)}59.32%{transform:rotate(180deg)}61.02%{transform:rotate(180deg)}62.71%{transform:rotate(180deg)}64.41%{transform:rotate(180deg)}66.1%{transform:rotate(180deg)}67.8%{transform:rotate(180deg)}69.49%{transform:rotate(180deg)}71.19%{transform:rotate(180deg)}72.88%{transform:rotate(180deg)}74.58%{transform:rotate(180deg)}76.27%{transform:rotate(180deg)}77.97%{transform:rotate(180deg)}79.66%{transform:rotate(180deg)}81.36%{transform:rotate(180deg)}83.05%{transform:rotate(180deg)}84.75%{transform:rotate(180deg)}86.44%{transform:rotate(180deg)}88.14%{transform:rotate(180deg)}89.83%{transform:rotate(180deg)}91.53%{transform:rotate(180deg)}93.22%{transform:rotate(180deg)}94.92%{transform:rotate(180deg)}96.61%{transform:rotate(180deg)}98.31%{transform:rotate(180deg)}to{transform:rotate(180deg)}}@keyframes luzmo-fills-rotate{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}:host([size=s]){--progress-circle-size:16px;--progress-circle-thickness:2px}:host([size=l]){--progress-circle-size:48px;--progress-circle-thickness:3px}:host([size=xl]){--progress-circle-size:64px;--progress-circle-thickness:4px}:host{block-size:var(--luzmo-progress-circle-size,var(--parent-element-progress-circle-size));inline-size:var(--luzmo-progress-circle-size,var(--parent-element-progress-circle-size));--progress-circle-size:inherit;--parent-element-progress-circle-size:var(--progress-circle-size,32px)}:host([size=s]){--parent-element-progress-circle-size:var(--progress-circle-size,16px)}:host([size=l]){--parent-element-progress-circle-size:var(--progress-circle-size,48px)}:host([size=xl]){--parent-element-progress-circle-size:var(--progress-circle-size,64px)}slot{display:none}.track,.fill{block-size:var(--luzmo-progress-circle-size,var(--parent-element-progress-circle-size));border-radius:var(--luzmo-progress-circle-size,var(--parent-element-progress-circle-size));inline-size:var(--luzmo-progress-circle-size,var(--parent-element-progress-circle-size))}:host([indeterminate]) .fills,:host([indeterminate]) .fill-sub-mask1,:host([indeterminate]) .fill-sub-mask2{animation-duration:var(--luzmo-progress-circle-animation-duration,1s)}`,u=class extends n(o,{validSizes:[`s`,`m`,`l`,`xl`]}){constructor(...e){super(...e),this.indeterminate=!1,this.label=``,this.progress=0}static get styles(){return[t(l)]}makeRotation(e){return this.indeterminate?void 0:`transform: rotate(${e}deg);`}render(){let t=[this.makeRotation(-180+180/50*Math.min(this.progress,50)),this.makeRotation(-180+180/50*Math.max(this.progress-50,0))];return e`
|
|
3
|
-
<slot @slotchange=${this.handleSlotchange}></slot>
|
|
4
|
-
<div class="track"></div>
|
|
5
|
-
<div class="fills">
|
|
6
|
-
${[`mask1`,`mask2`].map((n,r)=>e`
|
|
7
|
-
<div class="fill-${n}">
|
|
8
|
-
<div
|
|
9
|
-
class="fill-sub-${n}"
|
|
10
|
-
style=${i(t[r])}
|
|
11
|
-
>
|
|
12
|
-
<div class="fill"></div>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
`)}
|
|
16
|
-
</div>
|
|
17
|
-
`}handleSlotchange(){let e=c(this.label,this.slotEl);e&&(this.label=e)}firstUpdated(e){super.firstUpdated(e),this.hasAttribute(`role`)||this.setAttribute(`role`,`progressbar`)}updated(e){super.updated(e),!this.indeterminate&&e.has(`progress`)?this.setAttribute(`aria-valuenow`,``+this.progress):this.hasAttribute(`aria-valuenow`)&&this.removeAttribute(`aria-valuenow`),e.has(`label`)&&(this.label.length>0?this.setAttribute(`aria-label`,this.label):e.get(`label`)===this.getAttribute(`aria-label`)&&this.removeAttribute(`aria-label`))}};a([s({type:Boolean,reflect:!0})],u.prototype,`indeterminate`,void 0),a([s({type:String})],u.prototype,`label`,void 0),a([s({reflect:!0,attribute:`static-color`})],u.prototype,`staticColor`,void 0),a([s({type:Number})],u.prototype,`progress`,void 0),a([r(`slot`)],u.prototype,`slotEl`,void 0),typeof customElements<`u`&&!customElements.get(`luzmo-progress-circle`)&&customElements.define(`luzmo-progress-circle`,u);export{u as t};
|