@mhmo91/schmancy 0.5.12 → 0.5.14
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/dist/{animated-text-BsyQD4N6.js → animated-text-icbUBg1E.js} +3 -3
- package/dist/{animated-text-BsyQD4N6.js.map → animated-text-icbUBg1E.js.map} +1 -1
- package/dist/{animated-text-B5QaGxL8.cjs → animated-text-jtREuorF.cjs} +2 -2
- package/dist/{animated-text-B5QaGxL8.cjs.map → animated-text-jtREuorF.cjs.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-B580xCvP.js → area.component-BEyvt3QC.js} +3 -3
- package/dist/{area.component-B580xCvP.js.map → area.component-BEyvt3QC.js.map} +1 -1
- package/dist/{area.component-Y2lLafHN.cjs → area.component-CmLRuZnq.cjs} +2 -2
- package/dist/{area.component-Y2lLafHN.cjs.map → area.component-CmLRuZnq.cjs.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/autocomplete-DKAqszGP.cjs +112 -0
- package/dist/autocomplete-DKAqszGP.cjs.map +1 -0
- package/dist/autocomplete-D_GGoGWg.js +319 -0
- package/dist/autocomplete-D_GGoGWg.js.map +1 -0
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-C7ndhoPp.js → avatar-B7Bt-YJN.js} +54 -53
- package/dist/{avatar-C7ndhoPp.js.map → avatar-B7Bt-YJN.js.map} +1 -1
- package/dist/{avatar-CcLigUca.cjs → avatar-C3slTj0d.cjs} +2 -2
- package/dist/{avatar-CcLigUca.cjs.map → avatar-C3slTj0d.cjs.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-P1BU2cNy.cjs → boat-CwxgtvjS.cjs} +2 -2
- package/dist/{boat-P1BU2cNy.cjs.map → boat-CwxgtvjS.cjs.map} +1 -1
- package/dist/{boat-2PWSAJll.js → boat-DCT-dcG5.js} +2 -2
- package/dist/{boat-2PWSAJll.js.map → boat-DCT-dcG5.js.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +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.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-CDolsxpr.cjs → checkbox-Bn7gj0Zv.cjs} +2 -2
- package/dist/{checkbox-CDolsxpr.cjs.map → checkbox-Bn7gj0Zv.cjs.map} +1 -1
- package/dist/{checkbox-D-aomCFE.js → checkbox-DtJfIIRW.js} +2 -2
- package/dist/{checkbox-D-aomCFE.js.map → checkbox-DtJfIIRW.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +3 -2
- package/dist/chips.js.map +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-BRteyh_a.js → code-preview-DC9KAoBU.js} +2 -2
- package/dist/{code-preview-BRteyh_a.js.map → code-preview-DC9KAoBU.js.map} +1 -1
- package/dist/{code-preview-17LDNYAj.cjs → code-preview-cr28pSUT.cjs} +2 -2
- package/dist/{code-preview-17LDNYAj.cjs.map → code-preview-cr28pSUT.cjs.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-B0tRQX6V.cjs → date-range-CGbQuxCN.cjs} +2 -2
- package/dist/{date-range-B0tRQX6V.cjs.map → date-range-CGbQuxCN.cjs.map} +1 -1
- package/dist/{date-range-_jkZME8Q.js → date-range-CcBJ5oPy.js} +3 -3
- package/dist/{date-range-_jkZME8Q.js.map → date-range-CcBJ5oPy.js.map} +1 -1
- package/dist/{date-range-inline-CPjC3TLs.cjs → date-range-inline-VYP6Vwu4.cjs} +2 -2
- package/dist/{date-range-inline-CPjC3TLs.cjs.map → date-range-inline-VYP6Vwu4.cjs.map} +1 -1
- package/dist/{date-range-inline-BjEHA-mx.js → date-range-inline-jjcVBcOj.js} +3 -3
- package/dist/{date-range-inline-BjEHA-mx.js.map → date-range-inline-jjcVBcOj.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-AcnUnqh7.cjs → delay-C0n17NZX.cjs} +2 -2
- package/dist/{delay-AcnUnqh7.cjs.map → delay-C0n17NZX.cjs.map} +1 -1
- package/dist/{delay-OWD0d-2e.js → delay-C5uDZsJP.js} +2 -2
- package/dist/{delay-OWD0d-2e.js.map → delay-C5uDZsJP.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-BacTUeim.js → details-DHOnC7BX.js} +2 -2
- package/dist/{details-BacTUeim.js.map → details-DHOnC7BX.js.map} +1 -1
- package/dist/{details-BvRczwu8.cjs → details-jSrdzmdU.cjs} +2 -2
- package/dist/{details-BvRczwu8.cjs.map → details-jSrdzmdU.cjs.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-content-DChjUKDm.js → dialog-content-0VLuuNTa.js} +3 -3
- package/dist/{dialog-content-DChjUKDm.js.map → dialog-content-0VLuuNTa.js.map} +1 -1
- package/dist/{dialog-content-DDCW4nzj.cjs → dialog-content-DPpYiCly.cjs} +2 -2
- package/dist/{dialog-content-DDCW4nzj.cjs.map → dialog-content-DPpYiCly.cjs.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{divider-pVlwlgKf.js → divider-CFESjSiy.js} +3 -3
- package/dist/{divider-pVlwlgKf.js.map → divider-CFESjSiy.js.map} +1 -1
- package/dist/{divider-CWRTgIQ1.cjs → divider-DXL2K1vV.cjs} +2 -2
- package/dist/{divider-CWRTgIQ1.cjs.map → divider-DXL2K1vV.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-DbElZHAU.cjs → dropdown-content-6lxyKuGr.cjs} +2 -2
- package/dist/{dropdown-content-DbElZHAU.cjs.map → dropdown-content-6lxyKuGr.cjs.map} +1 -1
- package/dist/{dropdown-content-DYeZ6KJk.js → dropdown-content-CkaXHdzT.js} +3 -3
- package/dist/{dropdown-content-DYeZ6KJk.js.map → dropdown-content-CkaXHdzT.js.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-02HYpea4.js → email-recipients-BPzNL8l4.js} +5 -5
- package/dist/{email-recipients-02HYpea4.js.map → email-recipients-BPzNL8l4.js.map} +1 -1
- package/dist/{email-recipients-DaFmzOfp.cjs → email-recipients-F2vbh6L3.cjs} +2 -2
- package/dist/{email-recipients-DaFmzOfp.cjs.map → email-recipients-F2vbh6L3.cjs.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-CCqq8WLW.js → flex-Ddzbguaf.js} +2 -2
- package/dist/{flex-CCqq8WLW.js.map → flex-Ddzbguaf.js.map} +1 -1
- package/dist/{flex-fSrnbN_9.cjs → flex-_oJb1WUg.cjs} +2 -2
- package/dist/{flex-fSrnbN_9.cjs.map → flex-_oJb1WUg.cjs.map} +1 -1
- package/dist/{form-dm1vg00L.cjs → form-7glz2wjN.cjs} +2 -2
- package/dist/{form-dm1vg00L.cjs.map → form-7glz2wjN.cjs.map} +1 -1
- package/dist/{form-DthkgvVB.js → form-CDres_9l.js} +2 -2
- package/dist/{form-DthkgvVB.js.map → form-CDres_9l.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-m6ohIgoI.cjs → formField.mixin-BVGEu21E.cjs} +2 -2
- package/dist/{formField.mixin-m6ohIgoI.cjs.map → formField.mixin-BVGEu21E.cjs.map} +1 -1
- package/dist/{formField.mixin-BcSM8S0O.js → formField.mixin-DSWu1lN6.js} +2 -2
- package/dist/{formField.mixin-BcSM8S0O.js.map → formField.mixin-DSWu1lN6.js.map} +1 -1
- package/dist/{icon-ds6nBY4K.js → icon-15JkoENS.js} +2 -2
- package/dist/{icon-ds6nBY4K.js.map → icon-15JkoENS.js.map} +1 -1
- package/dist/{icon-A1Zx9yv9.cjs → icon-YfFuud4F.cjs} +2 -2
- package/dist/{icon-A1Zx9yv9.cjs.map → icon-YfFuud4F.cjs.map} +1 -1
- package/dist/{icon-button-Co6YjB0K.js → icon-button-BAcBicRW.js} +3 -3
- package/dist/{icon-button-Co6YjB0K.js.map → icon-button-BAcBicRW.js.map} +1 -1
- package/dist/{icon-button-CuupgLEV.cjs → icon-button-CZkVj5Gr.cjs} +2 -2
- package/dist/{icon-button-CuupgLEV.cjs.map → icon-button-CZkVj5Gr.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +186 -185
- package/dist/index.js.map +1 -1
- package/dist/{input-C6nkFZ0J.cjs → input-ClaO85hD.cjs} +2 -2
- package/dist/{input-C6nkFZ0J.cjs.map → input-ClaO85hD.cjs.map} +1 -1
- package/dist/{input-CelKeexC.js → input-Cphkeayy.js} +3 -3
- package/dist/{input-CelKeexC.js.map → input-Cphkeayy.js.map} +1 -1
- package/dist/input-chip-B_YxvaM_.js +206 -0
- package/dist/input-chip-B_YxvaM_.js.map +1 -0
- package/dist/input-chip-DH-ltFro.cjs +147 -0
- package/dist/input-chip-DH-ltFro.cjs.map +1 -0
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-C86nJOsl.js → list-B2OyjLBr.js} +2 -2
- package/dist/{list-C86nJOsl.js.map → list-B2OyjLBr.js.map} +1 -1
- package/dist/{list-IHwpVck4.cjs → list-CWVDZZtG.cjs} +2 -2
- package/dist/{list-IHwpVck4.cjs.map → list-CWVDZZtG.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-GWkzUR9Y.js → litElement.mixin-BLL01IwU.js} +2 -2
- package/dist/{litElement.mixin-GWkzUR9Y.js.map → litElement.mixin-BLL01IwU.js.map} +1 -1
- package/dist/{litElement.mixin-yCbfNohf.cjs → litElement.mixin-BPPLJYFS.cjs} +2 -2
- package/dist/{litElement.mixin-yCbfNohf.cjs.map → litElement.mixin-BPPLJYFS.cjs.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-DQ5ce9nz.js → map-B9ubt4mI.js} +2 -2
- package/dist/{map-DQ5ce9nz.js.map → map-B9ubt4mI.js.map} +1 -1
- package/dist/{map-DN51DFdu.cjs → map-D7VQl1ze.cjs} +2 -2
- package/dist/{map-DN51DFdu.cjs.map → map-D7VQl1ze.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-d3VnD6_v.cjs → media-BR9n5jGK.cjs} +2 -2
- package/dist/{media-d3VnD6_v.cjs.map → media-BR9n5jGK.cjs.map} +1 -1
- package/dist/{media-mcCarDCh.js → media-DO3qNgGt.js} +2 -2
- package/dist/{media-mcCarDCh.js.map → media-DO3qNgGt.js.map} +1 -1
- package/dist/{menu-C7jGvQWz.cjs → menu-CvJnK0-w.cjs} +2 -2
- package/dist/{menu-C7jGvQWz.cjs.map → menu-CvJnK0-w.cjs.map} +1 -1
- package/dist/{menu-BiWjzRcQ.js → menu-bsNzQplx.js} +3 -3
- package/dist/{menu-BiWjzRcQ.js.map → menu-bsNzQplx.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{navigation-rail-item-k966YTHO.cjs → navigation-rail-item-CIYl132t.cjs} +2 -2
- package/dist/{navigation-rail-item-k966YTHO.cjs.map → navigation-rail-item-CIYl132t.cjs.map} +1 -1
- package/dist/{navigation-rail-item-2wuRm2wl.js → navigation-rail-item-D0U9Bv8v.js} +2 -2
- package/dist/{navigation-rail-item-2wuRm2wl.js.map → navigation-rail-item-D0U9Bv8v.js.map} +1 -1
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-service-DkAfMw-v.js → notification-service-B6kTK9f8.js} +4 -4
- package/dist/{notification-service-DkAfMw-v.js.map → notification-service-B6kTK9f8.js.map} +1 -1
- package/dist/{notification-service-D3XQZkOg.cjs → notification-service-BqPCHzMk.cjs} +2 -2
- package/dist/{notification-service-D3XQZkOg.cjs.map → notification-service-BqPCHzMk.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +2 -2
- package/dist/{notify-BBva4qc1.cjs → notify-Chf1yM9w.cjs} +2 -2
- package/dist/{notify-BBva4qc1.cjs.map → notify-Chf1yM9w.cjs.map} +1 -1
- package/dist/{notify-DSEvb7Zy.js → notify-N2Lj3gOF.js} +2 -2
- package/dist/{notify-DSEvb7Zy.js.map → notify-N2Lj3gOF.js.map} +1 -1
- package/dist/{option-4VBpoxh8.js → option-BABnznfj.js} +2 -2
- package/dist/{option-4VBpoxh8.js.map → option-BABnznfj.js.map} +1 -1
- package/dist/{option-UnJeq8w5.cjs → option-CDgsl2TT.cjs} +2 -2
- package/dist/{option-UnJeq8w5.cjs.map → option-CDgsl2TT.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-yHhvCSzp.js → payment-card-form-BNSDRorv.js} +3 -3
- package/dist/{payment-card-form-yHhvCSzp.js.map → payment-card-form-BNSDRorv.js.map} +1 -1
- package/dist/{payment-card-form-BNDh76A6.cjs → payment-card-form-WXjitMHB.cjs} +2 -2
- package/dist/{payment-card-form-BNDh76A6.cjs.map → payment-card-form-WXjitMHB.cjs.map} +1 -1
- package/dist/{progress--zBKW6lh.js → progress-Beq4Xe-S.js} +2 -2
- package/dist/{progress--zBKW6lh.js.map → progress-Beq4Xe-S.js.map} +1 -1
- package/dist/{progress-CHiVbsav.cjs → progress-BtGtmBi7.cjs} +2 -2
- package/dist/{progress-CHiVbsav.cjs.map → progress-BtGtmBi7.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-button-DctI2QMg.js → radio-button-CG28a1LT.js} +3 -3
- package/dist/{radio-button-DctI2QMg.js.map → radio-button-CG28a1LT.js.map} +1 -1
- package/dist/{radio-button-DUx3hqS8.cjs → radio-button-CnakZrSO.cjs} +2 -2
- package/dist/{radio-button-DUx3hqS8.cjs.map → radio-button-CnakZrSO.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{schmancy-steps-container-DG_JYVmr.cjs → schmancy-steps-container-QpLJruIo.cjs} +2 -2
- package/dist/{schmancy-steps-container-DG_JYVmr.cjs.map → schmancy-steps-container-QpLJruIo.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-C0Cbrg07.js → schmancy-steps-container-yxr-LZNi.js} +2 -2
- package/dist/{schmancy-steps-container-C0Cbrg07.js.map → schmancy-steps-container-yxr-LZNi.js.map} +1 -1
- package/dist/{select-DFpxKCjD.cjs → select-CUZpdUCq.cjs} +2 -2
- package/dist/{select-DFpxKCjD.cjs.map → select-CUZpdUCq.cjs.map} +1 -1
- package/dist/{select-D7Na7bJk.js → select-CunC_ID-.js} +3 -3
- package/dist/{select-D7Na7bJk.js.map → select-CunC_ID-.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-ChDXaoVN.cjs → sheet-BGzaDFgr.cjs} +2 -2
- package/dist/{sheet-ChDXaoVN.cjs.map → sheet-BGzaDFgr.cjs.map} +1 -1
- package/dist/{sheet-C22lei2O.js → sheet-CXqDbncl.js} +3 -3
- package/dist/{sheet-C22lei2O.js.map → sheet-CXqDbncl.js.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-C6Li5MHC.js → slider-B5GSIVPR.js} +3 -3
- package/dist/{slider-C6Li5MHC.js.map → slider-B5GSIVPR.js.map} +1 -1
- package/dist/{slider-xELOc6Ws.cjs → slider-DxqYv6Jo.cjs} +2 -2
- package/dist/{slider-xELOc6Ws.cjs.map → slider-DxqYv6Jo.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-CFSIVLrg.js → spinner-CCWR7Sws.js} +2 -2
- package/dist/{spinner-CFSIVLrg.js.map → spinner-CCWR7Sws.js.map} +1 -1
- package/dist/{spinner-C-wQ6wUU.cjs → spinner-D7uCUzAl.cjs} +2 -2
- package/dist/{spinner-C-wQ6wUU.cjs.map → spinner-D7uCUzAl.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/suggestion-chip-CAqeh7fF.cjs +272 -0
- package/dist/suggestion-chip-CAqeh7fF.cjs.map +1 -0
- package/dist/suggestion-chip-D4Y6ptgj.js +473 -0
- package/dist/suggestion-chip-D4Y6ptgj.js.map +1 -0
- package/dist/{surface-Ce2U640-.cjs → surface-Bg3MJfBH.cjs} +2 -2
- package/dist/{surface-Ce2U640-.cjs.map → surface-Bg3MJfBH.cjs.map} +1 -1
- package/dist/{surface-DI8vxQvl.js → surface-DeVjYMUi.js} +2 -2
- package/dist/{surface-DI8vxQvl.js.map → surface-DeVjYMUi.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-DgOm1D_k.js → table-BiVCQGSJ.js} +2 -2
- package/dist/{table-DgOm1D_k.js.map → table-BiVCQGSJ.js.map} +1 -1
- package/dist/{table-2nMRHsXv.cjs → table-Di4QNxO_.cjs} +2 -2
- package/dist/{table-2nMRHsXv.cjs.map → table-Di4QNxO_.cjs.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-NEZy_F3K.js → tabs-compatibility-CFhrfzOl.js} +2 -2
- package/dist/{tabs-compatibility-NEZy_F3K.js.map → tabs-compatibility-CFhrfzOl.js.map} +1 -1
- package/dist/{tabs-compatibility-DCVwU0tQ.cjs → tabs-compatibility-CUxYgd3X.cjs} +2 -2
- package/dist/{tabs-compatibility-DCVwU0tQ.cjs.map → tabs-compatibility-CUxYgd3X.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-2ShBHr1a.cjs +2 -0
- package/dist/{tailwind.mixin-nOWQtiUE.cjs.map → tailwind.mixin-2ShBHr1a.cjs.map} +1 -1
- package/dist/tailwind.mixin-DmqqUtYJ.js +43 -0
- package/dist/{tailwind.mixin-BMDZASqc.js.map → tailwind.mixin-DmqqUtYJ.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-DV9V1KEi.js → textarea-DjrtJ52c.js} +2 -2
- package/dist/{textarea-DV9V1KEi.js.map → textarea-DjrtJ52c.js.map} +1 -1
- package/dist/{textarea-DuUpfMu8.cjs → textarea-Dx2YcySC.cjs} +2 -2
- package/dist/{textarea-DuUpfMu8.cjs.map → textarea-Dx2YcySC.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-A33a4Fmq.cjs → theme-button-CqDZ3vMy.cjs} +2 -2
- package/dist/{theme-button-A33a4Fmq.cjs.map → theme-button-CqDZ3vMy.cjs.map} +1 -1
- package/dist/{theme-button-DnFLVVqg.js → theme-button-DKmoCoVH.js} +2 -2
- package/dist/{theme-button-DnFLVVqg.js.map → theme-button-DKmoCoVH.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-BHPk05S5.cjs → theme.component-C_0JLG3S.cjs} +2 -2
- package/dist/{theme.component-BHPk05S5.cjs.map → theme.component-C_0JLG3S.cjs.map} +1 -1
- package/dist/{theme.component-BrNpK0al.js → theme.component-hIiPaNUS.js} +15 -15
- package/dist/{theme.component-BrNpK0al.js.map → theme.component-hIiPaNUS.js.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-IY32mohl.js → timezone-CzVsIZ6c.js} +3 -3
- package/dist/{timezone-IY32mohl.js.map → timezone-CzVsIZ6c.js.map} +1 -1
- package/dist/{timezone-C_3kyRa4.cjs → timezone-DjBtAkZd.cjs} +2 -2
- package/dist/{timezone-C_3kyRa4.cjs.map → timezone-DjBtAkZd.cjs.map} +1 -1
- package/dist/{tooltip-BDdltqjQ.js → tooltip-3OV6QZSa.js} +2 -2
- package/dist/{tooltip-BDdltqjQ.js.map → tooltip-3OV6QZSa.js.map} +1 -1
- package/dist/{tooltip-hSj5Uvoc.cjs → tooltip-BKjQtV4t.cjs} +2 -2
- package/dist/{tooltip-hSj5Uvoc.cjs.map → tooltip-BKjQtV4t.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-DuSL6oYC.js → tree-BQpIukc4.js} +2 -2
- package/dist/{tree-DuSL6oYC.js.map → tree-BQpIukc4.js.map} +1 -1
- package/dist/{tree-DUAUNYYD.cjs → tree-Dpaal-fG.cjs} +2 -2
- package/dist/{tree-DUAUNYYD.cjs.map → tree-Dpaal-fG.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-BcKV5Epx.cjs → typewriter-ArbAvRWd.cjs} +2 -2
- package/dist/{typewriter-BcKV5Epx.cjs.map → typewriter-ArbAvRWd.cjs.map} +1 -1
- package/dist/{typewriter-DvruhGd6.js → typewriter-DFXUT1BA.js} +7 -7
- package/dist/{typewriter-DvruhGd6.js.map → typewriter-DFXUT1BA.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-CdVGbw4n.js → typography-CgCy9ltt.js} +2 -2
- package/dist/{typography-CdVGbw4n.js.map → typography-CgCy9ltt.js.map} +1 -1
- package/dist/{typography-BobW25ix.cjs → typography-D2k5QYVM.cjs} +2 -2
- package/dist/{typography-BobW25ix.cjs.map → typography-D2k5QYVM.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/types/src/autocomplete/autocomplete.d.ts +6 -0
- package/types/src/chips/chips.d.ts +1 -1
- package/dist/autocomplete-BOlaOLHB.js +0 -241
- package/dist/autocomplete-BOlaOLHB.js.map +0 -1
- package/dist/autocomplete-D3ZKMdEM.cjs +0 -57
- package/dist/autocomplete-D3ZKMdEM.cjs.map +0 -1
- package/dist/suggestion-chip-B_nFmhAl.js +0 -661
- package/dist/suggestion-chip-B_nFmhAl.js.map +0 -1
- package/dist/suggestion-chip-C94Hdcm4.cjs +0 -408
- package/dist/suggestion-chip-C94Hdcm4.cjs.map +0 -1
- package/dist/tailwind.mixin-BMDZASqc.js +0 -43
- package/dist/tailwind.mixin-nOWQtiUE.cjs +0 -2
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { BehaviorSubject as _, Subject as w, fromEvent as x, combineLatest as S, timer as g, EMPTY as R, of as A } from "rxjs";
|
|
2
|
-
import { classMap as O } from "lit/directives/class-map.js";
|
|
3
|
-
import "lit/directives/style-map.js";
|
|
4
|
-
import { property as c, state as b, query as k, queryAssignedElements as T, customElement as j } from "lit/decorators.js";
|
|
5
|
-
import "./tailwind.mixin-BMDZASqc.js";
|
|
6
|
-
import { $ as M } from "./litElement.mixin-GWkzUR9Y.js";
|
|
7
|
-
import { html as V } from "lit";
|
|
8
|
-
import { createRef as q, ref as I } from "lit/directives/ref.js";
|
|
9
|
-
import { tap as h, takeUntil as d, distinctUntilChanged as C, debounceTime as P, withLatestFrom as $, take as f, filter as m, switchMap as E } from "rxjs/operators";
|
|
10
|
-
import { s as v } from "./search-6Hr7K1gh.js";
|
|
11
|
-
var B = Object.defineProperty, L = Object.getOwnPropertyDescriptor, a = (t, e, n, i) => {
|
|
12
|
-
for (var s, o = i > 1 ? void 0 : i ? L(e, n) : e, u = t.length - 1; u >= 0; u--) (s = t[u]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
13
|
-
return i && o && B(e, n, o), o;
|
|
14
|
-
};
|
|
15
|
-
let l = class extends M(":host{display:block;border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important}:host:focus{box-shadow:unset!important}@keyframes onAutoFillStart{}sch-input::part(input):-webkit-autofill,sch-input input:-webkit-autofill{animation-name:onAutoFillStart;animation-duration:1ms}") {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments), this.required = !1, this.placeholder = "", this.label = "", this.name = "", this.maxHeight = "300px", this.multi = !1, this.description = "", this.size = "md", this.autocomplete = "on", this.debounceMs = 200, this.similarityThreshold = 0.3, this._open = !1, this._inputValue = "", this._visibleOptionsCount = 0, this._hasResults = !0, this._inputElementRef = q(), this._selectedValue$ = new _(""), this._selectedValues$ = new _([]), this._inputValue$ = new _(""), this._open$ = new _(!1), this._options$ = new _([]), this._optionSelect$ = new w(), this._documentClick$ = new w();
|
|
18
|
-
}
|
|
19
|
-
get values() {
|
|
20
|
-
return [...this._selectedValues$.value];
|
|
21
|
-
}
|
|
22
|
-
set values(t) {
|
|
23
|
-
this._selectedValues$.next(Array.isArray(t) ? [...t] : []);
|
|
24
|
-
}
|
|
25
|
-
get value() {
|
|
26
|
-
return this.multi ? this._selectedValues$.value.join(",") : this._selectedValue$.value;
|
|
27
|
-
}
|
|
28
|
-
set value(t) {
|
|
29
|
-
this.multi ? this._selectedValues$.next(t ? t.split(",").map((e) => e.trim()).filter(Boolean) : []) : this._selectedValue$.next(t);
|
|
30
|
-
}
|
|
31
|
-
connectedCallback() {
|
|
32
|
-
super.connectedCallback(), this.id || (this.id = `sch-autocomplete-${Math.random().toString(36).slice(2, 9)}`), this._setupAutocompleteLogic(), this._setupDocumentClickHandler();
|
|
33
|
-
}
|
|
34
|
-
_setupAutocompleteLogic() {
|
|
35
|
-
this._options$.pipe(h((t) => {
|
|
36
|
-
t.forEach((e, n) => {
|
|
37
|
-
e.setAttribute("role", "option"), e.tabIndex = -1, e.id || (e.id = `${this.id}-option-${n}`), e.hasAttribute("data-event-bound") || (x(e, "pointerdown").pipe(h((i) => {
|
|
38
|
-
i.preventDefault(), i.stopPropagation();
|
|
39
|
-
}), d(this.disconnecting)).subscribe(() => this._optionSelect$.next(e)), e.setAttribute("data-event-bound", "true"));
|
|
40
|
-
});
|
|
41
|
-
}), d(this.disconnecting)).subscribe(), S([this._selectedValue$, this._selectedValues$, this._options$]).pipe(h(([t, e, n]) => {
|
|
42
|
-
n.forEach((i) => {
|
|
43
|
-
i.selected = this.multi ? e.includes(i.value) : i.value === t, i.setAttribute("aria-selected", String(i.selected));
|
|
44
|
-
});
|
|
45
|
-
}), d(this.disconnecting)).subscribe(), this._inputValue$.pipe(C(), P(this.debounceMs), $(this._options$, this._open$), h(([t, e, n]) => {
|
|
46
|
-
if (!n) return;
|
|
47
|
-
const i = t.trim();
|
|
48
|
-
if (i) {
|
|
49
|
-
const s = e.map((u) => {
|
|
50
|
-
const p = u.label || u.textContent || "", r = u.value, y = v(i, p), D = v(i, r);
|
|
51
|
-
return { option: u, score: Math.max(1.1 * y, D) };
|
|
52
|
-
});
|
|
53
|
-
s.sort((u, p) => p.score - u.score);
|
|
54
|
-
let o = 0;
|
|
55
|
-
s.forEach((u, p) => {
|
|
56
|
-
const { option: r, score: y } = u;
|
|
57
|
-
y < this.similarityThreshold ? r.hidden = !0 : (r.hidden = !1, o++, r.style.order = String(p));
|
|
58
|
-
}), this._visibleOptionsCount = o, this._hasResults = o > 0;
|
|
59
|
-
} else e.forEach((s) => {
|
|
60
|
-
s.hidden = !1, s.style.order = "0";
|
|
61
|
-
}), this._visibleOptionsCount = e.length, this._hasResults = !0;
|
|
62
|
-
this._announceToScreenReader(this._visibleOptionsCount > 0 ? `${this._visibleOptionsCount} option${this._visibleOptionsCount === 1 ? "" : "s"} available.` : "No results found.");
|
|
63
|
-
}), d(this.disconnecting)).subscribe(), this._optionSelect$.pipe($(this._selectedValue$, this._selectedValues$), h(([t, e, n]) => {
|
|
64
|
-
if (this.multi) {
|
|
65
|
-
const i = n.indexOf(t.value), s = i > -1 ? [...n.slice(0, i), ...n.slice(i + 1)] : [...n, t.value];
|
|
66
|
-
this._selectedValues$.next(s), this._inputValue$.next(""), this._inputValue = "";
|
|
67
|
-
const o = this._getSelectedLabels();
|
|
68
|
-
this._announceToScreenReader(o.length > 0 ? `Selected: ${o.join(", ")}` : "No options selected");
|
|
69
|
-
} else this._selectedValue$.next(t.value), this._open$.next(!1), this._open = !1, this._inputValue = t.label || t.textContent || "", this._inputValue$.next(this._inputValue), g(100).pipe(h(() => this._inputElementRef.value?.blur()), f(1)).subscribe(), this._announceToScreenReader(`Selected: ${t.label || t.textContent}`);
|
|
70
|
-
}), h(() => this._fireChangeEvent()), d(this.disconnecting)).subscribe(), S([this._open$, this._selectedValue$, this._selectedValues$, this._options$]).pipe(m(() => !this._open$.value), h(([, t, e, n]) => {
|
|
71
|
-
if (this.multi) {
|
|
72
|
-
const i = n.filter((s) => e.includes(s.value)).map((s) => s.label || s.textContent || "");
|
|
73
|
-
this._inputValue = i.join(", ");
|
|
74
|
-
} else {
|
|
75
|
-
const i = n.find((s) => s.value === t);
|
|
76
|
-
this._inputValue = i && (i.label || i.textContent) || "";
|
|
77
|
-
}
|
|
78
|
-
this._inputValue$.next(this._inputValue);
|
|
79
|
-
}), d(this.disconnecting)).subscribe(), this._open$.pipe(h((t) => this._open = t), d(this.disconnecting)).subscribe();
|
|
80
|
-
}
|
|
81
|
-
_setupDocumentClickHandler() {
|
|
82
|
-
this._documentClick$.pipe(m((t) => !t.composedPath().includes(this)), m((t) => !this._options.some((e) => t.composedPath().includes(e))), m(() => this._open), h(() => {
|
|
83
|
-
this._open$.next(!1), this._updateInputDisplay();
|
|
84
|
-
}), d(this.disconnecting)).subscribe(), this._open$.pipe(C(), E((t) => t ? g(10).pipe(E(() => x(document, "click").pipe(h((e) => this._documentClick$.next(e)), d(this._open$.pipe(m((e) => !e)))))) : R), d(this.disconnecting)).subscribe();
|
|
85
|
-
}
|
|
86
|
-
_updateInputDisplay() {
|
|
87
|
-
A(null).pipe($(this._selectedValue$, this._selectedValues$, this._options$, this._open$), h(([, t, e, n, i]) => {
|
|
88
|
-
if (this._inputElementRef.value && (!i || !this.multi)) {
|
|
89
|
-
if (this.multi) {
|
|
90
|
-
const s = n.filter((o) => e.includes(o.value)).map((o) => o.label || o.textContent || "");
|
|
91
|
-
this._inputValue = s.join(", ");
|
|
92
|
-
} else {
|
|
93
|
-
const s = n.find((o) => o.value === t);
|
|
94
|
-
this._inputValue = s && (s.label || s.textContent) || "";
|
|
95
|
-
}
|
|
96
|
-
this._inputValue$.next(this._inputValue), this._inputElementRef.value.value = this._inputValue;
|
|
97
|
-
}
|
|
98
|
-
}), f(1)).subscribe();
|
|
99
|
-
}
|
|
100
|
-
_getSelectedLabels() {
|
|
101
|
-
return this._options.filter((t) => this.multi ? this._selectedValues$.value.includes(t.value) : t.value === this._selectedValue$.value).map((t) => t.label || t.textContent || "");
|
|
102
|
-
}
|
|
103
|
-
_announceToScreenReader(t) {
|
|
104
|
-
const e = this.shadowRoot?.querySelector("#live-status");
|
|
105
|
-
e && (e.textContent = t);
|
|
106
|
-
}
|
|
107
|
-
_fireChangeEvent() {
|
|
108
|
-
const t = { value: this.value };
|
|
109
|
-
this.multi && (t.values = [...this._selectedValues$.value]), this.dispatchEvent(new CustomEvent("change", { detail: t, bubbles: !0, composed: !0 }));
|
|
110
|
-
}
|
|
111
|
-
checkValidity() {
|
|
112
|
-
return !this.required || (this.multi ? this._selectedValues$.value.length > 0 : !!this._selectedValue$.value);
|
|
113
|
-
}
|
|
114
|
-
reportValidity() {
|
|
115
|
-
return this._inputElementRef.value ? this._inputElementRef.value.reportValidity() : this.checkValidity();
|
|
116
|
-
}
|
|
117
|
-
firstUpdated() {
|
|
118
|
-
}
|
|
119
|
-
render() {
|
|
120
|
-
const t = `${this.id}-desc`;
|
|
121
|
-
return V`
|
|
122
|
-
<div class="relative">
|
|
123
|
-
<!-- Screen reader live region -->
|
|
124
|
-
<div id="live-status" role="status" aria-live="polite" class="sr-only"></div>
|
|
125
|
-
|
|
126
|
-
<!-- Description -->
|
|
127
|
-
${this.description ? V`<div id="${t}" class="sr-only">${this.description}</div>` : ""}
|
|
128
|
-
|
|
129
|
-
<!-- Input -->
|
|
130
|
-
<slot name="trigger">
|
|
131
|
-
<schmancy-input
|
|
132
|
-
.size=${this.size}
|
|
133
|
-
${I(this._inputElementRef)}
|
|
134
|
-
id="autocomplete-input"
|
|
135
|
-
class="w-full"
|
|
136
|
-
.name=${this.name || this.label?.toLowerCase().replace(/\s+/g, "-")}
|
|
137
|
-
.label=${this.label}
|
|
138
|
-
.placeholder=${this.placeholder}
|
|
139
|
-
.required=${this.required}
|
|
140
|
-
.value=${this._inputValue}
|
|
141
|
-
type="text"
|
|
142
|
-
autocomplete=${this.autocomplete}
|
|
143
|
-
clickable
|
|
144
|
-
role="combobox"
|
|
145
|
-
aria-autocomplete="list"
|
|
146
|
-
aria-haspopup="listbox"
|
|
147
|
-
aria-controls="options"
|
|
148
|
-
aria-expanded=${this._open}
|
|
149
|
-
aria-describedby=${this.description ? t : void 0}
|
|
150
|
-
@input=${(e) => {
|
|
151
|
-
const n = e.target.value;
|
|
152
|
-
this._inputValue = n, this._inputValue$.next(n);
|
|
153
|
-
}}
|
|
154
|
-
@focus=${(e) => {
|
|
155
|
-
e.stopPropagation();
|
|
156
|
-
const n = this.multi ? this._selectedValues$.value.length > 0 : !!this._selectedValue$.value;
|
|
157
|
-
this.multi && !n && (this._inputValue = "", this._inputValue$.next(""), this._inputElementRef.value && (this._inputElementRef.value.value = "")), this._open$.next(!0);
|
|
158
|
-
}}
|
|
159
|
-
@click=${(e) => {
|
|
160
|
-
e.stopPropagation(), this._open$.next(!0);
|
|
161
|
-
}}
|
|
162
|
-
@keydown=${(e) => {
|
|
163
|
-
this._handleKeyDown(e);
|
|
164
|
-
}}
|
|
165
|
-
@blur=${() => {
|
|
166
|
-
this._handleAutoSelectOnBlur();
|
|
167
|
-
}}
|
|
168
|
-
>
|
|
169
|
-
</schmancy-input>
|
|
170
|
-
</slot>
|
|
171
|
-
|
|
172
|
-
<!-- Options dropdown -->
|
|
173
|
-
<ul
|
|
174
|
-
id="options"
|
|
175
|
-
class=${O({ absolute: !0, "z-[1000]": !0, "mt-1": !0, "w-full": !0, "rounded-md": !0, "shadow-md": !0, "overflow-auto": !0, "min-w-full": !0, "bg-surface-low": !0, flex: !0, "flex-col": !0 })}
|
|
176
|
-
role="listbox"
|
|
177
|
-
aria-multiselectable=${this.multi ? "true" : "false"}
|
|
178
|
-
aria-label=${`${this.label || "Options"} dropdown`}
|
|
179
|
-
?hidden=${!this._open}
|
|
180
|
-
style="max-height: ${this.maxHeight}; display: ${this._open ? "flex" : "none"};"
|
|
181
|
-
@slotchange=${() => {
|
|
182
|
-
this._options$.next(this._options);
|
|
183
|
-
}}
|
|
184
|
-
>
|
|
185
|
-
<slot></slot>
|
|
186
|
-
${this._hasResults ? "" : V`
|
|
187
|
-
<li class="px-3 py-2 text-sm text-muted">No results found</li>
|
|
188
|
-
`}
|
|
189
|
-
</ul>
|
|
190
|
-
</div>
|
|
191
|
-
`;
|
|
192
|
-
}
|
|
193
|
-
_handleAutoSelectOnBlur() {
|
|
194
|
-
if (this.multi || !this._open || !this._inputValue.trim()) return;
|
|
195
|
-
const t = this._inputValue.trim();
|
|
196
|
-
let e = null, n = 0;
|
|
197
|
-
this._options.forEach((i) => {
|
|
198
|
-
if (i.hidden) return;
|
|
199
|
-
const s = i.label || i.textContent || "", o = i.value, u = v(t, s), p = v(t, o), r = Math.max(1.1 * u, p);
|
|
200
|
-
r > n && r >= this.similarityThreshold && (n = r, e = i);
|
|
201
|
-
}), e && (this._optionSelect$.next(e), this._open$.next(!1), this._open = !1);
|
|
202
|
-
}
|
|
203
|
-
_handleKeyDown(t) {
|
|
204
|
-
x(document, "keydown").pipe(f(1), $(this._open$, this._options$), h(([e, n, i]) => {
|
|
205
|
-
if (!n && (e.key === "ArrowDown" || e.key === "Enter")) return e.preventDefault(), this._open$.next(!0), void g(10).pipe(h(() => {
|
|
206
|
-
i.find((r) => !r.hidden)?.focus();
|
|
207
|
-
}), f(1)).subscribe();
|
|
208
|
-
if (!n) return;
|
|
209
|
-
const s = i.filter((p) => !p.hidden).sort((p, r) => parseInt(p.style.order || "0") - parseInt(r.style.order || "0")), o = s.find((p) => p === document.activeElement), u = o ? s.indexOf(o) : -1;
|
|
210
|
-
switch (e.key) {
|
|
211
|
-
case "Escape":
|
|
212
|
-
e.preventDefault(), this._open$.next(!1), this._updateInputDisplay(), this._inputElementRef.value?.focus();
|
|
213
|
-
break;
|
|
214
|
-
case "Tab":
|
|
215
|
-
this._open$.next(!1), this._updateInputDisplay();
|
|
216
|
-
break;
|
|
217
|
-
case "ArrowDown":
|
|
218
|
-
e.preventDefault();
|
|
219
|
-
const p = u < s.length - 1 ? u + 1 : 0;
|
|
220
|
-
s[p]?.focus();
|
|
221
|
-
break;
|
|
222
|
-
case "ArrowUp":
|
|
223
|
-
e.preventDefault();
|
|
224
|
-
const r = u > 0 ? u - 1 : s.length - 1;
|
|
225
|
-
s[r]?.focus();
|
|
226
|
-
break;
|
|
227
|
-
case "Home":
|
|
228
|
-
e.preventDefault(), s[0]?.focus();
|
|
229
|
-
break;
|
|
230
|
-
case "End":
|
|
231
|
-
e.preventDefault(), s[s.length - 1]?.focus();
|
|
232
|
-
break;
|
|
233
|
-
case "Enter":
|
|
234
|
-
case " ":
|
|
235
|
-
o && (e.preventDefault(), this._optionSelect$.next(o));
|
|
236
|
-
}
|
|
237
|
-
})).subscribe();
|
|
238
|
-
}
|
|
239
|
-
};
|
|
240
|
-
a([c({ type: Boolean })], l.prototype, "required", 2), a([c({ type: String })], l.prototype, "placeholder", 2), a([c({ type: String, reflect: !0 })], l.prototype, "label", 2), a([c({ type: String })], l.prototype, "name", 2), a([c({ type: String })], l.prototype, "maxHeight", 2), a([c({ type: Boolean })], l.prototype, "multi", 2), a([c({ type: String })], l.prototype, "description", 2), a([c({ type: String, reflect: !0 })], l.prototype, "size", 2), a([c({ type: String })], l.prototype, "autocomplete", 2), a([c({ type: Number })], l.prototype, "debounceMs", 2), a([c({ type: Number })], l.prototype, "similarityThreshold", 2), a([c({ type: Array })], l.prototype, "values", 1), a([c({ type: String, reflect: !0 })], l.prototype, "value", 1), a([b()], l.prototype, "_open", 2), a([b()], l.prototype, "_inputValue", 2), a([b()], l.prototype, "_visibleOptionsCount", 2), a([b()], l.prototype, "_hasResults", 2), a([k("#options")], l.prototype, "_listbox", 2), a([k("sch-input")], l.prototype, "_input", 2), a([T({ flatten: !0 })], l.prototype, "_options", 2), l = a([j("schmancy-autocomplete")], l);
|
|
241
|
-
//# sourceMappingURL=autocomplete-BOlaOLHB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete-BOlaOLHB.js","sources":["../src/autocomplete/autocomplete.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { InputSize, SchmancyInput } from '@schmancy/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport {\n BehaviorSubject,\n combineLatest,\n EMPTY,\n fromEvent,\n of,\n Subject,\n timer\n} from 'rxjs'\nimport {\n debounceTime,\n distinctUntilChanged,\n filter,\n switchMap,\n take,\n takeUntil,\n tap,\n withLatestFrom\n} from 'rxjs/operators'\nimport style from './autocomplete.scss?inline'\n\n// Import the similarity function (or include it inline)\nimport { similarity } from '../utils/search'\n\nexport type SchmancyAutocompleteChangeEvent = CustomEvent<{\n value: string | string[]\n values?: string[]\n}>\n\ninterface FilteredOption {\n option: SchmancyOption\n score: number\n}\n\n@customElement('schmancy-autocomplete')\nexport default class SchmancyAutocomplete extends $LitElement(style) {\n // Public API properties\n @property({ type: Boolean }) required = false\n @property({ type: String }) placeholder = ''\n @property({ type: String, reflect: true }) label = ''\n @property({ type: String }) name = ''\n @property({ type: String }) maxHeight = '300px'\n @property({ type: Boolean }) multi = false\n @property({ type: String }) description = ''\n @property({ type: String, reflect: true }) size: InputSize = 'md'\n @property({ type: String }) autocomplete = 'on'\n @property({ type: Number }) debounceMs = 200\n @property({ type: Number }) similarityThreshold = 0.3 // Minimum similarity score to show option\n\n // Values property for multi-select mode\n @property({ type: Array })\n get values() {\n return [...this._selectedValues$.value]\n }\n set values(vals: string[]) {\n this._selectedValues$.next(Array.isArray(vals) ? [...vals] : [])\n }\n\n // Value property\n @property({ type: String, reflect: true })\n get value() {\n return this.multi \n ? this._selectedValues$.value.join(',')\n : this._selectedValue$.value\n }\n set value(val: string) {\n if (this.multi) {\n this._selectedValues$.next(\n val ? val.split(',').map(v => v.trim()).filter(Boolean) : []\n )\n } else {\n this._selectedValue$.next(val)\n }\n }\n\n // State\n @state() private _open = false\n @state() private _inputValue = ''\n @state() private _visibleOptionsCount = 0\n @state() private _hasResults = true\n\n // DOM references\n @query('#options') _listbox!: HTMLUListElement\n @query('sch-input') _input!: SchmancyInput\n @queryAssignedElements({ flatten: true }) private _options!: SchmancyOption[]\n private _inputElementRef = createRef<HTMLInputElement>()\n\n // RxJS Subjects\n private _selectedValue$ = new BehaviorSubject<string>('')\n private _selectedValues$ = new BehaviorSubject<string[]>([])\n private _inputValue$ = new BehaviorSubject<string>('')\n private _open$ = new BehaviorSubject<boolean>(false)\n private _options$ = new BehaviorSubject<SchmancyOption[]>([])\n private _optionSelect$ = new Subject<SchmancyOption>()\n private _documentClick$ = new Subject<MouseEvent>()\n\n connectedCallback() {\n super.connectedCallback()\n \n if (!this.id) {\n this.id = `sch-autocomplete-${Math.random().toString(36).slice(2, 9)}`\n }\n\n this._setupAutocompleteLogic()\n this._setupDocumentClickHandler()\n // Complex autofill detection disabled - using simple auto-select on blur instead\n // this._setupAutofillDetection()\n }\n\n private _setupAutocompleteLogic() {\n // Options management pipeline\n this._options$.pipe(\n tap(options => {\n options.forEach((option, index) => {\n option.setAttribute('role', 'option')\n option.tabIndex = -1\n if (!option.id) {\n option.id = `${this.id}-option-${index}`\n }\n if (!option.hasAttribute('data-event-bound')) {\n fromEvent(option, 'pointerdown').pipe(\n tap(e => {\n e.preventDefault() // Prevent blur from firing\n e.stopPropagation()\n }),\n takeUntil(this.disconnecting)\n ).subscribe(() => this._optionSelect$.next(option))\n option.setAttribute('data-event-bound', 'true')\n }\n })\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Selection sync pipeline\n combineLatest([\n this._selectedValue$,\n this._selectedValues$,\n this._options$\n ]).pipe(\n tap(([selectedValue, selectedValues, options]) => {\n options.forEach(option => {\n option.selected = this.multi \n ? selectedValues.includes(option.value)\n : option.value === selectedValue\n option.setAttribute('aria-selected', String(option.selected))\n })\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Enhanced fuzzy filtering pipeline\n this._inputValue$.pipe(\n distinctUntilChanged(),\n debounceTime(this.debounceMs),\n withLatestFrom(this._options$, this._open$),\n tap(([searchTerm, options, isOpen]) => {\n if (!isOpen) return\n\n const term = searchTerm.trim()\n \n if (!term) {\n // Show all options if no search term\n options.forEach(option => {\n option.hidden = false\n option.style.order = '0' // Reset order\n })\n this._visibleOptionsCount = options.length\n this._hasResults = true\n } else {\n // Calculate similarity scores for all options\n const scoredOptions: FilteredOption[] = options.map(option => {\n // Get text to search in (prioritize label, then textContent, then value)\n const optionLabel = option.label || option.textContent || ''\n const optionValue = option.value\n \n // Calculate similarity scores for both label and value\n const labelScore = similarity(term, optionLabel)\n const valueScore = similarity(term, optionValue)\n \n // Use the higher score (prioritizing label matches)\n const score = Math.max(labelScore * 1.1, valueScore) // Slight boost for label matches\n \n return { option, score }\n })\n \n // Sort by score (highest first)\n scoredOptions.sort((a, b) => b.score - a.score)\n \n // Apply visibility and ordering\n let visibleCount = 0\n scoredOptions.forEach((item, index) => {\n const { option, score } = item\n \n // Hide options below threshold\n if (score < this.similarityThreshold) {\n option.hidden = true\n } else {\n option.hidden = false\n visibleCount++\n // Use CSS order to sort visible options by relevance\n option.style.order = String(index)\n }\n })\n \n this._visibleOptionsCount = visibleCount\n this._hasResults = visibleCount > 0\n }\n \n this._announceToScreenReader(\n this._visibleOptionsCount > 0 \n ? `${this._visibleOptionsCount} option${this._visibleOptionsCount === 1 ? '' : 's'} available.`\n : 'No results found.'\n )\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Option selection pipeline\n this._optionSelect$.pipe(\n withLatestFrom(this._selectedValue$, this._selectedValues$),\n tap(([option, _, currentValues]) => {\n if (this.multi) {\n const index = currentValues.indexOf(option.value)\n const newValues = index > -1\n ? [...currentValues.slice(0, index), ...currentValues.slice(index + 1)]\n : [...currentValues, option.value]\n this._selectedValues$.next(newValues)\n \n this._inputValue$.next('')\n this._inputValue = ''\n \n const labels = this._getSelectedLabels()\n this._announceToScreenReader(\n labels.length > 0 \n ? `Selected: ${labels.join(', ')}`\n : 'No options selected'\n )\n } else {\n this._selectedValue$.next(option.value)\n this._open$.next(false)\n this._open = false\n \n this._inputValue = option.label || option.textContent || ''\n this._inputValue$.next(this._inputValue)\n \n timer(100).pipe(\n tap(() => this._inputElementRef.value?.blur()),\n take(1)\n ).subscribe()\n \n this._announceToScreenReader(`Selected: ${option.label || option.textContent}`)\n }\n }),\n tap(() => this._fireChangeEvent()),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Display update pipeline\n combineLatest([\n this._open$,\n this._selectedValue$,\n this._selectedValues$,\n this._options$\n ]).pipe(\n filter(() => !this._open$.value),\n tap(([, selectedValue, selectedValues, options]) => {\n if (this.multi) {\n const labels = options\n .filter(opt => selectedValues.includes(opt.value))\n .map(opt => opt.label || opt.textContent || '')\n this._inputValue = labels.join(', ')\n } else {\n const option = options.find(opt => opt.value === selectedValue)\n this._inputValue = option ? option.label || option.textContent || '' : ''\n }\n this._inputValue$.next(this._inputValue)\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Open state sync\n this._open$.pipe(\n tap(open => this._open = open),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n private _setupDocumentClickHandler() {\n this._documentClick$.pipe(\n filter(e => !e.composedPath().includes(this)),\n filter(e => !this._options.some(opt => e.composedPath().includes(opt))),\n filter(() => this._open),\n tap(() => {\n this._open$.next(false)\n this._updateInputDisplay()\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n this._open$.pipe(\n distinctUntilChanged(),\n switchMap(open =>\n open\n ? timer(10).pipe(\n switchMap(() => fromEvent<MouseEvent>(document, 'click').pipe(\n tap(e => this._documentClick$.next(e)),\n takeUntil(this._open$.pipe(filter(isOpen => !isOpen)))\n ))\n )\n : EMPTY\n ),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n\n private _updateInputDisplay() {\n of(null).pipe(\n withLatestFrom(\n this._selectedValue$,\n this._selectedValues$,\n this._options$,\n this._open$\n ),\n tap(([, selectedValue, selectedValues, options, isOpen]) => {\n if (!this._inputElementRef.value) return\n\n if (!isOpen || !this.multi) {\n if (this.multi) {\n const labels = options\n .filter(opt => selectedValues.includes(opt.value))\n .map(opt => opt.label || opt.textContent || '')\n this._inputValue = labels.join(', ')\n } else {\n const option = options.find(opt => opt.value === selectedValue)\n this._inputValue = option ? option.label || option.textContent || '' : ''\n }\n this._inputValue$.next(this._inputValue)\n this._inputElementRef.value.value = this._inputValue\n }\n }),\n take(1)\n ).subscribe()\n }\n\n private _getSelectedLabels(): string[] {\n return this._options\n .filter(option => \n this.multi \n ? this._selectedValues$.value.includes(option.value)\n : option.value === this._selectedValue$.value\n )\n .map(option => option.label || option.textContent || '')\n }\n\n private _announceToScreenReader(message: string) {\n const liveRegion = this.shadowRoot?.querySelector('#live-status')\n if (liveRegion) {\n liveRegion.textContent = message\n }\n }\n\n private _fireChangeEvent() {\n const detail: SchmancyAutocompleteChangeEvent['detail'] = {\n value: this.value,\n }\n\n if (this.multi) {\n detail.values = [...this._selectedValues$.value]\n }\n\n this.dispatchEvent(\n new CustomEvent<SchmancyAutocompleteChangeEvent['detail']>('change', {\n detail,\n bubbles: true,\n composed: true,\n })\n )\n }\n\n public checkValidity(): boolean {\n if (!this.required) return true\n return this.multi \n ? this._selectedValues$.value.length > 0 \n : Boolean(this._selectedValue$.value)\n }\n\n public reportValidity(): boolean {\n if (this._inputElementRef.value) {\n return this._inputElementRef.value.reportValidity()\n }\n return this.checkValidity()\n }\n\n firstUpdated() {\n // Auto-selection now happens on blur, no need for autofill detection\n }\n\n render() {\n const descriptionId = `${this.id}-desc`\n\n return html`\n <div class=\"relative\">\n <!-- Screen reader live region -->\n <div id=\"live-status\" role=\"status\" aria-live=\"polite\" class=\"sr-only\"></div>\n\n <!-- Description -->\n ${this.description ? html`<div id=\"${descriptionId}\" class=\"sr-only\">${this.description}</div>` : ''}\n\n <!-- Input -->\n <slot name=\"trigger\">\n <schmancy-input\n .size=${this.size}\n ${ref(this._inputElementRef)}\n id=\"autocomplete-input\"\n class=\"w-full\"\n .name=${this.name || this.label?.toLowerCase().replace(/\\s+/g, '-')}\n .label=${this.label}\n .placeholder=${this.placeholder}\n .required=${this.required}\n .value=${this._inputValue}\n type=\"text\"\n autocomplete=${this.autocomplete}\n clickable\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-controls=\"options\"\n aria-expanded=${this._open}\n aria-describedby=${this.description ? descriptionId : undefined}\n @input=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n this._inputValue = value\n this._inputValue$.next(value)\n }}\n @focus=${(e: FocusEvent) => {\n e.stopPropagation()\n \n const hasSelection = this.multi \n ? this._selectedValues$.value.length > 0\n : !!this._selectedValue$.value\n \n if (this.multi && !hasSelection) {\n this._inputValue = ''\n this._inputValue$.next('')\n if (this._inputElementRef.value) {\n this._inputElementRef.value.value = ''\n }\n }\n \n this._open$.next(true)\n }}\n @click=${(e: MouseEvent) => {\n e.stopPropagation()\n this._open$.next(true)\n }}\n @keydown=${(e: KeyboardEvent) => {\n this._handleKeyDown(e)\n }}\n @blur=${() => {\n this._handleAutoSelectOnBlur()\n }}\n >\n </schmancy-input>\n </slot>\n\n <!-- Options dropdown -->\n <ul\n id=\"options\"\n class=${classMap({\n 'absolute': true,\n 'z-[1000]': true,\n 'mt-1': true,\n 'w-full': true,\n 'rounded-md': true,\n 'shadow-md': true,\n 'overflow-auto': true,\n 'min-w-full': true,\n 'bg-surface-low': true,\n 'flex': true,\n 'flex-col': true, // Enable flexbox for ordering\n })}\n role=\"listbox\"\n aria-multiselectable=${this.multi ? 'true' : 'false'}\n aria-label=${`${this.label || 'Options'} dropdown`}\n ?hidden=${!this._open}\n style=\"max-height: ${this.maxHeight}; display: ${this._open ? 'flex' : 'none'};\"\n @slotchange=${() => {\n this._options$.next(this._options)\n }}\n >\n <slot></slot>\n ${!this._hasResults ? html`\n <li class=\"px-3 py-2 text-sm text-muted\">No results found</li>\n ` : ''}\n </ul>\n </div>\n `\n }\n\n private _handleAutoSelectOnBlur() {\n // Only auto-select in single-select mode and when dropdown is open with a search term\n if (this.multi || !this._open || !this._inputValue.trim()) {\n return\n }\n \n const searchTerm = this._inputValue.trim()\n \n // Find the best matching option using the same similarity logic as filtering\n let bestMatch: SchmancyOption | null = null\n let bestScore = 0\n \n this._options.forEach(option => {\n // Skip hidden options\n if (option.hidden) return\n \n // Get text to search in (prioritize label, then textContent, then value)\n const optionLabel = option.label || option.textContent || ''\n const optionValue = option.value\n \n // Calculate similarity scores for both label and value\n const labelScore = similarity(searchTerm, optionLabel)\n const valueScore = similarity(searchTerm, optionValue)\n \n // Use the higher score (prioritizing label matches)\n const score = Math.max(labelScore * 1.1, valueScore) // Slight boost for label matches\n \n // Keep track of best match that meets threshold\n if (score > bestScore && score >= this.similarityThreshold) {\n bestScore = score\n bestMatch = option\n }\n })\n \n // Auto-select the best match if found\n if (bestMatch) {\n // Select the option using the existing pipeline\n this._optionSelect$.next(bestMatch)\n \n // Close the dropdown\n this._open$.next(false)\n this._open = false\n \n }\n }\n\n private _handleKeyDown(_e: KeyboardEvent) {\n fromEvent<KeyboardEvent>(document, 'keydown').pipe(\n take(1),\n withLatestFrom(this._open$, this._options$),\n tap(([event, isOpen, options]) => {\n if (!isOpen && (event.key === 'ArrowDown' || event.key === 'Enter')) {\n event.preventDefault()\n this._open$.next(true)\n \n timer(10).pipe(\n tap(() => {\n const firstVisible = options.find(opt => !opt.hidden)\n firstVisible?.focus()\n }),\n take(1)\n ).subscribe()\n return\n }\n\n if (!isOpen) return\n\n const visibleOptions = options.filter(opt => !opt.hidden)\n .sort((a, b) => parseInt(a.style.order || '0') - parseInt(b.style.order || '0'))\n \n const focusedOption = visibleOptions.find(opt => opt === document.activeElement)\n const currentIndex = focusedOption ? visibleOptions.indexOf(focusedOption) : -1\n\n switch (event.key) {\n case 'Escape':\n event.preventDefault()\n this._open$.next(false)\n this._updateInputDisplay()\n this._inputElementRef.value?.focus()\n break\n\n case 'Tab':\n this._open$.next(false)\n this._updateInputDisplay()\n break\n\n case 'ArrowDown':\n event.preventDefault()\n const nextIndex = currentIndex < visibleOptions.length - 1 ? currentIndex + 1 : 0\n visibleOptions[nextIndex]?.focus()\n break\n\n case 'ArrowUp':\n event.preventDefault()\n const prevIndex = currentIndex > 0 ? currentIndex - 1 : visibleOptions.length - 1\n visibleOptions[prevIndex]?.focus()\n break\n\n case 'Home':\n event.preventDefault()\n visibleOptions[0]?.focus()\n break\n\n case 'End':\n event.preventDefault()\n visibleOptions[visibleOptions.length - 1]?.focus()\n break\n\n case 'Enter':\n case ' ':\n if (focusedOption) {\n event.preventDefault()\n this._optionSelect$.next(focusedOption)\n }\n break\n }\n })\n ).subscribe()\n }\n}\n\n\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-autocomplete': SchmancyAutocomplete\n }\n}"],"names":["SchmancyAutocomplete","$LitElement","constructor","super","arguments","this","required","placeholder","label","name","maxHeight","multi","description","size","autocomplete","debounceMs","similarityThreshold","_open","_inputValue","_visibleOptionsCount","_hasResults","_inputElementRef","createRef","_selectedValue$","BehaviorSubject","_selectedValues$","_inputValue$","_open$","_options$","_optionSelect$","Subject","_documentClick$","values","value","vals","next","Array","isArray","join","val","split","map","v","trim","filter","Boolean","connectedCallback","id","Math","random","toString","slice","_setupAutocompleteLogic","_setupDocumentClickHandler","pipe","tap","options","forEach","option","index","setAttribute","tabIndex","hasAttribute","fromEvent","e","preventDefault","stopPropagation","takeUntil","disconnecting","subscribe","combineLatest","selectedValue","selectedValues","selected","includes","String","distinctUntilChanged","debounceTime","withLatestFrom","searchTerm","isOpen","term","scoredOptions","optionLabel","textContent","optionValue","labelScore","similarity","valueScore","score","max","sort","a","b","visibleCount","item","hidden","style","order","length","_announceToScreenReader","_","currentValues","indexOf","newValues","labels","_getSelectedLabels","timer","blur","take","_fireChangeEvent","opt","find","open","composedPath","_options","some","_updateInputDisplay","switchMap","document","EMPTY","of","message","liveRegion","shadowRoot","querySelector","detail","dispatchEvent","CustomEvent","bubbles","composed","checkValidity","reportValidity","firstUpdated","render","descriptionId","html","ref","toLowerCase","replace","target","hasSelection","_handleKeyDown","_handleAutoSelectOnBlur","classMap","absolute","flex","bestMatch","bestScore","_e","event","key","firstVisible","focus","visibleOptions","parseInt","focusedOption","activeElement","currentIndex","nextIndex","prevIndex","__decorateClass","property","type","prototype","reflect","Number","state","query","queryAssignedElements","flatten","customElement"],"mappings":";;;;;;;;;;;;;;AA0CA,IAAqBA,IAArB,cAAkDC;EAAlD,cAAAC;AAAAC,UAAAA,GAAAC,SAAAA,GAEiCC,KAAAC,WAAAA,IACDD,KAA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AhDUxK,EAgDGoK,WAAA,UAAA,CAAA,GAC8BH,EAAA,CAAjDQ,EAAsB,EAAEC,SAAAA,GAAS,CAAA,CAAA,GAjDjB1K,EAiDiCoK,WAAA,YAAA,CAAA,GAjDjCpK,IAArBiK,EAAA,CADCU,EAAc,uBAAA,CAAA,GACM3K,CAAAA;"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";const h=require("rxjs"),v=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const u=require("lit/decorators.js");require("./tailwind.mixin-nOWQtiUE.cjs");const f=require("./litElement.mixin-yCbfNohf.cjs"),b=require("lit"),$=require("lit/directives/ref.js"),i=require("rxjs/operators"),_=require("./search-DWW8IoOp.cjs");var g=Object.defineProperty,x=Object.getOwnPropertyDescriptor,r=(e,t,l,s)=>{for(var n,o=s>1?void 0:s?x(t,l):t,p=e.length-1;p>=0;p--)(n=e[p])&&(o=(s?n(t,l,o):n(o))||o);return s&&o&&g(t,l,o),o};let a=class extends f.$LitElement(":host{display:block;border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important}:host:focus{box-shadow:unset!important}@keyframes onAutoFillStart{}sch-input::part(input):-webkit-autofill,sch-input input:-webkit-autofill{animation-name:onAutoFillStart;animation-duration:1ms}"){constructor(){super(...arguments),this.required=!1,this.placeholder="",this.label="",this.name="",this.maxHeight="300px",this.multi=!1,this.description="",this.size="md",this.autocomplete="on",this.debounceMs=200,this.similarityThreshold=.3,this._open=!1,this._inputValue="",this._visibleOptionsCount=0,this._hasResults=!0,this._inputElementRef=$.createRef(),this._selectedValue$=new h.BehaviorSubject(""),this._selectedValues$=new h.BehaviorSubject([]),this._inputValue$=new h.BehaviorSubject(""),this._open$=new h.BehaviorSubject(!1),this._options$=new h.BehaviorSubject([]),this._optionSelect$=new h.Subject,this._documentClick$=new h.Subject}get values(){return[...this._selectedValues$.value]}set values(e){this._selectedValues$.next(Array.isArray(e)?[...e]:[])}get value(){return this.multi?this._selectedValues$.value.join(","):this._selectedValue$.value}set value(e){this.multi?this._selectedValues$.next(e?e.split(",").map(t=>t.trim()).filter(Boolean):[]):this._selectedValue$.next(e)}connectedCallback(){super.connectedCallback(),this.id||(this.id=`sch-autocomplete-${Math.random().toString(36).slice(2,9)}`),this._setupAutocompleteLogic(),this._setupDocumentClickHandler()}_setupAutocompleteLogic(){this._options$.pipe(i.tap(e=>{e.forEach((t,l)=>{t.setAttribute("role","option"),t.tabIndex=-1,t.id||(t.id=`${this.id}-option-${l}`),t.hasAttribute("data-event-bound")||(h.fromEvent(t,"pointerdown").pipe(i.tap(s=>{s.preventDefault(),s.stopPropagation()}),i.takeUntil(this.disconnecting)).subscribe(()=>this._optionSelect$.next(t)),t.setAttribute("data-event-bound","true"))})}),i.takeUntil(this.disconnecting)).subscribe(),h.combineLatest([this._selectedValue$,this._selectedValues$,this._options$]).pipe(i.tap(([e,t,l])=>{l.forEach(s=>{s.selected=this.multi?t.includes(s.value):s.value===e,s.setAttribute("aria-selected",String(s.selected))})}),i.takeUntil(this.disconnecting)).subscribe(),this._inputValue$.pipe(i.distinctUntilChanged(),i.debounceTime(this.debounceMs),i.withLatestFrom(this._options$,this._open$),i.tap(([e,t,l])=>{if(!l)return;const s=e.trim();if(s){const n=t.map(p=>{const c=p.label||p.textContent||"",d=p.value,m=_.similarity(s,c),y=_.similarity(s,d);return{option:p,score:Math.max(1.1*m,y)}});n.sort((p,c)=>c.score-p.score);let o=0;n.forEach((p,c)=>{const{option:d,score:m}=p;m<this.similarityThreshold?d.hidden=!0:(d.hidden=!1,o++,d.style.order=String(c))}),this._visibleOptionsCount=o,this._hasResults=o>0}else t.forEach(n=>{n.hidden=!1,n.style.order="0"}),this._visibleOptionsCount=t.length,this._hasResults=!0;this._announceToScreenReader(this._visibleOptionsCount>0?`${this._visibleOptionsCount} option${this._visibleOptionsCount===1?"":"s"} available.`:"No results found.")}),i.takeUntil(this.disconnecting)).subscribe(),this._optionSelect$.pipe(i.withLatestFrom(this._selectedValue$,this._selectedValues$),i.tap(([e,t,l])=>{if(this.multi){const s=l.indexOf(e.value),n=s>-1?[...l.slice(0,s),...l.slice(s+1)]:[...l,e.value];this._selectedValues$.next(n),this._inputValue$.next(""),this._inputValue="";const o=this._getSelectedLabels();this._announceToScreenReader(o.length>0?`Selected: ${o.join(", ")}`:"No options selected")}else this._selectedValue$.next(e.value),this._open$.next(!1),this._open=!1,this._inputValue=e.label||e.textContent||"",this._inputValue$.next(this._inputValue),h.timer(100).pipe(i.tap(()=>this._inputElementRef.value?.blur()),i.take(1)).subscribe(),this._announceToScreenReader(`Selected: ${e.label||e.textContent}`)}),i.tap(()=>this._fireChangeEvent()),i.takeUntil(this.disconnecting)).subscribe(),h.combineLatest([this._open$,this._selectedValue$,this._selectedValues$,this._options$]).pipe(i.filter(()=>!this._open$.value),i.tap(([,e,t,l])=>{if(this.multi){const s=l.filter(n=>t.includes(n.value)).map(n=>n.label||n.textContent||"");this._inputValue=s.join(", ")}else{const s=l.find(n=>n.value===e);this._inputValue=s&&(s.label||s.textContent)||""}this._inputValue$.next(this._inputValue)}),i.takeUntil(this.disconnecting)).subscribe(),this._open$.pipe(i.tap(e=>this._open=e),i.takeUntil(this.disconnecting)).subscribe()}_setupDocumentClickHandler(){this._documentClick$.pipe(i.filter(e=>!e.composedPath().includes(this)),i.filter(e=>!this._options.some(t=>e.composedPath().includes(t))),i.filter(()=>this._open),i.tap(()=>{this._open$.next(!1),this._updateInputDisplay()}),i.takeUntil(this.disconnecting)).subscribe(),this._open$.pipe(i.distinctUntilChanged(),i.switchMap(e=>e?h.timer(10).pipe(i.switchMap(()=>h.fromEvent(document,"click").pipe(i.tap(t=>this._documentClick$.next(t)),i.takeUntil(this._open$.pipe(i.filter(t=>!t)))))):h.EMPTY),i.takeUntil(this.disconnecting)).subscribe()}_updateInputDisplay(){h.of(null).pipe(i.withLatestFrom(this._selectedValue$,this._selectedValues$,this._options$,this._open$),i.tap(([,e,t,l,s])=>{if(this._inputElementRef.value&&(!s||!this.multi)){if(this.multi){const n=l.filter(o=>t.includes(o.value)).map(o=>o.label||o.textContent||"");this._inputValue=n.join(", ")}else{const n=l.find(o=>o.value===e);this._inputValue=n&&(n.label||n.textContent)||""}this._inputValue$.next(this._inputValue),this._inputElementRef.value.value=this._inputValue}}),i.take(1)).subscribe()}_getSelectedLabels(){return this._options.filter(e=>this.multi?this._selectedValues$.value.includes(e.value):e.value===this._selectedValue$.value).map(e=>e.label||e.textContent||"")}_announceToScreenReader(e){const t=this.shadowRoot?.querySelector("#live-status");t&&(t.textContent=e)}_fireChangeEvent(){const e={value:this.value};this.multi&&(e.values=[...this._selectedValues$.value]),this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,composed:!0}))}checkValidity(){return!this.required||(this.multi?this._selectedValues$.value.length>0:!!this._selectedValue$.value)}reportValidity(){return this._inputElementRef.value?this._inputElementRef.value.reportValidity():this.checkValidity()}firstUpdated(){}render(){const e=`${this.id}-desc`;return b.html`
|
|
2
|
-
<div class="relative">
|
|
3
|
-
<!-- Screen reader live region -->
|
|
4
|
-
<div id="live-status" role="status" aria-live="polite" class="sr-only"></div>
|
|
5
|
-
|
|
6
|
-
<!-- Description -->
|
|
7
|
-
${this.description?b.html`<div id="${e}" class="sr-only">${this.description}</div>`:""}
|
|
8
|
-
|
|
9
|
-
<!-- Input -->
|
|
10
|
-
<slot name="trigger">
|
|
11
|
-
<schmancy-input
|
|
12
|
-
.size=${this.size}
|
|
13
|
-
${$.ref(this._inputElementRef)}
|
|
14
|
-
id="autocomplete-input"
|
|
15
|
-
class="w-full"
|
|
16
|
-
.name=${this.name||this.label?.toLowerCase().replace(/\s+/g,"-")}
|
|
17
|
-
.label=${this.label}
|
|
18
|
-
.placeholder=${this.placeholder}
|
|
19
|
-
.required=${this.required}
|
|
20
|
-
.value=${this._inputValue}
|
|
21
|
-
type="text"
|
|
22
|
-
autocomplete=${this.autocomplete}
|
|
23
|
-
clickable
|
|
24
|
-
role="combobox"
|
|
25
|
-
aria-autocomplete="list"
|
|
26
|
-
aria-haspopup="listbox"
|
|
27
|
-
aria-controls="options"
|
|
28
|
-
aria-expanded=${this._open}
|
|
29
|
-
aria-describedby=${this.description?e:void 0}
|
|
30
|
-
@input=${t=>{const l=t.target.value;this._inputValue=l,this._inputValue$.next(l)}}
|
|
31
|
-
@focus=${t=>{t.stopPropagation();const l=this.multi?this._selectedValues$.value.length>0:!!this._selectedValue$.value;this.multi&&!l&&(this._inputValue="",this._inputValue$.next(""),this._inputElementRef.value&&(this._inputElementRef.value.value="")),this._open$.next(!0)}}
|
|
32
|
-
@click=${t=>{t.stopPropagation(),this._open$.next(!0)}}
|
|
33
|
-
@keydown=${t=>{this._handleKeyDown(t)}}
|
|
34
|
-
@blur=${()=>{this._handleAutoSelectOnBlur()}}
|
|
35
|
-
>
|
|
36
|
-
</schmancy-input>
|
|
37
|
-
</slot>
|
|
38
|
-
|
|
39
|
-
<!-- Options dropdown -->
|
|
40
|
-
<ul
|
|
41
|
-
id="options"
|
|
42
|
-
class=${v.classMap({absolute:!0,"z-[1000]":!0,"mt-1":!0,"w-full":!0,"rounded-md":!0,"shadow-md":!0,"overflow-auto":!0,"min-w-full":!0,"bg-surface-low":!0,flex:!0,"flex-col":!0})}
|
|
43
|
-
role="listbox"
|
|
44
|
-
aria-multiselectable=${this.multi?"true":"false"}
|
|
45
|
-
aria-label=${`${this.label||"Options"} dropdown`}
|
|
46
|
-
?hidden=${!this._open}
|
|
47
|
-
style="max-height: ${this.maxHeight}; display: ${this._open?"flex":"none"};"
|
|
48
|
-
@slotchange=${()=>{this._options$.next(this._options)}}
|
|
49
|
-
>
|
|
50
|
-
<slot></slot>
|
|
51
|
-
${this._hasResults?"":b.html`
|
|
52
|
-
<li class="px-3 py-2 text-sm text-muted">No results found</li>
|
|
53
|
-
`}
|
|
54
|
-
</ul>
|
|
55
|
-
</div>
|
|
56
|
-
`}_handleAutoSelectOnBlur(){if(this.multi||!this._open||!this._inputValue.trim())return;const e=this._inputValue.trim();let t=null,l=0;this._options.forEach(s=>{if(s.hidden)return;const n=s.label||s.textContent||"",o=s.value,p=_.similarity(e,n),c=_.similarity(e,o),d=Math.max(1.1*p,c);d>l&&d>=this.similarityThreshold&&(l=d,t=s)}),t&&(this._optionSelect$.next(t),this._open$.next(!1),this._open=!1)}_handleKeyDown(e){h.fromEvent(document,"keydown").pipe(i.take(1),i.withLatestFrom(this._open$,this._options$),i.tap(([t,l,s])=>{if(!l&&(t.key==="ArrowDown"||t.key==="Enter"))return t.preventDefault(),this._open$.next(!0),void h.timer(10).pipe(i.tap(()=>{s.find(d=>!d.hidden)?.focus()}),i.take(1)).subscribe();if(!l)return;const n=s.filter(c=>!c.hidden).sort((c,d)=>parseInt(c.style.order||"0")-parseInt(d.style.order||"0")),o=n.find(c=>c===document.activeElement),p=o?n.indexOf(o):-1;switch(t.key){case"Escape":t.preventDefault(),this._open$.next(!1),this._updateInputDisplay(),this._inputElementRef.value?.focus();break;case"Tab":this._open$.next(!1),this._updateInputDisplay();break;case"ArrowDown":t.preventDefault();const c=p<n.length-1?p+1:0;n[c]?.focus();break;case"ArrowUp":t.preventDefault();const d=p>0?p-1:n.length-1;n[d]?.focus();break;case"Home":t.preventDefault(),n[0]?.focus();break;case"End":t.preventDefault(),n[n.length-1]?.focus();break;case"Enter":case" ":o&&(t.preventDefault(),this._optionSelect$.next(o))}})).subscribe()}};r([u.property({type:Boolean})],a.prototype,"required",2),r([u.property({type:String})],a.prototype,"placeholder",2),r([u.property({type:String,reflect:!0})],a.prototype,"label",2),r([u.property({type:String})],a.prototype,"name",2),r([u.property({type:String})],a.prototype,"maxHeight",2),r([u.property({type:Boolean})],a.prototype,"multi",2),r([u.property({type:String})],a.prototype,"description",2),r([u.property({type:String,reflect:!0})],a.prototype,"size",2),r([u.property({type:String})],a.prototype,"autocomplete",2),r([u.property({type:Number})],a.prototype,"debounceMs",2),r([u.property({type:Number})],a.prototype,"similarityThreshold",2),r([u.property({type:Array})],a.prototype,"values",1),r([u.property({type:String,reflect:!0})],a.prototype,"value",1),r([u.state()],a.prototype,"_open",2),r([u.state()],a.prototype,"_inputValue",2),r([u.state()],a.prototype,"_visibleOptionsCount",2),r([u.state()],a.prototype,"_hasResults",2),r([u.query("#options")],a.prototype,"_listbox",2),r([u.query("sch-input")],a.prototype,"_input",2),r([u.queryAssignedElements({flatten:!0})],a.prototype,"_options",2),a=r([u.customElement("schmancy-autocomplete")],a);
|
|
57
|
-
//# sourceMappingURL=autocomplete-D3ZKMdEM.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete-D3ZKMdEM.cjs","sources":["../src/autocomplete/autocomplete.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { InputSize, SchmancyInput } from '@schmancy/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport {\n BehaviorSubject,\n combineLatest,\n EMPTY,\n fromEvent,\n of,\n Subject,\n timer\n} from 'rxjs'\nimport {\n debounceTime,\n distinctUntilChanged,\n filter,\n switchMap,\n take,\n takeUntil,\n tap,\n withLatestFrom\n} from 'rxjs/operators'\nimport style from './autocomplete.scss?inline'\n\n// Import the similarity function (or include it inline)\nimport { similarity } from '../utils/search'\n\nexport type SchmancyAutocompleteChangeEvent = CustomEvent<{\n value: string | string[]\n values?: string[]\n}>\n\ninterface FilteredOption {\n option: SchmancyOption\n score: number\n}\n\n@customElement('schmancy-autocomplete')\nexport default class SchmancyAutocomplete extends $LitElement(style) {\n // Public API properties\n @property({ type: Boolean }) required = false\n @property({ type: String }) placeholder = ''\n @property({ type: String, reflect: true }) label = ''\n @property({ type: String }) name = ''\n @property({ type: String }) maxHeight = '300px'\n @property({ type: Boolean }) multi = false\n @property({ type: String }) description = ''\n @property({ type: String, reflect: true }) size: InputSize = 'md'\n @property({ type: String }) autocomplete = 'on'\n @property({ type: Number }) debounceMs = 200\n @property({ type: Number }) similarityThreshold = 0.3 // Minimum similarity score to show option\n\n // Values property for multi-select mode\n @property({ type: Array })\n get values() {\n return [...this._selectedValues$.value]\n }\n set values(vals: string[]) {\n this._selectedValues$.next(Array.isArray(vals) ? [...vals] : [])\n }\n\n // Value property\n @property({ type: String, reflect: true })\n get value() {\n return this.multi \n ? this._selectedValues$.value.join(',')\n : this._selectedValue$.value\n }\n set value(val: string) {\n if (this.multi) {\n this._selectedValues$.next(\n val ? val.split(',').map(v => v.trim()).filter(Boolean) : []\n )\n } else {\n this._selectedValue$.next(val)\n }\n }\n\n // State\n @state() private _open = false\n @state() private _inputValue = ''\n @state() private _visibleOptionsCount = 0\n @state() private _hasResults = true\n\n // DOM references\n @query('#options') _listbox!: HTMLUListElement\n @query('sch-input') _input!: SchmancyInput\n @queryAssignedElements({ flatten: true }) private _options!: SchmancyOption[]\n private _inputElementRef = createRef<HTMLInputElement>()\n\n // RxJS Subjects\n private _selectedValue$ = new BehaviorSubject<string>('')\n private _selectedValues$ = new BehaviorSubject<string[]>([])\n private _inputValue$ = new BehaviorSubject<string>('')\n private _open$ = new BehaviorSubject<boolean>(false)\n private _options$ = new BehaviorSubject<SchmancyOption[]>([])\n private _optionSelect$ = new Subject<SchmancyOption>()\n private _documentClick$ = new Subject<MouseEvent>()\n\n connectedCallback() {\n super.connectedCallback()\n \n if (!this.id) {\n this.id = `sch-autocomplete-${Math.random().toString(36).slice(2, 9)}`\n }\n\n this._setupAutocompleteLogic()\n this._setupDocumentClickHandler()\n // Complex autofill detection disabled - using simple auto-select on blur instead\n // this._setupAutofillDetection()\n }\n\n private _setupAutocompleteLogic() {\n // Options management pipeline\n this._options$.pipe(\n tap(options => {\n options.forEach((option, index) => {\n option.setAttribute('role', 'option')\n option.tabIndex = -1\n if (!option.id) {\n option.id = `${this.id}-option-${index}`\n }\n if (!option.hasAttribute('data-event-bound')) {\n fromEvent(option, 'pointerdown').pipe(\n tap(e => {\n e.preventDefault() // Prevent blur from firing\n e.stopPropagation()\n }),\n takeUntil(this.disconnecting)\n ).subscribe(() => this._optionSelect$.next(option))\n option.setAttribute('data-event-bound', 'true')\n }\n })\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Selection sync pipeline\n combineLatest([\n this._selectedValue$,\n this._selectedValues$,\n this._options$\n ]).pipe(\n tap(([selectedValue, selectedValues, options]) => {\n options.forEach(option => {\n option.selected = this.multi \n ? selectedValues.includes(option.value)\n : option.value === selectedValue\n option.setAttribute('aria-selected', String(option.selected))\n })\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Enhanced fuzzy filtering pipeline\n this._inputValue$.pipe(\n distinctUntilChanged(),\n debounceTime(this.debounceMs),\n withLatestFrom(this._options$, this._open$),\n tap(([searchTerm, options, isOpen]) => {\n if (!isOpen) return\n\n const term = searchTerm.trim()\n \n if (!term) {\n // Show all options if no search term\n options.forEach(option => {\n option.hidden = false\n option.style.order = '0' // Reset order\n })\n this._visibleOptionsCount = options.length\n this._hasResults = true\n } else {\n // Calculate similarity scores for all options\n const scoredOptions: FilteredOption[] = options.map(option => {\n // Get text to search in (prioritize label, then textContent, then value)\n const optionLabel = option.label || option.textContent || ''\n const optionValue = option.value\n \n // Calculate similarity scores for both label and value\n const labelScore = similarity(term, optionLabel)\n const valueScore = similarity(term, optionValue)\n \n // Use the higher score (prioritizing label matches)\n const score = Math.max(labelScore * 1.1, valueScore) // Slight boost for label matches\n \n return { option, score }\n })\n \n // Sort by score (highest first)\n scoredOptions.sort((a, b) => b.score - a.score)\n \n // Apply visibility and ordering\n let visibleCount = 0\n scoredOptions.forEach((item, index) => {\n const { option, score } = item\n \n // Hide options below threshold\n if (score < this.similarityThreshold) {\n option.hidden = true\n } else {\n option.hidden = false\n visibleCount++\n // Use CSS order to sort visible options by relevance\n option.style.order = String(index)\n }\n })\n \n this._visibleOptionsCount = visibleCount\n this._hasResults = visibleCount > 0\n }\n \n this._announceToScreenReader(\n this._visibleOptionsCount > 0 \n ? `${this._visibleOptionsCount} option${this._visibleOptionsCount === 1 ? '' : 's'} available.`\n : 'No results found.'\n )\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Option selection pipeline\n this._optionSelect$.pipe(\n withLatestFrom(this._selectedValue$, this._selectedValues$),\n tap(([option, _, currentValues]) => {\n if (this.multi) {\n const index = currentValues.indexOf(option.value)\n const newValues = index > -1\n ? [...currentValues.slice(0, index), ...currentValues.slice(index + 1)]\n : [...currentValues, option.value]\n this._selectedValues$.next(newValues)\n \n this._inputValue$.next('')\n this._inputValue = ''\n \n const labels = this._getSelectedLabels()\n this._announceToScreenReader(\n labels.length > 0 \n ? `Selected: ${labels.join(', ')}`\n : 'No options selected'\n )\n } else {\n this._selectedValue$.next(option.value)\n this._open$.next(false)\n this._open = false\n \n this._inputValue = option.label || option.textContent || ''\n this._inputValue$.next(this._inputValue)\n \n timer(100).pipe(\n tap(() => this._inputElementRef.value?.blur()),\n take(1)\n ).subscribe()\n \n this._announceToScreenReader(`Selected: ${option.label || option.textContent}`)\n }\n }),\n tap(() => this._fireChangeEvent()),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Display update pipeline\n combineLatest([\n this._open$,\n this._selectedValue$,\n this._selectedValues$,\n this._options$\n ]).pipe(\n filter(() => !this._open$.value),\n tap(([, selectedValue, selectedValues, options]) => {\n if (this.multi) {\n const labels = options\n .filter(opt => selectedValues.includes(opt.value))\n .map(opt => opt.label || opt.textContent || '')\n this._inputValue = labels.join(', ')\n } else {\n const option = options.find(opt => opt.value === selectedValue)\n this._inputValue = option ? option.label || option.textContent || '' : ''\n }\n this._inputValue$.next(this._inputValue)\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Open state sync\n this._open$.pipe(\n tap(open => this._open = open),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n private _setupDocumentClickHandler() {\n this._documentClick$.pipe(\n filter(e => !e.composedPath().includes(this)),\n filter(e => !this._options.some(opt => e.composedPath().includes(opt))),\n filter(() => this._open),\n tap(() => {\n this._open$.next(false)\n this._updateInputDisplay()\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n this._open$.pipe(\n distinctUntilChanged(),\n switchMap(open =>\n open\n ? timer(10).pipe(\n switchMap(() => fromEvent<MouseEvent>(document, 'click').pipe(\n tap(e => this._documentClick$.next(e)),\n takeUntil(this._open$.pipe(filter(isOpen => !isOpen)))\n ))\n )\n : EMPTY\n ),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n\n private _updateInputDisplay() {\n of(null).pipe(\n withLatestFrom(\n this._selectedValue$,\n this._selectedValues$,\n this._options$,\n this._open$\n ),\n tap(([, selectedValue, selectedValues, options, isOpen]) => {\n if (!this._inputElementRef.value) return\n\n if (!isOpen || !this.multi) {\n if (this.multi) {\n const labels = options\n .filter(opt => selectedValues.includes(opt.value))\n .map(opt => opt.label || opt.textContent || '')\n this._inputValue = labels.join(', ')\n } else {\n const option = options.find(opt => opt.value === selectedValue)\n this._inputValue = option ? option.label || option.textContent || '' : ''\n }\n this._inputValue$.next(this._inputValue)\n this._inputElementRef.value.value = this._inputValue\n }\n }),\n take(1)\n ).subscribe()\n }\n\n private _getSelectedLabels(): string[] {\n return this._options\n .filter(option => \n this.multi \n ? this._selectedValues$.value.includes(option.value)\n : option.value === this._selectedValue$.value\n )\n .map(option => option.label || option.textContent || '')\n }\n\n private _announceToScreenReader(message: string) {\n const liveRegion = this.shadowRoot?.querySelector('#live-status')\n if (liveRegion) {\n liveRegion.textContent = message\n }\n }\n\n private _fireChangeEvent() {\n const detail: SchmancyAutocompleteChangeEvent['detail'] = {\n value: this.value,\n }\n\n if (this.multi) {\n detail.values = [...this._selectedValues$.value]\n }\n\n this.dispatchEvent(\n new CustomEvent<SchmancyAutocompleteChangeEvent['detail']>('change', {\n detail,\n bubbles: true,\n composed: true,\n })\n )\n }\n\n public checkValidity(): boolean {\n if (!this.required) return true\n return this.multi \n ? this._selectedValues$.value.length > 0 \n : Boolean(this._selectedValue$.value)\n }\n\n public reportValidity(): boolean {\n if (this._inputElementRef.value) {\n return this._inputElementRef.value.reportValidity()\n }\n return this.checkValidity()\n }\n\n firstUpdated() {\n // Auto-selection now happens on blur, no need for autofill detection\n }\n\n render() {\n const descriptionId = `${this.id}-desc`\n\n return html`\n <div class=\"relative\">\n <!-- Screen reader live region -->\n <div id=\"live-status\" role=\"status\" aria-live=\"polite\" class=\"sr-only\"></div>\n\n <!-- Description -->\n ${this.description ? html`<div id=\"${descriptionId}\" class=\"sr-only\">${this.description}</div>` : ''}\n\n <!-- Input -->\n <slot name=\"trigger\">\n <schmancy-input\n .size=${this.size}\n ${ref(this._inputElementRef)}\n id=\"autocomplete-input\"\n class=\"w-full\"\n .name=${this.name || this.label?.toLowerCase().replace(/\\s+/g, '-')}\n .label=${this.label}\n .placeholder=${this.placeholder}\n .required=${this.required}\n .value=${this._inputValue}\n type=\"text\"\n autocomplete=${this.autocomplete}\n clickable\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-controls=\"options\"\n aria-expanded=${this._open}\n aria-describedby=${this.description ? descriptionId : undefined}\n @input=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n this._inputValue = value\n this._inputValue$.next(value)\n }}\n @focus=${(e: FocusEvent) => {\n e.stopPropagation()\n \n const hasSelection = this.multi \n ? this._selectedValues$.value.length > 0\n : !!this._selectedValue$.value\n \n if (this.multi && !hasSelection) {\n this._inputValue = ''\n this._inputValue$.next('')\n if (this._inputElementRef.value) {\n this._inputElementRef.value.value = ''\n }\n }\n \n this._open$.next(true)\n }}\n @click=${(e: MouseEvent) => {\n e.stopPropagation()\n this._open$.next(true)\n }}\n @keydown=${(e: KeyboardEvent) => {\n this._handleKeyDown(e)\n }}\n @blur=${() => {\n this._handleAutoSelectOnBlur()\n }}\n >\n </schmancy-input>\n </slot>\n\n <!-- Options dropdown -->\n <ul\n id=\"options\"\n class=${classMap({\n 'absolute': true,\n 'z-[1000]': true,\n 'mt-1': true,\n 'w-full': true,\n 'rounded-md': true,\n 'shadow-md': true,\n 'overflow-auto': true,\n 'min-w-full': true,\n 'bg-surface-low': true,\n 'flex': true,\n 'flex-col': true, // Enable flexbox for ordering\n })}\n role=\"listbox\"\n aria-multiselectable=${this.multi ? 'true' : 'false'}\n aria-label=${`${this.label || 'Options'} dropdown`}\n ?hidden=${!this._open}\n style=\"max-height: ${this.maxHeight}; display: ${this._open ? 'flex' : 'none'};\"\n @slotchange=${() => {\n this._options$.next(this._options)\n }}\n >\n <slot></slot>\n ${!this._hasResults ? html`\n <li class=\"px-3 py-2 text-sm text-muted\">No results found</li>\n ` : ''}\n </ul>\n </div>\n `\n }\n\n private _handleAutoSelectOnBlur() {\n // Only auto-select in single-select mode and when dropdown is open with a search term\n if (this.multi || !this._open || !this._inputValue.trim()) {\n return\n }\n \n const searchTerm = this._inputValue.trim()\n \n // Find the best matching option using the same similarity logic as filtering\n let bestMatch: SchmancyOption | null = null\n let bestScore = 0\n \n this._options.forEach(option => {\n // Skip hidden options\n if (option.hidden) return\n \n // Get text to search in (prioritize label, then textContent, then value)\n const optionLabel = option.label || option.textContent || ''\n const optionValue = option.value\n \n // Calculate similarity scores for both label and value\n const labelScore = similarity(searchTerm, optionLabel)\n const valueScore = similarity(searchTerm, optionValue)\n \n // Use the higher score (prioritizing label matches)\n const score = Math.max(labelScore * 1.1, valueScore) // Slight boost for label matches\n \n // Keep track of best match that meets threshold\n if (score > bestScore && score >= this.similarityThreshold) {\n bestScore = score\n bestMatch = option\n }\n })\n \n // Auto-select the best match if found\n if (bestMatch) {\n // Select the option using the existing pipeline\n this._optionSelect$.next(bestMatch)\n \n // Close the dropdown\n this._open$.next(false)\n this._open = false\n \n }\n }\n\n private _handleKeyDown(_e: KeyboardEvent) {\n fromEvent<KeyboardEvent>(document, 'keydown').pipe(\n take(1),\n withLatestFrom(this._open$, this._options$),\n tap(([event, isOpen, options]) => {\n if (!isOpen && (event.key === 'ArrowDown' || event.key === 'Enter')) {\n event.preventDefault()\n this._open$.next(true)\n \n timer(10).pipe(\n tap(() => {\n const firstVisible = options.find(opt => !opt.hidden)\n firstVisible?.focus()\n }),\n take(1)\n ).subscribe()\n return\n }\n\n if (!isOpen) return\n\n const visibleOptions = options.filter(opt => !opt.hidden)\n .sort((a, b) => parseInt(a.style.order || '0') - parseInt(b.style.order || '0'))\n \n const focusedOption = visibleOptions.find(opt => opt === document.activeElement)\n const currentIndex = focusedOption ? visibleOptions.indexOf(focusedOption) : -1\n\n switch (event.key) {\n case 'Escape':\n event.preventDefault()\n this._open$.next(false)\n this._updateInputDisplay()\n this._inputElementRef.value?.focus()\n break\n\n case 'Tab':\n this._open$.next(false)\n this._updateInputDisplay()\n break\n\n case 'ArrowDown':\n event.preventDefault()\n const nextIndex = currentIndex < visibleOptions.length - 1 ? currentIndex + 1 : 0\n visibleOptions[nextIndex]?.focus()\n break\n\n case 'ArrowUp':\n event.preventDefault()\n const prevIndex = currentIndex > 0 ? currentIndex - 1 : visibleOptions.length - 1\n visibleOptions[prevIndex]?.focus()\n break\n\n case 'Home':\n event.preventDefault()\n visibleOptions[0]?.focus()\n break\n\n case 'End':\n event.preventDefault()\n visibleOptions[visibleOptions.length - 1]?.focus()\n break\n\n case 'Enter':\n case ' ':\n if (focusedOption) {\n event.preventDefault()\n this._optionSelect$.next(focusedOption)\n }\n break\n }\n })\n ).subscribe()\n }\n}\n\n\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-autocomplete': SchmancyAutocomplete\n }\n}"],"names":["SchmancyAutocomplete","$LitElement","constructor","super","arguments","this","required","placeholder","label","name","maxHeight","multi","description","size","autocomplete","debounceMs","similarityThreshold","_open","_inputValue","_visibleOptionsCount","_hasResults","_inputElementRef","createRef","_selectedValue$","BehaviorSubject","_selectedValues$","_inputValue$","_open$","_options$","_optionSelect$","Subject","_documentClick$","values","value","vals","next","Array","isArray","join","val","split","map","v","trim","filter","Boolean","connectedCallback","id","Math","random","toString","slice","_setupAutocompleteLogic","_setupDocumentClickHandler","pipe","tap","options","forEach","option","index","setAttribute","tabIndex","hasAttribute","fromEvent","e","preventDefault","stopPropagation","takeUntil","disconnecting","subscribe","combineLatest","selectedValue","selectedValues","selected","includes","String","distinctUntilChanged","debounceTime","withLatestFrom","searchTerm","isOpen","term","scoredOptions","optionLabel","textContent","optionValue","labelScore","similarity","valueScore","score","max","sort","a","b","visibleCount","item","hidden","style","order","length","_announceToScreenReader","_","currentValues","indexOf","newValues","labels","_getSelectedLabels","timer","blur","take","_fireChangeEvent","opt","find","open","composedPath","_options","some","_updateInputDisplay","switchMap","document","EMPTY","of","message","liveRegion","shadowRoot","querySelector","detail","dispatchEvent","CustomEvent","bubbles","composed","checkValidity","reportValidity","firstUpdated","render","descriptionId","html","ref","toLowerCase","replace","target","hasSelection","_handleKeyDown","_handleAutoSelectOnBlur","classMap","absolute","flex","bestMatch","bestScore","_e","event","key","focus","visibleOptions","parseInt","focusedOption","activeElement","currentIndex","nextIndex","prevIndex","__decorateClass","property","type","prototype","reflect","Number","state","query","queryAssignedElements","flatten","customElement"],"mappings":"yiBA0CA,IAAqBA,EAArB,cAAkDC,mYAAlD,aAAAC,CAAAC,MAAAA,GAAAC,SAAAA,EAEiCC,KAAAC,SAAAA,GACDD,KAAAE,YAAc,GACCF,KAAAG,MAAQ,GACvBH,KAAAI,KAAO,GACPJ,KAAAK,UAAY,QACXL,KAAAM,MAAAA,GACDN,KAAAO,YAAc,GACCP,KAAAQ,KAAkB,KACjCR,KAAAS,aAAe,KACfT,KAAAU,WAAa,IACbV,KAAAW,oBAAsB,GA6BzCX,KAAQY,MAAAA,GACRZ,KAAQa,YAAc,GACtBb,KAAQc,qBAAuB,EAC/Bd,KAAQe,YAAAA,GAMjBf,KAAQgB,iBAAmBC,cAG3BjB,KAAQkB,gBAAkB,IAAIC,EAAAA,gBAAwB,EAAA,EACtDnB,KAAQoB,iBAAmB,IAAID,EAAAA,gBAA0B,CAAA,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