@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,734 @@
1
+ import { t as _plugin_vue_export_helper_default } from "../../../chunks/_plugin-vue_export-helper-BG_EqiDU.js";
2
+ import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, ref, renderList, renderSlot, resolveComponent, shallowRef, toDisplayString, toValue, unref, watch, withCtx, withModifiers } from "vue";
3
+ import '../../../GrTree.css';//#region src/components/GrTree/grTreeDataAdapter.ts
4
+ var DEFAULT_CHILDREN_KEY = "children";
5
+ var DEFAULT_LABEL_KEY = "label";
6
+ function isTreeKey(value) {
7
+ return typeof value === "string" || typeof value === "number";
8
+ }
9
+ function resolveMapValue(map, key, fallback) {
10
+ return map?.[key] ?? fallback;
11
+ }
12
+ function createGrTreeDataAdapter(options) {
13
+ function hasNodeKey() {
14
+ return options.nodeKey != null;
15
+ }
16
+ function getChildrenKey() {
17
+ return resolveMapValue(options.props, "children", DEFAULT_CHILDREN_KEY);
18
+ }
19
+ function getLabelKey() {
20
+ return resolveMapValue(options.props, "label", DEFAULT_LABEL_KEY);
21
+ }
22
+ function getLabel(data) {
23
+ const value = data[getLabelKey()];
24
+ return value == null ? "" : String(value);
25
+ }
26
+ function getChildren(data) {
27
+ const value = data[getChildrenKey()];
28
+ return Array.isArray(value) ? value : [];
29
+ }
30
+ function ensureChildren(data) {
31
+ const key = getChildrenKey();
32
+ const value = data[key];
33
+ if (Array.isArray(value)) return value;
34
+ const children = [];
35
+ data[key] = children;
36
+ return children;
37
+ }
38
+ function getExplicitNodeKey(data) {
39
+ if (options.nodeKey == null) return void 0;
40
+ const value = data[options.nodeKey];
41
+ return isTreeKey(value) ? value : void 0;
42
+ }
43
+ function getNodeKey(data, index, parentKey) {
44
+ const explicitKey = getExplicitNodeKey(data);
45
+ if (explicitKey != null) return explicitKey;
46
+ return parentKey == null ? index : `${String(parentKey)}:${index}`;
47
+ }
48
+ return {
49
+ hasNodeKey,
50
+ getChildrenKey,
51
+ getLabelKey,
52
+ getLabel,
53
+ getChildren,
54
+ ensureChildren,
55
+ getNodeKey,
56
+ getExplicitNodeKey
57
+ };
58
+ }
59
+ //#endregion
60
+ //#region src/components/GrTree/grTreeInteractionContext.ts
61
+ function createGrTreeInteractionContext(options, emitters) {
62
+ const hoveredKey = ref(void 0);
63
+ const draggingNode = shallowRef(null);
64
+ const dropTarget = shallowRef(null);
65
+ function canDrag(node) {
66
+ if (!options.draggable) return false;
67
+ if (options.allowDrag) return options.allowDrag(node);
68
+ return true;
69
+ }
70
+ function canDrop(drag, target, type) {
71
+ if (!options.allowDrop) return true;
72
+ return options.allowDrop(drag, target, type);
73
+ }
74
+ function resetDragState() {
75
+ draggingNode.value = null;
76
+ dropTarget.value = null;
77
+ }
78
+ return {
79
+ hoveredKey,
80
+ draggingNode,
81
+ dropTarget,
82
+ canDrag,
83
+ canDrop,
84
+ resetDragState,
85
+ ...emitters
86
+ };
87
+ }
88
+ //#endregion
89
+ //#region src/components/GrTree/grTreeStore.ts
90
+ function createGrTreeStore(options) {
91
+ const filterValue = ref("");
92
+ const expandedKeys = shallowRef(/* @__PURE__ */ new Set());
93
+ const currentKey = ref(void 0);
94
+ const getData = () => toValue(options.data) ?? [];
95
+ const getFilterNodeMethod = () => toValue(options.filterNodeMethod);
96
+ watch(() => toValue(options.defaultExpandedKeys), (keys) => {
97
+ expandedKeys.value = new Set(keys ?? []);
98
+ }, { immediate: true });
99
+ const treeModel = computed(() => {
100
+ const byKey = /* @__PURE__ */ new Map();
101
+ const byData = /* @__PURE__ */ new WeakMap();
102
+ const build = (items, parent, level) => {
103
+ return items.map((item, index) => {
104
+ const node = {
105
+ key: options.adapter.getNodeKey(item, index, parent?.key),
106
+ label: options.adapter.getLabel(item),
107
+ data: item,
108
+ level,
109
+ parent,
110
+ childNodes: []
111
+ };
112
+ byKey.set(node.key, node);
113
+ byData.set(item, node);
114
+ node.childNodes = build(options.adapter.getChildren(item), node, level + 1);
115
+ return node;
116
+ });
117
+ };
118
+ return {
119
+ roots: build(getData(), void 0, 1),
120
+ byKey,
121
+ byData
122
+ };
123
+ });
124
+ const filterInfo = computed(() => {
125
+ const value = filterValue.value;
126
+ const isActive = value.trim().length > 0;
127
+ const valueLower = value.toLowerCase();
128
+ const subtreeHasMatch = /* @__PURE__ */ new Map();
129
+ const matchedKeys = /* @__PURE__ */ new Set();
130
+ const autoExpandKeys = /* @__PURE__ */ new Set();
131
+ if (!isActive) return {
132
+ isActive,
133
+ subtreeHasMatch,
134
+ matchedKeys,
135
+ autoExpandKeys
136
+ };
137
+ const match = (node) => {
138
+ const filterNodeMethod = getFilterNodeMethod();
139
+ if (filterNodeMethod) return filterNodeMethod(value, node.data, node);
140
+ return node.label.toLowerCase().includes(valueLower);
141
+ };
142
+ const walk = (nodes) => {
143
+ let any = false;
144
+ for (const node of nodes) {
145
+ const self = match(node);
146
+ const childAny = walk(node.childNodes);
147
+ const has = self || childAny;
148
+ subtreeHasMatch.set(node.key, has);
149
+ if (self) matchedKeys.add(node.key);
150
+ if (childAny) autoExpandKeys.add(node.key);
151
+ any ||= has;
152
+ }
153
+ return any;
154
+ };
155
+ walk(treeModel.value.roots);
156
+ return {
157
+ isActive,
158
+ subtreeHasMatch,
159
+ matchedKeys,
160
+ autoExpandKeys
161
+ };
162
+ });
163
+ function getNode(key) {
164
+ return treeModel.value.byKey.get(key);
165
+ }
166
+ function findNodeByData(data) {
167
+ return treeModel.value.byData.get(data);
168
+ }
169
+ function isTreeNode(target) {
170
+ return typeof target === "object" && target !== null && "key" in target && "data" in target && "childNodes" in target;
171
+ }
172
+ function resolveNodeTarget(target) {
173
+ if (target == null) return void 0;
174
+ if (typeof target === "string" || typeof target === "number") return getNode(target);
175
+ if (isTreeNode(target)) return getNode(target.key) ?? target;
176
+ const key = options.adapter.getExplicitNodeKey(target);
177
+ if (key != null) return getNode(key);
178
+ return findNodeByData(target);
179
+ }
180
+ function getNodeContainer(node) {
181
+ const items = node.parent ? options.adapter.ensureChildren(node.parent.data) : getData();
182
+ let index = items.findIndex((item) => item === node.data);
183
+ if (index >= 0) return {
184
+ items,
185
+ index
186
+ };
187
+ const key = options.adapter.getExplicitNodeKey(node.data);
188
+ if (key == null) return void 0;
189
+ index = items.findIndex((item) => options.adapter.getExplicitNodeKey(item) === key);
190
+ if (index < 0) return void 0;
191
+ return {
192
+ items,
193
+ index
194
+ };
195
+ }
196
+ function isDescendantNode(ancestor, node) {
197
+ let current = node.parent;
198
+ while (current) {
199
+ if (current.key === ancestor.key) return true;
200
+ current = current.parent;
201
+ }
202
+ return false;
203
+ }
204
+ function canMoveNode(node, referenceNode, dropType) {
205
+ const sourceNode = resolveNodeTarget(node);
206
+ const targetNode = resolveNodeTarget(referenceNode);
207
+ if (!sourceNode || !targetNode) return false;
208
+ if (sourceNode.key === targetNode.key) return false;
209
+ if (isDescendantNode(sourceNode, targetNode)) return false;
210
+ if (!getNodeContainer(sourceNode)) return false;
211
+ if (dropType === "inner") return true;
212
+ return Boolean(getNodeContainer(targetNode));
213
+ }
214
+ function sanitizeTreeState() {
215
+ const byKey = treeModel.value.byKey;
216
+ if (currentKey.value != null && !byKey.has(currentKey.value)) currentKey.value = void 0;
217
+ const nextExpandedKeys = new Set(Array.from(expandedKeys.value).filter((key) => byKey.has(key)));
218
+ if (nextExpandedKeys.size !== expandedKeys.value.size) expandedKeys.value = nextExpandedKeys;
219
+ }
220
+ function isExpandedKey(key) {
221
+ return expandedKeys.value.has(key);
222
+ }
223
+ function setExpandedKey(key, expanded) {
224
+ const next = new Set(expandedKeys.value);
225
+ if (expanded) next.add(key);
226
+ else next.delete(key);
227
+ expandedKeys.value = next;
228
+ }
229
+ function toggleExpand(node) {
230
+ setExpandedKey(node.key, !isExpandedKey(node.key));
231
+ }
232
+ function setCurrentKey(key) {
233
+ currentKey.value = key;
234
+ }
235
+ function getCurrentKey() {
236
+ return currentKey.value;
237
+ }
238
+ function getCurrentNode() {
239
+ const key = currentKey.value;
240
+ return key == null ? void 0 : getNode(key);
241
+ }
242
+ function setCurrentNode(node) {
243
+ if (node == null) {
244
+ currentKey.value = void 0;
245
+ return true;
246
+ }
247
+ const targetNode = resolveNodeTarget(node);
248
+ if (!targetNode) return false;
249
+ currentKey.value = targetNode.key;
250
+ return true;
251
+ }
252
+ function resolveInsertedNode(data) {
253
+ const key = options.adapter.getExplicitNodeKey(data);
254
+ if (key != null) return getNode(key);
255
+ return findNodeByData(data);
256
+ }
257
+ function moveNode(node, referenceNode, dropType) {
258
+ const sourceNode = resolveNodeTarget(node);
259
+ const targetNode = resolveNodeTarget(referenceNode);
260
+ if (!sourceNode || !targetNode) return void 0;
261
+ if (!canMoveNode(sourceNode, targetNode, dropType)) return void 0;
262
+ const sourceContainer = getNodeContainer(sourceNode);
263
+ if (!sourceContainer) return void 0;
264
+ let destinationItems;
265
+ let destinationIndex;
266
+ if (dropType === "inner") {
267
+ destinationItems = options.adapter.ensureChildren(targetNode.data);
268
+ destinationIndex = destinationItems.length;
269
+ } else {
270
+ const targetContainer = getNodeContainer(targetNode);
271
+ if (!targetContainer) return void 0;
272
+ destinationItems = targetContainer.items;
273
+ destinationIndex = dropType === "prev" ? targetContainer.index : targetContainer.index + 1;
274
+ }
275
+ if (destinationItems === sourceContainer.items && sourceContainer.index < destinationIndex) destinationIndex -= 1;
276
+ const [movedData] = sourceContainer.items.splice(sourceContainer.index, 1);
277
+ destinationItems.splice(destinationIndex, 0, movedData);
278
+ if (dropType === "inner") setExpandedKey(targetNode.key, true);
279
+ sanitizeTreeState();
280
+ return resolveInsertedNode(movedData);
281
+ }
282
+ function appendNode(data, parent) {
283
+ const parentNode = resolveNodeTarget(parent);
284
+ if (!parentNode) return void 0;
285
+ options.adapter.ensureChildren(parentNode.data).push(data);
286
+ setExpandedKey(parentNode.key, true);
287
+ sanitizeTreeState();
288
+ return resolveInsertedNode(data);
289
+ }
290
+ function removeNode(node) {
291
+ if (!options.adapter.hasNodeKey()) return false;
292
+ const targetNode = resolveNodeTarget(node);
293
+ if (!targetNode) return false;
294
+ const container = getNodeContainer(targetNode);
295
+ if (!container) return false;
296
+ container.items.splice(container.index, 1);
297
+ sanitizeTreeState();
298
+ return true;
299
+ }
300
+ function insertNodeBefore(data, referenceNode) {
301
+ const targetNode = resolveNodeTarget(referenceNode);
302
+ if (!targetNode) return void 0;
303
+ const container = getNodeContainer(targetNode);
304
+ if (!container) return void 0;
305
+ container.items.splice(container.index, 0, data);
306
+ sanitizeTreeState();
307
+ return resolveInsertedNode(data);
308
+ }
309
+ function insertNodeAfter(data, referenceNode) {
310
+ const targetNode = resolveNodeTarget(referenceNode);
311
+ if (!targetNode) return void 0;
312
+ const container = getNodeContainer(targetNode);
313
+ if (!container) return void 0;
314
+ container.items.splice(container.index + 1, 0, data);
315
+ sanitizeTreeState();
316
+ return resolveInsertedNode(data);
317
+ }
318
+ function filter(value) {
319
+ filterValue.value = value;
320
+ }
321
+ return {
322
+ filterValue,
323
+ expandedKeys,
324
+ currentKey,
325
+ treeModel,
326
+ filterInfo,
327
+ filter,
328
+ isExpandedKey,
329
+ setExpandedKey,
330
+ toggleExpand,
331
+ setCurrentKey,
332
+ getCurrentKey,
333
+ getCurrentNode,
334
+ setCurrentNode,
335
+ getNode,
336
+ canMoveNode,
337
+ moveNode,
338
+ appendNode,
339
+ removeNode,
340
+ insertNodeBefore,
341
+ insertNodeAfter
342
+ };
343
+ }
344
+ //#endregion
345
+ //#region src/components/GrTree/GrTree.vue?vue&type=script&setup=true&lang.ts
346
+ var _hoisted_1 = ["data-ds-tree", "role"];
347
+ var _hoisted_2 = ["aria-level", "aria-expanded"];
348
+ var _hoisted_3 = [
349
+ "onClick",
350
+ "onDrop",
351
+ "onDragover",
352
+ "onMouseenter",
353
+ "onMouseleave"
354
+ ];
355
+ var _hoisted_4 = [
356
+ "aria-label",
357
+ "draggable",
358
+ "onDragstart"
359
+ ];
360
+ var _hoisted_5 = ["aria-label", "onClick"];
361
+ var _hoisted_6 = { class: "ds-tree__label" };
362
+ var _hoisted_7 = { class: "ds-tree__label" };
363
+ var DEFAULT_BRANCH_LINE_COLOR = "var(--ds-tree-branch-line-default-color, #e2e8f0)";
364
+ //#endregion
365
+ //#region src/components/GrTree/GrTree.vue
366
+ var GrTree_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
367
+ name: "GrTree",
368
+ __name: "GrTree",
369
+ props: {
370
+ data: {},
371
+ props: { default: () => ({
372
+ children: "children",
373
+ label: "label"
374
+ }) },
375
+ nodeKey: { default: "id" },
376
+ defaultExpandedKeys: { default: () => [] },
377
+ filterNodeMethod: {},
378
+ highlightCurrent: {
379
+ type: Boolean,
380
+ default: true
381
+ },
382
+ expandIcon: { default: "i-lucide-chevron-right" },
383
+ collapseIcon: { default: "i-lucide-chevron-right" },
384
+ toggleIconRotate: {
385
+ type: Boolean,
386
+ default: true
387
+ },
388
+ branchLine: {
389
+ type: Boolean,
390
+ default: false
391
+ },
392
+ branchLineColor: {
393
+ type: [String, Function],
394
+ default: void 0
395
+ },
396
+ branchLineActiveColor: {
397
+ type: [String, Function],
398
+ default: void 0
399
+ },
400
+ rowClass: {
401
+ type: [
402
+ Boolean,
403
+ null,
404
+ String,
405
+ Object,
406
+ Array,
407
+ Function
408
+ ],
409
+ default: void 0
410
+ },
411
+ dragHandleClass: {
412
+ type: [
413
+ Boolean,
414
+ null,
415
+ String,
416
+ Object,
417
+ Array,
418
+ Function
419
+ ],
420
+ default: void 0
421
+ },
422
+ toggleClass: {
423
+ type: [
424
+ Boolean,
425
+ null,
426
+ String,
427
+ Object,
428
+ Array,
429
+ Function
430
+ ],
431
+ default: void 0
432
+ },
433
+ toggleIconClass: {
434
+ type: [
435
+ Boolean,
436
+ null,
437
+ String,
438
+ Object,
439
+ Array,
440
+ Function
441
+ ],
442
+ default: void 0
443
+ },
444
+ toggleSpacerClass: {
445
+ type: [
446
+ Boolean,
447
+ null,
448
+ String,
449
+ Object,
450
+ Array,
451
+ Function
452
+ ],
453
+ default: void 0
454
+ },
455
+ contentClass: {
456
+ type: [
457
+ Boolean,
458
+ null,
459
+ String,
460
+ Object,
461
+ Array,
462
+ Function
463
+ ],
464
+ default: void 0
465
+ },
466
+ dragLabel: { default: "Drag" },
467
+ expandLabel: { default: "Expand" },
468
+ collapseLabel: { default: "Collapse" },
469
+ draggable: {
470
+ type: Boolean,
471
+ default: false
472
+ },
473
+ dragHandleIcon: { default: "i-lucide-grip-vertical" },
474
+ allowDrop: {},
475
+ allowDrag: {},
476
+ internalRows: { default: void 0 },
477
+ internalNested: {
478
+ type: Boolean,
479
+ default: false
480
+ },
481
+ internalStore: { default: void 0 },
482
+ internalInteractionContext: {}
483
+ },
484
+ emits: [
485
+ "nodeClick",
486
+ "nodeExpand",
487
+ "nodeCollapse",
488
+ "nodeDrop"
489
+ ],
490
+ setup(__props, { expose: __expose, emit: __emit }) {
491
+ const props = __props;
492
+ const emit = __emit;
493
+ const dataAdapter = createGrTreeDataAdapter(props);
494
+ const treeStore = props.internalStore ?? createGrTreeStore({
495
+ adapter: dataAdapter,
496
+ data: () => props.data,
497
+ defaultExpandedKeys: () => props.defaultExpandedKeys,
498
+ filterNodeMethod: () => props.filterNodeMethod
499
+ });
500
+ const interactionContext = props.internalInteractionContext ?? createGrTreeInteractionContext(props, {
501
+ emitNodeClick: (data, node) => emit("nodeClick", data, node),
502
+ emitNodeExpand: (data, node) => emit("nodeExpand", data, node),
503
+ emitNodeCollapse: (data, node) => emit("nodeCollapse", data, node),
504
+ emitNodeDrop: (draggingNode, dropNode, dropType) => emit("nodeDrop", draggingNode, dropNode, dropType)
505
+ });
506
+ const treeProps = props;
507
+ const currentKey = treeStore.currentKey;
508
+ const hoveredKey = interactionContext.hoveredKey;
509
+ const dropTarget = interactionContext.dropTarget;
510
+ const visibleRows = computed(() => {
511
+ if (props.internalRows) return props.internalRows;
512
+ const { roots } = treeStore.treeModel.value;
513
+ const { isActive, subtreeHasMatch, matchedKeys, autoExpandKeys } = treeStore.filterInfo.value;
514
+ const walk = (nodes) => {
515
+ const rows = [];
516
+ for (const node of nodes) {
517
+ if (isActive && !subtreeHasMatch.get(node.key)) continue;
518
+ const isLeaf = node.childNodes.length === 0;
519
+ const isMatched = matchedKeys.has(node.key);
520
+ const isExpanded = treeStore.isExpandedKey(node.key) || isActive && autoExpandKeys.has(node.key);
521
+ rows.push({
522
+ node,
523
+ isExpanded,
524
+ isLeaf,
525
+ isMatched,
526
+ children: isExpanded ? walk(node.childNodes) : []
527
+ });
528
+ }
529
+ return rows;
530
+ };
531
+ return walk(roots);
532
+ });
533
+ function onRowClick(node) {
534
+ treeStore.setCurrentKey(node.key);
535
+ interactionContext.emitNodeClick(node.data, node);
536
+ }
537
+ function onRowMouseEnter(node) {
538
+ hoveredKey.value = node.key;
539
+ }
540
+ function onRowMouseLeave(node) {
541
+ if (hoveredKey.value === node.key) hoveredKey.value = void 0;
542
+ }
543
+ function toggleExpand(node) {
544
+ const expanded = !treeStore.isExpandedKey(node.key);
545
+ treeStore.toggleExpand(node);
546
+ if (expanded) interactionContext.emitNodeExpand(node.data, node);
547
+ else interactionContext.emitNodeCollapse(node.data, node);
548
+ }
549
+ function canDrag(node) {
550
+ return interactionContext.canDrag(node);
551
+ }
552
+ function shouldShowDragHandle(node) {
553
+ return canDrag(node) && hoveredKey.value === node.key;
554
+ }
555
+ function resolveDropType(evt, el) {
556
+ const rect = el.getBoundingClientRect();
557
+ const y = evt.clientY - rect.top;
558
+ const third = rect.height / 3;
559
+ if (y < third) return "prev";
560
+ if (y > third * 2) return "next";
561
+ return "inner";
562
+ }
563
+ function canDrop(drag, target, type) {
564
+ return interactionContext.canDrop(drag, target, type);
565
+ }
566
+ function onDragStart(evt, node) {
567
+ if (!canDrag(node)) {
568
+ evt.preventDefault();
569
+ return;
570
+ }
571
+ interactionContext.draggingNode.value = node;
572
+ interactionContext.dropTarget.value = null;
573
+ try {
574
+ evt.dataTransfer?.setData("text/plain", String(node.key));
575
+ } catch {}
576
+ if (evt.dataTransfer) evt.dataTransfer.effectAllowed = "move";
577
+ }
578
+ function onDragEnd() {
579
+ interactionContext.resetDragState();
580
+ }
581
+ function onDragOver(evt, node, rowEl) {
582
+ const drag = interactionContext.draggingNode.value;
583
+ if (!treeProps.draggable || !drag) return;
584
+ evt.preventDefault();
585
+ const type = resolveDropType(evt, rowEl);
586
+ const allowed = treeStore.canMoveNode(drag, node, type) && canDrop(drag, node, type);
587
+ interactionContext.dropTarget.value = {
588
+ key: node.key,
589
+ type,
590
+ allowed
591
+ };
592
+ if (evt.dataTransfer) evt.dataTransfer.dropEffect = allowed ? "move" : "none";
593
+ }
594
+ function onDrop(evt, node) {
595
+ const drag = interactionContext.draggingNode.value;
596
+ const target = interactionContext.dropTarget.value;
597
+ if (!treeProps.draggable || !drag || !target) return;
598
+ evt.preventDefault();
599
+ if (target.key === node.key && target.allowed) {
600
+ const movedNode = treeStore.moveNode(drag, node, target.type);
601
+ if (movedNode) {
602
+ const dropNode = treeStore.getNode(node.key) ?? node;
603
+ interactionContext.emitNodeDrop(movedNode, dropNode, target.type);
604
+ }
605
+ }
606
+ interactionContext.resetDragState();
607
+ }
608
+ function filter(value) {
609
+ treeStore.filter(value);
610
+ }
611
+ function resolveNodeClass(classValue, row) {
612
+ if (!classValue) return void 0;
613
+ return typeof classValue === "function" ? classValue(row) : classValue;
614
+ }
615
+ function resolveBranchLineColorValue(color, node) {
616
+ if (!color) return void 0;
617
+ return typeof color === "function" ? color(node) ?? void 0 : color;
618
+ }
619
+ function isBranchLineActive(node) {
620
+ const selectedKey = currentKey.value;
621
+ if (selectedKey == null) return false;
622
+ if (node.key === selectedKey) return true;
623
+ return node.childNodes.some((child) => child.key === selectedKey && !treeStore.isExpandedKey(child.key));
624
+ }
625
+ function resolveBranchLineColor(node) {
626
+ const defaultColor = resolveBranchLineColorValue(treeProps.branchLineColor, node) ?? DEFAULT_BRANCH_LINE_COLOR;
627
+ if (!isBranchLineActive(node)) return defaultColor;
628
+ return resolveBranchLineColorValue(treeProps.branchLineActiveColor, node) ?? defaultColor;
629
+ }
630
+ function resolveChildrenWrapStyle(row) {
631
+ if (!treeProps.branchLine) return {};
632
+ return { "--ds-tree-branch-line-color": resolveBranchLineColor(row.node) };
633
+ }
634
+ __expose({
635
+ appendNode: treeStore.appendNode,
636
+ filter,
637
+ getCurrentNode: treeStore.getCurrentNode,
638
+ setCurrentKey: treeStore.setCurrentKey,
639
+ getCurrentKey: treeStore.getCurrentKey,
640
+ getNode: treeStore.getNode,
641
+ insertNodeAfter: treeStore.insertNodeAfter,
642
+ insertNodeBefore: treeStore.insertNodeBefore,
643
+ removeNode: treeStore.removeNode,
644
+ setCurrentNode: treeStore.setCurrentNode
645
+ });
646
+ return (_ctx, _cache) => {
647
+ const _component_GrTree = resolveComponent("GrTree", true);
648
+ return openBlock(), createElementBlock("div", {
649
+ "data-ds-tree": props.internalNested ? void 0 : "",
650
+ class: normalizeClass(props.internalNested ? "ds-tree__children" : "ds-tree"),
651
+ role: props.internalNested ? "group" : "tree"
652
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(visibleRows.value, (row) => {
653
+ return openBlock(), createElementBlock("div", {
654
+ key: row.node.key,
655
+ "data-ds-tree-node": "",
656
+ role: "treeitem",
657
+ "aria-level": row.node.level,
658
+ "aria-expanded": row.isLeaf ? void 0 : row.isExpanded
659
+ }, [createElementVNode("div", {
660
+ "data-ds-tree-row": "",
661
+ class: normalizeClass(["ds-tree__row py-2 px-2", [
662
+ unref(treeProps).highlightCurrent && unref(currentKey) === row.node.key ? "ds-tree__row--current" : "",
663
+ row.isMatched ? "ds-tree__row--matched" : "",
664
+ unref(dropTarget)?.key === row.node.key && unref(dropTarget).allowed && unref(dropTarget).type === "inner" ? "ds-tree__row--drop-inner" : "",
665
+ unref(dropTarget)?.key === row.node.key && unref(dropTarget).allowed && unref(dropTarget).type === "prev" ? "ds-tree__row--drop-prev" : "",
666
+ unref(dropTarget)?.key === row.node.key && unref(dropTarget).allowed && unref(dropTarget).type === "next" ? "ds-tree__row--drop-next" : "",
667
+ resolveNodeClass(unref(treeProps).rowClass, row)
668
+ ]]),
669
+ tabindex: "0",
670
+ onClick: ($event) => onRowClick(row.node),
671
+ onDrop: ($event) => onDrop($event, row.node),
672
+ onDragover: ($event) => onDragOver($event, row.node, $event.currentTarget),
673
+ onMouseenter: ($event) => onRowMouseEnter(row.node),
674
+ onMouseleave: ($event) => onRowMouseLeave(row.node)
675
+ }, [
676
+ unref(treeProps).draggable ? (openBlock(), createElementBlock("button", {
677
+ key: 0,
678
+ type: "button",
679
+ "data-ds-tree-drag-handle": "",
680
+ class: normalizeClass(["ds-tree__drag-handle", [
681
+ shouldShowDragHandle(row.node) ? "ds-tree__drag-handle--visible" : "",
682
+ canDrag(row.node) ? "" : "ds-tree__drag-handle--disabled",
683
+ resolveNodeClass(unref(treeProps).dragHandleClass, row)
684
+ ]]),
685
+ "aria-label": unref(treeProps).dragLabel,
686
+ draggable: canDrag(row.node),
687
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
688
+ onMousedown: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
689
+ onDragstart: ($event) => onDragStart($event, row.node),
690
+ onDragend: onDragEnd
691
+ }, [createElementVNode("span", { class: normalizeClass(["ds-tree__drag-icon", unref(treeProps).dragHandleIcon]) }, null, 2)], 42, _hoisted_4)) : createCommentVNode("", true),
692
+ !row.isLeaf ? (openBlock(), createElementBlock("button", {
693
+ key: 1,
694
+ "data-ds-tree-toggle": "",
695
+ type: "button",
696
+ class: normalizeClass(["ds-tree__toggle", resolveNodeClass(unref(treeProps).toggleClass, row)]),
697
+ "aria-label": row.isExpanded ? unref(treeProps).collapseLabel : unref(treeProps).expandLabel,
698
+ onClick: withModifiers(($event) => toggleExpand(row.node), ["stop"])
699
+ }, [createElementVNode("span", { class: normalizeClass(["ds-tree__toggle-icon", [
700
+ row.isExpanded ? unref(treeProps).collapseIcon : unref(treeProps).expandIcon,
701
+ row.isExpanded && unref(treeProps).toggleIconRotate ? "ds-tree__toggle-icon--expanded" : "",
702
+ resolveNodeClass(unref(treeProps).toggleIconClass, row)
703
+ ]]) }, null, 2)], 10, _hoisted_5)) : (openBlock(), createElementBlock("span", {
704
+ key: 2,
705
+ class: normalizeClass(["ds-tree__toggle-spacer", resolveNodeClass(unref(treeProps).toggleSpacerClass, row)])
706
+ }, null, 2)),
707
+ createElementVNode("div", { class: normalizeClass(["ds-tree__content", resolveNodeClass(unref(treeProps).contentClass, row)]) }, [renderSlot(_ctx.$slots, "default", {
708
+ node: row.node,
709
+ data: row.node.data
710
+ }, () => [createElementVNode("span", _hoisted_6, toDisplayString(row.node.label), 1)], true)], 2)
711
+ ], 42, _hoisted_3), row.children.length ? (openBlock(), createElementBlock("div", {
712
+ key: 0,
713
+ class: normalizeClass(["ds-tree__children-wrap ml-6", unref(treeProps).branchLine ? "ds-tree__children-wrap--with-branch" : ""]),
714
+ style: normalizeStyle(resolveChildrenWrapStyle(row))
715
+ }, [createVNode(_component_GrTree, mergeProps({ ref_for: true }, props, {
716
+ data: [],
717
+ "internal-rows": row.children,
718
+ "internal-nested": "",
719
+ "internal-store": unref(treeStore),
720
+ "internal-interaction-context": unref(interactionContext)
721
+ }), {
722
+ default: withCtx((slotProps) => [renderSlot(_ctx.$slots, "default", mergeProps({ ref_for: true }, slotProps), () => [createElementVNode("span", _hoisted_7, toDisplayString(slotProps.node.label), 1)], true)]),
723
+ _: 3
724
+ }, 16, [
725
+ "internal-rows",
726
+ "internal-store",
727
+ "internal-interaction-context"
728
+ ])], 6)) : createCommentVNode("", true)], 8, _hoisted_2);
729
+ }), 128))], 10, _hoisted_1);
730
+ };
731
+ }
732
+ }), [["__scopeId", "data-v-0d01877b"]]);
733
+ //#endregion
734
+ export { GrTree_default as t };