@feugene/granularity 0.4.0 → 0.4.2
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/chunks/_plugin-vue_export-helper-BG_EqiDU.js +8 -0
- package/dist/chunks/adapter-K6zZTzBi.js +4 -0
- package/dist/chunks/adapter-K6zZTzBi.js.map +1 -0
- package/dist/chunks/arrow-up-DNXrMoAI.js +23 -0
- package/dist/chunks/arrow-up-DNXrMoAI.js.map +1 -0
- package/dist/chunks/classTokens-BPeBXNzu.js +6 -0
- package/dist/chunks/classTokens-BPeBXNzu.js.map +1 -0
- package/dist/chunks/config-1I95Zy4V.js +14 -0
- package/dist/chunks/config-1I95Zy4V.js.map +1 -0
- package/dist/chunks/config-2wgwWaAB.js +8 -0
- package/dist/chunks/config-2wgwWaAB.js.map +1 -0
- package/dist/chunks/config-BA0BWYzs.js +8 -0
- package/dist/chunks/config-BA0BWYzs.js.map +1 -0
- package/dist/chunks/config-BCPyma1I.js +8 -0
- package/dist/chunks/config-BCPyma1I.js.map +1 -0
- package/dist/chunks/config-BDlh6iNz.js +24 -0
- package/dist/chunks/config-BDlh6iNz.js.map +1 -0
- package/dist/chunks/config-BKRmlivc.js +8 -0
- package/dist/chunks/config-BKRmlivc.js.map +1 -0
- package/dist/chunks/config-BN-B2K4r.js +17 -0
- package/dist/chunks/config-BN-B2K4r.js.map +1 -0
- package/dist/chunks/config-BNOf_qjD.js +40 -0
- package/dist/chunks/config-BNOf_qjD.js.map +1 -0
- package/dist/chunks/config-BaMO9dQh.js +20 -0
- package/dist/chunks/config-BaMO9dQh.js.map +1 -0
- package/dist/chunks/config-Bv2G0OU6.js +8 -0
- package/dist/chunks/config-Bv2G0OU6.js.map +1 -0
- package/dist/chunks/config-BvuQUBtZ.js +21 -0
- package/dist/chunks/config-BvuQUBtZ.js.map +1 -0
- package/dist/chunks/config-BzZGpWsj.js +9 -0
- package/dist/chunks/config-BzZGpWsj.js.map +1 -0
- package/dist/chunks/config-C0j836dC.js +8 -0
- package/dist/chunks/config-C0j836dC.js.map +1 -0
- package/dist/chunks/config-C2iI7_QX.js +9 -0
- package/dist/chunks/config-C2iI7_QX.js.map +1 -0
- package/dist/chunks/config-C4AlNm912.js +13 -0
- package/dist/chunks/config-C4AlNm912.js.map +1 -0
- package/dist/chunks/config-C5SJXHQ4.js +9 -0
- package/dist/chunks/config-C5SJXHQ4.js.map +1 -0
- package/dist/chunks/config-C6SBJxcH.js +8 -0
- package/dist/chunks/config-C6SBJxcH.js.map +1 -0
- package/dist/chunks/config-CByfsV-z2.js +9 -0
- package/dist/chunks/config-CByfsV-z2.js.map +1 -0
- package/dist/chunks/config-CM7nbATU2.js +78 -0
- package/dist/chunks/config-CM7nbATU2.js.map +1 -0
- package/dist/chunks/config-CMZE2fu0.js +9 -0
- package/dist/chunks/config-CMZE2fu0.js.map +1 -0
- package/dist/chunks/config-CU_CBd0k.js +22 -0
- package/dist/chunks/config-CU_CBd0k.js.map +1 -0
- package/dist/chunks/config-CUgvsjZx.js +171 -0
- package/dist/chunks/config-CUgvsjZx.js.map +1 -0
- package/dist/chunks/config-CWvHiaqr2.js +23 -0
- package/dist/chunks/config-CWvHiaqr2.js.map +1 -0
- package/dist/chunks/config-Cf0J6wCX.js +58 -0
- package/dist/chunks/config-Cf0J6wCX.js.map +1 -0
- package/dist/chunks/config-CgAY2WP9.js +9 -0
- package/dist/chunks/config-CgAY2WP9.js.map +1 -0
- package/dist/chunks/config-Cgc-D1K4.js +9 -0
- package/dist/chunks/config-Cgc-D1K4.js.map +1 -0
- package/dist/chunks/config-D19pyP4D.js +35 -0
- package/dist/chunks/config-D19pyP4D.js.map +1 -0
- package/dist/chunks/config-DCQO6H6h.js +11 -0
- package/dist/chunks/config-DCQO6H6h.js.map +1 -0
- package/dist/chunks/config-DEv4m-ZP.js +58 -0
- package/dist/chunks/config-DEv4m-ZP.js.map +1 -0
- package/dist/chunks/config-DFRYOcrP.js +9 -0
- package/dist/chunks/config-DFRYOcrP.js.map +1 -0
- package/dist/chunks/config-DTpwUHgF.js +9 -0
- package/dist/chunks/config-DTpwUHgF.js.map +1 -0
- package/dist/chunks/config-DW_RqmUp.js +8 -0
- package/dist/chunks/config-DW_RqmUp.js.map +1 -0
- package/dist/chunks/config-Da90XGsi.js +38 -0
- package/dist/chunks/config-Da90XGsi.js.map +1 -0
- package/dist/chunks/config-DgRJlF00.js +53 -0
- package/dist/chunks/config-DgRJlF00.js.map +1 -0
- package/dist/chunks/config-Dkq0HeLe.js +9 -0
- package/dist/chunks/config-Dkq0HeLe.js.map +1 -0
- package/dist/chunks/config-DmI1IQvI2.js +8 -0
- package/dist/chunks/config-DmI1IQvI2.js.map +1 -0
- package/dist/chunks/config-Dnu4VuO0.js +8 -0
- package/dist/chunks/config-Dnu4VuO0.js.map +1 -0
- package/dist/chunks/config-DxqpV-KM.js +45 -0
- package/dist/chunks/config-DxqpV-KM.js.map +1 -0
- package/dist/chunks/config-TyzU6gLf.js +8 -0
- package/dist/chunks/config-TyzU6gLf.js.map +1 -0
- package/dist/chunks/config-XwI6t8cn.js +39 -0
- package/dist/chunks/config-XwI6t8cn.js.map +1 -0
- package/dist/chunks/config-bpQYM5O-.js +44 -0
- package/dist/chunks/config-bpQYM5O-.js.map +1 -0
- package/dist/chunks/config-etXh7Bsr2.js +9 -0
- package/dist/chunks/config-etXh7Bsr2.js.map +1 -0
- package/dist/chunks/config-fCcRwjIB.js +13 -0
- package/dist/chunks/config-fCcRwjIB.js.map +1 -0
- package/dist/chunks/config-nfOMJXVs.js +9 -0
- package/dist/chunks/config-nfOMJXVs.js.map +1 -0
- package/dist/chunks/config-qJXIIY1E.js +8 -0
- package/dist/chunks/config-qJXIIY1E.js.map +1 -0
- package/dist/chunks/config-r6hzn2Bn2.js +9 -0
- package/dist/chunks/config-r6hzn2Bn2.js.map +1 -0
- package/dist/chunks/config-rQlbnEKn.js +8 -0
- package/dist/chunks/config-rQlbnEKn.js.map +1 -0
- package/dist/chunks/dialogShared-BtXUk6Zc.js +32 -0
- package/dist/chunks/dialogShared-BtXUk6Zc.js.map +1 -0
- package/dist/chunks/en-BeJa78lP.js +48 -0
- package/dist/chunks/en-BeJa78lP.js.map +1 -0
- package/dist/chunks/es-BPqm7rLm.js +20 -0
- package/dist/chunks/es-BPqm7rLm.js.map +1 -0
- package/dist/chunks/es-axYOwwWD.js +48 -0
- package/dist/chunks/es-axYOwwWD.js.map +1 -0
- package/dist/chunks/fileValidation-CwJA8Vmn.js +219 -0
- package/dist/chunks/fileValidation-CwJA8Vmn.js.map +1 -0
- package/dist/chunks/{grBadgeStyles-Bu4H8bFc.js → grBadgeStyles-pqqbVgLk.js} +18 -13
- package/dist/chunks/grBadgeStyles-pqqbVgLk.js.map +1 -0
- package/dist/chunks/{grButtonStyles-C5k0bN2e.js → grButtonStyles-BxZW2x0-.js} +60 -52
- package/dist/chunks/grButtonStyles-BxZW2x0-.js.map +1 -0
- package/dist/chunks/{grDropdownStyles-149X1NeB.js → grDropdownStyles-DMp7RrI9.js} +10 -9
- package/dist/chunks/grDropdownStyles-DMp7RrI9.js.map +1 -0
- package/dist/chunks/grLoadingStyles-CrxZHFL0.js +17 -0
- package/dist/chunks/grLoadingStyles-CrxZHFL0.js.map +1 -0
- package/dist/chunks/{grModalStyles-Dmd4havY.js → grModalStyles-Dv2NXBKi.js} +20 -11
- package/dist/chunks/grModalStyles-Dv2NXBKi.js.map +1 -0
- package/dist/chunks/grSelectStyles-B7doeAQp.js +50 -0
- package/dist/chunks/grSelectStyles-B7doeAQp.js.map +1 -0
- package/dist/chunks/granularityI18n-GCqUz_lo.js +26 -0
- package/dist/chunks/granularityI18n-GCqUz_lo.js.map +1 -0
- package/dist/chunks/info-C0bHmdZq.js +26 -0
- package/dist/chunks/info-C0bHmdZq.js.map +1 -0
- package/dist/chunks/loader-circle-B2rWDk5u.js +23 -0
- package/dist/chunks/loader-circle-B2rWDk5u.js.map +1 -0
- package/dist/chunks/ru-Dqh-2C00.js +48 -0
- package/dist/chunks/ru-Dqh-2C00.js.map +1 -0
- package/dist/chunks/safelist-BF822K15.js +13 -0
- package/dist/chunks/safelist-BF822K15.js.map +1 -0
- package/dist/chunks/safelist-BY7z8fOl.js +24 -0
- package/dist/chunks/safelist-BY7z8fOl.js.map +1 -0
- package/dist/chunks/{shared-BqUqjuxn.js → shared-Cu5QkNmt.js} +149 -111
- package/dist/chunks/shared-Cu5QkNmt.js.map +1 -0
- package/dist/chunks/transition-mJ3PZCHH.js +1692 -0
- package/dist/chunks/transition-mJ3PZCHH.js.map +1 -0
- package/dist/chunks/x-Pa6C2hwi.js +23 -0
- package/dist/chunks/x-Pa6C2hwi.js.map +1 -0
- package/dist/chunks/x-circle-DQSlBLmX.js +67 -0
- package/dist/chunks/x-circle-DQSlBLmX.js.map +1 -0
- package/dist/components/GrAlert/chunks/GrAlert-BjerGcU8.js +146 -0
- package/dist/components/GrAlert/chunks/GrAlert-BjerGcU8.js.map +1 -0
- package/dist/components/GrAlert/index.js +3 -3
- package/dist/components/GrAvatar/chunks/GrAvatar-BjnPKNAL.js +41 -0
- package/dist/components/GrAvatar/chunks/GrAvatar-BjnPKNAL.js.map +1 -0
- package/dist/components/GrAvatar/index.js +3 -3
- package/dist/components/GrBadge/chunks/GrBadge-wuIb4_2K.js +32 -0
- package/dist/components/GrBadge/chunks/GrBadge-wuIb4_2K.js.map +1 -0
- package/dist/components/GrBadge/index.js +3 -3
- package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-CxtamOZ-.js +33 -0
- package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-CxtamOZ-.js.map +1 -0
- package/dist/components/GrBadgeWrap/index.js +3 -3
- package/dist/components/GrBottomNav/chunks/GrBottomNav-CsmQ7mTJ.js +31 -0
- package/dist/components/GrBottomNav/chunks/GrBottomNav-CsmQ7mTJ.js.map +1 -0
- package/dist/components/GrBottomNav/index.js +3 -3
- package/dist/components/GrButton/chunks/GrButton-BmGdp8-4.js +83 -0
- package/dist/components/GrButton/chunks/GrButton-BmGdp8-4.js.map +1 -0
- package/dist/components/GrButton/index.js +5 -5
- package/dist/components/GrButtonGroup/chunks/GrButtonGroup-CBj4tpms.js +21 -0
- package/dist/components/GrButtonGroup/chunks/GrButtonGroup-CBj4tpms.js.map +1 -0
- package/dist/components/GrButtonGroup/index.js +3 -3
- package/dist/components/GrCard/chunks/GrCard-xtDcXBr7.js +11 -0
- package/dist/components/GrCard/chunks/GrCard-xtDcXBr7.js.map +1 -0
- package/dist/components/GrCard/index.js +3 -3
- package/dist/components/GrCheckbox/chunks/GrCheckbox-Bt3d7ckE.js +134 -0
- package/dist/components/GrCheckbox/chunks/GrCheckbox-Bt3d7ckE.js.map +1 -0
- package/dist/components/GrCheckbox/index.js +3 -3
- package/dist/components/GrCollapse/chunks/GrCollapse-HU20VTVn.js +205 -0
- package/dist/components/GrCollapse/chunks/GrCollapse-HU20VTVn.js.map +1 -0
- package/dist/components/GrCollapse/index.js +3 -3
- package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-DjGOX9Hd.js +131 -0
- package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-DjGOX9Hd.js.map +1 -0
- package/dist/components/GrConfirmDialog/index.js +3 -3
- package/dist/components/GrDataTable/chunks/GrDataTable-QDOJWmdY.js +179 -0
- package/dist/components/GrDataTable/chunks/GrDataTable-QDOJWmdY.js.map +1 -0
- package/dist/components/GrDataTable/index.js +3 -3
- package/dist/components/GrDialog/chunks/GrDialog-gObmaVEl.js +221 -0
- package/dist/components/GrDialog/chunks/GrDialog-gObmaVEl.js.map +1 -0
- package/dist/components/GrDialog/index.js +4 -4
- package/dist/components/GrDrawer/chunks/GrDrawer-BJL_gTxI.js +156 -0
- package/dist/components/GrDrawer/chunks/GrDrawer-BJL_gTxI.js.map +1 -0
- package/dist/components/GrDrawer/index.js +3 -3
- package/dist/components/GrDropdown/chunks/GrDropdown-BkACCXdp.js +151 -0
- package/dist/components/GrDropdown/chunks/GrDropdown-BkACCXdp.js.map +1 -0
- package/dist/components/GrDropdown/index.js +3 -3
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-BEenXrJw.js +309 -0
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-BEenXrJw.js.map +1 -0
- package/dist/components/GrDropdownMenu/index.js +3 -3
- package/dist/components/GrEmptyState/chunks/GrEmptyState-BLbMJFW-.js +62 -0
- package/dist/components/GrEmptyState/chunks/GrEmptyState-BLbMJFW-.js.map +1 -0
- package/dist/components/GrEmptyState/index.js +3 -3
- package/dist/components/GrFileUpload/chunks/GrFileUpload-u01j9S0t.js +368 -0
- package/dist/components/GrFileUpload/chunks/GrFileUpload-u01j9S0t.js.map +1 -0
- package/dist/components/GrFileUpload/index.js +4 -4
- package/dist/components/GrFormField/chunks/GrFormField-C6PfAs4u.js +35 -0
- package/dist/components/GrFormField/chunks/GrFormField-C6PfAs4u.js.map +1 -0
- package/dist/components/GrFormField/index.js +3 -3
- package/dist/components/GrFormFile/chunks/GrFormFile-DdM8Bc2B.js +313 -0
- package/dist/components/GrFormFile/chunks/GrFormFile-DdM8Bc2B.js.map +1 -0
- package/dist/components/GrFormFile/index.js +3 -3
- package/dist/components/GrFormSection/chunks/GrFormSection-5djEaQZQ.js +35 -0
- package/dist/components/GrFormSection/chunks/GrFormSection-5djEaQZQ.js.map +1 -0
- package/dist/components/GrFormSection/index.js +3 -3
- package/dist/components/GrIcon/chunks/GrIcon-BV7RBU_0.js +32 -0
- package/dist/components/GrIcon/chunks/GrIcon-BV7RBU_0.js.map +1 -0
- package/dist/components/GrIcon/index.js +3 -3
- package/dist/components/GrImageViewer/chunks/GrImageViewer-CjSnohW7.js +397 -0
- package/dist/components/GrImageViewer/chunks/GrImageViewer-CjSnohW7.js.map +1 -0
- package/dist/components/GrImageViewer/index.js +3 -3
- package/dist/components/GrInput/chunks/GrInput-ghxaTf6d.js +211 -0
- package/dist/components/GrInput/chunks/GrInput-ghxaTf6d.js.map +1 -0
- package/dist/components/GrInput/index.js +3 -3
- package/dist/components/GrInputTag/chunks/GrInputTag-B0x4U0Yk.js +257 -0
- package/dist/components/GrInputTag/chunks/GrInputTag-B0x4U0Yk.js.map +1 -0
- package/dist/components/GrInputTag/index.js +3 -3
- package/dist/components/GrLink/chunks/GrLink-C7-Y1u88.js +80 -0
- package/dist/components/GrLink/chunks/GrLink-C7-Y1u88.js.map +1 -0
- package/dist/components/GrLink/index.js +3 -3
- package/dist/components/GrList/chunks/GrList--Ib4zLNw.js +77 -0
- package/dist/components/GrList/chunks/GrList--Ib4zLNw.js.map +1 -0
- package/dist/components/GrList/index.js +3 -3
- package/dist/components/GrLoading/chunks/GrLoading-C3QZKwE-.js +69 -0
- package/dist/components/GrLoading/chunks/GrLoading-C3QZKwE-.js.map +1 -0
- package/dist/components/GrLoading/index.js +3 -3
- package/dist/components/GrModal/chunks/GrModal-gvfvlp7k.js +168 -0
- package/dist/components/GrModal/chunks/GrModal-gvfvlp7k.js.map +1 -0
- package/dist/components/GrModal/index.js +4 -4
- package/dist/components/GrNavbar/chunks/GrNavbar-nIyuiVj1.js +75 -0
- package/dist/components/GrNavbar/chunks/GrNavbar-nIyuiVj1.js.map +1 -0
- package/dist/components/GrNavbar/index.js +3 -3
- package/dist/components/GrNumberInput/chunks/GrNumberInput-B0mPLjdv.js +397 -0
- package/dist/components/GrNumberInput/chunks/GrNumberInput-B0mPLjdv.js.map +1 -0
- package/dist/components/GrNumberInput/index.js +3 -3
- package/dist/components/GrPagination/chunks/GrPagination-BSTO6flk.js +114 -0
- package/dist/components/GrPagination/chunks/GrPagination-BSTO6flk.js.map +1 -0
- package/dist/components/GrPagination/index.js +3 -3
- package/dist/components/GrProgressBar/chunks/GrProgressBar-MvMnzsJl.js +39 -0
- package/dist/components/GrProgressBar/chunks/GrProgressBar-MvMnzsJl.js.map +1 -0
- package/dist/components/GrProgressBar/index.js +3 -3
- package/dist/components/GrPromptDialog/chunks/GrPromptDialog-DKhbN6ji.js +190 -0
- package/dist/components/GrPromptDialog/chunks/GrPromptDialog-DKhbN6ji.js.map +1 -0
- package/dist/components/GrPromptDialog/index.js +3 -3
- package/dist/components/GrRadio/chunks/GrRadio-BxBs3WHq.js +184 -0
- package/dist/components/GrRadio/chunks/GrRadio-BxBs3WHq.js.map +1 -0
- package/dist/components/GrRadio/index.js +3 -3
- package/dist/components/GrRadioGroup/chunks/GrRadioGroup-CEAfJQ6A.js +80 -0
- package/dist/components/GrRadioGroup/chunks/GrRadioGroup-CEAfJQ6A.js.map +1 -0
- package/dist/components/GrRadioGroup/index.js +3 -3
- package/dist/components/GrSegmented/chunks/GrSegmented-Bwn2qOY4.js +323 -0
- package/dist/components/GrSegmented/chunks/GrSegmented-Bwn2qOY4.js.map +1 -0
- package/dist/components/GrSegmented/index.js +3 -3
- package/dist/components/GrSelect/chunks/GrSelect-9wRWAu2R.js +443 -0
- package/dist/components/GrSelect/chunks/GrSelect-9wRWAu2R.js.map +1 -0
- package/dist/components/GrSelect/index.js +3 -3
- package/dist/components/GrSidebar/chunks/GrSidebar-CSZ3RpFB.js +44 -0
- package/dist/components/GrSidebar/chunks/GrSidebar-CSZ3RpFB.js.map +1 -0
- package/dist/components/GrSidebar/index.js +3 -3
- package/dist/components/GrSkeleton/chunks/GrSkeleton-DKXkqWDa.js +33 -0
- package/dist/components/GrSkeleton/chunks/GrSkeleton-DKXkqWDa.js.map +1 -0
- package/dist/components/GrSkeleton/index.js +3 -3
- package/dist/components/GrSwitch/chunks/GrSwitch-CdBxwV3k.js +79 -0
- package/dist/components/GrSwitch/chunks/GrSwitch-CdBxwV3k.js.map +1 -0
- package/dist/components/GrSwitch/index.js +3 -3
- package/dist/components/GrTable/chunks/GrTable-CyQ9uw8A.js +57 -0
- package/dist/components/GrTable/chunks/GrTable-CyQ9uw8A.js.map +1 -0
- package/dist/components/GrTable/index.js +3 -3
- package/dist/components/GrTabs/chunks/GrTabs-BpF8AAUz.js +118 -0
- package/dist/components/GrTabs/chunks/GrTabs-BpF8AAUz.js.map +1 -0
- package/dist/components/GrTabs/index.js +3 -3
- package/dist/components/GrTextarea/chunks/GrTextarea-DFS9ZkrA.js +71 -0
- package/dist/components/GrTextarea/chunks/GrTextarea-DFS9ZkrA.js.map +1 -0
- package/dist/components/GrTextarea/index.js +3 -3
- package/dist/components/GrToaster/chunks/GrToaster-3Mf0Moxt.js +171 -0
- package/dist/components/GrToaster/chunks/GrToaster-3Mf0Moxt.js.map +1 -0
- package/dist/components/GrToaster/index.js +3 -3
- package/dist/components/GrTooltip/chunks/GrTooltip-BvmsukLW.js +55 -0
- package/dist/components/GrTooltip/chunks/GrTooltip-BvmsukLW.js.map +1 -0
- package/dist/components/GrTooltip/index.js +3 -3
- package/dist/components/GrTree/chunks/GrTree-C2kN-O4Q.js +734 -0
- package/dist/components/GrTree/chunks/GrTree-C2kN-O4Q.js.map +1 -0
- package/dist/components/GrTree/index.js +3 -3
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-Da-CpRqm.js +454 -0
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-Da-CpRqm.js.map +1 -0
- package/dist/components/GrTreeSelect/index.js +3 -3
- package/dist/composables/useTheme.js +39 -30
- package/dist/composables/useTheme.js.map +1 -0
- package/dist/composables/useToast.js +41 -34
- package/dist/composables/useToast.js.map +1 -0
- package/dist/directives/autofocus.js +55 -0
- package/dist/directives/autofocus.js.map +1 -0
- package/dist/directives/autosize.js +117 -0
- package/dist/directives/autosize.js.map +1 -0
- package/dist/directives/clickOutside.js +96 -0
- package/dist/directives/clickOutside.js.map +1 -0
- package/dist/directives/dropzone.js +164 -0
- package/dist/directives/dropzone.js.map +1 -0
- package/dist/directives/hotkey.js +138 -0
- package/dist/directives/hotkey.js.map +1 -0
- package/dist/directives/index.js +7 -2
- package/dist/directives/loading.js +163 -0
- package/dist/directives/loading.js.map +1 -0
- package/dist/fileValidation/index.js +2 -2
- package/dist/granular-provider-node.js +23 -14
- package/dist/granular-provider-node.js.map +1 -0
- package/dist/granular-provider.js +3 -3
- package/dist/granular-provider.js.map +1 -0
- package/dist/i18n/all.js +6 -6
- package/dist/i18n/all.js.map +1 -0
- package/dist/i18n/index.js +3 -3
- package/dist/index.js +110 -105
- package/dist/vue/index.js +64 -26
- package/dist/vue/index.js.map +1 -0
- package/package.json +25 -1
- package/dist/chunks/_plugin-vue_export-helper-CHO2XVys.js +0 -8
- package/dist/chunks/adapter-D5uYoOZj.js +0 -4
- package/dist/chunks/arrow-up-Dv3dC3hu.js +0 -23
- package/dist/chunks/classTokens-CT1tqF2j.js +0 -6
- package/dist/chunks/config-B5JCvHys.js +0 -13
- package/dist/chunks/config-BDXa5Sna2.js +0 -9
- package/dist/chunks/config-BG5_FuZ-.js +0 -34
- package/dist/chunks/config-BMYKG1oB.js +0 -10
- package/dist/chunks/config-BQREEXFD.js +0 -8
- package/dist/chunks/config-BUZtbeTr.js +0 -40
- package/dist/chunks/config-BVXycfiO.js +0 -9
- package/dist/chunks/config-BZW-RL6E.js +0 -14
- package/dist/chunks/config-BhbfV-Is.js +0 -48
- package/dist/chunks/config-BmYFupZh.js +0 -8
- package/dist/chunks/config-BsZc_QQ-2.js +0 -20
- package/dist/chunks/config-C1Sn7mn-.js +0 -27
- package/dist/chunks/config-C4_REX-3.js +0 -9
- package/dist/chunks/config-CBFllZZ4.js +0 -9
- package/dist/chunks/config-CDyD_fCt.js +0 -8
- package/dist/chunks/config-CJeG727i.js +0 -149
- package/dist/chunks/config-CLawBqde.js +0 -21
- package/dist/chunks/config-CMz46RPG.js +0 -8
- package/dist/chunks/config-CO-7HRZd2.js +0 -8
- package/dist/chunks/config-CS7E7LME.js +0 -9
- package/dist/chunks/config-CVy124Xj.js +0 -8
- package/dist/chunks/config-CcixQGaN.js +0 -47
- package/dist/chunks/config-CiVXZxyQ.js +0 -9
- package/dist/chunks/config-CoMQmunP.js +0 -8
- package/dist/chunks/config-Cq6ufYtp.js +0 -9
- package/dist/chunks/config-D8CIEWcb.js +0 -8
- package/dist/chunks/config-D8hKc39m.js +0 -18
- package/dist/chunks/config-D9MxGwCJ.js +0 -8
- package/dist/chunks/config-DBXTZE36.js +0 -15
- package/dist/chunks/config-DK9C8O7L.js +0 -9
- package/dist/chunks/config-DTegOmx2.js +0 -8
- package/dist/chunks/config-DYI8XADo.js +0 -47
- package/dist/chunks/config-DlidGf7P.js +0 -8
- package/dist/chunks/config-DtNe7EIX.js +0 -35
- package/dist/chunks/config-EdWeK_ge.js +0 -17
- package/dist/chunks/config-FGAkxHFh.js +0 -8
- package/dist/chunks/config-M76gNxd2.js +0 -37
- package/dist/chunks/config-NuqoO_Of.js +0 -33
- package/dist/chunks/config-QsovJrku2.js +0 -66
- package/dist/chunks/config-R6F6zRJk.js +0 -9
- package/dist/chunks/config-SLwkDc4Q2.js +0 -9
- package/dist/chunks/config-aJ7sb62Y.js +0 -8
- package/dist/chunks/config-b9nc87Oc.js +0 -9
- package/dist/chunks/config-dSI8RttH2.js +0 -8
- package/dist/chunks/config-im2VHeSM.js +0 -9
- package/dist/chunks/config-vKeQ035f.js +0 -9
- package/dist/chunks/config-vMcxHlWi.js +0 -14
- package/dist/chunks/dialogShared-CONROtU2.js +0 -26
- package/dist/chunks/directives-Dr5NPOT8.js +0 -530
- package/dist/chunks/en-j3simI0h.js +0 -41
- package/dist/chunks/es-CIT9s_vo.js +0 -4
- package/dist/chunks/es-CLpJj7KP.js +0 -41
- package/dist/chunks/fileValidation-LFD-vwil.js +0 -193
- package/dist/chunks/grLoadingStyles-Bjo7ylmq.js +0 -15
- package/dist/chunks/grSelectStyles-C3QKIn1J.js +0 -40
- package/dist/chunks/granularityI18n-8_v1B11L.js +0 -24
- package/dist/chunks/info-CNJnuTYC.js +0 -26
- package/dist/chunks/loader-circle-C5vCCMfB.js +0 -23
- package/dist/chunks/ru-CiOZPnBu.js +0 -41
- package/dist/chunks/safelist-Bq32hAXc.js +0 -13
- package/dist/chunks/safelist-CLcTRYB-.js +0 -22
- package/dist/chunks/transition-BJXMi52x.js +0 -1617
- package/dist/chunks/x--kxrj3ez.js +0 -23
- package/dist/chunks/x-circle-ChJ87u1v.js +0 -61
- package/dist/components/GrAlert/chunks/GrAlert-DLHkusb-.js +0 -129
- package/dist/components/GrAvatar/chunks/GrAvatar-BFYH3HJw.js +0 -32
- package/dist/components/GrBadge/chunks/GrBadge-D_AoqGrn.js +0 -27
- package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-C_N0QJfA.js +0 -26
- package/dist/components/GrBottomNav/chunks/GrBottomNav-Chpu3SVd.js +0 -21
- package/dist/components/GrButton/chunks/GrButton-BXVVt6Od.js +0 -67
- package/dist/components/GrButtonGroup/chunks/GrButtonGroup-CmnYHVH7.js +0 -16
- package/dist/components/GrCard/chunks/GrCard-DEpN6Ptf.js +0 -10
- package/dist/components/GrCheckbox/chunks/GrCheckbox-DF3vJApB.js +0 -111
- package/dist/components/GrCollapse/chunks/GrCollapse-D7QYRqNa.js +0 -150
- package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-C7Eh8-Vn.js +0 -111
- package/dist/components/GrDataTable/chunks/GrDataTable-Dxsg1NMP.js +0 -142
- package/dist/components/GrDialog/chunks/GrDialog-BSd4-uP5.js +0 -169
- package/dist/components/GrDrawer/chunks/GrDrawer-DBBSwe1s.js +0 -135
- package/dist/components/GrDropdown/chunks/GrDropdown-BELyRP4A.js +0 -110
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-B8fuk7iP.js +0 -233
- package/dist/components/GrEmptyState/chunks/GrEmptyState-BPGoafJI.js +0 -49
- package/dist/components/GrFileUpload/chunks/GrFileUpload-BPzx3LEM.js +0 -294
- package/dist/components/GrFormField/chunks/GrFormField-Cn8g9eFP.js +0 -28
- package/dist/components/GrFormFile/chunks/GrFormFile-DfinD5Iv.js +0 -248
- package/dist/components/GrFormSection/chunks/GrFormSection-dKpQw-vh.js +0 -27
- package/dist/components/GrIcon/chunks/GrIcon-CXIHuG7L.js +0 -25
- package/dist/components/GrImageViewer/chunks/GrImageViewer-CQSNx-D7.js +0 -322
- package/dist/components/GrInput/chunks/GrInput-CLKX1inm.js +0 -158
- package/dist/components/GrInputTag/chunks/GrInputTag-BAtLody2.js +0 -214
- package/dist/components/GrLink/chunks/GrLink-BpXnly-Y.js +0 -59
- package/dist/components/GrList/chunks/GrList-BrFc7VdS.js +0 -55
- package/dist/components/GrLoading/chunks/GrLoading-dFuoryMY.js +0 -53
- package/dist/components/GrModal/chunks/GrModal-uaWXH08K.js +0 -136
- package/dist/components/GrNavbar/chunks/GrNavbar-KzLHgdjX.js +0 -62
- package/dist/components/GrNumberInput/chunks/GrNumberInput-rENn1802.js +0 -315
- package/dist/components/GrPagination/chunks/GrPagination-DP0x3rx6.js +0 -93
- package/dist/components/GrProgressBar/chunks/GrProgressBar-DpW93sOi.js +0 -29
- package/dist/components/GrPromptDialog/chunks/GrPromptDialog-ASfBwyzQ.js +0 -158
- package/dist/components/GrRadio/chunks/GrRadio-8BOo97XV.js +0 -147
- package/dist/components/GrRadioGroup/chunks/GrRadioGroup-BymbUmqI.js +0 -66
- package/dist/components/GrSegmented/chunks/GrSegmented-CK5C_lN7.js +0 -250
- package/dist/components/GrSelect/chunks/GrSelect-BMfc1-vs.js +0 -314
- package/dist/components/GrSidebar/chunks/GrSidebar-C4SXXhfO.js +0 -29
- package/dist/components/GrSkeleton/chunks/GrSkeleton-QlieOdpY.js +0 -25
- package/dist/components/GrSwitch/chunks/GrSwitch-Cefiutzu.js +0 -64
- package/dist/components/GrTable/chunks/GrTable-k_FUiJQk.js +0 -44
- package/dist/components/GrTabs/chunks/GrTabs-B46P-lUc.js +0 -98
- package/dist/components/GrTextarea/chunks/GrTextarea-BX7L1MJk.js +0 -57
- package/dist/components/GrToaster/chunks/GrToaster-C4l_BjOh.js +0 -139
- package/dist/components/GrTooltip/chunks/GrTooltip-BqRAzuLT.js +0 -37
- package/dist/components/GrTree/chunks/GrTree-C2CXR_vW.js +0 -614
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-DAAay-QB.js +0 -353
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GrSkeleton-DKXkqWDa.js","names":[],"sources":["../../../../src/components/GrSkeleton/GrSkeleton.vue","../../../../src/components/GrSkeleton/GrSkeleton.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * GrSkeleton — заглушка-плейсхолдер для загружающегося контента.\n *\n * Помечен `aria-hidden=\"true\"`, чтобы скринридер не озвучивал «пустой» узел;\n * внешний контейнер обычно имеет `aria-busy=\"true\"` + `aria-live`.\n */\nexport interface GrSkeletonProps {\n height?: string\n width?: string\n rounded?: string\n}\n\nwithDefaults(defineProps<GrSkeletonProps>(), {\n height: '12px',\n width: '100%',\n rounded: '9999px',\n})\n</script>\n\n<template>\n <div\n data-ds-skeleton\n aria-hidden=\"true\"\n class=\"bg-[var(--muted)] border border-[var(--brd)]\"\n :style=\"{ height, width, borderRadius: rounded }\"\n />\n</template>\n\n<style>\n@keyframes ds-skeleton-pulse {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n}\n\n[data-ds-skeleton] {\n animation: ds-skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n@media (prefers-reduced-motion: reduce) {\n [data-ds-skeleton] {\n animation: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * GrSkeleton — заглушка-плейсхолдер для загружающегося контента.\n *\n * Помечен `aria-hidden=\"true\"`, чтобы скринридер не озвучивал «пустой» узел;\n * внешний контейнер обычно имеет `aria-busy=\"true\"` + `aria-live`.\n */\nexport interface GrSkeletonProps {\n height?: string\n width?: string\n rounded?: string\n}\n\nwithDefaults(defineProps<GrSkeletonProps>(), {\n height: '12px',\n width: '100%',\n rounded: '9999px',\n})\n</script>\n\n<template>\n <div\n data-ds-skeleton\n aria-hidden=\"true\"\n class=\"bg-[var(--muted)] border border-[var(--brd)]\"\n :style=\"{ height, width, borderRadius: rounded }\"\n />\n</template>\n\n<style>\n@keyframes ds-skeleton-pulse {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n}\n\n[data-ds-skeleton] {\n animation: ds-skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n@media (prefers-reduced-motion: reduce) {\n [data-ds-skeleton] {\n animation: none;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;uBAqBE,mBAKE,OAAA;IAJE,oBAAA;IACA,eAAY;IACZ,OAAM;IACL,OAAK,eAAA;KAAA,QAAI,QAAA;KAAM,OAAE,QAAA;KAAK,cAAgB,QAAA;KAAO,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t } from "../../chunks/config-
|
|
3
|
-
export {
|
|
1
|
+
import { t as GrSkeleton_default } from "./chunks/GrSkeleton-DKXkqWDa.js";
|
|
2
|
+
import { t as grSkeletonConfig } from "../../chunks/config-C0j836dC.js";
|
|
3
|
+
export { GrSkeleton_default as GrSkeleton, GrSkeleton_default as default, grSkeletonConfig };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { a as grSwitchTrackClass, i as grSwitchThumbClass, r as grSwitchLabelClass } from "../../../chunks/config-CM7nbATU2.js";
|
|
2
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot } from "vue";
|
|
3
|
+
//#region src/components/GrSwitch/GrSwitch.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _hoisted_1 = [
|
|
5
|
+
"aria-checked",
|
|
6
|
+
"aria-label",
|
|
7
|
+
"disabled"
|
|
8
|
+
];
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/components/GrSwitch/GrSwitch.vue
|
|
11
|
+
var GrSwitch_default = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "GrSwitch",
|
|
13
|
+
props: {
|
|
14
|
+
modelValue: { type: Boolean },
|
|
15
|
+
disabled: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
19
|
+
ariaLabel: { default: void 0 },
|
|
20
|
+
size: { default: "md" },
|
|
21
|
+
activeBackgroundColor: { default: void 0 },
|
|
22
|
+
inactiveBackgroundColor: { default: void 0 }
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:modelValue"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const getCustomColor = (value) => value?.trim() || void 0;
|
|
27
|
+
const props = __props;
|
|
28
|
+
const emit = __emit;
|
|
29
|
+
const trackClass = computed(() => grSwitchTrackClass(props.size));
|
|
30
|
+
const trackStyle = computed(() => {
|
|
31
|
+
const isChecked = props.modelValue;
|
|
32
|
+
const defaultBackgroundColor = isChecked ? "var(--primary)" : "var(--muted)";
|
|
33
|
+
const customBackgroundColor = getCustomColor(isChecked ? props.activeBackgroundColor : props.inactiveBackgroundColor);
|
|
34
|
+
const backgroundColor = customBackgroundColor ?? defaultBackgroundColor;
|
|
35
|
+
return {
|
|
36
|
+
"--ds-switch-track-bg": backgroundColor,
|
|
37
|
+
"--ds-switch-track-brd": customBackgroundColor ? backgroundColor : isChecked ? "var(--primary)" : "var(--brd)",
|
|
38
|
+
backgroundColor: "var(--ds-switch-track-bg)"
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
const thumbClass = computed(() => grSwitchThumbClass({
|
|
42
|
+
size: props.size,
|
|
43
|
+
checked: props.modelValue
|
|
44
|
+
}));
|
|
45
|
+
const labelClass = computed(() => grSwitchLabelClass(props.size));
|
|
46
|
+
function toggle() {
|
|
47
|
+
if (props.disabled) return;
|
|
48
|
+
emit("update:modelValue", !props.modelValue);
|
|
49
|
+
}
|
|
50
|
+
return (_ctx, _cache) => {
|
|
51
|
+
return openBlock(), createElementBlock("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
role: "switch",
|
|
54
|
+
"data-ds-switch": "",
|
|
55
|
+
"aria-checked": __props.modelValue ? "true" : "false",
|
|
56
|
+
"aria-label": __props.ariaLabel,
|
|
57
|
+
disabled: __props.disabled,
|
|
58
|
+
class: "inline-flex items-center gap-2 select-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
59
|
+
onClick: toggle
|
|
60
|
+
}, [createElementVNode("span", {
|
|
61
|
+
"data-testid": "ds-switch-track",
|
|
62
|
+
"data-ds-switch-track": "",
|
|
63
|
+
class: normalizeClass(trackClass.value),
|
|
64
|
+
style: normalizeStyle(trackStyle.value)
|
|
65
|
+
}, [createElementVNode("span", {
|
|
66
|
+
"data-testid": "ds-switch-thumb",
|
|
67
|
+
"data-ds-switch-thumb": "",
|
|
68
|
+
class: normalizeClass(thumbClass.value),
|
|
69
|
+
"aria-hidden": "true"
|
|
70
|
+
}, null, 2)], 6), _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
|
71
|
+
key: 0,
|
|
72
|
+
"data-ds-switch-label": "",
|
|
73
|
+
class: normalizeClass(labelClass.value)
|
|
74
|
+
}, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("", true)], 8, _hoisted_1);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
export { GrSwitch_default as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GrSwitch-CdBxwV3k.js","names":["$slots"],"sources":["../../../../src/components/GrSwitch/GrSwitch.vue","../../../../src/components/GrSwitch/GrSwitch.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {computed} from 'vue'\n\nimport {\n grSwitchLabelClass,\n grSwitchThumbClass,\n grSwitchTrackClass,\n type GrSwitchSize,\n} from './grSwitchStyles'\n\nexport type {GrSwitchSize} from './grSwitchStyles'\n\n/**\n * Пропсы публичного DS-примитива «Switch».\n */\nexport interface GrSwitchProps {\n modelValue: boolean\n disabled?: boolean\n ariaLabel?: string\n size?: GrSwitchSize\n /** Кастомный цвет фона в активном состоянии. Если не задан — `var(--primary)`. */\n activeBackgroundColor?: string\n /** Кастомный цвет фона в неактивном состоянии. Если не задан — `var(--muted)`. */\n inactiveBackgroundColor?: string\n}\n\nconst getCustomColor = (value?: string) => value?.trim() || undefined\n\nconst props = withDefaults(\n defineProps<GrSwitchProps>(),\n {\n disabled: false,\n ariaLabel: undefined,\n size: 'md',\n activeBackgroundColor: undefined,\n inactiveBackgroundColor: undefined,\n },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst trackClass = computed(() => grSwitchTrackClass(props.size))\n\nconst trackStyle = computed(() => {\n const isChecked = props.modelValue\n const defaultBackgroundColor = isChecked ? 'var(--primary)' : 'var(--muted)'\n const customBackgroundColor = getCustomColor(\n isChecked ? props.activeBackgroundColor : props.inactiveBackgroundColor,\n )\n const backgroundColor = customBackgroundColor ?? defaultBackgroundColor\n\n return {\n '--ds-switch-track-bg': backgroundColor,\n '--ds-switch-track-brd': customBackgroundColor\n ? backgroundColor\n : isChecked\n ? 'var(--primary)'\n : 'var(--brd)',\n backgroundColor: 'var(--ds-switch-track-bg)',\n }\n})\n\nconst thumbClass = computed(() => grSwitchThumbClass({size: props.size, checked: props.modelValue}))\n\nconst labelClass = computed(() => grSwitchLabelClass(props.size))\n\nfunction toggle(): void {\n if (props.disabled) {\n return\n }\n\n emit('update:modelValue', !props.modelValue)\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n role=\"switch\"\n data-ds-switch\n :aria-checked=\"modelValue ? 'true' : 'false'\"\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n class=\"inline-flex items-center gap-2 select-none disabled:opacity-50 disabled:cursor-not-allowed\"\n @click=\"toggle\"\n >\n <span\n data-testid=\"ds-switch-track\"\n data-ds-switch-track\n :class=\"trackClass\"\n :style=\"trackStyle\"\n >\n <span\n data-testid=\"ds-switch-thumb\"\n data-ds-switch-thumb\n :class=\"thumbClass\"\n aria-hidden=\"true\"\n />\n </span>\n <span\n v-if=\"$slots.default\"\n data-ds-switch-label\n :class=\"labelClass\"\n >\n <slot />\n </span>\n </button>\n</template>\n","<script setup lang=\"ts\">\nimport {computed} from 'vue'\n\nimport {\n grSwitchLabelClass,\n grSwitchThumbClass,\n grSwitchTrackClass,\n type GrSwitchSize,\n} from './grSwitchStyles'\n\nexport type {GrSwitchSize} from './grSwitchStyles'\n\n/**\n * Пропсы публичного DS-примитива «Switch».\n */\nexport interface GrSwitchProps {\n modelValue: boolean\n disabled?: boolean\n ariaLabel?: string\n size?: GrSwitchSize\n /** Кастомный цвет фона в активном состоянии. Если не задан — `var(--primary)`. */\n activeBackgroundColor?: string\n /** Кастомный цвет фона в неактивном состоянии. Если не задан — `var(--muted)`. */\n inactiveBackgroundColor?: string\n}\n\nconst getCustomColor = (value?: string) => value?.trim() || undefined\n\nconst props = withDefaults(\n defineProps<GrSwitchProps>(),\n {\n disabled: false,\n ariaLabel: undefined,\n size: 'md',\n activeBackgroundColor: undefined,\n inactiveBackgroundColor: undefined,\n },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst trackClass = computed(() => grSwitchTrackClass(props.size))\n\nconst trackStyle = computed(() => {\n const isChecked = props.modelValue\n const defaultBackgroundColor = isChecked ? 'var(--primary)' : 'var(--muted)'\n const customBackgroundColor = getCustomColor(\n isChecked ? props.activeBackgroundColor : props.inactiveBackgroundColor,\n )\n const backgroundColor = customBackgroundColor ?? defaultBackgroundColor\n\n return {\n '--ds-switch-track-bg': backgroundColor,\n '--ds-switch-track-brd': customBackgroundColor\n ? backgroundColor\n : isChecked\n ? 'var(--primary)'\n : 'var(--brd)',\n backgroundColor: 'var(--ds-switch-track-bg)',\n }\n})\n\nconst thumbClass = computed(() => grSwitchThumbClass({size: props.size, checked: props.modelValue}))\n\nconst labelClass = computed(() => grSwitchLabelClass(props.size))\n\nfunction toggle(): void {\n if (props.disabled) {\n return\n }\n\n emit('update:modelValue', !props.modelValue)\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n role=\"switch\"\n data-ds-switch\n :aria-checked=\"modelValue ? 'true' : 'false'\"\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n class=\"inline-flex items-center gap-2 select-none disabled:opacity-50 disabled:cursor-not-allowed\"\n @click=\"toggle\"\n >\n <span\n data-testid=\"ds-switch-track\"\n data-ds-switch-track\n :class=\"trackClass\"\n :style=\"trackStyle\"\n >\n <span\n data-testid=\"ds-switch-thumb\"\n data-ds-switch-thumb\n :class=\"thumbClass\"\n aria-hidden=\"true\"\n />\n </span>\n <span\n v-if=\"$slots.default\"\n data-ds-switch-label\n :class=\"labelClass\"\n >\n <slot />\n </span>\n </button>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EA0BA,MAAM,kBAAkB,UAAmB,OAAO,MAAM,IAAI,KAAA;EAE5D,MAAM,QAAQ;EAWd,MAAM,OAAO;EAIb,MAAM,aAAa,eAAe,mBAAmB,MAAM,KAAK,CAAA;EAEhE,MAAM,aAAa,eAAe;GAChC,MAAM,YAAY,MAAM;GACxB,MAAM,yBAAyB,YAAY,mBAAmB;GAC9D,MAAM,wBAAwB,eAC1B,YAAY,MAAM,wBAAwB,MAAM,wBACpD;GACA,MAAM,kBAAkB,yBAAyB;AAEjD,UAAO;IACL,wBAAwB;IACxB,yBAAyB,wBACnB,kBACA,YACI,mBACA;IACV,iBAAiB;IACnB;IACD;EAED,MAAM,aAAa,eAAe,mBAAmB;GAAC,MAAM,MAAM;GAAM,SAAS,MAAM;GAAW,CAAC,CAAA;EAEnG,MAAM,aAAa,eAAe,mBAAmB,MAAM,KAAK,CAAA;EAEhE,SAAS,SAAe;AACtB,OAAI,MAAM,SACR;AAGF,QAAK,qBAAqB,CAAC,MAAM,WAAU;;;uBAK3C,mBA8BS,UAAA;IA7BL,MAAK;IACL,MAAK;IACL,kBAAA;IACC,gBAAc,QAAA,aAAU,SAAA;IACxB,cAAY,QAAA;IACZ,UAAU,QAAA;IACX,OAAM;IACL,SAAO;OAEV,mBAYO,QAAA;IAXH,eAAY;IACZ,wBAAA;IACC,OAAK,eAAE,WAAA,MAAU;IACjB,OAAK,eAAE,WAAA,MAAU;OAEpB,mBAKE,QAAA;IAJE,eAAY;IACZ,wBAAA;IACC,OAAK,eAAE,WAAA,MAAU;IAClB,eAAY;qBAIRA,KAAAA,OAAO,WAAA,WAAA,EADjB,mBAMO,QAAA;;IAJH,wBAAA;IACC,OAAK,eAAE,WAAA,MAAU;OAEpB,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,GAAA,WAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { t as
|
|
3
|
-
export {
|
|
1
|
+
import { n as grSwitchSafelist, t as grSwitchConfig } from "../../chunks/config-CM7nbATU2.js";
|
|
2
|
+
import { t as GrSwitch_default } from "./chunks/GrSwitch-CdBxwV3k.js";
|
|
3
|
+
export { GrSwitch_default as GrSwitch, GrSwitch_default as default, grSwitchConfig, grSwitchSafelist };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref, useSlots } from "vue";
|
|
2
|
+
//#region src/components/GrTable/GrTable.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var _hoisted_1 = [
|
|
4
|
+
"role",
|
|
5
|
+
"aria-label",
|
|
6
|
+
"tabindex"
|
|
7
|
+
];
|
|
8
|
+
var _hoisted_2 = ["aria-label", "aria-labelledby"];
|
|
9
|
+
var _hoisted_3 = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "sr-only"
|
|
12
|
+
};
|
|
13
|
+
var _hoisted_4 = { class: "bg-[var(--muted)] text-[var(--muted-fg)]" };
|
|
14
|
+
var _hoisted_5 = { class: "text-[var(--fg)]" };
|
|
15
|
+
var _hoisted_6 = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "text-[var(--fg)]"
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/components/GrTable/GrTable.vue
|
|
21
|
+
var GrTable_default = /* @__PURE__ */ defineComponent({
|
|
22
|
+
__name: "GrTable",
|
|
23
|
+
props: {
|
|
24
|
+
density: { default: "regular" },
|
|
25
|
+
caption: { default: void 0 },
|
|
26
|
+
ariaLabel: { default: void 0 },
|
|
27
|
+
ariaLabelledby: { default: void 0 },
|
|
28
|
+
regionLabel: { default: void 0 }
|
|
29
|
+
},
|
|
30
|
+
setup(__props) {
|
|
31
|
+
const props = __props;
|
|
32
|
+
const slots = useSlots();
|
|
33
|
+
const tableTextClass = computed(() => props.density === "compact" ? "text-[13px]" : "text-sm");
|
|
34
|
+
const hasCaption = computed(() => Boolean(slots.caption) || Boolean(props.caption));
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return openBlock(), createElementBlock("div", {
|
|
37
|
+
"data-ds-table-scroll": "",
|
|
38
|
+
role: __props.regionLabel ? "region" : void 0,
|
|
39
|
+
"aria-label": __props.regionLabel,
|
|
40
|
+
tabindex: __props.regionLabel ? 0 : void 0,
|
|
41
|
+
class: "overflow-x-auto rounded-[var(--ds-radius-lg)] border border-[var(--brd)] bg-[var(--card)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]"
|
|
42
|
+
}, [createElementVNode("table", {
|
|
43
|
+
"data-ds-table": "",
|
|
44
|
+
class: normalizeClass(["min-w-full", [tableTextClass.value]]),
|
|
45
|
+
"aria-label": __props.ariaLabelledby ? void 0 : __props.ariaLabel,
|
|
46
|
+
"aria-labelledby": __props.ariaLabelledby
|
|
47
|
+
}, [
|
|
48
|
+
hasCaption.value ? (openBlock(), createElementBlock("caption", _hoisted_3, [renderSlot(_ctx.$slots, "caption", {}, () => [createTextVNode(toDisplayString(__props.caption), 1)])])) : createCommentVNode("", true),
|
|
49
|
+
createElementVNode("thead", _hoisted_4, [renderSlot(_ctx.$slots, "head")]),
|
|
50
|
+
createElementVNode("tbody", _hoisted_5, [renderSlot(_ctx.$slots, "default")]),
|
|
51
|
+
unref(slots).foot ? (openBlock(), createElementBlock("tfoot", _hoisted_6, [renderSlot(_ctx.$slots, "foot")])) : createCommentVNode("", true)
|
|
52
|
+
], 10, _hoisted_2)], 8, _hoisted_1);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
//#endregion
|
|
57
|
+
export { GrTable_default as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GrTable-CyQ9uw8A.js","names":[],"sources":["../../../../src/components/GrTable/GrTable.vue","../../../../src/components/GrTable/GrTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue'\n\nexport type GrTableDensity = 'compact' | 'regular'\n\nexport interface GrTableProps {\n /**\n * Плотность таблицы — влияет на базовый размер шрифта.\n * Паддинги ячеек оставлены за консьюмером (GrTable — «тонкий» контейнер).\n */\n density?: GrTableDensity\n /**\n * Текст caption для screen reader'ов. Рендерится как `<caption class=\"sr-only\">`,\n * если не передан слот `#caption`.\n */\n caption?: string\n /** Прямой ARIA-label для `<table>`. Игнорируется, если задан `ariaLabelledby`. */\n ariaLabel?: string\n /** ID элемента-заголовка, связанного с `<table>` через `aria-labelledby`. */\n ariaLabelledby?: string\n /**\n * ARIA-label для скролл-контейнера (`role=\"region\"` + `tabindex=\"0\"`).\n * Позволяет клавиатурным пользователям проскроллить широкую таблицу.\n * Если не задан — region-роль не включается.\n */\n regionLabel?: string\n}\n\n/**\n * `GrTable` — «тонкий» DS-контейнер для табличных данных.\n *\n * Рендерит `<table>` внутри скролл-обёртки и даёт слоты `#caption`, `#head`,\n * default (tbody) и `#foot`. Стили ячеек (`<th>`/`<td>` паддинги, выравнивание)\n * оставлены на консьюмере.\n *\n * ВАЖНО: `min-w-full` сам по себе не даст горизонтального скролла. Для него\n * консьюмеру нужны `white-space: nowrap` на ячейках или явные ширины колонок.\n */\nconst props = withDefaults(defineProps<GrTableProps>(), {\n density: 'regular',\n caption: undefined,\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n regionLabel: undefined,\n})\n\nconst slots = useSlots()\n\nconst tableTextClass = computed(() => (props.density === 'compact' ? 'text-[13px]' : 'text-sm'))\nconst hasCaption = computed(() => Boolean(slots.caption) || Boolean(props.caption))\n</script>\n\n<template>\n <div\n data-ds-table-scroll\n :role=\"regionLabel ? 'region' : undefined\"\n :aria-label=\"regionLabel\"\n :tabindex=\"regionLabel ? 0 : undefined\"\n class=\"overflow-x-auto rounded-[var(--ds-radius-lg)] border border-[var(--brd)] bg-[var(--card)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]\"\n >\n <table\n data-ds-table\n class=\"min-w-full\" :class=\"[tableTextClass]\"\n :aria-label=\"ariaLabelledby ? undefined : ariaLabel\"\n :aria-labelledby=\"ariaLabelledby\"\n >\n <caption v-if=\"hasCaption\" class=\"sr-only\">\n <slot name=\"caption\">\n{{ caption }}\n</slot>\n </caption>\n <thead class=\"bg-[var(--muted)] text-[var(--muted-fg)]\">\n <slot name=\"head\" />\n </thead>\n <tbody class=\"text-[var(--fg)]\">\n <slot />\n </tbody>\n <tfoot v-if=\"slots.foot\" class=\"text-[var(--fg)]\">\n <slot name=\"foot\" />\n </tfoot>\n </table>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue'\n\nexport type GrTableDensity = 'compact' | 'regular'\n\nexport interface GrTableProps {\n /**\n * Плотность таблицы — влияет на базовый размер шрифта.\n * Паддинги ячеек оставлены за консьюмером (GrTable — «тонкий» контейнер).\n */\n density?: GrTableDensity\n /**\n * Текст caption для screen reader'ов. Рендерится как `<caption class=\"sr-only\">`,\n * если не передан слот `#caption`.\n */\n caption?: string\n /** Прямой ARIA-label для `<table>`. Игнорируется, если задан `ariaLabelledby`. */\n ariaLabel?: string\n /** ID элемента-заголовка, связанного с `<table>` через `aria-labelledby`. */\n ariaLabelledby?: string\n /**\n * ARIA-label для скролл-контейнера (`role=\"region\"` + `tabindex=\"0\"`).\n * Позволяет клавиатурным пользователям проскроллить широкую таблицу.\n * Если не задан — region-роль не включается.\n */\n regionLabel?: string\n}\n\n/**\n * `GrTable` — «тонкий» DS-контейнер для табличных данных.\n *\n * Рендерит `<table>` внутри скролл-обёртки и даёт слоты `#caption`, `#head`,\n * default (tbody) и `#foot`. Стили ячеек (`<th>`/`<td>` паддинги, выравнивание)\n * оставлены на консьюмере.\n *\n * ВАЖНО: `min-w-full` сам по себе не даст горизонтального скролла. Для него\n * консьюмеру нужны `white-space: nowrap` на ячейках или явные ширины колонок.\n */\nconst props = withDefaults(defineProps<GrTableProps>(), {\n density: 'regular',\n caption: undefined,\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n regionLabel: undefined,\n})\n\nconst slots = useSlots()\n\nconst tableTextClass = computed(() => (props.density === 'compact' ? 'text-[13px]' : 'text-sm'))\nconst hasCaption = computed(() => Boolean(slots.caption) || Boolean(props.caption))\n</script>\n\n<template>\n <div\n data-ds-table-scroll\n :role=\"regionLabel ? 'region' : undefined\"\n :aria-label=\"regionLabel\"\n :tabindex=\"regionLabel ? 0 : undefined\"\n class=\"overflow-x-auto rounded-[var(--ds-radius-lg)] border border-[var(--brd)] bg-[var(--card)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]\"\n >\n <table\n data-ds-table\n class=\"min-w-full\" :class=\"[tableTextClass]\"\n :aria-label=\"ariaLabelledby ? undefined : ariaLabel\"\n :aria-labelledby=\"ariaLabelledby\"\n >\n <caption v-if=\"hasCaption\" class=\"sr-only\">\n <slot name=\"caption\">\n{{ caption }}\n</slot>\n </caption>\n <thead class=\"bg-[var(--muted)] text-[var(--muted-fg)]\">\n <slot name=\"head\" />\n </thead>\n <tbody class=\"text-[var(--fg)]\">\n <slot />\n </tbody>\n <tfoot v-if=\"slots.foot\" class=\"text-[var(--fg)]\">\n <slot name=\"foot\" />\n </tfoot>\n </table>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCA,MAAM,QAAQ;EAQd,MAAM,QAAQ,UAAS;EAEvB,MAAM,iBAAiB,eAAgB,MAAM,YAAY,YAAY,gBAAgB,UAAU;EAC/F,MAAM,aAAa,eAAe,QAAQ,MAAM,QAAQ,IAAI,QAAQ,MAAM,QAAQ,CAAA;;uBAIhF,mBA4BM,OAAA;IA3BJ,wBAAA;IACC,MAAM,QAAA,cAAW,WAAc,KAAA;IAC/B,cAAY,QAAA;IACZ,UAAU,QAAA,cAAW,IAAO,KAAA;IAC7B,OAAM;OAEN,mBAoBQ,SAAA;IAnBN,iBAAA;IACA,OAAK,eAAA,CAAC,cAAY,CAAU,eAAA,MAAc,CAAA,CAAA;IACzC,cAAY,QAAA,iBAAiB,KAAA,IAAY,QAAA;IACzC,mBAAiB,QAAA;;IAEH,WAAA,SAAA,WAAA,EAAf,mBAIU,WAJV,YAIU,CAHR,WAED,KAAA,QAAA,WAAA,EAAA,QAAA,CAAA,gBAAA,gBADJ,QAAA,QAAO,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;IAGJ,mBAEQ,SAFR,YAEQ,CADN,WAAoB,KAAA,QAAA,OAAA,CAAA,CAAA;IAEtB,mBAEQ,SAFR,YAEQ,CADN,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA;IAEG,MAAA,MAAK,CAAC,QAAA,WAAA,EAAnB,mBAEQ,SAFR,YAEQ,CADN,WAAoB,KAAA,QAAA,OAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t } from "../../chunks/config-
|
|
3
|
-
export {
|
|
1
|
+
import { t as GrTable_default } from "./chunks/GrTable-CyQ9uw8A.js";
|
|
2
|
+
import { t as grTableConfig } from "../../chunks/config-Cgc-D1K4.js";
|
|
3
|
+
export { GrTable_default as GrTable, GrTable_default as default, grTableConfig };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, nextTick, normalizeClass, openBlock, ref, renderList, toDisplayString } from "vue";
|
|
2
|
+
//#region src/components/GrTabs/GrTabs.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var _hoisted_1 = [
|
|
4
|
+
"aria-selected",
|
|
5
|
+
"aria-disabled",
|
|
6
|
+
"disabled",
|
|
7
|
+
"tabindex",
|
|
8
|
+
"onClick"
|
|
9
|
+
];
|
|
10
|
+
var _hoisted_2 = { class: "inline-flex items-center gap-2" };
|
|
11
|
+
var _hoisted_3 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "text-[11px] px-1.5 py-0.5 rounded-full bg-[var(--secondary)] text-[var(--secondary-fg)]"
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/GrTabs/GrTabs.vue
|
|
17
|
+
var GrTabs_default = /* @__PURE__ */ defineComponent({
|
|
18
|
+
__name: "GrTabs",
|
|
19
|
+
props: {
|
|
20
|
+
modelValue: {},
|
|
21
|
+
tabs: {}
|
|
22
|
+
},
|
|
23
|
+
emits: ["update:modelValue"],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const emit = __emit;
|
|
27
|
+
const buttonRefs = ref([]);
|
|
28
|
+
function setButtonRef(el, index) {
|
|
29
|
+
if (el instanceof HTMLButtonElement) buttonRefs.value[index] = el;
|
|
30
|
+
}
|
|
31
|
+
const activeIndex = computed(() => props.tabs.findIndex((t) => t.value === props.modelValue));
|
|
32
|
+
function isEnabled(tab) {
|
|
33
|
+
return !tab.disabled;
|
|
34
|
+
}
|
|
35
|
+
async function selectByIndex(index, focus = false) {
|
|
36
|
+
const tab = props.tabs[index];
|
|
37
|
+
if (!tab || !isEnabled(tab)) return;
|
|
38
|
+
if (tab.value !== props.modelValue) emit("update:modelValue", tab.value);
|
|
39
|
+
if (focus) {
|
|
40
|
+
await nextTick();
|
|
41
|
+
buttonRefs.value[index]?.focus();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function findNextEnabled(from, direction) {
|
|
45
|
+
const length = props.tabs.length;
|
|
46
|
+
if (length === 0) return -1;
|
|
47
|
+
let index = from;
|
|
48
|
+
for (let i = 0; i < length; i++) {
|
|
49
|
+
index = (index + direction + length) % length;
|
|
50
|
+
const tab = props.tabs[index];
|
|
51
|
+
if (tab && isEnabled(tab)) return index;
|
|
52
|
+
}
|
|
53
|
+
return -1;
|
|
54
|
+
}
|
|
55
|
+
function firstEnabled() {
|
|
56
|
+
return props.tabs.findIndex(isEnabled);
|
|
57
|
+
}
|
|
58
|
+
function lastEnabled() {
|
|
59
|
+
for (let i = props.tabs.length - 1; i >= 0; i--) {
|
|
60
|
+
const tab = props.tabs[i];
|
|
61
|
+
if (tab && isEnabled(tab)) return i;
|
|
62
|
+
}
|
|
63
|
+
return -1;
|
|
64
|
+
}
|
|
65
|
+
function onKeydown(event) {
|
|
66
|
+
if (props.tabs.length === 0) return;
|
|
67
|
+
const currentIndex = activeIndex.value < 0 ? 0 : activeIndex.value;
|
|
68
|
+
let nextIndex = -1;
|
|
69
|
+
switch (event.key) {
|
|
70
|
+
case "ArrowRight":
|
|
71
|
+
nextIndex = findNextEnabled(currentIndex, 1);
|
|
72
|
+
break;
|
|
73
|
+
case "ArrowLeft":
|
|
74
|
+
nextIndex = findNextEnabled(currentIndex, -1);
|
|
75
|
+
break;
|
|
76
|
+
case "Home":
|
|
77
|
+
nextIndex = firstEnabled();
|
|
78
|
+
break;
|
|
79
|
+
case "End":
|
|
80
|
+
nextIndex = lastEnabled();
|
|
81
|
+
break;
|
|
82
|
+
default: return;
|
|
83
|
+
}
|
|
84
|
+
if (nextIndex < 0) return;
|
|
85
|
+
event.preventDefault();
|
|
86
|
+
selectByIndex(nextIndex, true);
|
|
87
|
+
}
|
|
88
|
+
function onClick(tab) {
|
|
89
|
+
if (!isEnabled(tab)) return;
|
|
90
|
+
if (tab.value !== props.modelValue) emit("update:modelValue", tab.value);
|
|
91
|
+
}
|
|
92
|
+
return (_ctx, _cache) => {
|
|
93
|
+
return openBlock(), createElementBlock("div", {
|
|
94
|
+
role: "tablist",
|
|
95
|
+
"data-ds-tabs": "",
|
|
96
|
+
class: "inline-flex flex-wrap gap-1 rounded-[var(--ds-radius-lg)] border border-[var(--brd)] bg-[var(--muted)] p-1",
|
|
97
|
+
onKeydown
|
|
98
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab, index) => {
|
|
99
|
+
return openBlock(), createElementBlock("button", {
|
|
100
|
+
key: tab.value,
|
|
101
|
+
ref_for: true,
|
|
102
|
+
ref: (el) => setButtonRef(el, index),
|
|
103
|
+
type: "button",
|
|
104
|
+
role: "tab",
|
|
105
|
+
"data-ds-tab": "",
|
|
106
|
+
"aria-selected": tab.value === __props.modelValue ? "true" : "false",
|
|
107
|
+
"aria-disabled": tab.disabled ? "true" : void 0,
|
|
108
|
+
disabled: tab.disabled,
|
|
109
|
+
tabindex: tab.value === __props.modelValue ? 0 : -1,
|
|
110
|
+
class: normalizeClass(["h-9 px-3 rounded-[10px] text-sm font-600 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:opacity-60 disabled:cursor-not-allowed", tab.value === __props.modelValue ? "bg-[var(--card)] text-[var(--fg)] border border-[var(--brd)]" : "text-[var(--muted-fg)] hover:text-[var(--fg)] hover:bg-[color-mix(in_srgb,var(--card)_70%,transparent)]"]),
|
|
111
|
+
onClick: ($event) => onClick(tab)
|
|
112
|
+
}, [createElementVNode("span", _hoisted_2, [createElementVNode("span", null, toDisplayString(tab.label), 1), tab.badge ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(tab.badge), 1)) : createCommentVNode("", true)])], 10, _hoisted_1);
|
|
113
|
+
}), 128))], 32);
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
//#endregion
|
|
118
|
+
export { GrTabs_default as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GrTabs-BpF8AAUz.js","names":[],"sources":["../../../../src/components/GrTabs/GrTabs.vue","../../../../src/components/GrTabs/GrTabs.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, nextTick, ref } from 'vue'\n\nexport type GrTab = {\n value: string\n label: string\n badge?: string\n disabled?: boolean\n}\n\nexport type GrTabsProps = {\n modelValue: string\n tabs: GrTab[]\n}\n\n/**\n * GrTabs — горизонтальная группа вкладок с паттерном WAI-ARIA `tablist`.\n *\n * A11y:\n * - `role=\"tablist\"` на корне, `role=\"tab\"` на каждой вкладке.\n * - Roving `tabindex`: активная вкладка `0`, остальные `-1`.\n * - Клавиатура: `ArrowLeft`/`ArrowRight` — цикличный переход, `Home`/`End` — к первой/последней.\n * - При переключении стрелками DOM-фокус программно переносится на новую вкладку.\n *\n * Сам компонент не рендерит `tabpanel` — это ответственность консьюмера (по `aria-controls`/внешней разметке).\n */\nconst props = defineProps<GrTabsProps>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst buttonRefs = ref<HTMLButtonElement[]>([])\n\nfunction setButtonRef(el: unknown, index: number): void {\n if (el instanceof HTMLButtonElement)\n buttonRefs.value[index] = el\n}\n\nconst activeIndex = computed(() => props.tabs.findIndex(t => t.value === props.modelValue))\n\nfunction isEnabled(tab: GrTab): boolean {\n return !tab.disabled\n}\n\nasync function selectByIndex(index: number, focus = false): Promise<void> {\n const tab = props.tabs[index]\n if (!tab || !isEnabled(tab))\n return\n if (tab.value !== props.modelValue)\n emit('update:modelValue', tab.value)\n if (focus) {\n await nextTick()\n buttonRefs.value[index]?.focus()\n }\n}\n\nfunction findNextEnabled(from: number, direction: 1 | -1): number {\n const length = props.tabs.length\n if (length === 0)\n return -1\n let index = from\n for (let i = 0; i < length; i++) {\n index = (index + direction + length) % length\n const tab = props.tabs[index]\n if (tab && isEnabled(tab))\n return index\n }\n return -1\n}\n\nfunction firstEnabled(): number {\n return props.tabs.findIndex(isEnabled)\n}\n\nfunction lastEnabled(): number {\n for (let i = props.tabs.length - 1; i >= 0; i--) {\n const tab = props.tabs[i]\n if (tab && isEnabled(tab))\n return i\n }\n return -1\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (props.tabs.length === 0)\n return\n\n const currentIndex = activeIndex.value < 0 ? 0 : activeIndex.value\n let nextIndex = -1\n\n switch (event.key) {\n case 'ArrowRight':\n nextIndex = findNextEnabled(currentIndex, 1)\n break\n case 'ArrowLeft':\n nextIndex = findNextEnabled(currentIndex, -1)\n break\n case 'Home':\n nextIndex = firstEnabled()\n break\n case 'End':\n nextIndex = lastEnabled()\n break\n default:\n return\n }\n\n if (nextIndex < 0)\n return\n\n event.preventDefault()\n void selectByIndex(nextIndex, true)\n}\n\nfunction onClick(tab: GrTab): void {\n if (!isEnabled(tab))\n return\n if (tab.value !== props.modelValue)\n emit('update:modelValue', tab.value)\n}\n</script>\n\n<template>\n <div\n role=\"tablist\"\n data-ds-tabs\n class=\"inline-flex flex-wrap gap-1 rounded-[var(--ds-radius-lg)] border border-[var(--brd)] bg-[var(--muted)] p-1\"\n @keydown=\"onKeydown\"\n >\n <button\n v-for=\"(tab, index) in tabs\"\n :key=\"tab.value\"\n :ref=\"el => setButtonRef(el, index)\"\n type=\"button\"\n role=\"tab\"\n data-ds-tab\n :aria-selected=\"tab.value === modelValue ? 'true' : 'false'\"\n :aria-disabled=\"tab.disabled ? 'true' : undefined\"\n :disabled=\"tab.disabled\"\n :tabindex=\"tab.value === modelValue ? 0 : -1\"\n class=\"h-9 px-3 rounded-[10px] text-sm font-600 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:opacity-60 disabled:cursor-not-allowed\"\n :class=\"tab.value === modelValue\n ? 'bg-[var(--card)] text-[var(--fg)] border border-[var(--brd)]'\n : 'text-[var(--muted-fg)] hover:text-[var(--fg)] hover:bg-[color-mix(in_srgb,var(--card)_70%,transparent)]'\"\n @click=\"onClick(tab)\"\n >\n <span class=\"inline-flex items-center gap-2\">\n <span>{{ tab.label }}</span>\n <span\n v-if=\"tab.badge\"\n class=\"text-[11px] px-1.5 py-0.5 rounded-full bg-[var(--secondary)] text-[var(--secondary-fg)]\"\n >\n {{ tab.badge }}\n </span>\n </span>\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, ref } from 'vue'\n\nexport type GrTab = {\n value: string\n label: string\n badge?: string\n disabled?: boolean\n}\n\nexport type GrTabsProps = {\n modelValue: string\n tabs: GrTab[]\n}\n\n/**\n * GrTabs — горизонтальная группа вкладок с паттерном WAI-ARIA `tablist`.\n *\n * A11y:\n * - `role=\"tablist\"` на корне, `role=\"tab\"` на каждой вкладке.\n * - Roving `tabindex`: активная вкладка `0`, остальные `-1`.\n * - Клавиатура: `ArrowLeft`/`ArrowRight` — цикличный переход, `Home`/`End` — к первой/последней.\n * - При переключении стрелками DOM-фокус программно переносится на новую вкладку.\n *\n * Сам компонент не рендерит `tabpanel` — это ответственность консьюмера (по `aria-controls`/внешней разметке).\n */\nconst props = defineProps<GrTabsProps>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst buttonRefs = ref<HTMLButtonElement[]>([])\n\nfunction setButtonRef(el: unknown, index: number): void {\n if (el instanceof HTMLButtonElement)\n buttonRefs.value[index] = el\n}\n\nconst activeIndex = computed(() => props.tabs.findIndex(t => t.value === props.modelValue))\n\nfunction isEnabled(tab: GrTab): boolean {\n return !tab.disabled\n}\n\nasync function selectByIndex(index: number, focus = false): Promise<void> {\n const tab = props.tabs[index]\n if (!tab || !isEnabled(tab))\n return\n if (tab.value !== props.modelValue)\n emit('update:modelValue', tab.value)\n if (focus) {\n await nextTick()\n buttonRefs.value[index]?.focus()\n }\n}\n\nfunction findNextEnabled(from: number, direction: 1 | -1): number {\n const length = props.tabs.length\n if (length === 0)\n return -1\n let index = from\n for (let i = 0; i < length; i++) {\n index = (index + direction + length) % length\n const tab = props.tabs[index]\n if (tab && isEnabled(tab))\n return index\n }\n return -1\n}\n\nfunction firstEnabled(): number {\n return props.tabs.findIndex(isEnabled)\n}\n\nfunction lastEnabled(): number {\n for (let i = props.tabs.length - 1; i >= 0; i--) {\n const tab = props.tabs[i]\n if (tab && isEnabled(tab))\n return i\n }\n return -1\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (props.tabs.length === 0)\n return\n\n const currentIndex = activeIndex.value < 0 ? 0 : activeIndex.value\n let nextIndex = -1\n\n switch (event.key) {\n case 'ArrowRight':\n nextIndex = findNextEnabled(currentIndex, 1)\n break\n case 'ArrowLeft':\n nextIndex = findNextEnabled(currentIndex, -1)\n break\n case 'Home':\n nextIndex = firstEnabled()\n break\n case 'End':\n nextIndex = lastEnabled()\n break\n default:\n return\n }\n\n if (nextIndex < 0)\n return\n\n event.preventDefault()\n void selectByIndex(nextIndex, true)\n}\n\nfunction onClick(tab: GrTab): void {\n if (!isEnabled(tab))\n return\n if (tab.value !== props.modelValue)\n emit('update:modelValue', tab.value)\n}\n</script>\n\n<template>\n <div\n role=\"tablist\"\n data-ds-tabs\n class=\"inline-flex flex-wrap gap-1 rounded-[var(--ds-radius-lg)] border border-[var(--brd)] bg-[var(--muted)] p-1\"\n @keydown=\"onKeydown\"\n >\n <button\n v-for=\"(tab, index) in tabs\"\n :key=\"tab.value\"\n :ref=\"el => setButtonRef(el, index)\"\n type=\"button\"\n role=\"tab\"\n data-ds-tab\n :aria-selected=\"tab.value === modelValue ? 'true' : 'false'\"\n :aria-disabled=\"tab.disabled ? 'true' : undefined\"\n :disabled=\"tab.disabled\"\n :tabindex=\"tab.value === modelValue ? 0 : -1\"\n class=\"h-9 px-3 rounded-[10px] text-sm font-600 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:opacity-60 disabled:cursor-not-allowed\"\n :class=\"tab.value === modelValue\n ? 'bg-[var(--card)] text-[var(--fg)] border border-[var(--brd)]'\n : 'text-[var(--muted-fg)] hover:text-[var(--fg)] hover:bg-[color-mix(in_srgb,var(--card)_70%,transparent)]'\"\n @click=\"onClick(tab)\"\n >\n <span class=\"inline-flex items-center gap-2\">\n <span>{{ tab.label }}</span>\n <span\n v-if=\"tab.badge\"\n class=\"text-[11px] px-1.5 py-0.5 rounded-full bg-[var(--secondary)] text-[var(--secondary-fg)]\"\n >\n {{ tab.badge }}\n </span>\n </span>\n </button>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA0BA,MAAM,QAAQ;EAEd,MAAM,OAAO;EAIb,MAAM,aAAa,IAAyB,EAAE,CAAA;EAE9C,SAAS,aAAa,IAAa,OAAqB;AACtD,OAAI,cAAc,kBAChB,YAAW,MAAM,SAAS;;EAG9B,MAAM,cAAc,eAAe,MAAM,KAAK,WAAU,MAAK,EAAE,UAAU,MAAM,WAAW,CAAA;EAE1F,SAAS,UAAU,KAAqB;AACtC,UAAO,CAAC,IAAI;;EAGd,eAAe,cAAc,OAAe,QAAQ,OAAsB;GACxE,MAAM,MAAM,MAAM,KAAK;AACvB,OAAI,CAAC,OAAO,CAAC,UAAU,IAAI,CACzB;AACF,OAAI,IAAI,UAAU,MAAM,WACtB,MAAK,qBAAqB,IAAI,MAAK;AACrC,OAAI,OAAO;AACT,UAAM,UAAS;AACf,eAAW,MAAM,QAAQ,OAAM;;;EAInC,SAAS,gBAAgB,MAAc,WAA2B;GAChE,MAAM,SAAS,MAAM,KAAK;AAC1B,OAAI,WAAW,EACb,QAAO;GACT,IAAI,QAAQ;AACZ,QAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,KAAK;AAC/B,aAAS,QAAQ,YAAY,UAAU;IACvC,MAAM,MAAM,MAAM,KAAK;AACvB,QAAI,OAAO,UAAU,IAAI,CACvB,QAAO;;AAEX,UAAO;;EAGT,SAAS,eAAuB;AAC9B,UAAO,MAAM,KAAK,UAAU,UAAS;;EAGvC,SAAS,cAAsB;AAC7B,QAAK,IAAI,IAAI,MAAM,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;IAC/C,MAAM,MAAM,MAAM,KAAK;AACvB,QAAI,OAAO,UAAU,IAAI,CACvB,QAAO;;AAEX,UAAO;;EAGT,SAAS,UAAU,OAA4B;AAC7C,OAAI,MAAM,KAAK,WAAW,EACxB;GAEF,MAAM,eAAe,YAAY,QAAQ,IAAI,IAAI,YAAY;GAC7D,IAAI,YAAY;AAEhB,WAAQ,MAAM,KAAd;IACE,KAAK;AACH,iBAAY,gBAAgB,cAAc,EAAC;AAC3C;IACF,KAAK;AACH,iBAAY,gBAAgB,cAAc,GAAE;AAC5C;IACF,KAAK;AACH,iBAAY,cAAa;AACzB;IACF,KAAK;AACH,iBAAY,aAAY;AACxB;IACF,QACE;;AAGJ,OAAI,YAAY,EACd;AAEF,SAAM,gBAAe;AAChB,iBAAc,WAAW,KAAI;;EAGpC,SAAS,QAAQ,KAAkB;AACjC,OAAI,CAAC,UAAU,IAAI,CACjB;AACF,OAAI,IAAI,UAAU,MAAM,WACtB,MAAK,qBAAqB,IAAI,MAAK;;;uBAKrC,mBAiCM,OAAA;IAhCJ,MAAK;IACL,gBAAA;IACA,OAAM;IACI;yBAEV,mBA0BS,UAAA,MAAA,WAzBgB,QAAA,OAAf,KAAK,UAAK;wBADpB,mBA0BS,UAAA;KAxBN,KAAK,IAAI;;KACT,MAAK,OAAM,aAAa,IAAI,MAAK;KAClC,MAAK;KACL,MAAK;KACL,eAAA;KACC,iBAAe,IAAI,UAAU,QAAA,aAAU,SAAA;KACvC,iBAAe,IAAI,WAAQ,SAAY,KAAA;KACvC,UAAU,IAAI;KACd,UAAU,IAAI,UAAU,QAAA,aAAU,IAAA;KACnC,OAAK,eAAA,CAAC,uLACE,IAAI,UAAU,QAAA,aAAA,iEAAA,0GAAA,CAAA;KAGrB,UAAK,WAAE,QAAQ,IAAG;QAEnB,mBAQO,QARP,YAQO,CAPL,mBAA4B,QAAA,MAAA,gBAAnB,IAAI,MAAK,EAAA,EAAA,EAEV,IAAI,SAAA,WAAA,EADZ,mBAKO,QALP,YAKO,gBADF,IAAI,MAAK,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA,CAAA,EAAA,IAAA,WAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t } from "../../chunks/config-
|
|
3
|
-
export {
|
|
1
|
+
import { t as GrTabs_default } from "./chunks/GrTabs-BpF8AAUz.js";
|
|
2
|
+
import { t as grTabsConfig } from "../../chunks/config-DmI1IQvI2.js";
|
|
3
|
+
export { GrTabs_default as GrTabs, GrTabs_default as default, grTabsConfig };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { r as grTextareaClass } from "../../../chunks/config-CWvHiaqr2.js";
|
|
2
|
+
import { computed, createElementBlock, defineComponent, normalizeClass, openBlock } from "vue";
|
|
3
|
+
//#region src/components/GrTextarea/GrTextarea.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _hoisted_1 = [
|
|
5
|
+
"id",
|
|
6
|
+
"name",
|
|
7
|
+
"rows",
|
|
8
|
+
"autocomplete",
|
|
9
|
+
"placeholder",
|
|
10
|
+
"disabled",
|
|
11
|
+
"value",
|
|
12
|
+
"aria-invalid"
|
|
13
|
+
];
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/GrTextarea/GrTextarea.vue
|
|
16
|
+
var GrTextarea_default = /* @__PURE__ */ defineComponent({
|
|
17
|
+
__name: "GrTextarea",
|
|
18
|
+
props: {
|
|
19
|
+
modelValue: {},
|
|
20
|
+
placeholder: { default: void 0 },
|
|
21
|
+
autocomplete: { default: void 0 },
|
|
22
|
+
disabled: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
invalid: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
state: { default: "default" },
|
|
31
|
+
name: { default: void 0 },
|
|
32
|
+
id: { default: void 0 },
|
|
33
|
+
rows: { default: 4 }
|
|
34
|
+
},
|
|
35
|
+
emits: ["update:modelValue"],
|
|
36
|
+
setup(__props, { emit: __emit }) {
|
|
37
|
+
/**
|
|
38
|
+
* GrTextarea — многострочное поле ввода DS-примитива.
|
|
39
|
+
*
|
|
40
|
+
* Состояния:
|
|
41
|
+
* - `state`: визуальный оттенок рамки (`default | success | warning | danger`).
|
|
42
|
+
* - `invalid`: форсирует `danger`-состояние и проставляет `aria-invalid="true"`.
|
|
43
|
+
*/
|
|
44
|
+
const props = __props;
|
|
45
|
+
const emit = __emit;
|
|
46
|
+
const className = computed(() => grTextareaClass({
|
|
47
|
+
state: props.state,
|
|
48
|
+
invalid: props.invalid
|
|
49
|
+
}));
|
|
50
|
+
function onInput(e) {
|
|
51
|
+
emit("update:modelValue", e.target.value);
|
|
52
|
+
}
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return openBlock(), createElementBlock("textarea", {
|
|
55
|
+
id: __props.id,
|
|
56
|
+
"data-ds-textarea": "",
|
|
57
|
+
name: __props.name,
|
|
58
|
+
rows: __props.rows,
|
|
59
|
+
autocomplete: __props.autocomplete,
|
|
60
|
+
placeholder: __props.placeholder,
|
|
61
|
+
disabled: __props.disabled,
|
|
62
|
+
value: __props.modelValue,
|
|
63
|
+
"aria-invalid": __props.invalid ? "true" : void 0,
|
|
64
|
+
class: normalizeClass(["w-full rounded-md border bg-[var(--bg)] px-3 py-2 text-[14px] text-[var(--fg)] placeholder:text-[var(--muted-fg)] transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:opacity-50 disabled:cursor-not-allowed", className.value]),
|
|
65
|
+
onInput
|
|
66
|
+
}, null, 42, _hoisted_1);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
//#endregion
|
|
71
|
+
export { GrTextarea_default as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GrTextarea-DFS9ZkrA.js","names":[],"sources":["../../../../src/components/GrTextarea/GrTextarea.vue","../../../../src/components/GrTextarea/GrTextarea.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * GrTextarea — многострочное поле ввода DS-примитива.\n *\n * Состояния:\n * - `state`: визуальный оттенок рамки (`default | success | warning | danger`).\n * - `invalid`: форсирует `danger`-состояние и проставляет `aria-invalid=\"true\"`.\n */\nimport { computed } from 'vue'\nimport { type GrTextareaState, grTextareaClass } from './grTextareaStyles'\n\nconst props = withDefaults(defineProps<{\n modelValue: string\n placeholder?: string\n autocomplete?: string\n disabled?: boolean\n invalid?: boolean\n state?: GrTextareaState\n name?: string\n id?: string\n rows?: number\n}>(), {\n placeholder: undefined,\n autocomplete: undefined,\n disabled: false,\n invalid: false,\n state: 'default',\n name: undefined,\n id: undefined,\n rows: 4,\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: string): void\n}>()\n\nexport type GrTextareaProps = typeof props\n\nconst className = computed(() => grTextareaClass({\n state: props.state,\n invalid: props.invalid,\n}))\n\nfunction onInput(e: Event): void {\n emit('update:modelValue', (e.target as HTMLTextAreaElement).value)\n}\n</script>\n\n<template>\n <textarea\n :id=\"id\"\n data-ds-textarea\n :name=\"name\"\n :rows=\"rows\"\n :autocomplete=\"autocomplete\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :value=\"modelValue\"\n :aria-invalid=\"invalid ? 'true' : undefined\"\n class=\"w-full rounded-md border bg-[var(--bg)] px-3 py-2 text-[14px] text-[var(--fg)] placeholder:text-[var(--muted-fg)] transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:opacity-50 disabled:cursor-not-allowed\"\n :class=\"className\"\n @input=\"onInput\"\n />\n</template>\n","<script setup lang=\"ts\">\n/**\n * GrTextarea — многострочное поле ввода DS-примитива.\n *\n * Состояния:\n * - `state`: визуальный оттенок рамки (`default | success | warning | danger`).\n * - `invalid`: форсирует `danger`-состояние и проставляет `aria-invalid=\"true\"`.\n */\nimport { computed } from 'vue'\nimport { type GrTextareaState, grTextareaClass } from './grTextareaStyles'\n\nconst props = withDefaults(defineProps<{\n modelValue: string\n placeholder?: string\n autocomplete?: string\n disabled?: boolean\n invalid?: boolean\n state?: GrTextareaState\n name?: string\n id?: string\n rows?: number\n}>(), {\n placeholder: undefined,\n autocomplete: undefined,\n disabled: false,\n invalid: false,\n state: 'default',\n name: undefined,\n id: undefined,\n rows: 4,\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: string): void\n}>()\n\nexport type GrTextareaProps = typeof props\n\nconst className = computed(() => grTextareaClass({\n state: props.state,\n invalid: props.invalid,\n}))\n\nfunction onInput(e: Event): void {\n emit('update:modelValue', (e.target as HTMLTextAreaElement).value)\n}\n</script>\n\n<template>\n <textarea\n :id=\"id\"\n data-ds-textarea\n :name=\"name\"\n :rows=\"rows\"\n :autocomplete=\"autocomplete\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :value=\"modelValue\"\n :aria-invalid=\"invalid ? 'true' : undefined\"\n class=\"w-full rounded-md border bg-[var(--bg)] px-3 py-2 text-[14px] text-[var(--fg)] placeholder:text-[var(--muted-fg)] transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:opacity-50 disabled:cursor-not-allowed\"\n :class=\"className\"\n @input=\"onInput\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWA,MAAM,QAAQ;EAqBd,MAAM,OAAO;EAMb,MAAM,YAAY,eAAe,gBAAgB;GAC/C,OAAO,MAAM;GACb,SAAS,MAAM;GAChB,CAAC,CAAA;EAEF,SAAS,QAAQ,GAAgB;AAC/B,QAAK,qBAAsB,EAAE,OAA+B,MAAK;;;uBAKjE,mBAaE,YAAA;IAZC,IAAI,QAAA;IACL,oBAAA;IACC,MAAM,QAAA;IACN,MAAM,QAAA;IACN,cAAc,QAAA;IACd,aAAa,QAAA;IACb,UAAU,QAAA;IACV,OAAO,QAAA;IACP,gBAAc,QAAA,UAAO,SAAY,KAAA;IAClC,OAAK,eAAA,CAAC,6QACE,UAAA,MAAS,CAAA;IACT"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { t as
|
|
3
|
-
export {
|
|
1
|
+
import { n as grTextareaSafelist, t as grTextareaConfig } from "../../chunks/config-CWvHiaqr2.js";
|
|
2
|
+
import { t as GrTextarea_default } from "./chunks/GrTextarea-DFS9ZkrA.js";
|
|
3
|
+
export { GrTextarea_default as GrTextarea, GrTextarea_default as default, grTextareaConfig, grTextareaSafelist };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { n as check_circle_default, r as alert_triangle_default, t as x_circle_default } from "../../../chunks/x-circle-DQSlBLmX.js";
|
|
2
|
+
import { t as info_default } from "../../../chunks/info-C0bHmdZq.js";
|
|
3
|
+
import { t as x_default } from "../../../chunks/x-Pa6C2hwi.js";
|
|
4
|
+
import { t as GrButton_default } from "../../GrButton/chunks/GrButton-BmGdp8-4.js";
|
|
5
|
+
import { t as GrIcon_default } from "../../GrIcon/chunks/GrIcon-BV7RBU_0.js";
|
|
6
|
+
import { useToast } from "../../../composables/useToast.js";
|
|
7
|
+
import { r as PLACEMENT_CLASS } from "../../../chunks/config-BvuQUBtZ.js";
|
|
8
|
+
import { Fragment, Teleport, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
|
|
9
|
+
//#region src/components/GrToaster/GrToaster.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var _hoisted_1 = ["aria-label"];
|
|
11
|
+
var _hoisted_2 = [
|
|
12
|
+
"data-tone",
|
|
13
|
+
"role",
|
|
14
|
+
"aria-live"
|
|
15
|
+
];
|
|
16
|
+
var _hoisted_3 = { class: "flex items-start gap-3" };
|
|
17
|
+
var _hoisted_4 = { class: "min-w-0 flex-1" };
|
|
18
|
+
var _hoisted_5 = { class: "text-[13px] font-700" };
|
|
19
|
+
var _hoisted_6 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "mt-0.5 text-[13px] text-[var(--muted-fg)]"
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/components/GrToaster/GrToaster.vue
|
|
25
|
+
var GrToaster_default = /* @__PURE__ */ defineComponent({
|
|
26
|
+
__name: "GrToaster",
|
|
27
|
+
props: {
|
|
28
|
+
placement: { default: "top-right" },
|
|
29
|
+
dismissLabel: { default: "Dismiss" },
|
|
30
|
+
regionLabel: { default: "Notifications" }
|
|
31
|
+
},
|
|
32
|
+
setup(__props) {
|
|
33
|
+
/**
|
|
34
|
+
* GrToaster — DS-примитив области уведомлений (toast).
|
|
35
|
+
*
|
|
36
|
+
* Модель состояния берётся из `useToast` (модульный синглтон), поэтому
|
|
37
|
+
* в приложении предполагается **один активный `GrToaster`** на корень.
|
|
38
|
+
*
|
|
39
|
+
* A11y:
|
|
40
|
+
* - контейнер — `role="region"` с `aria-label` (i18n-проп `regionLabel`);
|
|
41
|
+
* - каждый toast — `role="status"` + `aria-live="polite"` для `info`/`success`
|
|
42
|
+
* и `role="alert"` + `aria-live="assertive"` для `warning`/`danger`
|
|
43
|
+
* (критичные сообщения должны прерывать скринридер).
|
|
44
|
+
*
|
|
45
|
+
* UX:
|
|
46
|
+
* - появление/исчезновение анимируется `TransitionGroup`;
|
|
47
|
+
* - `placement` настраивает угол экрана;
|
|
48
|
+
* - `z-[60]` — выше, чем `GrModal` (`z-50`), чтобы уведомления не перекрывались диалогом.
|
|
49
|
+
*/
|
|
50
|
+
const TONE_META = {
|
|
51
|
+
primary: {
|
|
52
|
+
icon: info_default,
|
|
53
|
+
color: "var(--primary)",
|
|
54
|
+
role: "status",
|
|
55
|
+
live: "polite"
|
|
56
|
+
},
|
|
57
|
+
neutral: {
|
|
58
|
+
icon: info_default,
|
|
59
|
+
color: "var(--muted-fg)",
|
|
60
|
+
role: "status",
|
|
61
|
+
live: "polite"
|
|
62
|
+
},
|
|
63
|
+
info: {
|
|
64
|
+
icon: info_default,
|
|
65
|
+
color: "var(--ds-info)",
|
|
66
|
+
role: "status",
|
|
67
|
+
live: "polite"
|
|
68
|
+
},
|
|
69
|
+
success: {
|
|
70
|
+
icon: check_circle_default,
|
|
71
|
+
color: "var(--ds-success)",
|
|
72
|
+
role: "status",
|
|
73
|
+
live: "polite"
|
|
74
|
+
},
|
|
75
|
+
warning: {
|
|
76
|
+
icon: alert_triangle_default,
|
|
77
|
+
color: "var(--ds-warning)",
|
|
78
|
+
role: "alert",
|
|
79
|
+
live: "assertive"
|
|
80
|
+
},
|
|
81
|
+
danger: {
|
|
82
|
+
icon: x_circle_default,
|
|
83
|
+
color: "var(--ds-danger)",
|
|
84
|
+
role: "alert",
|
|
85
|
+
live: "assertive"
|
|
86
|
+
},
|
|
87
|
+
slate: {
|
|
88
|
+
icon: info_default,
|
|
89
|
+
color: "var(--ds-slate)",
|
|
90
|
+
role: "status",
|
|
91
|
+
live: "polite"
|
|
92
|
+
},
|
|
93
|
+
azure: {
|
|
94
|
+
icon: info_default,
|
|
95
|
+
color: "var(--ds-azure)",
|
|
96
|
+
role: "status",
|
|
97
|
+
live: "polite"
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const props = __props;
|
|
101
|
+
const { list, dismiss } = useToast();
|
|
102
|
+
const isClient = typeof window !== "undefined";
|
|
103
|
+
function metaFor(tone) {
|
|
104
|
+
return TONE_META[tone] ?? TONE_META.info;
|
|
105
|
+
}
|
|
106
|
+
const containerClass = computed(() => PLACEMENT_CLASS[props.placement]);
|
|
107
|
+
return (_ctx, _cache) => {
|
|
108
|
+
return openBlock(), createBlock(Teleport, {
|
|
109
|
+
to: "body",
|
|
110
|
+
disabled: !isClient
|
|
111
|
+
}, [createElementVNode("div", {
|
|
112
|
+
"data-ds-toaster": "",
|
|
113
|
+
role: "region",
|
|
114
|
+
"aria-label": __props.regionLabel,
|
|
115
|
+
class: normalizeClass(["fixed z-[60] grid w-[360px] max-w-[calc(100vw-2rem)] gap-3", containerClass.value])
|
|
116
|
+
}, [createVNode(TransitionGroup, {
|
|
117
|
+
tag: "div",
|
|
118
|
+
class: "grid gap-3",
|
|
119
|
+
"enter-active-class": "transition duration-200 ease-out",
|
|
120
|
+
"enter-from-class": "opacity-0 translate-y-2",
|
|
121
|
+
"enter-to-class": "opacity-100 translate-y-0",
|
|
122
|
+
"leave-active-class": "transition duration-150 ease-in absolute",
|
|
123
|
+
"leave-from-class": "opacity-100 translate-y-0",
|
|
124
|
+
"leave-to-class": "opacity-0 translate-y-2",
|
|
125
|
+
"move-class": "transition-transform duration-200 ease-out"
|
|
126
|
+
}, {
|
|
127
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (toast) => {
|
|
128
|
+
return openBlock(), createElementBlock("div", {
|
|
129
|
+
key: toast.id,
|
|
130
|
+
"data-ds-toast": "",
|
|
131
|
+
"data-tone": toast.tone,
|
|
132
|
+
role: metaFor(toast.tone).role,
|
|
133
|
+
"aria-live": metaFor(toast.tone).live,
|
|
134
|
+
"aria-atomic": "true",
|
|
135
|
+
class: "rounded-[var(--ds-radius-lg)] border border-[var(--brd)] bg-[var(--card)] px-4 py-3 shadow-[var(--ds-shadow-2)]"
|
|
136
|
+
}, [createElementVNode("div", _hoisted_3, [
|
|
137
|
+
createVNode(unref(GrIcon_default), {
|
|
138
|
+
size: "md",
|
|
139
|
+
class: "mt-0.5",
|
|
140
|
+
style: normalizeStyle({ color: metaFor(toast.tone).color }),
|
|
141
|
+
"aria-hidden": "true"
|
|
142
|
+
}, {
|
|
143
|
+
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(metaFor(toast.tone).icon)))]),
|
|
144
|
+
_: 2
|
|
145
|
+
}, 1032, ["style"]),
|
|
146
|
+
createElementVNode("div", _hoisted_4, [createElementVNode("div", _hoisted_5, toDisplayString(toast.title), 1), toast.message ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(toast.message), 1)) : createCommentVNode("", true)]),
|
|
147
|
+
createVNode(unref(GrButton_default), {
|
|
148
|
+
variant: "ghost",
|
|
149
|
+
size: "sm",
|
|
150
|
+
square: "",
|
|
151
|
+
"aria-label": __props.dismissLabel,
|
|
152
|
+
onClick: ($event) => unref(dismiss)(toast.id)
|
|
153
|
+
}, {
|
|
154
|
+
default: withCtx(() => [createVNode(unref(GrIcon_default), {
|
|
155
|
+
size: "sm",
|
|
156
|
+
"aria-hidden": "true"
|
|
157
|
+
}, {
|
|
158
|
+
default: withCtx(() => [createVNode(unref(x_default))]),
|
|
159
|
+
_: 1
|
|
160
|
+
})]),
|
|
161
|
+
_: 1
|
|
162
|
+
}, 8, ["aria-label", "onClick"])
|
|
163
|
+
])], 8, _hoisted_2);
|
|
164
|
+
}), 128))]),
|
|
165
|
+
_: 1
|
|
166
|
+
})], 10, _hoisted_1)], 8, ["disabled"]);
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
//#endregion
|
|
171
|
+
export { GrToaster_default as t };
|