@mhmo91/schmancy 0.2.195 → 0.2.197
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/animated-text.md +114 -0
- package/ai/card.md +162 -131
- package/ai/circular-progress.md +91 -0
- package/ai/date-range.md +142 -0
- package/ai/delay.md +158 -0
- package/ai/divider.md +153 -0
- package/ai/index.md +42 -3
- package/ai/nav-drawer.md +206 -0
- package/ai/option.md +173 -0
- package/ai/slider.md +227 -0
- package/ai/steps.md +231 -0
- package/ai/surface.md +139 -200
- package/ai/teleport.md +196 -0
- package/ai/theme-button.md +173 -0
- package/ai/theme.md +241 -0
- package/ai/typewriter.md +217 -0
- package/dist/ai/animated-text.md +114 -0
- package/dist/ai/card.md +162 -131
- package/dist/ai/circular-progress.md +91 -0
- package/dist/ai/date-range.md +142 -0
- package/dist/ai/delay.md +158 -0
- package/dist/ai/divider.md +153 -0
- package/dist/ai/index.md +42 -3
- package/dist/ai/nav-drawer.md +206 -0
- package/dist/ai/option.md +173 -0
- package/dist/ai/slider.md +227 -0
- package/dist/ai/steps.md +231 -0
- package/dist/ai/surface.md +139 -200
- package/dist/ai/teleport.md +196 -0
- package/dist/ai/theme-button.md +173 -0
- package/dist/ai/theme.md +241 -0
- package/dist/ai/typewriter.md +217 -0
- package/dist/{animated-text-Bu9wh3wv.cjs → animated-text-DnX2TopW.cjs} +2 -2
- package/dist/{animated-text-Bu9wh3wv.cjs.map → animated-text-DnX2TopW.cjs.map} +1 -1
- package/dist/{animated-text-Ci7M0QTx.js → animated-text-jv1yAwLh.js} +3 -3
- package/dist/{animated-text-Ci7M0QTx.js.map → animated-text-jv1yAwLh.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-eJJ_wryh.js → area.component-DMD20wqd.js} +3 -3
- package/dist/{area.component-eJJ_wryh.js.map → area.component-DMD20wqd.js.map} +1 -1
- package/dist/{area.component-Cg9dqZJ5.cjs → area.component-Vs2WGXgk.cjs} +2 -2
- package/dist/{area.component-Cg9dqZJ5.cjs.map → area.component-Vs2WGXgk.cjs.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-BH7nQbid.cjs → autocomplete-BrAxEJJq.cjs} +2 -2
- package/dist/{autocomplete-BH7nQbid.cjs.map → autocomplete-BrAxEJJq.cjs.map} +1 -1
- package/dist/{autocomplete-D9n1MeKT.js → autocomplete-OS61ngsy.js} +3 -3
- package/dist/{autocomplete-D9n1MeKT.js.map → autocomplete-OS61ngsy.js.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-Bg-rdjAe.cjs → avatar-CFcVZgL9.cjs} +2 -2
- package/dist/{avatar-Bg-rdjAe.cjs.map → avatar-CFcVZgL9.cjs.map} +1 -1
- package/dist/{avatar-B4lSs4z5.js → avatar-gkzmu5FJ.js} +41 -41
- package/dist/{avatar-B4lSs4z5.js.map → avatar-gkzmu5FJ.js.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-y37-tGrk.js → checkbox-CVXRiSWP.js} +2 -2
- package/dist/{checkbox-y37-tGrk.js.map → checkbox-CVXRiSWP.js.map} +1 -1
- package/dist/{checkbox-CgL23smr.cjs → checkbox-Chd-COYm.cjs} +2 -2
- package/dist/{checkbox-CgL23smr.cjs.map → checkbox-Chd-COYm.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-CKST7ug-.cjs → chips-Bx9gSvN1.cjs} +2 -2
- package/dist/{chips-CKST7ug-.cjs.map → chips-Bx9gSvN1.cjs.map} +1 -1
- package/dist/{chips-Ndwt1V4b.js → chips-Dx_erk55.js} +3 -3
- package/dist/{chips-Ndwt1V4b.js.map → chips-Dx_erk55.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/{circular-progress-vokDGjmG.js → circular-progress-BQnGvbss.js} +3 -3
- package/dist/{circular-progress-vokDGjmG.js.map → circular-progress-BQnGvbss.js.map} +1 -1
- package/dist/{circular-progress-BDmc1zlm.cjs → circular-progress-CNBah5dz.cjs} +2 -2
- package/dist/{circular-progress-BDmc1zlm.cjs.map → circular-progress-CNBah5dz.cjs.map} +1 -1
- package/dist/circular-progress.cjs +1 -1
- package/dist/circular-progress.js +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-DfZz3ifP.cjs → date-range-BW4YaNoF.cjs} +6 -3
- package/dist/{date-range-DfZz3ifP.cjs.map → date-range-BW4YaNoF.cjs.map} +1 -1
- package/dist/{date-range-CpDVPn_v.js → date-range-CtXGl9uE.js} +7 -4
- package/dist/{date-range-CpDVPn_v.js.map → date-range-CtXGl9uE.js.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-ASLyLkQL.cjs → delay-BzkhDhs0.cjs} +2 -2
- package/dist/{delay-ASLyLkQL.cjs.map → delay-BzkhDhs0.cjs.map} +1 -1
- package/dist/{delay-CG5SRrzF.js → delay-Ds5suSsc.js} +2 -2
- package/dist/{delay-CG5SRrzF.js.map → delay-Ds5suSsc.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{dialog-content-D88EcY6L.cjs → dialog-content-CJY69qfC.cjs} +2 -2
- package/dist/{dialog-content-D88EcY6L.cjs.map → dialog-content-CJY69qfC.cjs.map} +1 -1
- package/dist/{dialog-content-BoPviBAt.js → dialog-content-DFJnYzff.js} +3 -3
- package/dist/{dialog-content-BoPviBAt.js.map → dialog-content-DFJnYzff.js.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{divider-N7GWgK6o.js → divider-C3w1_-N1.js} +3 -3
- package/dist/{divider-N7GWgK6o.js.map → divider-C3w1_-N1.js.map} +1 -1
- package/dist/{divider-C38JDYss.cjs → divider-CFzbCFsr.cjs} +2 -2
- package/dist/{divider-C38JDYss.cjs.map → divider-CFzbCFsr.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-DmO_yIVb.js → dropdown-content-BGFYBXcx.js} +3 -3
- package/dist/{dropdown-content-DmO_yIVb.js.map → dropdown-content-BGFYBXcx.js.map} +1 -1
- package/dist/{dropdown-content-rH8awIRA.cjs → dropdown-content-PaMOJphI.cjs} +2 -2
- package/dist/{dropdown-content-rH8awIRA.cjs.map → dropdown-content-PaMOJphI.cjs.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-CXYfL6bE.js → flex-Cy4Stl_1.js} +2 -2
- package/dist/{flex-CXYfL6bE.js.map → flex-Cy4Stl_1.js.map} +1 -1
- package/dist/{flex-wYuewqrr.cjs → flex-DP5O5644.cjs} +2 -2
- package/dist/{flex-wYuewqrr.cjs.map → flex-DP5O5644.cjs.map} +1 -1
- package/dist/{form-q3JZjWez.js → form-BQamcLFL.js} +2 -2
- package/dist/{form-q3JZjWez.js.map → form-BQamcLFL.js.map} +1 -1
- package/dist/{form-CNWWdhT_.cjs → form-CG3kns69.cjs} +2 -2
- package/dist/{form-CNWWdhT_.cjs.map → form-CG3kns69.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-pLQWXzo8.js → icon-Cd4p9jRB.js} +3 -3
- package/dist/{icon-pLQWXzo8.js.map → icon-Cd4p9jRB.js.map} +1 -1
- package/dist/{icon-QnmfHtfT.cjs → icon-CilwMTXB.cjs} +2 -2
- package/dist/{icon-QnmfHtfT.cjs.map → icon-CilwMTXB.cjs.map} +1 -1
- package/dist/{icon-button-DOTB_28y.js → icon-button-By17is4V.js} +3 -3
- package/dist/{icon-button-DOTB_28y.js.map → icon-button-By17is4V.js.map} +1 -1
- package/dist/{icon-button-oAOX71_s.cjs → icon-button-C4Hf63hY.cjs} +2 -2
- package/dist/{icon-button-oAOX71_s.cjs.map → icon-button-C4Hf63hY.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +39 -39
- package/dist/{input-CCniOtAr.cjs → input-BIi0rS2t.cjs} +2 -2
- package/dist/{input-CCniOtAr.cjs.map → input-BIi0rS2t.cjs.map} +1 -1
- package/dist/{input-DeJitVSV.js → input-C8OAokVe.js} +2 -2
- package/dist/{input-DeJitVSV.js.map → input-C8OAokVe.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-Ca79GGNH.js → list-BC3OE3Pu.js} +2 -2
- package/dist/{list-Ca79GGNH.js.map → list-BC3OE3Pu.js.map} +1 -1
- package/dist/{list-Ad-24MHW.cjs → list-jFsCubuy.cjs} +2 -2
- package/dist/{list-Ad-24MHW.cjs.map → list-jFsCubuy.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-BoUiP2tU.js → litElement.mixin-C6PzcPXd.js} +2 -2
- package/dist/{litElement.mixin-BoUiP2tU.js.map → litElement.mixin-C6PzcPXd.js.map} +1 -1
- package/dist/{litElement.mixin-qOTYSaNG.cjs → litElement.mixin-Cypiq-N-.cjs} +2 -2
- package/dist/{litElement.mixin-qOTYSaNG.cjs.map → litElement.mixin-Cypiq-N-.cjs.map} +1 -1
- package/dist/{menu-6Wum4ysc.cjs → menu-CDjqdEd6.cjs} +2 -2
- package/dist/{menu-6Wum4ysc.cjs.map → menu-CDjqdEd6.cjs.map} +1 -1
- package/dist/{menu-Dd_X9oET.js → menu-n_Doj-bW.js} +3 -3
- package/dist/{menu-Dd_X9oET.js.map → menu-n_Doj-bW.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{notification-service-CrNyAbmv.cjs → notification-service--VLqOJJg.cjs} +2 -2
- package/dist/{notification-service-CrNyAbmv.cjs.map → notification-service--VLqOJJg.cjs.map} +1 -1
- package/dist/{notification-service-C-9IqObm.js → notification-service-DHIhgWQr.js} +3 -3
- package/dist/{notification-service-C-9IqObm.js.map → notification-service-DHIhgWQr.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-BbBbwrJq.cjs → option-B359EBiZ.cjs} +2 -2
- package/dist/{option-BbBbwrJq.cjs.map → option-B359EBiZ.cjs.map} +1 -1
- package/dist/{option-DVSXUJ96.js → option-oyyjCwnL.js} +2 -2
- package/dist/{option-DVSXUJ96.js.map → option-oyyjCwnL.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-R5wNWHAv.cjs → payment-card-form-B-ZAsSED.cjs} +2 -2
- package/dist/{payment-card-form-R5wNWHAv.cjs.map → payment-card-form-B-ZAsSED.cjs.map} +1 -1
- package/dist/{payment-card-form-CTjgVoJK.js → payment-card-form-BSueaw97.js} +3 -3
- package/dist/{payment-card-form-CTjgVoJK.js.map → payment-card-form-BSueaw97.js.map} +1 -1
- package/dist/{radio-button-BDAW1Euc.js → radio-button-84TD7rpH.js} +2 -2
- package/dist/{radio-button-BDAW1Euc.js.map → radio-button-84TD7rpH.js.map} +1 -1
- package/dist/{radio-button-Cg1JobXT.cjs → radio-button-BO6mIWCi.cjs} +2 -2
- package/dist/{radio-button-Cg1JobXT.cjs.map → radio-button-BO6mIWCi.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{schmancy-steps-container-BAPIxl4s.cjs → schmancy-steps-container-Cfq8OsWt.cjs} +2 -2
- package/dist/{schmancy-steps-container-BAPIxl4s.cjs.map → schmancy-steps-container-Cfq8OsWt.cjs.map} +1 -1
- package/dist/{schmancy-steps-container--d7VK-QR.js → schmancy-steps-container-Lo4d27n3.js} +2 -2
- package/dist/{schmancy-steps-container--d7VK-QR.js.map → schmancy-steps-container-Lo4d27n3.js.map} +1 -1
- package/dist/{select-DfbOOZtm.js → select-B-zgP_v6.js} +3 -3
- package/dist/{select-DfbOOZtm.js.map → select-B-zgP_v6.js.map} +1 -1
- package/dist/{select-CnjO7DLl.cjs → select-DhEVsWh6.cjs} +2 -2
- package/dist/{select-CnjO7DLl.cjs.map → select-DhEVsWh6.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-Ds0Fp0lM.cjs → sheet-BEWq40cN.cjs} +2 -2
- package/dist/{sheet-Ds0Fp0lM.cjs.map → sheet-BEWq40cN.cjs.map} +1 -1
- package/dist/{sheet-DhbKM9gJ.js → sheet-DDY4pbD4.js} +3 -3
- package/dist/{sheet-DhbKM9gJ.js.map → sheet-DDY4pbD4.js.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-Ba3AEh2W.js → slider--irxEv_B.js} +3 -3
- package/dist/{slider-Ba3AEh2W.js.map → slider--irxEv_B.js.map} +1 -1
- package/dist/{slider-CSOzhUhA.cjs → slider-De-H5fe8.cjs} +2 -2
- package/dist/{slider-CSOzhUhA.cjs.map → slider-De-H5fe8.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-BgeQqlFU.js → spinner-Bl9n09Z5.js} +3 -3
- package/dist/{spinner-BgeQqlFU.js.map → spinner-Bl9n09Z5.js.map} +1 -1
- package/dist/{spinner-llMfjiIc.cjs → spinner-DNz1IjmL.cjs} +2 -2
- package/dist/{spinner-llMfjiIc.cjs.map → spinner-DNz1IjmL.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-CT2g8fDM.cjs → surface-BAEUiWcq.cjs} +2 -2
- package/dist/{surface-CT2g8fDM.cjs.map → surface-BAEUiWcq.cjs.map} +1 -1
- package/dist/{surface-UcsAmLj5.js → surface-h9dLHMTm.js} +2 -2
- package/dist/{surface-UcsAmLj5.js.map → surface-h9dLHMTm.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-DuUlrDCu.js → table-CxazXBjI.js} +2 -2
- package/dist/{table-DuUlrDCu.js.map → table-CxazXBjI.js.map} +1 -1
- package/dist/{table-CSBhQ-pa.cjs → table-Dn07ykGG.cjs} +2 -2
- package/dist/{table-CSBhQ-pa.cjs.map → table-Dn07ykGG.cjs.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-BVFHArgV.js → tabs-compatibility-B8I0vg7Y.js} +2 -2
- package/dist/{tabs-compatibility-BVFHArgV.js.map → tabs-compatibility-B8I0vg7Y.js.map} +1 -1
- package/dist/{tabs-compatibility-Bt3coGzN.cjs → tabs-compatibility-BrTxeSS-.cjs} +2 -2
- package/dist/{tabs-compatibility-Bt3coGzN.cjs.map → tabs-compatibility-BrTxeSS-.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-Du4i6vQR.js +43 -0
- package/dist/{tailwind.mixin-C71e_LC1.js.map → tailwind.mixin-Du4i6vQR.js.map} +1 -1
- package/dist/tailwind.mixin-qyIcoDLk.cjs +2 -0
- package/dist/{tailwind.mixin-CFCJhe5p.cjs.map → tailwind.mixin-qyIcoDLk.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-B8eIpYa-.js → textarea-DibCLxC2.js} +2 -2
- package/dist/{textarea-B8eIpYa-.js.map → textarea-DibCLxC2.js.map} +1 -1
- package/dist/{textarea-CtCk_1Fq.cjs → textarea-pMec4Wpg.cjs} +2 -2
- package/dist/{textarea-CtCk_1Fq.cjs.map → textarea-pMec4Wpg.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-DQe5uOxU.cjs → theme-button-CG1w_waw.cjs} +2 -2
- package/dist/{theme-button-DQe5uOxU.cjs.map → theme-button-CG1w_waw.cjs.map} +1 -1
- package/dist/{theme-button-TEzhKUy6.js → theme-button-irLEczd5.js} +2 -2
- package/dist/{theme-button-TEzhKUy6.js.map → theme-button-irLEczd5.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-DiTpToTC.js → theme.component-CMM8Xws2.js} +2 -2
- package/dist/{theme.component-DiTpToTC.js.map → theme.component-CMM8Xws2.js.map} +1 -1
- package/dist/{theme.component-Be6M74nN.cjs → theme.component-CpRuySmd.cjs} +2 -2
- package/dist/{theme.component-Be6M74nN.cjs.map → theme.component-CpRuySmd.cjs.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-CBSuTrU2.js → timezone-DIrmlnD6.js} +3 -3
- package/dist/{timezone-CBSuTrU2.js.map → timezone-DIrmlnD6.js.map} +1 -1
- package/dist/{timezone-C1aR24i0.cjs → timezone-n5GflDRe.cjs} +2 -2
- package/dist/{timezone-C1aR24i0.cjs.map → timezone-n5GflDRe.cjs.map} +1 -1
- package/dist/{tooltip-DYcXTtFy.cjs → tooltip-0vIcVm5-.cjs} +2 -2
- package/dist/{tooltip-DYcXTtFy.cjs.map → tooltip-0vIcVm5-.cjs.map} +1 -1
- package/dist/{tooltip-DYQW9R3I.js → tooltip-N_B-vsDa.js} +2 -2
- package/dist/{tooltip-DYQW9R3I.js.map → tooltip-N_B-vsDa.js.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-nsSIkdNT.js → tree-2Hf2X0Hv.js} +2 -2
- package/dist/{tree-nsSIkdNT.js.map → tree-2Hf2X0Hv.js.map} +1 -1
- package/dist/{tree-D-rTjnPs.cjs → tree-Q8AMxJxP.cjs} +2 -2
- package/dist/{tree-D-rTjnPs.cjs.map → tree-Q8AMxJxP.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-Cj0R-RDa.cjs → typewriter-CsL-NfYC.cjs} +2 -2
- package/dist/{typewriter-Cj0R-RDa.cjs.map → typewriter-CsL-NfYC.cjs.map} +1 -1
- package/dist/{typewriter-DrYb6_FB.js → typewriter-bqbNKczJ.js} +4 -4
- package/dist/{typewriter-DrYb6_FB.js.map → typewriter-bqbNKczJ.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-DMj2H_lZ.js → typography-CbrvouLo.js} +2 -2
- package/dist/{typography-DMj2H_lZ.js.map → typography-CbrvouLo.js.map} +1 -1
- package/dist/{typography-B0Kj2XoC.cjs → typography-Hlts-hzc.cjs} +2 -2
- package/dist/{typography-B0Kj2XoC.cjs.map → typography-Hlts-hzc.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/dist/tailwind.mixin-C71e_LC1.js +0 -43
- package/dist/tailwind.mixin-CFCJhe5p.cjs +0 -2
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Theme Button Component
|
|
2
|
+
|
|
3
|
+
A simple, animated button component for theme switching functionality with a rotating palette icon.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<!-- Basic theme button -->
|
|
9
|
+
<schmancy-theme-button></schmancy-theme-button>
|
|
10
|
+
|
|
11
|
+
<!-- In a toolbar -->
|
|
12
|
+
<schmancy-appbar>
|
|
13
|
+
<h1 slot="title">My App</h1>
|
|
14
|
+
<schmancy-theme-button slot="actions"></schmancy-theme-button>
|
|
15
|
+
</schmancy-appbar>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Properties
|
|
19
|
+
|
|
20
|
+
The component inherits all properties from the base button component through `TailwindElement`.
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
### Animated Icon
|
|
25
|
+
The palette icon rotates 360 degrees when clicked:
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
this.color.animate([
|
|
29
|
+
{ transform: 'rotate(0deg)' },
|
|
30
|
+
{ transform: 'rotate(360deg)' }
|
|
31
|
+
], {
|
|
32
|
+
duration: 300
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Native Web Animations
|
|
37
|
+
Uses the Web Animations API for smooth, performant animations without external dependencies.
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
### In Navigation Bar
|
|
42
|
+
```html
|
|
43
|
+
<nav class="flex items-center justify-between p-4">
|
|
44
|
+
<h1>Brand</h1>
|
|
45
|
+
<div class="flex gap-2">
|
|
46
|
+
<schmancy-theme-button></schmancy-theme-button>
|
|
47
|
+
<schmancy-icon-button>settings</schmancy-icon-button>
|
|
48
|
+
</div>
|
|
49
|
+
</nav>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### With Custom Theme Logic
|
|
53
|
+
```html
|
|
54
|
+
<schmancy-theme-button @click="${() => {
|
|
55
|
+
// Toggle between themes
|
|
56
|
+
const currentTheme = document.querySelector('schmancy-theme');
|
|
57
|
+
currentTheme.scheme = currentTheme.scheme === 'light' ? 'dark' : 'light';
|
|
58
|
+
}}"></schmancy-theme-button>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### In a Settings Panel
|
|
62
|
+
```html
|
|
63
|
+
<schmancy-card>
|
|
64
|
+
<h3 slot="header">Appearance Settings</h3>
|
|
65
|
+
|
|
66
|
+
<div class="space-y-4">
|
|
67
|
+
<div class="flex items-center justify-between">
|
|
68
|
+
<span>Theme</span>
|
|
69
|
+
<schmancy-theme-button></schmancy-theme-button>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<schmancy-divider></schmancy-divider>
|
|
73
|
+
|
|
74
|
+
<schmancy-select label="Color Scheme">
|
|
75
|
+
<schmancy-option value="auto">Auto</schmancy-option>
|
|
76
|
+
<schmancy-option value="light">Light</schmancy-option>
|
|
77
|
+
<schmancy-option value="dark">Dark</schmancy-option>
|
|
78
|
+
</schmancy-select>
|
|
79
|
+
</div>
|
|
80
|
+
</schmancy-card>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### With Tooltip
|
|
84
|
+
```html
|
|
85
|
+
<schmancy-tooltip content="Change theme">
|
|
86
|
+
<schmancy-theme-button></schmancy-theme-button>
|
|
87
|
+
</schmancy-tooltip>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Implementation Details
|
|
91
|
+
|
|
92
|
+
The component structure:
|
|
93
|
+
- Uses `schmancy-button` with text variant
|
|
94
|
+
- Contains `schmancy-icon` with palette icon
|
|
95
|
+
- Applies rotation animation on click
|
|
96
|
+
- Maintains reference to icon element via `@query`
|
|
97
|
+
|
|
98
|
+
## Styling
|
|
99
|
+
|
|
100
|
+
Since it uses the base button component, all button styling applies:
|
|
101
|
+
|
|
102
|
+
```css
|
|
103
|
+
/* Custom positioning in toolbar */
|
|
104
|
+
schmancy-theme-button {
|
|
105
|
+
margin-left: auto;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Adjust icon size */
|
|
109
|
+
schmancy-theme-button schmancy-icon {
|
|
110
|
+
font-size: 1.25rem;
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Animation Customization
|
|
115
|
+
|
|
116
|
+
You can extend the animation behavior:
|
|
117
|
+
|
|
118
|
+
```javascript
|
|
119
|
+
// Custom animation options
|
|
120
|
+
{
|
|
121
|
+
duration: 300,
|
|
122
|
+
easing: 'ease-out',
|
|
123
|
+
fill: 'forwards' // Keep final rotation state
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Integration with Theme System
|
|
128
|
+
|
|
129
|
+
While the button provides the UI, you'll need to implement the theme switching logic:
|
|
130
|
+
|
|
131
|
+
```javascript
|
|
132
|
+
// Example theme toggle implementation
|
|
133
|
+
class MyApp extends LitElement {
|
|
134
|
+
toggleTheme() {
|
|
135
|
+
const theme = this.shadowRoot.querySelector('schmancy-theme');
|
|
136
|
+
const themes = ['#6750A4', '#00695C', '#D32F2F', '#1976D2'];
|
|
137
|
+
const currentIndex = themes.indexOf(theme.color);
|
|
138
|
+
theme.color = themes[(currentIndex + 1) % themes.length];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
render() {
|
|
142
|
+
return html`
|
|
143
|
+
<schmancy-theme>
|
|
144
|
+
<schmancy-theme-button @click="${this.toggleTheme}">
|
|
145
|
+
</schmancy-theme-button>
|
|
146
|
+
</schmancy-theme>
|
|
147
|
+
`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Best Practices
|
|
153
|
+
|
|
154
|
+
1. **Placement**: Put in consistent location (usually top-right)
|
|
155
|
+
2. **Feedback**: The rotation provides immediate feedback
|
|
156
|
+
3. **Persistence**: Save theme preference to localStorage
|
|
157
|
+
4. **Accessibility**: Include proper ARIA labels
|
|
158
|
+
5. **Mobile**: Ensure adequate touch target size
|
|
159
|
+
|
|
160
|
+
## Related Components
|
|
161
|
+
|
|
162
|
+
- [Theme](./theme.md) - The theming system
|
|
163
|
+
- [Button](./button.md) - Base button component
|
|
164
|
+
- [Icon](./icons.md) - Icon system
|
|
165
|
+
- [Tooltip](./tooltip.md) - Help text
|
|
166
|
+
|
|
167
|
+
## Use Cases
|
|
168
|
+
|
|
169
|
+
1. **App Headers**: Quick theme toggle in navigation
|
|
170
|
+
2. **Settings Pages**: Part of appearance settings
|
|
171
|
+
3. **Demos**: Showcase theme capabilities
|
|
172
|
+
4. **User Preferences**: Personalization options
|
|
173
|
+
5. **Accessibility**: High contrast mode switching
|
package/ai/theme.md
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# Theme Component
|
|
2
|
+
|
|
3
|
+
A powerful theming system that generates Material Design 3 color schemes from a source color, with automatic dark/light mode support and CSS custom property injection.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<!-- Basic theme with auto color -->
|
|
9
|
+
<schmancy-theme>
|
|
10
|
+
<div class="my-app">
|
|
11
|
+
<!-- All children inherit theme -->
|
|
12
|
+
</div>
|
|
13
|
+
</schmancy-theme>
|
|
14
|
+
|
|
15
|
+
<!-- Custom color theme -->
|
|
16
|
+
<schmancy-theme color="#6750A4" scheme="light">
|
|
17
|
+
<schmancy-card>
|
|
18
|
+
<h2>Themed Content</h2>
|
|
19
|
+
</schmancy-card>
|
|
20
|
+
</schmancy-theme>
|
|
21
|
+
|
|
22
|
+
<!-- Root-level theme -->
|
|
23
|
+
<schmancy-theme color="#00695C" root>
|
|
24
|
+
<!-- Theme applies to entire document -->
|
|
25
|
+
</schmancy-theme>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
|
|
30
|
+
| Property | Type | Default | Description |
|
|
31
|
+
|----------|------|---------|-------------|
|
|
32
|
+
| `color` | `string` | `random` | Source color for theme generation |
|
|
33
|
+
| `scheme` | `'dark' \| 'light' \| 'auto'` | `'auto'` | Color scheme mode |
|
|
34
|
+
| `root` | `boolean` | `false` | Apply theme to document root |
|
|
35
|
+
| `theme` | `Partial<TSchmancyTheme>` | `{}` | Custom theme overrides |
|
|
36
|
+
|
|
37
|
+
## Material Design 3 Integration
|
|
38
|
+
|
|
39
|
+
The component uses Google's Material Color Utilities to generate a complete color system:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { argbFromHex, themeFromSourceColor } from '@material/material-color-utilities';
|
|
43
|
+
|
|
44
|
+
// Generates full MD3 color palette
|
|
45
|
+
const theme = themeFromSourceColor(argbFromHex('#6750A4'));
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Examples
|
|
49
|
+
|
|
50
|
+
### App-Wide Theme
|
|
51
|
+
```html
|
|
52
|
+
<!-- In your app root -->
|
|
53
|
+
<schmancy-theme color="#1976D2" root>
|
|
54
|
+
<schmancy-app>
|
|
55
|
+
<!-- Entire app uses this theme -->
|
|
56
|
+
</schmancy-app>
|
|
57
|
+
</schmancy-theme>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Component-Level Theming
|
|
61
|
+
```html
|
|
62
|
+
<!-- Different sections with different themes -->
|
|
63
|
+
<div class="dashboard">
|
|
64
|
+
<schmancy-theme color="#00897B">
|
|
65
|
+
<section class="analytics">
|
|
66
|
+
<!-- Teal theme -->
|
|
67
|
+
</section>
|
|
68
|
+
</schmancy-theme>
|
|
69
|
+
|
|
70
|
+
<schmancy-theme color="#E53935">
|
|
71
|
+
<section class="alerts">
|
|
72
|
+
<!-- Red theme for alerts -->
|
|
73
|
+
</section>
|
|
74
|
+
</schmancy-theme>
|
|
75
|
+
</div>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Dark Mode Support
|
|
79
|
+
```html
|
|
80
|
+
<!-- Automatic dark/light switching -->
|
|
81
|
+
<schmancy-theme scheme="auto">
|
|
82
|
+
<schmancy-surface>
|
|
83
|
+
<p>Adapts to system preferences</p>
|
|
84
|
+
</schmancy-surface>
|
|
85
|
+
</schmancy-theme>
|
|
86
|
+
|
|
87
|
+
<!-- Force dark mode -->
|
|
88
|
+
<schmancy-theme scheme="dark" color="#673AB7">
|
|
89
|
+
<schmancy-card>
|
|
90
|
+
<h3>Always Dark</h3>
|
|
91
|
+
</schmancy-card>
|
|
92
|
+
</schmancy-theme>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Theme Overrides
|
|
96
|
+
```html
|
|
97
|
+
<schmancy-theme
|
|
98
|
+
color="#FF5722"
|
|
99
|
+
.theme="${{
|
|
100
|
+
sys: {
|
|
101
|
+
color: {
|
|
102
|
+
primary: {
|
|
103
|
+
default: '#FF5722',
|
|
104
|
+
onDefault: '#FFFFFF'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}}"
|
|
109
|
+
>
|
|
110
|
+
<schmancy-button variant="filled">
|
|
111
|
+
Custom Themed Button
|
|
112
|
+
</schmancy-button>
|
|
113
|
+
</schmancy-theme>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Generated CSS Properties
|
|
117
|
+
|
|
118
|
+
The theme generates a comprehensive set of CSS custom properties:
|
|
119
|
+
|
|
120
|
+
```css
|
|
121
|
+
/* Primary colors */
|
|
122
|
+
--schmancy-sys-color-primary-default
|
|
123
|
+
--schmancy-sys-color-primary-onDefault
|
|
124
|
+
--schmancy-sys-color-primary-container
|
|
125
|
+
--schmancy-sys-color-primary-onContainer
|
|
126
|
+
|
|
127
|
+
/* Secondary colors */
|
|
128
|
+
--schmancy-sys-color-secondary-default
|
|
129
|
+
--schmancy-sys-color-secondary-onDefault
|
|
130
|
+
--schmancy-sys-color-secondary-container
|
|
131
|
+
--schmancy-sys-color-secondary-onContainer
|
|
132
|
+
|
|
133
|
+
/* Tertiary colors */
|
|
134
|
+
--schmancy-sys-color-tertiary-default
|
|
135
|
+
--schmancy-sys-color-tertiary-onDefault
|
|
136
|
+
|
|
137
|
+
/* Surface colors */
|
|
138
|
+
--schmancy-sys-color-surface-default
|
|
139
|
+
--schmancy-sys-color-surface-on
|
|
140
|
+
--schmancy-sys-color-surface-container
|
|
141
|
+
--schmancy-sys-color-surface-containerHigh
|
|
142
|
+
--schmancy-sys-color-surface-containerHighest
|
|
143
|
+
|
|
144
|
+
/* And many more... */
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Auto Color Scheme Detection
|
|
148
|
+
|
|
149
|
+
```javascript
|
|
150
|
+
// Automatically detects system preference
|
|
151
|
+
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
152
|
+
|
|
153
|
+
// Reactive updates when system preference changes
|
|
154
|
+
scheme === 'auto' && mediaQuery.addEventListener('change', updateTheme);
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Random Color Generation
|
|
158
|
+
|
|
159
|
+
When no color is specified, generates a random color:
|
|
160
|
+
|
|
161
|
+
```javascript
|
|
162
|
+
generateRandomColor() {
|
|
163
|
+
const randomColor = Math.floor(Math.random() * 16777215).toString(16);
|
|
164
|
+
return '#' + randomColor.padStart(6, '0');
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Context Provider
|
|
169
|
+
|
|
170
|
+
The theme component provides its theme via Lit Context:
|
|
171
|
+
|
|
172
|
+
```javascript
|
|
173
|
+
import { consume } from '@lit/context';
|
|
174
|
+
import { themeContext } from '@schmancy/theme';
|
|
175
|
+
|
|
176
|
+
// In child components
|
|
177
|
+
@consume({ context: themeContext })
|
|
178
|
+
theme: TSchmancyTheme;
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Advanced Usage
|
|
182
|
+
|
|
183
|
+
### Nested Themes
|
|
184
|
+
```html
|
|
185
|
+
<schmancy-theme color="#2196F3" scheme="light">
|
|
186
|
+
<div class="main-content">
|
|
187
|
+
<!-- Blue light theme -->
|
|
188
|
+
|
|
189
|
+
<schmancy-theme color="#F44336" scheme="dark">
|
|
190
|
+
<aside class="sidebar">
|
|
191
|
+
<!-- Red dark theme -->
|
|
192
|
+
</aside>
|
|
193
|
+
</schmancy-theme>
|
|
194
|
+
</div>
|
|
195
|
+
</schmancy-theme>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Dynamic Theme Changes
|
|
199
|
+
```javascript
|
|
200
|
+
const themeEl = document.querySelector('schmancy-theme');
|
|
201
|
+
|
|
202
|
+
// Change color
|
|
203
|
+
themeEl.color = '#9C27B0';
|
|
204
|
+
|
|
205
|
+
// Switch scheme
|
|
206
|
+
themeEl.scheme = 'dark';
|
|
207
|
+
|
|
208
|
+
// Apply custom overrides
|
|
209
|
+
themeEl.theme = {
|
|
210
|
+
sys: {
|
|
211
|
+
color: {
|
|
212
|
+
error: {
|
|
213
|
+
default: '#FF0000'
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Best Practices
|
|
221
|
+
|
|
222
|
+
1. **Root Theme**: Use one root theme for consistency
|
|
223
|
+
2. **Color Choice**: Pick colors with good contrast ratios
|
|
224
|
+
3. **Scheme Handling**: Respect user preferences with 'auto'
|
|
225
|
+
4. **Performance**: Limit nested themes
|
|
226
|
+
5. **Accessibility**: Test themes with contrast checkers
|
|
227
|
+
|
|
228
|
+
## Related Components
|
|
229
|
+
|
|
230
|
+
- [Theme Button](./theme-button.md) - Theme switcher
|
|
231
|
+
- [Surface](./surface.md) - Themed containers
|
|
232
|
+
- [Button](./button.md) - Themed interactions
|
|
233
|
+
- [Card](./card.md) - Themed content
|
|
234
|
+
|
|
235
|
+
## Use Cases
|
|
236
|
+
|
|
237
|
+
1. **App Theming**: Consistent app-wide styling
|
|
238
|
+
2. **White-Label**: Dynamic branding
|
|
239
|
+
3. **User Preferences**: Personalized themes
|
|
240
|
+
4. **Section Theming**: Different themes for app sections
|
|
241
|
+
5. **A/B Testing**: Theme variations for testing
|
package/ai/typewriter.md
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Typewriter Component
|
|
2
|
+
|
|
3
|
+
An engaging text animation component that simulates typing effects with customizable speed, delays, and advanced sequencing capabilities.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<!-- Basic typewriter effect -->
|
|
9
|
+
<schmancy-typewriter>
|
|
10
|
+
Hello, World! This text will be typed out character by character.
|
|
11
|
+
</schmancy-typewriter>
|
|
12
|
+
|
|
13
|
+
<!-- With custom speed -->
|
|
14
|
+
<schmancy-typewriter speed="30" delay="500">
|
|
15
|
+
Fast typing with a delay before starting.
|
|
16
|
+
</schmancy-typewriter>
|
|
17
|
+
|
|
18
|
+
<!-- With actions -->
|
|
19
|
+
<schmancy-typewriter>
|
|
20
|
+
Type this first.
|
|
21
|
+
<span action="pause" value="1000"></span>
|
|
22
|
+
Then type this after a pause.
|
|
23
|
+
<span action="delete" value="10"></span>
|
|
24
|
+
And finally this!
|
|
25
|
+
</schmancy-typewriter>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
|
|
30
|
+
| Property | Type | Default | Description |
|
|
31
|
+
|----------|------|---------|-------------|
|
|
32
|
+
| `speed` | `number` | `50` | Typing speed (ms per character) |
|
|
33
|
+
| `delay` | `number` | `0` | Initial delay before typing starts |
|
|
34
|
+
| `autoStart` | `boolean` | `true` | Start typing automatically |
|
|
35
|
+
| `cursorChar` | `string` | `''` | Custom cursor character |
|
|
36
|
+
| `deleteSpeed` | `number` | `25` | Speed for deletion (ms per character) |
|
|
37
|
+
| `once` | `boolean` | `true` | Only animate once per session |
|
|
38
|
+
|
|
39
|
+
## Events
|
|
40
|
+
|
|
41
|
+
### typeit-complete
|
|
42
|
+
Fired when typing animation completes.
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
45
|
+
element.addEventListener('typeit-complete', () => {
|
|
46
|
+
console.log('Typing finished!');
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
|
|
52
|
+
### Hero Section
|
|
53
|
+
```html
|
|
54
|
+
<div class="hero">
|
|
55
|
+
<h1>
|
|
56
|
+
<schmancy-typewriter speed="100" delay="300">
|
|
57
|
+
Welcome to the Future
|
|
58
|
+
</schmancy-typewriter>
|
|
59
|
+
</h1>
|
|
60
|
+
<p>
|
|
61
|
+
<schmancy-typewriter delay="2000" speed="40">
|
|
62
|
+
Where innovation meets possibility.
|
|
63
|
+
</schmancy-typewriter>
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Multi-line Typing
|
|
69
|
+
```html
|
|
70
|
+
<schmancy-typewriter speed="60">
|
|
71
|
+
<p>First paragraph of text.</p>
|
|
72
|
+
<p>Second paragraph appears on a new line.</p>
|
|
73
|
+
<p>Third paragraph continues the story.</p>
|
|
74
|
+
</schmancy-typewriter>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Terminal Effect
|
|
78
|
+
```html
|
|
79
|
+
<div class="terminal">
|
|
80
|
+
<schmancy-typewriter cursorChar="|" speed="30">
|
|
81
|
+
$ npm install schmancy-ui
|
|
82
|
+
<span action="pause" value="500"></span>
|
|
83
|
+
<p>Installing dependencies...</p>
|
|
84
|
+
<span action="pause" value="1000"></span>
|
|
85
|
+
<p>✓ Installation complete!</p>
|
|
86
|
+
</schmancy-typewriter>
|
|
87
|
+
</div>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Dynamic Typing Sequence
|
|
91
|
+
```html
|
|
92
|
+
<schmancy-typewriter>
|
|
93
|
+
We are
|
|
94
|
+
<span action="pause" value="500"></span>
|
|
95
|
+
developers
|
|
96
|
+
<span action="delete" value="10"></span>
|
|
97
|
+
designers
|
|
98
|
+
<span action="delete" value="9"></span>
|
|
99
|
+
innovators
|
|
100
|
+
<span action="pause" value="1000"></span>
|
|
101
|
+
!
|
|
102
|
+
</schmancy-typewriter>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Code Tutorial
|
|
106
|
+
```html
|
|
107
|
+
<schmancy-typewriter speed="40">
|
|
108
|
+
<code>
|
|
109
|
+
function greet(name) {
|
|
110
|
+
<span action="pause" value="300"></span>
|
|
111
|
+
return `Hello, ${name}!`;
|
|
112
|
+
<span action="pause" value="300"></span>
|
|
113
|
+
}
|
|
114
|
+
</code>
|
|
115
|
+
</schmancy-typewriter>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Actions System
|
|
119
|
+
|
|
120
|
+
Special action elements control typing behavior:
|
|
121
|
+
|
|
122
|
+
| Action | Value | Description |
|
|
123
|
+
|--------|-------|-------------|
|
|
124
|
+
| `pause` | milliseconds | Pause typing for specified duration |
|
|
125
|
+
| `delete` | character count | Delete specified number of characters |
|
|
126
|
+
|
|
127
|
+
```html
|
|
128
|
+
<span action="pause" value="1000"></span> <!-- 1 second pause -->
|
|
129
|
+
<span action="delete" value="5"></span> <!-- Delete 5 characters -->
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Features
|
|
133
|
+
|
|
134
|
+
### Session Memory
|
|
135
|
+
When `once` is true, remembers completion state per session:
|
|
136
|
+
- Uses sessionStorage with content hash
|
|
137
|
+
- Skips animation on repeat views
|
|
138
|
+
- Clears on session end
|
|
139
|
+
|
|
140
|
+
### Context Integration
|
|
141
|
+
Inherits delay from parent `schmancy-delay` components:
|
|
142
|
+
|
|
143
|
+
```html
|
|
144
|
+
<schmancy-delay delay="1000">
|
|
145
|
+
<schmancy-typewriter> <!-- Inherits 1000ms delay -->
|
|
146
|
+
This starts typing after 1 second
|
|
147
|
+
</schmancy-typewriter>
|
|
148
|
+
</schmancy-delay>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Intersection Observer
|
|
152
|
+
Only starts typing when element is in viewport:
|
|
153
|
+
- Efficient performance
|
|
154
|
+
- Better user experience
|
|
155
|
+
- Automatic trigger on scroll
|
|
156
|
+
|
|
157
|
+
### TypeIt Integration
|
|
158
|
+
Powered by the TypeIt library for smooth, reliable animations.
|
|
159
|
+
|
|
160
|
+
## Styling
|
|
161
|
+
|
|
162
|
+
```css
|
|
163
|
+
/* Hide cursor after completion */
|
|
164
|
+
schmancy-typewriter {
|
|
165
|
+
--ti-cursor-display: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Custom cursor styling */
|
|
169
|
+
schmancy-typewriter .ti-cursor {
|
|
170
|
+
color: var(--schmancy-sys-color-primary-default);
|
|
171
|
+
font-weight: normal;
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Advanced Configuration
|
|
176
|
+
|
|
177
|
+
```javascript
|
|
178
|
+
// TypeIt options passed through
|
|
179
|
+
const typeItOptions = {
|
|
180
|
+
speed: this.speed,
|
|
181
|
+
startDelay: this.delay,
|
|
182
|
+
cursor: !!this.cursorChar,
|
|
183
|
+
cursorChar: this.cursorChar,
|
|
184
|
+
deleteSpeed: this.deleteSpeed,
|
|
185
|
+
afterComplete: () => {
|
|
186
|
+
// Custom completion logic
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Accessibility
|
|
192
|
+
|
|
193
|
+
- Uses `aria-live="polite"` for screen reader support
|
|
194
|
+
- Completed text remains in DOM
|
|
195
|
+
- Semantic HTML structure maintained
|
|
196
|
+
|
|
197
|
+
## Best Practices
|
|
198
|
+
|
|
199
|
+
1. **Speed**: 40-80ms for comfortable reading speed
|
|
200
|
+
2. **Delays**: Use pauses for emphasis
|
|
201
|
+
3. **Content**: Keep animations short and meaningful
|
|
202
|
+
4. **Performance**: Limit concurrent typewriters
|
|
203
|
+
5. **Mobile**: Test on various devices
|
|
204
|
+
|
|
205
|
+
## Related Components
|
|
206
|
+
|
|
207
|
+
- [Animated Text](./animated-text.md) - Word/letter animations
|
|
208
|
+
- [Delay](./delay.md) - Coordinated delays
|
|
209
|
+
- [Typography](./typography.md) - Text styling
|
|
210
|
+
|
|
211
|
+
## Use Cases
|
|
212
|
+
|
|
213
|
+
1. **Landing Pages**: Engaging hero text
|
|
214
|
+
2. **Tutorials**: Step-by-step code examples
|
|
215
|
+
3. **Storytelling**: Narrative experiences
|
|
216
|
+
4. **Loading States**: Entertaining wait messages
|
|
217
|
+
5. **Terminal UIs**: Command-line interfaces
|