@feugene/granularity 0.11.0 → 0.13.0
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/dist/GrBadge.css +1 -1
- package/dist/GrFormFile.css +1 -1
- package/dist/GrToaster.css +1 -1
- package/dist/GrTree.css +1 -1
- package/dist/chunks/{config-ClhKPJvg.js → config-23WtUiAL.js} +1 -1
- package/dist/chunks/config-23WtUiAL.js.map +1 -0
- package/dist/chunks/config-8Pcutu1j.js.map +1 -0
- package/dist/chunks/{config-1uSYl98Y.js → config-B0i5r8kH.js} +1 -1
- package/dist/chunks/config-B0i5r8kH.js.map +1 -0
- package/dist/chunks/{config-BOlr7qw7.js → config-B5Rknzkd.js} +33 -39
- package/dist/chunks/config-B5Rknzkd.js.map +1 -0
- package/dist/chunks/config-B7W9VlZ7.js +5 -0
- package/dist/chunks/config-B7W9VlZ7.js.map +1 -0
- package/dist/chunks/config-BDSHekVC.js +84 -0
- package/dist/chunks/config-BDSHekVC.js.map +1 -0
- package/dist/chunks/config-BLHqZhy-.js.map +1 -0
- package/dist/chunks/{config-eYLZYOUS2.js → config-BMKNHFMD2.js} +15 -15
- package/dist/chunks/config-BMKNHFMD2.js.map +1 -0
- package/dist/chunks/config-BUHuGBik2.js.map +1 -0
- package/dist/chunks/config-BWiPnygb.js +5 -0
- package/dist/chunks/config-BWiPnygb.js.map +1 -0
- package/dist/chunks/config-BX1JTrkV.js.map +1 -0
- package/dist/chunks/config-BZFUM3Ky.js +75 -0
- package/dist/chunks/config-BZFUM3Ky.js.map +1 -0
- package/dist/chunks/{config-DUcu1D68.js → config-BmNT0Fmx.js} +2 -2
- package/dist/chunks/config-BmNT0Fmx.js.map +1 -0
- package/dist/chunks/{config-C49QUoJL.js → config-BvVq2gbd.js} +1 -1
- package/dist/chunks/{config-C49QUoJL.js.map → config-BvVq2gbd.js.map} +1 -1
- package/dist/chunks/{config-CrG1XiE7.js → config-C4hJxXDa.js} +5 -5
- package/dist/chunks/config-C4hJxXDa.js.map +1 -0
- package/dist/chunks/config-CB4RVt9M.js +66 -0
- package/dist/chunks/config-CB4RVt9M.js.map +1 -0
- package/dist/chunks/config-COE_vZ-l.js +52 -0
- package/dist/chunks/config-COE_vZ-l.js.map +1 -0
- package/dist/chunks/{config-CziwTDDL.js → config-CPdmr7tC.js} +1 -1
- package/dist/chunks/{config-CziwTDDL.js.map → config-CPdmr7tC.js.map} +1 -1
- package/dist/chunks/{config-BIRO0vDJ2.js → config-DPDFYzIa.js} +2 -2
- package/dist/chunks/config-DPDFYzIa.js.map +1 -0
- package/dist/chunks/{config-DnvPqu4g.js → config-DRKXJ9PW2.js} +1 -1
- package/dist/chunks/config-DRKXJ9PW2.js.map +1 -0
- package/dist/chunks/config-DToHb81g.js +45 -0
- package/dist/chunks/config-DToHb81g.js.map +1 -0
- package/dist/chunks/{config-jBp9wVv-.js → config-D_myOZbA.js} +1 -1
- package/dist/chunks/{config-jBp9wVv-.js.map → config-D_myOZbA.js.map} +1 -1
- package/dist/chunks/{config-D_R56_gT.js → config-Dg_6FTvJ.js} +1 -1
- package/dist/chunks/config-Dg_6FTvJ.js.map +1 -0
- package/dist/chunks/config-Dlm49Jp5.js +5 -0
- package/dist/chunks/config-Dlm49Jp5.js.map +1 -0
- package/dist/chunks/config-DpqOnJiz.js.map +1 -0
- package/dist/chunks/config-Dqy0rPPO2.js.map +1 -0
- package/dist/chunks/config-Droqn55j.js +8 -0
- package/dist/chunks/config-Droqn55j.js.map +1 -0
- package/dist/chunks/{config-C4snOIXg.js → config-KXuionN3.js} +1 -1
- package/dist/chunks/{config-C4snOIXg.js.map → config-KXuionN3.js.map} +1 -1
- package/dist/chunks/config-LGrZIdaZ.js.map +1 -0
- package/dist/chunks/{config-DezDih8_.js → config-LqDC_rvp.js} +2 -2
- package/dist/chunks/config-LqDC_rvp.js.map +1 -0
- package/dist/chunks/config-QaIc_gRa2.js.map +1 -0
- package/dist/chunks/config-U4m9PSql2.js.map +1 -0
- package/dist/chunks/{config-B7IIWGt_2.js → config-XmTv4pnI.js} +2 -2
- package/dist/chunks/config-XmTv4pnI.js.map +1 -0
- package/dist/chunks/config-eXB87DOi.js +9 -0
- package/dist/chunks/config-eXB87DOi.js.map +1 -0
- package/dist/chunks/{config-C7NpDrfO.js → config-gZWR75Bh2.js} +1 -1
- package/dist/chunks/config-gZWR75Bh2.js.map +1 -0
- package/dist/chunks/config-ipvU0lzP.js.map +1 -0
- package/dist/chunks/config-xR4XVmcy2.js.map +1 -0
- package/dist/chunks/context-Bfrgsluh.js +9 -0
- package/dist/chunks/context-Bfrgsluh.js.map +1 -0
- package/dist/chunks/context-DdNIxa1w.js +9 -0
- package/dist/chunks/context-DdNIxa1w.js.map +1 -0
- package/dist/chunks/context-DfWYCBB-.js +129 -0
- package/dist/chunks/context-DfWYCBB-.js.map +1 -0
- package/dist/chunks/{en-BdtiS2d3.js → en-Cr6EkG8c.js} +52 -4
- package/dist/chunks/en-Cr6EkG8c.js.map +1 -0
- package/dist/chunks/{es-DBhctWg-.js → es-DuYb1Qju.js} +3 -3
- package/dist/chunks/{es-DBhctWg-.js.map → es-DuYb1Qju.js.map} +1 -1
- package/dist/chunks/{es-BGRMZbe9.js → es-i08e9Sdo.js} +52 -4
- package/dist/chunks/es-i08e9Sdo.js.map +1 -0
- package/dist/chunks/{grBadgeStyles-DrycBuKT.js → grBadgeStyles-D3dFjr_N.js} +12 -12
- package/dist/chunks/grBadgeStyles-D3dFjr_N.js.map +1 -0
- package/dist/chunks/{grButtonStyles-C7Yga_Q1.js → grButtonStyles-DRBgDmOp.js} +28 -28
- package/dist/chunks/grButtonStyles-DRBgDmOp.js.map +1 -0
- package/dist/chunks/{grDropdownStyles-B_-DKytw.js → grDropdownStyles-HBPkghVr.js} +2 -2
- package/dist/chunks/{grDropdownStyles-B_-DKytw.js.map → grDropdownStyles-HBPkghVr.js.map} +1 -1
- package/dist/chunks/grModalEscStack-BXk-9mv7.js +43 -0
- package/dist/chunks/grModalEscStack-BXk-9mv7.js.map +1 -0
- package/dist/chunks/{grModalStyles-DWd3i05Q.js → grModalStyles-D8-shx9A.js} +1 -1
- package/dist/chunks/grModalStyles-D8-shx9A.js.map +1 -0
- package/dist/chunks/{grSelectStyles-CLK5hRd3.js → grSelectStyles-CwMUQrBZ.js} +12 -12
- package/dist/chunks/grSelectStyles-CwMUQrBZ.js.map +1 -0
- package/dist/chunks/{grStyle-Blc9otAx.js → grStyle-CdvxTXPH.js} +2 -2
- package/dist/chunks/grStyle-CdvxTXPH.js.map +1 -0
- package/dist/chunks/{granularityI18n-DoV7Ca2m.js → granularityI18n-SH0I--GW.js} +1 -1
- package/dist/chunks/{granularityI18n-DoV7Ca2m.js.map → granularityI18n-SH0I--GW.js.map} +1 -1
- package/dist/chunks/{ru-BFCnOiML.js → ru-B5XOOYZt.js} +52 -4
- package/dist/chunks/ru-B5XOOYZt.js.map +1 -0
- package/dist/chunks/{safelist-Do2RtzLB.js → safelist-BvO8HPnE.js} +1 -1
- package/dist/chunks/{safelist-Do2RtzLB.js.map → safelist-BvO8HPnE.js.map} +1 -1
- package/dist/chunks/shared-D-v9lit0.js +188 -0
- package/dist/chunks/shared-D-v9lit0.js.map +1 -0
- package/dist/chunks/{transition-TLFw4KBn.js → useScrollLock-K7kaP2Ud.js} +52 -1
- package/dist/chunks/useScrollLock-K7kaP2Ud.js.map +1 -0
- package/dist/components/GrAlert/chunks/GrAlert-B9gmpoPC.js +251 -0
- package/dist/components/GrAlert/chunks/GrAlert-B9gmpoPC.js.map +1 -0
- package/dist/components/GrAlert/index.js +2 -2
- package/dist/components/GrAutocomplete/chunks/GrAutocomplete-BVLoQ5tZ.js +499 -0
- package/dist/components/GrAutocomplete/chunks/GrAutocomplete-BVLoQ5tZ.js.map +1 -0
- package/dist/components/GrAutocomplete/index.js +3 -0
- package/dist/components/GrAvatar/chunks/{GrAvatar-96CpTCq5.js → GrAvatar-CTOUVBF7.js} +1 -1
- package/dist/components/GrAvatar/chunks/GrAvatar-CTOUVBF7.js.map +1 -0
- package/dist/components/GrAvatar/index.js +1 -1
- package/dist/components/GrBadge/chunks/{GrBadge-B77XlaqE.js → GrBadge-D1jefy4S.js} +12 -8
- package/dist/components/GrBadge/chunks/GrBadge-D1jefy4S.js.map +1 -0
- package/dist/components/GrBadge/index.js +2 -2
- package/dist/components/GrBadgeWrap/chunks/{GrBadgeWrap-CcktMOdg.js → GrBadgeWrap-DWDxHdiQ.js} +1 -1
- package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-DWDxHdiQ.js.map +1 -0
- package/dist/components/GrBadgeWrap/index.js +1 -1
- package/dist/components/GrBottomNav/chunks/{GrBottomNav-usuMgG8_.js → GrBottomNav-vSE4LXmk.js} +2 -2
- package/dist/components/GrBottomNav/chunks/GrBottomNav-vSE4LXmk.js.map +1 -0
- package/dist/components/GrBottomNav/index.js +1 -1
- package/dist/components/GrButton/chunks/{GrButton-BlffdeJr.js → GrButton-DCi4CUpo.js} +18 -14
- package/dist/components/GrButton/chunks/GrButton-DCi4CUpo.js.map +1 -0
- package/dist/components/GrButton/index.js +4 -4
- package/dist/components/GrCard/chunks/{GrCard-DUNMkuHW.js → GrCard-CxCjyHMb.js} +1 -1
- package/dist/components/GrCard/chunks/GrCard-CxCjyHMb.js.map +1 -0
- package/dist/components/GrCard/index.js +1 -1
- package/dist/components/GrCheckbox/chunks/{GrCheckbox-DJhzZZdO.js → GrCheckbox-BbIDRXtl.js} +5 -5
- package/dist/components/GrCheckbox/chunks/GrCheckbox-BbIDRXtl.js.map +1 -0
- package/dist/components/GrCheckbox/index.js +1 -1
- package/dist/components/GrCollapse/chunks/{GrCollapse-CPPLh_xU.js → GrCollapse-DApXztn8.js} +6 -6
- package/dist/components/GrCollapse/chunks/GrCollapse-DApXztn8.js.map +1 -0
- package/dist/components/GrCollapse/index.js +2 -2
- package/dist/components/GrCommandPalette/chunks/GrCommandPalette-6OyvNbek.js +410 -0
- package/dist/components/GrCommandPalette/chunks/GrCommandPalette-6OyvNbek.js.map +1 -0
- package/dist/components/GrCommandPalette/index.js +3 -0
- package/dist/components/GrConfigProvider/chunks/GrConfigProvider-BtyeBGm8.js +57 -0
- package/dist/components/GrConfigProvider/chunks/GrConfigProvider-BtyeBGm8.js.map +1 -0
- package/dist/components/GrConfigProvider/index.js +4 -0
- package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-BWYKCsHd.js → GrConfirmDialog-e4120mWw.js} +5 -5
- package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-e4120mWw.js.map +1 -0
- package/dist/components/GrConfirmDialog/index.js +1 -1
- package/dist/components/GrDataTable/chunks/GrDataTable-C1CzxV0p.js +307 -0
- package/dist/components/GrDataTable/chunks/GrDataTable-C1CzxV0p.js.map +1 -0
- package/dist/components/GrDataTable/index.js +2 -2
- package/dist/components/GrDialog/chunks/{GrDialog-5DAS-1Lb.js → GrDialog-BPMvDHOz.js} +6 -6
- package/dist/components/GrDialog/chunks/GrDialog-BPMvDHOz.js.map +1 -0
- package/dist/components/GrDialog/index.js +1 -1
- package/dist/components/GrDialogService/chunks/{GrDialogService-DY_fmaMu.js → GrDialogService-CYXCTGm3.js} +36 -11
- package/dist/components/GrDialogService/chunks/GrDialogService-CYXCTGm3.js.map +1 -0
- package/dist/components/GrDialogService/index.js +2 -2
- package/dist/components/GrDivider/chunks/GrDivider-BdENZ1w0.js +54 -0
- package/dist/components/GrDivider/chunks/GrDivider-BdENZ1w0.js.map +1 -0
- package/dist/components/GrDivider/index.js +3 -0
- package/dist/components/GrDrawer/chunks/{GrDrawer-D1kzsjXN.js → GrDrawer-KevdZ5BB.js} +41 -17
- package/dist/components/GrDrawer/chunks/GrDrawer-KevdZ5BB.js.map +1 -0
- package/dist/components/GrDrawer/index.js +2 -2
- package/dist/components/GrDropdown/chunks/{GrDropdown-BXb5Cxxf.js → GrDropdown-BKoy8hm-.js} +91 -5
- package/dist/components/GrDropdown/chunks/GrDropdown-BKoy8hm-.js.map +1 -0
- package/dist/components/GrDropdown/index.js +2 -2
- package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-DFEJLPcV.js → GrDropdownMenu-zCatXzmt.js} +11 -11
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-zCatXzmt.js.map +1 -0
- package/dist/components/GrDropdownMenu/index.js +1 -1
- package/dist/components/GrEmptyState/chunks/{GrEmptyState-CA3BiTV7.js → GrEmptyState-CNb0BzjG.js} +3 -3
- package/dist/components/GrEmptyState/chunks/GrEmptyState-CNb0BzjG.js.map +1 -0
- package/dist/components/GrEmptyState/index.js +1 -1
- package/dist/components/GrFileUpload/chunks/{GrFileUpload-DvWPpiJS.js → GrFileUpload-CnLgUGDF.js} +12 -12
- package/dist/components/GrFileUpload/chunks/GrFileUpload-CnLgUGDF.js.map +1 -0
- package/dist/components/GrFileUpload/index.js +1 -1
- package/dist/components/GrForm/chunks/GrForm-CdaFjcyl.js +234 -0
- package/dist/components/GrForm/chunks/GrForm-CdaFjcyl.js.map +1 -0
- package/dist/components/GrForm/index.js +4 -0
- package/dist/components/GrFormField/chunks/GrFormField-CXCDBd99.js +100 -0
- package/dist/components/GrFormField/chunks/GrFormField-CXCDBd99.js.map +1 -0
- package/dist/components/GrFormField/index.js +3 -2
- package/dist/components/GrFormFile/chunks/{GrFormFile-CXcqqdvV.js → GrFormFile-CqacSbUl.js} +9 -9
- package/dist/components/GrFormFile/chunks/GrFormFile-CqacSbUl.js.map +1 -0
- package/dist/components/GrFormFile/index.js +1 -1
- package/dist/components/GrFormSection/chunks/{GrFormSection-Ce21jcgo.js → GrFormSection-C3w9DQJf.js} +1 -1
- package/dist/components/GrFormSection/chunks/GrFormSection-C3w9DQJf.js.map +1 -0
- package/dist/components/GrFormSection/index.js +1 -1
- package/dist/components/GrImageViewer/chunks/{GrImageViewer-OCUIrNh2.js → GrImageViewer-DDLJkvIU.js} +312 -223
- package/dist/components/GrImageViewer/chunks/GrImageViewer-DDLJkvIU.js.map +1 -0
- package/dist/components/GrImageViewer/index.js +1 -1
- package/dist/components/GrInput/chunks/GrInput-C1VBL0dg.js +337 -0
- package/dist/components/GrInput/chunks/GrInput-C1VBL0dg.js.map +1 -0
- package/dist/components/GrInput/index.js +2 -2
- package/dist/components/GrInputTag/chunks/{GrInputTag-zMgFqp2g.js → GrInputTag-BMk9jm42.js} +6 -6
- package/dist/components/GrInputTag/chunks/GrInputTag-BMk9jm42.js.map +1 -0
- package/dist/components/GrInputTag/index.js +2 -2
- package/dist/components/GrKbd/chunks/GrKbd-DTspwtoN.js +22 -0
- package/dist/components/GrKbd/chunks/GrKbd-DTspwtoN.js.map +1 -0
- package/dist/components/GrKbd/index.js +3 -0
- package/dist/components/GrLink/chunks/{GrLink-CYUe-Q8k.js → GrLink-BP0YrnL9.js} +1 -1
- package/dist/components/GrLink/chunks/{GrLink-CYUe-Q8k.js.map → GrLink-BP0YrnL9.js.map} +1 -1
- package/dist/components/GrLink/index.js +2 -2
- package/dist/components/GrList/chunks/{GrList-Dx772Ns4.js → GrList-5RA-tZzE.js} +3 -3
- package/dist/components/GrList/chunks/GrList-5RA-tZzE.js.map +1 -0
- package/dist/components/GrList/index.js +1 -1
- package/dist/components/GrLoading/chunks/{GrLoading--X_7rdbb.js → GrLoading-fRDtVfi7.js} +3 -3
- package/dist/components/GrLoading/chunks/GrLoading-fRDtVfi7.js.map +1 -0
- package/dist/components/GrLoading/index.js +2 -2
- package/dist/components/GrModal/chunks/{GrModal-BkjW9jZS.js → GrModal-BTu1-5eY.js} +4 -57
- package/dist/components/GrModal/chunks/GrModal-BTu1-5eY.js.map +1 -0
- package/dist/components/GrModal/index.js +3 -3
- package/dist/components/GrNavbar/chunks/{GrNavbar-DW3MiIIf.js → GrNavbar-keKT_mIM.js} +3 -3
- package/dist/components/GrNavbar/chunks/GrNavbar-keKT_mIM.js.map +1 -0
- package/dist/components/GrNavbar/index.js +1 -1
- package/dist/components/GrNumberInput/chunks/{GrNumberInput-CldPIWQx.js → GrNumberInput-l9ZOHG9D.js} +112 -28
- package/dist/components/GrNumberInput/chunks/GrNumberInput-l9ZOHG9D.js.map +1 -0
- package/dist/components/GrNumberInput/index.js +2 -2
- package/dist/components/GrPagination/chunks/{GrPagination-Bu9wv6it.js → GrPagination-C5Y69CuK.js} +59 -16
- package/dist/components/GrPagination/chunks/GrPagination-C5Y69CuK.js.map +1 -0
- package/dist/components/GrPagination/index.js +1 -1
- package/dist/components/GrProgressBar/chunks/{GrProgressBar-CC3z-Zqp.js → GrProgressBar-Dqg4Fj9S.js} +2 -2
- package/dist/components/GrProgressBar/chunks/GrProgressBar-Dqg4Fj9S.js.map +1 -0
- package/dist/components/GrProgressBar/index.js +2 -2
- package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-TmWXbpEP.js → GrPromptDialog-DNUjRVB9.js} +7 -7
- package/dist/components/GrPromptDialog/chunks/GrPromptDialog-DNUjRVB9.js.map +1 -0
- package/dist/components/GrPromptDialog/index.js +2 -2
- package/dist/components/GrRadio/chunks/{GrRadio-CPTixXaY.js → GrRadio-DlhxPGqf.js} +5 -7
- package/dist/components/GrRadio/chunks/GrRadio-DlhxPGqf.js.map +1 -0
- package/dist/components/GrRadio/index.js +2 -2
- package/dist/components/GrRadioGroup/chunks/{GrRadioGroup-vKZCbkCp.js → GrRadioGroup-BXt9iw4q.js} +7 -5
- package/dist/components/GrRadioGroup/chunks/GrRadioGroup-BXt9iw4q.js.map +1 -0
- package/dist/components/GrRadioGroup/index.js +2 -2
- package/dist/components/GrRating/chunks/GrRating-Co-3Rk4h.js +241 -0
- package/dist/components/GrRating/chunks/GrRating-Co-3Rk4h.js.map +1 -0
- package/dist/components/GrRating/index.js +3 -0
- package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-BWJNe2gr.js → GrResponseErrorBanner-2CvM7Z08.js} +2 -2
- package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-BWJNe2gr.js.map → GrResponseErrorBanner-2CvM7Z08.js.map} +1 -1
- package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-Cdu9ekK9.js → GrResponseErrorBanner-C8NGx8pE.js} +3 -3
- package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-Cdu9ekK9.js.map → GrResponseErrorBanner-C8NGx8pE.js.map} +1 -1
- package/dist/components/GrResponseErrorBanner/index.js +2 -2
- package/dist/components/GrSegmented/chunks/{GrSegmented-C1y0UXpQ.js → GrSegmented-CTd3n4PA.js} +14 -11
- package/dist/components/GrSegmented/chunks/GrSegmented-CTd3n4PA.js.map +1 -0
- package/dist/components/GrSegmented/index.js +2 -2
- package/dist/components/GrSelect/chunks/{GrSelect-RShK21lK.js → GrSelect-Dn3FgJ3Z.js} +293 -87
- package/dist/components/GrSelect/chunks/GrSelect-Dn3FgJ3Z.js.map +1 -0
- package/dist/components/GrSelect/index.js +2 -2
- package/dist/components/GrSidebar/chunks/{GrSidebar-DkWozzwA.js → GrSidebar-cvnzBfj3.js} +7 -7
- package/dist/components/GrSidebar/chunks/GrSidebar-cvnzBfj3.js.map +1 -0
- package/dist/components/GrSidebar/index.js +1 -1
- package/dist/components/GrSkeleton/chunks/{GrSkeleton-DsN-_CDZ.js → GrSkeleton-BucA5F4J.js} +1 -1
- package/dist/components/GrSkeleton/chunks/GrSkeleton-BucA5F4J.js.map +1 -0
- package/dist/components/GrSkeleton/index.js +2 -2
- package/dist/components/GrSlider/chunks/GrSlider-CzzJ3bD-.js +286 -0
- package/dist/components/GrSlider/chunks/GrSlider-CzzJ3bD-.js.map +1 -0
- package/dist/components/GrSlider/index.js +3 -0
- package/dist/components/GrStatistic/chunks/GrStatistic-gHiAwrX5.js +128 -0
- package/dist/components/GrStatistic/chunks/GrStatistic-gHiAwrX5.js.map +1 -0
- package/dist/components/GrStatistic/index.js +3 -0
- package/dist/components/GrSwitch/chunks/{GrSwitch-DAioyccZ.js → GrSwitch-CJdRvS0s.js} +16 -7
- package/dist/components/GrSwitch/chunks/GrSwitch-CJdRvS0s.js.map +1 -0
- package/dist/components/GrSwitch/index.js +2 -2
- package/dist/components/GrTabPanels/chunks/GrTabPanels-DeEMgb_y.js +68 -0
- package/dist/components/GrTabPanels/chunks/GrTabPanels-DeEMgb_y.js.map +1 -0
- package/dist/components/GrTabPanels/index.js +3 -0
- package/dist/components/GrTable/chunks/{GrTable-Db3hRnKA.js → GrTable-sNvsA8wa.js} +24 -11
- package/dist/components/GrTable/chunks/GrTable-sNvsA8wa.js.map +1 -0
- package/dist/components/GrTable/index.js +2 -2
- package/dist/components/GrTabs/chunks/{GrTabs-Z-FDJUr_.js → GrTabs-BqTak0SR.js} +9 -4
- package/dist/components/GrTabs/chunks/GrTabs-BqTak0SR.js.map +1 -0
- package/dist/components/GrTabs/index.js +2 -2
- package/dist/components/GrTextarea/chunks/{GrTextarea-D56YxhKq.js → GrTextarea-DIYBAPpP.js} +16 -6
- package/dist/components/GrTextarea/chunks/GrTextarea-DIYBAPpP.js.map +1 -0
- package/dist/components/GrTextarea/index.js +2 -2
- package/dist/components/GrToaster/chunks/{GrToaster-eI8YvnIo.js → GrToaster-BVHjIHcM.js} +52 -11
- package/dist/components/GrToaster/chunks/GrToaster-BVHjIHcM.js.map +1 -0
- package/dist/components/GrToaster/index.js +2 -2
- package/dist/components/GrTooltip/chunks/{GrTooltip-BeyZ8ssR.js → GrTooltip-BMKH2lIx.js} +3 -3
- package/dist/components/GrTooltip/chunks/GrTooltip-BMKH2lIx.js.map +1 -0
- package/dist/components/GrTooltip/index.js +1 -1
- package/dist/components/GrTree/chunks/{GrTree-D3ODe2dB.js → GrTree-_12ChXRQ.js} +108 -9
- package/dist/components/GrTree/chunks/GrTree-_12ChXRQ.js.map +1 -0
- package/dist/components/GrTree/index.js +2 -2
- package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-B2xBKs5Q.js → GrTreeSelect-CdaLG7Xq.js} +10 -10
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-CdaLG7Xq.js.map +1 -0
- package/dist/components/GrTreeSelect/index.js +2 -2
- package/dist/composables/useToast.js +3 -1
- package/dist/composables/useToast.js.map +1 -1
- package/dist/directives/loading.js +1 -1
- package/dist/granular-provider-node.js +6 -6
- package/dist/granular-provider-node.js.map +1 -1
- package/dist/granular-provider.js +1 -1
- package/dist/i18n/all.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/index.js +112 -87
- package/dist/index.js.map +1 -1
- package/dist/styles/base.css +30 -8
- package/dist/styles/index.css +6 -3
- package/dist/styles/preflight.css +8 -4
- package/dist/styles/themes/dark.css +52 -40
- package/dist/styles/themes/light.css +70 -45
- package/dist/styles/tokens.css +20 -20
- package/dist/types/src/components/GrAlert/GrAlert.vue.d.ts +26 -14
- package/dist/types/src/components/GrAlert/defaults.d.ts +17 -0
- package/dist/types/src/components/GrAlert/grAlertStyles.d.ts +55 -0
- package/dist/types/src/components/GrAlert/index.d.ts +4 -1
- package/dist/types/src/components/GrAutocomplete/GrAutocomplete.vue.d.ts +153 -0
- package/dist/types/src/components/GrAutocomplete/config.d.ts +1 -0
- package/dist/types/src/components/GrAutocomplete/defaults.d.ts +15 -0
- package/dist/types/src/components/GrAutocomplete/grAutocompleteStyles.d.ts +27 -0
- package/dist/types/src/components/GrAutocomplete/index.d.ts +6 -0
- package/dist/types/src/components/GrAutocomplete/safelist.d.ts +1 -0
- package/dist/types/src/components/GrAvatar/GrAvatar.vue.d.ts +1 -1
- package/dist/types/src/components/GrBadge/GrBadge.vue.d.ts +7 -7
- package/dist/types/src/components/GrBadge/defaults.d.ts +15 -0
- package/dist/types/src/components/GrBadge/index.d.ts +1 -0
- package/dist/types/src/components/GrBadgeWrap/GrBadgeWrap.vue.d.ts +1 -1
- package/dist/types/src/components/GrButton/GrButton.vue.d.ts +12 -12
- package/dist/types/src/components/GrButton/defaults.d.ts +25 -0
- package/dist/types/src/components/GrButton/grButtonStyles.d.ts +2 -2
- package/dist/types/src/components/GrButton/index.d.ts +1 -0
- package/dist/types/src/components/GrCheckbox/GrCheckbox.vue.d.ts +4 -4
- package/dist/types/src/components/GrCollapse/GrCollapse.vue.d.ts +2 -2
- package/dist/types/src/components/GrCollapse/GrCollapseItem.vue.d.ts +1 -1
- package/dist/types/src/components/GrCommandPalette/GrCommandPalette.vue.d.ts +128 -0
- package/dist/types/src/components/GrCommandPalette/config.d.ts +1 -0
- package/dist/types/src/components/GrCommandPalette/filtering.d.ts +35 -0
- package/dist/types/src/components/GrCommandPalette/grCommandPaletteStyles.d.ts +20 -0
- package/dist/types/src/components/GrCommandPalette/hotkey.d.ts +23 -0
- package/dist/types/src/components/GrCommandPalette/index.d.ts +6 -0
- package/dist/types/src/components/GrCommandPalette/safelist.d.ts +1 -0
- package/dist/types/src/components/GrConfigProvider/GrConfigProvider.vue.d.ts +59 -0
- package/dist/types/src/components/GrConfigProvider/config.d.ts +1 -0
- package/dist/types/src/components/GrConfigProvider/context.d.ts +131 -0
- package/dist/types/src/components/GrConfigProvider/index.d.ts +5 -0
- package/dist/types/src/components/GrConfirmDialog/GrConfirmDialog.vue.d.ts +2 -2
- package/dist/types/src/components/GrDataTable/GrDataTable.vue.d.ts +48 -4
- package/dist/types/src/components/GrDialog/GrDialog.vue.d.ts +1 -1
- package/dist/types/src/components/GrDialogService/store.d.ts +18 -0
- package/dist/types/src/components/GrDivider/GrDivider.vue.d.ts +58 -0
- package/dist/types/src/components/GrDivider/config.d.ts +1 -0
- package/dist/types/src/components/GrDivider/index.d.ts +4 -0
- package/dist/types/src/components/GrDrawer/GrDrawer.vue.d.ts +5 -5
- package/dist/types/src/components/GrDropdown/GrDropdown.vue.d.ts +8 -1
- package/dist/types/src/components/GrDropdownMenu/GrDropdownMenu.vue.d.ts +7 -1
- package/dist/types/src/components/GrDropdownMenu/GrDropdownMenuItem.vue.d.ts +1 -1
- package/dist/types/src/components/GrFileUpload/GrFileUpload.vue.d.ts +3 -3
- package/dist/types/src/components/GrForm/GrForm.vue.d.ts +93 -0
- package/dist/types/src/components/GrForm/config.d.ts +1 -0
- package/dist/types/src/components/GrForm/context.d.ts +27 -0
- package/dist/types/src/components/GrForm/index.d.ts +6 -0
- package/dist/types/src/components/GrForm/validation.d.ts +52 -0
- package/dist/types/src/components/GrFormField/GrFormField.vue.d.ts +25 -2
- package/dist/types/src/components/GrFormField/context.d.ts +20 -0
- package/dist/types/src/components/GrFormField/index.d.ts +1 -0
- package/dist/types/src/components/GrFormFile/GrFormFile.vue.d.ts +4 -4
- package/dist/types/src/components/GrImageViewer/GrImageViewer.vue.d.ts +7 -3
- package/dist/types/src/components/GrImageViewer/composables/useViewerKeyboard.d.ts +20 -0
- package/dist/types/src/components/GrImageViewer/composables/useWheelGesture.d.ts +16 -0
- package/dist/types/src/components/GrImageViewer/composables/useZoomPan.d.ts +50 -0
- package/dist/types/src/components/GrInput/GrInput.vue.d.ts +49 -10
- package/dist/types/src/components/GrInput/defaults.d.ts +18 -0
- package/dist/types/src/components/GrInput/grInputStyles.d.ts +1 -1
- package/dist/types/src/components/GrInput/index.d.ts +1 -0
- package/dist/types/src/components/GrInputTag/GrInputTag.vue.d.ts +3 -3
- package/dist/types/src/components/GrKbd/GrKbd.vue.d.ts +46 -0
- package/dist/types/src/components/GrKbd/config.d.ts +1 -0
- package/dist/types/src/components/GrKbd/index.d.ts +4 -0
- package/dist/types/src/components/GrLink/GrLink.vue.d.ts +3 -3
- package/dist/types/src/components/GrLink/grLinkStyles.d.ts +3 -3
- package/dist/types/src/components/GrModal/grModalStyles.d.ts +1 -1
- package/dist/types/src/components/GrNumberInput/GrNumberInput.vue.d.ts +25 -9
- package/dist/types/src/components/GrNumberInput/defaults.d.ts +14 -0
- package/dist/types/src/components/GrNumberInput/index.d.ts +1 -0
- package/dist/types/src/components/GrPagination/GrPagination.vue.d.ts +18 -0
- package/dist/types/src/components/GrPromptDialog/GrPromptDialog.vue.d.ts +4 -4
- package/dist/types/src/components/GrRadio/GrRadio.vue.d.ts +5 -5
- package/dist/types/src/components/GrRadio/defaults.d.ts +14 -0
- package/dist/types/src/components/GrRadio/grRadioStyles.d.ts +3 -3
- package/dist/types/src/components/GrRadio/index.d.ts +1 -0
- package/dist/types/src/components/GrRadioGroup/GrRadioGroup.vue.d.ts +4 -4
- package/dist/types/src/components/GrRadioGroup/defaults.d.ts +14 -0
- package/dist/types/src/components/GrRadioGroup/index.d.ts +1 -0
- package/dist/types/src/components/GrRating/GrRating.vue.d.ts +124 -0
- package/dist/types/src/components/GrRating/config.d.ts +1 -0
- package/dist/types/src/components/GrRating/defaults.d.ts +14 -0
- package/dist/types/src/components/GrRating/grRatingStyles.d.ts +21 -0
- package/dist/types/src/components/GrRating/index.d.ts +6 -0
- package/dist/types/src/components/GrRating/safelist.d.ts +1 -0
- package/dist/types/src/components/GrResponseErrorBanner/GrUploadErrorBanner.vue.d.ts +1 -1
- package/dist/types/src/components/GrSegmented/GrSegmented.vue.d.ts +7 -7
- package/dist/types/src/components/GrSegmented/defaults.d.ts +15 -0
- package/dist/types/src/components/GrSegmented/grSegmentedStyles.d.ts +1 -1
- package/dist/types/src/components/GrSegmented/index.d.ts +1 -0
- package/dist/types/src/components/GrSelect/GrSelect.vue.d.ts +57 -17
- package/dist/types/src/components/GrSelect/defaults.d.ts +17 -0
- package/dist/types/src/components/GrSelect/grSelectStyles.d.ts +3 -3
- package/dist/types/src/components/GrSelect/index.d.ts +1 -0
- package/dist/types/src/components/GrSidebar/GrSidebarItem.vue.d.ts +2 -2
- package/dist/types/src/components/GrSkeleton/GrSkeleton.vue.d.ts +1 -1
- package/dist/types/src/components/GrSlider/GrSlider.vue.d.ts +88 -0
- package/dist/types/src/components/GrSlider/config.d.ts +1 -0
- package/dist/types/src/components/GrSlider/defaults.d.ts +14 -0
- package/dist/types/src/components/GrSlider/grSliderStyles.d.ts +36 -0
- package/dist/types/src/components/GrSlider/index.d.ts +6 -0
- package/dist/types/src/components/GrSlider/safelist.d.ts +1 -0
- package/dist/types/src/components/GrStatistic/GrStatistic.vue.d.ts +116 -0
- package/dist/types/src/components/GrStatistic/config.d.ts +1 -0
- package/dist/types/src/components/GrStatistic/formatStatisticValue.d.ts +16 -0
- package/dist/types/src/components/GrStatistic/grStatisticStyles.d.ts +24 -0
- package/dist/types/src/components/GrStatistic/index.d.ts +6 -0
- package/dist/types/src/components/GrStatistic/safelist.d.ts +1 -0
- package/dist/types/src/components/GrSwitch/GrSwitch.vue.d.ts +4 -4
- package/dist/types/src/components/GrSwitch/defaults.d.ts +14 -0
- package/dist/types/src/components/GrSwitch/grSwitchStyles.d.ts +2 -2
- package/dist/types/src/components/GrSwitch/index.d.ts +1 -0
- package/dist/types/src/components/GrTabPanels/GrTabPanel.vue.d.ts +46 -0
- package/dist/types/src/components/GrTabPanels/GrTabPanels.vue.d.ts +51 -0
- package/dist/types/src/components/GrTabPanels/config.d.ts +5 -0
- package/dist/types/src/components/GrTabPanels/context.d.ts +9 -0
- package/dist/types/src/components/GrTabPanels/index.d.ts +6 -0
- package/dist/types/src/components/GrTable/GrTable.vue.d.ts +16 -0
- package/dist/types/src/components/GrTabs/GrTabs.vue.d.ts +6 -0
- package/dist/types/src/components/GrTextarea/GrTextarea.vue.d.ts +5 -5
- package/dist/types/src/components/GrToaster/GrToaster.vue.d.ts +19 -2
- package/dist/types/src/components/GrToaster/index.d.ts +1 -1
- package/dist/types/src/components/GrTooltip/GrTooltip.vue.d.ts +1 -1
- package/dist/types/src/components/GrTree/grTreeInteractionContext.d.ts +2 -0
- package/dist/types/src/components/GrTreeSelect/GrTreeSelect.vue.d.ts +1 -1
- package/dist/types/src/components/GrTreeSelect/grTreeSelectStyles.d.ts +1 -1
- package/dist/types/src/composables/internal/useScrollLock.d.ts +24 -0
- package/dist/types/src/composables/useToast.d.ts +24 -0
- package/dist/types/src/granular-provider/shared.d.ts +10 -0
- package/dist/types/src/i18n/messages/en.d.ts +84 -0
- package/dist/types/src/i18n/messages/es.d.ts +84 -0
- package/dist/types/src/i18n/messages/ru.d.ts +84 -0
- package/dist/types/src/index.d.ts +10 -0
- package/dist/web-types.json +1642 -356
- package/package.json +41 -1
- package/dist/chunks/config-1uSYl98Y.js.map +0 -1
- package/dist/chunks/config-8Pcutu1j2.js.map +0 -1
- package/dist/chunks/config-B7IIWGt_2.js.map +0 -1
- package/dist/chunks/config-BIRO0vDJ2.js.map +0 -1
- package/dist/chunks/config-BLHqZhy-2.js.map +0 -1
- package/dist/chunks/config-BOlr7qw7.js.map +0 -1
- package/dist/chunks/config-BUHuGBik.js.map +0 -1
- package/dist/chunks/config-BX1JTrkV2.js.map +0 -1
- package/dist/chunks/config-C7NpDrfO.js.map +0 -1
- package/dist/chunks/config-ClhKPJvg.js.map +0 -1
- package/dist/chunks/config-Cpi9Mh2J.js.map +0 -1
- package/dist/chunks/config-CrG1XiE7.js.map +0 -1
- package/dist/chunks/config-DUcu1D68.js.map +0 -1
- package/dist/chunks/config-D_R56_gT.js.map +0 -1
- package/dist/chunks/config-DezDih8_.js.map +0 -1
- package/dist/chunks/config-DnvPqu4g.js.map +0 -1
- package/dist/chunks/config-DpqOnJiz2.js.map +0 -1
- package/dist/chunks/config-LGrZIdaZ2.js.map +0 -1
- package/dist/chunks/config-QaIc_gRa.js.map +0 -1
- package/dist/chunks/config-U4m9PSql.js.map +0 -1
- package/dist/chunks/config-eYLZYOUS2.js.map +0 -1
- package/dist/chunks/config-ipvU0lzP2.js.map +0 -1
- package/dist/chunks/config-xR4XVmcy.js.map +0 -1
- package/dist/chunks/en-BdtiS2d3.js.map +0 -1
- package/dist/chunks/es-BGRMZbe9.js.map +0 -1
- package/dist/chunks/grBadgeStyles-DrycBuKT.js.map +0 -1
- package/dist/chunks/grButtonStyles-C7Yga_Q1.js.map +0 -1
- package/dist/chunks/grModalStyles-DWd3i05Q.js.map +0 -1
- package/dist/chunks/grSelectStyles-CLK5hRd3.js.map +0 -1
- package/dist/chunks/grStyle-Blc9otAx.js.map +0 -1
- package/dist/chunks/ru-BFCnOiML.js.map +0 -1
- package/dist/chunks/shared-ChvcQgDl.js +0 -168
- package/dist/chunks/shared-ChvcQgDl.js.map +0 -1
- package/dist/chunks/transition-TLFw4KBn.js.map +0 -1
- package/dist/components/GrAlert/chunks/GrAlert-DPJSU_fG.js +0 -163
- package/dist/components/GrAlert/chunks/GrAlert-DPJSU_fG.js.map +0 -1
- package/dist/components/GrAvatar/chunks/GrAvatar-96CpTCq5.js.map +0 -1
- package/dist/components/GrBadge/chunks/GrBadge-B77XlaqE.js.map +0 -1
- package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-CcktMOdg.js.map +0 -1
- package/dist/components/GrBottomNav/chunks/GrBottomNav-usuMgG8_.js.map +0 -1
- package/dist/components/GrButton/chunks/GrButton-BlffdeJr.js.map +0 -1
- package/dist/components/GrCard/chunks/GrCard-DUNMkuHW.js.map +0 -1
- package/dist/components/GrCheckbox/chunks/GrCheckbox-DJhzZZdO.js.map +0 -1
- package/dist/components/GrCollapse/chunks/GrCollapse-CPPLh_xU.js.map +0 -1
- package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-BWYKCsHd.js.map +0 -1
- package/dist/components/GrDataTable/chunks/GrDataTable-ptbARmJ3.js +0 -179
- package/dist/components/GrDataTable/chunks/GrDataTable-ptbARmJ3.js.map +0 -1
- package/dist/components/GrDialog/chunks/GrDialog-5DAS-1Lb.js.map +0 -1
- package/dist/components/GrDialogService/chunks/GrDialogService-DY_fmaMu.js.map +0 -1
- package/dist/components/GrDrawer/chunks/GrDrawer-D1kzsjXN.js.map +0 -1
- package/dist/components/GrDropdown/chunks/GrDropdown-BXb5Cxxf.js.map +0 -1
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-DFEJLPcV.js.map +0 -1
- package/dist/components/GrEmptyState/chunks/GrEmptyState-CA3BiTV7.js.map +0 -1
- package/dist/components/GrFileUpload/chunks/GrFileUpload-DvWPpiJS.js.map +0 -1
- package/dist/components/GrFormField/chunks/GrFormField-BujNQrw8.js +0 -35
- package/dist/components/GrFormField/chunks/GrFormField-BujNQrw8.js.map +0 -1
- package/dist/components/GrFormFile/chunks/GrFormFile-CXcqqdvV.js.map +0 -1
- package/dist/components/GrFormSection/chunks/GrFormSection-Ce21jcgo.js.map +0 -1
- package/dist/components/GrImageViewer/chunks/GrImageViewer-OCUIrNh2.js.map +0 -1
- package/dist/components/GrInput/chunks/GrInput-C8pOJgCi.js +0 -188
- package/dist/components/GrInput/chunks/GrInput-C8pOJgCi.js.map +0 -1
- package/dist/components/GrInputTag/chunks/GrInputTag-zMgFqp2g.js.map +0 -1
- package/dist/components/GrList/chunks/GrList-Dx772Ns4.js.map +0 -1
- package/dist/components/GrLoading/chunks/GrLoading--X_7rdbb.js.map +0 -1
- package/dist/components/GrModal/chunks/GrModal-BkjW9jZS.js.map +0 -1
- package/dist/components/GrNavbar/chunks/GrNavbar-DW3MiIIf.js.map +0 -1
- package/dist/components/GrNumberInput/chunks/GrNumberInput-CldPIWQx.js.map +0 -1
- package/dist/components/GrPagination/chunks/GrPagination-Bu9wv6it.js.map +0 -1
- package/dist/components/GrProgressBar/chunks/GrProgressBar-CC3z-Zqp.js.map +0 -1
- package/dist/components/GrPromptDialog/chunks/GrPromptDialog-TmWXbpEP.js.map +0 -1
- package/dist/components/GrRadio/chunks/GrRadio-CPTixXaY.js.map +0 -1
- package/dist/components/GrRadioGroup/chunks/GrRadioGroup-vKZCbkCp.js.map +0 -1
- package/dist/components/GrSegmented/chunks/GrSegmented-C1y0UXpQ.js.map +0 -1
- package/dist/components/GrSelect/chunks/GrSelect-RShK21lK.js.map +0 -1
- package/dist/components/GrSidebar/chunks/GrSidebar-DkWozzwA.js.map +0 -1
- package/dist/components/GrSkeleton/chunks/GrSkeleton-DsN-_CDZ.js.map +0 -1
- package/dist/components/GrSwitch/chunks/GrSwitch-DAioyccZ.js.map +0 -1
- package/dist/components/GrTable/chunks/GrTable-Db3hRnKA.js.map +0 -1
- package/dist/components/GrTabs/chunks/GrTabs-Z-FDJUr_.js.map +0 -1
- package/dist/components/GrTextarea/chunks/GrTextarea-D56YxhKq.js.map +0 -1
- package/dist/components/GrToaster/chunks/GrToaster-eI8YvnIo.js.map +0 -1
- package/dist/components/GrTooltip/chunks/GrTooltip-BeyZ8ssR.js.map +0 -1
- package/dist/components/GrTree/chunks/GrTree-D3ODe2dB.js.map +0 -1
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-B2xBKs5Q.js.map +0 -1
- package/dist/chunks/{config-8Pcutu1j2.js → config-8Pcutu1j.js} +0 -0
- package/dist/chunks/{config-BLHqZhy-2.js → config-BLHqZhy-.js} +0 -0
- package/dist/chunks/{config-BUHuGBik.js → config-BUHuGBik2.js} +0 -0
- package/dist/chunks/{config-BX1JTrkV2.js → config-BX1JTrkV.js} +0 -0
- package/dist/chunks/{config-DpqOnJiz2.js → config-DpqOnJiz.js} +0 -0
- package/dist/chunks/{config-Cpi9Mh2J.js → config-Dqy0rPPO2.js} +1 -1
- /package/dist/chunks/{config-LGrZIdaZ2.js → config-LGrZIdaZ.js} +0 -0
- /package/dist/chunks/{config-QaIc_gRa.js → config-QaIc_gRa2.js} +0 -0
- /package/dist/chunks/{config-U4m9PSql.js → config-U4m9PSql2.js} +0 -0
- /package/dist/chunks/{config-ipvU0lzP2.js → config-ipvU0lzP.js} +0 -0
- /package/dist/chunks/{config-xR4XVmcy.js → config-xR4XVmcy2.js} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { type ComputedRef, type InjectionKey } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Контекст `GrConfigProvider` — глобальные дефолты для вложенных GR-компонентов:
|
|
4
|
+
* размер контролов и per-component дефолтные пропсы.
|
|
5
|
+
*
|
|
6
|
+
* Компоненты читают его через {@link useGrConfig} (или хелперы ниже) и используют
|
|
7
|
+
* как fallback, когда соответствующий проп не задан на самом компоненте. Провайдер
|
|
8
|
+
* можно вкладывать — дочерний мержится поверх родительского.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Размеры, которыми оперирует провайдер. Это «размеры контролов» — общий
|
|
12
|
+
* знаменатель формных компонентов, а не объединение всех size-шкал пакета
|
|
13
|
+
* (у оверлеев есть свои `xl`/`full`, у слайдера нет `xs`).
|
|
14
|
+
*/
|
|
15
|
+
export declare const GR_COMPONENT_SIZES: readonly ["xs", "sm", "md", "lg"];
|
|
16
|
+
export type GrComponentSize = typeof GR_COMPONENT_SIZES[number];
|
|
17
|
+
/**
|
|
18
|
+
* Открытый реестр компонентов, у которых есть настраиваемые через конфиг пропы.
|
|
19
|
+
*
|
|
20
|
+
* Пустой по умолчанию: каждый компонент дополняет его **из своей папки** через
|
|
21
|
+
* declaration merging (`GrButton/defaults.ts` и т. п.). Так провайдер не знает
|
|
22
|
+
* ни имён, ни типов конкретных компонентов — контракт объявляет тот, кто им
|
|
23
|
+
* владеет, а не общий модуль.
|
|
24
|
+
*
|
|
25
|
+
* Практическое следствие: реестр состоит ровно из тех компонентов, которые
|
|
26
|
+
* попали в граф типов потребителя. Импортировали только `GrButton` — в
|
|
27
|
+
* `componentDefaults` типизирована только кнопка, типы `GrBadge` в проект не
|
|
28
|
+
* приезжают.
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* // GrButton/defaults.ts
|
|
32
|
+
* declare module '../GrConfigProvider/context' {
|
|
33
|
+
* interface GrComponentDefaultsRegistry {
|
|
34
|
+
* GrButton: GrButtonConfigurableProps
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export interface GrComponentDefaultsRegistry {
|
|
40
|
+
}
|
|
41
|
+
/** Имя компонента, у которого есть настраиваемые через конфиг пропы. */
|
|
42
|
+
export type GrConfigurableComponent = keyof GrComponentDefaultsRegistry;
|
|
43
|
+
/**
|
|
44
|
+
* Дефолтные пропсы по имени компонента: `{ GrButton: { variant: 'secondary' } }`.
|
|
45
|
+
*
|
|
46
|
+
* Набор ключей закрыт реестром, а не `Record<string, unknown>`: через конфиг
|
|
47
|
+
* должны настраиваться только «оформительские» пропы. Пустить туда что угодно —
|
|
48
|
+
* значит разрешить задать глобальный `modelValue` или обработчик и получить баг,
|
|
49
|
+
* который ищется часами.
|
|
50
|
+
*/
|
|
51
|
+
export type GrComponentDefaults = {
|
|
52
|
+
[TComponent in GrConfigurableComponent]?: Partial<GrComponentDefaultsRegistry[TComponent]>;
|
|
53
|
+
};
|
|
54
|
+
type GrDefaultsOf<TComponent extends GrConfigurableComponent> = Partial<GrComponentDefaultsRegistry[TComponent]>;
|
|
55
|
+
export interface GrConfigContext {
|
|
56
|
+
/** Дефолтный размер контролов (если проп `size` не задан на компоненте). */
|
|
57
|
+
size: ComputedRef<GrComponentSize | undefined>;
|
|
58
|
+
/** Дефолтные пропсы по компонентам. */
|
|
59
|
+
componentDefaults: ComputedRef<GrComponentDefaults>;
|
|
60
|
+
}
|
|
61
|
+
export declare const GR_CONFIG_KEY: InjectionKey<GrConfigContext>;
|
|
62
|
+
/** Возвращает ближайший `GrConfigProvider` или пустой конфиг, если провайдера нет. */
|
|
63
|
+
export declare function useGrConfig(): GrConfigContext;
|
|
64
|
+
/**
|
|
65
|
+
* Источник конфига для {@link resolveGrConfig}: сам контекст, `AppContext` или
|
|
66
|
+
* инстанс компонента — у двух последних читается `provides`.
|
|
67
|
+
*/
|
|
68
|
+
export type GrConfigSource = GrConfigContext | {
|
|
69
|
+
provides?: Record<symbol | string, unknown>;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Конфиг там, где `inject` недоступен — вне `setup`: в директивах, императивных
|
|
73
|
+
* сервисах, утилитах. Порядок: явный контекст → `provides` источника → `inject`
|
|
74
|
+
* (если есть активный инстанс) → пустой конфиг.
|
|
75
|
+
*
|
|
76
|
+
* Важно понимать границу: `provides` у `AppContext` содержит только то, что
|
|
77
|
+
* роздано через `app.provide()`. Значения от `<GrConfigProvider>` живут в дереве
|
|
78
|
+
* компонентов, и достать их можно лишь оттуда, где это дерево ещё есть — то есть
|
|
79
|
+
* захватом в `setup`. Просто передать `appContext` в отрыве от дерева
|
|
80
|
+
* недостаточно; см. `SPEC-GrConfig-resolver.md`.
|
|
81
|
+
*/
|
|
82
|
+
export declare function resolveGrConfig(source?: GrConfigSource | null): GrConfigContext;
|
|
83
|
+
export type UseGrComponentSizeOptions<TSize extends string> = {
|
|
84
|
+
/**
|
|
85
|
+
* Имя компонента, чтобы учесть точечный `componentDefaults[Component].size`.
|
|
86
|
+
* Без него читается только глобальный `size` провайдера.
|
|
87
|
+
*/
|
|
88
|
+
component?: GrConfigurableComponent;
|
|
89
|
+
/** Размер, когда ни проп, ни конфиг ничего не дали. По умолчанию `md`. */
|
|
90
|
+
fallback?: TSize;
|
|
91
|
+
/**
|
|
92
|
+
* Размеры, которые компонент реально умеет. Значение из конфига вне этого
|
|
93
|
+
* списка игнорируется в пользу `fallback`.
|
|
94
|
+
*
|
|
95
|
+
* Обязателен для компонентов, у которых size-шкала уже общей (`GrSlider`,
|
|
96
|
+
* `GrRating`, `GrSwitch`, `GrLink`, `GrStatistic` не знают про `xs`): без него
|
|
97
|
+
* `<GrConfigProvider size="xs">` дал бы `sizeMap['xs'] === undefined`, то есть
|
|
98
|
+
* компонент без размерных классов — молча, без ошибки сборки.
|
|
99
|
+
*/
|
|
100
|
+
supported?: readonly TSize[];
|
|
101
|
+
};
|
|
102
|
+
/** Сброс дедупликации предупреждений. Внутреннее API — нужно тестам. */
|
|
103
|
+
export declare function resetUnsupportedSizeWarnings(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Эффективный размер компонента. Приоритет:
|
|
106
|
+
* локальный проп → `componentDefaults[Component].size` → глобальный `size`
|
|
107
|
+
* провайдера → `fallback`. Точечная настройка компонента должна побеждать
|
|
108
|
+
* общую — иначе `componentDefaults` нельзя было бы использовать как исключение
|
|
109
|
+
* из глобального правила.
|
|
110
|
+
*
|
|
111
|
+
* Передавайте `size` геттером, чтобы сохранить реактивность.
|
|
112
|
+
*
|
|
113
|
+
* Локальный проп не проверяется по `supported`: он уже сужен типом пропа самого
|
|
114
|
+
* компонента, и передать туда лишнее — явная ошибка вызывающего кода. Проверка
|
|
115
|
+
* нужна конфигу: это глобальный канал, который не знает, кто его читает.
|
|
116
|
+
*/
|
|
117
|
+
export declare function useGrComponentSize<TSize extends string = GrComponentSize>(localSize: () => TSize | undefined, options?: UseGrComponentSizeOptions<TSize>): ComputedRef<TSize>;
|
|
118
|
+
/** Дефолтные пропсы конкретного компонента из ближайшего провайдера. */
|
|
119
|
+
export declare function useGrComponentDefaults<TComponent extends GrConfigurableComponent>(name: TComponent): ComputedRef<GrDefaultsOf<TComponent>>;
|
|
120
|
+
/**
|
|
121
|
+
* Эффективное значение «оформительского» пропа: локальный проп →
|
|
122
|
+
* `componentDefaults[Component][prop]` → собственный дефолт компонента.
|
|
123
|
+
*
|
|
124
|
+
* Обязательное условие на стороне компонента: у такого пропа в `withDefaults`
|
|
125
|
+
* должен стоять `undefined`, а «настоящий» дефолт — переехать сюда, в `fallback`.
|
|
126
|
+
* Иначе конфиг не сработает никогда: Vue отдаёт `props.x` уже с подставленным
|
|
127
|
+
* дефолтом, и отличить «пользователь передал значение» от «сработал дефолт»
|
|
128
|
+
* изнутри компонента невозможно.
|
|
129
|
+
*/
|
|
130
|
+
export declare function useGrComponentProp<TComponent extends GrConfigurableComponent, TProp extends keyof GrDefaultsOf<TComponent>>(component: TComponent, prop: TProp, localValue: () => GrDefaultsOf<TComponent>[TProp], fallback: NonNullable<GrDefaultsOf<TComponent>[TProp]>): ComputedRef<NonNullable<GrDefaultsOf<TComponent>[TProp]>>;
|
|
131
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default } from './GrConfigProvider.vue';
|
|
2
|
+
export { default as GrConfigProvider } from './GrConfigProvider.vue';
|
|
3
|
+
export type { GrComponentDefaults, GrComponentSize } from './GrConfigProvider.vue';
|
|
4
|
+
export { GR_COMPONENT_SIZES, GR_CONFIG_KEY, type GrComponentDefaultsRegistry, type GrConfigContext, type GrConfigSource, type GrConfigurableComponent, resolveGrConfig, useGrComponentDefaults, useGrComponentProp, useGrComponentSize, type UseGrComponentSizeOptions, useGrConfig, } from './context';
|
|
5
|
+
export { grConfigProviderConfig } from './config';
|
|
@@ -94,12 +94,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
94
94
|
confirmDisabled: boolean;
|
|
95
95
|
closeOnConfirm: boolean;
|
|
96
96
|
}>>> & Readonly<{
|
|
97
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
98
97
|
onCancel?: (() => any) | undefined;
|
|
98
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
99
99
|
onConfirm?: (() => any) | undefined;
|
|
100
100
|
}>, {
|
|
101
|
-
title: string;
|
|
102
101
|
size: GrDialogSize;
|
|
102
|
+
title: string;
|
|
103
103
|
error: ResponseErrorInfo | null;
|
|
104
104
|
closeOnBackdrop: boolean;
|
|
105
105
|
closeOnEsc: boolean;
|
|
@@ -11,18 +11,54 @@ export interface GrDataTableProps<TRow extends Record<string, unknown> = Record<
|
|
|
11
11
|
columns: GrDataColumn[];
|
|
12
12
|
/** Ключ строки или функция-резолвер. По умолчанию — поле `'id'`. */
|
|
13
13
|
rowKey?: GrDataTableRowKey<TRow>;
|
|
14
|
-
/** Ключ колонки для начальной
|
|
14
|
+
/** Ключ колонки для начальной сортировки (uncontrolled-режим). */
|
|
15
15
|
initialSortKey?: string;
|
|
16
|
-
/** Направление начальной
|
|
16
|
+
/** Направление начальной сортировки (uncontrolled-режим). */
|
|
17
17
|
initialSortDir?: 'asc' | 'desc';
|
|
18
|
+
/** Контролируемый ключ сортировки: `v-model:sortKey`. Задаёт controlled-режим. */
|
|
19
|
+
sortKey?: string;
|
|
20
|
+
/** Контролируемое направление сортировки: `v-model:sortDir`. */
|
|
21
|
+
sortDir?: 'asc' | 'desc';
|
|
22
|
+
/**
|
|
23
|
+
* Внешняя сортировка (например серверная): компонент НЕ сортирует `rows`
|
|
24
|
+
* сам, а только сообщает о смене через `update:sortKey`/`update:sortDir`/
|
|
25
|
+
* `sort-change`. `rows` при этом должны приходить уже отсортированными.
|
|
26
|
+
*/
|
|
27
|
+
externalSort?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Выбор строк: добавляет ведущую колонку с чекбоксами (+ «выбрать все» в шапке).
|
|
30
|
+
* Выбранные ключи строк — через `v-model:selected`.
|
|
31
|
+
*/
|
|
32
|
+
selectable?: boolean;
|
|
33
|
+
/** Контролируемый список выбранных ключей строк: `v-model:selected`. */
|
|
34
|
+
selected?: Array<string | number>;
|
|
35
|
+
/**
|
|
36
|
+
* Состояние загрузки: тело таблицы заменяется строкой-индикатором.
|
|
37
|
+
* `empty`-состояние при этом не показывается.
|
|
38
|
+
*/
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
/** Текст индикатора загрузки. i18n: fallback `gr.dataTable.loading`. */
|
|
41
|
+
loadingText?: string;
|
|
18
42
|
density?: GrTableDensity;
|
|
19
43
|
caption?: string;
|
|
20
44
|
ariaLabel?: string;
|
|
21
45
|
ariaLabelledby?: string;
|
|
22
46
|
regionLabel?: string;
|
|
47
|
+
/** Прилипающий заголовок при вертикальном скролле (нужен `maxHeight`). */
|
|
48
|
+
stickyHeader?: boolean;
|
|
49
|
+
/** Максимальная высота таблицы (вертикальный скролл). Число — в пикселях. */
|
|
50
|
+
maxHeight?: string | number;
|
|
23
51
|
}
|
|
24
52
|
declare const __VLS_export: <TRow extends Record<string, unknown> = Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
25
|
-
props: import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & __VLS_PrettifyLocal<GrDataTableProps<TRow
|
|
53
|
+
props: import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & __VLS_PrettifyLocal<GrDataTableProps<TRow> & {
|
|
54
|
+
"onUpdate:sortKey"?: ((value: string) => any) | undefined;
|
|
55
|
+
"onUpdate:sortDir"?: ((value: "desc" | "asc") => any) | undefined;
|
|
56
|
+
"onSort-change"?: ((value: {
|
|
57
|
+
key: string;
|
|
58
|
+
dir: "asc" | "desc";
|
|
59
|
+
}) => any) | undefined;
|
|
60
|
+
"onUpdate:selected"?: ((value: (string | number)[]) => any) | undefined;
|
|
61
|
+
}> & (typeof globalThis extends {
|
|
26
62
|
__VLS_PROPS_FALLBACK: infer P;
|
|
27
63
|
} ? P : {});
|
|
28
64
|
expose: (exposed: {}) => void;
|
|
@@ -38,7 +74,15 @@ declare const __VLS_export: <TRow extends Record<string, unknown> = Record<strin
|
|
|
38
74
|
} & {
|
|
39
75
|
foot?: (props: {}) => any;
|
|
40
76
|
};
|
|
41
|
-
emit: {
|
|
77
|
+
emit: {
|
|
78
|
+
(e: "update:sortKey", value: string): void;
|
|
79
|
+
(e: "update:sortDir", value: "asc" | "desc"): void;
|
|
80
|
+
(e: "sort-change", value: {
|
|
81
|
+
key: string;
|
|
82
|
+
dir: "asc" | "desc";
|
|
83
|
+
}): void;
|
|
84
|
+
(e: "update:selected", value: Array<string | number>): void;
|
|
85
|
+
};
|
|
42
86
|
}>) => import("vue").VNode & {
|
|
43
87
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
44
88
|
};
|
|
@@ -47,8 +47,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
47
47
|
}>>> & Readonly<{
|
|
48
48
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
49
49
|
}>, {
|
|
50
|
-
title: string;
|
|
51
50
|
size: GrDialogSize;
|
|
51
|
+
title: string;
|
|
52
52
|
closeOnBackdrop: boolean;
|
|
53
53
|
closeOnEsc: boolean;
|
|
54
54
|
showCloseButton: boolean;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { Raw } from 'vue';
|
|
2
|
+
import type { GrConfigContext } from '../GrConfigProvider/context';
|
|
3
|
+
import type { GranularityI18nLike } from '../../internal/granularityI18n';
|
|
1
4
|
import type { DialogBaseOptions, DialogKind, DialogOnConfirm, DialogResult } from './types';
|
|
2
5
|
/**
|
|
3
6
|
* Внутреннее описание одного запроса диалога в очереди. Создаётся методами
|
|
@@ -12,6 +15,21 @@ export interface DialogRequest {
|
|
|
12
15
|
onConfirm?: DialogOnConfirm<any>;
|
|
13
16
|
/** Резолвит промис вызова детальным результатом `{ action, value }`. */
|
|
14
17
|
resolve: (result: DialogResult<any>) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Конфиг и i18n, захваченные в месте вызова сервиса (в `setup`, где вызывающий
|
|
20
|
+
* компонент ещё находится внутри дерева провайдера). Хост монтируется в
|
|
21
|
+
* `document.body` вне дерева, поэтому сам их не увидит — см.
|
|
22
|
+
* `SPEC-GrConfig-resolver.md`.
|
|
23
|
+
*
|
|
24
|
+
* Лежат в запросе, а не в модульной переменной: два поддерева с разными
|
|
25
|
+
* провайдерами должны получать каждое свой конфиг.
|
|
26
|
+
*
|
|
27
|
+
* `Raw<…>` обязателен: очередь — `reactive`, а он разворачивает вложенные рефы.
|
|
28
|
+
* Без `markRaw` контекст превратился бы в объект значений, `size.value` стало
|
|
29
|
+
* бы `undefined`, и мост молча перестал бы работать.
|
|
30
|
+
*/
|
|
31
|
+
config?: Raw<GrConfigContext> | null;
|
|
32
|
+
i18n?: Raw<GranularityI18nLike> | null;
|
|
15
33
|
}
|
|
16
34
|
/**
|
|
17
35
|
* Модульный синглтон очереди диалогов: единый источник правды для всех
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GrDivider — разделитель контента.
|
|
3
|
+
*
|
|
4
|
+
* - `orientation="horizontal"` (по умолчанию) — линия на всю ширину; с `label`
|
|
5
|
+
* или default-слотом рисует текст по центру/краю между отрезками линии.
|
|
6
|
+
* - `orientation="vertical"` — тонкая вертикальная линия (для inline-разделения,
|
|
7
|
+
* например в тулбарах).
|
|
8
|
+
*/
|
|
9
|
+
export type GrDividerOrientation = 'horizontal' | 'vertical';
|
|
10
|
+
export type GrDividerAlign = 'start' | 'center' | 'end';
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
orientation?: GrDividerOrientation;
|
|
13
|
+
label?: string;
|
|
14
|
+
align?: GrDividerAlign;
|
|
15
|
+
};
|
|
16
|
+
declare var __VLS_1: {};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
default?: (props: typeof __VLS_1) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
21
|
+
orientation: string;
|
|
22
|
+
label: undefined;
|
|
23
|
+
align: string;
|
|
24
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
25
|
+
orientation: string;
|
|
26
|
+
label: undefined;
|
|
27
|
+
align: string;
|
|
28
|
+
}>>> & Readonly<{}>, {
|
|
29
|
+
label: string;
|
|
30
|
+
align: GrDividerAlign;
|
|
31
|
+
orientation: GrDividerOrientation;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
33
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_TypePropsToOption<T> = {
|
|
37
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
38
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
39
|
+
} : {
|
|
40
|
+
type: import('vue').PropType<T[K]>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type __VLS_WithDefaults<P, D> = {
|
|
45
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
46
|
+
default: D[K];
|
|
47
|
+
}> : P[K];
|
|
48
|
+
};
|
|
49
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
55
|
+
[K in keyof T]: T[K];
|
|
56
|
+
} : {
|
|
57
|
+
[K in keyof T as K]: T[K];
|
|
58
|
+
}) & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const grDividerConfig: import("@feugene/unocss-preset-granular").GranularComponentDescriptor<"GrDivider">;
|
|
@@ -15,13 +15,13 @@ export interface GrDrawerProps {
|
|
|
15
15
|
/** i18n-friendly aria-label для кнопки закрытия. */
|
|
16
16
|
closeLabel?: string;
|
|
17
17
|
}
|
|
18
|
-
declare var
|
|
18
|
+
declare var __VLS_46: {}, __VLS_67: {}, __VLS_69: {};
|
|
19
19
|
type __VLS_Slots = {} & {
|
|
20
|
-
title?: (props: typeof
|
|
20
|
+
title?: (props: typeof __VLS_46) => any;
|
|
21
21
|
} & {
|
|
22
|
-
default?: (props: typeof
|
|
22
|
+
default?: (props: typeof __VLS_67) => any;
|
|
23
23
|
} & {
|
|
24
|
-
footer?: (props: typeof
|
|
24
|
+
footer?: (props: typeof __VLS_69) => any;
|
|
25
25
|
};
|
|
26
26
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GrDrawerProps>, {
|
|
27
27
|
title: undefined;
|
|
@@ -42,8 +42,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
42
42
|
}>>> & Readonly<{
|
|
43
43
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
44
44
|
}>, {
|
|
45
|
-
title: string;
|
|
46
45
|
size: GrDrawerSize;
|
|
46
|
+
title: string;
|
|
47
47
|
closeOnBackdrop: boolean;
|
|
48
48
|
closeOnEsc: boolean;
|
|
49
49
|
closeLabel: string;
|
|
@@ -11,12 +11,19 @@ export interface GrDropdownProps {
|
|
|
11
11
|
/** Куда телепортировать панель (`body` по умолчанию). */
|
|
12
12
|
teleportTo?: string | HTMLElement;
|
|
13
13
|
}
|
|
14
|
+
declare function onTriggerKeydown(event: KeyboardEvent): void;
|
|
14
15
|
declare function toggle(): void;
|
|
15
16
|
declare function close(): void;
|
|
16
17
|
declare var __VLS_1: {
|
|
17
18
|
open: boolean;
|
|
18
19
|
toggle: typeof toggle;
|
|
19
20
|
close: typeof close;
|
|
21
|
+
triggerProps: {
|
|
22
|
+
'aria-haspopup': "menu";
|
|
23
|
+
'aria-expanded': boolean;
|
|
24
|
+
'aria-controls': string | undefined;
|
|
25
|
+
onKeydown: typeof onTriggerKeydown;
|
|
26
|
+
};
|
|
20
27
|
}, __VLS_15: {
|
|
21
28
|
close: typeof close;
|
|
22
29
|
};
|
|
@@ -38,8 +45,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
38
45
|
contentClass: string;
|
|
39
46
|
teleportTo: string;
|
|
40
47
|
}>>> & Readonly<{}>, {
|
|
41
|
-
width: GrDropdownWidth;
|
|
42
48
|
align: GrDropdownAlign;
|
|
49
|
+
width: GrDropdownWidth;
|
|
43
50
|
closeOnContentClick: boolean;
|
|
44
51
|
contentClass: string;
|
|
45
52
|
teleportTo: string | HTMLElement;
|
|
@@ -22,6 +22,12 @@ declare var __VLS_9: {
|
|
|
22
22
|
open: boolean;
|
|
23
23
|
toggle: () => void;
|
|
24
24
|
close: () => void;
|
|
25
|
+
triggerProps: {
|
|
26
|
+
'aria-haspopup': "menu";
|
|
27
|
+
'aria-expanded': boolean;
|
|
28
|
+
'aria-controls': string | undefined;
|
|
29
|
+
onKeydown: (event: KeyboardEvent) => void;
|
|
30
|
+
};
|
|
25
31
|
}, __VLS_18: {
|
|
26
32
|
close: () => void;
|
|
27
33
|
};
|
|
@@ -49,8 +55,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
49
55
|
borderBottom: boolean;
|
|
50
56
|
listClass: string;
|
|
51
57
|
}>>> & Readonly<{}>, {
|
|
52
|
-
width: GrDropdownMenuWidth;
|
|
53
58
|
align: GrDropdownMenuAlign;
|
|
59
|
+
width: GrDropdownMenuWidth;
|
|
54
60
|
borderBottom: boolean;
|
|
55
61
|
borderTop: boolean;
|
|
56
62
|
closeOnContentClick: boolean;
|
|
@@ -23,9 +23,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
23
23
|
variant: string;
|
|
24
24
|
}>>> & Readonly<{}>, {
|
|
25
25
|
variant: GrDropdownMenuItemVariant;
|
|
26
|
+
align: GrDropdownMenuItemAlign;
|
|
26
27
|
disabled: boolean;
|
|
27
28
|
as: string | Component;
|
|
28
|
-
align: GrDropdownMenuItemAlign;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
30
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -155,11 +155,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
155
155
|
onError?: ((error: unknown) => any) | undefined;
|
|
156
156
|
onStateChange?: ((state: GrUploadState) => any) | undefined;
|
|
157
157
|
}>, {
|
|
158
|
-
disabled: boolean;
|
|
159
158
|
name: string;
|
|
160
|
-
headers: Record<string, string>;
|
|
161
|
-
placeholder: string;
|
|
162
159
|
multiple: boolean;
|
|
160
|
+
disabled: boolean;
|
|
161
|
+
placeholder: string;
|
|
162
|
+
headers: Record<string, string>;
|
|
163
163
|
withCredentials: boolean;
|
|
164
164
|
action: string;
|
|
165
165
|
request: GrFileUploadRequest;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type GrFormRules, type GrFormTrigger } from './validation';
|
|
2
|
+
export type { GrFormRule, GrFormRules, GrFormTrigger, GrFormValidatorResult, } from './validation';
|
|
3
|
+
/**
|
|
4
|
+
* Публичный GR-примитив «Form» — оркестрация валидации над `GrFormField`.
|
|
5
|
+
*
|
|
6
|
+
* Модель формы (`v-model`-объект приложения) + декларативные `rules` по имени поля.
|
|
7
|
+
* Форма прогоняет правила, раскладывает ошибки по контексту, скроллит к первой
|
|
8
|
+
* ошибке и эмитит `submit` только при валидной форме. Императивный API — через
|
|
9
|
+
* template ref (`validate` / `validateField` / `clearValidate` / `resetFields` /
|
|
10
|
+
* `scrollToField`).
|
|
11
|
+
*/
|
|
12
|
+
export interface GrFormProps {
|
|
13
|
+
/** Реактивный объект данных формы. Поля адресуются по `name` (`GrFormField`), в т.ч. dot-path. */
|
|
14
|
+
model: Record<string, unknown>;
|
|
15
|
+
/** Правила валидации по имени поля: `{ email: [{ required: true, type: 'email' }] }`. */
|
|
16
|
+
rules?: GrFormRules;
|
|
17
|
+
/** Валидировать поле при потере фокуса. */
|
|
18
|
+
validateOnBlur?: boolean;
|
|
19
|
+
/** Валидировать поле при каждом изменении значения. */
|
|
20
|
+
validateOnChange?: boolean;
|
|
21
|
+
/** Скроллить к первому невалидному полю после `validate()`. */
|
|
22
|
+
scrollToError?: boolean;
|
|
23
|
+
scrollBehavior?: ScrollBehavior;
|
|
24
|
+
}
|
|
25
|
+
declare function validateField(name: string, trigger?: GrFormTrigger): Promise<boolean>;
|
|
26
|
+
declare function validate(): Promise<boolean>;
|
|
27
|
+
declare function clearValidate(names?: string | string[]): void;
|
|
28
|
+
declare function resetFields(): void;
|
|
29
|
+
declare function scrollToField(name: string): void;
|
|
30
|
+
declare var __VLS_1: {
|
|
31
|
+
validate: typeof validate;
|
|
32
|
+
errors: Record<string, string | undefined>;
|
|
33
|
+
};
|
|
34
|
+
type __VLS_Slots = {} & {
|
|
35
|
+
default?: (props: typeof __VLS_1) => any;
|
|
36
|
+
};
|
|
37
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GrFormProps>, {
|
|
38
|
+
rules: undefined;
|
|
39
|
+
validateOnBlur: boolean;
|
|
40
|
+
validateOnChange: boolean;
|
|
41
|
+
scrollToError: boolean;
|
|
42
|
+
scrollBehavior: string;
|
|
43
|
+
}>>, {
|
|
44
|
+
validate: typeof validate;
|
|
45
|
+
validateField: typeof validateField;
|
|
46
|
+
clearValidate: typeof clearValidate;
|
|
47
|
+
resetFields: typeof resetFields;
|
|
48
|
+
scrollToField: typeof scrollToField;
|
|
49
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
50
|
+
submit: (model: Record<string, unknown>) => void;
|
|
51
|
+
validate: (name: string, valid: boolean, message: string | undefined) => void;
|
|
52
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GrFormProps>, {
|
|
53
|
+
rules: undefined;
|
|
54
|
+
validateOnBlur: boolean;
|
|
55
|
+
validateOnChange: boolean;
|
|
56
|
+
scrollToError: boolean;
|
|
57
|
+
scrollBehavior: string;
|
|
58
|
+
}>>> & Readonly<{
|
|
59
|
+
onSubmit?: ((model: Record<string, unknown>) => any) | undefined;
|
|
60
|
+
onValidate?: ((name: string, valid: boolean, message: string | undefined) => any) | undefined;
|
|
61
|
+
}>, {
|
|
62
|
+
scrollBehavior: ScrollBehavior;
|
|
63
|
+
rules: GrFormRules;
|
|
64
|
+
validateOnBlur: boolean;
|
|
65
|
+
validateOnChange: boolean;
|
|
66
|
+
scrollToError: boolean;
|
|
67
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
68
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
69
|
+
declare const _default: typeof __VLS_export;
|
|
70
|
+
export default _default;
|
|
71
|
+
type __VLS_TypePropsToOption<T> = {
|
|
72
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
73
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
74
|
+
} : {
|
|
75
|
+
type: import('vue').PropType<T[K]>;
|
|
76
|
+
required: true;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
type __VLS_WithDefaults<P, D> = {
|
|
80
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
81
|
+
default: D[K];
|
|
82
|
+
}> : P[K];
|
|
83
|
+
};
|
|
84
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
85
|
+
new (): {
|
|
86
|
+
$slots: S;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
90
|
+
[K in keyof T]: T[K];
|
|
91
|
+
} : {
|
|
92
|
+
[K in keyof T as K]: T[K];
|
|
93
|
+
}) & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const grFormConfig: import("@feugene/unocss-preset-granular").GranularComponentDescriptor<"GrForm">;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ComputedRef, type InjectionKey, type Ref } from 'vue';
|
|
2
|
+
import type { GrFormTrigger } from './validation';
|
|
3
|
+
/**
|
|
4
|
+
* Контекст формы, который `GrForm` предоставляет своим `GrFormField`.
|
|
5
|
+
*
|
|
6
|
+
* Ключевая идея архитектуры: контролы (`GrInput`/`GrSelect`/`GrAutocomplete`/…) НЕ
|
|
7
|
+
* знают про форму — они, как и раньше, читают только контекст `GrFormField`
|
|
8
|
+
* (`id`/`aria-describedby`/`invalid`/`required`). А `GrFormField`, находясь внутри
|
|
9
|
+
* `GrForm`, подтягивает свою ошибку и признак обязательности из ЭТОГО контекста по
|
|
10
|
+
* `name` и триггерит валидацию поля. Так оркестрация добавляется сверху, не трогая
|
|
11
|
+
* ни один контрол.
|
|
12
|
+
*/
|
|
13
|
+
export interface GrFormContext {
|
|
14
|
+
/** Реактивная карта ошибок по имени поля. */
|
|
15
|
+
errors: Ref<Record<string, string | undefined>>;
|
|
16
|
+
/** Имена полей, у которых в правилах есть `required` (для маркера `*`). */
|
|
17
|
+
requiredFields: ComputedRef<Set<string>>;
|
|
18
|
+
/** Есть ли для поля правила (тогда `GrFormField` берёт ошибку из формы). */
|
|
19
|
+
hasField: (name: string) => boolean;
|
|
20
|
+
/** Регистрирует корневой элемент поля (для scroll-to-error). Возвращает unregister. */
|
|
21
|
+
registerField: (name: string, getEl: () => HTMLElement | null) => () => void;
|
|
22
|
+
/** Валидирует одно поле (с учётом триггера и настроек формы). */
|
|
23
|
+
validateField: (name: string, trigger?: GrFormTrigger) => Promise<boolean>;
|
|
24
|
+
}
|
|
25
|
+
export declare const GR_FORM_KEY: InjectionKey<GrFormContext>;
|
|
26
|
+
/** Возвращает контекст формы или `null`, если поле вне `GrForm`. */
|
|
27
|
+
export declare function useGrFormContext(): GrFormContext | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default } from './GrForm.vue';
|
|
2
|
+
export { default as GrForm } from './GrForm.vue';
|
|
3
|
+
export { grFormConfig } from './config';
|
|
4
|
+
export { GR_FORM_KEY, type GrFormContext, useGrFormContext } from './context';
|
|
5
|
+
export type { GrFormProps, GrFormRule, GrFormRules, GrFormTrigger, GrFormValidatorResult, } from './GrForm.vue';
|
|
6
|
+
export { getByPath, type GrFormMessageResolver, type GrFormRuleFailure, isEmpty, runFieldRules, } from './validation';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Движок валидации `GrForm` — чистый (без Vue/i18n), тестируется изолированно.
|
|
3
|
+
*
|
|
4
|
+
* Правило описывает набор проверок значения поля; `runFieldRules` прогоняет их по
|
|
5
|
+
* порядку и возвращает первое сообщение об ошибке (или `undefined`, если валидно).
|
|
6
|
+
* Сообщения резолвит потребитель (компонент) через `resolveMessage` — так i18n и
|
|
7
|
+
* дефолтные тексты остаются в компоненте, а движок ничего о них не знает.
|
|
8
|
+
*/
|
|
9
|
+
export type GrFormTrigger = 'blur' | 'change' | 'submit';
|
|
10
|
+
/** Результат кастомного валидатора: `true`/void — ок; `false` — ошибка (дефолт-текст); строка — текст ошибки. */
|
|
11
|
+
export type GrFormValidatorResult = boolean | string | void;
|
|
12
|
+
export interface GrFormRule {
|
|
13
|
+
/** Значение обязательно (не пустое). */
|
|
14
|
+
required?: boolean;
|
|
15
|
+
/** Готовый текст ошибки — перекрывает дефолтное сообщение любой проверки этого правила. */
|
|
16
|
+
message?: string;
|
|
17
|
+
/** Минимум: длина для строки/массива, значение для числа. */
|
|
18
|
+
min?: number;
|
|
19
|
+
/** Максимум: длина для строки/массива, значение для числа. */
|
|
20
|
+
max?: number;
|
|
21
|
+
/** Точная длина/значение. */
|
|
22
|
+
len?: number;
|
|
23
|
+
/** Регулярное выражение (проверяется по `String(value)`). */
|
|
24
|
+
pattern?: RegExp;
|
|
25
|
+
/** Встроенный тип-валидатор. */
|
|
26
|
+
type?: 'email' | 'url';
|
|
27
|
+
/** Кастомный (в т.ч. async) валидатор. Второй аргумент — весь `model`. */
|
|
28
|
+
validator?: (value: unknown, model: Record<string, unknown>) => GrFormValidatorResult | Promise<GrFormValidatorResult>;
|
|
29
|
+
/** Когда правило срабатывает. По умолчанию — на любом триггере (blur/change/submit). */
|
|
30
|
+
trigger?: GrFormTrigger | GrFormTrigger[];
|
|
31
|
+
}
|
|
32
|
+
export type GrFormRules = Record<string, GrFormRule | GrFormRule[]>;
|
|
33
|
+
/** Вид сработавшей проверки — ключ для дефолтного i18n-сообщения. */
|
|
34
|
+
export type GrFormRuleFailure = 'required' | 'min' | 'max' | 'len' | 'pattern' | 'email' | 'url' | 'invalid';
|
|
35
|
+
export type GrFormMessageResolver = (kind: GrFormRuleFailure, rule: GrFormRule, params: Record<string, unknown>) => string;
|
|
36
|
+
/** Пустое значение: `null`/`undefined`/пустая (или пробельная) строка/пустой массив. */
|
|
37
|
+
export declare function isEmpty(value: unknown): boolean;
|
|
38
|
+
/** Достаёт значение из объекта по dot-path (`address.city`). */
|
|
39
|
+
export declare function getByPath(obj: Record<string, unknown>, path: string): unknown;
|
|
40
|
+
/** Записывает значение в объект по dot-path (создаёт промежуточные объекты). */
|
|
41
|
+
export declare function setByPath(obj: Record<string, unknown>, path: string, value: unknown): void;
|
|
42
|
+
/** Нормализует правило(а) поля в массив. */
|
|
43
|
+
export declare function toRuleArray(rules: GrFormRule | GrFormRule[] | undefined): GrFormRule[];
|
|
44
|
+
/** Правила поля, применимые для данного триггера (undefined = все). */
|
|
45
|
+
export declare function rulesForTrigger(rules: GrFormRule[], trigger?: GrFormTrigger): GrFormRule[];
|
|
46
|
+
/** Есть ли среди правил `required` (для маркера обязательности в поле). */
|
|
47
|
+
export declare function rulesRequired(rules: GrFormRule[]): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Прогоняет правила по порядку, возвращает первое сообщение об ошибке или `undefined`.
|
|
50
|
+
* Пустое необязательное значение проходит все проверки (кроме `required`).
|
|
51
|
+
*/
|
|
52
|
+
export declare function runFieldRules(value: unknown, rules: GrFormRule[], model: Record<string, unknown>, resolveMessage: GrFormMessageResolver): Promise<string | undefined>;
|