@mhmo91/schmancy 0.10.1 → 0.10.2
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 +20 -0
- package/dist/active-host-CcIa2tmW.cjs +1 -0
- package/dist/active-host-CcIa2tmW.cjs.map +1 -0
- package/dist/{active-host-D-a1X-nq.js → active-host-CvNYoprt.js} +12 -12
- package/dist/active-host-CvNYoprt.js.map +1 -0
- package/dist/agent/schmancy.agent.js +1546 -1524
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/{area-C_J4qxKO.js → area-DHVANBbr.js} +1 -1
- package/dist/{area-C_J4qxKO.js.map → area-DHVANBbr.js.map} +1 -1
- package/dist/{area-ISC8Mdkh.cjs → area-ZupIezvU.cjs} +1 -1
- package/dist/{area-ISC8Mdkh.cjs.map → area-ZupIezvU.cjs.map} +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{audio-DZN8HsSS.cjs → audio-CluX8Qpq.cjs} +1 -1
- package/dist/{audio-DZN8HsSS.cjs.map → audio-CluX8Qpq.cjs.map} +1 -1
- package/dist/{audio-Tmre4WyL.js → audio-DcXphulJ.js} +1 -1
- package/dist/{audio-Tmre4WyL.js.map → audio-DcXphulJ.js.map} +1 -1
- package/dist/audio.cjs +1 -1
- package/dist/audio.js +2 -2
- package/dist/{autocomplete-BDF85W0J.cjs → autocomplete-Bn525CTp.cjs} +1 -1
- package/dist/{autocomplete-BDF85W0J.cjs.map → autocomplete-Bn525CTp.cjs.map} +1 -1
- package/dist/{autocomplete-CM8VqW9S.js → autocomplete-pHvsyfbH.js} +2 -2
- package/dist/{autocomplete-CM8VqW9S.js.map → autocomplete-pHvsyfbH.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 +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-CpXe-Qto.cjs → boat-IyEtsNI4.cjs} +1 -1
- package/dist/{boat-CpXe-Qto.cjs.map → boat-IyEtsNI4.cjs.map} +1 -1
- package/dist/{boat-DxYNK4xT.js → boat-_Yv3M6YM.js} +2 -2
- package/dist/{boat-DxYNK4xT.js.map → boat-_Yv3M6YM.js.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/{busy-Dma4gtnz.cjs → busy-CjM39APN.cjs} +1 -1
- package/dist/{busy-Dma4gtnz.cjs.map → busy-CjM39APN.cjs.map} +1 -1
- package/dist/{busy-CP-gRfAP.js → busy-Ck2IXJ4r.js} +1 -1
- package/dist/{busy-CP-gRfAP.js.map → busy-Ck2IXJ4r.js.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/{card-ClroODSK.cjs → card-DIxDuuth.cjs} +1 -1
- package/dist/{card-ClroODSK.cjs.map → card-DIxDuuth.cjs.map} +1 -1
- package/dist/{card-Bv--HeGO.js → card-DUWZmMHc.js} +1 -1
- package/dist/{card-Bv--HeGO.js.map → card-DUWZmMHc.js.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/charts.cjs +1 -1
- package/dist/charts.js +1 -1
- package/dist/{checkbox-DvTZXN1Y.cjs → checkbox-CGdFXuWQ.cjs} +1 -1
- package/dist/{checkbox-DvTZXN1Y.cjs.map → checkbox-CGdFXuWQ.cjs.map} +1 -1
- package/dist/{checkbox-1gQOOcja.js → checkbox-DPS1mWG-.js} +1 -1
- package/dist/{checkbox-1gQOOcja.js.map → checkbox-DPS1mWG-.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-wkfKzf_e.js → chips-BnnXQSA-.js} +3 -3
- package/dist/{chips-wkfKzf_e.js.map → chips-BnnXQSA-.js.map} +1 -1
- package/dist/{chips-Bw7FNDpX.cjs → chips-UoFbwmlG.cjs} +1 -1
- package/dist/{chips-Bw7FNDpX.cjs.map → chips-UoFbwmlG.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/{code-highlight-CJzuds4c.cjs → code-highlight-CMilN0B8.cjs} +1 -1
- package/dist/{code-highlight-CJzuds4c.cjs.map → code-highlight-CMilN0B8.cjs.map} +1 -1
- package/dist/{code-highlight-CcdCFMrn.js → code-highlight-kFUJ1Eet.js} +1 -1
- package/dist/{code-highlight-CcdCFMrn.js.map → code-highlight-kFUJ1Eet.js.map} +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/connectivity.cjs +1 -1
- package/dist/connectivity.js +2 -2
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-BsPW60vp.cjs → date-range-BIyrzTRZ.cjs} +1 -1
- package/dist/{date-range-BsPW60vp.cjs.map → date-range-BIyrzTRZ.cjs.map} +1 -1
- package/dist/{date-range-BDHz_Olm.js → date-range-DOstCIg8.js} +2 -2
- package/dist/{date-range-BDHz_Olm.js.map → date-range-DOstCIg8.js.map} +1 -1
- package/dist/{date-range-inline-BsjNNGFR.cjs → date-range-inline-4P7zqeVe.cjs} +1 -1
- package/dist/{date-range-inline-BsjNNGFR.cjs.map → date-range-inline-4P7zqeVe.cjs.map} +1 -1
- package/dist/{date-range-inline-1NmZE_Xr.js → date-range-inline-BVycTWLb.js} +1 -1
- package/dist/{date-range-inline-1NmZE_Xr.js.map → date-range-inline-BVycTWLb.js.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-BtUNqzn8.cjs → details-BJBbZOO6.cjs} +1 -1
- package/dist/{details-BtUNqzn8.cjs.map → details-BJBbZOO6.cjs.map} +1 -1
- package/dist/{details-BEp2s2ca.js → details-DPc5GxPa.js} +1 -1
- package/dist/{details-BEp2s2ca.js.map → details-DPc5GxPa.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +1 -1
- package/dist/{divider-VxpjZ8hk.js → divider-BvJsmSPH.js} +1 -1
- package/dist/{divider-VxpjZ8hk.js.map → divider-BvJsmSPH.js.map} +1 -1
- package/dist/{divider-CpNT11Iy.cjs → divider-DPT3XnG5.cjs} +1 -1
- package/dist/{divider-CpNT11Iy.cjs.map → divider-DPT3XnG5.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 +1 -1
- package/dist/{expand-CRUl3-mN.js → expand-BMzocdtj.js} +2 -2
- package/dist/{expand-CRUl3-mN.js.map → expand-BMzocdtj.js.map} +1 -1
- package/dist/{expand-05azMpho.cjs → expand-CTqBWVXo.cjs} +1 -1
- package/dist/{expand-05azMpho.cjs.map → expand-CTqBWVXo.cjs.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{extra-aNV1fO6W.js → extra-BeHlUhzv.js} +1 -1
- package/dist/{extra-aNV1fO6W.js.map → extra-BeHlUhzv.js.map} +1 -1
- package/dist/{extra-CyERULfm.cjs → extra-h_cuxRII.cjs} +1 -1
- package/dist/{extra-CyERULfm.cjs.map → extra-h_cuxRII.cjs.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{float-N3qhNET_.js → float-CTc1xxqH.js} +1 -1
- package/dist/{float-N3qhNET_.js.map → float-CTc1xxqH.js.map} +1 -1
- package/dist/{float-DRET9mVZ.cjs → float-CwVBs11k.cjs} +1 -1
- package/dist/{float-DRET9mVZ.cjs.map → float-CwVBs11k.cjs.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/{icons-BBJqwT_B.js → icons-BbCVrcas.js} +1 -1
- package/dist/{icons-BBJqwT_B.js.map → icons-BbCVrcas.js.map} +1 -1
- package/dist/{icons-CNixJ6kL.cjs → icons-qEQW4pjM.cjs} +1 -1
- package/dist/{icons-CNixJ6kL.cjs.map → icons-qEQW4pjM.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-DoN_toqE.js → iframe-BJfDIEJf.js} +1 -1
- package/dist/{iframe-DoN_toqE.js.map → iframe-BJfDIEJf.js.map} +1 -1
- package/dist/{iframe-g-4DjAD7.cjs → iframe-D6HTruav.cjs} +1 -1
- package/dist/{iframe-g-4DjAD7.cjs.map → iframe-D6HTruav.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 +35 -35
- package/dist/{input-ClnkMJgh.js → input-LTK3cctF.js} +32 -32
- package/dist/input-LTK3cctF.js.map +1 -0
- package/dist/input-U26axtcs.cjs +51 -0
- package/dist/input-U26axtcs.cjs.map +1 -0
- package/dist/{input-chip-DMXRT7bK.cjs → input-chip-CADXt0X5.cjs} +1 -1
- package/dist/{input-chip-DMXRT7bK.cjs.map → input-chip-CADXt0X5.cjs.map} +1 -1
- package/dist/{input-chip-DwSyFv1x.js → input-chip-Ch-aCs3c.js} +1 -1
- package/dist/{input-chip-DwSyFv1x.js.map → input-chip-Ch-aCs3c.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 +2 -2
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.js +1 -1
- package/dist/{layout-BghHmee6.js → layout-C4xmnU4n.js} +1 -1
- package/dist/{layout-BghHmee6.js.map → layout-C4xmnU4n.js.map} +1 -1
- package/dist/{layout-VmxXuGGp.cjs → layout-Dmh6fxh0.cjs} +1 -1
- package/dist/{layout-VmxXuGGp.cjs.map → layout-Dmh6fxh0.cjs.map} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{lightbox-m5FLmYlv.cjs → lightbox-DbYUSfVl.cjs} +1 -1
- package/dist/{lightbox-m5FLmYlv.cjs.map → lightbox-DbYUSfVl.cjs.map} +1 -1
- package/dist/{lightbox-IleIcq19.js → lightbox-DqG2z3Cn.js} +1 -1
- package/dist/{lightbox-IleIcq19.js.map → lightbox-DqG2z3Cn.js.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-C-b9p1yi.cjs → list-CLX4sSAw.cjs} +1 -1
- package/dist/{list-C-b9p1yi.cjs.map → list-CLX4sSAw.cjs.map} +1 -1
- package/dist/{list-BlXJlm16.js → list-D6-_E5ZD.js} +1 -1
- package/dist/{list-BlXJlm16.js.map → list-D6-_E5ZD.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{mailbox-B0hZLpF1.cjs → mailbox-Ct6iYe-4.cjs} +1 -1
- package/dist/{mailbox-B0hZLpF1.cjs.map → mailbox-Ct6iYe-4.cjs.map} +1 -1
- package/dist/{mailbox-DAmejcKa.js → mailbox-DsPII8HR.js} +3 -3
- package/dist/{mailbox-DAmejcKa.js.map → mailbox-DsPII8HR.js.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-BoIu47qU.js → map-Dhy3ta9v.js} +1 -1
- package/dist/{map-BoIu47qU.js.map → map-Dhy3ta9v.js.map} +1 -1
- package/dist/{map-CZ0816EI.cjs → map-WXeVkx2K.cjs} +1 -1
- package/dist/{map-CZ0816EI.cjs.map → map-WXeVkx2K.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{menu-BV9_8ys8.js → menu-Bhd3EapX.js} +1 -1
- package/dist/{menu-BV9_8ys8.js.map → menu-Bhd3EapX.js.map} +1 -1
- package/dist/{menu-BFHBnp5M.cjs → menu-Cg2aaDjs.cjs} +1 -1
- package/dist/{menu-BFHBnp5M.cjs.map → menu-Cg2aaDjs.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/{mixins-CL1krSOE.js → mixins-CcIWET41.js} +1 -1
- package/dist/{mixins-CL1krSOE.js.map → mixins-CcIWET41.js.map} +1 -1
- package/dist/{mixins-BIXF7xkF.cjs → mixins-De3xfjrm.cjs} +1 -1
- package/dist/{mixins-BIXF7xkF.cjs.map → mixins-De3xfjrm.cjs.map} +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +1 -1
- 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 +1 -1
- package/dist/{notification-Dzm6zWxX.js → notification-CVLqQ8c_.js} +3 -3
- package/dist/{notification-Dzm6zWxX.js.map → notification-CVLqQ8c_.js.map} +1 -1
- package/dist/{notification-CigTy3ia.cjs → notification-D_PQjBSf.cjs} +1 -1
- package/dist/{notification-CigTy3ia.cjs.map → notification-D_PQjBSf.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-BfvzzkzM.cjs → option-DDU_goh1.cjs} +1 -1
- package/dist/{option-BfvzzkzM.cjs.map → option-DDU_goh1.cjs.map} +1 -1
- package/dist/{option-Dyb0Q45u.js → option-rm4HebVs.js} +1 -1
- package/dist/{option-Dyb0Q45u.js.map → option-rm4HebVs.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/overlay.cjs +1 -1
- package/dist/overlay.cjs.map +1 -1
- package/dist/overlay.js +2 -2
- package/dist/overlay.js.map +1 -1
- package/dist/page.cjs +1 -1
- package/dist/page.js +4 -4
- package/dist/{payment-card-form-D9N2Q0wM.js → payment-card-form-C0dHYZIv.js} +1 -1
- package/dist/{payment-card-form-D9N2Q0wM.js.map → payment-card-form-C0dHYZIv.js.map} +1 -1
- package/dist/{payment-card-form-CQ6sLlrh.cjs → payment-card-form-DNvmZxs4.cjs} +1 -1
- package/dist/{payment-card-form-CQ6sLlrh.cjs.map → payment-card-form-DNvmZxs4.cjs.map} +1 -1
- package/dist/payment-card-form.cjs +1 -1
- package/dist/payment-card-form.js +1 -1
- package/dist/{progress-LPwPfzBi.js → progress-BRerM5Bn.js} +1 -1
- package/dist/{progress-LPwPfzBi.js.map → progress-BRerM5Bn.js.map} +1 -1
- package/dist/{progress-Dyri7dc2.cjs → progress-U3LQkpM2.cjs} +1 -1
- package/dist/{progress-Dyri7dc2.cjs.map → progress-U3LQkpM2.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/qr-scanner.cjs +1 -1
- package/dist/qr-scanner.js +1 -1
- package/dist/{radio-group-DqP886F-.js → radio-group-BZ2WoOXJ.js} +1 -1
- package/dist/{radio-group-DqP886F-.js.map → radio-group-BZ2WoOXJ.js.map} +1 -1
- package/dist/{radio-group-DK-T6jGy.cjs → radio-group-D7mm-yvJ.cjs} +1 -1
- package/dist/{radio-group-DK-T6jGy.cjs.map → radio-group-D7mm-yvJ.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 +1 -1
- package/dist/{scroll-yfNU0zNO.cjs → scroll-DJTjNIT_.cjs} +1 -1
- package/dist/{scroll-yfNU0zNO.cjs.map → scroll-DJTjNIT_.cjs.map} +1 -1
- package/dist/{scroll-BD82ANjm.js → scroll-qL-HkMdP.js} +1 -1
- package/dist/{scroll-BD82ANjm.js.map → scroll-qL-HkMdP.js.map} +1 -1
- package/dist/{select-BR3r3SZe.cjs → select-BvA7v-gL.cjs} +1 -1
- package/dist/{select-BR3r3SZe.cjs.map → select-BvA7v-gL.cjs.map} +1 -1
- package/dist/{select-GONAphZI.js → select-CnPXUeSf.js} +1 -1
- package/dist/{select-GONAphZI.js.map → select-CnPXUeSf.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-C4sAGqTf.js → sheet-BRL07BB4.js} +3 -3
- package/dist/{sheet-C4sAGqTf.js.map → sheet-BRL07BB4.js.map} +1 -1
- package/dist/{sheet-D9pZMrzs.cjs → sheet-BYQJAHQn.cjs} +1 -1
- package/dist/{sheet-D9pZMrzs.cjs.map → sheet-BYQJAHQn.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-C1J0-i4d.cjs → sheet.service-B25bsrYG.cjs} +1 -1
- package/dist/{sheet.service-C1J0-i4d.cjs.map → sheet.service-B25bsrYG.cjs.map} +1 -1
- package/dist/{sheet.service-B7h_-e-q.js → sheet.service-SPQ8oLCi.js} +2 -2
- package/dist/{sheet.service-B7h_-e-q.js.map → sheet.service-SPQ8oLCi.js.map} +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{sound.service-CvdB2yUJ.cjs → sound.service-BGs6m0Cm.cjs} +1 -1
- package/dist/{sound.service-CvdB2yUJ.cjs.map → sound.service-BGs6m0Cm.cjs.map} +1 -1
- package/dist/{sound.service-Ba_HNBLD.js → sound.service-kKfsN0m-.js} +1 -1
- package/dist/{sound.service-Ba_HNBLD.js.map → sound.service-kKfsN0m-.js.map} +1 -1
- package/dist/{splash-screen-DqULOTZ0.cjs → splash-screen-BDt4PInk.cjs} +1 -1
- package/dist/{splash-screen-DqULOTZ0.cjs.map → splash-screen-BDt4PInk.cjs.map} +1 -1
- package/dist/{splash-screen-BGMZmQRT.js → splash-screen-C8JCqX5L.js} +1 -1
- package/dist/{splash-screen-BGMZmQRT.js.map → splash-screen-C8JCqX5L.js.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-DzFcGdcn.cjs → src-CpRNClhg.cjs} +1 -1
- package/dist/{src-DzFcGdcn.cjs.map → src-CpRNClhg.cjs.map} +1 -1
- package/dist/{src-CHM4hrEr.js → src-CqdnWGgr.js} +39 -39
- package/dist/{src-CHM4hrEr.js.map → src-CqdnWGgr.js.map} +1 -1
- package/dist/{state-ClRXrqDA.js → state-BusMG6sM.js} +266 -244
- package/dist/{state-ClRXrqDA.js.map → state-BusMG6sM.js.map} +1 -1
- package/dist/state-DNdCPITt.cjs +1 -0
- package/dist/{state-BAW3C11I.cjs.map → state-DNdCPITt.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 +1 -1
- package/dist/{surface-BHJgIDz9.js → surface-C8jQy8Ym.js} +1 -1
- package/dist/{surface-BHJgIDz9.js.map → surface-C8jQy8Ym.js.map} +1 -1
- package/dist/{surface-DW78bc8W.cjs → surface-Du2Y4vXd.cjs} +1 -1
- package/dist/{surface-DW78bc8W.cjs.map → surface-Du2Y4vXd.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 +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-EIEhkEUb.cjs → tabs-0RfeCa00.cjs} +1 -1
- package/dist/{tabs-EIEhkEUb.cjs.map → tabs-0RfeCa00.cjs.map} +1 -1
- package/dist/{tabs-BCRVyQU1.js → tabs-Cyahh9Q6.js} +1 -1
- package/dist/{tabs-BCRVyQU1.js.map → tabs-Cyahh9Q6.js.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-DApOhSAL.js → textarea-CXCcTVnf.js} +1 -1
- package/dist/{textarea-DApOhSAL.js.map → textarea-CXCcTVnf.js.map} +1 -1
- package/dist/{textarea-zxNlRLVm.cjs → textarea-jqRrLxmo.cjs} +1 -1
- package/dist/{textarea-zxNlRLVm.cjs.map → textarea-jqRrLxmo.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-BCUjQH6-.js → theme-2KZW2Rfs.js} +3 -3
- package/dist/{theme-BCUjQH6-.js.map → theme-2KZW2Rfs.js.map} +1 -1
- package/dist/{theme-Z43TLE61.cjs → theme-Hjz9sCN-.cjs} +1 -1
- package/dist/{theme-Z43TLE61.cjs.map → theme-Hjz9sCN-.cjs.map} +1 -1
- package/dist/{theme-button-DdSbcivT.js → theme-button-9uF1eoHz.js} +1 -1
- package/dist/{theme-button-DdSbcivT.js.map → theme-button-9uF1eoHz.js.map} +1 -1
- package/dist/{theme-button-Czsdp3o1.cjs → theme-button-C7QIbke1.cjs} +1 -1
- package/dist/{theme-button-Czsdp3o1.cjs.map → theme-button-C7QIbke1.cjs.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-CP71ojp6.cjs → theme.service-BrUbGoeQ.cjs} +1 -1
- package/dist/{theme.service-CP71ojp6.cjs.map → theme.service-BrUbGoeQ.cjs.map} +1 -1
- package/dist/{theme.service-9clsqyee.js → theme.service-CmbOGMA8.js} +1 -1
- package/dist/{theme.service-9clsqyee.js.map → theme.service-CmbOGMA8.js.map} +1 -1
- package/dist/timeline.cjs +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +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 +1 -1
- package/dist/{window-moDKyGLZ.js → window-C7yY9yp5.js} +2 -2
- package/dist/{window-moDKyGLZ.js.map → window-C7yY9yp5.js.map} +1 -1
- package/dist/{window-DTgKAQgz.cjs → window-DtUOWiAj.cjs} +1 -1
- package/dist/{window-DTgKAQgz.cjs.map → window-DtUOWiAj.cjs.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +2 -3
- package/src/agent/helpers.ts +0 -2
- package/src/audio/emotional-sounds.ts +0 -2
- package/src/audio/sound.service.ts +0 -2
- package/src/input/input.ts +2 -2
- package/src/notification/notification-service.ts +0 -2
- package/src/overlay/overlay.animations.ts +0 -25
- package/src/overlay/overlay.stack.ts +0 -6
- package/src/state/active-host.ts +53 -19
- package/src/state/schmancy-context.ts +47 -1
- package/src/state/state.test.ts +50 -2
- package/types/src/agent/helpers.d.ts +0 -1
- package/types/src/audio/emotional-sounds.d.ts +0 -1
- package/types/src/audio/sound.service.d.ts +1 -1
- package/types/src/notification/notification-service.d.ts +0 -1
- package/types/src/overlay/overlay.animations.d.ts +0 -1
- package/types/src/overlay/overlay.stack.d.ts +0 -2
- package/types/src/state/active-host.d.ts +5 -0
- package/types/src/state/schmancy-context.d.ts +1 -0
- package/dist/active-host-0of-L858.cjs +0 -1
- package/dist/active-host-0of-L858.cjs.map +0 -1
- package/dist/active-host-D-a1X-nq.js.map +0 -1
- package/dist/input-ClnkMJgh.js.map +0 -1
- package/dist/input-CwFslLcF.cjs +0 -51
- package/dist/input-CwFslLcF.cjs.map +0 -1
- package/dist/state-BAW3C11I.cjs +0 -1
- package/src/agent/index.ts +0 -1
- package/types/src/agent/index.d.ts +0 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
DURATION_BACKDROP,
|
|
3
2
|
DURATION_EXIT,
|
|
4
|
-
EASE_OUT,
|
|
5
3
|
getEasing,
|
|
6
4
|
SPRING_GENTLE,
|
|
7
5
|
SPRING_SMOOTH,
|
|
@@ -134,29 +132,6 @@ export function anchorOriginVars(
|
|
|
134
132
|
}
|
|
135
133
|
}
|
|
136
134
|
|
|
137
|
-
export function backdropAnimation(direction: 'in' | 'out'): AnimationSpec {
|
|
138
|
-
if (reducedMotion) {
|
|
139
|
-
return direction === 'in'
|
|
140
|
-
? {
|
|
141
|
-
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
142
|
-
options: { duration: 1, easing: 'linear', fill: 'forwards' },
|
|
143
|
-
}
|
|
144
|
-
: {
|
|
145
|
-
keyframes: [{ opacity: 1 }, { opacity: 0 }],
|
|
146
|
-
options: { duration: 1, easing: 'linear', fill: 'forwards' },
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return direction === 'in'
|
|
150
|
-
? {
|
|
151
|
-
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
152
|
-
options: { duration: DURATION_BACKDROP, easing: EASE_OUT, fill: 'forwards' },
|
|
153
|
-
}
|
|
154
|
-
: {
|
|
155
|
-
keyframes: [{ opacity: 1 }, { opacity: 0 }],
|
|
156
|
-
options: { duration: DURATION_BACKDROP, easing: EASE_OUT, fill: 'forwards' },
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
135
|
export function surfaceAnimation(layout: OverlayLayout, direction: 'in' | 'out'): AnimationSpec {
|
|
161
136
|
if (reducedMotion) {
|
|
162
137
|
// Opacity-only; explicit reset to { opacity: 1, transform: none } on `in`
|
|
@@ -46,12 +46,6 @@ export function clearStack(): void {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
/** Top entry (LIFO). Undefined when stack is empty. */
|
|
50
|
-
export function topEntry(): OverlayEntry | undefined {
|
|
51
|
-
const s = stack$$.value
|
|
52
|
-
return s[s.length - 1]
|
|
53
|
-
}
|
|
54
|
-
|
|
55
49
|
/* ---------------- scroll lock -------------------------------------------- */
|
|
56
50
|
|
|
57
51
|
/**
|
package/src/state/active-host.ts
CHANGED
|
@@ -24,13 +24,27 @@
|
|
|
24
24
|
// polyfill or native AsyncContext lands (drop the file, swap the
|
|
25
25
|
// `_activeHost` export for the standard primitive).
|
|
26
26
|
//
|
|
27
|
+
// Known limitation — native await on a native Promise: V8's await
|
|
28
|
+
// optimization (since 7.x) skips the spec-prescribed
|
|
29
|
+
// `Promise.resolve(x).then(continuation)` step, so userland `then`
|
|
30
|
+
// patches don't intercept the resumption. Class methods that mutate
|
|
31
|
+
// state across an `await` boundary will fall back to the
|
|
32
|
+
// module-scoped global, not the active-host's isolated copy. To
|
|
33
|
+
// preserve the host across awaits, either keep the mutation in the
|
|
34
|
+
// synchronous prelude before the first `await`, or explicitly chain
|
|
35
|
+
// with `.then()` (which still routes through the patched method).
|
|
36
|
+
// A real fix requires either a build-time async-function transform
|
|
37
|
+
// or native AsyncContext.Variable in the runtime.
|
|
38
|
+
//
|
|
27
39
|
// resolveActiveHost() fallback chain:
|
|
28
40
|
// 1. Stack value set by `_activeHost.run(host, fn)` — covers render(),
|
|
29
|
-
// Lit lifecycle methods, class-method handlers (all wrapped by
|
|
30
|
-
//
|
|
31
|
-
// 2.
|
|
32
|
-
//
|
|
33
|
-
//
|
|
41
|
+
// Lit lifecycle methods, and class-method handlers (all wrapped by
|
|
42
|
+
// SchmancyElement's prototype-chain wrap).
|
|
43
|
+
// 2. The closest `<schmancy-context>` whose subtree currently has an
|
|
44
|
+
// in-flight DOM event. The element installs capture-phase listeners
|
|
45
|
+
// that publish itself as the event-host while the synchronous
|
|
46
|
+
// handler chain runs; the slot clears via microtask. Covers
|
|
47
|
+
// template-bound inline arrow handlers attached to descendants.
|
|
34
48
|
// 3. document.activeElement — keyboard handlers in focus.
|
|
35
49
|
// 4. undefined → caller falls back to the module-scoped global instance.
|
|
36
50
|
|
|
@@ -119,24 +133,44 @@ export const _activeHost = {
|
|
|
119
133
|
},
|
|
120
134
|
}
|
|
121
135
|
|
|
136
|
+
// Tier 2 of the resolveActiveHost() fallback chain. A `<schmancy-context>`
|
|
137
|
+
// publishes itself here from a capture-phase event listener attached to
|
|
138
|
+
// itself; the slot clears in the next microtask, after the synchronous
|
|
139
|
+
// event-handler chain has run. `window.event` is unreliable across both
|
|
140
|
+
// engines and time (it can outlive its event — a stale `message` event
|
|
141
|
+
// from postMessage can leak BODY for arbitrary later resolution calls), so
|
|
142
|
+
// we own this slot rather than read the legacy global.
|
|
143
|
+
//
|
|
144
|
+
// Singleton across module copies for the same reason as `_stack` above.
|
|
145
|
+
const EVENT_HOST_KEY = Symbol.for('schmancy.state.activeHost.eventHost')
|
|
146
|
+
type EventHostSlot = { host: HTMLElement | undefined; scheduled: boolean }
|
|
147
|
+
const _eventHostSlot: EventHostSlot =
|
|
148
|
+
((globalThis as { [EVENT_HOST_KEY]?: EventHostSlot })[EVENT_HOST_KEY] ??= {
|
|
149
|
+
host: undefined,
|
|
150
|
+
scheduled: false,
|
|
151
|
+
})
|
|
152
|
+
|
|
153
|
+
/** Publish `host` as the active event-host. The slot self-clears at the
|
|
154
|
+
* end of the current microtask checkpoint — long enough for the entire
|
|
155
|
+
* synchronous event-handler chain to read it, short enough that no
|
|
156
|
+
* later, unrelated microtask sees a stale value. */
|
|
157
|
+
export function _publishEventHost(host: HTMLElement): void {
|
|
158
|
+
_eventHostSlot.host = host
|
|
159
|
+
if (_eventHostSlot.scheduled) return
|
|
160
|
+
_eventHostSlot.scheduled = true
|
|
161
|
+
queueMicrotask(() => {
|
|
162
|
+
_eventHostSlot.scheduled = false
|
|
163
|
+
_eventHostSlot.host = undefined
|
|
164
|
+
})
|
|
165
|
+
}
|
|
166
|
+
|
|
122
167
|
export function resolveActiveHost(): HTMLElement | undefined {
|
|
123
|
-
// 1. Stack (set by _activeHost.run
|
|
124
|
-
// Promise patch above).
|
|
168
|
+
// 1. Stack (set by _activeHost.run).
|
|
125
169
|
const fromStack = _activeHost.get()
|
|
126
170
|
if (fromStack !== undefined) return fromStack
|
|
127
171
|
|
|
128
|
-
// 2.
|
|
129
|
-
|
|
130
|
-
// frame has been pushed.
|
|
131
|
-
if (typeof window !== 'undefined') {
|
|
132
|
-
const evt = (window as Window & { event?: Event }).event
|
|
133
|
-
if (evt) {
|
|
134
|
-
const path = evt.composedPath()
|
|
135
|
-
for (const node of path) {
|
|
136
|
-
if (node instanceof HTMLElement) return node
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
172
|
+
// 2. Closest <schmancy-context> with an in-flight event in its subtree.
|
|
173
|
+
if (_eventHostSlot.host !== undefined) return _eventHostSlot.host
|
|
140
174
|
|
|
141
175
|
// 3. document.activeElement — keyboard / focus handlers.
|
|
142
176
|
if (typeof document !== 'undefined' && document.activeElement instanceof HTMLElement) {
|
|
@@ -14,7 +14,31 @@
|
|
|
14
14
|
import { LitElement, html } from 'lit'
|
|
15
15
|
import { property } from 'lit/decorators.js'
|
|
16
16
|
import { ContextProvider, createContext, type Context } from '@lit/context'
|
|
17
|
-
import { stateContextKey } from './active-host'
|
|
17
|
+
import { _publishEventHost, stateContextKey } from './active-host'
|
|
18
|
+
|
|
19
|
+
// Curated set of DOM event types that descendants are likely to bind state-
|
|
20
|
+
// mutating handlers to. The capture-phase listener publishes `this` as the
|
|
21
|
+
// active event-host before the event reaches the target; descendants whose
|
|
22
|
+
// inline handlers (or any code reached during the synchronous chain) call a
|
|
23
|
+
// state mutator can resolve back to the isolated copy this context provides.
|
|
24
|
+
const EVENT_TYPES = [
|
|
25
|
+
'click',
|
|
26
|
+
'dblclick',
|
|
27
|
+
'submit',
|
|
28
|
+
'change',
|
|
29
|
+
'input',
|
|
30
|
+
'keydown',
|
|
31
|
+
'keyup',
|
|
32
|
+
'keypress',
|
|
33
|
+
'pointerdown',
|
|
34
|
+
'pointerup',
|
|
35
|
+
'mousedown',
|
|
36
|
+
'mouseup',
|
|
37
|
+
'focus',
|
|
38
|
+
'blur',
|
|
39
|
+
'paste',
|
|
40
|
+
'drop',
|
|
41
|
+
] as const
|
|
18
42
|
|
|
19
43
|
/** Duck-typed view of what the `state()` factory hands out, restricted to the
|
|
20
44
|
* bits `<schmancy-context>` needs. Kept internal — consumers see the full
|
|
@@ -43,6 +67,22 @@ export class SchmancyContext extends LitElement {
|
|
|
43
67
|
provider: ContextProvider<Context<unknown, unknown>>
|
|
44
68
|
}> = []
|
|
45
69
|
|
|
70
|
+
private _publishEventTargetAsHost = (e: Event): void => {
|
|
71
|
+
// Publish the deepest event target (across shadow boundaries) rather
|
|
72
|
+
// than `this`. The downstream `ContextRequestEvent` will be dispatched
|
|
73
|
+
// from this host and must bubble up through `<schmancy-context>` to
|
|
74
|
+
// reach our `ContextProvider`. `@lit/context` skips self-registration
|
|
75
|
+
// (`consumerHost === this.host` ⇒ no-op), so dispatching from
|
|
76
|
+
// schmancy-context itself would silently fall back to the global.
|
|
77
|
+
const path = e.composedPath()
|
|
78
|
+
for (const node of path) {
|
|
79
|
+
if (node instanceof HTMLElement) {
|
|
80
|
+
_publishEventHost(node)
|
|
81
|
+
return
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
46
86
|
override connectedCallback(): void {
|
|
47
87
|
super.connectedCallback()
|
|
48
88
|
for (const tmpl of this.provides) {
|
|
@@ -55,9 +95,15 @@ export class SchmancyContext extends LitElement {
|
|
|
55
95
|
const provider = new ContextProvider(this, { context: ctx, initialValue: isolated })
|
|
56
96
|
this._scoped.push({ isolated, provider })
|
|
57
97
|
}
|
|
98
|
+
for (const type of EVENT_TYPES) {
|
|
99
|
+
this.addEventListener(type, this._publishEventTargetAsHost, { capture: true })
|
|
100
|
+
}
|
|
58
101
|
}
|
|
59
102
|
|
|
60
103
|
override disconnectedCallback(): void {
|
|
104
|
+
for (const type of EVENT_TYPES) {
|
|
105
|
+
this.removeEventListener(type, this._publishEventTargetAsHost, { capture: true })
|
|
106
|
+
}
|
|
61
107
|
for (const entry of this._scoped) {
|
|
62
108
|
entry.isolated.destroy()
|
|
63
109
|
}
|
package/src/state/state.test.ts
CHANGED
|
@@ -735,7 +735,7 @@ describe('<schmancy-context provides>', () => {
|
|
|
735
735
|
root.remove()
|
|
736
736
|
})
|
|
737
737
|
|
|
738
|
-
it('inline arrow handler resolves through the active host (
|
|
738
|
+
it('inline arrow handler resolves through the active host (event-host slot)', async () => {
|
|
739
739
|
using counter = state<CounterShape>('ctxtest/inline-arrow').memory({ n: 0 })
|
|
740
740
|
|
|
741
741
|
@customElement('ctx-inline-arrow')
|
|
@@ -777,7 +777,16 @@ describe('<schmancy-context provides>', () => {
|
|
|
777
777
|
root.remove()
|
|
778
778
|
})
|
|
779
779
|
|
|
780
|
-
|
|
780
|
+
// Skipped: V8's await optimization (since 7.x) bypasses
|
|
781
|
+
// `Promise.prototype.then` for native `await` on a native Promise — the
|
|
782
|
+
// continuation resumes via internal scheduling without ever calling our
|
|
783
|
+
// patched `then`, so the active-host stack is empty when the body after
|
|
784
|
+
// the first `await` runs. There is no userland fix without a build-time
|
|
785
|
+
// async-function transform or native AsyncContext.Variable. To preserve
|
|
786
|
+
// the host across an async boundary today, do the mutation in the
|
|
787
|
+
// synchronous prelude (before the first `await`) or chain explicitly with
|
|
788
|
+
// `.then()` (which still routes through the patched method).
|
|
789
|
+
it.skip('async-after-await handler resolves through the active host (Promise.then patch)', async () => {
|
|
781
790
|
using counter = state<CounterShape>('ctxtest/async-after-await').memory({ n: 0 })
|
|
782
791
|
|
|
783
792
|
@customElement('ctx-async-await')
|
|
@@ -817,4 +826,43 @@ describe('<schmancy-context provides>', () => {
|
|
|
817
826
|
|
|
818
827
|
root.remove()
|
|
819
828
|
})
|
|
829
|
+
|
|
830
|
+
it('explicit .then() chain preserves the host across the microtask hop', async () => {
|
|
831
|
+
using counter = state<CounterShape>('ctxtest/explicit-then').memory({ n: 0 })
|
|
832
|
+
|
|
833
|
+
@customElement('ctx-explicit-then')
|
|
834
|
+
class Reader extends $LitElement() {
|
|
835
|
+
override render() {
|
|
836
|
+
return html`<span data-test="v">${counter.value.n}</span>`
|
|
837
|
+
}
|
|
838
|
+
run(): Promise<void> {
|
|
839
|
+
return Promise.resolve().then(() => counter.replace({ n: counter.value.n + 1 }))
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
void Reader
|
|
843
|
+
|
|
844
|
+
const root = document.createElement('div')
|
|
845
|
+
document.body.appendChild(root)
|
|
846
|
+
render(
|
|
847
|
+
html`
|
|
848
|
+
<schmancy-context .provides=${[counter]}>
|
|
849
|
+
<ctx-explicit-then id="r"></ctx-explicit-then>
|
|
850
|
+
</schmancy-context>
|
|
851
|
+
`,
|
|
852
|
+
root,
|
|
853
|
+
)
|
|
854
|
+
|
|
855
|
+
await settle()
|
|
856
|
+
const r = root.querySelector<LitElement & { run(): Promise<void> }>('#r')!
|
|
857
|
+
await r.updateComplete
|
|
858
|
+
|
|
859
|
+
await r.run()
|
|
860
|
+
await settle()
|
|
861
|
+
await r.updateComplete
|
|
862
|
+
|
|
863
|
+
expect(r.shadowRoot!.querySelector('[data-test="v"]')!.textContent).toBe('1')
|
|
864
|
+
expect(counter.value.n).toBe(0)
|
|
865
|
+
|
|
866
|
+
root.remove()
|
|
867
|
+
})
|
|
820
868
|
})
|
|
@@ -46,7 +46,6 @@ export declare function anchorOriginVars(anchor: Anchor | undefined, surfaceRect
|
|
|
46
46
|
width: number;
|
|
47
47
|
height: number;
|
|
48
48
|
}): Record<string, string>;
|
|
49
|
-
export declare function backdropAnimation(direction: 'in' | 'out'): AnimationSpec;
|
|
50
49
|
export declare function surfaceAnimation(layout: OverlayLayout, direction: 'in' | 'out'): AnimationSpec;
|
|
51
50
|
/**
|
|
52
51
|
* FLIP (First / Last / Invert / Play) animation from `before` rect to
|
|
@@ -10,8 +10,6 @@ export declare function pushEntry(entry: OverlayEntry): void;
|
|
|
10
10
|
export declare function removeEntry(id: string): void;
|
|
11
11
|
/** Clear the entire stack. Used by dismissAll(). */
|
|
12
12
|
export declare function clearStack(): void;
|
|
13
|
-
/** Top entry (LIFO). Undefined when stack is empty. */
|
|
14
|
-
export declare function topEntry(): OverlayEntry | undefined;
|
|
15
13
|
export declare function markModal(id: string, hostContainer: HTMLElement): void;
|
|
16
14
|
export declare function unmarkModal(id: string): void;
|
|
17
15
|
/**
|
|
@@ -10,6 +10,11 @@ export declare const _activeHost: {
|
|
|
10
10
|
/** The current active host, or undefined if no `run()` is on the stack. */
|
|
11
11
|
get(): HTMLElement | undefined;
|
|
12
12
|
};
|
|
13
|
+
/** Publish `host` as the active event-host. The slot self-clears at the
|
|
14
|
+
* end of the current microtask checkpoint — long enough for the entire
|
|
15
|
+
* synchronous event-handler chain to read it, short enough that no
|
|
16
|
+
* later, unrelated microtask sees a stale value. */
|
|
17
|
+
export declare function _publishEventHost(host: HTMLElement): void;
|
|
13
18
|
export declare function resolveActiveHost(): HTMLElement | undefined;
|
|
14
19
|
/** Stable context key for a state namespace. `Symbol.for(...)` so the same
|
|
15
20
|
* namespace string yields the same symbol across module boundaries — the
|
|
@@ -20,6 +20,7 @@ export declare class SchmancyContext extends LitElement {
|
|
|
20
20
|
* element see a per-element isolated copy. */
|
|
21
21
|
provides: readonly StateTemplate[];
|
|
22
22
|
private _scoped;
|
|
23
|
+
private _publishEventTargetAsHost;
|
|
23
24
|
connectedCallback(): void;
|
|
24
25
|
disconnectedCallback(): void;
|
|
25
26
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Symbol.for(`schmancy.state.activeHost.stack`),t=globalThis;t[e]??={stack:[void 0]};var n=t[e].stack;if(typeof Promise<`u`&&!(`o`in Promise.prototype)){Object.defineProperty(Promise.prototype,`o`,{value:!0,configurable:!1,enumerable:!1,writable:!1});let e=Promise.prototype.then;Promise.prototype.then=function(t,r){let i=n[n.length-1],a=t&&(e=>{n.push(i);try{return t(e)}finally{n.pop()}}),o=r&&(e=>{n.push(i);try{return r(e)}finally{n.pop()}});return e.call(this,a,o)}}var r={run(e,t){n.push(e);try{return t()}finally{n.pop()}},get:()=>n[n.length-1]};function i(){let e=r.get();if(e!==void 0)return e;if(typeof window<`u`){let e=window.event;if(e){let t=e.composedPath();for(let e of t)if(e instanceof HTMLElement)return e}}return typeof document<`u`&&document.activeElement instanceof HTMLElement?document.activeElement:void 0}function a(e){return Symbol.for(`schmancy.state:${e}`)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"active-host-0of-L858.cjs","names":[],"sources":["../src/state/active-host.ts"],"sourcesContent":["// `_`-prefixed identifiers below are an intentional naming convention for\n// module-private infrastructure. `_activeHost` is exported only so the\n// $LitElement mixin can wrap render/lifecycle in `_activeHost.run`; the\n// underscore signals \"not part of the public state API.\"\n/* oxlint-disable no-underscore-dangle */\n\n// Active-host tracker for context-aware state resolution.\n//\n// Polyfills the TC39 `AsyncContext.Variable` propagation primitive using a\n// stack + a one-time `Promise.prototype.then` patch. The stack value carries\n// across `await`, `queueMicrotask`, RxJS subscription callbacks, and any\n// other code path that ultimately routes through `Promise.then`. This is the\n// same capture-and-restore technique zone.js, async-hooks, and the various\n// AsyncContext userland polyfills use.\n//\n// Why we own this:\n// - The TC39 proposal is at stage 2; no official polyfill ships from TC39.\n// - The `async-context@1.0.0` package on npm is unrelated (a 2014 Node\n// callback helper), and the available userland polyfills either depend\n// on zone.js (~50 KB) or are Node-only / hobby quality.\n// - The patch surface is ~30 lines, idempotent, preserves Promise\n// semantics (delegates to the original `then`, so `Symbol.species` and\n// subclassing work unchanged), and decommissions cleanly the day a real\n// polyfill or native AsyncContext lands (drop the file, swap the\n// `_activeHost` export for the standard primitive).\n//\n// resolveActiveHost() fallback chain:\n// 1. Stack value set by `_activeHost.run(host, fn)` — covers render(),\n// Lit lifecycle methods, class-method handlers (all wrapped by\n// $LitElement), and async-after-await via the Promise patch.\n// 2. window.event.composedPath() — sync event-handler fallback for\n// template-bound inline arrow handlers when the EventPart patch is\n// unavailable (feature-gated upgrade).\n// 3. document.activeElement — keyboard handlers in focus.\n// 4. undefined → caller falls back to the module-scoped global instance.\n\n// Singleton across any number of schmancy module copies (source + dist, ESM\n// + CJS, hoisted vs. nested node_modules) via the runtime-global symbol\n// registry. The first copy to load creates the slot; later copies reuse it.\n// Without this, two stacks → mixins push to one, state reads from the other,\n// and active-host context is lost across the boundary.\nconst STACK_KEY = Symbol.for('schmancy.state.activeHost.stack')\ntype StackSlot = { stack: Array<HTMLElement | undefined> }\nconst _g = globalThis as { [STACK_KEY]?: StackSlot }\n_g[STACK_KEY] ??= { stack: [undefined] }\nconst _stack = _g[STACK_KEY].stack\n\n// One-time Promise.prototype.then patch at module init. Each .then() call\n// captures the stack head at chain time; firing the callback restores that\n// captured value for the duration of the callback. The guard property\n// prevents double-patching across HMR / duplicate module loads.\ndeclare global {\n\tinterface Promise<T> {\n\t\t// Marker symbol so we can detect (and skip) re-patching.\n\t\treadonly __schmancyActiveHostPatched?: true\n\t}\n}\n\n// Patching Promise.prototype is the entire mechanism this module exists to\n// provide — the lint rules below intentionally do not apply.\n/* oxlint-disable no-extend-native, unicorn/no-thenable */\nif (typeof Promise !== 'undefined' && !('__schmancyActiveHostPatched' in Promise.prototype)) {\n\tObject.defineProperty(Promise.prototype, '__schmancyActiveHostPatched', {\n\t\tvalue: true,\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\twritable: false,\n\t})\n\tconst _origThen = Promise.prototype.then\n\t// Replace with our wrapper. We delegate to the original `then` via\n\t// `_origThen.call(this, …)` so Promise subclassing / Symbol.species behave\n\t// exactly as before — the only added work is the stack push/pop around\n\t// each user callback.\n\tPromise.prototype.then = function schmancyThen<T, R1, R2>(\n\t\tthis: Promise<T>,\n\t\tonfulfilled?: ((value: T) => R1 | PromiseLike<R1>) | null,\n\t\tonrejected?: ((reason: unknown) => R2 | PromiseLike<R2>) | null,\n\t): Promise<R1 | R2> {\n\t\tconst captured = _stack[_stack.length - 1]\n\t\tconst wrapFulfilled = onfulfilled\n\t\t\t? (v: T): R1 | PromiseLike<R1> => {\n\t\t\t\t\t_stack.push(captured)\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn onfulfilled(v)\n\t\t\t\t\t} finally {\n\t\t\t\t\t\t_stack.pop()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t: onfulfilled\n\t\tconst wrapRejected = onrejected\n\t\t\t? (r: unknown): R2 | PromiseLike<R2> => {\n\t\t\t\t\t_stack.push(captured)\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn onrejected(r)\n\t\t\t\t\t} finally {\n\t\t\t\t\t\t_stack.pop()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t: onrejected\n\t\treturn _origThen.call(this, wrapFulfilled, wrapRejected) as Promise<R1 | R2>\n\t}\n}\n/* oxlint-enable no-extend-native, unicorn/no-thenable */\n\nexport const _activeHost = {\n\t/** Run `fn` with `host` as the active host for the duration of `fn` and\n\t * any awaits / microtasks / Promise chains that descend from it. */\n\trun<R>(host: HTMLElement | undefined, fn: () => R): R {\n\t\t_stack.push(host)\n\t\ttry {\n\t\t\treturn fn()\n\t\t} finally {\n\t\t\t_stack.pop()\n\t\t}\n\t},\n\t/** The current active host, or undefined if no `run()` is on the stack. */\n\tget(): HTMLElement | undefined {\n\t\treturn _stack[_stack.length - 1]\n\t},\n}\n\nexport function resolveActiveHost(): HTMLElement | undefined {\n\t// 1. Stack (set by _activeHost.run, propagated across await via the\n\t// Promise patch above).\n\tconst fromStack = _activeHost.get()\n\tif (fromStack !== undefined) return fromStack\n\n\t// 2. window.event — sync event-handler fallback. Covers inline arrow\n\t// template bindings whose handlers run before any _activeHost.run\n\t// frame has been pushed.\n\tif (typeof window !== 'undefined') {\n\t\tconst evt = (window as Window & { event?: Event }).event\n\t\tif (evt) {\n\t\t\tconst path = evt.composedPath()\n\t\t\tfor (const node of path) {\n\t\t\t\tif (node instanceof HTMLElement) return node\n\t\t\t}\n\t\t}\n\t}\n\n\t// 3. document.activeElement — keyboard / focus handlers.\n\tif (typeof document !== 'undefined' && document.activeElement instanceof HTMLElement) {\n\t\treturn document.activeElement\n\t}\n\n\t// 4. undefined — caller falls back to module-scoped.\n\treturn undefined\n}\n\n/** Stable context key for a state namespace. `Symbol.for(...)` so the same\n * namespace string yields the same symbol across module boundaries — the\n * ContextProvider on `<schmancy-context>` and the ContextRequestEvent\n * dispatched by a state read must agree on identity. */\nexport function stateContextKey(namespace: string): symbol {\n\treturn Symbol.for(`schmancy.state:${namespace}`)\n}\n"],"mappings":"AAyCA,IAAM,EAAY,OAAO,IAAI,kCAAA,CAEvB,EAAK,WACX,EAAG,KAAe,CAAE,MAAO,CAAA,IAAC,GAAA,CAAA,CAC5B,IAAM,EAAS,EAAG,GAAW,MAgB7B,GAAuB,OAAZ,QAAY,KAAZ,EAA6B,MAAiC,QAAQ,WAAY,CAC5F,OAAO,eAAe,QAAQ,UAAW,IAA+B,CACvE,MAAA,CAAO,EACP,aAAA,CAAc,EACd,WAAA,CAAY,EACZ,SAAA,CAAU,EAAA,CAAA,CAEX,IAAM,EAAY,QAAQ,UAAU,KAKpC,QAAQ,UAAU,KAAO,SAExB,EACA,EAAA,CAEA,IAAM,EAAW,EAAO,EAAO,OAAS,GAClC,EAAgB,IAClB,GAAA,CACD,EAAO,KAAK,EAAA,CACZ,GAAA,CACC,OAAO,EAAY,EAAA,QAAA,CAEnB,EAAO,KAAA,IAIL,EAAe,IACjB,GAAA,CACD,EAAO,KAAK,EAAA,CACZ,GAAA,CACC,OAAO,EAAW,EAAA,QAAA,CAElB,EAAO,KAAA,IAIX,OAAO,EAAU,KAAK,KAAM,EAAe,EAAA,EAK7C,IAAa,EAAc,CAG1B,IAAO,EAA+B,EAAA,CACrC,EAAO,KAAK,EAAA,CACZ,GAAA,CACC,OAAO,GAAA,QAAA,CAEP,EAAO,KAAA,GAIT,QACQ,EAAO,EAAO,OAAS,GAAA,CAIhC,SAAgB,GAAA,CAGf,IAAM,EAAY,EAAY,KAAA,CAC9B,GAAI,IAAJ,IAAkB,GAAW,OAAO,EAKpC,GAAsB,OAAX,OAAW,IAAa,CAClC,IAAM,EAAO,OAAsC,MACnD,GAAI,EAAK,CACR,IAAM,EAAO,EAAI,cAAA,CACjB,IAAK,IAAM,KAAQ,EAClB,GAAI,aAAgB,YAAa,OAAO,GAM3C,OAAwB,OAAb,SAAa,KAAe,SAAS,yBAAyB,YACjE,SAAS,cAAA,IADjB,GAYD,SAAgB,EAAgB,EAAA,CAC/B,OAAO,OAAO,IAAI,kBAAkB,IAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"active-host-D-a1X-nq.js","names":[],"sources":["../src/state/active-host.ts"],"sourcesContent":["// `_`-prefixed identifiers below are an intentional naming convention for\n// module-private infrastructure. `_activeHost` is exported only so the\n// $LitElement mixin can wrap render/lifecycle in `_activeHost.run`; the\n// underscore signals \"not part of the public state API.\"\n/* oxlint-disable no-underscore-dangle */\n\n// Active-host tracker for context-aware state resolution.\n//\n// Polyfills the TC39 `AsyncContext.Variable` propagation primitive using a\n// stack + a one-time `Promise.prototype.then` patch. The stack value carries\n// across `await`, `queueMicrotask`, RxJS subscription callbacks, and any\n// other code path that ultimately routes through `Promise.then`. This is the\n// same capture-and-restore technique zone.js, async-hooks, and the various\n// AsyncContext userland polyfills use.\n//\n// Why we own this:\n// - The TC39 proposal is at stage 2; no official polyfill ships from TC39.\n// - The `async-context@1.0.0` package on npm is unrelated (a 2014 Node\n// callback helper), and the available userland polyfills either depend\n// on zone.js (~50 KB) or are Node-only / hobby quality.\n// - The patch surface is ~30 lines, idempotent, preserves Promise\n// semantics (delegates to the original `then`, so `Symbol.species` and\n// subclassing work unchanged), and decommissions cleanly the day a real\n// polyfill or native AsyncContext lands (drop the file, swap the\n// `_activeHost` export for the standard primitive).\n//\n// resolveActiveHost() fallback chain:\n// 1. Stack value set by `_activeHost.run(host, fn)` — covers render(),\n// Lit lifecycle methods, class-method handlers (all wrapped by\n// $LitElement), and async-after-await via the Promise patch.\n// 2. window.event.composedPath() — sync event-handler fallback for\n// template-bound inline arrow handlers when the EventPart patch is\n// unavailable (feature-gated upgrade).\n// 3. document.activeElement — keyboard handlers in focus.\n// 4. undefined → caller falls back to the module-scoped global instance.\n\n// Singleton across any number of schmancy module copies (source + dist, ESM\n// + CJS, hoisted vs. nested node_modules) via the runtime-global symbol\n// registry. The first copy to load creates the slot; later copies reuse it.\n// Without this, two stacks → mixins push to one, state reads from the other,\n// and active-host context is lost across the boundary.\nconst STACK_KEY = Symbol.for('schmancy.state.activeHost.stack')\ntype StackSlot = { stack: Array<HTMLElement | undefined> }\nconst _g = globalThis as { [STACK_KEY]?: StackSlot }\n_g[STACK_KEY] ??= { stack: [undefined] }\nconst _stack = _g[STACK_KEY].stack\n\n// One-time Promise.prototype.then patch at module init. Each .then() call\n// captures the stack head at chain time; firing the callback restores that\n// captured value for the duration of the callback. The guard property\n// prevents double-patching across HMR / duplicate module loads.\ndeclare global {\n\tinterface Promise<T> {\n\t\t// Marker symbol so we can detect (and skip) re-patching.\n\t\treadonly __schmancyActiveHostPatched?: true\n\t}\n}\n\n// Patching Promise.prototype is the entire mechanism this module exists to\n// provide — the lint rules below intentionally do not apply.\n/* oxlint-disable no-extend-native, unicorn/no-thenable */\nif (typeof Promise !== 'undefined' && !('__schmancyActiveHostPatched' in Promise.prototype)) {\n\tObject.defineProperty(Promise.prototype, '__schmancyActiveHostPatched', {\n\t\tvalue: true,\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\twritable: false,\n\t})\n\tconst _origThen = Promise.prototype.then\n\t// Replace with our wrapper. We delegate to the original `then` via\n\t// `_origThen.call(this, …)` so Promise subclassing / Symbol.species behave\n\t// exactly as before — the only added work is the stack push/pop around\n\t// each user callback.\n\tPromise.prototype.then = function schmancyThen<T, R1, R2>(\n\t\tthis: Promise<T>,\n\t\tonfulfilled?: ((value: T) => R1 | PromiseLike<R1>) | null,\n\t\tonrejected?: ((reason: unknown) => R2 | PromiseLike<R2>) | null,\n\t): Promise<R1 | R2> {\n\t\tconst captured = _stack[_stack.length - 1]\n\t\tconst wrapFulfilled = onfulfilled\n\t\t\t? (v: T): R1 | PromiseLike<R1> => {\n\t\t\t\t\t_stack.push(captured)\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn onfulfilled(v)\n\t\t\t\t\t} finally {\n\t\t\t\t\t\t_stack.pop()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t: onfulfilled\n\t\tconst wrapRejected = onrejected\n\t\t\t? (r: unknown): R2 | PromiseLike<R2> => {\n\t\t\t\t\t_stack.push(captured)\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn onrejected(r)\n\t\t\t\t\t} finally {\n\t\t\t\t\t\t_stack.pop()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t: onrejected\n\t\treturn _origThen.call(this, wrapFulfilled, wrapRejected) as Promise<R1 | R2>\n\t}\n}\n/* oxlint-enable no-extend-native, unicorn/no-thenable */\n\nexport const _activeHost = {\n\t/** Run `fn` with `host` as the active host for the duration of `fn` and\n\t * any awaits / microtasks / Promise chains that descend from it. */\n\trun<R>(host: HTMLElement | undefined, fn: () => R): R {\n\t\t_stack.push(host)\n\t\ttry {\n\t\t\treturn fn()\n\t\t} finally {\n\t\t\t_stack.pop()\n\t\t}\n\t},\n\t/** The current active host, or undefined if no `run()` is on the stack. */\n\tget(): HTMLElement | undefined {\n\t\treturn _stack[_stack.length - 1]\n\t},\n}\n\nexport function resolveActiveHost(): HTMLElement | undefined {\n\t// 1. Stack (set by _activeHost.run, propagated across await via the\n\t// Promise patch above).\n\tconst fromStack = _activeHost.get()\n\tif (fromStack !== undefined) return fromStack\n\n\t// 2. window.event — sync event-handler fallback. Covers inline arrow\n\t// template bindings whose handlers run before any _activeHost.run\n\t// frame has been pushed.\n\tif (typeof window !== 'undefined') {\n\t\tconst evt = (window as Window & { event?: Event }).event\n\t\tif (evt) {\n\t\t\tconst path = evt.composedPath()\n\t\t\tfor (const node of path) {\n\t\t\t\tif (node instanceof HTMLElement) return node\n\t\t\t}\n\t\t}\n\t}\n\n\t// 3. document.activeElement — keyboard / focus handlers.\n\tif (typeof document !== 'undefined' && document.activeElement instanceof HTMLElement) {\n\t\treturn document.activeElement\n\t}\n\n\t// 4. undefined — caller falls back to module-scoped.\n\treturn undefined\n}\n\n/** Stable context key for a state namespace. `Symbol.for(...)` so the same\n * namespace string yields the same symbol across module boundaries — the\n * ContextProvider on `<schmancy-context>` and the ContextRequestEvent\n * dispatched by a state read must agree on identity. */\nexport function stateContextKey(namespace: string): symbol {\n\treturn Symbol.for(`schmancy.state:${namespace}`)\n}\n"],"mappings":"AAyCA,IAAM,IAAY,OAAO,IAAI,kCAAA,EAEvB,IAAK;AACX,EAAG,OAAe,EAAE,OAAO,CAAA,KAAC,EAAA,EAAA;AAC5B,IAAM,IAAS,EAAG,GAAW;AAgB7B,IAAuB,OAAZ,UAAY,OAAZ,EAA6B,OAAiC,QAAQ,YAAY;AAC5F,QAAO,eAAe,QAAQ,WAAW,KAA+B;EACvE,OAAA,CAAO;EACP,cAAA,CAAc;EACd,YAAA,CAAY;EACZ,UAAA,CAAU;EAAA,CAAA;CAEX,IAAM,IAAY,QAAQ,UAAU;AAKpC,SAAQ,UAAU,OAAO,SAExB,GACA,GAAA;EAEA,IAAM,IAAW,EAAO,EAAO,SAAS,IAClC,IAAgB,OAClB,MAAA;AACD,KAAO,KAAK,EAAA;AACZ,OAAA;AACC,WAAO,EAAY,EAAA;aAAA;AAEnB,MAAO,KAAA;;MAIL,IAAe,OACjB,MAAA;AACD,KAAO,KAAK,EAAA;AACZ,OAAA;AACC,WAAO,EAAW,EAAA;aAAA;AAElB,MAAO,KAAA;;;AAIX,SAAO,EAAU,KAAK,MAAM,GAAe,EAAA;;;AAK7C,IAAa,IAAc;CAG1B,IAAO,GAA+B,GAAA;AACrC,IAAO,KAAK,EAAA;AACZ,MAAA;AACC,UAAO,GAAA;YAAA;AAEP,KAAO,KAAA;;;CAIT,WACQ,EAAO,EAAO,SAAS;CAAA;AAIhC,SAAgB,IAAA;CAGf,IAAM,IAAY,EAAY,KAAA;AAC9B,KAAI,MAAJ,KAAkB,EAAW,QAAO;AAKpC,KAAsB,OAAX,SAAW,KAAa;EAClC,IAAM,IAAO,OAAsC;AACnD,MAAI,GAAK;GACR,IAAM,IAAO,EAAI,cAAA;AACjB,QAAK,IAAM,KAAQ,EAClB,KAAI,aAAgB,YAAa,QAAO;;;AAM3C,QAAwB,OAAb,WAAa,OAAe,SAAS,yBAAyB,cACjE,SAAS,gBAAA,KADjB;;AAYD,SAAgB,EAAgB,GAAA;AAC/B,QAAO,OAAO,IAAI,kBAAkB,IAAA;;AAAA,SAAA,KAAA,GAAA,QAAA,KAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-ClnkMJgh.js","names":[],"sources":["../src/input/input.scss?inline","../src/input/input.ts"],"sourcesContent":[" @reference \"tailwindcss\";\n\n:host {\n\t@apply block w-full min-w-0;\n\t/* Ensure no constraints on mobile */\n\tmax-width: 100%;\n\tbox-sizing: border-box;\n}\n\n/* Date input container needs special handling on mobile */\n.date-input-container {\n\t@apply w-full;\n\t/* Explicit width for mobile Safari */\n\twidth: 100% !important;\n\tmax-width: 100% !important;\n\tmin-width: 0;\n}\n\n/* Reset native input styles for consistency */\ninput {\n\t/* Remove all native styling */\n\t@apply appearance-none rounded-[8px];\n\t/* Prevent Safari zoom on focus */\n\tfont-size: 16px;\n\twidth: -webkit-fill-available;\n\t/* Ensure border radius is applied */\n\tborder-radius: 8px;\n\t/* Smooth transitions for luminous focus */\n\ttransition:\n\t\tbox-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),\n\t\tborder-color 200ms ease;\n}\n\n/* Luminous focus glow — light-based depth on focus */\ninput:focus {\n\tbox-shadow:\n\t\t0 0 0 1px var(--schmancy-sys-color-secondary-default),\n\t\t0 0 16px -4px color-mix(in srgb, var(--schmancy-sys-color-secondary-default) 20%, transparent);\n}\n\n/* Luminous error glow — red glow on error focus */\ninput[aria-invalid=\"true\"] {\n\tbox-shadow: 0 0 12px -4px color-mix(in srgb, var(--schmancy-sys-color-error-default) 15%, transparent);\n}\ninput[aria-invalid=\"true\"]:focus {\n\tbox-shadow:\n\t\t0 0 0 1px var(--schmancy-sys-color-error-default),\n\t\t0 0 16px -4px color-mix(in srgb, var(--schmancy-sys-color-error-default) 25%, transparent);\n}\n\n@media (prefers-reduced-motion: reduce) {\n\tinput { transition: none; }\n}\n\n/* Remove number input spinners */\ninput[type='number']::-webkit-inner-spin-button,\ninput[type='number']::-webkit-outer-spin-button {\n\t-webkit-appearance: none;\n\tappearance: none;\n\t@apply m-0;\n}\n\ninput[type='number'] {\n\t-moz-appearance: textfield;\n\tappearance: textfield;\n}\n\n/* Autofill styling */\n@keyframes onAutoFillStart {\n\tfrom {}\n\tto {}\n}\n\ninput:-webkit-autofill {\n\tanimation-name: onAutoFillStart;\n\t/* Use box-shadow trick to override autofill background */\n\t-webkit-box-shadow: 0 0 0 30px var(--schmancy-sys-color-surface-highest) inset !important;\n\t-webkit-text-fill-color: var(--schmancy-sys-color-surface-on) !important;\n}\n\n/* Simplified autofill for all browsers */\ninput:autofill {\n\tbackground-color: var(--schmancy-sys-color-surface-highest) !important;\n\tcolor: var(--schmancy-sys-color-surface-on) !important;\n}\n\n/* Date and datetime inputs need special handling */\ninput[type=\"date\"],\ninput[type=\"datetime-local\"],\ninput[type=\"time\"],\ninput[type=\"month\"],\ninput[type=\"week\"] {\n\t/* Ensure consistent height and padding */\n\t@apply block w-full rounded-[8px];\n\t/* Reset WebKit styling */\n\t-webkit-appearance: none;\n\tappearance: none;\n\t/* Ensure text doesn't get cut off */\n\tline-height: inherit;\n\t/* Force full width on mobile */\n\twidth: 100% !important;\n\tmin-width: 100%;\n\tmax-width: 100%;\n\t/* Remove any default margins */\n\tmargin: 0;\n\t/* Force border radius */\n\tborder-radius: 8px !important;\n\toverflow: hidden;\n}\n\n/* WebKit date/time edit container - this is what needs centering */\ninput::-webkit-datetime-edit,\ninput::-webkit-datetime-edit-fields-wrapper {\n\t/* Center the date/time fields vertically */\n\tdisplay: flex;\n\talign-items: center;\n\theight: 100%;\n\t/* Ensure full width on mobile */\n\twidth: 100%;\n\tpadding: 0;\n\tmargin: 0;\n}\n\ninput::-webkit-datetime-edit {\n\t/* Ensure the edit container fills available space */\n\tflex: 1;\n\twidth: 100%;\n}\n\ninput::-webkit-datetime-edit-fields-wrapper {\n\t/* Make fields wrapper expand */\n\tflex: 1;\n\twidth: 100%;\n\tjustify-content: space-between;\n}\n\ninput::-webkit-datetime-edit-text {\n\t/* Ensure separators are also centered */\n\tdisplay: flex;\n\talign-items: center;\n}\n\n/* Individual date fields */\ninput::-webkit-datetime-edit-day-field,\ninput::-webkit-datetime-edit-month-field,\ninput::-webkit-datetime-edit-year-field,\ninput::-webkit-datetime-edit-hour-field,\ninput::-webkit-datetime-edit-minute-field,\ninput::-webkit-datetime-edit-second-field,\ninput::-webkit-datetime-edit-millisecond-field,\ninput::-webkit-datetime-edit-meridiem-field {\n\t/* Ensure fields don't shrink */\n\tflex-shrink: 0;\n\tpadding: 0 2px;\n}\n\n/* Safari date input calendar icon */\ninput[type=\"date\"]::-webkit-calendar-picker-indicator,\ninput[type=\"datetime-local\"]::-webkit-calendar-picker-indicator,\ninput[type=\"time\"]::-webkit-calendar-picker-indicator,\ninput[type=\"month\"]::-webkit-calendar-picker-indicator,\ninput[type=\"week\"]::-webkit-calendar-picker-indicator {\n\t/* Make the calendar icon more subtle */\n\topacity: 0.5;\n\tcursor: pointer;\n}\n\n/* Firefox date input styling */\n@-moz-document url-prefix() {\n\tinput[type=\"date\"],\n\tinput[type=\"datetime-local\"],\n\tinput[type=\"time\"] {\n\t\t/* Firefox needs explicit height */\n\t\tmin-height: inherit;\n\t}\n}\n\n/* iOS Safari specific fixes */\n@supports (-webkit-touch-callout: none) {\n\tinput[type=\"date\"],\n\tinput[type=\"datetime-local\"],\n\tinput[type=\"time\"],\n\tinput[type=\"month\"],\n\tinput[type=\"week\"] {\n\t\t/* iOS Safari needs explicit width */\n\t\twidth: -webkit-fill-available !important;\n\t\twidth: fill-available !important;\n\t\t/* Remove default iOS styling */\n\t\t-webkit-appearance: none;\n\t\tappearance: none;\n\t\tborder-radius: 0;\n\t\t/* Remove default padding that causes issues */\n\t\tpadding-left: 12px !important;\n\t\tpadding-right: 12px !important;\n\t}\n\t\n\t/* Target shadow DOM elements on iOS */\n\tinput::-webkit-datetime-edit {\n\t\t/* Force full width */\n\t\twidth: 100% !important;\n\t\tpadding-left: 0 !important;\n\t\tpadding-right: 0 !important;\n\t}\n\t\n\tinput::-webkit-datetime-edit-fields-wrapper {\n\t\t/* Ensure proper spacing on mobile */\n\t\twidth: 100% !important;\n\t\tpadding: 0 !important;\n\t\tmargin: 0 !important;\n\t}\n}\n","import { html, LitElement, nothing, PropertyValueMap } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { distinctUntilChanged, filter, fromEvent, map, takeUntil } from 'rxjs'\n\nimport { SchmancyFormField } from '@mixins/index'\n\n// Import styles\nimport style from './input.scss?inline'\n\n// If you want to be form-associated, define the type on `ElementInternals`.\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-input': SchmancyInput\n\t\t'sch-input': SchmancyInput\n\t}\n}\n\ntype EventDetails = {\n\tvalue: string\n}\n\n/**\n * Custom events the component may emit:\n * - 'input': on every keystroke\n * - 'change': on native blur/change\n * - 'enter': specifically when user presses Enter\n */\nexport type SchmancyInputInputEvent = CustomEvent<EventDetails>\nexport type SchmancyInputChangeEvent = CustomEvent<EventDetails>\nexport type SchmancyInputEnterEvent = CustomEvent<EventDetails>\n\n/**\n * Size variants for the input - M3 spec aligned.\n * - xxs: Ultra-compact (24dp) - for menu cards, compact UIs\n * - xs: Dense/compact (32dp) - M3 density -3\n * - sm: Default (40dp) - M3 density 0\n * - md: Standard (48dp) - M3 large\n * - lg: Extra large (56dp) - M3 extra large\n */\nexport type InputSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg'\n\n/**\n * Enhanced version of the SchmancyInput component with improved form integration\n * and compatibility with legacy API.\n *\n * This component uses the native form association API and maintains parity with\n * native input behaviors while providing a stylish, accessible interface.\n *\n * @prop {string} name - Name attribute for form submission (inherited from FormFieldMixin)\n * @prop {string} label - Label text for the form field (inherited from FormFieldMixin)\n * @prop {boolean} required - Whether the field is required (inherited from FormFieldMixin)\n * @prop {boolean} disabled - Whether the field is disabled (inherited from FormFieldMixin)\n * @prop {boolean} readonly - Whether the field is read-only (inherited from FormFieldMixin)\n * @prop {boolean} error - Whether the field is in an error state (inherited from FormFieldMixin)\n * @prop {string} validationMessage - The validation message to display (inherited from FormFieldMixin)\n * @prop {string} hint - Optional hint text to display below the field (inherited from FormFieldMixin)\n */\n@customElement('schmancy-input')\nexport default class SchmancyInput extends SchmancyFormField(style) {\n\t// ----------------------------\n\t// A) Public properties\n\t// ----------------------------\n\n\t/** Auto-incrementing counter for generating unique IDs */\n\tstatic _idCounter = 0\n\n\t/** Override value to be string only for input element */\n\t@property({ type: String, reflect: true })\n\tpublic override value = ''\n\n\n\t/**\n\t * The type of input. (e.g. 'text', 'password', 'email', etc.)\n\t */\n\t@property({ reflect: true })\n\tpublic type: HTMLInputElement['type'] = 'text'\n\n\n\t@property()\n\tpublic placeholder = ''\n\n\n\t/** Pattern validation attribute. */\n\t@property({ type: String, reflect: true })\n\tpublic pattern?: string\n\n\n\t/** If true, we visually show a pointer cursor even if readOnly. */\n\t@property({ type: Boolean, reflect: true }) public clickable = false\n\n\t/** Whether browser spellcheck is enabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic spellcheck = false\n\n\t/**\n\t * Text alignment within the input.\n\t * - 'left' | 'center' | 'right'\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic align: 'left' | 'center' | 'right' = 'left'\n\n\t/** inputmode attribute (affects on-screen keyboards in mobile). */\n\t@property()\n\tpublic inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'\n\n\t@property({ type: Number, reflect: true })\n\tpublic minlength?: number\n\n\t@property({ type: Number })\n\tpublic maxlength?: number\n\n\t@property()\n\tpublic min?: string\n\n\t@property()\n\tpublic max?: string\n\n\t@property({ reflect: true })\n\tpublic step?: string = 'any'\n\n\t/** If true, auto-focus this input on first render. */\n\t@property({ type: Boolean })\n\tpublic autofocus = false\n\n\t/** Autocomplete/autofill hints. */\n\t@property({ type: String, reflect: true })\n\tpublic autocomplete: AutoFill = 'on'\n\n\t/**\n\t * tabIndex for focusing by tab key. Typically 0 or -1.\n\t */\n\t@property({ type: Number, reflect: true })\n\tpublic override tabIndex = 0\n\n\n\t/**\n\t * The size of the input.\n\t * - 'xxs': Ultra-compact size (24px) - for menu cards\n\t * - 'xs': Extra small, very compact size (32px)\n\t * - 'sm': Small, compact size (40px)\n\t * - 'md': Medium size (default) (48px)\n\t * - 'lg': Large size (56px)\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic size: InputSize = 'md'\n\n\t/**\n\t * Controls when validation should show.\n\t * - 'always' - Always show validation\n\t * - 'touched' - Only show after field has been focused and then blurred\n\t * - 'dirty' - Only show after value has changed\n\t * - 'submitted' - Only show after form submission\n\t */\n\t@property({ type: String })\n\tpublic validateOn: 'always' | 'touched' | 'dirty' | 'submitted' = 'touched'\n\n\t/**\n\t * For datalist support\n\t */\n\t@property({ type: String })\n\tpublic list?: string\n\n\n\t// ----------------------------\n\t// B) Queries & Refs\n\t// ----------------------------\n\t@query('input') private inputElement!: HTMLInputElement\n\tprivate inputRef = createRef<HTMLInputElement>()\n\n\t// ----------------------------\n\t// C) Internal States\n\t// ----------------------------\n\n\t/**\n\t * For integration with browser's autofill support\n\t */\n\t@state()\n\tprivate isAutofilled = false\n\n\t/**\n\t * Track user interaction state for validation\n\t */\n\t@state()\n\tprivate touched = false\n\n\t@state()\n\tprivate dirty = false\n\n\t@state()\n\tprivate submitted = false\n\n\t/**\n\t * Store the default value for reset behavior\n\t */\n\t@state()\n\tprivate defaultValue = ''\n\n\t// ----------------------------\n\t// D) Form-associated logic\n\t// ----------------------------\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tdelegatesFocus: true, // so focus() goes to <input>\n\t}\n\n\tprivate formResetObserver?: MutationObserver\n\n\t/**\n\t * If user did not provide an ID, auto-generate one so <label for=\"...\">\n\t * and various aria-* attributes can reference it.\n\t */\n\tprotected override willUpdate(changedProps: PropertyValueMap<any> | Map<PropertyKey, unknown>) {\n\t\tif (!this.id) {\n\t\t\tthis.id = `sch-input-${SchmancyInput._idCounter++}`\n\t\t}\n\t\tsuper.willUpdate(changedProps)\n\t}\n\n\n\tprotected override updated(changedProps: Map<string, unknown>) {\n\t\tsuper.updated(changedProps)\n\n\t\t// Handle value changes\n\t\tif (changedProps.has('value')) {\n\t\t\t// If value changes from original default, mark as dirty\n\t\t\tif (this.value !== this.defaultValue) {\n\t\t\t\tthis.dirty = true\n\t\t\t}\n\n\t\t\t// Update validation state when value changes\n\t\t\tthis.validateInput()\n\t\t}\n\n\t\t// Store default value if this is the first update\n\t\tif (!this.hasUpdated && changedProps.has('value')) {\n\t\t\tthis.defaultValue = this.value\n\t\t}\n\t}\n\n\t/**\n\t * Connect to the closest form element and set up form integration\n\t */\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Store initial default value for form reset\n\t\tthis.defaultValue = this.value\n\n\t\t// Set up form integration\n\t\tthis.setupFormIntegration()\n\n\t\t// Setup for external label association\n\t\tthis.setupExternalLabelAssociation()\n\t}\n\n\t/**\n\t * Set up form integration with ElementInternals\n\t */\n\tprivate setupFormIntegration() {\n\t\tif (this.form) {\n\t\t\t// Listen for form reset events\n\t\t\tthis.formResetObserver = new MutationObserver(mutations => {\n\t\t\t\tfor (const mutation of mutations) {\n\t\t\t\t\tif (mutation.type === 'attributes' && mutation.attributeName === 'reset') {\n\t\t\t\t\t\tthis.resetToDefault()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// Observe the form for reset events\n\t\t\tthis.formResetObserver.observe(this.form, {\n\t\t\t\tattributes: true,\n\t\t\t\tchildList: false,\n\t\t\t\tsubtree: false,\n\t\t\t})\n\n\t\t\t// Use RxJS for form reset events\n\t\t\tfromEvent(this.form, 'reset')\n\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t.subscribe(() => {\n\t\t\t\t\tthis.resetToDefault()\n\t\t\t\t})\n\n\t\t\t// Use RxJS for form submit events to mark field as submitted\n\t\t\tfromEvent(this.form, 'submit')\n\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t.subscribe(() => {\n\t\t\t\t\tthis.submitted = true\n\t\t\t\t\t// Validate on form submission\n\t\t\t\t\tthis.validateInput(true)\n\t\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Set up external label association for native HTML label support\n\t */\n\tprivate setupExternalLabelAssociation() {\n\t\tif (this.id) {\n\t\t\tconst setupLabelClickListener = () => {\n\t\t\t\tconst labels = document.querySelectorAll(`label[for=\"${this.id}\"]`)\n\t\t\t\tlabels.forEach(label => {\n\t\t\t\t\t// Use RxJS for label click events\n\t\t\t\t\tfromEvent(label, 'click')\n\t\t\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t\t\t.subscribe(() => {\n\t\t\t\t\t\t\tthis.focus()\n\t\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// Initialize after DOM is ready\n\t\t\tif (document.readyState === 'complete') {\n\t\t\t\tsetupLabelClickListener()\n\t\t\t} else {\n\t\t\t\t// Use RxJS for DOMContentLoaded event\n\t\t\t\tfromEvent(document, 'DOMContentLoaded')\n\t\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t\t.subscribe(setupLabelClickListener)\n\t\t\t}\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\n\t\t// Clean up the form observer\n\t\tif (this.formResetObserver) {\n\t\t\tthis.formResetObserver.disconnect()\n\t\t}\n\n\t\t// Note: RxJS subscriptions are automatically cleaned up via takeUntil(this.disconnecting)\n\t\t// No manual removeEventListener calls needed for RxJS-managed events\n\t}\n\n\t/**\n\t * Reset the input to its default state\n\t */\n\tprivate resetToDefault() {\n\t\tthis.value = this.defaultValue\n\t\tthis.touched = false\n\t\tthis.dirty = false\n\t\tthis.submitted = false\n\t\tthis.error = false\n\t\tthis.validationMessage = ''\n\t\tthis.dispatchEvent(new CustomEvent('reset', { bubbles: true }))\n\t}\n\n\t/**\n\t * Determines if validation errors should be shown based on current state\n\t * and validation strategy\n\t */\n\tprivate shouldShowValidation(forceValidation = false): boolean {\n\t\tif (forceValidation) return true\n\n\t\tswitch (this.validateOn) {\n\t\t\tcase 'always':\n\t\t\t\treturn true\n\t\t\tcase 'touched':\n\t\t\t\treturn this.touched\n\t\t\tcase 'dirty':\n\t\t\t\treturn this.dirty\n\t\t\tcase 'submitted':\n\t\t\t\treturn this.submitted\n\t\t\tdefault:\n\t\t\t\treturn this.touched\n\t\t}\n\t}\n\n\n\t/**\n\t * Validate input based on required, pattern, etc.\n\t * This mimics native validation behavior\n\t */\n\tprivate validateInput(forceValidation = false) {\n\t\t// Skip validation for disabled inputs\n\t\tif (this.disabled) return\n\n\t\t// Only show validation errors if we should based on the validation strategy\n\t\tconst shouldValidate = this.shouldShowValidation(forceValidation)\n\n\t\t// Get validity state from internal input if available\n\t\tconst validity: ValidityState = this.inputElement?.validity ?? {\n\t\t\tbadInput: false,\n\t\t\tcustomError: false,\n\t\t\tpatternMismatch: false,\n\t\t\trangeOverflow: false,\n\t\t\trangeUnderflow: false,\n\t\t\tstepMismatch: false,\n\t\t\ttooLong: false,\n\t\t\ttooShort: false,\n\t\t\ttypeMismatch: false,\n\t\t\tvalid: true,\n\t\t\tvalueMissing: false,\n\t\t}\n\n\t\t// Check if the input has an actual validation error (not a custom error)\n\t\tconst hasError = !validity.valid && !validity.customError\n\n\t\tif (shouldValidate && hasError) {\n\t\t\t// There's an error and we should show it\n\t\t\tthis.error = true\n\t\t\tthis.validationMessage = this.inputElement?.validationMessage || ''\n\t\t} else if (validity.valid) {\n\t\t\t// Input is valid, so clear the error state\n\t\t\tthis.error = false\n\n\t\t\t// Only clear validation message if there's no custom error\n\t\t\tif (!validity.customError) {\n\t\t\t\tthis.validationMessage = ''\n\t\t\t}\n\t\t} else if (!shouldValidate) {\n\t\t\t// We shouldn't show validation yet, so clear visual error state\n\t\t\tthis.error = false\n\t\t}\n\n\t\t// The mixin will handle updating internals based on error state\n\t}\n\n\t/**\n\t * Check validity without showing validation UI\n\t */\n\tpublic override checkValidity() {\n\t\t// Check internal input first\n\t\tconst inputValid = this.inputRef.value?.checkValidity() ?? true\n\n\t\t// Call parent implementation for basic validation\n\t\tconst parentValid = super.checkValidity()\n\n\t\treturn inputValid && parentValid\n\t}\n\n\t/**\n\t * Show validation UI and check validity\n\t */\n\tpublic override reportValidity() {\n\t\t// Mark as touched and submitted to show validation\n\t\tthis.touched = true\n\t\tthis.submitted = true\n\n\t\t// First check using native input\n\t\tconst inputValid = this.inputRef.value?.reportValidity() ?? true\n\n\t\t// Update our component's validation state with force=true\n\t\tthis.validateInput(true)\n\n\t\t// Call parent implementation\n\t\tconst parentValid = super.reportValidity()\n\n\t\treturn inputValid && parentValid\n\t}\n\n\t/**\n\t * Set a custom validation error message\n\t */\n\tpublic override setCustomValidity(message: string) {\n\t\t// Set on the native input\n\t\tif (this.inputRef.value) {\n\t\t\tthis.inputRef.value.setCustomValidity(message)\n\t\t}\n\n\t\t// Call parent implementation\n\t\tsuper.setCustomValidity(message)\n\t\t\n\t\t// Update error state based on validation strategy\n\t\tthis.error = message !== '' && this.shouldShowValidation()\n\t}\n\n\t// ----------------------------\n\t// E) Lifecycle Hooks & Event Handlers\n\t// ----------------------------\n\tfirstUpdated() {\n\t\t// Autofocus if desired\n\t\tif (this.autofocus) {\n\t\t\t// Use setTimeout to match browser behavior - autofocus happens after initial rendering\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.focus()\n\t\t\t}, 0)\n\t\t}\n\n\t\t// Subscribe to input events\n\t\tthis.setupInputEvents()\n\t\tthis.setupFocusBlurEvents()\n\t\tthis.setupAutofillDetection()\n\t\tthis.setupEnterKeyEvents()\n\t}\n\n\t/**\n\t * Set up input event handling for value changes\n\t */\n\tprivate setupInputEvents() {\n\t\tfromEvent<InputEvent>(this.inputElement, 'input')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => {\n\t\t\t\t\t// Stop native event from bubbling - we'll dispatch our own custom event\n\t\t\t\t\tev.stopPropagation()\n\n\t\t\t\t\t// Capture all input event properties for complete event forwarding\n\t\t\t\t\tconst inputEvent = ev as InputEvent\n\t\t\t\t\tconst target = ev.target as HTMLInputElement\n\t\t\t\t\treturn {\n\t\t\t\t\t\tvalue: target.value,\n\t\t\t\t\t\tinputType: inputEvent.inputType,\n\t\t\t\t\t\tdata: inputEvent.data,\n\t\t\t\t\t\tisComposing: inputEvent.isComposing,\n\t\t\t\t\t\toriginalEvent: ev,\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(eventData => {\n\t\t\t\t// Update component value\n\t\t\t\tthis.value = eventData.value\n\n\t\t\t\t// Mark as dirty when user types\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Fire custom 'input' event with extended details\n\t\t\t\tconst customEvent = new CustomEvent<EventDetails>('input', {\n\t\t\t\t\tdetail: { value: eventData.value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\n\t\t\t\t// Add additional properties to match native events more closely\n\t\t\t\tObject.defineProperties(customEvent, {\n\t\t\t\t\tinputType: { value: eventData.inputType },\n\t\t\t\t\tdata: { value: eventData.data },\n\t\t\t\t\tisComposing: { value: eventData.isComposing },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(customEvent)\n\n\t\t\t\t// Run validation like native inputs do on input, but respect the validation strategy\n\t\t\t\tthis.validateInput()\n\t\t\t})\n\n\t\t// Subscribe to native change events (usually on blur)\n\t\tfromEvent<Event>(this.inputElement, 'change')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => {\n\t\t\t\t\t// Stop native event from bubbling - we'll dispatch our own custom event\n\t\t\t\t\tev.stopPropagation()\n\t\t\t\t\treturn (ev.target as HTMLInputElement).value\n\t\t\t\t}),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(value => {\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Fire regular change event using mixin helper\n\t\t\t\tthis.emitChange({ value })\n\n\t\t\t\t// Run validation on change like native inputs\n\t\t\t\tthis.validateInput()\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up focus/blur event handling\n\t */\n\tprivate setupFocusBlurEvents() {\n\t\tfromEvent<FocusEvent>(this.inputElement, 'focus')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(ev => {\n\t\t\t\t// Create a custom focus event that includes standard props\n\t\t\t\tconst focusEvent = new CustomEvent('focus', {\n\t\t\t\t\tbubbles: ev.bubbles,\n\t\t\t\t\tcancelable: ev.cancelable,\n\t\t\t\t\tcomposed: ev.composed,\n\t\t\t\t})\n\n\t\t\t\t// Add focus-specific properties\n\t\t\t\tObject.defineProperties(focusEvent, {\n\t\t\t\t\trelatedTarget: { value: ev.relatedTarget },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(focusEvent)\n\t\t\t})\n\n\t\tfromEvent<FocusEvent>(this.inputElement, 'blur')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(ev => {\n\t\t\t\t// Mark as touched when field loses focus\n\t\t\t\tthis.touched = true\n\n\t\t\t\t// Run validation on blur like native inputs, respecting validation strategy\n\t\t\t\tif (!this.disabled) {\n\t\t\t\t\tthis.validateInput()\n\t\t\t\t}\n\n\t\t\t\t// Create a custom blur event that includes standard props\n\t\t\t\tconst blurEvent = new CustomEvent('blur', {\n\t\t\t\t\tbubbles: ev.bubbles,\n\t\t\t\t\tcancelable: ev.cancelable,\n\t\t\t\t\tcomposed: ev.composed,\n\t\t\t\t})\n\n\t\t\t\t// Add blur-specific properties\n\t\t\t\tObject.defineProperties(blurEvent, {\n\t\t\t\t\trelatedTarget: { value: ev.relatedTarget },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(blurEvent)\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up autofill detection\n\t */\n\tprivate setupAutofillDetection() {\n\t\t// Detect autofill animation (Chrome, etc.)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillStart'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.isAutofilled = true\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Dispatch autofill event for integration with autofill systems\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('autofill', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\n\t\t\t\t// Also propagate as a change event like browsers do\n\t\t\t\tthis.emitChange({ value })\n\t\t\t})\n\n\t\t// Detect end of autofill (Chrome)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillCancel'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.isAutofilled = false\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up enter key event handling\n\t */\n\tprivate setupEnterKeyEvents() {\n\t\t// Listen for Enter on keydown\n\t\tfromEvent<KeyboardEvent>(this.inputElement, 'keydown')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.key === 'Enter'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\t\n\t\t\t\t// Update value if changed\n\t\t\t\tif (this.value !== value) {\n\t\t\t\t\tthis.value = value\n\t\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Blur the input to trigger change event naturally\n\t\t\t\t// This mimics what happens when you tab out of the field\n\t\t\t\tthis.inputElement.blur()\n\n\t\t\t\t// Dispatch enhanced enter event\n\t\t\t\tconst enterEvent = new CustomEvent<EventDetails>('enter', {\n\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\n\t\t\t\t// Add extra keyboard event props\n\t\t\t\tObject.defineProperties(enterEvent, {\n\t\t\t\t\tkey: { value: 'Enter' },\n\t\t\t\t\tcode: { value: 'Enter' },\n\t\t\t\t\tkeyCode: { value: 13 },\n\t\t\t\t\twhich: { value: 13 },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(enterEvent)\n\t\t\t})\n\t}\n\n\t// ----------------------------\n\t// F) Utility Methods\n\t// ----------------------------\n\t/** Selects all text within the input. */\n\tpublic select() {\n\t\treturn this.inputRef.value?.select()\n\t}\n\n\t/** Returns the native validity state of the inner <input>. */\n\tpublic getValidity(): ValidityState | undefined {\n\t\treturn this.inputRef.value?.validity\n\t}\n\n\t/**\n\t * Sets the selection range. Mirrors native input.setSelectionRange\n\t */\n\tpublic setSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none') {\n\t\tthis.inputRef.value?.setSelectionRange(start, end, direction)\n\t}\n\n\t/**\n\t * Returns the selected text within the input (start position)\n\t */\n\tpublic get selectionStart(): number | null {\n\t\treturn this.inputRef.value?.selectionStart ?? null\n\t}\n\n\t/**\n\t * Returns the selected text within the input (end position)\n\t */\n\tpublic get selectionEnd(): number | null {\n\t\treturn this.inputRef.value?.selectionEnd ?? null\n\t}\n\n\t/**\n\t * Returns the direction of selection\n\t */\n\tpublic get selectionDirection(): 'forward' | 'backward' | 'none' | null {\n\t\treturn this.inputRef.value?.selectionDirection ?? null\n\t}\n\n\t/**\n\t * Sets the range of text to be selected.\n\t */\n\tpublic setRangeText(\n\t\treplacement: string,\n\t\tstart?: number,\n\t\tend?: number,\n\t\tselectMode?: 'select' | 'start' | 'end' | 'preserve',\n\t) {\n\t\tif (start !== undefined && end !== undefined) {\n\t\t\tthis.inputRef.value?.setRangeText(replacement, start, end, selectMode)\n\t\t} else {\n\t\t\tthis.inputRef.value?.setRangeText(replacement)\n\t\t}\n\t}\n\n\t/**\n\t * Override to forward focus to the internal <input>.\n\t * Also dispatch a 'focus' event for external listeners.\n\t */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.inputRef.value?.focus(options)\n\t\tthis.dispatchEvent(new Event('focus'))\n\t}\n\n\t/**\n\t * Override to forward clicks to the internal <input>.\n\t * Also dispatch a 'click' event for external listeners.\n\t */\n\tpublic override click() {\n\t\tthis.inputRef.value?.click()\n\t\tthis.dispatchEvent(new Event('click'))\n\t}\n\n\t/** Forward blur to the internal <input>. */\n\tpublic override blur() {\n\t\tthis.inputRef.value?.blur()\n\t\tthis.dispatchEvent(new Event('blur'))\n\t}\n\n\t// ----------------------------\n\t// G) Rendering\n\t// ----------------------------\n\tprotected override render() {\n\t\t// Determine height and padding based on size - M3 spec aligned\n\t\tconst getHeightAndPadding = () => {\n\t\t\tswitch (this.size) {\n\t\t\t\tcase 'xxs':\n\t\t\t\t\t// Ultra-compact: 24dp height\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '24px',\n\t\t\t\t\t\tpadding: '0 8px',\n\t\t\t\t\t\tfontSize: '0.625rem', // 10px\n\t\t\t\t\t}\n\t\t\t\tcase 'xs':\n\t\t\t\t\t// M3 dense: 32dp height\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '32px',\n\t\t\t\t\t\tpadding: '0 12px',\n\t\t\t\t\t\tfontSize: '0.75rem', // 12px\n\t\t\t\t\t}\n\t\t\t\tcase 'sm':\n\t\t\t\t\t// M3 default: 40dp height\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '40px',\n\t\t\t\t\t\tpadding: '0 16px',\n\t\t\t\t\t\tfontSize: '0.875rem', // 14px - M3 body-large\n\t\t\t\t\t}\n\t\t\t\tcase 'lg':\n\t\t\t\t\t// M3 extra large: 56dp height\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '56px',\n\t\t\t\t\t\tpadding: '0 20px',\n\t\t\t\t\t\tfontSize: '1rem', // 16px\n\t\t\t\t\t}\n\t\t\t\tcase 'md':\n\t\t\t\tdefault:\n\t\t\t\t\t// M3 standard: 48dp height\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '48px',\n\t\t\t\t\t\tpadding: '0 16px',\n\t\t\t\t\t\tfontSize: '0.875rem', // 14px - M3 body-large\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst { height, padding, fontSize } = getHeightAndPadding()\n\n\t\t// Check if it's a date-type input\n\t\tconst isDateType = ['date', 'datetime-local', 'time', 'month', 'week'].includes(this.type)\n\n\t\tconst inputClasses = {\n\t\t\t// Base styles - outlined rounded input\n\t\t\t'block w-full min-w-0 rounded-2xl border bg-surface-containerLowest text-surface-on': true,\n\t\t\t// Border color\n\t\t\t'border-outline': !this.error,\n\t\t\t'border-error-default': this.error,\n\t\t\t// Focus styles\n\t\t\t'outline-secondary-default focus:outline-1 focus:border-secondary-default': true,\n\t\t\t// Disabled styles\n\t\t\t'disabled:opacity-40 disabled:cursor-not-allowed': true,\n\t\t\t// Placeholder\n\t\t\t'placeholder:text-muted': true,\n\t\t\t// Ring styles (subtle focus ring)\n\t\t\t'ring-0 focus:ring-1 focus:ring-inset': true,\n\t\t\t// Ring colors based on error state\n\t\t\t'focus:ring-secondary-default': !this.error,\n\t\t\t'focus:ring-error-default': this.error,\n\t\t\t// Readonly styles\n\t\t\t'caret-transparent focus:outline-hidden cursor-pointer select-none': this.readonly,\n\t\t\t'cursor-pointer': this.clickable,\n\t\t\t// Text alignment (date inputs always left-aligned)\n\t\t\t'text-left': this.align === 'left' || isDateType,\n\t\t\t'text-center': this.align === 'center' && !isDateType,\n\t\t\t'text-right': this.align === 'right' && !isDateType,\n\t\t\t// Autofill\n\t\t\tautofilled: this.isAutofilled,\n\t\t}\n\n\t\tconst labelClasses = {\n\t\t\t'block mb-1 font-medium': true,\n\t\t\t'opacity-40': this.disabled,\n\t\t\t'text-[10px]': this.size === 'xxs',\n\t\t\t'text-xs': this.size === 'xs',\n\t\t\t'text-sm': this.size === 'sm',\n\t\t\t'text-base': this.size === 'md',\n\t\t\t'text-lg': this.size === 'lg',\n\t\t\t'text-primary-default': !this.error,\n\t\t\t'text-error-default': this.error,\n\t\t}\n\n\t\tconst styles = {\n\t\t\theight,\n\t\t\tpadding,\n\t\t\tfontSize,\n\t\t\t// Ensure vertical centering for all input types\n\t\t\tlineHeight: height,\n\t\t}\n\n\t\t/**\n\t\t * - If `this.label` is present, we render a proper `<label for=\"${this.id}\">`.\n\t\t * - If not, we add an aria-label to the <input> for better accessibility.\n\t\t * - If there's a `hint`, we reference it via aria-describedby.\n\t\t * - If there's an error, we set aria-invalid and could set aria-errormessage.\n\t\t */\n\t\treturn html`\n\t\t\t<div class=\"w-full min-w-0 ${isDateType ? 'date-input-container' : ''}\">\n\t\t\t\t${when(\n\t\t\t\t\tthis.label,\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tfor=${this.id}\n\t\t\t\t\t\t\tclass=${this.classMap(labelClasses)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t${this.label}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t`,\n\t\t\t\t)}\n\n\t\t\t\t<input\n\t\t\t\t\t${ref(this.inputRef)}\n\t\t\t\t\tid=${this.id}\n\t\t\t\t\tname=${this.name}\n\t\t\t\t\tclass=${this.classMap(inputClasses)}\n\t\t\t\t\tstyle=${this.styleMap(styles)}\n\t\t\t\t\t.value=${this.value}\n\t\t\t\t\t.type=${this.type}\n\t\t\t\t\t.autocomplete=${this.autocomplete}\n\t\t\t\t\t.spellcheck=${this.spellcheck}\n\t\t\t\t\tplaceholder=${this.placeholder}\n\t\t\t\t\tinputmode=${ifDefined(this.inputmode)}\n\t\t\t\t\tpattern=${ifDefined(this.pattern)}\n\t\t\t\t\t.step=${this.step ?? ''}\n\t\t\t\t\tminlength=${ifDefined(this.minlength)}\n\t\t\t\t\tmaxlength=${ifDefined(this.maxlength)}\n\t\t\t\t\tmin=${ifDefined(this.min)}\n\t\t\t\t\tmax=${ifDefined(this.max)}\n\t\t\t\t\tlist=${ifDefined(this.list)}\n\t\t\t\t\t?required=${this.required}\n\t\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t\t?readonly=${this.readonly}\n\t\t\t\t\taria-invalid=${this.error ? 'true' : 'false'}\n\t\t\t\t\taria-required=${this.required ? 'true' : 'false'}\n\t\t\t\t\taria-labelledby=${this.label ? `label-${this.id}` : nothing}\n\t\t\t\t\taria-describedby=${this.hint || this.validationMessage ? `hint-${this.id}` : nothing}\n\t\t\t\t\taria-label=${ifDefined(!this.label ? this.placeholder || 'Input' : undefined)}\n\t\t\t\t/>\n\n\t\t\t\t${when(\n\t\t\t\t\tthis.hint || (this.error && this.validationMessage),\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid=\"hint-${this.id}\"\n\t\t\t\t\t\t\tclass=\"mt-1 text-sm ${this.error ? 'text-error-default' : 'text-surface-onVariant'}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t${this.error && this.validationMessage ? this.validationMessage : this.hint}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t`,\n\t\t\t\t)}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\n/**\n * Register the component with the legacy tag name for backward compatibility\n * @prop {string} label - Label text for the form field (inherited from FormFieldMixin)\n * @prop {boolean} required - Whether the field is required (inherited from FormFieldMixin)\n * @prop {boolean} disabled - Whether the field is disabled (inherited from FormFieldMixin)\n * @prop {boolean} readonly - Whether the field is read-only (inherited from FormFieldMixin)\n * @prop {boolean} error - Whether the field is in an error state (inherited from FormFieldMixin)\n * @prop {string} validationMessage - The validation message to display (inherited from FormFieldMixin)\n * @prop {string} hint - Optional hint text to display below the field (inherited from FormFieldMixin)\n */\n@customElement('sch-input')\nexport class SchmancyInputCompat extends SchmancyInput {}\n"],"mappings":";;;;;;;;OC6De,IAAA,cAA4B,EAAA,iwIAAA,CAAA;CAAA;AAAA,MAAA;;CAAA,YAAA,GAAA,GAAA;AAAA,QAAA,GAAA,EAAA,EAAA,KAAA,QAUlB,IAAA,KAAA,OAOgB,QAAA,KAAA,cAInB,IAAA,KAAA,YAAA,CAS0C,GAAA,KAAA,aAAA,CAI3C,GAAA,KAAA,QAOwB,QAAA,KAAA,OAmBrB,OAAA,KAAA,YAAA,CAIJ,GAAA,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,EAAA,EAAA,EAAA,CAGP,GAAA,CAAA,EAAO,EAAA,WAAA,aAAA,KAAA,EAAA,EAAA,EAAA,CAMP,GAAA,CAAA,EAAO,EAAA,WAAA,gBAAA,KAAA,EAAA;AAAA,IAAA,IAAA,IAAA,IAAA,EAAA,CAzIR,EAAc,iBAAA,CAAA,EAAiB,EAAA,EA03BzB,IAAA,cAAkC,EAAA;AAAA,IAAA,EAAA,CADxC,EAAc,YAAA,CAAA,EAAY,EAAA;AAAA,SAAA,KAAA,GAAA,KAAA"}
|
package/dist/input-CwFslLcF.cjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-BIXF7xkF.cjs`),t=require(`./decorate-DpFmy0nm.cjs`);let n=require(`rxjs`),r=require(`lit/decorators.js`),i=require(`lit`),a=require(`lit/directives/if-defined.js`),o=require(`lit/directives/ref.js`),s=require(`lit/directives/when.js`);var c,l=class extends e.a(`/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
|
|
2
|
-
:host{width:100%;min-width:calc(var(--spacing,.25rem) * 0);box-sizing:border-box;max-width:100%;display:block}.date-input-container{width:100%;min-width:0;width:100%!important;max-width:100%!important}input{appearance:none;border-radius:8px;width:-webkit-fill-available;font-size:16px;transition:box-shadow .3s cubic-bezier(.34,1.56,.64,1),border-color .2s}input:focus{box-shadow:0 0 0 1px var(--schmancy-sys-color-secondary-default), 0 0 16px -4px var(--schmancy-sys-color-secondary-default)}@supports (color:color-mix(in lab, red, red)){input:focus{box-shadow:0 0 0 1px var(--schmancy-sys-color-secondary-default), 0 0 16px -4px color-mix(in srgb, var(--schmancy-sys-color-secondary-default) 20%, transparent)}}input[aria-invalid=true]{box-shadow:0 0 12px -4px var(--schmancy-sys-color-error-default)}@supports (color:color-mix(in lab, red, red)){input[aria-invalid=true]{box-shadow:0 0 12px -4px color-mix(in srgb, var(--schmancy-sys-color-error-default) 15%, transparent)}}input[aria-invalid=true]:focus{box-shadow:0 0 0 1px var(--schmancy-sys-color-error-default), 0 0 16px -4px var(--schmancy-sys-color-error-default)}@supports (color:color-mix(in lab, red, red)){input[aria-invalid=true]:focus{box-shadow:0 0 0 1px var(--schmancy-sys-color-error-default), 0 0 16px -4px color-mix(in srgb, var(--schmancy-sys-color-error-default) 25%, transparent)}}@media (prefers-reduced-motion:reduce){input{transition:none}}input[type=number]::-webkit-inner-spin-button{appearance:none;margin:calc(var(--spacing,.25rem) * 0)}input[type=number]::-webkit-outer-spin-button{appearance:none;margin:calc(var(--spacing,.25rem) * 0)}input[type=number]{appearance:textfield}input:-webkit-autofill{animation-name:onAutoFillStart;-webkit-box-shadow:0 0 0 30px var(--schmancy-sys-color-surface-highest) inset!important;-webkit-text-fill-color:var(--schmancy-sys-color-surface-on)!important}input:autofill{background-color:var(--schmancy-sys-color-surface-highest)!important;color:var(--schmancy-sys-color-surface-on)!important}input[type=date],input[type=datetime-local],input[type=time],input[type=month],input[type=week]{appearance:none;width:100%;line-height:inherit;border-radius:8px;min-width:100%;max-width:100%;margin:0;display:block;overflow:hidden;border-radius:8px!important;width:100%!important}input::-webkit-datetime-edit{align-items:center;width:100%;height:100%;margin:0;padding:0;display:flex}input::-webkit-datetime-edit-fields-wrapper{align-items:center;width:100%;height:100%;margin:0;padding:0;display:flex}input::-webkit-datetime-edit{flex:1;width:100%}input::-webkit-datetime-edit-fields-wrapper{flex:1;justify-content:space-between;width:100%}input::-webkit-datetime-edit-text{align-items:center;display:flex}input::-webkit-datetime-edit-day-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-month-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-year-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-hour-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-minute-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-second-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-millisecond-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-meridiem-field{flex-shrink:0;padding:0 2px}input[type=date]::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}input[type=datetime-local]::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}input[type=time]::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}input[type=month]::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}input[type=week]::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}@-moz-document url-prefix(){input[type=date],input[type=datetime-local],input[type=time]{min-height:inherit}}@supports (-webkit-touch-callout:none){input[type=date],input[type=datetime-local],input[type=time],input[type=month],input[type=week]{appearance:none;border-radius:0;width:-webkit-fill-available!important;width:fill-available!important;padding-left:12px!important;padding-right:12px!important}input::-webkit-datetime-edit{width:100%!important;padding-left:0!important;padding-right:0!important}input::-webkit-datetime-edit-fields-wrapper{width:100%!important;margin:0!important;padding:0!important}}`){static{c=this}constructor(...e){super(...e),this.value=``,this.type=`text`,this.placeholder=``,this.clickable=!1,this.spellcheck=!1,this.align=`left`,this.step=`any`,this.autofocus=!1,this.autocomplete=`on`,this.tabIndex=0,this.size=`md`,this.validateOn=`touched`,this.inputRef=(0,o.createRef)(),this.isAutofilled=!1,this.touched=!1,this.dirty=!1,this.submitted=!1,this.defaultValue=``}static{this._idCounter=0}static{this.shadowRootOptions={...i.LitElement.shadowRootOptions,delegatesFocus:!0}}willUpdate(e){this.id||=`sch-input-`+ c._idCounter++,super.willUpdate(e)}updated(e){super.updated(e),e.has(`value`)&&(this.value!==this.defaultValue&&(this.dirty=!0),this.validateInput()),!this.hasUpdated&&e.has(`value`)&&(this.defaultValue=this.value)}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.setupFormIntegration(),this.setupExternalLabelAssociation()}setupFormIntegration(){this.form&&(this.formResetObserver=new MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName===`reset`&&this.resetToDefault()}),this.formResetObserver.observe(this.form,{attributes:!0,childList:!1,subtree:!1}),(0,n.fromEvent)(this.form,`reset`).pipe((0,n.takeUntil)(this.disconnecting)).subscribe(()=>{this.resetToDefault()}),(0,n.fromEvent)(this.form,`submit`).pipe((0,n.takeUntil)(this.disconnecting)).subscribe(()=>{this.submitted=!0,this.validateInput(!0)}))}setupExternalLabelAssociation(){if(this.id){let e=()=>{document.querySelectorAll(`label[for="${this.id}"]`).forEach(e=>{(0,n.fromEvent)(e,`click`).pipe((0,n.takeUntil)(this.disconnecting)).subscribe(()=>{this.focus()})})};document.readyState===`complete`?e():(0,n.fromEvent)(document,`DOMContentLoaded`).pipe((0,n.takeUntil)(this.disconnecting)).subscribe(e)}}disconnectedCallback(){super.disconnectedCallback(),this.formResetObserver&&this.formResetObserver.disconnect()}resetToDefault(){this.value=this.defaultValue,this.touched=!1,this.dirty=!1,this.submitted=!1,this.error=!1,this.validationMessage=``,this.dispatchEvent(new CustomEvent(`reset`,{bubbles:!0}))}shouldShowValidation(e=!1){if(e)return!0;switch(this.validateOn){case`always`:return!0;case`touched`:default:return this.touched;case`dirty`:return this.dirty;case`submitted`:return this.submitted}}validateInput(e=!1){if(this.disabled)return;let t=this.shouldShowValidation(e),n=this.inputElement?.validity??{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},r=!n.valid&&!n.customError;t&&r?(this.error=!0,this.validationMessage=this.inputElement?.validationMessage||``):n.valid?(this.error=!1,n.customError||(this.validationMessage=``)):t||(this.error=!1)}checkValidity(){let e=this.inputRef.value?.checkValidity()??!0,t=super.checkValidity();return e&&t}reportValidity(){this.touched=!0,this.submitted=!0;let e=this.inputRef.value?.reportValidity()??!0;this.validateInput(!0);let t=super.reportValidity();return e&&t}setCustomValidity(e){this.inputRef.value&&this.inputRef.value.setCustomValidity(e),super.setCustomValidity(e),this.error=e!==``&&this.shouldShowValidation()}firstUpdated(){this.autofocus&&setTimeout(()=>{this.focus()},0),this.setupInputEvents(),this.setupFocusBlurEvents(),this.setupAutofillDetection(),this.setupEnterKeyEvents()}setupInputEvents(){(0,n.fromEvent)(this.inputElement,`input`).pipe((0,n.map)(e=>{e.stopPropagation();let t=e;return{value:e.target.value,inputType:t.inputType,data:t.data,isComposing:t.isComposing,originalEvent:e}}),(0,n.takeUntil)(this.disconnecting)).subscribe(e=>{this.value=e.value,this.dirty=this.value!==this.defaultValue;let t=new CustomEvent(`input`,{detail:{value:e.value},bubbles:!0,composed:!0});Object.defineProperties(t,{inputType:{value:e.inputType},data:{value:e.data},isComposing:{value:e.isComposing}}),this.dispatchEvent(t),this.validateInput()}),(0,n.fromEvent)(this.inputElement,`change`).pipe((0,n.map)(e=>(e.stopPropagation(),e.target.value)),(0,n.distinctUntilChanged)(),(0,n.takeUntil)(this.disconnecting)).subscribe(e=>{this.value=e,this.dirty=this.value!==this.defaultValue,this.emitChange({value:e}),this.validateInput()})}setupFocusBlurEvents(){(0,n.fromEvent)(this.inputElement,`focus`).pipe((0,n.takeUntil)(this.disconnecting)).subscribe(e=>{let t=new CustomEvent(`focus`,{bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed});Object.defineProperties(t,{relatedTarget:{value:e.relatedTarget}}),this.dispatchEvent(t)}),(0,n.fromEvent)(this.inputElement,`blur`).pipe((0,n.takeUntil)(this.disconnecting)).subscribe(e=>{this.touched=!0,this.disabled||this.validateInput();let t=new CustomEvent(`blur`,{bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed});Object.defineProperties(t,{relatedTarget:{value:e.relatedTarget}}),this.dispatchEvent(t)})}setupAutofillDetection(){(0,n.fromEvent)(this.inputElement,`animationstart`).pipe((0,n.filter)(e=>e.animationName===`onAutoFillStart`),(0,n.takeUntil)(this.disconnecting)).subscribe(e=>{let{value:t}=e.target;this.value=t,this.isAutofilled=!0,this.dirty=this.value!==this.defaultValue,this.dispatchEvent(new CustomEvent(`autofill`,{detail:{value:t},bubbles:!0,composed:!0})),this.emitChange({value:t})}),(0,n.fromEvent)(this.inputElement,`animationstart`).pipe((0,n.filter)(e=>e.animationName===`onAutoFillCancel`),(0,n.takeUntil)(this.disconnecting)).subscribe(()=>{this.isAutofilled=!1})}setupEnterKeyEvents(){(0,n.fromEvent)(this.inputElement,`keydown`).pipe((0,n.filter)(e=>e.key===`Enter`),(0,n.takeUntil)(this.disconnecting)).subscribe(e=>{let{value:t}=e.target;this.value!==t&&(this.value=t,this.dirty=this.value!==this.defaultValue),this.inputElement.blur();let n=new CustomEvent(`enter`,{detail:{value:this.value},bubbles:!0,composed:!0});Object.defineProperties(n,{key:{value:`Enter`},code:{value:`Enter`},keyCode:{value:13},which:{value:13}}),this.dispatchEvent(n)})}select(){return this.inputRef.value?.select()}getValidity(){return this.inputRef.value?.validity}setSelectionRange(e,t,n){this.inputRef.value?.setSelectionRange(e,t,n)}get selectionStart(){return this.inputRef.value?.selectionStart??null}get selectionEnd(){return this.inputRef.value?.selectionEnd??null}get selectionDirection(){return this.inputRef.value?.selectionDirection??null}setRangeText(e,t,n,r){t!==void 0&&n!==void 0?this.inputRef.value?.setRangeText(e,t,n,r):this.inputRef.value?.setRangeText(e)}focus(e){this.inputRef.value?.focus(e),this.dispatchEvent(new Event(`focus`))}click(){this.inputRef.value?.click(),this.dispatchEvent(new Event(`click`))}blur(){this.inputRef.value?.blur(),this.dispatchEvent(new Event(`blur`))}render(){let{height:e,padding:t,fontSize:n}=(()=>{switch(this.size){case`xxs`:return{height:`24px`,padding:`0 8px`,fontSize:`0.625rem`};case`xs`:return{height:`32px`,padding:`0 12px`,fontSize:`0.75rem`};case`sm`:return{height:`40px`,padding:`0 16px`,fontSize:`0.875rem`};case`lg`:return{height:`56px`,padding:`0 20px`,fontSize:`1rem`};default:return{height:`48px`,padding:`0 16px`,fontSize:`0.875rem`}}})(),r=[`date`,`datetime-local`,`time`,`month`,`week`].includes(this.type),c={"block w-full min-w-0 rounded-2xl border bg-surface-containerLowest text-surface-on":!0,"border-outline":!this.error,"border-error-default":this.error,"outline-secondary-default focus:outline-1 focus:border-secondary-default":!0,"disabled:opacity-40 disabled:cursor-not-allowed":!0,"placeholder:text-muted":!0,"ring-0 focus:ring-1 focus:ring-inset":!0,"focus:ring-secondary-default":!this.error,"focus:ring-error-default":this.error,"caret-transparent focus:outline-hidden cursor-pointer select-none":this.readonly,"cursor-pointer":this.clickable,"text-left":this.align===`left`||r,"text-center":this.align===`center`&&!r,"text-right":this.align===`right`&&!r,autofilled:this.isAutofilled},l={"block mb-1 font-medium":!0,"opacity-40":this.disabled,"text-[10px]":this.size===`xxs`,"text-xs":this.size===`xs`,"text-sm":this.size===`sm`,"text-base":this.size===`md`,"text-lg":this.size===`lg`,"text-primary-default":!this.error,"text-error-default":this.error},u={height:e,padding:t,fontSize:n,lineHeight:e};return i.html`
|
|
3
|
-
<div class="w-full min-w-0 ${r?`date-input-container`:``}">
|
|
4
|
-
${(0,s.when)(this.label,()=>i.html`
|
|
5
|
-
<label
|
|
6
|
-
for=${this.id}
|
|
7
|
-
class=${this.classMap(l)}
|
|
8
|
-
>
|
|
9
|
-
${this.label}
|
|
10
|
-
</label>
|
|
11
|
-
`)}
|
|
12
|
-
|
|
13
|
-
<input
|
|
14
|
-
${(0,o.ref)(this.inputRef)}
|
|
15
|
-
id=${this.id}
|
|
16
|
-
name=${this.name}
|
|
17
|
-
class=${this.classMap(c)}
|
|
18
|
-
style=${this.styleMap(u)}
|
|
19
|
-
.value=${this.value}
|
|
20
|
-
.type=${this.type}
|
|
21
|
-
.autocomplete=${this.autocomplete}
|
|
22
|
-
.spellcheck=${this.spellcheck}
|
|
23
|
-
placeholder=${this.placeholder}
|
|
24
|
-
inputmode=${(0,a.ifDefined)(this.inputmode)}
|
|
25
|
-
pattern=${(0,a.ifDefined)(this.pattern)}
|
|
26
|
-
.step=${this.step??``}
|
|
27
|
-
minlength=${(0,a.ifDefined)(this.minlength)}
|
|
28
|
-
maxlength=${(0,a.ifDefined)(this.maxlength)}
|
|
29
|
-
min=${(0,a.ifDefined)(this.min)}
|
|
30
|
-
max=${(0,a.ifDefined)(this.max)}
|
|
31
|
-
list=${(0,a.ifDefined)(this.list)}
|
|
32
|
-
?required=${this.required}
|
|
33
|
-
?disabled=${this.disabled}
|
|
34
|
-
?readonly=${this.readonly}
|
|
35
|
-
aria-invalid=${this.error?`true`:`false`}
|
|
36
|
-
aria-required=${this.required?`true`:`false`}
|
|
37
|
-
aria-labelledby=${this.label?`label-${this.id}`:i.nothing}
|
|
38
|
-
aria-describedby=${this.hint||this.validationMessage?`hint-${this.id}`:i.nothing}
|
|
39
|
-
aria-label=${(0,a.ifDefined)(this.label?void 0:this.placeholder||`Input`)}
|
|
40
|
-
/>
|
|
41
|
-
|
|
42
|
-
${(0,s.when)(this.hint||this.error&&this.validationMessage,()=>i.html`
|
|
43
|
-
<div
|
|
44
|
-
id="hint-${this.id}"
|
|
45
|
-
class="mt-1 text-sm ${this.error?`text-error-default`:`text-surface-onVariant`}"
|
|
46
|
-
>
|
|
47
|
-
${this.error&&this.validationMessage?this.validationMessage:this.hint}
|
|
48
|
-
</div>
|
|
49
|
-
`)}
|
|
50
|
-
</div>
|
|
51
|
-
`}};t.t([(0,r.property)({type:String,reflect:!0})],l.prototype,`value`,void 0),t.t([(0,r.property)({reflect:!0})],l.prototype,`type`,void 0),t.t([(0,r.property)()],l.prototype,`placeholder`,void 0),t.t([(0,r.property)({type:String,reflect:!0})],l.prototype,`pattern`,void 0),t.t([(0,r.property)({type:Boolean,reflect:!0})],l.prototype,`clickable`,void 0),t.t([(0,r.property)({type:Boolean,reflect:!0})],l.prototype,`spellcheck`,void 0),t.t([(0,r.property)({type:String,reflect:!0})],l.prototype,`align`,void 0),t.t([(0,r.property)()],l.prototype,`inputmode`,void 0),t.t([(0,r.property)({type:Number,reflect:!0})],l.prototype,`minlength`,void 0),t.t([(0,r.property)({type:Number})],l.prototype,`maxlength`,void 0),t.t([(0,r.property)()],l.prototype,`min`,void 0),t.t([(0,r.property)()],l.prototype,`max`,void 0),t.t([(0,r.property)({reflect:!0})],l.prototype,`step`,void 0),t.t([(0,r.property)({type:Boolean})],l.prototype,`autofocus`,void 0),t.t([(0,r.property)({type:String,reflect:!0})],l.prototype,`autocomplete`,void 0),t.t([(0,r.property)({type:Number,reflect:!0})],l.prototype,`tabIndex`,void 0),t.t([(0,r.property)({type:String,reflect:!0})],l.prototype,`size`,void 0),t.t([(0,r.property)({type:String})],l.prototype,`validateOn`,void 0),t.t([(0,r.property)({type:String})],l.prototype,`list`,void 0),t.t([(0,r.query)(`input`)],l.prototype,`inputElement`,void 0),t.t([(0,r.state)()],l.prototype,`isAutofilled`,void 0),t.t([(0,r.state)()],l.prototype,`touched`,void 0),t.t([(0,r.state)()],l.prototype,`dirty`,void 0),t.t([(0,r.state)()],l.prototype,`submitted`,void 0),t.t([(0,r.state)()],l.prototype,`defaultValue`,void 0);var u=l=c=t.t([(0,r.customElement)(`schmancy-input`)],l),d=class extends l{};d=t.t([(0,r.customElement)(`sch-input`)],d),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
|