@mhmo91/schmancy 0.7.6 → 0.8.3
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/audio.md +241 -0
- package/ai/content-drawer.md +163 -70
- package/ai/details.md +309 -44
- package/ai/lightbox.md +381 -0
- package/ai/typography.md +75 -49
- package/dist/ai/audio.md +241 -0
- package/dist/ai/content-drawer.md +163 -70
- package/dist/ai/details.md +309 -44
- package/dist/ai/lightbox.md +381 -0
- package/dist/ai/typography.md +75 -49
- package/dist/{animated-text-1FDC-OTA.cjs → animated-text-Bc3qyXjp.cjs} +2 -2
- package/dist/{animated-text-1FDC-OTA.cjs.map → animated-text-Bc3qyXjp.cjs.map} +1 -1
- package/dist/{animated-text-1_latidd.js → animated-text-CNx6Pmlo.js} +3 -3
- package/dist/{animated-text-1_latidd.js.map → animated-text-CNx6Pmlo.js.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-CQq-Mh0Z.js → area.component-7mWxekxE.js} +104 -98
- package/dist/area.component-7mWxekxE.js.map +1 -0
- package/dist/area.component-CS_gSutH.cjs +12 -0
- package/dist/area.component-CS_gSutH.cjs.map +1 -0
- package/dist/area.js +1 -1
- package/dist/audio.cjs +2 -0
- package/dist/audio.cjs.map +1 -0
- package/dist/audio.js +9 -0
- package/dist/audio.js.map +1 -0
- package/dist/{autocomplete-DT9MFPEG.js → autocomplete-Ci4jo3Ur.js} +4 -4
- package/dist/{autocomplete-DT9MFPEG.js.map → autocomplete-Ci4jo3Ur.js.map} +1 -1
- package/dist/{autocomplete-auTO_M_w.cjs → autocomplete-y-IyzH4r.cjs} +2 -2
- package/dist/{autocomplete-auTO_M_w.cjs.map → autocomplete-y-IyzH4r.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-Dm_qg-n1.js → avatar-BdyuuIk7.js} +243 -258
- package/dist/avatar-BdyuuIk7.js.map +1 -0
- package/dist/avatar-DBfJucB9.cjs +273 -0
- package/dist/avatar-DBfJucB9.cjs.map +1 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-RNCKlx8b.js → boat-CowHieO2.js} +6 -6
- package/dist/{boat-RNCKlx8b.js.map → boat-CowHieO2.js.map} +1 -1
- package/dist/{boat-98He5-K8.cjs → boat-DkNUc1UO.cjs} +5 -5
- package/dist/{boat-98He5-K8.cjs.map → boat-DkNUc1UO.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/charts.cjs +2 -0
- package/dist/charts.cjs.map +1 -0
- package/dist/charts.js +9 -0
- package/dist/charts.js.map +1 -0
- package/dist/{checkbox-Bdn1_WJg.js → checkbox-BY4Sn8F2.js} +6 -6
- package/dist/{checkbox-Bdn1_WJg.js.map → checkbox-BY4Sn8F2.js.map} +1 -1
- package/dist/{checkbox-Dj06r6MD.cjs → checkbox-BvWcABPr.cjs} +2 -2
- package/dist/{checkbox-Dj06r6MD.cjs.map → checkbox-BvWcABPr.cjs.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 +2 -2
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-ByxcwPma.cjs → code-preview-BIFIJigy.cjs} +2 -2
- package/dist/{code-preview-ByxcwPma.cjs.map → code-preview-BIFIJigy.cjs.map} +1 -1
- package/dist/{code-preview-Br7zBkyM.js → code-preview-CYjmAxfs.js} +3 -3
- package/dist/{code-preview-Br7zBkyM.js.map → code-preview-CYjmAxfs.js.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/{context-create-BvxbWTgj.js → context-create-B_S-sD5B.js} +69 -57
- package/dist/context-create-B_S-sD5B.js.map +1 -0
- package/dist/context-create-DTybDbZp.cjs +2 -0
- package/dist/context-create-DTybDbZp.cjs.map +1 -0
- package/dist/date-range-B80Ummtv.cjs +119 -0
- package/dist/date-range-B80Ummtv.cjs.map +1 -0
- package/dist/date-range-BdIqI7LC.js +639 -0
- package/dist/date-range-BdIqI7LC.js.map +1 -0
- package/dist/{date-range-inline-l2G48xTX.js → date-range-inline-Cnhs9atd.js} +3 -3
- package/dist/{date-range-inline-l2G48xTX.js.map → date-range-inline-Cnhs9atd.js.map} +1 -1
- package/dist/{date-range-inline-kbokz03Z.cjs → date-range-inline-Df8u6Ecy.cjs} +2 -2
- package/dist/{date-range-inline-kbokz03Z.cjs.map → date-range-inline-Df8u6Ecy.cjs.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-CCreUpYu.cjs → delay-BWsVHQib.cjs} +2 -2
- package/dist/delay-BWsVHQib.cjs.map +1 -0
- package/dist/{delay-Nu7RVtYd.js → delay-CCa9nN4A.js} +45 -45
- package/dist/delay-CCa9nN4A.js.map +1 -0
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/details-Bee5ya0L.js +100 -0
- package/dist/details-Bee5ya0L.js.map +1 -0
- package/dist/details-oaVHXU7U.cjs +55 -0
- package/dist/details-oaVHXU7U.cjs.map +1 -0
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/dialog-service-C86xTS8q.cjs +2 -0
- package/dist/dialog-service-C86xTS8q.cjs.map +1 -0
- package/dist/dialog-service-D9E3jLAR.js +118 -0
- package/dist/dialog-service-D9E3jLAR.js.map +1 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.component-BriB-kFi.cjs +48 -0
- package/dist/dialog.component-BriB-kFi.cjs.map +1 -0
- package/dist/dialog.component-CMUoCC7O.js +145 -0
- package/dist/dialog.component-CMUoCC7O.js.map +1 -0
- package/dist/dialog.js +7 -7
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +11 -10
- package/dist/directives.js.map +1 -1
- package/dist/{divider-CqyzFfn1.js → divider-B7DBbYFI.js} +3 -3
- package/dist/{divider-CqyzFfn1.js.map → divider-B7DBbYFI.js.map} +1 -1
- package/dist/{divider-0yHQS8kR.cjs → divider-Dl4TToQZ.cjs} +2 -2
- package/dist/{divider-0yHQS8kR.cjs.map → divider-Dl4TToQZ.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-BmHQE5-P.cjs → dropdown-content-C2W7OttQ.cjs} +2 -2
- package/dist/{dropdown-content-BmHQE5-P.cjs.map → dropdown-content-C2W7OttQ.cjs.map} +1 -1
- package/dist/{dropdown-content-iFlLupVo.js → dropdown-content-DzhOtilY.js} +3 -3
- package/dist/{dropdown-content-iFlLupVo.js.map → dropdown-content-DzhOtilY.js.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-CmAEJDMC.js → email-recipients-BWqZKo3m.js} +8 -7
- package/dist/{email-recipients-CmAEJDMC.js.map → email-recipients-BWqZKo3m.js.map} +1 -1
- package/dist/{email-recipients-Cioc3U0Z.cjs → email-recipients-Bh5VC0rc.cjs} +2 -2
- package/dist/{email-recipients-Cioc3U0Z.cjs.map → email-recipients-Bh5VC0rc.cjs.map} +1 -1
- package/dist/emotional-sounds-BRnFhww6.js +234 -0
- package/dist/emotional-sounds-BRnFhww6.js.map +1 -0
- package/dist/emotional-sounds-DVGhmoZf.cjs +2 -0
- package/dist/emotional-sounds-DVGhmoZf.cjs.map +1 -0
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/flex-53G-PJx7.js +183 -0
- package/dist/flex-53G-PJx7.js.map +1 -0
- package/dist/flex-DFSIy0t4.cjs +18 -0
- package/dist/flex-DFSIy0t4.cjs.map +1 -0
- package/dist/{form-CxrvY530.js → form-BtRK9bnp.js} +2 -2
- package/dist/{form-CxrvY530.js.map → form-BtRK9bnp.js.map} +1 -1
- package/dist/{form-DFDTspmH.cjs → form-Zq7g2JS8.cjs} +2 -2
- package/dist/{form-DFDTspmH.cjs.map → form-Zq7g2JS8.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-hZ2qP4iG.js → formField.mixin-2jSL7WF_.js} +2 -2
- package/dist/{formField.mixin-hZ2qP4iG.js.map → formField.mixin-2jSL7WF_.js.map} +1 -1
- package/dist/{formField.mixin-C7H5DaEl.cjs → formField.mixin-DkN2ufR_.cjs} +2 -2
- package/dist/{formField.mixin-C7H5DaEl.cjs.map → formField.mixin-DkN2ufR_.cjs.map} +1 -1
- package/dist/height-CfECBO2j.js +44 -0
- package/dist/height-CfECBO2j.js.map +1 -0
- package/dist/height-Z70qJYJK.cjs +2 -0
- package/dist/height-Z70qJYJK.cjs.map +1 -0
- package/dist/{icon-D0FAI5uJ.js → icon-B5qeYrDu.js} +17 -17
- package/dist/icon-B5qeYrDu.js.map +1 -0
- package/dist/icon-button-BpmGFjaR.cjs +70 -0
- package/dist/icon-button-BpmGFjaR.cjs.map +1 -0
- package/dist/icon-button-HSYaQBNF.js +164 -0
- package/dist/icon-button-HSYaQBNF.js.map +1 -0
- package/dist/icon-pU_cfmpD.cjs +49 -0
- package/dist/icon-pU_cfmpD.cjs.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +275 -250
- package/dist/index.js.map +1 -1
- package/dist/input-8G9YY9qv.cjs +51 -0
- package/dist/input-8G9YY9qv.cjs.map +1 -0
- package/dist/{input-DLnKAj3B.js → input-BJMF5Fyk.js} +35 -31
- package/dist/input-BJMF5Fyk.js.map +1 -0
- package/dist/{input-chip-C3EPsHcP.cjs → input-chip-CocdqTzr.cjs} +2 -2
- package/dist/{input-chip-C3EPsHcP.cjs.map → input-chip-CocdqTzr.cjs.map} +1 -1
- package/dist/{input-chip-dmqYCExV.js → input-chip-tbrw56ix.js} +2 -2
- package/dist/{input-chip-dmqYCExV.js.map → input-chip-tbrw56ix.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json-CvcloKQv.js +51 -0
- package/dist/json-CvcloKQv.js.map +1 -0
- package/dist/json-DPnyOA3K.cjs +12 -0
- package/dist/json-DPnyOA3K.cjs.map +1 -0
- package/dist/json.cjs +2 -0
- package/dist/json.cjs.map +1 -0
- package/dist/json.js +5 -0
- package/dist/json.js.map +1 -0
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +4 -3
- package/dist/layout.js.map +1 -1
- package/dist/lightbox-service-3mHqBKEh.cjs +202 -0
- package/dist/lightbox-service-3mHqBKEh.cjs.map +1 -0
- package/dist/lightbox-service-DxbYZAuv.js +458 -0
- package/dist/lightbox-service-DxbYZAuv.js.map +1 -0
- package/dist/lightbox.cjs +2 -0
- package/dist/lightbox.cjs.map +1 -0
- package/dist/lightbox.js +8 -0
- package/dist/lightbox.js.map +1 -0
- package/dist/{list-BegNkhOn.js → list-FWXmY-eQ.js} +2 -2
- package/dist/{list-BegNkhOn.js.map → list-FWXmY-eQ.js.map} +1 -1
- package/dist/{list-CLKiZ6lk.cjs → list-JjR7WOrd.cjs} +2 -2
- package/dist/{list-CLKiZ6lk.cjs.map → list-JjR7WOrd.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-CPQYJnK_.cjs → litElement.mixin-BVBdv0GP.cjs} +2 -2
- package/dist/{litElement.mixin-CPQYJnK_.cjs.map → litElement.mixin-BVBdv0GP.cjs.map} +1 -1
- package/dist/{litElement.mixin-DWDPaNoc.js → litElement.mixin-Wcu4yIIs.js} +2 -2
- package/dist/{litElement.mixin-DWDPaNoc.js.map → litElement.mixin-Wcu4yIIs.js.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-CUKZ6LrR.js → map-Br6xJFxG.js} +2 -2
- package/dist/{map-CUKZ6LrR.js.map → map-Br6xJFxG.js.map} +1 -1
- package/dist/{map-w4Kdtycx.cjs → map-D9R3OCne.cjs} +2 -2
- package/dist/{map-w4Kdtycx.cjs.map → map-D9R3OCne.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-CjdCchz8.js → media-BV_1DfcW.js} +2 -2
- package/dist/{media-CjdCchz8.js.map → media-BV_1DfcW.js.map} +1 -1
- package/dist/{media-DDNmuoV0.cjs → media-DibPwAjJ.cjs} +2 -2
- package/dist/{media-DDNmuoV0.cjs.map → media-DibPwAjJ.cjs.map} +1 -1
- package/dist/menu-HKqlq99V.js +60 -0
- package/dist/{menu-ofiPDY2a.js.map → menu-HKqlq99V.js.map} +1 -1
- package/dist/{menu-D9-9vipn.cjs → menu-vNrV-Nuq.cjs} +4 -6
- package/dist/{menu-D9-9vipn.cjs.map → menu-vNrV-Nuq.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +3 -3
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/{navigation-rail-CEDLJTrH.cjs → navigation-rail-D1o3qDe_.cjs} +15 -17
- package/dist/navigation-rail-D1o3qDe_.cjs.map +1 -0
- package/dist/{navigation-rail-weSW6BCv.js → navigation-rail-DKXumnmt.js} +30 -32
- package/dist/navigation-rail-DKXumnmt.js.map +1 -0
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/notification-service-B5ljba4P.js +155 -0
- package/dist/notification-service-B5ljba4P.js.map +1 -0
- package/dist/notification-service-ICRT05L0.cjs +19 -0
- package/dist/notification-service-ICRT05L0.cjs.map +1 -0
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +6 -8
- package/dist/{notify-Ci0HrUIo.js → notify-B9CpO1Ru.js} +2 -2
- package/dist/notify-B9CpO1Ru.js.map +1 -0
- package/dist/{notify-aasSKQGA.cjs → notify-NX-dl60E.cjs} +2 -2
- package/dist/notify-NX-dl60E.cjs.map +1 -0
- package/dist/{option-Cs4e3CzF.js → option-B4JKMrLg.js} +2 -2
- package/dist/{option-Cs4e3CzF.js.map → option-B4JKMrLg.js.map} +1 -1
- package/dist/{option-Uze_q9Ef.cjs → option-epyXLWoY.cjs} +2 -2
- package/dist/{option-Uze_q9Ef.cjs.map → option-epyXLWoY.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/page-Bmi1QHtq.cjs +20 -0
- package/dist/page-Bmi1QHtq.cjs.map +1 -0
- package/dist/page-BpygEntU.js +48 -0
- package/dist/page-BpygEntU.js.map +1 -0
- package/dist/page.cjs +2 -0
- package/dist/page.cjs.map +1 -0
- package/dist/page.js +5 -0
- package/dist/page.js.map +1 -0
- package/dist/{payment-card-form-rJCPUtWE.cjs → payment-card-form-3kAXDbXf.cjs} +2 -2
- package/dist/{payment-card-form-rJCPUtWE.cjs.map → payment-card-form-3kAXDbXf.cjs.map} +1 -1
- package/dist/{payment-card-form-BLoUTYiB.js → payment-card-form-BxkHuSls.js} +3 -3
- package/dist/{payment-card-form-BLoUTYiB.js.map → payment-card-form-BxkHuSls.js.map} +1 -1
- package/dist/pills-C3fIvfn8.js +346 -0
- package/dist/pills-C3fIvfn8.js.map +1 -0
- package/dist/pills-MmHyBGQu.cjs +113 -0
- package/dist/pills-MmHyBGQu.cjs.map +1 -0
- package/dist/progress-0POmJs5o.js +59 -0
- package/dist/progress-0POmJs5o.js.map +1 -0
- package/dist/progress-qx8jtrOA.cjs +35 -0
- package/dist/progress-qx8jtrOA.cjs.map +1 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/qr-scanner-DQq-WLyo.cjs +29 -0
- package/dist/qr-scanner-DQq-WLyo.cjs.map +1 -0
- package/dist/qr-scanner-jwOSrD0N.js +743 -0
- package/dist/qr-scanner-jwOSrD0N.js.map +1 -0
- package/dist/qr-scanner.cjs +2 -0
- package/dist/qr-scanner.cjs.map +1 -0
- package/dist/qr-scanner.js +5 -0
- package/dist/qr-scanner.js.map +1 -0
- package/dist/{radio-button-CaDaw5VH.js → radio-button-B0EUK_wg.js} +3 -3
- package/dist/{radio-button-CaDaw5VH.js.map → radio-button-B0EUK_wg.js.map} +1 -1
- package/dist/{radio-button-BAS7gKmA.cjs → radio-button-DraEYR2R.cjs} +2 -2
- package/dist/{radio-button-BAS7gKmA.cjs.map → radio-button-DraEYR2R.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/ripple-BgJXbNSP.js +124 -0
- package/dist/ripple-BgJXbNSP.js.map +1 -0
- package/dist/ripple-x6sTX02K.cjs +16 -0
- package/dist/ripple-x6sTX02K.cjs.map +1 -0
- package/dist/{schmancy-steps-container-wQsksygx.cjs → schmancy-steps-container-B5aiqgMA.cjs} +2 -2
- package/dist/{schmancy-steps-container-wQsksygx.cjs.map → schmancy-steps-container-B5aiqgMA.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-BInNput3.js → schmancy-steps-container-C2StAA5K.js} +3 -3
- package/dist/{schmancy-steps-container-BInNput3.js.map → schmancy-steps-container-C2StAA5K.js.map} +1 -1
- package/dist/scroll-BqT7bvhu.cjs +27 -0
- package/dist/scroll-BqT7bvhu.cjs.map +1 -0
- package/dist/scroll-Bu-vAg3d.js +87 -0
- package/dist/scroll-Bu-vAg3d.js.map +1 -0
- package/dist/{select-_2Ag_znm.cjs → select-HiEGJvOX.cjs} +2 -2
- package/dist/select-HiEGJvOX.cjs.map +1 -0
- package/dist/{select-ApLZefMf.js → select-i-uKur-W.js} +5 -4
- package/dist/select-i-uKur-W.js.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{selector-hook-Cok22ifx.cjs → selector-hook-9w2auh2O.cjs} +2 -2
- package/dist/{selector-hook-Cok22ifx.cjs.map → selector-hook-9w2auh2O.cjs.map} +1 -1
- package/dist/{selector-hook-l2fe2UO5.js → selector-hook-CHV4kDMd.js} +3 -3
- package/dist/{selector-hook-l2fe2UO5.js.map → selector-hook-CHV4kDMd.js.map} +1 -1
- package/dist/{sheet-DovyNsok.js → sheet-B1g7E4dQ.js} +5 -5
- package/dist/{sheet-DovyNsok.js.map → sheet-B1g7E4dQ.js.map} +1 -1
- package/dist/{sheet-wjDOQ8Hs.cjs → sheet-BbrRW0S5.cjs} +2 -2
- package/dist/{sheet-wjDOQ8Hs.cjs.map → sheet-BbrRW0S5.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-BvOiOFMm.js → sheet.service-4etIM-p6.js} +20 -18
- package/dist/sheet.service-4etIM-p6.js.map +1 -0
- package/dist/sheet.service-BiRZjCdN.cjs +2 -0
- package/dist/sheet.service-BiRZjCdN.cjs.map +1 -0
- package/dist/{slider-CeVgx4pL.js → slider-8E3Wad0t.js} +3 -3
- package/dist/{slider-CeVgx4pL.js.map → slider-8E3Wad0t.js.map} +1 -1
- package/dist/{slider-BgJccHrg.cjs → slider-VYnbIRH2.cjs} +2 -2
- package/dist/{slider-BgJccHrg.cjs.map → slider-VYnbIRH2.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/sound.service-Nza4c6wv.js +102 -0
- package/dist/sound.service-Nza4c6wv.js.map +1 -0
- package/dist/sound.service-eRirZw59.cjs +2 -0
- package/dist/sound.service-eRirZw59.cjs.map +1 -0
- package/dist/{spinner-Brq1TenP.js → spinner-CKm13CKN.js} +15 -12
- package/dist/spinner-CKm13CKN.js.map +1 -0
- package/dist/{spinner-BKeA2bdB.cjs → spinner-DJgcI5wr.cjs} +9 -9
- package/dist/spinner-DJgcI5wr.cjs.map +1 -0
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +2 -2
- package/dist/{suggestion-chip-CWBSzu7C.js → suggestion-chip-6njXvvHm.js} +50 -46
- package/dist/suggestion-chip-6njXvvHm.js.map +1 -0
- package/dist/{suggestion-chip-dq20NKWy.cjs → suggestion-chip-DdLfqk7o.cjs} +18 -23
- package/dist/suggestion-chip-DdLfqk7o.cjs.map +1 -0
- package/dist/{surface-Bf8pvmdG.js → surface-BYU3l_Q2.js} +12 -11
- package/dist/surface-BYU3l_Q2.js.map +1 -0
- package/dist/{surface-fEPJ-cuu.cjs → surface-DcqbWGub.cjs} +5 -4
- package/dist/surface-DcqbWGub.cjs.map +1 -0
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-DEnB9_Rf.cjs → table-C9fzDjjk.cjs} +2 -2
- package/dist/{table-DEnB9_Rf.cjs.map → table-C9fzDjjk.cjs.map} +1 -1
- package/dist/{table-MLd3oXm6.js → table-Dq12ollZ.js} +3 -3
- package/dist/{table-MLd3oXm6.js.map → table-Dq12ollZ.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-CXVHOR5X.cjs → tabs-compatibility-Dwtjfkcf.cjs} +2 -2
- package/dist/{tabs-compatibility-CXVHOR5X.cjs.map → tabs-compatibility-Dwtjfkcf.cjs.map} +1 -1
- package/dist/{tabs-compatibility-KWKzYolX.js → tabs-compatibility-wnzlHtln.js} +2 -2
- package/dist/{tabs-compatibility-KWKzYolX.js.map → tabs-compatibility-wnzlHtln.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-Ddt05Frc.js +67 -0
- package/dist/{tailwind.mixin-DIW0B_of.js.map → tailwind.mixin-Ddt05Frc.js.map} +1 -1
- package/dist/tailwind.mixin-UijsBrYW.cjs +2 -0
- package/dist/{tailwind.mixin-3TPVvhYf.cjs.map → tailwind.mixin-UijsBrYW.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/textarea-DGmsw1B_.cjs +44 -0
- package/dist/{textarea-B7arkA7y.cjs.map → textarea-DGmsw1B_.cjs.map} +1 -1
- package/dist/{textarea-BK1m_CFR.js → textarea-Vd3zayJZ.js} +4 -3
- package/dist/{textarea-BK1m_CFR.js.map → textarea-Vd3zayJZ.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-BTKwL3oC.cjs → theme-button-DG_Xwg9H.cjs} +2 -2
- package/dist/{theme-button-BTKwL3oC.cjs.map → theme-button-DG_Xwg9H.cjs.map} +1 -1
- package/dist/{theme-button-C6kk8bay.js → theme-button-rGpEW_xS.js} +2 -2
- package/dist/{theme-button-C6kk8bay.js.map → theme-button-rGpEW_xS.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/{theme-controller-boat-BK59LqH9.js → theme-controller-boat-B1fjcqJI.js} +420 -228
- package/dist/theme-controller-boat-B1fjcqJI.js.map +1 -0
- package/dist/theme-controller-boat-pLzK5zxL.cjs +178 -0
- package/dist/theme-controller-boat-pLzK5zxL.cjs.map +1 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +13 -11
- package/dist/{timezone-nbn0o5GC.cjs → timezone-BhUaIAV7.cjs} +2 -2
- package/dist/{timezone-nbn0o5GC.cjs.map → timezone-BhUaIAV7.cjs.map} +1 -1
- package/dist/{timezone-D_skWX6Z.js → timezone-IQkwr6Oh.js} +3 -3
- package/dist/{timezone-D_skWX6Z.js.map → timezone-IQkwr6Oh.js.map} +1 -1
- package/dist/{tooltip-Btl0IKYC.js → tooltip-CwaiZC8f.js} +2 -2
- package/dist/{tooltip-Btl0IKYC.js.map → tooltip-CwaiZC8f.js.map} +1 -1
- package/dist/{tooltip-DyuMJEjL.cjs → tooltip-iEvxKg8g.cjs} +2 -2
- package/dist/{tooltip-DyuMJEjL.cjs.map → tooltip-iEvxKg8g.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-N4Y6MoQe.cjs → tree-Bclu6uvv.cjs} +2 -2
- package/dist/{tree-N4Y6MoQe.cjs.map → tree-Bclu6uvv.cjs.map} +1 -1
- package/dist/{tree-B_2eIFQi.js → tree-D9EbEsxn.js} +2 -2
- package/dist/{tree-B_2eIFQi.js.map → tree-D9EbEsxn.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-Blyrk_4c.js → typewriter-BjDPgRlj.js} +5 -5
- package/dist/{typewriter-Blyrk_4c.js.map → typewriter-BjDPgRlj.js.map} +1 -1
- package/dist/{typewriter-CFQAeOaw.cjs → typewriter-Bscwd-36.cjs} +4 -4
- package/dist/{typewriter-CFQAeOaw.cjs.map → typewriter-Bscwd-36.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-DjGWK58I.js → typography-CConBBFH.js} +13 -53
- package/dist/typography-CConBBFH.js.map +1 -0
- package/dist/{typography-DsIU0TGe.cjs → typography-DLGT3DGz.cjs} +3 -46
- package/dist/typography-DLGT3DGz.cjs.map +1 -0
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/mixins/tailwind.css +37 -6
- package/package.json +21 -20
- package/types/src/area/area.service.d.ts +1 -1
- package/types/src/area/router.types.d.ts +1 -0
- package/types/src/audio/emotional-sounds.d.ts +122 -0
- package/types/src/audio/index.d.ts +30 -0
- package/types/src/audio/sound.service.d.ts +111 -0
- package/types/src/avatar.d.ts +10 -1
- package/types/src/busy/spinner.d.ts +6 -1
- package/types/src/button/button.d.ts +15 -2
- package/types/src/button/icon-button.d.ts +1 -1
- package/types/src/charts/area-chart.d.ts +58 -0
- package/types/src/charts/index.d.ts +4 -0
- package/types/src/charts/pills.d.ts +51 -0
- package/types/src/charts/types.d.ts +62 -0
- package/types/src/charts/utils.d.ts +28 -0
- package/types/src/checkbox/checkbox.d.ts +3 -2
- package/types/src/chips/chips.d.ts +2 -0
- package/types/src/content-drawer/drawer.service.d.ts +1 -7
- package/types/src/date-range/date-range-dialog.d.ts +16 -0
- package/types/src/date-range/date-range.d.ts +1 -1
- package/types/src/details/details.d.ts +8 -3
- package/types/src/dialog/dailog.d.ts +1 -5
- package/types/src/dialog/dialog-base.mixin.d.ts +26 -0
- package/types/src/dialog/dialog-service.d.ts +3 -66
- package/types/src/dialog/dialog.component.d.ts +63 -30
- package/types/src/dialog/index.d.ts +1 -3
- package/types/src/directives/height.d.ts +11 -6
- package/types/src/icons/icon.d.ts +17 -0
- package/types/src/index.d.ts +6 -0
- package/types/src/input/input.d.ts +13 -9
- package/types/src/json/index.d.ts +1 -0
- package/types/src/json/json.d.ts +15 -0
- package/types/src/lightbox/flip-directive.d.ts +29 -0
- package/types/src/lightbox/flip.directive.d.ts +22 -0
- package/types/src/lightbox/index.d.ts +4 -0
- package/types/src/lightbox/lightbox-service.d.ts +24 -0
- package/types/src/lightbox/lightbox.d.ts +34 -0
- package/types/src/lightbox/lightbox.directive.d.ts +30 -0
- package/types/src/nav-drawer/appbar.d.ts +0 -5
- package/types/src/nav-drawer/drawer.d.ts +1 -32
- package/types/src/notification/index.d.ts +1 -3
- package/types/src/notification/notification-service.d.ts +13 -1
- package/types/src/notification/notification.d.ts +13 -12
- package/types/src/notification/notify.d.ts +1 -1
- package/types/src/page/index.d.ts +1 -0
- package/types/src/page/page.d.ts +31 -0
- package/types/src/progress/progress.d.ts +2 -2
- package/types/src/qr-scanner/index.d.ts +1 -0
- package/types/src/qr-scanner/qr-scanner.d.ts +26 -0
- package/types/src/select/select.d.ts +1 -1
- package/types/src/theme/index.d.ts +1 -0
- package/types/src/theme/theme-audio-player.d.ts +100 -0
- package/types/src/theme/theme-controller-boat.d.ts +1 -0
- package/types/src/theme/theme.component.d.ts +1 -1
- package/types/src/types/index.d.ts +1 -0
- package/types/src/types/mood-audio.types.d.ts +173 -0
- package/types/src/typography/typography.d.ts +1 -0
- package/dist/area.component-CQq-Mh0Z.js.map +0 -1
- package/dist/area.component-Ciw7vGsx.cjs +0 -12
- package/dist/area.component-Ciw7vGsx.cjs.map +0 -1
- package/dist/avatar-Bo8kRnA-.cjs +0 -288
- package/dist/avatar-Bo8kRnA-.cjs.map +0 -1
- package/dist/avatar-Dm_qg-n1.js.map +0 -1
- package/dist/context-create-BJkkLr1D.cjs +0 -2
- package/dist/context-create-BJkkLr1D.cjs.map +0 -1
- package/dist/context-create-BvxbWTgj.js.map +0 -1
- package/dist/date-range-VkIMcQdT.js +0 -664
- package/dist/date-range-VkIMcQdT.js.map +0 -1
- package/dist/date-range-xYUr_KKx.cjs +0 -134
- package/dist/date-range-xYUr_KKx.cjs.map +0 -1
- package/dist/delay-CCreUpYu.cjs.map +0 -1
- package/dist/delay-Nu7RVtYd.js.map +0 -1
- package/dist/details-CjQrqBli.cjs +0 -98
- package/dist/details-CjQrqBli.cjs.map +0 -1
- package/dist/details-DVIWpEsI.js +0 -137
- package/dist/details-DVIWpEsI.js.map +0 -1
- package/dist/dialog-content-BgxKi73O.js +0 -256
- package/dist/dialog-content-BgxKi73O.js.map +0 -1
- package/dist/dialog-content-CM3-RXQQ.cjs +0 -85
- package/dist/dialog-content-CM3-RXQQ.cjs.map +0 -1
- package/dist/dialog-service-B4nR8Em5.cjs +0 -2
- package/dist/dialog-service-B4nR8Em5.cjs.map +0 -1
- package/dist/dialog-service-Bege4HF4.js +0 -140
- package/dist/dialog-service-Bege4HF4.js.map +0 -1
- package/dist/flex-BEB1yuMF.cjs +0 -43
- package/dist/flex-BEB1yuMF.cjs.map +0 -1
- package/dist/flex-BgcbHlPo.js +0 -260
- package/dist/flex-BgcbHlPo.js.map +0 -1
- package/dist/icon-D0FAI5uJ.js.map +0 -1
- package/dist/icon-DJnGMAQ2.cjs +0 -49
- package/dist/icon-DJnGMAQ2.cjs.map +0 -1
- package/dist/icon-button-CSZtSmOy.cjs +0 -65
- package/dist/icon-button-CSZtSmOy.cjs.map +0 -1
- package/dist/icon-button-CbgQp3AL.js +0 -156
- package/dist/icon-button-CbgQp3AL.js.map +0 -1
- package/dist/input-DLnKAj3B.js.map +0 -1
- package/dist/input-wZ6ORWru.cjs +0 -51
- package/dist/input-wZ6ORWru.cjs.map +0 -1
- package/dist/menu-ofiPDY2a.js +0 -61
- package/dist/navigation-rail-CEDLJTrH.cjs.map +0 -1
- package/dist/navigation-rail-weSW6BCv.js.map +0 -1
- package/dist/notification-service-B4nvP2Jc.js +0 -532
- package/dist/notification-service-B4nvP2Jc.js.map +0 -1
- package/dist/notification-service-B_pa74hl.cjs +0 -143
- package/dist/notification-service-B_pa74hl.cjs.map +0 -1
- package/dist/notify-Ci0HrUIo.js.map +0 -1
- package/dist/notify-aasSKQGA.cjs.map +0 -1
- package/dist/progress-B1f3y-Mf.js +0 -58
- package/dist/progress-B1f3y-Mf.js.map +0 -1
- package/dist/progress-DdBHNIMT.cjs +0 -35
- package/dist/progress-DdBHNIMT.cjs.map +0 -1
- package/dist/ripple-QoNZUUw_.js +0 -148
- package/dist/ripple-QoNZUUw_.js.map +0 -1
- package/dist/ripple-Ujq_REH4.cjs +0 -16
- package/dist/ripple-Ujq_REH4.cjs.map +0 -1
- package/dist/select-ApLZefMf.js.map +0 -1
- package/dist/select-_2Ag_znm.cjs.map +0 -1
- package/dist/sheet.service-BvOiOFMm.js.map +0 -1
- package/dist/sheet.service-DfHrOxyc.cjs +0 -2
- package/dist/sheet.service-DfHrOxyc.cjs.map +0 -1
- package/dist/spinner-BKeA2bdB.cjs.map +0 -1
- package/dist/spinner-Brq1TenP.js.map +0 -1
- package/dist/suggestion-chip-CWBSzu7C.js.map +0 -1
- package/dist/suggestion-chip-dq20NKWy.cjs.map +0 -1
- package/dist/surface-Bf8pvmdG.js.map +0 -1
- package/dist/surface-fEPJ-cuu.cjs.map +0 -1
- package/dist/tailwind.mixin-3TPVvhYf.cjs +0 -2
- package/dist/tailwind.mixin-DIW0B_of.js +0 -67
- package/dist/textarea-B7arkA7y.cjs +0 -44
- package/dist/theme-controller-boat-BK59LqH9.js.map +0 -1
- package/dist/theme-controller-boat-Y5QXwJxW.cjs +0 -64
- package/dist/theme-controller-boat-Y5QXwJxW.cjs.map +0 -1
- package/dist/typography-DjGWK58I.js.map +0 -1
- package/dist/typography-DsIU0TGe.cjs.map +0 -1
- package/types/src/notification/notification-audio-generator.d.ts +0 -45
- package/types/src/notification/notification-audio.d.ts +0 -79
- package/types/src/notification/notification-container.d.ts +0 -48
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";require("rxjs"),require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const c=require("lit/decorators.js");require("./tailwind.mixin-UijsBrYW.cjs");const h=require("./litElement.mixin-BVBdv0GP.cjs"),i=require("lit");require("./scroll-BqT7bvhu.cjs");const p=require("./height-Z70qJYJK.cjs");var u=Object.defineProperty,y=Object.getOwnPropertyDescriptor,s=(r,t,l,o)=>{for(var a,e=o>1?void 0:o?y(t,l):t,n=r.length-1;n>=0;n--)(a=r[n])&&(e=(o?a(t,l,e):a(e))||e);return o&&e&&u(t,l,e),e};exports.SchmancyPage=class extends h.$LitElement(i.css`
|
|
2
|
+
:host {
|
|
3
|
+
touch-action: manipulation;
|
|
4
|
+
overscroll-behavior: none;
|
|
5
|
+
-webkit-tap-highlight-color: transparent;
|
|
6
|
+
}
|
|
7
|
+
`){constructor(){super(...arguments),this.rows="auto_1fr_auto",this.showScrollbar=!1,this.noSelect=!1}connectedCallback(){super.connectedCallback(),this.querySelectorAll(":scope > header").forEach(r=>r.setAttribute("slot","header")),this.querySelectorAll(":scope > footer").forEach(r=>r.setAttribute("slot","footer"))}render(){return i.html`
|
|
8
|
+
<section
|
|
9
|
+
${p.fullHeight()}
|
|
10
|
+
class=${this.classMap({"grid overflow-hidden min-h-dvh":!0,"select-none":this.noSelect})}
|
|
11
|
+
style="grid-template-rows: ${this.rows.replace(/_/g," ")}"
|
|
12
|
+
>
|
|
13
|
+
<slot name="header"></slot>
|
|
14
|
+
<schmancy-scroll ?hide=${!this.showScrollbar}><slot></slot></schmancy-scroll>
|
|
15
|
+
<schmancy-scroll ?hide=${!this.showScrollbar}>
|
|
16
|
+
<slot name="footer"></slot>
|
|
17
|
+
</schmancy-scroll>
|
|
18
|
+
</section>
|
|
19
|
+
`}},s([c.property({type:String})],exports.SchmancyPage.prototype,"rows",2),s([c.property({type:Boolean,attribute:"show-scrollbar"})],exports.SchmancyPage.prototype,"showScrollbar",2),s([c.property({type:Boolean,attribute:"no-select"})],exports.SchmancyPage.prototype,"noSelect",2),exports.SchmancyPage=s([c.customElement("schmancy-page")],exports.SchmancyPage);
|
|
20
|
+
//# sourceMappingURL=page-Bmi1QHtq.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-Bmi1QHtq.cjs","sources":["../src/page/page.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport '../layout/scroll/scroll'\nimport { fullHeight } from '../directives/height'\n\n/**\n * Native mobile-like page container.\n * Prevents double-tap zoom, pull-to-refresh, rubber-banding.\n *\n * @element schmancy-page\n *\n * @example\n * html`\n * <schmancy-page rows=\"1fr_2fr_auto\">\n * <header>App Bar</header>\n * <main>Scrollable content</main>\n * <footer>Navigation</footer>\n * </schmancy-page>\n * `\n */\n@customElement('schmancy-page')\nexport class SchmancyPage extends $LitElement(css`\n\t:host {\n\t\ttouch-action: manipulation;\n\t\toverscroll-behavior: none;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n`) {\n\t/** Custom grid-template-rows using underscores (e.g. \"1fr_2fr_auto\") */\n\t@property({ type: String })\n\trows = 'auto_1fr_auto'\n\n\t@property({ type: Boolean, attribute: 'show-scrollbar' })\n\tshowScrollbar = false\n\n\t@property({ type: Boolean, attribute: 'no-select' })\n\tnoSelect = false\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\t// Auto-assign semantic elements to slots\n\t\tthis.querySelectorAll(':scope > header').forEach(el => el.setAttribute('slot', 'header'))\n\t\tthis.querySelectorAll(':scope > footer').forEach(el => el.setAttribute('slot', 'footer'))\n\t}\n\n\tprotected render() {\n\t\treturn html`\n\t\t\t<section\n\t\t\t\t${fullHeight()}\n\t\t\t\tclass=${this.classMap({\n\t\t\t\t\t'grid overflow-hidden min-h-dvh': true,\n\t\t\t\t\t'select-none': this.noSelect,\n\t\t\t\t})}\n\t\t\t\tstyle=\"grid-template-rows: ${this.rows.replace(/_/g, ' ')}\"\n\t\t\t>\n\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t<schmancy-scroll ?hide=${!this.showScrollbar}><slot></slot></schmancy-scroll>\n\t\t\t\t<schmancy-scroll ?hide=${!this.showScrollbar}>\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</schmancy-scroll>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-page': SchmancyPage\n\t}\n}\n"],"names":["SchmancyPage","$LitElement","css","super","arguments","this","rows","showScrollbar","noSelect","connectedCallback","querySelectorAll","forEach","el","setAttribute","render","html","fullHeight","classMap","replace","__decorateClass","property","type","String","prototype","Boolean","attribute","customElement"],"mappings":"iiBAsBaA,QAAAA,aAAN,cAA2BC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAvC,CAAA,CAAA,cAAAC,MAAAA,GAAAC,SAAAA,EASNC,KAAAC,KAAO,gBAGPD,KAAAE,cAAAA,GAGAF,KAAAG,SAAAA,EAAW,CAEX,oBACCL,MAAMM,kBAAAA,EAENJ,KAAKK,iBAAiB,iBAAA,EAAmBC,WAAcC,EAAGC,aAAa,OAAQ,WAC/ER,KAAKK,iBAAiB,mBAAmBC,WAAcC,EAAGC,aAAa,OAAQ,QAAA,CAAA,CAChF,CAEU,QAAAC,CACT,OAAOC,EAAAA;AAAAA;AAAAA,MAEHC;YACMX,KAAKY,SAAS,CACrB,iCAAA,GACA,cAAeZ,KAAKG,QAAAA,CAAAA,CAAAA;AAAAA,iCAEQH,KAAKC,KAAKY,QAAQ,KAAM,GAAA,CAAA;AAAA;AAAA;AAAA,8BAG3Bb,KAAKE,aAAAA;AAAAA,8BACLF,KAAKE,aAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAKlC,CAAA,EAhCAY,EAAA,CADCC,WAAS,CAAEC,KAAMC,MAAAA,CAAAA,CAAAA,EARNtB,qBASZuB,UAAA,OAAA,CAAA,EAGAJ,EAAA,CADCC,EAAAA,SAAS,CAAEC,KAAMG,QAASC,UAAW,gBAAA,CAAA,CAAA,EAX1BzB,qBAYZuB,UAAA,gBAAA,CAAA,EAGAJ,EAAA,CADCC,EAAAA,SAAS,CAAEC,KAAMG,QAASC,UAAW,WAAA,CAAA,CAAA,EAd1BzB,qBAeZuB,UAAA,WAAA,GAfYvB,QAAAA,aAANmB,EAAA,CADNO,EAAAA,cAAc,eAAA,CAAA,EACF1B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import "rxjs";
|
|
2
|
+
import "rxjs/operators";
|
|
3
|
+
import "lit/directives/class-map.js";
|
|
4
|
+
import "lit/directives/style-map.js";
|
|
5
|
+
import { property as h, customElement as i } from "lit/decorators.js";
|
|
6
|
+
import "./tailwind.mixin-Ddt05Frc.js";
|
|
7
|
+
import { $ as p } from "./litElement.mixin-Wcu4yIIs.js";
|
|
8
|
+
import { css as m, html as u } from "lit";
|
|
9
|
+
import "./scroll-Bu-vAg3d.js";
|
|
10
|
+
import { f as y } from "./height-CfECBO2j.js";
|
|
11
|
+
var d = Object.defineProperty, b = Object.getOwnPropertyDescriptor, l = (o, r, a, s) => {
|
|
12
|
+
for (var c, t = s > 1 ? void 0 : s ? b(r, a) : r, n = o.length - 1; n >= 0; n--) (c = o[n]) && (t = (s ? c(r, a, t) : c(t)) || t);
|
|
13
|
+
return s && t && d(r, a, t), t;
|
|
14
|
+
};
|
|
15
|
+
let e = class extends p(m`
|
|
16
|
+
:host {
|
|
17
|
+
touch-action: manipulation;
|
|
18
|
+
overscroll-behavior: none;
|
|
19
|
+
-webkit-tap-highlight-color: transparent;
|
|
20
|
+
}
|
|
21
|
+
`) {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments), this.rows = "auto_1fr_auto", this.showScrollbar = !1, this.noSelect = !1;
|
|
24
|
+
}
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), this.querySelectorAll(":scope > header").forEach((o) => o.setAttribute("slot", "header")), this.querySelectorAll(":scope > footer").forEach((o) => o.setAttribute("slot", "footer"));
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
return u`
|
|
30
|
+
<section
|
|
31
|
+
${y()}
|
|
32
|
+
class=${this.classMap({ "grid overflow-hidden min-h-dvh": !0, "select-none": this.noSelect })}
|
|
33
|
+
style="grid-template-rows: ${this.rows.replace(/_/g, " ")}"
|
|
34
|
+
>
|
|
35
|
+
<slot name="header"></slot>
|
|
36
|
+
<schmancy-scroll ?hide=${!this.showScrollbar}><slot></slot></schmancy-scroll>
|
|
37
|
+
<schmancy-scroll ?hide=${!this.showScrollbar}>
|
|
38
|
+
<slot name="footer"></slot>
|
|
39
|
+
</schmancy-scroll>
|
|
40
|
+
</section>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
l([h({ type: String })], e.prototype, "rows", 2), l([h({ type: Boolean, attribute: "show-scrollbar" })], e.prototype, "showScrollbar", 2), l([h({ type: Boolean, attribute: "no-select" })], e.prototype, "noSelect", 2), e = l([i("schmancy-page")], e);
|
|
45
|
+
export {
|
|
46
|
+
e as S
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=page-BpygEntU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-BpygEntU.js","sources":["../src/page/page.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport '../layout/scroll/scroll'\nimport { fullHeight } from '../directives/height'\n\n/**\n * Native mobile-like page container.\n * Prevents double-tap zoom, pull-to-refresh, rubber-banding.\n *\n * @element schmancy-page\n *\n * @example\n * html`\n * <schmancy-page rows=\"1fr_2fr_auto\">\n * <header>App Bar</header>\n * <main>Scrollable content</main>\n * <footer>Navigation</footer>\n * </schmancy-page>\n * `\n */\n@customElement('schmancy-page')\nexport class SchmancyPage extends $LitElement(css`\n\t:host {\n\t\ttouch-action: manipulation;\n\t\toverscroll-behavior: none;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n`) {\n\t/** Custom grid-template-rows using underscores (e.g. \"1fr_2fr_auto\") */\n\t@property({ type: String })\n\trows = 'auto_1fr_auto'\n\n\t@property({ type: Boolean, attribute: 'show-scrollbar' })\n\tshowScrollbar = false\n\n\t@property({ type: Boolean, attribute: 'no-select' })\n\tnoSelect = false\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\t// Auto-assign semantic elements to slots\n\t\tthis.querySelectorAll(':scope > header').forEach(el => el.setAttribute('slot', 'header'))\n\t\tthis.querySelectorAll(':scope > footer').forEach(el => el.setAttribute('slot', 'footer'))\n\t}\n\n\tprotected render() {\n\t\treturn html`\n\t\t\t<section\n\t\t\t\t${fullHeight()}\n\t\t\t\tclass=${this.classMap({\n\t\t\t\t\t'grid overflow-hidden min-h-dvh': true,\n\t\t\t\t\t'select-none': this.noSelect,\n\t\t\t\t})}\n\t\t\t\tstyle=\"grid-template-rows: ${this.rows.replace(/_/g, ' ')}\"\n\t\t\t>\n\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t<schmancy-scroll ?hide=${!this.showScrollbar}><slot></slot></schmancy-scroll>\n\t\t\t\t<schmancy-scroll ?hide=${!this.showScrollbar}>\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</schmancy-scroll>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-page': SchmancyPage\n\t}\n}\n"],"names":["SchmancyPage","$LitElement","css","super","arguments","this","rows","showScrollbar","noSelect","connectedCallback","querySelectorAll","forEach","el","setAttribute","render","html","fullHeight","classMap","replace","__decorateClass","property","type","String","prototype","Boolean","attribute","customElement"],"mappings":";;;;;;;;;;;;;;AAsBO,IAAMA,IAAN,cAA2BC,EAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAvC,EAAA;AAAA,EAAA;AAAAC,UAAAA,GAAAC,SAAAA,GASNC,KAAAC,OAAO,iBAGPD,KAAAE,gBAAAA,IAGAF,KAAAG;EAAW;AAAA,EAEX,oBAAAC;AACCN,UAAMM,qBAENJ,KAAKK,iBAAiB,iBAAA,EAAmBC,eAAcC,EAAGC,aAAa,QAAQ,QAAA,CAAA,GAC/ER,KAAKK,iBAAiB,iBAAA,EAAmBC,eAAcC,EAAGC,aAAa,QAAQ,QAAA,CAAA;AAAA,EAChF;AAAA,EAEU,SAAAC;AACT,WAAOC;AAAAA;AAAAA,MAEHC,EAAAA,CAAAA;AAAAA,YACMX,KAAKY,SAAS,EACrB,kCAAA,IACA,eAAeZ,KAAKG,SAAAA,CAAAA,CAAAA;AAAAA,iCAEQH,KAAKC,KAAKY,QAAQ,MAAM,GAAA,CAAA;AAAA;AAAA;AAAA,8BAG3Bb,KAAKE,aAAAA;AAAAA,8BACLF,KAAKE,aAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAKlC;AAAA;AAhCAY,EAAA,CADCC,EAAS,EAAEC,MAAMC,YARNtB,EASZuB,WAAA,QAAA,CAAA,GAGAJ,EAAA,CADCC,EAAS,EAAEC,MAAMG,SAASC,WAAW,iBAAA,CAAA,CAAA,GAX1BzB,EAYZuB,WAAA,iBAAA,IAGAJ,EAAA,CADCC,EAAS,EAAEC,MAAMG,SAASC,WAAW,YAAA,CAAA,CAAA,GAd1BzB,EAeZuB,WAAA,YAAA,CAAA,GAfYvB,IAANmB,EAAA,CADNO,EAAc,mBACF1B,CAAAA;"}
|
package/dist/page.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/page.js
ADDED
package/dist/page.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require("rxjs"),require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const h=require("lit/decorators.js");require("./tailwind.mixin-3TPVvhYf.cjs");const w=require("./litElement.mixin-CPQYJnK_.cjs"),D=require("lit");var x=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},v=function(e,t,r,i,a,n,o,l,d,p){var s=this;s.numeralDecimalMark=e||".",s.numeralIntegerScale=t>0?t:0,s.numeralDecimalScale=r>=0?r:2,s.numeralThousandsGroupStyle=i||v.groupStyle.thousand,s.numeralPositiveOnly=!!a,s.stripLeadingZeroes=n!==!1,s.prefix=o||o===""?o:"",s.signBeforePrefix=!!l,s.tailPrefix=!!d,s.delimiter=p||p===""?p:",",s.delimiterRE=p?new RegExp("\\"+p,"g"):""};v.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"},v.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(e){var t,r,i,a,n=this,o="";switch(e=e.replace(/[A-Za-z]/g,"").replace(n.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",n.numeralPositiveOnly?"":"-").replace("M",n.numeralDecimalMark),n.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,"$1")),r=e.slice(0,1)==="-"?"-":"",i=n.prefix!==void 0?n.signBeforePrefix?r+n.prefix:n.prefix+r:r,a=e,e.indexOf(n.numeralDecimalMark)>=0&&(a=(t=e.split(n.numeralDecimalMark))[0],o=n.numeralDecimalMark+t[1].slice(0,n.numeralDecimalScale)),r==="-"&&(a=a.slice(1)),n.numeralIntegerScale>0&&(a=a.slice(0,n.numeralIntegerScale)),n.numeralThousandsGroupStyle){case v.groupStyle.lakh:a=a.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+n.delimiter);break;case v.groupStyle.wan:a=a.replace(/(\d)(?=(\d{4})+$)/g,"$1"+n.delimiter);break;case v.groupStyle.thousand:a=a.replace(/(\d)(?=(\d{3})+$)/g,"$1"+n.delimiter)}return n.tailPrefix?r+a.toString()+(n.numeralDecimalScale>0?o.toString():"")+n.prefix:i+a.toString()+(n.numeralDecimalScale>0?o.toString():"")}};var k=v,F=function(e,t,r){var i=this;i.date=[],i.blocks=[],i.datePattern=e,i.dateMin=t.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMin.length===2&&i.dateMin.unshift(0),i.dateMax=r.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMax.length===2&&i.dateMax.unshift(0),i.initBlocks()};F.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){t==="Y"?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+"-"+e.addLeadingZero(t[1])+"-"+e.addLeadingZero(t[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,r="";return e=e.replace(/[^\d]/g,""),t.blocks.forEach(function(i,a){if(e.length>0){var n=e.slice(0,i),o=n.slice(0,1),l=e.slice(i);switch(t.datePattern[a]){case"d":n==="00"?n="01":parseInt(o,10)>3?n="0"+o:parseInt(n,10)>31&&(n="31");break;case"m":n==="00"?n="01":parseInt(o,10)>1?n="0"+o:parseInt(n,10)>12&&(n="12")}r+=n,e=l}}),this.getFixedDateString(r)},getFixedDateString:function(e){var t,r,i,a=this,n=a.datePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0,y=!1;return e.length===4&&n[0].toLowerCase()!=="y"&&n[1].toLowerCase()!=="y"&&(u=2-(s=n[0]==="d"?0:2),t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),o=this.getFixedDate(t,r,0)),e.length===8&&(n.forEach(function(f,C){switch(f){case"d":l=C;break;case"m":d=C;break;default:p=C}}),m=2*p,s=l<=p?2*l:2*l+2,u=d<=p?2*d:2*d+2,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=this.getFixedDate(t,r,i)),e.length!==4||n[0]!=="y"&&n[1]!=="y"||(m=2-(u=n[0]==="m"?0:2),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),y=e.slice(m,m+2).length===2,o=[0,r,i]),e.length!==6||n[0]!=="Y"&&n[1]!=="Y"||(m=2-.5*(u=n[0]==="m"?0:4),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=[0,r,i]),o=a.getRangeFixedDate(o),a.date=o,o.length===0?e:n.reduce(function(f,C){switch(C){case"d":return f+(o[0]===0?"":a.addLeadingZero(o[0]));case"m":return f+(o[1]===0?"":a.addLeadingZero(o[1]));case"y":return f+(y?a.addLeadingZeroForYear(o[2],!1):"");case"Y":return f+(y?a.addLeadingZeroForYear(o[2],!0):"")}},"")},getRangeFixedDate:function(e){var t=this,r=t.datePattern,i=t.dateMin||[],a=t.dateMax||[];return!e.length||i.length<3&&a.length<3||r.find(function(n){return n.toLowerCase()==="y"})&&e[2]===0?e:a.length&&(a[2]<e[2]||a[2]===e[2]&&(a[1]<e[1]||a[1]===e[1]&&a[0]<e[0]))?a:i.length&&(i[2]>e[2]||i[2]===e[2]&&(i[1]>e[1]||i[1]===e[1]&&i[0]>e[0]))?i:e},getFixedDate:function(e,t,r){return e=Math.min(e,31),t=Math.min(t,12),r=parseInt(r||0,10),(t<7&&t%2==0||t>8&&t%2==1)&&(e=Math.min(e,t===2?this.isLeapYear(r)?29:28:30)),[e,t,r]},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},addLeadingZero:function(e){return(e<10?"0":"")+e},addLeadingZeroForYear:function(e,t){return t?(e<10?"000":e<100?"00":e<1e3?"0":"")+e:(e<10?"0":"")+e}};var V=F,P=function(e,t){var r=this;r.time=[],r.blocks=[],r.timePattern=e,r.timeFormat=t,r.initBlocks()};P.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+":"+e.addLeadingZero(t[1])+":"+e.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){return String(this.timeFormat)==="12"?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,r="";e=e.replace(/[^\d]/g,"");var i=t.getTimeFormatOptions();return t.blocks.forEach(function(a,n){if(e.length>0){var o=e.slice(0,a),l=o.slice(0,1),d=e.slice(a);switch(t.timePattern[n]){case"h":parseInt(l,10)>i.maxHourFirstDigit?o="0"+l:parseInt(o,10)>i.maxHours&&(o=i.maxHours+"");break;case"m":case"s":parseInt(l,10)>i.maxMinutesFirstDigit?o="0"+l:parseInt(o,10)>i.maxMinutes&&(o=i.maxMinutes+"")}r+=o,e=d}}),this.getFixedTimeString(r)},getFixedTimeString:function(e){var t,r,i,a=this,n=a.timePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0;return e.length===6&&(n.forEach(function(y,f){switch(y){case"s":l=2*f;break;case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,s=l,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),e.length===4&&a.timePattern.indexOf("s")<0&&(n.forEach(function(y,f){switch(y){case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,t=0,r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),a.time=o,o.length===0?e:n.reduce(function(y,f){switch(f){case"s":return y+a.addLeadingZero(o[2]);case"m":return y+a.addLeadingZero(o[1]);case"h":return y+a.addLeadingZero(o[0])}},"")},getFixedTime:function(e,t,r){return r=Math.min(parseInt(r||0,10),60),t=Math.min(t,60),[e=Math.min(e,60),t,r]},addLeadingZero:function(e){return(e<10?"0":"")+e}};var L=P,I=function(e,t){var r=this;r.delimiter=t||t===""?t:" ",r.delimiterRE=t?new RegExp("\\"+t,"g"):"",r.formatter=e};I.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear();for(var r,i="",a=!1,n=0,o=(e=(e=(e=e.replace(/[^\d+]/g,"")).replace(/^\+/,"B").replace(/\+/g,"").replace("B","+")).replace(t.delimiterRE,"")).length;n<o;n++)r=t.formatter.inputDigit(e.charAt(n)),/[\s()-]/g.test(r)?(i=r,a=!0):a||(i=r);return i=(i=i.replace(/[()]/g,"")).replace(/[\s-]/g,t.delimiter)}};var M=I,b={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(e){var t=e.reduce(function(r,i){return r+i},0);return e.concat(19-t)},getInfo:function(e,t){var r=b.blocks,i=b.re;for(var a in t=!!t,i)if(i[a].test(e)){var n=r[a];return{type:a,blocks:t?this.getStrictBlocks(n):n}}return{type:"unknown",blocks:t?this.getStrictBlocks(r.general):r.general}}},N=b,E={noop:function(){},strip:function(e,t){return e.replace(t,"")},getPostDelimiter:function(e,t,r){if(r.length===0)return e.slice(-t.length)===t?t:"";var i="";return r.forEach(function(a){e.slice(-a.length)===a&&(i=a)}),i},getDelimiterREByDelimiter:function(e){return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(e,t,r,i,a){return t.length===e?r.length:e+this.getPositionOffset(e,t,r,i,a)},getPositionOffset:function(e,t,r,i,a){var n,o,l;return n=this.stripDelimiters(t.slice(0,e),i,a),o=this.stripDelimiters(r.slice(0,e),i,a),(l=n.length-o.length)!==0?l/Math.abs(l):0},stripDelimiters:function(e,t,r){var i=this;if(r.length===0){var a=t?i.getDelimiterREByDelimiter(t):"";return e.replace(a,"")}return r.forEach(function(n){n.split("").forEach(function(o){e=e.replace(i.getDelimiterREByDelimiter(o),"")})}),e},headStr:function(e,t){return e.slice(0,t)},getMaxLength:function(e){return e.reduce(function(t,r){return t+r},0)},getPrefixStrippedValue:function(e,t,r,i,a,n,o,l,d){if(r===0)return e;if(e===t&&e!=="")return"";if(d&&e.slice(0,1)=="-"){var p=i.slice(0,1)=="-"?i.slice(1):i;return"-"+this.getPrefixStrippedValue(e.slice(1),t,r,p,a,n,o,l,d)}if(i.slice(0,r)!==t&&!l||i.slice(-r)!==t&&l)return o&&!i&&e?e:"";var s=this.stripDelimiters(i,a,n);return e.slice(0,r)===t||l?e.slice(-r)!==t&&l?s.slice(0,-r-1):l?e.slice(0,-r):e.slice(r):s.slice(r)},getFirstDiffIndex:function(e,t){for(var r=0;e.charAt(r)===t.charAt(r);)if(e.charAt(r++)==="")return-1;return r},getFormattedValue:function(e,t,r,i,a,n){var o="",l=a.length>0,d="";return r===0?e:(t.forEach(function(p,s){if(e.length>0){var u=e.slice(0,p),m=e.slice(p);d=l?a[n?s-1:s]||d:i,n?(s>0&&(o+=d),o+=u):(o+=u,u.length===p&&s<r-1&&(o+=d)),e=m}}),o)},fixPrefixCursor:function(e,t,r,i){if(e){var a=e.value,n=r||i[0]||" ";if(e.setSelectionRange&&t&&!(t.length+n.length<=a.length)){var o=2*a.length;setTimeout(function(){e.setSelectionRange(o,o)},1)}}},checkFullSelection:function(e){try{return(window.getSelection()||document.getSelection()||{}).toString().length===e.length}catch{}return!1},setSelection:function(e,t,r){if(e===this.getActiveElement(r)&&!(e&&e.value.length<=t))if(e.createTextRange){var i=e.createTextRange();i.move("character",t),i.select()}else try{e.setSelectionRange(t,t)}catch{}},getActiveElement:function(e){var t=e.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(e,t){return!!(this.isAndroid()&&e&&t)&&t===e.slice(0,-1)}},T={assign:function(e,t){return t=t||{},(e=e||{}).creditCard=!!t.creditCard,e.creditCardStrictMode=!!t.creditCardStrictMode,e.creditCardType="",e.onCreditCardTypeChanged=t.onCreditCardTypeChanged||function(){},e.phone=!!t.phone,e.phoneRegionCode=t.phoneRegionCode||"AU",e.phoneFormatter={},e.time=!!t.time,e.timePattern=t.timePattern||["h","m","s"],e.timeFormat=t.timeFormat||"24",e.timeFormatter={},e.date=!!t.date,e.datePattern=t.datePattern||["d","m","Y"],e.dateMin=t.dateMin||"",e.dateMax=t.dateMax||"",e.dateFormatter={},e.numeral=!!t.numeral,e.numeralIntegerScale=t.numeralIntegerScale>0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||".",e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||"thousand",e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=t.stripLeadingZeroes!==!1,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?"":t.prefix||"",e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=t.initValue!==void 0&&t.initValue!==null?t.initValue.toString():"",e.delimiter=t.delimiter||t.delimiter===""?t.delimiter:t.date?"/":t.time?":":t.numeral?",":(t.phone," "),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root=typeof x=="object"&&x?x:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result="",e.onValueChanged=t.onValueChanged||function(){},e}},c=function(e,t){var r=this;if(typeof e=="string"?(r.element=document.querySelector(e),document.querySelectorAll(e).length>1):e.length!==void 0&&e.length>0?(r.element=e[0],e.length>1):r.element=e,!r.element)throw new Error("[cleave.js] Please check the element");t.initValue=r.element.value,r.properties=c.DefaultProperties.assign({},t),r.init()};c.prototype={init:function(){var e=this,t=e.properties;t.numeral||t.phone||t.creditCard||t.time||t.date||t.blocksLength!==0||t.prefix?(t.maxLength=c.Util.getMaxLength(t.blocks),e.isAndroid=c.Util.isAndroid(),e.lastInputValue="",e.isBackward="",e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener("input",e.onChangeListener),e.element.addEventListener("keydown",e.onKeyDownListener),e.element.addEventListener("focus",e.onFocusListener),e.element.addEventListener("cut",e.onCutListener),e.element.addEventListener("copy",e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)):e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this;if(e.properties.swapHiddenInput){var t=e.element.cloneNode(!0);e.element.parentNode.insertBefore(t,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type="hidden",e.element=t,e.element.id=""}},initNumeralFormatter:function(){var e=this.properties;e.numeral&&(e.numeralFormatter=new c.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter))},initTimeFormatter:function(){var e=this.properties;e.time&&(e.timeFormatter=new c.TimeFormatter(e.timePattern,e.timeFormat),e.blocks=e.timeFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initDateFormatter:function(){var e=this.properties;e.date&&(e.dateFormatter=new c.DateFormatter(e.datePattern,e.dateMin,e.dateMax),e.blocks=e.dateFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initPhoneFormatter:function(){var e=this.properties;if(e.phone)try{e.phoneFormatter=new c.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch{throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(e){var t=this,r=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=r===8},onChange:function(e){var t=this,r=t.properties,i=c.Util;t.isBackward=t.isBackward||e.inputType==="deleteContentBackward";var a=i.getPostDelimiter(t.lastInputValue,r.delimiter,r.delimiters);t.isBackward&&a?r.postDelimiterBackspace=a:r.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),c.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){c.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(""))},onCopy:function(e){c.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this.properties,r=c.Util,i=this.element.value,a="";a=t.copyDelimiter?i:r.stripDelimiters(i,t.delimiter,t.delimiters);try{e.clipboardData?e.clipboardData.setData("Text",a):window.clipboardData.setData("Text",a),e.preventDefault()}catch{}},onInput:function(e){var t=this,r=t.properties,i=c.Util,a=i.getPostDelimiter(e,r.delimiter,r.delimiters);return r.numeral||!r.postDelimiterBackspace||a||(e=i.headStr(e,e.length-r.postDelimiterBackspace.length)),r.phone?(!r.prefix||r.noImmediatePrefix&&!e.length?r.result=r.phoneFormatter.format(e):r.result=r.prefix+r.phoneFormatter.format(e).slice(r.prefix.length),void t.updateValueState()):r.numeral?(r.prefix&&r.noImmediatePrefix&&e.length===0?r.result="":r.result=r.numeralFormatter.format(e),void t.updateValueState()):(r.date&&(e=r.dateFormatter.getValidatedDate(e)),r.time&&(e=r.timeFormatter.getValidatedTime(e)),e=i.stripDelimiters(e,r.delimiter,r.delimiters),e=i.getPrefixStrippedValue(e,r.prefix,r.prefixLength,r.result,r.delimiter,r.delimiters,r.noImmediatePrefix,r.tailPrefix,r.signBeforePrefix),e=r.numericOnly?i.strip(e,/[^\d]/g):e,e=r.uppercase?e.toUpperCase():e,e=r.lowercase?e.toLowerCase():e,r.prefix&&(r.tailPrefix?e+=r.prefix:e=r.prefix+e,r.blocksLength===0)?(r.result=e,void t.updateValueState()):(r.creditCard&&t.updateCreditCardPropsByValue(e),e=i.headStr(e,r.maxLength),r.result=i.getFormattedValue(e,r.blocks,r.blocksLength,r.delimiter,r.delimiters,r.delimiterLazyShow),void t.updateValueState()))},updateCreditCardPropsByValue:function(e){var t,r=this.properties,i=c.Util;i.headStr(r.result,4)!==i.headStr(e,4)&&(t=c.CreditCardDetector.getInfo(e,r.creditCardStrictMode),r.blocks=t.blocks,r.blocksLength=r.blocks.length,r.maxLength=i.getMaxLength(r.blocks),r.creditCardType!==t.type&&(r.creditCardType=t.type,r.onCreditCardTypeChanged.call(this,r.creditCardType)))},updateValueState:function(){var e=this,t=c.Util,r=e.properties;if(e.element){var i=e.element.selectionEnd,a=e.element.value,n=r.result;i=t.getNextCursorPosition(i,a,n,r.delimiter,r.delimiters),e.isAndroid?window.setTimeout(function(){e.element.value=n,t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged()},1):(e.element.value=n,r.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged())}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this;t.properties.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,r=t.properties;e=e!=null?e.toString():"",r.numeral&&(e=e.replace(".",r.numeralDecimalMark)),r.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this.properties,t=c.Util,r=this.element.value;return e.rawValueTrimPrefix&&(r=t.getPrefixStrippedValue(r,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)),r=e.numeral?e.numeralFormatter.getRawValue(r):t.stripDelimiters(r,e.delimiter,e.delimiters)},getISOFormatDate:function(){var e=this.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var e=this.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener("input",e.onChangeListener),e.element.removeEventListener("keydown",e.onKeyDownListener),e.element.removeEventListener("focus",e.onFocusListener),e.element.removeEventListener("cut",e.onCutListener),e.element.removeEventListener("copy",e.onCopyListener)},toString:function(){return"[Cleave Object]"}},c.NumeralFormatter=k,c.DateFormatter=V,c.TimeFormatter=L,c.PhoneFormatter=M,c.CreditCardDetector=N,c.Util=E,c.DefaultProperties=T,(typeof x=="object"&&x?x:window).Cleave=c;var S=c,B=Object.defineProperty,R=Object.getOwnPropertyDescriptor,g=(e,t,r,i)=>{for(var a,n=i>1?void 0:i?R(t,r):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(i?a(t,r,n):a(n))||n);return i&&n&&B(t,r,n),n};exports.SchmancyPaymentCardForm=class extends w.$LitElement(){constructor(){super(...arguments),this.value={cardName:"",cardNumber:"",expirationDate:"",cvv:""},this.cardType="",this.isCardNameValid=!0,this.isCardNumberValid=!0,this.isExpirationDateValid=!0,this.isCvvValid=!0}firstUpdated(){new S(this.cardNumberInput,{creditCard:!0,creditCardStrictMode:!0,onCreditCardTypeChanged:e=>{this.cardType=e,e==="unknown"?(this.isCardNumberValid=!1,this.cardNumberInput.setCustomValidity("Please enter a valid card number."),this.cardNumberInput.error=!0):(this.isCardNumberValid=!0,this.cardNumberInput.setCustomValidity(""),this.cardNumberInput.error=!1,this.cvvInput.maxlength=e==="amex"?4:3)}}),new S(this.expirationDateInput,{date:!0,datePattern:["m","y"],onValueChanged:e=>{const t=e.target.value;if(!t||t.length<5)this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Please enter a valid expiration date (MM/YY)."),this.expirationDateInput.error=!0;else{const[r,i]=t.split("/"),a=new Date,n=a.getFullYear()%100,o=a.getMonth()+1,l=parseInt(r,10),d=parseInt(i,10);d<n||d===n&&l<o?(this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Card has expired."),this.expirationDateInput.error=!0):(this.isExpirationDateValid=!0,this.expirationDateInput.setCustomValidity(""),this.expirationDateInput.error=!1)}}}),new S(this.cvvInput,{blocks:[4],numericOnly:!0,onValueChanged:e=>{const t=this.cardType==="amex"?4:3;e.target.value.length<t?(this.isCvvValid=!1,this.cvvInput.setCustomValidity(`Please enter a valid ${t}-digit CVV.`),this.cvvInput.error=!0):(this.isCvvValid=!0,this.cvvInput.setCustomValidity(""),this.cvvInput.error=!1)}}),new S(this.cardNameInput,{uppercase:!0,delimiter:" ",onValueChanged:e=>{!e.target.value||e.target.value.length<3?(this.isCardNameValid=!1,this.cardNameInput.setCustomValidity("Please enter the name as it appears on the card."),this.cardNameInput.error=!0):(this.isCardNameValid=!0,this.cardNameInput.setCustomValidity(""),this.cardNameInput.error=!1)}})}reportValidity(){return this.form.reportValidity()}checkValidity(){return!!this.form.reportValidity()}emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:{...this.value},bubbles:!0}))}render(){const e=this.getCardIcon();return D.html`
|
|
1
|
+
"use strict";require("rxjs"),require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const h=require("lit/decorators.js");require("./tailwind.mixin-UijsBrYW.cjs");const w=require("./litElement.mixin-BVBdv0GP.cjs"),D=require("lit");var x=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},v=function(e,t,r,i,a,n,o,l,d,p){var s=this;s.numeralDecimalMark=e||".",s.numeralIntegerScale=t>0?t:0,s.numeralDecimalScale=r>=0?r:2,s.numeralThousandsGroupStyle=i||v.groupStyle.thousand,s.numeralPositiveOnly=!!a,s.stripLeadingZeroes=n!==!1,s.prefix=o||o===""?o:"",s.signBeforePrefix=!!l,s.tailPrefix=!!d,s.delimiter=p||p===""?p:",",s.delimiterRE=p?new RegExp("\\"+p,"g"):""};v.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"},v.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(e){var t,r,i,a,n=this,o="";switch(e=e.replace(/[A-Za-z]/g,"").replace(n.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",n.numeralPositiveOnly?"":"-").replace("M",n.numeralDecimalMark),n.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,"$1")),r=e.slice(0,1)==="-"?"-":"",i=n.prefix!==void 0?n.signBeforePrefix?r+n.prefix:n.prefix+r:r,a=e,e.indexOf(n.numeralDecimalMark)>=0&&(a=(t=e.split(n.numeralDecimalMark))[0],o=n.numeralDecimalMark+t[1].slice(0,n.numeralDecimalScale)),r==="-"&&(a=a.slice(1)),n.numeralIntegerScale>0&&(a=a.slice(0,n.numeralIntegerScale)),n.numeralThousandsGroupStyle){case v.groupStyle.lakh:a=a.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+n.delimiter);break;case v.groupStyle.wan:a=a.replace(/(\d)(?=(\d{4})+$)/g,"$1"+n.delimiter);break;case v.groupStyle.thousand:a=a.replace(/(\d)(?=(\d{3})+$)/g,"$1"+n.delimiter)}return n.tailPrefix?r+a.toString()+(n.numeralDecimalScale>0?o.toString():"")+n.prefix:i+a.toString()+(n.numeralDecimalScale>0?o.toString():"")}};var k=v,F=function(e,t,r){var i=this;i.date=[],i.blocks=[],i.datePattern=e,i.dateMin=t.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMin.length===2&&i.dateMin.unshift(0),i.dateMax=r.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMax.length===2&&i.dateMax.unshift(0),i.initBlocks()};F.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){t==="Y"?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+"-"+e.addLeadingZero(t[1])+"-"+e.addLeadingZero(t[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,r="";return e=e.replace(/[^\d]/g,""),t.blocks.forEach(function(i,a){if(e.length>0){var n=e.slice(0,i),o=n.slice(0,1),l=e.slice(i);switch(t.datePattern[a]){case"d":n==="00"?n="01":parseInt(o,10)>3?n="0"+o:parseInt(n,10)>31&&(n="31");break;case"m":n==="00"?n="01":parseInt(o,10)>1?n="0"+o:parseInt(n,10)>12&&(n="12")}r+=n,e=l}}),this.getFixedDateString(r)},getFixedDateString:function(e){var t,r,i,a=this,n=a.datePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0,y=!1;return e.length===4&&n[0].toLowerCase()!=="y"&&n[1].toLowerCase()!=="y"&&(u=2-(s=n[0]==="d"?0:2),t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),o=this.getFixedDate(t,r,0)),e.length===8&&(n.forEach(function(f,C){switch(f){case"d":l=C;break;case"m":d=C;break;default:p=C}}),m=2*p,s=l<=p?2*l:2*l+2,u=d<=p?2*d:2*d+2,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=this.getFixedDate(t,r,i)),e.length!==4||n[0]!=="y"&&n[1]!=="y"||(m=2-(u=n[0]==="m"?0:2),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),y=e.slice(m,m+2).length===2,o=[0,r,i]),e.length!==6||n[0]!=="Y"&&n[1]!=="Y"||(m=2-.5*(u=n[0]==="m"?0:4),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=[0,r,i]),o=a.getRangeFixedDate(o),a.date=o,o.length===0?e:n.reduce(function(f,C){switch(C){case"d":return f+(o[0]===0?"":a.addLeadingZero(o[0]));case"m":return f+(o[1]===0?"":a.addLeadingZero(o[1]));case"y":return f+(y?a.addLeadingZeroForYear(o[2],!1):"");case"Y":return f+(y?a.addLeadingZeroForYear(o[2],!0):"")}},"")},getRangeFixedDate:function(e){var t=this,r=t.datePattern,i=t.dateMin||[],a=t.dateMax||[];return!e.length||i.length<3&&a.length<3||r.find(function(n){return n.toLowerCase()==="y"})&&e[2]===0?e:a.length&&(a[2]<e[2]||a[2]===e[2]&&(a[1]<e[1]||a[1]===e[1]&&a[0]<e[0]))?a:i.length&&(i[2]>e[2]||i[2]===e[2]&&(i[1]>e[1]||i[1]===e[1]&&i[0]>e[0]))?i:e},getFixedDate:function(e,t,r){return e=Math.min(e,31),t=Math.min(t,12),r=parseInt(r||0,10),(t<7&&t%2==0||t>8&&t%2==1)&&(e=Math.min(e,t===2?this.isLeapYear(r)?29:28:30)),[e,t,r]},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},addLeadingZero:function(e){return(e<10?"0":"")+e},addLeadingZeroForYear:function(e,t){return t?(e<10?"000":e<100?"00":e<1e3?"0":"")+e:(e<10?"0":"")+e}};var V=F,P=function(e,t){var r=this;r.time=[],r.blocks=[],r.timePattern=e,r.timeFormat=t,r.initBlocks()};P.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+":"+e.addLeadingZero(t[1])+":"+e.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){return String(this.timeFormat)==="12"?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,r="";e=e.replace(/[^\d]/g,"");var i=t.getTimeFormatOptions();return t.blocks.forEach(function(a,n){if(e.length>0){var o=e.slice(0,a),l=o.slice(0,1),d=e.slice(a);switch(t.timePattern[n]){case"h":parseInt(l,10)>i.maxHourFirstDigit?o="0"+l:parseInt(o,10)>i.maxHours&&(o=i.maxHours+"");break;case"m":case"s":parseInt(l,10)>i.maxMinutesFirstDigit?o="0"+l:parseInt(o,10)>i.maxMinutes&&(o=i.maxMinutes+"")}r+=o,e=d}}),this.getFixedTimeString(r)},getFixedTimeString:function(e){var t,r,i,a=this,n=a.timePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0;return e.length===6&&(n.forEach(function(y,f){switch(y){case"s":l=2*f;break;case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,s=l,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),e.length===4&&a.timePattern.indexOf("s")<0&&(n.forEach(function(y,f){switch(y){case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,t=0,r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),a.time=o,o.length===0?e:n.reduce(function(y,f){switch(f){case"s":return y+a.addLeadingZero(o[2]);case"m":return y+a.addLeadingZero(o[1]);case"h":return y+a.addLeadingZero(o[0])}},"")},getFixedTime:function(e,t,r){return r=Math.min(parseInt(r||0,10),60),t=Math.min(t,60),[e=Math.min(e,60),t,r]},addLeadingZero:function(e){return(e<10?"0":"")+e}};var L=P,I=function(e,t){var r=this;r.delimiter=t||t===""?t:" ",r.delimiterRE=t?new RegExp("\\"+t,"g"):"",r.formatter=e};I.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear();for(var r,i="",a=!1,n=0,o=(e=(e=(e=e.replace(/[^\d+]/g,"")).replace(/^\+/,"B").replace(/\+/g,"").replace("B","+")).replace(t.delimiterRE,"")).length;n<o;n++)r=t.formatter.inputDigit(e.charAt(n)),/[\s()-]/g.test(r)?(i=r,a=!0):a||(i=r);return i=(i=i.replace(/[()]/g,"")).replace(/[\s-]/g,t.delimiter)}};var M=I,b={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(e){var t=e.reduce(function(r,i){return r+i},0);return e.concat(19-t)},getInfo:function(e,t){var r=b.blocks,i=b.re;for(var a in t=!!t,i)if(i[a].test(e)){var n=r[a];return{type:a,blocks:t?this.getStrictBlocks(n):n}}return{type:"unknown",blocks:t?this.getStrictBlocks(r.general):r.general}}},N=b,E={noop:function(){},strip:function(e,t){return e.replace(t,"")},getPostDelimiter:function(e,t,r){if(r.length===0)return e.slice(-t.length)===t?t:"";var i="";return r.forEach(function(a){e.slice(-a.length)===a&&(i=a)}),i},getDelimiterREByDelimiter:function(e){return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(e,t,r,i,a){return t.length===e?r.length:e+this.getPositionOffset(e,t,r,i,a)},getPositionOffset:function(e,t,r,i,a){var n,o,l;return n=this.stripDelimiters(t.slice(0,e),i,a),o=this.stripDelimiters(r.slice(0,e),i,a),(l=n.length-o.length)!==0?l/Math.abs(l):0},stripDelimiters:function(e,t,r){var i=this;if(r.length===0){var a=t?i.getDelimiterREByDelimiter(t):"";return e.replace(a,"")}return r.forEach(function(n){n.split("").forEach(function(o){e=e.replace(i.getDelimiterREByDelimiter(o),"")})}),e},headStr:function(e,t){return e.slice(0,t)},getMaxLength:function(e){return e.reduce(function(t,r){return t+r},0)},getPrefixStrippedValue:function(e,t,r,i,a,n,o,l,d){if(r===0)return e;if(e===t&&e!=="")return"";if(d&&e.slice(0,1)=="-"){var p=i.slice(0,1)=="-"?i.slice(1):i;return"-"+this.getPrefixStrippedValue(e.slice(1),t,r,p,a,n,o,l,d)}if(i.slice(0,r)!==t&&!l||i.slice(-r)!==t&&l)return o&&!i&&e?e:"";var s=this.stripDelimiters(i,a,n);return e.slice(0,r)===t||l?e.slice(-r)!==t&&l?s.slice(0,-r-1):l?e.slice(0,-r):e.slice(r):s.slice(r)},getFirstDiffIndex:function(e,t){for(var r=0;e.charAt(r)===t.charAt(r);)if(e.charAt(r++)==="")return-1;return r},getFormattedValue:function(e,t,r,i,a,n){var o="",l=a.length>0,d="";return r===0?e:(t.forEach(function(p,s){if(e.length>0){var u=e.slice(0,p),m=e.slice(p);d=l?a[n?s-1:s]||d:i,n?(s>0&&(o+=d),o+=u):(o+=u,u.length===p&&s<r-1&&(o+=d)),e=m}}),o)},fixPrefixCursor:function(e,t,r,i){if(e){var a=e.value,n=r||i[0]||" ";if(e.setSelectionRange&&t&&!(t.length+n.length<=a.length)){var o=2*a.length;setTimeout(function(){e.setSelectionRange(o,o)},1)}}},checkFullSelection:function(e){try{return(window.getSelection()||document.getSelection()||{}).toString().length===e.length}catch{}return!1},setSelection:function(e,t,r){if(e===this.getActiveElement(r)&&!(e&&e.value.length<=t))if(e.createTextRange){var i=e.createTextRange();i.move("character",t),i.select()}else try{e.setSelectionRange(t,t)}catch{}},getActiveElement:function(e){var t=e.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(e,t){return!!(this.isAndroid()&&e&&t)&&t===e.slice(0,-1)}},T={assign:function(e,t){return t=t||{},(e=e||{}).creditCard=!!t.creditCard,e.creditCardStrictMode=!!t.creditCardStrictMode,e.creditCardType="",e.onCreditCardTypeChanged=t.onCreditCardTypeChanged||function(){},e.phone=!!t.phone,e.phoneRegionCode=t.phoneRegionCode||"AU",e.phoneFormatter={},e.time=!!t.time,e.timePattern=t.timePattern||["h","m","s"],e.timeFormat=t.timeFormat||"24",e.timeFormatter={},e.date=!!t.date,e.datePattern=t.datePattern||["d","m","Y"],e.dateMin=t.dateMin||"",e.dateMax=t.dateMax||"",e.dateFormatter={},e.numeral=!!t.numeral,e.numeralIntegerScale=t.numeralIntegerScale>0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||".",e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||"thousand",e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=t.stripLeadingZeroes!==!1,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?"":t.prefix||"",e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=t.initValue!==void 0&&t.initValue!==null?t.initValue.toString():"",e.delimiter=t.delimiter||t.delimiter===""?t.delimiter:t.date?"/":t.time?":":t.numeral?",":(t.phone," "),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root=typeof x=="object"&&x?x:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result="",e.onValueChanged=t.onValueChanged||function(){},e}},c=function(e,t){var r=this;if(typeof e=="string"?(r.element=document.querySelector(e),document.querySelectorAll(e).length>1):e.length!==void 0&&e.length>0?(r.element=e[0],e.length>1):r.element=e,!r.element)throw new Error("[cleave.js] Please check the element");t.initValue=r.element.value,r.properties=c.DefaultProperties.assign({},t),r.init()};c.prototype={init:function(){var e=this,t=e.properties;t.numeral||t.phone||t.creditCard||t.time||t.date||t.blocksLength!==0||t.prefix?(t.maxLength=c.Util.getMaxLength(t.blocks),e.isAndroid=c.Util.isAndroid(),e.lastInputValue="",e.isBackward="",e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener("input",e.onChangeListener),e.element.addEventListener("keydown",e.onKeyDownListener),e.element.addEventListener("focus",e.onFocusListener),e.element.addEventListener("cut",e.onCutListener),e.element.addEventListener("copy",e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)):e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this;if(e.properties.swapHiddenInput){var t=e.element.cloneNode(!0);e.element.parentNode.insertBefore(t,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type="hidden",e.element=t,e.element.id=""}},initNumeralFormatter:function(){var e=this.properties;e.numeral&&(e.numeralFormatter=new c.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter))},initTimeFormatter:function(){var e=this.properties;e.time&&(e.timeFormatter=new c.TimeFormatter(e.timePattern,e.timeFormat),e.blocks=e.timeFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initDateFormatter:function(){var e=this.properties;e.date&&(e.dateFormatter=new c.DateFormatter(e.datePattern,e.dateMin,e.dateMax),e.blocks=e.dateFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initPhoneFormatter:function(){var e=this.properties;if(e.phone)try{e.phoneFormatter=new c.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch{throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(e){var t=this,r=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=r===8},onChange:function(e){var t=this,r=t.properties,i=c.Util;t.isBackward=t.isBackward||e.inputType==="deleteContentBackward";var a=i.getPostDelimiter(t.lastInputValue,r.delimiter,r.delimiters);t.isBackward&&a?r.postDelimiterBackspace=a:r.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),c.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){c.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(""))},onCopy:function(e){c.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this.properties,r=c.Util,i=this.element.value,a="";a=t.copyDelimiter?i:r.stripDelimiters(i,t.delimiter,t.delimiters);try{e.clipboardData?e.clipboardData.setData("Text",a):window.clipboardData.setData("Text",a),e.preventDefault()}catch{}},onInput:function(e){var t=this,r=t.properties,i=c.Util,a=i.getPostDelimiter(e,r.delimiter,r.delimiters);return r.numeral||!r.postDelimiterBackspace||a||(e=i.headStr(e,e.length-r.postDelimiterBackspace.length)),r.phone?(!r.prefix||r.noImmediatePrefix&&!e.length?r.result=r.phoneFormatter.format(e):r.result=r.prefix+r.phoneFormatter.format(e).slice(r.prefix.length),void t.updateValueState()):r.numeral?(r.prefix&&r.noImmediatePrefix&&e.length===0?r.result="":r.result=r.numeralFormatter.format(e),void t.updateValueState()):(r.date&&(e=r.dateFormatter.getValidatedDate(e)),r.time&&(e=r.timeFormatter.getValidatedTime(e)),e=i.stripDelimiters(e,r.delimiter,r.delimiters),e=i.getPrefixStrippedValue(e,r.prefix,r.prefixLength,r.result,r.delimiter,r.delimiters,r.noImmediatePrefix,r.tailPrefix,r.signBeforePrefix),e=r.numericOnly?i.strip(e,/[^\d]/g):e,e=r.uppercase?e.toUpperCase():e,e=r.lowercase?e.toLowerCase():e,r.prefix&&(r.tailPrefix?e+=r.prefix:e=r.prefix+e,r.blocksLength===0)?(r.result=e,void t.updateValueState()):(r.creditCard&&t.updateCreditCardPropsByValue(e),e=i.headStr(e,r.maxLength),r.result=i.getFormattedValue(e,r.blocks,r.blocksLength,r.delimiter,r.delimiters,r.delimiterLazyShow),void t.updateValueState()))},updateCreditCardPropsByValue:function(e){var t,r=this.properties,i=c.Util;i.headStr(r.result,4)!==i.headStr(e,4)&&(t=c.CreditCardDetector.getInfo(e,r.creditCardStrictMode),r.blocks=t.blocks,r.blocksLength=r.blocks.length,r.maxLength=i.getMaxLength(r.blocks),r.creditCardType!==t.type&&(r.creditCardType=t.type,r.onCreditCardTypeChanged.call(this,r.creditCardType)))},updateValueState:function(){var e=this,t=c.Util,r=e.properties;if(e.element){var i=e.element.selectionEnd,a=e.element.value,n=r.result;i=t.getNextCursorPosition(i,a,n,r.delimiter,r.delimiters),e.isAndroid?window.setTimeout(function(){e.element.value=n,t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged()},1):(e.element.value=n,r.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged())}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this;t.properties.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,r=t.properties;e=e!=null?e.toString():"",r.numeral&&(e=e.replace(".",r.numeralDecimalMark)),r.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this.properties,t=c.Util,r=this.element.value;return e.rawValueTrimPrefix&&(r=t.getPrefixStrippedValue(r,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)),r=e.numeral?e.numeralFormatter.getRawValue(r):t.stripDelimiters(r,e.delimiter,e.delimiters)},getISOFormatDate:function(){var e=this.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var e=this.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener("input",e.onChangeListener),e.element.removeEventListener("keydown",e.onKeyDownListener),e.element.removeEventListener("focus",e.onFocusListener),e.element.removeEventListener("cut",e.onCutListener),e.element.removeEventListener("copy",e.onCopyListener)},toString:function(){return"[Cleave Object]"}},c.NumeralFormatter=k,c.DateFormatter=V,c.TimeFormatter=L,c.PhoneFormatter=M,c.CreditCardDetector=N,c.Util=E,c.DefaultProperties=T,(typeof x=="object"&&x?x:window).Cleave=c;var S=c,B=Object.defineProperty,R=Object.getOwnPropertyDescriptor,g=(e,t,r,i)=>{for(var a,n=i>1?void 0:i?R(t,r):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(i?a(t,r,n):a(n))||n);return i&&n&&B(t,r,n),n};exports.SchmancyPaymentCardForm=class extends w.$LitElement(){constructor(){super(...arguments),this.value={cardName:"",cardNumber:"",expirationDate:"",cvv:""},this.cardType="",this.isCardNameValid=!0,this.isCardNumberValid=!0,this.isExpirationDateValid=!0,this.isCvvValid=!0}firstUpdated(){new S(this.cardNumberInput,{creditCard:!0,creditCardStrictMode:!0,onCreditCardTypeChanged:e=>{this.cardType=e,e==="unknown"?(this.isCardNumberValid=!1,this.cardNumberInput.setCustomValidity("Please enter a valid card number."),this.cardNumberInput.error=!0):(this.isCardNumberValid=!0,this.cardNumberInput.setCustomValidity(""),this.cardNumberInput.error=!1,this.cvvInput.maxlength=e==="amex"?4:3)}}),new S(this.expirationDateInput,{date:!0,datePattern:["m","y"],onValueChanged:e=>{const t=e.target.value;if(!t||t.length<5)this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Please enter a valid expiration date (MM/YY)."),this.expirationDateInput.error=!0;else{const[r,i]=t.split("/"),a=new Date,n=a.getFullYear()%100,o=a.getMonth()+1,l=parseInt(r,10),d=parseInt(i,10);d<n||d===n&&l<o?(this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Card has expired."),this.expirationDateInput.error=!0):(this.isExpirationDateValid=!0,this.expirationDateInput.setCustomValidity(""),this.expirationDateInput.error=!1)}}}),new S(this.cvvInput,{blocks:[4],numericOnly:!0,onValueChanged:e=>{const t=this.cardType==="amex"?4:3;e.target.value.length<t?(this.isCvvValid=!1,this.cvvInput.setCustomValidity(`Please enter a valid ${t}-digit CVV.`),this.cvvInput.error=!0):(this.isCvvValid=!0,this.cvvInput.setCustomValidity(""),this.cvvInput.error=!1)}}),new S(this.cardNameInput,{uppercase:!0,delimiter:" ",onValueChanged:e=>{!e.target.value||e.target.value.length<3?(this.isCardNameValid=!1,this.cardNameInput.setCustomValidity("Please enter the name as it appears on the card."),this.cardNameInput.error=!0):(this.isCardNameValid=!0,this.cardNameInput.setCustomValidity(""),this.cardNameInput.error=!1)}})}reportValidity(){return this.form.reportValidity()}checkValidity(){return!!this.form.reportValidity()}emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:{...this.value},bubbles:!0}))}render(){const e=this.getCardIcon();return D.html`
|
|
2
2
|
<schmancy-form
|
|
3
3
|
@change=${t=>{t.stopPropagation(),t.preventDefault()}}
|
|
4
4
|
>
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
<span>Your payment information is secure and encrypted</span>
|
|
72
72
|
</div>
|
|
73
73
|
`}},g([h.property({type:Object,reflect:!0})],exports.SchmancyPaymentCardForm.prototype,"value",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cardType",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cardName",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cardNumber",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"expirationDate",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cvv",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isCardNameValid",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isCardNumberValid",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isExpirationDateValid",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isCvvValid",2),g([h.query("#cardNumber")],exports.SchmancyPaymentCardForm.prototype,"cardNumberInput",2),g([h.query("#expirationDate")],exports.SchmancyPaymentCardForm.prototype,"expirationDateInput",2),g([h.query("#cvv")],exports.SchmancyPaymentCardForm.prototype,"cvvInput",2),g([h.query("#cardName")],exports.SchmancyPaymentCardForm.prototype,"cardNameInput",2),g([h.query("schmancy-form")],exports.SchmancyPaymentCardForm.prototype,"form",2),exports.SchmancyPaymentCardForm=g([h.customElement("schmancy-payment-card-form")],exports.SchmancyPaymentCardForm);
|
|
74
|
-
//# sourceMappingURL=payment-card-form-
|
|
74
|
+
//# sourceMappingURL=payment-card-form-3kAXDbXf.cjs.map
|