@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.
Files changed (432) hide show
  1. package/dist/chunks/_plugin-vue_export-helper-BG_EqiDU.js +8 -0
  2. package/dist/chunks/adapter-K6zZTzBi.js +4 -0
  3. package/dist/chunks/adapter-K6zZTzBi.js.map +1 -0
  4. package/dist/chunks/arrow-up-DNXrMoAI.js +23 -0
  5. package/dist/chunks/arrow-up-DNXrMoAI.js.map +1 -0
  6. package/dist/chunks/classTokens-BPeBXNzu.js +6 -0
  7. package/dist/chunks/classTokens-BPeBXNzu.js.map +1 -0
  8. package/dist/chunks/config-1I95Zy4V.js +14 -0
  9. package/dist/chunks/config-1I95Zy4V.js.map +1 -0
  10. package/dist/chunks/config-2wgwWaAB.js +8 -0
  11. package/dist/chunks/config-2wgwWaAB.js.map +1 -0
  12. package/dist/chunks/config-BA0BWYzs.js +8 -0
  13. package/dist/chunks/config-BA0BWYzs.js.map +1 -0
  14. package/dist/chunks/config-BCPyma1I.js +8 -0
  15. package/dist/chunks/config-BCPyma1I.js.map +1 -0
  16. package/dist/chunks/config-BDlh6iNz.js +24 -0
  17. package/dist/chunks/config-BDlh6iNz.js.map +1 -0
  18. package/dist/chunks/config-BKRmlivc.js +8 -0
  19. package/dist/chunks/config-BKRmlivc.js.map +1 -0
  20. package/dist/chunks/config-BN-B2K4r.js +17 -0
  21. package/dist/chunks/config-BN-B2K4r.js.map +1 -0
  22. package/dist/chunks/config-BNOf_qjD.js +40 -0
  23. package/dist/chunks/config-BNOf_qjD.js.map +1 -0
  24. package/dist/chunks/config-BaMO9dQh.js +20 -0
  25. package/dist/chunks/config-BaMO9dQh.js.map +1 -0
  26. package/dist/chunks/config-Bv2G0OU6.js +8 -0
  27. package/dist/chunks/config-Bv2G0OU6.js.map +1 -0
  28. package/dist/chunks/config-BvuQUBtZ.js +21 -0
  29. package/dist/chunks/config-BvuQUBtZ.js.map +1 -0
  30. package/dist/chunks/config-BzZGpWsj.js +9 -0
  31. package/dist/chunks/config-BzZGpWsj.js.map +1 -0
  32. package/dist/chunks/config-C0j836dC.js +8 -0
  33. package/dist/chunks/config-C0j836dC.js.map +1 -0
  34. package/dist/chunks/config-C2iI7_QX.js +9 -0
  35. package/dist/chunks/config-C2iI7_QX.js.map +1 -0
  36. package/dist/chunks/config-C4AlNm912.js +13 -0
  37. package/dist/chunks/config-C4AlNm912.js.map +1 -0
  38. package/dist/chunks/config-C5SJXHQ4.js +9 -0
  39. package/dist/chunks/config-C5SJXHQ4.js.map +1 -0
  40. package/dist/chunks/config-C6SBJxcH.js +8 -0
  41. package/dist/chunks/config-C6SBJxcH.js.map +1 -0
  42. package/dist/chunks/config-CByfsV-z2.js +9 -0
  43. package/dist/chunks/config-CByfsV-z2.js.map +1 -0
  44. package/dist/chunks/config-CM7nbATU2.js +78 -0
  45. package/dist/chunks/config-CM7nbATU2.js.map +1 -0
  46. package/dist/chunks/config-CMZE2fu0.js +9 -0
  47. package/dist/chunks/config-CMZE2fu0.js.map +1 -0
  48. package/dist/chunks/config-CU_CBd0k.js +22 -0
  49. package/dist/chunks/config-CU_CBd0k.js.map +1 -0
  50. package/dist/chunks/config-CUgvsjZx.js +171 -0
  51. package/dist/chunks/config-CUgvsjZx.js.map +1 -0
  52. package/dist/chunks/config-CWvHiaqr2.js +23 -0
  53. package/dist/chunks/config-CWvHiaqr2.js.map +1 -0
  54. package/dist/chunks/config-Cf0J6wCX.js +58 -0
  55. package/dist/chunks/config-Cf0J6wCX.js.map +1 -0
  56. package/dist/chunks/config-CgAY2WP9.js +9 -0
  57. package/dist/chunks/config-CgAY2WP9.js.map +1 -0
  58. package/dist/chunks/config-Cgc-D1K4.js +9 -0
  59. package/dist/chunks/config-Cgc-D1K4.js.map +1 -0
  60. package/dist/chunks/config-D19pyP4D.js +35 -0
  61. package/dist/chunks/config-D19pyP4D.js.map +1 -0
  62. package/dist/chunks/config-DCQO6H6h.js +11 -0
  63. package/dist/chunks/config-DCQO6H6h.js.map +1 -0
  64. package/dist/chunks/config-DEv4m-ZP.js +58 -0
  65. package/dist/chunks/config-DEv4m-ZP.js.map +1 -0
  66. package/dist/chunks/config-DFRYOcrP.js +9 -0
  67. package/dist/chunks/config-DFRYOcrP.js.map +1 -0
  68. package/dist/chunks/config-DTpwUHgF.js +9 -0
  69. package/dist/chunks/config-DTpwUHgF.js.map +1 -0
  70. package/dist/chunks/config-DW_RqmUp.js +8 -0
  71. package/dist/chunks/config-DW_RqmUp.js.map +1 -0
  72. package/dist/chunks/config-Da90XGsi.js +38 -0
  73. package/dist/chunks/config-Da90XGsi.js.map +1 -0
  74. package/dist/chunks/config-DgRJlF00.js +53 -0
  75. package/dist/chunks/config-DgRJlF00.js.map +1 -0
  76. package/dist/chunks/config-Dkq0HeLe.js +9 -0
  77. package/dist/chunks/config-Dkq0HeLe.js.map +1 -0
  78. package/dist/chunks/config-DmI1IQvI2.js +8 -0
  79. package/dist/chunks/config-DmI1IQvI2.js.map +1 -0
  80. package/dist/chunks/config-Dnu4VuO0.js +8 -0
  81. package/dist/chunks/config-Dnu4VuO0.js.map +1 -0
  82. package/dist/chunks/config-DxqpV-KM.js +45 -0
  83. package/dist/chunks/config-DxqpV-KM.js.map +1 -0
  84. package/dist/chunks/config-TyzU6gLf.js +8 -0
  85. package/dist/chunks/config-TyzU6gLf.js.map +1 -0
  86. package/dist/chunks/config-XwI6t8cn.js +39 -0
  87. package/dist/chunks/config-XwI6t8cn.js.map +1 -0
  88. package/dist/chunks/config-bpQYM5O-.js +44 -0
  89. package/dist/chunks/config-bpQYM5O-.js.map +1 -0
  90. package/dist/chunks/config-etXh7Bsr2.js +9 -0
  91. package/dist/chunks/config-etXh7Bsr2.js.map +1 -0
  92. package/dist/chunks/config-fCcRwjIB.js +13 -0
  93. package/dist/chunks/config-fCcRwjIB.js.map +1 -0
  94. package/dist/chunks/config-nfOMJXVs.js +9 -0
  95. package/dist/chunks/config-nfOMJXVs.js.map +1 -0
  96. package/dist/chunks/config-qJXIIY1E.js +8 -0
  97. package/dist/chunks/config-qJXIIY1E.js.map +1 -0
  98. package/dist/chunks/config-r6hzn2Bn2.js +9 -0
  99. package/dist/chunks/config-r6hzn2Bn2.js.map +1 -0
  100. package/dist/chunks/config-rQlbnEKn.js +8 -0
  101. package/dist/chunks/config-rQlbnEKn.js.map +1 -0
  102. package/dist/chunks/dialogShared-BtXUk6Zc.js +32 -0
  103. package/dist/chunks/dialogShared-BtXUk6Zc.js.map +1 -0
  104. package/dist/chunks/en-BeJa78lP.js +48 -0
  105. package/dist/chunks/en-BeJa78lP.js.map +1 -0
  106. package/dist/chunks/es-BPqm7rLm.js +20 -0
  107. package/dist/chunks/es-BPqm7rLm.js.map +1 -0
  108. package/dist/chunks/es-axYOwwWD.js +48 -0
  109. package/dist/chunks/es-axYOwwWD.js.map +1 -0
  110. package/dist/chunks/fileValidation-CwJA8Vmn.js +219 -0
  111. package/dist/chunks/fileValidation-CwJA8Vmn.js.map +1 -0
  112. package/dist/chunks/{grBadgeStyles-Bu4H8bFc.js → grBadgeStyles-pqqbVgLk.js} +18 -13
  113. package/dist/chunks/grBadgeStyles-pqqbVgLk.js.map +1 -0
  114. package/dist/chunks/{grButtonStyles-C5k0bN2e.js → grButtonStyles-BxZW2x0-.js} +60 -52
  115. package/dist/chunks/grButtonStyles-BxZW2x0-.js.map +1 -0
  116. package/dist/chunks/{grDropdownStyles-149X1NeB.js → grDropdownStyles-DMp7RrI9.js} +10 -9
  117. package/dist/chunks/grDropdownStyles-DMp7RrI9.js.map +1 -0
  118. package/dist/chunks/grLoadingStyles-CrxZHFL0.js +17 -0
  119. package/dist/chunks/grLoadingStyles-CrxZHFL0.js.map +1 -0
  120. package/dist/chunks/{grModalStyles-Dmd4havY.js → grModalStyles-Dv2NXBKi.js} +20 -11
  121. package/dist/chunks/grModalStyles-Dv2NXBKi.js.map +1 -0
  122. package/dist/chunks/grSelectStyles-B7doeAQp.js +50 -0
  123. package/dist/chunks/grSelectStyles-B7doeAQp.js.map +1 -0
  124. package/dist/chunks/granularityI18n-GCqUz_lo.js +26 -0
  125. package/dist/chunks/granularityI18n-GCqUz_lo.js.map +1 -0
  126. package/dist/chunks/info-C0bHmdZq.js +26 -0
  127. package/dist/chunks/info-C0bHmdZq.js.map +1 -0
  128. package/dist/chunks/loader-circle-B2rWDk5u.js +23 -0
  129. package/dist/chunks/loader-circle-B2rWDk5u.js.map +1 -0
  130. package/dist/chunks/ru-Dqh-2C00.js +48 -0
  131. package/dist/chunks/ru-Dqh-2C00.js.map +1 -0
  132. package/dist/chunks/safelist-BF822K15.js +13 -0
  133. package/dist/chunks/safelist-BF822K15.js.map +1 -0
  134. package/dist/chunks/safelist-BY7z8fOl.js +24 -0
  135. package/dist/chunks/safelist-BY7z8fOl.js.map +1 -0
  136. package/dist/chunks/{shared-BqUqjuxn.js → shared-Cu5QkNmt.js} +149 -111
  137. package/dist/chunks/shared-Cu5QkNmt.js.map +1 -0
  138. package/dist/chunks/transition-mJ3PZCHH.js +1692 -0
  139. package/dist/chunks/transition-mJ3PZCHH.js.map +1 -0
  140. package/dist/chunks/x-Pa6C2hwi.js +23 -0
  141. package/dist/chunks/x-Pa6C2hwi.js.map +1 -0
  142. package/dist/chunks/x-circle-DQSlBLmX.js +67 -0
  143. package/dist/chunks/x-circle-DQSlBLmX.js.map +1 -0
  144. package/dist/components/GrAlert/chunks/GrAlert-BjerGcU8.js +146 -0
  145. package/dist/components/GrAlert/chunks/GrAlert-BjerGcU8.js.map +1 -0
  146. package/dist/components/GrAlert/index.js +3 -3
  147. package/dist/components/GrAvatar/chunks/GrAvatar-BjnPKNAL.js +41 -0
  148. package/dist/components/GrAvatar/chunks/GrAvatar-BjnPKNAL.js.map +1 -0
  149. package/dist/components/GrAvatar/index.js +3 -3
  150. package/dist/components/GrBadge/chunks/GrBadge-wuIb4_2K.js +32 -0
  151. package/dist/components/GrBadge/chunks/GrBadge-wuIb4_2K.js.map +1 -0
  152. package/dist/components/GrBadge/index.js +3 -3
  153. package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-CxtamOZ-.js +33 -0
  154. package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-CxtamOZ-.js.map +1 -0
  155. package/dist/components/GrBadgeWrap/index.js +3 -3
  156. package/dist/components/GrBottomNav/chunks/GrBottomNav-CsmQ7mTJ.js +31 -0
  157. package/dist/components/GrBottomNav/chunks/GrBottomNav-CsmQ7mTJ.js.map +1 -0
  158. package/dist/components/GrBottomNav/index.js +3 -3
  159. package/dist/components/GrButton/chunks/GrButton-BmGdp8-4.js +83 -0
  160. package/dist/components/GrButton/chunks/GrButton-BmGdp8-4.js.map +1 -0
  161. package/dist/components/GrButton/index.js +5 -5
  162. package/dist/components/GrButtonGroup/chunks/GrButtonGroup-CBj4tpms.js +21 -0
  163. package/dist/components/GrButtonGroup/chunks/GrButtonGroup-CBj4tpms.js.map +1 -0
  164. package/dist/components/GrButtonGroup/index.js +3 -3
  165. package/dist/components/GrCard/chunks/GrCard-xtDcXBr7.js +11 -0
  166. package/dist/components/GrCard/chunks/GrCard-xtDcXBr7.js.map +1 -0
  167. package/dist/components/GrCard/index.js +3 -3
  168. package/dist/components/GrCheckbox/chunks/GrCheckbox-Bt3d7ckE.js +134 -0
  169. package/dist/components/GrCheckbox/chunks/GrCheckbox-Bt3d7ckE.js.map +1 -0
  170. package/dist/components/GrCheckbox/index.js +3 -3
  171. package/dist/components/GrCollapse/chunks/GrCollapse-HU20VTVn.js +205 -0
  172. package/dist/components/GrCollapse/chunks/GrCollapse-HU20VTVn.js.map +1 -0
  173. package/dist/components/GrCollapse/index.js +3 -3
  174. package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-DjGOX9Hd.js +131 -0
  175. package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-DjGOX9Hd.js.map +1 -0
  176. package/dist/components/GrConfirmDialog/index.js +3 -3
  177. package/dist/components/GrDataTable/chunks/GrDataTable-QDOJWmdY.js +179 -0
  178. package/dist/components/GrDataTable/chunks/GrDataTable-QDOJWmdY.js.map +1 -0
  179. package/dist/components/GrDataTable/index.js +3 -3
  180. package/dist/components/GrDialog/chunks/GrDialog-gObmaVEl.js +221 -0
  181. package/dist/components/GrDialog/chunks/GrDialog-gObmaVEl.js.map +1 -0
  182. package/dist/components/GrDialog/index.js +4 -4
  183. package/dist/components/GrDrawer/chunks/GrDrawer-BJL_gTxI.js +156 -0
  184. package/dist/components/GrDrawer/chunks/GrDrawer-BJL_gTxI.js.map +1 -0
  185. package/dist/components/GrDrawer/index.js +3 -3
  186. package/dist/components/GrDropdown/chunks/GrDropdown-BkACCXdp.js +151 -0
  187. package/dist/components/GrDropdown/chunks/GrDropdown-BkACCXdp.js.map +1 -0
  188. package/dist/components/GrDropdown/index.js +3 -3
  189. package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-BEenXrJw.js +309 -0
  190. package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-BEenXrJw.js.map +1 -0
  191. package/dist/components/GrDropdownMenu/index.js +3 -3
  192. package/dist/components/GrEmptyState/chunks/GrEmptyState-BLbMJFW-.js +62 -0
  193. package/dist/components/GrEmptyState/chunks/GrEmptyState-BLbMJFW-.js.map +1 -0
  194. package/dist/components/GrEmptyState/index.js +3 -3
  195. package/dist/components/GrFileUpload/chunks/GrFileUpload-u01j9S0t.js +368 -0
  196. package/dist/components/GrFileUpload/chunks/GrFileUpload-u01j9S0t.js.map +1 -0
  197. package/dist/components/GrFileUpload/index.js +4 -4
  198. package/dist/components/GrFormField/chunks/GrFormField-C6PfAs4u.js +35 -0
  199. package/dist/components/GrFormField/chunks/GrFormField-C6PfAs4u.js.map +1 -0
  200. package/dist/components/GrFormField/index.js +3 -3
  201. package/dist/components/GrFormFile/chunks/GrFormFile-DdM8Bc2B.js +313 -0
  202. package/dist/components/GrFormFile/chunks/GrFormFile-DdM8Bc2B.js.map +1 -0
  203. package/dist/components/GrFormFile/index.js +3 -3
  204. package/dist/components/GrFormSection/chunks/GrFormSection-5djEaQZQ.js +35 -0
  205. package/dist/components/GrFormSection/chunks/GrFormSection-5djEaQZQ.js.map +1 -0
  206. package/dist/components/GrFormSection/index.js +3 -3
  207. package/dist/components/GrIcon/chunks/GrIcon-BV7RBU_0.js +32 -0
  208. package/dist/components/GrIcon/chunks/GrIcon-BV7RBU_0.js.map +1 -0
  209. package/dist/components/GrIcon/index.js +3 -3
  210. package/dist/components/GrImageViewer/chunks/GrImageViewer-CjSnohW7.js +397 -0
  211. package/dist/components/GrImageViewer/chunks/GrImageViewer-CjSnohW7.js.map +1 -0
  212. package/dist/components/GrImageViewer/index.js +3 -3
  213. package/dist/components/GrInput/chunks/GrInput-ghxaTf6d.js +211 -0
  214. package/dist/components/GrInput/chunks/GrInput-ghxaTf6d.js.map +1 -0
  215. package/dist/components/GrInput/index.js +3 -3
  216. package/dist/components/GrInputTag/chunks/GrInputTag-B0x4U0Yk.js +257 -0
  217. package/dist/components/GrInputTag/chunks/GrInputTag-B0x4U0Yk.js.map +1 -0
  218. package/dist/components/GrInputTag/index.js +3 -3
  219. package/dist/components/GrLink/chunks/GrLink-C7-Y1u88.js +80 -0
  220. package/dist/components/GrLink/chunks/GrLink-C7-Y1u88.js.map +1 -0
  221. package/dist/components/GrLink/index.js +3 -3
  222. package/dist/components/GrList/chunks/GrList--Ib4zLNw.js +77 -0
  223. package/dist/components/GrList/chunks/GrList--Ib4zLNw.js.map +1 -0
  224. package/dist/components/GrList/index.js +3 -3
  225. package/dist/components/GrLoading/chunks/GrLoading-C3QZKwE-.js +69 -0
  226. package/dist/components/GrLoading/chunks/GrLoading-C3QZKwE-.js.map +1 -0
  227. package/dist/components/GrLoading/index.js +3 -3
  228. package/dist/components/GrModal/chunks/GrModal-gvfvlp7k.js +168 -0
  229. package/dist/components/GrModal/chunks/GrModal-gvfvlp7k.js.map +1 -0
  230. package/dist/components/GrModal/index.js +4 -4
  231. package/dist/components/GrNavbar/chunks/GrNavbar-nIyuiVj1.js +75 -0
  232. package/dist/components/GrNavbar/chunks/GrNavbar-nIyuiVj1.js.map +1 -0
  233. package/dist/components/GrNavbar/index.js +3 -3
  234. package/dist/components/GrNumberInput/chunks/GrNumberInput-B0mPLjdv.js +397 -0
  235. package/dist/components/GrNumberInput/chunks/GrNumberInput-B0mPLjdv.js.map +1 -0
  236. package/dist/components/GrNumberInput/index.js +3 -3
  237. package/dist/components/GrPagination/chunks/GrPagination-BSTO6flk.js +114 -0
  238. package/dist/components/GrPagination/chunks/GrPagination-BSTO6flk.js.map +1 -0
  239. package/dist/components/GrPagination/index.js +3 -3
  240. package/dist/components/GrProgressBar/chunks/GrProgressBar-MvMnzsJl.js +39 -0
  241. package/dist/components/GrProgressBar/chunks/GrProgressBar-MvMnzsJl.js.map +1 -0
  242. package/dist/components/GrProgressBar/index.js +3 -3
  243. package/dist/components/GrPromptDialog/chunks/GrPromptDialog-DKhbN6ji.js +190 -0
  244. package/dist/components/GrPromptDialog/chunks/GrPromptDialog-DKhbN6ji.js.map +1 -0
  245. package/dist/components/GrPromptDialog/index.js +3 -3
  246. package/dist/components/GrRadio/chunks/GrRadio-BxBs3WHq.js +184 -0
  247. package/dist/components/GrRadio/chunks/GrRadio-BxBs3WHq.js.map +1 -0
  248. package/dist/components/GrRadio/index.js +3 -3
  249. package/dist/components/GrRadioGroup/chunks/GrRadioGroup-CEAfJQ6A.js +80 -0
  250. package/dist/components/GrRadioGroup/chunks/GrRadioGroup-CEAfJQ6A.js.map +1 -0
  251. package/dist/components/GrRadioGroup/index.js +3 -3
  252. package/dist/components/GrSegmented/chunks/GrSegmented-Bwn2qOY4.js +323 -0
  253. package/dist/components/GrSegmented/chunks/GrSegmented-Bwn2qOY4.js.map +1 -0
  254. package/dist/components/GrSegmented/index.js +3 -3
  255. package/dist/components/GrSelect/chunks/GrSelect-9wRWAu2R.js +443 -0
  256. package/dist/components/GrSelect/chunks/GrSelect-9wRWAu2R.js.map +1 -0
  257. package/dist/components/GrSelect/index.js +3 -3
  258. package/dist/components/GrSidebar/chunks/GrSidebar-CSZ3RpFB.js +44 -0
  259. package/dist/components/GrSidebar/chunks/GrSidebar-CSZ3RpFB.js.map +1 -0
  260. package/dist/components/GrSidebar/index.js +3 -3
  261. package/dist/components/GrSkeleton/chunks/GrSkeleton-DKXkqWDa.js +33 -0
  262. package/dist/components/GrSkeleton/chunks/GrSkeleton-DKXkqWDa.js.map +1 -0
  263. package/dist/components/GrSkeleton/index.js +3 -3
  264. package/dist/components/GrSwitch/chunks/GrSwitch-CdBxwV3k.js +79 -0
  265. package/dist/components/GrSwitch/chunks/GrSwitch-CdBxwV3k.js.map +1 -0
  266. package/dist/components/GrSwitch/index.js +3 -3
  267. package/dist/components/GrTable/chunks/GrTable-CyQ9uw8A.js +57 -0
  268. package/dist/components/GrTable/chunks/GrTable-CyQ9uw8A.js.map +1 -0
  269. package/dist/components/GrTable/index.js +3 -3
  270. package/dist/components/GrTabs/chunks/GrTabs-BpF8AAUz.js +118 -0
  271. package/dist/components/GrTabs/chunks/GrTabs-BpF8AAUz.js.map +1 -0
  272. package/dist/components/GrTabs/index.js +3 -3
  273. package/dist/components/GrTextarea/chunks/GrTextarea-DFS9ZkrA.js +71 -0
  274. package/dist/components/GrTextarea/chunks/GrTextarea-DFS9ZkrA.js.map +1 -0
  275. package/dist/components/GrTextarea/index.js +3 -3
  276. package/dist/components/GrToaster/chunks/GrToaster-3Mf0Moxt.js +171 -0
  277. package/dist/components/GrToaster/chunks/GrToaster-3Mf0Moxt.js.map +1 -0
  278. package/dist/components/GrToaster/index.js +3 -3
  279. package/dist/components/GrTooltip/chunks/GrTooltip-BvmsukLW.js +55 -0
  280. package/dist/components/GrTooltip/chunks/GrTooltip-BvmsukLW.js.map +1 -0
  281. package/dist/components/GrTooltip/index.js +3 -3
  282. package/dist/components/GrTree/chunks/GrTree-C2kN-O4Q.js +734 -0
  283. package/dist/components/GrTree/chunks/GrTree-C2kN-O4Q.js.map +1 -0
  284. package/dist/components/GrTree/index.js +3 -3
  285. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-Da-CpRqm.js +454 -0
  286. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-Da-CpRqm.js.map +1 -0
  287. package/dist/components/GrTreeSelect/index.js +3 -3
  288. package/dist/composables/useTheme.js +39 -30
  289. package/dist/composables/useTheme.js.map +1 -0
  290. package/dist/composables/useToast.js +41 -34
  291. package/dist/composables/useToast.js.map +1 -0
  292. package/dist/directives/autofocus.js +55 -0
  293. package/dist/directives/autofocus.js.map +1 -0
  294. package/dist/directives/autosize.js +117 -0
  295. package/dist/directives/autosize.js.map +1 -0
  296. package/dist/directives/clickOutside.js +96 -0
  297. package/dist/directives/clickOutside.js.map +1 -0
  298. package/dist/directives/dropzone.js +164 -0
  299. package/dist/directives/dropzone.js.map +1 -0
  300. package/dist/directives/hotkey.js +138 -0
  301. package/dist/directives/hotkey.js.map +1 -0
  302. package/dist/directives/index.js +7 -2
  303. package/dist/directives/loading.js +163 -0
  304. package/dist/directives/loading.js.map +1 -0
  305. package/dist/fileValidation/index.js +2 -2
  306. package/dist/granular-provider-node.js +23 -14
  307. package/dist/granular-provider-node.js.map +1 -0
  308. package/dist/granular-provider.js +3 -3
  309. package/dist/granular-provider.js.map +1 -0
  310. package/dist/i18n/all.js +6 -6
  311. package/dist/i18n/all.js.map +1 -0
  312. package/dist/i18n/index.js +3 -3
  313. package/dist/index.js +110 -105
  314. package/dist/vue/index.js +64 -26
  315. package/dist/vue/index.js.map +1 -0
  316. package/package.json +25 -1
  317. package/dist/chunks/_plugin-vue_export-helper-CHO2XVys.js +0 -8
  318. package/dist/chunks/adapter-D5uYoOZj.js +0 -4
  319. package/dist/chunks/arrow-up-Dv3dC3hu.js +0 -23
  320. package/dist/chunks/classTokens-CT1tqF2j.js +0 -6
  321. package/dist/chunks/config-B5JCvHys.js +0 -13
  322. package/dist/chunks/config-BDXa5Sna2.js +0 -9
  323. package/dist/chunks/config-BG5_FuZ-.js +0 -34
  324. package/dist/chunks/config-BMYKG1oB.js +0 -10
  325. package/dist/chunks/config-BQREEXFD.js +0 -8
  326. package/dist/chunks/config-BUZtbeTr.js +0 -40
  327. package/dist/chunks/config-BVXycfiO.js +0 -9
  328. package/dist/chunks/config-BZW-RL6E.js +0 -14
  329. package/dist/chunks/config-BhbfV-Is.js +0 -48
  330. package/dist/chunks/config-BmYFupZh.js +0 -8
  331. package/dist/chunks/config-BsZc_QQ-2.js +0 -20
  332. package/dist/chunks/config-C1Sn7mn-.js +0 -27
  333. package/dist/chunks/config-C4_REX-3.js +0 -9
  334. package/dist/chunks/config-CBFllZZ4.js +0 -9
  335. package/dist/chunks/config-CDyD_fCt.js +0 -8
  336. package/dist/chunks/config-CJeG727i.js +0 -149
  337. package/dist/chunks/config-CLawBqde.js +0 -21
  338. package/dist/chunks/config-CMz46RPG.js +0 -8
  339. package/dist/chunks/config-CO-7HRZd2.js +0 -8
  340. package/dist/chunks/config-CS7E7LME.js +0 -9
  341. package/dist/chunks/config-CVy124Xj.js +0 -8
  342. package/dist/chunks/config-CcixQGaN.js +0 -47
  343. package/dist/chunks/config-CiVXZxyQ.js +0 -9
  344. package/dist/chunks/config-CoMQmunP.js +0 -8
  345. package/dist/chunks/config-Cq6ufYtp.js +0 -9
  346. package/dist/chunks/config-D8CIEWcb.js +0 -8
  347. package/dist/chunks/config-D8hKc39m.js +0 -18
  348. package/dist/chunks/config-D9MxGwCJ.js +0 -8
  349. package/dist/chunks/config-DBXTZE36.js +0 -15
  350. package/dist/chunks/config-DK9C8O7L.js +0 -9
  351. package/dist/chunks/config-DTegOmx2.js +0 -8
  352. package/dist/chunks/config-DYI8XADo.js +0 -47
  353. package/dist/chunks/config-DlidGf7P.js +0 -8
  354. package/dist/chunks/config-DtNe7EIX.js +0 -35
  355. package/dist/chunks/config-EdWeK_ge.js +0 -17
  356. package/dist/chunks/config-FGAkxHFh.js +0 -8
  357. package/dist/chunks/config-M76gNxd2.js +0 -37
  358. package/dist/chunks/config-NuqoO_Of.js +0 -33
  359. package/dist/chunks/config-QsovJrku2.js +0 -66
  360. package/dist/chunks/config-R6F6zRJk.js +0 -9
  361. package/dist/chunks/config-SLwkDc4Q2.js +0 -9
  362. package/dist/chunks/config-aJ7sb62Y.js +0 -8
  363. package/dist/chunks/config-b9nc87Oc.js +0 -9
  364. package/dist/chunks/config-dSI8RttH2.js +0 -8
  365. package/dist/chunks/config-im2VHeSM.js +0 -9
  366. package/dist/chunks/config-vKeQ035f.js +0 -9
  367. package/dist/chunks/config-vMcxHlWi.js +0 -14
  368. package/dist/chunks/dialogShared-CONROtU2.js +0 -26
  369. package/dist/chunks/directives-Dr5NPOT8.js +0 -530
  370. package/dist/chunks/en-j3simI0h.js +0 -41
  371. package/dist/chunks/es-CIT9s_vo.js +0 -4
  372. package/dist/chunks/es-CLpJj7KP.js +0 -41
  373. package/dist/chunks/fileValidation-LFD-vwil.js +0 -193
  374. package/dist/chunks/grLoadingStyles-Bjo7ylmq.js +0 -15
  375. package/dist/chunks/grSelectStyles-C3QKIn1J.js +0 -40
  376. package/dist/chunks/granularityI18n-8_v1B11L.js +0 -24
  377. package/dist/chunks/info-CNJnuTYC.js +0 -26
  378. package/dist/chunks/loader-circle-C5vCCMfB.js +0 -23
  379. package/dist/chunks/ru-CiOZPnBu.js +0 -41
  380. package/dist/chunks/safelist-Bq32hAXc.js +0 -13
  381. package/dist/chunks/safelist-CLcTRYB-.js +0 -22
  382. package/dist/chunks/transition-BJXMi52x.js +0 -1617
  383. package/dist/chunks/x--kxrj3ez.js +0 -23
  384. package/dist/chunks/x-circle-ChJ87u1v.js +0 -61
  385. package/dist/components/GrAlert/chunks/GrAlert-DLHkusb-.js +0 -129
  386. package/dist/components/GrAvatar/chunks/GrAvatar-BFYH3HJw.js +0 -32
  387. package/dist/components/GrBadge/chunks/GrBadge-D_AoqGrn.js +0 -27
  388. package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-C_N0QJfA.js +0 -26
  389. package/dist/components/GrBottomNav/chunks/GrBottomNav-Chpu3SVd.js +0 -21
  390. package/dist/components/GrButton/chunks/GrButton-BXVVt6Od.js +0 -67
  391. package/dist/components/GrButtonGroup/chunks/GrButtonGroup-CmnYHVH7.js +0 -16
  392. package/dist/components/GrCard/chunks/GrCard-DEpN6Ptf.js +0 -10
  393. package/dist/components/GrCheckbox/chunks/GrCheckbox-DF3vJApB.js +0 -111
  394. package/dist/components/GrCollapse/chunks/GrCollapse-D7QYRqNa.js +0 -150
  395. package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-C7Eh8-Vn.js +0 -111
  396. package/dist/components/GrDataTable/chunks/GrDataTable-Dxsg1NMP.js +0 -142
  397. package/dist/components/GrDialog/chunks/GrDialog-BSd4-uP5.js +0 -169
  398. package/dist/components/GrDrawer/chunks/GrDrawer-DBBSwe1s.js +0 -135
  399. package/dist/components/GrDropdown/chunks/GrDropdown-BELyRP4A.js +0 -110
  400. package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-B8fuk7iP.js +0 -233
  401. package/dist/components/GrEmptyState/chunks/GrEmptyState-BPGoafJI.js +0 -49
  402. package/dist/components/GrFileUpload/chunks/GrFileUpload-BPzx3LEM.js +0 -294
  403. package/dist/components/GrFormField/chunks/GrFormField-Cn8g9eFP.js +0 -28
  404. package/dist/components/GrFormFile/chunks/GrFormFile-DfinD5Iv.js +0 -248
  405. package/dist/components/GrFormSection/chunks/GrFormSection-dKpQw-vh.js +0 -27
  406. package/dist/components/GrIcon/chunks/GrIcon-CXIHuG7L.js +0 -25
  407. package/dist/components/GrImageViewer/chunks/GrImageViewer-CQSNx-D7.js +0 -322
  408. package/dist/components/GrInput/chunks/GrInput-CLKX1inm.js +0 -158
  409. package/dist/components/GrInputTag/chunks/GrInputTag-BAtLody2.js +0 -214
  410. package/dist/components/GrLink/chunks/GrLink-BpXnly-Y.js +0 -59
  411. package/dist/components/GrList/chunks/GrList-BrFc7VdS.js +0 -55
  412. package/dist/components/GrLoading/chunks/GrLoading-dFuoryMY.js +0 -53
  413. package/dist/components/GrModal/chunks/GrModal-uaWXH08K.js +0 -136
  414. package/dist/components/GrNavbar/chunks/GrNavbar-KzLHgdjX.js +0 -62
  415. package/dist/components/GrNumberInput/chunks/GrNumberInput-rENn1802.js +0 -315
  416. package/dist/components/GrPagination/chunks/GrPagination-DP0x3rx6.js +0 -93
  417. package/dist/components/GrProgressBar/chunks/GrProgressBar-DpW93sOi.js +0 -29
  418. package/dist/components/GrPromptDialog/chunks/GrPromptDialog-ASfBwyzQ.js +0 -158
  419. package/dist/components/GrRadio/chunks/GrRadio-8BOo97XV.js +0 -147
  420. package/dist/components/GrRadioGroup/chunks/GrRadioGroup-BymbUmqI.js +0 -66
  421. package/dist/components/GrSegmented/chunks/GrSegmented-CK5C_lN7.js +0 -250
  422. package/dist/components/GrSelect/chunks/GrSelect-BMfc1-vs.js +0 -314
  423. package/dist/components/GrSidebar/chunks/GrSidebar-C4SXXhfO.js +0 -29
  424. package/dist/components/GrSkeleton/chunks/GrSkeleton-QlieOdpY.js +0 -25
  425. package/dist/components/GrSwitch/chunks/GrSwitch-Cefiutzu.js +0 -64
  426. package/dist/components/GrTable/chunks/GrTable-k_FUiJQk.js +0 -44
  427. package/dist/components/GrTabs/chunks/GrTabs-B46P-lUc.js +0 -98
  428. package/dist/components/GrTextarea/chunks/GrTextarea-BX7L1MJk.js +0 -57
  429. package/dist/components/GrToaster/chunks/GrToaster-C4l_BjOh.js +0 -139
  430. package/dist/components/GrTooltip/chunks/GrTooltip-BqRAzuLT.js +0 -37
  431. package/dist/components/GrTree/chunks/GrTree-C2CXR_vW.js +0 -614
  432. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-DAAay-QB.js +0 -353
@@ -0,0 +1,221 @@
1
+ import { t as x_default } from "../../../chunks/x-Pa6C2hwi.js";
2
+ import { t as GrButton_default } from "../../GrButton/chunks/GrButton-BmGdp8-4.js";
3
+ import { a as Ve } from "../../../chunks/transition-mJ3PZCHH.js";
4
+ import { t as GrModal_default } from "../../GrModal/chunks/GrModal-gvfvlp7k.js";
5
+ import { a as resolveGrDialogTitle, i as resolveGrDialogSectionConfig, n as DEFAULT_GR_DIALOG_FOOTER_CONFIG, r as DEFAULT_GR_DIALOG_HEADER_CONFIG, t as DEFAULT_GR_DIALOG_BODY_CONFIG } from "../../../chunks/dialogShared-BtXUk6Zc.js";
6
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, renderSlot, toDisplayString, unref, useAttrs, useSlots, withCtx } from "vue";
7
+ //#endregion
8
+ //#region src/components/GrDialog/GrDialogFooter.vue
9
+ var GrDialogFooter_default = /* @__PURE__ */ defineComponent({
10
+ __name: "GrDialogFooter",
11
+ props: { config: { default: void 0 } },
12
+ setup(__props) {
13
+ const props = __props;
14
+ const resolvedConfig = computed(() => resolveGrDialogSectionConfig(props.config, DEFAULT_GR_DIALOG_FOOTER_CONFIG));
15
+ const rootClass = computed(() => [
16
+ resolvedConfig.value.paddingX,
17
+ resolvedConfig.value.paddingY,
18
+ resolvedConfig.value.bordered ? "border-t border-[var(--brd)]" : ""
19
+ ]);
20
+ return (_ctx, _cache) => {
21
+ return openBlock(), createElementBlock("div", {
22
+ "data-ds-dialog-footer": "",
23
+ class: normalizeClass(rootClass.value)
24
+ }, [renderSlot(_ctx.$slots, "default")], 2);
25
+ };
26
+ }
27
+ });
28
+ //#endregion
29
+ //#region src/components/GrDialog/GrDialogCloseButton.vue
30
+ var GrDialogCloseButton_default = /* @__PURE__ */ defineComponent({
31
+ inheritAttrs: false,
32
+ __name: "GrDialogCloseButton",
33
+ emits: ["click"],
34
+ setup(__props) {
35
+ const attrs = useAttrs();
36
+ const ariaLabel = computed(() => attrs["aria-label"] ?? "Close");
37
+ return (_ctx, _cache) => {
38
+ return openBlock(), createBlock(GrButton_default, mergeProps(unref(attrs), {
39
+ "data-ds-dialog-close": "",
40
+ variant: "ghost",
41
+ size: "sm",
42
+ square: "",
43
+ "aria-label": ariaLabel.value,
44
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
45
+ }), {
46
+ default: withCtx(() => [createVNode(unref(x_default), {
47
+ class: "h-4 w-4",
48
+ "aria-hidden": "true"
49
+ })]),
50
+ _: 1
51
+ }, 16, ["aria-label"]);
52
+ };
53
+ }
54
+ });
55
+ //#endregion
56
+ //#region src/components/GrDialog/GrDialogHeader.vue?vue&type=script&setup=true&lang.ts
57
+ var _hoisted_1$1 = {
58
+ key: 0,
59
+ class: "flex-1 min-w-0 flex items-center"
60
+ };
61
+ var _hoisted_2$1 = {
62
+ key: 2,
63
+ class: "flex-1 min-w-0"
64
+ };
65
+ //#endregion
66
+ //#region src/components/GrDialog/GrDialogHeader.vue
67
+ var GrDialogHeader_default = /* @__PURE__ */ defineComponent({
68
+ __name: "GrDialogHeader",
69
+ props: {
70
+ title: { default: void 0 },
71
+ showCloseButton: {
72
+ type: Boolean,
73
+ default: true
74
+ },
75
+ config: { default: void 0 },
76
+ closeLabel: { default: "Close" }
77
+ },
78
+ emits: ["close"],
79
+ setup(__props) {
80
+ const props = __props;
81
+ const slots = useSlots();
82
+ const resolvedTitle = computed(() => resolveGrDialogTitle(props.title));
83
+ const resolvedConfig = computed(() => resolveGrDialogSectionConfig(props.config, DEFAULT_GR_DIALOG_HEADER_CONFIG));
84
+ const rootClass = computed(() => [
85
+ resolvedConfig.value.paddingX,
86
+ resolvedConfig.value.paddingY,
87
+ resolvedConfig.value.bordered ? "border-b border-[var(--brd)]" : "",
88
+ "flex items-center justify-between gap-4"
89
+ ]);
90
+ const showVisibleTitle = computed(() => !slots.default && !!resolvedTitle.value);
91
+ return (_ctx, _cache) => {
92
+ return openBlock(), createElementBlock("div", {
93
+ "data-ds-dialog-header": "",
94
+ class: normalizeClass(rootClass.value)
95
+ }, [slots.default ? (openBlock(), createElementBlock("div", _hoisted_1$1, [renderSlot(_ctx.$slots, "default", { title: resolvedTitle.value })])) : showVisibleTitle.value ? (openBlock(), createBlock(unref(Ve), {
96
+ key: 1,
97
+ as: "div",
98
+ class: "flex-1 min-w-0 text-[14px] font-700"
99
+ }, {
100
+ default: withCtx(() => [createTextVNode(toDisplayString(resolvedTitle.value), 1)]),
101
+ _: 1
102
+ })) : (openBlock(), createElementBlock("div", _hoisted_2$1)), __props.showCloseButton ? (openBlock(), createBlock(GrDialogCloseButton_default, {
103
+ key: 3,
104
+ "aria-label": __props.closeLabel,
105
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
106
+ }, null, 8, ["aria-label"])) : createCommentVNode("", true)], 2);
107
+ };
108
+ }
109
+ });
110
+ //#endregion
111
+ //#region src/components/GrDialog/GrDialog.vue?vue&type=script&setup=true&lang.ts
112
+ var _hoisted_1 = { class: "sr-only" };
113
+ var _hoisted_2 = { class: "overflow-hidden rounded-[inherit]" };
114
+ //#endregion
115
+ //#region src/components/GrDialog/GrDialog.vue
116
+ var GrDialog_default = /* @__PURE__ */ defineComponent({
117
+ __name: "GrDialog",
118
+ props: {
119
+ modelValue: { type: Boolean },
120
+ title: { default: void 0 },
121
+ closeOnBackdrop: {
122
+ type: Boolean,
123
+ default: true
124
+ },
125
+ closeOnEsc: {
126
+ type: Boolean,
127
+ default: true
128
+ },
129
+ showHeader: {
130
+ type: Boolean,
131
+ default: true
132
+ },
133
+ showCloseButton: {
134
+ type: Boolean,
135
+ default: true
136
+ },
137
+ size: { default: "md" },
138
+ headerConfig: { default: void 0 },
139
+ footerConfig: { default: void 0 },
140
+ bodyConfig: { default: void 0 },
141
+ closeLabel: { default: "Close" }
142
+ },
143
+ emits: ["update:modelValue"],
144
+ setup(__props, { emit: __emit }) {
145
+ /**
146
+ * GrDialog — DS-примитив диалога поверх `GrModal`.
147
+ *
148
+ * Архитектурно:
149
+ * - ширина/радиус/скролл-лок/Esc/бэкдроп — ответственность `GrModal`;
150
+ * - заголовок/подвал/кнопка закрытия/паддинги секций — ответственность `GrDialog`.
151
+ *
152
+ * A11y: ровно один `DialogTitle` на открытое окно.
153
+ * - Если хедер отображается без слота `#header` — видимый `DialogTitle` рендерит
154
+ * `GrDialogHeader`.
155
+ * - В остальных случаях (`!showHeader`, либо `showHeader` со слотом `#header`)
156
+ * `GrDialog` отдаёт sr-only title в слот `#title` у `GrModal`, чтобы
157
+ * HeadlessUI корректно проставил `aria-labelledby` на панель.
158
+ */
159
+ const props = __props;
160
+ const emit = __emit;
161
+ const slots = useSlots();
162
+ const resolvedTitle = computed(() => resolveGrDialogTitle(props.title));
163
+ const bodyClass = computed(() => {
164
+ const cfg = resolveGrDialogSectionConfig(props.bodyConfig, DEFAULT_GR_DIALOG_BODY_CONFIG);
165
+ return [cfg.paddingX, cfg.paddingY];
166
+ });
167
+ const useModalSrOnlyTitle = computed(() => !!resolvedTitle.value && (!props.showHeader || !!slots.header));
168
+ function close() {
169
+ emit("update:modelValue", false);
170
+ }
171
+ return (_ctx, _cache) => {
172
+ return openBlock(), createBlock(GrModal_default, {
173
+ "model-value": __props.modelValue,
174
+ size: __props.size,
175
+ "close-on-backdrop": __props.closeOnBackdrop,
176
+ "close-on-esc": __props.closeOnEsc,
177
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event))
178
+ }, createSlots({
179
+ default: withCtx(() => [createElementVNode("div", _hoisted_2, [
180
+ __props.showHeader ? (openBlock(), createBlock(GrDialogHeader_default, {
181
+ key: 0,
182
+ title: resolvedTitle.value,
183
+ "show-close-button": __props.showCloseButton,
184
+ config: __props.headerConfig,
185
+ "close-label": __props.closeLabel,
186
+ onClose: close
187
+ }, createSlots({ _: 2 }, [slots.header ? {
188
+ name: "default",
189
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(slotProps)))]),
190
+ key: "0"
191
+ } : void 0]), 1032, [
192
+ "title",
193
+ "show-close-button",
194
+ "config",
195
+ "close-label"
196
+ ])) : createCommentVNode("", true),
197
+ createElementVNode("div", { class: normalizeClass(bodyClass.value) }, [renderSlot(_ctx.$slots, "default")], 2),
198
+ slots.footer ? (openBlock(), createBlock(GrDialogFooter_default, {
199
+ key: 1,
200
+ config: __props.footerConfig
201
+ }, {
202
+ default: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
203
+ _: 3
204
+ }, 8, ["config"])) : createCommentVNode("", true)
205
+ ])]),
206
+ _: 2
207
+ }, [useModalSrOnlyTitle.value ? {
208
+ name: "title",
209
+ fn: withCtx(() => [createElementVNode("span", _hoisted_1, toDisplayString(resolvedTitle.value), 1)]),
210
+ key: "0"
211
+ } : void 0]), 1032, [
212
+ "model-value",
213
+ "size",
214
+ "close-on-backdrop",
215
+ "close-on-esc"
216
+ ]);
217
+ };
218
+ }
219
+ });
220
+ //#endregion
221
+ export { GrDialogFooter_default as i, GrDialogHeader_default as n, GrDialogCloseButton_default as r, GrDialog_default as t };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GrDialog-gObmaVEl.js","names":["$emit","$emit"],"sources":["../../../../src/components/GrDialog/GrDialogFooter.vue","../../../../src/components/GrDialog/GrDialogFooter.vue","../../../../src/components/GrDialog/GrDialogCloseButton.vue","../../../../src/components/GrDialog/GrDialogCloseButton.vue","../../../../src/components/GrDialog/GrDialogHeader.vue","../../../../src/components/GrDialog/GrDialogHeader.vue","../../../../src/components/GrDialog/GrDialog.vue","../../../../src/components/GrDialog/GrDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport {\n DEFAULT_GR_DIALOG_FOOTER_CONFIG,\n resolveGrDialogSectionConfig,\n type GrDialogSectionConfig,\n} from './dialogShared'\n\nexport interface GrDialogFooterProps {\n config?: GrDialogSectionConfig\n}\n\nconst props = withDefaults(defineProps<GrDialogFooterProps>(), {\n config: undefined,\n})\n\nconst resolvedConfig = computed(() => resolveGrDialogSectionConfig(props.config, DEFAULT_GR_DIALOG_FOOTER_CONFIG))\n\nconst rootClass = computed(() => [\n resolvedConfig.value.paddingX,\n resolvedConfig.value.paddingY,\n resolvedConfig.value.bordered ? 'border-t border-[var(--brd)]' : '',\n])\n</script>\n\n<template>\n <div data-ds-dialog-footer :class=\"rootClass\">\n <slot />\n </div>\n</template>","<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport {\n DEFAULT_GR_DIALOG_FOOTER_CONFIG,\n resolveGrDialogSectionConfig,\n type GrDialogSectionConfig,\n} from './dialogShared'\n\nexport interface GrDialogFooterProps {\n config?: GrDialogSectionConfig\n}\n\nconst props = withDefaults(defineProps<GrDialogFooterProps>(), {\n config: undefined,\n})\n\nconst resolvedConfig = computed(() => resolveGrDialogSectionConfig(props.config, DEFAULT_GR_DIALOG_FOOTER_CONFIG))\n\nconst rootClass = computed(() => [\n resolvedConfig.value.paddingX,\n resolvedConfig.value.paddingY,\n resolvedConfig.value.bordered ? 'border-t border-[var(--brd)]' : '',\n])\n</script>\n\n<template>\n <div data-ds-dialog-footer :class=\"rootClass\">\n <slot />\n </div>\n</template>","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport GrButton from '../GrButton/GrButton.vue'\nimport IconClose from '~icons/lucide/x'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\n// A11y-лейбл: берём из атрибутов (родитель прокидывает `:aria-label=\"closeLabel\"`)\n// или используем дефолт. Не хардкодим английское \"Close\" — DS должен быть i18n-friendly.\nconst attrs = useAttrs()\nconst ariaLabel = computed(() => (attrs['aria-label'] as string | undefined) ?? 'Close')\n\ndefineEmits<{\n (e: 'click'): void\n}>()\n</script>\n\n<template>\n <GrButton\n v-bind=\"attrs\"\n data-ds-dialog-close\n variant=\"ghost\"\n size=\"sm\"\n square\n :aria-label=\"ariaLabel\"\n @click=\"$emit('click')\"\n >\n <IconClose class=\"h-4 w-4\" aria-hidden=\"true\" />\n </GrButton>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport GrButton from '../GrButton/GrButton.vue'\nimport IconClose from '~icons/lucide/x'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\n// A11y-лейбл: берём из атрибутов (родитель прокидывает `:aria-label=\"closeLabel\"`)\n// или используем дефолт. Не хардкодим английское \"Close\" — DS должен быть i18n-friendly.\nconst attrs = useAttrs()\nconst ariaLabel = computed(() => (attrs['aria-label'] as string | undefined) ?? 'Close')\n\ndefineEmits<{\n (e: 'click'): void\n}>()\n</script>\n\n<template>\n <GrButton\n v-bind=\"attrs\"\n data-ds-dialog-close\n variant=\"ghost\"\n size=\"sm\"\n square\n :aria-label=\"ariaLabel\"\n @click=\"$emit('click')\"\n >\n <IconClose class=\"h-4 w-4\" aria-hidden=\"true\" />\n </GrButton>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { DialogTitle } from '@headlessui/vue'\n\nimport GrDialogCloseButton from './GrDialogCloseButton.vue'\nimport {\n DEFAULT_GR_DIALOG_HEADER_CONFIG,\n type GrDialogSectionConfig,\n resolveGrDialogSectionConfig,\n resolveGrDialogTitle,\n} from './dialogShared'\n\nexport interface GrDialogHeaderProps {\n title?: string\n showCloseButton?: boolean\n config?: GrDialogSectionConfig\n /** A11y-лейбл кнопки закрытия (i18n). */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<GrDialogHeaderProps>(), {\n title: undefined,\n showCloseButton: true,\n config: undefined,\n closeLabel: 'Close',\n})\n\nconst slots = defineSlots<{\n default?: (props: { title?: string }) => any\n}>()\n\ndefineEmits<{\n (e: 'close'): void\n}>()\n\nconst resolvedTitle = computed(() => resolveGrDialogTitle(props.title))\n\nconst resolvedConfig = computed(() =>\n resolveGrDialogSectionConfig(props.config, DEFAULT_GR_DIALOG_HEADER_CONFIG),\n)\n\nconst rootClass = computed(() => [\n resolvedConfig.value.paddingX,\n resolvedConfig.value.paddingY,\n resolvedConfig.value.bordered ? 'border-b border-[var(--brd)]' : '',\n 'flex items-center justify-between gap-4',\n])\n\n// Видимый `DialogTitle` рендерим только когда нет пользовательского слота:\n// если слот `#header` задан, a11y-title отдаётся через `GrModal #title`\n// на уровне `GrDialog` (см. JSDoc у `GrDialog.vue`).\nconst showVisibleTitle = computed(() => !slots.default && !!resolvedTitle.value)\n</script>\n\n<template>\n <div data-ds-dialog-header :class=\"rootClass\">\n <template v-if=\"slots.default\">\n <div class=\"flex-1 min-w-0 flex items-center\">\n <slot :title=\"resolvedTitle\" />\n </div>\n </template>\n <DialogTitle\n v-else-if=\"showVisibleTitle\"\n as=\"div\"\n class=\"flex-1 min-w-0 text-[14px] font-700\"\n >\n {{ resolvedTitle }}\n </DialogTitle>\n <div v-else class=\"flex-1 min-w-0\" />\n <GrDialogCloseButton\n v-if=\"showCloseButton\"\n :aria-label=\"closeLabel\"\n @click=\"$emit('close')\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { DialogTitle } from '@headlessui/vue'\n\nimport GrDialogCloseButton from './GrDialogCloseButton.vue'\nimport {\n DEFAULT_GR_DIALOG_HEADER_CONFIG,\n type GrDialogSectionConfig,\n resolveGrDialogSectionConfig,\n resolveGrDialogTitle,\n} from './dialogShared'\n\nexport interface GrDialogHeaderProps {\n title?: string\n showCloseButton?: boolean\n config?: GrDialogSectionConfig\n /** A11y-лейбл кнопки закрытия (i18n). */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<GrDialogHeaderProps>(), {\n title: undefined,\n showCloseButton: true,\n config: undefined,\n closeLabel: 'Close',\n})\n\nconst slots = defineSlots<{\n default?: (props: { title?: string }) => any\n}>()\n\ndefineEmits<{\n (e: 'close'): void\n}>()\n\nconst resolvedTitle = computed(() => resolveGrDialogTitle(props.title))\n\nconst resolvedConfig = computed(() =>\n resolveGrDialogSectionConfig(props.config, DEFAULT_GR_DIALOG_HEADER_CONFIG),\n)\n\nconst rootClass = computed(() => [\n resolvedConfig.value.paddingX,\n resolvedConfig.value.paddingY,\n resolvedConfig.value.bordered ? 'border-b border-[var(--brd)]' : '',\n 'flex items-center justify-between gap-4',\n])\n\n// Видимый `DialogTitle` рендерим только когда нет пользовательского слота:\n// если слот `#header` задан, a11y-title отдаётся через `GrModal #title`\n// на уровне `GrDialog` (см. JSDoc у `GrDialog.vue`).\nconst showVisibleTitle = computed(() => !slots.default && !!resolvedTitle.value)\n</script>\n\n<template>\n <div data-ds-dialog-header :class=\"rootClass\">\n <template v-if=\"slots.default\">\n <div class=\"flex-1 min-w-0 flex items-center\">\n <slot :title=\"resolvedTitle\" />\n </div>\n </template>\n <DialogTitle\n v-else-if=\"showVisibleTitle\"\n as=\"div\"\n class=\"flex-1 min-w-0 text-[14px] font-700\"\n >\n {{ resolvedTitle }}\n </DialogTitle>\n <div v-else class=\"flex-1 min-w-0\" />\n <GrDialogCloseButton\n v-if=\"showCloseButton\"\n :aria-label=\"closeLabel\"\n @click=\"$emit('close')\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * GrDialog — DS-примитив диалога поверх `GrModal`.\n *\n * Архитектурно:\n * - ширина/радиус/скролл-лок/Esc/бэкдроп — ответственность `GrModal`;\n * - заголовок/подвал/кнопка закрытия/паддинги секций — ответственность `GrDialog`.\n *\n * A11y: ровно один `DialogTitle` на открытое окно.\n * - Если хедер отображается без слота `#header` — видимый `DialogTitle` рендерит\n * `GrDialogHeader`.\n * - В остальных случаях (`!showHeader`, либо `showHeader` со слотом `#header`)\n * `GrDialog` отдаёт sr-only title в слот `#title` у `GrModal`, чтобы\n * HeadlessUI корректно проставил `aria-labelledby` на панель.\n */\nimport { computed } from 'vue'\n\nimport GrModal from '../GrModal/GrModal.vue'\nimport GrDialogFooter from './GrDialogFooter.vue'\nimport GrDialogHeader from './GrDialogHeader.vue'\nimport {\n DEFAULT_GR_DIALOG_BODY_CONFIG,\n type GrDialogSectionConfig,\n type GrDialogSize,\n resolveGrDialogSectionConfig,\n resolveGrDialogTitle,\n} from './dialogShared'\n\nexport interface GrDialogProps {\n modelValue: boolean\n title?: string\n closeOnBackdrop?: boolean\n closeOnEsc?: boolean\n showHeader?: boolean\n showCloseButton?: boolean\n size?: GrDialogSize\n headerConfig?: GrDialogSectionConfig\n footerConfig?: GrDialogSectionConfig\n bodyConfig?: GrDialogSectionConfig\n /** A11y-лейбл кнопки закрытия (i18n). */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<GrDialogProps>(), {\n title: undefined,\n closeOnBackdrop: true,\n closeOnEsc: true,\n showHeader: true,\n showCloseButton: true,\n size: 'md',\n headerConfig: undefined,\n footerConfig: undefined,\n bodyConfig: undefined,\n closeLabel: 'Close',\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst slots = defineSlots<{\n default?: () => any\n header?: (props: { title?: string }) => any\n footer?: () => any\n}>()\n\nconst resolvedTitle = computed(() => resolveGrDialogTitle(props.title))\n\nconst bodyClass = computed(() => {\n const cfg = resolveGrDialogSectionConfig(props.bodyConfig, DEFAULT_GR_DIALOG_BODY_CONFIG)\n return [cfg.paddingX, cfg.paddingY]\n})\n\n// Нужен ли sr-only title через `GrModal #title`:\n// - `!showHeader` — вообще нет заголовка в разметке;\n// - `showHeader && $slots.header` — кастомный хедер не обязан содержать DialogTitle.\n// В обоих случаях даём HeadlessUI a11y-title, не дублируя его визуально.\nconst useModalSrOnlyTitle = computed(\n () => !!resolvedTitle.value && (!props.showHeader || !!slots.header),\n)\n\nfunction close(): void {\n emit('update:modelValue', false)\n}\n</script>\n\n<template>\n <GrModal\n :model-value=\"modelValue\"\n :size=\"size\"\n :close-on-backdrop=\"closeOnBackdrop\"\n :close-on-esc=\"closeOnEsc\"\n @update:model-value=\"emit('update:modelValue', $event)\"\n >\n <template v-if=\"useModalSrOnlyTitle\" #title>\n <span class=\"sr-only\">{{ resolvedTitle }}</span>\n </template>\n\n <div class=\"overflow-hidden rounded-[inherit]\">\n <GrDialogHeader\n v-if=\"showHeader\"\n :title=\"resolvedTitle\"\n :show-close-button=\"showCloseButton\"\n :config=\"headerConfig\"\n :close-label=\"closeLabel\"\n @close=\"close\"\n >\n <template v-if=\"slots.header\" #default=\"slotProps\">\n <slot name=\"header\" v-bind=\"slotProps\" />\n </template>\n </GrDialogHeader>\n\n <div :class=\"bodyClass\">\n <slot />\n </div>\n\n <GrDialogFooter v-if=\"slots.footer\" :config=\"footerConfig\">\n <slot name=\"footer\" />\n </GrDialogFooter>\n </div>\n </GrModal>\n</template>\n","<script setup lang=\"ts\">\n/**\n * GrDialog — DS-примитив диалога поверх `GrModal`.\n *\n * Архитектурно:\n * - ширина/радиус/скролл-лок/Esc/бэкдроп — ответственность `GrModal`;\n * - заголовок/подвал/кнопка закрытия/паддинги секций — ответственность `GrDialog`.\n *\n * A11y: ровно один `DialogTitle` на открытое окно.\n * - Если хедер отображается без слота `#header` — видимый `DialogTitle` рендерит\n * `GrDialogHeader`.\n * - В остальных случаях (`!showHeader`, либо `showHeader` со слотом `#header`)\n * `GrDialog` отдаёт sr-only title в слот `#title` у `GrModal`, чтобы\n * HeadlessUI корректно проставил `aria-labelledby` на панель.\n */\nimport { computed } from 'vue'\n\nimport GrModal from '../GrModal/GrModal.vue'\nimport GrDialogFooter from './GrDialogFooter.vue'\nimport GrDialogHeader from './GrDialogHeader.vue'\nimport {\n DEFAULT_GR_DIALOG_BODY_CONFIG,\n type GrDialogSectionConfig,\n type GrDialogSize,\n resolveGrDialogSectionConfig,\n resolveGrDialogTitle,\n} from './dialogShared'\n\nexport interface GrDialogProps {\n modelValue: boolean\n title?: string\n closeOnBackdrop?: boolean\n closeOnEsc?: boolean\n showHeader?: boolean\n showCloseButton?: boolean\n size?: GrDialogSize\n headerConfig?: GrDialogSectionConfig\n footerConfig?: GrDialogSectionConfig\n bodyConfig?: GrDialogSectionConfig\n /** A11y-лейбл кнопки закрытия (i18n). */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<GrDialogProps>(), {\n title: undefined,\n closeOnBackdrop: true,\n closeOnEsc: true,\n showHeader: true,\n showCloseButton: true,\n size: 'md',\n headerConfig: undefined,\n footerConfig: undefined,\n bodyConfig: undefined,\n closeLabel: 'Close',\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst slots = defineSlots<{\n default?: () => any\n header?: (props: { title?: string }) => any\n footer?: () => any\n}>()\n\nconst resolvedTitle = computed(() => resolveGrDialogTitle(props.title))\n\nconst bodyClass = computed(() => {\n const cfg = resolveGrDialogSectionConfig(props.bodyConfig, DEFAULT_GR_DIALOG_BODY_CONFIG)\n return [cfg.paddingX, cfg.paddingY]\n})\n\n// Нужен ли sr-only title через `GrModal #title`:\n// - `!showHeader` — вообще нет заголовка в разметке;\n// - `showHeader && $slots.header` — кастомный хедер не обязан содержать DialogTitle.\n// В обоих случаях даём HeadlessUI a11y-title, не дублируя его визуально.\nconst useModalSrOnlyTitle = computed(\n () => !!resolvedTitle.value && (!props.showHeader || !!slots.header),\n)\n\nfunction close(): void {\n emit('update:modelValue', false)\n}\n</script>\n\n<template>\n <GrModal\n :model-value=\"modelValue\"\n :size=\"size\"\n :close-on-backdrop=\"closeOnBackdrop\"\n :close-on-esc=\"closeOnEsc\"\n @update:model-value=\"emit('update:modelValue', $event)\"\n >\n <template v-if=\"useModalSrOnlyTitle\" #title>\n <span class=\"sr-only\">{{ resolvedTitle }}</span>\n </template>\n\n <div class=\"overflow-hidden rounded-[inherit]\">\n <GrDialogHeader\n v-if=\"showHeader\"\n :title=\"resolvedTitle\"\n :show-close-button=\"showCloseButton\"\n :config=\"headerConfig\"\n :close-label=\"closeLabel\"\n @close=\"close\"\n >\n <template v-if=\"slots.header\" #default=\"slotProps\">\n <slot name=\"header\" v-bind=\"slotProps\" />\n </template>\n </GrDialogHeader>\n\n <div :class=\"bodyClass\">\n <slot />\n </div>\n\n <GrDialogFooter v-if=\"slots.footer\" :config=\"footerConfig\">\n <slot name=\"footer\" />\n </GrDialogFooter>\n </div>\n </GrModal>\n</template>\n"],"mappings":";;;;;;;;;;;;EAaA,MAAM,QAAQ;EAId,MAAM,iBAAiB,eAAe,6BAA6B,MAAM,QAAQ,gCAAgC,CAAA;EAEjH,MAAM,YAAY,eAAe;GAC/B,eAAe,MAAM;GACrB,eAAe,MAAM;GACrB,eAAe,MAAM,WAAW,iCAAiC;GAClE,CAAA;;uBAIC,mBAEM,OAAA;IAFD,yBAAA;IAAuB,OAAK,eAAE,UAAA,MAAS;OAC1C,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA;;;;;;;;;;;EEhBZ,MAAM,QAAQ,UAAS;EACvB,MAAM,YAAY,eAAgB,MAAM,iBAAwC,QAAO;;uBAQrF,YAUW,kBAVX,WACU,MASC,MATI,EAAA;IACb,wBAAA;IACA,SAAQ;IACR,MAAK;IACL,QAAA;IACC,cAAY,UAAA;IACZ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,QAAA;;2BAEmC,CAAhD,YAAgD,MAAA,UAAA,EAAA;KAArC,OAAM;KAAU,eAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EEV3C,MAAM,QAAQ;EAOd,MAAM,QAAQ,UAAA;EAQd,MAAM,gBAAgB,eAAe,qBAAqB,MAAM,MAAM,CAAA;EAEtE,MAAM,iBAAiB,eACrB,6BAA6B,MAAM,QAAQ,gCAAgC,CAC7E;EAEA,MAAM,YAAY,eAAe;GAC/B,eAAe,MAAM;GACrB,eAAe,MAAM;GACrB,eAAe,MAAM,WAAW,iCAAiC;GACjE;GACD,CAAA;EAKD,MAAM,mBAAmB,eAAe,CAAC,MAAM,WAAW,CAAC,CAAC,cAAc,MAAK;;uBAI7E,mBAmBM,OAAA;IAnBD,yBAAA;IAAuB,OAAK,eAAE,UAAA,MAAS;OAC1B,MAAM,WAAA,WAAA,EACpB,mBAEM,OAFN,cAEM,CADJ,WAA+B,KAAA,QAAA,WAAA,EAAxB,OAAO,cAAA,OAAa,CAAA,CAAA,CAAA,IAIlB,iBAAA,SAAA,WAAA,EADb,YAMc,MAAA,GAAA,EAAA;;IAJZ,IAAG;IACH,OAAM;;2BAEa,CAAA,gBAAA,gBAAhB,cAAA,MAAa,EAAA,EAAA,CAAA,CAAA;;uBAElB,mBAAqC,OAArC,aAAqC,GAE7B,QAAA,mBAAA,WAAA,EADR,YAIE,6BAAA;;IAFC,cAAY,QAAA;IACZ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEC,KAAAA,MAAK,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EE7BnB,MAAM,QAAQ;EAad,MAAM,OAAO;EAIb,MAAM,QAAQ,UAAA;EAMd,MAAM,gBAAgB,eAAe,qBAAqB,MAAM,MAAM,CAAA;EAEtE,MAAM,YAAY,eAAe;GAC/B,MAAM,MAAM,6BAA6B,MAAM,YAAY,8BAA6B;AACxF,UAAO,CAAC,IAAI,UAAU,IAAI,SAAQ;IACnC;EAMD,MAAM,sBAAsB,eACpB,CAAC,CAAC,cAAc,UAAU,CAAC,MAAM,cAAc,CAAC,CAAC,MAAM,QAC/D;EAEA,SAAS,QAAc;AACrB,QAAK,qBAAqB,MAAK;;;uBAK/B,YAiCU,iBAAA;IAhCP,eAAa,QAAA;IACb,MAAM,QAAA;IACN,qBAAmB,QAAA;IACnB,gBAAc,QAAA;IACd,uBAAkB,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,qBAAsB,OAAM;;2BA2B/C,CArBN,mBAqBM,OArBN,YAqBM;KAnBI,QAAA,cAAA,WAAA,EADR,YAWiB,wBAAA;;MATd,OAAO,cAAA;MACP,qBAAmB,QAAA;MACnB,QAAQ,QAAA;MACR,eAAa,QAAA;MACb,SAAO;+BAEQ,MAAM,SAAA;YAAS;mBAAS,cAAS,CAC/C,WAAyC,KAAA,QAAA,UAAA,eAAA,mBAAb,UAAS,CAAA,CAAA,CAAA,CAAA;;;;;;;;KAIzC,mBAEM,OAAA,EAFA,OAAK,eAAE,UAAA,MAAS,EAAA,EAAA,CACpB,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA;KAGY,MAAM,UAAA,WAAA,EAA5B,YAEiB,wBAAA;;MAFoB,QAAQ,QAAA;;6BACrB,CAAtB,WAAsB,KAAA,QAAA,SAAA,CAAA,CAAA;;;;;OAvBV,oBAAA,QAAA;UAAsB;sBACY,CAAhD,mBAAgD,QAAhD,YAAgD,gBAAvB,cAAA,MAAa,EAAA,EAAA,CAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, n, r, t as i } from "../../chunks/dialogShared-CONROtU2.js";
2
- import { i as a, n as o, r as s, t as c } from "./chunks/GrDialog-BSd4-uP5.js";
3
- import { t as l } from "../../chunks/safelist-Bq32hAXc.js";
4
- export { i as DEFAULT_GR_DIALOG_BODY_CONFIG, n as DEFAULT_GR_DIALOG_FOOTER_CONFIG, r as DEFAULT_GR_DIALOG_HEADER_CONFIG, c as GrDialog, c as default, s as GrDialogCloseButton, a as GrDialogFooter, o as GrDialogHeader, l as grDialogSafelist, t as resolveGrDialogSectionConfig, e as resolveGrDialogTitle };
1
+ import { a as resolveGrDialogTitle, i as resolveGrDialogSectionConfig, n as DEFAULT_GR_DIALOG_FOOTER_CONFIG, r as DEFAULT_GR_DIALOG_HEADER_CONFIG, t as DEFAULT_GR_DIALOG_BODY_CONFIG } from "../../chunks/dialogShared-BtXUk6Zc.js";
2
+ import { i as GrDialogFooter_default, n as GrDialogHeader_default, r as GrDialogCloseButton_default, t as GrDialog_default } from "./chunks/GrDialog-gObmaVEl.js";
3
+ import { t as grDialogSafelist } from "../../chunks/safelist-BF822K15.js";
4
+ export { DEFAULT_GR_DIALOG_BODY_CONFIG, DEFAULT_GR_DIALOG_FOOTER_CONFIG, DEFAULT_GR_DIALOG_HEADER_CONFIG, GrDialog_default as GrDialog, GrDialog_default as default, GrDialogCloseButton_default as GrDialogCloseButton, GrDialogFooter_default as GrDialogFooter, GrDialogHeader_default as GrDialogHeader, grDialogSafelist, resolveGrDialogSectionConfig, resolveGrDialogTitle };
@@ -0,0 +1,156 @@
1
+ import { t as x_default } from "../../../chunks/x-Pa6C2hwi.js";
2
+ import { t as GrButton_default } from "../../GrButton/chunks/GrButton-BmGdp8-4.js";
3
+ import { t as GrIcon_default } from "../../GrIcon/chunks/GrIcon-BV7RBU_0.js";
4
+ import { a as Ve, n as he, o as Ye, r as Ge, t as Se } from "../../../chunks/transition-mJ3PZCHH.js";
5
+ import { i as grDrawerPanelEnterFrom, r as grDrawerPanelClass } from "../../../chunks/config-DxqpV-KM.js";
6
+ import { Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref, useId, withCtx } from "vue";
7
+ //#region src/components/GrDrawer/GrDrawer.vue?vue&type=script&setup=true&lang.ts
8
+ var _hoisted_1 = { class: "fixed inset-0" };
9
+ var _hoisted_2 = {
10
+ "data-ds-drawer-header": "",
11
+ class: "px-5 py-4 border-b border-[var(--brd)] flex items-center justify-between gap-4"
12
+ };
13
+ var _hoisted_3 = {
14
+ "data-ds-drawer-body": "",
15
+ class: "flex-1 overflow-y-auto"
16
+ };
17
+ var _hoisted_4 = { class: "p-5" };
18
+ var _hoisted_5 = {
19
+ key: 0,
20
+ "data-ds-drawer-footer": "",
21
+ class: "px-5 py-4 border-t border-[var(--brd)]"
22
+ };
23
+ //#endregion
24
+ //#region src/components/GrDrawer/GrDrawer.vue
25
+ var GrDrawer_default = /* @__PURE__ */ defineComponent({
26
+ __name: "GrDrawer",
27
+ props: {
28
+ modelValue: { type: Boolean },
29
+ title: { default: void 0 },
30
+ closeOnBackdrop: {
31
+ type: Boolean,
32
+ default: true
33
+ },
34
+ closeOnEsc: {
35
+ type: Boolean,
36
+ default: true
37
+ },
38
+ side: { default: "right" },
39
+ size: { default: "md" },
40
+ closeLabel: { default: "Close" }
41
+ },
42
+ emits: ["update:modelValue"],
43
+ setup(__props, { emit: __emit }) {
44
+ const props = __props;
45
+ const emit = __emit;
46
+ const titleId = useId();
47
+ const panelClass = computed(() => {
48
+ return grDrawerPanelClass({
49
+ side: props.side,
50
+ size: props.size
51
+ });
52
+ });
53
+ const panelEnterFrom = computed(() => grDrawerPanelEnterFrom(props.side));
54
+ function close() {
55
+ emit("update:modelValue", false);
56
+ }
57
+ function onDialogClose() {
58
+ if (!props.closeOnBackdrop) return;
59
+ close();
60
+ }
61
+ function onOverlayClick() {
62
+ if (!props.closeOnBackdrop) return;
63
+ close();
64
+ }
65
+ function onKeydown(e) {
66
+ if (e.key !== "Escape") return;
67
+ if (!props.closeOnEsc) return;
68
+ e.stopPropagation();
69
+ e.preventDefault();
70
+ close();
71
+ }
72
+ return (_ctx, _cache) => {
73
+ return openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(unref(Se), {
74
+ show: __props.modelValue,
75
+ as: "template"
76
+ }, {
77
+ default: withCtx(() => [createVNode(unref(Ye), {
78
+ as: "div",
79
+ "data-ds-drawer": "",
80
+ class: "fixed inset-0 z-50",
81
+ static: true,
82
+ "aria-labelledby": unref(titleId),
83
+ onClose: onDialogClose,
84
+ onKeydown
85
+ }, {
86
+ default: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(unref(he), {
87
+ as: "template",
88
+ enter: "duration-200 ease-out",
89
+ "enter-from": "opacity-0",
90
+ "enter-to": "opacity-100",
91
+ leave: "duration-150 ease-in",
92
+ "leave-from": "opacity-100",
93
+ "leave-to": "opacity-0"
94
+ }, {
95
+ default: withCtx(() => [createElementVNode("div", {
96
+ "data-ds-drawer-overlay": "",
97
+ class: "fixed inset-0 bg-black/40",
98
+ "aria-hidden": "true",
99
+ onClick: onOverlayClick
100
+ })]),
101
+ _: 1
102
+ }), createVNode(unref(he), {
103
+ as: "template",
104
+ enter: "duration-200 ease-out",
105
+ "enter-from": panelEnterFrom.value,
106
+ "enter-to": "translate-x-0",
107
+ leave: "duration-150 ease-in",
108
+ "leave-from": "translate-x-0",
109
+ "leave-to": panelEnterFrom.value
110
+ }, {
111
+ default: withCtx(() => [createVNode(unref(Ge), {
112
+ "data-ds-drawer-panel": "",
113
+ tabindex: "-1",
114
+ class: normalizeClass(["fixed inset-y-0 flex flex-col", panelClass.value])
115
+ }, {
116
+ default: withCtx(() => [
117
+ createElementVNode("div", _hoisted_2, [createVNode(unref(Ve), {
118
+ id: unref(titleId),
119
+ as: "div",
120
+ "data-ds-drawer-title": "",
121
+ class: "text-[14px] font-700 min-w-0 truncate"
122
+ }, {
123
+ default: withCtx(() => [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title ?? "Drawer"), 1)])]),
124
+ _: 3
125
+ }, 8, ["id"]), createVNode(GrButton_default, {
126
+ variant: "ghost",
127
+ size: "sm",
128
+ square: "",
129
+ "aria-label": __props.closeLabel,
130
+ onClick: close
131
+ }, {
132
+ default: withCtx(() => [createVNode(GrIcon_default, {
133
+ size: "sm",
134
+ "aria-hidden": "true"
135
+ }, {
136
+ default: withCtx(() => [createVNode(unref(x_default))]),
137
+ _: 1
138
+ })]),
139
+ _: 1
140
+ }, 8, ["aria-label"])]),
141
+ createElementVNode("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "default")])]),
142
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "footer")])) : createCommentVNode("", true)
143
+ ]),
144
+ _: 3
145
+ }, 8, ["class"])]),
146
+ _: 3
147
+ }, 8, ["enter-from", "leave-to"])])]),
148
+ _: 3
149
+ }, 8, ["aria-labelledby"])]),
150
+ _: 3
151
+ }, 8, ["show"])]);
152
+ };
153
+ }
154
+ });
155
+ //#endregion
156
+ export { GrDrawer_default as t };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GrDrawer-BJL_gTxI.js","names":["$slots"],"sources":["../../../../src/components/GrDrawer/GrDrawer.vue","../../../../src/components/GrDrawer/GrDrawer.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, useId } from 'vue'\nimport { Dialog, DialogPanel, DialogTitle, TransitionChild, TransitionRoot } from '@headlessui/vue'\n\nimport GrButton from '../GrButton/GrButton.vue'\nimport GrIcon from '../GrIcon/GrIcon.vue'\nimport {\n grDrawerPanelClass,\n grDrawerPanelEnterFrom,\n type GrDrawerSide,\n type GrDrawerSize,\n} from './grDrawerStyles'\n\nimport IconClose from '~icons/lucide/x'\n\nexport interface GrDrawerProps {\n /** Контроль открытия через v-model. */\n modelValue: boolean\n /** Заголовок; если передан — покажется в хедере. Можно переопределить слотом `#title`. */\n title?: string\n /** Закрывать при клике по бэкдропу / через HeadlessUI close. */\n closeOnBackdrop?: boolean\n /** Закрывать по Esc. */\n closeOnEsc?: boolean\n /** Сторона, с которой выезжает панель. */\n side?: GrDrawerSide\n /** Размер панели. */\n size?: GrDrawerSize\n /** i18n-friendly aria-label для кнопки закрытия. */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<GrDrawerProps>(), {\n title: undefined,\n closeOnBackdrop: true,\n closeOnEsc: true,\n side: 'right',\n size: 'md',\n closeLabel: 'Close',\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst titleId = useId()\n\nconst panelClass = computed(() => {\n return grDrawerPanelClass({ side: props.side, size: props.size })\n})\n\nconst panelEnterFrom = computed(() => grDrawerPanelEnterFrom(props.side))\n\nfunction close(): void {\n emit('update:modelValue', false)\n}\n\nfunction onDialogClose(): void {\n if (!props.closeOnBackdrop) return\n close()\n}\n\nfunction onOverlayClick(): void {\n if (!props.closeOnBackdrop) return\n close()\n}\n\nfunction onKeydown(e: KeyboardEvent): void {\n if (e.key !== 'Escape') return\n if (!props.closeOnEsc) return\n e.stopPropagation()\n e.preventDefault()\n close()\n}\n</script>\n\n<template>\n <teleport to=\"body\">\n <TransitionRoot :show=\"modelValue\" as=\"template\">\n <Dialog\n as=\"div\"\n data-ds-drawer\n class=\"fixed inset-0 z-50\"\n :static=\"true\"\n :aria-labelledby=\"titleId\"\n @close=\"onDialogClose\"\n @keydown=\"onKeydown\"\n >\n <div class=\"fixed inset-0\">\n <TransitionChild\n as=\"template\"\n enter=\"duration-200 ease-out\"\n enter-from=\"opacity-0\"\n enter-to=\"opacity-100\"\n leave=\"duration-150 ease-in\"\n leave-from=\"opacity-100\"\n leave-to=\"opacity-0\"\n >\n <div\n data-ds-drawer-overlay\n class=\"fixed inset-0 bg-black/40\"\n aria-hidden=\"true\"\n @click=\"onOverlayClick\"\n />\n </TransitionChild>\n\n <TransitionChild\n as=\"template\"\n enter=\"duration-200 ease-out\"\n :enter-from=\"panelEnterFrom\"\n enter-to=\"translate-x-0\"\n leave=\"duration-150 ease-in\"\n leave-from=\"translate-x-0\"\n :leave-to=\"panelEnterFrom\"\n >\n <DialogPanel\n data-ds-drawer-panel\n tabindex=\"-1\"\n class=\"fixed inset-y-0 flex flex-col\"\n :class=\"panelClass\"\n >\n <div\n data-ds-drawer-header\n class=\"px-5 py-4 border-b border-[var(--brd)] flex items-center justify-between gap-4\"\n >\n <DialogTitle :id=\"titleId\" as=\"div\" data-ds-drawer-title class=\"text-[14px] font-700 min-w-0 truncate\">\n <slot name=\"title\">\n {{ title ?? 'Drawer' }}\n </slot>\n </DialogTitle>\n\n <GrButton\n variant=\"ghost\"\n size=\"sm\"\n square\n :aria-label=\"closeLabel\"\n @click=\"close\"\n >\n <GrIcon size=\"sm\" aria-hidden=\"true\">\n <IconClose />\n </GrIcon>\n </GrButton>\n </div>\n\n <div data-ds-drawer-body class=\"flex-1 overflow-y-auto\">\n <div class=\"p-5\">\n <slot />\n </div>\n </div>\n\n <div\n v-if=\"$slots.footer\"\n data-ds-drawer-footer\n class=\"px-5 py-4 border-t border-[var(--brd)]\"\n >\n <slot name=\"footer\" />\n </div>\n </DialogPanel>\n </TransitionChild>\n </div>\n </Dialog>\n </TransitionRoot>\n </teleport>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useId } from 'vue'\nimport { Dialog, DialogPanel, DialogTitle, TransitionChild, TransitionRoot } from '@headlessui/vue'\n\nimport GrButton from '../GrButton/GrButton.vue'\nimport GrIcon from '../GrIcon/GrIcon.vue'\nimport {\n grDrawerPanelClass,\n grDrawerPanelEnterFrom,\n type GrDrawerSide,\n type GrDrawerSize,\n} from './grDrawerStyles'\n\nimport IconClose from '~icons/lucide/x'\n\nexport interface GrDrawerProps {\n /** Контроль открытия через v-model. */\n modelValue: boolean\n /** Заголовок; если передан — покажется в хедере. Можно переопределить слотом `#title`. */\n title?: string\n /** Закрывать при клике по бэкдропу / через HeadlessUI close. */\n closeOnBackdrop?: boolean\n /** Закрывать по Esc. */\n closeOnEsc?: boolean\n /** Сторона, с которой выезжает панель. */\n side?: GrDrawerSide\n /** Размер панели. */\n size?: GrDrawerSize\n /** i18n-friendly aria-label для кнопки закрытия. */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<GrDrawerProps>(), {\n title: undefined,\n closeOnBackdrop: true,\n closeOnEsc: true,\n side: 'right',\n size: 'md',\n closeLabel: 'Close',\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst titleId = useId()\n\nconst panelClass = computed(() => {\n return grDrawerPanelClass({ side: props.side, size: props.size })\n})\n\nconst panelEnterFrom = computed(() => grDrawerPanelEnterFrom(props.side))\n\nfunction close(): void {\n emit('update:modelValue', false)\n}\n\nfunction onDialogClose(): void {\n if (!props.closeOnBackdrop) return\n close()\n}\n\nfunction onOverlayClick(): void {\n if (!props.closeOnBackdrop) return\n close()\n}\n\nfunction onKeydown(e: KeyboardEvent): void {\n if (e.key !== 'Escape') return\n if (!props.closeOnEsc) return\n e.stopPropagation()\n e.preventDefault()\n close()\n}\n</script>\n\n<template>\n <teleport to=\"body\">\n <TransitionRoot :show=\"modelValue\" as=\"template\">\n <Dialog\n as=\"div\"\n data-ds-drawer\n class=\"fixed inset-0 z-50\"\n :static=\"true\"\n :aria-labelledby=\"titleId\"\n @close=\"onDialogClose\"\n @keydown=\"onKeydown\"\n >\n <div class=\"fixed inset-0\">\n <TransitionChild\n as=\"template\"\n enter=\"duration-200 ease-out\"\n enter-from=\"opacity-0\"\n enter-to=\"opacity-100\"\n leave=\"duration-150 ease-in\"\n leave-from=\"opacity-100\"\n leave-to=\"opacity-0\"\n >\n <div\n data-ds-drawer-overlay\n class=\"fixed inset-0 bg-black/40\"\n aria-hidden=\"true\"\n @click=\"onOverlayClick\"\n />\n </TransitionChild>\n\n <TransitionChild\n as=\"template\"\n enter=\"duration-200 ease-out\"\n :enter-from=\"panelEnterFrom\"\n enter-to=\"translate-x-0\"\n leave=\"duration-150 ease-in\"\n leave-from=\"translate-x-0\"\n :leave-to=\"panelEnterFrom\"\n >\n <DialogPanel\n data-ds-drawer-panel\n tabindex=\"-1\"\n class=\"fixed inset-y-0 flex flex-col\"\n :class=\"panelClass\"\n >\n <div\n data-ds-drawer-header\n class=\"px-5 py-4 border-b border-[var(--brd)] flex items-center justify-between gap-4\"\n >\n <DialogTitle :id=\"titleId\" as=\"div\" data-ds-drawer-title class=\"text-[14px] font-700 min-w-0 truncate\">\n <slot name=\"title\">\n {{ title ?? 'Drawer' }}\n </slot>\n </DialogTitle>\n\n <GrButton\n variant=\"ghost\"\n size=\"sm\"\n square\n :aria-label=\"closeLabel\"\n @click=\"close\"\n >\n <GrIcon size=\"sm\" aria-hidden=\"true\">\n <IconClose />\n </GrIcon>\n </GrButton>\n </div>\n\n <div data-ds-drawer-body class=\"flex-1 overflow-y-auto\">\n <div class=\"p-5\">\n <slot />\n </div>\n </div>\n\n <div\n v-if=\"$slots.footer\"\n data-ds-drawer-footer\n class=\"px-5 py-4 border-t border-[var(--brd)]\"\n >\n <slot name=\"footer\" />\n </div>\n </DialogPanel>\n </TransitionChild>\n </div>\n </Dialog>\n </TransitionRoot>\n </teleport>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCA,MAAM,QAAQ;EASd,MAAM,OAAO;EAIb,MAAM,UAAU,OAAM;EAEtB,MAAM,aAAa,eAAe;AAChC,UAAO,mBAAmB;IAAE,MAAM,MAAM;IAAM,MAAM,MAAM;IAAM,CAAA;IACjE;EAED,MAAM,iBAAiB,eAAe,uBAAuB,MAAM,KAAK,CAAA;EAExE,SAAS,QAAc;AACrB,QAAK,qBAAqB,MAAK;;EAGjC,SAAS,gBAAsB;AAC7B,OAAI,CAAC,MAAM,gBAAiB;AAC5B,UAAM;;EAGR,SAAS,iBAAuB;AAC9B,OAAI,CAAC,MAAM,gBAAiB;AAC5B,UAAM;;EAGR,SAAS,UAAU,GAAwB;AACzC,OAAI,EAAE,QAAQ,SAAU;AACxB,OAAI,CAAC,MAAM,WAAY;AACvB,KAAE,iBAAgB;AAClB,KAAE,gBAAe;AACjB,UAAM;;;uBAKN,YAqFW,UAAA,EArFD,IAAG,QAAM,EAAA,CACjB,YAmFiB,MAAA,GAAA,EAAA;IAnFA,MAAM,QAAA;IAAY,IAAG;;2BAkF3B,CAjFT,YAiFS,MAAA,GAAA,EAAA;KAhFP,IAAG;KACH,kBAAA;KACA,OAAM;KACL,QAAQ;KACR,mBAAiB,MAAA,QAAO;KACxB,SAAO;KACE;;4BAyEJ,CAvEN,mBAuEM,OAvEN,YAuEM,CAtEJ,YAekB,MAAA,GAAA,EAAA;MAdhB,IAAG;MACH,OAAM;MACN,cAAW;MACX,YAAS;MACT,OAAM;MACN,cAAW;MACX,YAAS;;6BAOP,CALF,mBAKE,OAAA;OAJA,0BAAA;OACA,OAAM;OACN,eAAY;OACX,SAAO;;;SAIZ,YAoDkB,MAAA,GAAA,EAAA;MAnDhB,IAAG;MACH,OAAM;MACL,cAAY,eAAA;MACb,YAAS;MACT,OAAM;MACN,cAAW;MACV,YAAU,eAAA;;6BA4CG,CA1Cd,YA0Cc,MAAA,GAAA,EAAA;OAzCZ,wBAAA;OACA,UAAS;OACT,OAAK,eAAA,CAAC,iCACE,WAAA,MAAU,CAAA;;8BAuBZ;QArBN,mBAqBM,OArBN,YAqBM,CAjBJ,YAIc,MAAA,GAAA,EAAA;SAJA,IAAI,MAAA,QAAO;SAAE,IAAG;SAAM,wBAAA;SAAqB,OAAM;;gCAGtD,CAFP,WAEO,KAAA,QAAA,SAAA,EAAA,QAAA,CAAA,gBAAA,gBADF,QAAA,SAAK,SAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;;uBAIZ,YAUW,kBAAA;SATT,SAAQ;SACR,MAAK;SACL,QAAA;SACC,cAAY,QAAA;SACZ,SAAO;;gCAIC,CAFT,YAES,gBAAA;UAFD,MAAK;UAAK,eAAY;;iCACf,CAAb,YAAa,MAAA,UAAA,CAAA,CAAA,CAAA;;;;;QAKnB,mBAIM,OAJN,YAIM,CAHJ,mBAEM,OAFN,YAEM,CADJ,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA,CAAA,CAAA;QAKJA,KAAAA,OAAO,UAAA,WAAA,EADf,mBAMM,OANN,YAMM,CADJ,WAAsB,KAAA,QAAA,SAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA"}
@@ -1,3 +1,3 @@
1
- import { n as e, t } from "../../chunks/config-BUZtbeTr.js";
2
- import { t as n } from "./chunks/GrDrawer-DBBSwe1s.js";
3
- export { n as GrDrawer, n as default, t as grDrawerConfig, e as grDrawerSafelist };
1
+ import { n as grDrawerSafelist, t as grDrawerConfig } from "../../chunks/config-DxqpV-KM.js";
2
+ import { t as GrDrawer_default } from "./chunks/GrDrawer-BJL_gTxI.js";
3
+ export { GrDrawer_default as GrDrawer, GrDrawer_default as default, grDrawerConfig, grDrawerSafelist };
@@ -0,0 +1,151 @@
1
+ import { vClickOutside } from "../../../directives/clickOutside.js";
2
+ import { i as grDropdownWidthClass, n as grDropdownAlignmentClass, r as grDropdownContentClass } from "../../../chunks/grDropdownStyles-DMp7RrI9.js";
3
+ import { Teleport, Transition, computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, onUnmounted, openBlock, ref, renderSlot, unref, vShow, watch, withCtx, withDirectives } from "vue";
4
+ //#region src/components/GrDropdown/GrDropdown.vue?vue&type=script&setup=true&lang.ts
5
+ var _hoisted_1 = { "data-ds-dropdown": "" };
6
+ //#endregion
7
+ //#region src/components/GrDropdown/GrDropdown.vue
8
+ var GrDropdown_default = /* @__PURE__ */ defineComponent({
9
+ __name: "GrDropdown",
10
+ props: {
11
+ align: { default: "right" },
12
+ width: { default: "48" },
13
+ closeOnContentClick: {
14
+ type: Boolean,
15
+ default: true
16
+ },
17
+ contentClass: { default: "" },
18
+ teleportTo: { default: "body" }
19
+ },
20
+ setup(__props) {
21
+ const props = __props;
22
+ const open = ref(false);
23
+ const rootEl = ref(null);
24
+ const panelEl = ref(null);
25
+ const clickOutsideExclude = [() => panelEl.value];
26
+ const panelStyle = ref({
27
+ left: "0px",
28
+ top: "0px",
29
+ zIndex: "2147483647"
30
+ });
31
+ let syncFrame = 0;
32
+ function cancelPanelPositionSync() {
33
+ if (typeof window === "undefined") return;
34
+ if (!syncFrame) return;
35
+ window.cancelAnimationFrame(syncFrame);
36
+ syncFrame = 0;
37
+ }
38
+ function syncPanelPosition() {
39
+ if (typeof window === "undefined") return;
40
+ const root = rootEl.value;
41
+ if (!root) return;
42
+ const rootRect = root.getBoundingClientRect();
43
+ panelStyle.value = {
44
+ left: `${(() => {
45
+ if (props.align === "right") return rootRect.right;
46
+ if (props.align === "center") return rootRect.left + rootRect.width / 2;
47
+ return rootRect.left;
48
+ })()}px`,
49
+ top: `${rootRect.bottom + 8}px`,
50
+ zIndex: "2147483647"
51
+ };
52
+ }
53
+ function schedulePanelPositionSync() {
54
+ if (typeof window === "undefined") return;
55
+ if (syncFrame) return;
56
+ syncFrame = window.requestAnimationFrame(() => {
57
+ syncFrame = 0;
58
+ if (open.value) syncPanelPosition();
59
+ });
60
+ }
61
+ function bindPanelPositionListeners() {
62
+ if (typeof window === "undefined") return;
63
+ window.addEventListener("resize", schedulePanelPositionSync);
64
+ window.addEventListener("scroll", schedulePanelPositionSync, true);
65
+ }
66
+ function unbindPanelPositionListeners() {
67
+ if (typeof window === "undefined") return;
68
+ window.removeEventListener("resize", schedulePanelPositionSync);
69
+ window.removeEventListener("scroll", schedulePanelPositionSync, true);
70
+ }
71
+ function toggle() {
72
+ open.value = !open.value;
73
+ }
74
+ function close() {
75
+ open.value = false;
76
+ }
77
+ function closeOnEscape(e) {
78
+ if (e.key === "Escape") close();
79
+ }
80
+ watch(open, (isOpen) => {
81
+ if (typeof document === "undefined") return;
82
+ document.removeEventListener("keydown", closeOnEscape);
83
+ unbindPanelPositionListeners();
84
+ cancelPanelPositionSync();
85
+ if (isOpen) document.addEventListener("keydown", closeOnEscape);
86
+ if (!isOpen) return;
87
+ bindPanelPositionListeners();
88
+ syncPanelPosition();
89
+ }, { immediate: true });
90
+ watch(() => props.align, () => {
91
+ if (open.value) schedulePanelPositionSync();
92
+ });
93
+ onUnmounted(() => {
94
+ if (typeof document === "undefined") return;
95
+ document.removeEventListener("keydown", closeOnEscape);
96
+ unbindPanelPositionListeners();
97
+ cancelPanelPositionSync();
98
+ });
99
+ const widthClass = computed(() => grDropdownWidthClass(props.width));
100
+ const contentClasses = computed(() => grDropdownContentClass(props.contentClass));
101
+ const panelClasses = computed(() => {
102
+ return [
103
+ "fixed z-50",
104
+ widthClass.value,
105
+ grDropdownAlignmentClass(props.align)
106
+ ].filter(Boolean);
107
+ });
108
+ function onContentClick() {
109
+ if (props.closeOnContentClick) close();
110
+ }
111
+ return (_ctx, _cache) => {
112
+ return openBlock(), createElementBlock("div", _hoisted_1, [withDirectives((openBlock(), createElementBlock("div", {
113
+ ref_key: "rootEl",
114
+ ref: rootEl,
115
+ "data-ds-dropdown-trigger": "",
116
+ class: "inline-block max-w-full",
117
+ onClick: toggle
118
+ }, [renderSlot(_ctx.$slots, "trigger", {
119
+ open: open.value,
120
+ toggle,
121
+ close
122
+ })])), [[unref(vClickOutside), {
123
+ handler: close,
124
+ enabled: open.value,
125
+ exclude: clickOutsideExclude
126
+ }]]), (openBlock(), createBlock(Teleport, { to: __props.teleportTo }, [createVNode(Transition, {
127
+ "enter-active-class": "transition ease-out duration-150",
128
+ "enter-from-class": "transform opacity-0 scale-95",
129
+ "enter-to-class": "transform opacity-100 scale-100",
130
+ "leave-active-class": "transition ease-in duration-100",
131
+ "leave-from-class": "transform opacity-100 scale-100",
132
+ "leave-to-class": "transform opacity-0 scale-95"
133
+ }, {
134
+ default: withCtx(() => [withDirectives(createElementVNode("div", {
135
+ ref_key: "panelEl",
136
+ ref: panelEl,
137
+ "data-ds-dropdown-panel": "",
138
+ class: normalizeClass(panelClasses.value),
139
+ style: normalizeStyle(panelStyle.value),
140
+ onClick: onContentClick
141
+ }, [createElementVNode("div", {
142
+ "data-ds-dropdown-content": "",
143
+ class: normalizeClass(contentClasses.value)
144
+ }, [renderSlot(_ctx.$slots, "content", { close })], 2)], 6), [[vShow, open.value]])]),
145
+ _: 3
146
+ })], 8, ["to"]))]);
147
+ };
148
+ }
149
+ });
150
+ //#endregion
151
+ export { GrDropdown_default as t };