@mhmo91/schmancy 0.4.9 → 0.4.10
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/ai/button.md +6 -3
- package/ai/code-highlight.md +239 -0
- package/ai/countries.md +270 -0
- package/ai/dialog.md +22 -3
- package/ai/directives.md +237 -0
- package/ai/input.md +99 -55
- package/ai/payment-card-form.md +241 -0
- package/ai/surface.md +1 -1
- package/ai/timezone.md +275 -0
- package/ai/typography.md +78 -43
- package/dist/ai/button.md +6 -3
- package/dist/ai/code-highlight.md +239 -0
- package/dist/ai/countries.md +270 -0
- package/dist/ai/dialog.md +22 -3
- package/dist/ai/directives.md +237 -0
- package/dist/ai/input.md +99 -55
- package/dist/ai/payment-card-form.md +241 -0
- package/dist/ai/surface.md +1 -1
- package/dist/ai/timezone.md +275 -0
- package/dist/ai/typography.md +78 -43
- package/dist/{animated-text-BqZjMyzb.js → animated-text-Be02uXuq.js} +3 -3
- package/dist/{animated-text-BqZjMyzb.js.map → animated-text-Be02uXuq.js.map} +1 -1
- package/dist/{animated-text-CgY-L1nI.cjs → animated-text-Dh_Ony1b.cjs} +2 -2
- package/dist/{animated-text-CgY-L1nI.cjs.map → animated-text-Dh_Ony1b.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-B7U96CpD.js → area.component-CVYJtXrI.js} +3 -3
- package/dist/{area.component-B7U96CpD.js.map → area.component-CVYJtXrI.js.map} +1 -1
- package/dist/{area.component-Zbs-bAJV.cjs → area.component-DTc1TOLd.cjs} +2 -2
- package/dist/{area.component-Zbs-bAJV.cjs.map → area.component-DTc1TOLd.cjs.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-qK00SJRP.cjs → autocomplete-CzTNaIqf.cjs} +2 -2
- package/dist/{autocomplete-qK00SJRP.cjs.map → autocomplete-CzTNaIqf.cjs.map} +1 -1
- package/dist/{autocomplete-DIUsdT73.js → autocomplete-D1bwPNoy.js} +3 -3
- package/dist/{autocomplete-DIUsdT73.js.map → autocomplete-D1bwPNoy.js.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-BK-Ikpdw.cjs → avatar-CFu-31B1.cjs} +2 -2
- package/dist/{avatar-BK-Ikpdw.cjs.map → avatar-CFu-31B1.cjs.map} +1 -1
- package/dist/{avatar-Bp0t8NU5.js → avatar-D35JpOv5.js} +44 -44
- package/dist/{avatar-Bp0t8NU5.js.map → avatar-D35JpOv5.js.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-By-PBLw8.js → boat-6nw0fphH.js} +2 -2
- package/dist/{boat-By-PBLw8.js.map → boat-6nw0fphH.js.map} +1 -1
- package/dist/{boat-DUU675NX.cjs → boat-De0k6DJ6.cjs} +2 -2
- package/dist/{boat-DUU675NX.cjs.map → boat-De0k6DJ6.cjs.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-f7BewP4u.cjs → checkbox-Xr-OTKiq.cjs} +2 -2
- package/dist/{checkbox-f7BewP4u.cjs.map → checkbox-Xr-OTKiq.cjs.map} +1 -1
- package/dist/{checkbox-_WevqQDR.js → checkbox-ZW_jmRBP.js} +2 -2
- package/dist/{checkbox-_WevqQDR.js.map → checkbox-ZW_jmRBP.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-DiDm29N_.js → chips-DFam160B.js} +3 -3
- package/dist/{chips-DiDm29N_.js.map → chips-DFam160B.js.map} +1 -1
- package/dist/{chips-D1QElds4.cjs → chips-DwvB_B3m.cjs} +2 -2
- package/dist/{chips-D1QElds4.cjs.map → chips-DwvB_B3m.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/{circular-progress-BAlic8HY.js → circular-progress-BARPJm-e.js} +3 -3
- package/dist/{circular-progress-BAlic8HY.js.map → circular-progress-BARPJm-e.js.map} +1 -1
- package/dist/{circular-progress-CfPyDLX6.cjs → circular-progress-BDZFB3WR.cjs} +2 -2
- package/dist/{circular-progress-CfPyDLX6.cjs.map → circular-progress-BDZFB3WR.cjs.map} +1 -1
- package/dist/circular-progress.cjs +1 -1
- package/dist/circular-progress.js +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-BiVj9uxF.js → code-preview-BxswKcO8.js} +2 -2
- package/dist/{code-preview-BiVj9uxF.js.map → code-preview-BxswKcO8.js.map} +1 -1
- package/dist/{code-preview-DtvCblTa.cjs → code-preview-CFnSKSqn.cjs} +2 -2
- package/dist/{code-preview-DtvCblTa.cjs.map → code-preview-CFnSKSqn.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-Cq8Wdd8b.cjs +131 -0
- package/dist/date-range-Cq8Wdd8b.cjs.map +1 -0
- package/dist/date-range-Fij9AQth.js +638 -0
- package/dist/date-range-Fij9AQth.js.map +1 -0
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-KEyQxDNp.cjs → delay-YfksbdSk.cjs} +2 -2
- package/dist/{delay-KEyQxDNp.cjs.map → delay-YfksbdSk.cjs.map} +1 -1
- package/dist/{delay-BdXEKapp.js → delay-aA1TyZTr.js} +2 -2
- package/dist/{delay-BdXEKapp.js.map → delay-aA1TyZTr.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{dialog-content-D3sFNuVs.js → dialog-content-DpotaqHz.js} +3 -3
- package/dist/{dialog-content-D3sFNuVs.js.map → dialog-content-DpotaqHz.js.map} +1 -1
- package/dist/{dialog-content-D5YTttrK.cjs → dialog-content-NyJfG7nL.cjs} +2 -2
- package/dist/{dialog-content-D5YTttrK.cjs.map → dialog-content-NyJfG7nL.cjs.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{divider-CNXiMvWd.js → divider-CEMmRD_e.js} +3 -3
- package/dist/{divider-CNXiMvWd.js.map → divider-CEMmRD_e.js.map} +1 -1
- package/dist/{divider-CDz3pUAy.cjs → divider-CMM91UNF.cjs} +2 -2
- package/dist/{divider-CDz3pUAy.cjs.map → divider-CMM91UNF.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-jlq_cqLS.cjs → dropdown-content-CUn_E7cR.cjs} +2 -2
- package/dist/{dropdown-content-jlq_cqLS.cjs.map → dropdown-content-CUn_E7cR.cjs.map} +1 -1
- package/dist/{dropdown-content-CVz6zPSO.js → dropdown-content-Cw5wN3oE.js} +3 -3
- package/dist/{dropdown-content-CVz6zPSO.js.map → dropdown-content-Cw5wN3oE.js.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-DFatBgot.cjs → flex-B9AdlerG.cjs} +2 -2
- package/dist/{flex-DFatBgot.cjs.map → flex-B9AdlerG.cjs.map} +1 -1
- package/dist/{flex-TjhbDSMX.js → flex-ChnKQLCI.js} +2 -2
- package/dist/{flex-TjhbDSMX.js.map → flex-ChnKQLCI.js.map} +1 -1
- package/dist/{form-ClDdYqke.cjs → form-BdGYvvVv.cjs} +2 -2
- package/dist/{form-ClDdYqke.cjs.map → form-BdGYvvVv.cjs.map} +1 -1
- package/dist/{form-D-auKn-K.js → form-DNXmZlmc.js} +2 -2
- package/dist/{form-D-auKn-K.js.map → form-DNXmZlmc.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-BfY2ZJUE.js → icon-BzxYzucF.js} +2 -2
- package/dist/{icon-BfY2ZJUE.js.map → icon-BzxYzucF.js.map} +1 -1
- package/dist/{icon-D2xGQiZb.cjs → icon-CiYXCpzk.cjs} +2 -2
- package/dist/{icon-D2xGQiZb.cjs.map → icon-CiYXCpzk.cjs.map} +1 -1
- package/dist/{icon-button-BUkdhu_-.cjs → icon-button-CVF8ZGrd.cjs} +2 -2
- package/dist/{icon-button-BUkdhu_-.cjs.map → icon-button-CVF8ZGrd.cjs.map} +1 -1
- package/dist/{icon-button-yKwaljg0.js → icon-button-VqejfzxG.js} +3 -3
- package/dist/{icon-button-yKwaljg0.js.map → icon-button-VqejfzxG.js.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 +42 -42
- package/dist/input-DfBGrUet.cjs +122 -0
- package/dist/input-DfBGrUet.cjs.map +1 -0
- package/dist/input-d4jaMv22.js +487 -0
- package/dist/input-d4jaMv22.js.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-BO9C13wk.cjs → list-DN2eHabm.cjs} +2 -2
- package/dist/{list-BO9C13wk.cjs.map → list-DN2eHabm.cjs.map} +1 -1
- package/dist/{list-CHZKII-L.js → list-L1m51qC0.js} +2 -2
- package/dist/{list-CHZKII-L.js.map → list-L1m51qC0.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-CUibxXWX.cjs → litElement.mixin-CejONOpd.cjs} +2 -2
- package/dist/{litElement.mixin-CUibxXWX.cjs.map → litElement.mixin-CejONOpd.cjs.map} +1 -1
- package/dist/{litElement.mixin-5RC72TVS.js → litElement.mixin-D-SDs-Ez.js} +2 -2
- package/dist/{litElement.mixin-5RC72TVS.js.map → litElement.mixin-D-SDs-Ez.js.map} +1 -1
- package/dist/{media-4arP4Xi0.js → media-C0AR69S2.js} +2 -2
- package/dist/{media-4arP4Xi0.js.map → media-C0AR69S2.js.map} +1 -1
- package/dist/{media-v2LZA3zQ.cjs → media-yXym3iTa.cjs} +2 -2
- package/dist/{media-v2LZA3zQ.cjs.map → media-yXym3iTa.cjs.map} +1 -1
- package/dist/{menu-DvcxRQrY.js → menu-Bhh6qxR6.js} +3 -3
- package/dist/{menu-DvcxRQrY.js.map → menu-Bhh6qxR6.js.map} +1 -1
- package/dist/{menu-C-ZpBMON.cjs → menu-CKDW29ZR.cjs} +2 -2
- package/dist/{menu-C-ZpBMON.cjs.map → menu-CKDW29ZR.cjs.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/{notification-service-CcapAF2G.js → notification-service-CG4XTrXU.js} +3 -3
- package/dist/{notification-service-CcapAF2G.js.map → notification-service-CG4XTrXU.js.map} +1 -1
- package/dist/{notification-service-BXTqvkWg.cjs → notification-service-CRbqdLm_.cjs} +2 -2
- package/dist/{notification-service-BXTqvkWg.cjs.map → notification-service-CRbqdLm_.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-xSW3D1j5.js → option-Cj25fsD1.js} +2 -2
- package/dist/{option-xSW3D1j5.js.map → option-Cj25fsD1.js.map} +1 -1
- package/dist/{option-Cj3xNzQG.cjs → option-DFNHF3bL.cjs} +2 -2
- package/dist/{option-Cj3xNzQG.cjs.map → option-DFNHF3bL.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-CdNQkQa5.cjs → payment-card-form-CEANJmNw.cjs} +2 -2
- package/dist/{payment-card-form-CdNQkQa5.cjs.map → payment-card-form-CEANJmNw.cjs.map} +1 -1
- package/dist/{payment-card-form-B-W0YXS5.js → payment-card-form-YzyxteTK.js} +3 -3
- package/dist/{payment-card-form-B-W0YXS5.js.map → payment-card-form-YzyxteTK.js.map} +1 -1
- package/dist/{radio-button-WeQklCIj.cjs → radio-button-BVeem3E9.cjs} +2 -2
- package/dist/{radio-button-WeQklCIj.cjs.map → radio-button-BVeem3E9.cjs.map} +1 -1
- package/dist/{radio-button-CNrcOMLm.js → radio-button-CBcYZCqv.js} +2 -2
- package/dist/{radio-button-CNrcOMLm.js.map → radio-button-CBcYZCqv.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{schmancy-steps-container-kh5hz8Q8.cjs → schmancy-steps-container-B-Bvr-wZ.cjs} +2 -2
- package/dist/{schmancy-steps-container-kh5hz8Q8.cjs.map → schmancy-steps-container-B-Bvr-wZ.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-DTR_ppqJ.js → schmancy-steps-container-BACX3hp6.js} +2 -2
- package/dist/{schmancy-steps-container-DTR_ppqJ.js.map → schmancy-steps-container-BACX3hp6.js.map} +1 -1
- package/dist/{select-D6OdooZd.cjs → select-Cr15D48_.cjs} +2 -2
- package/dist/{select-D6OdooZd.cjs.map → select-Cr15D48_.cjs.map} +1 -1
- package/dist/{select-BeStY5QU.js → select-IgXxVwZQ.js} +3 -3
- package/dist/{select-BeStY5QU.js.map → select-IgXxVwZQ.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-DurXVAka.js → sheet-9m-LkKNU.js} +4 -4
- package/dist/{sheet-DurXVAka.js.map → sheet-9m-LkKNU.js.map} +1 -1
- package/dist/{sheet-BHdCyBYA.cjs → sheet-u1RXiD4G.cjs} +2 -2
- package/dist/{sheet-BHdCyBYA.cjs.map → sheet-u1RXiD4G.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{slider-eKHfEAqk.cjs → slider-BFJ0OVq5.cjs} +2 -2
- package/dist/{slider-eKHfEAqk.cjs.map → slider-BFJ0OVq5.cjs.map} +1 -1
- package/dist/{slider-CcOPTwfV.js → slider-BvOKAD4l.js} +3 -3
- package/dist/{slider-CcOPTwfV.js.map → slider-BvOKAD4l.js.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-0BTyqnFH.cjs → spinner-CRWcQJjQ.cjs} +2 -2
- package/dist/{spinner-0BTyqnFH.cjs.map → spinner-CRWcQJjQ.cjs.map} +1 -1
- package/dist/{spinner-BcaOyZIW.js → spinner-jaFB6wer.js} +3 -3
- package/dist/{spinner-BcaOyZIW.js.map → spinner-jaFB6wer.js.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-DhTA5nKg.cjs → surface-CTlwMC6K.cjs} +2 -2
- package/dist/{surface-DhTA5nKg.cjs.map → surface-CTlwMC6K.cjs.map} +1 -1
- package/dist/{surface-XqJoAcEI.js → surface-D7X23FXb.js} +2 -2
- package/dist/{surface-XqJoAcEI.js.map → surface-D7X23FXb.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-DPfOXBUJ.cjs → table-0HYVgRpO.cjs} +2 -2
- package/dist/{table-DPfOXBUJ.cjs.map → table-0HYVgRpO.cjs.map} +1 -1
- package/dist/{table-Dy5Fqu4G.js → table-Dwrox4AT.js} +2 -2
- package/dist/{table-Dy5Fqu4G.js.map → table-Dwrox4AT.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-BqSkFV08.js → tabs-compatibility-CHTrE420.js} +2 -2
- package/dist/{tabs-compatibility-BqSkFV08.js.map → tabs-compatibility-CHTrE420.js.map} +1 -1
- package/dist/{tabs-compatibility-TPaYG7ev.cjs → tabs-compatibility-DFaq5_66.cjs} +2 -2
- package/dist/{tabs-compatibility-TPaYG7ev.cjs.map → tabs-compatibility-DFaq5_66.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-Dx35wOig.js +43 -0
- package/dist/{tailwind.mixin-DpiTmETl.js.map → tailwind.mixin-Dx35wOig.js.map} +1 -1
- package/dist/tailwind.mixin-xwSbeHSt.cjs +2 -0
- package/dist/{tailwind.mixin-C6mrbvH3.cjs.map → tailwind.mixin-xwSbeHSt.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-Dy7B8B0d.cjs → textarea-D7NLGUQL.cjs} +2 -2
- package/dist/{textarea-Dy7B8B0d.cjs.map → textarea-D7NLGUQL.cjs.map} +1 -1
- package/dist/{textarea-Ba8gRDPS.js → textarea-Dx-DzkDe.js} +2 -2
- package/dist/{textarea-Ba8gRDPS.js.map → textarea-Dx-DzkDe.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-Bnm7IL1u.cjs → theme-button-25FKBtFN.cjs} +2 -2
- package/dist/{theme-button-Bnm7IL1u.cjs.map → theme-button-25FKBtFN.cjs.map} +1 -1
- package/dist/{theme-button-COwSZ83Y.js → theme-button-C97XGkCl.js} +2 -2
- package/dist/{theme-button-COwSZ83Y.js.map → theme-button-C97XGkCl.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-BV_e_mXY.js → theme.component-BAA4DyC6.js} +2 -2
- package/dist/{theme.component-BV_e_mXY.js.map → theme.component-BAA4DyC6.js.map} +1 -1
- package/dist/{theme.component-UBy29B7c.cjs → theme.component-DIXxdhcR.cjs} +2 -2
- package/dist/{theme.component-UBy29B7c.cjs.map → theme.component-DIXxdhcR.cjs.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-DBxPtZan.cjs → timezone-BWn9DNZY.cjs} +2 -2
- package/dist/{timezone-DBxPtZan.cjs.map → timezone-BWn9DNZY.cjs.map} +1 -1
- package/dist/{timezone-DEhkif2j.js → timezone-BurrHk00.js} +3 -3
- package/dist/{timezone-DEhkif2j.js.map → timezone-BurrHk00.js.map} +1 -1
- package/dist/{tooltip-D0coQKih.js → tooltip-Dy5bvLg8.js} +2 -2
- package/dist/{tooltip-D0coQKih.js.map → tooltip-Dy5bvLg8.js.map} +1 -1
- package/dist/{tooltip-CTBMN8M6.cjs → tooltip-dz3rb8at.cjs} +2 -2
- package/dist/{tooltip-CTBMN8M6.cjs.map → tooltip-dz3rb8at.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-Zy0XMFKh.js → tree-DzHOYcn8.js} +2 -2
- package/dist/{tree-Zy0XMFKh.js.map → tree-DzHOYcn8.js.map} +1 -1
- package/dist/{tree-Co4Ithrh.cjs → tree-z1EoelBs.cjs} +2 -2
- package/dist/{tree-Co4Ithrh.cjs.map → tree-z1EoelBs.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-C0InniFB.js → typewriter-BiBJSC2J.js} +4 -4
- package/dist/{typewriter-C0InniFB.js.map → typewriter-BiBJSC2J.js.map} +1 -1
- package/dist/{typewriter-soteXIt4.cjs → typewriter-D_bqiukY.cjs} +2 -2
- package/dist/{typewriter-soteXIt4.cjs.map → typewriter-D_bqiukY.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-Bw9baiV3.cjs → typography-BLenYAmX.cjs} +2 -2
- package/dist/{typography-Bw9baiV3.cjs.map → typography-BLenYAmX.cjs.map} +1 -1
- package/dist/{typography-CeTZ2VqE.js → typography-DtpDTIi7.js} +2 -2
- package/dist/{typography-CeTZ2VqE.js.map → typography-DtpDTIi7.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/dist/date-range-BLs8_7pI.js +0 -609
- package/dist/date-range-BLs8_7pI.js.map +0 -1
- package/dist/date-range-Ch_Ir3s1.cjs +0 -117
- package/dist/date-range-Ch_Ir3s1.cjs.map +0 -1
- package/dist/input-B3GMd-FZ.js +0 -363
- package/dist/input-B3GMd-FZ.js.map +0 -1
- package/dist/input-By2O_8YL.cjs +0 -111
- package/dist/input-By2O_8YL.cjs.map +0 -1
- package/dist/tailwind.mixin-C6mrbvH3.cjs +0 -2
- package/dist/tailwind.mixin-DpiTmETl.js +0 -43
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import { nothing as E, html as b, LitElement as w } from "lit";
|
|
2
|
+
import { property as i, query as k, state as f, customElement as V } from "lit/decorators.js";
|
|
3
|
+
import { ifDefined as h } from "lit/directives/if-defined.js";
|
|
4
|
+
import { createRef as S, ref as R } from "lit/directives/ref.js";
|
|
5
|
+
import { when as x } from "lit/directives/when.js";
|
|
6
|
+
import { fromEvent as p, map as $, takeUntil as d, distinctUntilChanged as C, filter as v } from "rxjs";
|
|
7
|
+
import "lit/directives/class-map.js";
|
|
8
|
+
import "lit/directives/style-map.js";
|
|
9
|
+
import { T as z } from "./tailwind.mixin-Dx35wOig.js";
|
|
10
|
+
import { c as g } from "./ripple-BumgqsDT.js";
|
|
11
|
+
import { S as c } from "./theme.interface-C5Kj6WjD.js";
|
|
12
|
+
const O = ":host{border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important;width:-webkit-fill-available}:host:focus{box-shadow:unset!important}input:focus-visible{outline:none!important}input{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;text-decoration:inherit;text-indent:inherit;text-shadow:inherit;text-overflow:inherit;text-rendering:inherit;text-size-adjust:inherit;text-align-last:inherit}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}@keyframes onAutoFillStart{}input:-webkit-autofill{animation-name:onAutoFillStart}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-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;transition:background-color 5000s ease-in-out 0s}@-moz-document url-prefix(){input:-moz-autofill,input:-moz-autofill:focus{background-color:var(--schmancy-sys-color-surface-highest)!important;color:var(--schmancy-sys-color-surface-on)!important}}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{background-color:var(--schmancy-sys-color-surface-highest)!important;color:var(--schmancy-sys-color-surface-on)!important}";
|
|
13
|
+
var I = Object.defineProperty, T = Object.getOwnPropertyDescriptor, r = (t, e, n, l) => {
|
|
14
|
+
for (var m, u = l > 1 ? void 0 : l ? T(e, n) : e, y = t.length - 1; y >= 0; y--) (m = t[y]) && (u = (l ? m(e, n, u) : m(u)) || u);
|
|
15
|
+
return l && u && I(e, n, u), u;
|
|
16
|
+
};
|
|
17
|
+
let s = class extends z(O) {
|
|
18
|
+
constructor() {
|
|
19
|
+
if (super(), this.id = "", this.label = "", this.type = "text", this.name = `name_${Date.now()}`, this.placeholder = "", this.value = "", this.required = !1, this.disabled = !1, this.readonly = !1, this.clickable = !1, this.spellcheck = !1, this.align = "left", this.autofocus = !1, this.autocomplete = "on", this.tabIndex = 0, this.error = !1, this.size = "md", this.validateOn = "touched", this.validationMessage = "", this.inputRef = S(), this.isAutofilled = !1, this.touched = !1, this.dirty = !1, this.submitted = !1, this.defaultValue = "", "attachInternals" in this) try {
|
|
20
|
+
this.internals = this.attachInternals();
|
|
21
|
+
} catch {
|
|
22
|
+
this.internals = void 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
willUpdate(t) {
|
|
26
|
+
this.id || (this.id = "sch-input-" + s._idCounter++), super.willUpdate(t);
|
|
27
|
+
}
|
|
28
|
+
get form() {
|
|
29
|
+
return this.internals?.form ?? null;
|
|
30
|
+
}
|
|
31
|
+
updated(t) {
|
|
32
|
+
super.updated(t), t.has("value") && (this.value !== this.defaultValue && (this.dirty = !0), this.internals?.setFormValue(this.value), this.validateInput()), t.has("error") && this.updateValidityState(), !this.hasUpdated && t.has("value") && (this.defaultValue = this.value);
|
|
33
|
+
}
|
|
34
|
+
connectedCallback() {
|
|
35
|
+
super.connectedCallback(), this.defaultValue = this.value, this.setupFormIntegration(), this.setupExternalLabelAssociation();
|
|
36
|
+
}
|
|
37
|
+
setupFormIntegration() {
|
|
38
|
+
this.internals?.form && (this.formResetObserver = new MutationObserver((t) => {
|
|
39
|
+
for (const e of t) e.type === "attributes" && e.attributeName === "reset" && this.resetToDefault();
|
|
40
|
+
}), this.formResetObserver.observe(this.internals.form, { attributes: !0, childList: !1, subtree: !1 }), this.internals.form.addEventListener("reset", () => {
|
|
41
|
+
this.resetToDefault();
|
|
42
|
+
}), this.internals.form.addEventListener("submit", () => {
|
|
43
|
+
this.submitted = !0, this.validateInput(!0);
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
setupExternalLabelAssociation() {
|
|
47
|
+
if (this.id) {
|
|
48
|
+
const t = () => {
|
|
49
|
+
document.querySelectorAll(`label[for="${this.id}"]`).forEach((e) => {
|
|
50
|
+
e.addEventListener("click", () => {
|
|
51
|
+
this.focus();
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
document.readyState === "complete" ? t() : document.addEventListener("DOMContentLoaded", t);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
disconnectedCallback() {
|
|
59
|
+
super.disconnectedCallback(), this.formResetObserver && this.formResetObserver.disconnect(), this.id && document.querySelectorAll(`label[for="${this.id}"]`).forEach((t) => {
|
|
60
|
+
t.removeEventListener("click", () => {
|
|
61
|
+
this.focus();
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
resetToDefault() {
|
|
66
|
+
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 }));
|
|
67
|
+
}
|
|
68
|
+
shouldShowValidation(t = !1) {
|
|
69
|
+
if (t) return !0;
|
|
70
|
+
switch (this.validateOn) {
|
|
71
|
+
case "always":
|
|
72
|
+
return !0;
|
|
73
|
+
case "touched":
|
|
74
|
+
default:
|
|
75
|
+
return this.touched;
|
|
76
|
+
case "dirty":
|
|
77
|
+
return this.dirty;
|
|
78
|
+
case "submitted":
|
|
79
|
+
return this.submitted;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
updateValidityState() {
|
|
83
|
+
this.error ? this.validationMessage ? this.internals?.setValidity({ customError: !0 }, this.validationMessage, this.inputElement) : this.internals?.setValidity({ customError: !0 }, "Invalid input", this.inputElement) : this.internals?.setValidity({});
|
|
84
|
+
}
|
|
85
|
+
validateInput(t = !1) {
|
|
86
|
+
if (this.disabled) return;
|
|
87
|
+
const e = this.shouldShowValidation(t), n = this.inputElement?.validity ?? { customError: !1, valid: !0 }, l = !n.valid && !n.customError;
|
|
88
|
+
e && l ? (this.error = !0, this.validationMessage = this.inputElement?.validationMessage || "") : n.valid ? (this.error = !1, n.customError || (this.validationMessage = "")) : e || (this.error = !1), this.updateValidityState();
|
|
89
|
+
}
|
|
90
|
+
checkValidity() {
|
|
91
|
+
const t = this.inputRef.value?.checkValidity() ?? !0;
|
|
92
|
+
return this.internals && !t ? (this.internals.checkValidity(), !1) : t;
|
|
93
|
+
}
|
|
94
|
+
reportValidity() {
|
|
95
|
+
this.touched = !0, this.submitted = !0;
|
|
96
|
+
const t = this.inputRef.value?.reportValidity() ?? !0;
|
|
97
|
+
return this.validateInput(!0), this.internals && !t ? (this.internals.reportValidity(), !1) : t;
|
|
98
|
+
}
|
|
99
|
+
setCustomValidity(t) {
|
|
100
|
+
this.inputRef.value && this.inputRef.value.setCustomValidity(t), this.validationMessage = t, this.error = t !== "" && this.shouldShowValidation(), this.internals && (t ? this.internals.setValidity({ customError: !0 }, t, this.inputElement) : this.internals.setValidity({}));
|
|
101
|
+
}
|
|
102
|
+
firstUpdated() {
|
|
103
|
+
this.autofocus && setTimeout(() => {
|
|
104
|
+
this.focus();
|
|
105
|
+
}, 0), this.setupInputEvents(), this.setupFocusBlurEvents(), this.setupAutofillDetection(), this.setupEnterKeyEvents();
|
|
106
|
+
}
|
|
107
|
+
setupInputEvents() {
|
|
108
|
+
p(this.inputElement, "input").pipe($((t) => {
|
|
109
|
+
const e = t;
|
|
110
|
+
return { value: t.target.value, inputType: e.inputType, data: e.data, isComposing: e.isComposing, originalEvent: t };
|
|
111
|
+
}), d(this.disconnecting)).subscribe((t) => {
|
|
112
|
+
this.value = t.value, this.dirty = this.value !== this.defaultValue;
|
|
113
|
+
const e = new CustomEvent("input", { detail: { value: t.value }, bubbles: !0, composed: !0 });
|
|
114
|
+
Object.defineProperties(e, { inputType: { value: t.inputType }, data: { value: t.data }, isComposing: { value: t.isComposing } }), this.dispatchEvent(e), this.validateInput();
|
|
115
|
+
}), p(this.inputElement, "change").pipe($((t) => t.target.value), C(), d(this.disconnecting)).subscribe((t) => {
|
|
116
|
+
this.value = t, this.dirty = this.value !== this.defaultValue, this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 })), this.validateInput();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
setupFocusBlurEvents() {
|
|
120
|
+
p(this.inputElement, "focus").pipe(d(this.disconnecting)).subscribe((t) => {
|
|
121
|
+
const e = new CustomEvent("focus", { bubbles: t.bubbles, cancelable: t.cancelable, composed: t.composed });
|
|
122
|
+
Object.defineProperties(e, { relatedTarget: { value: t.relatedTarget } }), this.dispatchEvent(e);
|
|
123
|
+
}), p(this.inputElement, "blur").pipe(d(this.disconnecting)).subscribe((t) => {
|
|
124
|
+
this.touched = !0, this.disabled || this.validateInput();
|
|
125
|
+
const e = new CustomEvent("blur", { bubbles: t.bubbles, cancelable: t.cancelable, composed: t.composed });
|
|
126
|
+
Object.defineProperties(e, { relatedTarget: { value: t.relatedTarget } }), this.dispatchEvent(e);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
setupAutofillDetection() {
|
|
130
|
+
p(this.inputElement, "animationstart").pipe(v((t) => t.animationName === "onAutoFillStart"), d(this.disconnecting)).subscribe((t) => {
|
|
131
|
+
const { value: e } = t.target;
|
|
132
|
+
this.value = e, this.isAutofilled = !0, this.dirty = this.value !== this.defaultValue, this.dispatchEvent(new CustomEvent("autofill", { detail: { value: e }, bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("change", { detail: { value: e }, bubbles: !0, composed: !0 }));
|
|
133
|
+
}), p(this.inputElement, "animationstart").pipe(v((t) => t.animationName === "onAutoFillCancel"), d(this.disconnecting)).subscribe(() => {
|
|
134
|
+
this.isAutofilled = !1;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
setupEnterKeyEvents() {
|
|
138
|
+
p(this.inputElement, "keyup").pipe(v((t) => t.key === "Enter"), d(this.disconnecting)).subscribe((t) => {
|
|
139
|
+
const { value: e } = t.target;
|
|
140
|
+
this.value = e, this.dirty = this.value !== this.defaultValue;
|
|
141
|
+
const n = new CustomEvent("enter", { detail: { value: e }, bubbles: !0, composed: !0 });
|
|
142
|
+
Object.defineProperties(n, { key: { value: "Enter" }, code: { value: "Enter" }, keyCode: { value: 13 }, which: { value: 13 } }), this.dispatchEvent(n);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
select() {
|
|
146
|
+
return this.inputRef.value?.select();
|
|
147
|
+
}
|
|
148
|
+
getValidity() {
|
|
149
|
+
return this.inputRef.value?.validity;
|
|
150
|
+
}
|
|
151
|
+
setSelectionRange(t, e, n) {
|
|
152
|
+
this.inputRef.value?.setSelectionRange(t, e, n);
|
|
153
|
+
}
|
|
154
|
+
get selectionStart() {
|
|
155
|
+
return this.inputRef.value?.selectionStart ?? null;
|
|
156
|
+
}
|
|
157
|
+
get selectionEnd() {
|
|
158
|
+
return this.inputRef.value?.selectionEnd ?? null;
|
|
159
|
+
}
|
|
160
|
+
get selectionDirection() {
|
|
161
|
+
return this.inputRef.value?.selectionDirection ?? null;
|
|
162
|
+
}
|
|
163
|
+
setRangeText(t, e, n, l) {
|
|
164
|
+
e !== void 0 && n !== void 0 ? this.inputRef.value?.setRangeText(t, e, n, l) : this.inputRef.value?.setRangeText(t);
|
|
165
|
+
}
|
|
166
|
+
focus(t) {
|
|
167
|
+
this.inputRef.value?.focus(t), this.dispatchEvent(new Event("focus"));
|
|
168
|
+
}
|
|
169
|
+
click() {
|
|
170
|
+
this.inputRef.value?.click(), this.dispatchEvent(new Event("click"));
|
|
171
|
+
}
|
|
172
|
+
blur() {
|
|
173
|
+
this.inputRef.value?.blur(), this.dispatchEvent(new Event("blur"));
|
|
174
|
+
}
|
|
175
|
+
render() {
|
|
176
|
+
const { height: t, padding: e, fontSize: n } = (() => {
|
|
177
|
+
switch (this.size) {
|
|
178
|
+
case "sm":
|
|
179
|
+
return { height: "40px", padding: "0 8px", fontSize: "0.875rem" };
|
|
180
|
+
case "lg":
|
|
181
|
+
return { height: "60px", padding: "0 20px", fontSize: "1.125rem" };
|
|
182
|
+
default:
|
|
183
|
+
return { height: "50px", padding: "0 16px", fontSize: "1rem" };
|
|
184
|
+
}
|
|
185
|
+
})(), l = { "w-full flex-1 rounded-[8px] border-0 bg-surface-highest text-surface-on": !0, "outline-secondary-default focus:outline-1 ": !0, "outline-secondary-default focus:outline-1": !0, "disabled:opacity-40 disabled:cursor-not-allowed": !0, "placeholder:text-muted": !0, "ring-0 ring-inset focus:ring-1 focus:ring-inset": !0, "ring-secondary-default ring-outline focus:ring-secondary-default": !this.error, "ring-error-default focus:ring-error-default": this.error, "caret-transparent focus:outline-hidden cursor-pointer text-select-none": this.readonly, "cursor-pointer": this.clickable, "text-center": this.align === "center", "text-right": this.align === "right", autofilled: this.isAutofilled }, m = { "opacity-40": this.disabled, "block mb-[4px]": !0, "text-sm": this.size === "sm", "text-base": this.size === "md", "text-lg": this.size === "lg" }, u = { height: t, padding: e, fontSize: n };
|
|
186
|
+
return b`
|
|
187
|
+
${x(this.label, () => b`
|
|
188
|
+
<label
|
|
189
|
+
for=${this.id}
|
|
190
|
+
id="label-${this.id}"
|
|
191
|
+
class=${this.classMap(m)}
|
|
192
|
+
${g({ color: this.error ? c.sys.color.error.default : c.sys.color.primary.default })}
|
|
193
|
+
>
|
|
194
|
+
<schmancy-typography type="label" token=${this.size === "sm" ? "sm" : this.size === "lg" ? "lg" : "md"}>
|
|
195
|
+
${this.label}
|
|
196
|
+
</schmancy-typography>
|
|
197
|
+
</label>
|
|
198
|
+
`)}
|
|
199
|
+
|
|
200
|
+
<input
|
|
201
|
+
${g({ bgColor: c.sys.color.surface.highest, color: c.sys.color.surface.on })}
|
|
202
|
+
${R(this.inputRef)}
|
|
203
|
+
id=${this.id}
|
|
204
|
+
name=${this.name}
|
|
205
|
+
class=${this.classMap(l)}
|
|
206
|
+
style=${this.styleMap(u)}
|
|
207
|
+
.value=${this.value}
|
|
208
|
+
.type=${this.type}
|
|
209
|
+
.autocomplete=${this.autocomplete}
|
|
210
|
+
.spellcheck=${this.spellcheck}
|
|
211
|
+
placeholder=${this.placeholder}
|
|
212
|
+
inputmode=${h(this.inputmode)}
|
|
213
|
+
pattern=${h(this.pattern)}
|
|
214
|
+
step=${h(this.step)}
|
|
215
|
+
minlength=${h(this.minlength)}
|
|
216
|
+
maxlength=${h(this.maxlength)}
|
|
217
|
+
min=${h(this.min)}
|
|
218
|
+
max=${h(this.max)}
|
|
219
|
+
list=${h(this.list)}
|
|
220
|
+
?required=${this.required}
|
|
221
|
+
?disabled=${this.disabled}
|
|
222
|
+
?readonly=${this.readonly}
|
|
223
|
+
aria-invalid=${this.error ? "true" : "false"}
|
|
224
|
+
aria-required=${this.required ? "true" : "false"}
|
|
225
|
+
aria-labelledby=${this.label ? `label-${this.id}` : E}
|
|
226
|
+
aria-describedby=${this.hint ? `hint-${this.id}` : E}
|
|
227
|
+
aria-label=${h(this.label ? void 0 : this.placeholder || "Input")}
|
|
228
|
+
aria-autocomplete=${this.list ? "list" : "none"}
|
|
229
|
+
/>
|
|
230
|
+
|
|
231
|
+
${x(this.hint, () => b`
|
|
232
|
+
<div
|
|
233
|
+
id="hint-${this.id}"
|
|
234
|
+
class="${this.size === "sm" ? "pt-[1px] text-xs" : this.size === "lg" ? "pt-[3px] text-base" : "pt-[2px] text-sm"}"
|
|
235
|
+
${g({ color: this.error ? c.sys.color.error.default : c.sys.color.primary.default })}
|
|
236
|
+
>
|
|
237
|
+
<schmancy-typography
|
|
238
|
+
align="left"
|
|
239
|
+
type="label"
|
|
240
|
+
token=${this.size === "sm" ? "sm" : this.size === "lg" ? "lg" : "md"}
|
|
241
|
+
>
|
|
242
|
+
${this.hint}
|
|
243
|
+
</schmancy-typography>
|
|
244
|
+
</div>
|
|
245
|
+
`)}
|
|
246
|
+
`;
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
s._idCounter = 0, s.formAssociated = !0, s.shadowRootOptions = { ...w.shadowRootOptions, delegatesFocus: !0 }, r([i({ reflect: !0 })], s.prototype, "id", 2), r([i({ type: String })], s.prototype, "label", 2), r([i({ reflect: !0 })], s.prototype, "type", 2), r([i()], s.prototype, "name", 2), r([i()], s.prototype, "placeholder", 2), r([i({ type: String, reflect: !0 })], s.prototype, "value", 2), r([i({ type: String, reflect: !0 })], s.prototype, "pattern", 2), r([i({ type: Boolean, reflect: !0 })], s.prototype, "required", 2), r([i({ type: Boolean, reflect: !0 })], s.prototype, "disabled", 2), r([i({ type: Boolean, reflect: !0 })], s.prototype, "readonly", 2), r([i({ type: Boolean, reflect: !0 })], s.prototype, "clickable", 2), r([i({ type: Boolean, reflect: !0 })], s.prototype, "spellcheck", 2), r([i({ type: String, reflect: !0 })], s.prototype, "align", 2), r([i()], s.prototype, "inputmode", 2), r([i({ type: Number, reflect: !0 })], s.prototype, "minlength", 2), r([i({ type: Number })], s.prototype, "maxlength", 2), r([i()], s.prototype, "min", 2), r([i()], s.prototype, "max", 2), r([i({ type: Number, reflect: !0 })], s.prototype, "step", 2), r([i({ type: Boolean })], s.prototype, "autofocus", 2), r([i({ type: String, reflect: !0 })], s.prototype, "autocomplete", 2), r([i({ type: Number, reflect: !0 })], s.prototype, "tabIndex", 2), r([i()], s.prototype, "hint", 2), r([i({ type: Boolean, reflect: !0 })], s.prototype, "error", 2), r([i({ type: String, reflect: !0 })], s.prototype, "size", 2), r([i({ type: String })], s.prototype, "validateOn", 2), r([i({ type: String })], s.prototype, "list", 2), r([i({ type: String })], s.prototype, "validationMessage", 2), r([k("input")], s.prototype, "inputElement", 2), r([f()], s.prototype, "isAutofilled", 2), r([f()], s.prototype, "touched", 2), r([f()], s.prototype, "dirty", 2), r([f()], s.prototype, "submitted", 2), r([f()], s.prototype, "defaultValue", 2), s = r([V("sch-input")], s);
|
|
250
|
+
var A = Object.defineProperty, M = Object.getOwnPropertyDescriptor, o = (t, e, n, l) => {
|
|
251
|
+
for (var m, u = l > 1 ? void 0 : l ? M(e, n) : e, y = t.length - 1; y >= 0; y--) (m = t[y]) && (u = (l ? m(e, n, u) : m(u)) || u);
|
|
252
|
+
return l && u && A(e, n, u), u;
|
|
253
|
+
};
|
|
254
|
+
let a = class extends z(O) {
|
|
255
|
+
constructor() {
|
|
256
|
+
if (super(), this.id = "", this.label = "", this.type = "text", this.name = `name_${Date.now()}`, this.placeholder = "", this.value = "", this.required = !1, this.disabled = !1, this.readonly = !1, this.clickable = !1, this.spellcheck = !1, this.align = "left", this.autofocus = !1, this.autocomplete = "on", this.tabIndex = 0, this.error = !1, this.size = "md", this.validateOn = "touched", this.validationMessage = "", this.inputRef = S(), this.isAutofilled = !1, this.touched = !1, this.dirty = !1, this.submitted = !1, this.defaultValue = "", "attachInternals" in this) try {
|
|
257
|
+
this.internals = this.attachInternals();
|
|
258
|
+
} catch {
|
|
259
|
+
this.internals = void 0;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
willUpdate(t) {
|
|
263
|
+
this.id || (this.id = "sch-input-" + a._idCounter++), super.willUpdate(t);
|
|
264
|
+
}
|
|
265
|
+
get form() {
|
|
266
|
+
return this.internals?.form ?? null;
|
|
267
|
+
}
|
|
268
|
+
updated(t) {
|
|
269
|
+
super.updated(t), t.has("value") && (this.value !== this.defaultValue && (this.dirty = !0), this.internals?.setFormValue(this.value), this.validateInput()), t.has("error") && this.updateValidityState(), !this.hasUpdated && t.has("value") && (this.defaultValue = this.value);
|
|
270
|
+
}
|
|
271
|
+
connectedCallback() {
|
|
272
|
+
super.connectedCallback(), this.defaultValue = this.value, this.setupFormIntegration(), this.setupExternalLabelAssociation();
|
|
273
|
+
}
|
|
274
|
+
setupFormIntegration() {
|
|
275
|
+
this.internals?.form && (this.formResetObserver = new MutationObserver((t) => {
|
|
276
|
+
for (const e of t) e.type === "attributes" && e.attributeName === "reset" && this.resetToDefault();
|
|
277
|
+
}), this.formResetObserver.observe(this.internals.form, { attributes: !0, childList: !1, subtree: !1 }), this.internals.form.addEventListener("reset", () => {
|
|
278
|
+
this.resetToDefault();
|
|
279
|
+
}), this.internals.form.addEventListener("submit", () => {
|
|
280
|
+
this.submitted = !0, this.validateInput(!0);
|
|
281
|
+
}));
|
|
282
|
+
}
|
|
283
|
+
setupExternalLabelAssociation() {
|
|
284
|
+
if (this.id) {
|
|
285
|
+
const t = () => {
|
|
286
|
+
document.querySelectorAll(`label[for="${this.id}"]`).forEach((e) => {
|
|
287
|
+
e.addEventListener("click", () => {
|
|
288
|
+
this.focus();
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
};
|
|
292
|
+
document.readyState === "complete" ? t() : document.addEventListener("DOMContentLoaded", t);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
disconnectedCallback() {
|
|
296
|
+
super.disconnectedCallback(), this.formResetObserver && this.formResetObserver.disconnect(), this.id && document.querySelectorAll(`label[for="${this.id}"]`).forEach((t) => {
|
|
297
|
+
t.removeEventListener("click", () => {
|
|
298
|
+
this.focus();
|
|
299
|
+
});
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
resetToDefault() {
|
|
303
|
+
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 }));
|
|
304
|
+
}
|
|
305
|
+
shouldShowValidation(t = !1) {
|
|
306
|
+
if (t) return !0;
|
|
307
|
+
switch (this.validateOn) {
|
|
308
|
+
case "always":
|
|
309
|
+
return !0;
|
|
310
|
+
case "touched":
|
|
311
|
+
default:
|
|
312
|
+
return this.touched;
|
|
313
|
+
case "dirty":
|
|
314
|
+
return this.dirty;
|
|
315
|
+
case "submitted":
|
|
316
|
+
return this.submitted;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
updateValidityState() {
|
|
320
|
+
this.error ? this.validationMessage ? this.internals?.setValidity({ customError: !0 }, this.validationMessage, this.inputElement) : this.internals?.setValidity({ customError: !0 }, "Invalid input", this.inputElement) : this.internals?.setValidity({});
|
|
321
|
+
}
|
|
322
|
+
validateInput(t = !1) {
|
|
323
|
+
if (this.disabled) return;
|
|
324
|
+
const e = this.shouldShowValidation(t), n = this.inputElement?.validity ?? { customError: !1, valid: !0 }, l = !n.valid && !n.customError;
|
|
325
|
+
e && l ? (this.error = !0, this.validationMessage = this.inputElement?.validationMessage || "") : n.valid ? (this.error = !1, n.customError || (this.validationMessage = "")) : e || (this.error = !1), this.updateValidityState();
|
|
326
|
+
}
|
|
327
|
+
checkValidity() {
|
|
328
|
+
const t = this.inputRef.value?.checkValidity() ?? !0;
|
|
329
|
+
return this.internals && !t ? (this.internals.checkValidity(), !1) : t;
|
|
330
|
+
}
|
|
331
|
+
reportValidity() {
|
|
332
|
+
this.touched = !0, this.submitted = !0;
|
|
333
|
+
const t = this.inputRef.value?.reportValidity() ?? !0;
|
|
334
|
+
return this.validateInput(!0), this.internals && !t ? (this.internals.reportValidity(), !1) : t;
|
|
335
|
+
}
|
|
336
|
+
setCustomValidity(t) {
|
|
337
|
+
this.inputRef.value && this.inputRef.value.setCustomValidity(t), this.validationMessage = t, this.error = t !== "" && this.shouldShowValidation(), this.internals && (t ? this.internals.setValidity({ customError: !0 }, t, this.inputElement) : this.internals.setValidity({}));
|
|
338
|
+
}
|
|
339
|
+
firstUpdated() {
|
|
340
|
+
this.autofocus && setTimeout(() => {
|
|
341
|
+
this.focus();
|
|
342
|
+
}, 0), this.setupInputEvents(), this.setupFocusBlurEvents(), this.setupAutofillDetection(), this.setupEnterKeyEvents();
|
|
343
|
+
}
|
|
344
|
+
setupInputEvents() {
|
|
345
|
+
p(this.inputElement, "input").pipe($((t) => {
|
|
346
|
+
const e = t;
|
|
347
|
+
return { value: t.target.value, inputType: e.inputType, data: e.data, isComposing: e.isComposing, originalEvent: t };
|
|
348
|
+
}), d(this.disconnecting)).subscribe((t) => {
|
|
349
|
+
this.value = t.value, this.dirty = this.value !== this.defaultValue;
|
|
350
|
+
const e = new CustomEvent("input", { detail: { value: t.value }, bubbles: !0, composed: !0 });
|
|
351
|
+
Object.defineProperties(e, { inputType: { value: t.inputType }, data: { value: t.data }, isComposing: { value: t.isComposing } }), this.dispatchEvent(e), this.validateInput();
|
|
352
|
+
}), p(this.inputElement, "change").pipe($((t) => t.target.value), C(), d(this.disconnecting)).subscribe((t) => {
|
|
353
|
+
this.value = t, this.dirty = this.value !== this.defaultValue, this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 })), this.validateInput();
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
setupFocusBlurEvents() {
|
|
357
|
+
p(this.inputElement, "focus").pipe(d(this.disconnecting)).subscribe((t) => {
|
|
358
|
+
const e = new CustomEvent("focus", { bubbles: t.bubbles, cancelable: t.cancelable, composed: t.composed });
|
|
359
|
+
Object.defineProperties(e, { relatedTarget: { value: t.relatedTarget } }), this.dispatchEvent(e);
|
|
360
|
+
}), p(this.inputElement, "blur").pipe(d(this.disconnecting)).subscribe((t) => {
|
|
361
|
+
this.touched = !0, this.disabled || this.validateInput();
|
|
362
|
+
const e = new CustomEvent("blur", { bubbles: t.bubbles, cancelable: t.cancelable, composed: t.composed });
|
|
363
|
+
Object.defineProperties(e, { relatedTarget: { value: t.relatedTarget } }), this.dispatchEvent(e);
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
setupAutofillDetection() {
|
|
367
|
+
p(this.inputElement, "animationstart").pipe(v((t) => t.animationName === "onAutoFillStart"), d(this.disconnecting)).subscribe((t) => {
|
|
368
|
+
const { value: e } = t.target;
|
|
369
|
+
this.value = e, this.isAutofilled = !0, this.dirty = this.value !== this.defaultValue, this.dispatchEvent(new CustomEvent("autofill", { detail: { value: e }, bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("change", { detail: { value: e }, bubbles: !0, composed: !0 }));
|
|
370
|
+
}), p(this.inputElement, "animationstart").pipe(v((t) => t.animationName === "onAutoFillCancel"), d(this.disconnecting)).subscribe(() => {
|
|
371
|
+
this.isAutofilled = !1;
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
setupEnterKeyEvents() {
|
|
375
|
+
p(this.inputElement, "keyup").pipe(v((t) => t.key === "Enter"), d(this.disconnecting)).subscribe((t) => {
|
|
376
|
+
const { value: e } = t.target;
|
|
377
|
+
this.value = e, this.dirty = this.value !== this.defaultValue;
|
|
378
|
+
const n = new CustomEvent("enter", { detail: { value: e }, bubbles: !0, composed: !0 });
|
|
379
|
+
Object.defineProperties(n, { key: { value: "Enter" }, code: { value: "Enter" }, keyCode: { value: 13 }, which: { value: 13 } }), this.dispatchEvent(n);
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
select() {
|
|
383
|
+
return this.inputRef.value?.select();
|
|
384
|
+
}
|
|
385
|
+
getValidity() {
|
|
386
|
+
return this.inputRef.value?.validity;
|
|
387
|
+
}
|
|
388
|
+
setSelectionRange(t, e, n) {
|
|
389
|
+
this.inputRef.value?.setSelectionRange(t, e, n);
|
|
390
|
+
}
|
|
391
|
+
get selectionStart() {
|
|
392
|
+
return this.inputRef.value?.selectionStart ?? null;
|
|
393
|
+
}
|
|
394
|
+
get selectionEnd() {
|
|
395
|
+
return this.inputRef.value?.selectionEnd ?? null;
|
|
396
|
+
}
|
|
397
|
+
get selectionDirection() {
|
|
398
|
+
return this.inputRef.value?.selectionDirection ?? null;
|
|
399
|
+
}
|
|
400
|
+
setRangeText(t, e, n, l) {
|
|
401
|
+
e !== void 0 && n !== void 0 ? this.inputRef.value?.setRangeText(t, e, n, l) : this.inputRef.value?.setRangeText(t);
|
|
402
|
+
}
|
|
403
|
+
focus(t) {
|
|
404
|
+
this.inputRef.value?.focus(t), this.dispatchEvent(new Event("focus"));
|
|
405
|
+
}
|
|
406
|
+
click() {
|
|
407
|
+
this.inputRef.value?.click(), this.dispatchEvent(new Event("click"));
|
|
408
|
+
}
|
|
409
|
+
blur() {
|
|
410
|
+
this.inputRef.value?.blur(), this.dispatchEvent(new Event("blur"));
|
|
411
|
+
}
|
|
412
|
+
render() {
|
|
413
|
+
const { height: t, padding: e, fontSize: n } = (() => {
|
|
414
|
+
switch (this.size) {
|
|
415
|
+
case "sm":
|
|
416
|
+
return { height: "40px", padding: "0 8px", fontSize: "0.875rem" };
|
|
417
|
+
case "lg":
|
|
418
|
+
return { height: "60px", padding: "0 20px", fontSize: "1.125rem" };
|
|
419
|
+
default:
|
|
420
|
+
return { height: "50px", padding: "0 16px", fontSize: "1rem" };
|
|
421
|
+
}
|
|
422
|
+
})(), l = { "w-full flex-1 rounded-[8px] border-0 bg-surface-highest text-surface-on": !0, "outline-secondary-default focus:outline-1 ": !0, "outline-secondary-default focus:outline-1": !0, "disabled:opacity-40 disabled:cursor-not-allowed": !0, "placeholder:text-muted": !0, "ring-0 ring-inset focus:ring-1 focus:ring-inset": !0, "ring-secondary-default ring-outline focus:ring-secondary-default": !this.error, "ring-error-default focus:ring-error-default": this.error, "caret-transparent focus:outline-hidden cursor-pointer text-select-none": this.readonly, "cursor-pointer": this.clickable, "text-center": this.align === "center", "text-right": this.align === "right", autofilled: this.isAutofilled }, m = { "opacity-40": this.disabled, "block mb-[4px]": !0, "text-sm": this.size === "sm", "text-base": this.size === "md", "text-lg": this.size === "lg" }, u = { height: t, padding: e, fontSize: n };
|
|
423
|
+
return b`
|
|
424
|
+
${x(this.label, () => b`
|
|
425
|
+
<label
|
|
426
|
+
for=${this.id}
|
|
427
|
+
id="label-${this.id}"
|
|
428
|
+
class=${this.classMap(m)}
|
|
429
|
+
${g({ color: this.error ? c.sys.color.error.default : c.sys.color.primary.default })}
|
|
430
|
+
>
|
|
431
|
+
<schmancy-typography type="label" token=${this.size === "sm" ? "sm" : this.size === "lg" ? "lg" : "md"}>
|
|
432
|
+
${this.label}
|
|
433
|
+
</schmancy-typography>
|
|
434
|
+
</label>
|
|
435
|
+
`)}
|
|
436
|
+
|
|
437
|
+
<input
|
|
438
|
+
${g({ bgColor: c.sys.color.surface.highest, color: c.sys.color.surface.on })}
|
|
439
|
+
${R(this.inputRef)}
|
|
440
|
+
id=${this.id}
|
|
441
|
+
name=${this.name}
|
|
442
|
+
class=${this.classMap(l)}
|
|
443
|
+
style=${this.styleMap(u)}
|
|
444
|
+
.value=${this.value}
|
|
445
|
+
.type=${this.type}
|
|
446
|
+
.autocomplete=${this.autocomplete}
|
|
447
|
+
.spellcheck=${this.spellcheck}
|
|
448
|
+
placeholder=${this.placeholder}
|
|
449
|
+
inputmode=${h(this.inputmode)}
|
|
450
|
+
pattern=${h(this.pattern)}
|
|
451
|
+
step=${h(this.step)}
|
|
452
|
+
minlength=${h(this.minlength)}
|
|
453
|
+
maxlength=${h(this.maxlength)}
|
|
454
|
+
min=${h(this.min)}
|
|
455
|
+
max=${h(this.max)}
|
|
456
|
+
list=${h(this.list)}
|
|
457
|
+
?required=${this.required}
|
|
458
|
+
?disabled=${this.disabled}
|
|
459
|
+
?readonly=${this.readonly}
|
|
460
|
+
aria-invalid=${this.error ? "true" : "false"}
|
|
461
|
+
aria-required=${this.required ? "true" : "false"}
|
|
462
|
+
aria-labelledby=${this.label ? `label-${this.id}` : E}
|
|
463
|
+
aria-describedby=${this.hint ? `hint-${this.id}` : E}
|
|
464
|
+
aria-label=${h(this.label ? void 0 : this.placeholder || "Input")}
|
|
465
|
+
aria-autocomplete=${this.list ? "list" : "none"}
|
|
466
|
+
/>
|
|
467
|
+
|
|
468
|
+
${x(this.hint, () => b`
|
|
469
|
+
<div
|
|
470
|
+
id="hint-${this.id}"
|
|
471
|
+
class="${this.size === "sm" ? "pt-[1px] text-xs" : this.size === "lg" ? "pt-[3px] text-base" : "pt-[2px] text-sm"}"
|
|
472
|
+
${g({ color: this.error ? c.sys.color.error.default : c.sys.color.primary.default })}
|
|
473
|
+
>
|
|
474
|
+
<schmancy-typography
|
|
475
|
+
align="left"
|
|
476
|
+
type="label"
|
|
477
|
+
token=${this.size === "sm" ? "sm" : this.size === "lg" ? "lg" : "md"}
|
|
478
|
+
>
|
|
479
|
+
${this.hint}
|
|
480
|
+
</schmancy-typography>
|
|
481
|
+
</div>
|
|
482
|
+
`)}
|
|
483
|
+
`;
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
a._idCounter = 0, a.formAssociated = !0, a.shadowRootOptions = { ...w.shadowRootOptions, delegatesFocus: !0 }, o([i({ reflect: !0 })], a.prototype, "id", 2), o([i({ type: String })], a.prototype, "label", 2), o([i({ reflect: !0 })], a.prototype, "type", 2), o([i()], a.prototype, "name", 2), o([i()], a.prototype, "placeholder", 2), o([i({ type: String, reflect: !0 })], a.prototype, "value", 2), o([i({ type: String, reflect: !0 })], a.prototype, "pattern", 2), o([i({ type: Boolean, reflect: !0 })], a.prototype, "required", 2), o([i({ type: Boolean, reflect: !0 })], a.prototype, "disabled", 2), o([i({ type: Boolean, reflect: !0 })], a.prototype, "readonly", 2), o([i({ type: Boolean, reflect: !0 })], a.prototype, "clickable", 2), o([i({ type: Boolean, reflect: !0 })], a.prototype, "spellcheck", 2), o([i({ type: String, reflect: !0 })], a.prototype, "align", 2), o([i()], a.prototype, "inputmode", 2), o([i({ type: Number, reflect: !0 })], a.prototype, "minlength", 2), o([i({ type: Number })], a.prototype, "maxlength", 2), o([i()], a.prototype, "min", 2), o([i()], a.prototype, "max", 2), o([i({ type: Number, reflect: !0 })], a.prototype, "step", 2), o([i({ type: Boolean })], a.prototype, "autofocus", 2), o([i({ type: String, reflect: !0 })], a.prototype, "autocomplete", 2), o([i({ type: Number, reflect: !0 })], a.prototype, "tabIndex", 2), o([i()], a.prototype, "hint", 2), o([i({ type: Boolean, reflect: !0 })], a.prototype, "error", 2), o([i({ type: String, reflect: !0 })], a.prototype, "size", 2), o([i({ type: String })], a.prototype, "validateOn", 2), o([i({ type: String })], a.prototype, "list", 2), o([i({ type: String })], a.prototype, "validationMessage", 2), o([k("input")], a.prototype, "inputElement", 2), o([f()], a.prototype, "isAutofilled", 2), o([f()], a.prototype, "touched", 2), o([f()], a.prototype, "dirty", 2), o([f()], a.prototype, "submitted", 2), o([f()], a.prototype, "defaultValue", 2), a = o([V("schmancy-input")], a);
|
|
487
|
+
//# sourceMappingURL=input-d4jaMv22.js.map
|