@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,323 @@
1
+ import { a as grSegmentedItemIconClass, c as grSegmentedRootStyle, i as grSegmentedItemClass, o as grSegmentedItemLabelClass, r as grSegmentedIndicatorClass, s as grSegmentedRootClass } from "../../../chunks/config-CUgvsjZx.js";
2
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, getCurrentInstance, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, watch } from "vue";
3
+ //#region src/components/GrSegmented/GrSegmented.vue?vue&type=script&setup=true&lang.ts
4
+ var _hoisted_1 = [
5
+ "data-variant",
6
+ "aria-label",
7
+ "aria-disabled"
8
+ ];
9
+ var _hoisted_2 = [
10
+ "data-value",
11
+ "aria-checked",
12
+ "aria-disabled",
13
+ "disabled",
14
+ "tabindex",
15
+ "onClick",
16
+ "onKeydown"
17
+ ];
18
+ var _hoisted_3 = [
19
+ "name",
20
+ "value",
21
+ "checked",
22
+ "disabled"
23
+ ];
24
+ //#endregion
25
+ //#region src/components/GrSegmented/GrSegmented.vue
26
+ var GrSegmented_default = /* @__PURE__ */ defineComponent({
27
+ __name: "GrSegmented",
28
+ props: {
29
+ modelValue: {},
30
+ options: {},
31
+ variant: { default: "pills" },
32
+ size: { default: "md" },
33
+ indicatorDuration: { default: 300 },
34
+ block: {
35
+ type: Boolean,
36
+ default: false
37
+ },
38
+ disabled: {
39
+ type: Boolean,
40
+ default: false
41
+ },
42
+ name: { default: void 0 },
43
+ ariaLabel: { default: void 0 }
44
+ },
45
+ emits: ["update:modelValue", "change"],
46
+ setup(__props, { emit: __emit }) {
47
+ const hiddenInputStyle = {
48
+ position: "absolute",
49
+ opacity: "0",
50
+ width: "0",
51
+ height: "0",
52
+ pointerEvents: "none"
53
+ };
54
+ const props = __props;
55
+ const emit = __emit;
56
+ const fallbackName = `ds-segmented-${getCurrentInstance()?.uid ?? Math.random()}`;
57
+ const rootRef = ref(null);
58
+ const itemRefs = ref(/* @__PURE__ */ new Map());
59
+ const indicatorGeometry = ref(null);
60
+ const indicatorReady = ref(false);
61
+ let resizeObserver = null;
62
+ let observedRoot = null;
63
+ let observedItem = null;
64
+ let scheduled = false;
65
+ const selectedIndex = computed(() => props.options.findIndex((option) => option.value === props.modelValue));
66
+ const selectedOption = computed(() => props.options[selectedIndex.value] ?? null);
67
+ const enabledOptions = computed(() => props.options.filter((option) => !resolveOptionDisabled(option)));
68
+ const indicatorDuration = computed(() => Math.max(0, Math.round(props.indicatorDuration)));
69
+ const rootClassName = computed(() => grSegmentedRootClass({
70
+ variant: props.variant,
71
+ block: props.block,
72
+ disabled: props.disabled
73
+ }));
74
+ const rootStyle = computed(() => ({
75
+ ...grSegmentedRootStyle({
76
+ variant: props.variant,
77
+ size: props.size
78
+ }),
79
+ gridTemplateColumns: props.options.length > 0 ? props.options.map(() => props.block ? "minmax(0,1fr)" : "minmax(0,max-content)").join(" ") : "none"
80
+ }));
81
+ const indicatorClassName = computed(() => grSegmentedIndicatorClass(props.variant));
82
+ const resolvedName = computed(() => props.name ?? fallbackName);
83
+ const hasIndicator = computed(() => selectedIndex.value !== -1 && indicatorGeometry.value !== null);
84
+ const indicatorStyle = computed(() => {
85
+ const geometry = indicatorGeometry.value;
86
+ if (!geometry) return {
87
+ opacity: "0",
88
+ width: "0px",
89
+ height: "0px",
90
+ transitionDuration: `${indicatorDuration.value}ms`,
91
+ transform: "translate3d(0px, 0px, 0px)"
92
+ };
93
+ return {
94
+ opacity: indicatorReady.value ? "1" : "0",
95
+ width: `${geometry.width}px`,
96
+ height: `${geometry.height}px`,
97
+ transitionDuration: `${indicatorDuration.value}ms`,
98
+ transform: `translate3d(${geometry.x}px, ${geometry.y}px, 0)`
99
+ };
100
+ });
101
+ function getOptionKey(value) {
102
+ return String(value);
103
+ }
104
+ function resolveOptionDisabled(option) {
105
+ return props.disabled || Boolean(option.disabled);
106
+ }
107
+ function isOptionSelected(option) {
108
+ return option.value === props.modelValue;
109
+ }
110
+ function isIconOnlyOption(option) {
111
+ return Boolean(option.icon) && !option.label;
112
+ }
113
+ function isFocusableOption(option, index) {
114
+ if (resolveOptionDisabled(option)) return false;
115
+ if (isOptionSelected(option)) return true;
116
+ if (selectedIndex.value !== -1) return false;
117
+ return enabledOptions.value[0]?.value === props.options[index]?.value;
118
+ }
119
+ function setItemRef(value, element) {
120
+ const key = getOptionKey(value);
121
+ if (!(element instanceof HTMLElement)) {
122
+ itemRefs.value.delete(key);
123
+ return;
124
+ }
125
+ itemRefs.value.set(key, element);
126
+ }
127
+ function isSameGeometry(left, right) {
128
+ if (left === right) return true;
129
+ if (!left || !right) return false;
130
+ return left.width === right.width && left.height === right.height && left.x === right.x && left.y === right.y;
131
+ }
132
+ function measureIndicator() {
133
+ const root = rootRef.value;
134
+ const option = selectedOption.value;
135
+ if (!root || !option) {
136
+ if (indicatorGeometry.value !== null) indicatorGeometry.value = null;
137
+ if (indicatorReady.value) indicatorReady.value = false;
138
+ return;
139
+ }
140
+ const selectedItem = itemRefs.value.get(getOptionKey(option.value));
141
+ if (!selectedItem) return;
142
+ const rootRect = root.getBoundingClientRect();
143
+ const itemRect = selectedItem.getBoundingClientRect();
144
+ const nextGeometry = {
145
+ width: Math.max(Math.round(itemRect.width), 0),
146
+ height: Math.max(Math.round(itemRect.height), 0),
147
+ x: Math.round(itemRect.left - rootRect.left),
148
+ y: Math.max(Math.round(itemRect.top - rootRect.top) - 1, 0)
149
+ };
150
+ if (!isSameGeometry(indicatorGeometry.value, nextGeometry)) indicatorGeometry.value = nextGeometry;
151
+ const nextReady = nextGeometry.width > 0 && nextGeometry.height > 0;
152
+ if (indicatorReady.value !== nextReady) indicatorReady.value = nextReady;
153
+ }
154
+ function refreshObserver() {
155
+ if (typeof ResizeObserver === "undefined") return;
156
+ const root = rootRef.value;
157
+ const option = selectedOption.value;
158
+ const selectedItem = option ? itemRefs.value.get(getOptionKey(option.value)) ?? null : null;
159
+ if (!resizeObserver) resizeObserver = new ResizeObserver(() => scheduleMeasure());
160
+ if (!root) {
161
+ resizeObserver.disconnect();
162
+ observedRoot = null;
163
+ observedItem = null;
164
+ return;
165
+ }
166
+ if (observedRoot === root && observedItem === selectedItem) return;
167
+ resizeObserver.disconnect();
168
+ resizeObserver.observe(root);
169
+ if (selectedItem) resizeObserver.observe(selectedItem);
170
+ observedRoot = root;
171
+ observedItem = selectedItem;
172
+ }
173
+ function scheduleMeasure() {
174
+ if (scheduled) return;
175
+ scheduled = true;
176
+ nextTick(() => {
177
+ scheduled = false;
178
+ measureIndicator();
179
+ refreshObserver();
180
+ });
181
+ }
182
+ function emitValue(option) {
183
+ if (resolveOptionDisabled(option) || option.value === props.modelValue) return;
184
+ emit("update:modelValue", option.value);
185
+ emit("change", option.value, option);
186
+ }
187
+ function getNextEnabledIndex(startIndex, direction) {
188
+ if (props.options.length === 0) return -1;
189
+ let cursor = startIndex;
190
+ for (let step = 0; step < props.options.length; step += 1) {
191
+ cursor = (cursor + direction + props.options.length) % props.options.length;
192
+ const option = props.options[cursor];
193
+ if (option && !resolveOptionDisabled(option)) return cursor;
194
+ }
195
+ return -1;
196
+ }
197
+ function focusIndex(index) {
198
+ const option = props.options[index];
199
+ if (!option) return;
200
+ itemRefs.value.get(getOptionKey(option.value))?.focus();
201
+ }
202
+ function onKeydown(event, index) {
203
+ if (props.disabled) return;
204
+ if (event.key === "ArrowRight" || event.key === "ArrowDown") {
205
+ event.preventDefault();
206
+ const nextIndex = getNextEnabledIndex(index, 1);
207
+ if (nextIndex === -1) return;
208
+ const option = props.options[nextIndex];
209
+ if (option) {
210
+ emitValue(option);
211
+ focusIndex(nextIndex);
212
+ }
213
+ return;
214
+ }
215
+ if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
216
+ event.preventDefault();
217
+ const nextIndex = getNextEnabledIndex(index, -1);
218
+ if (nextIndex === -1) return;
219
+ const option = props.options[nextIndex];
220
+ if (option) {
221
+ emitValue(option);
222
+ focusIndex(nextIndex);
223
+ }
224
+ return;
225
+ }
226
+ if (event.key === "Home") {
227
+ event.preventDefault();
228
+ const firstOption = enabledOptions.value[0];
229
+ if (!firstOption) return;
230
+ emitValue(firstOption);
231
+ focusIndex(props.options.findIndex((option) => option.value === firstOption.value));
232
+ return;
233
+ }
234
+ if (event.key === "End") {
235
+ event.preventDefault();
236
+ const lastOption = enabledOptions.value.at(-1);
237
+ if (!lastOption) return;
238
+ emitValue(lastOption);
239
+ focusIndex(props.options.findIndex((option) => option.value === lastOption.value));
240
+ return;
241
+ }
242
+ if (event.key === " " || event.key === "Enter") {
243
+ event.preventDefault();
244
+ const option = props.options[index];
245
+ if (option) emitValue(option);
246
+ }
247
+ }
248
+ watch(() => props.modelValue, () => scheduleMeasure());
249
+ watch(() => props.options, () => scheduleMeasure(), { deep: true });
250
+ watch(() => props.variant, () => scheduleMeasure());
251
+ watch(() => props.size, () => scheduleMeasure());
252
+ watch(() => props.block, () => scheduleMeasure());
253
+ onMounted(() => scheduleMeasure());
254
+ onBeforeUnmount(() => {
255
+ resizeObserver?.disconnect();
256
+ observedRoot = null;
257
+ observedItem = null;
258
+ });
259
+ return (_ctx, _cache) => {
260
+ return openBlock(), createElementBlock("div", {
261
+ ref_key: "rootRef",
262
+ ref: rootRef,
263
+ "data-ds-segmented": "",
264
+ "data-variant": __props.variant,
265
+ role: "radiogroup",
266
+ "aria-label": __props.ariaLabel,
267
+ "aria-disabled": __props.disabled ? "true" : void 0,
268
+ class: normalizeClass(rootClassName.value),
269
+ style: normalizeStyle(rootStyle.value)
270
+ }, [hasIndicator.value ? (openBlock(), createElementBlock("span", {
271
+ key: 0,
272
+ "data-ds-segmented-indicator": "",
273
+ "aria-hidden": "true",
274
+ class: normalizeClass(indicatorClassName.value),
275
+ style: normalizeStyle(indicatorStyle.value)
276
+ }, null, 6)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
277
+ return openBlock(), createElementBlock("button", {
278
+ key: option.value,
279
+ ref_for: true,
280
+ ref: (element) => setItemRef(option.value, element),
281
+ "data-ds-segmented-item": "",
282
+ "data-value": String(option.value),
283
+ type: "button",
284
+ role: "radio",
285
+ "aria-checked": isOptionSelected(option) ? "true" : "false",
286
+ "aria-disabled": resolveOptionDisabled(option) ? "true" : void 0,
287
+ disabled: resolveOptionDisabled(option),
288
+ tabindex: isFocusableOption(option, index) ? 0 : -1,
289
+ class: normalizeClass(unref(grSegmentedItemClass)({
290
+ variant: __props.variant,
291
+ selected: isOptionSelected(option),
292
+ disabled: resolveOptionDisabled(option),
293
+ iconOnly: isIconOnlyOption(option)
294
+ })),
295
+ onClick: ($event) => emitValue(option),
296
+ onKeydown: ($event) => onKeydown($event, index)
297
+ }, [createElementVNode("input", {
298
+ type: "radio",
299
+ tabindex: "-1",
300
+ "aria-hidden": "true",
301
+ name: resolvedName.value,
302
+ value: option.value,
303
+ checked: isOptionSelected(option),
304
+ disabled: resolveOptionDisabled(option),
305
+ style: hiddenInputStyle
306
+ }, null, 8, _hoisted_3), renderSlot(_ctx.$slots, "default", {
307
+ option,
308
+ selected: isOptionSelected(option),
309
+ disabled: resolveOptionDisabled(option)
310
+ }, () => [option.icon ? (openBlock(), createBlock(resolveDynamicComponent(option.icon), {
311
+ key: 0,
312
+ "aria-hidden": "true",
313
+ class: normalizeClass(unref(grSegmentedItemIconClass))
314
+ }, null, 8, ["class"])) : createCommentVNode("", true), option.label ? (openBlock(), createElementBlock("span", {
315
+ key: 1,
316
+ class: normalizeClass(unref(grSegmentedItemLabelClass))
317
+ }, toDisplayString(option.label), 3)) : createCommentVNode("", true)])], 42, _hoisted_2);
318
+ }), 128))], 14, _hoisted_1);
319
+ };
320
+ }
321
+ });
322
+ //#endregion
323
+ export { GrSegmented_default as t };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GrSegmented-Bwn2qOY4.js","names":[],"sources":["../../../../src/components/GrSegmented/GrSegmented.vue","../../../../src/components/GrSegmented/GrSegmented.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, getCurrentInstance, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport type { ComponentPublicInstance } from 'vue'\n\nimport {\n grSegmentedIndicatorClass,\n grSegmentedItemClass,\n grSegmentedItemIconClass,\n grSegmentedItemLabelClass,\n grSegmentedRootClass,\n grSegmentedRootStyle,\n type GrSegmentedOption,\n type GrSegmentedSize,\n type GrSegmentedValue,\n type GrSegmentedVariant,\n} from './grSegmentedStyles'\n\nconst hiddenInputStyle = {\n position: 'absolute',\n opacity: '0',\n width: '0',\n height: '0',\n pointerEvents: 'none',\n} as const\n\ntype IndicatorGeometry = {\n width: number\n height: number\n x: number\n y: number\n}\n\n/**\n * Пропсы публичного DS-примитива «Segmented».\n */\nexport interface GrSegmentedProps {\n modelValue: GrSegmentedValue\n options: GrSegmentedOption[]\n variant?: GrSegmentedVariant\n size?: GrSegmentedSize\n /** Длительность анимации индикатора в мс. */\n indicatorDuration?: number\n /** Растягивать сегмент на всю ширину контейнера. */\n block?: boolean\n disabled?: boolean\n /** Имя скрытых radio-inputs для интеграции с нативной формой. */\n name?: string\n ariaLabel?: string\n}\n\nconst props = withDefaults(\n defineProps<GrSegmentedProps>(),\n {\n variant: 'pills',\n size: 'md',\n indicatorDuration: 300,\n block: false,\n disabled: false,\n name: undefined,\n ariaLabel: undefined,\n },\n)\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', value: GrSegmentedValue): void\n (event: 'change', value: GrSegmentedValue, option: GrSegmentedOption): void\n}>()\n\nconst instance = getCurrentInstance()\nconst fallbackName = `ds-segmented-${instance?.uid ?? Math.random()}`\n\nconst rootRef = ref<HTMLElement | null>(null)\nconst itemRefs = ref(new Map<string, HTMLElement>())\nconst indicatorGeometry = ref<IndicatorGeometry | null>(null)\nconst indicatorReady = ref(false)\n\nlet resizeObserver: ResizeObserver | null = null\nlet observedRoot: HTMLElement | null = null\nlet observedItem: HTMLElement | null = null\nlet scheduled = false\n\nconst selectedIndex = computed(() => props.options.findIndex(option => option.value === props.modelValue))\nconst selectedOption = computed(() => props.options[selectedIndex.value] ?? null)\nconst enabledOptions = computed(() => props.options.filter(option => !resolveOptionDisabled(option)))\nconst indicatorDuration = computed(() => Math.max(0, Math.round(props.indicatorDuration)))\nconst rootClassName = computed(() => grSegmentedRootClass({\n variant: props.variant,\n block: props.block,\n disabled: props.disabled,\n}))\nconst rootStyle = computed<Record<string, string>>(() => ({\n ...grSegmentedRootStyle({\n variant: props.variant,\n size: props.size,\n }),\n gridTemplateColumns: props.options.length > 0\n ? props.options.map(() => props.block ? 'minmax(0,1fr)' : 'minmax(0,max-content)').join(' ')\n : 'none',\n}))\nconst indicatorClassName = computed(() => grSegmentedIndicatorClass(props.variant))\nconst resolvedName = computed(() => props.name ?? fallbackName)\nconst hasIndicator = computed(() => selectedIndex.value !== -1 && indicatorGeometry.value !== null)\n\nconst indicatorStyle = computed<Record<string, string>>(() => {\n const geometry = indicatorGeometry.value\n if (!geometry) {\n return {\n opacity: '0',\n width: '0px',\n height: '0px',\n transitionDuration: `${indicatorDuration.value}ms`,\n transform: 'translate3d(0px, 0px, 0px)',\n }\n }\n\n return {\n opacity: indicatorReady.value ? '1' : '0',\n width: `${geometry.width}px`,\n height: `${geometry.height}px`,\n transitionDuration: `${indicatorDuration.value}ms`,\n transform: `translate3d(${geometry.x}px, ${geometry.y}px, 0)`,\n }\n})\n\nfunction getOptionKey(value: GrSegmentedValue): string {\n return String(value)\n}\n\nfunction resolveOptionDisabled(option: GrSegmentedOption): boolean {\n return props.disabled || Boolean(option.disabled)\n}\n\nfunction isOptionSelected(option: GrSegmentedOption): boolean {\n return option.value === props.modelValue\n}\n\nfunction isIconOnlyOption(option: GrSegmentedOption): boolean {\n return Boolean(option.icon) && !option.label\n}\n\nfunction isFocusableOption(option: GrSegmentedOption, index: number): boolean {\n if (resolveOptionDisabled(option)) {\n return false\n }\n\n if (isOptionSelected(option)) {\n return true\n }\n\n if (selectedIndex.value !== -1) {\n return false\n }\n\n return enabledOptions.value[0]?.value === props.options[index]?.value\n}\n\nfunction setItemRef(value: GrSegmentedValue, element: Element | ComponentPublicInstance | null): void {\n const key = getOptionKey(value)\n\n if (!(element instanceof HTMLElement)) {\n itemRefs.value.delete(key)\n return\n }\n\n itemRefs.value.set(key, element)\n}\n\nfunction isSameGeometry(left: IndicatorGeometry | null, right: IndicatorGeometry | null): boolean {\n if (left === right) {\n return true\n }\n\n if (!left || !right) {\n return false\n }\n\n return left.width === right.width\n && left.height === right.height\n && left.x === right.x\n && left.y === right.y\n}\n\nfunction measureIndicator(): void {\n const root = rootRef.value\n const option = selectedOption.value\n if (!root || !option) {\n if (indicatorGeometry.value !== null)\n indicatorGeometry.value = null\n\n if (indicatorReady.value)\n indicatorReady.value = false\n\n return\n }\n\n const selectedItem = itemRefs.value.get(getOptionKey(option.value))\n if (!selectedItem) {\n return\n }\n\n const rootRect = root.getBoundingClientRect()\n const itemRect = selectedItem.getBoundingClientRect()\n\n const nextGeometry = {\n width: Math.max(Math.round(itemRect.width), 0),\n height: Math.max(Math.round(itemRect.height), 0),\n x: Math.round(itemRect.left - rootRect.left),\n y: Math.max(Math.round(itemRect.top - rootRect.top) - 1, 0),\n } satisfies IndicatorGeometry\n\n if (!isSameGeometry(indicatorGeometry.value, nextGeometry)) {\n indicatorGeometry.value = nextGeometry\n }\n\n const nextReady = nextGeometry.width > 0 && nextGeometry.height > 0\n if (indicatorReady.value !== nextReady) {\n indicatorReady.value = nextReady\n }\n}\n\nfunction refreshObserver(): void {\n if (typeof ResizeObserver === 'undefined') {\n return\n }\n\n const root = rootRef.value\n const option = selectedOption.value\n const selectedItem = option\n ? itemRefs.value.get(getOptionKey(option.value)) ?? null\n : null\n\n if (!resizeObserver) {\n resizeObserver = new ResizeObserver(() => scheduleMeasure())\n }\n\n if (!root) {\n resizeObserver.disconnect()\n observedRoot = null\n observedItem = null\n return\n }\n\n if (observedRoot === root && observedItem === selectedItem) {\n return\n }\n\n resizeObserver.disconnect()\n resizeObserver.observe(root)\n\n if (selectedItem) {\n resizeObserver.observe(selectedItem)\n }\n\n observedRoot = root\n observedItem = selectedItem\n}\n\nfunction scheduleMeasure(): void {\n if (scheduled) {\n return\n }\n\n scheduled = true\n void nextTick(() => {\n scheduled = false\n measureIndicator()\n refreshObserver()\n })\n}\n\nfunction emitValue(option: GrSegmentedOption): void {\n if (resolveOptionDisabled(option) || option.value === props.modelValue) {\n return\n }\n\n emit('update:modelValue', option.value)\n emit('change', option.value, option)\n}\n\nfunction getNextEnabledIndex(startIndex: number, direction: 1 | -1): number {\n if (props.options.length === 0) {\n return -1\n }\n\n let cursor = startIndex\n for (let step = 0; step < props.options.length; step += 1) {\n cursor = (cursor + direction + props.options.length) % props.options.length\n const option = props.options[cursor]\n if (option && !resolveOptionDisabled(option)) {\n return cursor\n }\n }\n\n return -1\n}\n\nfunction focusIndex(index: number): void {\n const option = props.options[index]\n if (!option) {\n return\n }\n\n itemRefs.value.get(getOptionKey(option.value))?.focus()\n}\n\nfunction onKeydown(event: KeyboardEvent, index: number): void {\n if (props.disabled) {\n return\n }\n\n if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {\n event.preventDefault()\n const nextIndex = getNextEnabledIndex(index, 1)\n if (nextIndex === -1) {\n return\n }\n\n const option = props.options[nextIndex]\n if (option) {\n emitValue(option)\n focusIndex(nextIndex)\n }\n return\n }\n\n if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {\n event.preventDefault()\n const nextIndex = getNextEnabledIndex(index, -1)\n if (nextIndex === -1) {\n return\n }\n\n const option = props.options[nextIndex]\n if (option) {\n emitValue(option)\n focusIndex(nextIndex)\n }\n return\n }\n\n if (event.key === 'Home') {\n event.preventDefault()\n const firstOption = enabledOptions.value[0]\n if (!firstOption) {\n return\n }\n\n emitValue(firstOption)\n focusIndex(props.options.findIndex(option => option.value === firstOption.value))\n return\n }\n\n if (event.key === 'End') {\n event.preventDefault()\n const lastOption = enabledOptions.value.at(-1)\n if (!lastOption) {\n return\n }\n\n emitValue(lastOption)\n focusIndex(props.options.findIndex(option => option.value === lastOption.value))\n return\n }\n\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault()\n const option = props.options[index]\n if (option) {\n emitValue(option)\n }\n }\n}\n\nwatch(() => props.modelValue, () => scheduleMeasure())\nwatch(() => props.options, () => scheduleMeasure(), { deep: true })\nwatch(() => props.variant, () => scheduleMeasure())\nwatch(() => props.size, () => scheduleMeasure())\nwatch(() => props.block, () => scheduleMeasure())\n\nonMounted(() => scheduleMeasure())\nonBeforeUnmount(() => {\n resizeObserver?.disconnect()\n observedRoot = null\n observedItem = null\n})\n</script>\n\n<template>\n <div\n ref=\"rootRef\"\n data-ds-segmented\n :data-variant=\"variant\"\n role=\"radiogroup\"\n :aria-label=\"ariaLabel\"\n :aria-disabled=\"disabled ? 'true' : undefined\"\n :class=\"rootClassName\"\n :style=\"rootStyle\"\n >\n <span\n v-if=\"hasIndicator\"\n data-ds-segmented-indicator\n aria-hidden=\"true\"\n :class=\"indicatorClassName\"\n :style=\"indicatorStyle\"\n />\n\n <button\n v-for=\"(option, index) in options\"\n :key=\"option.value\"\n :ref=\"element => setItemRef(option.value, element)\"\n data-ds-segmented-item\n :data-value=\"String(option.value)\"\n type=\"button\"\n role=\"radio\"\n :aria-checked=\"isOptionSelected(option) ? 'true' : 'false'\"\n :aria-disabled=\"resolveOptionDisabled(option) ? 'true' : undefined\"\n :disabled=\"resolveOptionDisabled(option)\"\n :tabindex=\"isFocusableOption(option, index) ? 0 : -1\"\n :class=\"grSegmentedItemClass({\n variant,\n selected: isOptionSelected(option),\n disabled: resolveOptionDisabled(option),\n iconOnly: isIconOnlyOption(option),\n })\"\n @click=\"emitValue(option)\"\n @keydown=\"onKeydown($event, index)\"\n >\n <input\n type=\"radio\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n :name=\"resolvedName\"\n :value=\"option.value\"\n :checked=\"isOptionSelected(option)\"\n :disabled=\"resolveOptionDisabled(option)\"\n :style=\"hiddenInputStyle\"\n >\n\n <slot\n :option=\"option\"\n :selected=\"isOptionSelected(option)\"\n :disabled=\"resolveOptionDisabled(option)\"\n >\n <component\n :is=\"option.icon\"\n v-if=\"option.icon\"\n aria-hidden=\"true\"\n :class=\"grSegmentedItemIconClass\"\n />\n <span v-if=\"option.label\" :class=\"grSegmentedItemLabelClass\">\n {{ option.label }}\n </span>\n </slot>\n </button>\n </div>\n</template>","<script setup lang=\"ts\">\nimport { computed, getCurrentInstance, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport type { ComponentPublicInstance } from 'vue'\n\nimport {\n grSegmentedIndicatorClass,\n grSegmentedItemClass,\n grSegmentedItemIconClass,\n grSegmentedItemLabelClass,\n grSegmentedRootClass,\n grSegmentedRootStyle,\n type GrSegmentedOption,\n type GrSegmentedSize,\n type GrSegmentedValue,\n type GrSegmentedVariant,\n} from './grSegmentedStyles'\n\nconst hiddenInputStyle = {\n position: 'absolute',\n opacity: '0',\n width: '0',\n height: '0',\n pointerEvents: 'none',\n} as const\n\ntype IndicatorGeometry = {\n width: number\n height: number\n x: number\n y: number\n}\n\n/**\n * Пропсы публичного DS-примитива «Segmented».\n */\nexport interface GrSegmentedProps {\n modelValue: GrSegmentedValue\n options: GrSegmentedOption[]\n variant?: GrSegmentedVariant\n size?: GrSegmentedSize\n /** Длительность анимации индикатора в мс. */\n indicatorDuration?: number\n /** Растягивать сегмент на всю ширину контейнера. */\n block?: boolean\n disabled?: boolean\n /** Имя скрытых radio-inputs для интеграции с нативной формой. */\n name?: string\n ariaLabel?: string\n}\n\nconst props = withDefaults(\n defineProps<GrSegmentedProps>(),\n {\n variant: 'pills',\n size: 'md',\n indicatorDuration: 300,\n block: false,\n disabled: false,\n name: undefined,\n ariaLabel: undefined,\n },\n)\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', value: GrSegmentedValue): void\n (event: 'change', value: GrSegmentedValue, option: GrSegmentedOption): void\n}>()\n\nconst instance = getCurrentInstance()\nconst fallbackName = `ds-segmented-${instance?.uid ?? Math.random()}`\n\nconst rootRef = ref<HTMLElement | null>(null)\nconst itemRefs = ref(new Map<string, HTMLElement>())\nconst indicatorGeometry = ref<IndicatorGeometry | null>(null)\nconst indicatorReady = ref(false)\n\nlet resizeObserver: ResizeObserver | null = null\nlet observedRoot: HTMLElement | null = null\nlet observedItem: HTMLElement | null = null\nlet scheduled = false\n\nconst selectedIndex = computed(() => props.options.findIndex(option => option.value === props.modelValue))\nconst selectedOption = computed(() => props.options[selectedIndex.value] ?? null)\nconst enabledOptions = computed(() => props.options.filter(option => !resolveOptionDisabled(option)))\nconst indicatorDuration = computed(() => Math.max(0, Math.round(props.indicatorDuration)))\nconst rootClassName = computed(() => grSegmentedRootClass({\n variant: props.variant,\n block: props.block,\n disabled: props.disabled,\n}))\nconst rootStyle = computed<Record<string, string>>(() => ({\n ...grSegmentedRootStyle({\n variant: props.variant,\n size: props.size,\n }),\n gridTemplateColumns: props.options.length > 0\n ? props.options.map(() => props.block ? 'minmax(0,1fr)' : 'minmax(0,max-content)').join(' ')\n : 'none',\n}))\nconst indicatorClassName = computed(() => grSegmentedIndicatorClass(props.variant))\nconst resolvedName = computed(() => props.name ?? fallbackName)\nconst hasIndicator = computed(() => selectedIndex.value !== -1 && indicatorGeometry.value !== null)\n\nconst indicatorStyle = computed<Record<string, string>>(() => {\n const geometry = indicatorGeometry.value\n if (!geometry) {\n return {\n opacity: '0',\n width: '0px',\n height: '0px',\n transitionDuration: `${indicatorDuration.value}ms`,\n transform: 'translate3d(0px, 0px, 0px)',\n }\n }\n\n return {\n opacity: indicatorReady.value ? '1' : '0',\n width: `${geometry.width}px`,\n height: `${geometry.height}px`,\n transitionDuration: `${indicatorDuration.value}ms`,\n transform: `translate3d(${geometry.x}px, ${geometry.y}px, 0)`,\n }\n})\n\nfunction getOptionKey(value: GrSegmentedValue): string {\n return String(value)\n}\n\nfunction resolveOptionDisabled(option: GrSegmentedOption): boolean {\n return props.disabled || Boolean(option.disabled)\n}\n\nfunction isOptionSelected(option: GrSegmentedOption): boolean {\n return option.value === props.modelValue\n}\n\nfunction isIconOnlyOption(option: GrSegmentedOption): boolean {\n return Boolean(option.icon) && !option.label\n}\n\nfunction isFocusableOption(option: GrSegmentedOption, index: number): boolean {\n if (resolveOptionDisabled(option)) {\n return false\n }\n\n if (isOptionSelected(option)) {\n return true\n }\n\n if (selectedIndex.value !== -1) {\n return false\n }\n\n return enabledOptions.value[0]?.value === props.options[index]?.value\n}\n\nfunction setItemRef(value: GrSegmentedValue, element: Element | ComponentPublicInstance | null): void {\n const key = getOptionKey(value)\n\n if (!(element instanceof HTMLElement)) {\n itemRefs.value.delete(key)\n return\n }\n\n itemRefs.value.set(key, element)\n}\n\nfunction isSameGeometry(left: IndicatorGeometry | null, right: IndicatorGeometry | null): boolean {\n if (left === right) {\n return true\n }\n\n if (!left || !right) {\n return false\n }\n\n return left.width === right.width\n && left.height === right.height\n && left.x === right.x\n && left.y === right.y\n}\n\nfunction measureIndicator(): void {\n const root = rootRef.value\n const option = selectedOption.value\n if (!root || !option) {\n if (indicatorGeometry.value !== null)\n indicatorGeometry.value = null\n\n if (indicatorReady.value)\n indicatorReady.value = false\n\n return\n }\n\n const selectedItem = itemRefs.value.get(getOptionKey(option.value))\n if (!selectedItem) {\n return\n }\n\n const rootRect = root.getBoundingClientRect()\n const itemRect = selectedItem.getBoundingClientRect()\n\n const nextGeometry = {\n width: Math.max(Math.round(itemRect.width), 0),\n height: Math.max(Math.round(itemRect.height), 0),\n x: Math.round(itemRect.left - rootRect.left),\n y: Math.max(Math.round(itemRect.top - rootRect.top) - 1, 0),\n } satisfies IndicatorGeometry\n\n if (!isSameGeometry(indicatorGeometry.value, nextGeometry)) {\n indicatorGeometry.value = nextGeometry\n }\n\n const nextReady = nextGeometry.width > 0 && nextGeometry.height > 0\n if (indicatorReady.value !== nextReady) {\n indicatorReady.value = nextReady\n }\n}\n\nfunction refreshObserver(): void {\n if (typeof ResizeObserver === 'undefined') {\n return\n }\n\n const root = rootRef.value\n const option = selectedOption.value\n const selectedItem = option\n ? itemRefs.value.get(getOptionKey(option.value)) ?? null\n : null\n\n if (!resizeObserver) {\n resizeObserver = new ResizeObserver(() => scheduleMeasure())\n }\n\n if (!root) {\n resizeObserver.disconnect()\n observedRoot = null\n observedItem = null\n return\n }\n\n if (observedRoot === root && observedItem === selectedItem) {\n return\n }\n\n resizeObserver.disconnect()\n resizeObserver.observe(root)\n\n if (selectedItem) {\n resizeObserver.observe(selectedItem)\n }\n\n observedRoot = root\n observedItem = selectedItem\n}\n\nfunction scheduleMeasure(): void {\n if (scheduled) {\n return\n }\n\n scheduled = true\n void nextTick(() => {\n scheduled = false\n measureIndicator()\n refreshObserver()\n })\n}\n\nfunction emitValue(option: GrSegmentedOption): void {\n if (resolveOptionDisabled(option) || option.value === props.modelValue) {\n return\n }\n\n emit('update:modelValue', option.value)\n emit('change', option.value, option)\n}\n\nfunction getNextEnabledIndex(startIndex: number, direction: 1 | -1): number {\n if (props.options.length === 0) {\n return -1\n }\n\n let cursor = startIndex\n for (let step = 0; step < props.options.length; step += 1) {\n cursor = (cursor + direction + props.options.length) % props.options.length\n const option = props.options[cursor]\n if (option && !resolveOptionDisabled(option)) {\n return cursor\n }\n }\n\n return -1\n}\n\nfunction focusIndex(index: number): void {\n const option = props.options[index]\n if (!option) {\n return\n }\n\n itemRefs.value.get(getOptionKey(option.value))?.focus()\n}\n\nfunction onKeydown(event: KeyboardEvent, index: number): void {\n if (props.disabled) {\n return\n }\n\n if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {\n event.preventDefault()\n const nextIndex = getNextEnabledIndex(index, 1)\n if (nextIndex === -1) {\n return\n }\n\n const option = props.options[nextIndex]\n if (option) {\n emitValue(option)\n focusIndex(nextIndex)\n }\n return\n }\n\n if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {\n event.preventDefault()\n const nextIndex = getNextEnabledIndex(index, -1)\n if (nextIndex === -1) {\n return\n }\n\n const option = props.options[nextIndex]\n if (option) {\n emitValue(option)\n focusIndex(nextIndex)\n }\n return\n }\n\n if (event.key === 'Home') {\n event.preventDefault()\n const firstOption = enabledOptions.value[0]\n if (!firstOption) {\n return\n }\n\n emitValue(firstOption)\n focusIndex(props.options.findIndex(option => option.value === firstOption.value))\n return\n }\n\n if (event.key === 'End') {\n event.preventDefault()\n const lastOption = enabledOptions.value.at(-1)\n if (!lastOption) {\n return\n }\n\n emitValue(lastOption)\n focusIndex(props.options.findIndex(option => option.value === lastOption.value))\n return\n }\n\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault()\n const option = props.options[index]\n if (option) {\n emitValue(option)\n }\n }\n}\n\nwatch(() => props.modelValue, () => scheduleMeasure())\nwatch(() => props.options, () => scheduleMeasure(), { deep: true })\nwatch(() => props.variant, () => scheduleMeasure())\nwatch(() => props.size, () => scheduleMeasure())\nwatch(() => props.block, () => scheduleMeasure())\n\nonMounted(() => scheduleMeasure())\nonBeforeUnmount(() => {\n resizeObserver?.disconnect()\n observedRoot = null\n observedItem = null\n})\n</script>\n\n<template>\n <div\n ref=\"rootRef\"\n data-ds-segmented\n :data-variant=\"variant\"\n role=\"radiogroup\"\n :aria-label=\"ariaLabel\"\n :aria-disabled=\"disabled ? 'true' : undefined\"\n :class=\"rootClassName\"\n :style=\"rootStyle\"\n >\n <span\n v-if=\"hasIndicator\"\n data-ds-segmented-indicator\n aria-hidden=\"true\"\n :class=\"indicatorClassName\"\n :style=\"indicatorStyle\"\n />\n\n <button\n v-for=\"(option, index) in options\"\n :key=\"option.value\"\n :ref=\"element => setItemRef(option.value, element)\"\n data-ds-segmented-item\n :data-value=\"String(option.value)\"\n type=\"button\"\n role=\"radio\"\n :aria-checked=\"isOptionSelected(option) ? 'true' : 'false'\"\n :aria-disabled=\"resolveOptionDisabled(option) ? 'true' : undefined\"\n :disabled=\"resolveOptionDisabled(option)\"\n :tabindex=\"isFocusableOption(option, index) ? 0 : -1\"\n :class=\"grSegmentedItemClass({\n variant,\n selected: isOptionSelected(option),\n disabled: resolveOptionDisabled(option),\n iconOnly: isIconOnlyOption(option),\n })\"\n @click=\"emitValue(option)\"\n @keydown=\"onKeydown($event, index)\"\n >\n <input\n type=\"radio\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n :name=\"resolvedName\"\n :value=\"option.value\"\n :checked=\"isOptionSelected(option)\"\n :disabled=\"resolveOptionDisabled(option)\"\n :style=\"hiddenInputStyle\"\n >\n\n <slot\n :option=\"option\"\n :selected=\"isOptionSelected(option)\"\n :disabled=\"resolveOptionDisabled(option)\"\n >\n <component\n :is=\"option.icon\"\n v-if=\"option.icon\"\n aria-hidden=\"true\"\n :class=\"grSegmentedItemIconClass\"\n />\n <span v-if=\"option.label\" :class=\"grSegmentedItemLabelClass\">\n {{ option.label }}\n </span>\n </slot>\n </button>\n </div>\n</template>"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,mBAAmB;GACvB,UAAU;GACV,SAAS;GACT,OAAO;GACP,QAAQ;GACR,eAAe;GAChB;EA2BD,MAAM,QAAQ;EAad,MAAM,OAAO;EAMb,MAAM,eAAe,gBADJ,oBAAmB,EACW,OAAO,KAAK,QAAQ;EAEnE,MAAM,UAAU,IAAwB,KAAI;EAC5C,MAAM,WAAW,oBAAI,IAAI,KAA0B,CAAA;EACnD,MAAM,oBAAoB,IAA8B,KAAI;EAC5D,MAAM,iBAAiB,IAAI,MAAK;EAEhC,IAAI,iBAAwC;EAC5C,IAAI,eAAmC;EACvC,IAAI,eAAmC;EACvC,IAAI,YAAY;EAEhB,MAAM,gBAAgB,eAAe,MAAM,QAAQ,WAAU,WAAU,OAAO,UAAU,MAAM,WAAW,CAAA;EACzG,MAAM,iBAAiB,eAAe,MAAM,QAAQ,cAAc,UAAU,KAAI;EAChF,MAAM,iBAAiB,eAAe,MAAM,QAAQ,QAAO,WAAU,CAAC,sBAAsB,OAAO,CAAC,CAAA;EACpG,MAAM,oBAAoB,eAAe,KAAK,IAAI,GAAG,KAAK,MAAM,MAAM,kBAAkB,CAAC,CAAA;EACzF,MAAM,gBAAgB,eAAe,qBAAqB;GACxD,SAAS,MAAM;GACf,OAAO,MAAM;GACb,UAAU,MAAM;GACjB,CAAC,CAAA;EACF,MAAM,YAAY,gBAAwC;GACxD,GAAG,qBAAqB;IACtB,SAAS,MAAM;IACf,M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AAwB,CAAA;4DAEtB,OAAO,SAAA,WAAA,EAAnB,mBAEO,QAAA;;KAFoB,OAAK,eAAE,MAAA,0BAAyB,CAAA;uBACtD,OAAO,MAAK,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA,CAAA,EAAA,IAAA,WAAA"}
@@ -1,3 +1,3 @@
1
- import { n as e, t } from "../../chunks/config-CJeG727i.js";
2
- import { t as n } from "./chunks/GrSegmented-CK5C_lN7.js";
3
- export { n as GrSegmented, n as default, t as grSegmentedConfig, e as grSegmentedSafelist };
1
+ import { n as grSegmentedSafelist, t as grSegmentedConfig } from "../../chunks/config-CUgvsjZx.js";
2
+ import { t as GrSegmented_default } from "./chunks/GrSegmented-Bwn2qOY4.js";
3
+ export { GrSegmented_default as GrSegmented, GrSegmented_default as default, grSegmentedConfig, grSegmentedSafelist };