@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 @@
|
|
|
1
|
+
{"version":3,"file":"GrAlert-B9gmpoPC.js","names":[],"sources":["../../../../src/components/GrAlert/grAlertStyles.ts","../../../../src/components/GrAlert/GrAlert.vue","../../../../src/components/GrAlert/GrAlert.vue"],"sourcesContent":["import type { GrTone } from '../shared/tones'\n\n/**\n * Цветовая модель `GrAlert`.\n *\n * Модуль намеренно чистый: он оперирует **строками CSS-значений**, а не\n * utility-классами UnoCSS. Классы, живущие только строковыми литералами в\n * `.ts`, не сканируются `granularContent` и требуют ручного safelist — здесь\n * этой проблемы нет по построению, а логику цветов можно тестировать без\n * монтирования компонента.\n */\n\n/**\n * `soft` — залитая тоном подложка, тональный текст. Основной вариант.\n * `outline` — фон страницы, тон несут рамка и иконка; текст нейтральный.\n *\n * `light` (устаревший) нормализуется в `soft`: раньше он существовал ровно для\n * одного тона (`warning`) и был набран hex-литералами, то есть не реагировал на\n * смену темы. См. {@link normalizeGrAlertVariant}.\n */\nexport const GR_ALERT_VARIANTS = ['soft', 'outline'] as const\n\nexport type GrAlertVariant = typeof GR_ALERT_VARIANTS[number]\n\n/** То, что компонент принимает в проп `variant`, включая устаревший алиас. */\nexport type GrAlertVariantInput = GrAlertVariant | 'light'\n\n/** Ключ иконки тона. Сама иконка резолвится в SFC — модуль остаётся чистым. */\nexport type GrAlertIconKey = 'info' | 'success' | 'warning' | 'danger'\n\ntype GrAlertToneTokens = {\n /** Подложка варианта `soft`. */\n surface: string\n /** Насыщенный цвет тона: база для рамки. */\n accent: string\n /**\n * Тональный цвет текста — рассчитан на подложку `surface`.\n *\n * Именно он, а не `accent`, красит иконку и текст: на светлой теме\n * `--gr-success` (#10b981) на `--gr-success-light` (#d1fae5) даёт 2.24:1 —\n * ниже порога 3:1 даже для нетекстовой графики. `--gr-success-text`\n * (#065f46) на той же подложке даёт 6.78:1.\n */\n text: string\n icon: GrAlertIconKey\n}\n\n/**\n * Тон → тройка токенов.\n *\n * `primary` и `neutral` не имеют пары `-light`/`-text` и отображаются на\n * ближайшие семантические роли: акцентную поверхность и нейтральную muted.\n */\nconst TONE_TOKENS: Record<GrTone, GrAlertToneTokens> = {\n primary: { surface: 'var(--gr-accent)', accent: 'var(--gr-primary)', text: 'var(--gr-accent-fg)', icon: 'info' },\n neutral: { surface: 'var(--gr-muted)', accent: 'var(--gr-muted-fg)', text: 'var(--gr-fg)', icon: 'info' },\n success: { surface: 'var(--gr-success-light)', accent: 'var(--gr-success)', text: 'var(--gr-success-text)', icon: 'success' },\n warning: { surface: 'var(--gr-warning-light)', accent: 'var(--gr-warning)', text: 'var(--gr-warning-text)', icon: 'warning' },\n danger: { surface: 'var(--gr-danger-light)', accent: 'var(--gr-danger)', text: 'var(--gr-danger-text)', icon: 'danger' },\n info: { surface: 'var(--gr-info-light)', accent: 'var(--gr-info)', text: 'var(--gr-info-text)', icon: 'info' },\n slate: { surface: 'var(--gr-slate-light)', accent: 'var(--gr-slate)', text: 'var(--gr-slate-text)', icon: 'info' },\n azure: { surface: 'var(--gr-azure-light)', accent: 'var(--gr-azure)', text: 'var(--gr-azure-text)', icon: 'info' },\n}\n\n/** Разрешённые цвета одного алерта — ровно то, что уходит в CSS-переменные. */\nexport type GrAlertColors = {\n bg: string\n border: string\n icon: string\n title: string\n text: string\n close: string\n closeHover: string\n closeHoverBg: string\n}\n\n/** Пользовательские переопределения цвета (пропы-эскейпы). */\nexport type GrAlertColorOverrides = {\n backgroundColor?: string\n textColor?: string\n borderColor?: string\n}\n\nexport function normalizeGrAlertVariant(variant: GrAlertVariantInput): GrAlertVariant {\n return variant === 'light' ? 'soft' : variant\n}\n\nexport function grAlertIconKey(tone: GrTone): GrAlertIconKey {\n return TONE_TOKENS[tone].icon\n}\n\n/**\n * Рамка выводится из тона формулой, а не задаётся отдельным токеном на каждый\n * тон: доля тона в смеси с `--gr-brd` — единственное, что отличает рамки между\n * собой. 22% (как было) давало 1.27–1.51:1 к собственной подложке — край\n * практически не читался; 35/45% поднимают его до 1.42–2.07:1.\n */\nfunction border(accent: string, ratio: number): string {\n return `color-mix(in srgb, ${accent} ${ratio}%, var(--gr-brd))`\n}\n\nexport function resolveGrAlertColors(tone: GrTone, variant: GrAlertVariant): GrAlertColors {\n const t = TONE_TOKENS[tone]\n\n if (variant === 'outline') {\n return {\n bg: 'var(--gr-bg)',\n border: border(t.accent, 45),\n icon: t.text,\n title: 'var(--gr-fg)',\n text: 'var(--gr-muted-fg)',\n close: 'var(--gr-muted-fg)',\n closeHover: 'var(--gr-fg)',\n closeHoverBg: 'var(--gr-muted)',\n }\n }\n\n return {\n bg: t.surface,\n border: border(t.accent, 35),\n // Иерархия «заголовок / текст» держится на размере и насыщении шрифта, а не\n // на цвете: приглушать тональный текст подмешиванием подложки нельзя —\n // на тёмной теме warning и danger проваливают 4.5:1 уже при 15% подмеса.\n icon: t.text,\n title: t.text,\n text: t.text,\n close: t.text,\n closeHover: t.text,\n closeHoverBg: `color-mix(in srgb, ${t.accent} 16%, transparent)`,\n }\n}\n\n/**\n * Пропы-эскейпы поверх тона. `textColor` красит весь текстовый слой целиком\n * (иконка, заголовок, текст, кнопка закрытия) — иначе пользовательский цвет\n * соседствовал бы с тональным и давал грязь.\n */\nexport function applyGrAlertOverrides(colors: GrAlertColors, overrides: GrAlertColorOverrides): GrAlertColors {\n const custom = (value?: string) => value?.trim() || undefined\n const text = custom(overrides.textColor)\n\n return {\n ...colors,\n bg: custom(overrides.backgroundColor) ?? colors.bg,\n border: custom(overrides.borderColor) ?? colors.border,\n icon: text ?? colors.icon,\n title: text ?? colors.title,\n text: text ?? colors.text,\n close: text ?? colors.close,\n closeHover: text ?? colors.closeHover,\n closeHoverBg: text ? `color-mix(in srgb, ${text} 12%, transparent)` : colors.closeHoverBg,\n }\n}\n\n/**\n * Публичный контракт кастомизации: переменные `--gr-alert-*` можно\n * переопределить снаружи так же, как их задаёт компонент.\n */\nexport function grAlertCssVars(colors: GrAlertColors): Record<string, string> {\n return {\n '--gr-alert-bg': colors.bg,\n '--gr-alert-brd': colors.border,\n '--gr-alert-icon-color': colors.icon,\n '--gr-alert-title-color': colors.title,\n '--gr-alert-text-color': colors.text,\n '--gr-alert-close-color': colors.close,\n '--gr-alert-close-hover-color': colors.closeHover,\n '--gr-alert-close-hover-bg': colors.closeHoverBg,\n }\n}\n","<script setup lang=\"ts\">\n/**\n * GrAlert — блочное сообщение с тоном, иконкой и опциональным закрытием.\n *\n * Цветовая модель вынесена в `grAlertStyles.ts` и выражена **только токенами**\n * `--gr-*`: компонент одинаково корректен в light и dark без единого hex-литерала.\n *\n * Точки кастомизации — переменные `--gr-alert-*` (см. `grAlertCssVars`); пропы\n * `backgroundColor`/`textColor`/`borderColor` — тот же контракт, но точечно.\n */\nimport { computed } from 'vue'\n\nimport IconWarning from '~icons/lucide/alert-triangle'\nimport IconCheck from '~icons/lucide/check-circle'\nimport IconInfo from '~icons/lucide/info'\nimport IconClose from '~icons/lucide/x'\nimport IconError from '~icons/lucide/x-circle'\n\nimport type { Component } from 'vue'\nimport type { GrTone } from '../shared/tones'\nimport type { GrAlertIconKey, GrAlertVariantInput } from './grAlertStyles'\n\nimport { useGrComponentProp } from '../GrConfigProvider/context'\nimport { useGranularityTranslations } from '../../internal/granularityI18n'\nimport {\n applyGrAlertOverrides,\n grAlertCssVars,\n grAlertIconKey,\n normalizeGrAlertVariant,\n resolveGrAlertColors,\n} from './grAlertStyles'\n\nimport './defaults'\n\nexport type GrAlertTone = GrTone\nexport type { GrAlertVariant, GrAlertVariantInput } from './grAlertStyles'\n\n/**\n * Режим объявления сообщения скринридеру.\n * `auto` — по тону: `warning`/`danger` перебивают речь (`role=\"alert\"`),\n * остальные ждут паузы (`role=\"status\"`).\n */\nexport type GrAlertLive = 'auto' | 'assertive' | 'polite' | 'off'\n\nexport interface GrAlertProps {\n tone?: GrAlertTone\n variant?: GrAlertVariantInput\n title?: string\n closable?: boolean\n live?: GrAlertLive\n backgroundColor?: string\n textColor?: string\n borderColor?: string\n}\n\nconst emit = defineEmits<{\n (event: 'close'): void\n}>()\n\n// Дефолты tone/variant/closable намеренно `undefined`: «настоящий» дефолт\n// переехал в `useGrComponentProp`, иначе `GrConfigProvider` не смог бы отличить\n// заданный пользователем проп от подставленного Vue.\nconst props = withDefaults(defineProps<GrAlertProps>(), {\n tone: undefined,\n variant: undefined,\n title: undefined,\n closable: undefined,\n live: 'auto',\n backgroundColor: undefined,\n textColor: undefined,\n borderColor: undefined,\n})\n\nconst { t } = useGranularityTranslations()\n\nconst tone = useGrComponentProp('GrAlert', 'tone', () => props.tone, 'info')\nconst variantInput = useGrComponentProp('GrAlert', 'variant', () => props.variant, 'soft')\nconst closable = useGrComponentProp('GrAlert', 'closable', () => props.closable, false)\n\nconst variant = computed(() => normalizeGrAlertVariant(variantInput.value))\n\nconst ICONS: Record<GrAlertIconKey, Component> = {\n info: IconInfo,\n success: IconCheck,\n warning: IconWarning,\n danger: IconError,\n}\n\nconst icon = computed<Component>(() => ICONS[grAlertIconKey(tone.value)])\n\nconst colors = computed(() => applyGrAlertOverrides(\n resolveGrAlertColors(tone.value, variant.value),\n props,\n))\n\nconst rootStyle = computed(() => ({\n ...grAlertCssVars(colors.value),\n background: 'var(--gr-alert-bg)',\n borderColor: 'var(--gr-alert-brd)',\n}))\n\n/**\n * `role=\"alert\"` — assertive-регион: он прерывает чтение. Вешать его на любое\n * информационное сообщение значит превращать спокойную подсказку в тревогу,\n * поэтому по умолчанию его получают только `warning` и `danger`.\n */\nconst role = computed(() => {\n const mode = props.live === 'auto'\n ? (tone.value === 'danger' || tone.value === 'warning' ? 'assertive' : 'polite')\n : props.live\n\n if (mode === 'off') return undefined\n return mode === 'assertive' ? 'alert' : 'status'\n})\n</script>\n\n<template>\n <div\n :role=\"role\"\n data-gr-alert\n class=\"rounded-[var(--gr-radius-lg)] border px-4 py-3\"\n :style=\"rootStyle\"\n >\n <div class=\"flex items-start gap-3\">\n <component\n :is=\"icon\"\n class=\"mt-0.5 h-5 w-5 shrink-0 text-[var(--gr-alert-icon-color)]\"\n aria-hidden=\"true\"\n />\n\n <div class=\"min-w-0 flex-1\">\n <div\n v-if=\"props.title\"\n class=\"text-[length:var(--gr-text-sm)] font-600 text-[var(--gr-alert-title-color)]\"\n >\n {{ props.title }}\n </div>\n <div\n class=\"text-[length:var(--gr-text-sm)] leading-relaxed text-[var(--gr-alert-text-color)]\"\n :class=\"props.title ? 'mt-1' : ''\"\n >\n <slot />\n </div>\n </div>\n\n <button\n v-if=\"closable\"\n type=\"button\"\n class=\"-mr-1.5 -mt-1.5 shrink-0 rounded-[var(--gr-radius-md)] p-1.5 text-[var(--gr-alert-close-color)] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--gr-ring)] hover:bg-[var(--gr-alert-close-hover-bg)] hover:text-[var(--gr-alert-close-hover-color)]\"\n :aria-label=\"t('gr.common.close', 'Close')\"\n @click=\"emit('close')\"\n >\n <IconClose class=\"h-4 w-4\" aria-hidden=\"true\" />\n </button>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * GrAlert — блочное сообщение с тоном, иконкой и опциональным закрытием.\n *\n * Цветовая модель вынесена в `grAlertStyles.ts` и выражена **только токенами**\n * `--gr-*`: компонент одинаково корректен в light и dark без единого hex-литерала.\n *\n * Точки кастомизации — переменные `--gr-alert-*` (см. `grAlertCssVars`); пропы\n * `backgroundColor`/`textColor`/`borderColor` — тот же контракт, но точечно.\n */\nimport { computed } from 'vue'\n\nimport IconWarning from '~icons/lucide/alert-triangle'\nimport IconCheck from '~icons/lucide/check-circle'\nimport IconInfo from '~icons/lucide/info'\nimport IconClose from '~icons/lucide/x'\nimport IconError from '~icons/lucide/x-circle'\n\nimport type { Component } from 'vue'\nimport type { GrTone } from '../shared/tones'\nimport type { GrAlertIconKey, GrAlertVariantInput } from './grAlertStyles'\n\nimport { useGrComponentProp } from '../GrConfigProvider/context'\nimport { useGranularityTranslations } from '../../internal/granularityI18n'\nimport {\n applyGrAlertOverrides,\n grAlertCssVars,\n grAlertIconKey,\n normalizeGrAlertVariant,\n resolveGrAlertColors,\n} from './grAlertStyles'\n\nimport './defaults'\n\nexport type GrAlertTone = GrTone\nexport type { GrAlertVariant, GrAlertVariantInput } from './grAlertStyles'\n\n/**\n * Режим объявления сообщения скринридеру.\n * `auto` — по тону: `warning`/`danger` перебивают речь (`role=\"alert\"`),\n * остальные ждут паузы (`role=\"status\"`).\n */\nexport type GrAlertLive = 'auto' | 'assertive' | 'polite' | 'off'\n\nexport interface GrAlertProps {\n tone?: GrAlertTone\n variant?: GrAlertVariantInput\n title?: string\n closable?: boolean\n live?: GrAlertLive\n backgroundColor?: string\n textColor?: string\n borderColor?: string\n}\n\nconst emit = defineEmits<{\n (event: 'close'): void\n}>()\n\n// Дефолты tone/variant/closable намеренно `undefined`: «настоящий» дефолт\n// переехал в `useGrComponentProp`, иначе `GrConfigProvider` не смог бы отличить\n// заданный пользователем проп от подставленного Vue.\nconst props = withDefaults(defineProps<GrAlertProps>(), {\n tone: undefined,\n variant: undefined,\n title: undefined,\n closable: undefined,\n live: 'auto',\n backgroundColor: undefined,\n textColor: undefined,\n borderColor: undefined,\n})\n\nconst { t } = useGranularityTranslations()\n\nconst tone = useGrComponentProp('GrAlert', 'tone', () => props.tone, 'info')\nconst variantInput = useGrComponentProp('GrAlert', 'variant', () => props.variant, 'soft')\nconst closable = useGrComponentProp('GrAlert', 'closable', () => props.closable, false)\n\nconst variant = computed(() => normalizeGrAlertVariant(variantInput.value))\n\nconst ICONS: Record<GrAlertIconKey, Component> = {\n info: IconInfo,\n success: IconCheck,\n warning: IconWarning,\n danger: IconError,\n}\n\nconst icon = computed<Component>(() => ICONS[grAlertIconKey(tone.value)])\n\nconst colors = computed(() => applyGrAlertOverrides(\n resolveGrAlertColors(tone.value, variant.value),\n props,\n))\n\nconst rootStyle = computed(() => ({\n ...grAlertCssVars(colors.value),\n background: 'var(--gr-alert-bg)',\n borderColor: 'var(--gr-alert-brd)',\n}))\n\n/**\n * `role=\"alert\"` — assertive-регион: он прерывает чтение. Вешать его на любое\n * информационное сообщение значит превращать спокойную подсказку в тревогу,\n * поэтому по умолчанию его получают только `warning` и `danger`.\n */\nconst role = computed(() => {\n const mode = props.live === 'auto'\n ? (tone.value === 'danger' || tone.value === 'warning' ? 'assertive' : 'polite')\n : props.live\n\n if (mode === 'off') return undefined\n return mode === 'assertive' ? 'alert' : 'status'\n})\n</script>\n\n<template>\n <div\n :role=\"role\"\n data-gr-alert\n class=\"rounded-[var(--gr-radius-lg)] border px-4 py-3\"\n :style=\"rootStyle\"\n >\n <div class=\"flex items-start gap-3\">\n <component\n :is=\"icon\"\n class=\"mt-0.5 h-5 w-5 shrink-0 text-[var(--gr-alert-icon-color)]\"\n aria-hidden=\"true\"\n />\n\n <div class=\"min-w-0 flex-1\">\n <div\n v-if=\"props.title\"\n class=\"text-[length:var(--gr-text-sm)] font-600 text-[var(--gr-alert-title-color)]\"\n >\n {{ props.title }}\n </div>\n <div\n class=\"text-[length:var(--gr-text-sm)] leading-relaxed text-[var(--gr-alert-text-color)]\"\n :class=\"props.title ? 'mt-1' : ''\"\n >\n <slot />\n </div>\n </div>\n\n <button\n v-if=\"closable\"\n type=\"button\"\n class=\"-mr-1.5 -mt-1.5 shrink-0 rounded-[var(--gr-radius-md)] p-1.5 text-[var(--gr-alert-close-color)] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--gr-ring)] hover:bg-[var(--gr-alert-close-hover-bg)] hover:text-[var(--gr-alert-close-hover-color)]\"\n :aria-label=\"t('gr.common.close', 'Close')\"\n @click=\"emit('close')\"\n >\n <IconClose class=\"h-4 w-4\" aria-hidden=\"true\" />\n </button>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAa,oBAAoB,CAAC,QAAQ,SAAS;;;;;;;AAiCnD,IAAM,cAAiD;CACrD,SAAS;EAAE,SAAS;EAAoB,QAAQ;EAAqB,MAAM;EAAuB,MAAM;CAAO;CAC/G,SAAS;EAAE,SAAS;EAAmB,QAAQ;EAAsB,MAAM;EAAgB,MAAM;CAAO;CACxG,SAAS;EAAE,SAAS;EAA2B,QAAQ;EAAqB,MAAM;EAA0B,MAAM;CAAU;CAC5H,SAAS;EAAE,SAAS;EAA2B,QAAQ;EAAqB,MAAM;EAA0B,MAAM;CAAU;CAC5H,QAAQ;EAAE,SAAS;EAA0B,QAAQ;EAAoB,MAAM;EAAyB,MAAM;CAAS;CACvH,MAAM;EAAE,SAAS;EAAwB,QAAQ;EAAkB,MAAM;EAAuB,MAAM;CAAO;CAC7G,OAAO;EAAE,SAAS;EAAyB,QAAQ;EAAmB,MAAM;EAAwB,MAAM;CAAO;CACjH,OAAO;EAAE,SAAS;EAAyB,QAAQ;EAAmB,MAAM;EAAwB,MAAM;CAAO;AACnH;AAqBA,SAAgB,wBAAwB,SAA8C;CACpF,OAAO,YAAY,UAAU,SAAS;AACxC;AAEA,SAAgB,eAAe,MAA8B;CAC3D,OAAO,YAAY,KAAK,CAAC;AAC3B;;;;;;;AAQA,SAAS,OAAO,QAAgB,OAAuB;CACrD,OAAO,sBAAsB,OAAO,GAAG,MAAM;AAC/C;AAEA,SAAgB,qBAAqB,MAAc,SAAwC;CACzF,MAAM,IAAI,YAAY;CAEtB,IAAI,YAAY,WACd,OAAO;EACL,IAAI;EACJ,QAAQ,OAAO,EAAE,QAAQ,EAAE;EAC3B,MAAM,EAAE;EACR,OAAO;EACP,MAAM;EACN,OAAO;EACP,YAAY;EACZ,cAAc;CAChB;CAGF,OAAO;EACL,IAAI,EAAE;EACN,QAAQ,OAAO,EAAE,QAAQ,EAAE;EAI3B,MAAM,EAAE;EACR,OAAO,EAAE;EACT,MAAM,EAAE;EACR,OAAO,EAAE;EACT,YAAY,EAAE;EACd,cAAc,sBAAsB,EAAE,OAAO;CAC/C;AACF;;;;;;AAOA,SAAgB,sBAAsB,QAAuB,WAAiD;CAC5G,MAAM,UAAU,UAAmB,OAAO,KAAK,KAAK,KAAA;CACpD,MAAM,OAAO,OAAO,UAAU,SAAS;CAEvC,OAAO;EACL,GAAG;EACH,IAAI,OAAO,UAAU,eAAe,KAAK,OAAO;EAChD,QAAQ,OAAO,UAAU,WAAW,KAAK,OAAO;EAChD,MAAM,QAAQ,OAAO;EACrB,OAAO,QAAQ,OAAO;EACtB,MAAM,QAAQ,OAAO;EACrB,OAAO,QAAQ,OAAO;EACtB,YAAY,QAAQ,OAAO;EAC3B,cAAc,OAAO,sBAAsB,KAAK,sBAAsB,OAAO;CAC/E;AACF;;;;;AAMA,SAAgB,eAAe,QAA+C;CAC5E,OAAO;EACL,iBAAiB,OAAO;EACxB,kBAAkB,OAAO;EACzB,yBAAyB,OAAO;EAChC,0BAA0B,OAAO;EACjC,yBAAyB,OAAO;EAChC,0BAA0B,OAAO;EACjC,gCAAgC,OAAO;EACvC,6BAA6B,OAAO;CACtC;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EClHA,MAAM,OAAO;EAOb,MAAM,QAAQ;EAWd,MAAM,EAAE,MAAM,2BAA2B;EAEzC,MAAM,OAAO,mBAAmB,WAAW,cAAc,MAAM,MAAM,MAAM;EAC3E,MAAM,eAAe,mBAAmB,WAAW,iBAAiB,MAAM,SAAS,MAAM;EACzF,MAAM,WAAW,mBAAmB,WAAW,kBAAkB,MAAM,UAAU,KAAK;EAEtF,MAAM,UAAU,eAAe,wBAAwB,aAAa,KAAK,CAAC;EAE1E,MAAM,QAA2C;GAC/C,MAAM;GACN,SAAS;GACT,SAAS;GACT,QAAQ;EACV;EAEA,MAAM,OAAO,eAA0B,MAAM,eAAe,KAAK,KAAK,EAAE;EAExE,MAAM,SAAS,eAAe,sBAC5B,qBAAqB,KAAK,OAAO,QAAQ,KAAK,GAC9C,KACF,CAAC;EAED,MAAM,YAAY,gBAAgB;GAChC,GAAG,eAAe,OAAO,KAAK;GAC9B,YAAY;GACZ,aAAa;EACf,EAAE;;;;;;EAOF,MAAM,OAAO,eAAe;GAC1B,MAAM,OAAO,MAAM,SAAS,SACvB,KAAK,UAAU,YAAY,KAAK,UAAU,YAAY,cAAc,WACrE,MAAM;GAEV,IAAI,SAAS,OAAO,OAAO,KAAA;GAC3B,OAAO,SAAS,cAAc,UAAU;EAC1C,CAAC;;uBAIC,mBAsCM,OAAA;IArCH,MAAM,KAAA;IACP,iBAAA;IACA,OAAM;IACL,OAAK,eAAE,UAAA,KAAS;OAEjB,mBA+BM,OA/BN,YA+BM;kBA9BJ,YAIE,wBAHK,KAAA,KAAI,GAAA;KACT,OAAM;KACN,eAAY;;IAGd,mBAaM,OAbN,YAaM,CAXI,MAAM,SAAA,UAAA,GADd,mBAKM,OALN,YAKM,gBADD,MAAM,KAAK,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAEhB,mBAKM,OAAA,EAJJ,OAAK,eAAA,CAAC,qFACE,MAAM,QAAK,SAAA,EAAA,CAAA,EAAA,GAAA,CAEnB,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,CAAA,CAAA,CAAA;IAKJ,MAAA,QAAA,KAAA,UAAA,GADR,mBAQS,UAAA;;KANP,MAAK;KACL,OAAM;KACL,cAAY,MAAA,CAAA,CAAC,CAAA,mBAAA,OAAA;KACb,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,OAAA;QAEZ,YAAgD,MAAA,SAAA,GAAA;KAArC,OAAM;KAAU,eAAY"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as GrAlert_default } from "./chunks/GrAlert-
|
|
1
|
+
import { a as grAlertIconKey, i as grAlertCssVars, n as GR_ALERT_VARIANTS, o as normalizeGrAlertVariant, r as applyGrAlertOverrides, s as resolveGrAlertColors, t as GrAlert_default } from "./chunks/GrAlert-B9gmpoPC.js";
|
|
2
2
|
import { t as grAlertConfig } from "../../chunks/config-BNu8lFQB.js";
|
|
3
|
-
export { GrAlert_default as GrAlert, GrAlert_default as default, grAlertConfig };
|
|
3
|
+
export { GR_ALERT_VARIANTS, GrAlert_default as GrAlert, GrAlert_default as default, applyGrAlertOverrides, grAlertConfig, grAlertCssVars, grAlertIconKey, normalizeGrAlertVariant, resolveGrAlertColors };
|
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
import { a as useGrComponentProp, o as useGrComponentSize } from "../../../chunks/context-DfWYCBB-.js";
|
|
2
|
+
import { n as useGranularityTranslations } from "../../../chunks/granularityI18n-SH0I--GW.js";
|
|
3
|
+
import { vClickOutside } from "../../../directives/clickOutside.js";
|
|
4
|
+
import { t as useFloating } from "../../../chunks/useFloating-DtM6TyE4.js";
|
|
5
|
+
import { t as useEscapeToClose } from "../../../chunks/useEscapeToClose-C2t_S1gh.js";
|
|
6
|
+
import { n as useGrFormFieldContext } from "../../../chunks/context-DdNIxa1w.js";
|
|
7
|
+
import { a as autocompleteShellClass, i as autocompletePanelClasses, r as autocompleteChipClass } from "../../../chunks/config-DToHb81g.js";
|
|
8
|
+
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
9
|
+
//#region src/components/GrAutocomplete/GrAutocomplete.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var _hoisted_1 = { class: "truncate" };
|
|
11
|
+
var _hoisted_2 = ["aria-label", "onClick"];
|
|
12
|
+
var _hoisted_3 = [
|
|
13
|
+
"id",
|
|
14
|
+
"value",
|
|
15
|
+
"disabled",
|
|
16
|
+
"placeholder",
|
|
17
|
+
"aria-label",
|
|
18
|
+
"aria-invalid",
|
|
19
|
+
"aria-describedby",
|
|
20
|
+
"aria-required",
|
|
21
|
+
"aria-autocomplete",
|
|
22
|
+
"aria-controls",
|
|
23
|
+
"aria-activedescendant",
|
|
24
|
+
"aria-expanded"
|
|
25
|
+
];
|
|
26
|
+
var _hoisted_4 = {
|
|
27
|
+
key: 1,
|
|
28
|
+
"data-gr-autocomplete-spinner": "",
|
|
29
|
+
class: "shrink-0 flex items-center text-[var(--gr-muted-fg)]"
|
|
30
|
+
};
|
|
31
|
+
var _hoisted_5 = ["aria-label"];
|
|
32
|
+
var _hoisted_6 = {
|
|
33
|
+
key: 3,
|
|
34
|
+
"data-testid": "gr-autocomplete-chevron",
|
|
35
|
+
class: "shrink-0 flex items-center text-[var(--gr-muted-fg)] pointer-events-none"
|
|
36
|
+
};
|
|
37
|
+
var _hoisted_7 = ["id", "aria-multiselectable"];
|
|
38
|
+
var _hoisted_8 = [
|
|
39
|
+
"id",
|
|
40
|
+
"disabled",
|
|
41
|
+
"aria-selected",
|
|
42
|
+
"aria-disabled",
|
|
43
|
+
"onClick",
|
|
44
|
+
"onMousemove"
|
|
45
|
+
];
|
|
46
|
+
var _hoisted_9 = { class: "flex items-center gap-2 min-w-0" };
|
|
47
|
+
var _hoisted_10 = { class: "truncate" };
|
|
48
|
+
var _hoisted_11 = {
|
|
49
|
+
key: 1,
|
|
50
|
+
"data-gr-autocomplete-loading": "",
|
|
51
|
+
class: "flex items-center gap-2 px-3 py-2 text-[13px] text-[var(--gr-muted-fg)]"
|
|
52
|
+
};
|
|
53
|
+
var _hoisted_12 = {
|
|
54
|
+
key: 2,
|
|
55
|
+
"data-gr-autocomplete-hint": "",
|
|
56
|
+
class: "px-3 py-2 text-[13px] text-[var(--gr-muted-fg)]"
|
|
57
|
+
};
|
|
58
|
+
var _hoisted_13 = {
|
|
59
|
+
key: 3,
|
|
60
|
+
"data-gr-autocomplete-empty": "",
|
|
61
|
+
class: "px-3 py-2 text-[13px] text-[var(--gr-muted-fg)]"
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/components/GrAutocomplete/GrAutocomplete.vue
|
|
65
|
+
var GrAutocomplete_default = /* @__PURE__ */ defineComponent({
|
|
66
|
+
__name: "GrAutocomplete",
|
|
67
|
+
props: {
|
|
68
|
+
modelValue: {},
|
|
69
|
+
options: { default: void 0 },
|
|
70
|
+
multiple: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false
|
|
73
|
+
},
|
|
74
|
+
disabled: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
77
|
+
},
|
|
78
|
+
size: { default: void 0 },
|
|
79
|
+
placeholder: { default: void 0 },
|
|
80
|
+
ariaLabel: { default: void 0 },
|
|
81
|
+
clearable: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: void 0
|
|
84
|
+
},
|
|
85
|
+
loading: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: false
|
|
88
|
+
},
|
|
89
|
+
filterable: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: true
|
|
92
|
+
},
|
|
93
|
+
filter: {
|
|
94
|
+
type: Function,
|
|
95
|
+
default: void 0
|
|
96
|
+
},
|
|
97
|
+
minQueryLength: { default: 0 },
|
|
98
|
+
debounce: { default: 250 },
|
|
99
|
+
allowCustomValue: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: false
|
|
102
|
+
},
|
|
103
|
+
closeOnSelect: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: true
|
|
106
|
+
},
|
|
107
|
+
dropdownMaxHeight: { default: 280 },
|
|
108
|
+
loadingText: { default: void 0 },
|
|
109
|
+
noResultsText: { default: void 0 },
|
|
110
|
+
clearLabel: { default: void 0 }
|
|
111
|
+
},
|
|
112
|
+
emits: ["update:modelValue", "search"],
|
|
113
|
+
setup(__props, { emit: __emit }) {
|
|
114
|
+
const props = __props;
|
|
115
|
+
const resolvedSize = useGrComponentSize(() => props.size, { component: "GrAutocomplete" });
|
|
116
|
+
const resolvedClearable = useGrComponentProp("GrAutocomplete", "clearable", () => props.clearable, false);
|
|
117
|
+
const emit = __emit;
|
|
118
|
+
const { t } = useGranularityTranslations();
|
|
119
|
+
const resolvedLoadingText = computed(() => props.loadingText ?? t("gr.autocomplete.loading", "Loading…"));
|
|
120
|
+
const resolvedNoResultsText = computed(() => props.noResultsText ?? t("gr.autocomplete.noResults", "No results"));
|
|
121
|
+
const resolvedClearLabel = computed(() => props.clearLabel ?? t("gr.common.clear", "Clear"));
|
|
122
|
+
const resolvedTypeMoreText = computed(() => t("gr.autocomplete.typeMore", "Type at least {n} characters", { n: props.minQueryLength }));
|
|
123
|
+
const field = useGrFormFieldContext();
|
|
124
|
+
const resolvedId = computed(() => field?.id.value);
|
|
125
|
+
const isInvalid = computed(() => Boolean(field?.invalid.value));
|
|
126
|
+
const describedBy = computed(() => field?.describedById.value);
|
|
127
|
+
const isRequired = computed(() => Boolean(field?.required.value));
|
|
128
|
+
const optionsResolved = computed(() => props.options ?? []);
|
|
129
|
+
function toArray(value) {
|
|
130
|
+
if (Array.isArray(value)) return value;
|
|
131
|
+
if (!value) return [];
|
|
132
|
+
return [value];
|
|
133
|
+
}
|
|
134
|
+
const modelSingle = computed(() => Array.isArray(props.modelValue) ? props.modelValue[0] ?? "" : props.modelValue);
|
|
135
|
+
const selectedValues = computed(() => props.multiple ? toArray(props.modelValue) : modelSingle.value ? [modelSingle.value] : []);
|
|
136
|
+
const hasSelection = computed(() => selectedValues.value.length > 0);
|
|
137
|
+
function labelFor(value) {
|
|
138
|
+
return optionsResolved.value.find((o) => o.value === value)?.label ?? value;
|
|
139
|
+
}
|
|
140
|
+
/** Опции выбранных значений (для chips в multiple). Неизвестные значения показываем как есть. */
|
|
141
|
+
const selectedOptions = computed(() => selectedValues.value.map((v) => optionsResolved.value.find((o) => o.value === v) ?? {
|
|
142
|
+
value: v,
|
|
143
|
+
label: v
|
|
144
|
+
}));
|
|
145
|
+
const singleSelectedLabel = computed(() => props.multiple || !modelSingle.value ? "" : labelFor(modelSingle.value));
|
|
146
|
+
const query = ref("");
|
|
147
|
+
const dirty = ref(false);
|
|
148
|
+
const open = ref(false);
|
|
149
|
+
const activeIndex = ref(-1);
|
|
150
|
+
const rootEl = ref(null);
|
|
151
|
+
const panelEl = ref(null);
|
|
152
|
+
const inputEl = ref(null);
|
|
153
|
+
const clickOutsideExclude = [() => panelEl.value];
|
|
154
|
+
const { floatingStyle } = useFloating(rootEl, panelEl, open, {
|
|
155
|
+
placement: "bottom-start",
|
|
156
|
+
matchWidth: true,
|
|
157
|
+
zIndexVar: "--gr-z-dropdown"
|
|
158
|
+
});
|
|
159
|
+
useEscapeToClose(open, closeDropdown);
|
|
160
|
+
const searchQuery = computed(() => {
|
|
161
|
+
if (!props.filterable) return "";
|
|
162
|
+
if (!props.multiple && !dirty.value) return "";
|
|
163
|
+
return query.value.trim();
|
|
164
|
+
});
|
|
165
|
+
function defaultFilter(option, q) {
|
|
166
|
+
const needle = q.toLowerCase();
|
|
167
|
+
return option.label.toLowerCase().includes(needle) || option.value.toLowerCase().includes(needle);
|
|
168
|
+
}
|
|
169
|
+
const filteredOptions = computed(() => {
|
|
170
|
+
const q = searchQuery.value;
|
|
171
|
+
if (!q) return optionsResolved.value;
|
|
172
|
+
const matcher = props.filter ?? defaultFilter;
|
|
173
|
+
return optionsResolved.value.filter((o) => matcher(o, q));
|
|
174
|
+
});
|
|
175
|
+
const navigableValues = computed(() => filteredOptions.value.filter((o) => !o.disabled).map((o) => o.value));
|
|
176
|
+
const canAddCustom = computed(() => {
|
|
177
|
+
if (!props.allowCustomValue) return false;
|
|
178
|
+
const v = query.value.trim();
|
|
179
|
+
if (!v) return false;
|
|
180
|
+
if (props.multiple && selectedValues.value.includes(v)) return false;
|
|
181
|
+
if (!props.multiple && v === modelSingle.value) return false;
|
|
182
|
+
return !optionsResolved.value.some((o) => o.value === v || o.label === v);
|
|
183
|
+
});
|
|
184
|
+
const belowMinQuery = computed(() => props.minQueryLength > 0 && query.value.trim().length < props.minQueryLength);
|
|
185
|
+
const showLoading = computed(() => props.loading);
|
|
186
|
+
const showEmpty = computed(() => !props.loading && filteredOptions.value.length === 0 && !canAddCustom.value);
|
|
187
|
+
const listboxId = useId();
|
|
188
|
+
function optionDomId(value) {
|
|
189
|
+
return `${listboxId}-opt-${value}`;
|
|
190
|
+
}
|
|
191
|
+
const activeValue = computed(() => activeIndex.value >= 0 ? navigableValues.value[activeIndex.value] : void 0);
|
|
192
|
+
const activeDescendantId = computed(() => open.value && activeValue.value !== void 0 ? optionDomId(activeValue.value) : void 0);
|
|
193
|
+
function isSelected(value) {
|
|
194
|
+
return selectedValues.value.includes(value);
|
|
195
|
+
}
|
|
196
|
+
function clampActive(index) {
|
|
197
|
+
const len = navigableValues.value.length;
|
|
198
|
+
if (len === 0) return -1;
|
|
199
|
+
return (index % len + len) % len;
|
|
200
|
+
}
|
|
201
|
+
async function scrollActiveIntoView() {
|
|
202
|
+
await nextTick();
|
|
203
|
+
const value = activeValue.value;
|
|
204
|
+
if (value === void 0) return;
|
|
205
|
+
document.getElementById(optionDomId(value))?.scrollIntoView?.({ block: "nearest" });
|
|
206
|
+
}
|
|
207
|
+
function setActive(index) {
|
|
208
|
+
activeIndex.value = clampActive(index);
|
|
209
|
+
scrollActiveIntoView();
|
|
210
|
+
}
|
|
211
|
+
function initActiveIndex() {
|
|
212
|
+
const selectedIdx = navigableValues.value.findIndex((v) => isSelected(v));
|
|
213
|
+
activeIndex.value = selectedIdx >= 0 ? selectedIdx : navigableValues.value.length ? 0 : -1;
|
|
214
|
+
}
|
|
215
|
+
watch(navigableValues, () => {
|
|
216
|
+
if (!open.value) return;
|
|
217
|
+
if (activeIndex.value >= navigableValues.value.length) activeIndex.value = navigableValues.value.length - 1;
|
|
218
|
+
if (activeIndex.value < 0 && navigableValues.value.length) activeIndex.value = 0;
|
|
219
|
+
});
|
|
220
|
+
function openDropdown() {
|
|
221
|
+
if (props.disabled || open.value) return;
|
|
222
|
+
open.value = true;
|
|
223
|
+
}
|
|
224
|
+
function closeDropdown() {
|
|
225
|
+
open.value = false;
|
|
226
|
+
}
|
|
227
|
+
function focusInput() {
|
|
228
|
+
inputEl.value?.focus();
|
|
229
|
+
}
|
|
230
|
+
let searchTimer = null;
|
|
231
|
+
function scheduleSearch(value) {
|
|
232
|
+
if (searchTimer) clearTimeout(searchTimer);
|
|
233
|
+
searchTimer = setTimeout(() => {
|
|
234
|
+
if (props.minQueryLength > 0 && value.trim().length < props.minQueryLength) return;
|
|
235
|
+
emit("search", value.trim());
|
|
236
|
+
}, props.debounce);
|
|
237
|
+
}
|
|
238
|
+
onBeforeUnmount(() => {
|
|
239
|
+
if (searchTimer) clearTimeout(searchTimer);
|
|
240
|
+
});
|
|
241
|
+
function onInput(event) {
|
|
242
|
+
const value = event.target.value;
|
|
243
|
+
query.value = value;
|
|
244
|
+
dirty.value = true;
|
|
245
|
+
openDropdown();
|
|
246
|
+
scheduleSearch(value);
|
|
247
|
+
}
|
|
248
|
+
function onFocus() {
|
|
249
|
+
if (props.disabled) return;
|
|
250
|
+
openDropdown();
|
|
251
|
+
}
|
|
252
|
+
function setQuery(value) {
|
|
253
|
+
query.value = value;
|
|
254
|
+
dirty.value = false;
|
|
255
|
+
}
|
|
256
|
+
function selectSingle(value, label) {
|
|
257
|
+
emit("update:modelValue", value);
|
|
258
|
+
setQuery(label);
|
|
259
|
+
closeDropdown();
|
|
260
|
+
}
|
|
261
|
+
function toggleMultiple(value) {
|
|
262
|
+
const next = selectedValues.value.slice();
|
|
263
|
+
const idx = next.indexOf(value);
|
|
264
|
+
if (idx >= 0) next.splice(idx, 1);
|
|
265
|
+
else next.push(value);
|
|
266
|
+
emit("update:modelValue", next);
|
|
267
|
+
setQuery("");
|
|
268
|
+
if (props.closeOnSelect) closeDropdown();
|
|
269
|
+
else nextTick(focusInput);
|
|
270
|
+
}
|
|
271
|
+
function chooseOption(option) {
|
|
272
|
+
if (option.disabled) return;
|
|
273
|
+
if (props.multiple) toggleMultiple(option.value);
|
|
274
|
+
else selectSingle(option.value, option.label);
|
|
275
|
+
}
|
|
276
|
+
function commitCustom() {
|
|
277
|
+
const v = query.value.trim();
|
|
278
|
+
if (!v) return;
|
|
279
|
+
if (props.multiple) toggleMultiple(v);
|
|
280
|
+
else selectSingle(v, v);
|
|
281
|
+
}
|
|
282
|
+
function removeValue(value) {
|
|
283
|
+
const next = selectedValues.value.filter((v) => v !== value);
|
|
284
|
+
emit("update:modelValue", next);
|
|
285
|
+
nextTick(focusInput);
|
|
286
|
+
}
|
|
287
|
+
function clearSelection() {
|
|
288
|
+
if (props.disabled) return;
|
|
289
|
+
emit("update:modelValue", props.multiple ? [] : "");
|
|
290
|
+
setQuery("");
|
|
291
|
+
nextTick(focusInput);
|
|
292
|
+
}
|
|
293
|
+
const showClear = computed(() => resolvedClearable.value && !props.disabled && (hasSelection.value || query.value.length > 0));
|
|
294
|
+
function onKeydown(event) {
|
|
295
|
+
if (props.disabled) return;
|
|
296
|
+
if (!open.value && ["ArrowDown", "ArrowUp"].includes(event.key)) {
|
|
297
|
+
event.preventDefault();
|
|
298
|
+
openDropdown();
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
switch (event.key) {
|
|
302
|
+
case "ArrowDown":
|
|
303
|
+
event.preventDefault();
|
|
304
|
+
setActive(activeIndex.value + 1);
|
|
305
|
+
break;
|
|
306
|
+
case "ArrowUp":
|
|
307
|
+
event.preventDefault();
|
|
308
|
+
setActive(activeIndex.value - 1);
|
|
309
|
+
break;
|
|
310
|
+
case "Home":
|
|
311
|
+
if (!open.value) break;
|
|
312
|
+
event.preventDefault();
|
|
313
|
+
setActive(0);
|
|
314
|
+
break;
|
|
315
|
+
case "End":
|
|
316
|
+
if (!open.value) break;
|
|
317
|
+
event.preventDefault();
|
|
318
|
+
setActive(navigableValues.value.length - 1);
|
|
319
|
+
break;
|
|
320
|
+
case "Enter":
|
|
321
|
+
if (!open.value) break;
|
|
322
|
+
event.preventDefault();
|
|
323
|
+
if (activeValue.value !== void 0) {
|
|
324
|
+
const opt = filteredOptions.value.find((o) => o.value === activeValue.value);
|
|
325
|
+
if (opt) chooseOption(opt);
|
|
326
|
+
} else if (canAddCustom.value) commitCustom();
|
|
327
|
+
break;
|
|
328
|
+
case "Backspace":
|
|
329
|
+
if (props.multiple && query.value === "" && selectedValues.value.length) {
|
|
330
|
+
event.preventDefault();
|
|
331
|
+
removeValue(selectedValues.value[selectedValues.value.length - 1]);
|
|
332
|
+
}
|
|
333
|
+
break;
|
|
334
|
+
case "Tab":
|
|
335
|
+
closeDropdown();
|
|
336
|
+
break;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
watch([singleSelectedLabel, () => props.multiple], ([label, multiple]) => {
|
|
340
|
+
if (multiple) return;
|
|
341
|
+
if (open.value || dirty.value) return;
|
|
342
|
+
setQuery(label);
|
|
343
|
+
}, { immediate: true });
|
|
344
|
+
watch(open, (isOpen) => {
|
|
345
|
+
if (isOpen) {
|
|
346
|
+
initActiveIndex();
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
activeIndex.value = -1;
|
|
350
|
+
if (props.multiple) setQuery("");
|
|
351
|
+
else setQuery(singleSelectedLabel.value);
|
|
352
|
+
});
|
|
353
|
+
const ariaAutocomplete = computed(() => props.allowCustomValue ? "both" : "list");
|
|
354
|
+
return (_ctx, _cache) => {
|
|
355
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
356
|
+
ref_key: "rootEl",
|
|
357
|
+
ref: rootEl,
|
|
358
|
+
"data-gr-autocomplete": "",
|
|
359
|
+
class: "relative w-full"
|
|
360
|
+
}, [createElementVNode("div", {
|
|
361
|
+
"data-gr-autocomplete-shell": "",
|
|
362
|
+
class: normalizeClass(unref(autocompleteShellClass)({
|
|
363
|
+
size: unref(resolvedSize),
|
|
364
|
+
disabled: __props.disabled,
|
|
365
|
+
invalid: isInvalid.value
|
|
366
|
+
})),
|
|
367
|
+
onMousedown: withModifiers(focusInput, ["self", "prevent"])
|
|
368
|
+
}, [
|
|
369
|
+
__props.multiple ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(selectedOptions.value, (option) => {
|
|
370
|
+
return openBlock(), createElementBlock("span", {
|
|
371
|
+
key: option.value,
|
|
372
|
+
"data-gr-autocomplete-chip": "",
|
|
373
|
+
class: normalizeClass(unref(autocompleteChipClass))
|
|
374
|
+
}, [createElementVNode("span", _hoisted_1, toDisplayString(option.label), 1), !__props.disabled ? (openBlock(), createElementBlock("button", {
|
|
375
|
+
key: 0,
|
|
376
|
+
type: "button",
|
|
377
|
+
"data-gr-autocomplete-chip-remove": "",
|
|
378
|
+
class: "inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full text-[var(--gr-muted-fg)] hover:text-[var(--gr-fg)]",
|
|
379
|
+
"aria-label": unref(t)("gr.inputTag.removeTag", "Remove tag"),
|
|
380
|
+
tabindex: "-1",
|
|
381
|
+
onClick: ($event) => removeValue(option.value)
|
|
382
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("span", {
|
|
383
|
+
class: "i-lucide-x block h-3 w-3",
|
|
384
|
+
"aria-hidden": "true"
|
|
385
|
+
}, null, -1)])], 8, _hoisted_2)) : createCommentVNode("", true)], 2);
|
|
386
|
+
}), 128)) : createCommentVNode("", true),
|
|
387
|
+
createElementVNode("input", {
|
|
388
|
+
id: resolvedId.value,
|
|
389
|
+
ref_key: "inputEl",
|
|
390
|
+
ref: inputEl,
|
|
391
|
+
"data-gr-autocomplete-input": "",
|
|
392
|
+
"data-testid": "gr-autocomplete-input",
|
|
393
|
+
type: "text",
|
|
394
|
+
autocomplete: "off",
|
|
395
|
+
spellcheck: "false",
|
|
396
|
+
role: "combobox",
|
|
397
|
+
value: query.value,
|
|
398
|
+
disabled: __props.disabled,
|
|
399
|
+
placeholder: hasSelection.value && __props.multiple ? void 0 : __props.placeholder,
|
|
400
|
+
"aria-label": __props.ariaLabel,
|
|
401
|
+
"aria-invalid": isInvalid.value ? "true" : void 0,
|
|
402
|
+
"aria-describedby": describedBy.value,
|
|
403
|
+
"aria-required": isRequired.value ? "true" : void 0,
|
|
404
|
+
"aria-haspopup": "listbox",
|
|
405
|
+
"aria-autocomplete": ariaAutocomplete.value,
|
|
406
|
+
"aria-controls": open.value ? unref(listboxId) : void 0,
|
|
407
|
+
"aria-activedescendant": activeDescendantId.value,
|
|
408
|
+
"aria-expanded": open.value ? "true" : "false",
|
|
409
|
+
class: "min-w-0 flex-1 bg-transparent text-inherit placeholder:text-[var(--gr-muted-fg)] focus:outline-none disabled:cursor-not-allowed",
|
|
410
|
+
onInput,
|
|
411
|
+
onFocus,
|
|
412
|
+
onKeydown
|
|
413
|
+
}, null, 40, _hoisted_3),
|
|
414
|
+
__props.loading ? (openBlock(), createElementBlock("span", _hoisted_4, [..._cache[1] || (_cache[1] = [createElementVNode("span", {
|
|
415
|
+
class: "i-lucide-loader-2 block h-4 w-4 animate-spin",
|
|
416
|
+
"aria-hidden": "true"
|
|
417
|
+
}, null, -1)])])) : showClear.value ? (openBlock(), createElementBlock("button", {
|
|
418
|
+
key: 2,
|
|
419
|
+
type: "button",
|
|
420
|
+
"data-testid": "gr-autocomplete-clear",
|
|
421
|
+
"data-gr-autocomplete-clear": "",
|
|
422
|
+
class: "shrink-0 inline-flex h-5 w-5 items-center justify-center rounded-md text-[var(--gr-muted-fg)] hover:text-[var(--gr-fg)]",
|
|
423
|
+
"aria-label": resolvedClearLabel.value,
|
|
424
|
+
tabindex: "-1",
|
|
425
|
+
onClick: clearSelection
|
|
426
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("span", {
|
|
427
|
+
class: "i-lucide-x block h-4 w-4",
|
|
428
|
+
"aria-hidden": "true"
|
|
429
|
+
}, null, -1)])], 8, _hoisted_5)) : (openBlock(), createElementBlock("span", _hoisted_6, [..._cache[3] || (_cache[3] = [createElementVNode("span", {
|
|
430
|
+
class: "i-lucide-chevron-down block h-4 w-4",
|
|
431
|
+
"aria-hidden": "true"
|
|
432
|
+
}, null, -1)])]))
|
|
433
|
+
], 34), (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, {
|
|
434
|
+
"enter-active-class": "transition ease-out duration-150",
|
|
435
|
+
"enter-from-class": "transform opacity-0 scale-95",
|
|
436
|
+
"enter-to-class": "transform opacity-100 scale-100",
|
|
437
|
+
"leave-active-class": "transition ease-in duration-100",
|
|
438
|
+
"leave-from-class": "transform opacity-100 scale-100",
|
|
439
|
+
"leave-to-class": "transform opacity-0 scale-95"
|
|
440
|
+
}, {
|
|
441
|
+
default: withCtx(() => [withDirectives(createElementVNode("div", {
|
|
442
|
+
ref_key: "panelEl",
|
|
443
|
+
ref: panelEl,
|
|
444
|
+
"data-testid": "gr-autocomplete-panel",
|
|
445
|
+
"data-gr-autocomplete-panel": "",
|
|
446
|
+
style: normalizeStyle(unref(floatingStyle))
|
|
447
|
+
}, [createElementVNode("div", { class: normalizeClass(unref(autocompletePanelClasses)) }, [createElementVNode("div", {
|
|
448
|
+
id: unref(listboxId),
|
|
449
|
+
"data-gr-autocomplete-listbox": "",
|
|
450
|
+
class: "p-1 overflow-auto",
|
|
451
|
+
style: normalizeStyle({ maxHeight: `${__props.dropdownMaxHeight}px` }),
|
|
452
|
+
role: "listbox",
|
|
453
|
+
"aria-multiselectable": __props.multiple ? "true" : void 0
|
|
454
|
+
}, [
|
|
455
|
+
canAddCustom.value ? (openBlock(), createElementBlock("button", {
|
|
456
|
+
key: 0,
|
|
457
|
+
type: "button",
|
|
458
|
+
"data-testid": "gr-autocomplete-add-option",
|
|
459
|
+
"data-gr-autocomplete-add-option": "",
|
|
460
|
+
class: "w-full rounded-[10px] px-3 py-2 text-left text-[13px] hover:bg-[color-mix(in_srgb,var(--gr-muted)_30%,transparent)]",
|
|
461
|
+
onClick: commitCustom
|
|
462
|
+
}, toDisplayString(unref(t)("gr.autocomplete.addOption", "Add \"{value}\"", { value: query.value.trim() })), 1)) : createCommentVNode("", true),
|
|
463
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredOptions.value, (option) => {
|
|
464
|
+
return openBlock(), createElementBlock("button", {
|
|
465
|
+
id: optionDomId(option.value),
|
|
466
|
+
key: option.value,
|
|
467
|
+
"data-gr-autocomplete-option": "",
|
|
468
|
+
type: "button",
|
|
469
|
+
role: "option",
|
|
470
|
+
disabled: option.disabled,
|
|
471
|
+
"aria-selected": isSelected(option.value) ? "true" : "false",
|
|
472
|
+
"aria-disabled": option.disabled ? "true" : void 0,
|
|
473
|
+
class: normalizeClass(["w-full rounded-[10px] px-3 py-2 text-left text-[13px]", [option.disabled ? "cursor-not-allowed opacity-50" : "hover:bg-[color-mix(in_srgb,var(--gr-muted)_30%,transparent)]", activeValue.value === option.value && !option.disabled ? "bg-[color-mix(in_srgb,var(--gr-muted)_30%,transparent)]" : ""]]),
|
|
474
|
+
onClick: ($event) => chooseOption(option),
|
|
475
|
+
onMousemove: ($event) => activeIndex.value = navigableValues.value.indexOf(option.value)
|
|
476
|
+
}, [renderSlot(_ctx.$slots, "option", {
|
|
477
|
+
option,
|
|
478
|
+
selected: isSelected(option.value)
|
|
479
|
+
}, () => [createElementVNode("span", _hoisted_9, [createElementVNode("span", {
|
|
480
|
+
class: normalizeClass(["inline-block h-4 w-4 shrink-0", isSelected(option.value) ? "i-lucide-check text-[var(--gr-primary)]" : ""]),
|
|
481
|
+
"aria-hidden": "true"
|
|
482
|
+
}, null, 2), createElementVNode("span", _hoisted_10, toDisplayString(option.label), 1)])])], 42, _hoisted_8);
|
|
483
|
+
}), 128)),
|
|
484
|
+
showLoading.value ? (openBlock(), createElementBlock("div", _hoisted_11, [renderSlot(_ctx.$slots, "loading", {}, () => [_cache[4] || (_cache[4] = createElementVNode("span", {
|
|
485
|
+
class: "i-lucide-loader-2 block h-4 w-4 animate-spin",
|
|
486
|
+
"aria-hidden": "true"
|
|
487
|
+
}, null, -1)), createElementVNode("span", null, toDisplayString(resolvedLoadingText.value), 1)])])) : showEmpty.value && belowMinQuery.value ? (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(resolvedTypeMoreText.value), 1)) : showEmpty.value ? (openBlock(), createElementBlock("div", _hoisted_13, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(resolvedNoResultsText.value), 1)])])) : createCommentVNode("", true)
|
|
488
|
+
], 12, _hoisted_7)], 2)], 4), [[vShow, open.value]])]),
|
|
489
|
+
_: 3
|
|
490
|
+
})]))])), [[unref(vClickOutside), {
|
|
491
|
+
handler: closeDropdown,
|
|
492
|
+
enabled: open.value,
|
|
493
|
+
exclude: clickOutsideExclude
|
|
494
|
+
}]]);
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
//#endregion
|
|
499
|
+
export { GrAutocomplete_default as t };
|