@mhmo91/schmancy 0.7.7 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/audio.md +241 -0
- package/ai/content-drawer.md +163 -70
- package/ai/lightbox.md +381 -0
- package/ai/typography.md +75 -49
- package/dist/ai/audio.md +241 -0
- package/dist/ai/content-drawer.md +163 -70
- package/dist/ai/lightbox.md +381 -0
- package/dist/ai/typography.md +75 -49
- package/dist/{animated-text-Be290e6l.cjs → animated-text-Bc3qyXjp.cjs} +2 -2
- package/dist/{animated-text-Be290e6l.cjs.map → animated-text-Bc3qyXjp.cjs.map} +1 -1
- package/dist/{animated-text-DuLrWJ6O.js → animated-text-CNx6Pmlo.js} +3 -3
- package/dist/{animated-text-DuLrWJ6O.js.map → animated-text-CNx6Pmlo.js.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-BzjJiNTJ.js → area.component-7mWxekxE.js} +104 -98
- package/dist/area.component-7mWxekxE.js.map +1 -0
- package/dist/area.component-CS_gSutH.cjs +12 -0
- package/dist/area.component-CS_gSutH.cjs.map +1 -0
- package/dist/area.js +1 -1
- package/dist/audio.cjs +2 -0
- package/dist/audio.cjs.map +1 -0
- package/dist/audio.js +9 -0
- package/dist/audio.js.map +1 -0
- package/dist/{autocomplete-FLkd9ju8.js → autocomplete-Ci4jo3Ur.js} +4 -4
- package/dist/{autocomplete-FLkd9ju8.js.map → autocomplete-Ci4jo3Ur.js.map} +1 -1
- package/dist/{autocomplete-CHmGhBNt.cjs → autocomplete-y-IyzH4r.cjs} +2 -2
- package/dist/{autocomplete-CHmGhBNt.cjs.map → autocomplete-y-IyzH4r.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-C8P4lVfa.js → avatar-BdyuuIk7.js} +243 -258
- package/dist/avatar-BdyuuIk7.js.map +1 -0
- package/dist/avatar-DBfJucB9.cjs +273 -0
- package/dist/avatar-DBfJucB9.cjs.map +1 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-Ma6LW-ny.js → boat-CowHieO2.js} +6 -6
- package/dist/{boat-Ma6LW-ny.js.map → boat-CowHieO2.js.map} +1 -1
- package/dist/{boat-kYOUec8f.cjs → boat-DkNUc1UO.cjs} +5 -5
- package/dist/{boat-kYOUec8f.cjs.map → boat-DkNUc1UO.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/charts.cjs +2 -0
- package/dist/charts.cjs.map +1 -0
- package/dist/charts.js +9 -0
- package/dist/charts.js.map +1 -0
- package/dist/{checkbox-x46L-XTG.js → checkbox-BY4Sn8F2.js} +6 -6
- package/dist/{checkbox-x46L-XTG.js.map → checkbox-BY4Sn8F2.js.map} +1 -1
- package/dist/{checkbox-DLZkKaon.cjs → checkbox-BvWcABPr.cjs} +2 -2
- package/dist/{checkbox-DLZkKaon.cjs.map → checkbox-BvWcABPr.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-BsQq77nu.cjs → code-preview-BIFIJigy.cjs} +2 -2
- package/dist/{code-preview-BsQq77nu.cjs.map → code-preview-BIFIJigy.cjs.map} +1 -1
- package/dist/{code-preview-C3DLglSl.js → code-preview-CYjmAxfs.js} +3 -3
- package/dist/{code-preview-C3DLglSl.js.map → code-preview-CYjmAxfs.js.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{context-create-BvxbWTgj.js → context-create-B_S-sD5B.js} +69 -57
- package/dist/context-create-B_S-sD5B.js.map +1 -0
- package/dist/context-create-DTybDbZp.cjs +2 -0
- package/dist/context-create-DTybDbZp.cjs.map +1 -0
- package/dist/date-range-B80Ummtv.cjs +119 -0
- package/dist/date-range-B80Ummtv.cjs.map +1 -0
- package/dist/date-range-BdIqI7LC.js +639 -0
- package/dist/date-range-BdIqI7LC.js.map +1 -0
- package/dist/{date-range-inline-CfDu-lIo.js → date-range-inline-Cnhs9atd.js} +3 -3
- package/dist/{date-range-inline-CfDu-lIo.js.map → date-range-inline-Cnhs9atd.js.map} +1 -1
- package/dist/{date-range-inline-cGptw0hr.cjs → date-range-inline-Df8u6Ecy.cjs} +2 -2
- package/dist/{date-range-inline-cGptw0hr.cjs.map → date-range-inline-Df8u6Ecy.cjs.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-CXFIM6qK.cjs → delay-BWsVHQib.cjs} +2 -2
- package/dist/delay-BWsVHQib.cjs.map +1 -0
- package/dist/{delay-BINGOQ7f.js → delay-CCa9nN4A.js} +45 -45
- package/dist/delay-CCa9nN4A.js.map +1 -0
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/details-Bee5ya0L.js +100 -0
- package/dist/details-Bee5ya0L.js.map +1 -0
- package/dist/details-oaVHXU7U.cjs +55 -0
- package/dist/details-oaVHXU7U.cjs.map +1 -0
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/dialog-service-C86xTS8q.cjs +2 -0
- package/dist/dialog-service-C86xTS8q.cjs.map +1 -0
- package/dist/dialog-service-D9E3jLAR.js +118 -0
- package/dist/dialog-service-D9E3jLAR.js.map +1 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.component-BriB-kFi.cjs +48 -0
- package/dist/dialog.component-BriB-kFi.cjs.map +1 -0
- package/dist/dialog.component-CMUoCC7O.js +145 -0
- package/dist/dialog.component-CMUoCC7O.js.map +1 -0
- package/dist/dialog.js +7 -7
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +11 -10
- package/dist/directives.js.map +1 -1
- package/dist/{divider-Bu6tzwGl.js → divider-B7DBbYFI.js} +3 -3
- package/dist/{divider-Bu6tzwGl.js.map → divider-B7DBbYFI.js.map} +1 -1
- package/dist/{divider-8tk2mDbL.cjs → divider-Dl4TToQZ.cjs} +2 -2
- package/dist/{divider-8tk2mDbL.cjs.map → divider-Dl4TToQZ.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-DFb07S8x.cjs → dropdown-content-C2W7OttQ.cjs} +2 -2
- package/dist/{dropdown-content-DFb07S8x.cjs.map → dropdown-content-C2W7OttQ.cjs.map} +1 -1
- package/dist/{dropdown-content-fVhnEKdY.js → dropdown-content-DzhOtilY.js} +3 -3
- package/dist/{dropdown-content-fVhnEKdY.js.map → dropdown-content-DzhOtilY.js.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-OG52RGiH.js → email-recipients-BWqZKo3m.js} +8 -7
- package/dist/{email-recipients-OG52RGiH.js.map → email-recipients-BWqZKo3m.js.map} +1 -1
- package/dist/{email-recipients-BG3GxJvc.cjs → email-recipients-Bh5VC0rc.cjs} +2 -2
- package/dist/{email-recipients-BG3GxJvc.cjs.map → email-recipients-Bh5VC0rc.cjs.map} +1 -1
- package/dist/emotional-sounds-BRnFhww6.js +234 -0
- package/dist/emotional-sounds-BRnFhww6.js.map +1 -0
- package/dist/emotional-sounds-DVGhmoZf.cjs +2 -0
- package/dist/emotional-sounds-DVGhmoZf.cjs.map +1 -0
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/flex-53G-PJx7.js +183 -0
- package/dist/flex-53G-PJx7.js.map +1 -0
- package/dist/flex-DFSIy0t4.cjs +18 -0
- package/dist/flex-DFSIy0t4.cjs.map +1 -0
- package/dist/{form-tpyd1nsT.js → form-BtRK9bnp.js} +2 -2
- package/dist/{form-tpyd1nsT.js.map → form-BtRK9bnp.js.map} +1 -1
- package/dist/{form-cWJBcwc6.cjs → form-Zq7g2JS8.cjs} +2 -2
- package/dist/{form-cWJBcwc6.cjs.map → form-Zq7g2JS8.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-Mx5CwYUh.js → formField.mixin-2jSL7WF_.js} +2 -2
- package/dist/{formField.mixin-Mx5CwYUh.js.map → formField.mixin-2jSL7WF_.js.map} +1 -1
- package/dist/{formField.mixin-XlN2pAL0.cjs → formField.mixin-DkN2ufR_.cjs} +2 -2
- package/dist/{formField.mixin-XlN2pAL0.cjs.map → formField.mixin-DkN2ufR_.cjs.map} +1 -1
- package/dist/height-CfECBO2j.js +44 -0
- package/dist/height-CfECBO2j.js.map +1 -0
- package/dist/height-Z70qJYJK.cjs +2 -0
- package/dist/height-Z70qJYJK.cjs.map +1 -0
- package/dist/{icon-Y2qLOFqe.js → icon-B5qeYrDu.js} +17 -17
- package/dist/icon-B5qeYrDu.js.map +1 -0
- package/dist/icon-button-BpmGFjaR.cjs +70 -0
- package/dist/icon-button-BpmGFjaR.cjs.map +1 -0
- package/dist/icon-button-HSYaQBNF.js +164 -0
- package/dist/icon-button-HSYaQBNF.js.map +1 -0
- package/dist/icon-pU_cfmpD.cjs +49 -0
- package/dist/icon-pU_cfmpD.cjs.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +275 -250
- package/dist/index.js.map +1 -1
- package/dist/input-8G9YY9qv.cjs +51 -0
- package/dist/input-8G9YY9qv.cjs.map +1 -0
- package/dist/{input-DDCFZ3cr.js → input-BJMF5Fyk.js} +35 -31
- package/dist/input-BJMF5Fyk.js.map +1 -0
- package/dist/{input-chip-Bht9MU9G.cjs → input-chip-CocdqTzr.cjs} +2 -2
- package/dist/{input-chip-Bht9MU9G.cjs.map → input-chip-CocdqTzr.cjs.map} +1 -1
- package/dist/{input-chip-DVE4_1wn.js → input-chip-tbrw56ix.js} +2 -2
- package/dist/{input-chip-DVE4_1wn.js.map → input-chip-tbrw56ix.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json-CvcloKQv.js +51 -0
- package/dist/json-CvcloKQv.js.map +1 -0
- package/dist/json-DPnyOA3K.cjs +12 -0
- package/dist/json-DPnyOA3K.cjs.map +1 -0
- package/dist/json.cjs +2 -0
- package/dist/json.cjs.map +1 -0
- package/dist/json.js +5 -0
- package/dist/json.js.map +1 -0
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +4 -3
- package/dist/layout.js.map +1 -1
- package/dist/lightbox-service-3mHqBKEh.cjs +202 -0
- package/dist/lightbox-service-3mHqBKEh.cjs.map +1 -0
- package/dist/lightbox-service-DxbYZAuv.js +458 -0
- package/dist/lightbox-service-DxbYZAuv.js.map +1 -0
- package/dist/lightbox.cjs +2 -0
- package/dist/lightbox.cjs.map +1 -0
- package/dist/lightbox.js +8 -0
- package/dist/lightbox.js.map +1 -0
- package/dist/{list-BO1gnjmc.js → list-FWXmY-eQ.js} +2 -2
- package/dist/{list-BO1gnjmc.js.map → list-FWXmY-eQ.js.map} +1 -1
- package/dist/{list-Bac329kq.cjs → list-JjR7WOrd.cjs} +2 -2
- package/dist/{list-Bac329kq.cjs.map → list-JjR7WOrd.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-B1WTI3WY.cjs → litElement.mixin-BVBdv0GP.cjs} +2 -2
- package/dist/{litElement.mixin-B1WTI3WY.cjs.map → litElement.mixin-BVBdv0GP.cjs.map} +1 -1
- package/dist/{litElement.mixin-CVje6z-M.js → litElement.mixin-Wcu4yIIs.js} +2 -2
- package/dist/{litElement.mixin-CVje6z-M.js.map → litElement.mixin-Wcu4yIIs.js.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-C1jVMhlF.js → map-Br6xJFxG.js} +2 -2
- package/dist/{map-C1jVMhlF.js.map → map-Br6xJFxG.js.map} +1 -1
- package/dist/{map-BlmS6Zfx.cjs → map-D9R3OCne.cjs} +2 -2
- package/dist/{map-BlmS6Zfx.cjs.map → map-D9R3OCne.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-CNMZbEJe.js → media-BV_1DfcW.js} +2 -2
- package/dist/{media-CNMZbEJe.js.map → media-BV_1DfcW.js.map} +1 -1
- package/dist/{media-CxfrOjie.cjs → media-DibPwAjJ.cjs} +2 -2
- package/dist/{media-CxfrOjie.cjs.map → media-DibPwAjJ.cjs.map} +1 -1
- package/dist/menu-HKqlq99V.js +60 -0
- package/dist/{menu-CUKV4pVJ.js.map → menu-HKqlq99V.js.map} +1 -1
- package/dist/{menu-DEa2K7Pk.cjs → menu-vNrV-Nuq.cjs} +4 -6
- package/dist/{menu-DEa2K7Pk.cjs.map → menu-vNrV-Nuq.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +3 -3
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/{navigation-rail-DXr4NJnN.cjs → navigation-rail-D1o3qDe_.cjs} +15 -17
- package/dist/navigation-rail-D1o3qDe_.cjs.map +1 -0
- package/dist/{navigation-rail-CYKfvZs9.js → navigation-rail-DKXumnmt.js} +30 -32
- package/dist/navigation-rail-DKXumnmt.js.map +1 -0
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/notification-service-B5ljba4P.js +155 -0
- package/dist/notification-service-B5ljba4P.js.map +1 -0
- package/dist/notification-service-ICRT05L0.cjs +19 -0
- package/dist/notification-service-ICRT05L0.cjs.map +1 -0
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +6 -8
- package/dist/{notify-KvHZ-8z9.js → notify-B9CpO1Ru.js} +2 -2
- package/dist/notify-B9CpO1Ru.js.map +1 -0
- package/dist/{notify-VkDx6hMZ.cjs → notify-NX-dl60E.cjs} +2 -2
- package/dist/notify-NX-dl60E.cjs.map +1 -0
- package/dist/{option-DnRdbsTb.js → option-B4JKMrLg.js} +2 -2
- package/dist/{option-DnRdbsTb.js.map → option-B4JKMrLg.js.map} +1 -1
- package/dist/{option-Eh2AXe-Z.cjs → option-epyXLWoY.cjs} +2 -2
- package/dist/{option-Eh2AXe-Z.cjs.map → option-epyXLWoY.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/page-Bmi1QHtq.cjs +20 -0
- package/dist/page-Bmi1QHtq.cjs.map +1 -0
- package/dist/page-BpygEntU.js +48 -0
- package/dist/page-BpygEntU.js.map +1 -0
- package/dist/page.cjs +2 -0
- package/dist/page.cjs.map +1 -0
- package/dist/page.js +5 -0
- package/dist/page.js.map +1 -0
- package/dist/{payment-card-form-8a4Nqqhy.cjs → payment-card-form-3kAXDbXf.cjs} +2 -2
- package/dist/{payment-card-form-8a4Nqqhy.cjs.map → payment-card-form-3kAXDbXf.cjs.map} +1 -1
- package/dist/{payment-card-form-EVQEb5OX.js → payment-card-form-BxkHuSls.js} +3 -3
- package/dist/{payment-card-form-EVQEb5OX.js.map → payment-card-form-BxkHuSls.js.map} +1 -1
- package/dist/pills-C3fIvfn8.js +346 -0
- package/dist/pills-C3fIvfn8.js.map +1 -0
- package/dist/pills-MmHyBGQu.cjs +113 -0
- package/dist/pills-MmHyBGQu.cjs.map +1 -0
- package/dist/progress-0POmJs5o.js +59 -0
- package/dist/progress-0POmJs5o.js.map +1 -0
- package/dist/progress-qx8jtrOA.cjs +35 -0
- package/dist/progress-qx8jtrOA.cjs.map +1 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/qr-scanner-DQq-WLyo.cjs +29 -0
- package/dist/qr-scanner-DQq-WLyo.cjs.map +1 -0
- package/dist/qr-scanner-jwOSrD0N.js +743 -0
- package/dist/qr-scanner-jwOSrD0N.js.map +1 -0
- package/dist/qr-scanner.cjs +2 -0
- package/dist/qr-scanner.cjs.map +1 -0
- package/dist/qr-scanner.js +5 -0
- package/dist/qr-scanner.js.map +1 -0
- package/dist/{radio-button-QCukBJLy.js → radio-button-B0EUK_wg.js} +3 -3
- package/dist/{radio-button-QCukBJLy.js.map → radio-button-B0EUK_wg.js.map} +1 -1
- package/dist/{radio-button-BTdqEOSJ.cjs → radio-button-DraEYR2R.cjs} +2 -2
- package/dist/{radio-button-BTdqEOSJ.cjs.map → radio-button-DraEYR2R.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/ripple-BgJXbNSP.js +124 -0
- package/dist/ripple-BgJXbNSP.js.map +1 -0
- package/dist/ripple-x6sTX02K.cjs +16 -0
- package/dist/ripple-x6sTX02K.cjs.map +1 -0
- package/dist/{schmancy-steps-container-CtwqkRBU.cjs → schmancy-steps-container-B5aiqgMA.cjs} +2 -2
- package/dist/{schmancy-steps-container-CtwqkRBU.cjs.map → schmancy-steps-container-B5aiqgMA.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-NZOamraF.js → schmancy-steps-container-C2StAA5K.js} +3 -3
- package/dist/{schmancy-steps-container-NZOamraF.js.map → schmancy-steps-container-C2StAA5K.js.map} +1 -1
- package/dist/scroll-BqT7bvhu.cjs +27 -0
- package/dist/scroll-BqT7bvhu.cjs.map +1 -0
- package/dist/scroll-Bu-vAg3d.js +87 -0
- package/dist/scroll-Bu-vAg3d.js.map +1 -0
- package/dist/{select-C-Kv7ey_.cjs → select-HiEGJvOX.cjs} +2 -2
- package/dist/select-HiEGJvOX.cjs.map +1 -0
- package/dist/{select-DSTQ-Zau.js → select-i-uKur-W.js} +5 -4
- package/dist/select-i-uKur-W.js.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{selector-hook-Cok22ifx.cjs → selector-hook-9w2auh2O.cjs} +2 -2
- package/dist/{selector-hook-Cok22ifx.cjs.map → selector-hook-9w2auh2O.cjs.map} +1 -1
- package/dist/{selector-hook-l2fe2UO5.js → selector-hook-CHV4kDMd.js} +3 -3
- package/dist/{selector-hook-l2fe2UO5.js.map → selector-hook-CHV4kDMd.js.map} +1 -1
- package/dist/{sheet-DY-z5_tm.js → sheet-B1g7E4dQ.js} +5 -5
- package/dist/{sheet-DY-z5_tm.js.map → sheet-B1g7E4dQ.js.map} +1 -1
- package/dist/{sheet-IzYy3H8n.cjs → sheet-BbrRW0S5.cjs} +2 -2
- package/dist/{sheet-IzYy3H8n.cjs.map → sheet-BbrRW0S5.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-DuVcXyOB.js → sheet.service-4etIM-p6.js} +20 -18
- package/dist/sheet.service-4etIM-p6.js.map +1 -0
- package/dist/sheet.service-BiRZjCdN.cjs +2 -0
- package/dist/sheet.service-BiRZjCdN.cjs.map +1 -0
- package/dist/{slider-CFtbSQ9Y.js → slider-8E3Wad0t.js} +3 -3
- package/dist/{slider-CFtbSQ9Y.js.map → slider-8E3Wad0t.js.map} +1 -1
- package/dist/{slider-CGE_Qeok.cjs → slider-VYnbIRH2.cjs} +2 -2
- package/dist/{slider-CGE_Qeok.cjs.map → slider-VYnbIRH2.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/sound.service-Nza4c6wv.js +102 -0
- package/dist/sound.service-Nza4c6wv.js.map +1 -0
- package/dist/sound.service-eRirZw59.cjs +2 -0
- package/dist/sound.service-eRirZw59.cjs.map +1 -0
- package/dist/{spinner-DAF-hCvQ.js → spinner-CKm13CKN.js} +15 -12
- package/dist/spinner-CKm13CKN.js.map +1 -0
- package/dist/{spinner-CSPJs8CL.cjs → spinner-DJgcI5wr.cjs} +9 -9
- package/dist/spinner-DJgcI5wr.cjs.map +1 -0
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +2 -2
- package/dist/{suggestion-chip-CYu-4xrL.js → suggestion-chip-6njXvvHm.js} +50 -46
- package/dist/suggestion-chip-6njXvvHm.js.map +1 -0
- package/dist/{suggestion-chip-Cj8gwZqq.cjs → suggestion-chip-DdLfqk7o.cjs} +18 -23
- package/dist/suggestion-chip-DdLfqk7o.cjs.map +1 -0
- package/dist/{surface-DTOK-0E4.js → surface-BYU3l_Q2.js} +12 -11
- package/dist/surface-BYU3l_Q2.js.map +1 -0
- package/dist/{surface-VX_THUHv.cjs → surface-DcqbWGub.cjs} +5 -4
- package/dist/surface-DcqbWGub.cjs.map +1 -0
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-BV0-o9Wi.cjs → table-C9fzDjjk.cjs} +2 -2
- package/dist/{table-BV0-o9Wi.cjs.map → table-C9fzDjjk.cjs.map} +1 -1
- package/dist/{table-CkXbXqi9.js → table-Dq12ollZ.js} +3 -3
- package/dist/{table-CkXbXqi9.js.map → table-Dq12ollZ.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-DsfD60U_.cjs → tabs-compatibility-Dwtjfkcf.cjs} +2 -2
- package/dist/{tabs-compatibility-DsfD60U_.cjs.map → tabs-compatibility-Dwtjfkcf.cjs.map} +1 -1
- package/dist/{tabs-compatibility-D_BBW655.js → tabs-compatibility-wnzlHtln.js} +2 -2
- package/dist/{tabs-compatibility-D_BBW655.js.map → tabs-compatibility-wnzlHtln.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-Ddt05Frc.js +67 -0
- package/dist/{tailwind.mixin-wLaKUxf1.js.map → tailwind.mixin-Ddt05Frc.js.map} +1 -1
- package/dist/tailwind.mixin-UijsBrYW.cjs +2 -0
- package/dist/{tailwind.mixin-JFXu3GSo.cjs.map → tailwind.mixin-UijsBrYW.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/textarea-DGmsw1B_.cjs +44 -0
- package/dist/{textarea-B6LDhRed.cjs.map → textarea-DGmsw1B_.cjs.map} +1 -1
- package/dist/{textarea-TeVnUeIJ.js → textarea-Vd3zayJZ.js} +4 -3
- package/dist/{textarea-TeVnUeIJ.js.map → textarea-Vd3zayJZ.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-DxMbO3yP.cjs → theme-button-DG_Xwg9H.cjs} +2 -2
- package/dist/{theme-button-DxMbO3yP.cjs.map → theme-button-DG_Xwg9H.cjs.map} +1 -1
- package/dist/{theme-button-BXXqAu2Y.js → theme-button-rGpEW_xS.js} +2 -2
- package/dist/{theme-button-BXXqAu2Y.js.map → theme-button-rGpEW_xS.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/{theme-controller-boat-CVS77gnH.js → theme-controller-boat-B1fjcqJI.js} +420 -228
- package/dist/theme-controller-boat-B1fjcqJI.js.map +1 -0
- package/dist/theme-controller-boat-pLzK5zxL.cjs +178 -0
- package/dist/theme-controller-boat-pLzK5zxL.cjs.map +1 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +13 -11
- package/dist/{timezone-D7YOMM8G.cjs → timezone-BhUaIAV7.cjs} +2 -2
- package/dist/{timezone-D7YOMM8G.cjs.map → timezone-BhUaIAV7.cjs.map} +1 -1
- package/dist/{timezone-RBV74f85.js → timezone-IQkwr6Oh.js} +3 -3
- package/dist/{timezone-RBV74f85.js.map → timezone-IQkwr6Oh.js.map} +1 -1
- package/dist/{tooltip-DssL6Qfx.js → tooltip-CwaiZC8f.js} +2 -2
- package/dist/{tooltip-DssL6Qfx.js.map → tooltip-CwaiZC8f.js.map} +1 -1
- package/dist/{tooltip-BH_RLoZI.cjs → tooltip-iEvxKg8g.cjs} +2 -2
- package/dist/{tooltip-BH_RLoZI.cjs.map → tooltip-iEvxKg8g.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-7Zz1sJKl.cjs → tree-Bclu6uvv.cjs} +2 -2
- package/dist/{tree-7Zz1sJKl.cjs.map → tree-Bclu6uvv.cjs.map} +1 -1
- package/dist/{tree-C33t9-0j.js → tree-D9EbEsxn.js} +2 -2
- package/dist/{tree-C33t9-0j.js.map → tree-D9EbEsxn.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-Dt1Js2lP.js → typewriter-BjDPgRlj.js} +5 -5
- package/dist/{typewriter-Dt1Js2lP.js.map → typewriter-BjDPgRlj.js.map} +1 -1
- package/dist/{typewriter-WbYqfXO7.cjs → typewriter-Bscwd-36.cjs} +4 -4
- package/dist/{typewriter-WbYqfXO7.cjs.map → typewriter-Bscwd-36.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-DdG9aEAg.js → typography-CConBBFH.js} +13 -53
- package/dist/typography-CConBBFH.js.map +1 -0
- package/dist/{typography-Ck-OdI83.cjs → typography-DLGT3DGz.cjs} +3 -46
- package/dist/typography-DLGT3DGz.cjs.map +1 -0
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/mixins/tailwind.css +37 -6
- package/package.json +21 -20
- package/types/src/area/area.service.d.ts +1 -1
- package/types/src/area/router.types.d.ts +1 -0
- package/types/src/audio/emotional-sounds.d.ts +122 -0
- package/types/src/audio/index.d.ts +30 -0
- package/types/src/audio/sound.service.d.ts +111 -0
- package/types/src/avatar.d.ts +10 -1
- package/types/src/busy/spinner.d.ts +6 -1
- package/types/src/button/button.d.ts +15 -2
- package/types/src/button/icon-button.d.ts +1 -1
- package/types/src/charts/area-chart.d.ts +58 -0
- package/types/src/charts/index.d.ts +4 -0
- package/types/src/charts/pills.d.ts +51 -0
- package/types/src/charts/types.d.ts +62 -0
- package/types/src/charts/utils.d.ts +28 -0
- package/types/src/checkbox/checkbox.d.ts +3 -2
- package/types/src/chips/chips.d.ts +2 -0
- package/types/src/content-drawer/drawer.service.d.ts +1 -7
- package/types/src/date-range/date-range-dialog.d.ts +16 -0
- package/types/src/date-range/date-range.d.ts +1 -1
- package/types/src/details/details.d.ts +3 -7
- package/types/src/dialog/dailog.d.ts +1 -5
- package/types/src/dialog/dialog-base.mixin.d.ts +26 -0
- package/types/src/dialog/dialog-service.d.ts +3 -66
- package/types/src/dialog/dialog.component.d.ts +63 -30
- package/types/src/dialog/index.d.ts +1 -3
- package/types/src/directives/height.d.ts +11 -6
- package/types/src/icons/icon.d.ts +17 -0
- package/types/src/index.d.ts +6 -0
- package/types/src/input/input.d.ts +13 -9
- package/types/src/json/index.d.ts +1 -0
- package/types/src/json/json.d.ts +15 -0
- package/types/src/lightbox/flip-directive.d.ts +29 -0
- package/types/src/lightbox/flip.directive.d.ts +22 -0
- package/types/src/lightbox/index.d.ts +4 -0
- package/types/src/lightbox/lightbox-service.d.ts +24 -0
- package/types/src/lightbox/lightbox.d.ts +34 -0
- package/types/src/lightbox/lightbox.directive.d.ts +30 -0
- package/types/src/nav-drawer/appbar.d.ts +0 -5
- package/types/src/nav-drawer/drawer.d.ts +1 -32
- package/types/src/notification/index.d.ts +1 -3
- package/types/src/notification/notification-service.d.ts +13 -1
- package/types/src/notification/notification.d.ts +13 -12
- package/types/src/notification/notify.d.ts +1 -1
- package/types/src/page/index.d.ts +1 -0
- package/types/src/page/page.d.ts +31 -0
- package/types/src/progress/progress.d.ts +2 -2
- package/types/src/qr-scanner/index.d.ts +1 -0
- package/types/src/qr-scanner/qr-scanner.d.ts +26 -0
- package/types/src/select/select.d.ts +1 -1
- package/types/src/theme/index.d.ts +1 -0
- package/types/src/theme/theme-audio-player.d.ts +100 -0
- package/types/src/theme/theme-controller-boat.d.ts +1 -0
- package/types/src/theme/theme.component.d.ts +1 -1
- package/types/src/types/index.d.ts +1 -0
- package/types/src/types/mood-audio.types.d.ts +173 -0
- package/types/src/typography/typography.d.ts +1 -0
- package/dist/area.component-BzjJiNTJ.js.map +0 -1
- package/dist/area.component-FL_IUylM.cjs +0 -12
- package/dist/area.component-FL_IUylM.cjs.map +0 -1
- package/dist/avatar-B_uJN9WV.cjs +0 -288
- package/dist/avatar-B_uJN9WV.cjs.map +0 -1
- package/dist/avatar-C8P4lVfa.js.map +0 -1
- package/dist/context-create-BJkkLr1D.cjs +0 -2
- package/dist/context-create-BJkkLr1D.cjs.map +0 -1
- package/dist/context-create-BvxbWTgj.js.map +0 -1
- package/dist/date-range-Cm0TCfwu.js +0 -664
- package/dist/date-range-Cm0TCfwu.js.map +0 -1
- package/dist/date-range-Cy97kOP_.cjs +0 -134
- package/dist/date-range-Cy97kOP_.cjs.map +0 -1
- package/dist/delay-BINGOQ7f.js.map +0 -1
- package/dist/delay-CXFIM6qK.cjs.map +0 -1
- package/dist/details-CLRikV4s.cjs +0 -64
- package/dist/details-CLRikV4s.cjs.map +0 -1
- package/dist/details-bgq2X_hO.js +0 -115
- package/dist/details-bgq2X_hO.js.map +0 -1
- package/dist/dialog-content-B59ekS_y.cjs +0 -85
- package/dist/dialog-content-B59ekS_y.cjs.map +0 -1
- package/dist/dialog-content-Cu7fqN8Y.js +0 -256
- package/dist/dialog-content-Cu7fqN8Y.js.map +0 -1
- package/dist/dialog-service-B4nR8Em5.cjs +0 -2
- package/dist/dialog-service-B4nR8Em5.cjs.map +0 -1
- package/dist/dialog-service-Bege4HF4.js +0 -140
- package/dist/dialog-service-Bege4HF4.js.map +0 -1
- package/dist/flex-CYQU6Pf8.js +0 -260
- package/dist/flex-CYQU6Pf8.js.map +0 -1
- package/dist/flex-DytMcHmq.cjs +0 -43
- package/dist/flex-DytMcHmq.cjs.map +0 -1
- package/dist/icon-C8Q_XMtJ.cjs +0 -49
- package/dist/icon-C8Q_XMtJ.cjs.map +0 -1
- package/dist/icon-Y2qLOFqe.js.map +0 -1
- package/dist/icon-button-CJ6AVTv9.js +0 -156
- package/dist/icon-button-CJ6AVTv9.js.map +0 -1
- package/dist/icon-button-IdG1NVgA.cjs +0 -65
- package/dist/icon-button-IdG1NVgA.cjs.map +0 -1
- package/dist/input-DDCFZ3cr.js.map +0 -1
- package/dist/input-UyknNHNr.cjs +0 -51
- package/dist/input-UyknNHNr.cjs.map +0 -1
- package/dist/menu-CUKV4pVJ.js +0 -61
- package/dist/navigation-rail-CYKfvZs9.js.map +0 -1
- package/dist/navigation-rail-DXr4NJnN.cjs.map +0 -1
- package/dist/notification-service-CZ56fXew.js +0 -532
- package/dist/notification-service-CZ56fXew.js.map +0 -1
- package/dist/notification-service-DQGs9O0f.cjs +0 -143
- package/dist/notification-service-DQGs9O0f.cjs.map +0 -1
- package/dist/notify-KvHZ-8z9.js.map +0 -1
- package/dist/notify-VkDx6hMZ.cjs.map +0 -1
- package/dist/progress-D5kgn2Fg.js +0 -58
- package/dist/progress-D5kgn2Fg.js.map +0 -1
- package/dist/progress-yFxoJDYf.cjs +0 -35
- package/dist/progress-yFxoJDYf.cjs.map +0 -1
- package/dist/ripple-QoNZUUw_.js +0 -148
- package/dist/ripple-QoNZUUw_.js.map +0 -1
- package/dist/ripple-Ujq_REH4.cjs +0 -16
- package/dist/ripple-Ujq_REH4.cjs.map +0 -1
- package/dist/select-C-Kv7ey_.cjs.map +0 -1
- package/dist/select-DSTQ-Zau.js.map +0 -1
- package/dist/sheet.service-BNz-ird-.cjs +0 -2
- package/dist/sheet.service-BNz-ird-.cjs.map +0 -1
- package/dist/sheet.service-DuVcXyOB.js.map +0 -1
- package/dist/spinner-CSPJs8CL.cjs.map +0 -1
- package/dist/spinner-DAF-hCvQ.js.map +0 -1
- package/dist/suggestion-chip-CYu-4xrL.js.map +0 -1
- package/dist/suggestion-chip-Cj8gwZqq.cjs.map +0 -1
- package/dist/surface-DTOK-0E4.js.map +0 -1
- package/dist/surface-VX_THUHv.cjs.map +0 -1
- package/dist/tailwind.mixin-JFXu3GSo.cjs +0 -2
- package/dist/tailwind.mixin-wLaKUxf1.js +0 -67
- package/dist/textarea-B6LDhRed.cjs +0 -44
- package/dist/theme-controller-boat-CCBNOGxF.cjs +0 -64
- package/dist/theme-controller-boat-CCBNOGxF.cjs.map +0 -1
- package/dist/theme-controller-boat-CVS77gnH.js.map +0 -1
- package/dist/typography-Ck-OdI83.cjs.map +0 -1
- package/dist/typography-DdG9aEAg.js.map +0 -1
- package/types/src/notification/notification-audio-generator.d.ts +0 -45
- package/types/src/notification/notification-audio.d.ts +0 -79
- package/types/src/notification/notification-container.d.ts +0 -48
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { css as z, html as u } from "lit";
|
|
2
|
+
import { property as l, state as f, customElement as j } from "lit/decorators.js";
|
|
3
|
+
import { createRef as L, ref as R } from "lit/directives/ref.js";
|
|
4
|
+
import "rxjs";
|
|
5
|
+
import "rxjs/operators";
|
|
6
|
+
import "lit/directives/class-map.js";
|
|
7
|
+
import "lit/directives/style-map.js";
|
|
8
|
+
import "./tailwind.mixin-Ddt05Frc.js";
|
|
9
|
+
import { $ as W } from "./litElement.mixin-Wcu4yIIs.js";
|
|
10
|
+
import { repeat as S } from "lit/directives/repeat.js";
|
|
11
|
+
function U(e, t, s, a, i) {
|
|
12
|
+
const r = i * i, h = r * i;
|
|
13
|
+
return { x: 0.5 * (2 * t.x + (-e.x + s.x) * i + (2 * e.x - 5 * t.x + 4 * s.x - a.x) * r + (-e.x + 3 * t.x - 3 * s.x + a.x) * h), y: 0.5 * (2 * t.y + (-e.y + s.y) * i + (2 * e.y - 5 * t.y + 4 * s.y - a.y) * r + (-e.y + 3 * t.y - 3 * s.y + a.y) * h) };
|
|
14
|
+
}
|
|
15
|
+
function F(e, t) {
|
|
16
|
+
if (e.startsWith("rgb")) {
|
|
17
|
+
const a = e.match(/[\d.]+/g);
|
|
18
|
+
if (a && a.length >= 3) return `rgba(${a[0]}, ${a[1]}, ${a[2]}, ${t})`;
|
|
19
|
+
}
|
|
20
|
+
let s = e.replace("#", "");
|
|
21
|
+
return s.length === 3 && (s = s.split("").map((a) => a + a).join("")), `rgba(${parseInt(s.substring(0, 2), 16)}, ${parseInt(s.substring(2, 4), 16)}, ${parseInt(s.substring(4, 6), 16)}, ${t})`;
|
|
22
|
+
}
|
|
23
|
+
function H(e) {
|
|
24
|
+
return 1 - Math.pow(1 - e, 3);
|
|
25
|
+
}
|
|
26
|
+
var K = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, p = (e, t, s, a) => {
|
|
27
|
+
for (var i, r = a > 1 ? void 0 : a ? Q(t, s) : t, h = e.length - 1; h >= 0; h--) (i = e[h]) && (r = (a ? i(t, s, r) : i(r)) || r);
|
|
28
|
+
return a && r && K(t, s, r), r;
|
|
29
|
+
};
|
|
30
|
+
let c = class extends W(z`
|
|
31
|
+
:host {
|
|
32
|
+
display: block;
|
|
33
|
+
}
|
|
34
|
+
`) {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments), this.data = [], this.height = 200, this.showGrid = !0, this.showLabels = !0, this.showTooltip = !0, this.peakCount = 3, this.animationDuration = 800, this.animated = !0, this.valuePrefix = "", this.valueSuffix = "", this.valueDecimals = 2, this.theme = {}, this.tooltipData = { visible: !1, x: 0, y: 0, label: "", value: 0 }, this.animationProgress = 0, this.isVisible = !1, this.canvasRef = L(), this.containerRef = L(), this.animationFrameId = null, this.observer = null, this.processedData = [], this.resizeObserver = null, this.handlePointerMove = (e) => {
|
|
37
|
+
if (this.processedData.length === 0 || !this.showTooltip) return;
|
|
38
|
+
const t = this.canvasRef.value;
|
|
39
|
+
if (!t) return;
|
|
40
|
+
const s = t.getBoundingClientRect(), a = e.clientX - s.left;
|
|
41
|
+
let i = null, r = 1 / 0;
|
|
42
|
+
this.processedData.forEach((h) => {
|
|
43
|
+
const y = Math.abs(h.x - a);
|
|
44
|
+
y < r && (r = y, i = h);
|
|
45
|
+
}), this.tooltipData = i && r < 30 ? { visible: !0, x: i.x, y: i.y, label: i.label, value: i.value, metadata: i.metadata } : { ...this.tooltipData, visible: !1 };
|
|
46
|
+
}, this.handlePointerLeave = () => {
|
|
47
|
+
this.tooltipData = { ...this.tooltipData, visible: !1 };
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
connectedCallback() {
|
|
51
|
+
super.connectedCallback(), this.setupIntersectionObserver();
|
|
52
|
+
}
|
|
53
|
+
disconnectedCallback() {
|
|
54
|
+
super.disconnectedCallback(), this.cleanup();
|
|
55
|
+
}
|
|
56
|
+
cleanup() {
|
|
57
|
+
this.animationFrameId !== null && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null), this.observer && (this.observer.disconnect(), this.observer = null), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null);
|
|
58
|
+
}
|
|
59
|
+
setupIntersectionObserver() {
|
|
60
|
+
this.observer = new IntersectionObserver((e) => {
|
|
61
|
+
const t = e[0];
|
|
62
|
+
t.isIntersecting && !this.isVisible ? (this.isVisible = !0, this.animated ? this.startAnimation() : (this.animationProgress = 1, this.drawChart())) : t.isIntersecting || (this.isVisible = !1, this.animationFrameId !== null && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null));
|
|
63
|
+
}, { threshold: 0.1 });
|
|
64
|
+
}
|
|
65
|
+
updated(e) {
|
|
66
|
+
super.updated(e), this.containerRef.value && this.observer && this.observer.observe(this.containerRef.value), this.canvasRef.value && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(() => {
|
|
67
|
+
this.drawChart();
|
|
68
|
+
}), this.resizeObserver.observe(this.canvasRef.value)), e.has("data") && this.isVisible && (this.animated ? (this.animationProgress = 0, this.startAnimation()) : (this.animationProgress = 1, this.drawChart())), (e.has("theme") || e.has("showGrid") || e.has("showLabels") || e.has("peakCount")) && this.isVisible && this.drawChart();
|
|
69
|
+
}
|
|
70
|
+
startAnimation() {
|
|
71
|
+
const e = performance.now(), t = this.animationDuration, s = (a) => {
|
|
72
|
+
const i = a - e, r = Math.min(i / t, 1);
|
|
73
|
+
this.animationProgress = H(r), this.drawChart(), r < 1 && this.isVisible && (this.animationFrameId = requestAnimationFrame(s));
|
|
74
|
+
};
|
|
75
|
+
this.animationFrameId = requestAnimationFrame(s);
|
|
76
|
+
}
|
|
77
|
+
processData() {
|
|
78
|
+
if (!this.data || this.data.length === 0) return [];
|
|
79
|
+
const e = [...this.data].sort((s, a) => a.value - s.value), t = new Set(e.slice(0, this.peakCount).map((s) => s.label));
|
|
80
|
+
return this.data.map((s) => ({ ...s, x: 0, y: 0, isPeak: t.has(s.label) }));
|
|
81
|
+
}
|
|
82
|
+
getThemeValue(e, t) {
|
|
83
|
+
return this.theme[e] ?? t;
|
|
84
|
+
}
|
|
85
|
+
drawChart() {
|
|
86
|
+
const e = this.canvasRef.value;
|
|
87
|
+
if (!e) return;
|
|
88
|
+
const t = e.getContext("2d");
|
|
89
|
+
if (!t) return;
|
|
90
|
+
const s = window.devicePixelRatio || 1, a = e.getBoundingClientRect(), i = a.width, r = a.height;
|
|
91
|
+
e.width = i * s, e.height = r * s, t.scale(s, s), t.clearRect(0, 0, i, r);
|
|
92
|
+
const h = this.processData();
|
|
93
|
+
if (h.length === 0) return;
|
|
94
|
+
const y = 20, w = 20, O = this.showLabels ? 40 : 20, P = 20, M = i - P - w, b = r - y - O, E = Math.max(...h.map((o) => o.value), 1), n = h.map((o, g) => ({ ...o, x: P + (h.length > 1 ? g / (h.length - 1) * M : M / 2), y: y + b - o.value / E * b }));
|
|
95
|
+
this.processedData = n;
|
|
96
|
+
const N = getComputedStyle(this).getPropertyValue("--schmancy-sys-color-primary").trim() || "#6750A4", x = this.getThemeValue("primaryColor", N), [G, q] = this.getThemeValue("gradientOpacity", [0.4, 0.05]), X = this.getThemeValue("strokeWidth", 2), D = this.getThemeValue("pointRadius", 4), T = this.getThemeValue("peakRadius", 6);
|
|
97
|
+
if (this.showGrid) {
|
|
98
|
+
t.strokeStyle = "rgba(128, 128, 128, 0.15)", t.lineWidth = 1, t.setLineDash([4, 4]);
|
|
99
|
+
for (let o = 1; o <= 3; o++) {
|
|
100
|
+
const g = y + b * o / 4;
|
|
101
|
+
t.beginPath(), t.moveTo(P, g), t.lineTo(i - w, g), t.stroke();
|
|
102
|
+
}
|
|
103
|
+
t.setLineDash([]);
|
|
104
|
+
}
|
|
105
|
+
const k = new Path2D(), v = new Path2D();
|
|
106
|
+
if (n.length >= 2) {
|
|
107
|
+
v.moveTo(n[0].x, y + b), k.moveTo(n[0].x, n[0].y), v.lineTo(n[0].x, n[0].y);
|
|
108
|
+
for (let o = 0; o < n.length - 1; o++) {
|
|
109
|
+
const g = n[Math.max(0, o - 1)], $ = n[o], V = n[Math.min(n.length - 1, o + 1)], J = n[Math.min(n.length - 1, o + 2)], A = 16;
|
|
110
|
+
for (let I = 1; I <= A; I++) {
|
|
111
|
+
const C = U(g, $, V, J, I / A);
|
|
112
|
+
k.lineTo(C.x, C.y), v.lineTo(C.x, C.y);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
v.lineTo(n[n.length - 1].x, y + b), v.closePath();
|
|
116
|
+
} else n.length === 1 && k.arc(n[0].x, n[0].y, D, 0, 2 * Math.PI);
|
|
117
|
+
if (t.save(), t.beginPath(), t.rect(0, 0, P + M * this.animationProgress, r), t.clip(), n.length >= 2) {
|
|
118
|
+
const o = t.createLinearGradient(0, y, 0, y + b);
|
|
119
|
+
o.addColorStop(0, F(x, G)), o.addColorStop(1, F(x, q)), t.fillStyle = o, t.fill(v);
|
|
120
|
+
}
|
|
121
|
+
if (t.strokeStyle = x, t.lineWidth = X, t.lineCap = "round", t.lineJoin = "round", t.stroke(k), n.forEach((o, g) => {
|
|
122
|
+
if (g / (n.length - 1 || 1) * this.animationProgress < g / (n.length || 1)) return;
|
|
123
|
+
const $ = o.isPeak ? T - 1 : D - 1, V = o.isPeak ? T + 4 : D + 2;
|
|
124
|
+
o.isPeak && (t.beginPath(), t.arc(o.x, o.y, V, 0, 2 * Math.PI), t.fillStyle = F(x, 0.2), t.fill()), t.beginPath(), t.arc(o.x, o.y, $, 0, 2 * Math.PI), t.fillStyle = x, t.fill(), o.isPeak && (t.beginPath(), t.arc(o.x, o.y, 2, 0, 2 * Math.PI), t.fillStyle = "white", t.fill());
|
|
125
|
+
}), t.restore(), this.showLabels && n.length > 0) {
|
|
126
|
+
t.fillStyle = "rgba(128, 128, 128, 0.8)", t.font = "11px system-ui, sans-serif", t.textAlign = "center", t.textBaseline = "top";
|
|
127
|
+
const o = i < 400 ? 3 : i < 600 ? 2 : 1;
|
|
128
|
+
n.forEach((g, $) => {
|
|
129
|
+
$ % o === 0 && t.fillText(g.label, g.x, r - O + 8);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
formatValue(e) {
|
|
134
|
+
const t = e.toFixed(this.valueDecimals);
|
|
135
|
+
return `${this.valuePrefix}${t}${this.valueSuffix}`;
|
|
136
|
+
}
|
|
137
|
+
renderMetadata() {
|
|
138
|
+
return this.tooltipData.metadata ? Object.entries(this.tooltipData.metadata).map(([e, t]) => u`
|
|
139
|
+
<schmancy-typography type="body" token="sm" class="text-surface-onVariant">
|
|
140
|
+
${e}: ${String(t)}
|
|
141
|
+
</schmancy-typography>
|
|
142
|
+
`) : "";
|
|
143
|
+
}
|
|
144
|
+
render() {
|
|
145
|
+
return this.data && this.data.length !== 0 ? u`
|
|
146
|
+
<div ${R(this.containerRef)} class="relative">
|
|
147
|
+
<div class="relative" style="height: ${this.height}px; touch-action: pan-y;">
|
|
148
|
+
<canvas
|
|
149
|
+
${R(this.canvasRef)}
|
|
150
|
+
class="w-full h-full"
|
|
151
|
+
style="display: block;"
|
|
152
|
+
@pointermove=${this.handlePointerMove}
|
|
153
|
+
@pointerleave=${this.handlePointerLeave}
|
|
154
|
+
></canvas>
|
|
155
|
+
|
|
156
|
+
<!-- Tooltip -->
|
|
157
|
+
${this.showTooltip ? u`
|
|
158
|
+
<div
|
|
159
|
+
class="absolute pointer-events-none transition-opacity duration-150 ${this.tooltipData.visible ? "opacity-100" : "opacity-0"}"
|
|
160
|
+
style="
|
|
161
|
+
left: ${this.tooltipData.x}px;
|
|
162
|
+
top: ${this.tooltipData.y - 60}px;
|
|
163
|
+
transform: translateX(-50%);
|
|
164
|
+
"
|
|
165
|
+
>
|
|
166
|
+
<schmancy-surface elevation="3" rounded="all" class="px-3 py-2 min-w-max">
|
|
167
|
+
<schmancy-typography type="label" token="sm" class="text-surface-onVariant">
|
|
168
|
+
${this.tooltipData.label}
|
|
169
|
+
</schmancy-typography>
|
|
170
|
+
<schmancy-typography type="title" token="md" class="text-surface-on font-semibold">
|
|
171
|
+
${this.formatValue(this.tooltipData.value)}
|
|
172
|
+
</schmancy-typography>
|
|
173
|
+
${this.renderMetadata()}
|
|
174
|
+
</schmancy-surface>
|
|
175
|
+
</div>
|
|
176
|
+
` : ""}
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
` : u``;
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
p([l({ type: Array })], c.prototype, "data", 2), p([l({ type: Number })], c.prototype, "height", 2), p([l({ type: Boolean })], c.prototype, "showGrid", 2), p([l({ type: Boolean })], c.prototype, "showLabels", 2), p([l({ type: Boolean })], c.prototype, "showTooltip", 2), p([l({ type: Number })], c.prototype, "peakCount", 2), p([l({ type: Number })], c.prototype, "animationDuration", 2), p([l({ type: Boolean })], c.prototype, "animated", 2), p([l({ type: String })], c.prototype, "valuePrefix", 2), p([l({ type: String })], c.prototype, "valueSuffix", 2), p([l({ type: Number })], c.prototype, "valueDecimals", 2), p([l({ type: Object })], c.prototype, "theme", 2), p([f()], c.prototype, "tooltipData", 2), p([f()], c.prototype, "animationProgress", 2), p([f()], c.prototype, "isVisible", 2), c = p([j("schmancy-area-chart")], c);
|
|
183
|
+
var Y = Object.defineProperty, Z = Object.getOwnPropertyDescriptor, m = (e, t, s, a) => {
|
|
184
|
+
for (var i, r = a > 1 ? void 0 : a ? Z(t, s) : t, h = e.length - 1; h >= 0; h--) (i = e[h]) && (r = (a ? i(t, s, r) : i(r)) || r);
|
|
185
|
+
return a && r && Y(t, s, r), r;
|
|
186
|
+
};
|
|
187
|
+
const B = ["bg-primary", "bg-secondary", "bg-tertiary", "bg-success", "bg-warning", "bg-error", "bg-primary/70", "bg-secondary/70", "bg-tertiary/70", "bg-success/70", "bg-warning/70", "bg-error/70", "bg-primary/40", "bg-secondary/40", "bg-tertiary/40"];
|
|
188
|
+
let d = class extends W(z`
|
|
189
|
+
:host {
|
|
190
|
+
display: block;
|
|
191
|
+
}
|
|
192
|
+
`) {
|
|
193
|
+
constructor() {
|
|
194
|
+
super(...arguments), this.data = [], this.valuePrefix = "", this.valueSuffix = "", this.valueDecimals = 2, this.showMedals = !0, this.showLegend = !0, this.animationDuration = 500, this.animated = !0, this.labelWidth = "w-14", this.valueWidth = "w-20", this.animationProgress = 0, this.isVisible = !1, this.categoryColorMap = /* @__PURE__ */ new Map(), this.observer = null, this.animationFrameId = null;
|
|
195
|
+
}
|
|
196
|
+
connectedCallback() {
|
|
197
|
+
super.connectedCallback(), this.setupIntersectionObserver();
|
|
198
|
+
}
|
|
199
|
+
disconnectedCallback() {
|
|
200
|
+
super.disconnectedCallback(), this.cleanup();
|
|
201
|
+
}
|
|
202
|
+
cleanup() {
|
|
203
|
+
this.animationFrameId !== null && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null), this.observer && (this.observer.disconnect(), this.observer = null);
|
|
204
|
+
}
|
|
205
|
+
setupIntersectionObserver() {
|
|
206
|
+
this.observer = new IntersectionObserver((e) => {
|
|
207
|
+
e[0].isIntersecting && !this.isVisible && (this.isVisible = !0, this.animated ? this.startAnimation() : this.animationProgress = 1);
|
|
208
|
+
}, { threshold: 0.1 });
|
|
209
|
+
}
|
|
210
|
+
firstUpdated() {
|
|
211
|
+
this.observer && this.observer.observe(this);
|
|
212
|
+
}
|
|
213
|
+
updated(e) {
|
|
214
|
+
super.updated(e), e.has("data") && this.isVisible && this.animated && (this.animationProgress = 0, this.startAnimation());
|
|
215
|
+
}
|
|
216
|
+
startAnimation() {
|
|
217
|
+
const e = performance.now(), t = this.animationDuration, s = (a) => {
|
|
218
|
+
const i = a - e, r = Math.min(i / t, 1);
|
|
219
|
+
this.animationProgress = 1 - Math.pow(1 - r, 3), r < 1 && this.isVisible && (this.animationFrameId = requestAnimationFrame(s));
|
|
220
|
+
};
|
|
221
|
+
this.animationFrameId = requestAnimationFrame(s);
|
|
222
|
+
}
|
|
223
|
+
initializeCategoryColors() {
|
|
224
|
+
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
225
|
+
this.data.forEach((i) => {
|
|
226
|
+
i.segments && i.segments.forEach((r) => {
|
|
227
|
+
e.set(r.label, (e.get(r.label) || 0) + r.value), r.color && !t.has(r.label) && t.set(r.label, r.color);
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
const s = Array.from(e.entries()).sort((i, r) => r[1] - i[1]).map(([i]) => i);
|
|
231
|
+
this.categoryColorMap.clear();
|
|
232
|
+
let a = 0;
|
|
233
|
+
s.forEach((i) => {
|
|
234
|
+
t.has(i) ? this.categoryColorMap.set(i, t.get(i)) : (this.categoryColorMap.set(i, B[a % B.length]), a++);
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
getSegmentColor(e) {
|
|
238
|
+
return e.color ? e.color : this.categoryColorMap.get(e.label) || "bg-primary";
|
|
239
|
+
}
|
|
240
|
+
formatValue(e) {
|
|
241
|
+
const t = e.toFixed(this.valueDecimals);
|
|
242
|
+
return `${this.valuePrefix}${t}${this.valueSuffix}`;
|
|
243
|
+
}
|
|
244
|
+
getMedalEmoji(e) {
|
|
245
|
+
return this.showMedals && e ? e === 1 ? "🥇" : e === 2 ? "🥈" : e === 3 ? "🥉" : "" : "";
|
|
246
|
+
}
|
|
247
|
+
getMaxValue() {
|
|
248
|
+
return this.data.length === 0 ? 0 : Math.max(...this.data.map((e) => e.value), 1);
|
|
249
|
+
}
|
|
250
|
+
renderBar(e, t) {
|
|
251
|
+
const s = (t > 0 ? e.value / t * 100 : 0) * this.animationProgress;
|
|
252
|
+
if (!e.segments || e.segments.length === 0) {
|
|
253
|
+
const a = e.isPeak ? "bg-success" : e.isLow ? "bg-tertiary opacity-70" : e.value === 0 ? "bg-tertiary/40" : "bg-primary";
|
|
254
|
+
return u`
|
|
255
|
+
<div
|
|
256
|
+
class="${a} h-full transition-all rounded-full"
|
|
257
|
+
style="width: ${Math.max(s, e.value > 0 ? 2 : 0)}%; transition-duration: ${this.animated ? "0ms" : "300ms"}"
|
|
258
|
+
title="${this.formatValue(e.value)}"
|
|
259
|
+
></div>
|
|
260
|
+
`;
|
|
261
|
+
}
|
|
262
|
+
return u`
|
|
263
|
+
<div
|
|
264
|
+
class="h-full flex"
|
|
265
|
+
style="width: ${Math.max(s, 2)}%; transition-duration: ${this.animated ? "0ms" : "300ms"}"
|
|
266
|
+
>
|
|
267
|
+
${S(e.segments, (a) => a.label, (a, i) => {
|
|
268
|
+
const r = e.value > 0 ? a.value / e.value * 100 : 0, h = i > 0 ? "ml-px" : "", y = e.isPeak ? "brightness-110" : "", w = this.getSegmentColor(a);
|
|
269
|
+
return u`
|
|
270
|
+
<div
|
|
271
|
+
class="${w} ${h} ${y} h-full transition-all
|
|
272
|
+
${i === 0 ? "rounded-l-full" : ""}
|
|
273
|
+
${i === e.segments.length - 1 ? "rounded-r-full" : ""}"
|
|
274
|
+
style="width: ${r}%"
|
|
275
|
+
title="${a.label}: ${this.formatValue(a.value)}"
|
|
276
|
+
></div>
|
|
277
|
+
`;
|
|
278
|
+
})}
|
|
279
|
+
</div>
|
|
280
|
+
`;
|
|
281
|
+
}
|
|
282
|
+
renderLegend() {
|
|
283
|
+
return this.showLegend && this.categoryColorMap.size !== 0 ? u`
|
|
284
|
+
<div class="flex flex-wrap gap-3 mt-4 pt-4 border-t border-outline-variant">
|
|
285
|
+
${S(Array.from(this.categoryColorMap.entries()), ([e]) => e, ([e, t]) => u`
|
|
286
|
+
<div class="flex items-center gap-1.5">
|
|
287
|
+
<div class="${t} w-3 h-3 rounded-sm"></div>
|
|
288
|
+
<schmancy-typography type="label" token="sm" class="text-surface-onVariant">
|
|
289
|
+
${e}
|
|
290
|
+
</schmancy-typography>
|
|
291
|
+
</div>
|
|
292
|
+
`)}
|
|
293
|
+
</div>
|
|
294
|
+
` : u``;
|
|
295
|
+
}
|
|
296
|
+
render() {
|
|
297
|
+
if (this.initializeCategoryColors(), !this.data || this.data.length === 0) return u``;
|
|
298
|
+
const e = this.getMaxValue();
|
|
299
|
+
return u`
|
|
300
|
+
<div class="space-y-1">
|
|
301
|
+
${S(this.data, (t) => t.label, (t) => {
|
|
302
|
+
const s = t.isPeak ? "bg-success/10 rounded-lg" : "", a = t.isPeak ? "text-success font-bold" : "text-surface-on";
|
|
303
|
+
return u`
|
|
304
|
+
<div class="flex items-center gap-3 py-2 px-2 ${s}">
|
|
305
|
+
<!-- Label -->
|
|
306
|
+
<div class="${this.labelWidth} shrink-0 text-right">
|
|
307
|
+
<schmancy-typography type="label" token="md" class="${a}">
|
|
308
|
+
${t.label}
|
|
309
|
+
</schmancy-typography>
|
|
310
|
+
</div>
|
|
311
|
+
|
|
312
|
+
<!-- Medal -->
|
|
313
|
+
<div class="w-6 shrink-0 text-center">
|
|
314
|
+
${t.isPeak || t.rank && t.rank <= 3 ? u`<span class="text-sm">${this.getMedalEmoji(t.rank)}</span>` : ""}
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<!-- Bar -->
|
|
318
|
+
<div class="flex-1 h-6 bg-secondary/15 rounded-full overflow-hidden">
|
|
319
|
+
${this.renderBar(t, e)}
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<!-- Value -->
|
|
323
|
+
<div class="${this.valueWidth} shrink-0 text-right">
|
|
324
|
+
<schmancy-typography type="label" token="md" class="${a}">
|
|
325
|
+
${this.formatValue(t.value)}
|
|
326
|
+
</schmancy-typography>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
`;
|
|
330
|
+
})}
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
<!-- Legend -->
|
|
334
|
+
${this.renderLegend()}
|
|
335
|
+
`;
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
m([l({ type: Array })], d.prototype, "data", 2), m([l({ type: String })], d.prototype, "valuePrefix", 2), m([l({ type: String })], d.prototype, "valueSuffix", 2), m([l({ type: Number })], d.prototype, "valueDecimals", 2), m([l({ type: Boolean })], d.prototype, "showMedals", 2), m([l({ type: Boolean })], d.prototype, "showLegend", 2), m([l({ type: Number })], d.prototype, "animationDuration", 2), m([l({ type: Boolean })], d.prototype, "animated", 2), m([l({ type: String })], d.prototype, "labelWidth", 2), m([l({ type: String })], d.prototype, "valueWidth", 2), m([f()], d.prototype, "animationProgress", 2), m([f()], d.prototype, "isVisible", 2), m([f()], d.prototype, "categoryColorMap", 2), d = m([j("schmancy-pills")], d);
|
|
339
|
+
export {
|
|
340
|
+
c as S,
|
|
341
|
+
d as a,
|
|
342
|
+
U as c,
|
|
343
|
+
H as e,
|
|
344
|
+
F as h
|
|
345
|
+
};
|
|
346
|
+
//# sourceMappingURL=pills-C3fIvfn8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pills-C3fIvfn8.js","sources":["../src/charts/utils.ts","../src/charts/area-chart.ts","../src/charts/pills.ts"],"sourcesContent":["/**\n * Catmull-Rom spline interpolation for smooth curves\n * Returns the interpolated point between p1 and p2\n */\nexport function catmullRomSpline(\n\tp0: { x: number; y: number },\n\tp1: { x: number; y: number },\n\tp2: { x: number; y: number },\n\tp3: { x: number; y: number },\n\tt: number\n): { x: number; y: number } {\n\tconst t2 = t * t\n\tconst t3 = t2 * t\n\n\tconst x =\n\t\t0.5 *\n\t\t(2 * p1.x +\n\t\t\t(-p0.x + p2.x) * t +\n\t\t\t(2 * p0.x - 5 * p1.x + 4 * p2.x - p3.x) * t2 +\n\t\t\t(-p0.x + 3 * p1.x - 3 * p2.x + p3.x) * t3)\n\n\tconst y =\n\t\t0.5 *\n\t\t(2 * p1.y +\n\t\t\t(-p0.y + p2.y) * t +\n\t\t\t(2 * p0.y - 5 * p1.y + 4 * p2.y - p3.y) * t2 +\n\t\t\t(-p0.y + 3 * p1.y - 3 * p2.y + p3.y) * t3)\n\n\treturn { x, y }\n}\n\n/**\n * Converts hex or rgb color to rgba string\n */\nexport function hexToRgba(color: string, alpha: number): string {\n\t// Handle rgb/rgba format\n\tif (color.startsWith('rgb')) {\n\t\tconst match = color.match(/[\\d.]+/g)\n\t\tif (match && match.length >= 3) {\n\t\t\treturn `rgba(${match[0]}, ${match[1]}, ${match[2]}, ${alpha})`\n\t\t}\n\t}\n\n\t// Handle hex format\n\tlet hex = color.replace('#', '')\n\tif (hex.length === 3) {\n\t\thex = hex\n\t\t\t.split('')\n\t\t\t.map(c => c + c)\n\t\t\t.join('')\n\t}\n\n\tconst r = parseInt(hex.substring(0, 2), 16)\n\tconst g = parseInt(hex.substring(2, 4), 16)\n\tconst b = parseInt(hex.substring(4, 6), 16)\n\n\treturn `rgba(${r}, ${g}, ${b}, ${alpha})`\n}\n\n/**\n * Cubic ease-out animation function\n */\nexport function easeOutCubic(t: number): number {\n\treturn 1 - Math.pow(1 - t, 3)\n}\n","import { html, css, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { ref, createRef, Ref } from 'lit/directives/ref.js'\nimport { $LitElement } from '@mixins/index'\nimport type { ChartDataPoint, ChartTheme, ProcessedDataPoint } from './types'\nimport { catmullRomSpline, hexToRgba, easeOutCubic } from './utils'\n\ninterface TooltipData {\n\tvisible: boolean\n\tx: number\n\ty: number\n\tlabel: string\n\tvalue: number\n\tmetadata?: Record<string, unknown>\n}\n\n@customElement('schmancy-area-chart')\nexport class SchmancyAreaChart extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t/** Chart data points */\n\t@property({ type: Array })\n\tdata: ChartDataPoint[] = []\n\n\t/** Chart height in pixels */\n\t@property({ type: Number })\n\theight = 200\n\n\t/** Show grid lines */\n\t@property({ type: Boolean })\n\tshowGrid = true\n\n\t/** Show x-axis labels */\n\t@property({ type: Boolean })\n\tshowLabels = true\n\n\t/** Enable tooltips */\n\t@property({ type: Boolean })\n\tshowTooltip = true\n\n\t/** Number of peaks to highlight */\n\t@property({ type: Number })\n\tpeakCount = 3\n\n\t/** Animation duration in milliseconds */\n\t@property({ type: Number })\n\tanimationDuration = 800\n\n\t/** Enable entrance animation */\n\t@property({ type: Boolean })\n\tanimated = true\n\n\t/** Prefix for values (e.g., \"EUR \") */\n\t@property({ type: String })\n\tvaluePrefix = ''\n\n\t/** Suffix for values (e.g., \"%\") */\n\t@property({ type: String })\n\tvalueSuffix = ''\n\n\t/** Decimal places for value display */\n\t@property({ type: Number })\n\tvalueDecimals = 2\n\n\t/** Theme overrides */\n\t@property({ type: Object })\n\ttheme: Partial<ChartTheme> = {}\n\n\t@state() private tooltipData: TooltipData = {\n\t\tvisible: false,\n\t\tx: 0,\n\t\ty: 0,\n\t\tlabel: '',\n\t\tvalue: 0,\n\t}\n\n\t@state() private animationProgress = 0\n\t@state() private isVisible = false\n\n\tprivate canvasRef: Ref<HTMLCanvasElement> = createRef()\n\tprivate containerRef: Ref<HTMLDivElement> = createRef()\n\tprivate animationFrameId: number | null = null\n\tprivate observer: IntersectionObserver | null = null\n\tprivate processedData: ProcessedDataPoint[] = []\n\tprivate resizeObserver: ResizeObserver | null = null\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupIntersectionObserver()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.cleanup()\n\t}\n\n\tprivate cleanup() {\n\t\tif (this.animationFrameId !== null) {\n\t\t\tcancelAnimationFrame(this.animationFrameId)\n\t\t\tthis.animationFrameId = null\n\t\t}\n\t\tif (this.observer) {\n\t\t\tthis.observer.disconnect()\n\t\t\tthis.observer = null\n\t\t}\n\t\tif (this.resizeObserver) {\n\t\t\tthis.resizeObserver.disconnect()\n\t\t\tthis.resizeObserver = null\n\t\t}\n\t}\n\n\tprivate setupIntersectionObserver() {\n\t\tthis.observer = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tconst entry = entries[0]\n\t\t\t\tif (entry.isIntersecting && !this.isVisible) {\n\t\t\t\t\tthis.isVisible = true\n\t\t\t\t\tif (this.animated) {\n\t\t\t\t\t\tthis.startAnimation()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.animationProgress = 1\n\t\t\t\t\t\tthis.drawChart()\n\t\t\t\t\t}\n\t\t\t\t} else if (!entry.isIntersecting) {\n\t\t\t\t\tthis.isVisible = false\n\t\t\t\t\tif (this.animationFrameId !== null) {\n\t\t\t\t\t\tcancelAnimationFrame(this.animationFrameId)\n\t\t\t\t\t\tthis.animationFrameId = null\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ threshold: 0.1 }\n\t\t)\n\t}\n\n\tprotected updated(changedProperties: PropertyValues) {\n\t\tsuper.updated(changedProperties)\n\n\t\tif (this.containerRef.value && this.observer) {\n\t\t\tthis.observer.observe(this.containerRef.value)\n\t\t}\n\n\t\tif (this.canvasRef.value && !this.resizeObserver) {\n\t\t\tthis.resizeObserver = new ResizeObserver(() => {\n\t\t\t\tthis.drawChart()\n\t\t\t})\n\t\t\tthis.resizeObserver.observe(this.canvasRef.value)\n\t\t}\n\n\t\t// Redraw when data changes\n\t\tif (changedProperties.has('data') && this.isVisible) {\n\t\t\tif (this.animated) {\n\t\t\t\tthis.animationProgress = 0\n\t\t\t\tthis.startAnimation()\n\t\t\t} else {\n\t\t\t\tthis.animationProgress = 1\n\t\t\t\tthis.drawChart()\n\t\t\t}\n\t\t}\n\n\t\t// Redraw on theme or config changes\n\t\tif (\n\t\t\t(changedProperties.has('theme') ||\n\t\t\t\tchangedProperties.has('showGrid') ||\n\t\t\t\tchangedProperties.has('showLabels') ||\n\t\t\t\tchangedProperties.has('peakCount')) &&\n\t\t\tthis.isVisible\n\t\t) {\n\t\t\tthis.drawChart()\n\t\t}\n\t}\n\n\tprivate startAnimation() {\n\t\tconst startTime = performance.now()\n\t\tconst duration = this.animationDuration\n\n\t\tconst animateFrame = (currentTime: number) => {\n\t\t\tconst elapsed = currentTime - startTime\n\t\t\tconst progress = Math.min(elapsed / duration, 1)\n\n\t\t\tthis.animationProgress = easeOutCubic(progress)\n\t\t\tthis.drawChart()\n\n\t\t\tif (progress < 1 && this.isVisible) {\n\t\t\t\tthis.animationFrameId = requestAnimationFrame(animateFrame)\n\t\t\t}\n\t\t}\n\n\t\tthis.animationFrameId = requestAnimationFrame(animateFrame)\n\t}\n\n\tprivate processData(): ProcessedDataPoint[] {\n\t\tif (!this.data || this.data.length === 0) return []\n\n\t\t// Find top N peak values\n\t\tconst sortedByValue = [...this.data].sort((a, b) => b.value - a.value)\n\t\tconst peakLabels = new Set(sortedByValue.slice(0, this.peakCount).map(d => d.label))\n\n\t\treturn this.data.map(d => ({\n\t\t\t...d,\n\t\t\tx: 0, // Will be calculated during draw\n\t\t\ty: 0, // Will be calculated during draw\n\t\t\tisPeak: peakLabels.has(d.label),\n\t\t}))\n\t}\n\n\tprivate getThemeValue<K extends keyof ChartTheme>(\n\t\tkey: K,\n\t\tdefaultValue: NonNullable<ChartTheme[K]>\n\t): NonNullable<ChartTheme[K]> {\n\t\treturn (this.theme[key] as NonNullable<ChartTheme[K]>) ?? defaultValue\n\t}\n\n\tprivate drawChart() {\n\t\tconst canvas = this.canvasRef.value\n\t\tif (!canvas) return\n\n\t\tconst ctx = canvas.getContext('2d')\n\t\tif (!ctx) return\n\n\t\tconst dpr = window.devicePixelRatio || 1\n\t\tconst rect = canvas.getBoundingClientRect()\n\t\tconst width = rect.width\n\t\tconst height = rect.height\n\n\t\t// Set canvas size for high DPI\n\t\tcanvas.width = width * dpr\n\t\tcanvas.height = height * dpr\n\t\tctx.scale(dpr, dpr)\n\n\t\t// Clear canvas\n\t\tctx.clearRect(0, 0, width, height)\n\n\t\tconst data = this.processData()\n\t\tif (data.length === 0) return\n\n\t\tconst padding = { top: 20, right: 20, bottom: this.showLabels ? 40 : 20, left: 20 }\n\t\tconst chartWidth = width - padding.left - padding.right\n\t\tconst chartHeight = height - padding.top - padding.bottom\n\n\t\t// Find max value for scaling\n\t\tconst maxValue = Math.max(...data.map(d => d.value), 1)\n\n\t\t// Calculate positions\n\t\tconst points = data.map((d, i) => ({\n\t\t\t...d,\n\t\t\tx: padding.left + (data.length > 1 ? (i / (data.length - 1)) * chartWidth : chartWidth / 2),\n\t\t\ty: padding.top + chartHeight - (d.value / maxValue) * chartHeight,\n\t\t}))\n\n\t\tthis.processedData = points\n\n\t\t// Get primary color from CSS or theme\n\t\tconst computedStyle = getComputedStyle(this)\n\t\tconst defaultPrimaryColor =\n\t\t\tcomputedStyle.getPropertyValue('--schmancy-sys-color-primary').trim() || '#6750A4'\n\t\tconst primaryColor = this.getThemeValue('primaryColor', defaultPrimaryColor)\n\t\tconst [gradientOpacityTop, gradientOpacityBottom] = this.getThemeValue('gradientOpacity', [0.4, 0.05])\n\t\tconst strokeWidth = this.getThemeValue('strokeWidth', 2)\n\t\tconst pointRadius = this.getThemeValue('pointRadius', 4)\n\t\tconst peakRadius = this.getThemeValue('peakRadius', 6)\n\n\t\t// Draw grid lines\n\t\tif (this.showGrid) {\n\t\t\tctx.strokeStyle = 'rgba(128, 128, 128, 0.15)'\n\t\t\tctx.lineWidth = 1\n\t\t\tctx.setLineDash([4, 4])\n\n\t\t\tfor (let i = 1; i <= 3; i++) {\n\t\t\t\tconst y = padding.top + (chartHeight * i) / 4\n\t\t\t\tctx.beginPath()\n\t\t\t\tctx.moveTo(padding.left, y)\n\t\t\t\tctx.lineTo(width - padding.right, y)\n\t\t\t\tctx.stroke()\n\t\t\t}\n\n\t\t\tctx.setLineDash([])\n\t\t}\n\n\t\t// Create smooth curve path using Catmull-Rom spline\n\t\tconst curvePath = new Path2D()\n\t\tconst areaPath = new Path2D()\n\n\t\tif (points.length >= 2) {\n\t\t\t// Start area path from bottom left\n\t\t\tareaPath.moveTo(points[0].x, padding.top + chartHeight)\n\t\t\tcurvePath.moveTo(points[0].x, points[0].y)\n\t\t\tareaPath.lineTo(points[0].x, points[0].y)\n\n\t\t\tfor (let i = 0; i < points.length - 1; i++) {\n\t\t\t\tconst p0 = points[Math.max(0, i - 1)]\n\t\t\t\tconst p1 = points[i]\n\t\t\t\tconst p2 = points[Math.min(points.length - 1, i + 1)]\n\t\t\t\tconst p3 = points[Math.min(points.length - 1, i + 2)]\n\n\t\t\t\t// Draw curve segments\n\t\t\t\tconst segments = 16\n\t\t\t\tfor (let j = 1; j <= segments; j++) {\n\t\t\t\t\tconst t = j / segments\n\t\t\t\t\tconst point = catmullRomSpline(p0, p1, p2, p3, t)\n\t\t\t\t\tcurvePath.lineTo(point.x, point.y)\n\t\t\t\t\tareaPath.lineTo(point.x, point.y)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Close area path\n\t\t\tareaPath.lineTo(points[points.length - 1].x, padding.top + chartHeight)\n\t\t\tareaPath.closePath()\n\t\t} else if (points.length === 1) {\n\t\t\t// Single point - draw a dot\n\t\t\tcurvePath.arc(points[0].x, points[0].y, pointRadius, 0, Math.PI * 2)\n\t\t}\n\n\t\t// Apply animation clipping\n\t\tctx.save()\n\t\tctx.beginPath()\n\t\tctx.rect(0, 0, padding.left + chartWidth * this.animationProgress, height)\n\t\tctx.clip()\n\n\t\t// Draw gradient fill\n\t\tif (points.length >= 2) {\n\t\t\tconst gradient = ctx.createLinearGradient(0, padding.top, 0, padding.top + chartHeight)\n\t\t\tgradient.addColorStop(0, hexToRgba(primaryColor, gradientOpacityTop))\n\t\t\tgradient.addColorStop(1, hexToRgba(primaryColor, gradientOpacityBottom))\n\n\t\t\tctx.fillStyle = gradient\n\t\t\tctx.fill(areaPath)\n\t\t}\n\n\t\t// Draw stroke\n\t\tctx.strokeStyle = primaryColor\n\t\tctx.lineWidth = strokeWidth\n\t\tctx.lineCap = 'round'\n\t\tctx.lineJoin = 'round'\n\t\tctx.stroke(curvePath)\n\n\t\t// Draw data points\n\t\tpoints.forEach((point, index) => {\n\t\t\tconst pointProgress = (index / (points.length - 1 || 1)) * this.animationProgress\n\t\t\tif (pointProgress < index / (points.length || 1)) return\n\n\t\t\tconst radius = point.isPeak ? peakRadius - 1 : pointRadius - 1\n\t\t\tconst outerRadius = point.isPeak ? peakRadius + 4 : pointRadius + 2\n\n\t\t\t// Outer glow for peaks\n\t\t\tif (point.isPeak) {\n\t\t\t\tctx.beginPath()\n\t\t\t\tctx.arc(point.x, point.y, outerRadius, 0, Math.PI * 2)\n\t\t\t\tctx.fillStyle = hexToRgba(primaryColor, 0.2)\n\t\t\t\tctx.fill()\n\t\t\t}\n\n\t\t\t// Inner dot\n\t\t\tctx.beginPath()\n\t\t\tctx.arc(point.x, point.y, radius, 0, Math.PI * 2)\n\t\t\tctx.fillStyle = primaryColor\n\t\t\tctx.fill()\n\n\t\t\t// White center for peaks\n\t\t\tif (point.isPeak) {\n\t\t\t\tctx.beginPath()\n\t\t\t\tctx.arc(point.x, point.y, 2, 0, Math.PI * 2)\n\t\t\t\tctx.fillStyle = 'white'\n\t\t\t\tctx.fill()\n\t\t\t}\n\t\t})\n\n\t\tctx.restore()\n\n\t\t// Draw labels\n\t\tif (this.showLabels && points.length > 0) {\n\t\t\tctx.fillStyle = 'rgba(128, 128, 128, 0.8)'\n\t\t\tctx.font = '11px system-ui, sans-serif'\n\t\t\tctx.textAlign = 'center'\n\t\t\tctx.textBaseline = 'top'\n\n\t\t\t// Show fewer labels on narrow charts\n\t\t\tconst labelStep = width < 400 ? 3 : width < 600 ? 2 : 1\n\t\t\tpoints.forEach((point, index) => {\n\t\t\t\tif (index % labelStep === 0) {\n\t\t\t\t\tctx.fillText(point.label, point.x, height - padding.bottom + 8)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate formatValue(value: number): string {\n\t\tconst formatted = value.toFixed(this.valueDecimals)\n\t\treturn `${this.valuePrefix}${formatted}${this.valueSuffix}`\n\t}\n\n\tprivate handlePointerMove = (e: PointerEvent) => {\n\t\tif (this.processedData.length === 0 || !this.showTooltip) return\n\n\t\tconst canvas = this.canvasRef.value\n\t\tif (!canvas) return\n\n\t\tconst rect = canvas.getBoundingClientRect()\n\t\tconst x = e.clientX - rect.left\n\n\t\t// Find closest data point\n\t\tlet closestPoint: ProcessedDataPoint | null = null\n\t\tlet minDistance = Infinity\n\n\t\tthis.processedData.forEach(point => {\n\t\t\tconst distance = Math.abs(point.x - x)\n\t\t\tif (distance < minDistance) {\n\t\t\t\tminDistance = distance\n\t\t\t\tclosestPoint = point\n\t\t\t}\n\t\t})\n\n\t\tif (closestPoint && minDistance < 30) {\n\t\t\tthis.tooltipData = {\n\t\t\t\tvisible: true,\n\t\t\t\tx: closestPoint.x,\n\t\t\t\ty: closestPoint.y,\n\t\t\t\tlabel: closestPoint.label,\n\t\t\t\tvalue: closestPoint.value,\n\t\t\t\tmetadata: closestPoint.metadata,\n\t\t\t}\n\t\t} else {\n\t\t\tthis.tooltipData = { ...this.tooltipData, visible: false }\n\t\t}\n\t}\n\n\tprivate handlePointerLeave = () => {\n\t\tthis.tooltipData = { ...this.tooltipData, visible: false }\n\t}\n\n\tprivate renderMetadata() {\n\t\tif (!this.tooltipData.metadata) return ''\n\t\treturn Object.entries(this.tooltipData.metadata).map(\n\t\t\t([key, value]) => html`\n\t\t\t\t<schmancy-typography type=\"body\" token=\"sm\" class=\"text-surface-onVariant\">\n\t\t\t\t\t${key}: ${String(value)}\n\t\t\t\t</schmancy-typography>\n\t\t\t`\n\t\t)\n\t}\n\n\trender() {\n\t\tif (!this.data || this.data.length === 0) {\n\t\t\treturn html``\n\t\t}\n\n\t\treturn html`\n\t\t\t<div ${ref(this.containerRef)} class=\"relative\">\n\t\t\t\t<div class=\"relative\" style=\"height: ${this.height}px; touch-action: pan-y;\">\n\t\t\t\t\t<canvas\n\t\t\t\t\t\t${ref(this.canvasRef)}\n\t\t\t\t\t\tclass=\"w-full h-full\"\n\t\t\t\t\t\tstyle=\"display: block;\"\n\t\t\t\t\t\t@pointermove=${this.handlePointerMove}\n\t\t\t\t\t\t@pointerleave=${this.handlePointerLeave}\n\t\t\t\t\t></canvas>\n\n\t\t\t\t\t<!-- Tooltip -->\n\t\t\t\t\t${this.showTooltip\n\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclass=\"absolute pointer-events-none transition-opacity duration-150 ${this.tooltipData.visible\n\t\t\t\t\t\t\t\t\t\t? 'opacity-100'\n\t\t\t\t\t\t\t\t\t\t: 'opacity-0'}\"\n\t\t\t\t\t\t\t\t\tstyle=\"\n left: ${this.tooltipData.x}px;\n top: ${this.tooltipData.y - 60}px;\n transform: translateX(-50%);\n \"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<schmancy-surface elevation=\"3\" rounded=\"all\" class=\"px-3 py-2 min-w-max\">\n\t\t\t\t\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"sm\" class=\"text-surface-onVariant\">\n\t\t\t\t\t\t\t\t\t\t\t${this.tooltipData.label}\n\t\t\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t\t\t<schmancy-typography type=\"title\" token=\"md\" class=\"text-surface-on font-semibold\">\n\t\t\t\t\t\t\t\t\t\t\t${this.formatValue(this.tooltipData.value)}\n\t\t\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t\t\t${this.renderMetadata()}\n\t\t\t\t\t\t\t\t\t</schmancy-surface>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t `\n\t\t\t\t\t\t: ''}\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-area-chart': SchmancyAreaChart\n\t}\n}\n","import { html, css, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { $LitElement } from '@mixins/index'\nimport type { PillDataPoint, PillSegment } from './types'\n\n/** Default color palette for segments - expanded for uniqueness */\nconst DEFAULT_COLORS = [\n\t'bg-primary',\n\t'bg-secondary',\n\t'bg-tertiary',\n\t'bg-success',\n\t'bg-warning',\n\t'bg-error',\n\t'bg-primary/70',\n\t'bg-secondary/70',\n\t'bg-tertiary/70',\n\t'bg-success/70',\n\t'bg-warning/70',\n\t'bg-error/70',\n\t'bg-primary/40',\n\t'bg-secondary/40',\n\t'bg-tertiary/40',\n]\n\n@customElement('schmancy-pills')\nexport class SchmancyPills extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t/** Chart data points */\n\t@property({ type: Array })\n\tdata: PillDataPoint[] = []\n\n\t/** Prefix for values (e.g., \"EUR \") */\n\t@property({ type: String })\n\tvaluePrefix = ''\n\n\t/** Suffix for values (e.g., \"%\") */\n\t@property({ type: String })\n\tvalueSuffix = ''\n\n\t/** Decimal places for value display */\n\t@property({ type: Number })\n\tvalueDecimals = 2\n\n\t/** Show medals for top 3 */\n\t@property({ type: Boolean })\n\tshowMedals = true\n\n\t/** Show legend for segments */\n\t@property({ type: Boolean })\n\tshowLegend = true\n\n\t/** Animation duration in milliseconds */\n\t@property({ type: Number })\n\tanimationDuration = 500\n\n\t/** Enable entrance animation */\n\t@property({ type: Boolean })\n\tanimated = true\n\n\t/** Label column width (Tailwind class) */\n\t@property({ type: String })\n\tlabelWidth = 'w-14'\n\n\t/** Value column width (Tailwind class) */\n\t@property({ type: String })\n\tvalueWidth = 'w-20'\n\n\t@state() private animationProgress = 0\n\t@state() private isVisible = false\n\t@state() private categoryColorMap = new Map<string, string>()\n\n\tprivate observer: IntersectionObserver | null = null\n\tprivate animationFrameId: number | null = null\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupIntersectionObserver()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.cleanup()\n\t}\n\n\tprivate cleanup() {\n\t\tif (this.animationFrameId !== null) {\n\t\t\tcancelAnimationFrame(this.animationFrameId)\n\t\t\tthis.animationFrameId = null\n\t\t}\n\t\tif (this.observer) {\n\t\t\tthis.observer.disconnect()\n\t\t\tthis.observer = null\n\t\t}\n\t}\n\n\tprivate setupIntersectionObserver() {\n\t\tthis.observer = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tconst entry = entries[0]\n\t\t\t\tif (entry.isIntersecting && !this.isVisible) {\n\t\t\t\t\tthis.isVisible = true\n\t\t\t\t\tif (this.animated) {\n\t\t\t\t\t\tthis.startAnimation()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.animationProgress = 1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ threshold: 0.1 }\n\t\t)\n\t}\n\n\tprotected firstUpdated() {\n\t\tif (this.observer) {\n\t\t\tthis.observer.observe(this)\n\t\t}\n\t}\n\n\tprotected updated(changedProperties: PropertyValues) {\n\t\tsuper.updated(changedProperties)\n\n\t\t// Restart animation when data changes\n\t\tif (changedProperties.has('data') && this.isVisible && this.animated) {\n\t\t\tthis.animationProgress = 0\n\t\t\tthis.startAnimation()\n\t\t}\n\t}\n\n\tprivate startAnimation() {\n\t\tconst startTime = performance.now()\n\t\tconst duration = this.animationDuration\n\n\t\tconst animateFrame = (currentTime: number) => {\n\t\t\tconst elapsed = currentTime - startTime\n\t\t\tconst progress = Math.min(elapsed / duration, 1)\n\n\t\t\t// Ease out cubic\n\t\t\tthis.animationProgress = 1 - Math.pow(1 - progress, 3)\n\n\t\t\tif (progress < 1 && this.isVisible) {\n\t\t\t\tthis.animationFrameId = requestAnimationFrame(animateFrame)\n\t\t\t}\n\t\t}\n\n\t\tthis.animationFrameId = requestAnimationFrame(animateFrame)\n\t}\n\n\tprivate initializeCategoryColors(): void {\n\t\t// Build consistent color map from all segments in data\n\t\tconst categoryTotals = new Map<string, number>()\n\t\tconst explicitColors = new Map<string, string>()\n\n\t\tthis.data.forEach(d => {\n\t\t\tif (d.segments) {\n\t\t\t\td.segments.forEach(seg => {\n\t\t\t\t\tcategoryTotals.set(seg.label, (categoryTotals.get(seg.label) || 0) + seg.value)\n\t\t\t\t\t// Capture explicit colors from segments\n\t\t\t\t\tif (seg.color && !explicitColors.has(seg.label)) {\n\t\t\t\t\t\texplicitColors.set(seg.label, seg.color)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\t// Sort by total value (most = first color)\n\t\tconst sortedCategories = Array.from(categoryTotals.entries())\n\t\t\t.sort((a, b) => b[1] - a[1])\n\t\t\t.map(([cat]) => cat)\n\n\t\t// Clear and rebuild - use explicit colors if available, otherwise default palette\n\t\tthis.categoryColorMap.clear()\n\t\tlet defaultColorIndex = 0\n\t\tsortedCategories.forEach(cat => {\n\t\t\tif (explicitColors.has(cat)) {\n\t\t\t\tthis.categoryColorMap.set(cat, explicitColors.get(cat)!)\n\t\t\t} else {\n\t\t\t\tthis.categoryColorMap.set(cat, DEFAULT_COLORS[defaultColorIndex % DEFAULT_COLORS.length])\n\t\t\t\tdefaultColorIndex++\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate getSegmentColor(segment: PillSegment): string {\n\t\t// Use explicit color if provided\n\t\tif (segment.color) return segment.color\n\t\t// Otherwise use from color map\n\t\treturn this.categoryColorMap.get(segment.label) || 'bg-primary'\n\t}\n\n\tprivate formatValue(value: number): string {\n\t\tconst formatted = value.toFixed(this.valueDecimals)\n\t\treturn `${this.valuePrefix}${formatted}${this.valueSuffix}`\n\t}\n\n\tprivate getMedalEmoji(rank: number | undefined): string {\n\t\tif (!this.showMedals || !rank) return ''\n\t\tif (rank === 1) return '🥇'\n\t\tif (rank === 2) return '🥈'\n\t\tif (rank === 3) return '🥉'\n\t\treturn ''\n\t}\n\n\tprivate getMaxValue(): number {\n\t\tif (this.data.length === 0) return 0\n\t\treturn Math.max(...this.data.map(d => d.value), 1)\n\t}\n\n\tprivate renderBar(dataPoint: PillDataPoint, maxValue: number): ReturnType<typeof html> {\n\t\tconst percentage = maxValue > 0 ? (dataPoint.value / maxValue) * 100 : 0\n\t\tconst animatedPercentage = percentage * this.animationProgress\n\n\t\t// If no segments, render solid bar\n\t\tif (!dataPoint.segments || dataPoint.segments.length === 0) {\n\t\t\tconst barColorClass = dataPoint.isPeak\n\t\t\t\t? 'bg-success'\n\t\t\t\t: dataPoint.isLow\n\t\t\t\t\t? 'bg-tertiary opacity-70'\n\t\t\t\t\t: dataPoint.value === 0\n\t\t\t\t\t\t? 'bg-tertiary/40'\n\t\t\t\t\t\t: 'bg-primary'\n\n\t\t\treturn html`\n\t\t\t\t<div\n\t\t\t\t\tclass=\"${barColorClass} h-full transition-all rounded-full\"\n\t\t\t\t\tstyle=\"width: ${Math.max(animatedPercentage, dataPoint.value > 0 ? 2 : 0)}%; transition-duration: ${this.animated ? '0ms' : '300ms'}\"\n\t\t\t\t\ttitle=\"${this.formatValue(dataPoint.value)}\"\n\t\t\t\t></div>\n\t\t\t`\n\t\t}\n\n\t\t// Stacked bar with segments\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"h-full flex\"\n\t\t\t\tstyle=\"width: ${Math.max(animatedPercentage, 2)}%; transition-duration: ${this.animated ? '0ms' : '300ms'}\"\n\t\t\t>\n\t\t\t\t${repeat(\n\t\t\t\t\tdataPoint.segments,\n\t\t\t\t\tseg => seg.label,\n\t\t\t\t\t(seg, index) => {\n\t\t\t\t\t\tconst segmentPercentage = dataPoint.value > 0 ? (seg.value / dataPoint.value) * 100 : 0\n\t\t\t\t\t\tconst marginLeft = index > 0 ? 'ml-px' : ''\n\t\t\t\t\t\tconst brightenClass = dataPoint.isPeak ? 'brightness-110' : ''\n\t\t\t\t\t\tconst colorClass = this.getSegmentColor(seg)\n\n\t\t\t\t\t\treturn html`\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"${colorClass} ${marginLeft} ${brightenClass} h-full transition-all\n\t\t\t\t\t\t\t\t\t${index === 0 ? 'rounded-l-full' : ''}\n\t\t\t\t\t\t\t\t\t${index === dataPoint.segments!.length - 1 ? 'rounded-r-full' : ''}\"\n\t\t\t\t\t\t\t\tstyle=\"width: ${segmentPercentage}%\"\n\t\t\t\t\t\t\t\ttitle=\"${seg.label}: ${this.formatValue(seg.value)}\"\n\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t`\n\t\t\t\t\t}\n\t\t\t\t)}\n\t\t\t</div>\n\t\t`\n\t}\n\n\tprivate renderLegend(): ReturnType<typeof html> {\n\t\tif (!this.showLegend || this.categoryColorMap.size === 0) {\n\t\t\treturn html``\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=\"flex flex-wrap gap-3 mt-4 pt-4 border-t border-outline-variant\">\n\t\t\t\t${repeat(\n\t\t\t\t\tArray.from(this.categoryColorMap.entries()),\n\t\t\t\t\t([cat]) => cat,\n\t\t\t\t\t([cat, color]) => html`\n\t\t\t\t\t\t<div class=\"flex items-center gap-1.5\">\n\t\t\t\t\t\t\t<div class=\"${color} w-3 h-3 rounded-sm\"></div>\n\t\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"sm\" class=\"text-surface-onVariant\">\n\t\t\t\t\t\t\t\t${cat}\n\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t`\n\t\t\t\t)}\n\t\t\t</div>\n\t\t`\n\t}\n\n\trender() {\n\t\t// Initialize colors before rendering\n\t\tthis.initializeCategoryColors()\n\n\t\tif (!this.data || this.data.length === 0) {\n\t\t\treturn html``\n\t\t}\n\n\t\tconst maxValue = this.getMaxValue()\n\n\t\treturn html`\n\t\t\t<div class=\"space-y-1\">\n\t\t\t\t${repeat(\n\t\t\t\t\tthis.data,\n\t\t\t\t\td => d.label,\n\t\t\t\t\td => {\n\t\t\t\t\t\tconst rowBgClass = d.isPeak ? 'bg-success/10 rounded-lg' : ''\n\t\t\t\t\t\tconst textColorClass = d.isPeak ? 'text-success font-bold' : 'text-surface-on'\n\n\t\t\t\t\t\treturn html`\n\t\t\t\t\t\t\t<div class=\"flex items-center gap-3 py-2 px-2 ${rowBgClass}\">\n\t\t\t\t\t\t\t\t<!-- Label -->\n\t\t\t\t\t\t\t\t<div class=\"${this.labelWidth} shrink-0 text-right\">\n\t\t\t\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"md\" class=\"${textColorClass}\">\n\t\t\t\t\t\t\t\t\t\t${d.label}\n\t\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<!-- Medal -->\n\t\t\t\t\t\t\t\t<div class=\"w-6 shrink-0 text-center\">\n\t\t\t\t\t\t\t\t\t${d.isPeak || (d.rank && d.rank <= 3)\n\t\t\t\t\t\t\t\t\t\t? html`<span class=\"text-sm\">${this.getMedalEmoji(d.rank)}</span>`\n\t\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<!-- Bar -->\n\t\t\t\t\t\t\t\t<div class=\"flex-1 h-6 bg-secondary/15 rounded-full overflow-hidden\">\n\t\t\t\t\t\t\t\t\t${this.renderBar(d, maxValue)}\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<!-- Value -->\n\t\t\t\t\t\t\t\t<div class=\"${this.valueWidth} shrink-0 text-right\">\n\t\t\t\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"md\" class=\"${textColorClass}\">\n\t\t\t\t\t\t\t\t\t\t${this.formatValue(d.value)}\n\t\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t}\n\t\t\t\t)}\n\t\t\t</div>\n\n\t\t\t<!-- Legend -->\n\t\t\t${this.renderLegend()}\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-pills': SchmancyPills\n\t}\n}\n"],"names":["catmullRomSpline","p0","p1","p2","p3","t","t2","t3","x","y","hexToRgba","color","alpha","startsWith","match","length","hex","replace","split","map","c","join","parseInt","substring","easeOutCubic","Math","pow","SchmancyAreaChart","$LitElement","css","constructor","super","arguments","this","data","height","showGrid","showLabels","showTooltip","peakCount","animationDuration","animated","valuePrefix","valueSuffix","valueDecimals","theme","tooltipData","visible","label","value","animationProgress","isVisible","canvasRef","createRef","containerRef","animationFrameId","observer","processedData","resizeObserver","handlePointerMove","e","canvas","rect","getBoundingClientRect","clientX","left","closestPoint","minDistance","Infinity","forEach","point","distance","abs","metadata","handlePointerLeave","connectedCallback","setupIntersectionObserver","disconnectedCallback","cleanup","cancelAnimationFrame","disconnect","IntersectionObserver","entries","entry","isIntersecting","startAnimation","drawChart","threshold","changedProperties","updated","observe","ResizeObserver","has","startTime","performance","now","duration","animateFrame","currentTime","elapsed","progress","min","requestAnimationFrame","processData","sortedByValue","sort","a","b","peakLabels","Set","slice","d","isPeak","key","defaultValue","ctx","getContext","dpr","window","devicePixelRatio","width","scale","clearRect","padding","chartWidth","chartHeight","maxValue","max","points","i","defaultPrimaryColor","getComputedStyle","getPropertyValue","trim","primaryColor","getThemeValue","gradientOpacityTop","gradientOpacityBottom","strokeWidth","pointRadius","peakRadius","strokeStyle","lineWidth","setLineDash","beginPath","moveTo","lineTo","stroke","curvePath","Path2D","areaPath","segments","j","closePath","arc","PI","save","clip","gradient","createLinearGradient","addColorStop","fillStyle","fill","lineCap","lineJoin","index","radius","outerRadius","restore","font","textAlign","textBaseline","labelStep","fillText","formatted","toFixed","renderMetadata","Object","html","String","render","ref","formatValue","__decorateClass","property","type","Array","prototype","Number","Boolean","state","customElement","DEFAULT_COLORS","SchmancyPills","showMedals","showLegend","labelWidth","valueWidth","categoryColorMap","Map","firstUpdated","categoryTotals","explicitColors","seg","set","get","sortedCategories","from","cat","clear","defaultColorIndex","segment","rank","getMaxValue","dataPoint","animatedPercentage","barColorClass","isLow","repeat","segmentPercentage","marginLeft","brightenClass","colorClass","getSegmentColor","size","initializeCategoryColors","rowBgClass","textColorClass","getMedalEmoji","renderBar","renderLegend"],"mappings":";;;;;;;;;;AAIO,SAASA,EACfC,GACAC,GACAC,GACAC,GACAC,GAAAA;AAEA,QAAMC,IAAKD,IAAIA,GACTE,IAAKD,IAAKD;AAgBhB,SAAO,EAAEG,GAbR,OACC,IAAIN,EAAGM,KAAAA,CACLP,EAAGO,IAAIL,EAAGK,KAAKH,KAChB,IAAIJ,EAAGO,IAAI,IAAIN,EAAGM,IAAI,IAAIL,EAAGK,IAAIJ,EAAGI,KAAKF,KAAAA,CACxCL,EAAGO,IAAI,IAAIN,EAAGM,IAAI,IAAIL,EAAGK,IAAIJ,EAAGI,KAAKD,IAS7BE,GANX,OACC,IAAIP,EAAGO,KAAAA,CACLR,EAAGQ,IAAIN,EAAGM,KAAKJ,KAChB,IAAIJ,EAAGQ,IAAI,IAAIP,EAAGO,IAAI,IAAIN,EAAGM,IAAIL,EAAGK,KAAKH,MACxCL,EAAGQ,IAAI,IAAIP,EAAGO,IAAI,IAAIN,EAAGM,IAAIL,EAAGK,KAAKF,GAAAA;AAG1C;AAKO,SAASG,EAAUC,GAAeC,GAAAA;AAExC,MAAID,EAAME,WAAW,KAAA,GAAQ;AAC5B,UAAMC,IAAQH,EAAMG,MAAM,SAAA;AAC1B,QAAIA,KAASA,EAAMC,UAAU,EAC5B,QAAO,QAAQD,EAAM,CAAA,CAAA,KAAOA,EAAM,CAAA,CAAA,KAAOA,EAAM,CAAA,CAAA,KAAOF,CAAAA;AAAAA,EAEx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I,EAmCZN,WAAA,YAAA,CAAA,GAIAJ,EAAA,CADCC,EAAS,EAAEC,MAAMN,OAAAA,CAAAA,CAAAA,GAtCNc,EAuCZN,WAAA,cAAA,CAAA,GAIAJ,EAAA,CADCC,EAAS,EAAEC,MAAMN,YA1CNc,EA2CZN,WAAA,cAAA,CAAA,GAEiBJ,EAAA,CAAhBO,EAAAA,CAAAA,GA7CWG,EA6CKN,WAAA,qBAAA,CAAA,GACAJ,EAAA,CAAhBO,EAAAA,CAAAA,GA9CWG,EA8CKN,WAAA,aAAA,CAAA,GACAJ,EAAA,CAAhBO,EAAAA,CAAAA,GA/CWG,EA+CKN,WAAA,oBAAA,CAAA,GA/CLM,IAANV,EAAA,CADNQ,EAAc,gBAAA,CAAA,GACFE,CAAAA;"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";const p=require("lit"),o=require("lit/decorators.js"),$=require("lit/directives/ref.js");require("rxjs"),require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("./tailwind.mixin-UijsBrYW.cjs");const R=require("./litElement.mixin-BVBdv0GP.cjs"),D=require("lit/directives/repeat.js");function T(e,t,i,a,s){const r=s*s,h=r*s;return{x:.5*(2*t.x+(-e.x+i.x)*s+(2*e.x-5*t.x+4*i.x-a.x)*r+(-e.x+3*t.x-3*i.x+a.x)*h),y:.5*(2*t.y+(-e.y+i.y)*s+(2*e.y-5*t.y+4*i.y-a.y)*r+(-e.y+3*t.y-3*i.y+a.y)*h)}}function w(e,t){if(e.startsWith("rgb")){const a=e.match(/[\d.]+/g);if(a&&a.length>=3)return`rgba(${a[0]}, ${a[1]}, ${a[2]}, ${t})`}let i=e.replace("#","");return i.length===3&&(i=i.split("").map(a=>a+a).join("")),`rgba(${parseInt(i.substring(0,2),16)}, ${parseInt(i.substring(2,4),16)}, ${parseInt(i.substring(4,6),16)}, ${t})`}function L(e){return 1-Math.pow(1-e,3)}var N=Object.defineProperty,G=Object.getOwnPropertyDescriptor,c=(e,t,i,a)=>{for(var s,r=a>1?void 0:a?G(t,i):t,h=e.length-1;h>=0;h--)(s=e[h])&&(r=(a?s(t,i,r):s(r))||r);return a&&r&&N(t,i,r),r};exports.SchmancyAreaChart=class extends R.$LitElement(p.css`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
}
|
|
5
|
+
`){constructor(){super(...arguments),this.data=[],this.height=200,this.showGrid=!0,this.showLabels=!0,this.showTooltip=!0,this.peakCount=3,this.animationDuration=800,this.animated=!0,this.valuePrefix="",this.valueSuffix="",this.valueDecimals=2,this.theme={},this.tooltipData={visible:!1,x:0,y:0,label:"",value:0},this.animationProgress=0,this.isVisible=!1,this.canvasRef=$.createRef(),this.containerRef=$.createRef(),this.animationFrameId=null,this.observer=null,this.processedData=[],this.resizeObserver=null,this.handlePointerMove=e=>{if(this.processedData.length===0||!this.showTooltip)return;const t=this.canvasRef.value;if(!t)return;const i=t.getBoundingClientRect(),a=e.clientX-i.left;let s=null,r=1/0;this.processedData.forEach(h=>{const y=Math.abs(h.x-a);y<r&&(r=y,s=h)}),this.tooltipData=s&&r<30?{visible:!0,x:s.x,y:s.y,label:s.label,value:s.value,metadata:s.metadata}:{...this.tooltipData,visible:!1}},this.handlePointerLeave=()=>{this.tooltipData={...this.tooltipData,visible:!1}}}connectedCallback(){super.connectedCallback(),this.setupIntersectionObserver()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}cleanup(){this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.observer&&(this.observer.disconnect(),this.observer=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}setupIntersectionObserver(){this.observer=new IntersectionObserver(e=>{const t=e[0];t.isIntersecting&&!this.isVisible?(this.isVisible=!0,this.animated?this.startAnimation():(this.animationProgress=1,this.drawChart())):t.isIntersecting||(this.isVisible=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null))},{threshold:.1})}updated(e){super.updated(e),this.containerRef.value&&this.observer&&this.observer.observe(this.containerRef.value),this.canvasRef.value&&!this.resizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{this.drawChart()}),this.resizeObserver.observe(this.canvasRef.value)),e.has("data")&&this.isVisible&&(this.animated?(this.animationProgress=0,this.startAnimation()):(this.animationProgress=1,this.drawChart())),(e.has("theme")||e.has("showGrid")||e.has("showLabels")||e.has("peakCount"))&&this.isVisible&&this.drawChart()}startAnimation(){const e=performance.now(),t=this.animationDuration,i=a=>{const s=a-e,r=Math.min(s/t,1);this.animationProgress=L(r),this.drawChart(),r<1&&this.isVisible&&(this.animationFrameId=requestAnimationFrame(i))};this.animationFrameId=requestAnimationFrame(i)}processData(){if(!this.data||this.data.length===0)return[];const e=[...this.data].sort((i,a)=>a.value-i.value),t=new Set(e.slice(0,this.peakCount).map(i=>i.label));return this.data.map(i=>({...i,x:0,y:0,isPeak:t.has(i.label)}))}getThemeValue(e,t){return this.theme[e]??t}drawChart(){const e=this.canvasRef.value;if(!e)return;const t=e.getContext("2d");if(!t)return;const i=window.devicePixelRatio||1,a=e.getBoundingClientRect(),s=a.width,r=a.height;e.width=s*i,e.height=r*i,t.scale(i,i),t.clearRect(0,0,s,r);const h=this.processData();if(h.length===0)return;const y=20,f=20,V=this.showLabels?40:20,x=20,C=s-x-f,d=r-y-V,q=Math.max(...h.map(n=>n.value),1),l=h.map((n,u)=>({...n,x:x+(h.length>1?u/(h.length-1)*C:C/2),y:y+d-n.value/q*d}));this.processedData=l;const B=getComputedStyle(this).getPropertyValue("--schmancy-sys-color-primary").trim()||"#6750A4",b=this.getThemeValue("primaryColor",B),[E,z]=this.getThemeValue("gradientOpacity",[.4,.05]),j=this.getThemeValue("strokeWidth",2),k=this.getThemeValue("pointRadius",4),I=this.getThemeValue("peakRadius",6);if(this.showGrid){t.strokeStyle="rgba(128, 128, 128, 0.15)",t.lineWidth=1,t.setLineDash([4,4]);for(let n=1;n<=3;n++){const u=y+d*n/4;t.beginPath(),t.moveTo(x,u),t.lineTo(s-f,u),t.stroke()}t.setLineDash([])}const P=new Path2D,g=new Path2D;if(l.length>=2){g.moveTo(l[0].x,y+d),P.moveTo(l[0].x,l[0].y),g.lineTo(l[0].x,l[0].y);for(let n=0;n<l.length-1;n++){const u=l[Math.max(0,n-1)],v=l[n],M=l[Math.min(l.length-1,n+1)],W=l[Math.min(l.length-1,n+2)],F=16;for(let A=1;A<=F;A++){const S=T(u,v,M,W,A/F);P.lineTo(S.x,S.y),g.lineTo(S.x,S.y)}}g.lineTo(l[l.length-1].x,y+d),g.closePath()}else l.length===1&&P.arc(l[0].x,l[0].y,k,0,2*Math.PI);if(t.save(),t.beginPath(),t.rect(0,0,x+C*this.animationProgress,r),t.clip(),l.length>=2){const n=t.createLinearGradient(0,y,0,y+d);n.addColorStop(0,w(b,E)),n.addColorStop(1,w(b,z)),t.fillStyle=n,t.fill(g)}if(t.strokeStyle=b,t.lineWidth=j,t.lineCap="round",t.lineJoin="round",t.stroke(P),l.forEach((n,u)=>{if(u/(l.length-1||1)*this.animationProgress<u/(l.length||1))return;const v=n.isPeak?I-1:k-1,M=n.isPeak?I+4:k+2;n.isPeak&&(t.beginPath(),t.arc(n.x,n.y,M,0,2*Math.PI),t.fillStyle=w(b,.2),t.fill()),t.beginPath(),t.arc(n.x,n.y,v,0,2*Math.PI),t.fillStyle=b,t.fill(),n.isPeak&&(t.beginPath(),t.arc(n.x,n.y,2,0,2*Math.PI),t.fillStyle="white",t.fill())}),t.restore(),this.showLabels&&l.length>0){t.fillStyle="rgba(128, 128, 128, 0.8)",t.font="11px system-ui, sans-serif",t.textAlign="center",t.textBaseline="top";const n=s<400?3:s<600?2:1;l.forEach((u,v)=>{v%n===0&&t.fillText(u.label,u.x,r-V+8)})}}formatValue(e){const t=e.toFixed(this.valueDecimals);return`${this.valuePrefix}${t}${this.valueSuffix}`}renderMetadata(){return this.tooltipData.metadata?Object.entries(this.tooltipData.metadata).map(([e,t])=>p.html`
|
|
6
|
+
<schmancy-typography type="body" token="sm" class="text-surface-onVariant">
|
|
7
|
+
${e}: ${String(t)}
|
|
8
|
+
</schmancy-typography>
|
|
9
|
+
`):""}render(){return this.data&&this.data.length!==0?p.html`
|
|
10
|
+
<div ${$.ref(this.containerRef)} class="relative">
|
|
11
|
+
<div class="relative" style="height: ${this.height}px; touch-action: pan-y;">
|
|
12
|
+
<canvas
|
|
13
|
+
${$.ref(this.canvasRef)}
|
|
14
|
+
class="w-full h-full"
|
|
15
|
+
style="display: block;"
|
|
16
|
+
@pointermove=${this.handlePointerMove}
|
|
17
|
+
@pointerleave=${this.handlePointerLeave}
|
|
18
|
+
></canvas>
|
|
19
|
+
|
|
20
|
+
<!-- Tooltip -->
|
|
21
|
+
${this.showTooltip?p.html`
|
|
22
|
+
<div
|
|
23
|
+
class="absolute pointer-events-none transition-opacity duration-150 ${this.tooltipData.visible?"opacity-100":"opacity-0"}"
|
|
24
|
+
style="
|
|
25
|
+
left: ${this.tooltipData.x}px;
|
|
26
|
+
top: ${this.tooltipData.y-60}px;
|
|
27
|
+
transform: translateX(-50%);
|
|
28
|
+
"
|
|
29
|
+
>
|
|
30
|
+
<schmancy-surface elevation="3" rounded="all" class="px-3 py-2 min-w-max">
|
|
31
|
+
<schmancy-typography type="label" token="sm" class="text-surface-onVariant">
|
|
32
|
+
${this.tooltipData.label}
|
|
33
|
+
</schmancy-typography>
|
|
34
|
+
<schmancy-typography type="title" token="md" class="text-surface-on font-semibold">
|
|
35
|
+
${this.formatValue(this.tooltipData.value)}
|
|
36
|
+
</schmancy-typography>
|
|
37
|
+
${this.renderMetadata()}
|
|
38
|
+
</schmancy-surface>
|
|
39
|
+
</div>
|
|
40
|
+
`:""}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
`:p.html``}},c([o.property({type:Array})],exports.SchmancyAreaChart.prototype,"data",2),c([o.property({type:Number})],exports.SchmancyAreaChart.prototype,"height",2),c([o.property({type:Boolean})],exports.SchmancyAreaChart.prototype,"showGrid",2),c([o.property({type:Boolean})],exports.SchmancyAreaChart.prototype,"showLabels",2),c([o.property({type:Boolean})],exports.SchmancyAreaChart.prototype,"showTooltip",2),c([o.property({type:Number})],exports.SchmancyAreaChart.prototype,"peakCount",2),c([o.property({type:Number})],exports.SchmancyAreaChart.prototype,"animationDuration",2),c([o.property({type:Boolean})],exports.SchmancyAreaChart.prototype,"animated",2),c([o.property({type:String})],exports.SchmancyAreaChart.prototype,"valuePrefix",2),c([o.property({type:String})],exports.SchmancyAreaChart.prototype,"valueSuffix",2),c([o.property({type:Number})],exports.SchmancyAreaChart.prototype,"valueDecimals",2),c([o.property({type:Object})],exports.SchmancyAreaChart.prototype,"theme",2),c([o.state()],exports.SchmancyAreaChart.prototype,"tooltipData",2),c([o.state()],exports.SchmancyAreaChart.prototype,"animationProgress",2),c([o.state()],exports.SchmancyAreaChart.prototype,"isVisible",2),exports.SchmancyAreaChart=c([o.customElement("schmancy-area-chart")],exports.SchmancyAreaChart);var X=Object.defineProperty,J=Object.getOwnPropertyDescriptor,m=(e,t,i,a)=>{for(var s,r=a>1?void 0:a?J(t,i):t,h=e.length-1;h>=0;h--)(s=e[h])&&(r=(a?s(t,i,r):s(r))||r);return a&&r&&X(t,i,r),r};const O=["bg-primary","bg-secondary","bg-tertiary","bg-success","bg-warning","bg-error","bg-primary/70","bg-secondary/70","bg-tertiary/70","bg-success/70","bg-warning/70","bg-error/70","bg-primary/40","bg-secondary/40","bg-tertiary/40"];exports.SchmancyPills=class extends R.$LitElement(p.css`
|
|
44
|
+
:host {
|
|
45
|
+
display: block;
|
|
46
|
+
}
|
|
47
|
+
`){constructor(){super(...arguments),this.data=[],this.valuePrefix="",this.valueSuffix="",this.valueDecimals=2,this.showMedals=!0,this.showLegend=!0,this.animationDuration=500,this.animated=!0,this.labelWidth="w-14",this.valueWidth="w-20",this.animationProgress=0,this.isVisible=!1,this.categoryColorMap=new Map,this.observer=null,this.animationFrameId=null}connectedCallback(){super.connectedCallback(),this.setupIntersectionObserver()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}cleanup(){this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.observer&&(this.observer.disconnect(),this.observer=null)}setupIntersectionObserver(){this.observer=new IntersectionObserver(e=>{e[0].isIntersecting&&!this.isVisible&&(this.isVisible=!0,this.animated?this.startAnimation():this.animationProgress=1)},{threshold:.1})}firstUpdated(){this.observer&&this.observer.observe(this)}updated(e){super.updated(e),e.has("data")&&this.isVisible&&this.animated&&(this.animationProgress=0,this.startAnimation())}startAnimation(){const e=performance.now(),t=this.animationDuration,i=a=>{const s=a-e,r=Math.min(s/t,1);this.animationProgress=1-Math.pow(1-r,3),r<1&&this.isVisible&&(this.animationFrameId=requestAnimationFrame(i))};this.animationFrameId=requestAnimationFrame(i)}initializeCategoryColors(){const e=new Map,t=new Map;this.data.forEach(s=>{s.segments&&s.segments.forEach(r=>{e.set(r.label,(e.get(r.label)||0)+r.value),r.color&&!t.has(r.label)&&t.set(r.label,r.color)})});const i=Array.from(e.entries()).sort((s,r)=>r[1]-s[1]).map(([s])=>s);this.categoryColorMap.clear();let a=0;i.forEach(s=>{t.has(s)?this.categoryColorMap.set(s,t.get(s)):(this.categoryColorMap.set(s,O[a%O.length]),a++)})}getSegmentColor(e){return e.color?e.color:this.categoryColorMap.get(e.label)||"bg-primary"}formatValue(e){const t=e.toFixed(this.valueDecimals);return`${this.valuePrefix}${t}${this.valueSuffix}`}getMedalEmoji(e){return this.showMedals&&e?e===1?"🥇":e===2?"🥈":e===3?"🥉":"":""}getMaxValue(){return this.data.length===0?0:Math.max(...this.data.map(e=>e.value),1)}renderBar(e,t){const i=(t>0?e.value/t*100:0)*this.animationProgress;if(!e.segments||e.segments.length===0){const a=e.isPeak?"bg-success":e.isLow?"bg-tertiary opacity-70":e.value===0?"bg-tertiary/40":"bg-primary";return p.html`
|
|
48
|
+
<div
|
|
49
|
+
class="${a} h-full transition-all rounded-full"
|
|
50
|
+
style="width: ${Math.max(i,e.value>0?2:0)}%; transition-duration: ${this.animated?"0ms":"300ms"}"
|
|
51
|
+
title="${this.formatValue(e.value)}"
|
|
52
|
+
></div>
|
|
53
|
+
`}return p.html`
|
|
54
|
+
<div
|
|
55
|
+
class="h-full flex"
|
|
56
|
+
style="width: ${Math.max(i,2)}%; transition-duration: ${this.animated?"0ms":"300ms"}"
|
|
57
|
+
>
|
|
58
|
+
${D.repeat(e.segments,a=>a.label,(a,s)=>{const r=e.value>0?a.value/e.value*100:0,h=s>0?"ml-px":"",y=e.isPeak?"brightness-110":"",f=this.getSegmentColor(a);return p.html`
|
|
59
|
+
<div
|
|
60
|
+
class="${f} ${h} ${y} h-full transition-all
|
|
61
|
+
${s===0?"rounded-l-full":""}
|
|
62
|
+
${s===e.segments.length-1?"rounded-r-full":""}"
|
|
63
|
+
style="width: ${r}%"
|
|
64
|
+
title="${a.label}: ${this.formatValue(a.value)}"
|
|
65
|
+
></div>
|
|
66
|
+
`})}
|
|
67
|
+
</div>
|
|
68
|
+
`}renderLegend(){return this.showLegend&&this.categoryColorMap.size!==0?p.html`
|
|
69
|
+
<div class="flex flex-wrap gap-3 mt-4 pt-4 border-t border-outline-variant">
|
|
70
|
+
${D.repeat(Array.from(this.categoryColorMap.entries()),([e])=>e,([e,t])=>p.html`
|
|
71
|
+
<div class="flex items-center gap-1.5">
|
|
72
|
+
<div class="${t} w-3 h-3 rounded-sm"></div>
|
|
73
|
+
<schmancy-typography type="label" token="sm" class="text-surface-onVariant">
|
|
74
|
+
${e}
|
|
75
|
+
</schmancy-typography>
|
|
76
|
+
</div>
|
|
77
|
+
`)}
|
|
78
|
+
</div>
|
|
79
|
+
`:p.html``}render(){if(this.initializeCategoryColors(),!this.data||this.data.length===0)return p.html``;const e=this.getMaxValue();return p.html`
|
|
80
|
+
<div class="space-y-1">
|
|
81
|
+
${D.repeat(this.data,t=>t.label,t=>{const i=t.isPeak?"bg-success/10 rounded-lg":"",a=t.isPeak?"text-success font-bold":"text-surface-on";return p.html`
|
|
82
|
+
<div class="flex items-center gap-3 py-2 px-2 ${i}">
|
|
83
|
+
<!-- Label -->
|
|
84
|
+
<div class="${this.labelWidth} shrink-0 text-right">
|
|
85
|
+
<schmancy-typography type="label" token="md" class="${a}">
|
|
86
|
+
${t.label}
|
|
87
|
+
</schmancy-typography>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<!-- Medal -->
|
|
91
|
+
<div class="w-6 shrink-0 text-center">
|
|
92
|
+
${t.isPeak||t.rank&&t.rank<=3?p.html`<span class="text-sm">${this.getMedalEmoji(t.rank)}</span>`:""}
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<!-- Bar -->
|
|
96
|
+
<div class="flex-1 h-6 bg-secondary/15 rounded-full overflow-hidden">
|
|
97
|
+
${this.renderBar(t,e)}
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<!-- Value -->
|
|
101
|
+
<div class="${this.valueWidth} shrink-0 text-right">
|
|
102
|
+
<schmancy-typography type="label" token="md" class="${a}">
|
|
103
|
+
${this.formatValue(t.value)}
|
|
104
|
+
</schmancy-typography>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
`})}
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<!-- Legend -->
|
|
111
|
+
${this.renderLegend()}
|
|
112
|
+
`}},m([o.property({type:Array})],exports.SchmancyPills.prototype,"data",2),m([o.property({type:String})],exports.SchmancyPills.prototype,"valuePrefix",2),m([o.property({type:String})],exports.SchmancyPills.prototype,"valueSuffix",2),m([o.property({type:Number})],exports.SchmancyPills.prototype,"valueDecimals",2),m([o.property({type:Boolean})],exports.SchmancyPills.prototype,"showMedals",2),m([o.property({type:Boolean})],exports.SchmancyPills.prototype,"showLegend",2),m([o.property({type:Number})],exports.SchmancyPills.prototype,"animationDuration",2),m([o.property({type:Boolean})],exports.SchmancyPills.prototype,"animated",2),m([o.property({type:String})],exports.SchmancyPills.prototype,"labelWidth",2),m([o.property({type:String})],exports.SchmancyPills.prototype,"valueWidth",2),m([o.state()],exports.SchmancyPills.prototype,"animationProgress",2),m([o.state()],exports.SchmancyPills.prototype,"isVisible",2),m([o.state()],exports.SchmancyPills.prototype,"categoryColorMap",2),exports.SchmancyPills=m([o.customElement("schmancy-pills")],exports.SchmancyPills),exports.catmullRomSpline=T,exports.easeOutCubic=L,exports.hexToRgba=w;
|
|
113
|
+
//# sourceMappingURL=pills-MmHyBGQu.cjs.map
|