@mhmo91/schmancy 0.10.35 → 0.10.36
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 +1155 -1083
- package/dist/SchmancyElement-BBzRWB1w.cjs +2 -0
- package/dist/SchmancyElement-BBzRWB1w.cjs.map +1 -0
- package/dist/SchmancyElement-C3CpdNsi.js +284 -0
- package/dist/SchmancyElement-C3CpdNsi.js.map +1 -0
- package/dist/agent/schmancy.agent.js +3387 -3228
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +333 -255
- package/dist/{area-DviXdbDx.js → area-BA96mwFY.js} +2 -2
- package/dist/{area-DviXdbDx.js.map → area-BA96mwFY.js.map} +1 -1
- package/dist/{area-CTSTgjlx.cjs → area-DtyQDdOF.cjs} +1 -1
- package/dist/{area-CTSTgjlx.cjs.map → area-DtyQDdOF.cjs.map} +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{audio-Q9oB_cQR.cjs → audio-B_jT9Xr7.cjs} +1 -1
- package/dist/{audio-Q9oB_cQR.cjs.map → audio-B_jT9Xr7.cjs.map} +1 -1
- package/dist/{audio-DFYoaw0M.js → audio-D52h1jAT.js} +1 -1
- package/dist/{audio-DFYoaw0M.js.map → audio-D52h1jAT.js.map} +1 -1
- package/dist/audio.cjs +1 -1
- package/dist/audio.js +2 -2
- package/dist/{autocomplete-DmLXJr7C.cjs → autocomplete-Bts5Jwwr.cjs} +1 -1
- package/dist/{autocomplete-DmLXJr7C.cjs.map → autocomplete-Bts5Jwwr.cjs.map} +1 -1
- package/dist/{autocomplete-BDvuma6D.js → autocomplete-CI4QJXAN.js} +3 -3
- package/dist/{autocomplete-BDvuma6D.js.map → autocomplete-CI4QJXAN.js.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-I4B1UNMc.cjs +34 -0
- package/dist/boat-I4B1UNMc.cjs.map +1 -0
- package/dist/{boat-lr7MPZ7H.js → boat-_N1x5U_3.js} +67 -83
- package/dist/boat-_N1x5U_3.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-CgzZbGfx.cjs → busy-BIUonyPk.cjs} +1 -1
- package/dist/{busy-CgzZbGfx.cjs.map → busy-BIUonyPk.cjs.map} +1 -1
- package/dist/{busy-DgQ4ux5N.js → busy-CCB3qKnh.js} +2 -2
- package/dist/{busy-DgQ4ux5N.js.map → busy-CCB3qKnh.js.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/{button-qbN1muQ0.js → button-C89bPnHt.js} +2 -2
- package/dist/{button-qbN1muQ0.js.map → button-C89bPnHt.js.map} +1 -1
- package/dist/{button-DFvR1iXX.cjs → button-CkwQH-g3.cjs} +1 -1
- package/dist/{button-DFvR1iXX.cjs.map → button-CkwQH-g3.cjs.map} +1 -1
- package/dist/button.cjs +4 -4
- package/dist/button.cjs.map +1 -1
- package/dist/button.js +16 -22
- package/dist/button.js.map +1 -1
- package/dist/{card-D_GlwZ5q.cjs → card-BO93_oxQ.cjs} +1 -1
- package/dist/{card-D_GlwZ5q.cjs.map → card-BO93_oxQ.cjs.map} +1 -1
- package/dist/{card-DAbr-7Vy.js → card-CFsCgJKZ.js} +2 -2
- package/dist/{card-DAbr-7Vy.js.map → card-CFsCgJKZ.js.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-BNORaxMF.js → checkbox-Bh7q0djq.js} +2 -2
- package/dist/{checkbox-BNORaxMF.js.map → checkbox-Bh7q0djq.js.map} +1 -1
- package/dist/{checkbox-BUY_uc_r.cjs → checkbox-CFUBUFtW.cjs} +1 -1
- package/dist/{checkbox-BUY_uc_r.cjs.map → checkbox-CFUBUFtW.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-Dg6Lk6BT.js → chips-6YaoRmeG.js} +145 -122
- package/dist/chips-6YaoRmeG.js.map +1 -0
- package/dist/{chips-CXZ4dJCK.cjs → chips-BfzpsyV1.cjs} +44 -33
- package/dist/chips-BfzpsyV1.cjs.map +1 -0
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/connectivity.cjs +1 -1
- package/dist/connectivity.js +3 -3
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-BU6WX7d5.js → date-range-CEo_Kjqw.js} +129 -137
- package/dist/date-range-CEo_Kjqw.js.map +1 -0
- package/dist/{date-range-C-_be3_E.cjs → date-range-N-A249O9.cjs} +25 -19
- package/dist/date-range-N-A249O9.cjs.map +1 -0
- package/dist/{date-range-inline-7o7xtVIu.js → date-range-inline-BwialV9j.js} +2 -2
- package/dist/{date-range-inline-7o7xtVIu.js.map → date-range-inline-BwialV9j.js.map} +1 -1
- package/dist/{date-range-inline-DJtUmHKF.cjs → date-range-inline-DFopysWF.cjs} +1 -1
- package/dist/{date-range-inline-DJtUmHKF.cjs.map → date-range-inline-DFopysWF.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-Bs0MyyvF.cjs → details-BLRPV8sY.cjs} +1 -1
- package/dist/{details-Bs0MyyvF.cjs.map → details-BLRPV8sY.cjs.map} +1 -1
- package/dist/{details-EfbDPVEo.js → details-GtpfI2hA.js} +2 -2
- package/dist/{details-EfbDPVEo.js.map → details-GtpfI2hA.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{directives-zi1Mm2er.js → directives-C2dXgpCY.js} +13 -6
- package/dist/directives-C2dXgpCY.js.map +1 -0
- package/dist/{directives-fLwDj6b0.cjs → directives-CvYGSW_a.cjs} +2 -2
- package/dist/directives-CvYGSW_a.cjs.map +1 -0
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +2 -2
- package/dist/{divider-CEPfrIwe.js → divider-D0pGX2VB.js} +2 -2
- package/dist/{divider-CEPfrIwe.js.map → divider-D0pGX2VB.js.map} +1 -1
- package/dist/{divider-CdIsWZrM.cjs → divider-rNsWCvMi.cjs} +1 -1
- package/dist/{divider-CdIsWZrM.cjs.map → divider-rNsWCvMi.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-g1vqqUp1.js → expand-FcKAzJta.js} +3 -3
- package/dist/{expand-g1vqqUp1.js.map → expand-FcKAzJta.js.map} +1 -1
- package/dist/{expand--at1k3qo.cjs → expand-tffQHGbZ.cjs} +1 -1
- package/dist/{expand--at1k3qo.cjs.map → expand-tffQHGbZ.cjs.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/fab.cjs +77 -0
- package/dist/fab.cjs.map +1 -0
- package/dist/fab.js +151 -0
- package/dist/fab.js.map +1 -0
- package/dist/{float-P9HukAm-.cjs → float-CDjgxWyy.cjs} +1 -1
- package/dist/{float-P9HukAm-.cjs.map → float-CDjgxWyy.cjs.map} +1 -1
- package/dist/{float-DxVzgI9o.js → float-CQ1WEp3M.js} +2 -2
- package/dist/{float-DxVzgI9o.js.map → float-CQ1WEp3M.js.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{form-CqLaozHp.js → form-H24puioV.js} +3 -3
- package/dist/{form-CqLaozHp.js.map → form-H24puioV.js.map} +1 -1
- package/dist/{form-ByYhXe1p.cjs → form-VYhbbir3.cjs} +1 -1
- package/dist/{form-ByYhXe1p.cjs.map → form-VYhbbir3.cjs.map} +1 -1
- package/dist/form.cjs +6 -6
- package/dist/form.cjs.map +1 -1
- package/dist/form.js +25 -23
- package/dist/form.js.map +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/{icons-DYtiRU5V.cjs → icons-B_a1HStW.cjs} +1 -1
- package/dist/{icons-DYtiRU5V.cjs.map → icons-B_a1HStW.cjs.map} +1 -1
- package/dist/{icons-CkphcMp6.js → icons-DBxfN91B.js} +2 -2
- package/dist/{icons-CkphcMp6.js.map → icons-DBxfN91B.js.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-CjqJksl8.js → iframe-BDVElN8z.js} +2 -2
- package/dist/{iframe-CjqJksl8.js.map → iframe-BDVElN8z.js.map} +1 -1
- package/dist/{iframe-C3trkP8q.cjs → iframe-CG-z9qev.cjs} +1 -1
- package/dist/{iframe-C3trkP8q.cjs.map → iframe-CG-z9qev.cjs.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 +57 -56
- package/dist/{input-DuavpwNL.cjs → input-B14Nn6xD.cjs} +1 -1
- package/dist/{input-DuavpwNL.cjs.map → input-B14Nn6xD.cjs.map} +1 -1
- package/dist/{input-CG51zDVh.js → input-Bt_o4sYo.js} +2 -2
- package/dist/{input-CG51zDVh.js.map → input-Bt_o4sYo.js.map} +1 -1
- package/dist/{input-chip-C6Lq1927.js → input-chip-DEqO0DXc.js} +2 -2
- package/dist/input-chip-DEqO0DXc.js.map +1 -0
- package/dist/{input-chip-57tgNXKT.cjs → input-chip-ugYu9Fn9.cjs} +1 -1
- package/dist/input-chip-ugYu9Fn9.cjs.map +1 -0
- 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-D4IOwx7p.js → layout-BJ_43VrH.js} +1 -1
- package/dist/{layout-D4IOwx7p.js.map → layout-BJ_43VrH.js.map} +1 -1
- package/dist/{layout-6ipbiWTl.cjs → layout-DF9ZaQ-b.cjs} +1 -1
- package/dist/{layout-6ipbiWTl.cjs.map → layout-DF9ZaQ-b.cjs.map} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +2 -2
- package/dist/{lightbox-H8pVWGMX.cjs → lightbox-B47Zoqv-.cjs} +1 -1
- package/dist/{lightbox-H8pVWGMX.cjs.map → lightbox-B47Zoqv-.cjs.map} +1 -1
- package/dist/{lightbox-CsyO2XSr.js → lightbox-ZmuoBBFT.js} +2 -2
- package/dist/{lightbox-CsyO2XSr.js.map → lightbox-ZmuoBBFT.js.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-BAwH0pQW.js → list-C47xzld_.js} +2 -2
- package/dist/{list-BAwH0pQW.js.map → list-C47xzld_.js.map} +1 -1
- package/dist/{list-Bs9m8kw7.cjs → list-CaSWrlG2.cjs} +1 -1
- package/dist/{list-Bs9m8kw7.cjs.map → list-CaSWrlG2.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{menu-tQVARVaC.js → menu-8RObM6Ie.js} +3 -3
- package/dist/{menu-tQVARVaC.js.map → menu-8RObM6Ie.js.map} +1 -1
- package/dist/{menu-BMcGzj1h.cjs → menu-Jpsy85SX.cjs} +1 -1
- package/dist/{menu-BMcGzj1h.cjs.map → menu-Jpsy85SX.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/{mixins-CGXSzZc7.cjs → mixins-DPdzC9ZH.cjs} +1 -1
- package/dist/{mixins-CGXSzZc7.cjs.map → mixins-DPdzC9ZH.cjs.map} +1 -1
- package/dist/{mixins-Bp0wIHg2.js → mixins-DTzfFVyv.js} +1 -1
- package/dist/{mixins-Bp0wIHg2.js.map → mixins-DTzfFVyv.js.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-D1tX2nx5.js → notification-Ccktcj9H.js} +4 -4
- package/dist/{notification-D1tX2nx5.js.map → notification-Ccktcj9H.js.map} +1 -1
- package/dist/{notification-Bz00zdpV.cjs → notification-DSkB-sn0.cjs} +1 -1
- package/dist/{notification-Bz00zdpV.cjs.map → notification-DSkB-sn0.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-BnybLEDO.cjs → option-0aNiVB3Q.cjs} +1 -1
- package/dist/{option-BnybLEDO.cjs.map → option-0aNiVB3Q.cjs.map} +1 -1
- package/dist/{option-BpGV8Apj.js → option-CkMxwBqU.js} +2 -2
- package/dist/{option-BpGV8Apj.js.map → option-CkMxwBqU.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-UQR2Dy3u.cjs → overlay-BS-ta-zq.cjs} +5 -5
- package/dist/overlay-BS-ta-zq.cjs.map +1 -0
- package/dist/{overlay-BpNhd74N.js → overlay-H3Wt_dgQ.js} +108 -108
- package/dist/overlay-H3Wt_dgQ.js.map +1 -0
- package/dist/overlay.cjs +1 -1
- package/dist/{overlay.confirm-body-CVDtVk5X.cjs → overlay.confirm-body-CR9xaqOE.cjs} +1 -1
- package/dist/{overlay.confirm-body-CVDtVk5X.cjs.map → overlay.confirm-body-CR9xaqOE.cjs.map} +1 -1
- package/dist/{overlay.confirm-body-BHcXu5Wk.js → overlay.confirm-body-Dxn_wNm3.js} +6 -6
- package/dist/{overlay.confirm-body-BHcXu5Wk.js.map → overlay.confirm-body-Dxn_wNm3.js.map} +1 -1
- package/dist/overlay.js +3 -3
- package/dist/{overlay.service-DTE6NwIM.js → overlay.service-C46kOtUi.js} +2 -2
- package/dist/{overlay.service-DTE6NwIM.js.map → overlay.service-C46kOtUi.js.map} +1 -1
- package/dist/{overlay.service-C8RsQzgM.cjs → overlay.service-DEj3rfRr.cjs} +1 -1
- package/dist/{overlay.service-C8RsQzgM.cjs.map → overlay.service-DEj3rfRr.cjs.map} +1 -1
- package/dist/{progress-CAKsxp29.js → progress-BK7gSq8j.js} +2 -2
- package/dist/{progress-CAKsxp29.js.map → progress-BK7gSq8j.js.map} +1 -1
- package/dist/{progress-gbIALDRs.cjs → progress-zs18GR6C.cjs} +1 -1
- package/dist/{progress-gbIALDRs.cjs.map → progress-zs18GR6C.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-otyvZvUk.js → radio-group-1HCpzRUB.js} +2 -2
- package/dist/{radio-group-otyvZvUk.js.map → radio-group-1HCpzRUB.js.map} +1 -1
- package/dist/{radio-group-CfJ5DtI4.cjs → radio-group-DbYlyPc-.cjs} +1 -1
- package/dist/{radio-group-CfJ5DtI4.cjs.map → radio-group-DbYlyPc-.cjs.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-81jniVTs.cjs → select-B-SSmUDe.cjs} +1 -1
- package/dist/{select-81jniVTs.cjs.map → select-B-SSmUDe.cjs.map} +1 -1
- package/dist/{select-9vXx1fhr.js → select-CEyhNtZ2.js} +3 -3
- package/dist/{select-9vXx1fhr.js.map → select-CEyhNtZ2.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/INDEX.md +1 -1
- package/dist/skills/SKILL.md +6 -7
- package/dist/skills/boat.md +21 -15
- package/dist/skills/fab.md +75 -0
- package/dist/skills/schmancy/INDEX.md +1 -1
- package/dist/skills/schmancy/SKILL.md +6 -7
- package/dist/skills/schmancy/boat.md +21 -15
- package/dist/skills/schmancy/fab.md +75 -0
- package/dist/skills/schmancy/theme.md +1 -1
- package/dist/skills/theme.md +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +2 -2
- package/dist/{sound.service-D3ZSq1Kj.js → sound.service-DO4SmUUT.js} +1 -1
- package/dist/{sound.service-D3ZSq1Kj.js.map → sound.service-DO4SmUUT.js.map} +1 -1
- package/dist/{sound.service-CmIw63aM.cjs → sound.service-G_8GV_6L.cjs} +1 -1
- package/dist/{sound.service-CmIw63aM.cjs.map → sound.service-G_8GV_6L.cjs.map} +1 -1
- package/dist/{splash-screen-BOjrmGLk.js → splash-screen-B1mM4_xz.js} +2 -2
- package/dist/{splash-screen-BOjrmGLk.js.map → splash-screen-B1mM4_xz.js.map} +1 -1
- package/dist/{splash-screen-C5KAWXvA.cjs → splash-screen-cbz4bxjB.cjs} +1 -1
- package/dist/{splash-screen-C5KAWXvA.cjs.map → splash-screen-cbz4bxjB.cjs.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-qzUpLbje.cjs → src-czeiuT1m.cjs} +1 -1
- package/dist/{src-qzUpLbje.cjs.map → src-czeiuT1m.cjs.map} +1 -1
- package/dist/{src-C5g3p1J5.js → src-tncsWsTY.js} +36 -35
- package/dist/{src-C5g3p1J5.js.map → src-tncsWsTY.js.map} +1 -1
- package/dist/{state-Cex3rmx2.cjs → state-Cx0aoL5e.cjs} +1 -1
- package/dist/{state-Cex3rmx2.cjs.map → state-Cx0aoL5e.cjs.map} +1 -1
- package/dist/{state-CWBRTSvE.js → state-DJDp3N7J.js} +1 -1
- package/dist/{state-CWBRTSvE.js.map → state-DJDp3N7J.js.map} +1 -1
- package/dist/state.cjs +1 -1
- package/dist/state.js +2 -2
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +2 -2
- package/dist/{surface-PfiejLuw.cjs → surface-C3cxTcJD.cjs} +1 -1
- package/dist/{surface-PfiejLuw.cjs.map → surface-C3cxTcJD.cjs.map} +1 -1
- package/dist/{surface-9S5scTsD.js → surface-CYBl8_a3.js} +2 -2
- package/dist/{surface-9S5scTsD.js.map → surface-CYBl8_a3.js.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-BBOjAmgG.js → tabs-DHy93Q3N.js} +2 -2
- package/dist/{tabs-BBOjAmgG.js.map → tabs-DHy93Q3N.js.map} +1 -1
- package/dist/{tabs-uYvb1P06.cjs → tabs-ORQ_Zd43.cjs} +1 -1
- package/dist/{tabs-uYvb1P06.cjs.map → tabs-ORQ_Zd43.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-YPHX4g7Y.cjs → textarea-CEUaDURR.cjs} +1 -1
- package/dist/{textarea-YPHX4g7Y.cjs.map → textarea-CEUaDURR.cjs.map} +1 -1
- package/dist/{textarea-QzSj8Dkl.js → textarea-DHIMt-ly.js} +2 -2
- package/dist/{textarea-QzSj8Dkl.js.map → textarea-DHIMt-ly.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/theme-CJpjkqHr.cjs +181 -0
- package/dist/{theme-iKUaS9JB.cjs.map → theme-CJpjkqHr.cjs.map} +1 -1
- package/dist/{theme-C2Mp-VGt.js → theme-CgI9PRco.js} +6 -5
- package/dist/{theme-C2Mp-VGt.js.map → theme-CgI9PRco.js.map} +1 -1
- package/dist/{theme-button-CJmhxfMe.cjs → theme-button--FuBkuVr.cjs} +1 -1
- package/dist/{theme-button-CJmhxfMe.cjs.map → theme-button--FuBkuVr.cjs.map} +1 -1
- package/dist/{theme-button-DGWAXhzd.js → theme-button-D-FXb3oO.js} +2 -2
- package/dist/{theme-button-DGWAXhzd.js.map → theme-button-D-FXb3oO.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +3 -3
- package/dist/{theme.service-hc4N-1Oz.js → theme.service-BfTK1Wtl.js} +1 -1
- package/dist/{theme.service-hc4N-1Oz.js.map → theme.service-BfTK1Wtl.js.map} +1 -1
- package/dist/{theme.service-p61RsJBF.cjs → theme.service-Dg7LO0Qz.cjs} +1 -1
- package/dist/{theme.service-p61RsJBF.cjs.map → theme.service-Dg7LO0Qz.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +2 -2
- package/dist/{typography-DwV0sqht.js → typography-BEGLfHwz.js} +2 -2
- package/dist/{typography-DwV0sqht.js.map → typography-BEGLfHwz.js.map} +1 -1
- package/dist/{typography-Bdt8RlX2.cjs → typography-CxA3sx9B.cjs} +1 -1
- package/dist/{typography-Bdt8RlX2.cjs.map → typography-CxA3sx9B.cjs.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-n4jN60B_.js → window-B_n4P9az.js} +3 -3
- package/dist/{window-n4jN60B_.js.map → window-B_n4P9az.js.map} +1 -1
- package/dist/{window-D2WfvNng.cjs → window-Vl1u1-EG.cjs} +1 -1
- package/dist/{window-D2WfvNng.cjs.map → window-Vl1u1-EG.cjs.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -1
- package/skills/schmancy/INDEX.md +1 -1
- package/skills/schmancy/SKILL.md +6 -7
- package/skills/schmancy/boat.md +21 -15
- package/skills/schmancy/fab.md +75 -0
- package/skills/schmancy/theme.md +1 -1
- package/src/CLAUDE.md +22 -16
- package/src/boat/boat.test.ts +130 -0
- package/src/boat/boat.ts +144 -121
- package/src/button/icon-button.ts +18 -30
- package/src/chips/assist-chip.ts +2 -263
- package/src/chips/chips.ts +2 -259
- package/src/chips/filter-chip.ts +2 -255
- package/src/chips/index.ts +2 -5
- package/src/chips/input-chip.ts +2 -413
- package/src/chips/suggestion-chip.ts +2 -266
- package/src/directives/fill.ts +28 -5
- package/src/fab/fab.test.ts +101 -0
- package/src/fab/fab.ts +226 -0
- package/src/fab/index.ts +1 -0
- package/src/form/fields/chips/assist-chip.ts +263 -0
- package/src/form/fields/chips/chips.ts +234 -0
- package/src/form/fields/chips/filter-chip.ts +255 -0
- package/src/form/fields/chips/index.ts +5 -0
- package/src/form/fields/chips/input-chip.ts +413 -0
- package/src/form/fields/chips/suggestion-chip.ts +266 -0
- package/src/form/fields/date-range/date-range.test.ts +44 -0
- package/src/form/fields/date-range/date-range.ts +103 -97
- package/src/form/fields/index.ts +1 -0
- package/src/index.ts +2 -1
- package/src/overlay/overlay.animations.ts +2 -3
- package/src/overlay/overlay.component.ts +8 -4
- package/src/overlay/overlay.types.ts +14 -2
- package/src/theme/theme.component.ts +1 -0
- package/src/theme/theme.style.css +3 -0
- package/types/src/boat/boat.d.ts +27 -9
- package/types/src/boat/boat.test.d.ts +2 -0
- package/types/src/button/icon-button.d.ts +3 -2
- package/types/src/chips/assist-chip.d.ts +1 -47
- package/types/src/chips/chips.d.ts +1 -43
- package/types/src/chips/filter-chip.d.ts +1 -67
- package/types/src/chips/index.d.ts +1 -5
- package/types/src/chips/input-chip.d.ts +1 -82
- package/types/src/chips/suggestion-chip.d.ts +1 -52
- package/types/src/fab/fab.d.ts +80 -0
- package/types/src/fab/fab.test.d.ts +2 -0
- package/types/src/fab/index.d.ts +1 -0
- package/types/src/form/fields/chips/assist-chip.d.ts +47 -0
- package/types/src/form/fields/chips/chips.d.ts +35 -0
- package/types/src/form/fields/chips/filter-chip.d.ts +67 -0
- package/types/src/form/fields/chips/index.d.ts +5 -0
- package/types/src/form/fields/chips/input-chip.d.ts +82 -0
- package/types/src/form/fields/chips/suggestion-chip.d.ts +52 -0
- package/types/src/form/fields/date-range/date-range.d.ts +5 -10
- package/types/src/form/fields/index.d.ts +1 -0
- package/types/src/index.d.ts +2 -1
- package/types/src/overlay/overlay.component.d.ts +1 -0
- package/types/src/overlay/overlay.types.d.ts +12 -2
- package/types/src/theme/theme.component.d.ts +1 -0
- package/dist/SchmancyElement-CA0Wqt8m.js +0 -284
- package/dist/SchmancyElement-CA0Wqt8m.js.map +0 -1
- package/dist/SchmancyElement-CYIif26I.cjs +0 -2
- package/dist/SchmancyElement-CYIif26I.cjs.map +0 -1
- package/dist/boat-Vqjgo10B.cjs +0 -33
- package/dist/boat-Vqjgo10B.cjs.map +0 -1
- package/dist/boat-lr7MPZ7H.js.map +0 -1
- package/dist/chips-CXZ4dJCK.cjs.map +0 -1
- package/dist/chips-Dg6Lk6BT.js.map +0 -1
- package/dist/date-range-BU6WX7d5.js.map +0 -1
- package/dist/date-range-C-_be3_E.cjs.map +0 -1
- package/dist/directives-fLwDj6b0.cjs.map +0 -1
- package/dist/directives-zi1Mm2er.js.map +0 -1
- package/dist/input-chip-57tgNXKT.cjs.map +0 -1
- package/dist/input-chip-C6Lq1927.js.map +0 -1
- package/dist/overlay-BpNhd74N.js.map +0 -1
- package/dist/overlay-UQR2Dy3u.cjs.map +0 -1
- package/dist/theme-iKUaS9JB.cjs +0 -181
package/src/boat/boat.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SchmancyElement } from '@mixins/index'
|
|
2
|
-
import {
|
|
2
|
+
import { html, type PropertyValues } from 'lit'
|
|
3
3
|
import { customElement, property, queryAssignedElements, state } from 'lit/decorators.js'
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js'
|
|
5
5
|
import { createRef, ref } from 'lit/directives/ref.js'
|
|
6
6
|
import { styleMap } from 'lit/directives/style-map.js'
|
|
7
|
-
import { filter, finalize, fromEvent,
|
|
7
|
+
import { exhaustMap, filter, finalize, fromEvent, merge, type Subscription, takeUntil, tap } from 'rxjs'
|
|
8
8
|
import { reducedMotion$ } from '../directives/reduced-motion'
|
|
9
9
|
import { show } from '../overlay/overlay.service'
|
|
10
10
|
import { theme } from '../theme/theme.service.js'
|
|
@@ -20,38 +20,50 @@ interface Position {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* overlay service.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
23
|
+
* Corner-anchored launcher that delegates its expanded panel to the `show()`
|
|
24
|
+
* overlay service.
|
|
25
|
+
*
|
|
26
|
+
* Three slots, three non-overlapping intents — no element-type sniffing,
|
|
27
|
+
* ever:
|
|
28
|
+
*
|
|
29
|
+
* - `trigger` — pure consumer content. A native click anywhere on it
|
|
30
|
+
* opens the panel; interactive children (buttons, FABs, inputs) work
|
|
31
|
+
* with zero special-casing because the boat never calls
|
|
32
|
+
* `preventDefault` / `stopPropagation` / `setPointerCapture` here.
|
|
33
|
+
* - `drag-handle` — opt-in. Pointer-drag is wired ONLY to this slot's
|
|
34
|
+
* boat-owned wrapper. Slot it to make the boat draggable; omit it and
|
|
35
|
+
* the boat is static at its corner. (A no-move tap on the handle also
|
|
36
|
+
* opens, so the grip doubles as a launcher.)
|
|
37
|
+
* - _(default)_ — the panel body; parked hidden while collapsed,
|
|
38
|
+
* relocated into the `show()` overlay on open.
|
|
39
|
+
*
|
|
40
|
+
* The boat owns drag, corner-snapping, position persistence and the glass
|
|
41
|
+
* surface — never the collapsed shape.
|
|
28
42
|
*/
|
|
29
43
|
@customElement('schmancy-boat')
|
|
30
44
|
export default class SchmancyBoat extends SchmancyElement {
|
|
31
|
-
|
|
32
|
-
:host {
|
|
33
|
-
display: contents;
|
|
34
|
-
}
|
|
35
|
-
:host([hidden]) {
|
|
36
|
-
display: none !important;
|
|
37
|
-
}
|
|
38
|
-
`]
|
|
45
|
+
|
|
39
46
|
|
|
40
47
|
/** Identity for localStorage drag-position persistence. */
|
|
41
48
|
@property({ type: String }) id: string = 'default'
|
|
42
|
-
/** Corner the
|
|
49
|
+
/** Corner the launcher is anchored to. */
|
|
43
50
|
@property({ type: String }) corner: Corner = 'bottom-right'
|
|
44
51
|
/** Open state. Bind `?open=${…}` to drive the overlay; reflected to the attribute. */
|
|
45
52
|
@property({ type: Boolean, reflect: true }) open: boolean = false
|
|
46
53
|
|
|
47
54
|
@state() private isDragging = false
|
|
48
55
|
@state() private currentCorner: Corner = 'bottom-right'
|
|
56
|
+
@state() private hasHandle = false
|
|
49
57
|
|
|
58
|
+
/** Default-slot nodes — the overlay body. */
|
|
50
59
|
@queryAssignedElements() private slotted!: Element[]
|
|
60
|
+
/** Slotted drag-handle nodes — presence toggles draggability. */
|
|
61
|
+
@queryAssignedElements({ slot: 'drag-handle' }) private handleNodes!: Element[]
|
|
51
62
|
|
|
52
63
|
private position: Position = { x: 16, y: 16 }
|
|
53
64
|
private containerRef = createRef<HTMLElement>()
|
|
54
|
-
private
|
|
65
|
+
private triggerRef = createRef<HTMLElement>()
|
|
66
|
+
private handleRef = createRef<HTMLElement>()
|
|
55
67
|
private currentAnimation?: Animation
|
|
56
68
|
|
|
57
69
|
#ready = false
|
|
@@ -171,84 +183,6 @@ export default class SchmancyBoat extends SchmancyElement {
|
|
|
171
183
|
this.savePosition()
|
|
172
184
|
}
|
|
173
185
|
|
|
174
|
-
// ============================================
|
|
175
|
-
// DRAG PIPELINE
|
|
176
|
-
// ============================================
|
|
177
|
-
|
|
178
|
-
private setupDrag() {
|
|
179
|
-
const header = this.headerRef.value
|
|
180
|
-
const container = this.containerRef.value
|
|
181
|
-
if (!header || !container) return
|
|
182
|
-
|
|
183
|
-
let didDrag = false
|
|
184
|
-
|
|
185
|
-
fromEvent<PointerEvent>(header, 'pointerdown')
|
|
186
|
-
.pipe(
|
|
187
|
-
filter(e => e.button === 0),
|
|
188
|
-
tap(e => {
|
|
189
|
-
e.preventDefault()
|
|
190
|
-
e.stopPropagation()
|
|
191
|
-
header.setPointerCapture(e.pointerId)
|
|
192
|
-
}),
|
|
193
|
-
map(e => {
|
|
194
|
-
const rect = container.getBoundingClientRect()
|
|
195
|
-
didDrag = false
|
|
196
|
-
return {
|
|
197
|
-
pointerId: e.pointerId,
|
|
198
|
-
startX: e.clientX,
|
|
199
|
-
startY: e.clientY,
|
|
200
|
-
offsetX: e.clientX - rect.left,
|
|
201
|
-
offsetY: e.clientY - rect.top,
|
|
202
|
-
rect,
|
|
203
|
-
}
|
|
204
|
-
}),
|
|
205
|
-
switchMap(({ pointerId, startX, startY, offsetX, offsetY, rect }) => {
|
|
206
|
-
const sameId = (e: PointerEvent) => e.pointerId === pointerId
|
|
207
|
-
const move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(filter(sameId))
|
|
208
|
-
const end$ = merge(
|
|
209
|
-
fromEvent<PointerEvent>(window, 'pointerup'),
|
|
210
|
-
fromEvent<PointerEvent>(window, 'pointercancel'),
|
|
211
|
-
).pipe(filter(sameId))
|
|
212
|
-
|
|
213
|
-
return move$.pipe(
|
|
214
|
-
tap(({ clientX, clientY }) => {
|
|
215
|
-
const dx = clientX - startX
|
|
216
|
-
const dy = clientY - startY
|
|
217
|
-
if (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {
|
|
218
|
-
didDrag = true
|
|
219
|
-
this.isDragging = true
|
|
220
|
-
}
|
|
221
|
-
if (!didDrag) return
|
|
222
|
-
|
|
223
|
-
const vw = window.innerWidth
|
|
224
|
-
const vh = window.innerHeight
|
|
225
|
-
const left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))
|
|
226
|
-
const top = Math.max(0, Math.min(clientY - offsetY, vh - rect.height))
|
|
227
|
-
this.position = {
|
|
228
|
-
x: this.currentCorner.includes('right') ? vw - left - rect.width : left,
|
|
229
|
-
y: this.currentCorner.includes('bottom') ? vh - top - rect.height : top,
|
|
230
|
-
}
|
|
231
|
-
this.applyContainerPosition()
|
|
232
|
-
}),
|
|
233
|
-
takeUntil(end$),
|
|
234
|
-
finalize(() => {
|
|
235
|
-
if (didDrag) {
|
|
236
|
-
this.reorientToNearestCorner()
|
|
237
|
-
this.isDragging = false
|
|
238
|
-
didDrag = false
|
|
239
|
-
} else {
|
|
240
|
-
this.isDragging = false
|
|
241
|
-
didDrag = false
|
|
242
|
-
this.toggle()
|
|
243
|
-
}
|
|
244
|
-
}),
|
|
245
|
-
)
|
|
246
|
-
}),
|
|
247
|
-
takeUntil(this.disconnecting),
|
|
248
|
-
)
|
|
249
|
-
.subscribe()
|
|
250
|
-
}
|
|
251
|
-
|
|
252
186
|
// ============================================
|
|
253
187
|
// OVERLAY DELEGATION
|
|
254
188
|
// ============================================
|
|
@@ -290,22 +224,102 @@ export default class SchmancyBoat extends SchmancyElement {
|
|
|
290
224
|
connectedCallback() {
|
|
291
225
|
super.connectedCallback()
|
|
292
226
|
|
|
293
|
-
|
|
227
|
+
// One concern: keep the container in place when the environment
|
|
228
|
+
// shifts. Viewport resize re-validates bounds; a theme bottom-offset
|
|
229
|
+
// change (e.g. a snackbar pushing the safe area) re-applies position.
|
|
230
|
+
merge(
|
|
231
|
+
fromEvent(window, 'resize').pipe(tap(() => this.validateBounds())),
|
|
232
|
+
theme.bottomOffset$.pipe(tap(() => this.applyContainerPosition())),
|
|
233
|
+
)
|
|
294
234
|
.pipe(takeUntil(this.disconnecting))
|
|
295
|
-
.subscribe(
|
|
296
|
-
|
|
297
|
-
theme.bottomOffset$.pipe(
|
|
298
|
-
tap(() => this.applyContainerPosition()),
|
|
299
|
-
takeUntil(this.disconnecting),
|
|
300
|
-
).subscribe()
|
|
235
|
+
.subscribe()
|
|
301
236
|
}
|
|
302
237
|
|
|
303
238
|
firstUpdated() {
|
|
304
239
|
this.currentCorner = this.corner
|
|
240
|
+
this.hasHandle = this.handleNodes.length > 0
|
|
305
241
|
this.loadPosition()
|
|
306
|
-
|
|
242
|
+
const container = this.containerRef.value
|
|
243
|
+
const trigger = this.triggerRef.value
|
|
244
|
+
const handle = this.handleRef.value
|
|
245
|
+
if (!container || !trigger || !handle) return
|
|
307
246
|
this.applyContainerPosition()
|
|
308
|
-
|
|
247
|
+
|
|
248
|
+
// Three intents, three sources, one pipeline, one subscribe.
|
|
249
|
+
//
|
|
250
|
+
// open$ — a plain click/Enter/Space on the trigger region. No
|
|
251
|
+
// preventDefault/stopPropagation: a slotted button's own
|
|
252
|
+
// click still fires; it merely also bubbles to "open".
|
|
253
|
+
// drag$ — pointerdown on the boat-owned drag-handle wrapper. A
|
|
254
|
+
// dedicated region, so every pointerdown there is a drag
|
|
255
|
+
// intent — no element-type sniffing. A session ends on
|
|
256
|
+
// pointerup/cancel; settle = move past threshold ? snap to
|
|
257
|
+
// the nearest corner : treat as a tap and open.
|
|
258
|
+
merge(
|
|
259
|
+
fromEvent<MouseEvent>(trigger, 'click').pipe(tap(() => this.toggle())),
|
|
260
|
+
fromEvent<KeyboardEvent>(trigger, 'keydown').pipe(
|
|
261
|
+
filter(e => e.key === 'Enter' || e.key === ' '),
|
|
262
|
+
tap(e => {
|
|
263
|
+
e.preventDefault()
|
|
264
|
+
this.toggle()
|
|
265
|
+
}),
|
|
266
|
+
),
|
|
267
|
+
fromEvent<PointerEvent>(handle, 'pointerdown').pipe(
|
|
268
|
+
filter(e => e.button === 0),
|
|
269
|
+
tap(e => {
|
|
270
|
+
e.preventDefault()
|
|
271
|
+
// Capture can throw InvalidStateError if the pointer is
|
|
272
|
+
// already released (fast tap) — drag still works without it.
|
|
273
|
+
try {
|
|
274
|
+
handle.setPointerCapture(e.pointerId)
|
|
275
|
+
} catch {
|
|
276
|
+
// no active pointer to capture; ignore
|
|
277
|
+
}
|
|
278
|
+
}),
|
|
279
|
+
exhaustMap(down => {
|
|
280
|
+
const rect = container.getBoundingClientRect()
|
|
281
|
+
const offsetX = down.clientX - rect.left
|
|
282
|
+
const offsetY = down.clientY - rect.top
|
|
283
|
+
let moved = false
|
|
284
|
+
const sameId = (e: PointerEvent) => e.pointerId === down.pointerId
|
|
285
|
+
const end$ = merge(
|
|
286
|
+
fromEvent<PointerEvent>(window, 'pointerup'),
|
|
287
|
+
fromEvent<PointerEvent>(window, 'pointercancel'),
|
|
288
|
+
).pipe(filter(sameId))
|
|
289
|
+
|
|
290
|
+
return fromEvent<PointerEvent>(window, 'pointermove').pipe(
|
|
291
|
+
filter(sameId),
|
|
292
|
+
tap(e => {
|
|
293
|
+
const dx = e.clientX - down.clientX
|
|
294
|
+
const dy = e.clientY - down.clientY
|
|
295
|
+
if (!moved && Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD) {
|
|
296
|
+
moved = true
|
|
297
|
+
this.isDragging = true
|
|
298
|
+
}
|
|
299
|
+
if (!moved) return
|
|
300
|
+
const vw = window.innerWidth
|
|
301
|
+
const vh = window.innerHeight
|
|
302
|
+
const left = Math.max(0, Math.min(e.clientX - offsetX, vw - rect.width))
|
|
303
|
+
const top = Math.max(0, Math.min(e.clientY - offsetY, vh - rect.height))
|
|
304
|
+
this.position = {
|
|
305
|
+
x: this.currentCorner.includes('right') ? vw - left - rect.width : left,
|
|
306
|
+
y: this.currentCorner.includes('bottom') ? vh - top - rect.height : top,
|
|
307
|
+
}
|
|
308
|
+
this.applyContainerPosition()
|
|
309
|
+
}),
|
|
310
|
+
takeUntil(end$),
|
|
311
|
+
finalize(() => {
|
|
312
|
+
if (moved) this.reorientToNearestCorner()
|
|
313
|
+
else this.toggle()
|
|
314
|
+
this.isDragging = false
|
|
315
|
+
}),
|
|
316
|
+
)
|
|
317
|
+
}),
|
|
318
|
+
),
|
|
319
|
+
)
|
|
320
|
+
.pipe(takeUntil(this.disconnecting))
|
|
321
|
+
.subscribe()
|
|
322
|
+
|
|
309
323
|
this.#ready = true
|
|
310
324
|
if (this.open) this.openOverlay()
|
|
311
325
|
}
|
|
@@ -335,11 +349,13 @@ export default class SchmancyBoat extends SchmancyElement {
|
|
|
335
349
|
// RENDER
|
|
336
350
|
// ============================================
|
|
337
351
|
|
|
352
|
+
private onHandleSlotChange = () => {
|
|
353
|
+
this.hasHandle = this.handleNodes.length > 0
|
|
354
|
+
}
|
|
355
|
+
|
|
338
356
|
protected render(): unknown {
|
|
339
357
|
const containerClasses = classMap({
|
|
340
358
|
'inline-flex': true,
|
|
341
|
-
'rounded-full': true,
|
|
342
|
-
'overflow-hidden': true,
|
|
343
359
|
'transition-opacity': true,
|
|
344
360
|
'duration-200': true,
|
|
345
361
|
'opacity-85': this.isDragging,
|
|
@@ -351,40 +367,47 @@ export default class SchmancyBoat extends SchmancyElement {
|
|
|
351
367
|
'pointer-events': 'auto',
|
|
352
368
|
})
|
|
353
369
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
370
|
+
// Boat-owned drag region — wraps ONLY the drag-handle slot, so every
|
|
371
|
+
// pointerdown inside it is unambiguously a drag intent. Hidden (and
|
|
372
|
+
// out of layout) when the consumer slots no handle: the boat is then
|
|
373
|
+
// simply not draggable.
|
|
374
|
+
const handleClasses = classMap({
|
|
359
375
|
flex: true,
|
|
360
376
|
'items-center': true,
|
|
361
|
-
'justify-center': true,
|
|
362
|
-
'gap-3': true,
|
|
363
|
-
'select-none': true,
|
|
364
377
|
'touch-none': true,
|
|
378
|
+
'select-none': true,
|
|
379
|
+
hidden: !this.hasHandle,
|
|
365
380
|
'cursor-grabbing': this.isDragging,
|
|
366
|
-
'cursor-
|
|
381
|
+
'cursor-grab': !this.isDragging,
|
|
367
382
|
})
|
|
368
383
|
|
|
369
384
|
return html`
|
|
370
385
|
<schmancy-surface
|
|
371
386
|
${ref(this.containerRef)}
|
|
372
387
|
type="glass"
|
|
388
|
+
rounded="all"
|
|
373
389
|
.elevation=${3}
|
|
374
|
-
class
|
|
390
|
+
class="${containerClasses} overflow-hidden rounded-2xl"
|
|
375
391
|
style=${containerStyles}
|
|
376
392
|
aria-expanded=${this.open}
|
|
377
393
|
>
|
|
378
394
|
<div
|
|
379
|
-
${ref(this.
|
|
380
|
-
class=${
|
|
395
|
+
${ref(this.handleRef)}
|
|
396
|
+
class=${handleClasses}
|
|
397
|
+
aria-label="Drag to move"
|
|
398
|
+
>
|
|
399
|
+
<slot name="drag-handle" @slotchange=${this.onHandleSlotChange}></slot>
|
|
400
|
+
</div>
|
|
401
|
+
|
|
402
|
+
<div
|
|
403
|
+
${ref(this.triggerRef)}
|
|
404
|
+
class="flex items-center cursor-pointer"
|
|
381
405
|
role="button"
|
|
382
406
|
tabindex="0"
|
|
383
407
|
aria-label="Open panel"
|
|
384
|
-
title="
|
|
408
|
+
title="Click to open"
|
|
385
409
|
>
|
|
386
|
-
<slot name="
|
|
387
|
-
<slot name="summary"></slot>
|
|
410
|
+
<slot name="trigger"></slot>
|
|
388
411
|
</div>
|
|
389
412
|
|
|
390
413
|
<!-- Default-slot content parks here (hidden) while collapsed;
|
|
@@ -116,44 +116,32 @@ export class SchmnacyIconButton extends SchmancyElement {
|
|
|
116
116
|
@property({ type: String })
|
|
117
117
|
public icon?: string
|
|
118
118
|
|
|
119
|
-
// Reactively captured icon name from slot content (translation-proof)
|
|
119
|
+
// Reactively captured icon name from slot content (translation-proof).
|
|
120
|
+
// Mirrors <schmancy-icon>: a MutationObserver on the light DOM keeps this
|
|
121
|
+
// in sync no matter how the consumer passes the name — a plain text node,
|
|
122
|
+
// a dynamic ${...} binding (Lit mutates the text node's data in place, so
|
|
123
|
+
// no slotchange ever fires), or a nested <schmancy-icon> element.
|
|
124
|
+
// `textContent` flattens through all three.
|
|
120
125
|
@state()
|
|
121
126
|
private _capturedIcon?: string
|
|
122
127
|
|
|
128
|
+
private _observer?: MutationObserver
|
|
129
|
+
|
|
123
130
|
connectedCallback(): void {
|
|
124
131
|
super.connectedCallback()
|
|
125
|
-
|
|
126
|
-
this.
|
|
132
|
+
this._captureIcon()
|
|
133
|
+
this._observer = new MutationObserver(() => this._captureIcon())
|
|
134
|
+
this._observer.observe(this, { childList: true, characterData: true, subtree: true })
|
|
127
135
|
}
|
|
128
136
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
for (const node of this.childNodes) {
|
|
133
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
134
|
-
const text = node.textContent?.trim()
|
|
135
|
-
if (text) {
|
|
136
|
-
this._capturedIcon = text
|
|
137
|
-
return
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
137
|
+
disconnectedCallback(): void {
|
|
138
|
+
super.disconnectedCallback()
|
|
139
|
+
this._observer?.disconnect()
|
|
141
140
|
}
|
|
142
141
|
|
|
143
|
-
|
|
144
|
-
private _handleSlotChange(e: Event): void {
|
|
142
|
+
private _captureIcon(): void {
|
|
145
143
|
if (this.icon || this.text) return
|
|
146
|
-
|
|
147
|
-
const nodes = slot.assignedNodes({ flatten: true })
|
|
148
|
-
for (const node of nodes) {
|
|
149
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
150
|
-
const text = node.textContent?.trim()
|
|
151
|
-
if (text) {
|
|
152
|
-
this._capturedIcon = text
|
|
153
|
-
return
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
144
|
+
this._capturedIcon = this.textContent?.trim() || undefined
|
|
157
145
|
}
|
|
158
146
|
|
|
159
147
|
// Manage aria-label manually so that we can always use our internal property.
|
|
@@ -254,7 +242,7 @@ export class SchmnacyIconButton extends SchmancyElement {
|
|
|
254
242
|
${this.text
|
|
255
243
|
? html`<slot></slot>`
|
|
256
244
|
: html`
|
|
257
|
-
<slot style="display:none"
|
|
245
|
+
<slot style="display:none"></slot>
|
|
258
246
|
<schmancy-icon class=${iconSizeClass}>${this.icon || this._capturedIcon}</schmancy-icon>
|
|
259
247
|
`
|
|
260
248
|
}
|
|
@@ -277,7 +265,7 @@ export class SchmnacyIconButton extends SchmancyElement {
|
|
|
277
265
|
${this.text
|
|
278
266
|
? html`<slot></slot>`
|
|
279
267
|
: html`
|
|
280
|
-
<slot style="display:none"
|
|
268
|
+
<slot style="display:none"></slot>
|
|
281
269
|
<schmancy-icon class=${iconSizeClass}>${this.icon || this._capturedIcon}</schmancy-icon>
|
|
282
270
|
`
|
|
283
271
|
}
|
package/src/chips/assist-chip.ts
CHANGED
|
@@ -1,263 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { customElement, property, state } from 'lit/decorators.js'
|
|
4
|
-
import { classMap } from 'lit/directives/class-map.js'
|
|
5
|
-
import { BehaviorSubject, combineLatest } from 'rxjs'
|
|
6
|
-
import { takeUntil } from 'rxjs/operators'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Assist chip component - prompts user actions like opening calendar events or sharing content
|
|
10
|
-
* Pure Schmancy implementation with Tailwind CSS and RxJS state management
|
|
11
|
-
*/
|
|
12
|
-
@customElement('schmancy-assist-chip')
|
|
13
|
-
export class SchmancyAssistChip extends SchmancyElement {
|
|
14
|
-
static styles = [css`
|
|
15
|
-
:host {
|
|
16
|
-
display: inline-block;
|
|
17
|
-
outline: none;
|
|
18
|
-
width: fit-content;
|
|
19
|
-
min-width: fit-content;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host([disabled]) {
|
|
23
|
-
pointer-events: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.ripple {
|
|
27
|
-
position: absolute;
|
|
28
|
-
border-radius: 50%;
|
|
29
|
-
transform: scale(0);
|
|
30
|
-
animation: ripple 600ms linear;
|
|
31
|
-
background-color: rgba(0, 0, 0, 0.08);
|
|
32
|
-
pointer-events: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@keyframes ripple {
|
|
36
|
-
to {
|
|
37
|
-
transform: scale(4);
|
|
38
|
-
opacity: 0;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* State layer for M3 hover/focus/pressed states */
|
|
43
|
-
.state-layer {
|
|
44
|
-
position: absolute;
|
|
45
|
-
inset: 0;
|
|
46
|
-
border-radius: inherit;
|
|
47
|
-
pointer-events: none;
|
|
48
|
-
background-color: currentColor;
|
|
49
|
-
opacity: 0;
|
|
50
|
-
transition: opacity 200ms ease;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host(:not([disabled])) button:hover .state-layer {
|
|
54
|
-
opacity: 0.08;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host(:not([disabled])) button:focus-visible .state-layer {
|
|
58
|
-
opacity: 0.1;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
:host(:not([disabled])) button:active .state-layer {
|
|
62
|
-
opacity: 0.1;
|
|
63
|
-
}
|
|
64
|
-
`];
|
|
65
|
-
/** Value identifier for the chip */
|
|
66
|
-
@property({ reflect: true }) value = ''
|
|
67
|
-
|
|
68
|
-
/** Optional icon name (Material Symbols) */
|
|
69
|
-
@property({ reflect: true }) icon = ''
|
|
70
|
-
|
|
71
|
-
/** Optional href for navigation */
|
|
72
|
-
@property({ reflect: true }) href = ''
|
|
73
|
-
|
|
74
|
-
/** Target for navigation (e.g., '_blank') */
|
|
75
|
-
@property({ reflect: true }) target = ''
|
|
76
|
-
|
|
77
|
-
/** Disable the chip */
|
|
78
|
-
@property({ type: Boolean, reflect: true }) disabled = false
|
|
79
|
-
|
|
80
|
-
/** Elevated style variant - true by default per M3 spec for assist chips */
|
|
81
|
-
@property({ type: Boolean, reflect: true }) elevated = true
|
|
82
|
-
|
|
83
|
-
// RxJS state streams
|
|
84
|
-
private hover$ = new BehaviorSubject<boolean>(false)
|
|
85
|
-
private pressed$ = new BehaviorSubject<boolean>(false)
|
|
86
|
-
private focused$ = new BehaviorSubject<boolean>(false)
|
|
87
|
-
|
|
88
|
-
// UI state - only ripples needed for rendering
|
|
89
|
-
@state() private ripples: Array<{ x: number; y: number; id: number }> = []
|
|
90
|
-
|
|
91
|
-
protected static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }
|
|
92
|
-
|
|
93
|
-
private nextRippleId = 0
|
|
94
|
-
|
|
95
|
-
connectedCallback() {
|
|
96
|
-
super.connectedCallback()
|
|
97
|
-
|
|
98
|
-
// Stream management for future extensions
|
|
99
|
-
// Currently, states are handled directly in event handlers
|
|
100
|
-
// This pipeline can be extended for more complex state interactions
|
|
101
|
-
combineLatest([
|
|
102
|
-
this.hover$,
|
|
103
|
-
this.pressed$,
|
|
104
|
-
this.focused$
|
|
105
|
-
]).pipe(
|
|
106
|
-
// States are managed through event handlers directly
|
|
107
|
-
// This pipeline is kept for potential future state combinations
|
|
108
|
-
takeUntil(this.disconnecting)
|
|
109
|
-
).subscribe()
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
private handleClick = (e: MouseEvent) => {
|
|
113
|
-
if (this.disabled) return
|
|
114
|
-
|
|
115
|
-
// Add ripple effect
|
|
116
|
-
const button = this.shadowRoot?.querySelector('button')
|
|
117
|
-
if (button) {
|
|
118
|
-
const rect = button.getBoundingClientRect()
|
|
119
|
-
const x = e.clientX - rect.left
|
|
120
|
-
const y = e.clientY - rect.top
|
|
121
|
-
const id = this.nextRippleId++
|
|
122
|
-
|
|
123
|
-
this.ripples = [...this.ripples, { x, y, id }]
|
|
124
|
-
|
|
125
|
-
// Remove ripple after animation
|
|
126
|
-
setTimeout(() => {
|
|
127
|
-
this.ripples = this.ripples.filter(r => r.id !== id)
|
|
128
|
-
}, 600)
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Navigate if href is provided
|
|
132
|
-
if (this.href) {
|
|
133
|
-
if (this.target === '_blank') {
|
|
134
|
-
window.open(this.href, '_blank')
|
|
135
|
-
} else {
|
|
136
|
-
window.location.href = this.href
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// Dispatch action event
|
|
141
|
-
this.dispatchEvent(new CustomEvent('action', {
|
|
142
|
-
detail: { value: this.value },
|
|
143
|
-
bubbles: true,
|
|
144
|
-
composed: true
|
|
145
|
-
}))
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
private handleKeyDown = (e: KeyboardEvent) => {
|
|
149
|
-
if (this.disabled) return
|
|
150
|
-
|
|
151
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
152
|
-
e.preventDefault()
|
|
153
|
-
this.pressed$.next(true)
|
|
154
|
-
|
|
155
|
-
// Simulate click
|
|
156
|
-
const clickEvent = new MouseEvent('click', {
|
|
157
|
-
bubbles: true,
|
|
158
|
-
cancelable: true,
|
|
159
|
-
clientX: 0,
|
|
160
|
-
clientY: 0
|
|
161
|
-
})
|
|
162
|
-
this.handleClick(clickEvent)
|
|
163
|
-
|
|
164
|
-
setTimeout(() => this.pressed$.next(false), 100)
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
private handleFocus = () => {
|
|
169
|
-
this.focused$.next(true)
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
private handleBlur = () => {
|
|
173
|
-
this.focused$.next(false)
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
render() {
|
|
177
|
-
const hasIcon = !!this.icon;
|
|
178
|
-
|
|
179
|
-
const classes = {
|
|
180
|
-
'relative': true,
|
|
181
|
-
'inline-flex': true,
|
|
182
|
-
'items-center': true,
|
|
183
|
-
'gap-2': true,
|
|
184
|
-
'h-8': true, // M3: 32px height
|
|
185
|
-
'min-h-[32px]': true,
|
|
186
|
-
'rounded-full': true,
|
|
187
|
-
'cursor-pointer': !this.disabled,
|
|
188
|
-
'transition-all': true,
|
|
189
|
-
'duration-200': true,
|
|
190
|
-
'select-none': true,
|
|
191
|
-
'overflow-hidden': true,
|
|
192
|
-
|
|
193
|
-
// M3 Padding: 8px with icon, 16px without (leading), 16px trailing
|
|
194
|
-
'pl-2': hasIcon, // 8px with icon
|
|
195
|
-
'pl-4': !hasIcon, // 16px without icon
|
|
196
|
-
'pr-4': true, // 16px trailing
|
|
197
|
-
|
|
198
|
-
// M3 Colors - assist chips are elevated by default
|
|
199
|
-
'bg-surface-containerLow': true,
|
|
200
|
-
'text-surface-onVariant': true,
|
|
201
|
-
|
|
202
|
-
// M3: Assist chips elevated by default (shadow-1)
|
|
203
|
-
'shadow-sm': this.elevated && !this.disabled, // shadow-1 for elevation
|
|
204
|
-
'hover:shadow-md': this.elevated && !this.disabled, // elevated on hover
|
|
205
|
-
|
|
206
|
-
// Focus state
|
|
207
|
-
'focus-visible:outline': !this.disabled,
|
|
208
|
-
'focus-visible:outline-2': !this.disabled,
|
|
209
|
-
'focus-visible:outline-primary': !this.disabled,
|
|
210
|
-
'focus-visible:outline-offset-2': !this.disabled,
|
|
211
|
-
|
|
212
|
-
// Disabled
|
|
213
|
-
'opacity-38': this.disabled, // M3 disabled opacity
|
|
214
|
-
'cursor-not-allowed': this.disabled
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
return html`
|
|
218
|
-
<button
|
|
219
|
-
type="button"
|
|
220
|
-
class=${classMap(classes)}
|
|
221
|
-
?disabled=${this.disabled}
|
|
222
|
-
@click=${this.handleClick}
|
|
223
|
-
@keydown=${this.handleKeyDown}
|
|
224
|
-
@mouseenter=${() => this.hover$.next(true)}
|
|
225
|
-
@mouseleave=${() => this.hover$.next(false)}
|
|
226
|
-
@mousedown=${() => this.pressed$.next(true)}
|
|
227
|
-
@mouseup=${() => this.pressed$.next(false)}
|
|
228
|
-
@focus=${this.handleFocus}
|
|
229
|
-
@blur=${this.handleBlur}
|
|
230
|
-
tabindex=${this.disabled ? '-1' : '0'}
|
|
231
|
-
role="button"
|
|
232
|
-
aria-disabled=${this.disabled}
|
|
233
|
-
aria-label=${this.value}
|
|
234
|
-
>
|
|
235
|
-
${this.icon ? html`
|
|
236
|
-
<schmancy-icon class="text-[18px] shrink-0">${this.icon}</schmancy-icon>
|
|
237
|
-
` : ''}
|
|
238
|
-
<span class="text-sm font-medium leading-5">
|
|
239
|
-
<slot></slot>
|
|
240
|
-
</span>
|
|
241
|
-
|
|
242
|
-
<!-- Ripple effects -->
|
|
243
|
-
${this.ripples.map(ripple => html`
|
|
244
|
-
<span
|
|
245
|
-
class="ripple"
|
|
246
|
-
style="left: ${ripple.x}px; top: ${ripple.y}px;"
|
|
247
|
-
></span>
|
|
248
|
-
`)}
|
|
249
|
-
|
|
250
|
-
<!-- State layer for M3 hover/focus/pressed states -->
|
|
251
|
-
<div class="state-layer"></div>
|
|
252
|
-
</button>
|
|
253
|
-
`
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
declare global {
|
|
258
|
-
interface HTMLElementTagNameMap {
|
|
259
|
-
'schmancy-assist-chip': SchmancyAssistChip
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
export type AssistChipActionEvent = { value: string }
|
|
1
|
+
// Moved to src/form/fields/chips/ — this is a backward-compat re-export shim.
|
|
2
|
+
export * from '../form/fields/chips/assist-chip';
|