@mhmo91/schmancy 0.2.194 → 0.2.195
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 +158 -78
- package/ai/content-drawer.md +190 -0
- package/ai/dialog.md +10 -0
- package/ai/index.md +1 -0
- package/ai/table.md +99 -1
- package/dist/_headers +2 -0
- package/dist/ai/area.md +158 -78
- package/dist/ai/content-drawer.md +190 -0
- package/dist/ai/dialog.md +10 -0
- package/dist/ai/index.md +1 -0
- package/dist/ai/table.md +99 -1
- package/dist/{animated-text-9AM64DHd.cjs → animated-text-Bu9wh3wv.cjs} +2 -2
- package/dist/{animated-text-9AM64DHd.cjs.map → animated-text-Bu9wh3wv.cjs.map} +1 -1
- package/dist/{animated-text-CVStWn5N.js → animated-text-Ci7M0QTx.js} +3 -3
- package/dist/{animated-text-CVStWn5N.js.map → animated-text-Ci7M0QTx.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-Cg9dqZJ5.cjs +8 -0
- package/dist/area.component-Cg9dqZJ5.cjs.map +1 -0
- package/dist/area.component-eJJ_wryh.js +191 -0
- package/dist/area.component-eJJ_wryh.js.map +1 -0
- package/dist/area.js +21 -6
- package/dist/area.js.map +1 -1
- package/dist/{autocomplete-DBXvIJgc.cjs → autocomplete-BH7nQbid.cjs} +2 -2
- package/dist/{autocomplete-DBXvIJgc.cjs.map → autocomplete-BH7nQbid.cjs.map} +1 -1
- package/dist/{autocomplete-ih92pPkb.js → autocomplete-D9n1MeKT.js} +3 -3
- package/dist/{autocomplete-ih92pPkb.js.map → autocomplete-D9n1MeKT.js.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-CgP1tBZq.js → avatar-B4lSs4z5.js} +183 -145
- package/dist/avatar-B4lSs4z5.js.map +1 -0
- package/dist/{avatar-Bmg5TXj9.cjs → avatar-Bg-rdjAe.cjs} +62 -24
- package/dist/avatar-Bg-rdjAe.cjs.map +1 -0
- 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-DtnX5sT6.cjs → checkbox-CgL23smr.cjs} +10 -10
- package/dist/{checkbox-DtnX5sT6.cjs.map → checkbox-CgL23smr.cjs.map} +1 -1
- package/dist/{checkbox-Jxxbjxp0.js → checkbox-y37-tGrk.js} +72 -65
- package/dist/{checkbox-Jxxbjxp0.js.map → checkbox-y37-tGrk.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-CVDnpVUM.cjs → chips-CKST7ug-.cjs} +2 -2
- package/dist/{chips-CVDnpVUM.cjs.map → chips-CKST7ug-.cjs.map} +1 -1
- package/dist/{chips-lP7ohQep.js → chips-Ndwt1V4b.js} +3 -3
- package/dist/{chips-lP7ohQep.js.map → chips-Ndwt1V4b.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/circular-progress-BDmc1zlm.cjs +9 -0
- package/dist/circular-progress-BDmc1zlm.cjs.map +1 -0
- package/dist/circular-progress-vokDGjmG.js +35 -0
- package/dist/circular-progress-vokDGjmG.js.map +1 -0
- package/dist/circular-progress.cjs +2 -0
- package/dist/circular-progress.cjs.map +1 -0
- package/dist/circular-progress.js +5 -0
- package/dist/circular-progress.js.map +1 -0
- 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-Ca9WLI4Q.js → date-range-CpDVPn_v.js} +3 -3
- package/dist/{date-range-Ca9WLI4Q.js.map → date-range-CpDVPn_v.js.map} +1 -1
- package/dist/{date-range-DbPA5Y-t.cjs → date-range-DfZz3ifP.cjs} +2 -2
- package/dist/{date-range-DbPA5Y-t.cjs.map → date-range-DfZz3ifP.cjs.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-BgNgQV2G.cjs → delay-ASLyLkQL.cjs} +2 -2
- package/dist/{delay-BgNgQV2G.cjs.map → delay-ASLyLkQL.cjs.map} +1 -1
- package/dist/{delay-5cCl7ji3.js → delay-CG5SRrzF.js} +2 -2
- package/dist/{delay-5cCl7ji3.js.map → delay-CG5SRrzF.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{dialog-content-9pumpyLD.js → dialog-content-BoPviBAt.js} +86 -82
- package/dist/dialog-content-BoPviBAt.js.map +1 -0
- package/dist/{dialog-content-qj1E8aye.cjs → dialog-content-D88EcY6L.cjs} +8 -8
- package/dist/dialog-content-D88EcY6L.cjs.map +1 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{divider-CHckHGEQ.cjs → divider-C38JDYss.cjs} +2 -2
- package/dist/{divider-CHckHGEQ.cjs.map → divider-C38JDYss.cjs.map} +1 -1
- package/dist/{divider-r8-9eNnl.js → divider-N7GWgK6o.js} +3 -3
- package/dist/{divider-r8-9eNnl.js.map → divider-N7GWgK6o.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-D-TddflQ.js → dropdown-content-DmO_yIVb.js} +3 -3
- package/dist/{dropdown-content-D-TddflQ.js.map → dropdown-content-DmO_yIVb.js.map} +1 -1
- package/dist/{dropdown-content-B41MDDRG.cjs → dropdown-content-rH8awIRA.cjs} +2 -2
- package/dist/{dropdown-content-B41MDDRG.cjs.map → dropdown-content-rH8awIRA.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-Bf0zNqji.js → flex-CXYfL6bE.js} +2 -2
- package/dist/{flex-Bf0zNqji.js.map → flex-CXYfL6bE.js.map} +1 -1
- package/dist/{flex-CFv-Zb76.cjs → flex-wYuewqrr.cjs} +2 -2
- package/dist/{flex-CFv-Zb76.cjs.map → flex-wYuewqrr.cjs.map} +1 -1
- package/dist/{form-BN75s0PI.cjs → form-CNWWdhT_.cjs} +2 -2
- package/dist/{form-BN75s0PI.cjs.map → form-CNWWdhT_.cjs.map} +1 -1
- package/dist/{form-uYcr1RLJ.js → form-q3JZjWez.js} +2 -2
- package/dist/{form-uYcr1RLJ.js.map → form-q3JZjWez.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-Cu-imayV.cjs → icon-QnmfHtfT.cjs} +2 -2
- package/dist/{icon-Cu-imayV.cjs.map → icon-QnmfHtfT.cjs.map} +1 -1
- package/dist/{icon-button-1tZaicyb.js → icon-button-DOTB_28y.js} +3 -3
- package/dist/{icon-button-1tZaicyb.js.map → icon-button-DOTB_28y.js.map} +1 -1
- package/dist/{icon-button-D0BbHnDL.cjs → icon-button-oAOX71_s.cjs} +2 -2
- package/dist/{icon-button-D0BbHnDL.cjs.map → icon-button-oAOX71_s.cjs.map} +1 -1
- package/dist/{icon-BR-jE0Y2.js → icon-pLQWXzo8.js} +3 -3
- package/dist/{icon-BR-jE0Y2.js.map → icon-pLQWXzo8.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 +190 -173
- package/dist/index.js.map +1 -1
- package/dist/{input-B2oV6Hck.cjs → input-CCniOtAr.cjs} +2 -2
- package/dist/{input-B2oV6Hck.cjs.map → input-CCniOtAr.cjs.map} +1 -1
- package/dist/{input-kiz5O3dY.js → input-DeJitVSV.js} +2 -2
- package/dist/{input-kiz5O3dY.js.map → input-DeJitVSV.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-CMHoPfX9.cjs → list-Ad-24MHW.cjs} +2 -2
- package/dist/{list-CMHoPfX9.cjs.map → list-Ad-24MHW.cjs.map} +1 -1
- package/dist/{list-wT4DLXCh.js → list-Ca79GGNH.js} +2 -2
- package/dist/{list-wT4DLXCh.js.map → list-Ca79GGNH.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-B9Qdq5S_.js → litElement.mixin-BoUiP2tU.js} +2 -2
- package/dist/{litElement.mixin-B9Qdq5S_.js.map → litElement.mixin-BoUiP2tU.js.map} +1 -1
- package/dist/{litElement.mixin-CHvyxfxf.cjs → litElement.mixin-qOTYSaNG.cjs} +2 -2
- package/dist/{litElement.mixin-CHvyxfxf.cjs.map → litElement.mixin-qOTYSaNG.cjs.map} +1 -1
- package/dist/{menu-BcSplMNh.cjs → menu-6Wum4ysc.cjs} +2 -2
- package/dist/{menu-BcSplMNh.cjs.map → menu-6Wum4ysc.cjs.map} +1 -1
- package/dist/{menu-Dl1QU86K.js → menu-Dd_X9oET.js} +3 -3
- package/dist/{menu-Dl1QU86K.js.map → menu-Dd_X9oET.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-CC698xHg.js → notification-service-C-9IqObm.js} +3 -3
- package/dist/{notification-service-CC698xHg.js.map → notification-service-C-9IqObm.js.map} +1 -1
- package/dist/{notification-service-BV9ybQBu.cjs → notification-service-CrNyAbmv.cjs} +2 -2
- package/dist/{notification-service-BV9ybQBu.cjs.map → notification-service-CrNyAbmv.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-CkLBgH71.cjs → option-BbBbwrJq.cjs} +2 -2
- package/dist/{option-CkLBgH71.cjs.map → option-BbBbwrJq.cjs.map} +1 -1
- package/dist/{option-DDxxXwwc.js → option-DVSXUJ96.js} +2 -2
- package/dist/{option-DDxxXwwc.js.map → option-DVSXUJ96.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-DDTO5_AA.js → payment-card-form-CTjgVoJK.js} +3 -3
- package/dist/{payment-card-form-DDTO5_AA.js.map → payment-card-form-CTjgVoJK.js.map} +1 -1
- package/dist/{payment-card-form-UWbAYNPR.cjs → payment-card-form-R5wNWHAv.cjs} +2 -2
- package/dist/{payment-card-form-UWbAYNPR.cjs.map → payment-card-form-R5wNWHAv.cjs.map} +1 -1
- package/dist/{radio-button-wWoxPDfq.js → radio-button-BDAW1Euc.js} +2 -2
- package/dist/{radio-button-wWoxPDfq.js.map → radio-button-BDAW1Euc.js.map} +1 -1
- package/dist/{radio-button-BykiVxTD.cjs → radio-button-Cg1JobXT.cjs} +2 -2
- package/dist/{radio-button-BykiVxTD.cjs.map → radio-button-Cg1JobXT.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{schmancy-steps-container-ByO98z7L.js → schmancy-steps-container--d7VK-QR.js} +2 -2
- package/dist/{schmancy-steps-container-ByO98z7L.js.map → schmancy-steps-container--d7VK-QR.js.map} +1 -1
- package/dist/{schmancy-steps-container-B1mIGa9M.cjs → schmancy-steps-container-BAPIxl4s.cjs} +2 -2
- package/dist/{schmancy-steps-container-B1mIGa9M.cjs.map → schmancy-steps-container-BAPIxl4s.cjs.map} +1 -1
- package/dist/{select-DE57Nios.cjs → select-CnjO7DLl.cjs} +2 -2
- package/dist/{select-DE57Nios.cjs.map → select-CnjO7DLl.cjs.map} +1 -1
- package/dist/{select-BIOhocL7.js → select-DfbOOZtm.js} +3 -3
- package/dist/{select-BIOhocL7.js.map → select-DfbOOZtm.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-Dh4MLVsU.js → sheet-DhbKM9gJ.js} +3 -3
- package/dist/{sheet-Dh4MLVsU.js.map → sheet-DhbKM9gJ.js.map} +1 -1
- package/dist/{sheet-fZYAWGsm.cjs → sheet-Ds0Fp0lM.cjs} +2 -2
- package/dist/{sheet-fZYAWGsm.cjs.map → sheet-Ds0Fp0lM.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-DVlJoDgU.js → slider-Ba3AEh2W.js} +3 -3
- package/dist/{slider-DVlJoDgU.js.map → slider-Ba3AEh2W.js.map} +1 -1
- package/dist/{slider-CejrdmPF.cjs → slider-CSOzhUhA.cjs} +2 -2
- package/dist/{slider-CejrdmPF.cjs.map → slider-CSOzhUhA.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-DbTnai_Q.js → spinner-BgeQqlFU.js} +3 -3
- package/dist/{spinner-DbTnai_Q.js.map → spinner-BgeQqlFU.js.map} +1 -1
- package/dist/{spinner-DxVJ7QJZ.cjs → spinner-llMfjiIc.cjs} +2 -2
- package/dist/{spinner-DxVJ7QJZ.cjs.map → spinner-llMfjiIc.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/surface-CT2g8fDM.cjs +92 -0
- package/dist/surface-CT2g8fDM.cjs.map +1 -0
- package/dist/surface-UcsAmLj5.js +113 -0
- package/dist/surface-UcsAmLj5.js.map +1 -0
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-CBhyHINV.cjs → table-CSBhQ-pa.cjs} +4 -4
- package/dist/{table-CBhyHINV.cjs.map → table-CSBhQ-pa.cjs.map} +1 -1
- package/dist/{table-CqUv1TOC.js → table-DuUlrDCu.js} +72 -68
- package/dist/{table-CqUv1TOC.js.map → table-DuUlrDCu.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-DUo2f_sV.js → tabs-compatibility-BVFHArgV.js} +2 -2
- package/dist/{tabs-compatibility-DUo2f_sV.js.map → tabs-compatibility-BVFHArgV.js.map} +1 -1
- package/dist/{tabs-compatibility-DPD6jfGF.cjs → tabs-compatibility-Bt3coGzN.cjs} +2 -2
- package/dist/{tabs-compatibility-DPD6jfGF.cjs.map → tabs-compatibility-Bt3coGzN.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-C71e_LC1.js +43 -0
- package/dist/{tailwind.mixin-Di7KWye7.js.map → tailwind.mixin-C71e_LC1.js.map} +1 -1
- package/dist/tailwind.mixin-CFCJhe5p.cjs +2 -0
- package/dist/{tailwind.mixin-Dm5QDZav.cjs.map → tailwind.mixin-CFCJhe5p.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-Dbz18REy.js → textarea-B8eIpYa-.js} +2 -2
- package/dist/{textarea-Dbz18REy.js.map → textarea-B8eIpYa-.js.map} +1 -1
- package/dist/{textarea-CesFdBkm.cjs → textarea-CtCk_1Fq.cjs} +2 -2
- package/dist/{textarea-CesFdBkm.cjs.map → textarea-CtCk_1Fq.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-Bt2OV4iu.cjs → theme-button-DQe5uOxU.cjs} +2 -2
- package/dist/{theme-button-Bt2OV4iu.cjs.map → theme-button-DQe5uOxU.cjs.map} +1 -1
- package/dist/{theme-button-lqbT2_LL.js → theme-button-TEzhKUy6.js} +2 -2
- package/dist/{theme-button-lqbT2_LL.js.map → theme-button-TEzhKUy6.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-BlBaN7d6.cjs → theme.component-Be6M74nN.cjs} +3 -3
- package/dist/{theme.component-BlBaN7d6.cjs.map → theme.component-Be6M74nN.cjs.map} +1 -1
- package/dist/{theme.component-xarFSe8p.js → theme.component-DiTpToTC.js} +2 -2
- package/dist/{theme.component-xarFSe8p.js.map → theme.component-DiTpToTC.js.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-VUMRmZaJ.cjs → timezone-C1aR24i0.cjs} +2 -2
- package/dist/{timezone-VUMRmZaJ.cjs.map → timezone-C1aR24i0.cjs.map} +1 -1
- package/dist/{timezone-DwT_pQrj.js → timezone-CBSuTrU2.js} +3 -3
- package/dist/{timezone-DwT_pQrj.js.map → timezone-CBSuTrU2.js.map} +1 -1
- package/dist/{tooltip-BKOHVCMK.js → tooltip-DYQW9R3I.js} +2 -2
- package/dist/{tooltip-BKOHVCMK.js.map → tooltip-DYQW9R3I.js.map} +1 -1
- package/dist/{tooltip-Cvoroe7w.cjs → tooltip-DYcXTtFy.cjs} +2 -2
- package/dist/{tooltip-Cvoroe7w.cjs.map → tooltip-DYcXTtFy.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-Cyp2AZ8g.cjs → tree-D-rTjnPs.cjs} +2 -2
- package/dist/{tree-Cyp2AZ8g.cjs.map → tree-D-rTjnPs.cjs.map} +1 -1
- package/dist/{tree-_FJnHVmP.js → tree-nsSIkdNT.js} +2 -2
- package/dist/{tree-_FJnHVmP.js.map → tree-nsSIkdNT.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-BIm2tOe4.cjs → typewriter-Cj0R-RDa.cjs} +2 -2
- package/dist/{typewriter-BIm2tOe4.cjs.map → typewriter-Cj0R-RDa.cjs.map} +1 -1
- package/dist/{typewriter-DWfXPBni.js → typewriter-DrYb6_FB.js} +22 -22
- package/dist/{typewriter-DWfXPBni.js.map → typewriter-DrYb6_FB.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-OpLt6LNd.cjs → typography-B0Kj2XoC.cjs} +2 -2
- package/dist/{typography-OpLt6LNd.cjs.map → typography-B0Kj2XoC.cjs.map} +1 -1
- package/dist/{typography-DaKLzjFB.js → typography-DMj2H_lZ.js} +2 -2
- package/dist/{typography-DaKLzjFB.js.map → typography-DMj2H_lZ.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/utils-BqFGvnN9.cjs +2 -0
- package/dist/utils-BqFGvnN9.cjs.map +1 -0
- package/dist/utils-jduntaQU.js +128 -0
- package/dist/utils-jduntaQU.js.map +1 -0
- package/package.json +13 -14
- package/types/src/area/area.component.d.ts +1 -1
- package/types/src/area/area.service.d.ts +44 -26
- package/types/src/area/index.d.ts +1 -0
- package/types/src/area/utils.d.ts +91 -1
- package/types/src/checkbox/checkbox.d.ts +9 -0
- package/types/src/circular-progress/circular-progress.d.ts +15 -0
- package/types/src/circular-progress/index.d.ts +1 -0
- package/types/src/dialog/dailog.d.ts +8 -0
- package/types/src/dialog/dialog-service.d.ts +1 -0
- package/types/src/index.d.ts +1 -0
- package/types/src/table/table.d.ts +1 -0
- package/dist/area.component-CzFJM7Y4.js +0 -143
- package/dist/area.component-CzFJM7Y4.js.map +0 -1
- package/dist/area.component-WxccFh1z.cjs +0 -8
- package/dist/area.component-WxccFh1z.cjs.map +0 -1
- package/dist/avatar-Bmg5TXj9.cjs.map +0 -1
- package/dist/avatar-CgP1tBZq.js.map +0 -1
- package/dist/dialog-content-9pumpyLD.js.map +0 -1
- package/dist/dialog-content-qj1E8aye.cjs.map +0 -1
- package/dist/surface-BTuzKmT2.cjs +0 -20
- package/dist/surface-BTuzKmT2.cjs.map +0 -1
- package/dist/surface-DXx1bJN4.js +0 -43
- package/dist/surface-DXx1bJN4.js.map +0 -1
- package/dist/tailwind.mixin-Di7KWye7.js +0 -43
- package/dist/tailwind.mixin-Dm5QDZav.cjs +0 -2
package/dist/ai/area.md
CHANGED
|
@@ -1,125 +1,205 @@
|
|
|
1
|
-
# Schmancy Area
|
|
1
|
+
# Schmancy Area
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Schmancy Area is a lightweight, reactive routing and state management system for web components with RxJS integration.
|
|
4
|
+
|
|
5
|
+
## Component Usage
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<!-- Basic router outlet -->
|
|
9
|
+
<schmancy-area
|
|
10
|
+
name="main"
|
|
7
11
|
default="home-component">
|
|
8
12
|
</schmancy-area>
|
|
13
|
+
```
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
| Property | Type | Description |
|
|
18
|
+
|----------|------|-------------|
|
|
19
|
+
| `name` | `string` | **Required**. Unique identifier for this router outlet. |
|
|
20
|
+
| `default` | `string \| Promise<NodeModule> \| CustomElementConstructor \| TemplateResult` | Default component to display if none is specified. |
|
|
21
|
+
|
|
22
|
+
## Service API
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
// Import the area service
|
|
11
26
|
import { area } from '@schmancy/area';
|
|
12
27
|
|
|
13
28
|
// Navigation methods
|
|
14
29
|
area.push({
|
|
15
|
-
component:
|
|
16
|
-
area: '
|
|
17
|
-
state?: { view: 'profile' },
|
|
18
|
-
params?: { id: '123' },
|
|
19
|
-
historyStrategy: 'push'
|
|
30
|
+
component: 'user-profile', // Component constructor, string tag name, or element instance
|
|
31
|
+
area: 'main', // Target area name
|
|
32
|
+
state?: { view: 'profile' }, // Optional state object
|
|
33
|
+
params?: { id: '123' }, // Optional parameters
|
|
34
|
+
historyStrategy: 'push', // 'push', 'replace', 'pop', 'silent'
|
|
35
|
+
clearQueryParams?: ['sort'] // Clear specific query params
|
|
20
36
|
});
|
|
21
37
|
|
|
22
|
-
area.pop('sidebar');
|
|
38
|
+
area.pop('sidebar'); // Remove an area
|
|
23
39
|
|
|
24
|
-
// Subscription methods
|
|
25
|
-
area.on(areaName, skipCurrent?)
|
|
26
|
-
area.all(skipCurrent?)
|
|
27
|
-
area.getState<T>(areaName)
|
|
28
|
-
area.params<T>(areaName)
|
|
29
|
-
area.param<T>(areaName, key)
|
|
40
|
+
// Subscription methods (return RxJS Observables)
|
|
41
|
+
area.on(areaName, skipCurrent?) // Subscribe to an area
|
|
42
|
+
area.all(skipCurrent?) // Subscribe to all areas
|
|
43
|
+
area.getState<T>(areaName) // Get typed state from an area
|
|
44
|
+
area.params<T>(areaName) // Get typed params from an area
|
|
45
|
+
area.param<T>(areaName, key) // Get a specific param value
|
|
46
|
+
```
|
|
30
47
|
|
|
31
|
-
|
|
32
|
-
schmancy-area-${areaName}-changed
|
|
48
|
+
## Examples
|
|
33
49
|
|
|
34
|
-
|
|
35
|
-
|
|
50
|
+
### Basic Navigation
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
// Navigate to a component
|
|
36
54
|
area.push({
|
|
37
55
|
component: 'home-page',
|
|
38
|
-
area: 'main'
|
|
39
|
-
historyStrategy: 'push'
|
|
56
|
+
area: 'main'
|
|
40
57
|
});
|
|
41
58
|
|
|
42
|
-
//
|
|
59
|
+
// Navigate with parameters and state
|
|
43
60
|
area.push({
|
|
44
61
|
component: ProductDetailComponent,
|
|
45
62
|
area: 'main',
|
|
46
63
|
params: { productId: '12345' },
|
|
64
|
+
state: { showReviews: true },
|
|
47
65
|
historyStrategy: 'push'
|
|
48
66
|
});
|
|
67
|
+
```
|
|
49
68
|
|
|
50
|
-
|
|
69
|
+
### Multiple Independent Areas
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
// Update multiple areas independently
|
|
73
|
+
area.push({ component: 'product-list', area: 'main' });
|
|
74
|
+
area.push({ component: 'filter-panel', area: 'sidebar' });
|
|
75
|
+
|
|
76
|
+
// Open a modal dialog
|
|
77
|
+
area.push({
|
|
78
|
+
component: 'dialog-component',
|
|
79
|
+
area: 'modal',
|
|
80
|
+
params: { id: '123' }
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// Close a modal
|
|
84
|
+
area.pop('modal');
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Reactive Subscriptions
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
// Subscribe to area changes
|
|
51
91
|
area.on('main').subscribe(route => {
|
|
52
|
-
console.log(`Component: ${route.component}
|
|
92
|
+
console.log(`Component: ${route.component}`);
|
|
93
|
+
console.log(`Params:`, route.params);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// Type-safe state and params
|
|
97
|
+
interface UserState { name: string; role: string; }
|
|
98
|
+
interface UserParams { id: string; tab?: string; }
|
|
99
|
+
|
|
100
|
+
area.getState<UserState>('user').subscribe(state => {
|
|
101
|
+
updateUserInfo(state.name, state.role);
|
|
53
102
|
});
|
|
54
103
|
|
|
55
|
-
|
|
104
|
+
area.params<UserParams>('user').subscribe(params => {
|
|
105
|
+
fetchUser(params.id);
|
|
106
|
+
setActiveTab(params.tab || 'profile');
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// Get a specific parameter
|
|
56
110
|
area.param<string>('product', 'productId').subscribe(id => {
|
|
57
111
|
fetchProductDetails(id);
|
|
58
112
|
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### DOM Events
|
|
59
116
|
|
|
60
|
-
|
|
117
|
+
Areas also dispatch DOM events for non-RxJS consumers:
|
|
118
|
+
|
|
119
|
+
```js
|
|
120
|
+
// Format: schmancy-area-${areaName}-changed
|
|
61
121
|
window.addEventListener('schmancy-area-main-changed', event => {
|
|
62
|
-
const { component, params } = event.detail;
|
|
63
|
-
updateUI(component, params);
|
|
122
|
+
const { component, params, state } = event.detail;
|
|
123
|
+
updateUI(component, params, state);
|
|
64
124
|
});
|
|
65
125
|
```
|
|
66
126
|
|
|
67
|
-
##
|
|
68
|
-
- **[Teleport](./teleport.md)**: Can be used with Area for advanced component transportation
|
|
69
|
-
- **[Store](./store.md)**: Complements Area for more complex state management
|
|
70
|
-
- **[Layout](./layout.md)**: Often used as a container for areas
|
|
127
|
+
## Advanced Usage
|
|
71
128
|
|
|
72
|
-
|
|
129
|
+
### Lazy Loading Components
|
|
73
130
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
131
|
+
```ts
|
|
132
|
+
area.push({
|
|
133
|
+
component: import('./components/heavy-dashboard.js'),
|
|
134
|
+
area: 'main'
|
|
135
|
+
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Navigation Guards
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
import { switchMap, EMPTY, of } from 'rxjs';
|
|
142
|
+
|
|
143
|
+
area.on('protected-area').pipe(
|
|
144
|
+
switchMap(route => {
|
|
145
|
+
if (!isAuthenticated()) {
|
|
146
|
+
area.push({ component: 'login-page', area: 'main' });
|
|
147
|
+
return EMPTY;
|
|
148
|
+
}
|
|
149
|
+
return of(route);
|
|
150
|
+
})
|
|
151
|
+
).subscribe(handleProtectedRoute);
|
|
82
152
|
```
|
|
83
153
|
|
|
84
|
-
###
|
|
85
|
-
|
|
154
|
+
### Component Reloading Pattern
|
|
155
|
+
|
|
156
|
+
When updating the same component with different parameters, use this pattern to ensure re-rendering:
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
// First push to the main routing area to force component re-creation
|
|
160
|
+
area.push({
|
|
161
|
+
area: 'main-area',
|
|
162
|
+
component: 'user-profile',
|
|
163
|
+
params: { userId: '456' },
|
|
164
|
+
historyStrategy: 'push'
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
// Then update any subscription areas with the silent history strategy
|
|
168
|
+
area.push({
|
|
169
|
+
area: 'user-area',
|
|
170
|
+
component: 'user-profile',
|
|
171
|
+
params: { userId: '456' },
|
|
172
|
+
historyStrategy: 'silent' // Don't create history entry
|
|
173
|
+
});
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
This works around the `distinctUntilChanged` behavior in the Area component that compares only component names, not params.
|
|
177
|
+
|
|
178
|
+
## Related Components
|
|
179
|
+
|
|
180
|
+
- **[Store](./store.md)** - For more complex state management
|
|
181
|
+
- **[Layout](./layout.md)** - For responsive layouts
|
|
182
|
+
- **[Teleport](./teleport.md)** - For advanced component transportation
|
|
183
|
+
- **[Sheet](./sheet.md)** - For modal overlays
|
|
184
|
+
|
|
185
|
+
## Type Definitions
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
// Route Action - used for navigation
|
|
86
189
|
interface RouteAction {
|
|
87
|
-
component: CustomElementConstructor | string | HTMLElement
|
|
190
|
+
component: CustomElementConstructor | string | HTMLElement | Promise<NodeModule>;
|
|
88
191
|
area: string;
|
|
89
192
|
state?: Record<string, unknown>;
|
|
90
193
|
params?: Record<string, unknown>;
|
|
91
194
|
historyStrategy?: 'push' | 'replace' | 'pop' | 'silent';
|
|
92
195
|
clearQueryParams?: string[] | null;
|
|
93
196
|
}
|
|
94
|
-
```
|
|
95
197
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
2. **Typed Params and State**: Use TypeScript generics for type safety
|
|
106
|
-
```typescript
|
|
107
|
-
interface UserParams { id: string; tab?: string; }
|
|
108
|
-
area.params<UserParams>('user').subscribe(params => {
|
|
109
|
-
fetchUser(params.id);
|
|
110
|
-
setActiveTab(params.tab || 'profile');
|
|
111
|
-
});
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
3. **Navigation Guards**: Implement navigation guards with RxJS operators
|
|
115
|
-
```typescript
|
|
116
|
-
area.on('protected').pipe(
|
|
117
|
-
switchMap(route => {
|
|
118
|
-
if (!isAuthenticated()) {
|
|
119
|
-
area.push({ component: 'login-page', area: 'main' });
|
|
120
|
-
return EMPTY;
|
|
121
|
-
}
|
|
122
|
-
return of(route);
|
|
123
|
-
})
|
|
124
|
-
).subscribe(handleProtectedRoute);
|
|
125
|
-
```
|
|
198
|
+
// Active Route - current state of an area
|
|
199
|
+
interface ActiveRoute {
|
|
200
|
+
component: string;
|
|
201
|
+
area: string;
|
|
202
|
+
state?: Record<string, unknown>;
|
|
203
|
+
params?: Record<string, unknown>;
|
|
204
|
+
}
|
|
205
|
+
```
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Content Drawer
|
|
2
|
+
|
|
3
|
+
Sliding panel system for navigation, overlays, and responsive layouts.
|
|
4
|
+
|
|
5
|
+
## Components
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
// Main container that manages drawer behavior
|
|
9
|
+
<schmancy-content-drawer
|
|
10
|
+
?open="${boolean}" // Controls drawer visibility
|
|
11
|
+
position="left|right|top|bottom" // Drawer position (default: left)
|
|
12
|
+
variant="standard|modal|persistent" // Behavior type
|
|
13
|
+
breakpoint="1024px" // Responsive breakpoint
|
|
14
|
+
?backdrop="${boolean}" // Show backdrop when open
|
|
15
|
+
>
|
|
16
|
+
<schmancy-content-drawer-main>
|
|
17
|
+
// Main content that shifts when drawer opens
|
|
18
|
+
</schmancy-content-drawer-main>
|
|
19
|
+
|
|
20
|
+
<schmancy-content-drawer-sheet
|
|
21
|
+
width="256px" // Width for left/right drawers
|
|
22
|
+
height="auto" // Height for top/bottom drawers
|
|
23
|
+
offset="0" // Offset for nested drawers
|
|
24
|
+
>
|
|
25
|
+
// Drawer content
|
|
26
|
+
</schmancy-content-drawer-sheet>
|
|
27
|
+
</schmancy-content-drawer>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Context API
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { contentDrawerContext } from '@schmancy/content-drawer'
|
|
34
|
+
|
|
35
|
+
// Create drawer controller
|
|
36
|
+
const drawer = contentDrawerContext.create('drawer-id')
|
|
37
|
+
|
|
38
|
+
// Control methods
|
|
39
|
+
drawer.open()
|
|
40
|
+
drawer.close()
|
|
41
|
+
drawer.toggle()
|
|
42
|
+
drawer.lock() // Prevent closing
|
|
43
|
+
drawer.unlock()
|
|
44
|
+
drawer.setPersistent(boolean)
|
|
45
|
+
|
|
46
|
+
// State access
|
|
47
|
+
drawer.isOpen -> boolean
|
|
48
|
+
drawer.state$ -> Observable<DrawerState>
|
|
49
|
+
|
|
50
|
+
// Events
|
|
51
|
+
@drawer-opened
|
|
52
|
+
@drawer-closed
|
|
53
|
+
@drawer-toggled -> { open: boolean }
|
|
54
|
+
@before-open
|
|
55
|
+
@before-close
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
### 1. Basic Navigation Drawer
|
|
61
|
+
```html
|
|
62
|
+
<schmancy-content-drawer ?open="${drawerOpen}">
|
|
63
|
+
<schmancy-content-drawer-main>
|
|
64
|
+
<button @click="${() => drawerOpen = !drawerOpen}">Menu</button>
|
|
65
|
+
<main>App content</main>
|
|
66
|
+
</schmancy-content-drawer-main>
|
|
67
|
+
|
|
68
|
+
<schmancy-content-drawer-sheet width="280px">
|
|
69
|
+
<nav>
|
|
70
|
+
<a href="/home">Home</a>
|
|
71
|
+
<a href="/about">About</a>
|
|
72
|
+
</nav>
|
|
73
|
+
</schmancy-content-drawer-sheet>
|
|
74
|
+
</schmancy-content-drawer>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 2. Bottom Sheet
|
|
78
|
+
```html
|
|
79
|
+
<schmancy-content-drawer
|
|
80
|
+
?open="${sheetOpen}"
|
|
81
|
+
position="bottom"
|
|
82
|
+
@drawer-closed="${() => sheetOpen = false}"
|
|
83
|
+
>
|
|
84
|
+
<schmancy-content-drawer-main>
|
|
85
|
+
<button @click="${() => sheetOpen = true}">Show Options</button>
|
|
86
|
+
</schmancy-content-drawer-main>
|
|
87
|
+
|
|
88
|
+
<schmancy-content-drawer-sheet height="auto" max-height="50vh">
|
|
89
|
+
<div class="sheet-handle"></div>
|
|
90
|
+
<h3>Select Option</h3>
|
|
91
|
+
<schmancy-list>
|
|
92
|
+
<schmancy-list-item>Option 1</schmancy-list-item>
|
|
93
|
+
<schmancy-list-item>Option 2</schmancy-list-item>
|
|
94
|
+
</schmancy-list>
|
|
95
|
+
</schmancy-content-drawer-sheet>
|
|
96
|
+
</schmancy-content-drawer>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 3. Persistent Sidebar
|
|
100
|
+
```js
|
|
101
|
+
// Responsive persistent drawer
|
|
102
|
+
const drawer = contentDrawerContext.create('sidebar')
|
|
103
|
+
|
|
104
|
+
// Auto-persist on large screens
|
|
105
|
+
const mediaQuery = window.matchMedia('(min-width: 1024px)')
|
|
106
|
+
drawer.setPersistent(mediaQuery.matches)
|
|
107
|
+
mediaQuery.addEventListener('change', e => drawer.setPersistent(e.matches))
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```html
|
|
111
|
+
<schmancy-content-drawer
|
|
112
|
+
.context="${drawer}"
|
|
113
|
+
variant="persistent"
|
|
114
|
+
breakpoint="1024px"
|
|
115
|
+
>
|
|
116
|
+
<schmancy-content-drawer-main>
|
|
117
|
+
<schmancy-app-bar>
|
|
118
|
+
<schmancy-icon-button
|
|
119
|
+
icon="menu"
|
|
120
|
+
@click="${() => drawer.toggle()}"
|
|
121
|
+
></schmancy-icon-button>
|
|
122
|
+
</schmancy-app-bar>
|
|
123
|
+
<main>Dashboard content</main>
|
|
124
|
+
</schmancy-content-drawer-main>
|
|
125
|
+
|
|
126
|
+
<schmancy-content-drawer-sheet width="240px">
|
|
127
|
+
<aside>Sidebar content</aside>
|
|
128
|
+
</schmancy-content-drawer-sheet>
|
|
129
|
+
</schmancy-content-drawer>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 4. Nested Drawers
|
|
133
|
+
```js
|
|
134
|
+
const mainDrawer = contentDrawerContext.create('main')
|
|
135
|
+
const subDrawer = contentDrawerContext.create('sub')
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
```html
|
|
139
|
+
<schmancy-content-drawer .context="${mainDrawer}">
|
|
140
|
+
<schmancy-content-drawer-main>
|
|
141
|
+
<!-- Nested drawer container -->
|
|
142
|
+
<schmancy-content-drawer .context="${subDrawer}">
|
|
143
|
+
<schmancy-content-drawer-main>
|
|
144
|
+
<button @click="${() => mainDrawer.open()}">Menu</button>
|
|
145
|
+
</schmancy-content-drawer-main>
|
|
146
|
+
|
|
147
|
+
<!-- Sub drawer -->
|
|
148
|
+
<schmancy-content-drawer-sheet width="280px" offset="240px">
|
|
149
|
+
<button @click="${() => subDrawer.close()}">Back</button>
|
|
150
|
+
<div>Sub menu content</div>
|
|
151
|
+
</schmancy-content-drawer-sheet>
|
|
152
|
+
</schmancy-content-drawer>
|
|
153
|
+
</schmancy-content-drawer-main>
|
|
154
|
+
|
|
155
|
+
<!-- Main drawer -->
|
|
156
|
+
<schmancy-content-drawer-sheet width="240px">
|
|
157
|
+
<button @click="${() => subDrawer.open()}">Open Submenu</button>
|
|
158
|
+
<div>Main menu content</div>
|
|
159
|
+
</schmancy-content-drawer-sheet>
|
|
160
|
+
</schmancy-content-drawer>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## CSS Variables
|
|
164
|
+
|
|
165
|
+
```css
|
|
166
|
+
schmancy-content-drawer {
|
|
167
|
+
--drawer-width: 256px;
|
|
168
|
+
--drawer-background: var(--md-sys-color-surface);
|
|
169
|
+
--drawer-shadow: 0 8px 10px -5px rgba(0,0,0,0.2);
|
|
170
|
+
--drawer-transition-duration: 250ms;
|
|
171
|
+
--drawer-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
172
|
+
--backdrop-color: rgba(0, 0, 0, 0.5);
|
|
173
|
+
--drawer-z-index: 200;
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Related Components
|
|
178
|
+
|
|
179
|
+
- [Sheet](./sheet.md) - Simpler sheet component for modals
|
|
180
|
+
- [Navigation Drawer](./nav-drawer.md) - Specialized navigation component
|
|
181
|
+
- [Dialog](./dialog.md) - Modal dialogs
|
|
182
|
+
- [Layout](./layout.md) - Layout utilities
|
|
183
|
+
|
|
184
|
+
## Common Patterns
|
|
185
|
+
|
|
186
|
+
**Command Palette**: Top drawer with search input
|
|
187
|
+
**Help Panel**: Right drawer with contextual help
|
|
188
|
+
**Mobile Menu**: Left drawer for navigation
|
|
189
|
+
**Action Sheet**: Bottom drawer for mobile actions
|
|
190
|
+
**Settings Panel**: Persistent right drawer
|
package/dist/ai/dialog.md
CHANGED
|
@@ -27,6 +27,7 @@ $dialog.confirm({
|
|
|
27
27
|
confirmText?,
|
|
28
28
|
cancelText?,
|
|
29
29
|
variant?: "default"|"danger",
|
|
30
|
+
confirmColor?: "primary"|"error"|"warning"|"success", // Button color for confirm action
|
|
30
31
|
position?: {x,y}|MouseEvent|TouchEvent,
|
|
31
32
|
width?: string,
|
|
32
33
|
content?: TemplateResult|HTMLElement|Function,
|
|
@@ -85,6 +86,15 @@ const confirmed = await $dialog.confirm({
|
|
|
85
86
|
position: event
|
|
86
87
|
});
|
|
87
88
|
|
|
89
|
+
// Confirmation with colored button
|
|
90
|
+
const confirmed = await $dialog.confirm({
|
|
91
|
+
title: "Delete Transaction",
|
|
92
|
+
message: `Are you sure you want to delete this transaction of ${amount} units?`,
|
|
93
|
+
confirmText: "Delete",
|
|
94
|
+
cancelText: "Cancel",
|
|
95
|
+
confirmColor: "error", // Makes confirm button red
|
|
96
|
+
});
|
|
97
|
+
|
|
88
98
|
// Dialog with custom content
|
|
89
99
|
const result = await $dialog.component(html`
|
|
90
100
|
<div>
|
package/dist/ai/index.md
CHANGED
|
@@ -6,6 +6,7 @@ This directory contains concise reference documentation for the Schmancy compone
|
|
|
6
6
|
|
|
7
7
|
- [Area](./area.md) - Routing and subscription API for application areas
|
|
8
8
|
- [Button](./button.md) - Primary, secondary, and tertiary buttons with various states
|
|
9
|
+
- [Content Drawer](./content-drawer.md) - Sliding panel system for navigation and overlays
|
|
9
10
|
- [Dialog](./dialog.md) - Modal dialog boxes for confirmations and custom content
|
|
10
11
|
- [Form](./form.md) - Form containers with validation capabilities
|
|
11
12
|
- [Input](./input.md) - Text input fields with various types and features
|
package/dist/ai/table.md
CHANGED
|
@@ -50,6 +50,35 @@
|
|
|
50
50
|
</tbody>
|
|
51
51
|
</schmancy-table>
|
|
52
52
|
|
|
53
|
+
// Data Table with programmatic columns and custom sorting
|
|
54
|
+
<schmancy-table
|
|
55
|
+
.columns=${[
|
|
56
|
+
{
|
|
57
|
+
name: 'Name',
|
|
58
|
+
key: 'name',
|
|
59
|
+
sortable: true
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'Date Joined',
|
|
63
|
+
key: 'dateJoined',
|
|
64
|
+
sortable: true,
|
|
65
|
+
// Custom sort by Unix timestamp
|
|
66
|
+
value: (item) => new Date(item.dateJoined).getTime()
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'Profile Completion',
|
|
70
|
+
key: 'profile',
|
|
71
|
+
sortable: true,
|
|
72
|
+
// Sort by completion percentage
|
|
73
|
+
value: (item) => item.profile.completionPercentage,
|
|
74
|
+
// Display with custom rendering
|
|
75
|
+
render: (item) => html`${item.profile.completionPercentage}%`
|
|
76
|
+
}
|
|
77
|
+
]}
|
|
78
|
+
.data=${users}
|
|
79
|
+
sortable>
|
|
80
|
+
</schmancy-table>
|
|
81
|
+
|
|
53
82
|
// Table Properties
|
|
54
83
|
striped: boolean // Apply alternating row colors
|
|
55
84
|
bordered: boolean // Add borders to cells
|
|
@@ -60,6 +89,15 @@ sortable: boolean // Enable column sorting
|
|
|
60
89
|
selectable: boolean // Enable row selection
|
|
61
90
|
loading: boolean // Show loading state
|
|
62
91
|
|
|
92
|
+
// Column Configuration Properties (when using programmatic columns)
|
|
93
|
+
name: string // Display name for the column header
|
|
94
|
+
key?: keyof T // Object property to access for this column
|
|
95
|
+
align?: string // Text alignment ('left', 'right', 'center')
|
|
96
|
+
weight?: string // Font weight ('normal', 'bold')
|
|
97
|
+
render?: function // Custom render function for complex content: (item) => TemplateResult
|
|
98
|
+
sortable?: boolean // Whether this column supports sorting
|
|
99
|
+
value?: function // Custom value function for sorting: (item) => any
|
|
100
|
+
|
|
63
101
|
// Row Properties
|
|
64
102
|
selected: boolean // Whether the row is selected
|
|
65
103
|
data: object // Data object for the row
|
|
@@ -105,7 +143,7 @@ data: object // Data object for the row
|
|
|
105
143
|
</tbody>
|
|
106
144
|
</schmancy-table>
|
|
107
145
|
|
|
108
|
-
// Sortable table
|
|
146
|
+
// Sortable table - standard HTML structure
|
|
109
147
|
<schmancy-table
|
|
110
148
|
sortable
|
|
111
149
|
@sort=${(e) => sortData(e.detail.column, e.detail.direction)}>
|
|
@@ -142,6 +180,66 @@ data: object // Data object for the row
|
|
|
142
180
|
</tbody>
|
|
143
181
|
</schmancy-table>
|
|
144
182
|
|
|
183
|
+
// Sortable table - programmatic with custom value functions
|
|
184
|
+
<schmancy-table
|
|
185
|
+
.data=${userData}
|
|
186
|
+
.columns=${[
|
|
187
|
+
{
|
|
188
|
+
name: 'ID',
|
|
189
|
+
key: 'id',
|
|
190
|
+
sortable: true
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: 'User',
|
|
194
|
+
key: 'user',
|
|
195
|
+
sortable: true,
|
|
196
|
+
// Sort by last name for "user" column
|
|
197
|
+
value: (item) => item.user.lastName,
|
|
198
|
+
// Custom render function for complex data
|
|
199
|
+
render: (item) => html`
|
|
200
|
+
<div class="flex items-center">
|
|
201
|
+
<schmancy-avatar src=${item.user.avatar} size="sm"></schmancy-avatar>
|
|
202
|
+
<div class="ml-2">
|
|
203
|
+
<div>${item.user.firstName} ${item.user.lastName}</div>
|
|
204
|
+
<div class="text-sm text-gray-500">${item.user.email}</div>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
`
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'Status',
|
|
211
|
+
key: 'status',
|
|
212
|
+
sortable: true,
|
|
213
|
+
// Sort by status priority (numeric value) but display text
|
|
214
|
+
value: (item) => statusPriorities[item.status] || 0,
|
|
215
|
+
render: (item) => html`
|
|
216
|
+
<schmancy-badge variant=${getStatusVariant(item.status)}>
|
|
217
|
+
${item.status}
|
|
218
|
+
</schmancy-badge>
|
|
219
|
+
`
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'Created',
|
|
223
|
+
key: 'createdAt',
|
|
224
|
+
sortable: true,
|
|
225
|
+
// Sort by timestamp but display formatted date
|
|
226
|
+
value: (item) => new Date(item.createdAt).getTime(),
|
|
227
|
+
render: (item) => formatDate(item.createdAt)
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'Actions',
|
|
231
|
+
render: (item) => html`
|
|
232
|
+
<div class="flex space-x-2">
|
|
233
|
+
<schmancy-icon-button icon="edit" @click=${() => editItem(item)}></schmancy-icon-button>
|
|
234
|
+
<schmancy-icon-button icon="delete" @click=${() => deleteItem(item)}></schmancy-icon-button>
|
|
235
|
+
</div>
|
|
236
|
+
`
|
|
237
|
+
}
|
|
238
|
+
]}
|
|
239
|
+
sortable
|
|
240
|
+
@sort=${(e) => console.log('Sort changed:', e.detail)}>
|
|
241
|
+
</schmancy-table>
|
|
242
|
+
|
|
145
243
|
// Selectable table
|
|
146
244
|
<schmancy-table
|
|
147
245
|
selectable
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const h=require("./litElement.mixin-
|
|
1
|
+
"use strict";const e=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const h=require("./litElement.mixin-qOTYSaNG.cjs");require("./tailwind.mixin-CFCJhe5p.cjs");const c=require("lit"),r=require("lit/decorators.js");var d=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s=(i,a,p,n)=>{for(var l,o=n>1?void 0:n?u(a,p):a,y=i.length-1;y>=0;y--)(l=i[y])&&(o=(n?l(a,p,o):l(o))||o);return n&&o&&d(a,p,o),o};let t=class extends h.$LitElement(c.css`
|
|
2
2
|
:host {
|
|
3
3
|
font-family: inherit;
|
|
4
4
|
display: block;
|
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
</span>
|
|
35
35
|
</span>
|
|
36
36
|
`}};s([r.property({type:String})],t.prototype,"ease",2),s([r.property({type:Number})],t.prototype,"delay",2),s([r.property({type:Number})],t.prototype,"stagger",2),s([r.property({type:Number})],t.prototype,"duration",2),s([r.property({type:Array})],t.prototype,"scale",2),s([r.property({type:Array})],t.prototype,"opacity",2),s([r.property({type:Array})],t.prototype,"translateX",2),s([r.property({type:Array})],t.prototype,"translateY",2),s([r.property({type:Array})],t.prototype,"translateZ",2),s([r.property({type:Array})],t.prototype,"rotateZ",2),s([r.property({type:Boolean})],t.prototype,"resetOnScroll",2),s([r.queryAssignedNodes()],t.prototype,"defaultSlot",2),s([r.query(".letters")],t.prototype,"letters",2),s([r.query(".ml7")],t.prototype,"ml7",2),t=s([r.customElement("schmancy-animated-text")],t);
|
|
37
|
-
//# sourceMappingURL=animated-text-
|
|
37
|
+
//# sourceMappingURL=animated-text-Bu9wh3wv.cjs.map
|