@mhmo91/schmancy 0.7.6 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/audio.md +241 -0
- package/ai/content-drawer.md +163 -70
- package/ai/details.md +309 -44
- package/ai/lightbox.md +381 -0
- package/ai/typography.md +75 -49
- package/dist/ai/audio.md +241 -0
- package/dist/ai/content-drawer.md +163 -70
- package/dist/ai/details.md +309 -44
- package/dist/ai/lightbox.md +381 -0
- package/dist/ai/typography.md +75 -49
- package/dist/{animated-text-1FDC-OTA.cjs → animated-text-Bc3qyXjp.cjs} +2 -2
- package/dist/{animated-text-1FDC-OTA.cjs.map → animated-text-Bc3qyXjp.cjs.map} +1 -1
- package/dist/{animated-text-1_latidd.js → animated-text-CNx6Pmlo.js} +3 -3
- package/dist/{animated-text-1_latidd.js.map → animated-text-CNx6Pmlo.js.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-CQq-Mh0Z.js → area.component-7mWxekxE.js} +104 -98
- package/dist/area.component-7mWxekxE.js.map +1 -0
- package/dist/area.component-CS_gSutH.cjs +12 -0
- package/dist/area.component-CS_gSutH.cjs.map +1 -0
- package/dist/area.js +1 -1
- package/dist/audio.cjs +2 -0
- package/dist/audio.cjs.map +1 -0
- package/dist/audio.js +9 -0
- package/dist/audio.js.map +1 -0
- package/dist/{autocomplete-DT9MFPEG.js → autocomplete-Ci4jo3Ur.js} +4 -4
- package/dist/{autocomplete-DT9MFPEG.js.map → autocomplete-Ci4jo3Ur.js.map} +1 -1
- package/dist/{autocomplete-auTO_M_w.cjs → autocomplete-y-IyzH4r.cjs} +2 -2
- package/dist/{autocomplete-auTO_M_w.cjs.map → autocomplete-y-IyzH4r.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-Dm_qg-n1.js → avatar-BdyuuIk7.js} +243 -258
- package/dist/avatar-BdyuuIk7.js.map +1 -0
- package/dist/avatar-DBfJucB9.cjs +273 -0
- package/dist/avatar-DBfJucB9.cjs.map +1 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-RNCKlx8b.js → boat-CowHieO2.js} +6 -6
- package/dist/{boat-RNCKlx8b.js.map → boat-CowHieO2.js.map} +1 -1
- package/dist/{boat-98He5-K8.cjs → boat-DkNUc1UO.cjs} +5 -5
- package/dist/{boat-98He5-K8.cjs.map → boat-DkNUc1UO.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/charts.cjs +2 -0
- package/dist/charts.cjs.map +1 -0
- package/dist/charts.js +9 -0
- package/dist/charts.js.map +1 -0
- package/dist/{checkbox-Bdn1_WJg.js → checkbox-BY4Sn8F2.js} +6 -6
- package/dist/{checkbox-Bdn1_WJg.js.map → checkbox-BY4Sn8F2.js.map} +1 -1
- package/dist/{checkbox-Dj06r6MD.cjs → checkbox-BvWcABPr.cjs} +2 -2
- package/dist/{checkbox-Dj06r6MD.cjs.map → checkbox-BvWcABPr.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-ByxcwPma.cjs → code-preview-BIFIJigy.cjs} +2 -2
- package/dist/{code-preview-ByxcwPma.cjs.map → code-preview-BIFIJigy.cjs.map} +1 -1
- package/dist/{code-preview-Br7zBkyM.js → code-preview-CYjmAxfs.js} +3 -3
- package/dist/{code-preview-Br7zBkyM.js.map → code-preview-CYjmAxfs.js.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{context-create-BvxbWTgj.js → context-create-B_S-sD5B.js} +69 -57
- package/dist/context-create-B_S-sD5B.js.map +1 -0
- package/dist/context-create-DTybDbZp.cjs +2 -0
- package/dist/context-create-DTybDbZp.cjs.map +1 -0
- package/dist/date-range-B80Ummtv.cjs +119 -0
- package/dist/date-range-B80Ummtv.cjs.map +1 -0
- package/dist/date-range-BdIqI7LC.js +639 -0
- package/dist/date-range-BdIqI7LC.js.map +1 -0
- package/dist/{date-range-inline-l2G48xTX.js → date-range-inline-Cnhs9atd.js} +3 -3
- package/dist/{date-range-inline-l2G48xTX.js.map → date-range-inline-Cnhs9atd.js.map} +1 -1
- package/dist/{date-range-inline-kbokz03Z.cjs → date-range-inline-Df8u6Ecy.cjs} +2 -2
- package/dist/{date-range-inline-kbokz03Z.cjs.map → date-range-inline-Df8u6Ecy.cjs.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-CCreUpYu.cjs → delay-BWsVHQib.cjs} +2 -2
- package/dist/delay-BWsVHQib.cjs.map +1 -0
- package/dist/{delay-Nu7RVtYd.js → delay-CCa9nN4A.js} +45 -45
- package/dist/delay-CCa9nN4A.js.map +1 -0
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/details-Bee5ya0L.js +100 -0
- package/dist/details-Bee5ya0L.js.map +1 -0
- package/dist/details-oaVHXU7U.cjs +55 -0
- package/dist/details-oaVHXU7U.cjs.map +1 -0
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/dialog-service-C86xTS8q.cjs +2 -0
- package/dist/dialog-service-C86xTS8q.cjs.map +1 -0
- package/dist/dialog-service-D9E3jLAR.js +118 -0
- package/dist/dialog-service-D9E3jLAR.js.map +1 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.component-BriB-kFi.cjs +48 -0
- package/dist/dialog.component-BriB-kFi.cjs.map +1 -0
- package/dist/dialog.component-CMUoCC7O.js +145 -0
- package/dist/dialog.component-CMUoCC7O.js.map +1 -0
- package/dist/dialog.js +7 -7
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +11 -10
- package/dist/directives.js.map +1 -1
- package/dist/{divider-CqyzFfn1.js → divider-B7DBbYFI.js} +3 -3
- package/dist/{divider-CqyzFfn1.js.map → divider-B7DBbYFI.js.map} +1 -1
- package/dist/{divider-0yHQS8kR.cjs → divider-Dl4TToQZ.cjs} +2 -2
- package/dist/{divider-0yHQS8kR.cjs.map → divider-Dl4TToQZ.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-BmHQE5-P.cjs → dropdown-content-C2W7OttQ.cjs} +2 -2
- package/dist/{dropdown-content-BmHQE5-P.cjs.map → dropdown-content-C2W7OttQ.cjs.map} +1 -1
- package/dist/{dropdown-content-iFlLupVo.js → dropdown-content-DzhOtilY.js} +3 -3
- package/dist/{dropdown-content-iFlLupVo.js.map → dropdown-content-DzhOtilY.js.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-CmAEJDMC.js → email-recipients-BWqZKo3m.js} +8 -7
- package/dist/{email-recipients-CmAEJDMC.js.map → email-recipients-BWqZKo3m.js.map} +1 -1
- package/dist/{email-recipients-Cioc3U0Z.cjs → email-recipients-Bh5VC0rc.cjs} +2 -2
- package/dist/{email-recipients-Cioc3U0Z.cjs.map → email-recipients-Bh5VC0rc.cjs.map} +1 -1
- package/dist/emotional-sounds-BRnFhww6.js +234 -0
- package/dist/emotional-sounds-BRnFhww6.js.map +1 -0
- package/dist/emotional-sounds-DVGhmoZf.cjs +2 -0
- package/dist/emotional-sounds-DVGhmoZf.cjs.map +1 -0
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/flex-53G-PJx7.js +183 -0
- package/dist/flex-53G-PJx7.js.map +1 -0
- package/dist/flex-DFSIy0t4.cjs +18 -0
- package/dist/flex-DFSIy0t4.cjs.map +1 -0
- package/dist/{form-CxrvY530.js → form-BtRK9bnp.js} +2 -2
- package/dist/{form-CxrvY530.js.map → form-BtRK9bnp.js.map} +1 -1
- package/dist/{form-DFDTspmH.cjs → form-Zq7g2JS8.cjs} +2 -2
- package/dist/{form-DFDTspmH.cjs.map → form-Zq7g2JS8.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-hZ2qP4iG.js → formField.mixin-2jSL7WF_.js} +2 -2
- package/dist/{formField.mixin-hZ2qP4iG.js.map → formField.mixin-2jSL7WF_.js.map} +1 -1
- package/dist/{formField.mixin-C7H5DaEl.cjs → formField.mixin-DkN2ufR_.cjs} +2 -2
- package/dist/{formField.mixin-C7H5DaEl.cjs.map → formField.mixin-DkN2ufR_.cjs.map} +1 -1
- package/dist/height-CfECBO2j.js +44 -0
- package/dist/height-CfECBO2j.js.map +1 -0
- package/dist/height-Z70qJYJK.cjs +2 -0
- package/dist/height-Z70qJYJK.cjs.map +1 -0
- package/dist/{icon-D0FAI5uJ.js → icon-B5qeYrDu.js} +17 -17
- package/dist/icon-B5qeYrDu.js.map +1 -0
- package/dist/icon-button-BpmGFjaR.cjs +70 -0
- package/dist/icon-button-BpmGFjaR.cjs.map +1 -0
- package/dist/icon-button-HSYaQBNF.js +164 -0
- package/dist/icon-button-HSYaQBNF.js.map +1 -0
- package/dist/icon-pU_cfmpD.cjs +49 -0
- package/dist/icon-pU_cfmpD.cjs.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +275 -250
- package/dist/index.js.map +1 -1
- package/dist/input-8G9YY9qv.cjs +51 -0
- package/dist/input-8G9YY9qv.cjs.map +1 -0
- package/dist/{input-DLnKAj3B.js → input-BJMF5Fyk.js} +35 -31
- package/dist/input-BJMF5Fyk.js.map +1 -0
- package/dist/{input-chip-C3EPsHcP.cjs → input-chip-CocdqTzr.cjs} +2 -2
- package/dist/{input-chip-C3EPsHcP.cjs.map → input-chip-CocdqTzr.cjs.map} +1 -1
- package/dist/{input-chip-dmqYCExV.js → input-chip-tbrw56ix.js} +2 -2
- package/dist/{input-chip-dmqYCExV.js.map → input-chip-tbrw56ix.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json-CvcloKQv.js +51 -0
- package/dist/json-CvcloKQv.js.map +1 -0
- package/dist/json-DPnyOA3K.cjs +12 -0
- package/dist/json-DPnyOA3K.cjs.map +1 -0
- package/dist/json.cjs +2 -0
- package/dist/json.cjs.map +1 -0
- package/dist/json.js +5 -0
- package/dist/json.js.map +1 -0
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +4 -3
- package/dist/layout.js.map +1 -1
- package/dist/lightbox-service-3mHqBKEh.cjs +202 -0
- package/dist/lightbox-service-3mHqBKEh.cjs.map +1 -0
- package/dist/lightbox-service-DxbYZAuv.js +458 -0
- package/dist/lightbox-service-DxbYZAuv.js.map +1 -0
- package/dist/lightbox.cjs +2 -0
- package/dist/lightbox.cjs.map +1 -0
- package/dist/lightbox.js +8 -0
- package/dist/lightbox.js.map +1 -0
- package/dist/{list-BegNkhOn.js → list-FWXmY-eQ.js} +2 -2
- package/dist/{list-BegNkhOn.js.map → list-FWXmY-eQ.js.map} +1 -1
- package/dist/{list-CLKiZ6lk.cjs → list-JjR7WOrd.cjs} +2 -2
- package/dist/{list-CLKiZ6lk.cjs.map → list-JjR7WOrd.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-CPQYJnK_.cjs → litElement.mixin-BVBdv0GP.cjs} +2 -2
- package/dist/{litElement.mixin-CPQYJnK_.cjs.map → litElement.mixin-BVBdv0GP.cjs.map} +1 -1
- package/dist/{litElement.mixin-DWDPaNoc.js → litElement.mixin-Wcu4yIIs.js} +2 -2
- package/dist/{litElement.mixin-DWDPaNoc.js.map → litElement.mixin-Wcu4yIIs.js.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-CUKZ6LrR.js → map-Br6xJFxG.js} +2 -2
- package/dist/{map-CUKZ6LrR.js.map → map-Br6xJFxG.js.map} +1 -1
- package/dist/{map-w4Kdtycx.cjs → map-D9R3OCne.cjs} +2 -2
- package/dist/{map-w4Kdtycx.cjs.map → map-D9R3OCne.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-CjdCchz8.js → media-BV_1DfcW.js} +2 -2
- package/dist/{media-CjdCchz8.js.map → media-BV_1DfcW.js.map} +1 -1
- package/dist/{media-DDNmuoV0.cjs → media-DibPwAjJ.cjs} +2 -2
- package/dist/{media-DDNmuoV0.cjs.map → media-DibPwAjJ.cjs.map} +1 -1
- package/dist/menu-HKqlq99V.js +60 -0
- package/dist/{menu-ofiPDY2a.js.map → menu-HKqlq99V.js.map} +1 -1
- package/dist/{menu-D9-9vipn.cjs → menu-vNrV-Nuq.cjs} +4 -6
- package/dist/{menu-D9-9vipn.cjs.map → menu-vNrV-Nuq.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +3 -3
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/{navigation-rail-CEDLJTrH.cjs → navigation-rail-D1o3qDe_.cjs} +15 -17
- package/dist/navigation-rail-D1o3qDe_.cjs.map +1 -0
- package/dist/{navigation-rail-weSW6BCv.js → navigation-rail-DKXumnmt.js} +30 -32
- package/dist/navigation-rail-DKXumnmt.js.map +1 -0
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/notification-service-B5ljba4P.js +155 -0
- package/dist/notification-service-B5ljba4P.js.map +1 -0
- package/dist/notification-service-ICRT05L0.cjs +19 -0
- package/dist/notification-service-ICRT05L0.cjs.map +1 -0
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +6 -8
- package/dist/{notify-Ci0HrUIo.js → notify-B9CpO1Ru.js} +2 -2
- package/dist/notify-B9CpO1Ru.js.map +1 -0
- package/dist/{notify-aasSKQGA.cjs → notify-NX-dl60E.cjs} +2 -2
- package/dist/notify-NX-dl60E.cjs.map +1 -0
- package/dist/{option-Cs4e3CzF.js → option-B4JKMrLg.js} +2 -2
- package/dist/{option-Cs4e3CzF.js.map → option-B4JKMrLg.js.map} +1 -1
- package/dist/{option-Uze_q9Ef.cjs → option-epyXLWoY.cjs} +2 -2
- package/dist/{option-Uze_q9Ef.cjs.map → option-epyXLWoY.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/page-Bmi1QHtq.cjs +20 -0
- package/dist/page-Bmi1QHtq.cjs.map +1 -0
- package/dist/page-BpygEntU.js +48 -0
- package/dist/page-BpygEntU.js.map +1 -0
- package/dist/page.cjs +2 -0
- package/dist/page.cjs.map +1 -0
- package/dist/page.js +5 -0
- package/dist/page.js.map +1 -0
- package/dist/{payment-card-form-rJCPUtWE.cjs → payment-card-form-3kAXDbXf.cjs} +2 -2
- package/dist/{payment-card-form-rJCPUtWE.cjs.map → payment-card-form-3kAXDbXf.cjs.map} +1 -1
- package/dist/{payment-card-form-BLoUTYiB.js → payment-card-form-BxkHuSls.js} +3 -3
- package/dist/{payment-card-form-BLoUTYiB.js.map → payment-card-form-BxkHuSls.js.map} +1 -1
- package/dist/pills-C3fIvfn8.js +346 -0
- package/dist/pills-C3fIvfn8.js.map +1 -0
- package/dist/pills-MmHyBGQu.cjs +113 -0
- package/dist/pills-MmHyBGQu.cjs.map +1 -0
- package/dist/progress-0POmJs5o.js +59 -0
- package/dist/progress-0POmJs5o.js.map +1 -0
- package/dist/progress-qx8jtrOA.cjs +35 -0
- package/dist/progress-qx8jtrOA.cjs.map +1 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/qr-scanner-DQq-WLyo.cjs +29 -0
- package/dist/qr-scanner-DQq-WLyo.cjs.map +1 -0
- package/dist/qr-scanner-jwOSrD0N.js +743 -0
- package/dist/qr-scanner-jwOSrD0N.js.map +1 -0
- package/dist/qr-scanner.cjs +2 -0
- package/dist/qr-scanner.cjs.map +1 -0
- package/dist/qr-scanner.js +5 -0
- package/dist/qr-scanner.js.map +1 -0
- package/dist/{radio-button-CaDaw5VH.js → radio-button-B0EUK_wg.js} +3 -3
- package/dist/{radio-button-CaDaw5VH.js.map → radio-button-B0EUK_wg.js.map} +1 -1
- package/dist/{radio-button-BAS7gKmA.cjs → radio-button-DraEYR2R.cjs} +2 -2
- package/dist/{radio-button-BAS7gKmA.cjs.map → radio-button-DraEYR2R.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/ripple-BgJXbNSP.js +124 -0
- package/dist/ripple-BgJXbNSP.js.map +1 -0
- package/dist/ripple-x6sTX02K.cjs +16 -0
- package/dist/ripple-x6sTX02K.cjs.map +1 -0
- package/dist/{schmancy-steps-container-wQsksygx.cjs → schmancy-steps-container-B5aiqgMA.cjs} +2 -2
- package/dist/{schmancy-steps-container-wQsksygx.cjs.map → schmancy-steps-container-B5aiqgMA.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-BInNput3.js → schmancy-steps-container-C2StAA5K.js} +3 -3
- package/dist/{schmancy-steps-container-BInNput3.js.map → schmancy-steps-container-C2StAA5K.js.map} +1 -1
- package/dist/scroll-BqT7bvhu.cjs +27 -0
- package/dist/scroll-BqT7bvhu.cjs.map +1 -0
- package/dist/scroll-Bu-vAg3d.js +87 -0
- package/dist/scroll-Bu-vAg3d.js.map +1 -0
- package/dist/{select-_2Ag_znm.cjs → select-HiEGJvOX.cjs} +2 -2
- package/dist/select-HiEGJvOX.cjs.map +1 -0
- package/dist/{select-ApLZefMf.js → select-i-uKur-W.js} +5 -4
- package/dist/select-i-uKur-W.js.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{selector-hook-Cok22ifx.cjs → selector-hook-9w2auh2O.cjs} +2 -2
- package/dist/{selector-hook-Cok22ifx.cjs.map → selector-hook-9w2auh2O.cjs.map} +1 -1
- package/dist/{selector-hook-l2fe2UO5.js → selector-hook-CHV4kDMd.js} +3 -3
- package/dist/{selector-hook-l2fe2UO5.js.map → selector-hook-CHV4kDMd.js.map} +1 -1
- package/dist/{sheet-DovyNsok.js → sheet-B1g7E4dQ.js} +5 -5
- package/dist/{sheet-DovyNsok.js.map → sheet-B1g7E4dQ.js.map} +1 -1
- package/dist/{sheet-wjDOQ8Hs.cjs → sheet-BbrRW0S5.cjs} +2 -2
- package/dist/{sheet-wjDOQ8Hs.cjs.map → sheet-BbrRW0S5.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-BvOiOFMm.js → sheet.service-4etIM-p6.js} +20 -18
- package/dist/sheet.service-4etIM-p6.js.map +1 -0
- package/dist/sheet.service-BiRZjCdN.cjs +2 -0
- package/dist/sheet.service-BiRZjCdN.cjs.map +1 -0
- package/dist/{slider-CeVgx4pL.js → slider-8E3Wad0t.js} +3 -3
- package/dist/{slider-CeVgx4pL.js.map → slider-8E3Wad0t.js.map} +1 -1
- package/dist/{slider-BgJccHrg.cjs → slider-VYnbIRH2.cjs} +2 -2
- package/dist/{slider-BgJccHrg.cjs.map → slider-VYnbIRH2.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/sound.service-Nza4c6wv.js +102 -0
- package/dist/sound.service-Nza4c6wv.js.map +1 -0
- package/dist/sound.service-eRirZw59.cjs +2 -0
- package/dist/sound.service-eRirZw59.cjs.map +1 -0
- package/dist/{spinner-Brq1TenP.js → spinner-CKm13CKN.js} +15 -12
- package/dist/spinner-CKm13CKN.js.map +1 -0
- package/dist/{spinner-BKeA2bdB.cjs → spinner-DJgcI5wr.cjs} +9 -9
- package/dist/spinner-DJgcI5wr.cjs.map +1 -0
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +2 -2
- package/dist/{suggestion-chip-CWBSzu7C.js → suggestion-chip-6njXvvHm.js} +50 -46
- package/dist/suggestion-chip-6njXvvHm.js.map +1 -0
- package/dist/{suggestion-chip-dq20NKWy.cjs → suggestion-chip-DdLfqk7o.cjs} +18 -23
- package/dist/suggestion-chip-DdLfqk7o.cjs.map +1 -0
- package/dist/{surface-Bf8pvmdG.js → surface-BYU3l_Q2.js} +12 -11
- package/dist/surface-BYU3l_Q2.js.map +1 -0
- package/dist/{surface-fEPJ-cuu.cjs → surface-DcqbWGub.cjs} +5 -4
- package/dist/surface-DcqbWGub.cjs.map +1 -0
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-DEnB9_Rf.cjs → table-C9fzDjjk.cjs} +2 -2
- package/dist/{table-DEnB9_Rf.cjs.map → table-C9fzDjjk.cjs.map} +1 -1
- package/dist/{table-MLd3oXm6.js → table-Dq12ollZ.js} +3 -3
- package/dist/{table-MLd3oXm6.js.map → table-Dq12ollZ.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-CXVHOR5X.cjs → tabs-compatibility-Dwtjfkcf.cjs} +2 -2
- package/dist/{tabs-compatibility-CXVHOR5X.cjs.map → tabs-compatibility-Dwtjfkcf.cjs.map} +1 -1
- package/dist/{tabs-compatibility-KWKzYolX.js → tabs-compatibility-wnzlHtln.js} +2 -2
- package/dist/{tabs-compatibility-KWKzYolX.js.map → tabs-compatibility-wnzlHtln.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-Ddt05Frc.js +67 -0
- package/dist/{tailwind.mixin-DIW0B_of.js.map → tailwind.mixin-Ddt05Frc.js.map} +1 -1
- package/dist/tailwind.mixin-UijsBrYW.cjs +2 -0
- package/dist/{tailwind.mixin-3TPVvhYf.cjs.map → tailwind.mixin-UijsBrYW.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/textarea-DGmsw1B_.cjs +44 -0
- package/dist/{textarea-B7arkA7y.cjs.map → textarea-DGmsw1B_.cjs.map} +1 -1
- package/dist/{textarea-BK1m_CFR.js → textarea-Vd3zayJZ.js} +4 -3
- package/dist/{textarea-BK1m_CFR.js.map → textarea-Vd3zayJZ.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-BTKwL3oC.cjs → theme-button-DG_Xwg9H.cjs} +2 -2
- package/dist/{theme-button-BTKwL3oC.cjs.map → theme-button-DG_Xwg9H.cjs.map} +1 -1
- package/dist/{theme-button-C6kk8bay.js → theme-button-rGpEW_xS.js} +2 -2
- package/dist/{theme-button-C6kk8bay.js.map → theme-button-rGpEW_xS.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/{theme-controller-boat-BK59LqH9.js → theme-controller-boat-B1fjcqJI.js} +420 -228
- package/dist/theme-controller-boat-B1fjcqJI.js.map +1 -0
- package/dist/theme-controller-boat-pLzK5zxL.cjs +178 -0
- package/dist/theme-controller-boat-pLzK5zxL.cjs.map +1 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +13 -11
- package/dist/{timezone-nbn0o5GC.cjs → timezone-BhUaIAV7.cjs} +2 -2
- package/dist/{timezone-nbn0o5GC.cjs.map → timezone-BhUaIAV7.cjs.map} +1 -1
- package/dist/{timezone-D_skWX6Z.js → timezone-IQkwr6Oh.js} +3 -3
- package/dist/{timezone-D_skWX6Z.js.map → timezone-IQkwr6Oh.js.map} +1 -1
- package/dist/{tooltip-Btl0IKYC.js → tooltip-CwaiZC8f.js} +2 -2
- package/dist/{tooltip-Btl0IKYC.js.map → tooltip-CwaiZC8f.js.map} +1 -1
- package/dist/{tooltip-DyuMJEjL.cjs → tooltip-iEvxKg8g.cjs} +2 -2
- package/dist/{tooltip-DyuMJEjL.cjs.map → tooltip-iEvxKg8g.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-N4Y6MoQe.cjs → tree-Bclu6uvv.cjs} +2 -2
- package/dist/{tree-N4Y6MoQe.cjs.map → tree-Bclu6uvv.cjs.map} +1 -1
- package/dist/{tree-B_2eIFQi.js → tree-D9EbEsxn.js} +2 -2
- package/dist/{tree-B_2eIFQi.js.map → tree-D9EbEsxn.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-Blyrk_4c.js → typewriter-BjDPgRlj.js} +5 -5
- package/dist/{typewriter-Blyrk_4c.js.map → typewriter-BjDPgRlj.js.map} +1 -1
- package/dist/{typewriter-CFQAeOaw.cjs → typewriter-Bscwd-36.cjs} +4 -4
- package/dist/{typewriter-CFQAeOaw.cjs.map → typewriter-Bscwd-36.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-DjGWK58I.js → typography-CConBBFH.js} +13 -53
- package/dist/typography-CConBBFH.js.map +1 -0
- package/dist/{typography-DsIU0TGe.cjs → typography-DLGT3DGz.cjs} +3 -46
- package/dist/typography-DLGT3DGz.cjs.map +1 -0
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/mixins/tailwind.css +37 -6
- package/package.json +21 -20
- package/types/src/area/area.service.d.ts +1 -1
- package/types/src/area/router.types.d.ts +1 -0
- package/types/src/audio/emotional-sounds.d.ts +122 -0
- package/types/src/audio/index.d.ts +30 -0
- package/types/src/audio/sound.service.d.ts +111 -0
- package/types/src/avatar.d.ts +10 -1
- package/types/src/busy/spinner.d.ts +6 -1
- package/types/src/button/button.d.ts +15 -2
- package/types/src/button/icon-button.d.ts +1 -1
- package/types/src/charts/area-chart.d.ts +58 -0
- package/types/src/charts/index.d.ts +4 -0
- package/types/src/charts/pills.d.ts +51 -0
- package/types/src/charts/types.d.ts +62 -0
- package/types/src/charts/utils.d.ts +28 -0
- package/types/src/checkbox/checkbox.d.ts +3 -2
- package/types/src/chips/chips.d.ts +2 -0
- package/types/src/content-drawer/drawer.service.d.ts +1 -7
- package/types/src/date-range/date-range-dialog.d.ts +16 -0
- package/types/src/date-range/date-range.d.ts +1 -1
- package/types/src/details/details.d.ts +8 -3
- package/types/src/dialog/dailog.d.ts +1 -5
- package/types/src/dialog/dialog-base.mixin.d.ts +26 -0
- package/types/src/dialog/dialog-service.d.ts +3 -66
- package/types/src/dialog/dialog.component.d.ts +63 -30
- package/types/src/dialog/index.d.ts +1 -3
- package/types/src/directives/height.d.ts +11 -6
- package/types/src/icons/icon.d.ts +17 -0
- package/types/src/index.d.ts +6 -0
- package/types/src/input/input.d.ts +13 -9
- package/types/src/json/index.d.ts +1 -0
- package/types/src/json/json.d.ts +15 -0
- package/types/src/lightbox/flip-directive.d.ts +29 -0
- package/types/src/lightbox/flip.directive.d.ts +22 -0
- package/types/src/lightbox/index.d.ts +4 -0
- package/types/src/lightbox/lightbox-service.d.ts +24 -0
- package/types/src/lightbox/lightbox.d.ts +34 -0
- package/types/src/lightbox/lightbox.directive.d.ts +30 -0
- package/types/src/nav-drawer/appbar.d.ts +0 -5
- package/types/src/nav-drawer/drawer.d.ts +1 -32
- package/types/src/notification/index.d.ts +1 -3
- package/types/src/notification/notification-service.d.ts +13 -1
- package/types/src/notification/notification.d.ts +13 -12
- package/types/src/notification/notify.d.ts +1 -1
- package/types/src/page/index.d.ts +1 -0
- package/types/src/page/page.d.ts +31 -0
- package/types/src/progress/progress.d.ts +2 -2
- package/types/src/qr-scanner/index.d.ts +1 -0
- package/types/src/qr-scanner/qr-scanner.d.ts +26 -0
- package/types/src/select/select.d.ts +1 -1
- package/types/src/theme/index.d.ts +1 -0
- package/types/src/theme/theme-audio-player.d.ts +100 -0
- package/types/src/theme/theme-controller-boat.d.ts +1 -0
- package/types/src/theme/theme.component.d.ts +1 -1
- package/types/src/types/index.d.ts +1 -0
- package/types/src/types/mood-audio.types.d.ts +173 -0
- package/types/src/typography/typography.d.ts +1 -0
- package/dist/area.component-CQq-Mh0Z.js.map +0 -1
- package/dist/area.component-Ciw7vGsx.cjs +0 -12
- package/dist/area.component-Ciw7vGsx.cjs.map +0 -1
- package/dist/avatar-Bo8kRnA-.cjs +0 -288
- package/dist/avatar-Bo8kRnA-.cjs.map +0 -1
- package/dist/avatar-Dm_qg-n1.js.map +0 -1
- package/dist/context-create-BJkkLr1D.cjs +0 -2
- package/dist/context-create-BJkkLr1D.cjs.map +0 -1
- package/dist/context-create-BvxbWTgj.js.map +0 -1
- package/dist/date-range-VkIMcQdT.js +0 -664
- package/dist/date-range-VkIMcQdT.js.map +0 -1
- package/dist/date-range-xYUr_KKx.cjs +0 -134
- package/dist/date-range-xYUr_KKx.cjs.map +0 -1
- package/dist/delay-CCreUpYu.cjs.map +0 -1
- package/dist/delay-Nu7RVtYd.js.map +0 -1
- package/dist/details-CjQrqBli.cjs +0 -98
- package/dist/details-CjQrqBli.cjs.map +0 -1
- package/dist/details-DVIWpEsI.js +0 -137
- package/dist/details-DVIWpEsI.js.map +0 -1
- package/dist/dialog-content-BgxKi73O.js +0 -256
- package/dist/dialog-content-BgxKi73O.js.map +0 -1
- package/dist/dialog-content-CM3-RXQQ.cjs +0 -85
- package/dist/dialog-content-CM3-RXQQ.cjs.map +0 -1
- package/dist/dialog-service-B4nR8Em5.cjs +0 -2
- package/dist/dialog-service-B4nR8Em5.cjs.map +0 -1
- package/dist/dialog-service-Bege4HF4.js +0 -140
- package/dist/dialog-service-Bege4HF4.js.map +0 -1
- package/dist/flex-BEB1yuMF.cjs +0 -43
- package/dist/flex-BEB1yuMF.cjs.map +0 -1
- package/dist/flex-BgcbHlPo.js +0 -260
- package/dist/flex-BgcbHlPo.js.map +0 -1
- package/dist/icon-D0FAI5uJ.js.map +0 -1
- package/dist/icon-DJnGMAQ2.cjs +0 -49
- package/dist/icon-DJnGMAQ2.cjs.map +0 -1
- package/dist/icon-button-CSZtSmOy.cjs +0 -65
- package/dist/icon-button-CSZtSmOy.cjs.map +0 -1
- package/dist/icon-button-CbgQp3AL.js +0 -156
- package/dist/icon-button-CbgQp3AL.js.map +0 -1
- package/dist/input-DLnKAj3B.js.map +0 -1
- package/dist/input-wZ6ORWru.cjs +0 -51
- package/dist/input-wZ6ORWru.cjs.map +0 -1
- package/dist/menu-ofiPDY2a.js +0 -61
- package/dist/navigation-rail-CEDLJTrH.cjs.map +0 -1
- package/dist/navigation-rail-weSW6BCv.js.map +0 -1
- package/dist/notification-service-B4nvP2Jc.js +0 -532
- package/dist/notification-service-B4nvP2Jc.js.map +0 -1
- package/dist/notification-service-B_pa74hl.cjs +0 -143
- package/dist/notification-service-B_pa74hl.cjs.map +0 -1
- package/dist/notify-Ci0HrUIo.js.map +0 -1
- package/dist/notify-aasSKQGA.cjs.map +0 -1
- package/dist/progress-B1f3y-Mf.js +0 -58
- package/dist/progress-B1f3y-Mf.js.map +0 -1
- package/dist/progress-DdBHNIMT.cjs +0 -35
- package/dist/progress-DdBHNIMT.cjs.map +0 -1
- package/dist/ripple-QoNZUUw_.js +0 -148
- package/dist/ripple-QoNZUUw_.js.map +0 -1
- package/dist/ripple-Ujq_REH4.cjs +0 -16
- package/dist/ripple-Ujq_REH4.cjs.map +0 -1
- package/dist/select-ApLZefMf.js.map +0 -1
- package/dist/select-_2Ag_znm.cjs.map +0 -1
- package/dist/sheet.service-BvOiOFMm.js.map +0 -1
- package/dist/sheet.service-DfHrOxyc.cjs +0 -2
- package/dist/sheet.service-DfHrOxyc.cjs.map +0 -1
- package/dist/spinner-BKeA2bdB.cjs.map +0 -1
- package/dist/spinner-Brq1TenP.js.map +0 -1
- package/dist/suggestion-chip-CWBSzu7C.js.map +0 -1
- package/dist/suggestion-chip-dq20NKWy.cjs.map +0 -1
- package/dist/surface-Bf8pvmdG.js.map +0 -1
- package/dist/surface-fEPJ-cuu.cjs.map +0 -1
- package/dist/tailwind.mixin-3TPVvhYf.cjs +0 -2
- package/dist/tailwind.mixin-DIW0B_of.js +0 -67
- package/dist/textarea-B7arkA7y.cjs +0 -44
- package/dist/theme-controller-boat-BK59LqH9.js.map +0 -1
- package/dist/theme-controller-boat-Y5QXwJxW.cjs +0 -64
- package/dist/theme-controller-boat-Y5QXwJxW.cjs.map +0 -1
- package/dist/typography-DjGWK58I.js.map +0 -1
- package/dist/typography-DsIU0TGe.cjs.map +0 -1
- package/types/src/notification/notification-audio-generator.d.ts +0 -45
- package/types/src/notification/notification-audio.d.ts +0 -79
- package/types/src/notification/notification-container.d.ts +0 -48
|
@@ -1,532 +0,0 @@
|
|
|
1
|
-
import { fromEvent as x, takeUntil as T } from "rxjs";
|
|
2
|
-
import "rxjs/operators";
|
|
3
|
-
import { classMap as S } from "lit/directives/class-map.js";
|
|
4
|
-
import { styleMap as A } from "lit/directives/style-map.js";
|
|
5
|
-
import { property as h, state as g, customElement as _ } from "lit/decorators.js";
|
|
6
|
-
import "./tailwind.mixin-DIW0B_of.js";
|
|
7
|
-
import { $ as C } from "./litElement.mixin-DWDPaNoc.js";
|
|
8
|
-
import { c as V } from "./ripple-QoNZUUw_.js";
|
|
9
|
-
import "lit/directives/guard.js";
|
|
10
|
-
import { S as l } from "./theme.interface-BLfE5J_1.js";
|
|
11
|
-
import { html as p } from "lit";
|
|
12
|
-
import "./progress-B1f3y-Mf.js";
|
|
13
|
-
import { repeat as k } from "lit/directives/repeat.js";
|
|
14
|
-
var $ = Object.defineProperty, R = Object.getOwnPropertyDescriptor, d = (o, t, e, i) => {
|
|
15
|
-
for (var s, n = i > 1 ? void 0 : i ? R(t, e) : t, a = o.length - 1; a >= 0; a--) (s = o[a]) && (n = (i ? s(t, e, n) : s(n)) || n);
|
|
16
|
-
return i && n && $(t, e, n), n;
|
|
17
|
-
};
|
|
18
|
-
let u = class extends C(':host{display:block;margin-bottom:10px}:host:last-child{margin-bottom:0}.notification{width:100%;max-width:400px;box-shadow:var(--schmancy-sys-elevation-2);overflow:hidden;transform:translate(0);opacity:1;transition:transform .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1);background-color:var(--schmancy-sys-color-surface-container);color:var(--schmancy-sys-color-surface-on);border-radius:16px;position:relative}.notification:before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(180deg,#ffffff14,#fff0);z-index:1}.notification.info{border-left:4px solid var(--schmancy-sys-color-primary-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-primary-container) 10%)}.notification.success{border-left:4px solid var(--schmancy-sys-color-success-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-success-container) 10%)}.notification.warning{border-left:4px solid var(--schmancy-sys-color-tertiary-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-tertiary-container) 10%)}.notification.error{border-left:4px solid var(--schmancy-sys-color-error-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-error-container) 10%)}.notification.closing{transform:translate(120%);opacity:0}.notification .notification-content{display:flex;padding:18px 20px;align-items:flex-start;position:relative;z-index:2}.notification .icon-container{flex-shrink:0;margin-right:14px;display:flex;align-items:center;justify-content:center;border-radius:50%;width:28px;height:28px;position:relative}.notification .content{flex:1;min-width:0;display:flex;flex-direction:column}.notification .title{font-weight:500;font-size:16px;line-height:1.5;margin-bottom:2px;word-break:break-word;letter-spacing:.15px}.notification .message{font-size:14px;line-height:1.5;word-break:break-word;letter-spacing:.25px;opacity:.92}.notification .close-button{background:transparent;border:none;cursor:pointer;color:var(--schmancy-sys-color-surface-onVariant);padding:8px;margin-left:8px;margin-right:-4px;margin-top:-4px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,transform .2s ease}.notification .close-button:hover{background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-onVariant) 8%,transparent);transform:scale(1.05)}.notification .close-button:active{transform:scale(.95)}.notification .close-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--schmancy-sys-color-primary-default)}') {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments), this.title = "", this.message = "", this.type = "info", this.closable = !0, this.duration = 5e3, this.id = `notification-${Date.now()}-${Math.floor(1e4 * Math.random())}`, this.playSound = !0, this.showProgress = !1, this._visible = !0, this._progress = 100, this._hovered = !1, this._closing = !1;
|
|
21
|
-
}
|
|
22
|
-
connectedCallback() {
|
|
23
|
-
super.connectedCallback(), this.duration > 0 && this._startAutoCloseTimer(), this.playSound && this._playSound();
|
|
24
|
-
}
|
|
25
|
-
disconnectedCallback() {
|
|
26
|
-
this._clearTimers(), super.disconnectedCallback();
|
|
27
|
-
}
|
|
28
|
-
updated(o) {
|
|
29
|
-
super.updated(o), o.has("duration") && this.duration > 0 && (this._clearTimers(), this._startAutoCloseTimer());
|
|
30
|
-
}
|
|
31
|
-
_startAutoCloseTimer() {
|
|
32
|
-
if (this.duration <= 0) return;
|
|
33
|
-
const o = Date.now() + this.duration;
|
|
34
|
-
this._autoCloseTimer = window.setTimeout(() => {
|
|
35
|
-
this.close();
|
|
36
|
-
}, this.duration), this._progressTimer = window.setInterval(() => {
|
|
37
|
-
if (this._hovered) return;
|
|
38
|
-
const t = Date.now(), e = Math.max(0, o - t);
|
|
39
|
-
this._progress = e / this.duration * 100, e <= 0 && this._clearTimers();
|
|
40
|
-
}, 16);
|
|
41
|
-
}
|
|
42
|
-
_clearTimers() {
|
|
43
|
-
this._autoCloseTimer && (clearTimeout(this._autoCloseTimer), this._autoCloseTimer = void 0), this._progressTimer && (clearInterval(this._progressTimer), this._progressTimer = void 0);
|
|
44
|
-
}
|
|
45
|
-
_pauseTimers() {
|
|
46
|
-
this._clearTimers();
|
|
47
|
-
}
|
|
48
|
-
_resumeTimers() {
|
|
49
|
-
if (this.duration > 0) {
|
|
50
|
-
const o = this._progress / 100 * this.duration;
|
|
51
|
-
if (o > 0) {
|
|
52
|
-
this._autoCloseTimer = window.setTimeout(() => {
|
|
53
|
-
this.close();
|
|
54
|
-
}, o);
|
|
55
|
-
const t = Date.now() + o;
|
|
56
|
-
this._progressTimer = window.setInterval(() => {
|
|
57
|
-
if (this._hovered) return;
|
|
58
|
-
const e = Date.now(), i = Math.max(0, t - e);
|
|
59
|
-
this._progress = i / o * 100, i <= 0 && this._clearTimers();
|
|
60
|
-
}, 16);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
_playSound() {
|
|
65
|
-
this.dispatchEvent(new CustomEvent("playsound", { detail: { type: this.type }, bubbles: !0, composed: !0 }));
|
|
66
|
-
}
|
|
67
|
-
_handleMouseEnter() {
|
|
68
|
-
this._hovered = !0, this._pauseTimers();
|
|
69
|
-
}
|
|
70
|
-
_handleMouseLeave() {
|
|
71
|
-
this._hovered = !1, this._resumeTimers();
|
|
72
|
-
}
|
|
73
|
-
close() {
|
|
74
|
-
this._closing || (this._closing = !0, this._clearTimers(), this._visible = !1, setTimeout(() => {
|
|
75
|
-
this.dispatchEvent(new CustomEvent("close", { detail: { id: this.id }, bubbles: !0, composed: !0 }));
|
|
76
|
-
}, 300));
|
|
77
|
-
}
|
|
78
|
-
render() {
|
|
79
|
-
if (!this._visible && this._closing) return p``;
|
|
80
|
-
const o = this._getTypeStyles(), t = this._hovered ? "3" : "2";
|
|
81
|
-
return p`
|
|
82
|
-
<div
|
|
83
|
-
class=${S({ notification: !0, closing: this._closing, [this.type]: !0 })}
|
|
84
|
-
role="alert"
|
|
85
|
-
style=${A({ transform: this._closing ? "translateX(120%)" : "translateX(0)", opacity: this._closing ? "0" : "1", boxShadow: `var(--schmancy-sys-elevation-${t})`, transition: "transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease" })}
|
|
86
|
-
@mouseenter=${this._handleMouseEnter}
|
|
87
|
-
@mouseleave=${this._handleMouseLeave}
|
|
88
|
-
>
|
|
89
|
-
<div class="notification-content">
|
|
90
|
-
<div
|
|
91
|
-
class="icon-container"
|
|
92
|
-
${V({ color: o.iconColor, bgColor: `color-mix(in srgb, ${o.iconColor} 10%, transparent)` })}
|
|
93
|
-
>
|
|
94
|
-
${o.icon}
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
<div class="content">
|
|
98
|
-
${this.title ? p`
|
|
99
|
-
<div
|
|
100
|
-
class="title"
|
|
101
|
-
style=${A({ color: this.type === "info" ? `color-mix(in srgb, ${l.sys.color.primary.default} 90%, ${l.sys.color.surface.on} 10%)` : this.type === "success" ? `color-mix(in srgb, ${l.sys.color.success.default} 90%, ${l.sys.color.surface.on} 10%)` : this.type === "warning" ? `color-mix(in srgb, ${l.sys.color.tertiary.default} 90%, ${l.sys.color.surface.on} 10%)` : `color-mix(in srgb, ${l.sys.color.error.default} 90%, ${l.sys.color.surface.on} 10%)` })}
|
|
102
|
-
>
|
|
103
|
-
${this.title}
|
|
104
|
-
</div>
|
|
105
|
-
` : ""}
|
|
106
|
-
|
|
107
|
-
<div class="message">${this.message}</div>
|
|
108
|
-
</div>
|
|
109
|
-
|
|
110
|
-
${this.closable ? p`
|
|
111
|
-
<button
|
|
112
|
-
class="close-button"
|
|
113
|
-
aria-label="Close notification"
|
|
114
|
-
@click=${this.close}
|
|
115
|
-
style=${A({ color: this.type === "info" ? l.sys.color.surface.onVariant : `color-mix(in srgb, ${o.iconColor} 80%, ${l.sys.color.surface.onVariant} 20%)` })}
|
|
116
|
-
>
|
|
117
|
-
<svg
|
|
118
|
-
width="18"
|
|
119
|
-
height="18"
|
|
120
|
-
viewBox="0 0 24 24"
|
|
121
|
-
fill="none"
|
|
122
|
-
stroke="currentColor"
|
|
123
|
-
stroke-width="2"
|
|
124
|
-
stroke-linecap="round"
|
|
125
|
-
stroke-linejoin="round"
|
|
126
|
-
>
|
|
127
|
-
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
128
|
-
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
129
|
-
</svg>
|
|
130
|
-
</button>
|
|
131
|
-
` : ""}
|
|
132
|
-
</div>
|
|
133
|
-
|
|
134
|
-
${this.showProgress || this.duration > 0 ? p`
|
|
135
|
-
<schmancy-progress
|
|
136
|
-
style="position: absolute; bottom: 0; left: 0; right: 0; width: 100%;"
|
|
137
|
-
size="sm"
|
|
138
|
-
.color=${this.type === "error" ? "error" : this.type === "success" ? "success" : "primary"}
|
|
139
|
-
?indeterminate=${this.showProgress}
|
|
140
|
-
.value=${this.showProgress ? 0 : this._progress}
|
|
141
|
-
.max=${100}
|
|
142
|
-
></schmancy-progress>
|
|
143
|
-
` : ""}
|
|
144
|
-
</div>
|
|
145
|
-
`;
|
|
146
|
-
}
|
|
147
|
-
_getTypeStyles() {
|
|
148
|
-
switch (this.type) {
|
|
149
|
-
case "success":
|
|
150
|
-
return { icon: p`
|
|
151
|
-
<svg
|
|
152
|
-
width="20"
|
|
153
|
-
height="20"
|
|
154
|
-
viewBox="0 0 24 24"
|
|
155
|
-
fill="none"
|
|
156
|
-
stroke="currentColor"
|
|
157
|
-
stroke-width="2"
|
|
158
|
-
stroke-linecap="round"
|
|
159
|
-
stroke-linejoin="round"
|
|
160
|
-
>
|
|
161
|
-
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
|
|
162
|
-
<polyline points="22 4 12 14.01 9 11.01"></polyline>
|
|
163
|
-
</svg>
|
|
164
|
-
`, iconColor: l.sys.color.success.default, progressColor: `color-mix(in srgb, ${l.sys.color.success.default} 95%, ${l.sys.color.success.container} 5%)` };
|
|
165
|
-
case "warning":
|
|
166
|
-
return { icon: p`
|
|
167
|
-
<svg
|
|
168
|
-
width="20"
|
|
169
|
-
height="20"
|
|
170
|
-
viewBox="0 0 24 24"
|
|
171
|
-
fill="none"
|
|
172
|
-
stroke="currentColor"
|
|
173
|
-
stroke-width="2"
|
|
174
|
-
stroke-linecap="round"
|
|
175
|
-
stroke-linejoin="round"
|
|
176
|
-
>
|
|
177
|
-
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>
|
|
178
|
-
<line x1="12" y1="9" x2="12" y2="13"></line>
|
|
179
|
-
<line x1="12" y1="17" x2="12.01" y2="17"></line>
|
|
180
|
-
</svg>
|
|
181
|
-
`, iconColor: l.sys.color.tertiary.default, progressColor: `color-mix(in srgb, ${l.sys.color.tertiary.default} 90%, ${l.sys.color.tertiary.container} 10%)` };
|
|
182
|
-
case "error":
|
|
183
|
-
return { icon: p`
|
|
184
|
-
<svg
|
|
185
|
-
width="20"
|
|
186
|
-
height="20"
|
|
187
|
-
viewBox="0 0 24 24"
|
|
188
|
-
fill="none"
|
|
189
|
-
stroke="currentColor"
|
|
190
|
-
stroke-width="2"
|
|
191
|
-
stroke-linecap="round"
|
|
192
|
-
stroke-linejoin="round"
|
|
193
|
-
>
|
|
194
|
-
<circle cx="12" cy="12" r="10"></circle>
|
|
195
|
-
<line x1="15" y1="9" x2="9" y2="15"></line>
|
|
196
|
-
<line x1="9" y1="9" x2="15" y2="15"></line>
|
|
197
|
-
</svg>
|
|
198
|
-
`, iconColor: l.sys.color.error.default, progressColor: `color-mix(in srgb, ${l.sys.color.error.default} 92%, ${l.sys.color.error.container} 8%)` };
|
|
199
|
-
default:
|
|
200
|
-
return { icon: p`
|
|
201
|
-
<svg
|
|
202
|
-
width="20"
|
|
203
|
-
height="20"
|
|
204
|
-
viewBox="0 0 24 24"
|
|
205
|
-
fill="none"
|
|
206
|
-
stroke="currentColor"
|
|
207
|
-
stroke-width="2"
|
|
208
|
-
stroke-linecap="round"
|
|
209
|
-
stroke-linejoin="round"
|
|
210
|
-
>
|
|
211
|
-
<circle cx="12" cy="12" r="10"></circle>
|
|
212
|
-
<line x1="12" y1="16" x2="12" y2="12"></line>
|
|
213
|
-
<line x1="12" y1="8" x2="12.01" y2="8"></line>
|
|
214
|
-
</svg>
|
|
215
|
-
`, iconColor: l.sys.color.primary.default, progressColor: `color-mix(in srgb, ${l.sys.color.primary.default} 94%, ${l.sys.color.primary.container} 6%)` };
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
d([h({ type: String })], u.prototype, "title", 2), d([h({ type: String })], u.prototype, "message", 2), d([h({ type: String })], u.prototype, "type", 2), d([h({ type: Boolean })], u.prototype, "closable", 2), d([h({ type: Number })], u.prototype, "duration", 2), d([h({ type: String })], u.prototype, "id", 2), d([h({ type: Boolean })], u.prototype, "playSound", 2), d([h({ type: Boolean })], u.prototype, "showProgress", 2), d([g()], u.prototype, "_visible", 2), d([g()], u.prototype, "_progress", 2), d([g()], u.prototype, "_hovered", 2), d([g()], u.prototype, "_closing", 2), d([g()], u.prototype, "_autoCloseTimer", 2), d([g()], u.prototype, "_progressTimer", 2), u = d([_("sch-notification")], u);
|
|
220
|
-
class O {
|
|
221
|
-
constructor() {
|
|
222
|
-
this.audioContext = null;
|
|
223
|
-
}
|
|
224
|
-
getAudioContext() {
|
|
225
|
-
if (!this.audioContext) {
|
|
226
|
-
const t = window.AudioContext || window.webkitAudioContext;
|
|
227
|
-
this.audioContext = new t();
|
|
228
|
-
}
|
|
229
|
-
return this.audioContext;
|
|
230
|
-
}
|
|
231
|
-
playInfoSound(t = 0.2) {
|
|
232
|
-
const e = this.getAudioContext(), i = e.currentTime, s = e.createOscillator(), n = e.createGain(), a = e.createBiquadFilter();
|
|
233
|
-
s.type = "sine", s.frequency.setValueAtTime(392, i), s.frequency.exponentialRampToValueAtTime(523.25, i + 0.25), a.type = "lowpass", a.frequency.value = 1500, n.gain.setValueAtTime(1e-4, i), n.gain.exponentialRampToValueAtTime(t, i + 0.15), n.gain.exponentialRampToValueAtTime(1e-4, i + 0.4), s.connect(a).connect(n).connect(e.destination), s.start(i), s.stop(i + 0.45);
|
|
234
|
-
}
|
|
235
|
-
playSuccessSound(t = 0.2) {
|
|
236
|
-
const e = this.getAudioContext(), i = e.currentTime, s = (n, a, r) => {
|
|
237
|
-
const c = e.createOscillator(), w = e.createGain(), v = e.createBiquadFilter();
|
|
238
|
-
c.type = "sine", c.frequency.setValueAtTime(n, i), v.type = "lowpass", v.frequency.value = 4 * n, w.gain.setValueAtTime(1e-4, i), w.gain.exponentialRampToValueAtTime(t, i + 0.1), w.gain.exponentialRampToValueAtTime(1e-4, i + r), c.connect(v).connect(w).connect(e.destination), c.start(i + a), c.stop(i + r);
|
|
239
|
-
};
|
|
240
|
-
s(659.25, 0, 0.6), s(523.25, 0.05, 0.55);
|
|
241
|
-
}
|
|
242
|
-
playWarningSound(t = 0.25) {
|
|
243
|
-
const e = this.getAudioContext(), i = e.currentTime, s = e.createOscillator(), n = e.createOscillator(), a = e.createGain(), r = e.createBiquadFilter();
|
|
244
|
-
s.type = "sine", n.type = "sine", s.frequency.setValueAtTime(349.23, i), n.frequency.setValueAtTime(440, i), r.type = "lowpass", r.frequency.value = 1e3, a.gain.setValueAtTime(1e-4, i), a.gain.exponentialRampToValueAtTime(t, i + 0.08), a.gain.exponentialRampToValueAtTime(1e-4, i + 0.5), s.connect(r), n.connect(r), r.connect(a).connect(e.destination), s.start(i), n.start(i), s.stop(i + 0.55), n.stop(i + 0.55);
|
|
245
|
-
}
|
|
246
|
-
playErrorSound(t = 0.25) {
|
|
247
|
-
const e = this.getAudioContext(), i = e.currentTime, s = e.createOscillator(), n = e.createGain(), a = e.createBiquadFilter();
|
|
248
|
-
s.type = "triangle", s.frequency.setValueAtTime(220, i), s.frequency.exponentialRampToValueAtTime(1760, i + 0.3), a.type = "lowpass", a.frequency.value = 800, a.Q.value = 0.5, n.gain.setValueAtTime(1e-4, i), n.gain.exponentialRampToValueAtTime(0.8 * t, i + 0.1), n.gain.exponentialRampToValueAtTime(1e-4, i + 0.7), s.connect(a).connect(n).connect(e.destination), s.start(i), s.stop(i + 0.75);
|
|
249
|
-
}
|
|
250
|
-
async generateAudioFiles(t = 0.25) {
|
|
251
|
-
const i = {};
|
|
252
|
-
return i.info = await this.generateAudioFile(async (s) => {
|
|
253
|
-
const n = s.createOscillator();
|
|
254
|
-
n.type = "sine", n.frequency.setValueAtTime(320, 0), n.frequency.exponentialRampToValueAtTime(520, 0.3);
|
|
255
|
-
const a = s.createGain();
|
|
256
|
-
a.gain.setValueAtTime(0, 0), a.gain.linearRampToValueAtTime(t, 0.1), a.gain.linearRampToValueAtTime(0, 0.5), n.connect(a), a.connect(s.destination), n.start(), n.stop(0.5);
|
|
257
|
-
}, 44100, 1), i.success = await this.generateAudioFile(async (s) => {
|
|
258
|
-
const n = s.createOscillator();
|
|
259
|
-
n.type = "sine", n.frequency.setValueAtTime(660, 0);
|
|
260
|
-
const a = s.createOscillator();
|
|
261
|
-
a.type = "sine", a.frequency.setValueAtTime(440, 0);
|
|
262
|
-
const r = s.createGain();
|
|
263
|
-
r.gain.setValueAtTime(0, 0), r.gain.linearRampToValueAtTime(t, 0.1), r.gain.linearRampToValueAtTime(0, 0.5);
|
|
264
|
-
const c = s.createGain();
|
|
265
|
-
c.gain.setValueAtTime(0, 0), c.gain.linearRampToValueAtTime(0.6 * t, 0.15), c.gain.linearRampToValueAtTime(0, 0.7), n.connect(r), r.connect(s.destination), a.connect(c), c.connect(s.destination), n.start(), a.start(0.15), n.stop(0.5), a.stop(0.7);
|
|
266
|
-
}, 44100, 1), i.warning = await this.generateAudioFile(async (s) => {
|
|
267
|
-
const n = s.createOscillator();
|
|
268
|
-
n.type = "sine", n.frequency.setValueAtTime(293.66, 0);
|
|
269
|
-
const a = s.createOscillator();
|
|
270
|
-
a.type = "sine", a.frequency.setValueAtTime(349.23, 0);
|
|
271
|
-
const r = s.createGain();
|
|
272
|
-
r.gain.setValueAtTime(0, 0), r.gain.linearRampToValueAtTime(t, 0.1), r.gain.linearRampToValueAtTime(0.6 * t, 0.2), r.gain.linearRampToValueAtTime(0.8 * t, 0.3), r.gain.linearRampToValueAtTime(0, 0.6), n.connect(r), a.connect(r), r.connect(s.destination), n.start(), a.start(), n.stop(0.6), a.stop(0.6);
|
|
273
|
-
}, 44100, 1), i.error = await this.generateAudioFile(async (s) => {
|
|
274
|
-
const n = s.createOscillator();
|
|
275
|
-
n.type = "sine", n.frequency.setValueAtTime(196, 0);
|
|
276
|
-
const a = s.createGain();
|
|
277
|
-
a.gain.setValueAtTime(0, 0), a.gain.linearRampToValueAtTime(t, 0.1), a.gain.linearRampToValueAtTime(0.4 * t, 0.2), a.gain.linearRampToValueAtTime(0.6 * t, 0.3), a.gain.linearRampToValueAtTime(0, 0.7);
|
|
278
|
-
const r = s.createBiquadFilter();
|
|
279
|
-
r.type = "lowpass", r.frequency.value = 600, r.Q.value = 0.7, n.connect(r), r.connect(a), a.connect(s.destination), n.start(), n.stop(0.7);
|
|
280
|
-
}, 44100, 1), i;
|
|
281
|
-
}
|
|
282
|
-
async generateAudioFile(t, e = 44100, i = 1) {
|
|
283
|
-
const s = new OfflineAudioContext(2, e * i, e);
|
|
284
|
-
await t(s);
|
|
285
|
-
const n = await s.startRendering(), a = this.audioBufferToWav(n);
|
|
286
|
-
return URL.createObjectURL(a);
|
|
287
|
-
}
|
|
288
|
-
audioBufferToWav(t) {
|
|
289
|
-
const e = t.numberOfChannels, i = t.sampleRate, s = 2 * e, n = this.getAudioSamples(t, 16), a = 2 * n.length, r = new ArrayBuffer(44 + a), c = new DataView(r);
|
|
290
|
-
return this.writeString(c, 0, "RIFF"), c.setUint32(4, 36 + a, !0), this.writeString(c, 8, "WAVE"), this.writeString(c, 12, "fmt "), c.setUint32(16, 16, !0), c.setUint16(20, 1, !0), c.setUint16(22, e, !0), c.setUint32(24, i, !0), c.setUint32(28, i * s, !0), c.setUint16(32, s, !0), c.setUint16(34, 16, !0), this.writeString(c, 36, "data"), c.setUint32(40, a, !0), this.writeInt16Samples(c, 44, n), new Blob([r], { type: "audio/wav" });
|
|
291
|
-
}
|
|
292
|
-
getAudioSamples(t, e) {
|
|
293
|
-
const i = t.numberOfChannels, s = t.length, n = [], a = e === 16 ? 32768 : 128;
|
|
294
|
-
for (let r = 0; r < s; r++) for (let c = 0; c < i; c++) {
|
|
295
|
-
const w = t.getChannelData(c)[r], v = Math.max(-1, Math.min(1, w));
|
|
296
|
-
n.push(v * a);
|
|
297
|
-
}
|
|
298
|
-
return n;
|
|
299
|
-
}
|
|
300
|
-
writeInt16Samples(t, e, i) {
|
|
301
|
-
for (let s = 0; s < i.length; s++) t.setInt16(e + 2 * s, i[s], !0);
|
|
302
|
-
}
|
|
303
|
-
writeString(t, e, i) {
|
|
304
|
-
for (let s = 0; s < i.length; s++) t.setUint8(e + s, i.charCodeAt(s));
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
class E {
|
|
308
|
-
constructor() {
|
|
309
|
-
this.audioContext = null, this.soundBuffers = /* @__PURE__ */ new Map(), this.volume = 0.5, this.muted = !1, this.soundGenerator = new O(), this.disconnecting = new EventTarget(), this.soundUrls = { info: "/assets/sounds/notification-info.mp3", success: "/assets/sounds/notification-success.mp3", warning: "/assets/sounds/notification-warning.mp3", error: "/assets/sounds/notification-error.mp3" }, this.handleAudioEnded = (t) => () => {
|
|
310
|
-
t.remove();
|
|
311
|
-
}, this.initializeAudioFiles();
|
|
312
|
-
}
|
|
313
|
-
async initializeAudioFiles() {
|
|
314
|
-
try {
|
|
315
|
-
await this.preloadSounds();
|
|
316
|
-
} catch {
|
|
317
|
-
try {
|
|
318
|
-
const e = await this.soundGenerator.generateAudioFiles(this.volume);
|
|
319
|
-
this.soundUrls = e;
|
|
320
|
-
} catch {
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
getAudioContext() {
|
|
325
|
-
if (!this.audioContext) {
|
|
326
|
-
const t = window.AudioContext || window.webkitAudioContext;
|
|
327
|
-
this.audioContext = new t();
|
|
328
|
-
}
|
|
329
|
-
return this.audioContext;
|
|
330
|
-
}
|
|
331
|
-
async preloadSounds() {
|
|
332
|
-
const t = ["info", "success", "warning", "error"];
|
|
333
|
-
for (const e of t) try {
|
|
334
|
-
const i = await this.loadSound(e);
|
|
335
|
-
this.soundBuffers.set(e, i);
|
|
336
|
-
} catch {
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
async loadSound(t) {
|
|
340
|
-
const e = this.soundUrls[t], i = await fetch(e);
|
|
341
|
-
if (!i.ok) throw new Error(`Failed to load sound from ${e}: ${i.statusText}`);
|
|
342
|
-
const s = await i.arrayBuffer();
|
|
343
|
-
return await this.getAudioContext().decodeAudioData(s);
|
|
344
|
-
}
|
|
345
|
-
async playSound(t) {
|
|
346
|
-
if (!this.muted) try {
|
|
347
|
-
const e = this.getAudioContext();
|
|
348
|
-
if (e.state === "suspended" && await e.resume(), this.soundUrls[t].startsWith("blob:")) return void this.playFallbackSound(t);
|
|
349
|
-
if (!this.soundBuffers.has(t)) try {
|
|
350
|
-
const a = await this.loadSound(t);
|
|
351
|
-
this.soundBuffers.set(t, a);
|
|
352
|
-
} catch {
|
|
353
|
-
return void this.playDirectGeneratedSound(t);
|
|
354
|
-
}
|
|
355
|
-
const i = this.soundBuffers.get(t);
|
|
356
|
-
if (!i) throw new Error(`Sound buffer for ${t} not available`);
|
|
357
|
-
const s = e.createBufferSource();
|
|
358
|
-
s.buffer = i;
|
|
359
|
-
const n = e.createGain();
|
|
360
|
-
n.gain.value = this.volume, s.connect(n), n.connect(e.destination), s.start(0);
|
|
361
|
-
} catch {
|
|
362
|
-
this.playDirectGeneratedSound(t);
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
playDirectGeneratedSound(t) {
|
|
366
|
-
if (!this.muted) try {
|
|
367
|
-
switch (t) {
|
|
368
|
-
case "info":
|
|
369
|
-
this.soundGenerator.playInfoSound(this.volume);
|
|
370
|
-
break;
|
|
371
|
-
case "success":
|
|
372
|
-
this.soundGenerator.playSuccessSound(this.volume);
|
|
373
|
-
break;
|
|
374
|
-
case "warning":
|
|
375
|
-
this.soundGenerator.playWarningSound(this.volume);
|
|
376
|
-
break;
|
|
377
|
-
case "error":
|
|
378
|
-
this.soundGenerator.playErrorSound(this.volume);
|
|
379
|
-
}
|
|
380
|
-
} catch {
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
playFallbackSound(t) {
|
|
384
|
-
if (!this.muted) try {
|
|
385
|
-
const e = new Audio(this.soundUrls[t]);
|
|
386
|
-
e.volume = this.volume, x(e, "ended").pipe(T(x(this.disconnecting, "disconnect"))).subscribe(this.handleAudioEnded(e)), e.play().catch((i) => {
|
|
387
|
-
this.playDirectGeneratedSound(t);
|
|
388
|
-
});
|
|
389
|
-
} catch {
|
|
390
|
-
this.playDirectGeneratedSound(t);
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
setVolume(t) {
|
|
394
|
-
this.volume = Math.max(0, Math.min(1, t));
|
|
395
|
-
}
|
|
396
|
-
getVolume() {
|
|
397
|
-
return this.volume;
|
|
398
|
-
}
|
|
399
|
-
mute() {
|
|
400
|
-
this.muted = !0;
|
|
401
|
-
}
|
|
402
|
-
unmute() {
|
|
403
|
-
this.muted = !1;
|
|
404
|
-
}
|
|
405
|
-
isMuted() {
|
|
406
|
-
return this.muted;
|
|
407
|
-
}
|
|
408
|
-
setSoundUrl(t, e) {
|
|
409
|
-
this.soundUrls[t] = e, this.soundBuffers.delete(t);
|
|
410
|
-
}
|
|
411
|
-
getSoundUrl(t) {
|
|
412
|
-
return this.soundUrls[t];
|
|
413
|
-
}
|
|
414
|
-
dispose() {
|
|
415
|
-
this.disconnecting.dispatchEvent(new Event("disconnect")), this.audioContext && this.audioContext.state !== "closed" && this.audioContext.close().catch((t) => {
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
var B = Object.defineProperty, U = Object.getOwnPropertyDescriptor, b = (o, t, e, i) => {
|
|
420
|
-
for (var s, n = i > 1 ? void 0 : i ? U(t, e) : t, a = o.length - 1; a >= 0; a--) (s = o[a]) && (n = (i ? s(t, e, n) : s(n)) || n);
|
|
421
|
-
return i && n && B(t, e, n), n;
|
|
422
|
-
};
|
|
423
|
-
let y = class extends C(":host{display:block}.notification-container{position:fixed;z-index:10001;padding:12px;pointer-events:none;width:100%;max-width:424px}.notification-container sch-notification{pointer-events:auto}.notification-container.top-right{top:0;right:0;display:flex;flex-direction:column-reverse}.notification-container.top-left{top:0;left:0;display:flex;flex-direction:column-reverse}.notification-container.bottom-right{bottom:0;right:0;display:flex;flex-direction:column}.notification-container.bottom-left{bottom:0;left:0;display:flex;flex-direction:column}.notification-container.top-center{top:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column-reverse}.notification-container.bottom-center{bottom:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column}") {
|
|
424
|
-
constructor() {
|
|
425
|
-
super(...arguments), this.position = "top-right", this.maxVisibleNotifications = 2, this.playSound = !1, this.audioVolume = 0.1, this._notifications = [], this._audioService = new E(), this.handlePlaySound = (o) => {
|
|
426
|
-
this.playSound && this._audioService.playSound(o.detail.type);
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
connectedCallback() {
|
|
430
|
-
super.connectedCallback(), this._audioService.setVolume(this.audioVolume), x(window, "schmancy-notification").pipe(T(this.disconnecting)).subscribe((o) => {
|
|
431
|
-
this.addNotification(o.detail);
|
|
432
|
-
}), x(window, "schmancy-notification-dismiss").pipe(T(this.disconnecting)).subscribe((o) => {
|
|
433
|
-
this.removeNotification(o.detail.id);
|
|
434
|
-
}), x(window, "schmancy-notification-update").pipe(T(this.disconnecting)).subscribe((o) => {
|
|
435
|
-
this.updateNotification(o.detail.id, o.detail);
|
|
436
|
-
}), x(this, "playsound").pipe(T(this.disconnecting)).subscribe(this.handlePlaySound);
|
|
437
|
-
}
|
|
438
|
-
addNotification(o) {
|
|
439
|
-
const t = o.id || `notification-${Date.now()}-${Math.floor(1e4 * Math.random())}`, e = { id: t, title: o.title || "", message: o.message, type: o.type || "info", duration: o.duration !== void 0 ? o.duration : 750, closable: o.closable === void 0 || o.closable, playSound: o.playSound !== void 0 ? o.playSound : this.playSound, showProgress: o.showProgress !== void 0 && o.showProgress };
|
|
440
|
-
return this.position.startsWith("top") ? this._notifications = [...this._notifications, e] : this._notifications = [e, ...this._notifications], this._notifications.length > this.maxVisibleNotifications && (this._notifications = this._notifications.slice(-this.maxVisibleNotifications)), e.playSound && this._audioService.playSound(e.type), t;
|
|
441
|
-
}
|
|
442
|
-
removeNotification(o) {
|
|
443
|
-
this._notifications = this._notifications.filter((t) => t.id !== o);
|
|
444
|
-
}
|
|
445
|
-
updateNotification(o, t) {
|
|
446
|
-
const e = this._notifications.findIndex((i) => i.id === o);
|
|
447
|
-
e !== -1 && (this._notifications[e] = { ...this._notifications[e], ...t }, this.requestUpdate());
|
|
448
|
-
}
|
|
449
|
-
_handleClose(o) {
|
|
450
|
-
const t = o.detail.id;
|
|
451
|
-
this.removeNotification(t);
|
|
452
|
-
}
|
|
453
|
-
render() {
|
|
454
|
-
return p`
|
|
455
|
-
<div
|
|
456
|
-
class=${S({ "notification-container": !0, [this.position]: !0 })}
|
|
457
|
-
>
|
|
458
|
-
${k(this._notifications, (o) => o.id, (o) => p`
|
|
459
|
-
<sch-notification
|
|
460
|
-
.id=${o.id}
|
|
461
|
-
.title=${o.title}
|
|
462
|
-
.message=${o.message}
|
|
463
|
-
.type=${o.type}
|
|
464
|
-
.duration=${o.duration}
|
|
465
|
-
?closable=${o.closable}
|
|
466
|
-
?playSound=${!1}
|
|
467
|
-
?showProgress=${o.showProgress}
|
|
468
|
-
@close=${this._handleClose}
|
|
469
|
-
></sch-notification>
|
|
470
|
-
`)}
|
|
471
|
-
</div>
|
|
472
|
-
`;
|
|
473
|
-
}
|
|
474
|
-
};
|
|
475
|
-
b([h({ type: String })], y.prototype, "position", 2), b([h({ type: Number })], y.prototype, "maxVisibleNotifications", 2), b([h({ type: Boolean })], y.prototype, "playSound", 2), b([h({ type: Number })], y.prototype, "audioVolume", 2), b([g()], y.prototype, "_notifications", 2), y = b([_("sch-notification-container")], y);
|
|
476
|
-
const f = class f {
|
|
477
|
-
constructor() {
|
|
478
|
-
this.notificationStack = [];
|
|
479
|
-
}
|
|
480
|
-
static getInstance() {
|
|
481
|
-
return f.instance || (f.instance = new f()), f.instance;
|
|
482
|
-
}
|
|
483
|
-
notify(t) {
|
|
484
|
-
const e = { ...f.DEFAULT_OPTIONS, ...t, duration: t.duration ?? f.DEFAULT_OPTIONS.duration }, i = e.id || `notification-${Date.now()}-${Math.floor(1e4 * Math.random())}`;
|
|
485
|
-
this.notificationStack.push(i);
|
|
486
|
-
const s = new CustomEvent("schmancy-notification", { bubbles: !0, composed: !0, detail: { ...e, id: i } });
|
|
487
|
-
return window.dispatchEvent(s), i;
|
|
488
|
-
}
|
|
489
|
-
dismiss(t) {
|
|
490
|
-
let e;
|
|
491
|
-
if (t) {
|
|
492
|
-
const i = this.notificationStack.indexOf(t);
|
|
493
|
-
i > -1 && (this.notificationStack.splice(i, 1), e = t);
|
|
494
|
-
} else e = this.notificationStack.pop();
|
|
495
|
-
if (e) {
|
|
496
|
-
const i = new CustomEvent("schmancy-notification-dismiss", { bubbles: !0, composed: !0, detail: { id: e } });
|
|
497
|
-
window.dispatchEvent(i);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
update(t, e) {
|
|
501
|
-
const i = new CustomEvent("schmancy-notification-update", { bubbles: !0, composed: !0, detail: { id: t, ...e } });
|
|
502
|
-
window.dispatchEvent(i);
|
|
503
|
-
}
|
|
504
|
-
info(t, e = {}) {
|
|
505
|
-
return this.notify({ message: t ?? "", type: "info", duration: t ? e.duration : 1, ...e });
|
|
506
|
-
}
|
|
507
|
-
success(t, e = {}) {
|
|
508
|
-
return this.notify({ message: t ?? "", type: "success", duration: t ? e.duration : 1, ...e });
|
|
509
|
-
}
|
|
510
|
-
warning(t, e = {}) {
|
|
511
|
-
return this.notify({ message: t ?? "", type: "warning", duration: t ? e.duration : 1, ...e });
|
|
512
|
-
}
|
|
513
|
-
error(t, e = {}) {
|
|
514
|
-
return this.notify({ message: t ?? "", type: "error", duration: t ? e.duration : 1, ...e });
|
|
515
|
-
}
|
|
516
|
-
customDuration(t, e, i = {}) {
|
|
517
|
-
return this.notify({ message: t, duration: e, ...i });
|
|
518
|
-
}
|
|
519
|
-
persistent(t, e = {}) {
|
|
520
|
-
return this.notify({ message: t, duration: 0, ...e });
|
|
521
|
-
}
|
|
522
|
-
};
|
|
523
|
-
f.DEFAULT_OPTIONS = { duration: 1e3, closable: !0, playSound: !0 };
|
|
524
|
-
let m = f;
|
|
525
|
-
const X = { show: (o) => m.getInstance().notify(o), info: (o, t = {}) => m.getInstance().info(o, t), success: (o, t = {}) => m.getInstance().success(o, t), warning: (o, t = {}) => m.getInstance().warning(o, t), error: (o, t = {}) => m.getInstance().error(o, t), customDuration: (o, t, e = {}) => m.getInstance().customDuration(o, t, e), persistent: (o, t = {}) => m.getInstance().persistent(o, t), dismiss: (o) => m.getInstance().dismiss(o), update: (o, t) => m.getInstance().update(o, t) };
|
|
526
|
-
export {
|
|
527
|
-
X as $,
|
|
528
|
-
E as N,
|
|
529
|
-
u as S,
|
|
530
|
-
y as a
|
|
531
|
-
};
|
|
532
|
-
//# sourceMappingURL=notification-service-B4nvP2Jc.js.map
|