@feugene/granularity 0.4.0 → 0.4.1

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 (424) hide show
  1. package/dist/chunks/_plugin-vue_export-helper-BG_EqiDU.js +8 -0
  2. package/dist/chunks/adapter-C7fKeUa4.js +6 -0
  3. package/dist/chunks/adapter-C7fKeUa4.js.map +1 -0
  4. package/dist/chunks/arrow-up-DNXrMoAI.js +25 -0
  5. package/dist/chunks/arrow-up-DNXrMoAI.js.map +1 -0
  6. package/dist/chunks/classTokens-BPeBXNzu.js +8 -0
  7. package/dist/chunks/classTokens-BPeBXNzu.js.map +1 -0
  8. package/dist/chunks/config-2wgwWaAB.js +10 -0
  9. package/dist/chunks/config-2wgwWaAB.js.map +1 -0
  10. package/dist/chunks/config-BKRmlivc.js +10 -0
  11. package/dist/chunks/config-BKRmlivc.js.map +1 -0
  12. package/dist/chunks/config-BRU5PR8_.js +10 -0
  13. package/dist/chunks/config-BRU5PR8_.js.map +1 -0
  14. package/dist/chunks/config-BUGfFjmC.js +16 -0
  15. package/dist/chunks/config-BUGfFjmC.js.map +1 -0
  16. package/dist/chunks/config-BXffa3ta.js +60 -0
  17. package/dist/chunks/config-BXffa3ta.js.map +1 -0
  18. package/dist/chunks/config-BaMO9dQh.js +22 -0
  19. package/dist/chunks/config-BaMO9dQh.js.map +1 -0
  20. package/dist/chunks/config-BbtK511H.js +11 -0
  21. package/dist/chunks/config-BbtK511H.js.map +1 -0
  22. package/dist/chunks/config-BcFOkUhh.js +15 -0
  23. package/dist/chunks/config-BcFOkUhh.js.map +1 -0
  24. package/dist/chunks/config-BcpRsZTe.js +10 -0
  25. package/dist/chunks/config-BcpRsZTe.js.map +1 -0
  26. package/dist/chunks/config-BhubOeci.js +15 -0
  27. package/dist/chunks/config-BhubOeci.js.map +1 -0
  28. package/dist/chunks/config-BhvNm4Pp.js +173 -0
  29. package/dist/chunks/config-BhvNm4Pp.js.map +1 -0
  30. package/dist/chunks/config-Bv2G0OU6.js +10 -0
  31. package/dist/chunks/config-Bv2G0OU6.js.map +1 -0
  32. package/dist/chunks/config-Bv5Dok4j.js +41 -0
  33. package/dist/chunks/config-Bv5Dok4j.js.map +1 -0
  34. package/dist/chunks/config-BzQ4S4Hb.js +11 -0
  35. package/dist/chunks/config-BzQ4S4Hb.js.map +1 -0
  36. package/dist/chunks/config-BzZGpWsj.js +11 -0
  37. package/dist/chunks/config-BzZGpWsj.js.map +1 -0
  38. package/dist/chunks/config-C0b_3LJV.js +42 -0
  39. package/dist/chunks/config-C0b_3LJV.js.map +1 -0
  40. package/dist/chunks/config-C2JKq8-2.js +60 -0
  41. package/dist/chunks/config-C2JKq8-2.js.map +1 -0
  42. package/dist/chunks/config-C6SBJxcH.js +10 -0
  43. package/dist/chunks/config-C6SBJxcH.js.map +1 -0
  44. package/dist/chunks/config-CJbjLC5X.js +55 -0
  45. package/dist/chunks/config-CJbjLC5X.js.map +1 -0
  46. package/dist/chunks/config-CJeyaUTp.js +40 -0
  47. package/dist/chunks/config-CJeyaUTp.js.map +1 -0
  48. package/dist/chunks/config-CMZE2fu0.js +11 -0
  49. package/dist/chunks/config-CMZE2fu0.js.map +1 -0
  50. package/dist/chunks/config-CU_CBd0k.js +24 -0
  51. package/dist/chunks/config-CU_CBd0k.js.map +1 -0
  52. package/dist/chunks/config-CYPU3ztl.js +26 -0
  53. package/dist/chunks/config-CYPU3ztl.js.map +1 -0
  54. package/dist/chunks/config-CcmeMlic.js +19 -0
  55. package/dist/chunks/config-CcmeMlic.js.map +1 -0
  56. package/dist/chunks/config-CdAx6ify2.js +11 -0
  57. package/dist/chunks/config-CdAx6ify2.js.map +1 -0
  58. package/dist/chunks/config-CxCAfXZ1.js +23 -0
  59. package/dist/chunks/config-CxCAfXZ1.js.map +1 -0
  60. package/dist/chunks/config-D1gSaT52.js +11 -0
  61. package/dist/chunks/config-D1gSaT52.js.map +1 -0
  62. package/dist/chunks/config-D7iuXJbl.js +11 -0
  63. package/dist/chunks/config-D7iuXJbl.js.map +1 -0
  64. package/dist/chunks/config-D7tRu8u3.js +11 -0
  65. package/dist/chunks/config-D7tRu8u3.js.map +1 -0
  66. package/dist/chunks/config-DBYCntwl.js +10 -0
  67. package/dist/chunks/config-DBYCntwl.js.map +1 -0
  68. package/dist/chunks/config-DFRYOcrP.js +11 -0
  69. package/dist/chunks/config-DFRYOcrP.js.map +1 -0
  70. package/dist/chunks/config-DW_RqmUp.js +10 -0
  71. package/dist/chunks/config-DW_RqmUp.js.map +1 -0
  72. package/dist/chunks/config-Dkq0HeLe.js +11 -0
  73. package/dist/chunks/config-Dkq0HeLe.js.map +1 -0
  74. package/dist/chunks/config-DlLE49_I.js +11 -0
  75. package/dist/chunks/config-DlLE49_I.js.map +1 -0
  76. package/dist/chunks/config-DvTUDLT1.js +46 -0
  77. package/dist/chunks/config-DvTUDLT1.js.map +1 -0
  78. package/dist/chunks/config-DwB5-qdP2.js +10 -0
  79. package/dist/chunks/config-DwB5-qdP2.js.map +1 -0
  80. package/dist/chunks/config-DxqMXzNV2.js +25 -0
  81. package/dist/chunks/config-DxqMXzNV2.js.map +1 -0
  82. package/dist/chunks/config-DxqpV-KM.js +47 -0
  83. package/dist/chunks/config-DxqpV-KM.js.map +1 -0
  84. package/dist/chunks/config-Dzz9P-GV2.js +11 -0
  85. package/dist/chunks/config-Dzz9P-GV2.js.map +1 -0
  86. package/dist/chunks/config-KGTIAFD92.js +10 -0
  87. package/dist/chunks/config-KGTIAFD92.js.map +1 -0
  88. package/dist/chunks/config-TyzU6gLf.js +10 -0
  89. package/dist/chunks/config-TyzU6gLf.js.map +1 -0
  90. package/dist/chunks/config-cn6knwud.js +37 -0
  91. package/dist/chunks/config-cn6knwud.js.map +1 -0
  92. package/dist/chunks/config-dD6Po-Cq.js +10 -0
  93. package/dist/chunks/config-dD6Po-Cq.js.map +1 -0
  94. package/dist/chunks/config-rFwazRKi.js +11 -0
  95. package/dist/chunks/config-rFwazRKi.js.map +1 -0
  96. package/dist/chunks/config-rQlbnEKn.js +10 -0
  97. package/dist/chunks/config-rQlbnEKn.js.map +1 -0
  98. package/dist/chunks/config-rxFL-6yF2.js +80 -0
  99. package/dist/chunks/config-rxFL-6yF2.js.map +1 -0
  100. package/dist/chunks/config-ug8O8epd.js +13 -0
  101. package/dist/chunks/config-ug8O8epd.js.map +1 -0
  102. package/dist/chunks/dialogShared-BtXUk6Zc.js +34 -0
  103. package/dist/chunks/dialogShared-BtXUk6Zc.js.map +1 -0
  104. package/dist/chunks/directives-Cuib0yOO.js +728 -0
  105. package/dist/chunks/directives-Cuib0yOO.js.map +1 -0
  106. package/dist/chunks/en-BMjJZttK.js +50 -0
  107. package/dist/chunks/en-BMjJZttK.js.map +1 -0
  108. package/dist/chunks/es-Cu_RlgIr.js +22 -0
  109. package/dist/chunks/es-Cu_RlgIr.js.map +1 -0
  110. package/dist/chunks/es-EYCf8G_1.js +50 -0
  111. package/dist/chunks/es-EYCf8G_1.js.map +1 -0
  112. package/dist/chunks/fileValidation-CgjTGoUx.js +221 -0
  113. package/dist/chunks/fileValidation-CgjTGoUx.js.map +1 -0
  114. package/dist/chunks/{grBadgeStyles-Bu4H8bFc.js → grBadgeStyles-pqqbVgLk.js} +20 -13
  115. package/dist/chunks/grBadgeStyles-pqqbVgLk.js.map +1 -0
  116. package/dist/chunks/{grButtonStyles-C5k0bN2e.js → grButtonStyles-BxZW2x0-.js} +62 -52
  117. package/dist/chunks/grButtonStyles-BxZW2x0-.js.map +1 -0
  118. package/dist/chunks/grDropdownStyles-DQfLh-bp.js +34 -0
  119. package/dist/chunks/grDropdownStyles-DQfLh-bp.js.map +1 -0
  120. package/dist/chunks/grLoadingStyles-CERsxyk9.js +19 -0
  121. package/dist/chunks/grLoadingStyles-CERsxyk9.js.map +1 -0
  122. package/dist/chunks/grModalStyles-Dv2NXBKi.js +49 -0
  123. package/dist/chunks/grModalStyles-Dv2NXBKi.js.map +1 -0
  124. package/dist/chunks/grSelectStyles-C1zNEkV7.js +52 -0
  125. package/dist/chunks/grSelectStyles-C1zNEkV7.js.map +1 -0
  126. package/dist/chunks/granularityI18n-BEWP9aJs.js +28 -0
  127. package/dist/chunks/granularityI18n-BEWP9aJs.js.map +1 -0
  128. package/dist/chunks/info-C0bHmdZq.js +28 -0
  129. package/dist/chunks/info-C0bHmdZq.js.map +1 -0
  130. package/dist/chunks/loader-circle-B2rWDk5u.js +25 -0
  131. package/dist/chunks/loader-circle-B2rWDk5u.js.map +1 -0
  132. package/dist/chunks/ru-DKswMSdd.js +50 -0
  133. package/dist/chunks/ru-DKswMSdd.js.map +1 -0
  134. package/dist/chunks/safelist-BF822K15.js +15 -0
  135. package/dist/chunks/safelist-BF822K15.js.map +1 -0
  136. package/dist/chunks/safelist-BY7z8fOl.js +26 -0
  137. package/dist/chunks/safelist-BY7z8fOl.js.map +1 -0
  138. package/dist/chunks/{shared-BqUqjuxn.js → shared-Bvjkhhm2.js} +151 -111
  139. package/dist/chunks/shared-Bvjkhhm2.js.map +1 -0
  140. package/dist/chunks/transition-mJ3PZCHH.js +1694 -0
  141. package/dist/chunks/transition-mJ3PZCHH.js.map +1 -0
  142. package/dist/chunks/x-Pa6C2hwi.js +25 -0
  143. package/dist/chunks/x-Pa6C2hwi.js.map +1 -0
  144. package/dist/chunks/x-circle-DQSlBLmX.js +69 -0
  145. package/dist/chunks/x-circle-DQSlBLmX.js.map +1 -0
  146. package/dist/components/GrAlert/chunks/GrAlert-BjerGcU8.js +148 -0
  147. package/dist/components/GrAlert/chunks/GrAlert-BjerGcU8.js.map +1 -0
  148. package/dist/components/GrAlert/index.js +3 -3
  149. package/dist/components/GrAvatar/chunks/GrAvatar-BjnPKNAL.js +43 -0
  150. package/dist/components/GrAvatar/chunks/GrAvatar-BjnPKNAL.js.map +1 -0
  151. package/dist/components/GrAvatar/index.js +3 -3
  152. package/dist/components/GrBadge/chunks/GrBadge-wuIb4_2K.js +34 -0
  153. package/dist/components/GrBadge/chunks/GrBadge-wuIb4_2K.js.map +1 -0
  154. package/dist/components/GrBadge/index.js +3 -3
  155. package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-CxtamOZ-.js +35 -0
  156. package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-CxtamOZ-.js.map +1 -0
  157. package/dist/components/GrBadgeWrap/index.js +3 -3
  158. package/dist/components/GrBottomNav/chunks/GrBottomNav-CsmQ7mTJ.js +33 -0
  159. package/dist/components/GrBottomNav/chunks/GrBottomNav-CsmQ7mTJ.js.map +1 -0
  160. package/dist/components/GrBottomNav/index.js +3 -3
  161. package/dist/components/GrButton/chunks/GrButton-BmGdp8-4.js +85 -0
  162. package/dist/components/GrButton/chunks/GrButton-BmGdp8-4.js.map +1 -0
  163. package/dist/components/GrButton/index.js +5 -5
  164. package/dist/components/GrButtonGroup/chunks/GrButtonGroup-CBj4tpms.js +23 -0
  165. package/dist/components/GrButtonGroup/chunks/GrButtonGroup-CBj4tpms.js.map +1 -0
  166. package/dist/components/GrButtonGroup/index.js +3 -3
  167. package/dist/components/GrCard/chunks/GrCard-xtDcXBr7.js +13 -0
  168. package/dist/components/GrCard/chunks/GrCard-xtDcXBr7.js.map +1 -0
  169. package/dist/components/GrCard/index.js +3 -3
  170. package/dist/components/GrCheckbox/chunks/GrCheckbox-Bt3d7ckE.js +136 -0
  171. package/dist/components/GrCheckbox/chunks/GrCheckbox-Bt3d7ckE.js.map +1 -0
  172. package/dist/components/GrCheckbox/index.js +3 -3
  173. package/dist/components/GrCollapse/chunks/GrCollapse-HU20VTVn.js +207 -0
  174. package/dist/components/GrCollapse/chunks/GrCollapse-HU20VTVn.js.map +1 -0
  175. package/dist/components/GrCollapse/index.js +3 -3
  176. package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-DjGOX9Hd.js +133 -0
  177. package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-DjGOX9Hd.js.map +1 -0
  178. package/dist/components/GrConfirmDialog/index.js +3 -3
  179. package/dist/components/GrDataTable/chunks/GrDataTable-QDOJWmdY.js +181 -0
  180. package/dist/components/GrDataTable/chunks/GrDataTable-QDOJWmdY.js.map +1 -0
  181. package/dist/components/GrDataTable/index.js +3 -3
  182. package/dist/components/GrDialog/chunks/GrDialog-gObmaVEl.js +223 -0
  183. package/dist/components/GrDialog/chunks/GrDialog-gObmaVEl.js.map +1 -0
  184. package/dist/components/GrDialog/index.js +4 -4
  185. package/dist/components/GrDrawer/chunks/GrDrawer-BJL_gTxI.js +158 -0
  186. package/dist/components/GrDrawer/chunks/GrDrawer-BJL_gTxI.js.map +1 -0
  187. package/dist/components/GrDrawer/index.js +3 -3
  188. package/dist/components/GrDropdown/chunks/GrDropdown-DVTU32T_.js +153 -0
  189. package/dist/components/GrDropdown/chunks/GrDropdown-DVTU32T_.js.map +1 -0
  190. package/dist/components/GrDropdown/index.js +3 -3
  191. package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-fePQRcgh.js +311 -0
  192. package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-fePQRcgh.js.map +1 -0
  193. package/dist/components/GrDropdownMenu/index.js +3 -3
  194. package/dist/components/GrEmptyState/chunks/GrEmptyState-Bs8d3tgb.js +64 -0
  195. package/dist/components/GrEmptyState/chunks/GrEmptyState-Bs8d3tgb.js.map +1 -0
  196. package/dist/components/GrEmptyState/index.js +3 -3
  197. package/dist/components/GrFileUpload/chunks/GrFileUpload-DVv8yXpl.js +370 -0
  198. package/dist/components/GrFileUpload/chunks/GrFileUpload-DVv8yXpl.js.map +1 -0
  199. package/dist/components/GrFileUpload/index.js +4 -4
  200. package/dist/components/GrFormField/chunks/GrFormField-BzezYcS8.js +37 -0
  201. package/dist/components/GrFormField/chunks/GrFormField-BzezYcS8.js.map +1 -0
  202. package/dist/components/GrFormField/index.js +3 -3
  203. package/dist/components/GrFormFile/chunks/GrFormFile-DtZOypJW.js +315 -0
  204. package/dist/components/GrFormFile/chunks/GrFormFile-DtZOypJW.js.map +1 -0
  205. package/dist/components/GrFormFile/index.js +3 -3
  206. package/dist/components/GrFormSection/chunks/GrFormSection-BIPB1RIk.js +37 -0
  207. package/dist/components/GrFormSection/chunks/GrFormSection-BIPB1RIk.js.map +1 -0
  208. package/dist/components/GrFormSection/index.js +3 -3
  209. package/dist/components/GrIcon/chunks/GrIcon-BV7RBU_0.js +34 -0
  210. package/dist/components/GrIcon/chunks/GrIcon-BV7RBU_0.js.map +1 -0
  211. package/dist/components/GrIcon/index.js +3 -3
  212. package/dist/components/GrImageViewer/chunks/GrImageViewer-fn8ilJTA.js +399 -0
  213. package/dist/components/GrImageViewer/chunks/GrImageViewer-fn8ilJTA.js.map +1 -0
  214. package/dist/components/GrImageViewer/index.js +3 -3
  215. package/dist/components/GrInput/chunks/GrInput-DLLRrH1A.js +213 -0
  216. package/dist/components/GrInput/chunks/GrInput-DLLRrH1A.js.map +1 -0
  217. package/dist/components/GrInput/index.js +3 -3
  218. package/dist/components/GrInputTag/chunks/GrInputTag-CzrrBxgU.js +259 -0
  219. package/dist/components/GrInputTag/chunks/GrInputTag-CzrrBxgU.js.map +1 -0
  220. package/dist/components/GrInputTag/index.js +3 -3
  221. package/dist/components/GrLink/chunks/GrLink-Dhkid3Mp.js +82 -0
  222. package/dist/components/GrLink/chunks/GrLink-Dhkid3Mp.js.map +1 -0
  223. package/dist/components/GrLink/index.js +3 -3
  224. package/dist/components/GrList/chunks/GrList-CjgeVjhY.js +79 -0
  225. package/dist/components/GrList/chunks/GrList-CjgeVjhY.js.map +1 -0
  226. package/dist/components/GrList/index.js +3 -3
  227. package/dist/components/GrLoading/chunks/GrLoading-DihGX3ol.js +71 -0
  228. package/dist/components/GrLoading/chunks/GrLoading-DihGX3ol.js.map +1 -0
  229. package/dist/components/GrLoading/index.js +3 -3
  230. package/dist/components/GrModal/chunks/GrModal-gvfvlp7k.js +170 -0
  231. package/dist/components/GrModal/chunks/GrModal-gvfvlp7k.js.map +1 -0
  232. package/dist/components/GrModal/index.js +4 -4
  233. package/dist/components/GrNavbar/chunks/GrNavbar-CQOAfO6y.js +77 -0
  234. package/dist/components/GrNavbar/chunks/GrNavbar-CQOAfO6y.js.map +1 -0
  235. package/dist/components/GrNavbar/index.js +3 -3
  236. package/dist/components/GrNumberInput/chunks/GrNumberInput-CyHgUotG.js +399 -0
  237. package/dist/components/GrNumberInput/chunks/GrNumberInput-CyHgUotG.js.map +1 -0
  238. package/dist/components/GrNumberInput/index.js +3 -3
  239. package/dist/components/GrPagination/chunks/GrPagination-C5cxRJsF.js +116 -0
  240. package/dist/components/GrPagination/chunks/GrPagination-C5cxRJsF.js.map +1 -0
  241. package/dist/components/GrPagination/index.js +3 -3
  242. package/dist/components/GrProgressBar/chunks/GrProgressBar-C9wAAFxR.js +41 -0
  243. package/dist/components/GrProgressBar/chunks/GrProgressBar-C9wAAFxR.js.map +1 -0
  244. package/dist/components/GrProgressBar/index.js +3 -3
  245. package/dist/components/GrPromptDialog/chunks/GrPromptDialog-Cfq9bvL3.js +192 -0
  246. package/dist/components/GrPromptDialog/chunks/GrPromptDialog-Cfq9bvL3.js.map +1 -0
  247. package/dist/components/GrPromptDialog/index.js +3 -3
  248. package/dist/components/GrRadio/chunks/GrRadio-B_t_ZNVl.js +186 -0
  249. package/dist/components/GrRadio/chunks/GrRadio-B_t_ZNVl.js.map +1 -0
  250. package/dist/components/GrRadio/index.js +3 -3
  251. package/dist/components/GrRadioGroup/chunks/GrRadioGroup-CVlgpUBr.js +82 -0
  252. package/dist/components/GrRadioGroup/chunks/GrRadioGroup-CVlgpUBr.js.map +1 -0
  253. package/dist/components/GrRadioGroup/index.js +3 -3
  254. package/dist/components/GrSegmented/chunks/GrSegmented-BPl1koHc.js +325 -0
  255. package/dist/components/GrSegmented/chunks/GrSegmented-BPl1koHc.js.map +1 -0
  256. package/dist/components/GrSegmented/index.js +3 -3
  257. package/dist/components/GrSelect/chunks/GrSelect-aVqUL-1F.js +445 -0
  258. package/dist/components/GrSelect/chunks/GrSelect-aVqUL-1F.js.map +1 -0
  259. package/dist/components/GrSelect/index.js +3 -3
  260. package/dist/components/GrSidebar/chunks/GrSidebar-DVucgcfV.js +46 -0
  261. package/dist/components/GrSidebar/chunks/GrSidebar-DVucgcfV.js.map +1 -0
  262. package/dist/components/GrSidebar/index.js +3 -3
  263. package/dist/components/GrSkeleton/chunks/GrSkeleton-CDTvCSoH.js +35 -0
  264. package/dist/components/GrSkeleton/chunks/GrSkeleton-CDTvCSoH.js.map +1 -0
  265. package/dist/components/GrSkeleton/index.js +3 -3
  266. package/dist/components/GrSwitch/chunks/GrSwitch-Bnamgqb2.js +81 -0
  267. package/dist/components/GrSwitch/chunks/GrSwitch-Bnamgqb2.js.map +1 -0
  268. package/dist/components/GrSwitch/index.js +3 -3
  269. package/dist/components/GrTable/chunks/GrTable-CyQ9uw8A.js +59 -0
  270. package/dist/components/GrTable/chunks/GrTable-CyQ9uw8A.js.map +1 -0
  271. package/dist/components/GrTable/index.js +3 -3
  272. package/dist/components/GrTabs/chunks/GrTabs-CiGmcmvm.js +120 -0
  273. package/dist/components/GrTabs/chunks/GrTabs-CiGmcmvm.js.map +1 -0
  274. package/dist/components/GrTabs/index.js +3 -3
  275. package/dist/components/GrTextarea/chunks/GrTextarea-VBSc6A7D.js +73 -0
  276. package/dist/components/GrTextarea/chunks/GrTextarea-VBSc6A7D.js.map +1 -0
  277. package/dist/components/GrTextarea/index.js +3 -3
  278. package/dist/components/GrToaster/chunks/GrToaster-I1e-zCpf.js +173 -0
  279. package/dist/components/GrToaster/chunks/GrToaster-I1e-zCpf.js.map +1 -0
  280. package/dist/components/GrToaster/index.js +3 -3
  281. package/dist/components/GrTooltip/chunks/GrTooltip-CrV1gI_c.js +57 -0
  282. package/dist/components/GrTooltip/chunks/GrTooltip-CrV1gI_c.js.map +1 -0
  283. package/dist/components/GrTooltip/index.js +3 -3
  284. package/dist/components/GrTree/chunks/GrTree-Dlev9oBd.js +736 -0
  285. package/dist/components/GrTree/chunks/GrTree-Dlev9oBd.js.map +1 -0
  286. package/dist/components/GrTree/index.js +3 -3
  287. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-DN6XFjOD.js +456 -0
  288. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-DN6XFjOD.js.map +1 -0
  289. package/dist/components/GrTreeSelect/index.js +3 -3
  290. package/dist/composables/useTheme.js +41 -30
  291. package/dist/composables/useTheme.js.map +1 -0
  292. package/dist/composables/useToast.js +43 -34
  293. package/dist/composables/useToast.js.map +1 -0
  294. package/dist/directives/index.js +2 -2
  295. package/dist/fileValidation/index.js +2 -2
  296. package/dist/granular-provider-node.js +25 -14
  297. package/dist/granular-provider-node.js.map +1 -0
  298. package/dist/granular-provider.js +5 -3
  299. package/dist/granular-provider.js.map +1 -0
  300. package/dist/i18n/all.js +8 -6
  301. package/dist/i18n/all.js.map +1 -0
  302. package/dist/i18n/index.js +3 -3
  303. package/dist/index.js +105 -105
  304. package/dist/vue/index.js +66 -26
  305. package/dist/vue/index.js.map +1 -0
  306. package/package.json +1 -1
  307. package/dist/chunks/_plugin-vue_export-helper-CHO2XVys.js +0 -8
  308. package/dist/chunks/adapter-D5uYoOZj.js +0 -4
  309. package/dist/chunks/arrow-up-Dv3dC3hu.js +0 -23
  310. package/dist/chunks/classTokens-CT1tqF2j.js +0 -6
  311. package/dist/chunks/config-B5JCvHys.js +0 -13
  312. package/dist/chunks/config-BDXa5Sna2.js +0 -9
  313. package/dist/chunks/config-BG5_FuZ-.js +0 -34
  314. package/dist/chunks/config-BMYKG1oB.js +0 -10
  315. package/dist/chunks/config-BQREEXFD.js +0 -8
  316. package/dist/chunks/config-BUZtbeTr.js +0 -40
  317. package/dist/chunks/config-BVXycfiO.js +0 -9
  318. package/dist/chunks/config-BZW-RL6E.js +0 -14
  319. package/dist/chunks/config-BhbfV-Is.js +0 -48
  320. package/dist/chunks/config-BmYFupZh.js +0 -8
  321. package/dist/chunks/config-BsZc_QQ-2.js +0 -20
  322. package/dist/chunks/config-C1Sn7mn-.js +0 -27
  323. package/dist/chunks/config-C4_REX-3.js +0 -9
  324. package/dist/chunks/config-CBFllZZ4.js +0 -9
  325. package/dist/chunks/config-CDyD_fCt.js +0 -8
  326. package/dist/chunks/config-CJeG727i.js +0 -149
  327. package/dist/chunks/config-CLawBqde.js +0 -21
  328. package/dist/chunks/config-CMz46RPG.js +0 -8
  329. package/dist/chunks/config-CO-7HRZd2.js +0 -8
  330. package/dist/chunks/config-CS7E7LME.js +0 -9
  331. package/dist/chunks/config-CVy124Xj.js +0 -8
  332. package/dist/chunks/config-CcixQGaN.js +0 -47
  333. package/dist/chunks/config-CiVXZxyQ.js +0 -9
  334. package/dist/chunks/config-CoMQmunP.js +0 -8
  335. package/dist/chunks/config-Cq6ufYtp.js +0 -9
  336. package/dist/chunks/config-D8CIEWcb.js +0 -8
  337. package/dist/chunks/config-D8hKc39m.js +0 -18
  338. package/dist/chunks/config-D9MxGwCJ.js +0 -8
  339. package/dist/chunks/config-DBXTZE36.js +0 -15
  340. package/dist/chunks/config-DK9C8O7L.js +0 -9
  341. package/dist/chunks/config-DTegOmx2.js +0 -8
  342. package/dist/chunks/config-DYI8XADo.js +0 -47
  343. package/dist/chunks/config-DlidGf7P.js +0 -8
  344. package/dist/chunks/config-DtNe7EIX.js +0 -35
  345. package/dist/chunks/config-EdWeK_ge.js +0 -17
  346. package/dist/chunks/config-FGAkxHFh.js +0 -8
  347. package/dist/chunks/config-M76gNxd2.js +0 -37
  348. package/dist/chunks/config-NuqoO_Of.js +0 -33
  349. package/dist/chunks/config-QsovJrku2.js +0 -66
  350. package/dist/chunks/config-R6F6zRJk.js +0 -9
  351. package/dist/chunks/config-SLwkDc4Q2.js +0 -9
  352. package/dist/chunks/config-aJ7sb62Y.js +0 -8
  353. package/dist/chunks/config-b9nc87Oc.js +0 -9
  354. package/dist/chunks/config-dSI8RttH2.js +0 -8
  355. package/dist/chunks/config-im2VHeSM.js +0 -9
  356. package/dist/chunks/config-vKeQ035f.js +0 -9
  357. package/dist/chunks/config-vMcxHlWi.js +0 -14
  358. package/dist/chunks/dialogShared-CONROtU2.js +0 -26
  359. package/dist/chunks/directives-Dr5NPOT8.js +0 -530
  360. package/dist/chunks/en-j3simI0h.js +0 -41
  361. package/dist/chunks/es-CIT9s_vo.js +0 -4
  362. package/dist/chunks/es-CLpJj7KP.js +0 -41
  363. package/dist/chunks/fileValidation-LFD-vwil.js +0 -193
  364. package/dist/chunks/grDropdownStyles-149X1NeB.js +0 -31
  365. package/dist/chunks/grLoadingStyles-Bjo7ylmq.js +0 -15
  366. package/dist/chunks/grModalStyles-Dmd4havY.js +0 -38
  367. package/dist/chunks/grSelectStyles-C3QKIn1J.js +0 -40
  368. package/dist/chunks/granularityI18n-8_v1B11L.js +0 -24
  369. package/dist/chunks/info-CNJnuTYC.js +0 -26
  370. package/dist/chunks/loader-circle-C5vCCMfB.js +0 -23
  371. package/dist/chunks/ru-CiOZPnBu.js +0 -41
  372. package/dist/chunks/safelist-Bq32hAXc.js +0 -13
  373. package/dist/chunks/safelist-CLcTRYB-.js +0 -22
  374. package/dist/chunks/transition-BJXMi52x.js +0 -1617
  375. package/dist/chunks/x--kxrj3ez.js +0 -23
  376. package/dist/chunks/x-circle-ChJ87u1v.js +0 -61
  377. package/dist/components/GrAlert/chunks/GrAlert-DLHkusb-.js +0 -129
  378. package/dist/components/GrAvatar/chunks/GrAvatar-BFYH3HJw.js +0 -32
  379. package/dist/components/GrBadge/chunks/GrBadge-D_AoqGrn.js +0 -27
  380. package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-C_N0QJfA.js +0 -26
  381. package/dist/components/GrBottomNav/chunks/GrBottomNav-Chpu3SVd.js +0 -21
  382. package/dist/components/GrButton/chunks/GrButton-BXVVt6Od.js +0 -67
  383. package/dist/components/GrButtonGroup/chunks/GrButtonGroup-CmnYHVH7.js +0 -16
  384. package/dist/components/GrCard/chunks/GrCard-DEpN6Ptf.js +0 -10
  385. package/dist/components/GrCheckbox/chunks/GrCheckbox-DF3vJApB.js +0 -111
  386. package/dist/components/GrCollapse/chunks/GrCollapse-D7QYRqNa.js +0 -150
  387. package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-C7Eh8-Vn.js +0 -111
  388. package/dist/components/GrDataTable/chunks/GrDataTable-Dxsg1NMP.js +0 -142
  389. package/dist/components/GrDialog/chunks/GrDialog-BSd4-uP5.js +0 -169
  390. package/dist/components/GrDrawer/chunks/GrDrawer-DBBSwe1s.js +0 -135
  391. package/dist/components/GrDropdown/chunks/GrDropdown-BELyRP4A.js +0 -110
  392. package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-B8fuk7iP.js +0 -233
  393. package/dist/components/GrEmptyState/chunks/GrEmptyState-BPGoafJI.js +0 -49
  394. package/dist/components/GrFileUpload/chunks/GrFileUpload-BPzx3LEM.js +0 -294
  395. package/dist/components/GrFormField/chunks/GrFormField-Cn8g9eFP.js +0 -28
  396. package/dist/components/GrFormFile/chunks/GrFormFile-DfinD5Iv.js +0 -248
  397. package/dist/components/GrFormSection/chunks/GrFormSection-dKpQw-vh.js +0 -27
  398. package/dist/components/GrIcon/chunks/GrIcon-CXIHuG7L.js +0 -25
  399. package/dist/components/GrImageViewer/chunks/GrImageViewer-CQSNx-D7.js +0 -322
  400. package/dist/components/GrInput/chunks/GrInput-CLKX1inm.js +0 -158
  401. package/dist/components/GrInputTag/chunks/GrInputTag-BAtLody2.js +0 -214
  402. package/dist/components/GrLink/chunks/GrLink-BpXnly-Y.js +0 -59
  403. package/dist/components/GrList/chunks/GrList-BrFc7VdS.js +0 -55
  404. package/dist/components/GrLoading/chunks/GrLoading-dFuoryMY.js +0 -53
  405. package/dist/components/GrModal/chunks/GrModal-uaWXH08K.js +0 -136
  406. package/dist/components/GrNavbar/chunks/GrNavbar-KzLHgdjX.js +0 -62
  407. package/dist/components/GrNumberInput/chunks/GrNumberInput-rENn1802.js +0 -315
  408. package/dist/components/GrPagination/chunks/GrPagination-DP0x3rx6.js +0 -93
  409. package/dist/components/GrProgressBar/chunks/GrProgressBar-DpW93sOi.js +0 -29
  410. package/dist/components/GrPromptDialog/chunks/GrPromptDialog-ASfBwyzQ.js +0 -158
  411. package/dist/components/GrRadio/chunks/GrRadio-8BOo97XV.js +0 -147
  412. package/dist/components/GrRadioGroup/chunks/GrRadioGroup-BymbUmqI.js +0 -66
  413. package/dist/components/GrSegmented/chunks/GrSegmented-CK5C_lN7.js +0 -250
  414. package/dist/components/GrSelect/chunks/GrSelect-BMfc1-vs.js +0 -314
  415. package/dist/components/GrSidebar/chunks/GrSidebar-C4SXXhfO.js +0 -29
  416. package/dist/components/GrSkeleton/chunks/GrSkeleton-QlieOdpY.js +0 -25
  417. package/dist/components/GrSwitch/chunks/GrSwitch-Cefiutzu.js +0 -64
  418. package/dist/components/GrTable/chunks/GrTable-k_FUiJQk.js +0 -44
  419. package/dist/components/GrTabs/chunks/GrTabs-B46P-lUc.js +0 -98
  420. package/dist/components/GrTextarea/chunks/GrTextarea-BX7L1MJk.js +0 -57
  421. package/dist/components/GrToaster/chunks/GrToaster-C4l_BjOh.js +0 -139
  422. package/dist/components/GrTooltip/chunks/GrTooltip-BqRAzuLT.js +0 -37
  423. package/dist/components/GrTree/chunks/GrTree-C2CXR_vW.js +0 -614
  424. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-DAAay-QB.js +0 -353
@@ -1,248 +0,0 @@
1
- import { t as e } from "../../../chunks/x--kxrj3ez.js";
2
- import { t } from "../../GrButton/chunks/GrButton-BXVVt6Od.js";
3
- import { t as n } from "../../../chunks/_plugin-vue_export-helper-CHO2XVys.js";
4
- import { t as r } from "../../GrIcon/chunks/GrIcon-CXIHuG7L.js";
5
- import { i } from "../../../chunks/directives-Dr5NPOT8.js";
6
- import { l as a, o, u as s } from "../../../chunks/fileValidation-LFD-vwil.js";
7
- import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as h, markRaw as g, nextTick as _, normalizeClass as v, openBlock as y, ref as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, watch as T, withCtx as E, withDirectives as D, withModifiers as O } from "vue";
8
- import '../../../GrFormFile.css';//#region ~icons/lucide/upload
9
- var k = {
10
- viewBox: "0 0 24 24",
11
- width: "1.2em",
12
- height: "1.2em"
13
- };
14
- function A(e, t) {
15
- return y(), f("svg", k, [...t[0] ||= [p("path", {
16
- fill: "none",
17
- stroke: "currentColor",
18
- "stroke-linecap": "round",
19
- "stroke-linejoin": "round",
20
- "stroke-width": "2",
21
- d: "M12 3v12m5-7l-5-5l-5 5m14 7v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
22
- }, null, -1)]]);
23
- }
24
- var j = g({
25
- name: "lucide-upload",
26
- render: A
27
- }), M = [
28
- "multiple",
29
- "accept",
30
- "disabled"
31
- ], N = { class: "flex flex-col gap-2" }, P = { class: "flex flex-wrap items-center gap-3" }, ee = { class: "ml-2" }, F = { class: "ml-2" }, I = { class: "ml-2" }, L = ["title"], R = {
32
- key: 3,
33
- class: "text-sm text-[var(--muted-fg)]",
34
- "data-ds-form-file-placeholder": ""
35
- }, z = {
36
- key: 0,
37
- class: "flex flex-col gap-2"
38
- }, B = ["title"], V = ["disabled", "onClick"], H = {
39
- key: 0,
40
- class: "text-sm text-[var(--ds-danger)]",
41
- "data-ds-form-file-errors": ""
42
- }, U = /* @__PURE__ */ n(/* @__PURE__ */ h({
43
- name: "GrFormFile",
44
- __name: "GrFormFile",
45
- props: {
46
- modelValue: {},
47
- multiple: {
48
- type: Boolean,
49
- default: !1
50
- },
51
- disabled: {
52
- type: Boolean,
53
- default: !1
54
- },
55
- accept: { default: void 0 },
56
- validators: { default: void 0 },
57
- uploadText: { default: "Upload file" },
58
- changeText: { default: "Change file" },
59
- removeText: { default: "Remove" },
60
- clearAllText: { default: "Clear all" },
61
- placeholder: { default: "No files selected" },
62
- validate: {
63
- type: Function,
64
- default: void 0
65
- }
66
- },
67
- emits: [
68
- "update:modelValue",
69
- "change",
70
- "clear",
71
- "validation",
72
- "update:errors"
73
- ],
74
- setup(n, { emit: h }) {
75
- let g = n, k = h, A = b(null), U = b([]), W = l(() => g.multiple ? Array.isArray(g.modelValue) ? g.modelValue : [] : g.modelValue instanceof File ? [g.modelValue] : []), G = l(() => W.value.length > 0);
76
- function K() {
77
- A.value && (A.value.value = "");
78
- }
79
- function q(e) {
80
- U.value = e, k("validation", e), k("update:errors", e);
81
- }
82
- function J() {
83
- U.value.length !== 0 && q([]);
84
- }
85
- function Y() {
86
- g.disabled || A.value?.click();
87
- }
88
- function X(e) {
89
- let t = g.multiple ? e : e[0] ?? null;
90
- k("update:modelValue", t), k("change", t);
91
- }
92
- async function Z(e) {
93
- let t = (e) => !!e && typeof e.then == "function", n = g.validate ? async ({ files: e }) => await g.validate?.(e) ?? [] : void 0, r = a(e, [
94
- o(g.accept),
95
- ...g.validators ?? [],
96
- ...n ? [n] : []
97
- ], {
98
- source: "input",
99
- multiple: g.multiple
100
- }), { files: i, issues: s } = t(r) ? await r : r;
101
- if (s.length > 0) {
102
- q(s), K(), await _();
103
- return;
104
- }
105
- J(), X(i), K(), await _();
106
- }
107
- async function Q(e) {
108
- if (g.disabled) return;
109
- let t = e.target, n = t?.files ? Array.prototype.slice.call(t.files) : [];
110
- t && (t.value = ""), await _(), await Z(n);
111
- }
112
- function $() {
113
- g.disabled || (J(), K(), k("clear"), k("update:modelValue", g.multiple ? [] : null), k("change", g.multiple ? [] : null));
114
- }
115
- function te(e) {
116
- if (g.disabled) return;
117
- if (!g.multiple) {
118
- $();
119
- return;
120
- }
121
- let t = W.value.slice();
122
- t.splice(e, 1), k("update:modelValue", t), k("change", t);
123
- }
124
- function ne(e) {
125
- return e.fileName ? `${e.fileName}: ${e.message}` : e.message;
126
- }
127
- let re = l(() => {
128
- let e = g.validate ? async ({ files: e }) => await g.validate?.(e) ?? [] : void 0, t = [
129
- o(g.accept),
130
- ...g.validators ?? [],
131
- ...e ? [e] : []
132
- ];
133
- return {
134
- enabled: !g.disabled,
135
- multiple: g.multiple,
136
- validators: t,
137
- onFiles: async (e) => {
138
- J(), X(e), K(), await _();
139
- },
140
- onError: (e) => {
141
- e instanceof s ? q(e.issues) : q([{
142
- code: "accept",
143
- message: "Failed to validate dropped files"
144
- }]);
145
- }
146
- };
147
- });
148
- return T(() => g.modelValue, (e) => {
149
- A.value && (!e || Array.isArray(e) && e.length === 0) && (A.value.value = "");
150
- }), (a, o) => D((y(), f("div", {
151
- "data-ds-form-file": "",
152
- class: v(["rounded-[var(--ds-radius-md)]", n.disabled ? "opacity-60 cursor-not-allowed" : ""])
153
- }, [p("input", {
154
- ref_key: "inputRef",
155
- ref: A,
156
- "data-ds-form-file-input": "",
157
- type: "file",
158
- tabindex: "-1",
159
- "aria-hidden": "true",
160
- class: "absolute opacity-0 w-px h-px pointer-events-none",
161
- multiple: n.multiple,
162
- accept: n.accept,
163
- disabled: n.disabled,
164
- onChange: Q
165
- }, null, 40, M), p("div", N, [
166
- p("div", P, [
167
- m(t, {
168
- variant: "secondary",
169
- size: "sm",
170
- "data-ds-form-file-upload-btn": "",
171
- disabled: n.disabled,
172
- onClick: O(Y, ["prevent"])
173
- }, {
174
- default: E(() => [m(r, {
175
- size: "sm",
176
- "aria-hidden": "true"
177
- }, {
178
- default: E(() => [m(w(j))]),
179
- _: 1
180
- }), p("span", ee, C(G.value ? n.changeText : n.uploadText), 1)]),
181
- _: 1
182
- }, 8, ["disabled"]),
183
- G.value && !n.multiple ? (y(), u(t, {
184
- key: 0,
185
- variant: "secondary",
186
- size: "sm",
187
- "data-ds-form-file-clear-btn": "",
188
- disabled: n.disabled,
189
- onClick: O($, ["prevent"])
190
- }, {
191
- default: E(() => [m(r, {
192
- size: "sm",
193
- "aria-hidden": "true"
194
- }, {
195
- default: E(() => [m(w(e))]),
196
- _: 1
197
- }), p("span", F, C(n.removeText), 1)]),
198
- _: 1
199
- }, 8, ["disabled"])) : d("", !0),
200
- n.multiple && G.value ? (y(), u(t, {
201
- key: 1,
202
- variant: "secondary",
203
- size: "sm",
204
- "data-ds-form-file-clear-all-btn": "",
205
- disabled: n.disabled,
206
- onClick: O($, ["prevent"])
207
- }, {
208
- default: E(() => [m(r, {
209
- size: "sm",
210
- "aria-hidden": "true"
211
- }, {
212
- default: E(() => [m(w(e))]),
213
- _: 1
214
- }), p("span", I, C(n.clearAllText), 1)]),
215
- _: 1
216
- }, 8, ["disabled"])) : d("", !0),
217
- !n.multiple && G.value ? (y(), f("span", {
218
- key: 2,
219
- class: "text-sm text-[var(--muted-fg)] truncate max-w-[240px]",
220
- "data-ds-form-file-single-name": "",
221
- title: W.value[0]?.name
222
- }, C(W.value[0]?.name), 9, L)) : d("", !0),
223
- G.value ? d("", !0) : (y(), f("span", R, C(n.placeholder), 1))
224
- ]),
225
- n.multiple && G.value ? (y(), f("div", z, [(y(!0), f(c, null, x(W.value, (e, t) => (y(), f("div", {
226
- key: `${e.name}-${e.size}-${t}`,
227
- class: "flex items-center gap-2",
228
- "data-ds-form-file-item": ""
229
- }, [p("span", {
230
- class: "text-sm text-[var(--muted-fg)] truncate max-w-[240px]",
231
- title: e.name,
232
- "data-ds-form-file-item-name": ""
233
- }, C(e.name), 9, B), p("button", {
234
- type: "button",
235
- class: "text-xs text-[var(--muted-fg)] hover:text-[var(--fg)]",
236
- "data-ds-form-file-item-remove": "",
237
- disabled: n.disabled,
238
- onClick: O((e) => te(t), ["prevent"])
239
- }, C(n.removeText), 9, V)]))), 128))])) : d("", !0),
240
- S(a.$slots, "errors", { errors: U.value }, () => [U.value.length ? (y(), f("div", H, [(y(!0), f(c, null, x(U.value, (e, t) => (y(), f("div", {
241
- key: t,
242
- "data-ds-form-file-error": ""
243
- }, C(ne(e)), 1))), 128))])) : d("", !0)], !0)
244
- ])], 2)), [[w(i), re.value]]);
245
- }
246
- }), [["__scopeId", "data-v-a60cb9f7"]]);
247
- //#endregion
248
- export { U as t };
@@ -1,27 +0,0 @@
1
- import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, openBlock as i, renderSlot as a, toDisplayString as o, unref as s, useId as c } from "vue";
2
- //#region src/components/GrFormSection/GrFormSection.vue?vue&type=script&setup=true&lang.ts
3
- var l = ["aria-labelledby", "aria-describedby"], u = ["id"], d = ["id"], f = /* @__PURE__ */ r({
4
- __name: "GrFormSection",
5
- props: {
6
- title: {},
7
- description: { default: void 0 }
8
- },
9
- setup(r) {
10
- let f = c(), p = c();
11
- return (c, m) => (i(), t("section", {
12
- "data-ds-form-section": "",
13
- class: "grid gap-4",
14
- "aria-labelledby": s(f),
15
- "aria-describedby": r.description ? s(p) : void 0
16
- }, [n("div", null, [n("div", {
17
- id: s(f),
18
- class: "text-[14px] font-700"
19
- }, o(r.title), 9, u), r.description ? (i(), t("div", {
20
- key: 0,
21
- id: s(p),
22
- class: "mt-1 text-[13px] text-[var(--muted-fg)]"
23
- }, o(r.description), 9, d)) : e("", !0)]), a(c.$slots, "default")], 8, l));
24
- }
25
- });
26
- //#endregion
27
- export { f as t };
@@ -1,25 +0,0 @@
1
- import { computed as e, createElementBlock as t, defineComponent as n, normalizeStyle as r, openBlock as i, renderSlot as a } from "vue";
2
- import '../../../GrIcon.css';//#endregion
3
- //#region src/components/GrIcon/GrIcon.vue
4
- var o = /* @__PURE__ */ n({
5
- __name: "GrIcon",
6
- props: { size: {} },
7
- setup(n) {
8
- let o = {
9
- sm: 16,
10
- md: 18,
11
- lg: 20
12
- };
13
- function s(e) {
14
- return typeof e == "number" ? e : o[e];
15
- }
16
- let c = n, l = e(() => c.size ?? "md"), u = e(() => ({ "--ds-icon-size": `${s(l.value)}px` }));
17
- return (e, n) => (i(), t("span", {
18
- "data-ds-icon": "",
19
- class: "ds-icon inline-flex items-center justify-center align-middle",
20
- style: r(u.value)
21
- }, [a(e.$slots, "default")], 4));
22
- }
23
- });
24
- //#endregion
25
- export { o as t };
@@ -1,322 +0,0 @@
1
- import { n as e, o as t, r as n, t as r } from "../../../chunks/transition-BJXMi52x.js";
2
- import { Fragment as i, Teleport as ee, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, normalizeStyle as f, openBlock as p, ref as m, renderSlot as h, toDisplayString as g, unref as _, watch as v, withCtx as y } from "vue";
3
- //#region src/components/GrImageViewer/GrImageViewer.vue?vue&type=script&setup=true&lang.ts
4
- var b = { class: "fixed inset-0 overflow-hidden" }, x = { class: "pointer-events-none absolute inset-x-0 top-0 z-30 px-3 py-3 sm:px-6" }, S = { class: "pointer-events-auto flex items-center justify-between gap-3" }, C = { class: "flex items-center gap-2" }, w = {
5
- key: 0,
6
- "data-ds-image-viewer-progress": "",
7
- class: "rounded-full bg-black/35 px-3 py-1 text-xs font-600 text-white/95 sm:text-sm"
8
- }, T = {
9
- key: 1,
10
- "data-ds-image-viewer-zoom-value": "",
11
- class: "rounded-full bg-black/35 px-3 py-1 text-xs font-700 text-white/95 sm:text-sm"
12
- }, te = ["aria-label"], ne = { class: "relative z-10 h-full w-full flex items-center justify-center px-16 py-16 sm:px-24 sm:py-20" }, re = ["aria-label"], ie = ["aria-label"], ae = { class: "h-full w-full flex items-center justify-center" }, oe = ["src"], se = {
13
- key: 1,
14
- class: "rounded-[var(--ds-radius-xl)] border border-white/20 bg-black/25 px-4 py-3 text-sm text-white/80"
15
- }, ce = { class: "pointer-events-none absolute inset-x-0 bottom-0 z-30 px-3 pb-3 sm:px-6 sm:pb-6" }, le = { class: "pointer-events-auto mx-auto w-full max-w-max" }, ue = { class: "rounded-full border border-white/20 bg-black/35 p-1 backdrop-blur-sm flex items-center gap-1" }, de = ["aria-label"], fe = ["aria-label"], pe = ["aria-label"], E = {
16
- key: 1,
17
- class: "mx-1 h-6 w-px bg-white/25",
18
- "aria-hidden": "true"
19
- }, me = ["aria-label"], he = ["aria-label"], ge = 2e3, D = /* @__PURE__ */ d({
20
- __name: "GrImageViewer",
21
- props: {
22
- modelValue: { type: Boolean },
23
- urlList: {},
24
- initialIndex: { default: 0 },
25
- zoomRate: { default: 1.2 },
26
- minScale: { default: .5 },
27
- maxScale: { default: 5 },
28
- hideOnClickModal: {
29
- type: Boolean,
30
- default: !1
31
- },
32
- closeOnPressEscape: {
33
- type: Boolean,
34
- default: !0
35
- },
36
- showProgress: {
37
- type: Boolean,
38
- default: !1
39
- },
40
- showZoomValue: {
41
- type: Boolean,
42
- default: !0
43
- },
44
- zIndex: { default: void 0 },
45
- closeLabel: { default: "Close image viewer" },
46
- prevLabel: { default: "Previous image" },
47
- nextLabel: { default: "Next image" },
48
- zoomInLabel: { default: "Zoom in" },
49
- zoomOutLabel: { default: "Zoom out" },
50
- resetZoomLabel: { default: "Reset zoom" },
51
- rotateLeftLabel: { default: "Rotate left" },
52
- rotateRightLabel: { default: "Rotate right" },
53
- emptyText: { default: "No image" }
54
- },
55
- emits: [
56
- "update:modelValue",
57
- "close",
58
- "switch",
59
- "rotate"
60
- ],
61
- setup(d, { emit: D }) {
62
- let O = d, k = D, A = /\.0$/, j = a(() => O.modelValue), M = a(() => O.urlList.length), N = a(() => M.value > 0), P = m(0), F = m(1), I = m(0), L = m(0), R = m(0), z = a(() => {
63
- if (N.value) return O.urlList[P.value];
64
- }), B = a(() => N.value ? P.value + 1 : 0), _e = a(() => ({ zIndex: String(Number.isFinite(O.zIndex) ? O.zIndex : ge) })), ve = a(() => ({ transform: `translate3d(${L.value}px, ${R.value}px, 0) scale(${F.value}) rotate(${I.value}deg)` })), ye = a(() => {
65
- let e = F.value * 100;
66
- return Number.isInteger(e) ? String(e) : e.toFixed(1).replace(A, "");
67
- });
68
- function V(e) {
69
- return N.value ? ((Number.isFinite(e) ? Math.trunc(e) : 0) % M.value + M.value) % M.value : 0;
70
- }
71
- function H() {
72
- F.value = 1, I.value = 0, L.value = 0, R.value = 0;
73
- }
74
- function U(e, t) {
75
- let n = V(e);
76
- n !== P.value && (P.value = n, H(), t?.emitSwitch !== !1 && k("switch", n));
77
- }
78
- function W() {
79
- if (!N.value) {
80
- P.value = 0;
81
- return;
82
- }
83
- P.value = V(O.initialIndex), H();
84
- }
85
- function G(e) {
86
- let t = O.urlList[e];
87
- if (!t) return;
88
- let n = new Image();
89
- n.decoding = "async", n.src = t;
90
- }
91
- function K() {
92
- k("update:modelValue", !1), k("close");
93
- }
94
- function q() {
95
- U(P.value - 1);
96
- }
97
- function J() {
98
- U(P.value + 1);
99
- }
100
- function Y() {
101
- F.value = Math.min(O.maxScale, Number((F.value * O.zoomRate).toFixed(4)));
102
- }
103
- function X() {
104
- F.value = Math.max(O.minScale, Number((F.value / O.zoomRate).toFixed(4)));
105
- }
106
- function Z() {
107
- I.value -= 90, k("rotate", I.value);
108
- }
109
- function Q() {
110
- I.value += 90, k("rotate", I.value);
111
- }
112
- let $ = {
113
- close: K,
114
- prev: q,
115
- next: J,
116
- zoomIn: Y,
117
- zoomOut: X,
118
- reset: H,
119
- rotateLeft: Z,
120
- rotateRight: Q
121
- };
122
- function be() {
123
- O.hideOnClickModal && K();
124
- }
125
- function xe(e) {
126
- switch (e.key) {
127
- case "Escape":
128
- if (!O.closeOnPressEscape) return;
129
- e.preventDefault(), K();
130
- return;
131
- case "ArrowLeft":
132
- e.preventDefault(), q();
133
- return;
134
- case "ArrowRight":
135
- e.preventDefault(), J();
136
- return;
137
- case "+":
138
- case "=":
139
- case "Add":
140
- e.preventDefault(), Y();
141
- return;
142
- case "-":
143
- case "_":
144
- case "Subtract":
145
- e.preventDefault(), X();
146
- return;
147
- case "0":
148
- e.preventDefault(), H();
149
- break;
150
- default:
151
- }
152
- }
153
- return v(() => O.modelValue, (e) => {
154
- e && W();
155
- }, { immediate: !0 }), v(() => O.initialIndex, () => {
156
- O.modelValue && W();
157
- }), v(() => O.urlList, () => {
158
- O.modelValue && W();
159
- }, { deep: !0 }), v(P, (e) => {
160
- !N.value || M.value < 2 || (G(V(e - 1)), G(V(e + 1)));
161
- }, { immediate: !0 }), (a, m) => (p(), o(ee, { to: "body" }, [u(_(r), {
162
- show: j.value,
163
- as: "template"
164
- }, {
165
- default: y(() => [u(_(t), {
166
- as: "div",
167
- class: "fixed inset-0",
168
- style: f(_e.value),
169
- role: "dialog",
170
- "aria-modal": "true",
171
- static: !0,
172
- onKeydown: xe
173
- }, {
174
- default: y(() => [l("div", b, [u(_(e), {
175
- as: "template",
176
- enter: "duration-150 ease-out",
177
- "enter-from": "opacity-0",
178
- "enter-to": "opacity-100",
179
- leave: "duration-120 ease-in",
180
- "leave-from": "opacity-100",
181
- "leave-to": "opacity-0"
182
- }, {
183
- default: y(() => [l("div", {
184
- "data-ds-image-viewer-overlay": "",
185
- class: "absolute inset-0 bg-black/60 backdrop-blur-sm",
186
- "aria-hidden": "true",
187
- onClick: be
188
- })]),
189
- _: 1
190
- }), u(_(e), {
191
- as: "template",
192
- enter: "duration-180 ease-out",
193
- "enter-from": "opacity-0 scale-98",
194
- "enter-to": "opacity-100 scale-100",
195
- leave: "duration-130 ease-in",
196
- "leave-from": "opacity-100 scale-100",
197
- "leave-to": "opacity-0 scale-98"
198
- }, {
199
- default: y(() => [u(_(n), {
200
- "data-ds-image-viewer-panel": "",
201
- class: "relative z-10 h-full w-full outline-none",
202
- tabindex: "-1"
203
- }, {
204
- default: y(() => [
205
- l("div", x, [l("div", S, [l("div", C, [d.showProgress ? (p(), c("div", w, g(B.value) + " / " + g(M.value), 1)) : s("", !0), d.showZoomValue ? (p(), c("div", T, g(ye.value) + "% ", 1)) : s("", !0)]), l("button", {
206
- type: "button",
207
- "data-ds-image-viewer-close": "",
208
- "aria-label": d.closeLabel,
209
- class: "h-11 w-11 flex items-center justify-center rounded-full border border-white/20 bg-black/35 text-white transition-colors hover:bg-black/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
210
- onClick: K
211
- }, [...m[0] ||= [l("span", {
212
- "aria-hidden": "true",
213
- class: "text-lg leading-none"
214
- }, "✕", -1)]], 8, te)])]),
215
- l("div", ne, [
216
- M.value > 1 ? (p(), c("button", {
217
- key: 0,
218
- type: "button",
219
- "data-ds-image-viewer-prev": "",
220
- "aria-label": d.prevLabel,
221
- class: "absolute left-3 top-1/2 z-20 h-12 w-12 -translate-y-1/2 flex items-center justify-center rounded-full border border-white/20 bg-black/35 text-white transition-colors hover:bg-black/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80 sm:left-6",
222
- onClick: q
223
- }, [...m[1] ||= [l("span", {
224
- "aria-hidden": "true",
225
- class: "text-xl leading-none"
226
- }, "‹", -1)]], 8, re)) : s("", !0),
227
- M.value > 1 ? (p(), c("button", {
228
- key: 1,
229
- type: "button",
230
- "data-ds-image-viewer-next": "",
231
- "aria-label": d.nextLabel,
232
- class: "absolute right-3 top-1/2 z-20 h-12 w-12 -translate-y-1/2 flex items-center justify-center rounded-full border border-white/20 bg-black/35 text-white transition-colors hover:bg-black/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80 sm:right-6",
233
- onClick: J
234
- }, [...m[2] ||= [l("span", {
235
- "aria-hidden": "true",
236
- class: "text-xl leading-none"
237
- }, "›", -1)]], 8, ie)) : s("", !0),
238
- l("div", ae, [z.value ? (p(), c("img", {
239
- key: 0,
240
- "data-ds-image-viewer-image": "",
241
- src: z.value,
242
- alt: "",
243
- draggable: "false",
244
- class: "max-h-full max-w-full select-none object-contain will-change-transform transition-transform duration-150 ease-out",
245
- style: f(ve.value)
246
- }, null, 12, oe)) : (p(), c("div", se, g(d.emptyText), 1))])
247
- ]),
248
- l("div", ce, [l("div", le, [h(a.$slots, "toolbar", {
249
- index: P.value,
250
- displayIndex: B.value,
251
- total: M.value,
252
- scale: F.value,
253
- rotation: I.value,
254
- actions: $
255
- }, () => [l("div", ue, [
256
- l("button", {
257
- type: "button",
258
- "data-ds-image-viewer-zoom-out": "",
259
- "aria-label": d.zoomOutLabel,
260
- class: "h-11 min-w-11 px-2 flex items-center justify-center rounded-full text-sm font-600 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
261
- onClick: X
262
- }, " − ", 8, de),
263
- l("button", {
264
- type: "button",
265
- "data-ds-image-viewer-zoom-reset": "",
266
- "aria-label": d.resetZoomLabel,
267
- class: "h-11 min-w-11 px-3 flex items-center justify-center rounded-full text-xs font-700 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
268
- onClick: H
269
- }, " 100% ", 8, fe),
270
- l("button", {
271
- type: "button",
272
- "data-ds-image-viewer-zoom-in": "",
273
- "aria-label": d.zoomInLabel,
274
- class: "h-11 min-w-11 px-2 flex items-center justify-center rounded-full text-sm font-600 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
275
- onClick: Y
276
- }, " + ", 8, pe),
277
- a.$slots["toolbar-actions"] ? (p(), c(i, { key: 0 }, [
278
- m[3] ||= l("div", {
279
- class: "mx-1 h-6 w-px bg-white/25",
280
- "aria-hidden": "true"
281
- }, null, -1),
282
- h(a.$slots, "toolbar-actions", {
283
- index: P.value,
284
- displayIndex: B.value,
285
- total: M.value,
286
- scale: F.value,
287
- rotation: I.value,
288
- actions: $
289
- }),
290
- m[4] ||= l("div", {
291
- class: "mx-1 h-6 w-px bg-white/25",
292
- "aria-hidden": "true"
293
- }, null, -1)
294
- ], 64)) : (p(), c("div", E)),
295
- l("button", {
296
- type: "button",
297
- "data-ds-image-viewer-rotate-left": "",
298
- "aria-label": d.rotateLeftLabel,
299
- class: "h-11 min-w-11 px-2 flex items-center justify-center rounded-full text-sm font-600 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
300
- onClick: Z
301
- }, " ↺ ", 8, me),
302
- l("button", {
303
- type: "button",
304
- "data-ds-image-viewer-rotate-right": "",
305
- "aria-label": d.rotateRightLabel,
306
- class: "h-11 min-w-11 px-2 flex items-center justify-center rounded-full text-sm font-600 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
307
- onClick: Q
308
- }, " ↻ ", 8, he)
309
- ])])])])
310
- ]),
311
- _: 3
312
- })]),
313
- _: 3
314
- })])]),
315
- _: 3
316
- }, 8, ["style"])]),
317
- _: 3
318
- }, 8, ["show"])]));
319
- }
320
- });
321
- //#endregion
322
- export { D as t };