@mhmo91/schmancy 0.4.73 → 0.4.75
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/area.md +525 -108
- package/ai/busy.md +2 -1
- package/ai/button.md +4 -0
- package/ai/code-highlight.md +2 -1
- package/ai/content-drawer.md +2 -1
- package/ai/context.md +7 -2
- package/ai/countries.md +2 -1
- package/ai/date-range-inline.md +262 -0
- package/ai/date-range.md +2 -1
- package/ai/details.md +194 -0
- package/ai/dialog.md +2 -1
- package/ai/directives.md +2 -1
- package/ai/form.md +10 -10
- package/ai/list.md +10 -9
- package/ai/mailbox.md +530 -0
- package/ai/map.md +2 -1
- package/ai/notification.md +14 -12
- package/ai/payment-card-form.md +2 -1
- package/ai/sheet.md +6 -4
- package/ai/steps.md +6 -0
- package/ai/store.md +8 -4
- package/ai/surface.md +2 -1
- package/ai/teleport.md +2 -1
- package/ai/theme.md +690 -8
- package/ai/timezone.md +2 -1
- package/ai/typography.md +2 -1
- package/dist/ai/area.md +525 -108
- package/dist/ai/busy.md +2 -1
- package/dist/ai/button.md +4 -0
- package/dist/ai/code-highlight.md +2 -1
- package/dist/ai/content-drawer.md +2 -1
- package/dist/ai/context.md +7 -2
- package/dist/ai/countries.md +2 -1
- package/dist/ai/date-range-inline.md +262 -0
- package/dist/ai/date-range.md +2 -1
- package/dist/ai/details.md +194 -0
- package/dist/ai/dialog.md +2 -1
- package/dist/ai/directives.md +2 -1
- package/dist/ai/form.md +10 -10
- package/dist/ai/list.md +10 -9
- package/dist/ai/mailbox.md +530 -0
- package/dist/ai/map.md +2 -1
- package/dist/ai/notification.md +14 -12
- package/dist/ai/payment-card-form.md +2 -1
- package/dist/ai/sheet.md +6 -4
- package/dist/ai/steps.md +6 -0
- package/dist/ai/store.md +8 -4
- package/dist/ai/surface.md +2 -1
- package/dist/ai/teleport.md +2 -1
- package/dist/ai/theme.md +690 -8
- package/dist/ai/timezone.md +2 -1
- package/dist/ai/typography.md +2 -1
- package/dist/{animated-text-Dj3HHUD4.js → animated-text-CqpyC7Y0.js} +3 -3
- package/dist/{animated-text-Dj3HHUD4.js.map → animated-text-CqpyC7Y0.js.map} +1 -1
- package/dist/{animated-text-CPAqO_J3.cjs → animated-text-DlRt6Q09.cjs} +2 -2
- package/dist/{animated-text-CPAqO_J3.cjs.map → animated-text-DlRt6Q09.cjs.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.js +1 -1
- package/dist/{autocomplete-kJ7y028b.js → autocomplete-B-oKMH7m.js} +3 -3
- package/dist/{autocomplete-kJ7y028b.js.map → autocomplete-B-oKMH7m.js.map} +1 -1
- package/dist/{autocomplete-B3ArCTZl.cjs → autocomplete-BOGG_9iL.cjs} +2 -2
- package/dist/{autocomplete-B3ArCTZl.cjs.map → autocomplete-BOGG_9iL.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-r7OnlyPP.cjs → avatar-C27bnQKE.cjs} +2 -2
- package/dist/{avatar-r7OnlyPP.cjs.map → avatar-C27bnQKE.cjs.map} +1 -1
- package/dist/{avatar-DI5vtg3k.js → avatar-DKVNl5rX.js} +50 -50
- package/dist/{avatar-DI5vtg3k.js.map → avatar-DKVNl5rX.js.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-Cp8VgFWP.js → boat-CdR5Pqik.js} +2 -2
- package/dist/{boat-Cp8VgFWP.js.map → boat-CdR5Pqik.js.map} +1 -1
- package/dist/{boat-COlWXsv8.cjs → boat-DMKcZpZb.cjs} +2 -2
- package/dist/{boat-COlWXsv8.cjs.map → boat-DMKcZpZb.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-Cbkcvj-3.js → checkbox-CVwU3M4h.js} +2 -2
- package/dist/{checkbox-Cbkcvj-3.js.map → checkbox-CVwU3M4h.js.map} +1 -1
- package/dist/{checkbox-u355dDEB.cjs → checkbox-DP_zX786.cjs} +2 -2
- package/dist/{checkbox-u355dDEB.cjs.map → checkbox-DP_zX786.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-BFn88CJs.cjs → chips-BuMUH3zA.cjs} +2 -2
- package/dist/{chips-BFn88CJs.cjs.map → chips-BuMUH3zA.cjs.map} +1 -1
- package/dist/{chips-Y5nzkBJw.js → chips-DcCUwYBu.js} +3 -3
- package/dist/{chips-Y5nzkBJw.js.map → chips-DcCUwYBu.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-D2peRzvQ.js → code-preview-CIXEd04f.js} +3 -3
- package/dist/{code-preview-D2peRzvQ.js.map → code-preview-CIXEd04f.js.map} +1 -1
- package/dist/{code-preview-CsQWYHL5.cjs → code-preview-CdCzzZTX.cjs} +3 -3
- package/dist/{code-preview-CsQWYHL5.cjs.map → code-preview-CdCzzZTX.cjs.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-Ya1J9HQQ.cjs → date-range-CvD9zwK9.cjs} +2 -2
- package/dist/{date-range-Ya1J9HQQ.cjs.map → date-range-CvD9zwK9.cjs.map} +1 -1
- package/dist/{date-range-inline-Q5qz2lG_.js → date-range-inline-5QP9av94.js} +3 -3
- package/dist/{date-range-inline-Q5qz2lG_.js.map → date-range-inline-5QP9av94.js.map} +1 -1
- package/dist/{date-range-inline-CXBrxoim.cjs → date-range-inline-CP_a_w01.cjs} +2 -2
- package/dist/{date-range-inline-CXBrxoim.cjs.map → date-range-inline-CP_a_w01.cjs.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/{date-range-DnKu_v9b.js → date-range-lJ_fPY4v.js} +4 -4
- package/dist/{date-range-DnKu_v9b.js.map → date-range-lJ_fPY4v.js.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-DVqCtHik.js → delay-BM1jk7XF.js} +2 -2
- package/dist/{delay-DVqCtHik.js.map → delay-BM1jk7XF.js.map} +1 -1
- package/dist/{delay-Dl6B_yyv.cjs → delay-CB0Wohe7.cjs} +2 -2
- package/dist/{delay-Dl6B_yyv.cjs.map → delay-CB0Wohe7.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-w1ooWiKA.js → details-B9JrXrCO.js} +2 -2
- package/dist/{details-w1ooWiKA.js.map → details-B9JrXrCO.js.map} +1 -1
- package/dist/{details-LZ_GGbW-.cjs → details-C22WoRWP.cjs} +2 -2
- package/dist/{details-LZ_GGbW-.cjs.map → details-C22WoRWP.cjs.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-content-B7V_S6GR.js → dialog-content-BHR9cUJ-.js} +4 -4
- package/dist/{dialog-content-B7V_S6GR.js.map → dialog-content-BHR9cUJ-.js.map} +1 -1
- package/dist/{dialog-content-VroTT22f.cjs → dialog-content-CpxWMPlh.cjs} +2 -2
- package/dist/{dialog-content-VroTT22f.cjs.map → dialog-content-CpxWMPlh.cjs.map} +1 -1
- package/dist/{dialog-service-Dpz_NIRP.js → dialog-service-DwhuICgc.js} +2 -2
- package/dist/dialog-service-DwhuICgc.js.map +1 -0
- package/dist/dialog-service-juvsgc5X.cjs +2 -0
- package/dist/dialog-service-juvsgc5X.cjs.map +1 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +2 -2
- package/dist/{divider-OuCqxcUB.js → divider-Cz4g_Ept.js} +3 -3
- package/dist/{divider-OuCqxcUB.js.map → divider-Cz4g_Ept.js.map} +1 -1
- package/dist/{divider-CegpMW-2.cjs → divider-DAg0oW4T.cjs} +2 -2
- package/dist/{divider-CegpMW-2.cjs.map → divider-DAg0oW4T.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-BuKCBydD.js → dropdown-content-Bto1swKT.js} +3 -3
- package/dist/{dropdown-content-BuKCBydD.js.map → dropdown-content-Bto1swKT.js.map} +1 -1
- package/dist/{dropdown-content-f0LuoUKR.cjs → dropdown-content-QvR9QvT0.cjs} +2 -2
- package/dist/{dropdown-content-f0LuoUKR.cjs.map → dropdown-content-QvR9QvT0.cjs.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-CvSwxcso.js → email-recipients-C9Yx0eML.js} +7 -7
- package/dist/{email-recipients-CvSwxcso.js.map → email-recipients-C9Yx0eML.js.map} +1 -1
- package/dist/{email-recipients-BlEtpbdr.cjs → email-recipients-aEI5Hz1y.cjs} +2 -2
- package/dist/{email-recipients-BlEtpbdr.cjs.map → email-recipients-aEI5Hz1y.cjs.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-HyTTaFX9.js → flex-8Zt64KfZ.js} +2 -2
- package/dist/{flex-HyTTaFX9.js.map → flex-8Zt64KfZ.js.map} +1 -1
- package/dist/{flex-Cdv04m_E.cjs → flex-BWZv2xik.cjs} +2 -2
- package/dist/{flex-Cdv04m_E.cjs.map → flex-BWZv2xik.cjs.map} +1 -1
- package/dist/{form-CXRNS-AS.cjs → form-BH43OMu3.cjs} +2 -2
- package/dist/{form-CXRNS-AS.cjs.map → form-BH43OMu3.cjs.map} +1 -1
- package/dist/{form-BNTXCzQo.js → form-DeoSuBtM.js} +2 -2
- package/dist/{form-BNTXCzQo.js.map → form-DeoSuBtM.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-MhetZTeW.js → formField.mixin-BaPL0TYo.js} +2 -2
- package/dist/{formField.mixin-MhetZTeW.js.map → formField.mixin-BaPL0TYo.js.map} +1 -1
- package/dist/{formField.mixin-zezhhNIA.cjs → formField.mixin-Dta3OeAY.cjs} +2 -2
- package/dist/{formField.mixin-zezhhNIA.cjs.map → formField.mixin-Dta3OeAY.cjs.map} +1 -1
- package/dist/{icon-C71zn7AW.js → icon-B0JNrBfq.js} +2 -2
- package/dist/{icon-C71zn7AW.js.map → icon-B0JNrBfq.js.map} +1 -1
- package/dist/{icon-e6XggWlw.cjs → icon-DY2pBLIU.cjs} +2 -2
- package/dist/{icon-e6XggWlw.cjs.map → icon-DY2pBLIU.cjs.map} +1 -1
- package/dist/{icon-button-CO8rMFUR.cjs → icon-button-D1GjgM8z.cjs} +2 -2
- package/dist/{icon-button-CO8rMFUR.cjs.map → icon-button-D1GjgM8z.cjs.map} +1 -1
- package/dist/{icon-button-KoYGGW6a.js → icon-button-OZM1xg0D.js} +3 -3
- package/dist/{icon-button-KoYGGW6a.js.map → icon-button-OZM1xg0D.js.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 +76 -74
- package/dist/index.js.map +1 -1
- package/dist/{input-LTpT28E4.js → input-CkvjCut5.js} +3 -3
- package/dist/{input-LTpT28E4.js.map → input-CkvjCut5.js.map} +1 -1
- package/dist/{input-CFvMe_KR.cjs → input-lUWuO40Q.cjs} +2 -2
- package/dist/{input-CFvMe_KR.cjs.map → input-lUWuO40Q.cjs.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-CAJJTrLl.js → list-5rw56k73.js} +2 -2
- package/dist/{list-CAJJTrLl.js.map → list-5rw56k73.js.map} +1 -1
- package/dist/{list-D2dyHYN9.cjs → list-CIt75CB5.cjs} +2 -2
- package/dist/{list-D2dyHYN9.cjs.map → list-CIt75CB5.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-4iclDbF3.cjs → litElement.mixin-BLa7fWsS.cjs} +2 -2
- package/dist/{litElement.mixin-4iclDbF3.cjs.map → litElement.mixin-BLa7fWsS.cjs.map} +1 -1
- package/dist/{litElement.mixin-SeAIQuRg.js → litElement.mixin-BZErt4H3.js} +2 -2
- package/dist/{litElement.mixin-SeAIQuRg.js.map → litElement.mixin-BZErt4H3.js.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-CMkosiu4.cjs → map-BY_0W4ER.cjs} +2 -2
- package/dist/{map-CMkosiu4.cjs.map → map-BY_0W4ER.cjs.map} +1 -1
- package/dist/{map-DwMX_LnY.js → map-BrguuFGa.js} +2 -2
- package/dist/{map-DwMX_LnY.js.map → map-BrguuFGa.js.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-B98kFRvT.js → media-CLz2t5zS.js} +2 -2
- package/dist/{media-B98kFRvT.js.map → media-CLz2t5zS.js.map} +1 -1
- package/dist/{media-DxbLFhc5.cjs → media-D6ZtvTjC.cjs} +2 -2
- package/dist/{media-DxbLFhc5.cjs.map → media-D6ZtvTjC.cjs.map} +1 -1
- package/dist/{menu-ChMwBut9.js → menu-CgDSJpDV.js} +3 -3
- package/dist/{menu-ChMwBut9.js.map → menu-CgDSJpDV.js.map} +1 -1
- package/dist/{menu-DTRbll_X.cjs → menu-DWD_IywE.cjs} +2 -2
- package/dist/{menu-DTRbll_X.cjs.map → menu-DWD_IywE.cjs.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-BiEAwrL6.js → notification-service-1HGYK2tM.js} +4 -4
- package/dist/{notification-service-BiEAwrL6.js.map → notification-service-1HGYK2tM.js.map} +1 -1
- package/dist/{notification-service-h3GuXar7.cjs → notification-service-A3reAJZQ.cjs} +2 -2
- package/dist/{notification-service-h3GuXar7.cjs.map → notification-service-A3reAJZQ.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +2 -2
- package/dist/{notify-1NUgv3Qz.js → notify-Bt-KiLeP.js} +2 -2
- package/dist/{notify-1NUgv3Qz.js.map → notify-Bt-KiLeP.js.map} +1 -1
- package/dist/{notify-CP9929J0.cjs → notify-CVbsMt75.cjs} +2 -2
- package/dist/{notify-CP9929J0.cjs.map → notify-CVbsMt75.cjs.map} +1 -1
- package/dist/{option-VxlQIYFR.cjs → option-Cd0TxMBE.cjs} +2 -2
- package/dist/{option-VxlQIYFR.cjs.map → option-Cd0TxMBE.cjs.map} +1 -1
- package/dist/{option-DvEFWkrm.js → option-DvSZ0D0R.js} +2 -2
- package/dist/{option-DvEFWkrm.js.map → option-DvSZ0D0R.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-CEd08rns.js → payment-card-form-C6wrIT_X.js} +3 -3
- package/dist/{payment-card-form-CEd08rns.js.map → payment-card-form-C6wrIT_X.js.map} +1 -1
- package/dist/{payment-card-form-CAPM_YfT.cjs → payment-card-form-CJkWQ3j4.cjs} +2 -2
- package/dist/{payment-card-form-CAPM_YfT.cjs.map → payment-card-form-CJkWQ3j4.cjs.map} +1 -1
- package/dist/{progress-Bu8wtPRI.cjs → progress-D0iWLtHk.cjs} +2 -2
- package/dist/{progress-Bu8wtPRI.cjs.map → progress-D0iWLtHk.cjs.map} +1 -1
- package/dist/{progress-CL4SPk5b.js → progress-pOL6OHwT.js} +2 -2
- package/dist/{progress-CL4SPk5b.js.map → progress-pOL6OHwT.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-button-B087BeTl.js → radio-button-C-t6JJsj.js} +3 -3
- package/dist/{radio-button-B087BeTl.js.map → radio-button-C-t6JJsj.js.map} +1 -1
- package/dist/{radio-button-vz9nLR-m.cjs → radio-button-CSV7-ftB.cjs} +2 -2
- package/dist/{radio-button-vz9nLR-m.cjs.map → radio-button-CSV7-ftB.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/route.component-BWVESeW2.cjs +12 -0
- package/dist/route.component-BWVESeW2.cjs.map +1 -0
- package/dist/route.component-DkPA8FVn.js +348 -0
- package/dist/route.component-DkPA8FVn.js.map +1 -0
- package/dist/{schmancy-steps-container-CEvpeKIe.js → schmancy-steps-container-AIJ2_ZSN.js} +2 -2
- package/dist/{schmancy-steps-container-CEvpeKIe.js.map → schmancy-steps-container-AIJ2_ZSN.js.map} +1 -1
- package/dist/{schmancy-steps-container-DvSClSo1.cjs → schmancy-steps-container-CgzGlBCk.cjs} +2 -2
- package/dist/{schmancy-steps-container-DvSClSo1.cjs.map → schmancy-steps-container-CgzGlBCk.cjs.map} +1 -1
- package/dist/{select-BoUYZPyl.js → select-CwJ4OuVo.js} +3 -3
- package/dist/{select-BoUYZPyl.js.map → select-CwJ4OuVo.js.map} +1 -1
- package/dist/{select-4VXPMU8r.cjs → select-GBaqnfMC.cjs} +2 -2
- package/dist/{select-4VXPMU8r.cjs.map → select-GBaqnfMC.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-IfHxyIo_.cjs → sheet-CXd47YKG.cjs} +2 -2
- package/dist/{sheet-IfHxyIo_.cjs.map → sheet-CXd47YKG.cjs.map} +1 -1
- package/dist/{sheet-C6djCmPV.js → sheet-fT1oxKgG.js} +4 -4
- package/dist/{sheet-C6djCmPV.js.map → sheet-fT1oxKgG.js.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/sheet.service-BxvWBGsJ.cjs +2 -0
- package/dist/sheet.service-BxvWBGsJ.cjs.map +1 -0
- package/dist/{sheet.service-DZGMoIHy.js → sheet.service-lXqUf6n5.js} +2 -2
- package/dist/sheet.service-lXqUf6n5.js.map +1 -0
- package/dist/{slider-DERHNjqI.js → slider-CYsku-3b.js} +3 -3
- package/dist/{slider-DERHNjqI.js.map → slider-CYsku-3b.js.map} +1 -1
- package/dist/{slider-BfNNQ6qI.cjs → slider-DxSzFbQe.cjs} +2 -2
- package/dist/{slider-BfNNQ6qI.cjs.map → slider-DxSzFbQe.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-BOdUWwXq.js → spinner-CrK1E8LD.js} +2 -2
- package/dist/{spinner-BOdUWwXq.js.map → spinner-CrK1E8LD.js.map} +1 -1
- package/dist/{spinner-Bip-lfsc.cjs → spinner-DrG_NQpx.cjs} +2 -2
- package/dist/{spinner-Bip-lfsc.cjs.map → spinner-DrG_NQpx.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-CyhVK7JG.js → surface-C64YekDh.js} +2 -2
- package/dist/{surface-CyhVK7JG.js.map → surface-C64YekDh.js.map} +1 -1
- package/dist/{surface--Nh6Q896.cjs → surface-DVNi8l6T.cjs} +2 -2
- package/dist/{surface--Nh6Q896.cjs.map → surface-DVNi8l6T.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-x9dbc3AY.cjs → table-B3WKGYlu.cjs} +2 -2
- package/dist/{table-x9dbc3AY.cjs.map → table-B3WKGYlu.cjs.map} +1 -1
- package/dist/{table-DnPQ0zCd.js → table-DmrYZ1hR.js} +2 -2
- package/dist/{table-DnPQ0zCd.js.map → table-DmrYZ1hR.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-D3HfZRKv.cjs → tabs-compatibility-Ds7SEeST.cjs} +2 -2
- package/dist/{tabs-compatibility-D3HfZRKv.cjs.map → tabs-compatibility-Ds7SEeST.cjs.map} +1 -1
- package/dist/{tabs-compatibility-Dazz1g0Q.js → tabs-compatibility-Uetjk25R.js} +2 -2
- package/dist/{tabs-compatibility-Dazz1g0Q.js.map → tabs-compatibility-Uetjk25R.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/{tailwind.mixin-kvywknTU.js → tailwind.mixin-B6ADeWOc.js} +2 -2
- package/dist/{tailwind.mixin-kvywknTU.js.map → tailwind.mixin-B6ADeWOc.js.map} +1 -1
- package/dist/{tailwind.mixin-Bwf86oi5.cjs → tailwind.mixin-df9KoZ9x.cjs} +2 -2
- package/dist/{tailwind.mixin-Bwf86oi5.cjs.map → tailwind.mixin-df9KoZ9x.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-bHJFDEva.js → textarea-B1Tng7F9.js} +2 -2
- package/dist/{textarea-bHJFDEva.js.map → textarea-B1Tng7F9.js.map} +1 -1
- package/dist/{textarea-xRo6a5-Y.cjs → textarea-QKNA3oAQ.cjs} +2 -2
- package/dist/{textarea-xRo6a5-Y.cjs.map → textarea-QKNA3oAQ.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-BPFuZSBY.js → theme-button-CYEhS3ub.js} +2 -2
- package/dist/{theme-button-BPFuZSBY.js.map → theme-button-CYEhS3ub.js.map} +1 -1
- package/dist/{theme-button-lvD9uCTZ.cjs → theme-button-CoCFS3Rx.cjs} +2 -2
- package/dist/{theme-button-lvD9uCTZ.cjs.map → theme-button-CoCFS3Rx.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.component-C12jLwtB.cjs +3 -0
- package/dist/theme.component-C12jLwtB.cjs.map +1 -0
- package/dist/{theme.component-C-PfGTcN.js → theme.component-Df731_fn.js} +247 -171
- package/dist/theme.component-Df731_fn.js.map +1 -0
- package/dist/theme.events-CPSLaOlR.js +6 -0
- package/dist/theme.events-CPSLaOlR.js.map +1 -0
- package/dist/theme.events-Car6U_SQ.cjs +2 -0
- package/dist/theme.events-Car6U_SQ.cjs.map +1 -0
- package/dist/theme.interface-C5Kj6WjD.js.map +1 -1
- package/dist/theme.interface-Xg5Zi46a.cjs.map +1 -1
- package/dist/theme.js +9 -7
- package/dist/theme.js.map +1 -1
- package/dist/{timezone-OLjylRB7.cjs → timezone-B7bscKFN.cjs} +2 -2
- package/dist/{timezone-OLjylRB7.cjs.map → timezone-B7bscKFN.cjs.map} +1 -1
- package/dist/{timezone-BDSbTYTk.js → timezone-CdtCVjMF.js} +3 -3
- package/dist/{timezone-BDSbTYTk.js.map → timezone-CdtCVjMF.js.map} +1 -1
- package/dist/{tooltip-iM0cfzsV.cjs → tooltip-CjoNCIvr.cjs} +2 -2
- package/dist/{tooltip-iM0cfzsV.cjs.map → tooltip-CjoNCIvr.cjs.map} +1 -1
- package/dist/{tooltip-CWiU3SEA.js → tooltip-JVkexTyf.js} +2 -2
- package/dist/{tooltip-CWiU3SEA.js.map → tooltip-JVkexTyf.js.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-CXIrKI2O.cjs → tree-Be48ABq4.cjs} +2 -2
- package/dist/{tree-CXIrKI2O.cjs.map → tree-Be48ABq4.cjs.map} +1 -1
- package/dist/{tree-JUf2hHiW.js → tree-CaqiNcJJ.js} +2 -2
- package/dist/{tree-JUf2hHiW.js.map → tree-CaqiNcJJ.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-DQuULTla.js → typewriter-CoMrmwFJ.js} +8 -8
- package/dist/{typewriter-DQuULTla.js.map → typewriter-CoMrmwFJ.js.map} +1 -1
- package/dist/{typewriter-YW7NGa6H.cjs → typewriter-DCYDScE9.cjs} +2 -2
- package/dist/{typewriter-YW7NGa6H.cjs.map → typewriter-DCYDScE9.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-CkLztts5.cjs → typography-BQg6J2hD.cjs} +2 -2
- package/dist/{typography-CkLztts5.cjs.map → typography-BQg6J2hD.cjs.map} +1 -1
- package/dist/{typography-kXb173Io.js → typography-DkJagEoF.js} +2 -2
- package/dist/{typography-kXb173Io.js.map → typography-DkJagEoF.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/types/src/area/area.component.d.ts +4 -0
- package/types/src/theme/context.d.ts +24 -0
- package/types/src/theme/index.d.ts +2 -0
- package/types/src/theme/theme.component.d.ts +49 -6
- package/types/src/theme/theme.events.d.ts +55 -0
- package/types/src/theme/theme.interface.d.ts +36 -0
- package/types/src/theme/theme.service.d.ts +261 -0
- package/dist/dialog-service-Dpz_NIRP.js.map +0 -1
- package/dist/dialog-service-Wna1JO09.cjs +0 -2
- package/dist/dialog-service-Wna1JO09.cjs.map +0 -1
- package/dist/route.component-D1xujH8n.js +0 -343
- package/dist/route.component-D1xujH8n.js.map +0 -1
- package/dist/route.component-ke_nkgvP.cjs +0 -12
- package/dist/route.component-ke_nkgvP.cjs.map +0 -1
- package/dist/sheet.service-DR9KJfMa.cjs +0 -2
- package/dist/sheet.service-DR9KJfMa.cjs.map +0 -1
- package/dist/sheet.service-DZGMoIHy.js.map +0 -1
- package/dist/theme.component-C-PfGTcN.js.map +0 -1
- package/dist/theme.component-DkcM8QzH.cjs +0 -3
- package/dist/theme.component-DkcM8QzH.cjs.map +0 -1
package/ai/theme.md
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
# Theme
|
|
1
|
+
# Theme System Documentation
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A comprehensive theming system that provides both a visual configuration component and a programmatic service API. Built on Material Design 3 principles, it generates complete color schemes with automatic dark/light mode support and CSS custom property injection.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Schmancy theme system consists of two main parts:
|
|
8
|
+
1. **Theme Component** (`<schmancy-theme>`) - Visual theme configuration interface
|
|
9
|
+
2. **Theme Service API** (`themeService`) - Programmatic theme management and subscriptions
|
|
4
10
|
|
|
5
11
|
## Quick Start
|
|
6
12
|
|
|
13
|
+
### Using the Theme Component
|
|
14
|
+
|
|
7
15
|
```html
|
|
8
16
|
<!-- Basic theme with auto color -->
|
|
9
17
|
<schmancy-theme>
|
|
@@ -25,7 +33,28 @@ A powerful theming system that generates Material Design 3 color schemes from a
|
|
|
25
33
|
</schmancy-theme>
|
|
26
34
|
```
|
|
27
35
|
|
|
28
|
-
|
|
36
|
+
### Using the Theme Service
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { themeService } from '@schmancy/index'
|
|
40
|
+
// Or specific import: import { themeService } from '@schmancy/theme'
|
|
41
|
+
|
|
42
|
+
// Get current theme
|
|
43
|
+
const theme = themeService.getCurrentTheme()
|
|
44
|
+
|
|
45
|
+
// Set theme mode
|
|
46
|
+
themeService.setMode('dark')
|
|
47
|
+
|
|
48
|
+
// Set primary color
|
|
49
|
+
themeService.setPrimaryColor('#6750A4')
|
|
50
|
+
|
|
51
|
+
// Subscribe to theme changes
|
|
52
|
+
themeService.theme$.subscribe(theme => {
|
|
53
|
+
console.log('Theme updated:', theme)
|
|
54
|
+
})
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Component Properties
|
|
29
58
|
|
|
30
59
|
| Property | Type | Default | Description |
|
|
31
60
|
|----------|------|---------|-------------|
|
|
@@ -171,7 +200,9 @@ The theme component provides its theme via Lit Context:
|
|
|
171
200
|
|
|
172
201
|
```javascript
|
|
173
202
|
import { consume } from '@lit/context';
|
|
174
|
-
import { themeContext } from '@schmancy/
|
|
203
|
+
import { themeContext } from '@schmancy/index';
|
|
204
|
+
// Or specific import: import { themeContext } from '@schmancy/index'
|
|
205
|
+
// Or specific import: import { themeContext } from '@schmancy/theme';
|
|
175
206
|
|
|
176
207
|
// In child components
|
|
177
208
|
@consume({ context: themeContext })
|
|
@@ -217,13 +248,661 @@ themeEl.theme = {
|
|
|
217
248
|
};
|
|
218
249
|
```
|
|
219
250
|
|
|
251
|
+
## Theme Service API
|
|
252
|
+
|
|
253
|
+
The theme service provides programmatic control over the theme system with reactive observables for state management.
|
|
254
|
+
|
|
255
|
+
### Service Methods
|
|
256
|
+
|
|
257
|
+
#### `getCurrentTheme()`
|
|
258
|
+
Returns the current theme configuration.
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
const theme = themeService.getCurrentTheme()
|
|
262
|
+
console.log(theme.mode) // 'light' | 'dark' | 'auto'
|
|
263
|
+
console.log(theme.primaryColor) // hex color string
|
|
264
|
+
console.log(theme.isDark) // boolean
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
#### `setMode(mode: 'light' | 'dark' | 'auto')`
|
|
268
|
+
Sets the theme mode.
|
|
269
|
+
|
|
270
|
+
```typescript
|
|
271
|
+
// Force light mode
|
|
272
|
+
themeService.setMode('light')
|
|
273
|
+
|
|
274
|
+
// Force dark mode
|
|
275
|
+
themeService.setMode('dark')
|
|
276
|
+
|
|
277
|
+
// Auto mode (follows system preference)
|
|
278
|
+
themeService.setMode('auto')
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
#### `setPrimaryColor(color: string)`
|
|
282
|
+
Sets the primary color and regenerates the theme palette.
|
|
283
|
+
|
|
284
|
+
```typescript
|
|
285
|
+
themeService.setPrimaryColor('#6750A4')
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
#### `setTheme(theme: ThemeConfig)`
|
|
289
|
+
Sets the complete theme configuration at once.
|
|
290
|
+
|
|
291
|
+
```typescript
|
|
292
|
+
themeService.setTheme({
|
|
293
|
+
mode: 'dark',
|
|
294
|
+
primaryColor: '#00897B',
|
|
295
|
+
fontFamily: 'Roboto',
|
|
296
|
+
borderRadius: 'medium'
|
|
297
|
+
})
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
#### `reset()`
|
|
301
|
+
Resets the theme to default settings.
|
|
302
|
+
|
|
303
|
+
```typescript
|
|
304
|
+
themeService.reset()
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Reactive Subscriptions
|
|
308
|
+
|
|
309
|
+
The theme service exposes RxJS observables for reactive updates:
|
|
310
|
+
|
|
311
|
+
#### `theme$` - Complete Theme State
|
|
312
|
+
```typescript
|
|
313
|
+
import { takeUntil } from 'rxjs'
|
|
314
|
+
|
|
315
|
+
themeService.theme$
|
|
316
|
+
.pipe(takeUntil(this.disconnecting))
|
|
317
|
+
.subscribe(theme => {
|
|
318
|
+
console.log('Theme updated:', theme)
|
|
319
|
+
// theme.mode, theme.primaryColor, theme.isDark, etc.
|
|
320
|
+
})
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
#### `mode$` - Mode Changes Only
|
|
324
|
+
```typescript
|
|
325
|
+
themeService.mode$
|
|
326
|
+
.pipe(takeUntil(this.disconnecting))
|
|
327
|
+
.subscribe(mode => {
|
|
328
|
+
console.log('Mode changed to:', mode)
|
|
329
|
+
})
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
#### `primaryColor$` - Color Changes Only
|
|
333
|
+
```typescript
|
|
334
|
+
themeService.primaryColor$
|
|
335
|
+
.pipe(takeUntil(this.disconnecting))
|
|
336
|
+
.subscribe(color => {
|
|
337
|
+
console.log('Primary color changed to:', color)
|
|
338
|
+
})
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### Using with Lit Context
|
|
342
|
+
|
|
343
|
+
Components can also access theme state via context:
|
|
344
|
+
|
|
345
|
+
```typescript
|
|
346
|
+
import { select } from '@schmancy/index'
|
|
347
|
+
// Or specific import: import { select } from '@schmancy/store'
|
|
348
|
+
import { themeContext } from '@schmancy/index'
|
|
349
|
+
// Or specific import: import { themeContext } from '@schmancy/theme'
|
|
350
|
+
|
|
351
|
+
@customElement('my-component')
|
|
352
|
+
class MyComponent extends LitElement {
|
|
353
|
+
@select(themeContext) theme!: ThemeState
|
|
354
|
+
|
|
355
|
+
render() {
|
|
356
|
+
return html`
|
|
357
|
+
<div>Current mode: ${this.theme.mode}</div>
|
|
358
|
+
<div>Is dark: ${this.theme.isDark}</div>
|
|
359
|
+
<div>Primary: ${this.theme.primaryColor}</div>
|
|
360
|
+
`
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### Practical Examples
|
|
366
|
+
|
|
367
|
+
#### Theme Toggle Button
|
|
368
|
+
```typescript
|
|
369
|
+
@customElement('theme-toggle')
|
|
370
|
+
export class ThemeToggle extends LitElement {
|
|
371
|
+
@state() private currentMode: 'light' | 'dark' | 'auto' = 'auto'
|
|
372
|
+
|
|
373
|
+
connectedCallback() {
|
|
374
|
+
super.connectedCallback()
|
|
375
|
+
|
|
376
|
+
themeService.mode$
|
|
377
|
+
.pipe(takeUntil(this.disconnecting))
|
|
378
|
+
.subscribe(mode => {
|
|
379
|
+
this.currentMode = mode
|
|
380
|
+
})
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
private toggleMode() {
|
|
384
|
+
const modes: Array<'light' | 'dark' | 'auto'> = ['light', 'dark', 'auto']
|
|
385
|
+
const currentIndex = modes.indexOf(this.currentMode)
|
|
386
|
+
const nextMode = modes[(currentIndex + 1) % modes.length]
|
|
387
|
+
themeService.setMode(nextMode)
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
render() {
|
|
391
|
+
const icon = this.currentMode === 'light' ? 'light_mode' :
|
|
392
|
+
this.currentMode === 'dark' ? 'dark_mode' : 'brightness_auto'
|
|
393
|
+
|
|
394
|
+
return html`
|
|
395
|
+
<schmancy-button @click=${this.toggleMode}>
|
|
396
|
+
<schmancy-icon slot="leading">${icon}</schmancy-icon>
|
|
397
|
+
${this.currentMode}
|
|
398
|
+
</schmancy-button>
|
|
399
|
+
`
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
#### Dynamic Color Picker
|
|
405
|
+
```typescript
|
|
406
|
+
@customElement('color-picker')
|
|
407
|
+
export class ColorPicker extends LitElement {
|
|
408
|
+
@state() private selectedColor = '#6750A4'
|
|
409
|
+
|
|
410
|
+
private colors = [
|
|
411
|
+
{ name: 'Purple', value: '#6750A4' },
|
|
412
|
+
{ name: 'Blue', value: '#0061A4' },
|
|
413
|
+
{ name: 'Green', value: '#006E1C' },
|
|
414
|
+
{ name: 'Orange', value: '#D84315' },
|
|
415
|
+
{ name: 'Pink', value: '#C2185B' }
|
|
416
|
+
]
|
|
417
|
+
|
|
418
|
+
connectedCallback() {
|
|
419
|
+
super.connectedCallback()
|
|
420
|
+
|
|
421
|
+
themeService.primaryColor$
|
|
422
|
+
.pipe(takeUntil(this.disconnecting))
|
|
423
|
+
.subscribe(color => {
|
|
424
|
+
this.selectedColor = color
|
|
425
|
+
})
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
private selectColor(color: string) {
|
|
429
|
+
themeService.setPrimaryColor(color)
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
render() {
|
|
433
|
+
return html`
|
|
434
|
+
<div class="flex gap-2 p-4">
|
|
435
|
+
${this.colors.map(color => html`
|
|
436
|
+
<button
|
|
437
|
+
@click=${() => this.selectColor(color.value)}
|
|
438
|
+
style="background-color: ${color.value}"
|
|
439
|
+
class="w-10 h-10 rounded-full border-2 transition-all ${
|
|
440
|
+
this.selectedColor === color.value ?
|
|
441
|
+
'border-white shadow-lg scale-110' :
|
|
442
|
+
'border-transparent'
|
|
443
|
+
}"
|
|
444
|
+
title=${color.name}
|
|
445
|
+
></button>
|
|
446
|
+
`)}
|
|
447
|
+
</div>
|
|
448
|
+
`
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
#### Persisting Theme Preferences
|
|
454
|
+
```typescript
|
|
455
|
+
import { debounceTime } from 'rxjs'
|
|
456
|
+
|
|
457
|
+
// Save theme to localStorage
|
|
458
|
+
class ThemePersistence {
|
|
459
|
+
constructor() {
|
|
460
|
+
// Load saved theme on initialization
|
|
461
|
+
this.loadTheme()
|
|
462
|
+
|
|
463
|
+
// Save theme changes
|
|
464
|
+
themeService.theme$
|
|
465
|
+
.pipe(
|
|
466
|
+
debounceTime(500) // Debounce to avoid excessive saves
|
|
467
|
+
)
|
|
468
|
+
.subscribe(theme => {
|
|
469
|
+
this.saveTheme(theme)
|
|
470
|
+
})
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
private loadTheme() {
|
|
474
|
+
const saved = localStorage.getItem('user-theme')
|
|
475
|
+
if (saved) {
|
|
476
|
+
try {
|
|
477
|
+
const theme = JSON.parse(saved)
|
|
478
|
+
themeService.setTheme(theme)
|
|
479
|
+
} catch (e) {
|
|
480
|
+
console.error('Failed to load saved theme', e)
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
private saveTheme(theme: ThemeState) {
|
|
486
|
+
localStorage.setItem('user-theme', JSON.stringify({
|
|
487
|
+
mode: theme.mode,
|
|
488
|
+
primaryColor: theme.primaryColor
|
|
489
|
+
}))
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// Initialize once in your app
|
|
494
|
+
new ThemePersistence()
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
#### Responding to System Preferences
|
|
498
|
+
```typescript
|
|
499
|
+
@customElement('system-aware')
|
|
500
|
+
export class SystemAware extends LitElement {
|
|
501
|
+
@state() private isDark = false
|
|
502
|
+
@state() private isAuto = false
|
|
503
|
+
|
|
504
|
+
connectedCallback() {
|
|
505
|
+
super.connectedCallback()
|
|
506
|
+
|
|
507
|
+
// Subscribe to theme changes
|
|
508
|
+
themeService.theme$
|
|
509
|
+
.pipe(takeUntil(this.disconnecting))
|
|
510
|
+
.subscribe(theme => {
|
|
511
|
+
this.isAuto = theme.mode === 'auto'
|
|
512
|
+
this.isDark = theme.isDark
|
|
513
|
+
})
|
|
514
|
+
|
|
515
|
+
// Listen to system preference changes
|
|
516
|
+
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')
|
|
517
|
+
mediaQuery.addEventListener('change', (e) => {
|
|
518
|
+
if (this.isAuto) {
|
|
519
|
+
this.isDark = e.matches
|
|
520
|
+
}
|
|
521
|
+
})
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
render() {
|
|
525
|
+
return html`
|
|
526
|
+
<div class="p-4">
|
|
527
|
+
<p>Mode: ${this.isAuto ? 'Auto' : this.isDark ? 'Dark' : 'Light'}</p>
|
|
528
|
+
<p>System prefers: ${
|
|
529
|
+
window.matchMedia('(prefers-color-scheme: dark)').matches ?
|
|
530
|
+
'Dark' : 'Light'
|
|
531
|
+
}</p>
|
|
532
|
+
</div>
|
|
533
|
+
`
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
## TypeScript Types
|
|
539
|
+
|
|
540
|
+
```typescript
|
|
541
|
+
interface ThemeConfig {
|
|
542
|
+
mode: 'light' | 'dark' | 'auto'
|
|
543
|
+
primaryColor: string
|
|
544
|
+
fontFamily?: string
|
|
545
|
+
borderRadius?: 'none' | 'small' | 'medium' | 'large' | 'full'
|
|
546
|
+
contrast?: 'standard' | 'medium' | 'high'
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
interface ThemeState extends ThemeConfig {
|
|
550
|
+
isDark: boolean
|
|
551
|
+
isAuto: boolean
|
|
552
|
+
systemPreference: 'light' | 'dark'
|
|
553
|
+
theme: TSchmancyTheme // Full Material Design 3 theme object
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
interface ThemeService {
|
|
557
|
+
// Observables
|
|
558
|
+
theme$: Observable<ThemeState>
|
|
559
|
+
mode$: Observable<'light' | 'dark' | 'auto'>
|
|
560
|
+
primaryColor$: Observable<string>
|
|
561
|
+
|
|
562
|
+
// Methods
|
|
563
|
+
getCurrentTheme(): ThemeState
|
|
564
|
+
setMode(mode: 'light' | 'dark' | 'auto'): void
|
|
565
|
+
setPrimaryColor(color: string): void
|
|
566
|
+
setTheme(theme: ThemeConfig): void
|
|
567
|
+
reset(): void
|
|
568
|
+
}
|
|
569
|
+
```
|
|
570
|
+
|
|
220
571
|
## Best Practices
|
|
221
572
|
|
|
222
573
|
1. **Root Theme**: Use one root theme for consistency
|
|
223
574
|
2. **Color Choice**: Pick colors with good contrast ratios
|
|
224
575
|
3. **Scheme Handling**: Respect user preferences with 'auto'
|
|
225
|
-
4. **Performance**: Limit nested themes
|
|
576
|
+
4. **Performance**: Limit nested themes, debounce theme changes
|
|
226
577
|
5. **Accessibility**: Test themes with contrast checkers
|
|
578
|
+
6. **Persistence**: Save user preferences to localStorage
|
|
579
|
+
7. **Cleanup**: Always use `takeUntil(this.disconnecting)` in components
|
|
580
|
+
8. **Type Safety**: Use provided TypeScript interfaces
|
|
581
|
+
|
|
582
|
+
## CSS Variables Reference
|
|
583
|
+
|
|
584
|
+
### Using Theme Variables in Styles
|
|
585
|
+
|
|
586
|
+
```css
|
|
587
|
+
/* Always use CSS variables for theme-aware styling */
|
|
588
|
+
.my-component {
|
|
589
|
+
/* Backgrounds */
|
|
590
|
+
background: var(--schmancy-sys-color-surface-default);
|
|
591
|
+
|
|
592
|
+
/* Text colors */
|
|
593
|
+
color: var(--schmancy-sys-color-surface-on);
|
|
594
|
+
|
|
595
|
+
/* Borders */
|
|
596
|
+
border: 1px solid var(--schmancy-sys-color-outline);
|
|
597
|
+
|
|
598
|
+
/* Elevation/shadows */
|
|
599
|
+
box-shadow: var(--schmancy-sys-elevation-1);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/* Semantic color usage */
|
|
603
|
+
.primary-action {
|
|
604
|
+
background: var(--schmancy-sys-color-primary-default);
|
|
605
|
+
color: var(--schmancy-sys-color-primary-onDefault);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.error-message {
|
|
609
|
+
background: var(--schmancy-sys-color-error-container);
|
|
610
|
+
color: var(--schmancy-sys-color-error-onContainer);
|
|
611
|
+
}
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
### Complete Variable List
|
|
615
|
+
|
|
616
|
+
#### Primary Colors
|
|
617
|
+
- `--schmancy-sys-color-primary-default`
|
|
618
|
+
- `--schmancy-sys-color-primary-onDefault`
|
|
619
|
+
- `--schmancy-sys-color-primary-container`
|
|
620
|
+
- `--schmancy-sys-color-primary-onContainer`
|
|
621
|
+
|
|
622
|
+
#### Secondary Colors
|
|
623
|
+
- `--schmancy-sys-color-secondary-default`
|
|
624
|
+
- `--schmancy-sys-color-secondary-onDefault`
|
|
625
|
+
- `--schmancy-sys-color-secondary-container`
|
|
626
|
+
- `--schmancy-sys-color-secondary-onContainer`
|
|
627
|
+
|
|
628
|
+
#### Tertiary Colors
|
|
629
|
+
- `--schmancy-sys-color-tertiary-default`
|
|
630
|
+
- `--schmancy-sys-color-tertiary-onDefault`
|
|
631
|
+
- `--schmancy-sys-color-tertiary-container`
|
|
632
|
+
- `--schmancy-sys-color-tertiary-onContainer`
|
|
633
|
+
|
|
634
|
+
#### Error Colors
|
|
635
|
+
- `--schmancy-sys-color-error-default`
|
|
636
|
+
- `--schmancy-sys-color-error-onDefault`
|
|
637
|
+
- `--schmancy-sys-color-error-container`
|
|
638
|
+
- `--schmancy-sys-color-error-onContainer`
|
|
639
|
+
|
|
640
|
+
#### Surface Colors
|
|
641
|
+
- `--schmancy-sys-color-surface-default`
|
|
642
|
+
- `--schmancy-sys-color-surface-on`
|
|
643
|
+
- `--schmancy-sys-color-surface-onVariant`
|
|
644
|
+
- `--schmancy-sys-color-surface-container`
|
|
645
|
+
- `--schmancy-sys-color-surface-containerLow`
|
|
646
|
+
- `--schmancy-sys-color-surface-containerHigh`
|
|
647
|
+
- `--schmancy-sys-color-surface-containerHighest`
|
|
648
|
+
|
|
649
|
+
#### Background & Outline
|
|
650
|
+
- `--schmancy-sys-color-background-default`
|
|
651
|
+
- `--schmancy-sys-color-background-on`
|
|
652
|
+
- `--schmancy-sys-color-outline-default`
|
|
653
|
+
- `--schmancy-sys-color-outline-variant`
|
|
654
|
+
|
|
655
|
+
## Migration Guide
|
|
656
|
+
|
|
657
|
+
### From Hardcoded Colors
|
|
658
|
+
|
|
659
|
+
```css
|
|
660
|
+
/* Before - Hardcoded colors */
|
|
661
|
+
.card {
|
|
662
|
+
background: #ffffff;
|
|
663
|
+
color: #000000;
|
|
664
|
+
border: 1px solid #e0e0e0;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/* After - Theme-aware */
|
|
668
|
+
.card {
|
|
669
|
+
background: var(--schmancy-sys-color-surface-default);
|
|
670
|
+
color: var(--schmancy-sys-color-surface-on);
|
|
671
|
+
border: 1px solid var(--schmancy-sys-color-outline-variant);
|
|
672
|
+
}
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
### From CSS-in-JS
|
|
676
|
+
|
|
677
|
+
```typescript
|
|
678
|
+
// Before - CSS-in-JS theme object
|
|
679
|
+
const styles = {
|
|
680
|
+
card: {
|
|
681
|
+
backgroundColor: theme.colors.background,
|
|
682
|
+
color: theme.colors.text
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
// After - CSS with variables
|
|
687
|
+
static styles = css`
|
|
688
|
+
.card {
|
|
689
|
+
background: var(--schmancy-sys-color-surface-default);
|
|
690
|
+
color: var(--schmancy-sys-color-surface-on);
|
|
691
|
+
}
|
|
692
|
+
`
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
### From Manual Dark Mode
|
|
696
|
+
|
|
697
|
+
```typescript
|
|
698
|
+
// Before - Manual dark mode handling
|
|
699
|
+
@state() isDark = false
|
|
700
|
+
|
|
701
|
+
render() {
|
|
702
|
+
return html`
|
|
703
|
+
<div class=${this.isDark ? 'dark-theme' : 'light-theme'}>
|
|
704
|
+
<!-- content -->
|
|
705
|
+
</div>
|
|
706
|
+
`
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// After - Automatic with theme service
|
|
710
|
+
render() {
|
|
711
|
+
// CSS variables automatically update
|
|
712
|
+
return html`
|
|
713
|
+
<div>
|
|
714
|
+
<!-- content automatically themed -->
|
|
715
|
+
</div>
|
|
716
|
+
`
|
|
717
|
+
}
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
## Advanced Patterns
|
|
721
|
+
|
|
722
|
+
### Theme-Aware Component
|
|
723
|
+
|
|
724
|
+
```typescript
|
|
725
|
+
@customElement('themed-card')
|
|
726
|
+
export class ThemedCard extends LitElement {
|
|
727
|
+
@select(themeContext) theme!: ThemeState
|
|
728
|
+
|
|
729
|
+
static styles = css`
|
|
730
|
+
:host {
|
|
731
|
+
display: block;
|
|
732
|
+
background: var(--schmancy-sys-color-surface-container);
|
|
733
|
+
color: var(--schmancy-sys-color-surface-on);
|
|
734
|
+
border-radius: var(--schmancy-sys-shape-corner-medium);
|
|
735
|
+
padding: 16px;
|
|
736
|
+
transition: all 200ms ease-in-out;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
:host([elevated]) {
|
|
740
|
+
box-shadow: var(--schmancy-sys-elevation-2);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.header {
|
|
744
|
+
color: var(--schmancy-sys-color-primary-default);
|
|
745
|
+
font-size: var(--schmancy-sys-typescale-headline-small-size);
|
|
746
|
+
}
|
|
747
|
+
`
|
|
748
|
+
|
|
749
|
+
render() {
|
|
750
|
+
return html`
|
|
751
|
+
<div class="header">
|
|
752
|
+
<slot name="header"></slot>
|
|
753
|
+
</div>
|
|
754
|
+
<slot></slot>
|
|
755
|
+
`
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
### Theme Presets
|
|
761
|
+
|
|
762
|
+
```typescript
|
|
763
|
+
class ThemePresets {
|
|
764
|
+
static readonly presets = {
|
|
765
|
+
corporate: {
|
|
766
|
+
mode: 'light' as const,
|
|
767
|
+
primaryColor: '#003D82',
|
|
768
|
+
fontFamily: 'Inter, system-ui',
|
|
769
|
+
borderRadius: 'small'
|
|
770
|
+
},
|
|
771
|
+
|
|
772
|
+
vibrant: {
|
|
773
|
+
mode: 'auto' as const,
|
|
774
|
+
primaryColor: '#FF6B6B',
|
|
775
|
+
fontFamily: 'Poppins, sans-serif',
|
|
776
|
+
borderRadius: 'large'
|
|
777
|
+
},
|
|
778
|
+
|
|
779
|
+
minimal: {
|
|
780
|
+
mode: 'auto' as const,
|
|
781
|
+
primaryColor: '#2C3E50',
|
|
782
|
+
fontFamily: 'system-ui',
|
|
783
|
+
borderRadius: 'none'
|
|
784
|
+
},
|
|
785
|
+
|
|
786
|
+
accessibility: {
|
|
787
|
+
mode: 'light' as const,
|
|
788
|
+
primaryColor: '#0055AA',
|
|
789
|
+
contrast: 'high',
|
|
790
|
+
fontFamily: 'Arial, sans-serif',
|
|
791
|
+
borderRadius: 'medium'
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
static apply(presetName: keyof typeof ThemePresets.presets) {
|
|
796
|
+
const preset = ThemePresets.presets[presetName]
|
|
797
|
+
themeService.setTheme(preset)
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
// Usage
|
|
802
|
+
ThemePresets.apply('corporate')
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
### Multi-Brand Support
|
|
806
|
+
|
|
807
|
+
```typescript
|
|
808
|
+
class BrandManager {
|
|
809
|
+
private brands = {
|
|
810
|
+
main: {
|
|
811
|
+
primaryColor: '#6750A4',
|
|
812
|
+
logo: '/assets/main-logo.svg'
|
|
813
|
+
},
|
|
814
|
+
partner: {
|
|
815
|
+
primaryColor: '#00897B',
|
|
816
|
+
logo: '/assets/partner-logo.svg'
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
switchBrand(brandKey: keyof typeof this.brands) {
|
|
821
|
+
const brand = this.brands[brandKey]
|
|
822
|
+
themeService.setPrimaryColor(brand.primaryColor)
|
|
823
|
+
// Update logo and other brand assets
|
|
824
|
+
this.updateBrandAssets(brand)
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
private updateBrandAssets(brand: any) {
|
|
828
|
+
// Update logos, fonts, etc.
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
## Testing Themes
|
|
834
|
+
|
|
835
|
+
```typescript
|
|
836
|
+
// Test component in different themes
|
|
837
|
+
describe('ThemedComponent', () => {
|
|
838
|
+
beforeEach(() => {
|
|
839
|
+
themeService.reset()
|
|
840
|
+
})
|
|
841
|
+
|
|
842
|
+
it('renders correctly in light mode', async () => {
|
|
843
|
+
themeService.setMode('light')
|
|
844
|
+
const el = await fixture(html`<themed-component></themed-component>`)
|
|
845
|
+
// Test light mode rendering
|
|
846
|
+
})
|
|
847
|
+
|
|
848
|
+
it('renders correctly in dark mode', async () => {
|
|
849
|
+
themeService.setMode('dark')
|
|
850
|
+
const el = await fixture(html`<themed-component></themed-component>`)
|
|
851
|
+
// Test dark mode rendering
|
|
852
|
+
})
|
|
853
|
+
|
|
854
|
+
it('responds to theme changes', async () => {
|
|
855
|
+
const el = await fixture(html`<themed-component></themed-component>`)
|
|
856
|
+
|
|
857
|
+
themeService.setPrimaryColor('#FF5722')
|
|
858
|
+
await el.updateComplete
|
|
859
|
+
|
|
860
|
+
// Verify component updated with new theme
|
|
861
|
+
})
|
|
862
|
+
})
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
## Performance Optimization
|
|
866
|
+
|
|
867
|
+
### Debouncing Theme Changes
|
|
868
|
+
|
|
869
|
+
```typescript
|
|
870
|
+
import { debounceTime, distinctUntilChanged } from 'rxjs'
|
|
871
|
+
|
|
872
|
+
themeService.theme$
|
|
873
|
+
.pipe(
|
|
874
|
+
debounceTime(300), // Debounce rapid changes
|
|
875
|
+
distinctUntilChanged((a, b) =>
|
|
876
|
+
a.primaryColor === b.primaryColor &&
|
|
877
|
+
a.mode === b.mode
|
|
878
|
+
),
|
|
879
|
+
takeUntil(this.disconnecting)
|
|
880
|
+
)
|
|
881
|
+
.subscribe(theme => {
|
|
882
|
+
// Handle theme changes
|
|
883
|
+
})
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
### Lazy Loading Theme Components
|
|
887
|
+
|
|
888
|
+
```typescript
|
|
889
|
+
// Only load theme UI when needed
|
|
890
|
+
async function openThemeSettings() {
|
|
891
|
+
const { ThemeSettings } = await import('./theme-settings')
|
|
892
|
+
const settings = new ThemeSettings()
|
|
893
|
+
document.body.appendChild(settings)
|
|
894
|
+
}
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
## Troubleshooting
|
|
898
|
+
|
|
899
|
+
### Common Issues
|
|
900
|
+
|
|
901
|
+
1. **Theme not applying**: Ensure theme component or service is initialized at app root
|
|
902
|
+
2. **CSS variables undefined**: Check that schmancy-theme is imported before use
|
|
903
|
+
3. **Dark mode not working**: Verify `scheme="auto"` and system preferences
|
|
904
|
+
4. **Performance issues**: Use debouncing and avoid excessive nesting
|
|
905
|
+
5. **Colors not updating**: Ensure using CSS variables, not hardcoded values
|
|
227
906
|
|
|
228
907
|
## Related Components
|
|
229
908
|
|
|
@@ -235,7 +914,10 @@ themeEl.theme = {
|
|
|
235
914
|
## Use Cases
|
|
236
915
|
|
|
237
916
|
1. **App Theming**: Consistent app-wide styling
|
|
238
|
-
2. **White-Label**: Dynamic branding
|
|
239
|
-
3. **User Preferences**: Personalized themes
|
|
917
|
+
2. **White-Label**: Dynamic branding for multiple clients
|
|
918
|
+
3. **User Preferences**: Personalized themes saved per user
|
|
240
919
|
4. **Section Theming**: Different themes for app sections
|
|
241
|
-
5. **A/B Testing**: Theme variations for testing
|
|
920
|
+
5. **A/B Testing**: Theme variations for testing
|
|
921
|
+
6. **Accessibility**: High contrast modes for better readability
|
|
922
|
+
7. **Dark Mode**: Automatic or manual dark mode support
|
|
923
|
+
8. **Brand Compliance**: Enforce brand colors across components
|