@mhmo91/schmancy 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{animated-text-D93P3NLN.cjs → animated-text-DhWaYtKW.cjs} +2 -2
- package/dist/{animated-text-D93P3NLN.cjs.map → animated-text-DhWaYtKW.cjs.map} +1 -1
- package/dist/{animated-text-BSEbI_B1.js → animated-text-Dty0fSbq.js} +3 -3
- package/dist/{animated-text-BSEbI_B1.js.map → animated-text-Dty0fSbq.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-DqpGzGXM.cjs → area.component-D7wlGsfA.cjs} +2 -2
- package/dist/{area.component-DqpGzGXM.cjs.map → area.component-D7wlGsfA.cjs.map} +1 -1
- package/dist/{area.component-bPf-SBQs.js → area.component-LQXgflI2.js} +3 -3
- package/dist/{area.component-bPf-SBQs.js.map → area.component-LQXgflI2.js.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-af8Qu5FD.js → autocomplete-BFvzCShB.js} +3 -3
- package/dist/{autocomplete-af8Qu5FD.js.map → autocomplete-BFvzCShB.js.map} +1 -1
- package/dist/{autocomplete-Bd9CwOTL.cjs → autocomplete-BcddCLwr.cjs} +2 -2
- package/dist/{autocomplete-Bd9CwOTL.cjs.map → autocomplete-BcddCLwr.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-C8XJnGJs.cjs → avatar-BUXdM5FT.cjs} +2 -2
- package/dist/{avatar-C8XJnGJs.cjs.map → avatar-BUXdM5FT.cjs.map} +1 -1
- package/dist/{avatar-n-Kjs8UW.js → avatar-UTlBlxcT.js} +49 -49
- package/dist/{avatar-n-Kjs8UW.js.map → avatar-UTlBlxcT.js.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-DjBoRSfy.js → boat-OKaCjCVb.js} +2 -2
- package/dist/{boat-DjBoRSfy.js.map → boat-OKaCjCVb.js.map} +1 -1
- package/dist/{boat-DPvoDoGb.cjs → boat-SUt73FzK.cjs} +2 -2
- package/dist/{boat-DPvoDoGb.cjs.map → boat-SUt73FzK.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-DvT7CeFj.cjs → checkbox-BQ9zyi0G.cjs} +2 -2
- package/dist/{checkbox-DvT7CeFj.cjs.map → checkbox-BQ9zyi0G.cjs.map} +1 -1
- package/dist/{checkbox-BZzC_CIS.js → checkbox-DYgxPkRd.js} +2 -2
- package/dist/{checkbox-BZzC_CIS.js.map → checkbox-DYgxPkRd.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-CTTH6fvP.js → code-preview-BGYyQE-A.js} +2 -2
- package/dist/{code-preview-CTTH6fvP.js.map → code-preview-BGYyQE-A.js.map} +1 -1
- package/dist/{code-preview-Dz_GPOLi.cjs → code-preview-BguhYQ-9.cjs} +2 -2
- package/dist/{code-preview-Dz_GPOLi.cjs.map → code-preview-BguhYQ-9.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-DKCCG05M.cjs → date-range-BHL6NVpp.cjs} +2 -2
- package/dist/{date-range-DKCCG05M.cjs.map → date-range-BHL6NVpp.cjs.map} +1 -1
- package/dist/{date-range-BrBEgeG_.js → date-range-IAVmBRUY.js} +3 -3
- package/dist/{date-range-BrBEgeG_.js.map → date-range-IAVmBRUY.js.map} +1 -1
- package/dist/{date-range-inline-C0JRYaRI.cjs → date-range-inline-lDogjrro.cjs} +2 -2
- package/dist/{date-range-inline-C0JRYaRI.cjs.map → date-range-inline-lDogjrro.cjs.map} +1 -1
- package/dist/{date-range-inline-DiKLX1N5.js → date-range-inline-tVo6MAVX.js} +3 -3
- package/dist/{date-range-inline-DiKLX1N5.js.map → date-range-inline-tVo6MAVX.js.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-jmlT40UJ.js → delay-D1UQizi7.js} +2 -2
- package/dist/{delay-jmlT40UJ.js.map → delay-D1UQizi7.js.map} +1 -1
- package/dist/{delay-ChpulFl1.cjs → delay-Dqd6hPRo.cjs} +2 -2
- package/dist/{delay-ChpulFl1.cjs.map → delay-Dqd6hPRo.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-D13RT8Mp.cjs → details-CL2VJWOL.cjs} +2 -2
- package/dist/{details-D13RT8Mp.cjs.map → details-CL2VJWOL.cjs.map} +1 -1
- package/dist/{details-BMBliqaf.js → details-DPVTmuIs.js} +2 -2
- package/dist/{details-BMBliqaf.js.map → details-DPVTmuIs.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-content-CwRiHVH5.cjs → dialog-content-Ch1E0_XY.cjs} +6 -6
- package/dist/{dialog-content-CwRiHVH5.cjs.map → dialog-content-Ch1E0_XY.cjs.map} +1 -1
- package/dist/{dialog-content-DXBS1xFM.js → dialog-content-CoO1gbnP.js} +7 -7
- package/dist/{dialog-content-DXBS1xFM.js.map → dialog-content-CoO1gbnP.js.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{divider-hJ8iLPY-.cjs → divider-DeIUf2pW.cjs} +2 -2
- package/dist/{divider-hJ8iLPY-.cjs.map → divider-DeIUf2pW.cjs.map} +1 -1
- package/dist/{divider-BAMyHNxh.js → divider-qaTugaNg.js} +3 -3
- package/dist/{divider-BAMyHNxh.js.map → divider-qaTugaNg.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-DuwSyoV8.cjs → dropdown-content-BdGJaEb1.cjs} +2 -2
- package/dist/{dropdown-content-DuwSyoV8.cjs.map → dropdown-content-BdGJaEb1.cjs.map} +1 -1
- package/dist/{dropdown-content-Dh-oQQpb.js → dropdown-content-Ddxpm5T4.js} +3 -3
- package/dist/{dropdown-content-Dh-oQQpb.js.map → dropdown-content-Ddxpm5T4.js.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-Ces4Z6AW.cjs → email-recipients-CWV3bcBZ.cjs} +2 -2
- package/dist/{email-recipients-Ces4Z6AW.cjs.map → email-recipients-CWV3bcBZ.cjs.map} +1 -1
- package/dist/{email-recipients-Czz1tJcV.js → email-recipients-DmVTfoZx.js} +5 -5
- package/dist/{email-recipients-Czz1tJcV.js.map → email-recipients-DmVTfoZx.js.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-COzPIQAF.js → flex-CVGc2ncP.js} +2 -2
- package/dist/{flex-COzPIQAF.js.map → flex-CVGc2ncP.js.map} +1 -1
- package/dist/{flex-haMVY2KA.cjs → flex-D7Lk1FvV.cjs} +2 -2
- package/dist/{flex-haMVY2KA.cjs.map → flex-D7Lk1FvV.cjs.map} +1 -1
- package/dist/{form-B4I2SPkc.cjs → form-CIW_BgEw.cjs} +2 -2
- package/dist/{form-B4I2SPkc.cjs.map → form-CIW_BgEw.cjs.map} +1 -1
- package/dist/{form-Bh3BEwyo.js → form-CQ9kXk8y.js} +2 -2
- package/dist/{form-Bh3BEwyo.js.map → form-CQ9kXk8y.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-CaljqKhq.cjs → formField.mixin-BHyiuJ5K.cjs} +2 -2
- package/dist/{formField.mixin-CaljqKhq.cjs.map → formField.mixin-BHyiuJ5K.cjs.map} +1 -1
- package/dist/{formField.mixin-WG1BLWMy.js → formField.mixin-CxOpZDW8.js} +2 -2
- package/dist/{formField.mixin-WG1BLWMy.js.map → formField.mixin-CxOpZDW8.js.map} +1 -1
- package/dist/{icon-xlw9hFU5.cjs → icon-7xUK_cdP.cjs} +2 -2
- package/dist/{icon-xlw9hFU5.cjs.map → icon-7xUK_cdP.cjs.map} +1 -1
- package/dist/{icon-BWvG5Zpz.js → icon-DIfnwdEU.js} +2 -2
- package/dist/{icon-BWvG5Zpz.js.map → icon-DIfnwdEU.js.map} +1 -1
- package/dist/{icon-button-Col8hPhL.js → icon-button-B2xz-N2x.js} +3 -3
- package/dist/{icon-button-Col8hPhL.js.map → icon-button-B2xz-N2x.js.map} +1 -1
- package/dist/{icon-button-179Gluhj.cjs → icon-button-LN_b5Jfs.cjs} +2 -2
- package/dist/{icon-button-179Gluhj.cjs.map → icon-button-LN_b5Jfs.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +48 -48
- package/dist/{input-BziqvuDi.cjs → input-BTHdBKs2.cjs} +2 -2
- package/dist/{input-BziqvuDi.cjs.map → input-BTHdBKs2.cjs.map} +1 -1
- package/dist/{input-Bwv0qqfr.js → input-nDx_PH0i.js} +3 -3
- package/dist/{input-Bwv0qqfr.js.map → input-nDx_PH0i.js.map} +1 -1
- 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-CnEBlTyV.js → list-BToakhNz.js} +2 -2
- package/dist/{list-CnEBlTyV.js.map → list-BToakhNz.js.map} +1 -1
- package/dist/{list-CA3reoj-.cjs → list-Cmj0mY-X.cjs} +2 -2
- package/dist/{list-CA3reoj-.cjs.map → list-Cmj0mY-X.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-DE7nMq_x.cjs → litElement.mixin-B2K_bdpW.cjs} +2 -2
- package/dist/{litElement.mixin-DE7nMq_x.cjs.map → litElement.mixin-B2K_bdpW.cjs.map} +1 -1
- package/dist/{litElement.mixin-CAUo-j_j.js → litElement.mixin-CEPZ0lJP.js} +2 -2
- package/dist/{litElement.mixin-CAUo-j_j.js.map → litElement.mixin-CEPZ0lJP.js.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-B2neETi5.cjs → map-B_AGndzc.cjs} +2 -2
- package/dist/{map-B2neETi5.cjs.map → map-B_AGndzc.cjs.map} +1 -1
- package/dist/{map-YZSVvbDM.js → map-DuilOl8g.js} +2 -2
- package/dist/{map-YZSVvbDM.js.map → map-DuilOl8g.js.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-DAnLnZWp.cjs → media-BYpO4hxM.cjs} +2 -2
- package/dist/{media-DAnLnZWp.cjs.map → media-BYpO4hxM.cjs.map} +1 -1
- package/dist/{media-Cfi2Rp8w.js → media-Flyi23Fn.js} +2 -2
- package/dist/{media-Cfi2Rp8w.js.map → media-Flyi23Fn.js.map} +1 -1
- package/dist/{menu-DoN4dmcH.cjs → menu-DJM8tj5e.cjs} +2 -2
- package/dist/{menu-DoN4dmcH.cjs.map → menu-DJM8tj5e.cjs.map} +1 -1
- package/dist/{menu-BwO8_Djb.js → menu-qoixd8dd.js} +3 -3
- package/dist/{menu-BwO8_Djb.js.map → menu-qoixd8dd.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{navigation-rail-item-D_GarK92.js → navigation-rail-item-B83ZIkBr.js} +2 -2
- package/dist/{navigation-rail-item-D_GarK92.js.map → navigation-rail-item-B83ZIkBr.js.map} +1 -1
- package/dist/{navigation-rail-item-B2XuJrYp.cjs → navigation-rail-item-hYAXrNQM.cjs} +2 -2
- package/dist/{navigation-rail-item-B2XuJrYp.cjs.map → navigation-rail-item-hYAXrNQM.cjs.map} +1 -1
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-service-Cm060I1t.cjs → notification-service-C5ApldUR.cjs} +2 -2
- package/dist/{notification-service-Cm060I1t.cjs.map → notification-service-C5ApldUR.cjs.map} +1 -1
- package/dist/{notification-service-6Z0mPoJa.js → notification-service-DX4fJZ9W.js} +4 -4
- package/dist/{notification-service-6Z0mPoJa.js.map → notification-service-DX4fJZ9W.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +2 -2
- package/dist/{notify-zh_vKYDR.js → notify-BZR-r5pn.js} +2 -2
- package/dist/{notify-zh_vKYDR.js.map → notify-BZR-r5pn.js.map} +1 -1
- package/dist/{notify-udRFmPQ4.cjs → notify-CZXq5oqO.cjs} +2 -2
- package/dist/{notify-udRFmPQ4.cjs.map → notify-CZXq5oqO.cjs.map} +1 -1
- package/dist/{option-CE7cBraI.js → option-BPPKtXwf.js} +2 -2
- package/dist/{option-CE7cBraI.js.map → option-BPPKtXwf.js.map} +1 -1
- package/dist/{option-CV_NvoXD.cjs → option-Dolb8CBn.cjs} +2 -2
- package/dist/{option-CV_NvoXD.cjs.map → option-Dolb8CBn.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-DVNgyFeB.cjs → payment-card-form-BplCPLQi.cjs} +2 -2
- package/dist/{payment-card-form-DVNgyFeB.cjs.map → payment-card-form-BplCPLQi.cjs.map} +1 -1
- package/dist/{payment-card-form-CM380Ic6.js → payment-card-form-BvHRTm6O.js} +3 -3
- package/dist/{payment-card-form-CM380Ic6.js.map → payment-card-form-BvHRTm6O.js.map} +1 -1
- package/dist/{progress-CVSCU7PX.js → progress-BEhplYKZ.js} +2 -2
- package/dist/{progress-CVSCU7PX.js.map → progress-BEhplYKZ.js.map} +1 -1
- package/dist/{progress-Ci-XtLSK.cjs → progress-C-2JM-2b.cjs} +2 -2
- package/dist/{progress-Ci-XtLSK.cjs.map → progress-C-2JM-2b.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-button-5Dn14Xmt.js → radio-button-1rUV1bEw.js} +3 -3
- package/dist/{radio-button-5Dn14Xmt.js.map → radio-button-1rUV1bEw.js.map} +1 -1
- package/dist/{radio-button-DnA42XbW.cjs → radio-button-DTTyHAW3.cjs} +2 -2
- package/dist/{radio-button-DnA42XbW.cjs.map → radio-button-DTTyHAW3.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{schmancy-steps-container-GpTeijL9.js → schmancy-steps-container-CjVzZKkk.js} +27 -27
- package/dist/schmancy-steps-container-CjVzZKkk.js.map +1 -0
- package/dist/{schmancy-steps-container-CM6q2WfQ.cjs → schmancy-steps-container-D9hAAg2V.cjs} +14 -14
- package/dist/schmancy-steps-container-D9hAAg2V.cjs.map +1 -0
- package/dist/{select-tK3rnufX.js → select-CRX_Nk_f.js} +3 -3
- package/dist/{select-tK3rnufX.js.map → select-CRX_Nk_f.js.map} +1 -1
- package/dist/{select-B-LiqQwb.cjs → select-DPa2FYdv.cjs} +2 -2
- package/dist/{select-B-LiqQwb.cjs.map → select-DPa2FYdv.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-BvaShgm9.js → sheet-DH0GSs0F.js} +3 -3
- package/dist/{sheet-BvaShgm9.js.map → sheet-DH0GSs0F.js.map} +1 -1
- package/dist/{sheet-7c3D_QQJ.cjs → sheet-WxZAbHZ5.cjs} +2 -2
- package/dist/{sheet-7c3D_QQJ.cjs.map → sheet-WxZAbHZ5.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-DhtPlac2.js → slider-CG-N2RQo.js} +3 -3
- package/dist/{slider-DhtPlac2.js.map → slider-CG-N2RQo.js.map} +1 -1
- package/dist/{slider-CJg1g5-p.cjs → slider-CY7W7Psq.cjs} +2 -2
- package/dist/{slider-CJg1g5-p.cjs.map → slider-CY7W7Psq.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-DbpvEkH2.cjs → spinner-CZaVYJ0a.cjs} +2 -2
- package/dist/{spinner-DbpvEkH2.cjs.map → spinner-CZaVYJ0a.cjs.map} +1 -1
- package/dist/{spinner-BJIi1aCz.js → spinner-D8Dc17fq.js} +2 -2
- package/dist/{spinner-BJIi1aCz.js.map → spinner-D8Dc17fq.js.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{suggestion-chip-DMV7dPlk.cjs → suggestion-chip-BeGEK7BS.cjs} +2 -2
- package/dist/{suggestion-chip-DMV7dPlk.cjs.map → suggestion-chip-BeGEK7BS.cjs.map} +1 -1
- package/dist/{suggestion-chip-Dl176Rcs.js → suggestion-chip-p0k9PAya.js} +3 -3
- package/dist/{suggestion-chip-Dl176Rcs.js.map → suggestion-chip-p0k9PAya.js.map} +1 -1
- package/dist/{surface-C1JQWYPw.js → surface-Cmmdx0F2.js} +2 -2
- package/dist/{surface-C1JQWYPw.js.map → surface-Cmmdx0F2.js.map} +1 -1
- package/dist/{surface-DVa9gv9E.cjs → surface-CvQMtIw-.cjs} +2 -2
- package/dist/{surface-DVa9gv9E.cjs.map → surface-CvQMtIw-.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-DVqiw9eI.cjs → table-BJVlDuQa.cjs} +2 -2
- package/dist/{table-DVqiw9eI.cjs.map → table-BJVlDuQa.cjs.map} +1 -1
- package/dist/{table-pmNw4I3A.js → table-CSDX6lDq.js} +2 -2
- package/dist/{table-pmNw4I3A.js.map → table-CSDX6lDq.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-Br9jc1Dy.cjs → tabs-compatibility-CfdHAYaN.cjs} +5 -5
- package/dist/tabs-compatibility-CfdHAYaN.cjs.map +1 -0
- package/dist/{tabs-compatibility-5xcbNfDo.js → tabs-compatibility-Haw4T3N0.js} +5 -5
- package/dist/tabs-compatibility-Haw4T3N0.js.map +1 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-BvVlz7hG.cjs +2 -0
- package/dist/{tailwind.mixin-CngO3XGT.cjs.map → tailwind.mixin-BvVlz7hG.cjs.map} +1 -1
- package/dist/tailwind.mixin-R2xLfpws.js +43 -0
- package/dist/{tailwind.mixin-T5CiXVWk.js.map → tailwind.mixin-R2xLfpws.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-BACIb-N3.cjs → textarea-BE1uxnbN.cjs} +2 -2
- package/dist/{textarea-BACIb-N3.cjs.map → textarea-BE1uxnbN.cjs.map} +1 -1
- package/dist/{textarea-AQhSey_l.js → textarea-D5YjtfC7.js} +2 -2
- package/dist/{textarea-AQhSey_l.js.map → textarea-D5YjtfC7.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-Dp2Z3PTI.js → theme-button-CeLy95-B.js} +2 -2
- package/dist/{theme-button-Dp2Z3PTI.js.map → theme-button-CeLy95-B.js.map} +1 -1
- package/dist/{theme-button-CRdkWTDn.cjs → theme-button-DXJTRh4E.cjs} +2 -2
- package/dist/{theme-button-CRdkWTDn.cjs.map → theme-button-DXJTRh4E.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-0o6NJY_z.js → theme.component-C03A-Sve.js} +2 -2
- package/dist/{theme.component-0o6NJY_z.js.map → theme.component-C03A-Sve.js.map} +1 -1
- package/dist/{theme.component-Bgw2BYNp.cjs → theme.component-zoufYNW7.cjs} +2 -2
- package/dist/{theme.component-Bgw2BYNp.cjs.map → theme.component-zoufYNW7.cjs.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-DDbSCFT0.cjs → timezone-34kNWMce.cjs} +2 -2
- package/dist/{timezone-DDbSCFT0.cjs.map → timezone-34kNWMce.cjs.map} +1 -1
- package/dist/{timezone-i2PffMdu.js → timezone-yu_c4i_H.js} +3 -3
- package/dist/{timezone-i2PffMdu.js.map → timezone-yu_c4i_H.js.map} +1 -1
- package/dist/{tooltip-Ch1EkDNU.js → tooltip-37GQ15zd.js} +2 -2
- package/dist/{tooltip-Ch1EkDNU.js.map → tooltip-37GQ15zd.js.map} +1 -1
- package/dist/{tooltip-B-HgABZV.cjs → tooltip-DZK4j3n0.cjs} +2 -2
- package/dist/{tooltip-B-HgABZV.cjs.map → tooltip-DZK4j3n0.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-DPmfcerN.js → tree-CtMw5ja5.js} +2 -2
- package/dist/{tree-DPmfcerN.js.map → tree-CtMw5ja5.js.map} +1 -1
- package/dist/{tree-CD7V4Am8.cjs → tree-D5fhY5eA.cjs} +2 -2
- package/dist/{tree-CD7V4Am8.cjs.map → tree-D5fhY5eA.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-BHNv2ubS.cjs → typewriter-DSTaSuRG.cjs} +2 -2
- package/dist/{typewriter-BHNv2ubS.cjs.map → typewriter-DSTaSuRG.cjs.map} +1 -1
- package/dist/{typewriter-CzL_PDdV.js → typewriter-DwS8NOZl.js} +4 -4
- package/dist/{typewriter-CzL_PDdV.js.map → typewriter-DwS8NOZl.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-BUObo_2L.js → typography-CpKnNiTm.js} +2 -2
- package/dist/{typography-BUObo_2L.js.map → typography-CpKnNiTm.js.map} +1 -1
- package/dist/{typography-EG9ukCgM.cjs → typography-DoswBHCt.cjs} +2 -2
- package/dist/{typography-EG9ukCgM.cjs.map → typography-DoswBHCt.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/dist/schmancy-steps-container-CM6q2WfQ.cjs.map +0 -1
- package/dist/schmancy-steps-container-GpTeijL9.js.map +0 -1
- package/dist/tabs-compatibility-5xcbNfDo.js.map +0 -1
- package/dist/tabs-compatibility-Br9jc1Dy.cjs.map +0 -1
- package/dist/tailwind.mixin-CngO3XGT.cjs +0 -2
- package/dist/tailwind.mixin-T5CiXVWk.js +0 -43
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-
|
|
1
|
+
{"version":3,"file":"list-Cmj0mY-X.cjs","sources":["../src/list/context.ts","../src/surface/context.ts","../src/list/list-item.ts","../src/list/list.ts"],"sourcesContent":["import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancyListTypeContext = createContext<TSurfaceColor>(undefined)\n","import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancySurfaceTypeContext = createContext<TSurfaceColor>('surface')\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceTypeContext } from '@schmancy/surface/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\n\n/**\n * @element schmancy-list-item\n * @slot leading - leading content\n * @slot trailing - trailing content\n * @slot - default content\n */\n@customElement('schmancy-list-item')\nexport class SchmancyListItem extends TailwindElement() {\n\t@consume({ context: SchmancySurfaceTypeContext, subscribe: true })\n\t@property()\n\tvariant: TSurfaceColor\n\n\t@property({ type: Boolean })\n\trounded: boolean\n\n\t@property({ type: Boolean }) readonly: boolean\n\n\t@property({ type: Boolean }) selected: boolean = false\n\n\t@queryAssignedElements({\n\t\tslot: 'leading',\n\t\tflatten: true,\n\t})\n\tprivate leading!: HTMLElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'trailing',\n\t\tflatten: true,\n\t})\n\tprivate trailing!: HTMLElement[]\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['h-5', 'w-5', 'sm:h-6', 'sm:w-6', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\tthis.leading?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t\tthis.trailing?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'relative inset-0 w-full flex items-center min-h-[44px] sm:min-h-[48px] md:min-h-[56px] py-1 px-2 sm:py-2 sm:px-3 md:py-2 md:px-4 text-sm sm:text-base duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden':\n\t\t\t\ttrue,\n\t\t\t'bg-secondary-container text-secondery-onContainer': this.selected,\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'z-0 duration-500 transition-opacity': true,\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ': !this.readonly,\n\t\t}\n\t\treturn html` <li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(classes)}>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t<slot></slot>\n\t\t</li>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list-item': SchmancyListItem\n\t}\n}\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceFill } from '@schmancy/surface'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancyListTypeContext } from './context'\n\n/**\n * `<schmancy-list>` component.\n *\n * A list component that wraps its content within a customizable surface.\n * It allows you to set the surface type and fill style, and can optionally\n * enable scrolling behavior by delegating the scroller attribute to the surface.\n *\n * @element schmancy-list\n * @slot - The default slot for list items.\n *\n * @example\n * <schmancy-list surface=\"container\" scroller>\n * <schmancy-list-item>List Item 1</schmancy-list-item>\n * </schmancy-list>\n */\n@customElement('schmancy-list')\nexport class List extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding-top: 8px;\n\t\tpadding-bottom: 8px;\n\t}\n`) {\n\t/**\n\t * Defines the type or color of the surface used by the component.\n\t * This value is provided to descendant components via context.\n\t *\n\t * @attr surface\n\t * @type {TSurfaceColor}\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancyListTypeContext })\n\t@property()\n\tsurface: TSurfaceColor\n\n\t/**\n\t * Determines the fill style of the underlying surface.\n\t *\n\t * @attr fill\n\t * @type {SchmancySurfaceFill}\n\t * @default 'auto'\n\t */\n\t@property({ type: String, reflect: true })\n\tfill: SchmancySurfaceFill = 'auto'\n\n\t/**\n\t * Defines the elevation level of the surface.\n\t *\n\t * @attr elevation\n\t * @type {number}\n\t * @default 0\n\t */\n\t@property({ type: Number })\n\televation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\n\t/**\n\t * Renders the component's template.\n\t * The list content is wrapped inside a `<schmancy-surface>` element.\n\t * The scroller property is delegated to the surface so that it controls\n\t * the scrollable behavior.\n\t *\n\t * @returns The HTML template for the component.\n\t */\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-surface .elevation=${this.elevation} .fill=${this.fill} type=${this.surface}>\n\t\t\t\t<ul>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list': List\n\t}\n}\n"],"names":["SchmancyListTypeContext","createContext","SchmancySurfaceTypeContext","SchmancyListItem","TailwindElement","super","arguments","this","selected","firstUpdated","leading","forEach","img","classList","add","imgClasses","trailing","render","classes","rounded","stateLayerClasses","readonly","html","classMap","when","__decorateClass","consume","context","subscribe","property","prototype","type","Boolean","queryAssignedElements","slot","flatten","customElement","List","css","constructor","fill","elevation","surface","provide","String","reflect","Number"],"mappings":"8TAEaA,EAA0BC,EAAAA,EAAAA,MAA6B,ECAvDC,EAA6BD,EAAAA,EAA6B,SAAA,kMCa1DE,QAAAA,iBAAN,cAA+BC,EAAAA,gBAAAA,CAAAA,CAA/B,cAAAC,MAAAA,GAAAC,SAAAA,EAUuBC,KAAAC,SAAAA,EAAoB,CAcjD,IAAA,aACC,MAAO,CAAC,MAAO,MAAO,SAAU,SAAU,gBAAA,CAC3C,CAEA,cAAAC,CACCF,KAAKG,SAASC,QAAQC,IACrBA,EAAIC,UAAUC,IAAAA,GAAOP,KAAKQ,cAE3BR,KAAKS,UAAUL,QAAQC,GAAAA,CACtBA,EAAIC,UAAUC,IAAAA,GAAOP,KAAKQ,UAAAA,CAAAA,CAAAA,CAE5B,CAEA,QAAAE,CACC,MAAMC,EAAU,CACf,eAAgBX,KAAKY,UAArB,GACA,eAAgBZ,KAAKY,QACrB,qUAAA,GAEA,oDAAqDZ,KAAKC,QAAAA,EAGrDY,EAAoB,CACzB,sCAAA,GACA,eAAgBb,KAAKY,UAArB,GACA,eAAgBZ,KAAKY,QACrB,uEAAwEZ,KAAKc,QAAAA,EAE9E,OAAOC,wBAAsBf,KAAKc,YAAgB,CAAA,UAAWd,KAAKgB,SAASL,CAAAA,CAAAA;AAAAA,KACxEM,Q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AA,CAAAA,EAhBWQ,aAiBZP,UAAA,UAAA,CAAA,EAUAL,EAAA,CADCI,EAAAA,SAAS,CAAEE,KAAMa,OAAQC,QAAAA,EAAS,CAAA,CAAA,EA1BvBR,aA2BZP,UAAA,OAAA,CAAA,EAUAL,EAAA,CADCI,WAAS,CAAEE,KAAMe,MAAAA,CAAAA,CAAAA,EApCNT,aAqCZP,UAAA,YAAA,CAAA,EArCYO,QAAAA,KAANZ,EAAA,CADNW,EAAAA,cAAc,eAAA,CAAA,EACFC"}
|
package/dist/list.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./list-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./list-Cmj0mY-X.cjs");Object.defineProperty(exports,"List",{enumerable:!0,get:()=>e.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>e.SchmancyListItem}),exports.SchmancyListTypeContext=e.SchmancyListTypeContext;
|
|
2
2
|
//# sourceMappingURL=list.cjs.map
|
package/dist/list.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./tailwind.mixin-
|
|
2
|
-
//# sourceMappingURL=litElement.mixin-
|
|
1
|
+
"use strict";const e=require("./tailwind.mixin-BvVlz7hG.cjs");exports.$LitElement=t=>{class s extends e.BaseElement(e.TailwindElement(t)){constructor(){super(...arguments),this.disconnectedCallback=()=>{super.disconnectedCallback()}}}return s};
|
|
2
|
+
//# sourceMappingURL=litElement.mixin-B2K_bdpW.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"litElement.mixin-
|
|
1
|
+
{"version":3,"file":"litElement.mixin-B2K_bdpW.cjs","sources":["../mixins/litElement.mixin.ts"],"sourcesContent":["import { CSSResult, LitElement } from 'lit'\nimport { TailwindElement } from './tailwind.mixin'\nimport { BaseElement, IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\n\nexport const $LitElement = <T extends CSSResult>(componentStyle?: T) => {\n\tclass TailwindMixinClass extends BaseElement(TailwindElement(componentStyle)) {\n\t\tdisconnectedCallback = () => {\n\t\t\tsuper.disconnectedCallback()\n\t\t}\n\t}\n\treturn TailwindMixinClass as CustomElementConstructor &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin> /* see \"typing the subclass\" below */\n}\n"],"names":["componentStyle","TailwindMixinClass","BaseElement","TailwindElement","constructor","super","arguments","this","disconnectedCallback"],"mappings":"kFAKiDA,GAAAA,CAChD,MAAMC,UAA2BC,EAAAA,YAAYC,kBAAgBH,CAAAA,CAAAA,CAAAA,CAA7D,aAAAI,CAAAC,MAAAA,GAAAC,SAAAA,EACCC,KAAAC,qBAAuB,IAAA,CACtBH,MAAMG,qBAAAA,CAAAA,CACP,CAAA,CAED,OAAOP,CAAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as t, T as r } from "./tailwind.mixin-
|
|
1
|
+
import { B as t, T as r } from "./tailwind.mixin-R2xLfpws.js";
|
|
2
2
|
const n = (s) => {
|
|
3
3
|
class e extends t(r(s)) {
|
|
4
4
|
constructor() {
|
|
@@ -12,4 +12,4 @@ const n = (s) => {
|
|
|
12
12
|
export {
|
|
13
13
|
n as $
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=litElement.mixin-
|
|
15
|
+
//# sourceMappingURL=litElement.mixin-CEPZ0lJP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"litElement.mixin-
|
|
1
|
+
{"version":3,"file":"litElement.mixin-CEPZ0lJP.js","sources":["../mixins/litElement.mixin.ts"],"sourcesContent":["import { CSSResult, LitElement } from 'lit'\nimport { TailwindElement } from './tailwind.mixin'\nimport { BaseElement, IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\n\nexport const $LitElement = <T extends CSSResult>(componentStyle?: T) => {\n\tclass TailwindMixinClass extends BaseElement(TailwindElement(componentStyle)) {\n\t\tdisconnectedCallback = () => {\n\t\t\tsuper.disconnectedCallback()\n\t\t}\n\t}\n\treturn TailwindMixinClass as CustomElementConstructor &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin> /* see \"typing the subclass\" below */\n}\n"],"names":["$LitElement","componentStyle","TailwindMixinClass","BaseElement","TailwindElement","constructor","super","arguments","this","disconnectedCallback"],"mappings":";AAKO,MAAMA,IAAoCC,CAAAA;EAChD,MAAMC,UAA2BC,EAAYC,EAAgBH,CAAAA,CAAAA,EAAAA;AAAAA,IAA7D,cAAAI;AAAAC,YAAAA,GAAAC,YACCC,KAAAC,uBAAuB;AACtBH,cAAMG,qBAAAA;AAAAA,MAAAA;AAAAA,IACP;AAAA,EAAA;AAED,SAAOP;AAAAA;"}
|
package/dist/mailbox.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./email-recipients-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./email-recipients-CWV3bcBZ.cjs");Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>e.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>e.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>e.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>e.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>e.SchmancyMailbox});
|
|
2
2
|
//# sourceMappingURL=mailbox.cjs.map
|
package/dist/mailbox.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const h=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const t=require("lit/decorators.js"),g=require("./tailwind.mixin-
|
|
1
|
+
"use strict";const h=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const t=require("lit/decorators.js"),g=require("./tailwind.mixin-BvVlz7hG.cjs"),c=require("lit"),l=require("lit/directives/ref.js"),m=require("lit/directives/when.js"),n=require("rxjs/operators");var y=Object.defineProperty,u=Object.getOwnPropertyDescriptor,r=(e,i,a,o)=>{for(var p,s=o>1?void 0:o?u(i,a):i,d=e.length-1;d>=0;d--)(p=e[d])&&(s=(o?p(i,a,s):p(s))||s);return o&&s&&y(i,a,s),s};class v{static load(i){return window.google?.maps?h.of(!0):(this.loading$||(this.loading$=new h.Observable(a=>{if(window.google?.maps)return a.next(!0),void a.complete();const o=document.createElement("script");o.src=`https://maps.googleapis.com/maps/api/js?key=${i}&libraries=places&callback=initGoogleMaps&v=weekly`,o.async=!0,o.defer=!0,window.initGoogleMaps=()=>{a.next(!0),a.complete()},o.onerror=p=>{a.error(new Error("Failed to load Google Maps. Please check API key configuration and ensure the domain is authorized."))},document.head.appendChild(o)}).pipe(n.shareReplay(1))),this.loading$)}}exports.SchmancyMap=class extends g.TailwindElement(c.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -78,4 +78,4 @@
|
|
|
78
78
|
<div class="map-container" ${l.ref(this.mapRef)}></div>
|
|
79
79
|
`))}
|
|
80
80
|
`}},r([t.property({type:String})],exports.SchmancyMap.prototype,"address",2),r([t.property({type:Number})],exports.SchmancyMap.prototype,"latitude",2),r([t.property({type:Number})],exports.SchmancyMap.prototype,"longitude",2),r([t.property({type:Number})],exports.SchmancyMap.prototype,"zoom",2),r([t.property({type:String,reflect:!0})],exports.SchmancyMap.prototype,"height",2),r([t.property({type:Boolean})],exports.SchmancyMap.prototype,"marker",2),r([t.property({type:String})],exports.SchmancyMap.prototype,"markerTitle",2),r([t.property({type:String})],exports.SchmancyMap.prototype,"type",2),r([t.property({type:Boolean})],exports.SchmancyMap.prototype,"interactive",2),r([t.property({type:Boolean})],exports.SchmancyMap.prototype,"controls",2),r([t.property({type:String})],exports.SchmancyMap.prototype,"apiKey",2),r([t.state()],exports.SchmancyMap.prototype,"loading",2),r([t.state()],exports.SchmancyMap.prototype,"error",2),exports.SchmancyMap=r([t.customElement("schmancy-map")],exports.SchmancyMap);
|
|
81
|
-
//# sourceMappingURL=map-
|
|
81
|
+
//# sourceMappingURL=map-B_AGndzc.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-B2neETi5.cjs","sources":["../src/map/map.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { ref, createRef } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { of, EMPTY, Observable } from 'rxjs'\nimport { switchMap, tap, catchError, takeUntil, finalize, shareReplay } from 'rxjs/operators'\n\ninterface GoogleMapsAPI {\n maps: {\n Map: new (element: HTMLElement, options: any) => any\n Marker: new (options: any) => any\n Geocoder: new () => any\n LatLng: new (lat: number, lng: number) => any\n MapTypeId: {\n ROADMAP: string\n SATELLITE: string\n HYBRID: string\n TERRAIN: string\n }\n }\n}\n\ndeclare global {\n interface Window {\n google?: GoogleMapsAPI\n initGoogleMaps?: () => void\n __schmancyGoogleMapsLoading?: Observable<boolean>\n }\n}\n\n// Singleton for managing Google Maps script loading\nclass GoogleMapsLoader {\n private static loading$?: Observable<boolean>\n\n static load(apiKey: string): Observable<boolean> {\n // If already loaded, return success\n if (window.google?.maps) {\n return of(true)\n }\n\n // If already loading, return the existing observable\n if (this.loading$) {\n return this.loading$\n }\n\n // Create a new loading observable\n this.loading$ = new Observable<boolean>(observer => {\n // Check again if loaded while waiting\n if (window.google?.maps) {\n observer.next(true)\n observer.complete()\n return\n }\n\n const script = document.createElement('script')\n // Using places library instead of geometry for geocoding\n script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&callback=initGoogleMaps&v=weekly`\n script.async = true\n script.defer = true\n\n window.initGoogleMaps = () => {\n observer.next(true)\n observer.complete()\n }\n\n script.onerror = (error) => {\n console.error('Google Maps script loading error:', error)\n observer.error(new Error('Failed to load Google Maps. Please check API key configuration and ensure the domain is authorized.'))\n }\n\n document.head.appendChild(script)\n }).pipe(\n shareReplay(1) // Share the result among all subscribers\n )\n\n return this.loading$\n }\n}\n\n/**\n * `<schmancy-map>` component\n *\n * A Google Maps component with an intuitive API for displaying interactive or static maps.\n * Supports both address strings (with automatic geocoding) and precise coordinates.\n *\n * @element schmancy-map\n *\n * @example\n * <!-- Simple address -->\n * <schmancy-map address=\"Times Square, New York\"></schmancy-map>\n *\n * @example\n * <!-- With coordinates -->\n * <schmancy-map latitude=\"40.758\" longitude=\"-73.985\" zoom=\"17\"></schmancy-map>\n *\n * @example\n * <!-- Satellite view -->\n * <schmancy-map address=\"Grand Canyon\" type=\"satellite\" height=\"500px\"></schmancy-map>\n *\n * @example\n * <!-- Static map -->\n * <schmancy-map address=\"Eiffel Tower, Paris\" interactive=\"false\" controls=\"false\"></schmancy-map>\n */\n@customElement('schmancy-map')\nexport default class SchmancyMap extends TailwindElement(css`\n :host {\n display: block;\n position: relative;\n border-radius: 8px;\n overflow: hidden;\n background-color: var(--schmancy-sys-color-surface-container);\n color: var(--schmancy-sys-color-surface-on);\n }\n \n :host([height]) {\n height: var(--map-height);\n }\n \n .map-container {\n width: 100%;\n height: 100%;\n min-height: 400px;\n }\n \n .loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n min-height: 400px;\n background-color: var(--schmancy-sys-color-surface-containerLow);\n }\n \n .error-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n min-height: 400px;\n padding: 24px;\n text-align: center;\n background-color: var(--schmancy-sys-color-surface-containerLow);\n }\n \n .error-icon {\n width: 48px;\n height: 48px;\n margin-bottom: 16px;\n color: var(--schmancy-sys-color-error-default);\n }\n \n .error-title {\n font-size: 18px;\n font-weight: 600;\n margin-bottom: 8px;\n color: var(--schmancy-sys-color-surface-on);\n }\n \n .error-message {\n font-size: 14px;\n color: var(--schmancy-sys-color-surface-onVariant);\n line-height: 1.5;\n }\n`) {\n /**\n * Simple address string that automatically geocodes to display the location.\n * Takes precedence over latitude/longitude if both are provided.\n */\n @property({ type: String })\n address: string = ''\n\n /**\n * Latitude coordinate for precise location.\n * Used when address is not provided.\n */\n @property({ type: Number })\n latitude?: number\n\n /**\n * Longitude coordinate for precise location.\n * Used when address is not provided.\n */\n @property({ type: Number })\n longitude?: number\n\n /**\n * Map zoom level. Higher numbers show more detail.\n * @default 15\n */\n @property({ type: Number })\n zoom: number = 15\n\n /**\n * Height of the map with CSS unit (e.g., \"400px\", \"50vh\").\n * @default \"400px\"\n */\n @property({ type: String, reflect: true })\n height: string = '400px'\n\n /**\n * Whether to show a marker at the location.\n * @default true\n */\n @property({ type: Boolean })\n marker: boolean = true\n\n /**\n * Tooltip text for the location marker.\n */\n @property({ type: String })\n markerTitle: string = ''\n\n /**\n * Map display type.\n * Options: \"roadmap\", \"satellite\", \"hybrid\", \"terrain\"\n * @default \"roadmap\"\n */\n @property({ type: String })\n type: 'roadmap' | 'satellite' | 'hybrid' | 'terrain' = 'roadmap'\n\n /**\n * Whether users can interact with the map (pan, zoom, click).\n * @default true\n */\n @property({ type: Boolean })\n interactive: boolean = true\n\n /**\n * Whether to show map controls (zoom buttons, fullscreen, etc.).\n * @default true\n */\n @property({ type: Boolean })\n controls: boolean = true\n\n /**\n * Google Maps API key. Required for the map to load.\n */\n @property({ type: String })\n apiKey: string = ''\n\n @state() private loading: boolean = false\n @state() private error: string = ''\n\n private mapRef = createRef<HTMLDivElement>()\n private map?: any\n private mapMarker?: any\n private geocoder?: any\n private intersectionObserver?: IntersectionObserver\n private hasLoadedMap = false\n\n connectedCallback() {\n super.connectedCallback()\n \n // Set CSS custom property for height\n this.style.setProperty('--map-height', this.height)\n \n // Only load map when component becomes visible\n this.setupIntersectionObserver()\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n }\n }\n\n private setupIntersectionObserver() {\n // Load map only when it's visible in the viewport\n this.intersectionObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach(entry => {\n if (entry.isIntersecting && !this.hasLoadedMap) {\n this.hasLoadedMap = true\n this.loadMap()\n // Stop observing after loading\n this.intersectionObserver?.disconnect()\n }\n })\n },\n {\n root: null,\n rootMargin: '50px',\n threshold: 0.01\n }\n )\n \n this.intersectionObserver.observe(this)\n }\n\n private loadMap() {\n of(null).pipe(\n tap(() => {\n this.loading = true\n this.error = ''\n }),\n switchMap(() => {\n if (!this.apiKey) {\n throw new Error('Google Maps API key is required. Please provide it via the apiKey property.')\n }\n return GoogleMapsLoader.load(this.apiKey)\n }),\n switchMap(() => this.getCoordinates()),\n tap((coordinates) => {\n // Store coordinates for later use\n this.pendingCoordinates = coordinates\n }),\n catchError((error) => {\n console.error('Map loading error:', error)\n this.error = error.message || 'Failed to load map'\n return EMPTY\n }),\n finalize(() => {\n this.loading = false\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n private pendingCoordinates?: { lat: number; lng: number }\n\n private getCoordinates() {\n if (this.address) {\n return this.geocodeAddress(this.address)\n }\n\n if (this.latitude !== undefined && this.longitude !== undefined) {\n return of({ lat: this.latitude, lng: this.longitude })\n }\n\n throw new Error('Either address or latitude/longitude coordinates are required')\n }\n\n private geocodeAddress(address: string) {\n if (!this.geocoder) {\n this.geocoder = new window.google!.maps.Geocoder()\n }\n\n return new Promise<{ lat: number; lng: number }>((resolve, reject) => {\n this.geocoder.geocode({ address }, (results: any[], status: string) => {\n if (status === 'OK' && results[0]) {\n const location = results[0].geometry.location\n resolve({\n lat: location.lat(),\n lng: location.lng()\n })\n } else {\n reject(new Error(`Geocoding failed: ${status}`))\n }\n })\n })\n }\n\n private initializeMap(coordinates: { lat: number; lng: number }) {\n if (!this.mapRef.value || !window.google?.maps) {\n return\n }\n\n const mapOptions = {\n center: coordinates,\n zoom: this.zoom,\n mapTypeId: this.getMapTypeId(),\n disableDefaultUI: !this.controls,\n gestureHandling: this.interactive ? 'cooperative' : 'none',\n zoomControl: this.controls,\n mapTypeControl: this.controls,\n scaleControl: this.controls,\n streetViewControl: this.controls,\n rotateControl: this.controls,\n fullscreenControl: this.controls,\n styles: this.interactive ? undefined : [\n {\n featureType: 'poi',\n stylers: [{ visibility: 'off' }]\n }\n ]\n }\n\n this.map = new window.google.maps.Map(this.mapRef.value, mapOptions)\n\n if (this.marker) {\n this.addMarker(coordinates)\n }\n }\n\n private getMapTypeId(): string {\n const typeMap = {\n roadmap: window.google!.maps.MapTypeId.ROADMAP,\n satellite: window.google!.maps.MapTypeId.SATELLITE,\n hybrid: window.google!.maps.MapTypeId.HYBRID,\n terrain: window.google!.maps.MapTypeId.TERRAIN\n }\n return typeMap[this.type] || typeMap.roadmap\n }\n\n private addMarker(coordinates: { lat: number; lng: number }) {\n if (!window.google?.maps || !this.map) {\n return\n }\n\n this.mapMarker = new window.google.maps.Marker({\n position: coordinates,\n map: this.map,\n title: this.markerTitle || this.address || 'Location'\n })\n }\n\n protected updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties)\n\n if (changedProperties.has('height')) {\n this.style.setProperty('--map-height', this.height)\n }\n\n // Initialize map when loading completes and container is ready\n if (changedProperties.has('loading') && !this.loading && this.pendingCoordinates && !this.map) {\n // Wait for next frame to ensure map container is rendered\n requestAnimationFrame(() => {\n if (this.mapRef.value && this.pendingCoordinates) {\n this.initializeMap(this.pendingCoordinates)\n this.pendingCoordinates = undefined\n }\n })\n }\n\n // Reload map if critical properties change (only if map was already loaded)\n if (\n changedProperties.has('address') ||\n changedProperties.has('latitude') ||\n changedProperties.has('longitude') ||\n changedProperties.has('type') ||\n changedProperties.has('zoom')\n ) {\n if (this.map && this.hasLoadedMap) {\n this.loadMap()\n }\n }\n\n // Update marker title if it changes\n if (changedProperties.has('markerTitle') && this.mapMarker) {\n this.mapMarker.setTitle(this.markerTitle || this.address || 'Location')\n }\n }\n\n protected render() {\n return html`\n ${when(\n this.loading,\n () => html`\n <div class=\"loading-container\">\n <schmancy-spinner size=\"32px\"></schmancy-spinner>\n </div>\n `,\n () => when(\n this.error,\n () => html`\n <div class=\"error-container\">\n <svg class=\"error-icon\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" \n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z\" />\n </svg>\n <div class=\"error-title\">Map could not be loaded</div>\n <div class=\"error-message\">${this.error}</div>\n </div>\n `,\n () => html`\n <div class=\"map-container\" ${ref(this.mapRef)}></div>\n `\n )\n )}\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-map': SchmancyMap\n }\n}"],"names":["GoogleMapsLoader","apiKey","window","google","maps","of","this","loading$","Observable","observer","next","complete","script","document","createElement","src","async","defer","initGoogleMaps","onerror","error","Error","head","appendChild","pipe","shareReplay","SchmancyMap","TailwindElement","css","constructor","super","arguments","address","zoom","height","marker","markerTitle","type","interactive","controls","loading","mapRef","createRef","hasLoadedMap","connectedCallback","style","setProperty","setupIntersectionObserver","disconnectedCallback","intersectionObserver","disconnect","IntersectionObserver","entries","forEach","entry","isIntersecting","loadMap","root","rootMargin","threshold","observe","tap","switchMap","load","getCoordinates","coordinates","pendingCoordinates","catchError","message","EMPTY","finalize","takeUntil","disconnecting","subscribe","geocodeAddress","latitude","longitude","lat","lng","geocoder","Geocoder","Promise","resolve","reject","geocode","results","status","location","geometry","value","mapOptions","center","mapTypeId","getMapTypeId","disableDefaultUI","gestureHandling","zoomControl","mapTypeControl","scaleControl","streetViewControl","rotateControl","fullscreenControl","styles","featureType","stylers","visibility","map","Map","addMarker","typeMap","roadmap","MapTypeId","ROADMAP","satellite","SATELLITE","hybrid","HYBRID","terrain","TERRAIN","mapMarker","Marker","position","title","changedProperties","updated","has","requestAnimationFrame","initializeMap","setTitle","render","html","when","ref","__decorateClass","property","String","prototype","Number","reflect","Boolean","state","customElement"],"mappings":"ufAgCA,MAAMA,EAGJ,OAAA,KAAYC,EAAAA,CAEV,OAAIC,OAAOC,QAAQC,KACVC,EAAAA,GAAAA,KAILC,KAAKC,WAKTD,KAAKC,SAAW,IAAIC,EAAAA,WAAoBC,GAAAA,CAEtC,GAAIP,OAAOC,QAAQC,KAGjB,OAFAK,EAASC,OAAK,EAAA,KACdD,EAASE,SAAAA,EAIX,MAAMC,EAASC,SAASC,cAAc,QAAA,EAEtCF,EAAOG,IAAM,+CAA+Cd,CAAAA,qDAC5DW,EAAOI,MAAAA,GACPJ,EAAOK,MAAAA,GAEPf,OAAOgB,eAAiB,IAAA,CACtBT,EAASC,KAAAA,EAAK,EACdD,EAASE,SAAAA,CAAAA,EAGXC,EAAOO,QAAWC,GAAAA,CAEhBX,EAASW,MAAM,IAAIC,MAAM,qGAAA,CAAA,CAAA,EAG3BR,SAASS,KAAKC,YAAYX,CAAAA,CAAAA,CAAAA,EACzBY,KACDC,EAAAA,YAAY,CAAA,CAAA,GA9BLnB,KAAKC,SAkChB,EA4BmBmB,QAAAA,YAArB,cAAyCC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;A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AAA,EAxFC/G,oBAyFnB8G,UAAA,OAAA,CAAA,EAOAH,EAAA,CADCC,EAAAA,SAAS,CAAEjG,KAAMkG,OAAQG,UAAS,CAAA,CAAA,EA/FhBhH,oBAgGnB8G,UAAA,SAAA,CAAA,EAOAH,EAAA,CADCC,WAAS,CAAEjG,KAAMsG,OAAAA,CAAAA,CAAAA,EAtGCjH,oBAuGnB8G,UAAA,SAAA,GAMAH,EAAA,CADCC,WAAS,CAAEjG,KAAMkG,MAAAA,CAAAA,CAAAA,EA5GC7G,oBA6GnB8G,UAAA,cAAA,CAAA,EAQAH,EAAA,CADCC,WAAS,CAAEjG,KAAMkG,MAAAA,CAAAA,CAAAA,EApHC7G,oBAqHnB8G,UAAA,OAAA,CAAA,EAOAH,EAAA,CADCC,WAAS,CAAEjG,KAAMsG,OAAAA,CAAAA,CAAAA,EA3HCjH,oBA4HnB8G,UAAA,cAAA,CAAA,EAOAH,EAAA,CADCC,WAAS,CAAEjG,KAAMsG,OAAAA,CAAAA,CAAAA,EAlICjH,oBAmInB8G,UAAA,WAAA,CAAA,EAMAH,EAAA,CADCC,WAAS,CAAEjG,KAAMkG,MAAAA,CAAAA,CAAAA,EAxIC7G,oBAyInB8G,UAAA,SAAA,CAAA,EAEiBH,EAAA,CAAhBO,EAAAA,SA3IkBlH,oBA2IF8G,UAAA,UAAA,GACAH,EAAA,CAAhBO,EAAAA,MAAAA,CAAAA,EA5IkBlH,oBA4IF8G,UAAA,QAAA,CAAA,EA5IE9G,QAAAA,YAArB2G,EAAA,CADCQ,EAAAA,cAAc,iBACMnH"}
|
|
1
|
+
{"version":3,"file":"map-B_AGndzc.cjs","sources":["../src/map/map.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { ref, createRef } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { of, EMPTY, Observable } from 'rxjs'\nimport { switchMap, tap, catchError, takeUntil, finalize, shareReplay } from 'rxjs/operators'\n\ninterface GoogleMapsAPI {\n maps: {\n Map: new (element: HTMLElement, options: any) => any\n Marker: new (options: any) => any\n Geocoder: new () => any\n LatLng: new (lat: number, lng: number) => any\n MapTypeId: {\n ROADMAP: string\n SATELLITE: string\n HYBRID: string\n TERRAIN: string\n }\n }\n}\n\ndeclare global {\n interface Window {\n google?: GoogleMapsAPI\n initGoogleMaps?: () => void\n __schmancyGoogleMapsLoading?: Observable<boolean>\n }\n}\n\n// Singleton for managing Google Maps script loading\nclass GoogleMapsLoader {\n private static loading$?: Observable<boolean>\n\n static load(apiKey: string): Observable<boolean> {\n // If already loaded, return success\n if (window.google?.maps) {\n return of(true)\n }\n\n // If already loading, return the existing observable\n if (this.loading$) {\n return this.loading$\n }\n\n // Create a new loading observable\n this.loading$ = new Observable<boolean>(observer => {\n // Check again if loaded while waiting\n if (window.google?.maps) {\n observer.next(true)\n observer.complete()\n return\n }\n\n const script = document.createElement('script')\n // Using places library instead of geometry for geocoding\n script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&callback=initGoogleMaps&v=weekly`\n script.async = true\n script.defer = true\n\n window.initGoogleMaps = () => {\n observer.next(true)\n observer.complete()\n }\n\n script.onerror = (error) => {\n console.error('Google Maps script loading error:', error)\n observer.error(new Error('Failed to load Google Maps. Please check API key configuration and ensure the domain is authorized.'))\n }\n\n document.head.appendChild(script)\n }).pipe(\n shareReplay(1) // Share the result among all subscribers\n )\n\n return this.loading$\n }\n}\n\n/**\n * `<schmancy-map>` component\n *\n * A Google Maps component with an intuitive API for displaying interactive or static maps.\n * Supports both address strings (with automatic geocoding) and precise coordinates.\n *\n * @element schmancy-map\n *\n * @example\n * <!-- Simple address -->\n * <schmancy-map address=\"Times Square, New York\"></schmancy-map>\n *\n * @example\n * <!-- With coordinates -->\n * <schmancy-map latitude=\"40.758\" longitude=\"-73.985\" zoom=\"17\"></schmancy-map>\n *\n * @example\n * <!-- Satellite view -->\n * <schmancy-map address=\"Grand Canyon\" type=\"satellite\" height=\"500px\"></schmancy-map>\n *\n * @example\n * <!-- Static map -->\n * <schmancy-map address=\"Eiffel Tower, Paris\" interactive=\"false\" controls=\"false\"></schmancy-map>\n */\n@customElement('schmancy-map')\nexport default class SchmancyMap extends TailwindElement(css`\n :host {\n display: block;\n position: relative;\n border-radius: 8px;\n overflow: hidden;\n background-color: var(--schmancy-sys-color-surface-container);\n color: var(--schmancy-sys-color-surface-on);\n }\n \n :host([height]) {\n height: var(--map-height);\n }\n \n .map-container {\n width: 100%;\n height: 100%;\n min-height: 400px;\n }\n \n .loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n min-height: 400px;\n background-color: var(--schmancy-sys-color-surface-containerLow);\n }\n \n .error-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n min-height: 400px;\n padding: 24px;\n text-align: center;\n background-color: var(--schmancy-sys-color-surface-containerLow);\n }\n \n .error-icon {\n width: 48px;\n height: 48px;\n margin-bottom: 16px;\n color: var(--schmancy-sys-color-error-default);\n }\n \n .error-title {\n font-size: 18px;\n font-weight: 600;\n margin-bottom: 8px;\n color: var(--schmancy-sys-color-surface-on);\n }\n \n .error-message {\n font-size: 14px;\n color: var(--schmancy-sys-color-surface-onVariant);\n line-height: 1.5;\n }\n`) {\n /**\n * Simple address string that automatically geocodes to display the location.\n * Takes precedence over latitude/longitude if both are provided.\n */\n @property({ type: String })\n address: string = ''\n\n /**\n * Latitude coordinate for precise location.\n * Used when address is not provided.\n */\n @property({ type: Number })\n latitude?: number\n\n /**\n * Longitude coordinate for precise location.\n * Used when address is not provided.\n */\n @property({ type: Number })\n longitude?: number\n\n /**\n * Map zoom level. Higher numbers show more detail.\n * @default 15\n */\n @property({ type: Number })\n zoom: number = 15\n\n /**\n * Height of the map with CSS unit (e.g., \"400px\", \"50vh\").\n * @default \"400px\"\n */\n @property({ type: String, reflect: true })\n height: string = '400px'\n\n /**\n * Whether to show a marker at the location.\n * @default true\n */\n @property({ type: Boolean })\n marker: boolean = true\n\n /**\n * Tooltip text for the location marker.\n */\n @property({ type: String })\n markerTitle: string = ''\n\n /**\n * Map display type.\n * Options: \"roadmap\", \"satellite\", \"hybrid\", \"terrain\"\n * @default \"roadmap\"\n */\n @property({ type: String })\n type: 'roadmap' | 'satellite' | 'hybrid' | 'terrain' = 'roadmap'\n\n /**\n * Whether users can interact with the map (pan, zoom, click).\n * @default true\n */\n @property({ type: Boolean })\n interactive: boolean = true\n\n /**\n * Whether to show map controls (zoom buttons, fullscreen, etc.).\n * @default true\n */\n @property({ type: Boolean })\n controls: boolean = true\n\n /**\n * Google Maps API key. Required for the map to load.\n */\n @property({ type: String })\n apiKey: string = ''\n\n @state() private loading: boolean = false\n @state() private error: string = ''\n\n private mapRef = createRef<HTMLDivElement>()\n private map?: any\n private mapMarker?: any\n private geocoder?: any\n private intersectionObserver?: IntersectionObserver\n private hasLoadedMap = false\n\n connectedCallback() {\n super.connectedCallback()\n \n // Set CSS custom property for height\n this.style.setProperty('--map-height', this.height)\n \n // Only load map when component becomes visible\n this.setupIntersectionObserver()\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n }\n }\n\n private setupIntersectionObserver() {\n // Load map only when it's visible in the viewport\n this.intersectionObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach(entry => {\n if (entry.isIntersecting && !this.hasLoadedMap) {\n this.hasLoadedMap = true\n this.loadMap()\n // Stop observing after loading\n this.intersectionObserver?.disconnect()\n }\n })\n },\n {\n root: null,\n rootMargin: '50px',\n threshold: 0.01\n }\n )\n \n this.intersectionObserver.observe(this)\n }\n\n private loadMap() {\n of(null).pipe(\n tap(() => {\n this.loading = true\n this.error = ''\n }),\n switchMap(() => {\n if (!this.apiKey) {\n throw new Error('Google Maps API key is required. Please provide it via the apiKey property.')\n }\n return GoogleMapsLoader.load(this.apiKey)\n }),\n switchMap(() => this.getCoordinates()),\n tap((coordinates) => {\n // Store coordinates for later use\n this.pendingCoordinates = coordinates\n }),\n catchError((error) => {\n console.error('Map loading error:', error)\n this.error = error.message || 'Failed to load map'\n return EMPTY\n }),\n finalize(() => {\n this.loading = false\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n private pendingCoordinates?: { lat: number; lng: number }\n\n private getCoordinates() {\n if (this.address) {\n return this.geocodeAddress(this.address)\n }\n\n if (this.latitude !== undefined && this.longitude !== undefined) {\n return of({ lat: this.latitude, lng: this.longitude })\n }\n\n throw new Error('Either address or latitude/longitude coordinates are required')\n }\n\n private geocodeAddress(address: string) {\n if (!this.geocoder) {\n this.geocoder = new window.google!.maps.Geocoder()\n }\n\n return new Promise<{ lat: number; lng: number }>((resolve, reject) => {\n this.geocoder.geocode({ address }, (results: any[], status: string) => {\n if (status === 'OK' && results[0]) {\n const location = results[0].geometry.location\n resolve({\n lat: location.lat(),\n lng: location.lng()\n })\n } else {\n reject(new Error(`Geocoding failed: ${status}`))\n }\n })\n })\n }\n\n private initializeMap(coordinates: { lat: number; lng: number }) {\n if (!this.mapRef.value || !window.google?.maps) {\n return\n }\n\n const mapOptions = {\n center: coordinates,\n zoom: this.zoom,\n mapTypeId: this.getMapTypeId(),\n disableDefaultUI: !this.controls,\n gestureHandling: this.interactive ? 'cooperative' : 'none',\n zoomControl: this.controls,\n mapTypeControl: this.controls,\n scaleControl: this.controls,\n streetViewControl: this.controls,\n rotateControl: this.controls,\n fullscreenControl: this.controls,\n styles: this.interactive ? undefined : [\n {\n featureType: 'poi',\n stylers: [{ visibility: 'off' }]\n }\n ]\n }\n\n this.map = new window.google.maps.Map(this.mapRef.value, mapOptions)\n\n if (this.marker) {\n this.addMarker(coordinates)\n }\n }\n\n private getMapTypeId(): string {\n const typeMap = {\n roadmap: window.google!.maps.MapTypeId.ROADMAP,\n satellite: window.google!.maps.MapTypeId.SATELLITE,\n hybrid: window.google!.maps.MapTypeId.HYBRID,\n terrain: window.google!.maps.MapTypeId.TERRAIN\n }\n return typeMap[this.type] || typeMap.roadmap\n }\n\n private addMarker(coordinates: { lat: number; lng: number }) {\n if (!window.google?.maps || !this.map) {\n return\n }\n\n this.mapMarker = new window.google.maps.Marker({\n position: coordinates,\n map: this.map,\n title: this.markerTitle || this.address || 'Location'\n })\n }\n\n protected updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties)\n\n if (changedProperties.has('height')) {\n this.style.setProperty('--map-height', this.height)\n }\n\n // Initialize map when loading completes and container is ready\n if (changedProperties.has('loading') && !this.loading && this.pendingCoordinates && !this.map) {\n // Wait for next frame to ensure map container is rendered\n requestAnimationFrame(() => {\n if (this.mapRef.value && this.pendingCoordinates) {\n this.initializeMap(this.pendingCoordinates)\n this.pendingCoordinates = undefined\n }\n })\n }\n\n // Reload map if critical properties change (only if map was already loaded)\n if (\n changedProperties.has('address') ||\n changedProperties.has('latitude') ||\n changedProperties.has('longitude') ||\n changedProperties.has('type') ||\n changedProperties.has('zoom')\n ) {\n if (this.map && this.hasLoadedMap) {\n this.loadMap()\n }\n }\n\n // Update marker title if it changes\n if (changedProperties.has('markerTitle') && this.mapMarker) {\n this.mapMarker.setTitle(this.markerTitle || this.address || 'Location')\n }\n }\n\n protected render() {\n return html`\n ${when(\n this.loading,\n () => html`\n <div class=\"loading-container\">\n <schmancy-spinner size=\"32px\"></schmancy-spinner>\n </div>\n `,\n () => when(\n this.error,\n () => html`\n <div class=\"error-container\">\n <svg class=\"error-icon\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" \n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z\" />\n </svg>\n <div class=\"error-title\">Map could not be loaded</div>\n <div class=\"error-message\">${this.error}</div>\n </div>\n `,\n () => html`\n <div class=\"map-container\" ${ref(this.mapRef)}></div>\n `\n )\n )}\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-map': SchmancyMap\n }\n}"],"names":["GoogleMapsLoader","apiKey","window","google","maps","of","this","loading$","Observable","observer","next","complete","script","document","createElement","src","async","defer","initGoogleMaps","onerror","error","Error","head","appendChild","pipe","shareReplay","SchmancyMap","TailwindElement","css","constructor","super","arguments","address","zoom","height","marker","markerTitle","type","interactive","controls","loading","mapRef","createRef","hasLoadedMap","connectedCallback","style","setProperty","setupIntersectionObserver","disconnectedCallback","intersectionObserver","disconnect","IntersectionObserver","entries","forEach","entry","isIntersecting","loadMap","root","rootMargin","threshold","observe","tap","switchMap","load","getCoordinates","coordinates","pendingCoordinates","catchError","message","EMPTY","finalize","takeUntil","disconnecting","subscribe","geocodeAddress","latitude","longitude","lat","lng","geocoder","Geocoder","Promise","resolve","reject","geocode","results","status","location","geometry","value","mapOptions","center","mapTypeId","getMapTypeId","disableDefaultUI","gestureHandling","zoomControl","mapTypeControl","scaleControl","streetViewControl","rotateControl","fullscreenControl","styles","featureType","stylers","visibility","map","Map","addMarker","typeMap","roadmap","MapTypeId","ROADMAP","satellite","SATELLITE","hybrid","HYBRID","terrain","TERRAIN","mapMarker","Marker","position","title","changedProperties","updated","has","requestAnimationFrame","initializeMap","setTitle","render","html","when","ref","__decorateClass","property","String","prototype","Number","reflect","Boolean","state","customElement"],"mappings":"ufAgCA,MAAMA,EAGJ,OAAA,KAAYC,EAAAA,CAEV,OAAIC,OAAOC,QAAQC,KACVC,EAAAA,GAAAA,KAILC,KAAKC,WAKTD,KAAKC,SAAW,IAAIC,EAAAA,WAAoBC,GAAAA,CAEtC,GAAIP,OAAOC,QAAQC,KAGjB,OAFAK,EAASC,OAAK,EAAA,KACdD,EAASE,SAAAA,EAIX,MAAMC,EAASC,SAASC,cAAc,QAAA,EAEtCF,EAAOG,IAAM,+CAA+Cd,CAAAA,qDAC5DW,EAAOI,MAAAA,GACPJ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H,oBA4HnB8G,UAAA,cAAA,CAAA,EAOAH,EAAA,CADCC,WAAS,CAAEjG,KAAMsG,OAAAA,CAAAA,CAAAA,EAlICjH,oBAmInB8G,UAAA,WAAA,CAAA,EAMAH,EAAA,CADCC,WAAS,CAAEjG,KAAMkG,MAAAA,CAAAA,CAAAA,EAxIC7G,oBAyInB8G,UAAA,SAAA,CAAA,EAEiBH,EAAA,CAAhBO,EAAAA,SA3IkBlH,oBA2IF8G,UAAA,UAAA,GACAH,EAAA,CAAhBO,EAAAA,MAAAA,CAAAA,EA5IkBlH,oBA4IF8G,UAAA,QAAA,CAAA,EA5IE9G,QAAAA,YAArB2G,EAAA,CADCQ,EAAAA,cAAc,iBACMnH"}
|
|
@@ -2,7 +2,7 @@ import { of as l, EMPTY as u, Observable as v } from "rxjs";
|
|
|
2
2
|
import "lit/directives/class-map.js";
|
|
3
3
|
import "lit/directives/style-map.js";
|
|
4
4
|
import { property as a, state as c, customElement as f } from "lit/decorators.js";
|
|
5
|
-
import { T as w } from "./tailwind.mixin-
|
|
5
|
+
import { T as w } from "./tailwind.mixin-R2xLfpws.js";
|
|
6
6
|
import { css as b, html as d } from "lit";
|
|
7
7
|
import { createRef as k, ref as M } from "lit/directives/ref.js";
|
|
8
8
|
import { when as g } from "lit/directives/when.js";
|
|
@@ -172,4 +172,4 @@ o([a({ type: String })], t.prototype, "address", 2), o([a({ type: Number })], t.
|
|
|
172
172
|
export {
|
|
173
173
|
t as S
|
|
174
174
|
};
|
|
175
|
-
//# sourceMappingURL=map-
|
|
175
|
+
//# sourceMappingURL=map-DuilOl8g.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-YZSVvbDM.js","sources":["../src/map/map.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { ref, createRef } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { of, EMPTY, Observable } from 'rxjs'\nimport { switchMap, tap, catchError, takeUntil, finalize, shareReplay } from 'rxjs/operators'\n\ninterface GoogleMapsAPI {\n maps: {\n Map: new (element: HTMLElement, options: any) => any\n Marker: new (options: any) => any\n Geocoder: new () => any\n LatLng: new (lat: number, lng: number) => any\n MapTypeId: {\n ROADMAP: string\n SATELLITE: string\n HYBRID: string\n TERRAIN: string\n }\n }\n}\n\ndeclare global {\n interface Window {\n google?: GoogleMapsAPI\n initGoogleMaps?: () => void\n __schmancyGoogleMapsLoading?: Observable<boolean>\n }\n}\n\n// Singleton for managing Google Maps script loading\nclass GoogleMapsLoader {\n private static loading$?: Observable<boolean>\n\n static load(apiKey: string): Observable<boolean> {\n // If already loaded, return success\n if (window.google?.maps) {\n return of(true)\n }\n\n // If already loading, return the existing observable\n if (this.loading$) {\n return this.loading$\n }\n\n // Create a new loading observable\n this.loading$ = new Observable<boolean>(observer => {\n // Check again if loaded while waiting\n if (window.google?.maps) {\n observer.next(true)\n observer.complete()\n return\n }\n\n const script = document.createElement('script')\n // Using places library instead of geometry for geocoding\n script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&callback=initGoogleMaps&v=weekly`\n script.async = true\n script.defer = true\n\n window.initGoogleMaps = () => {\n observer.next(true)\n observer.complete()\n }\n\n script.onerror = (error) => {\n console.error('Google Maps script loading error:', error)\n observer.error(new Error('Failed to load Google Maps. Please check API key configuration and ensure the domain is authorized.'))\n }\n\n document.head.appendChild(script)\n }).pipe(\n shareReplay(1) // Share the result among all subscribers\n )\n\n return this.loading$\n }\n}\n\n/**\n * `<schmancy-map>` component\n *\n * A Google Maps component with an intuitive API for displaying interactive or static maps.\n * Supports both address strings (with automatic geocoding) and precise coordinates.\n *\n * @element schmancy-map\n *\n * @example\n * <!-- Simple address -->\n * <schmancy-map address=\"Times Square, New York\"></schmancy-map>\n *\n * @example\n * <!-- With coordinates -->\n * <schmancy-map latitude=\"40.758\" longitude=\"-73.985\" zoom=\"17\"></schmancy-map>\n *\n * @example\n * <!-- Satellite view -->\n * <schmancy-map address=\"Grand Canyon\" type=\"satellite\" height=\"500px\"></schmancy-map>\n *\n * @example\n * <!-- Static map -->\n * <schmancy-map address=\"Eiffel Tower, Paris\" interactive=\"false\" controls=\"false\"></schmancy-map>\n */\n@customElement('schmancy-map')\nexport default class SchmancyMap extends TailwindElement(css`\n :host {\n display: block;\n position: relative;\n border-radius: 8px;\n overflow: hidden;\n background-color: var(--schmancy-sys-color-surface-container);\n color: var(--schmancy-sys-color-surface-on);\n }\n \n :host([height]) {\n height: var(--map-height);\n }\n \n .map-container {\n width: 100%;\n height: 100%;\n min-height: 400px;\n }\n \n .loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n min-height: 400px;\n background-color: var(--schmancy-sys-color-surface-containerLow);\n }\n \n .error-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n min-height: 400px;\n padding: 24px;\n text-align: center;\n background-color: var(--schmancy-sys-color-surface-containerLow);\n }\n \n .error-icon {\n width: 48px;\n height: 48px;\n margin-bottom: 16px;\n color: var(--schmancy-sys-color-error-default);\n }\n \n .error-title {\n font-size: 18px;\n font-weight: 600;\n margin-bottom: 8px;\n color: var(--schmancy-sys-color-surface-on);\n }\n \n .error-message {\n font-size: 14px;\n color: var(--schmancy-sys-color-surface-onVariant);\n line-height: 1.5;\n }\n`) {\n /**\n * Simple address string that automatically geocodes to display the location.\n * Takes precedence over latitude/longitude if both are provided.\n */\n @property({ type: String })\n address: string = ''\n\n /**\n * Latitude coordinate for precise location.\n * Used when address is not provided.\n */\n @property({ type: Number })\n latitude?: number\n\n /**\n * Longitude coordinate for precise location.\n * Used when address is not provided.\n */\n @property({ type: Number })\n longitude?: number\n\n /**\n * Map zoom level. Higher numbers show more detail.\n * @default 15\n */\n @property({ type: Number })\n zoom: number = 15\n\n /**\n * Height of the map with CSS unit (e.g., \"400px\", \"50vh\").\n * @default \"400px\"\n */\n @property({ type: String, reflect: true })\n height: string = '400px'\n\n /**\n * Whether to show a marker at the location.\n * @default true\n */\n @property({ type: Boolean })\n marker: boolean = true\n\n /**\n * Tooltip text for the location marker.\n */\n @property({ type: String })\n markerTitle: string = ''\n\n /**\n * Map display type.\n * Options: \"roadmap\", \"satellite\", \"hybrid\", \"terrain\"\n * @default \"roadmap\"\n */\n @property({ type: String })\n type: 'roadmap' | 'satellite' | 'hybrid' | 'terrain' = 'roadmap'\n\n /**\n * Whether users can interact with the map (pan, zoom, click).\n * @default true\n */\n @property({ type: Boolean })\n interactive: boolean = true\n\n /**\n * Whether to show map controls (zoom buttons, fullscreen, etc.).\n * @default true\n */\n @property({ type: Boolean })\n controls: boolean = true\n\n /**\n * Google Maps API key. Required for the map to load.\n */\n @property({ type: String })\n apiKey: string = ''\n\n @state() private loading: boolean = false\n @state() private error: string = ''\n\n private mapRef = createRef<HTMLDivElement>()\n private map?: any\n private mapMarker?: any\n private geocoder?: any\n private intersectionObserver?: IntersectionObserver\n private hasLoadedMap = false\n\n connectedCallback() {\n super.connectedCallback()\n \n // Set CSS custom property for height\n this.style.setProperty('--map-height', this.height)\n \n // Only load map when component becomes visible\n this.setupIntersectionObserver()\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n }\n }\n\n private setupIntersectionObserver() {\n // Load map only when it's visible in the viewport\n this.intersectionObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach(entry => {\n if (entry.isIntersecting && !this.hasLoadedMap) {\n this.hasLoadedMap = true\n this.loadMap()\n // Stop observing after loading\n this.intersectionObserver?.disconnect()\n }\n })\n },\n {\n root: null,\n rootMargin: '50px',\n threshold: 0.01\n }\n )\n \n this.intersectionObserver.observe(this)\n }\n\n private loadMap() {\n of(null).pipe(\n tap(() => {\n this.loading = true\n this.error = ''\n }),\n switchMap(() => {\n if (!this.apiKey) {\n throw new Error('Google Maps API key is required. Please provide it via the apiKey property.')\n }\n return GoogleMapsLoader.load(this.apiKey)\n }),\n switchMap(() => this.getCoordinates()),\n tap((coordinates) => {\n // Store coordinates for later use\n this.pendingCoordinates = coordinates\n }),\n catchError((error) => {\n console.error('Map loading error:', error)\n this.error = error.message || 'Failed to load map'\n return EMPTY\n }),\n finalize(() => {\n this.loading = false\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n private pendingCoordinates?: { lat: number; lng: number }\n\n private getCoordinates() {\n if (this.address) {\n return this.geocodeAddress(this.address)\n }\n\n if (this.latitude !== undefined && this.longitude !== undefined) {\n return of({ lat: this.latitude, lng: this.longitude })\n }\n\n throw new Error('Either address or latitude/longitude coordinates are required')\n }\n\n private geocodeAddress(address: string) {\n if (!this.geocoder) {\n this.geocoder = new window.google!.maps.Geocoder()\n }\n\n return new Promise<{ lat: number; lng: number }>((resolve, reject) => {\n this.geocoder.geocode({ address }, (results: any[], status: string) => {\n if (status === 'OK' && results[0]) {\n const location = results[0].geometry.location\n resolve({\n lat: location.lat(),\n lng: location.lng()\n })\n } else {\n reject(new Error(`Geocoding failed: ${status}`))\n }\n })\n })\n }\n\n private initializeMap(coordinates: { lat: number; lng: number }) {\n if (!this.mapRef.value || !window.google?.maps) {\n return\n }\n\n const mapOptions = {\n center: coordinates,\n zoom: this.zoom,\n mapTypeId: this.getMapTypeId(),\n disableDefaultUI: !this.controls,\n gestureHandling: this.interactive ? 'cooperative' : 'none',\n zoomControl: this.controls,\n mapTypeControl: this.controls,\n scaleControl: this.controls,\n streetViewControl: this.controls,\n rotateControl: this.controls,\n fullscreenControl: this.controls,\n styles: this.interactive ? undefined : [\n {\n featureType: 'poi',\n stylers: [{ visibility: 'off' }]\n }\n ]\n }\n\n this.map = new window.google.maps.Map(this.mapRef.value, mapOptions)\n\n if (this.marker) {\n this.addMarker(coordinates)\n }\n }\n\n private getMapTypeId(): string {\n const typeMap = {\n roadmap: window.google!.maps.MapTypeId.ROADMAP,\n satellite: window.google!.maps.MapTypeId.SATELLITE,\n hybrid: window.google!.maps.MapTypeId.HYBRID,\n terrain: window.google!.maps.MapTypeId.TERRAIN\n }\n return typeMap[this.type] || typeMap.roadmap\n }\n\n private addMarker(coordinates: { lat: number; lng: number }) {\n if (!window.google?.maps || !this.map) {\n return\n }\n\n this.mapMarker = new window.google.maps.Marker({\n position: coordinates,\n map: this.map,\n title: this.markerTitle || this.address || 'Location'\n })\n }\n\n protected updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties)\n\n if (changedProperties.has('height')) {\n this.style.setProperty('--map-height', this.height)\n }\n\n // Initialize map when loading completes and container is ready\n if (changedProperties.has('loading') && !this.loading && this.pendingCoordinates && !this.map) {\n // Wait for next frame to ensure map container is rendered\n requestAnimationFrame(() => {\n if (this.mapRef.value && this.pendingCoordinates) {\n this.initializeMap(this.pendingCoordinates)\n this.pendingCoordinates = undefined\n }\n })\n }\n\n // Reload map if critical properties change (only if map was already loaded)\n if (\n changedProperties.has('address') ||\n changedProperties.has('latitude') ||\n changedProperties.has('longitude') ||\n changedProperties.has('type') ||\n changedProperties.has('zoom')\n ) {\n if (this.map && this.hasLoadedMap) {\n this.loadMap()\n }\n }\n\n // Update marker title if it changes\n if (changedProperties.has('markerTitle') && this.mapMarker) {\n this.mapMarker.setTitle(this.markerTitle || this.address || 'Location')\n }\n }\n\n protected render() {\n return html`\n ${when(\n this.loading,\n () => html`\n <div class=\"loading-container\">\n <schmancy-spinner size=\"32px\"></schmancy-spinner>\n </div>\n `,\n () => when(\n this.error,\n () => html`\n <div class=\"error-container\">\n <svg class=\"error-icon\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" \n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z\" />\n </svg>\n <div class=\"error-title\">Map could not be loaded</div>\n <div class=\"error-message\">${this.error}</div>\n </div>\n `,\n () => html`\n <div class=\"map-container\" ${ref(this.mapRef)}></div>\n `\n )\n )}\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-map': SchmancyMap\n }\n}"],"names":["GoogleMapsLoader","apiKey","window","google","maps","of","this","loading$","Observable","observer","next","complete","script","document","createElement","src","async","defer","initGoogleMaps","onerror","error","Error","head","appendChild","pipe","shareReplay","SchmancyMap","TailwindElement","css","constructor","super","arguments","address","zoom","height","marker","markerTitle","type","interactive","controls","loading","mapRef","createRef","hasLoadedMap","connectedCallback","style","setProperty","setupIntersectionObserver","disconnectedCallback","intersectionObserver","disconnect","IntersectionObserver","entries","forEach","entry","isIntersecting","loadMap","root","rootMargin","threshold","observe","tap","switchMap","load","getCoordinates","coordinates","pendingCoordinates","catchError","message","EMPTY","finalize","takeUntil","disconnecting","subscribe","geocodeAddress","latitude","longitude","lat","lng","geocoder","Geocoder","Promise","resolve","reject","geocode","results","status","location","geometry","value","mapOptions","center","mapTypeId","getMapTypeId","disableDefaultUI","gestureHandling","zoomControl","mapTypeControl","scaleControl","streetViewControl","rotateControl","fullscreenControl","styles","featureType","stylers","visibility","map","Map","addMarker","typeMap","roadmap","MapTypeId","ROADMAP","satellite","SATELLITE","hybrid","HYBRID","terrain","TERRAIN","mapMarker","Marker","position","title","changedProperties","updated","has","requestAnimationFrame","initializeMap","setTitle","render","html","when","ref","__decorateClass","property","String","prototype","Number","reflect","Boolean","state","customElement"],"mappings":";;;;;;;;;;;;;AAgCA,MAAMA,EAAAA;AAAAA,EAGJ,OAAA,KAAYC,GAAAA;AAEV,WAAIC,OAAOC,QAAQC,OACVC,EAAAA,EAAG,KAIRC,KAAKC,aAKTD,KAAKC,WAAW,IAAIC,EAAoBC,CAAAA,MAAAA;AAEtC,UAAIP,OAAOC,QAAQC,KAGjB,QAFAK,EAASC,KAAAA,EAAK,GAAA,KACdD,EAASE,SAAAA;AAIX,YAAMC,IAASC,SAASC,cAAc,QAAA;A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,CAAAA,CAAAA,GA5GC7G,EA6GnB8G,WAAA,eAAA,CAAA,GAQAH,EAAA,CADCC,EAAS,EAAEjG,MAAMkG,OAAAA,CAAAA,CAAAA,GApHC7G,EAqHnB8G,WAAA,QAAA,CAAA,GAOAH,EAAA,CADCC,EAAS,EAAEjG,MAAMsG,QAAAA,CAAAA,CAAAA,GA3HCjH,EA4HnB8G,WAAA,eAAA,CAAA,GAOAH,EAAA,CADCC,EAAS,EAAEjG,MAAMsG,QAAAA,CAAAA,CAAAA,GAlICjH,EAmInB8G,WAAA,YAAA,CAAA,GAMAH,EAAA,CADCC,EAAS,EAAEjG,MAAMkG,OAAAA,CAAAA,CAAAA,GAxIC7G,EAyInB8G,WAAA,UAAA,CAAA,GAEiBH,EAAA,CAAhBO,EAAAA,CAAAA,GA3IkBlH,EA2IF8G,WAAA,WAAA,CAAA,GACAH,EAAA,CAAhBO,EAAAA,CAAAA,GA5IkBlH,EA4IF8G,WAAA,SAAA,CAAA,GA5IE9G,IAArB2G,EAAA,CADCQ,EAAc,kBACMnH,CAAAA;"}
|
|
1
|
+
{"version":3,"file":"map-DuilOl8g.js","sources":["../src/map/map.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { ref, createRef } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { of, EMPTY, Observable } from 'rxjs'\nimport { switchMap, tap, catchError, takeUntil, finalize, shareReplay } from 'rxjs/operators'\n\ninterface GoogleMapsAPI {\n maps: {\n Map: new (element: HTMLElement, options: any) => any\n Marker: new (options: any) => any\n Geocoder: new () => any\n LatLng: new (lat: number, lng: number) => any\n MapTypeId: {\n ROADMAP: string\n SATELLITE: string\n HYBRID: string\n TERRAIN: string\n }\n }\n}\n\ndeclare global {\n interface Window {\n google?: GoogleMapsAPI\n initGoogleMaps?: () => void\n __schmancyGoogleMapsLoading?: Observable<boolean>\n }\n}\n\n// Singleton for managing Google Maps script loading\nclass GoogleMapsLoader {\n private static loading$?: Observable<boolean>\n\n static load(apiKey: string): Observable<boolean> {\n // If already loaded, return success\n if (window.google?.maps) {\n return of(true)\n }\n\n // If already loading, return the existing observable\n if (this.loading$) {\n return this.loading$\n }\n\n // Create a new loading observable\n this.loading$ = new Observable<boolean>(observer => {\n // Check again if loaded while waiting\n if (window.google?.maps) {\n observer.next(true)\n observer.complete()\n return\n }\n\n const script = document.createElement('script')\n // Using places library instead of geometry for geocoding\n script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&callback=initGoogleMaps&v=weekly`\n script.async = true\n script.defer = true\n\n window.initGoogleMaps = () => {\n observer.next(true)\n observer.complete()\n }\n\n script.onerror = (error) => {\n console.error('Google Maps script loading error:', error)\n observer.error(new Error('Failed to load Google Maps. Please check API key configuration and ensure the domain is authorized.'))\n }\n\n document.head.appendChild(script)\n }).pipe(\n shareReplay(1) // Share the result among all subscribers\n )\n\n return this.loading$\n }\n}\n\n/**\n * `<schmancy-map>` component\n *\n * A Google Maps component with an intuitive API for displaying interactive or static maps.\n * Supports both address strings (with automatic geocoding) and precise coordinates.\n *\n * @element schmancy-map\n *\n * @example\n * <!-- Simple address -->\n * <schmancy-map address=\"Times Square, New York\"></schmancy-map>\n *\n * @example\n * <!-- With coordinates -->\n * <schmancy-map latitude=\"40.758\" longitude=\"-73.985\" zoom=\"17\"></schmancy-map>\n *\n * @example\n * <!-- Satellite view -->\n * <schmancy-map address=\"Grand Canyon\" type=\"satellite\" height=\"500px\"></schmancy-map>\n *\n * @example\n * <!-- Static map -->\n * <schmancy-map address=\"Eiffel Tower, Paris\" interactive=\"false\" controls=\"false\"></schmancy-map>\n */\n@customElement('schmancy-map')\nexport default class SchmancyMap extends TailwindElement(css`\n :host {\n display: block;\n position: relative;\n border-radius: 8px;\n overflow: hidden;\n background-color: var(--schmancy-sys-color-surface-container);\n color: var(--schmancy-sys-color-surface-on);\n }\n \n :host([height]) {\n height: var(--map-height);\n }\n \n .map-container {\n width: 100%;\n height: 100%;\n min-height: 400px;\n }\n \n .loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n min-height: 400px;\n background-color: var(--schmancy-sys-color-surface-containerLow);\n }\n \n .error-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n min-height: 400px;\n padding: 24px;\n text-align: center;\n background-color: var(--schmancy-sys-color-surface-containerLow);\n }\n \n .error-icon {\n width: 48px;\n height: 48px;\n margin-bottom: 16px;\n color: var(--schmancy-sys-color-error-default);\n }\n \n .error-title {\n font-size: 18px;\n font-weight: 600;\n margin-bottom: 8px;\n color: var(--schmancy-sys-color-surface-on);\n }\n \n .error-message {\n font-size: 14px;\n color: var(--schmancy-sys-color-surface-onVariant);\n line-height: 1.5;\n }\n`) {\n /**\n * Simple address string that automatically geocodes to display the location.\n * Takes precedence over latitude/longitude if both are provided.\n */\n @property({ type: String })\n address: string = ''\n\n /**\n * Latitude coordinate for precise location.\n * Used when address is not provided.\n */\n @property({ type: Number })\n latitude?: number\n\n /**\n * Longitude coordinate for precise location.\n * Used when address is not provided.\n */\n @property({ type: Number })\n longitude?: number\n\n /**\n * Map zoom level. Higher numbers show more detail.\n * @default 15\n */\n @property({ type: Number })\n zoom: number = 15\n\n /**\n * Height of the map with CSS unit (e.g., \"400px\", \"50vh\").\n * @default \"400px\"\n */\n @property({ type: String, reflect: true })\n height: string = '400px'\n\n /**\n * Whether to show a marker at the location.\n * @default true\n */\n @property({ type: Boolean })\n marker: boolean = true\n\n /**\n * Tooltip text for the location marker.\n */\n @property({ type: String })\n markerTitle: string = ''\n\n /**\n * Map display type.\n * Options: \"roadmap\", \"satellite\", \"hybrid\", \"terrain\"\n * @default \"roadmap\"\n */\n @property({ type: String })\n type: 'roadmap' | 'satellite' | 'hybrid' | 'terrain' = 'roadmap'\n\n /**\n * Whether users can interact with the map (pan, zoom, click).\n * @default true\n */\n @property({ type: Boolean })\n interactive: boolean = true\n\n /**\n * Whether to show map controls (zoom buttons, fullscreen, etc.).\n * @default true\n */\n @property({ type: Boolean })\n controls: boolean = true\n\n /**\n * Google Maps API key. Required for the map to load.\n */\n @property({ type: String })\n apiKey: string = ''\n\n @state() private loading: boolean = false\n @state() private error: string = ''\n\n private mapRef = createRef<HTMLDivElement>()\n private map?: any\n private mapMarker?: any\n private geocoder?: any\n private intersectionObserver?: IntersectionObserver\n private hasLoadedMap = false\n\n connectedCallback() {\n super.connectedCallback()\n \n // Set CSS custom property for height\n this.style.setProperty('--map-height', this.height)\n \n // Only load map when component becomes visible\n this.setupIntersectionObserver()\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n }\n }\n\n private setupIntersectionObserver() {\n // Load map only when it's visible in the viewport\n this.intersectionObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach(entry => {\n if (entry.isIntersecting && !this.hasLoadedMap) {\n this.hasLoadedMap = true\n this.loadMap()\n // Stop observing after loading\n this.intersectionObserver?.disconnect()\n }\n })\n },\n {\n root: null,\n rootMargin: '50px',\n threshold: 0.01\n }\n )\n \n this.intersectionObserver.observe(this)\n }\n\n private loadMap() {\n of(null).pipe(\n tap(() => {\n this.loading = true\n this.error = ''\n }),\n switchMap(() => {\n if (!this.apiKey) {\n throw new Error('Google Maps API key is required. Please provide it via the apiKey property.')\n }\n return GoogleMapsLoader.load(this.apiKey)\n }),\n switchMap(() => this.getCoordinates()),\n tap((coordinates) => {\n // Store coordinates for later use\n this.pendingCoordinates = coordinates\n }),\n catchError((error) => {\n console.error('Map loading error:', error)\n this.error = error.message || 'Failed to load map'\n return EMPTY\n }),\n finalize(() => {\n this.loading = false\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n private pendingCoordinates?: { lat: number; lng: number }\n\n private getCoordinates() {\n if (this.address) {\n return this.geocodeAddress(this.address)\n }\n\n if (this.latitude !== undefined && this.longitude !== undefined) {\n return of({ lat: this.latitude, lng: this.longitude })\n }\n\n throw new Error('Either address or latitude/longitude coordinates are required')\n }\n\n private geocodeAddress(address: string) {\n if (!this.geocoder) {\n this.geocoder = new window.google!.maps.Geocoder()\n }\n\n return new Promise<{ lat: number; lng: number }>((resolve, reject) => {\n this.geocoder.geocode({ address }, (results: any[], status: string) => {\n if (status === 'OK' && results[0]) {\n const location = results[0].geometry.location\n resolve({\n lat: location.lat(),\n lng: location.lng()\n })\n } else {\n reject(new Error(`Geocoding failed: ${status}`))\n }\n })\n })\n }\n\n private initializeMap(coordinates: { lat: number; lng: number }) {\n if (!this.mapRef.value || !window.google?.maps) {\n return\n }\n\n const mapOptions = {\n center: coordinates,\n zoom: this.zoom,\n mapTypeId: this.getMapTypeId(),\n disableDefaultUI: !this.controls,\n gestureHandling: this.interactive ? 'cooperative' : 'none',\n zoomControl: this.controls,\n mapTypeControl: this.controls,\n scaleControl: this.controls,\n streetViewControl: this.controls,\n rotateControl: this.controls,\n fullscreenControl: this.controls,\n styles: this.interactive ? undefined : [\n {\n featureType: 'poi',\n stylers: [{ visibility: 'off' }]\n }\n ]\n }\n\n this.map = new window.google.maps.Map(this.mapRef.value, mapOptions)\n\n if (this.marker) {\n this.addMarker(coordinates)\n }\n }\n\n private getMapTypeId(): string {\n const typeMap = {\n roadmap: window.google!.maps.MapTypeId.ROADMAP,\n satellite: window.google!.maps.MapTypeId.SATELLITE,\n hybrid: window.google!.maps.MapTypeId.HYBRID,\n terrain: window.google!.maps.MapTypeId.TERRAIN\n }\n return typeMap[this.type] || typeMap.roadmap\n }\n\n private addMarker(coordinates: { lat: number; lng: number }) {\n if (!window.google?.maps || !this.map) {\n return\n }\n\n this.mapMarker = new window.google.maps.Marker({\n position: coordinates,\n map: this.map,\n title: this.markerTitle || this.address || 'Location'\n })\n }\n\n protected updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties)\n\n if (changedProperties.has('height')) {\n this.style.setProperty('--map-height', this.height)\n }\n\n // Initialize map when loading completes and container is ready\n if (changedProperties.has('loading') && !this.loading && this.pendingCoordinates && !this.map) {\n // Wait for next frame to ensure map container is rendered\n requestAnimationFrame(() => {\n if (this.mapRef.value && this.pendingCoordinates) {\n this.initializeMap(this.pendingCoordinates)\n this.pendingCoordinates = undefined\n }\n })\n }\n\n // Reload map if critical properties change (only if map was already loaded)\n if (\n changedProperties.has('address') ||\n changedProperties.has('latitude') ||\n changedProperties.has('longitude') ||\n changedProperties.has('type') ||\n changedProperties.has('zoom')\n ) {\n if (this.map && this.hasLoadedMap) {\n this.loadMap()\n }\n }\n\n // Update marker title if it changes\n if (changedProperties.has('markerTitle') && this.mapMarker) {\n this.mapMarker.setTitle(this.markerTitle || this.address || 'Location')\n }\n }\n\n protected render() {\n return html`\n ${when(\n this.loading,\n () => html`\n <div class=\"loading-container\">\n <schmancy-spinner size=\"32px\"></schmancy-spinner>\n </div>\n `,\n () => when(\n this.error,\n () => html`\n <div class=\"error-container\">\n <svg class=\"error-icon\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" \n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z\" />\n </svg>\n <div class=\"error-title\">Map could not be loaded</div>\n <div class=\"error-message\">${this.error}</div>\n </div>\n `,\n () => html`\n <div class=\"map-container\" ${ref(this.mapRef)}></div>\n `\n )\n )}\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-map': SchmancyMap\n }\n}"],"names":["GoogleMapsLoader","apiKey","window","google","maps","of","this","loading$","Observable","observer","next","complete","script","document","createElement","src","async","defer","initGoogleMaps","onerror","error","Error","head","appendChild","pipe","shareReplay","SchmancyMap","TailwindElement","css","constructor","super","arguments","address","zoom","height","marker","markerTitle","type","interactive","controls","loading","mapRef","createRef","hasLoadedMap","connectedCallback","style","setProperty","setupIntersectionObserver","disconnectedCallback","intersectionObserver","disconnect","IntersectionObserver","entries","forEach","entry","isIntersecting","loadMap","root","rootMargin","threshold","observe","tap","switchMap","load","getCoordinates","coordinates","pendingCoordinates","catchError","message","EMPTY","finalize","takeUntil","disconnecting","subscribe","geocodeAddress","latitude","longitude","lat","lng","geocoder","Geocoder","Promise","resolve","reject","geocode","results","status","location","geometry","value","mapOptions","center","mapTypeId","getMapTypeId","disableDefaultUI","gestureHandling","zoomControl","mapTypeControl","scaleControl","streetViewControl","rotateControl","fullscreenControl","styles","featureType","stylers","visibility","map","Map","addMarker","typeMap","roadmap","MapTypeId","ROADMAP","satellite","SATELLITE","hybrid","HYBRID","terrain","TERRAIN","mapMarker","Marker","position","title","changedProperties","updated","has","requestAnimationFrame","initializeMap","setTitle","render","html","when","ref","__decorateClass","property","String","prototype","Number","reflect","Boolean","state","customElement"],"mappings":";;;;;;;;;;;;;AAgCA,MAAMA,EAAAA;AAAAA,EAGJ,OAAA,KAAYC,GAAAA;AAEV,WAAIC,OAAOC,QAAQC,OACVC,EAAAA,EAAG,KAIRC,KAAKC,aAKTD,KAAKC,WAAW,IAAIC,EAAoBC,CAAAA,MAAAA;AAEtC,UAAIP,OAAOC,QAAQC,KAGjB,QAFAK,EAASC,KAAAA,EAAK,GAAA,KACdD,EAASE,SAAAA;AAIX,YAAMC,IAASC,SAASC,cAAc,QAAA;AAEtCF,MAAAA,EAAOG,MAAM,+CAA+Cd,CAAAA,sDAC5DW,EAAOI,QAAAA,IACPJ,EAAOK,QAAAA,IAEPf,OAAOgB,iBAAiB,MAAA;AACtBT,QAAAA,EAASC,OAAK,GACdD,EAASE,SAAAA;AAAAA,MAAAA,GAGXC,EAAOO,UAAWC,CAAAA,MAAAA;AAEhBX,QAAAA,EAASW,MAAM,IAAIC,MAAM,qGAAA,CAAA;AAAA,MAAA,GAG3BR,SAASS,KAAKC,YAAYX;OACzBY,KACDC,EAAY,CAAA,CAAA,IA9B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A,CAAA,GAMAH,EAAA,CADCC,EAAS,EAAEjG,MAAMkG,OAAAA,CAAAA,CAAAA,GAxIC7G,EAyInB8G,WAAA,UAAA,CAAA,GAEiBH,EAAA,CAAhBO,EAAAA,CAAAA,GA3IkBlH,EA2IF8G,WAAA,WAAA,CAAA,GACAH,EAAA,CAAhBO,EAAAA,CAAAA,GA5IkBlH,EA4IF8G,WAAA,SAAA,CAAA,GA5IE9G,IAArB2G,EAAA,CADCQ,EAAc,kBACMnH,CAAAA;"}
|
package/dist/map.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./map-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./map-B_AGndzc.cjs");Object.defineProperty(exports,"SchmancyMap",{enumerable:!0,get:()=>e.SchmancyMap});
|
|
2
2
|
//# sourceMappingURL=map.cjs.map
|
package/dist/map.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require("rxjs");const y=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const a=require("lit/decorators.js"),u=require("./tailwind.mixin-
|
|
1
|
+
"use strict";require("rxjs");const y=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const a=require("lit/decorators.js"),u=require("./tailwind.mixin-BvVlz7hG.cjs"),h=require("lit"),f=require("lit/directives/if-defined.js");var m=Object.getOwnPropertyDescriptor;let b=class extends u.TailwindElement(h.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 0.5rem;
|
|
@@ -174,4 +174,4 @@
|
|
|
174
174
|
object-fit: scale-down;
|
|
175
175
|
}
|
|
176
176
|
`){constructor(){super(...arguments),this.src="",this.fit="contain",this.alt=""}render(){return this.src?h.html`<img src="${this.src}" alt="${this.alt}" />`:h.html`<slot></slot>`}};c([a.property({type:String,reflect:!0})],p.prototype,"src",2),c([a.property({type:String,reflect:!0})],p.prototype,"fit",2),c([a.property({type:String})],p.prototype,"alt",2),p=c([a.customElement("schmancy-card-media")],p);
|
|
177
|
-
//# sourceMappingURL=media-
|
|
177
|
+
//# sourceMappingURL=media-BYpO4hxM.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-DAnLnZWp.cjs","sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends TailwindElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tborder-radius: 12px; /* M3 spec: 12px for cards */\n\t\ttransition: box-shadow 200ms cubic-bezier(0.2, 0, 0, 1);\n\t\toutline: none;\n\t}\n\n\t/* Type-specific base styles */\n\t:host([type='elevated']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-low);\n\t\tbox-shadow: var(--shadow-1);\n\t}\n\n\t:host([type='filled']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tbox-shadow: var(--shadow-0);\n\t}\n\n\t:host([type='outlined']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-default);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\tbox-shadow: var(--shadow-0);\n\t}\n\n\t/* Interactive state */\n\t:host([interactive]) {\n\t\tcursor: pointer;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\n\t/* Elevated interactive states */\n\t:host([type='elevated'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow: var(--shadow-2);\n\t}\n\n\t:host([type='elevated'][dragged]) {\n\t\tbox-shadow: var(--shadow-3);\n\t}\n\n\t/* Filled interactive states */\n\t:host([type='filled'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow: var(--shadow-1);\n\t}\n\n\t:host([type='filled'][dragged]) {\n\t\tbox-shadow: var(--shadow-3);\n\t}\n\n\t/* Outlined interactive states */\n\t:host([type='outlined'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow: var(--shadow-1);\n\t}\n\n\t:host([type='outlined'][dragged]) {\n\t\tbox-shadow: var(--shadow-3);\n\t}\n\n\t/* Disabled state */\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: 0.38;\n\t}\n\n\t/* Focus ring */\n\t:host([interactive]:focus-visible:not([disabled])) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\n\t/* Ripple effect animation */\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n`) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * The visual style of the card.\n\t * @default 'elevated'\n\t */\n\t@property({ reflect: true })\n\ttype: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\n\t/**\n\t * Makes the card interactive (clickable).\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tinteractive = false\n\n\t/**\n\t * Disables the card.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled = false\n\n\t/**\n\t * Indicates the card is being dragged.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdragged = false\n\n\t/**\n\t * URL to navigate to when card is clicked (makes it act like a link).\n\t */\n\t@property()\n\thref?: string\n\n\t/**\n\t * Target for the link navigation.\n\t */\n\t@property()\n\ttarget?: string\n\n\t/**\n\t * ARIA role for accessibility.\n\t */\n\t@property({ attribute: 'role' })\n\toverride role = 'article'\n\n\t/**\n\t * ARIA label for accessibility.\n\t */\n\t@property({ attribute: 'aria-label' })\n\toverride ariaLabel: string = ''\n\n\t// Internal state for interaction feedback\n\t@state() pressed = false\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Set appropriate ARIA attributes for interactive cards\n\t\tif (this.interactive && !this.disabled) {\n\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t}\n\t\t}\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\n\t\t// Update ARIA attributes when interactive or disabled state changes\n\t\tif (changedProperties.has('interactive') || changedProperties.has('disabled')) {\n\t\t\tif (this.interactive && !this.disabled) {\n\t\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.removeAttribute('tabindex')\n\t\t\t\tif (this.role === 'button' || this.role === 'link') {\n\t\t\t\t\tthis.role = 'article'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\t// Add ripple effect at click position\n\t\tconst rect = this.getBoundingClientRect()\n\t\tconst x = e.clientX - rect.left\n\t\tconst y = e.clientY - rect.top\n\t\tconst id = this.nextRippleId++\n\n\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t// Remove ripple after animation completes\n\t\tsetTimeout(() => {\n\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t}, 600)\n\n\t\t// Navigate if href is provided\n\t\tif (this.href) {\n\t\t\tif (this.target === '_blank') {\n\t\t\t\twindow.open(this.href, '_blank')\n\t\t\t} else {\n\t\t\t\twindow.location.href = this.href\n\t\t\t}\n\t\t}\n\n\t\t// Dispatch click event for parent components to handle\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\tdetail: { value: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\t// Activate on Enter or Space for keyboard navigation\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.pressed = true\n\t\t\tthis.setAttribute('pressed', '')\n\n\t\t\t// Simulate click\n\t\t\tconst rect = this.getBoundingClientRect()\n\t\t\tconst x = rect.width / 2\n\t\t\tconst y = rect.height / 2\n\t\t\tconst id = this.nextRippleId++\n\n\t\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t\t}, 600)\n\n\t\t\tif (this.href) {\n\t\t\t\tif (this.target === '_blank') {\n\t\t\t\t\twindow.open(this.href, '_blank')\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = this.href\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\t\tdetail: { value: this.type },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\t}\n\n\tprivate handleKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\tthis.pressed = false\n\t\t\tthis.removeAttribute('pressed')\n\t\t}\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tif (this.disabled || !this.interactive) return\n\t\tthis.pressed = true\n\t\tthis.setAttribute('pressed', '')\n\t}\n\n\tprivate handleMouseUp = () => {\n\t\tthis.pressed = false\n\t\tthis.removeAttribute('pressed')\n\t}\n\n\tprivate handleMouseLeave = () => {\n\t\tthis.pressed = false\n\t\tthis.removeAttribute('pressed')\n\t}\n\n\t// Get the classes for state layer based on current state\n\tprivate getStateLayerOpacity(): string {\n\t\tif (!this.interactive || this.disabled) return 'opacity-0'\n\t\tif (this.pressed) return 'opacity-[0.1]' // M3 pressed: 0.1\n\t\treturn 'opacity-0 hover:opacity-[0.08] focus-visible:opacity-[0.1]' // M3 hover: 0.08, focus: 0.1\n\t}\n\n\tprotected render() {\n\t\tconst containerClasses = classMap({\n\t\t\t'relative w-full h-full rounded-xl': true,\n\t\t\t'cursor-pointer': this.interactive && !this.disabled,\n\t\t})\n\n\t\tconst stateLayerClasses = classMap({\n\t\t\t'absolute inset-0 rounded-xl pointer-events-none transition-opacity duration-200 bg-surface-on': true,\n\t\t\t[this.getStateLayerOpacity()]: true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=${containerClasses}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@keyup=${this.handleKeyUp}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\taria-disabled=${this.disabled ? 'true' : 'false'}\n\t\t\t>\n\t\t\t\t<!-- State layer for hover/focus/pressed states -->\n\t\t\t\t<div class=${stateLayerClasses}></div>\n\n\t\t\t\t<!-- Ripple container for click effects -->\n\t\t\t\t${this.interactive\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"absolute inset-0 rounded-xl overflow-hidden pointer-events-none\">\n\t\t\t\t\t\t\t\t${this.ripples.map(\n\t\t\t\t\t\t\t\t\tripple => html`\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"absolute rounded-full scale-0 animate-[ripple_600ms_linear] bg-surface-on opacity-[0.12] pointer-events-none\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"\n\t\t\t\t\t\t\t\t\t\t\t\tleft: ${ripple.x}px;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: ${ripple.y}px;\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t\t\t\t\t\t\theight: 20px;\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-left: -10px;\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: -10px;\n\t\t\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\n\t\t\t\t<!-- Card content -->\n\t\t\t\t<div class=\"relative h-full w-full rounded-xl\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-content\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\t\t? html`<img src=\"${this.src}\" alt=\"${this.alt}\" />` \n\t\t\t: html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n"],"names":["SchmancyCardAction","TailwindElement","css","render","html","customElement","SchmancyCard","super","arguments","this","type","interactive","disabled","dragged","role","ariaLabel","pressed","ripples","nextRippleId","handleClick","e","rect","getBoundingClientRect","x","clientX","left","y","clientY","top","id","setTimeout","filter","r","href","target","window","open","location","dispatchEvent","CustomEvent","detail","value","bubbles","composed","handleKeyDown","key","preventDefault","setAttribute","width","height","handleKeyUp","removeAttribute","handleMouseDown","handleMouseUp","handleMouseLeave","connectedCallback","changedProperties","updated","has","containerClasses","classMap","stateLayerClasses","getStateLayerOpacity","ifDefined","map","ripple","shadowRootOptions","LitElement","mode","delegatesFocus","__decorateClass","property","reflect","prototype","Boolean","attribute","state","SchmancyCardContent","SchmancyCardMedia","constructor","src","fit","alt","String"],"mappings":"oSASA,IAAqBA,EAArB,cAAgDC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GASrD,QAAAC,CACT,OAAOC,EAAAA,mBACR,CAAA,EAXoBJ,wGAArB,CADCK,EAAAA,cAAc,sBAAA,CAAA,EACML,mMCFrB,IAAqBM,EAArB,cAA0CL,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;A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["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends TailwindElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tborder-radius: 12px; /* M3 spec: 12px for cards */\n\t\ttransition: box-shadow 200ms cubic-bezier(0.2, 0, 0, 1);\n\t\toutline: none;\n\t}\n\n\t/* Type-specific base styles */\n\t:host([type='elevated']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-low);\n\t\tbox-shadow: var(--shadow-1);\n\t}\n\n\t:host([type='filled']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tbox-shadow: var(--shadow-0);\n\t}\n\n\t:host([type='outlined']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-default);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\tbox-shadow: var(--shadow-0);\n\t}\n\n\t/* Interactive state */\n\t:host([interactive]) {\n\t\tcursor: pointer;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\n\t/* Elevated interactive states */\n\t:host([type='elevated'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow: var(--shadow-2);\n\t}\n\n\t:host([type='elevated'][dragged]) {\n\t\tbox-shadow: var(--shadow-3);\n\t}\n\n\t/* Filled interactive states */\n\t:host([type='filled'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow: var(--shadow-1);\n\t}\n\n\t:host([type='filled'][dragged]) {\n\t\tbox-shadow: var(--shadow-3);\n\t}\n\n\t/* Outlined interactive states */\n\t:host([type='outlined'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow: var(--shadow-1);\n\t}\n\n\t:host([type='outlined'][dragged]) {\n\t\tbox-shadow: var(--shadow-3);\n\t}\n\n\t/* Disabled state */\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: 0.38;\n\t}\n\n\t/* Focus ring */\n\t:host([interactive]:focus-visible:not([disabled])) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\n\t/* Ripple effect animation */\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n`) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * The visual style of the card.\n\t * @default 'elevated'\n\t */\n\t@property({ reflect: true })\n\ttype: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\n\t/**\n\t * Makes the card interactive (clickable).\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tinteractive = false\n\n\t/**\n\t * Disables the card.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled = false\n\n\t/**\n\t * Indicates the card is being dragged.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdragged = false\n\n\t/**\n\t * URL to navigate to when card is clicked (makes it act like a link).\n\t */\n\t@property()\n\thref?: string\n\n\t/**\n\t * Target for the link navigation.\n\t */\n\t@property()\n\ttarget?: string\n\n\t/**\n\t * ARIA role for accessibility.\n\t */\n\t@property({ attribute: 'role' })\n\toverride role = 'article'\n\n\t/**\n\t * ARIA label for accessibility.\n\t */\n\t@property({ attribute: 'aria-label' })\n\toverride ariaLabel: string = ''\n\n\t// Internal state for interaction feedback\n\t@state() pressed = false\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Set appropriate ARIA attributes for interactive cards\n\t\tif (this.interactive && !this.disabled) {\n\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t}\n\t\t}\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\n\t\t// Update ARIA attributes when interactive or disabled state changes\n\t\tif (changedProperties.has('interactive') || changedProperties.has('disabled')) {\n\t\t\tif (this.interactive && !this.disabled) {\n\t\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.removeAttribute('tabindex')\n\t\t\t\tif (this.role === 'button' || this.role === 'link') {\n\t\t\t\t\tthis.role = 'article'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\t// Add ripple effect at click position\n\t\tconst rect = this.getBoundingClientRect()\n\t\tconst x = e.clientX - rect.left\n\t\tconst y = e.clientY - rect.top\n\t\tconst id = this.nextRippleId++\n\n\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t// Remove ripple after animation completes\n\t\tsetTimeout(() => {\n\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t}, 600)\n\n\t\t// Navigate if href is provided\n\t\tif (this.href) {\n\t\t\tif (this.target === '_blank') {\n\t\t\t\twindow.open(this.href, '_blank')\n\t\t\t} else {\n\t\t\t\twindow.location.href = this.href\n\t\t\t}\n\t\t}\n\n\t\t// Dispatch click event for parent components to handle\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\tdetail: { value: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\t// Activate on Enter or Space for keyboard navigation\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.pressed = true\n\t\t\tthis.setAttribute('pressed', '')\n\n\t\t\t// Simulate click\n\t\t\tconst rect = this.getBoundingClientRect()\n\t\t\tconst x = rect.width / 2\n\t\t\tconst y = rect.height / 2\n\t\t\tconst id = this.nextRippleId++\n\n\t\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t\t}, 600)\n\n\t\t\tif (this.href) {\n\t\t\t\tif (this.target === '_blank') {\n\t\t\t\t\twindow.open(this.href, '_blank')\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = this.href\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\t\tdetail: { value: this.type },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\t}\n\n\tprivate handleKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\tthis.pressed = false\n\t\t\tthis.removeAttribute('pressed')\n\t\t}\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tif (this.disabled || !this.interactive) return\n\t\tthis.pressed = true\n\t\tthis.setAttribute('pressed', '')\n\t}\n\n\tprivate handleMouseUp = () => {\n\t\tthis.pressed = false\n\t\tthis.removeAttribute('pressed')\n\t}\n\n\tprivate handleMouseLeave = () => {\n\t\tthis.pressed = false\n\t\tthis.removeAttribute('pressed')\n\t}\n\n\t// Get the classes for state layer based on current state\n\tprivate getStateLayerOpacity(): string {\n\t\tif (!this.interactive || this.disabled) return 'opacity-0'\n\t\tif (this.pressed) return 'opacity-[0.1]' // M3 pressed: 0.1\n\t\treturn 'opacity-0 hover:opacity-[0.08] focus-visible:opacity-[0.1]' // M3 hover: 0.08, focus: 0.1\n\t}\n\n\tprotected render() {\n\t\tconst containerClasses = classMap({\n\t\t\t'relative w-full h-full rounded-xl': true,\n\t\t\t'cursor-pointer': this.interactive && !this.disabled,\n\t\t})\n\n\t\tconst stateLayerClasses = classMap({\n\t\t\t'absolute inset-0 rounded-xl pointer-events-none transition-opacity duration-200 bg-surface-on': true,\n\t\t\t[this.getStateLayerOpacity()]: true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=${containerClasses}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@keyup=${this.handleKeyUp}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\taria-disabled=${this.disabled ? 'true' : 'false'}\n\t\t\t>\n\t\t\t\t<!-- State layer for hover/focus/pressed states -->\n\t\t\t\t<div class=${stateLayerClasses}></div>\n\n\t\t\t\t<!-- Ripple container for click effects -->\n\t\t\t\t${this.interactive\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"absolute inset-0 rounded-xl overflow-hidden pointer-events-none\">\n\t\t\t\t\t\t\t\t${this.ripples.map(\n\t\t\t\t\t\t\t\t\tripple => html`\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"absolute rounded-full scale-0 animate-[ripple_600ms_linear] bg-surface-on opacity-[0.12] pointer-events-none\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"\n\t\t\t\t\t\t\t\t\t\t\t\tleft: ${ripple.x}px;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: ${ripple.y}px;\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t\t\t\t\t\t\theight: 20px;\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-left: -10px;\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: -10px;\n\t\t\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\n\t\t\t\t<!-- Card content -->\n\t\t\t\t<div class=\"relative h-full w-full rounded-xl\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-content\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\t\t? html`<img src=\"${this.src}\" alt=\"${this.alt}\" />` \n\t\t\t: html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n"],"names":["SchmancyCardAction","TailwindElement","css","render","html","customElement","SchmancyCard","super","arguments","this","type","interactive","disabled","dragged","role","ariaLabel","pressed","ripples","nextRippleId","handleClick","e","rect","getBoundingClientRect","x","clientX","left","y","clientY","top","id","setTimeout","filter","r","href","target","window","open","location","dispatchEvent","CustomEvent","detail","value","bubbles","composed","handleKeyDown","key","preventDefault","setAttribute","width","height","handleKeyUp","removeAttribute","handleMouseDown","handleMouseUp","handleMouseLeave","connectedCallback","changedProperties","updated","has","containerClasses","classMap","stateLayerClasses","getStateLayerOpacity","ifDefined","map","ripple","shadowRootOptions","LitElement","mode","delegatesFocus","__decorateClass","property","reflect","prototype","Boolean","attribute","state","SchmancyCardContent","SchmancyCardMedia","constructor","src","fit","alt","String"],"mappings":"oSASA,IAAqBA,EAArB,cAAgDC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GASrD,QAAAC,CACT,OAAOC,EAAAA,mBACR,CAAA,EAXoBJ,wGAArB,CADCK,EAAAA,cAAc,sBAAA,CAAA,EACML,mMCFrB,IAAqBM,EAArB,cAA0CL,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA1D,CAAA,CAAA,cAAAK,MAAAA,GAAAC,SAAAA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AAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA/D,CAAA,CAAA,aAAA6E,CAAAxE,MAAAA,GAAAC,SAAAA,EA+CCC,KAAAuE,IAAc,GAGdvE,KAAAwE,IAA4D,UAG5DxE,KAAAyE,IAAc,EAAA,CAEJ,QAAA/E,CAGT,OAAOM,KAAKuE,IACT5E,mBAAiBK,KAAKuE,aAAavE,KAAKyE,GAAAA,OACxC9E,EAAAA,mBACJ,CAAA,EAdAkE,EAAA,CADCC,EAAAA,SAAS,CAAE7D,KAAMyE,OAAQX,QAAAA,EAAS,CAAA,CAAA,EA9CfM,EA+CpBL,UAAA,MAAA,GAGAH,EAAA,CADCC,EAAAA,SAAS,CAAE7D,KAAMyE,OAAQX,QAAAA,EAAS,CAAA,CAAA,EAjDfM,EAkDpBL,UAAA,MAAA,CAAA,EAGAH,EAAA,CADCC,WAAS,CAAE7D,KAAMyE,MAAAA,CAAAA,CAAAA,EApDEL,EAqDpBL,UAAA,MAAA,GArDoBK,EAArBR,EAAA,CADCjE,EAAAA,cAAc,qBAAA,CAAA,EACMyE,CAAAA"}
|
|
@@ -2,7 +2,7 @@ import "rxjs";
|
|
|
2
2
|
import { classMap as v } from "lit/directives/class-map.js";
|
|
3
3
|
import "lit/directives/style-map.js";
|
|
4
4
|
import { customElement as u, property as d, state as y } from "lit/decorators.js";
|
|
5
|
-
import { T as f } from "./tailwind.mixin-
|
|
5
|
+
import { T as f } from "./tailwind.mixin-R2xLfpws.js";
|
|
6
6
|
import { css as b, html as h, LitElement as w } from "lit";
|
|
7
7
|
import { ifDefined as x } from "lit/directives/if-defined.js";
|
|
8
8
|
var k = Object.getOwnPropertyDescriptor;
|
|
@@ -258,4 +258,4 @@ let c = class extends f(b`
|
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
260
|
p([d({ type: String, reflect: !0 })], c.prototype, "src", 2), p([d({ type: String, reflect: !0 })], c.prototype, "fit", 2), p([d({ type: String })], c.prototype, "alt", 2), c = p([u("schmancy-card-media")], c);
|
|
261
|
-
//# sourceMappingURL=media-
|
|
261
|
+
//# sourceMappingURL=media-Flyi23Fn.js.map
|