@mhmo91/schmancy 0.10.33 → 0.10.34
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 +7 -22
- package/dist/SchmancyElement-CA0Wqt8m.js +284 -0
- package/dist/{SchmancyElement-DuzT2AMa.js.map → SchmancyElement-CA0Wqt8m.js.map} +1 -1
- package/dist/SchmancyElement-CYIif26I.cjs +2 -0
- package/dist/{SchmancyElement-D8_z9JrW.cjs.map → SchmancyElement-CYIif26I.cjs.map} +1 -1
- package/dist/agent/schmancy.agent.js +1181 -1288
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +4 -10
- package/dist/{area-WGfTrwcJ.cjs → area-CTSTgjlx.cjs} +1 -1
- package/dist/{area-WGfTrwcJ.cjs.map → area-CTSTgjlx.cjs.map} +1 -1
- package/dist/{area-0l8V7HlF.js → area-DviXdbDx.js} +2 -2
- package/dist/{area-0l8V7HlF.js.map → area-DviXdbDx.js.map} +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{audio-x9oLVKBH.js → audio-DFYoaw0M.js} +1 -1
- package/dist/{audio-x9oLVKBH.js.map → audio-DFYoaw0M.js.map} +1 -1
- package/dist/{audio-9QLk4pU-.cjs → audio-Q9oB_cQR.cjs} +1 -1
- package/dist/{audio-9QLk4pU-.cjs.map → audio-Q9oB_cQR.cjs.map} +1 -1
- package/dist/audio.cjs +1 -1
- package/dist/audio.js +2 -2
- package/dist/{autocomplete-sjZovPcs.js → autocomplete-BDvuma6D.js} +3 -3
- package/dist/{autocomplete-sjZovPcs.js.map → autocomplete-BDvuma6D.js.map} +1 -1
- package/dist/{autocomplete-CjjfXbJC.cjs → autocomplete-DmLXJr7C.cjs} +1 -1
- package/dist/{autocomplete-CjjfXbJC.cjs.map → autocomplete-DmLXJr7C.cjs.map} +1 -1
- 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-BgpWcLnV.cjs +38 -0
- package/dist/boat-BgpWcLnV.cjs.map +1 -0
- package/dist/boat-Y5UMiJCV.js +216 -0
- package/dist/boat-Y5UMiJCV.js.map +1 -0
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +2 -2
- package/dist/{busy-DDKXlzDA.cjs → busy-CgzZbGfx.cjs} +1 -1
- package/dist/{busy-DDKXlzDA.cjs.map → busy-CgzZbGfx.cjs.map} +1 -1
- package/dist/{busy-DwD-XHqS.js → busy-DgQ4ux5N.js} +2 -2
- package/dist/{busy-DwD-XHqS.js.map → busy-DgQ4ux5N.js.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/{button-nDZQe1ES.cjs → button-DFvR1iXX.cjs} +1 -1
- package/dist/{button-nDZQe1ES.cjs.map → button-DFvR1iXX.cjs.map} +1 -1
- package/dist/{button-qARUurjf.js → button-qbN1muQ0.js} +2 -2
- package/dist/{button-qARUurjf.js.map → button-qbN1muQ0.js.map} +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +3 -3
- package/dist/{card-D3IxxBBP.js → card-DAbr-7Vy.js} +2 -2
- package/dist/{card-D3IxxBBP.js.map → card-DAbr-7Vy.js.map} +1 -1
- package/dist/{card-DWZhZ5Ds.cjs → card-D_GlwZ5q.cjs} +1 -1
- package/dist/{card-DWZhZ5Ds.cjs.map → card-D_GlwZ5q.cjs.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-t__wRS-9.js → checkbox-BNORaxMF.js} +2 -2
- package/dist/{checkbox-t__wRS-9.js.map → checkbox-BNORaxMF.js.map} +1 -1
- package/dist/{checkbox-BBttnA_a.cjs → checkbox-BUY_uc_r.cjs} +1 -1
- package/dist/{checkbox-BBttnA_a.cjs.map → checkbox-BUY_uc_r.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-DIZFWnDZ.cjs → chips-CXZ4dJCK.cjs} +1 -1
- package/dist/{chips-DIZFWnDZ.cjs.map → chips-CXZ4dJCK.cjs.map} +1 -1
- package/dist/{chips-xaoSmwBK.js → chips-Dg6Lk6BT.js} +4 -4
- package/dist/{chips-xaoSmwBK.js.map → chips-Dg6Lk6BT.js.map} +1 -1
- 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/{date-range-8OkCahnR.js → date-range-BU6WX7d5.js} +3 -3
- package/dist/{date-range-8OkCahnR.js.map → date-range-BU6WX7d5.js.map} +1 -1
- package/dist/{date-range-Bbzg9aym.cjs → date-range-C-_be3_E.cjs} +1 -1
- package/dist/{date-range-Bbzg9aym.cjs.map → date-range-C-_be3_E.cjs.map} +1 -1
- package/dist/{date-range-inline-BEP-oWJZ.js → date-range-inline-7o7xtVIu.js} +2 -2
- package/dist/{date-range-inline-BEP-oWJZ.js.map → date-range-inline-7o7xtVIu.js.map} +1 -1
- package/dist/{date-range-inline-lhkwHFxY.cjs → date-range-inline-DJtUmHKF.cjs} +1 -1
- package/dist/{date-range-inline-lhkwHFxY.cjs.map → date-range-inline-DJtUmHKF.cjs.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-3X9YKpuP.cjs → details-Bs0MyyvF.cjs} +1 -1
- package/dist/{details-3X9YKpuP.cjs.map → details-Bs0MyyvF.cjs.map} +1 -1
- package/dist/{details-BO_3CCNn.js → details-EfbDPVEo.js} +2 -2
- package/dist/{details-BO_3CCNn.js.map → details-EfbDPVEo.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{directives-BOsvcH83.cjs → directives-fLwDj6b0.cjs} +1 -1
- package/dist/{directives-BOsvcH83.cjs.map → directives-fLwDj6b0.cjs.map} +1 -1
- package/dist/{directives-D7AoVfPK.js → directives-zi1Mm2er.js} +3 -3
- package/dist/{directives-D7AoVfPK.js.map → directives-zi1Mm2er.js.map} +1 -1
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +2 -2
- package/dist/{divider-BHgrisGQ.js → divider-CEPfrIwe.js} +2 -2
- package/dist/{divider-BHgrisGQ.js.map → divider-CEPfrIwe.js.map} +1 -1
- package/dist/{divider-D21yKZNJ.cjs → divider-CdIsWZrM.cjs} +1 -1
- package/dist/{divider-D21yKZNJ.cjs.map → divider-CdIsWZrM.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-wRphbpW6.cjs → expand--at1k3qo.cjs} +1 -1
- package/dist/{expand-wRphbpW6.cjs.map → expand--at1k3qo.cjs.map} +1 -1
- package/dist/{expand-2TTbmm_z.js → expand-g1vqqUp1.js} +3 -3
- package/dist/{expand-2TTbmm_z.js.map → expand-g1vqqUp1.js.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{float-dtDqRmcL.js → float-DxVzgI9o.js} +2 -2
- package/dist/{float-dtDqRmcL.js.map → float-DxVzgI9o.js.map} +1 -1
- package/dist/{float-B0L_CH4v.cjs → float-P9HukAm-.cjs} +1 -1
- package/dist/{float-B0L_CH4v.cjs.map → float-P9HukAm-.cjs.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{form-DvqHReDF.cjs → form-ByYhXe1p.cjs} +1 -1
- package/dist/{form-DvqHReDF.cjs.map → form-ByYhXe1p.cjs.map} +1 -1
- package/dist/{form-BxY-9F6N.js → form-CqLaozHp.js} +3 -3
- package/dist/{form-BxY-9F6N.js.map → form-CqLaozHp.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +10 -10
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/{icons-CO8UrTJQ.js → icons-CkphcMp6.js} +2 -2
- package/dist/{icons-CO8UrTJQ.js.map → icons-CkphcMp6.js.map} +1 -1
- package/dist/{icons-BbC4t44c.cjs → icons-DYtiRU5V.cjs} +1 -1
- package/dist/{icons-BbC4t44c.cjs.map → icons-DYtiRU5V.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-BepoWz9Z.cjs → iframe-C3trkP8q.cjs} +1 -1
- package/dist/{iframe-BepoWz9Z.cjs.map → iframe-C3trkP8q.cjs.map} +1 -1
- package/dist/{iframe-t5zo89Fs.js → iframe-CjqJksl8.js} +2 -2
- package/dist/{iframe-t5zo89Fs.js.map → iframe-CjqJksl8.js.map} +1 -1
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +37 -37
- package/dist/{input-2OR6wjfT.js → input-CG51zDVh.js} +2 -2
- package/dist/{input-2OR6wjfT.js.map → input-CG51zDVh.js.map} +1 -1
- package/dist/{input-B-wPPC5o.cjs → input-DuavpwNL.cjs} +1 -1
- package/dist/{input-B-wPPC5o.cjs.map → input-DuavpwNL.cjs.map} +1 -1
- package/dist/{input-chip-O5-pgek1.cjs → input-chip-57tgNXKT.cjs} +1 -1
- package/dist/{input-chip-O5-pgek1.cjs.map → input-chip-57tgNXKT.cjs.map} +1 -1
- package/dist/{input-chip-NBsnZkzu.js → input-chip-C6Lq1927.js} +2 -2
- package/dist/{input-chip-NBsnZkzu.js.map → input-chip-C6Lq1927.js.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-D7nKwpa5.cjs → layout-6ipbiWTl.cjs} +1 -1
- package/dist/{layout-D7nKwpa5.cjs.map → layout-6ipbiWTl.cjs.map} +1 -1
- package/dist/{layout-CJ01zE9V.js → layout-D4IOwx7p.js} +1 -1
- package/dist/{layout-CJ01zE9V.js.map → layout-D4IOwx7p.js.map} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +2 -2
- package/dist/{lightbox-Droe9dYY.js → lightbox-CsyO2XSr.js} +2 -2
- package/dist/{lightbox-Droe9dYY.js.map → lightbox-CsyO2XSr.js.map} +1 -1
- package/dist/{lightbox-DVpvjsYb.cjs → lightbox-H8pVWGMX.cjs} +1 -1
- package/dist/{lightbox-DVpvjsYb.cjs.map → lightbox-H8pVWGMX.cjs.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-DzAWv99q.js → list-BAwH0pQW.js} +2 -2
- package/dist/{list-DzAWv99q.js.map → list-BAwH0pQW.js.map} +1 -1
- package/dist/{list-JjUsFCP6.cjs → list-Bs9m8kw7.cjs} +1 -1
- package/dist/{list-JjUsFCP6.cjs.map → list-Bs9m8kw7.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{menu-B5EKUeeD.cjs → menu-BMcGzj1h.cjs} +1 -1
- package/dist/{menu-B5EKUeeD.cjs.map → menu-BMcGzj1h.cjs.map} +1 -1
- package/dist/{menu-CgdXrzir.js → menu-tQVARVaC.js} +3 -3
- package/dist/{menu-CgdXrzir.js.map → menu-tQVARVaC.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/{mixins-Cevarn7V.js → mixins-Bp0wIHg2.js} +1 -1
- package/dist/{mixins-Cevarn7V.js.map → mixins-Bp0wIHg2.js.map} +1 -1
- package/dist/{mixins-JyO9GSGy.cjs → mixins-CGXSzZc7.cjs} +1 -1
- package/dist/{mixins-JyO9GSGy.cjs.map → mixins-CGXSzZc7.cjs.map} +1 -1
- 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 +1 -1
- package/dist/navigation-rail.js +2 -2
- package/dist/{notification-CaeRS5US.cjs → notification-Bz00zdpV.cjs} +1 -1
- package/dist/{notification-CaeRS5US.cjs.map → notification-Bz00zdpV.cjs.map} +1 -1
- package/dist/{notification-Dxwx0Zln.js → notification-D1tX2nx5.js} +4 -4
- package/dist/{notification-Dxwx0Zln.js.map → notification-D1tX2nx5.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-C6wXFQOM.cjs → option-BnybLEDO.cjs} +1 -1
- package/dist/{option-C6wXFQOM.cjs.map → option-BnybLEDO.cjs.map} +1 -1
- package/dist/{option-BCnYutZz.js → option-BpGV8Apj.js} +2 -2
- package/dist/{option-BCnYutZz.js.map → option-BpGV8Apj.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-BWcB2pRx.js → overlay-BpNhd74N.js} +24 -7
- package/dist/overlay-BpNhd74N.js.map +1 -0
- package/dist/{overlay-5PMZ75PO.cjs → overlay-UQR2Dy3u.cjs} +18 -3
- package/dist/overlay-UQR2Dy3u.cjs.map +1 -0
- package/dist/overlay.cjs +1 -1
- package/dist/{overlay.confirm-body-B7W0DOGS.js → overlay.confirm-body-BHcXu5Wk.js} +6 -6
- package/dist/{overlay.confirm-body-B7W0DOGS.js.map → overlay.confirm-body-BHcXu5Wk.js.map} +1 -1
- package/dist/{overlay.confirm-body-CsvwcBvG.cjs → overlay.confirm-body-CVDtVk5X.cjs} +1 -1
- package/dist/{overlay.confirm-body-CsvwcBvG.cjs.map → overlay.confirm-body-CVDtVk5X.cjs.map} +1 -1
- package/dist/overlay.js +3 -3
- package/dist/{overlay.service-CC4zckoV.cjs → overlay.service-C8RsQzgM.cjs} +1 -1
- package/dist/{overlay.service-CC4zckoV.cjs.map → overlay.service-C8RsQzgM.cjs.map} +1 -1
- package/dist/{overlay.service-zx465FI8.js → overlay.service-DTE6NwIM.js} +2 -2
- package/dist/{overlay.service-zx465FI8.js.map → overlay.service-DTE6NwIM.js.map} +1 -1
- package/dist/{progress-BoFm3r6h.js → progress-CAKsxp29.js} +2 -2
- package/dist/{progress-BoFm3r6h.js.map → progress-CAKsxp29.js.map} +1 -1
- package/dist/{progress-Bc_IBaNH.cjs → progress-gbIALDRs.cjs} +1 -1
- package/dist/{progress-Bc_IBaNH.cjs.map → progress-gbIALDRs.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-C34WDjrN.cjs → radio-group-CfJ5DtI4.cjs} +1 -1
- package/dist/{radio-group-C34WDjrN.cjs.map → radio-group-CfJ5DtI4.cjs.map} +1 -1
- package/dist/{radio-group-DnHhGrXp.js → radio-group-otyvZvUk.js} +2 -2
- package/dist/{radio-group-DnHhGrXp.js.map → radio-group-otyvZvUk.js.map} +1 -1
- 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-D61MbhmA.cjs → select-81jniVTs.cjs} +1 -1
- package/dist/{select-D61MbhmA.cjs.map → select-81jniVTs.cjs.map} +1 -1
- package/dist/{select-C_ljy5k4.js → select-9vXx1fhr.js} +3 -3
- package/dist/{select-C_ljy5k4.js.map → select-9vXx1fhr.js.map} +1 -1
- 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/boat.md +27 -18
- package/dist/skills/schmancy/boat.md +27 -18
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +2 -2
- package/dist/{sound.service-Czs3gmRx.cjs → sound.service-CmIw63aM.cjs} +1 -1
- package/dist/{sound.service-Czs3gmRx.cjs.map → sound.service-CmIw63aM.cjs.map} +1 -1
- package/dist/{sound.service-Cuo4-X_-.js → sound.service-D3ZSq1Kj.js} +1 -1
- package/dist/{sound.service-Cuo4-X_-.js.map → sound.service-D3ZSq1Kj.js.map} +1 -1
- package/dist/{splash-screen-CbcYpkIx.js → splash-screen-BOjrmGLk.js} +2 -2
- package/dist/{splash-screen-CbcYpkIx.js.map → splash-screen-BOjrmGLk.js.map} +1 -1
- package/dist/{splash-screen-C0oeDPxV.cjs → splash-screen-C5KAWXvA.cjs} +1 -1
- package/dist/{splash-screen-C0oeDPxV.cjs.map → splash-screen-C5KAWXvA.cjs.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-DEgL_xJv.cjs → src-Bm1vop0l.cjs} +1 -1
- package/dist/{src-DEgL_xJv.cjs.map → src-Bm1vop0l.cjs.map} +1 -1
- package/dist/{src-CdX0NekF.js → src-DoOhMBtI.js} +35 -35
- package/dist/{src-CdX0NekF.js.map → src-DoOhMBtI.js.map} +1 -1
- package/dist/{state-B-5H9i10.js → state-CWBRTSvE.js} +1 -1
- package/dist/{state-B-5H9i10.js.map → state-CWBRTSvE.js.map} +1 -1
- package/dist/{state-D85Se4Fx.cjs → state-Cex3rmx2.cjs} +1 -1
- package/dist/{state-D85Se4Fx.cjs.map → state-Cex3rmx2.cjs.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-gZpeCF6E.js → surface-9S5scTsD.js} +2 -2
- package/dist/{surface-gZpeCF6E.js.map → surface-9S5scTsD.js.map} +1 -1
- package/dist/{surface-DHPaLOTA.cjs → surface-PfiejLuw.cjs} +1 -1
- package/dist/{surface-DHPaLOTA.cjs.map → surface-PfiejLuw.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +2 -2
- package/dist/table.cjs +1 -1
- package/dist/table.js +2 -2
- package/dist/{tabs-DJNdoE-x.js → tabs-BBOjAmgG.js} +2 -2
- package/dist/{tabs-DJNdoE-x.js.map → tabs-BBOjAmgG.js.map} +1 -1
- package/dist/{tabs-DgaVwuOo.cjs → tabs-uYvb1P06.cjs} +1 -1
- package/dist/{tabs-DgaVwuOo.cjs.map → tabs-uYvb1P06.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-8x0prbgm.js → textarea-QzSj8Dkl.js} +2 -2
- package/dist/{textarea-8x0prbgm.js.map → textarea-QzSj8Dkl.js.map} +1 -1
- package/dist/{textarea-2QE5z6Ny.cjs → textarea-YPHX4g7Y.cjs} +1 -1
- package/dist/{textarea-2QE5z6Ny.cjs.map → textarea-YPHX4g7Y.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-DSD9Bs69.js → theme-C2Mp-VGt.js} +4 -4
- package/dist/{theme-DSD9Bs69.js.map → theme-C2Mp-VGt.js.map} +1 -1
- package/dist/{theme-button-Dpr6SGzB.cjs → theme-button-CJmhxfMe.cjs} +1 -1
- package/dist/{theme-button-Dpr6SGzB.cjs.map → theme-button-CJmhxfMe.cjs.map} +1 -1
- package/dist/{theme-button-nd6Z7plT.js → theme-button-DGWAXhzd.js} +2 -2
- package/dist/{theme-button-nd6Z7plT.js.map → theme-button-DGWAXhzd.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/{theme-D0yboni1.cjs → theme-iKUaS9JB.cjs} +1 -1
- package/dist/{theme-D0yboni1.cjs.map → theme-iKUaS9JB.cjs.map} +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +3 -3
- package/dist/{theme.service-mRlvWZVs.js → theme.service-hc4N-1Oz.js} +1 -1
- package/dist/{theme.service-mRlvWZVs.js.map → theme.service-hc4N-1Oz.js.map} +1 -1
- package/dist/{theme.service-LtQw04e6.cjs → theme.service-p61RsJBF.cjs} +1 -1
- package/dist/{theme.service-LtQw04e6.cjs.map → theme.service-p61RsJBF.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +2 -2
- package/dist/{typography-CiZQpzE4.cjs → typography-Bdt8RlX2.cjs} +1 -1
- package/dist/{typography-CiZQpzE4.cjs.map → typography-Bdt8RlX2.cjs.map} +1 -1
- package/dist/{typography-DXyf-KdK.js → typography-DwV0sqht.js} +2 -2
- package/dist/{typography-DXyf-KdK.js.map → typography-DwV0sqht.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-qKfP5c6M.cjs → window-D2WfvNng.cjs} +1 -1
- package/dist/{window-qKfP5c6M.cjs.map → window-D2WfvNng.cjs.map} +1 -1
- package/dist/{window-C_ATa3qM.js → window-n4jN60B_.js} +3 -3
- package/dist/{window-C_ATa3qM.js.map → window-n4jN60B_.js.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -1
- package/skills/schmancy/boat.md +27 -18
- package/src/boat/boat.ts +121 -365
- package/src/overlay/overlay.component.ts +28 -0
- package/types/src/boat/boat.d.ts +18 -25
- package/types/src/overlay/overlay.component.d.ts +1 -0
- package/dist/SchmancyElement-D8_z9JrW.cjs +0 -2
- package/dist/SchmancyElement-DuzT2AMa.js +0 -284
- package/dist/boat-CEaQaCmG.js +0 -339
- package/dist/boat-CEaQaCmG.js.map +0 -1
- package/dist/boat-CI5rcGS5.cjs +0 -85
- package/dist/boat-CI5rcGS5.cjs.map +0 -1
- package/dist/overlay-5PMZ75PO.cjs.map +0 -1
- package/dist/overlay-BWcB2pRx.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boat-Y5UMiJCV.js","names":["#sub","#captured","#ready"],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html, nothing, type PropertyValues } from 'lit'\nimport { customElement, property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { when } from 'lit/directives/when.js'\nimport { filter, finalize, fromEvent, map, merge, type Subscription, switchMap, takeUntil, tap } from 'rxjs'\nimport { SPRING_SMOOTH } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { show } from '../overlay/overlay.service'\nimport { theme } from '../theme/theme.service.js'\n\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n/**\n * Material-3 extended FAB that delegates its expanded panel to the `show()`\n * overlay service. Collapsed: a draggable, corner-anchored pill (icon + label,\n * circular when no label). Activated: the default-slot content blooms from the\n * FAB as an overlay (backdrop / Esc / back-button / sheet-on-narrow handled by\n * the overlay primitive).\n */\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\tstatic styles = [css`\n\t\t:host {\n\t\t\tdisplay: contents;\n\t\t}\n\t\t:host([hidden]) {\n\t\t\tdisplay: none !important;\n\t\t}\n\t`]\n\n\t@property({ type: String }) id: string = 'default'\n\t@property({ type: String }) icon?: string\n\t@property({ type: String }) label?: string\n\t/** When true, uses a lower elevation shadow on the FAB. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the FAB is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Open state. Bind `?open=${…}` to drive the overlay; reflected to the attribute. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t@state() private isDragging = false\n\t@state() private _currentCorner: Corner = 'bottom-right'\n\n\t@queryAssignedElements() private _slotted!: Element[]\n\n\tprivate _position: Position = { x: 16, y: 16 }\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _headerRef = createRef<HTMLElement>()\n\tprivate _currentAnimation?: Animation\n\n\t#ready = false\n\t#sub?: Subscription\n\t#captured: Element[] = []\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate _applyContainerPosition() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\n\t\tconst { x, y } = this._position\n\t\tif (this._currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this._currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate _loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis._position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis._currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this._position, anchor: this._currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _validateBounds() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this._currentCorner.includes('right')\n\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this._position.x - rect.width : this._position.x\n\t\tconst actualTop = isBottom ? vh - this._position.y - rect.height : this._position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis._position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis._applyContainerPosition()\n\t}\n\n\t// ============================================\n\t// CORNER SNAPPING (FLIP)\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(): void {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\tconst rect = container.getBoundingClientRect()\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = rect.top + rect.height / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tthis._currentCorner = `${vert}-${side}` as Corner\n\t\tthis._position = { x: 16, y: 16 }\n\t\tthis._applyContainerPosition()\n\n\t\tif (reducedMotion$.value) {\n\t\t\tthis._savePosition()\n\t\t\treturn\n\t\t}\n\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.transform = `translate(${dx}px, ${dy}px)`\n\n\t\tthis._currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tthis._currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) container.style.transform = ''\n\t\t\treturn\n\t\t})\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _setupDrag() {\n\t\tconst header = this._headerRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (!header || !container) return\n\n\t\tlet didDrag = false\n\n\t\tfromEvent<PointerEvent>(header, 'pointerdown')\n\t\t\t.pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\theader.setPointerCapture(e.pointerId)\n\t\t\t\t}),\n\t\t\t\tmap(e => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tdidDrag = false\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\trect,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ pointerId, startX, startY, offsetX, offsetY, rect }) => {\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === pointerId\n\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(filter(sameId))\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\tconst top = Math.max(0, Math.min(clientY - offsetY, vh - rect.height))\n\t\t\t\t\t\t\tthis._position = {\n\t\t\t\t\t\t\t\tx: this._currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\ty: this._currentCorner.includes('bottom') ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\tthis.toggle()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t// ============================================\n\t// OVERLAY DELEGATION\n\t// ============================================\n\n\tprivate _openOverlay() {\n\t\tif (this.#sub) return\n\t\tconst anchor = this._containerRef.value\n\t\tconst wrapper = document.createElement('div')\n\t\twrapper.className = 'flex flex-col'\n\t\tthis.#captured = [...this._slotted]\n\t\tthis.#captured.forEach(node => wrapper.appendChild(node))\n\n\t\tthis.#sub = show(wrapper, {\n\t\t\tanchor: anchor ?? undefined,\n\t\t\tdismissable: true,\n\t\t\thistoryStrategy: 'silent',\n\t\t})\n\t\t\t.pipe(\n\t\t\t\tfinalize(() => this._restoreSlotted()),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.dispatchScopedEvent('toggle', 'open')\n\t}\n\n\tprivate _restoreSlotted() {\n\t\tthis.#captured.forEach(node => this.appendChild(node))\n\t\tthis.#captured = []\n\t\tthis.#sub = undefined\n\t\tif (this.open) this.open = false\n\t\tthis.dispatchScopedEvent('toggle', 'closed')\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(() => this._validateBounds())\n\n\t\ttheme.bottomOffset$.pipe(\n\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\tthis._currentCorner = this.corner\n\t\tthis._loadPosition()\n\t\tif (!this._containerRef.value) return\n\t\tthis._applyContainerPosition()\n\t\tthis._setupDrag()\n\t\tthis.#ready = true\n\t\tif (this.open) this._openOverlay()\n\t}\n\n\tprotected willUpdate(changed: PropertyValues<this>) {\n\t\tif (!this.#ready || !changed.has('open')) return\n\t\tif (this.open && !this.#sub) this._openOverlay()\n\t\telse if (!this.open && this.#sub) this.#sub.unsubscribe()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._currentAnimation?.cancel()\n\t\tthis.#sub?.unsubscribe()\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\t/** Flip open ↔ closed. */\n\ttoggle() {\n\t\tthis.open = !this.open\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprotected render(): unknown {\n\t\tconst containerClasses = classMap({\n\t\t\t'inline-flex': true,\n\t\t\t'rounded-full': true,\n\t\t\t'overflow-hidden': true,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t\t'opacity-85': this.isDragging,\n\t\t\t'scale-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\n\t\t\t'pointer-events': 'auto',\n\t\t})\n\n\t\tconst fabClasses = classMap({\n\t\t\t'h-14': true,\n\t\t\t'rounded-full': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-3': true,\n\t\t\t'select-none': true,\n\t\t\t'touch-none': true,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-pointer': !this.isDragging,\n\t\t\t'px-5': !!this.label,\n\t\t\t'w-14': !this.label,\n\t\t\t'justify-center': !this.label,\n\t\t})\n\n\t\treturn html`\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\t.elevation=${this.lowered ? 1 : 3}\n\t\t\t\tclass=${containerClasses}\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\t${ref(this._headerRef)}\n\t\t\t\t\tclass=${fabClasses}\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\taria-label=${this.label ?? 'Open panel'}\n\t\t\t\t\ttitle=\"Drag to move · click to open\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"header\">\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\t!!this.icon,\n\t\t\t\t\t\t\t() => html`<schmancy-icon>${this.icon}</schmancy-icon>`,\n\t\t\t\t\t\t\t() => nothing,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</slot>\n\t\t\t\t\t${when(\n\t\t\t\t\t\t!!this.label,\n\t\t\t\t\t\t() => html`<schmancy-typography type=\"label\" token=\"lg\" class=\"whitespace-nowrap\">\n\t\t\t\t\t\t\t${this.label}\n\t\t\t\t\t\t</schmancy-typography>`,\n\t\t\t\t\t\t() => nothing,\n\t\t\t\t\t)}\n\t\t\t\t\t<slot name=\"summary\"></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Default-slot content parks here (hidden) while collapsed;\n\t\t\t\t relocated into the show() overlay on open. -->\n\t\t\t\t<div hidden><slot></slot></div>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-boat': SchmancyBoat\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,IACM,IAA8B,kBAgBrB,IAAA,cAA2B,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,CAAA,GAAA,KAAA,KAUA,WAAA,KAAA,UAAA,CAIsB,GAAA,KAAA,SAElB,gBAAA,KAAA,OAAA,CAEe,GAAA,KAAA,aAAA,CAE9B,GAAA,KAAA,iBACY,gBAAA,KAAA,YAIZ;GAAE,GAAG;GAAI,GAAG;EAAA,GAAA,KAAA,gBAClB,EAAA,GAAA,KAAA,aACH,EAAA,GAAA,KAAA,KAAA,CAGZ,GAAA,KAAA,KAEc,CAAA;CAAA;CAAA;EAAA,KAAA,SA/BP,CAAC,CAAG;;;;;;;;;CA6BpB;CACA;CACA;CAMA,0BAAA;EACC,IAAM,IAAY,KAAK,cAAc;EACrC,IAAA,CAAK,GAAW;EAChB,EAAU,MAAM,eAAe,MAAA,GAC/B,EAAU,MAAM,eAAe,OAAA,GAC/B,EAAU,MAAM,eAAe,KAAA,GAC/B,EAAU,MAAM,eAAe,QAAA;EAC/B,IAAA,EAAM,GAAE,GAAA,GAAG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MAAM,OAAA,CAAA,CAAA,GAAQ,EAAA,WAAA,QAAA,KAAA,CAAA,GAAA,EAAA,CACzB,EAAS,EAAE,MAAM,OAAA,CAAA,CAAA,GAAQ,EAAA,WAAA,SAAA,KAAA,CAAA,GAAA,EAAA,CAEzB,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;AAAA,CAAA,CAAA,GAAM,EAAA,WAAA,WAAA,KAAA,CAAA,GAAA,EAAA,CAEzC,EAAS,EAAE,MAAM,OAAA,CAAA,CAAA,GAAQ,EAAA,WAAA,UAAA,KAAA,CAAA,GAAA,EAAA,CAEzB,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;AAAA,CAAA,CAAA,GAAM,EAAA,WAAA,QAAA,KAAA,CAAA,GAAA,EAAA,CAEzC,EAAA,CAAA,GAAM,EAAA,WAAA,cAAA,KAAA,CAAA,GAAA,EAAA,CACN,EAAA,CAAA,GAAM,EAAA,WAAA,kBAAA,KAAA,CAAA,GAAA,EAAA,CAEN,EAAA,CAAA,GAAsB,EAAA,WAAA,YAAA,KAAA,CAAA;AAAA,IAAA,IAAA,IAAA,EAAA,CAxBvB,EAAc,eAAA,CAAA,GAAe,CAAA;AAAA,SAAA,KAAA"}
|
package/dist/boat.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./boat-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./boat-BgpWcLnV.cjs`);exports.SchmancyBoat=e.t;
|
package/dist/boat.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./boat-
|
|
1
|
+
import { t as e } from "./boat-Y5UMiJCV.js";
|
|
2
2
|
export { e as SchmancyBoat };
|
package/dist/breadcrumb.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-CYIif26I.cjs`);require(`./mixins-CGXSzZc7.cjs`);let t=require(`lit/decorators.js`),n=require(`lit`);var r=class extends e.t{constructor(...e){super(...e),this.separator=`/`}static{this.styles=[n.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
package/dist/breadcrumb.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-CA0Wqt8m.js";
|
|
2
|
+
import "./mixins-Bp0wIHg2.js";
|
|
3
3
|
import { customElement as n, property as r } from "lit/decorators.js";
|
|
4
4
|
import { css as i, html as a } from "lit";
|
|
5
5
|
var o = class extends e {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-CYIif26I.cjs`);require(`./mixins-CGXSzZc7.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
|
display: inline;
|
|
4
4
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"busy-
|
|
1
|
+
{"version":3,"file":"busy-CgzZbGfx.cjs","names":[],"sources":["../src/busy/busy.ts","../src/busy/spinner.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-busy')\nexport default class SchmancyBusy extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline;\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tpointer-events: all;\n\t\tz-index: 50;\n\t}\n`];\n\tprotected render(): unknown {\n\t\treturn html`\n\t\t\t<!-- Clean overlay with subtle backdrop -->\n\t\t\t<div class=\"absolute inset-0 flex items-center justify-center bg-surface-container/10 backdrop-blur-xs rounded-[inherit]\">\n\t\t\t\t<!-- Content container with clean surface -->\n\t\t\t\t<div class=\"relative flex items-center justify-center p-4\">\n\t\t\t\t\t\n\t\t\t\t\t<!-- Content slot -->\n\t\t\t\t\t<div class=\"relative z-10\">\n\t\t\t\t\t\t<slot>\n\t\t\t\t\t\t\t<!-- Default spinner if no content provided -->\n\t\t\t\t\t\t\t<schmancy-spinner ></schmancy-spinner>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-busy': SchmancyBusy\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-spinner')\nexport default class SchmnacySpinner extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\tcolor: inherit; /* Inherit from parent by default */\n\t}\n\n\t/* Explicit color options when needed */\n\t:host([color=\"primary\"]) {\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\n\t:host([color=\"on-primary\"]) {\n\t\tcolor: var(--schmancy-sys-color-primary-on);\n\t}\n\n\t:host([color=\"secondary\"]) {\n\t\tcolor: var(--schmancy-sys-color-secondary-default);\n\t}\n\n\t:host([color=\"on-secondary\"]) {\n\t\tcolor: var(--schmancy-sys-color-secondary-on);\n\t}\n\n\t:host([color=\"tertiary\"]) {\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\n\t:host([color=\"on-tertiary\"]) {\n\t\tcolor: var(--schmancy-sys-color-tertiary-on);\n\t}\n\n\t:host([color=\"error\"]) {\n\t\tcolor: var(--schmancy-sys-color-error-default);\n\t}\n\n\t:host([color=\"on-error\"]) {\n\t\tcolor: var(--schmancy-sys-color-error-on);\n\t}\n\n\t:host([color=\"success\"]) {\n\t\tcolor: var(--schmancy-sys-color-success-default);\n\t}\n\n\t:host([color=\"on-success\"]) {\n\t\tcolor: var(--schmancy-sys-color-success-on);\n\t}\n\n\t:host([color=\"surface\"]) {\n\t\tcolor: var(--schmancy-sys-color-surface-default);\n\t}\n\n\t:host([color=\"on-surface\"]) {\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t:host([color=\"surface-variant\"]) {\n\t\tcolor: var(--schmancy-sys-color-surface-variant-default);\n\t}\n\n\t:host([color=\"on-surface-variant\"]) {\n\t\tcolor: var(--schmancy-sys-color-surface-onVariant);\n\t}\n\n\t.spinner {\n\t\tanimation: spin 1s linear infinite;\n\t\tanimation-direction: reverse;\n\t}\n\n\t@keyframes spin {\n\t\tfrom {\n\t\t\ttransform: rotate(0deg);\n\t\t}\n\t\tto {\n\t\t\ttransform: rotate(360deg);\n\t\t}\n\t}\n`];\n\t@property({ type: String, reflect: true })\n\tcolor?: 'primary' | 'on-primary' | 'secondary' | 'on-secondary' |\n\t 'tertiary' | 'on-tertiary' | 'error' | 'on-error' |\n\t 'success' | 'on-success' | 'surface' | 'on-surface' |\n\t 'surface-variant' | 'on-surface-variant'\n\n\t/**\n\t * Size of the spinner - M3 aligned tokens or numeric Tailwind units\n\t * Tokens: 'xxs' (12px), 'xs' (16px), 'sm' (20px), 'md' (24px), 'lg' (32px)\n\t * Numeric: Tailwind units where each unit = 4px (e.g., 6 = 24px)\n\t */\n\t@property() size: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | number = 'md'\n\t@property({ type: Boolean }) glass: boolean = false\n\n\tprotected render(): unknown {\n\t\t// M3 aligned token sizes (fit inside buttons of same token)\n\t\tconst tokenSizes: Record<string, number> = {\n\t\t\txxs: 12, // fits in 24px button (ultra-compact)\n\t\t\txs: 16, // fits in 32px button\n\t\t\tsm: 20, // fits in 40px button\n\t\t\tmd: 24, // fits in 48px button (default)\n\t\t\tlg: 32, // fits in 56px button\n\t\t}\n\n\t\t// Support both token and numeric sizes for backward compatibility\n\t\tlet sizeInPx: number\n\t\tif (typeof this.size === 'string' && this.size in tokenSizes) {\n\t\t\tsizeInPx = tokenSizes[this.size]\n\t\t} else if (typeof this.size === 'number' && !isNaN(this.size)) {\n\t\t\t// Legacy numeric: Tailwind units (each unit = 4px)\n\t\t\tsizeInPx = this.size * 4\n\t\t} else {\n\t\t\tsizeInPx = 24 // fallback to md\n\t\t}\n\n\t\tconst style = {\n\t\t\twidth: `${sizeInPx}px`,\n\t\t\theight: `${sizeInPx}px`,\n\t\t}\n\t\t\n\t\treturn this.glass ? html`\n\t\t\t<div class=\"spinner relative\" style=${this.styleMap(style)}>\n\t\t\t\t<!-- Glass container with Apple-style effect -->\n\t\t\t\t<div class=\"absolute inset-0 rounded-full backdrop-blur-xl backdrop-saturate-150\n\t\t\t\t\t\t\tbg-surface-container/20\n\t\t\t\t\t\t\tshadow-[inset_0_1px_1px_0_rgba(255,255,255,0.2)]\n\t\t\t\t\t\t\tborder border-outline-variant/30\"></div>\n\t\t\t\t\n\t\t\t\t<!-- Spinner SVG -->\n\t\t\t\t<svg fill=\"none\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" role=\"img\" \n\t\t\t\t\t style=\"width: 100%; height: 100%;\" class=\"relative z-10\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\".7\"\n\t\t\t\t\t\td=\"M8 15A7 7 0 108 1a7 7 0 000 14v0z\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t></path>\n\t\t\t\t\t<path d=\"M15 8a7 7 0 01-7 7\" stroke=\"currentColor\" stroke-width=\"2\"></path>\n\t\t\t\t\t<path d=\"M8 12a4 4 0 100-8 4 4 0 000 8z\" fill=\"currentColor\" opacity=\"0.8\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t` : html`\n\t\t\t<div class=\"spinner\" style=${this.styleMap(style)}>\n\t\t\t\t<svg fill=\"none\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" role=\"img\" style=\"width: 100%; height: 100%;\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\".5\"\n\t\t\t\t\t\td=\"M8 15A7 7 0 108 1a7 7 0 000 14v0z\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t></path>\n\t\t\t\t\t<path d=\"M15 8a7 7 0 01-7 7\" stroke=\"currentColor\" stroke-width=\"2\"></path>\n\t\t\t\t\t<path d=\"M8 12a4 4 0 100-8 4 4 0 000 8z\" fill=\"currentColor\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-spinner': SchmnacySpinner\n\t}\n}\n"],"mappings":"uKAKe,IAAA,EAAA,cAA2B,EAAA,CAAA,CAAA,OAAA,KAAA,OACzB,CAAC,EAAA,GAAG;;;;;;;;GASpB,QAAA,CACC,MAAO,GAAA,IAAI;;;;;;;;;;;;;;;GAgBZ,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eA5Bc,eAAA,CAAA,EAAe,CAAA,ECCf,IAAA,EAAA,cAA8B,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,CAAA,EAAA,KAAA,KAyFmB,KAAA,KAAA,MAAA,CACjB,CAAA,CAAA,OAAA,KAAA,OAzF9B,CAAC,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FpB,QAAA,CAEC,IAAM,EAAqC,CAC1C,IAAK,GACL,GAAI,GACJ,GAAI,GACJ,GAAI,GACJ,GAAI,EAAA,EAID,EAEH,EADwB,OAAd,KAAK,MAAS,UAAY,KAAK,QAAQ,EACtC,EAAW,KAAK,MACI,OAAd,KAAK,MAAS,UAAa,MAAM,KAAK,IAAA,EAI5C,GAFY,EAAZ,KAAK,KAKjB,IAAM,EAAQ,CACb,MAAO,GAAG,EAAA,IACV,OAAQ,GAAG,EAAA,GAAA,EAGZ,OAAO,KAAK,MAAQ,EAAA,IAAI;yCACe,KAAK,SAAS,CAAA,EAAA;;;;;;;;;;;;;;;;;;;;IAoBjD,EAAA,IAAI;gCACsB,KAAK,SAAS,CAAA,EAAA;;;;;;;;;;;;GAa7C,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UA3EU,CAAE,KAAM,OAAQ,QAAA,CAAS,CAAA,CAAA,CAAA,EAAM,EAAA,UAAA,QAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAAA,CAAA,EAW/B,EAAA,UAAA,OAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UACA,CAAE,KAAM,OAAA,CAAA,CAAA,EAAS,EAAA,UAAA,QAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eA3Fb,kBAAA,CAAA,EAAkB,CAAA"}
|
|
@@ -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-CA0Wqt8m.js";
|
|
2
|
+
import "./mixins-Bp0wIHg2.js";
|
|
3
3
|
import { customElement as n, property as r } from "lit/decorators.js";
|
|
4
4
|
import { css as i, html as a } from "lit";
|
|
5
5
|
var o = class extends e {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"busy-
|
|
1
|
+
{"version":3,"file":"busy-DgQ4ux5N.js","names":[],"sources":["../src/busy/busy.ts","../src/busy/spinner.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-busy')\nexport default class SchmancyBusy extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline;\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tpointer-events: all;\n\t\tz-index: 50;\n\t}\n`];\n\tprotected render(): unknown {\n\t\treturn html`\n\t\t\t<!-- Clean overlay with subtle backdrop -->\n\t\t\t<div class=\"absolute inset-0 flex items-center justify-center bg-surface-container/10 backdrop-blur-xs rounded-[inherit]\">\n\t\t\t\t<!-- Content container with clean surface -->\n\t\t\t\t<div class=\"relative flex items-center justify-center p-4\">\n\t\t\t\t\t\n\t\t\t\t\t<!-- Content slot -->\n\t\t\t\t\t<div class=\"relative z-10\">\n\t\t\t\t\t\t<slot>\n\t\t\t\t\t\t\t<!-- Default spinner if no content provided -->\n\t\t\t\t\t\t\t<schmancy-spinner ></schmancy-spinner>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-busy': SchmancyBusy\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-spinner')\nexport default class SchmnacySpinner extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\tcolor: inherit; /* Inherit from parent by default */\n\t}\n\n\t/* Explicit color options when needed */\n\t:host([color=\"primary\"]) {\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\n\t:host([color=\"on-primary\"]) {\n\t\tcolor: var(--schmancy-sys-color-primary-on);\n\t}\n\n\t:host([color=\"secondary\"]) {\n\t\tcolor: var(--schmancy-sys-color-secondary-default);\n\t}\n\n\t:host([color=\"on-secondary\"]) {\n\t\tcolor: var(--schmancy-sys-color-secondary-on);\n\t}\n\n\t:host([color=\"tertiary\"]) {\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\n\t:host([color=\"on-tertiary\"]) {\n\t\tcolor: var(--schmancy-sys-color-tertiary-on);\n\t}\n\n\t:host([color=\"error\"]) {\n\t\tcolor: var(--schmancy-sys-color-error-default);\n\t}\n\n\t:host([color=\"on-error\"]) {\n\t\tcolor: var(--schmancy-sys-color-error-on);\n\t}\n\n\t:host([color=\"success\"]) {\n\t\tcolor: var(--schmancy-sys-color-success-default);\n\t}\n\n\t:host([color=\"on-success\"]) {\n\t\tcolor: var(--schmancy-sys-color-success-on);\n\t}\n\n\t:host([color=\"surface\"]) {\n\t\tcolor: var(--schmancy-sys-color-surface-default);\n\t}\n\n\t:host([color=\"on-surface\"]) {\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t:host([color=\"surface-variant\"]) {\n\t\tcolor: var(--schmancy-sys-color-surface-variant-default);\n\t}\n\n\t:host([color=\"on-surface-variant\"]) {\n\t\tcolor: var(--schmancy-sys-color-surface-onVariant);\n\t}\n\n\t.spinner {\n\t\tanimation: spin 1s linear infinite;\n\t\tanimation-direction: reverse;\n\t}\n\n\t@keyframes spin {\n\t\tfrom {\n\t\t\ttransform: rotate(0deg);\n\t\t}\n\t\tto {\n\t\t\ttransform: rotate(360deg);\n\t\t}\n\t}\n`];\n\t@property({ type: String, reflect: true })\n\tcolor?: 'primary' | 'on-primary' | 'secondary' | 'on-secondary' |\n\t 'tertiary' | 'on-tertiary' | 'error' | 'on-error' |\n\t 'success' | 'on-success' | 'surface' | 'on-surface' |\n\t 'surface-variant' | 'on-surface-variant'\n\n\t/**\n\t * Size of the spinner - M3 aligned tokens or numeric Tailwind units\n\t * Tokens: 'xxs' (12px), 'xs' (16px), 'sm' (20px), 'md' (24px), 'lg' (32px)\n\t * Numeric: Tailwind units where each unit = 4px (e.g., 6 = 24px)\n\t */\n\t@property() size: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | number = 'md'\n\t@property({ type: Boolean }) glass: boolean = false\n\n\tprotected render(): unknown {\n\t\t// M3 aligned token sizes (fit inside buttons of same token)\n\t\tconst tokenSizes: Record<string, number> = {\n\t\t\txxs: 12, // fits in 24px button (ultra-compact)\n\t\t\txs: 16, // fits in 32px button\n\t\t\tsm: 20, // fits in 40px button\n\t\t\tmd: 24, // fits in 48px button (default)\n\t\t\tlg: 32, // fits in 56px button\n\t\t}\n\n\t\t// Support both token and numeric sizes for backward compatibility\n\t\tlet sizeInPx: number\n\t\tif (typeof this.size === 'string' && this.size in tokenSizes) {\n\t\t\tsizeInPx = tokenSizes[this.size]\n\t\t} else if (typeof this.size === 'number' && !isNaN(this.size)) {\n\t\t\t// Legacy numeric: Tailwind units (each unit = 4px)\n\t\t\tsizeInPx = this.size * 4\n\t\t} else {\n\t\t\tsizeInPx = 24 // fallback to md\n\t\t}\n\n\t\tconst style = {\n\t\t\twidth: `${sizeInPx}px`,\n\t\t\theight: `${sizeInPx}px`,\n\t\t}\n\t\t\n\t\treturn this.glass ? html`\n\t\t\t<div class=\"spinner relative\" style=${this.styleMap(style)}>\n\t\t\t\t<!-- Glass container with Apple-style effect -->\n\t\t\t\t<div class=\"absolute inset-0 rounded-full backdrop-blur-xl backdrop-saturate-150\n\t\t\t\t\t\t\tbg-surface-container/20\n\t\t\t\t\t\t\tshadow-[inset_0_1px_1px_0_rgba(255,255,255,0.2)]\n\t\t\t\t\t\t\tborder border-outline-variant/30\"></div>\n\t\t\t\t\n\t\t\t\t<!-- Spinner SVG -->\n\t\t\t\t<svg fill=\"none\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" role=\"img\" \n\t\t\t\t\t style=\"width: 100%; height: 100%;\" class=\"relative z-10\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\".7\"\n\t\t\t\t\t\td=\"M8 15A7 7 0 108 1a7 7 0 000 14v0z\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t></path>\n\t\t\t\t\t<path d=\"M15 8a7 7 0 01-7 7\" stroke=\"currentColor\" stroke-width=\"2\"></path>\n\t\t\t\t\t<path d=\"M8 12a4 4 0 100-8 4 4 0 000 8z\" fill=\"currentColor\" opacity=\"0.8\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t` : html`\n\t\t\t<div class=\"spinner\" style=${this.styleMap(style)}>\n\t\t\t\t<svg fill=\"none\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" role=\"img\" style=\"width: 100%; height: 100%;\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\".5\"\n\t\t\t\t\t\td=\"M8 15A7 7 0 108 1a7 7 0 000 14v0z\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t></path>\n\t\t\t\t\t<path d=\"M15 8a7 7 0 01-7 7\" stroke=\"currentColor\" stroke-width=\"2\"></path>\n\t\t\t\t\t<path d=\"M8 12a4 4 0 100-8 4 4 0 000 8z\" fill=\"currentColor\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-spinner': SchmnacySpinner\n\t}\n}\n"],"mappings":";;;;AAKe,IAAA,IAAA,cAA2B,EAAA;CAAA;EAAA,KAAA,SACzB,CAAC,CAAG;;;;;;;;;;CASpB,SAAA;EACC,OAAO,CAAI;;;;;;;;;;;;;;;;CAgBZ;AAAA;AAAA,IAAA,EAAA,CA5BA,EAAc,eAAA,CAAA,GAAe,CAAA;ACCf,IAAA,IAAA,cAA8B,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,CAAA,GAAA,KAAA,OAyFmB,MAAA,KAAA,QAAA,CACjB;CAAA;CAAA;EAAA,KAAA,SAzF9B,CAAC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FpB,SAAA;EAEC,IAAM,IAAqC;GAC1C,KAAK;GACL,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EAAA,GAID;EAEH,IADwB,OAAd,KAAK,QAAS,YAAY,KAAK,QAAQ,IACtC,EAAW,KAAK,QACI,OAAd,KAAK,QAAS,YAAa,MAAM,KAAK,IAAA,IAI5C,KAFY,IAAZ,KAAK;EAKjB,IAAM,IAAQ;GACb,OAAO,GAAG,EAAA;GACV,QAAQ,GAAG,EAAA;EAAA;EAGZ,OAAO,KAAK,QAAQ,CAAI;yCACe,KAAK,SAAS,CAAA,EAAA;;;;;;;;;;;;;;;;;;;;MAoBjD,CAAI;gCACsB,KAAK,SAAS,CAAA,EAAA;;;;;;;;;;;;;CAa7C;AAAA;AAAA,EAAA,CA3EC,EAAS;CAAE,MAAM;CAAQ,SAAA,CAAS;AAAA,CAAA,CAAA,GAAM,EAAA,WAAA,SAAA,KAAA,CAAA,GAAA,EAAA,CAWxC,EAAA,CAAA,GAAS,EAAA,WAAA,QAAA,KAAA,CAAA,GAAA,EAAA,CACT,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,GAAS,EAAA,WAAA,SAAA,KAAA,CAAA,GAAA,IAAA,EAAA,CA3F3B,EAAc,kBAAA,CAAA,GAAkB,CAAA"}
|
package/dist/busy.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./busy-
|
|
1
|
+
require(`./busy-CgzZbGfx.cjs`);
|
package/dist/busy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./busy-
|
|
1
|
+
import "./busy-DgQ4ux5N.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-CYIif26I.cjs`);require(`./mixins-CGXSzZc7.cjs`);const t=require(`./magnetic-DKtc4umC.cjs`);let n=require(`@lit/context`),r=require(`lit/decorators.js`),i=require(`lit`),a=require(`lit/directives/if-defined.js`),o=require(`lit/directives/when.js`);var s=(0,n.createContext)(`schmancy-button-size`),c=class extends e.t{static{this.styles=[i.css`:host{
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-nDZQe1ES.cjs","names":[],"sources":["../src/button/context.ts","../src/button/button.ts"],"sourcesContent":["import { createContext } from '@lit/context'\n\nexport type SchmancyButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg'\n\n/**\n * Provided by `<schmancy-button>` to its descendants so children\n * (e.g. `<schmancy-icon>`) can auto-size against the enclosing button.\n */\nexport const SchmancyButtonSizeContext = createContext<SchmancyButtonSize>('schmancy-button-size')\n","import { provide } from '@lit/context'\nimport { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { when } from 'lit/directives/when.js'\nimport { magnetic } from '../directives/magnetic'\nimport { SchmancyButtonSizeContext, type SchmancyButtonSize } from './context'\n\nexport interface SchmancyButtonEventMap {\n\tSchmancyFocus: CustomEvent<void>\n\tSchmancyBlur: CustomEvent<void>\n}\n\nexport type ButtonVariant = 'elevated' | 'filled' | 'filled tonal' | 'tonal' | 'outlined' | 'text'\nexport type ButtonColor = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'neutral'\n\n/**\n * A button component.\n * @element schmancy-button\n * @slot - The default slot.\n * @slot prefix - The prefix slot.\n * @slot suffix - The suffix slot.\n * @csspart base - The underlying native `<button>` (or `<a>` when `href` is set).\n */\n@customElement('schmancy-button')\nexport class SchmancyButton extends SchmancyElement {\n\tstatic styles = [css`:host{\n\t\tdisplay: inline-flex;\n\t\toverflow: hidden;\n\t\tposition: relative;\n\t\ttouch-action: manipulation;\n\t\tborder-radius: 1rem;\n\t\ttransition:\n\t\t\tbox-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),\n\t\t\ttransform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t}\n\t:host([width=\"full\"]) {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t}\n\t:host(:hover:not([disabled])) {\n\t\tbox-shadow: 0 4px 16px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 20%, transparent);\n\t}\n\t:host(:active:not([disabled])) {\n\t\ttransform: scale(0.97);\n\t\tbox-shadow: 0 1px 4px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransition-duration: 100ms;\n\t}\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host { transition: none; }\n\t\t:host(:hover:not([disabled])) { box-shadow: none; }\n\t\t:host(:active:not([disabled])) { transform: none; box-shadow: none; }\n\t}\n\t:host *,\n\t* {\n\t\ttouch-action: manipulation;\n\t}`]\n\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\tstatic formAssociated = true\n\tprivate internals: ElementInternals | undefined\n\t/**\n\t * When this button is `type=\"submit\"` and lives inside a <schmancy-form>,\n\t * the observer mirrors the form's `aria-busy` attribute onto this button\n\t * while a submit is in flight. Stays focusable; disabled buttons drop from\n\t * the tab order and are unreachable to AT (WCAG 2.2 AA).\n\t */\n\tprivate _formBusyObserver?: MutationObserver\n\n\tconstructor() {\n\t\tsuper()\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch {\n\t\t\tthis.internals = undefined\n\t\t}\n\t\t// Translate clicks into native form semantics so the button works\n\t\t// inside any <form>, not just inside <schmancy-form>.\n\t\tthis.addEventListener('click', (e: MouseEvent) => {\n\t\t\tif (this.disabled) {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopImmediatePropagation()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst form = this.internals?.form\n\t\t\tif (!form) return\n\t\t\tif (this.type === 'submit') {\n\t\t\t\te.preventDefault()\n\t\t\t\tform.requestSubmit()\n\t\t\t} else if (this.type === 'reset') {\n\t\t\t\te.preventDefault()\n\t\t\t\tform.reset()\n\t\t\t}\n\t\t})\n\t}\n\n\t/** Associated form, when placed inside a <form>. */\n\tget form(): HTMLFormElement | null {\n\t\treturn this.internals?.form ?? null\n\t}\n\n\tformDisabledCallback(disabled: boolean): void {\n\t\tthis.disabled = disabled\n\t}\n\n\toverride connectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\t// Mirror the closest <schmancy-form>'s aria-busy onto this submit button\n\t\t// so the user gets a visible busy state during async submit handlers.\n\t\t// Schmancy-form sets aria-busy=\"true\" while status === 'submitting'.\n\t\tif (this.type !== 'submit') return\n\t\tconst form = this.closest('schmancy-form') as HTMLElement | null\n\t\tif (!form) return\n\t\tconst sync = () => {\n\t\t\tconst busy = form.getAttribute('aria-busy') === 'true'\n\t\t\tif (busy) {\n\t\t\t\tthis.setAttribute('aria-busy', 'true')\n\t\t\t\tthis.internals?.states.add('submitting')\n\t\t\t} else {\n\t\t\t\tthis.removeAttribute('aria-busy')\n\t\t\t\tthis.internals?.states.delete('submitting')\n\t\t\t}\n\t\t}\n\t\tsync()\n\t\tthis._formBusyObserver = new MutationObserver(sync)\n\t\tthis._formBusyObserver.observe(form, { attributes: true, attributeFilter: ['aria-busy'] })\n\t}\n\n\toverride disconnectedCallback(): void {\n\t\tthis._formBusyObserver?.disconnect()\n\t\tthis._formBusyObserver = undefined\n\t\tsuper.disconnectedCallback()\n\t}\n\n\t@query('[part=\"base\"]', true)\n\tprivate nativeElement!: HTMLElement\n\n\tprivate _ariaLabel!: string\n\n\t/**\n\t * The variant of the button.\n\t * @attr\n\t * @default 'text'\n\t * @public\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic variant: ButtonVariant = 'text'\n\n\t/**\n\t * The color of the button.\n\t * @attr\n\t * @default Depends on variant: 'primary' for filled/elevated/outlined/text, 'secondary' for tonal\n\t * @public\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic color?: ButtonColor\n\n\t/**\n\t * The width of the button.\n\t * @attr\n\t * @type {'full' | 'auto'}\n\t * @default 'auto'\n\t * @public\n\t */\n\t@property({ reflect: true })\n\tpublic width: 'full' | 'auto' = 'auto'\n\n\t/**\n\t * The size of the button.\n\t * Provided as `SchmancyButtonSizeContext` to descendant elements so children\n\t * (e.g. `<schmancy-icon>`) can auto-size against the enclosing button.\n\t * @attr\n\t * @type {'xxs' | 'xs' | 'sm' | 'md' | 'lg'}\n\t * @default 'md'\n\t * @public\n\t */\n\t@provide({ context: SchmancyButtonSizeContext })\n\t@property({ type: String })\n\tpublic size: SchmancyButtonSize = 'md'\n\n\t/**\n\t * The type of the button.\n\t * Defaults to 'button' (preventing accidental form submissions).\n\t * @attr\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic type: 'button' | 'reset' | 'submit' = 'button'\n\n\t/**\n\t * The URL the button points to.\n\t * If provided, the component will render as an anchor element.\n\t * @attr\n\t */\n\t@property()\n\tpublic href?: string\n\n\t/**\n\t * Determines whether the button is disabled.\n\t * @attr\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\tpublic override set ariaLabel(value: string) {\n\t\tconst oldVal = this._ariaLabel\n\t\tthis._ariaLabel = value\n\n\t\tif (this.hasAttribute('aria-label')) {\n\t\t\tthis.removeAttribute('aria-label')\n\t\t}\n\t\tthis.requestUpdate('ariaLabel', oldVal)\n\t}\n\n\t@property({ attribute: 'aria-label' })\n\tpublic override get ariaLabel() {\n\t\treturn this._ariaLabel\n\t}\n\n\t@queryAssignedElements({\n\t\tslot: 'prefix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate prefixImgs!: HTMLImageElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'suffix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate suffixImgs!: HTMLImageElement[]\n\n\t/** Sets focus in the button. */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.nativeElement.focus(options)\n\t}\n\n\t/** Removes focus from the button. */\n\tpublic override blur() {\n\t\tthis.nativeElement.blur()\n\t}\n\n\t/**\n\t * Get the effective color based on variant if not explicitly set\n\t * M3 spec: filled = primary, tonal = secondary, others = primary\n\t */\n\tprotected get effectiveColor(): ButtonColor {\n\t\tif (this.color) return this.color\n\n\t\t// Map 'tonal' to 'filled tonal' for checking\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant\n\n\t\t// M3 defaults: tonal uses secondary, others use primary\n\t\treturn effectiveVariant === 'filled tonal' ? 'secondary' : 'primary'\n\t}\n\n\tprotected get imgClasses(): string[] {\n\t\t// M3 spec: icon sizes scale with button size\n\t\tconst sizeMap = {\n\t\t\txxs: 'w-3 h-3', // 12px for 24px button (ultra-compact)\n\t\t\txs: 'w-4 h-4', // 16px for 32px button (M3 dense)\n\t\t\tsm: 'w-5 h-5', // 20px for 40px button (M3 default)\n\t\t\tmd: 'w-6 h-6', // 24px for 48px button (M3 large)\n\t\t\tlg: 'w-7 h-7' // 28px for 56px button (M3 extra large)\n\t\t}\n\t\treturn [sizeMap[this.size], 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\t// Add image classes and ensure decorative images have an empty alt.\n\t\tthis.prefixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t\tthis.suffixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t}\n\n\tclick(): void {\n\t\tthis.dispatchEvent(new Event('click', { bubbles: true, composed: true }))\n\t}\n\n\t// Prevent default behavior when the component is disabled.\n\tprivate _preventDefault(event: Event) {\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t}\n\n\trender() {\n\t\t// Map 'tonal' variant to 'filled tonal' for backwards compatibility\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant;\n\n\t\t// Compute classes for the interactive element.\n\t\tconst classes = {\n\t\t\t'z-0 transition-all duration-200 relative rounded-2xl flex justify-center items-center outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden flex-1 overflow-hidden':\n\t\t\t\ttrue,\n\t\t\t// Height - M3 spec: 24dp (xxs) → 32dp (dense) → 40dp (default) → 48dp (large) → 56dp (XL)\n\t\t\t'h-6': this.size === 'xxs', // 24px - Ultra-compact\n\t\t\t'h-8': this.size === 'xs', // 32px - M3 dense/compact\n\t\t\t'h-10': this.size === 'sm', // 40px - M3 default\n\t\t\t'h-12': this.size === 'md', // 48px - M3 large\n\t\t\t'h-14': this.size === 'lg', // 56px - M3 extra large\n\t\t\t// Padding - M3 spec: horizontal padding 24dp default, scaled proportionally\n\t\t\t'py-1 px-2': this.size === 'xxs', // 4px/8px for 24px height\n\t\t\t'py-2 px-4': this.size === 'xs', // 8px/16px for 32px height\n\t\t\t'py-2.5 px-5': this.size === 'sm', // 10px/20px for 40px height\n\t\t\t'py-3 px-6': this.size === 'md', // 12px/24px for 48px height (M3 default)\n\t\t\t'py-4 px-7': this.size === 'lg', // 16px/28px for 56px height\n\t\t\t// Typography - M3 spec: label-large (14px) default, scaled\n\t\t\t'text-[10px] font-medium leading-3': this.size === 'xxs', // 10px\n\t\t\t'text-xs font-medium leading-4': this.size === 'xs', // 12px\n\t\t\t'text-sm font-medium leading-5': this.size === 'sm' || this.size === 'md', // 14px - M3 label-large\n\t\t\t'text-base font-medium leading-6': this.size === 'lg', // 16px\n\t\t\t// Letter spacing - M3 spec\n\t\t\t'tracking-[0.1px]': true,\n\t\t\t// Gap - Scaled with size\n\t\t\t'gap-0.5': this.size === 'xxs', // 2px\n\t\t\t'gap-1': this.size === 'xs', // 4px\n\t\t\t'gap-1.5': this.size === 'sm', // 6px\n\t\t\t'gap-2': this.size === 'md', // 8px\n\t\t\t'gap-2.5': this.size === 'lg', // 10px\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'opacity-[0.38]': this.disabled,\n\t\t\t'hover:shadow-sm': !this.disabled && effectiveVariant === 'elevated',\n\t\t\t'w-full tex-center': this.width === 'full',\n\t\t\t// Elevated variant\n\t\t\t'bg-surface-low shadow-xs': effectiveVariant === 'elevated',\n\t\t\t// Outlined variant\n\t\t\t'bg-transparent border-1 border-solid': effectiveVariant === 'outlined',\n\t\t\t'border-outline': effectiveVariant === 'outlined' && this.effectiveColor === 'primary',\n\t\t\t'border-success-default': effectiveVariant === 'outlined' && this.effectiveColor === 'success',\n\t\t\t'border-error-default': effectiveVariant === 'outlined' && this.effectiveColor === 'error',\n\t\t\t'border-warning-default': effectiveVariant === 'outlined' && this.effectiveColor === 'warning',\n\t\t\t'border-info-default': effectiveVariant === 'outlined' && this.effectiveColor === 'info',\n\t\t\t'border-secondary-default': effectiveVariant === 'outlined' && this.effectiveColor === 'secondary',\n\t\t\t'border-outline-variant': effectiveVariant === 'outlined' && this.effectiveColor === 'neutral',\n\t\t\t// Filled variant - background colors\n\t\t\t'bg-primary-default': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'bg-secondary-default': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'bg-success-default': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'bg-error-default': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'bg-warning-default': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'bg-info-default': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'bg-surface-containerHighest': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Filled variant - text colors\n\t\t\t'text-primary-on': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-on': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'text-success-on': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'text-error-on': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'text-warning-on': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'text-info-on': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'text-surface-on': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal variant - background colors\n\t\t\t'bg-primary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'bg-secondary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'bg-success-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'bg-error-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'bg-warning-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'bg-info-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t'bg-surface-containerLow': effectiveVariant === 'filled tonal' && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal variant - text colors\n\t\t\t'text-primary-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'text-success-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'text-error-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'text-warning-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'text-info-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t// Text and elevated variants - text colors\n\t\t\t'text-primary-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'secondary',\n\t\t\t'text-success-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'success',\n\t\t\t'text-error-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'error',\n\t\t\t'text-warning-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'warning',\n\t\t\t'text-info-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'info',\n\t\t\t'text-surface-onVariant': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined' || effectiveVariant === 'filled tonal') && this.effectiveColor === 'neutral',\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'absolute inset-0 hover:opacity-[0.08] z-0 rounded-2xl': true,\n\t\t\t// M3 focus and pressed states\n\t\t\t'focus-visible:opacity-[0.10]': true, // M3 focus state\n\t\t\t'active:opacity-[0.10]': true, // M3 pressed state\n\t\t\t// Filled variant hover\n\t\t\t'hover:bg-primary-on': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-on': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-on': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-on': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-on': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-on': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-on': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Outlined, elevated, text variants hover\n\t\t\t'hover:bg-primary-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-onVariant': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal hover\n\t\t\t'hover:bg-primary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-containerLow': effectiveVariant === 'filled tonal' && this.effectiveColor === 'neutral',\n\t\t}\n\n\t\t// If href is provided, render an anchor element.\n\t\tif (this.href) {\n\t\t\treturn html`\n\t\t\t\t<a\n\t\t\t\t\t${magnetic({ strength: 3, radius: 60 })}\n\t\t\t\t\tpart=\"base\"\n\t\t\t\t\thref=${ifDefined(this.disabled ? undefined : this.href)}\n\t\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t@click=${this.disabled ? this._preventDefault : undefined}\n\t\t\t\t>\n\t\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t\t</a>\n\t\t\t`\n\t\t}\n\n\t\t// Otherwise, render a native button element.\n\t\treturn html`\n\t\t\t<button\n\t\t\t\t${magnetic({ strength: 3, radius: 60 })}\n\t\t\t\tpart=\"base\"\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\ttype=${ifDefined(this.type)}\n\t\t\t\ttabindex=${ifDefined(this.disabled ? '-1' : undefined)}\n\t\t\t>\n\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t<slot></slot>\n\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-button': SchmancyButton\n\t}\n}\n"],"mappings":"0TAQA,IAAa,GAAA,EAAA,EAAA,eAA8D,sBAAA,ECkBpE,EAAA,cAA6B,EAAA,CAAA,CAAA,OAAA,KAAA,OACnB,CAAC,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAgCiB,CAAA,GACjC,EAAA,WAAW,kBACd,KAAM,OACN,eAAA,CAAgB,CAAA,CAAA,CAAA,OAAA,KAAA,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AA,CAAA,CAAA,EAAQ,EAAA,UAAA,OAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAQhB,CAAE,QAAA,CAAS,EAAM,KAAM,MAAA,CAAA,CAAA,EAAQ,EAAA,UAAA,OAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAAA,CAAA,EAQ/B,EAAA,UAAA,OAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAOA,CAAE,KAAM,QAAS,QAAA,CAAS,CAAA,CAAA,CAAA,EAAM,EAAA,UAAA,WAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAahC,CAAE,UAAW,YAAA,CAAA,CAAA,EAAc,EAAA,UAAA,YAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,uBAKd,CACtB,KAAM,SACN,QAAA,CAAS,EACT,SAAU,KAAA,CAAA,CAAA,EACV,EAAA,UAAA,aAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,uBAGsB,CACtB,KAAM,SACN,QAAA,CAAS,EACT,SAAU,KAAA,CAAA,CAAA,EACV,EAAA,UAAA,aAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAlNa,iBAAA,CAAA,EAAiB,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"button-DFvR1iXX.cjs","names":[],"sources":["../src/button/context.ts","../src/button/button.ts"],"sourcesContent":["import { createContext } from '@lit/context'\n\nexport type SchmancyButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg'\n\n/**\n * Provided by `<schmancy-button>` to its descendants so children\n * (e.g. `<schmancy-icon>`) can auto-size against the enclosing button.\n */\nexport const SchmancyButtonSizeContext = createContext<SchmancyButtonSize>('schmancy-button-size')\n","import { provide } from '@lit/context'\nimport { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { when } from 'lit/directives/when.js'\nimport { magnetic } from '../directives/magnetic'\nimport { SchmancyButtonSizeContext, type SchmancyButtonSize } from './context'\n\nexport interface SchmancyButtonEventMap {\n\tSchmancyFocus: CustomEvent<void>\n\tSchmancyBlur: CustomEvent<void>\n}\n\nexport type ButtonVariant = 'elevated' | 'filled' | 'filled tonal' | 'tonal' | 'outlined' | 'text'\nexport type ButtonColor = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'neutral'\n\n/**\n * A button component.\n * @element schmancy-button\n * @slot - The default slot.\n * @slot prefix - The prefix slot.\n * @slot suffix - The suffix slot.\n * @csspart base - The underlying native `<button>` (or `<a>` when `href` is set).\n */\n@customElement('schmancy-button')\nexport class SchmancyButton extends SchmancyElement {\n\tstatic styles = [css`:host{\n\t\tdisplay: inline-flex;\n\t\toverflow: hidden;\n\t\tposition: relative;\n\t\ttouch-action: manipulation;\n\t\tborder-radius: 1rem;\n\t\ttransition:\n\t\t\tbox-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),\n\t\t\ttransform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t}\n\t:host([width=\"full\"]) {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t}\n\t:host(:hover:not([disabled])) {\n\t\tbox-shadow: 0 4px 16px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 20%, transparent);\n\t}\n\t:host(:active:not([disabled])) {\n\t\ttransform: scale(0.97);\n\t\tbox-shadow: 0 1px 4px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransition-duration: 100ms;\n\t}\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host { transition: none; }\n\t\t:host(:hover:not([disabled])) { box-shadow: none; }\n\t\t:host(:active:not([disabled])) { transform: none; box-shadow: none; }\n\t}\n\t:host *,\n\t* {\n\t\ttouch-action: manipulation;\n\t}`]\n\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\tstatic formAssociated = true\n\tprivate internals: ElementInternals | undefined\n\t/**\n\t * When this button is `type=\"submit\"` and lives inside a <schmancy-form>,\n\t * the observer mirrors the form's `aria-busy` attribute onto this button\n\t * while a submit is in flight. Stays focusable; disabled buttons drop from\n\t * the tab order and are unreachable to AT (WCAG 2.2 AA).\n\t */\n\tprivate _formBusyObserver?: MutationObserver\n\n\tconstructor() {\n\t\tsuper()\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch {\n\t\t\tthis.internals = undefined\n\t\t}\n\t\t// Translate clicks into native form semantics so the button works\n\t\t// inside any <form>, not just inside <schmancy-form>.\n\t\tthis.addEventListener('click', (e: MouseEvent) => {\n\t\t\tif (this.disabled) {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopImmediatePropagation()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst form = this.internals?.form\n\t\t\tif (!form) return\n\t\t\tif (this.type === 'submit') {\n\t\t\t\te.preventDefault()\n\t\t\t\tform.requestSubmit()\n\t\t\t} else if (this.type === 'reset') {\n\t\t\t\te.preventDefault()\n\t\t\t\tform.reset()\n\t\t\t}\n\t\t})\n\t}\n\n\t/** Associated form, when placed inside a <form>. */\n\tget form(): HTMLFormElement | null {\n\t\treturn this.internals?.form ?? null\n\t}\n\n\tformDisabledCallback(disabled: boolean): void {\n\t\tthis.disabled = disabled\n\t}\n\n\toverride connectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\t// Mirror the closest <schmancy-form>'s aria-busy onto this submit button\n\t\t// so the user gets a visible busy state during async submit handlers.\n\t\t// Schmancy-form sets aria-busy=\"true\" while status === 'submitting'.\n\t\tif (this.type !== 'submit') return\n\t\tconst form = this.closest('schmancy-form') as HTMLElement | null\n\t\tif (!form) return\n\t\tconst sync = () => {\n\t\t\tconst busy = form.getAttribute('aria-busy') === 'true'\n\t\t\tif (busy) {\n\t\t\t\tthis.setAttribute('aria-busy', 'true')\n\t\t\t\tthis.internals?.states.add('submitting')\n\t\t\t} else {\n\t\t\t\tthis.removeAttribute('aria-busy')\n\t\t\t\tthis.internals?.states.delete('submitting')\n\t\t\t}\n\t\t}\n\t\tsync()\n\t\tthis._formBusyObserver = new MutationObserver(sync)\n\t\tthis._formBusyObserver.observe(form, { attributes: true, attributeFilter: ['aria-busy'] })\n\t}\n\n\toverride disconnectedCallback(): void {\n\t\tthis._formBusyObserver?.disconnect()\n\t\tthis._formBusyObserver = undefined\n\t\tsuper.disconnectedCallback()\n\t}\n\n\t@query('[part=\"base\"]', true)\n\tprivate nativeElement!: HTMLElement\n\n\tprivate _ariaLabel!: string\n\n\t/**\n\t * The variant of the button.\n\t * @attr\n\t * @default 'text'\n\t * @public\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic variant: ButtonVariant = 'text'\n\n\t/**\n\t * The color of the button.\n\t * @attr\n\t * @default Depends on variant: 'primary' for filled/elevated/outlined/text, 'secondary' for tonal\n\t * @public\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic color?: ButtonColor\n\n\t/**\n\t * The width of the button.\n\t * @attr\n\t * @type {'full' | 'auto'}\n\t * @default 'auto'\n\t * @public\n\t */\n\t@property({ reflect: true })\n\tpublic width: 'full' | 'auto' = 'auto'\n\n\t/**\n\t * The size of the button.\n\t * Provided as `SchmancyButtonSizeContext` to descendant elements so children\n\t * (e.g. `<schmancy-icon>`) can auto-size against the enclosing button.\n\t * @attr\n\t * @type {'xxs' | 'xs' | 'sm' | 'md' | 'lg'}\n\t * @default 'md'\n\t * @public\n\t */\n\t@provide({ context: SchmancyButtonSizeContext })\n\t@property({ type: String })\n\tpublic size: SchmancyButtonSize = 'md'\n\n\t/**\n\t * The type of the button.\n\t * Defaults to 'button' (preventing accidental form submissions).\n\t * @attr\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic type: 'button' | 'reset' | 'submit' = 'button'\n\n\t/**\n\t * The URL the button points to.\n\t * If provided, the component will render as an anchor element.\n\t * @attr\n\t */\n\t@property()\n\tpublic href?: string\n\n\t/**\n\t * Determines whether the button is disabled.\n\t * @attr\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\tpublic override set ariaLabel(value: string) {\n\t\tconst oldVal = this._ariaLabel\n\t\tthis._ariaLabel = value\n\n\t\tif (this.hasAttribute('aria-label')) {\n\t\t\tthis.removeAttribute('aria-label')\n\t\t}\n\t\tthis.requestUpdate('ariaLabel', oldVal)\n\t}\n\n\t@property({ attribute: 'aria-label' })\n\tpublic override get ariaLabel() {\n\t\treturn this._ariaLabel\n\t}\n\n\t@queryAssignedElements({\n\t\tslot: 'prefix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate prefixImgs!: HTMLImageElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'suffix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate suffixImgs!: HTMLImageElement[]\n\n\t/** Sets focus in the button. */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.nativeElement.focus(options)\n\t}\n\n\t/** Removes focus from the button. */\n\tpublic override blur() {\n\t\tthis.nativeElement.blur()\n\t}\n\n\t/**\n\t * Get the effective color based on variant if not explicitly set\n\t * M3 spec: filled = primary, tonal = secondary, others = primary\n\t */\n\tprotected get effectiveColor(): ButtonColor {\n\t\tif (this.color) return this.color\n\n\t\t// Map 'tonal' to 'filled tonal' for checking\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant\n\n\t\t// M3 defaults: tonal uses secondary, others use primary\n\t\treturn effectiveVariant === 'filled tonal' ? 'secondary' : 'primary'\n\t}\n\n\tprotected get imgClasses(): string[] {\n\t\t// M3 spec: icon sizes scale with button size\n\t\tconst sizeMap = {\n\t\t\txxs: 'w-3 h-3', // 12px for 24px button (ultra-compact)\n\t\t\txs: 'w-4 h-4', // 16px for 32px button (M3 dense)\n\t\t\tsm: 'w-5 h-5', // 20px for 40px button (M3 default)\n\t\t\tmd: 'w-6 h-6', // 24px for 48px button (M3 large)\n\t\t\tlg: 'w-7 h-7' // 28px for 56px button (M3 extra large)\n\t\t}\n\t\treturn [sizeMap[this.size], 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\t// Add image classes and ensure decorative images have an empty alt.\n\t\tthis.prefixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t\tthis.suffixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t}\n\n\tclick(): void {\n\t\tthis.dispatchEvent(new Event('click', { bubbles: true, composed: true }))\n\t}\n\n\t// Prevent default behavior when the component is disabled.\n\tprivate _preventDefault(event: Event) {\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t}\n\n\trender() {\n\t\t// Map 'tonal' variant to 'filled tonal' for backwards compatibility\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant;\n\n\t\t// Compute classes for the interactive element.\n\t\tconst classes = {\n\t\t\t'z-0 transition-all duration-200 relative rounded-2xl flex justify-center items-center outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden flex-1 overflow-hidden':\n\t\t\t\ttrue,\n\t\t\t// Height - M3 spec: 24dp (xxs) → 32dp (dense) → 40dp (default) → 48dp (large) → 56dp (XL)\n\t\t\t'h-6': this.size === 'xxs', // 24px - Ultra-compact\n\t\t\t'h-8': this.size === 'xs', // 32px - M3 dense/compact\n\t\t\t'h-10': this.size === 'sm', // 40px - M3 default\n\t\t\t'h-12': this.size === 'md', // 48px - M3 large\n\t\t\t'h-14': this.size === 'lg', // 56px - M3 extra large\n\t\t\t// Padding - M3 spec: horizontal padding 24dp default, scaled proportionally\n\t\t\t'py-1 px-2': this.size === 'xxs', // 4px/8px for 24px height\n\t\t\t'py-2 px-4': this.size === 'xs', // 8px/16px for 32px height\n\t\t\t'py-2.5 px-5': this.size === 'sm', // 10px/20px for 40px height\n\t\t\t'py-3 px-6': this.size === 'md', // 12px/24px for 48px height (M3 default)\n\t\t\t'py-4 px-7': this.size === 'lg', // 16px/28px for 56px height\n\t\t\t// Typography - M3 spec: label-large (14px) default, scaled\n\t\t\t'text-[10px] font-medium leading-3': this.size === 'xxs', // 10px\n\t\t\t'text-xs font-medium leading-4': this.size === 'xs', // 12px\n\t\t\t'text-sm font-medium leading-5': this.size === 'sm' || this.size === 'md', // 14px - M3 label-large\n\t\t\t'text-base font-medium leading-6': this.size === 'lg', // 16px\n\t\t\t// Letter spacing - M3 spec\n\t\t\t'tracking-[0.1px]': true,\n\t\t\t// Gap - Scaled with size\n\t\t\t'gap-0.5': this.size === 'xxs', // 2px\n\t\t\t'gap-1': this.size === 'xs', // 4px\n\t\t\t'gap-1.5': this.size === 'sm', // 6px\n\t\t\t'gap-2': this.size === 'md', // 8px\n\t\t\t'gap-2.5': this.size === 'lg', // 10px\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'opacity-[0.38]': this.disabled,\n\t\t\t'hover:shadow-sm': !this.disabled && effectiveVariant === 'elevated',\n\t\t\t'w-full tex-center': this.width === 'full',\n\t\t\t// Elevated variant\n\t\t\t'bg-surface-low shadow-xs': effectiveVariant === 'elevated',\n\t\t\t// Outlined variant\n\t\t\t'bg-transparent border-1 border-solid': effectiveVariant === 'outlined',\n\t\t\t'border-outline': effectiveVariant === 'outlined' && this.effectiveColor === 'primary',\n\t\t\t'border-success-default': effectiveVariant === 'outlined' && this.effectiveColor === 'success',\n\t\t\t'border-error-default': effectiveVariant === 'outlined' && this.effectiveColor === 'error',\n\t\t\t'border-warning-default': effectiveVariant === 'outlined' && this.effectiveColor === 'warning',\n\t\t\t'border-info-default': effectiveVariant === 'outlined' && this.effectiveColor === 'info',\n\t\t\t'border-secondary-default': effectiveVariant === 'outlined' && this.effectiveColor === 'secondary',\n\t\t\t'border-outline-variant': effectiveVariant === 'outlined' && this.effectiveColor === 'neutral',\n\t\t\t// Filled variant - background colors\n\t\t\t'bg-primary-default': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'bg-secondary-default': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'bg-success-default': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'bg-error-default': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'bg-warning-default': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'bg-info-default': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'bg-surface-containerHighest': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Filled variant - text colors\n\t\t\t'text-primary-on': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-on': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'text-success-on': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'text-error-on': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'text-warning-on': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'text-info-on': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'text-surface-on': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal variant - background colors\n\t\t\t'bg-primary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'bg-secondary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'bg-success-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'bg-error-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'bg-warning-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'bg-info-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t'bg-surface-containerLow': effectiveVariant === 'filled tonal' && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal variant - text colors\n\t\t\t'text-primary-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'text-success-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'text-error-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'text-warning-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'text-info-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t// Text and elevated variants - text colors\n\t\t\t'text-primary-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'secondary',\n\t\t\t'text-success-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'success',\n\t\t\t'text-error-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'error',\n\t\t\t'text-warning-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'warning',\n\t\t\t'text-info-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'info',\n\t\t\t'text-surface-onVariant': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined' || effectiveVariant === 'filled tonal') && this.effectiveColor === 'neutral',\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'absolute inset-0 hover:opacity-[0.08] z-0 rounded-2xl': true,\n\t\t\t// M3 focus and pressed states\n\t\t\t'focus-visible:opacity-[0.10]': true, // M3 focus state\n\t\t\t'active:opacity-[0.10]': true, // M3 pressed state\n\t\t\t// Filled variant hover\n\t\t\t'hover:bg-primary-on': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-on': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-on': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-on': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-on': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-on': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-on': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Outlined, elevated, text variants hover\n\t\t\t'hover:bg-primary-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-onVariant': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal hover\n\t\t\t'hover:bg-primary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-containerLow': effectiveVariant === 'filled tonal' && this.effectiveColor === 'neutral',\n\t\t}\n\n\t\t// If href is provided, render an anchor element.\n\t\tif (this.href) {\n\t\t\treturn html`\n\t\t\t\t<a\n\t\t\t\t\t${magnetic({ strength: 3, radius: 60 })}\n\t\t\t\t\tpart=\"base\"\n\t\t\t\t\thref=${ifDefined(this.disabled ? undefined : this.href)}\n\t\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t@click=${this.disabled ? this._preventDefault : undefined}\n\t\t\t\t>\n\t\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t\t</a>\n\t\t\t`\n\t\t}\n\n\t\t// Otherwise, render a native button element.\n\t\treturn html`\n\t\t\t<button\n\t\t\t\t${magnetic({ strength: 3, radius: 60 })}\n\t\t\t\tpart=\"base\"\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\ttype=${ifDefined(this.type)}\n\t\t\t\ttabindex=${ifDefined(this.disabled ? '-1' : undefined)}\n\t\t\t>\n\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t<slot></slot>\n\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-button': SchmancyButton\n\t}\n}\n"],"mappings":"0TAQA,IAAa,GAAA,EAAA,EAAA,eAA8D,sBAAA,ECkBpE,EAAA,cAA6B,EAAA,CAAA,CAAA,OAAA,KAAA,OACnB,CAAC,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAgCiB,CAAA,GACjC,EAAA,WAAW,kBACd,KAAM,OACN,eAAA,CAAgB,CAAA,CAAA,CAAA,OAAA,KAAA,eAAA,CAGO,CAAA,CAUxB,aAAA,CACC,MAAA,EAAA,KAAA,QA4E+B,OAAA,KAAA,MAmBA,OAAA,KAAA,KAaE,KAAA,KAAA,KAQW,SAAA,KAAA,SAAA,CAe3B,EAlIjB,GAAA,CACC,KAAK,UAAY,KAAK,gBAAA,CACvB,MAAA,CACC,KAAK,UAAA,IAAY,EAClB,CAGA,KAAK,iBAAiB,QAAU,GAAA,CAC/B,GAAI,KAAK,SAGR,OAFA,EAAE,eAAA,EAAA,KACF,EAAE,yBAAA,EAGH,IAAM,EAAO,KAAK,WAAW,KACxB,IACD,KAAK,OAAS,UACjB,EAAE,eAAA,EACF,EAAK,cAAA,GACK,KAAK,OAAS,UACxB,EAAE,eAAA,EACF,EAAK,MAAA,GAAA,CAAA,CAGR,CAGA,IAAA,MAAI,CACH,OAAO,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EAAA,EAAA,EAAA,uBAKd,CACtB,KAAM,SACN,QAAA,CAAS,EACT,SAAU,KAAA,CAAA,CAAA,EACV,EAAA,UAAA,aAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,uBAGsB,CACtB,KAAM,SACN,QAAA,CAAS,EACT,SAAU,KAAA,CAAA,CAAA,EACV,EAAA,UAAA,aAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAlNa,iBAAA,CAAA,EAAiB,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA"}
|
|
@@ -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-CA0Wqt8m.js";
|
|
2
|
+
import "./mixins-Bp0wIHg2.js";
|
|
3
3
|
import { t as n } from "./magnetic-DaOOv5Dz.js";
|
|
4
4
|
import { createContext as r, provide as i } from "@lit/context";
|
|
5
5
|
import { customElement as a, property as o, query as s, queryAssignedElements as c } from "lit/decorators.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-qARUurjf.js","names":[],"sources":["../src/button/context.ts","../src/button/button.ts"],"sourcesContent":["import { createContext } from '@lit/context'\n\nexport type SchmancyButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg'\n\n/**\n * Provided by `<schmancy-button>` to its descendants so children\n * (e.g. `<schmancy-icon>`) can auto-size against the enclosing button.\n */\nexport const SchmancyButtonSizeContext = createContext<SchmancyButtonSize>('schmancy-button-size')\n","import { provide } from '@lit/context'\nimport { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { when } from 'lit/directives/when.js'\nimport { magnetic } from '../directives/magnetic'\nimport { SchmancyButtonSizeContext, type SchmancyButtonSize } from './context'\n\nexport interface SchmancyButtonEventMap {\n\tSchmancyFocus: CustomEvent<void>\n\tSchmancyBlur: CustomEvent<void>\n}\n\nexport type ButtonVariant = 'elevated' | 'filled' | 'filled tonal' | 'tonal' | 'outlined' | 'text'\nexport type ButtonColor = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'neutral'\n\n/**\n * A button component.\n * @element schmancy-button\n * @slot - The default slot.\n * @slot prefix - The prefix slot.\n * @slot suffix - The suffix slot.\n * @csspart base - The underlying native `<button>` (or `<a>` when `href` is set).\n */\n@customElement('schmancy-button')\nexport class SchmancyButton extends SchmancyElement {\n\tstatic styles = [css`:host{\n\t\tdisplay: inline-flex;\n\t\toverflow: hidden;\n\t\tposition: relative;\n\t\ttouch-action: manipulation;\n\t\tborder-radius: 1rem;\n\t\ttransition:\n\t\t\tbox-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),\n\t\t\ttransform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t}\n\t:host([width=\"full\"]) {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t}\n\t:host(:hover:not([disabled])) {\n\t\tbox-shadow: 0 4px 16px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 20%, transparent);\n\t}\n\t:host(:active:not([disabled])) {\n\t\ttransform: scale(0.97);\n\t\tbox-shadow: 0 1px 4px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransition-duration: 100ms;\n\t}\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host { transition: none; }\n\t\t:host(:hover:not([disabled])) { box-shadow: none; }\n\t\t:host(:active:not([disabled])) { transform: none; box-shadow: none; }\n\t}\n\t:host *,\n\t* {\n\t\ttouch-action: manipulation;\n\t}`]\n\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\tstatic formAssociated = true\n\tprivate internals: ElementInternals | undefined\n\t/**\n\t * When this button is `type=\"submit\"` and lives inside a <schmancy-form>,\n\t * the observer mirrors the form's `aria-busy` attribute onto this button\n\t * while a submit is in flight. Stays focusable; disabled buttons drop from\n\t * the tab order and are unreachable to AT (WCAG 2.2 AA).\n\t */\n\tprivate _formBusyObserver?: MutationObserver\n\n\tconstructor() {\n\t\tsuper()\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch {\n\t\t\tthis.internals = undefined\n\t\t}\n\t\t// Translate clicks into native form semantics so the button works\n\t\t// inside any <form>, not just inside <schmancy-form>.\n\t\tthis.addEventListener('click', (e: MouseEvent) => {\n\t\t\tif (this.disabled) {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopImmediatePropagation()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst form = this.internals?.form\n\t\t\tif (!form) return\n\t\t\tif (this.type === 'submit') {\n\t\t\t\te.preventDefault()\n\t\t\t\tform.requestSubmit()\n\t\t\t} else if (this.type === 'reset') {\n\t\t\t\te.preventDefault()\n\t\t\t\tform.reset()\n\t\t\t}\n\t\t})\n\t}\n\n\t/** Associated form, when placed inside a <form>. */\n\tget form(): HTMLFormElement | null {\n\t\treturn this.internals?.form ?? null\n\t}\n\n\tformDisabledCallback(disabled: boolean): void {\n\t\tthis.disabled = disabled\n\t}\n\n\toverride connectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\t// Mirror the closest <schmancy-form>'s aria-busy onto this submit button\n\t\t// so the user gets a visible busy state during async submit handlers.\n\t\t// Schmancy-form sets aria-busy=\"true\" while status === 'submitting'.\n\t\tif (this.type !== 'submit') return\n\t\tconst form = this.closest('schmancy-form') as HTMLElement | null\n\t\tif (!form) return\n\t\tconst sync = () => {\n\t\t\tconst busy = form.getAttribute('aria-busy') === 'true'\n\t\t\tif (busy) {\n\t\t\t\tthis.setAttribute('aria-busy', 'true')\n\t\t\t\tthis.internals?.states.add('submitting')\n\t\t\t} else {\n\t\t\t\tthis.removeAttribute('aria-busy')\n\t\t\t\tthis.internals?.states.delete('submitting')\n\t\t\t}\n\t\t}\n\t\tsync()\n\t\tthis._formBusyObserver = new MutationObserver(sync)\n\t\tthis._formBusyObserver.observe(form, { attributes: true, attributeFilter: ['aria-busy'] })\n\t}\n\n\toverride disconnectedCallback(): void {\n\t\tthis._formBusyObserver?.disconnect()\n\t\tthis._formBusyObserver = undefined\n\t\tsuper.disconnectedCallback()\n\t}\n\n\t@query('[part=\"base\"]', true)\n\tprivate nativeElement!: HTMLElement\n\n\tprivate _ariaLabel!: string\n\n\t/**\n\t * The variant of the button.\n\t * @attr\n\t * @default 'text'\n\t * @public\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic variant: ButtonVariant = 'text'\n\n\t/**\n\t * The color of the button.\n\t * @attr\n\t * @default Depends on variant: 'primary' for filled/elevated/outlined/text, 'secondary' for tonal\n\t * @public\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic color?: ButtonColor\n\n\t/**\n\t * The width of the button.\n\t * @attr\n\t * @type {'full' | 'auto'}\n\t * @default 'auto'\n\t * @public\n\t */\n\t@property({ reflect: true })\n\tpublic width: 'full' | 'auto' = 'auto'\n\n\t/**\n\t * The size of the button.\n\t * Provided as `SchmancyButtonSizeContext` to descendant elements so children\n\t * (e.g. `<schmancy-icon>`) can auto-size against the enclosing button.\n\t * @attr\n\t * @type {'xxs' | 'xs' | 'sm' | 'md' | 'lg'}\n\t * @default 'md'\n\t * @public\n\t */\n\t@provide({ context: SchmancyButtonSizeContext })\n\t@property({ type: String })\n\tpublic size: SchmancyButtonSize = 'md'\n\n\t/**\n\t * The type of the button.\n\t * Defaults to 'button' (preventing accidental form submissions).\n\t * @attr\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic type: 'button' | 'reset' | 'submit' = 'button'\n\n\t/**\n\t * The URL the button points to.\n\t * If provided, the component will render as an anchor element.\n\t * @attr\n\t */\n\t@property()\n\tpublic href?: string\n\n\t/**\n\t * Determines whether the button is disabled.\n\t * @attr\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\tpublic override set ariaLabel(value: string) {\n\t\tconst oldVal = this._ariaLabel\n\t\tthis._ariaLabel = value\n\n\t\tif (this.hasAttribute('aria-label')) {\n\t\t\tthis.removeAttribute('aria-label')\n\t\t}\n\t\tthis.requestUpdate('ariaLabel', oldVal)\n\t}\n\n\t@property({ attribute: 'aria-label' })\n\tpublic override get ariaLabel() {\n\t\treturn this._ariaLabel\n\t}\n\n\t@queryAssignedElements({\n\t\tslot: 'prefix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate prefixImgs!: HTMLImageElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'suffix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate suffixImgs!: HTMLImageElement[]\n\n\t/** Sets focus in the button. */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.nativeElement.focus(options)\n\t}\n\n\t/** Removes focus from the button. */\n\tpublic override blur() {\n\t\tthis.nativeElement.blur()\n\t}\n\n\t/**\n\t * Get the effective color based on variant if not explicitly set\n\t * M3 spec: filled = primary, tonal = secondary, others = primary\n\t */\n\tprotected get effectiveColor(): ButtonColor {\n\t\tif (this.color) return this.color\n\n\t\t// Map 'tonal' to 'filled tonal' for checking\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant\n\n\t\t// M3 defaults: tonal uses secondary, others use primary\n\t\treturn effectiveVariant === 'filled tonal' ? 'secondary' : 'primary'\n\t}\n\n\tprotected get imgClasses(): string[] {\n\t\t// M3 spec: icon sizes scale with button size\n\t\tconst sizeMap = {\n\t\t\txxs: 'w-3 h-3', // 12px for 24px button (ultra-compact)\n\t\t\txs: 'w-4 h-4', // 16px for 32px button (M3 dense)\n\t\t\tsm: 'w-5 h-5', // 20px for 40px button (M3 default)\n\t\t\tmd: 'w-6 h-6', // 24px for 48px button (M3 large)\n\t\t\tlg: 'w-7 h-7' // 28px for 56px button (M3 extra large)\n\t\t}\n\t\treturn [sizeMap[this.size], 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\t// Add image classes and ensure decorative images have an empty alt.\n\t\tthis.prefixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t\tthis.suffixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t}\n\n\tclick(): void {\n\t\tthis.dispatchEvent(new Event('click', { bubbles: true, composed: true }))\n\t}\n\n\t// Prevent default behavior when the component is disabled.\n\tprivate _preventDefault(event: Event) {\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t}\n\n\trender() {\n\t\t// Map 'tonal' variant to 'filled tonal' for backwards compatibility\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant;\n\n\t\t// Compute classes for the interactive element.\n\t\tconst classes = {\n\t\t\t'z-0 transition-all duration-200 relative rounded-2xl flex justify-center items-center outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden flex-1 overflow-hidden':\n\t\t\t\ttrue,\n\t\t\t// Height - M3 spec: 24dp (xxs) → 32dp (dense) → 40dp (default) → 48dp (large) → 56dp (XL)\n\t\t\t'h-6': this.size === 'xxs', // 24px - Ultra-compact\n\t\t\t'h-8': this.size === 'xs', // 32px - M3 dense/compact\n\t\t\t'h-10': this.size === 'sm', // 40px - M3 default\n\t\t\t'h-12': this.size === 'md', // 48px - M3 large\n\t\t\t'h-14': this.size === 'lg', // 56px - M3 extra large\n\t\t\t// Padding - M3 spec: horizontal padding 24dp default, scaled proportionally\n\t\t\t'py-1 px-2': this.size === 'xxs', // 4px/8px for 24px height\n\t\t\t'py-2 px-4': this.size === 'xs', // 8px/16px for 32px height\n\t\t\t'py-2.5 px-5': this.size === 'sm', // 10px/20px for 40px height\n\t\t\t'py-3 px-6': this.size === 'md', // 12px/24px for 48px height (M3 default)\n\t\t\t'py-4 px-7': this.size === 'lg', // 16px/28px for 56px height\n\t\t\t// Typography - M3 spec: label-large (14px) default, scaled\n\t\t\t'text-[10px] font-medium leading-3': this.size === 'xxs', // 10px\n\t\t\t'text-xs font-medium leading-4': this.size === 'xs', // 12px\n\t\t\t'text-sm font-medium leading-5': this.size === 'sm' || this.size === 'md', // 14px - M3 label-large\n\t\t\t'text-base font-medium leading-6': this.size === 'lg', // 16px\n\t\t\t// Letter spacing - M3 spec\n\t\t\t'tracking-[0.1px]': true,\n\t\t\t// Gap - Scaled with size\n\t\t\t'gap-0.5': this.size === 'xxs', // 2px\n\t\t\t'gap-1': this.size === 'xs', // 4px\n\t\t\t'gap-1.5': this.size === 'sm', // 6px\n\t\t\t'gap-2': this.size === 'md', // 8px\n\t\t\t'gap-2.5': this.size === 'lg', // 10px\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'opacity-[0.38]': this.disabled,\n\t\t\t'hover:shadow-sm': !this.disabled && effectiveVariant === 'elevated',\n\t\t\t'w-full tex-center': this.width === 'full',\n\t\t\t// Elevated variant\n\t\t\t'bg-surface-low shadow-xs': effectiveVariant === 'elevated',\n\t\t\t// Outlined variant\n\t\t\t'bg-transparent border-1 border-solid': effectiveVariant === 'outlined',\n\t\t\t'border-outline': effectiveVariant === 'outlined' && this.effectiveColor === 'primary',\n\t\t\t'border-success-default': effectiveVariant === 'outlined' && this.effectiveColor === 'success',\n\t\t\t'border-error-default': effectiveVariant === 'outlined' && this.effectiveColor === 'error',\n\t\t\t'border-warning-default': effectiveVariant === 'outlined' && this.effectiveColor === 'warning',\n\t\t\t'border-info-default': effectiveVariant === 'outlined' && this.effectiveColor === 'info',\n\t\t\t'border-secondary-default': effectiveVariant === 'outlined' && this.effectiveColor === 'secondary',\n\t\t\t'border-outline-variant': effectiveVariant === 'outlined' && this.effectiveColor === 'neutral',\n\t\t\t// Filled variant - background colors\n\t\t\t'bg-primary-default': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'bg-secondary-default': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'bg-success-default': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'bg-error-default': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'bg-warning-default': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'bg-info-default': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'bg-surface-containerHighest': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Filled variant - text colors\n\t\t\t'text-primary-on': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-on': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'text-success-on': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'text-error-on': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'text-warning-on': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'text-info-on': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'text-surface-on': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal variant - background colors\n\t\t\t'bg-primary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'bg-secondary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'bg-success-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'bg-error-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'bg-warning-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'bg-info-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t'bg-surface-containerLow': effectiveVariant === 'filled tonal' && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal variant - text colors\n\t\t\t'text-primary-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'text-success-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'text-error-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'text-warning-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'text-info-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t// Text and elevated variants - text colors\n\t\t\t'text-primary-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'secondary',\n\t\t\t'text-success-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'success',\n\t\t\t'text-error-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'error',\n\t\t\t'text-warning-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'warning',\n\t\t\t'text-info-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'info',\n\t\t\t'text-surface-onVariant': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined' || effectiveVariant === 'filled tonal') && this.effectiveColor === 'neutral',\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'absolute inset-0 hover:opacity-[0.08] z-0 rounded-2xl': true,\n\t\t\t// M3 focus and pressed states\n\t\t\t'focus-visible:opacity-[0.10]': true, // M3 focus state\n\t\t\t'active:opacity-[0.10]': true, // M3 pressed state\n\t\t\t// Filled variant hover\n\t\t\t'hover:bg-primary-on': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-on': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-on': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-on': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-on': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-on': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-on': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Outlined, elevated, text variants hover\n\t\t\t'hover:bg-primary-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-onVariant': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal hover\n\t\t\t'hover:bg-primary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-containerLow': effectiveVariant === 'filled tonal' && this.effectiveColor === 'neutral',\n\t\t}\n\n\t\t// If href is provided, render an anchor element.\n\t\tif (this.href) {\n\t\t\treturn html`\n\t\t\t\t<a\n\t\t\t\t\t${magnetic({ strength: 3, radius: 60 })}\n\t\t\t\t\tpart=\"base\"\n\t\t\t\t\thref=${ifDefined(this.disabled ? undefined : this.href)}\n\t\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t@click=${this.disabled ? this._preventDefault : undefined}\n\t\t\t\t>\n\t\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t\t</a>\n\t\t\t`\n\t\t}\n\n\t\t// Otherwise, render a native button element.\n\t\treturn html`\n\t\t\t<button\n\t\t\t\t${magnetic({ strength: 3, radius: 60 })}\n\t\t\t\tpart=\"base\"\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\ttype=${ifDefined(this.type)}\n\t\t\t\ttabindex=${ifDefined(this.disabled ? '-1' : undefined)}\n\t\t\t>\n\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t<slot></slot>\n\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-button': SchmancyButton\n\t}\n}\n"],"mappings":";;;;;;;;AAQA,IAAa,IAA4B,EAAkC,sBAAA,GCkBpE,IAAA,cAA6B,EAAA;CAAA;EAAA,KAAA,SACnB,CAAC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgCiB;GAAA,GACjC,EAAW;GACd,MAAM;GACN,gBAAA,CAAgB;EAAA;CAAA;CAAA;EAAA,KAAA,iBAAA,CAGO;CAAA;CAUxB,cAAA;EACC,MAAA,GAAA,KAAA,UA4E+B,QAAA,KAAA,QAmBA,QAAA,KAAA,OAaE,MAAA,KAAA,OAQW,UAAA,KAAA,WAAA,CAe3B;EAlIjB,IAAA;GACC,KAAK,YAAY,KAAK,gBAAA;EACvB,QAAA;GACC,KAAK,YAAA,KAAY;EAClB;EAGA,KAAK,iBAAiB,UAAU,MAAA;GAC/B,IAAI,KAAK,UAGR,OAFA,EAAE,eAAA,GAAA,KACF,EAAE,yBAAA;GAGH,IAAM,IAAO,KAAK,WAAW;GACxB,MACD,KAAK,SAAS,YACjB,EAAE,eAAA,GACF,EAAK,cAAA,KACK,KAAK,SAAS,YACxB,EAAE,eAAA,GACF,EAAK,MAAA;EAAA,CAAA;CAGR;CAGA,IAAA,OAAI;EACH,OAAO,KAAK,WAAW,QAAQ;CAChC;CAEA,qBAAqB,GAAA;EACpB,KAAK,WAAW;CACjB;CAEA,oBAAA;EAKC,IAJA,MAAM,kBAAA,GAIF,KAAK,SAAS,UAAU;EAC5B,IAAM,IAAO,KAAK,QAAQ,eAAA;EAC1B,IAAA,CAAK,GAAM;E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":["../src/button/context.ts","../src/button/button.ts"],"sourcesContent":["import { createContext } from '@lit/context'\n\nexport type SchmancyButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg'\n\n/**\n * Provided by `<schmancy-button>` to its descendants so children\n * (e.g. `<schmancy-icon>`) can auto-size against the enclosing button.\n */\nexport const SchmancyButtonSizeContext = createContext<SchmancyButtonSize>('schmancy-button-size')\n","import { provide } from '@lit/context'\nimport { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { when } from 'lit/directives/when.js'\nimport { magnetic } from '../directives/magnetic'\nimport { SchmancyButtonSizeContext, type SchmancyButtonSize } from './context'\n\nexport interface SchmancyButtonEventMap {\n\tSchmancyFocus: CustomEvent<void>\n\tSchmancyBlur: CustomEvent<void>\n}\n\nexport type ButtonVariant = 'elevated' | 'filled' | 'filled tonal' | 'tonal' | 'outlined' | 'text'\nexport type ButtonColor = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'neutral'\n\n/**\n * A button component.\n * @element schmancy-button\n * @slot - The default slot.\n * @slot prefix - The prefix slot.\n * @slot suffix - The suffix slot.\n * @csspart base - The underlying native `<button>` (or `<a>` when `href` is set).\n */\n@customElement('schmancy-button')\nexport class SchmancyButton extends SchmancyElement {\n\tstatic styles = [css`:host{\n\t\tdisplay: inline-flex;\n\t\toverflow: hidden;\n\t\tposition: relative;\n\t\ttouch-action: manipulation;\n\t\tborder-radius: 1rem;\n\t\ttransition:\n\t\t\tbox-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),\n\t\t\ttransform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t}\n\t:host([width=\"full\"]) {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t}\n\t:host(:hover:not([disabled])) {\n\t\tbox-shadow: 0 4px 16px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 20%, transparent);\n\t}\n\t:host(:active:not([disabled])) {\n\t\ttransform: scale(0.97);\n\t\tbox-shadow: 0 1px 4px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransition-duration: 100ms;\n\t}\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host { transition: none; }\n\t\t:host(:hover:not([disabled])) { box-shadow: none; }\n\t\t:host(:active:not([disabled])) { transform: none; box-shadow: none; }\n\t}\n\t:host *,\n\t* {\n\t\ttouch-action: manipulation;\n\t}`]\n\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\tstatic formAssociated = true\n\tprivate internals: ElementInternals | undefined\n\t/**\n\t * When this button is `type=\"submit\"` and lives inside a <schmancy-form>,\n\t * the observer mirrors the form's `aria-busy` attribute onto this button\n\t * while a submit is in flight. Stays focusable; disabled buttons drop from\n\t * the tab order and are unreachable to AT (WCAG 2.2 AA).\n\t */\n\tprivate _formBusyObserver?: MutationObserver\n\n\tconstructor() {\n\t\tsuper()\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch {\n\t\t\tthis.internals = undefined\n\t\t}\n\t\t// Translate clicks into native form semantics so the button works\n\t\t// inside any <form>, not just inside <schmancy-form>.\n\t\tthis.addEventListener('click', (e: MouseEvent) => {\n\t\t\tif (this.disabled) {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopImmediatePropagation()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst form = this.internals?.form\n\t\t\tif (!form) return\n\t\t\tif (this.type === 'submit') {\n\t\t\t\te.preventDefault()\n\t\t\t\tform.requestSubmit()\n\t\t\t} else if (this.type === 'reset') {\n\t\t\t\te.preventDefault()\n\t\t\t\tform.reset()\n\t\t\t}\n\t\t})\n\t}\n\n\t/** Associated form, when placed inside a <form>. */\n\tget form(): HTMLFormElement | null {\n\t\treturn this.internals?.form ?? null\n\t}\n\n\tformDisabledCallback(disabled: boolean): void {\n\t\tthis.disabled = disabled\n\t}\n\n\toverride connectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\t// Mirror the closest <schmancy-form>'s aria-busy onto this submit button\n\t\t// so the user gets a visible busy state during async submit handlers.\n\t\t// Schmancy-form sets aria-busy=\"true\" while status === 'submitting'.\n\t\tif (this.type !== 'submit') return\n\t\tconst form = this.closest('schmancy-form') as HTMLElement | null\n\t\tif (!form) return\n\t\tconst sync = () => {\n\t\t\tconst busy = form.getAttribute('aria-busy') === 'true'\n\t\t\tif (busy) {\n\t\t\t\tthis.setAttribute('aria-busy', 'true')\n\t\t\t\tthis.internals?.states.add('submitting')\n\t\t\t} else {\n\t\t\t\tthis.removeAttribute('aria-busy')\n\t\t\t\tthis.internals?.states.delete('submitting')\n\t\t\t}\n\t\t}\n\t\tsync()\n\t\tthis._formBusyObserver = new MutationObserver(sync)\n\t\tthis._formBusyObserver.observe(form, { attributes: true, attributeFilter: ['aria-busy'] })\n\t}\n\n\toverride disconnectedCallback(): void {\n\t\tthis._formBusyObserver?.disconnect()\n\t\tthis._formBusyObserver = undefined\n\t\tsuper.disconnectedCallback()\n\t}\n\n\t@query('[part=\"base\"]', true)\n\tprivate nativeElement!: HTMLElement\n\n\tprivate _ariaLabel!: string\n\n\t/**\n\t * The variant of the button.\n\t * @attr\n\t * @default 'text'\n\t * @public\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic variant: ButtonVariant = 'text'\n\n\t/**\n\t * The color of the button.\n\t * @attr\n\t * @default Depends on variant: 'primary' for filled/elevated/outlined/text, 'secondary' for tonal\n\t * @public\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic color?: ButtonColor\n\n\t/**\n\t * The width of the button.\n\t * @attr\n\t * @type {'full' | 'auto'}\n\t * @default 'auto'\n\t * @public\n\t */\n\t@property({ reflect: true })\n\tpublic width: 'full' | 'auto' = 'auto'\n\n\t/**\n\t * The size of the button.\n\t * Provided as `SchmancyButtonSizeContext` to descendant elements so children\n\t * (e.g. `<schmancy-icon>`) can auto-size against the enclosing button.\n\t * @attr\n\t * @type {'xxs' | 'xs' | 'sm' | 'md' | 'lg'}\n\t * @default 'md'\n\t * @public\n\t */\n\t@provide({ context: SchmancyButtonSizeContext })\n\t@property({ type: String })\n\tpublic size: SchmancyButtonSize = 'md'\n\n\t/**\n\t * The type of the button.\n\t * Defaults to 'button' (preventing accidental form submissions).\n\t * @attr\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic type: 'button' | 'reset' | 'submit' = 'button'\n\n\t/**\n\t * The URL the button points to.\n\t * If provided, the component will render as an anchor element.\n\t * @attr\n\t */\n\t@property()\n\tpublic href?: string\n\n\t/**\n\t * Determines whether the button is disabled.\n\t * @attr\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\tpublic override set ariaLabel(value: string) {\n\t\tconst oldVal = this._ariaLabel\n\t\tthis._ariaLabel = value\n\n\t\tif (this.hasAttribute('aria-label')) {\n\t\t\tthis.removeAttribute('aria-label')\n\t\t}\n\t\tthis.requestUpdate('ariaLabel', oldVal)\n\t}\n\n\t@property({ attribute: 'aria-label' })\n\tpublic override get ariaLabel() {\n\t\treturn this._ariaLabel\n\t}\n\n\t@queryAssignedElements({\n\t\tslot: 'prefix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate prefixImgs!: HTMLImageElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'suffix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate suffixImgs!: HTMLImageElement[]\n\n\t/** Sets focus in the button. */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.nativeElement.focus(options)\n\t}\n\n\t/** Removes focus from the button. */\n\tpublic override blur() {\n\t\tthis.nativeElement.blur()\n\t}\n\n\t/**\n\t * Get the effective color based on variant if not explicitly set\n\t * M3 spec: filled = primary, tonal = secondary, others = primary\n\t */\n\tprotected get effectiveColor(): ButtonColor {\n\t\tif (this.color) return this.color\n\n\t\t// Map 'tonal' to 'filled tonal' for checking\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant\n\n\t\t// M3 defaults: tonal uses secondary, others use primary\n\t\treturn effectiveVariant === 'filled tonal' ? 'secondary' : 'primary'\n\t}\n\n\tprotected get imgClasses(): string[] {\n\t\t// M3 spec: icon sizes scale with button size\n\t\tconst sizeMap = {\n\t\t\txxs: 'w-3 h-3', // 12px for 24px button (ultra-compact)\n\t\t\txs: 'w-4 h-4', // 16px for 32px button (M3 dense)\n\t\t\tsm: 'w-5 h-5', // 20px for 40px button (M3 default)\n\t\t\tmd: 'w-6 h-6', // 24px for 48px button (M3 large)\n\t\t\tlg: 'w-7 h-7' // 28px for 56px button (M3 extra large)\n\t\t}\n\t\treturn [sizeMap[this.size], 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\t// Add image classes and ensure decorative images have an empty alt.\n\t\tthis.prefixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t\tthis.suffixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t}\n\n\tclick(): void {\n\t\tthis.dispatchEvent(new Event('click', { bubbles: true, composed: true }))\n\t}\n\n\t// Prevent default behavior when the component is disabled.\n\tprivate _preventDefault(event: Event) {\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t}\n\n\trender() {\n\t\t// Map 'tonal' variant to 'filled tonal' for backwards compatibility\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant;\n\n\t\t// Compute classes for the interactive element.\n\t\tconst classes = {\n\t\t\t'z-0 transition-all duration-200 relative rounded-2xl flex justify-center items-center outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden flex-1 overflow-hidden':\n\t\t\t\ttrue,\n\t\t\t// Height - M3 spec: 24dp (xxs) → 32dp (dense) → 40dp (default) → 48dp (large) → 56dp (XL)\n\t\t\t'h-6': this.size === 'xxs', // 24px - Ultra-compact\n\t\t\t'h-8': this.size === 'xs', // 32px - M3 dense/compact\n\t\t\t'h-10': this.size === 'sm', // 40px - M3 default\n\t\t\t'h-12': this.size === 'md', // 48px - M3 large\n\t\t\t'h-14': this.size === 'lg', // 56px - M3 extra large\n\t\t\t// Padding - M3 spec: horizontal padding 24dp default, scaled proportionally\n\t\t\t'py-1 px-2': this.size === 'xxs', // 4px/8px for 24px height\n\t\t\t'py-2 px-4': this.size === 'xs', // 8px/16px for 32px height\n\t\t\t'py-2.5 px-5': this.size === 'sm', // 10px/20px for 40px height\n\t\t\t'py-3 px-6': this.size === 'md', // 12px/24px for 48px height (M3 default)\n\t\t\t'py-4 px-7': this.size === 'lg', // 16px/28px for 56px height\n\t\t\t// Typography - M3 spec: label-large (14px) default, scaled\n\t\t\t'text-[10px] font-medium leading-3': this.size === 'xxs', // 10px\n\t\t\t'text-xs font-medium leading-4': this.size === 'xs', // 12px\n\t\t\t'text-sm font-medium leading-5': this.size === 'sm' || this.size === 'md', // 14px - M3 label-large\n\t\t\t'text-base font-medium leading-6': this.size === 'lg', // 16px\n\t\t\t// Letter spacing - M3 spec\n\t\t\t'tracking-[0.1px]': true,\n\t\t\t// Gap - Scaled with size\n\t\t\t'gap-0.5': this.size === 'xxs', // 2px\n\t\t\t'gap-1': this.size === 'xs', // 4px\n\t\t\t'gap-1.5': this.size === 'sm', // 6px\n\t\t\t'gap-2': this.size === 'md', // 8px\n\t\t\t'gap-2.5': this.size === 'lg', // 10px\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'opacity-[0.38]': this.disabled,\n\t\t\t'hover:shadow-sm': !this.disabled && effectiveVariant === 'elevated',\n\t\t\t'w-full tex-center': this.width === 'full',\n\t\t\t// Elevated variant\n\t\t\t'bg-surface-low shadow-xs': effectiveVariant === 'elevated',\n\t\t\t// Outlined variant\n\t\t\t'bg-transparent border-1 border-solid': effectiveVariant === 'outlined',\n\t\t\t'border-outline': effectiveVariant === 'outlined' && this.effectiveColor === 'primary',\n\t\t\t'border-success-default': effectiveVariant === 'outlined' && this.effectiveColor === 'success',\n\t\t\t'border-error-default': effectiveVariant === 'outlined' && this.effectiveColor === 'error',\n\t\t\t'border-warning-default': effectiveVariant === 'outlined' && this.effectiveColor === 'warning',\n\t\t\t'border-info-default': effectiveVariant === 'outlined' && this.effectiveColor === 'info',\n\t\t\t'border-secondary-default': effectiveVariant === 'outlined' && this.effectiveColor === 'secondary',\n\t\t\t'border-outline-variant': effectiveVariant === 'outlined' && this.effectiveColor === 'neutral',\n\t\t\t// Filled variant - background colors\n\t\t\t'bg-primary-default': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'bg-secondary-default': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'bg-success-default': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'bg-error-default': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'bg-warning-default': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'bg-info-default': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'bg-surface-containerHighest': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Filled variant - text colors\n\t\t\t'text-primary-on': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-on': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'text-success-on': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'text-error-on': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'text-warning-on': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'text-info-on': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'text-surface-on': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal variant - background colors\n\t\t\t'bg-primary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'bg-secondary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'bg-success-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'bg-error-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'bg-warning-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'bg-info-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t'bg-surface-containerLow': effectiveVariant === 'filled tonal' && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal variant - text colors\n\t\t\t'text-primary-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'text-success-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'text-error-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'text-warning-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'text-info-onContainer': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t// Text and elevated variants - text colors\n\t\t\t'text-primary-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'primary',\n\t\t\t'text-secondary-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'secondary',\n\t\t\t'text-success-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'success',\n\t\t\t'text-error-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'error',\n\t\t\t'text-warning-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'warning',\n\t\t\t'text-info-default': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined') && this.effectiveColor === 'info',\n\t\t\t'text-surface-onVariant': (effectiveVariant === 'text' || effectiveVariant === 'elevated' || effectiveVariant === 'outlined' || effectiveVariant === 'filled tonal') && this.effectiveColor === 'neutral',\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'absolute inset-0 hover:opacity-[0.08] z-0 rounded-2xl': true,\n\t\t\t// M3 focus and pressed states\n\t\t\t'focus-visible:opacity-[0.10]': true, // M3 focus state\n\t\t\t'active:opacity-[0.10]': true, // M3 pressed state\n\t\t\t// Filled variant hover\n\t\t\t'hover:bg-primary-on': effectiveVariant === 'filled' && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-on': effectiveVariant === 'filled' && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-on': effectiveVariant === 'filled' && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-on': effectiveVariant === 'filled' && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-on': effectiveVariant === 'filled' && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-on': effectiveVariant === 'filled' && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-on': effectiveVariant === 'filled' && this.effectiveColor === 'neutral',\n\t\t\t// Outlined, elevated, text variants hover\n\t\t\t'hover:bg-primary-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-default': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-onVariant': (effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text') && this.effectiveColor === 'neutral',\n\t\t\t// Filled tonal hover\n\t\t\t'hover:bg-primary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'primary',\n\t\t\t'hover:bg-secondary-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'secondary',\n\t\t\t'hover:bg-success-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'success',\n\t\t\t'hover:bg-error-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'error',\n\t\t\t'hover:bg-warning-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'warning',\n\t\t\t'hover:bg-info-container': effectiveVariant === 'filled tonal' && this.effectiveColor === 'info',\n\t\t\t'hover:bg-surface-containerLow': effectiveVariant === 'filled tonal' && this.effectiveColor === 'neutral',\n\t\t}\n\n\t\t// If href is provided, render an anchor element.\n\t\tif (this.href) {\n\t\t\treturn html`\n\t\t\t\t<a\n\t\t\t\t\t${magnetic({ strength: 3, radius: 60 })}\n\t\t\t\t\tpart=\"base\"\n\t\t\t\t\thref=${ifDefined(this.disabled ? undefined : this.href)}\n\t\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t@click=${this.disabled ? this._preventDefault : undefined}\n\t\t\t\t>\n\t\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t\t</a>\n\t\t\t`\n\t\t}\n\n\t\t// Otherwise, render a native button element.\n\t\treturn html`\n\t\t\t<button\n\t\t\t\t${magnetic({ strength: 3, radius: 60 })}\n\t\t\t\tpart=\"base\"\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\ttype=${ifDefined(this.type)}\n\t\t\t\ttabindex=${ifDefined(this.disabled ? '-1' : undefined)}\n\t\t\t>\n\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t<slot></slot>\n\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-button': SchmancyButton\n\t}\n}\n"],"mappings":";;;;;;;;AAQA,IAAa,IAA4B,EAAkC,sBAAA,GCkBpE,IAAA,cAA6B,EAAA;CAAA;EAAA,KAAA,SACnB,CAAC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgCiB;GAAA,GACjC,EAAW;GACd,MAAM;GACN,gBAAA,CAAgB;EAAA;CAAA;CAAA;EAAA,KAAA,iBAAA,CAGO;CAAA;CAUxB,cAAA;EACC,MAAA,GAAA,KAAA,UA4E+B,QAAA,KAAA,QAmBA,QAAA,KAAA,OAaE,MAAA,KAAA,OAQW,UAAA,KAAA,WAAA,CAe3B;EAlIjB,IAAA;GACC,KAAK,YAAY,KAAK,gBAAA;EACvB,QAAA;GACC,KAAK,YAAA,KAAY;EAClB;EAGA,KAAK,iBAAiB,UAAU,MAAA;GAC/B,IAAI,KAAK,UAGR,OAFA,EA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,WAAW,aAAA,CAAA,CAAA,GAAc,EAAA,WAAA,aAAA,IAAA,GAAA,EAAA,CAKpC,EAAsB;CACtB,MAAM;CACN,SAAA,CAAS;CACT,UAAU;AAAA,CAAA,CAAA,GACV,EAAA,WAAA,cAAA,KAAA,CAAA,GAAA,EAAA,CAGA,EAAsB;CACtB,MAAM;CACN,SAAA,CAAS;CACT,UAAU;AAAA,CAAA,CAAA,GACV,EAAA,WAAA,cAAA,KAAA,CAAA,GAAA,IAAA,EAAA,CAlND,EAAc,iBAAA,CAAA,GAAiB,CAAA;AAAA,SAAA,KAAA"}
|
package/dist/button.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-CYIif26I.cjs`);require(`./mixins-CGXSzZc7.cjs`);const t=require(`./magnetic-DKtc4umC.cjs`),n=require(`./button-DFvR1iXX.cjs`);let r=require(`lit/decorators.js`),i=require(`lit`),a=require(`lit/directives/if-defined.js`),o=require(`lit/directives/when.js`);var s=class extends e.t{constructor(...e){super(...e),this.size=`md`,this.variant=`text`,this.width=`auto`,this.type=`button`,this.disabled=!1,this.text=!1}static{this.styles=[i.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
border-radius: 9999px;
|
package/dist/button.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e, u as t } from "./SchmancyElement-
|
|
2
|
-
import "./mixins-
|
|
1
|
+
import { t as e, u as t } from "./SchmancyElement-CA0Wqt8m.js";
|
|
2
|
+
import "./mixins-Bp0wIHg2.js";
|
|
3
3
|
import { t as n } from "./magnetic-DaOOv5Dz.js";
|
|
4
|
-
import { t as r } from "./button-
|
|
4
|
+
import { t as r } from "./button-qbN1muQ0.js";
|
|
5
5
|
import { customElement as i, property as a, query as o, state as s } from "lit/decorators.js";
|
|
6
6
|
import { LitElement as c, css as l, html as u } from "lit";
|
|
7
7
|
import { ifDefined as d } from "lit/directives/if-defined.js";
|
|
@@ -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-CA0Wqt8m.js";
|
|
2
|
+
import "./mixins-Bp0wIHg2.js";
|
|
3
3
|
import { t as n } from "./cursor-glow-Ah7VXSj7.js";
|
|
4
4
|
import { customElement as r, property as i, state as a } from "lit/decorators.js";
|
|
5
5
|
import { LitElement as o, css as s, html as c } from "lit";
|