@mhmo91/schmancy 0.10.37 → 0.10.39
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/custom-elements.json +39 -0
- package/dist/{SchmancyElement-CDT2q1lA.js → SchmancyElement-BNnyBOwk.js} +9 -7
- package/dist/{SchmancyElement-CDT2q1lA.js.map → SchmancyElement-BNnyBOwk.js.map} +1 -1
- package/dist/{SchmancyElement-BHfQg3Tj.cjs → SchmancyElement-C41uPa6l.cjs} +2 -2
- package/dist/{SchmancyElement-BHfQg3Tj.cjs.map → SchmancyElement-C41uPa6l.cjs.map} +1 -1
- package/dist/agent/schmancy.agent.js +2334 -2297
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/area-2FrTZI_T.cjs +21 -0
- package/dist/area-2FrTZI_T.cjs.map +1 -0
- package/dist/{area-KtULlxuA.js → area-KVDzhT4s.js} +4 -4
- package/dist/area-KVDzhT4s.js.map +1 -0
- package/dist/area.cjs +1 -1
- package/dist/area.js +2 -2
- package/dist/{audio-zIJVTo_V.js → audio-D3gnp15Y.js} +1 -1
- package/dist/{audio-zIJVTo_V.js.map → audio-D3gnp15Y.js.map} +1 -1
- package/dist/{audio-CUMAv9D_.cjs → audio-EaD0Ggfh.cjs} +1 -1
- package/dist/{audio-CUMAv9D_.cjs.map → audio-EaD0Ggfh.cjs.map} +1 -1
- package/dist/audio.cjs +1 -1
- package/dist/audio.js +2 -2
- package/dist/autocomplete-DMmxsvUe.cjs +115 -0
- package/dist/autocomplete-DMmxsvUe.cjs.map +1 -0
- package/dist/{autocomplete-DIScyo8Q.js → autocomplete-DWiEqlQf.js} +96 -96
- package/dist/autocomplete-DWiEqlQf.js.map +1 -0
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +3 -3
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-OBZ77exO.cjs → boat-DsFJNfPH.cjs} +1 -1
- package/dist/{boat-OBZ77exO.cjs.map → boat-DsFJNfPH.cjs.map} +1 -1
- package/dist/{boat-BHPqSqJd.js → boat-fqodYt2n.js} +4 -4
- package/dist/{boat-BHPqSqJd.js.map → boat-fqodYt2n.js.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +3 -3
- package/dist/breadcrumb.cjs.map +1 -1
- package/dist/breadcrumb.js +4 -4
- package/dist/breadcrumb.js.map +1 -1
- package/dist/{busy-BJNsKSCM.cjs → busy-Cj_PV7oC.cjs} +1 -1
- package/dist/{busy-BJNsKSCM.cjs.map → busy-Cj_PV7oC.cjs.map} +1 -1
- package/dist/{busy-Dut78y4L.js → busy-enYCTssB.js} +2 -2
- package/dist/{busy-Dut78y4L.js.map → busy-enYCTssB.js.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button-B9RfBt-n.cjs +63 -0
- package/dist/button-B9RfBt-n.cjs.map +1 -0
- package/dist/{button-kcpPQavY.js → button-D6LJC-HC.js} +11 -9
- package/dist/button-D6LJC-HC.js.map +1 -0
- package/dist/button.cjs +7 -6
- package/dist/button.cjs.map +1 -1
- package/dist/button.js +18 -16
- package/dist/button.js.map +1 -1
- package/dist/{card-DxSKxCid.js → card-BHTz1GwB.js} +16 -16
- package/dist/card-BHTz1GwB.js.map +1 -0
- package/dist/{card-BLxPLqdQ.cjs → card-ThG_ZaQE.cjs} +3 -3
- package/dist/card-ThG_ZaQE.cjs.map +1 -0
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-BCLkhp5G.cjs → checkbox-C4zeib84.cjs} +2 -2
- package/dist/{checkbox-BCLkhp5G.cjs.map → checkbox-C4zeib84.cjs.map} +1 -1
- package/dist/{checkbox-B1wiM3Dv.js → checkbox-Ce0DlAdW.js} +6 -6
- package/dist/{checkbox-B1wiM3Dv.js.map → checkbox-Ce0DlAdW.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-vWmwqQed.js → chips-BoZSpSh_.js} +21 -19
- package/dist/chips-BoZSpSh_.js.map +1 -0
- package/dist/{chips-C9dS1WKn.cjs → chips-wfJ7YtWv.cjs} +4 -3
- package/dist/chips-wfJ7YtWv.cjs.map +1 -0
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/connectivity.cjs +1 -1
- package/dist/connectivity.js +3 -3
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/cursor-glow-Ah7VXSj7.js.map +1 -1
- package/dist/cursor-glow-Bulq-38P.cjs.map +1 -1
- package/dist/{date-range-BV6HuvLw.cjs → date-range-BHSzlwSL.cjs} +2 -2
- package/dist/date-range-BHSzlwSL.cjs.map +1 -0
- package/dist/{date-range-D3ge1b4c.js → date-range-DJrdpzev.js} +4 -4
- package/dist/date-range-DJrdpzev.js.map +1 -0
- package/dist/{date-range-inline-DpYgdLRv.cjs → date-range-inline-D0I6k84h.cjs} +1 -1
- package/dist/{date-range-inline-DpYgdLRv.cjs.map → date-range-inline-D0I6k84h.cjs.map} +1 -1
- package/dist/{date-range-inline-DuWQaWps.js → date-range-inline-DjRdMZ1z.js} +2 -2
- package/dist/{date-range-inline-DuWQaWps.js.map → date-range-inline-DjRdMZ1z.js.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +2 -2
- package/dist/{details-C-GZaq3j.js → details-CY49XVfp.js} +43 -35
- package/dist/details-CY49XVfp.js.map +1 -0
- package/dist/details-DQNj2oaU.cjs +164 -0
- package/dist/details-DQNj2oaU.cjs.map +1 -0
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{directives-D_l1E5H6.cjs → directives-Bb0S1DKZ.cjs} +3 -3
- package/dist/directives-Bb0S1DKZ.cjs.map +1 -0
- package/dist/{directives-DyS51FUh.js → directives-Bfm1lkoy.js} +6 -8
- package/dist/directives-Bfm1lkoy.js.map +1 -0
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +2 -2
- package/dist/{divider-nQffE0AD.js → divider-BeyX_C0A.js} +2 -2
- package/dist/{divider-nQffE0AD.js.map → divider-BeyX_C0A.js.map} +1 -1
- package/dist/{divider-CBnAmHMZ.cjs → divider-Ck2C1sKl.cjs} +1 -1
- package/dist/{divider-CBnAmHMZ.cjs.map → divider-Ck2C1sKl.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +2 -2
- package/dist/{expand-DvTb-UPR.js → expand-BYsSEtp6.js} +53 -53
- package/dist/expand-BYsSEtp6.js.map +1 -0
- package/dist/expand-CUF163mg.cjs +141 -0
- package/dist/expand-CUF163mg.cjs.map +1 -0
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/fab.cjs +2 -1
- package/dist/fab.cjs.map +1 -1
- package/dist/fab.js +3 -2
- package/dist/fab.js.map +1 -1
- package/dist/{float-C-Ko0Le3.js → float-Cgllk_H9.js} +2 -2
- package/dist/{float-C-Ko0Le3.js.map → float-Cgllk_H9.js.map} +1 -1
- package/dist/{float-C17xgMT1.cjs → float-OvqX0nqG.cjs} +1 -1
- package/dist/{float-C17xgMT1.cjs.map → float-OvqX0nqG.cjs.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/form-4GKROq2P.cjs +27 -0
- package/dist/form-4GKROq2P.cjs.map +1 -0
- package/dist/{form-DA0hUu2h.js → form-DxaV_Ose.js} +39 -39
- package/dist/form-DxaV_Ose.js.map +1 -0
- package/dist/form.cjs +3 -3
- package/dist/form.cjs.map +1 -1
- package/dist/form.js +34 -34
- package/dist/form.js.map +1 -1
- package/dist/gravity-6pL6CfIr.cjs.map +1 -1
- package/dist/gravity-sVK3zGBF.js.map +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/{icons-C6UfxmHZ.js → icons-CJ2mXcBi.js} +9 -9
- package/dist/icons-CJ2mXcBi.js.map +1 -0
- package/dist/icons-sZ-LybA9.cjs +24 -0
- package/dist/icons-sZ-LybA9.cjs.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-BTjZfYyh.js → iframe-DWvN5nGB.js} +11 -11
- package/dist/iframe-DWvN5nGB.js.map +1 -0
- package/dist/{iframe-wuYT2xFz.cjs → iframe-DpCv-QH2.cjs} +7 -7
- package/dist/iframe-DpCv-QH2.cjs.map +1 -0
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +35 -35
- package/dist/{input-B_4g2ulO.js → input-BCCHz6tB.js} +7 -7
- package/dist/input-BCCHz6tB.js.map +1 -0
- package/dist/{input-BrDiIT60.cjs → input-Z-3N5JMv.cjs} +2 -2
- package/dist/input-Z-3N5JMv.cjs.map +1 -0
- package/dist/{input-chip-BlWhOruv.js → input-chip-BOrcKH-H.js} +2 -2
- package/dist/{input-chip-BlWhOruv.js.map → input-chip-BOrcKH-H.js.map} +1 -1
- package/dist/{input-chip-B-XWh4aE.cjs → input-chip-ChAgRCXZ.cjs} +1 -1
- package/dist/{input-chip-B-XWh4aE.cjs.map → input-chip-ChAgRCXZ.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json.cjs +1 -1
- package/dist/json.js +3 -3
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.js +2 -2
- package/dist/{layout-Dxit9enO.js → layout-CFiG3lNT.js} +1 -1
- package/dist/{layout-Dxit9enO.js.map → layout-CFiG3lNT.js.map} +1 -1
- package/dist/{layout-BhyIcEVu.cjs → layout-DZ4dpLh9.cjs} +1 -1
- package/dist/{layout-BhyIcEVu.cjs.map → layout-DZ4dpLh9.cjs.map} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +2 -2
- package/dist/lazy-BaAiIUru.js +19 -0
- package/dist/lazy-BaAiIUru.js.map +1 -0
- package/dist/lazy-C-7a4FAe.cjs +1 -0
- package/dist/lazy-C-7a4FAe.cjs.map +1 -0
- package/dist/{lightbox-D85XAAuC.js → lightbox-B7Y4Nij_.js} +2 -2
- package/dist/lightbox-B7Y4Nij_.js.map +1 -0
- package/dist/{lightbox-CVBogswK.cjs → lightbox-Dpwsn8Qr.cjs} +1 -1
- package/dist/lightbox-Dpwsn8Qr.cjs.map +1 -0
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-nVjLskgx.cjs → list-BhM-6dAi.cjs} +1 -1
- package/dist/{list-nVjLskgx.cjs.map → list-BhM-6dAi.cjs.map} +1 -1
- package/dist/{list-DOF_yVn5.js → list-C5WVoIfJ.js} +2 -2
- package/dist/{list-DOF_yVn5.js.map → list-C5WVoIfJ.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/magnetic-DKtc4umC.cjs.map +1 -1
- package/dist/magnetic-DaOOv5Dz.js.map +1 -1
- package/dist/{menu-QrAK5Uu9.js → menu-Dvi_tQgH.js} +3 -3
- package/dist/{menu-QrAK5Uu9.js.map → menu-Dvi_tQgH.js.map} +1 -1
- package/dist/{menu-DqmNjLgY.cjs → menu-GZARYp6I.cjs} +1 -1
- package/dist/{menu-DqmNjLgY.cjs.map → menu-GZARYp6I.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/{mixins-De1zjyhy.js → mixins-DGBI7YPO.js} +11 -11
- package/dist/mixins-DGBI7YPO.js.map +1 -0
- package/dist/{mixins-DxHpyMHA.cjs → mixins-fIpzhVMd.cjs} +1 -1
- package/dist/mixins-fIpzhVMd.cjs.map +1 -0
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +2 -2
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/navigation-rail.cjs +3 -3
- package/dist/navigation-rail.cjs.map +1 -1
- package/dist/navigation-rail.js +11 -10
- package/dist/navigation-rail.js.map +1 -1
- package/dist/notification-B6yDL91t.cjs +24 -0
- package/dist/notification-B6yDL91t.cjs.map +1 -0
- package/dist/{notification-BtAK7NK8.js → notification-BB9OBRCr.js} +22 -22
- package/dist/notification-BB9OBRCr.js.map +1 -0
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-DHwA0miA.js → option-B21ImL0k.js} +2 -2
- package/dist/{option-DHwA0miA.js.map → option-B21ImL0k.js.map} +1 -1
- package/dist/{option-DnSPa8ro.cjs → option-CJQM5I9q.cjs} +1 -1
- package/dist/{option-DnSPa8ro.cjs.map → option-CJQM5I9q.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-Del1sBEB.js → overlay-DwJWVyk2.js} +75 -67
- package/dist/overlay-DwJWVyk2.js.map +1 -0
- package/dist/overlay-N0trD-4u.cjs +58 -0
- package/dist/overlay-N0trD-4u.cjs.map +1 -0
- package/dist/overlay.cjs +1 -1
- package/dist/{overlay.confirm-body-BV9umTAl.cjs → overlay.confirm-body-CtXIi421.cjs} +3 -3
- package/dist/overlay.confirm-body-CtXIi421.cjs.map +1 -0
- package/dist/{overlay.confirm-body-DSONXUzl.js → overlay.confirm-body-DwzKhXxM.js} +10 -10
- package/dist/overlay.confirm-body-DwzKhXxM.js.map +1 -0
- package/dist/overlay.js +4 -4
- package/dist/{overlay.service-BTp5Oq7f.js → overlay.service-BDLi0p5M.js} +4 -4
- package/dist/{overlay.service-BTp5Oq7f.js.map → overlay.service-BDLi0p5M.js.map} +1 -1
- package/dist/overlay.service-Dbu5uP9E.cjs +1 -0
- package/dist/{overlay.service-XLlrsSdA.cjs.map → overlay.service-Dbu5uP9E.cjs.map} +1 -1
- package/dist/{progress-DUbTL9g9.cjs → progress-B-Qg44XY.cjs} +1 -1
- package/dist/{progress-DUbTL9g9.cjs.map → progress-B-Qg44XY.cjs.map} +1 -1
- package/dist/{progress-DYA83CFU.js → progress-CUSS1sNz.js} +2 -2
- package/dist/{progress-DYA83CFU.js.map → progress-CUSS1sNz.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-DxX0iJBo.js → radio-group-AHLvrN8O.js} +7 -7
- package/dist/radio-group-AHLvrN8O.js.map +1 -0
- package/dist/{radio-group-B-ORNtvR.cjs → radio-group-BEtvCSS1.cjs} +2 -2
- package/dist/radio-group-BEtvCSS1.cjs.map +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/range.cjs +1 -1
- package/dist/range.js +2 -2
- package/dist/select-BWpV2iv-.cjs +56 -0
- package/dist/select-BWpV2iv-.cjs.map +1 -0
- package/dist/{select-C7gkA-ab.js → select-Cawz88lG.js} +46 -46
- package/dist/select-Cawz88lG.js.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +2 -2
- package/dist/skills/SKILL.md +9 -0
- package/dist/skills/overlay.md +14 -7
- package/dist/skills/schmancy/SKILL.md +9 -0
- package/dist/skills/schmancy/overlay.md +14 -7
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +2 -2
- package/dist/{sound.service-O0232os6.js → sound.service-CK-5zob-.js} +4 -3
- package/dist/sound.service-CK-5zob-.js.map +1 -0
- package/dist/{sound.service-C7FDY_yD.cjs → sound.service-D2GGaBXc.cjs} +1 -1
- package/dist/sound.service-D2GGaBXc.cjs.map +1 -0
- package/dist/{splash-screen-jfE47xl0.js → splash-screen-BUEtjHXC.js} +13 -13
- package/dist/splash-screen-BUEtjHXC.js.map +1 -0
- package/dist/{splash-screen-DIS4odDr.cjs → splash-screen-DqPuipox.cjs} +6 -6
- package/dist/splash-screen-DqPuipox.cjs.map +1 -0
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-BP3h-9d9.js → src-8VJ7eluk.js} +46 -45
- package/dist/src-8VJ7eluk.js.map +1 -0
- package/dist/{src-Um_pzb-U.cjs → src-GJA8uSAS.cjs} +7 -6
- package/dist/src-GJA8uSAS.cjs.map +1 -0
- package/dist/{state-Bj0M9a6T.cjs → state-BxDNox-2.cjs} +1 -1
- package/dist/{state-Bj0M9a6T.cjs.map → state-BxDNox-2.cjs.map} +1 -1
- package/dist/{state-DscWQpoM.js → state-CnZCDMT0.js} +9 -9
- package/dist/{state-DscWQpoM.js.map → state-CnZCDMT0.js.map} +1 -1
- package/dist/state.cjs +1 -1
- package/dist/state.js +2 -2
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +2 -2
- package/dist/{surface-B4Wn4SOO.js → surface-BMdG3dKQ.js} +2 -2
- package/dist/{surface-B4Wn4SOO.js.map → surface-BMdG3dKQ.js.map} +1 -1
- package/dist/{surface-DRq6cVW6.cjs → surface-CWwYD_z2.cjs} +1 -1
- package/dist/{surface-DRq6cVW6.cjs.map → surface-CWwYD_z2.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/switch.cjs +4 -4
- package/dist/switch.cjs.map +1 -1
- package/dist/switch.js +11 -11
- package/dist/switch.js.map +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +2 -2
- package/dist/{tabs-CnQPo-XS.js → tabs-CDQYDc6v.js} +2 -2
- package/dist/{tabs-CnQPo-XS.js.map → tabs-CDQYDc6v.js.map} +1 -1
- package/dist/{tabs-Ca_fbHPW.cjs → tabs-CbD9E1gd.cjs} +1 -1
- package/dist/{tabs-Ca_fbHPW.cjs.map → tabs-CbD9E1gd.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/textarea-Brgi-vD2.cjs +43 -0
- package/dist/textarea-Brgi-vD2.cjs.map +1 -0
- package/dist/{textarea-BvqENhTW.js → textarea-MPyrMi-S.js} +4 -4
- package/dist/textarea-MPyrMi-S.js.map +1 -0
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-BSwJ2YZo.cjs → theme-BMbXoqi0.cjs} +1 -1
- package/dist/{theme-BSwJ2YZo.cjs.map → theme-BMbXoqi0.cjs.map} +1 -1
- package/dist/{theme-BV0EzHQ1.js → theme-DZu-xmVp.js} +5 -5
- package/dist/{theme-BV0EzHQ1.js.map → theme-DZu-xmVp.js.map} +1 -1
- package/dist/{theme-button-C6fpUzPM.cjs → theme-button-B0OLb-43.cjs} +1 -1
- package/dist/{theme-button-C6fpUzPM.cjs.map → theme-button-B0OLb-43.cjs.map} +1 -1
- package/dist/{theme-button-O_xNCgI7.js → theme-button-D_qGvEYs.js} +2 -2
- package/dist/{theme-button-O_xNCgI7.js.map → theme-button-D_qGvEYs.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +3 -3
- package/dist/{theme.service-DwLhhOmP.js → theme.service-7VkM-hVf.js} +15 -11
- package/dist/theme.service-7VkM-hVf.js.map +1 -0
- package/dist/theme.service-B15FdjOS.cjs +1 -0
- package/dist/theme.service-B15FdjOS.cjs.map +1 -0
- package/dist/tree.cjs +4 -4
- package/dist/tree.cjs.map +1 -1
- package/dist/tree.js +8 -8
- package/dist/tree.js.map +1 -1
- package/dist/{typography-opFYuUYS.cjs → typography-D4Fo1UGh.cjs} +3 -3
- package/dist/{typography-opFYuUYS.cjs.map → typography-D4Fo1UGh.cjs.map} +1 -1
- package/dist/{typography-Dtdooaic.js → typography-SZhjb_4R.js} +9 -9
- package/dist/{typography-Dtdooaic.js.map → typography-SZhjb_4R.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/visually-hidden.cjs +1 -1
- package/dist/visually-hidden.js +2 -2
- package/dist/{window-ConcHirJ.js → window-BDVyrBnk.js} +101 -100
- package/dist/window-BDVyrBnk.js.map +1 -0
- package/dist/window-BbBYjm7R.cjs +59 -0
- package/dist/window-BbBYjm7R.cjs.map +1 -0
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -1
- package/skills/schmancy/SKILL.md +9 -0
- package/skills/schmancy/overlay.md +14 -7
- package/src/area/area.component.ts +1 -1
- package/src/area/area.service.test.ts +2 -2
- package/src/area/area.service.ts +1 -1
- package/src/area/lazy.ts +87 -83
- package/src/audio/sound.service.ts +3 -3
- package/src/badge/badge.ts +1 -0
- package/src/breadcrumb/breadcrumb.ts +2 -2
- package/src/button/button.ts +12 -11
- package/src/button/icon-button.ts +19 -18
- package/src/card/card.ts +16 -16
- package/src/content-drawer/drawer.ts +6 -6
- package/src/details/details.ts +55 -55
- package/src/directives/ai-badge.ts +2 -1
- package/src/directives/animate-text.ts +2 -1
- package/src/directives/art/art.directive.ts +2 -1
- package/src/directives/battery.ts +2 -1
- package/src/directives/confirm-click.ts +5 -3
- package/src/directives/cursor-glow.ts +2 -1
- package/src/directives/cycle-text.ts +2 -1
- package/src/directives/depth-of-field.ts +2 -1
- package/src/directives/drag.ts +4 -2
- package/src/directives/fyi.ts +2 -1
- package/src/directives/gravity.ts +2 -1
- package/src/directives/hummingbird.ts +2 -1
- package/src/directives/intersect.ts +3 -2
- package/src/directives/liquid.ts +2 -1
- package/src/directives/living-border.ts +2 -1
- package/src/directives/long-press.ts +2 -1
- package/src/directives/magnetic.ts +2 -1
- package/src/directives/missed-punch.ts +2 -1
- package/src/directives/nebula.ts +6 -5
- package/src/directives/overflow-within.ts +2 -1
- package/src/directives/reveal.ts +2 -1
- package/src/directives/urgent.ts +2 -1
- package/src/directives/working-snake.ts +2 -1
- package/src/expand/expand-root.component.ts +27 -27
- package/src/expand/expand.component.ts +48 -48
- package/src/fab/fab.ts +1 -0
- package/src/form/fields/autocomplete/autocomplete.ts +154 -154
- package/src/form/fields/checkbox/checkbox.ts +4 -4
- package/src/form/fields/chips/chips.ts +2 -2
- package/src/form/fields/chips/filter-chip.ts +16 -15
- package/src/form/fields/date-range/date-range.ts +2 -2
- package/src/form/fields/input/input.ts +12 -12
- package/src/form/fields/radio-group/radio-button.ts +2 -2
- package/src/form/fields/radio-group/radio-group.ts +3 -3
- package/src/form/fields/select/select.ts +56 -56
- package/src/form/fields/switch/switch.ts +10 -10
- package/src/form/fields/textarea/textarea.ts +2 -2
- package/src/form/form-summary.ts +33 -33
- package/src/form/form.ts +45 -45
- package/src/icons/icon.ts +10 -8
- package/src/iframe/iframe.ts +11 -11
- package/src/lightbox/flip-directive.ts +2 -1
- package/src/lightbox/lightbox.directive.ts +2 -1
- package/src/nav-drawer/navbar.ts +3 -3
- package/src/navigation-rail/navigation-rail.ts +10 -10
- package/src/notification/notification.ts +22 -22
- package/src/overlay/overlay.component.ts +106 -83
- package/src/overlay/overlay.confirm-body.ts +4 -4
- package/src/overlay/overlay.service.ts +3 -3
- package/src/overlay/overlay.types.ts +4 -2
- package/src/splash-screen/splash-screen.ts +11 -11
- package/src/state/index.ts +12 -12
- package/src/state/schmancy-context.ts +9 -9
- package/src/teleport/teleport.component.ts +2 -2
- package/src/theme/theme.service.ts +17 -17
- package/src/tree/tree.ts +7 -7
- package/src/typography/typography.ts +7 -7
- package/src/window/window-manager.ts +20 -20
- package/src/window/window.ts +100 -100
- package/types/mixins/SchmancyElement.d.ts +3 -2
- package/types/mixins/formField.mixin.d.ts +1 -1
- package/types/src/area/area.service.d.ts +1 -1
- package/types/src/area/lazy.d.ts +0 -6
- package/types/src/audio/sound.service.d.ts +1 -2
- package/types/src/breadcrumb/breadcrumb.d.ts +1 -1
- package/types/src/button/button.d.ts +3 -3
- package/types/src/button/icon-button.d.ts +6 -7
- package/types/src/card/card.d.ts +5 -5
- package/types/src/content-drawer/drawer.d.ts +1 -1
- package/types/src/details/details.d.ts +2 -21
- package/types/src/directives/ai-badge.d.ts +2 -2
- package/types/src/directives/animate-text.d.ts +2 -2
- package/types/src/directives/art/art.directive.d.ts +2 -2
- package/types/src/directives/battery.d.ts +2 -2
- package/types/src/directives/confirm-click.d.ts +2 -2
- package/types/src/directives/cursor-glow.d.ts +2 -2
- package/types/src/directives/cycle-text.d.ts +2 -2
- package/types/src/directives/depth-of-field.d.ts +2 -2
- package/types/src/directives/drag.d.ts +4 -4
- package/types/src/directives/fyi.d.ts +2 -2
- package/types/src/directives/gravity.d.ts +2 -2
- package/types/src/directives/hummingbird.d.ts +2 -2
- package/types/src/directives/intersect.d.ts +2 -2
- package/types/src/directives/liquid.d.ts +2 -2
- package/types/src/directives/living-border.d.ts +2 -2
- package/types/src/directives/long-press.d.ts +2 -2
- package/types/src/directives/magnetic.d.ts +2 -2
- package/types/src/directives/missed-punch.d.ts +2 -2
- package/types/src/directives/nebula.d.ts +2 -2
- package/types/src/directives/overflow-within.d.ts +2 -2
- package/types/src/directives/reveal.d.ts +2 -2
- package/types/src/directives/urgent.d.ts +2 -2
- package/types/src/directives/working-snake.d.ts +2 -2
- package/types/src/expand/expand-root.component.d.ts +8 -8
- package/types/src/expand/expand.component.d.ts +11 -11
- package/types/src/form/fields/autocomplete/autocomplete.d.ts +29 -29
- package/types/src/form/fields/checkbox/checkbox.d.ts +1 -1
- package/types/src/form/fields/chips/chips.d.ts +1 -1
- package/types/src/form/fields/chips/filter-chip.d.ts +1 -2
- package/types/src/form/fields/input/input.d.ts +3 -3
- package/types/src/form/fields/radio-group/radio-button.d.ts +1 -1
- package/types/src/form/fields/radio-group/radio-group.d.ts +1 -1
- package/types/src/form/fields/select/select.d.ts +8 -8
- package/types/src/form/fields/switch/switch.d.ts +3 -3
- package/types/src/form/fields/textarea/textarea.d.ts +1 -1
- package/types/src/form/form-summary.d.ts +7 -7
- package/types/src/form/form.d.ts +11 -11
- package/types/src/icons/icon.d.ts +2 -2
- package/types/src/iframe/iframe.d.ts +3 -3
- package/types/src/lightbox/flip-directive.d.ts +2 -2
- package/types/src/lightbox/lightbox.directive.d.ts +2 -2
- package/types/src/nav-drawer/navbar.d.ts +1 -1
- package/types/src/navigation-rail/navigation-rail.d.ts +2 -2
- package/types/src/notification/notification.d.ts +8 -8
- package/types/src/overlay/overlay.component.d.ts +16 -16
- package/types/src/overlay/overlay.confirm-body.d.ts +1 -1
- package/types/src/overlay/overlay.types.d.ts +4 -2
- package/types/src/splash-screen/splash-screen.d.ts +2 -2
- package/types/src/state/index.d.ts +1 -1
- package/types/src/state/schmancy-context.d.ts +3 -3
- package/types/src/teleport/teleport.component.d.ts +1 -1
- package/types/src/theme/theme.service.d.ts +1 -4
- package/types/src/tree/tree.d.ts +3 -3
- package/types/src/typography/typography.d.ts +1 -1
- package/types/src/window/window-manager.d.ts +2 -2
- package/types/src/window/window.d.ts +20 -20
- package/dist/area-KtULlxuA.js.map +0 -1
- package/dist/area-fdKhYB6T.cjs +0 -21
- package/dist/area-fdKhYB6T.cjs.map +0 -1
- package/dist/autocomplete-DEZk6wBD.cjs +0 -115
- package/dist/autocomplete-DEZk6wBD.cjs.map +0 -1
- package/dist/autocomplete-DIScyo8Q.js.map +0 -1
- package/dist/button-DzlHLjWO.cjs +0 -62
- package/dist/button-DzlHLjWO.cjs.map +0 -1
- package/dist/button-kcpPQavY.js.map +0 -1
- package/dist/card-BLxPLqdQ.cjs.map +0 -1
- package/dist/card-DxSKxCid.js.map +0 -1
- package/dist/chips-C9dS1WKn.cjs.map +0 -1
- package/dist/chips-vWmwqQed.js.map +0 -1
- package/dist/date-range-BV6HuvLw.cjs.map +0 -1
- package/dist/date-range-D3ge1b4c.js.map +0 -1
- package/dist/details-C-GZaq3j.js.map +0 -1
- package/dist/details-Dp5rLIWk.cjs +0 -164
- package/dist/details-Dp5rLIWk.cjs.map +0 -1
- package/dist/directives-D_l1E5H6.cjs.map +0 -1
- package/dist/directives-DyS51FUh.js.map +0 -1
- package/dist/expand-DvTb-UPR.js.map +0 -1
- package/dist/expand-mlP_3XWz.cjs +0 -141
- package/dist/expand-mlP_3XWz.cjs.map +0 -1
- package/dist/form-CwPHcQYB.cjs +0 -27
- package/dist/form-CwPHcQYB.cjs.map +0 -1
- package/dist/form-DA0hUu2h.js.map +0 -1
- package/dist/icons-C6UfxmHZ.js.map +0 -1
- package/dist/icons-CW3-oMSb.cjs +0 -24
- package/dist/icons-CW3-oMSb.cjs.map +0 -1
- package/dist/iframe-BTjZfYyh.js.map +0 -1
- package/dist/iframe-wuYT2xFz.cjs.map +0 -1
- package/dist/input-B_4g2ulO.js.map +0 -1
- package/dist/input-BrDiIT60.cjs.map +0 -1
- package/dist/lazy-CayEFyC3.cjs +0 -1
- package/dist/lazy-CayEFyC3.cjs.map +0 -1
- package/dist/lazy-D-bO2r4m.js +0 -13
- package/dist/lazy-D-bO2r4m.js.map +0 -1
- package/dist/lightbox-CVBogswK.cjs.map +0 -1
- package/dist/lightbox-D85XAAuC.js.map +0 -1
- package/dist/mixins-De1zjyhy.js.map +0 -1
- package/dist/mixins-DxHpyMHA.cjs.map +0 -1
- package/dist/notification-BtAK7NK8.js.map +0 -1
- package/dist/notification-DYzbUb5C.cjs +0 -24
- package/dist/notification-DYzbUb5C.cjs.map +0 -1
- package/dist/overlay-BVkqZmoS.cjs +0 -58
- package/dist/overlay-BVkqZmoS.cjs.map +0 -1
- package/dist/overlay-Del1sBEB.js.map +0 -1
- package/dist/overlay.confirm-body-BV9umTAl.cjs.map +0 -1
- package/dist/overlay.confirm-body-DSONXUzl.js.map +0 -1
- package/dist/overlay.service-XLlrsSdA.cjs +0 -1
- package/dist/radio-group-B-ORNtvR.cjs.map +0 -1
- package/dist/radio-group-DxX0iJBo.js.map +0 -1
- package/dist/select-B9uj_u-s.cjs +0 -56
- package/dist/select-B9uj_u-s.cjs.map +0 -1
- package/dist/select-C7gkA-ab.js.map +0 -1
- package/dist/sound.service-C7FDY_yD.cjs.map +0 -1
- package/dist/sound.service-O0232os6.js.map +0 -1
- package/dist/splash-screen-DIS4odDr.cjs.map +0 -1
- package/dist/splash-screen-jfE47xl0.js.map +0 -1
- package/dist/src-BP3h-9d9.js.map +0 -1
- package/dist/src-Um_pzb-U.cjs.map +0 -1
- package/dist/textarea-BvqENhTW.js.map +0 -1
- package/dist/textarea-qr7oL8oU.cjs +0 -43
- package/dist/textarea-qr7oL8oU.cjs.map +0 -1
- package/dist/theme.service-DwLhhOmP.js.map +0 -1
- package/dist/theme.service-kn9MC025.cjs +0 -1
- package/dist/theme.service-kn9MC025.cjs.map +0 -1
- package/dist/window-BSAemI9J.cjs +0 -59
- package/dist/window-BSAemI9J.cjs.map +0 -1
- package/dist/window-ConcHirJ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography-Dtdooaic.js","names":[],"sources":["../src/typography/typography.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent } from 'rxjs'\nimport { filter, tap, takeUntil } from 'rxjs/operators'\n\n// Material Design 3 typography - https://m3.material.io/styles/typography/type-scale-tokens\n\n/**\n * @element schmancy-typography\n * @slot - The text for the typography.\n */\n@customElement('schmancy-typography')\nexport class SchmancyTypography extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\thyphens: none;\n\t}\n\n\t/* Text alignment */\n\t:host([align='center']) {\n\t\ttext-align: center;\n\t}\n\n\t:host([align='left']) {\n\t\ttext-align: start;\n\t}\n\n\t:host([align='right']) {\n\t\ttext-align: right;\n\t}\n\n\t:host([align='justify']) {\n\t\ttext-align: justify;\n\t}\n\n\t/* Font weight */\n\t:host([weight='bold']) {\n\t\tfont-weight: 700;\n\t}\n\n\t:host([weight='medium']) {\n\t\tfont-weight: 500;\n\t}\n\n\t:host([weight='normal']) {\n\t\tfont-weight: 400;\n\t}\n\n\t/* Text transform */\n\t:host([transform='uppercase']) {\n\t\ttext-transform: uppercase;\n\t}\n\n\t:host([transform='lowercase']) {\n\t\ttext-transform: lowercase;\n\t}\n\n\t:host([transform='capitalize']) {\n\t\ttext-transform: capitalize;\n\t}\n\n\t:host([transform='normal']) {\n\t\ttext-transform: none;\n\t}\n\n\t/* Type-based weight defaults (when using Tailwind classes without token) */\n\t:host([type='display']),\n\t:host([type='headline']),\n\t:host([type='body']) {\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='label']),\n\t:host([type='subtitle']),\n\t:host([type='title']) {\n\t\tfont-weight: 500;\n\t}\n\n\t/* Display typography variants - Material Design 3 + Extended */\n\t:host([type='display'][token='xl']) {\n\t\tfont-size: 72px;\n\t\tline-height: 80px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='lg']) {\n\t\tfont-size: 57px;\n\t\tline-height: 64px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='md']) {\n\t\tfont-size: 45px;\n\t\tline-height: 52px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='sm']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='xs']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Headline typography variants - Material Design 3 + Extended */\n\t:host([type='headline'][token='xl']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='lg']) {\n\t\tfont-size: 32px;\n\t\tline-height: 40px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='md']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='sm']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='xs']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Title typography variants - Material Design 3 + Extended */\n\t:host([type='title'][token='xl']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='lg']) {\n\t\tfont-size: 22px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Subtitle typography variants - Extended from Material Design 3 */\n\t:host([type='subtitle'][token='xl']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='lg']) {\n\t\tfont-size: 18px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Body typography variants - Material Design 3 + Extended */\n\t:host([type='body'][token='xl']) {\n\t\tfont-size: 18px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='lg']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='md']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='sm']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Label typography variants - Material Design 3 + Extended */\n\t:host([type='label'][token='xl']) {\n\t\tfont-size: 16px;\n\t\tline-height: 22px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='lg']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='md']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='sm']) {\n\t\tfont-size: 11px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Note: Custom letter-spacing, font-size, and line-height should be applied via inline styles or Tailwind classes */\n\n\t:host([editable]) {\n\t\tcursor: text;\n\t\tborder-radius: 4px;\n\t\ttransition: background 150ms;\n\t\tmin-height: 1em;\n\t}\n\t/* Editable div lives in shadow DOM so light DOM (Lit markers) is untouched */\n\t.edit {\n\t\toutline: none;\n\t\tmin-height: 1em;\n\t\tfont: inherit;\n\t\tcolor: inherit;\n\t\tletter-spacing: inherit;\n\t\tline-height: inherit;\n\t}\n\t.edit:empty::before {\n\t\tcontent: attr(data-placeholder);\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\topacity: 0.35;\n\t}\n`];\n\tstatic shadowRootOptions: ShadowRootInit = {\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * @attr type - The type of the typography.\n\t * @default 'body'\n\t * @type {'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label'}\n\t */\n\t@property({ type: String, reflect: true })\n\ttype: 'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label' = 'body'\n\n\t/**\n\t * @attr token - The size token.\n\t * @deprecated Prefer using Tailwind responsive text classes for better responsive design.\n\t * Set token=\"\" and use class=\"text-sm md:text-base lg:text-lg\" instead.\n\t * Example: <schmancy-typography type=\"display\" token=\"\" class=\"text-2xl sm:text-3xl md:text-4xl\">\n\t * @default 'md'\n\t * @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | ''}\n\t */\n\t@property({ type: String, reflect: true })\n\ttoken: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '' = 'md'\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'left' |'center' |'right'}\n\t */\n\t@property({ type: String, reflect: true })\n\talign: 'left' | 'center' | 'justify' | 'right' | undefined\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'normal' | 'medium' |'bold'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true })\n\tweight: 'normal' | 'medium' | 'bold' | undefined\n\t\n\t/**\n\t *\n\t * @attr\n\t * @default inherit\n\t * @type {'uppercase' |'lowercase' |'capitalize' |'normal'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true }) \n\ttransform: 'uppercase' | 'lowercase' | 'capitalize' | 'normal' | undefined\n\n\t@property({ type: Number })\n\tmaxLines: 1 | 2 | 3 | 4 | 5 | 6 | undefined\n\n\t/** When true, the element becomes contenteditable and dispatches 'change' events on blur/Enter */\n\t@property({ type: Boolean, reflect: true }) editable = false\n\t/** The text value when in editable mode. Set via property binding: .value=${...} */\n\t@property({ type: String }) value = ''\n\t/** Placeholder shown when editable and empty */\n\t@property({ type: String }) placeholder = ''\n\n\tprivate _editRef = createRef<HTMLDivElement>()\n\n\t/** Focus and select all text in editable mode */\n\tselectAll() {\n\t\tconst el = this._editRef.value\n\t\tif (!el) return\n\t\tel.focus()\n\t\tconst sel = window.getSelection()\n\t\tif (sel && el.textContent) {\n\t\t\tconst range = document.createRange()\n\t\t\trange.selectNodeContents(el)\n\t\t\tsel.removeAllRanges()\n\t\t\tsel.addRange(range)\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent<FocusEvent>(this, 'focusout').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this._editRef.value\n\t\t\t\tif (!el) return\n\t\t\t\tconst newValue = el.innerText.trim()\n\t\t\t\tif (newValue !== this.value) {\n\t\t\t\t\tthis.dispatchEvent(new CustomEvent('change', {\n\t\t\t\t\t\tdetail: { value: newValue },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t\t// Ensure truly empty so :empty CSS placeholder works\n\t\t\t\tif (!newValue) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\t// Clean stray <br> / whitespace nodes so :empty CSS matches\n\t\tfromEvent(this, 'input').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this._editRef.value\n\t\t\t\tif (el && !el.innerText.trim()) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\tfilter(e => e.key === 'Enter'),\n\t\t\ttap(e => { e.preventDefault(); (this._editRef.value ?? this).blur() }),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprotected updated(changedProperties: Map<string, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('maxLines')) {\n\t\t\t// Remove all line-clamp classes\n\t\t\tthis.classList.remove('line-clamp-1', 'line-clamp-2', 'line-clamp-3', 'line-clamp-4', 'line-clamp-5', 'line-clamp-6')\n\t\t\t// Add the appropriate one\n\t\t\tif (this.maxLines) {\n\t\t\t\tthis.classList.add(`line-clamp-${this.maxLines}`)\n\t\t\t}\n\t\t}\n\t\tif ((changedProperties.has('value') || changedProperties.has('editable')) && this.editable) {\n\t\t\tconst el = this._editRef.value\n\t\t\tif (el && document.activeElement !== el) {\n\t\t\t\tif (this.value) {\n\t\t\t\t\tel.innerText = this.value\n\t\t\t\t} else {\n\t\t\t\t\tel.textContent = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tif (this.editable) {\n\t\t\treturn html`<div\n\t\t\t\t${ref(this._editRef)}\n\t\t\t\tclass=\"edit\"\n\t\t\t\tcontenteditable=\"true\"\n\t\t\t\tdata-placeholder=${this.placeholder ?? ''}\n\t\t\t></div>`\n\t\t}\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-typography': SchmancyTypography\n\t}\n}"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"typography-SZhjb_4R.js","names":[],"sources":["../src/typography/typography.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent } from 'rxjs'\nimport { filter, tap, takeUntil } from 'rxjs/operators'\n\n// Material Design 3 typography - https://m3.material.io/styles/typography/type-scale-tokens\n\n/**\n * @element schmancy-typography\n * @slot - The text for the typography.\n */\n@customElement('schmancy-typography')\nexport class SchmancyTypography extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\thyphens: none;\n\t}\n\n\t/* Text alignment */\n\t:host([align='center']) {\n\t\ttext-align: center;\n\t}\n\n\t:host([align='left']) {\n\t\ttext-align: start;\n\t}\n\n\t:host([align='right']) {\n\t\ttext-align: right;\n\t}\n\n\t:host([align='justify']) {\n\t\ttext-align: justify;\n\t}\n\n\t/* Font weight */\n\t:host([weight='bold']) {\n\t\tfont-weight: 700;\n\t}\n\n\t:host([weight='medium']) {\n\t\tfont-weight: 500;\n\t}\n\n\t:host([weight='normal']) {\n\t\tfont-weight: 400;\n\t}\n\n\t/* Text transform */\n\t:host([transform='uppercase']) {\n\t\ttext-transform: uppercase;\n\t}\n\n\t:host([transform='lowercase']) {\n\t\ttext-transform: lowercase;\n\t}\n\n\t:host([transform='capitalize']) {\n\t\ttext-transform: capitalize;\n\t}\n\n\t:host([transform='normal']) {\n\t\ttext-transform: none;\n\t}\n\n\t/* Type-based weight defaults (when using Tailwind classes without token) */\n\t:host([type='display']),\n\t:host([type='headline']),\n\t:host([type='body']) {\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='label']),\n\t:host([type='subtitle']),\n\t:host([type='title']) {\n\t\tfont-weight: 500;\n\t}\n\n\t/* Display typography variants - Material Design 3 + Extended */\n\t:host([type='display'][token='xl']) {\n\t\tfont-size: 72px;\n\t\tline-height: 80px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='lg']) {\n\t\tfont-size: 57px;\n\t\tline-height: 64px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='md']) {\n\t\tfont-size: 45px;\n\t\tline-height: 52px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='sm']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='display'][token='xs']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Headline typography variants - Material Design 3 + Extended */\n\t:host([type='headline'][token='xl']) {\n\t\tfont-size: 36px;\n\t\tline-height: 44px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='lg']) {\n\t\tfont-size: 32px;\n\t\tline-height: 40px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='md']) {\n\t\tfont-size: 28px;\n\t\tline-height: 36px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='sm']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='headline'][token='xs']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Title typography variants - Material Design 3 + Extended */\n\t:host([type='title'][token='xl']) {\n\t\tfont-size: 24px;\n\t\tline-height: 32px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='lg']) {\n\t\tfont-size: 22px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='title'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='title'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Subtitle typography variants - Extended from Material Design 3 */\n\t:host([type='subtitle'][token='xl']) {\n\t\tfont-size: 20px;\n\t\tline-height: 28px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='lg']) {\n\t\tfont-size: 18px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='md']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='sm']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='subtitle'][token='xs']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Body typography variants - Material Design 3 + Extended */\n\t:host([type='body'][token='xl']) {\n\t\tfont-size: 18px;\n\t\tline-height: 28px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='lg']) {\n\t\tfont-size: 16px;\n\t\tline-height: 24px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='md']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='sm']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 400;\n\t}\n\n\t:host([type='body'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 400;\n\t}\n\n\t/* Label typography variants - Material Design 3 + Extended */\n\t:host([type='label'][token='xl']) {\n\t\tfont-size: 16px;\n\t\tline-height: 22px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='lg']) {\n\t\tfont-size: 14px;\n\t\tline-height: 20px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='md']) {\n\t\tfont-size: 12px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='sm']) {\n\t\tfont-size: 11px;\n\t\tline-height: 16px;\n\t\tfont-weight: 500;\n\t}\n\n\t:host([type='label'][token='xs']) {\n\t\tfont-size: 10px;\n\t\tline-height: 14px;\n\t\tfont-weight: 500;\n\t}\n\n\t/* Note: Custom letter-spacing, font-size, and line-height should be applied via inline styles or Tailwind classes */\n\n\t:host([editable]) {\n\t\tcursor: text;\n\t\tborder-radius: 4px;\n\t\ttransition: background 150ms;\n\t\tmin-height: 1em;\n\t}\n\t/* Editable div lives in shadow DOM so light DOM (Lit markers) is untouched */\n\t.edit {\n\t\toutline: none;\n\t\tmin-height: 1em;\n\t\tfont: inherit;\n\t\tcolor: inherit;\n\t\tletter-spacing: inherit;\n\t\tline-height: inherit;\n\t}\n\t.edit:empty::before {\n\t\tcontent: attr(data-placeholder);\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\topacity: 0.35;\n\t}\n`];\n\tstatic shadowRootOptions: ShadowRootInit = {\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * @attr type - The type of the typography.\n\t * @default 'body'\n\t * @type {'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label'}\n\t */\n\t@property({ type: String, reflect: true })\n\ttype: 'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label' = 'body'\n\n\t/**\n\t * @attr token - The size token.\n\t * @deprecated Prefer using Tailwind responsive text classes for better responsive design.\n\t * Set token=\"\" and use class=\"text-sm md:text-base lg:text-lg\" instead.\n\t * Example: <schmancy-typography type=\"display\" token=\"\" class=\"text-2xl sm:text-3xl md:text-4xl\">\n\t * @default 'md'\n\t * @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | ''}\n\t */\n\t@property({ type: String, reflect: true })\n\ttoken: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '' = 'md'\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'left' |'center' |'right'}\n\t */\n\t@property({ type: String, reflect: true })\n\talign: 'left' | 'center' | 'justify' | 'right' | undefined\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'normal' | 'medium' |'bold'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true })\n\tweight: 'normal' | 'medium' | 'bold' | undefined\n\t\n\t/**\n\t *\n\t * @attr\n\t * @default inherit\n\t * @type {'uppercase' |'lowercase' |'capitalize' |'normal'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true }) \n\ttransform: 'uppercase' | 'lowercase' | 'capitalize' | 'normal' | undefined\n\n\t@property({ type: Number })\n\tmaxLines: 1 | 2 | 3 | 4 | 5 | 6 | undefined\n\n\t/** When true, the element becomes contenteditable and dispatches 'change' events on blur/Enter */\n\t@property({ type: Boolean, reflect: true }) editable = false\n\t/** The text value when in editable mode. Set via property binding: .value=${...} */\n\t@property({ type: String }) value = ''\n\t/** Placeholder shown when editable and empty */\n\t@property({ type: String }) placeholder = ''\n\n\tprivate editRef = createRef<HTMLDivElement>()\n\n\t/** Focus and select all text in editable mode */\n\tselectAll() {\n\t\tconst el = this.editRef.value\n\t\tif (!el) return\n\t\tel.focus()\n\t\tconst sel = window.getSelection()\n\t\tif (sel && el.textContent) {\n\t\t\tconst range = document.createRange()\n\t\t\trange.selectNodeContents(el)\n\t\t\tsel.removeAllRanges()\n\t\t\tsel.addRange(range)\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent<FocusEvent>(this, 'focusout').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this.editRef.value\n\t\t\t\tif (!el) return\n\t\t\t\tconst newValue = el.innerText.trim()\n\t\t\t\tif (newValue !== this.value) {\n\t\t\t\t\tthis.dispatchEvent(new CustomEvent('change', {\n\t\t\t\t\t\tdetail: { value: newValue },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t\t// Ensure truly empty so :empty CSS placeholder works\n\t\t\t\tif (!newValue) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\t// Clean stray <br> / whitespace nodes so :empty CSS matches\n\t\tfromEvent(this, 'input').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\ttap(() => {\n\t\t\t\tconst el = this.editRef.value\n\t\t\t\tif (el && !el.innerText.trim()) el.textContent = ''\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\tfilter(() => this.editable),\n\t\t\tfilter(e => e.key === 'Enter'),\n\t\t\ttap(e => { e.preventDefault(); (this.editRef.value ?? this).blur() }),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprotected updated(changedProperties: Map<string, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('maxLines')) {\n\t\t\t// Remove all line-clamp classes\n\t\t\tthis.classList.remove('line-clamp-1', 'line-clamp-2', 'line-clamp-3', 'line-clamp-4', 'line-clamp-5', 'line-clamp-6')\n\t\t\t// Add the appropriate one\n\t\t\tif (this.maxLines) {\n\t\t\t\tthis.classList.add(`line-clamp-${this.maxLines}`)\n\t\t\t}\n\t\t}\n\t\tif ((changedProperties.has('value') || changedProperties.has('editable')) && this.editable) {\n\t\t\tconst el = this.editRef.value\n\t\t\tif (el && document.activeElement !== el) {\n\t\t\t\tif (this.value) {\n\t\t\t\t\tel.innerText = this.value\n\t\t\t\t} else {\n\t\t\t\t\tel.textContent = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tif (this.editable) {\n\t\t\treturn html`<div\n\t\t\t\t${ref(this.editRef)}\n\t\t\t\tclass=\"edit\"\n\t\t\t\tcontenteditable=\"true\"\n\t\t\t\tdata-placeholder=${this.placeholder ?? ''}\n\t\t\t></div>`\n\t\t}\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-typography': SchmancyTypography\n\t}\n}"],"mappings":"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"}
|
package/dist/typography.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./typography-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./typography-D4Fo1UGh.cjs`);Object.defineProperty(exports,`SchmancyTypography`,{enumerable:!0,get:function(){return e.t}});
|
package/dist/typography.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./typography-
|
|
1
|
+
import { t as e } from "./typography-SZhjb_4R.js";
|
|
2
2
|
export { e as SchmancyTypography };
|
package/dist/visually-hidden.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-C41uPa6l.cjs`);require(`./mixins-fIpzhVMd.cjs`);let t=require(`lit/decorators.js`),n=require(`lit`);var r=class extends e.t{static{this.styles=[n.css`
|
|
2
2
|
:host {
|
|
3
3
|
position: absolute;
|
|
4
4
|
width: 1px;
|
package/dist/visually-hidden.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e, u as t } from "./SchmancyElement-
|
|
2
|
-
import "./mixins-
|
|
1
|
+
import { t as e, u as t } from "./SchmancyElement-BNnyBOwk.js";
|
|
2
|
+
import "./mixins-DGBI7YPO.js";
|
|
3
3
|
import { customElement as n } from "lit/decorators.js";
|
|
4
4
|
import { css as r, html as i } from "lit";
|
|
5
5
|
var a = class extends e {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as e, u as t } from "./SchmancyElement-
|
|
2
|
-
import "./mixins-
|
|
1
|
+
import { t as e, u as t } from "./SchmancyElement-BNnyBOwk.js";
|
|
2
|
+
import "./mixins-DGBI7YPO.js";
|
|
3
3
|
import { d as n, f as r } from "./animation-DCznELuT.js";
|
|
4
4
|
import { t as i } from "./reduced-motion-D-L12p7G.js";
|
|
5
5
|
import { t as a } from "./cursor-glow-Ah7VXSj7.js";
|
|
6
|
-
import { n as o } from "./theme.service-
|
|
6
|
+
import { n as o } from "./theme.service-7VkM-hVf.js";
|
|
7
7
|
import { t as s } from "./overlay-stack-D2rgxQLh.js";
|
|
8
8
|
import { BehaviorSubject as c, EMPTY as l, Observable as u, animationFrameScheduler as d, auditTime as f, catchError as p, distinctUntilChanged as m, filter as h, finalize as g, from as _, fromEvent as v, map as y, merge as b, switchMap as x, take as S, takeUntil as C, tap as w } from "rxjs";
|
|
9
9
|
import { classMap as T } from "lit/directives/class-map.js";
|
|
@@ -16,24 +16,25 @@ function L(e, t) {
|
|
|
16
16
|
return !(e.left >= t.left + t.width || e.left + e.width <= t.left || e.top >= t.top + t.height || e.top + e.height <= t.top);
|
|
17
17
|
}
|
|
18
18
|
var R, z = class e {
|
|
19
|
+
#e;
|
|
19
20
|
constructor() {
|
|
20
|
-
this
|
|
21
|
+
this.#e = new c({
|
|
21
22
|
windows: /* @__PURE__ */ new Map(),
|
|
22
23
|
focusedId: null,
|
|
23
24
|
stackOrder: []
|
|
24
|
-
}), this.state$ = this.
|
|
25
|
+
}), this.state$ = this.#e.asObservable();
|
|
25
26
|
}
|
|
26
27
|
static getInstance() {
|
|
27
28
|
return e.instance ||= new e(), e.instance;
|
|
28
29
|
}
|
|
29
30
|
get windows() {
|
|
30
|
-
return this.
|
|
31
|
+
return this.#e.value.windows;
|
|
31
32
|
}
|
|
32
33
|
get focusedId() {
|
|
33
|
-
return this.
|
|
34
|
+
return this.#e.value.focusedId;
|
|
34
35
|
}
|
|
35
36
|
register(e, t, n) {
|
|
36
|
-
let r = this.
|
|
37
|
+
let r = this.#e.value;
|
|
37
38
|
if (r.windows.has(e)) return;
|
|
38
39
|
let i = {
|
|
39
40
|
id: e,
|
|
@@ -45,20 +46,20 @@ var R, z = class e {
|
|
|
45
46
|
}, a = new Map(r.windows);
|
|
46
47
|
a.set(e, i);
|
|
47
48
|
let o = s.getStackOrder();
|
|
48
|
-
this.
|
|
49
|
+
this.#e.next({
|
|
49
50
|
...r,
|
|
50
51
|
windows: a,
|
|
51
52
|
stackOrder: o
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
unregister(e) {
|
|
55
|
-
let t = this.
|
|
56
|
+
let t = this.#e.value;
|
|
56
57
|
if (!t.windows.has(e)) return;
|
|
57
58
|
s.releaseId(e);
|
|
58
59
|
let n = new Map(t.windows);
|
|
59
60
|
n.delete(e);
|
|
60
61
|
let r = s.getStackOrder(), i = t.focusedId === e ? null : t.focusedId;
|
|
61
|
-
this.
|
|
62
|
+
this.#e.next({
|
|
62
63
|
...t,
|
|
63
64
|
windows: n,
|
|
64
65
|
stackOrder: r,
|
|
@@ -66,16 +67,16 @@ var R, z = class e {
|
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
updateBounds(e, t) {
|
|
69
|
-
this.
|
|
70
|
+
this.updateRecord(e, { bounds: t });
|
|
70
71
|
}
|
|
71
72
|
updateVisualState(e, t) {
|
|
72
|
-
this.
|
|
73
|
+
this.updateRecord(e, { visualState: t });
|
|
73
74
|
}
|
|
74
75
|
updateOpen(e, t) {
|
|
75
|
-
this.
|
|
76
|
+
this.updateRecord(e, { open: t });
|
|
76
77
|
}
|
|
77
78
|
focus(e) {
|
|
78
|
-
let t = this.
|
|
79
|
+
let t = this.#e.value;
|
|
79
80
|
if (!t.windows.has(e) || t.focusedId === e) return;
|
|
80
81
|
let n = s.bringToFront(e), r = new Map(t.windows), i = r.get(e);
|
|
81
82
|
i && r.set(e, {
|
|
@@ -83,7 +84,7 @@ var R, z = class e {
|
|
|
83
84
|
zIndex: n
|
|
84
85
|
});
|
|
85
86
|
let a = s.getStackOrder();
|
|
86
|
-
this.
|
|
87
|
+
this.#e.next({
|
|
87
88
|
...t,
|
|
88
89
|
windows: r,
|
|
89
90
|
stackOrder: a,
|
|
@@ -92,19 +93,19 @@ var R, z = class e {
|
|
|
92
93
|
}
|
|
93
94
|
findOverlaps(e, t) {
|
|
94
95
|
let n = [];
|
|
95
|
-
for (let [r, i] of this.
|
|
96
|
+
for (let [r, i] of this.#e.value.windows) r !== t && L(e, i.bounds) && n.push(i);
|
|
96
97
|
return n;
|
|
97
98
|
}
|
|
98
99
|
getNeighbors(e) {
|
|
99
100
|
let t = [];
|
|
100
|
-
for (let [n, r] of this.
|
|
101
|
+
for (let [n, r] of this.#e.value.windows) n !== e && t.push(r);
|
|
101
102
|
return t;
|
|
102
103
|
}
|
|
103
104
|
selectWindow(e) {
|
|
104
|
-
return this.
|
|
105
|
+
return this.#e.pipe(y((t) => t.windows.get(e)), m());
|
|
105
106
|
}
|
|
106
107
|
selectFocused() {
|
|
107
|
-
return this.
|
|
108
|
+
return this.#e.pipe(y((e) => e.focusedId), m());
|
|
108
109
|
}
|
|
109
110
|
loadPosition(e) {
|
|
110
111
|
try {
|
|
@@ -124,14 +125,14 @@ var R, z = class e {
|
|
|
124
125
|
localStorage.removeItem(F + e), localStorage.removeItem(I + e);
|
|
125
126
|
} catch {}
|
|
126
127
|
}
|
|
127
|
-
|
|
128
|
-
let n = this.
|
|
128
|
+
updateRecord(e, t) {
|
|
129
|
+
let n = this.#e.value, r = n.windows.get(e);
|
|
129
130
|
if (!r) return;
|
|
130
131
|
let i = new Map(n.windows);
|
|
131
132
|
i.set(e, {
|
|
132
133
|
...r,
|
|
133
134
|
...t
|
|
134
|
-
}), this.
|
|
135
|
+
}), this.#e.next({
|
|
135
136
|
...n,
|
|
136
137
|
windows: i
|
|
137
138
|
});
|
|
@@ -157,18 +158,18 @@ var V = 48, H = class extends e {
|
|
|
157
158
|
R = this;
|
|
158
159
|
}
|
|
159
160
|
constructor(...e) {
|
|
160
|
-
super(...e), this.id = "default", this.lowered = !1, this.corner = "bottom-right", this.resizable = !1, this.freePosition = !1, this.visualState = "normal", this.minWidth = 280, this.minHeight = 200, this.open = !1, this.
|
|
161
|
+
super(...e), this.id = "default", this.lowered = !1, this.corner = "bottom-right", this.resizable = !1, this.freePosition = !1, this.visualState = "normal", this.minWidth = 280, this.minHeight = 200, this.open = !1, this.hasOpened = !1, this.position = {
|
|
161
162
|
x: 16,
|
|
162
163
|
y: 16
|
|
163
|
-
}, this.
|
|
164
|
+
}, this.currentCorner = "bottom-right", this.appliedCorner = "", this.containerRef = N(), this.bodyRef = N(), this.headRef = N(), this.handleFocus = () => z.focus(this.id), this.handleHeadKeydown = (e) => {
|
|
164
165
|
if (e.key === "Enter" || e.key === " ") return e.preventDefault(), void this.toggle();
|
|
165
166
|
if (e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
166
167
|
e.preventDefault();
|
|
167
168
|
let t = e.shiftKey ? 20 : 5, n = e.key === "ArrowRight" ? t : e.key === "ArrowLeft" ? -t : 0, r = e.key === "ArrowDown" ? t : e.key === "ArrowUp" ? -t : 0;
|
|
168
|
-
this.
|
|
169
|
-
x: this.
|
|
170
|
-
y: this.
|
|
171
|
-
}, this.
|
|
169
|
+
this.position = {
|
|
170
|
+
x: this.position.x + n,
|
|
171
|
+
y: this.position.y + r
|
|
172
|
+
}, this.applyContainerPosition(), this.savePosition();
|
|
172
173
|
}
|
|
173
174
|
};
|
|
174
175
|
}
|
|
@@ -188,7 +189,7 @@ var V = 48, H = class extends e {
|
|
|
188
189
|
return this.expandedWidth ?? "min(360px, calc(100vw - 32px))";
|
|
189
190
|
}
|
|
190
191
|
get isBottomCorner() {
|
|
191
|
-
return this.
|
|
192
|
+
return this.currentCorner.startsWith("bottom");
|
|
192
193
|
}
|
|
193
194
|
get closedClipPath() {
|
|
194
195
|
return this.isBottomCorner ? "inset(calc(100% - 48px) 0px 0px 0px round 22px)" : "inset(0px 0px calc(100% - 48px) 0px round 22px)";
|
|
@@ -199,12 +200,12 @@ var V = 48, H = class extends e {
|
|
|
199
200
|
get elevation() {
|
|
200
201
|
return this.open ? 4 : this.lowered ? 1 : 3;
|
|
201
202
|
}
|
|
202
|
-
|
|
203
|
-
let e = this.
|
|
203
|
+
applyContainerPosition() {
|
|
204
|
+
let e = this.containerRef.value;
|
|
204
205
|
if (!e) return;
|
|
205
|
-
this.
|
|
206
|
-
let { x: t, y: n } = this.
|
|
207
|
-
this.
|
|
206
|
+
this.appliedCorner !== this.currentCorner && (e.style.removeProperty("left"), e.style.removeProperty("right"), e.style.removeProperty("top"), e.style.removeProperty("bottom"), this.appliedCorner = this.currentCorner);
|
|
207
|
+
let { x: t, y: n } = this.position;
|
|
208
|
+
this.currentCorner.includes("right") ? e.style.right = `${t}px` : e.style.left = `${t}px`, this.currentCorner.includes("bottom") ? e.style.bottom = `${n + o.bottomOffset}px` : e.style.top = `${n}px`;
|
|
208
209
|
}
|
|
209
210
|
static {
|
|
210
211
|
this.VALID_CORNERS = new Set([
|
|
@@ -214,34 +215,34 @@ var V = 48, H = class extends e {
|
|
|
214
215
|
"bottom-right"
|
|
215
216
|
]);
|
|
216
217
|
}
|
|
217
|
-
|
|
218
|
+
loadPosition() {
|
|
218
219
|
let e = z.loadPosition(this.id);
|
|
219
|
-
e && (this.
|
|
220
|
+
e && (this.position = {
|
|
220
221
|
x: e.x,
|
|
221
222
|
y: e.y
|
|
222
|
-
}, R.VALID_CORNERS.has(e.anchor) && (this.
|
|
223
|
+
}, R.VALID_CORNERS.has(e.anchor) && (this.currentCorner = e.anchor));
|
|
223
224
|
}
|
|
224
|
-
|
|
225
|
+
savePosition() {
|
|
225
226
|
z.savePosition(this.id, {
|
|
226
|
-
...this.
|
|
227
|
-
anchor: this.
|
|
227
|
+
...this.position,
|
|
228
|
+
anchor: this.currentCorner
|
|
228
229
|
});
|
|
229
230
|
}
|
|
230
|
-
|
|
231
|
-
let e = this.
|
|
231
|
+
validateBounds() {
|
|
232
|
+
let e = this.containerRef.value;
|
|
232
233
|
if (!e) return;
|
|
233
234
|
let t = e.getBoundingClientRect();
|
|
234
235
|
if (t.width === 0) return;
|
|
235
|
-
let n = window.innerWidth, r = window.innerHeight, i = this.
|
|
236
|
-
this.
|
|
236
|
+
let n = window.innerWidth, r = window.innerHeight, i = this.currentCorner.includes("right"), a = this.currentCorner.includes("bottom"), o = i ? n - this.position.x - t.width : this.position.x, s = a ? r - this.position.y - t.height : this.position.y, c = Math.max(0, Math.min(o, n - t.width)), l = Math.max(0, Math.min(s, r - t.height));
|
|
237
|
+
this.position = {
|
|
237
238
|
x: i ? n - c - t.width : c,
|
|
238
239
|
y: a ? r - l - t.height : l
|
|
239
|
-
}, this.
|
|
240
|
+
}, this.applyContainerPosition();
|
|
240
241
|
}
|
|
241
|
-
|
|
242
|
+
reorientToNearestCorner(e = !1) {
|
|
242
243
|
if (this.freePosition) {
|
|
243
|
-
this.
|
|
244
|
-
let e = this.
|
|
244
|
+
this.savePosition();
|
|
245
|
+
let e = this.containerRef.value?.getBoundingClientRect();
|
|
245
246
|
e && z.updateBounds(this.id, {
|
|
246
247
|
left: e.left,
|
|
247
248
|
top: e.top,
|
|
@@ -250,14 +251,14 @@ var V = 48, H = class extends e {
|
|
|
250
251
|
});
|
|
251
252
|
return;
|
|
252
253
|
}
|
|
253
|
-
let t = this.
|
|
254
|
+
let t = this.containerRef.value;
|
|
254
255
|
if (!t) return;
|
|
255
|
-
let r = t.getBoundingClientRect(), a = this.
|
|
256
|
-
if (this.
|
|
256
|
+
let r = t.getBoundingClientRect(), a = this.currentCorner.includes("bottom"), o = r.left + r.width / 2, s = a ? r.bottom - 24 : r.top + 24, c = o > window.innerWidth / 2 ? "right" : "left", u = `${s > window.innerHeight / 2 ? "bottom" : "top"}-${c}`;
|
|
257
|
+
if (this.currentCorner = u, this.position = {
|
|
257
258
|
x: 16,
|
|
258
259
|
y: 16
|
|
259
|
-
}, this.
|
|
260
|
-
this.
|
|
260
|
+
}, this.applyContainerPosition(), this.open || (t.style.clipPath = this.closedClipPath), e || i.value) {
|
|
261
|
+
this.savePosition();
|
|
261
262
|
let e = t.getBoundingClientRect();
|
|
262
263
|
z.updateBounds(this.id, {
|
|
263
264
|
left: e.left,
|
|
@@ -283,11 +284,11 @@ var V = 48, H = class extends e {
|
|
|
283
284
|
width: e.width,
|
|
284
285
|
height: e.height
|
|
285
286
|
});
|
|
286
|
-
}), p(() => l), C(this.disconnecting)).subscribe(), this.
|
|
287
|
+
}), p(() => l), C(this.disconnecting)).subscribe(), this.savePosition();
|
|
287
288
|
}
|
|
288
|
-
|
|
289
|
+
drag$() {
|
|
289
290
|
return new u(() => {
|
|
290
|
-
let e = this.
|
|
291
|
+
let e = this.headRef.value, t = this.containerRef.value;
|
|
291
292
|
if (!e || !t) return;
|
|
292
293
|
let n = !1, r = v(e, "pointerdown").pipe(h((e) => e.button === 0), h((e) => {
|
|
293
294
|
let t = e.target.tagName?.toLowerCase();
|
|
@@ -300,7 +301,7 @@ var V = 48, H = class extends e {
|
|
|
300
301
|
}), w((e) => {
|
|
301
302
|
e.preventDefault(), e.stopPropagation();
|
|
302
303
|
})).pipe(y((e) => {
|
|
303
|
-
let r = t.getBoundingClientRect(), i = this.
|
|
304
|
+
let r = t.getBoundingClientRect(), i = this.currentCorner.includes("bottom"), a = this.open;
|
|
304
305
|
return n = !1, {
|
|
305
306
|
startX: e.clientX,
|
|
306
307
|
startY: e.clientY,
|
|
@@ -320,19 +321,19 @@ var V = 48, H = class extends e {
|
|
|
320
321
|
}))), _ = v(window, "pointerup").pipe(h((e) => e.pointerId === p));
|
|
321
322
|
return m.pipe(w(({ clientX: d, clientY: f }) => {
|
|
322
323
|
let p = d - e, m = f - r;
|
|
323
|
-
if (Math.sqrt(p * p + m * m) > 5 && !n && (n = !0, this.
|
|
324
|
+
if (Math.sqrt(p * p + m * m) > 5 && !n && (n = !0, this.applyDragVisuals(!0), u)) {
|
|
324
325
|
this.open = !1, t.style.clipPath = this.closedClipPath, t.style.overflow = "hidden";
|
|
325
|
-
let e = this.
|
|
326
|
+
let e = this.bodyRef.value;
|
|
326
327
|
e && (e.inert = !0, e.style.visibility = "hidden");
|
|
327
328
|
}
|
|
328
329
|
if (!n) return;
|
|
329
330
|
let h = Math.max(0, Math.min(d - i, s - o.width)), g = l ? V - o.height : 0, _ = l ? c - o.height : c - V, v = Math.max(g, Math.min(f - a, _));
|
|
330
|
-
this.
|
|
331
|
-
x: this.
|
|
331
|
+
this.position = {
|
|
332
|
+
x: this.currentCorner.includes("right") ? s - h - o.width : h,
|
|
332
333
|
y: l ? c - v - o.height : v
|
|
333
|
-
}, this.
|
|
334
|
+
}, this.applyContainerPosition();
|
|
334
335
|
}), C(_), g(() => {
|
|
335
|
-
n ? (this.
|
|
336
|
+
n ? (this.reorientToNearestCorner(), this.applyDragVisuals(!1), n = !1) : (n = !1, this.toggle());
|
|
336
337
|
}));
|
|
337
338
|
})).subscribe();
|
|
338
339
|
return () => r.unsubscribe();
|
|
@@ -340,8 +341,8 @@ var V = 48, H = class extends e {
|
|
|
340
341
|
}
|
|
341
342
|
connectedCallback() {
|
|
342
343
|
super.connectedCallback(), _(this.updateComplete).pipe(S(1), w(() => {
|
|
343
|
-
this.
|
|
344
|
-
let e = this.
|
|
344
|
+
this.currentCorner = this.corner, this.loadPosition(), this.applyContainerPosition(), this.initDOMState();
|
|
345
|
+
let e = this.containerRef.value;
|
|
345
346
|
if (e) {
|
|
346
347
|
let t = e.getBoundingClientRect(), n = {
|
|
347
348
|
left: t.left,
|
|
@@ -349,25 +350,25 @@ var V = 48, H = class extends e {
|
|
|
349
350
|
width: t.width,
|
|
350
351
|
height: t.height
|
|
351
352
|
};
|
|
352
|
-
z.register(this.id, n, this.freePosition ? "free" : this.
|
|
353
|
+
z.register(this.id, n, this.freePosition ? "free" : this.currentCorner);
|
|
353
354
|
}
|
|
354
|
-
}), x(() => b(this.
|
|
355
|
+
}), x(() => b(this.drag$(), z.selectWindow(this.id).pipe(w((e) => {
|
|
355
356
|
if (!e) return;
|
|
356
|
-
let t = this.
|
|
357
|
+
let t = this.containerRef.value;
|
|
357
358
|
t && (t.style.zIndex = String(e.zIndex));
|
|
358
|
-
})))), C(this.disconnecting)).subscribe(), b(v(window, "resize").pipe(f(0, d), w(() => this.
|
|
359
|
+
})))), C(this.disconnecting)).subscribe(), b(v(window, "resize").pipe(f(0, d), w(() => this.validateBounds())), o.bottomOffset$.pipe(w(() => this.applyContainerPosition()))).pipe(C(this.disconnecting)).subscribe();
|
|
359
360
|
}
|
|
360
361
|
disconnectedCallback() {
|
|
361
362
|
super.disconnectedCallback(), z.unregister(this.id);
|
|
362
363
|
}
|
|
363
|
-
|
|
364
|
-
let e = this.
|
|
365
|
-
e && (this.
|
|
364
|
+
initDOMState() {
|
|
365
|
+
let e = this.containerRef.value, t = this.bodyRef.value;
|
|
366
|
+
e && (this.applyContainerPosition(), this.open ? (this.hasOpened = !0, e.style.overflow = "", t && (t.inert = !1, t.style.visibility = "visible")) : (e.style.clipPath = this.closedClipPath, e.style.overflow = "hidden", t && (t.inert = !0, t.style.visibility = "hidden")));
|
|
366
367
|
}
|
|
367
|
-
|
|
368
|
-
let e = this.
|
|
368
|
+
animateOpen() {
|
|
369
|
+
let e = this.containerRef.value, t = this.bodyRef.value;
|
|
369
370
|
if (!e) return;
|
|
370
|
-
this.
|
|
371
|
+
this.hasOpened = !0, this.open = !0;
|
|
371
372
|
let n = e.getBoundingClientRect(), a = {
|
|
372
373
|
left: n.left,
|
|
373
374
|
top: this.isBottomCorner ? n.top - 400 : n.top,
|
|
@@ -380,15 +381,15 @@ var V = 48, H = class extends e {
|
|
|
380
381
|
height: window.innerHeight
|
|
381
382
|
});
|
|
382
383
|
if (Math.abs(e.left - a.left) > 10 || Math.abs(e.top - a.top) > 10) {
|
|
383
|
-
let t = this.
|
|
384
|
-
this.
|
|
384
|
+
let t = this.currentCorner.includes("right"), n = this.currentCorner.includes("bottom");
|
|
385
|
+
this.position = {
|
|
385
386
|
x: t ? window.innerWidth - e.left - e.width : e.left,
|
|
386
387
|
y: n ? window.innerHeight - e.top - e.height : e.top
|
|
387
|
-
}, this.
|
|
388
|
+
}, this.applyContainerPosition();
|
|
388
389
|
}
|
|
389
390
|
}
|
|
390
391
|
if (t && (t.style.visibility = "visible", t.inert = !1), i.value) return e.style.clipPath = "", e.style.overflow = "", void this.dispatchScopedEvent("window-toggle", { state: "expanded" });
|
|
391
|
-
this.
|
|
392
|
+
this.currentAnimation?.cancel(), e.style.overflow = "hidden", e.style.willChange = "opacity";
|
|
392
393
|
let s = [{
|
|
393
394
|
clipPath: this.closedClipPath,
|
|
394
395
|
opacity: .95
|
|
@@ -400,20 +401,20 @@ var V = 48, H = class extends e {
|
|
|
400
401
|
easing: r.easingFallback,
|
|
401
402
|
fill: "forwards"
|
|
402
403
|
});
|
|
403
|
-
this.
|
|
404
|
+
this.currentAnimation = c, _(c.finished).pipe(S(1), w(() => {
|
|
404
405
|
e.isConnected && (e.style.clipPath = "", e.style.overflow = "", e.style.willChange = "");
|
|
405
406
|
}), p(() => l), C(this.disconnecting)).subscribe(), this.dispatchScopedEvent("window-toggle", { state: "expanded" });
|
|
406
407
|
}
|
|
407
|
-
|
|
408
|
-
let e = this.
|
|
408
|
+
animateClose() {
|
|
409
|
+
let e = this.containerRef.value;
|
|
409
410
|
if (!e) return;
|
|
410
411
|
if (i.value) {
|
|
411
412
|
e.style.clipPath = this.closedClipPath, e.style.overflow = "hidden", this.open = !1;
|
|
412
|
-
let t = this.
|
|
413
|
+
let t = this.bodyRef.value;
|
|
413
414
|
t && (t.inert = !0, t.style.visibility = "hidden"), this.dispatchScopedEvent("window-toggle", { state: "collapsed" });
|
|
414
415
|
return;
|
|
415
416
|
}
|
|
416
|
-
this.
|
|
417
|
+
this.currentAnimation?.cancel(), e.style.overflow = "hidden", e.style.willChange = "opacity";
|
|
417
418
|
let t = [{
|
|
418
419
|
clipPath: this.openClipPath,
|
|
419
420
|
opacity: 1
|
|
@@ -425,27 +426,27 @@ var V = 48, H = class extends e {
|
|
|
425
426
|
easing: "cubic-bezier(0.4, 0, 0.8, 0.15)",
|
|
426
427
|
fill: "forwards"
|
|
427
428
|
});
|
|
428
|
-
this.
|
|
429
|
+
this.currentAnimation = n, _(n.finished).pipe(S(1), w(() => {
|
|
429
430
|
this.open = !1, e.style.willChange = "";
|
|
430
|
-
let t = this.
|
|
431
|
+
let t = this.bodyRef.value;
|
|
431
432
|
t && (t.inert = !0, t.style.visibility = "hidden");
|
|
432
433
|
}), p(() => l), C(this.disconnecting)).subscribe(), this.dispatchScopedEvent("window-toggle", { state: "collapsed" });
|
|
433
434
|
}
|
|
434
|
-
|
|
435
|
-
let t = this.
|
|
435
|
+
applyDragVisuals(e) {
|
|
436
|
+
let t = this.headRef.value, n = this.containerRef.value;
|
|
436
437
|
t && (t.classList.toggle("cursor-grabbing", e), t.classList.toggle("cursor-move", !e)), n && (n.style.opacity = e ? "0.95" : "");
|
|
437
438
|
}
|
|
438
439
|
toggle() {
|
|
439
|
-
this.open ? this.
|
|
440
|
+
this.open ? this.animateClose() : this.animateOpen();
|
|
440
441
|
}
|
|
441
442
|
expand() {
|
|
442
|
-
this.open || this.
|
|
443
|
+
this.open || this.animateOpen();
|
|
443
444
|
}
|
|
444
445
|
close() {
|
|
445
|
-
this.open && this.
|
|
446
|
+
this.open && this.animateClose();
|
|
446
447
|
}
|
|
447
448
|
render() {
|
|
448
|
-
let e = this.
|
|
449
|
+
let e = this.currentCorner.startsWith("bottom"), t = T({
|
|
449
450
|
fixed: !0,
|
|
450
451
|
flex: !0,
|
|
451
452
|
"flex-col": e,
|
|
@@ -469,23 +470,23 @@ var V = 48, H = class extends e {
|
|
|
469
470
|
});
|
|
470
471
|
return j`
|
|
471
472
|
<schmancy-surface
|
|
472
|
-
${P(this.
|
|
473
|
+
${P(this.containerRef)}
|
|
473
474
|
type="glass"
|
|
474
475
|
.elevation=${this.elevation}
|
|
475
476
|
class=${t}
|
|
476
477
|
style=${n}
|
|
477
478
|
aria-expanded=${this.open}
|
|
478
|
-
@pointerdown=${this.
|
|
479
|
+
@pointerdown=${this.handleFocus}
|
|
479
480
|
>
|
|
480
481
|
<!-- Details section (visually above summary for bottom corners) -->
|
|
481
482
|
<section
|
|
482
|
-
${P(this.
|
|
483
|
+
${P(this.bodyRef)}
|
|
483
484
|
class="flex-1 min-h-0 overflow-hidden flex flex-col"
|
|
484
485
|
style=${r}
|
|
485
486
|
role="region"
|
|
486
487
|
aria-label="Expandable content"
|
|
487
488
|
>
|
|
488
|
-
${this.
|
|
489
|
+
${this.hasOpened ? j`<slot name="details"></slot>` : M}
|
|
489
490
|
</section>
|
|
490
491
|
|
|
491
492
|
<!-- Summary section -- always interactive, always visible -->
|
|
@@ -497,7 +498,7 @@ var V = 48, H = class extends e {
|
|
|
497
498
|
})}
|
|
498
499
|
>
|
|
499
500
|
<div
|
|
500
|
-
${P(this.
|
|
501
|
+
${P(this.headRef)}
|
|
501
502
|
${a({
|
|
502
503
|
radius: 200,
|
|
503
504
|
intensity: .1
|
|
@@ -507,7 +508,7 @@ var V = 48, H = class extends e {
|
|
|
507
508
|
tabindex="0"
|
|
508
509
|
title="Drag to move, click to expand"
|
|
509
510
|
aria-label="${this.open ? "Collapse window" : "Expand window"}"
|
|
510
|
-
@keydown=${this.
|
|
511
|
+
@keydown=${this.handleHeadKeydown}
|
|
511
512
|
>
|
|
512
513
|
<div class="flex-1 min-w-0">
|
|
513
514
|
<slot></slot>
|
|
@@ -534,6 +535,6 @@ t([O({ type: String })], H.prototype, "id", void 0), t([O({ type: String })], H.
|
|
|
534
535
|
})], H.prototype, "visualState", void 0), t([O({ type: Number })], H.prototype, "minWidth", void 0), t([O({ type: Number })], H.prototype, "minHeight", void 0), t([O({
|
|
535
536
|
type: Boolean,
|
|
536
537
|
reflect: !0
|
|
537
|
-
})], H.prototype, "open", void 0), t([k()], H.prototype, "
|
|
538
|
+
})], H.prototype, "open", void 0), t([k()], H.prototype, "hasOpened", void 0), t([k()], H.prototype, "currentCorner", void 0);
|
|
538
539
|
var U = H = R = t([D("schmancy-window")], H);
|
|
539
540
|
export { z as n, U as t };
|