@feugene/granularity 0.49.0 → 0.50.0

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 (368) hide show
  1. package/README.md +3 -3
  2. package/dist/chunks/chevron-up-BhW6hi8L.js +23 -0
  3. package/dist/chunks/chevron-up-BhW6hi8L.js.map +1 -0
  4. package/dist/chunks/{config-E1cTyRVV.js → config-8n1VR0ju.js} +1 -1
  5. package/dist/chunks/{config-E1cTyRVV.js.map → config-8n1VR0ju.js.map} +1 -1
  6. package/dist/chunks/{config-DIDz_E5m.js → config-B34mkd53.js} +66 -1
  7. package/dist/chunks/config-B34mkd53.js.map +1 -0
  8. package/dist/chunks/{config-B5SBUa6u.js → config-B7qZqiUB.js} +28 -1
  9. package/dist/chunks/config-B7qZqiUB.js.map +1 -0
  10. package/dist/chunks/config-BBrPUEye.js +8 -0
  11. package/dist/chunks/config-BBrPUEye.js.map +1 -0
  12. package/dist/chunks/{config-CT4lP6S4.js → config-BOCzHqWh.js} +2 -2
  13. package/dist/chunks/{config-CT4lP6S4.js.map → config-BOCzHqWh.js.map} +1 -1
  14. package/dist/chunks/{config-iemgzS4x.js → config-BP1ktzwh.js} +2 -24
  15. package/dist/chunks/config-BP1ktzwh.js.map +1 -0
  16. package/dist/chunks/config-BTxmdRzT.js +28 -0
  17. package/dist/chunks/config-BTxmdRzT.js.map +1 -0
  18. package/dist/chunks/{config-CjWOTgLL.js → config-Bk52xd5l.js} +12 -5
  19. package/dist/chunks/config-Bk52xd5l.js.map +1 -0
  20. package/dist/chunks/{config-D3HOuHDe.js → config-C3SqBqSQ.js} +3 -1
  21. package/dist/chunks/config-C3SqBqSQ.js.map +1 -0
  22. package/dist/chunks/{config-2ZHRsdOc.js → config-C3uqd-sW.js} +1 -1
  23. package/dist/chunks/config-C3uqd-sW.js.map +1 -0
  24. package/dist/chunks/{config-BXRmsn3t.js → config-CPhcZzHi.js} +72 -10
  25. package/dist/chunks/config-CPhcZzHi.js.map +1 -0
  26. package/dist/chunks/config-CWtfxkM9.js.map +1 -1
  27. package/dist/chunks/{config--t2dxj0t.js → config-CmLTCmY9.js} +2 -2
  28. package/dist/chunks/{config--t2dxj0t.js.map → config-CmLTCmY9.js.map} +1 -1
  29. package/dist/chunks/{config-BAse0laT.js → config-CvtqB4ki.js} +8 -3
  30. package/dist/chunks/config-CvtqB4ki.js.map +1 -0
  31. package/dist/chunks/{config-BcXX7S7B.js → config-D-JgqV0J.js} +5 -1
  32. package/dist/chunks/{config-BcXX7S7B.js.map → config-D-JgqV0J.js.map} +1 -1
  33. package/dist/chunks/{config-BHLMTJaR.js → config-D1oVht-E.js} +8 -3
  34. package/dist/chunks/config-D1oVht-E.js.map +1 -0
  35. package/dist/chunks/{config-B42iJ48O.js → config-DG41PD9i.js} +13 -1
  36. package/dist/chunks/config-DG41PD9i.js.map +1 -0
  37. package/dist/chunks/{config-Bs1HwUcx.js → config-DPJ3jtiB.js} +12 -2
  38. package/dist/chunks/config-DPJ3jtiB.js.map +1 -0
  39. package/dist/chunks/{config-tNqtapcT.js → config-DpqjlCfB.js} +2 -2
  40. package/dist/chunks/{config-tNqtapcT.js.map → config-DpqjlCfB.js.map} +1 -1
  41. package/dist/chunks/{config-DNDgp9bB.js → config-DpzFoSIh.js} +64 -2
  42. package/dist/chunks/config-DpzFoSIh.js.map +1 -0
  43. package/dist/chunks/config-SPugeaHT.js +37 -0
  44. package/dist/chunks/config-SPugeaHT.js.map +1 -0
  45. package/dist/chunks/{en-CsQUoBS2.js → en-mIFywnV2.js} +22 -6
  46. package/dist/chunks/en-mIFywnV2.js.map +1 -0
  47. package/dist/chunks/{es-9nbkPvdA.js → es-CvthYwtB.js} +22 -6
  48. package/dist/chunks/es-CvthYwtB.js.map +1 -0
  49. package/dist/chunks/{es-DrUz5J6I.js → es-DlGd6Mrj.js} +3 -3
  50. package/dist/chunks/{es-DrUz5J6I.js.map → es-DlGd6Mrj.js.map} +1 -1
  51. package/dist/chunks/{generated-CxvC5O0V.js → generated-Cx4C7GRN.js} +84 -0
  52. package/dist/chunks/{generated-CxvC5O0V.js.map → generated-Cx4C7GRN.js.map} +1 -1
  53. package/dist/chunks/{grPopoverStyles-CYAeO3Ov.js → grPopoverStyles-CncEkiPu.js} +1 -1
  54. package/dist/chunks/{grPopoverStyles-CYAeO3Ov.js.map → grPopoverStyles-CncEkiPu.js.map} +1 -1
  55. package/dist/chunks/{grSelectStyles-D9EQ-pgK.js → grSelectStyles-Cam-IG9s.js} +3 -2
  56. package/dist/chunks/grSelectStyles-Cam-IG9s.js.map +1 -0
  57. package/dist/chunks/{grSliderStyles-kaz6VXZ3.js → grSliderStyles-CqzV0hll.js} +1 -1
  58. package/dist/chunks/grSliderStyles-CqzV0hll.js.map +1 -0
  59. package/dist/chunks/{config-CbEbLyDE.js → grSortableListStyles-CxieDmpe.js} +1 -27
  60. package/dist/chunks/grSortableListStyles-CxieDmpe.js.map +1 -0
  61. package/dist/chunks/grTableStyles-CPSxDTOW.js +66 -0
  62. package/dist/chunks/grTableStyles-CPSxDTOW.js.map +1 -0
  63. package/dist/chunks/{config-CMNfZO7S.js → grTabsStyles-DIz2VdIm.js} +1 -36
  64. package/dist/chunks/grTabsStyles-DIz2VdIm.js.map +1 -0
  65. package/dist/chunks/grTooltipStyles-CtbGEEGV.js +24 -0
  66. package/dist/chunks/grTooltipStyles-CtbGEEGV.js.map +1 -0
  67. package/dist/chunks/{granular-provider-B6xomapW.js → granular-provider-cv5vaM1a.js} +21 -19
  68. package/dist/chunks/granular-provider-cv5vaM1a.js.map +1 -0
  69. package/dist/chunks/hotkeySequence-BTHIM_5A.js +46 -0
  70. package/dist/chunks/hotkeySequence-BTHIM_5A.js.map +1 -0
  71. package/dist/chunks/{keyboard-DE2yhz_b.js → keyboard-BiFSgWLt.js} +70 -1
  72. package/dist/chunks/keyboard-BiFSgWLt.js.map +1 -0
  73. package/dist/chunks/optionPanel-DvY7Tv_4.js +182 -0
  74. package/dist/chunks/optionPanel-DvY7Tv_4.js.map +1 -0
  75. package/dist/chunks/overlayListPanel-D91jBCHU.js +21 -0
  76. package/dist/chunks/overlayListPanel-D91jBCHU.js.map +1 -0
  77. package/dist/chunks/{overlayStack-DH4Z7am1.js → overlayStack-DCkCgXZP.js} +1 -1
  78. package/dist/chunks/{overlayStack-DH4Z7am1.js.map → overlayStack-DCkCgXZP.js.map} +1 -1
  79. package/dist/chunks/{overlayPanelSurface-BKeMhRx4.js → overlayTransition-C0FDMx7Q.js} +24 -24
  80. package/dist/chunks/overlayTransition-C0FDMx7Q.js.map +1 -0
  81. package/dist/chunks/{ru-88i1WG0b.js → ru-CQKDR-kD.js} +22 -6
  82. package/dist/chunks/ru-CQKDR-kD.js.map +1 -0
  83. package/dist/chunks/{useMenuItemsFocus-B7Bl_aFA.js → useMenuItemsFocus-C031blYS.js} +1 -1
  84. package/dist/chunks/{useMenuItemsFocus-B7Bl_aFA.js.map → useMenuItemsFocus-C031blYS.js.map} +1 -1
  85. package/dist/chunks/{useModalOverlay-ACRkflzx.js → useModalOverlay-CKCQkGdB.js} +1 -1
  86. package/dist/chunks/{useModalOverlay-ACRkflzx.js.map → useModalOverlay-CKCQkGdB.js.map} +1 -1
  87. package/dist/components/GrAutocomplete/chunks/{GrAutocomplete-Chhw65pI.js → GrAutocomplete-Cyr1-ENw.js} +181 -123
  88. package/dist/components/GrAutocomplete/chunks/GrAutocomplete-Cyr1-ENw.js.map +1 -0
  89. package/dist/components/GrAutocomplete/index.js +2 -2
  90. package/dist/components/GrAutocomplete/styles.css +1 -1
  91. package/dist/components/GrCarousel/chunks/{GrCarousel-ByuughtI.js → GrCarousel-CBj-PEPB.js} +186 -37
  92. package/dist/components/GrCarousel/chunks/GrCarousel-CBj-PEPB.js.map +1 -0
  93. package/dist/components/GrCarousel/index.js +2 -2
  94. package/dist/components/GrCarousel/styles.css +1 -1
  95. package/dist/components/GrCheckbox/chunks/{GrCheckbox-Dp201frb.js → GrCheckbox-B4NJc7Ur.js} +2 -1
  96. package/dist/components/GrCheckbox/chunks/GrCheckbox-B4NJc7Ur.js.map +1 -0
  97. package/dist/components/GrCheckbox/index.js +1 -1
  98. package/dist/components/GrCheckboxGroup/chunks/{GrCheckboxGroup-IpqG5qwm.js → GrCheckboxGroup-qZHpNFCX.js} +1 -1
  99. package/dist/components/GrCheckboxGroup/chunks/{GrCheckboxGroup-IpqG5qwm.js.map → GrCheckboxGroup-qZHpNFCX.js.map} +1 -1
  100. package/dist/components/GrCheckboxGroup/index.js +1 -1
  101. package/dist/components/GrColorPicker/chunks/{GrColorPicker-BRM_4lyI.js → GrColorPicker-vGSgpUV9.js} +353 -38
  102. package/dist/components/GrColorPicker/chunks/GrColorPicker-vGSgpUV9.js.map +1 -0
  103. package/dist/components/GrColorPicker/index.js +2 -2
  104. package/dist/components/GrColorPicker/styles.css +1 -1
  105. package/dist/components/GrCommandPalette/chunks/{GrCommandPalette-BJHmkDQv.js → GrCommandPalette-CAHgj0Aa.js} +23 -7
  106. package/dist/components/GrCommandPalette/chunks/GrCommandPalette-CAHgj0Aa.js.map +1 -0
  107. package/dist/components/GrCommandPalette/index.js +1 -1
  108. package/dist/components/GrCommandPalette/styles.css +1 -1
  109. package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-BzUQwbec.js → GrConfirmDialog-dg021BMd.js} +1 -1
  110. package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-BzUQwbec.js.map → GrConfirmDialog-dg021BMd.js.map} +1 -1
  111. package/dist/components/GrConfirmDialog/index.js +1 -1
  112. package/dist/components/GrContextMenu/chunks/{GrContextMenu-RpxMHQXH.js → GrContextMenu-bQ1Vvy2c.js} +3 -3
  113. package/dist/components/GrContextMenu/chunks/{GrContextMenu-RpxMHQXH.js.map → GrContextMenu-bQ1Vvy2c.js.map} +1 -1
  114. package/dist/components/GrContextMenu/index.js +1 -1
  115. package/dist/components/GrDataTable/chunks/{GrDataTable-DQxYYgQk.js → GrDataTable-Bb2jWnRG.js} +576 -136
  116. package/dist/components/GrDataTable/chunks/GrDataTable-Bb2jWnRG.js.map +1 -0
  117. package/dist/components/GrDataTable/index.js +2 -2
  118. package/dist/components/GrDelta/chunks/{GrDelta-CgTvfoIN.js → GrDelta-BSv1KdMy.js} +0 -0
  119. package/dist/components/GrDelta/chunks/{GrDelta-CgTvfoIN.js.map → GrDelta-BSv1KdMy.js.map} +1 -1
  120. package/dist/components/GrDelta/index.js +2 -2
  121. package/dist/components/GrDialog/chunks/{GrDialog-DDz_OEhk.js → GrDialog-C9Zu72jB.js} +1 -1
  122. package/dist/components/GrDialog/chunks/{GrDialog-DDz_OEhk.js.map → GrDialog-C9Zu72jB.js.map} +1 -1
  123. package/dist/components/GrDialog/index.js +1 -1
  124. package/dist/components/GrDialogService/chunks/{GrDialogService-Dtq0ZCN5.js → GrDialogService-DLBifO61.js} +2 -2
  125. package/dist/components/GrDialogService/chunks/{GrDialogService-Dtq0ZCN5.js.map → GrDialogService-DLBifO61.js.map} +1 -1
  126. package/dist/components/GrDialogService/index.js +1 -1
  127. package/dist/components/GrDrawer/chunks/{GrDrawer-CNpSMuN-.js → GrDrawer-DOcRTE8G.js} +1 -1
  128. package/dist/components/GrDrawer/chunks/{GrDrawer-CNpSMuN-.js.map → GrDrawer-DOcRTE8G.js.map} +1 -1
  129. package/dist/components/GrDrawer/index.js +1 -1
  130. package/dist/components/GrDropdown/chunks/{GrDropdown-cLZuZMEY.js → GrDropdown-kxwmgfSe.js} +2 -2
  131. package/dist/components/GrDropdown/chunks/{GrDropdown-cLZuZMEY.js.map → GrDropdown-kxwmgfSe.js.map} +1 -1
  132. package/dist/components/GrDropdown/index.js +2 -2
  133. package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-Dxkz_ry4.js → GrDropdownMenu--VoK3VY0.js} +3 -34
  134. package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu--VoK3VY0.js.map +1 -0
  135. package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-CkM3BFPL.js +34 -0
  136. package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-CkM3BFPL.js.map +1 -0
  137. package/dist/components/GrDropdownMenu/index.js +2 -1
  138. package/dist/components/GrEmptyState/chunks/{GrEmptyState-BbvwE-E0.js → GrEmptyState-Bz6-_ED4.js} +42 -6
  139. package/dist/components/GrEmptyState/chunks/GrEmptyState-Bz6-_ED4.js.map +1 -0
  140. package/dist/components/GrEmptyState/index.js +1 -1
  141. package/dist/components/GrFileUpload/chunks/{GrFileUpload-BwMR71zN.js → GrFileUpload-Bgdfnkd8.js} +5 -2
  142. package/dist/components/GrFileUpload/chunks/GrFileUpload-Bgdfnkd8.js.map +1 -0
  143. package/dist/components/GrFileUpload/index.js +1 -1
  144. package/dist/components/GrFormFile/chunks/{GrFormFile-Dlxx-9zi.js → GrFormFile-Ctq1isz-.js} +78 -11
  145. package/dist/components/GrFormFile/chunks/GrFormFile-Ctq1isz-.js.map +1 -0
  146. package/dist/components/GrFormFile/index.js +2 -2
  147. package/dist/components/GrFormFile/styles.css +1 -1
  148. package/dist/components/GrImageViewer/chunks/{GrImageViewer-DK-iVHHC.js → GrImageViewer-Bnql_dNP.js} +1 -1
  149. package/dist/components/GrImageViewer/chunks/{GrImageViewer-DK-iVHHC.js.map → GrImageViewer-Bnql_dNP.js.map} +1 -1
  150. package/dist/components/GrImageViewer/index.js +1 -1
  151. package/dist/components/GrInput/chunks/{GrInput-DV4gMWPR.js → GrInput-CoaFLpaU.js} +43 -22
  152. package/dist/components/GrInput/chunks/GrInput-CoaFLpaU.js.map +1 -0
  153. package/dist/components/GrInput/index.js +1 -1
  154. package/dist/components/GrInputTag/chunks/{GrInputTag-qnRdAZnn.js → GrInputTag-BzzNRBe3.js} +245 -18
  155. package/dist/components/GrInputTag/chunks/GrInputTag-BzzNRBe3.js.map +1 -0
  156. package/dist/components/GrInputTag/index.js +2 -2
  157. package/dist/components/GrJsonViewer/chunks/{GrJsonViewer-D7CyWzhT.js → GrJsonViewer-B6ZJ3GFH.js} +2 -2
  158. package/dist/components/GrJsonViewer/chunks/{GrJsonViewer-D7CyWzhT.js.map → GrJsonViewer-B6ZJ3GFH.js.map} +1 -1
  159. package/dist/components/GrJsonViewer/index.js +1 -1
  160. package/dist/components/GrKbd/chunks/{GrKbd-BNMeoaLV.js → GrKbd-D2rHDkQv.js} +42 -37
  161. package/dist/components/GrKbd/chunks/GrKbd-D2rHDkQv.js.map +1 -0
  162. package/dist/components/GrKbd/index.js +1 -1
  163. package/dist/components/GrModal/chunks/{GrModal-Cm0mtSXk.js → GrModal-SHb1U2qx.js} +1 -1
  164. package/dist/components/GrModal/chunks/{GrModal-Cm0mtSXk.js.map → GrModal-SHb1U2qx.js.map} +1 -1
  165. package/dist/components/GrModal/index.js +1 -1
  166. package/dist/components/GrNavbar/chunks/{GrNavbar-BRGuksiy.js → GrNavbar-IEIHC5Vt.js} +10 -4
  167. package/dist/components/GrNavbar/chunks/GrNavbar-IEIHC5Vt.js.map +1 -0
  168. package/dist/components/GrNavbar/index.js +2 -2
  169. package/dist/components/GrNumberInput/chunks/{GrNumberInput-BI6-vkcs.js → GrNumberInput-CmnUDaKi.js} +2 -22
  170. package/dist/components/GrNumberInput/chunks/{GrNumberInput-BI6-vkcs.js.map → GrNumberInput-CmnUDaKi.js.map} +1 -1
  171. package/dist/components/GrNumberInput/index.js +1 -1
  172. package/dist/components/GrPagination/chunks/{GrPagination-CMrLPzvL.js → GrPagination-AMbn5D8I.js} +1 -1
  173. package/dist/components/GrPagination/chunks/{GrPagination-CMrLPzvL.js.map → GrPagination-AMbn5D8I.js.map} +1 -1
  174. package/dist/components/GrPagination/index.js +1 -1
  175. package/dist/components/GrPopover/chunks/{GrPopover-CcWvr1ZA.js → GrPopover-DjVxt8bf.js} +3 -3
  176. package/dist/components/GrPopover/chunks/{GrPopover-CcWvr1ZA.js.map → GrPopover-DjVxt8bf.js.map} +1 -1
  177. package/dist/components/GrPopover/index.js +2 -2
  178. package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-BEL-QgwE.js → GrPromptDialog-BhbIZP1f.js} +3 -3
  179. package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-BEL-QgwE.js.map → GrPromptDialog-BhbIZP1f.js.map} +1 -1
  180. package/dist/components/GrPromptDialog/index.js +1 -1
  181. package/dist/components/GrSelect/chunks/{GrSelect-DvSq-nV-.js → GrSelect-B-ykrHpL.js} +24 -180
  182. package/dist/components/GrSelect/chunks/GrSelect-B-ykrHpL.js.map +1 -0
  183. package/dist/components/GrSelect/index.js +2 -2
  184. package/dist/components/GrSelect/styles.css +1 -1
  185. package/dist/components/GrSidebar/chunks/GrSidebar-jVvoLGDO.js +543 -0
  186. package/dist/components/GrSidebar/chunks/GrSidebar-jVvoLGDO.js.map +1 -0
  187. package/dist/components/GrSidebar/index.js +2 -2
  188. package/dist/components/GrSlider/chunks/{GrSlider-CO8N9SF6.js → GrSlider-DF2Cq0rV.js} +29 -4
  189. package/dist/components/GrSlider/chunks/GrSlider-DF2Cq0rV.js.map +1 -0
  190. package/dist/components/GrSlider/index.js +2 -2
  191. package/dist/components/GrSortableList/chunks/{GrSortableList-NKriuGm_.js → GrSortableList-ChH9nQBv.js} +1 -1
  192. package/dist/components/GrSortableList/chunks/{GrSortableList-NKriuGm_.js.map → GrSortableList-ChH9nQBv.js.map} +1 -1
  193. package/dist/components/GrSortableList/index.js +2 -2
  194. package/dist/components/GrTabPanels/chunks/GrTabPanels-BDt5oVdd.js +30 -0
  195. package/dist/components/GrTabPanels/chunks/GrTabPanels-BDt5oVdd.js.map +1 -0
  196. package/dist/components/GrTabPanels/chunks/GrTabPanels-BJvAflnA.js +83 -0
  197. package/dist/components/GrTabPanels/chunks/GrTabPanels-BJvAflnA.js.map +1 -0
  198. package/dist/components/GrTabPanels/index.js +2 -1
  199. package/dist/components/GrTable/chunks/{GrTable-CKJ-HrsN.js → GrTable-BQitSDep.js} +52 -16
  200. package/dist/components/GrTable/chunks/GrTable-BQitSDep.js.map +1 -0
  201. package/dist/components/GrTable/index.js +2 -2
  202. package/dist/components/GrTabs/chunks/{GrTabs-s9RzC1WX.js → GrTabs-DVC6nfWB.js} +1 -1
  203. package/dist/components/GrTabs/chunks/{GrTabs-s9RzC1WX.js.map → GrTabs-DVC6nfWB.js.map} +1 -1
  204. package/dist/components/GrTabs/index.js +2 -2
  205. package/dist/components/GrTabsWithPanels/chunks/GrTabsWithPanels-BYtuzouj.js +98 -0
  206. package/dist/components/GrTabsWithPanels/chunks/GrTabsWithPanels-BYtuzouj.js.map +1 -0
  207. package/dist/components/GrTabsWithPanels/index.js +3 -0
  208. package/dist/components/GrTextarea/chunks/{GrTextarea-Bfgc0DD2.js → GrTextarea-BFwyqcHB.js} +22 -5
  209. package/dist/components/GrTextarea/chunks/GrTextarea-BFwyqcHB.js.map +1 -0
  210. package/dist/components/GrTextarea/index.js +1 -1
  211. package/dist/components/GrToaster/chunks/{GrToaster-CZixNk0l.js → GrToaster-OzT1VKcp.js} +163 -32
  212. package/dist/components/GrToaster/chunks/GrToaster-OzT1VKcp.js.map +1 -0
  213. package/dist/components/GrToaster/index.js +2 -2
  214. package/dist/components/GrToaster/styles.css +1 -1
  215. package/dist/components/GrTooltip/chunks/{GrTooltip-DkMMM0uq.js → GrTooltip-BDcFycvW.js} +26 -13
  216. package/dist/components/GrTooltip/chunks/GrTooltip-BDcFycvW.js.map +1 -0
  217. package/dist/components/GrTooltip/index.js +2 -2
  218. package/dist/components/GrTransfer/chunks/{GrTransfer-DdfBUf35.js → GrTransfer-CV7BL5UK.js} +114 -12
  219. package/dist/components/GrTransfer/chunks/GrTransfer-CV7BL5UK.js.map +1 -0
  220. package/dist/components/GrTransfer/index.js +1 -1
  221. package/dist/components/GrTransfer/styles.css +1 -1
  222. package/dist/components/GrTree/chunks/{GrTree-6yZrncJE.js → GrTree-DpgaP8hk.js} +39 -1
  223. package/dist/components/GrTree/chunks/GrTree-DpgaP8hk.js.map +1 -0
  224. package/dist/components/GrTree/index.js +1 -1
  225. package/dist/components/GrTree/styles.css +1 -1
  226. package/dist/components/GrTreeSections/chunks/{GrTreeSections-DcmDcLwj.js → GrTreeSections-BeOj__44.js} +1 -1
  227. package/dist/components/GrTreeSections/chunks/{GrTreeSections-DcmDcLwj.js.map → GrTreeSections-BeOj__44.js.map} +1 -1
  228. package/dist/components/GrTreeSections/index.js +1 -1
  229. package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-B6KoDYiZ.js → GrTreeSelect-BHq-T8wH.js} +113 -14
  230. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-BHq-T8wH.js.map +1 -0
  231. package/dist/components/GrTreeSelect/index.js +2 -2
  232. package/dist/composables/useFloating.js +1 -1
  233. package/dist/composables/useHotkeys.js +89 -0
  234. package/dist/composables/useHotkeys.js.map +1 -0
  235. package/dist/composables/useOverlayLayer.js +1 -1
  236. package/dist/directives/hotkey.js +19 -46
  237. package/dist/directives/hotkey.js.map +1 -1
  238. package/dist/granular-provider-node.js +1 -1
  239. package/dist/granular-provider.js +1 -1
  240. package/dist/i18n/all.js +1 -1
  241. package/dist/i18n/index.js +1 -1
  242. package/dist/index.js +71 -63
  243. package/dist/theme.js +1 -1
  244. package/dist/tokens.js +1 -1
  245. package/dist/types/components/GrAutocomplete/GrAutocomplete.vue.d.ts +4 -4
  246. package/dist/types/components/GrAutocomplete/composables/useAutocompleteNavigation.d.ts +12 -3
  247. package/dist/types/components/GrAutocomplete/composables/useAutocompletePanel.d.ts +12 -2
  248. package/dist/types/components/GrAutocomplete/composables/useAutocompleteValues.d.ts +7 -4
  249. package/dist/types/components/GrAutocomplete/composables/useRemoteOptions.d.ts +4 -4
  250. package/dist/types/components/GrAutocomplete/grAutocompleteStyles.d.ts +15 -1
  251. package/dist/types/components/GrAutocomplete/index.d.ts +1 -1
  252. package/dist/types/components/GrCarousel/GrCarousel.vue.d.ts +29 -1
  253. package/dist/types/components/GrCarousel/composables/useCarouselSwipe.d.ts +5 -0
  254. package/dist/types/components/GrCarousel/grCarouselContext.d.ts +21 -0
  255. package/dist/types/components/GrCarousel/grCarouselStyles.d.ts +39 -9
  256. package/dist/types/components/GrCheckbox/GrCheckbox.vue.d.ts +13 -0
  257. package/dist/types/components/GrColorPicker/GrColorPicker.vue.d.ts +18 -2
  258. package/dist/types/components/GrColorPicker/color.d.ts +13 -1
  259. package/dist/types/components/GrColorPicker/colorArea.d.ts +59 -0
  260. package/dist/types/components/GrColorPicker/defaults.d.ts +3 -1
  261. package/dist/types/components/GrColorPicker/eyeDropper.d.ts +21 -0
  262. package/dist/types/components/GrColorPicker/grColorPickerStyles.d.ts +42 -0
  263. package/dist/types/components/GrCommandPalette/GrCommandPalette.vue.d.ts +10 -1
  264. package/dist/types/components/GrDataTable/GrDataTable.vue.d.ts +41 -1
  265. package/dist/types/components/GrDataTable/composables/useDataTableGridNavigation.d.ts +53 -0
  266. package/dist/types/components/GrDataTable/grDataTableStyles.d.ts +8 -0
  267. package/dist/types/components/GrDataTable/index.d.ts +1 -1
  268. package/dist/types/components/GrDelta/grDeltaStyles.d.ts +10 -3
  269. package/dist/types/components/GrEmptyState/GrEmptyState.vue.d.ts +11 -2
  270. package/dist/types/components/GrEmptyState/grEmptyStateStyles.d.ts +10 -0
  271. package/dist/types/components/GrEmptyState/index.d.ts +1 -1
  272. package/dist/types/components/GrFileUpload/GrFileUpload.vue.d.ts +2 -1
  273. package/dist/types/components/GrFormFile/GrFormFile.vue.d.ts +10 -0
  274. package/dist/types/components/GrInput/GrInput.vue.d.ts +15 -0
  275. package/dist/types/components/GrInputTag/GrInputTag.vue.d.ts +16 -0
  276. package/dist/types/components/GrInputTag/grInputTagStyles.d.ts +11 -0
  277. package/dist/types/components/GrKbd/GrKbd.vue.d.ts +14 -0
  278. package/dist/types/components/GrNavbar/GrNavbar.vue.d.ts +18 -0
  279. package/dist/types/components/GrNavbar/grNavbarStyles.d.ts +10 -1
  280. package/dist/types/components/GrNavbar/index.d.ts +1 -0
  281. package/dist/types/components/GrSelect/composables/useSelectPanelItems.d.ts +8 -34
  282. package/dist/types/components/GrSelect/composables/useSelectVirtualization.d.ts +7 -0
  283. package/dist/types/components/GrSelect/grSelectStyles.d.ts +1 -1
  284. package/dist/types/components/GrSidebar/GrSidebar.vue.d.ts +20 -0
  285. package/dist/types/components/GrSidebar/GrSidebarItem.vue.d.ts +39 -5
  286. package/dist/types/components/GrSidebar/grSidebarStyles.d.ts +32 -0
  287. package/dist/types/components/GrSidebar/index.d.ts +1 -1
  288. package/dist/types/components/GrSidebar/sidebarContext.d.ts +23 -1
  289. package/dist/types/components/GrSlider/GrSlider.vue.d.ts +39 -1
  290. package/dist/types/components/GrSlider/grSliderStyles.d.ts +1 -1
  291. package/dist/types/components/GrTabPanels/context.d.ts +6 -0
  292. package/dist/types/components/GrTable/GrTable.vue.d.ts +37 -0
  293. package/dist/types/components/GrTable/grTableStyles.d.ts +16 -7
  294. package/dist/types/components/GrTabsWithPanels/GrTabsWithPanels.vue.d.ts +77 -0
  295. package/dist/types/components/GrTabsWithPanels/config.d.ts +1 -0
  296. package/dist/types/components/GrTabsWithPanels/index.d.ts +4 -0
  297. package/dist/types/components/GrTextarea/GrTextarea.vue.d.ts +19 -1
  298. package/dist/types/components/GrToaster/GrToaster.vue.d.ts +12 -0
  299. package/dist/types/components/GrToaster/grToasterStyles.d.ts +26 -0
  300. package/dist/types/components/GrTooltip/GrTooltip.vue.d.ts +22 -0
  301. package/dist/types/components/GrTransfer/GrTransfer.vue.d.ts +23 -0
  302. package/dist/types/components/GrTreeSelect/grTreeSelectStyles.d.ts +1 -1
  303. package/dist/types/components/GrTreeSelect/grTreeSelectTypes.d.ts +20 -0
  304. package/dist/types/components/shared/hotkey.d.ts +8 -9
  305. package/dist/types/components/shared/optionPanel.d.ts +100 -0
  306. package/dist/types/components/shared/overlayListPanel.d.ts +18 -0
  307. package/dist/types/composables/useHotkeys.d.ts +43 -0
  308. package/dist/types/granular-provider/shared.d.ts +1 -0
  309. package/dist/types/i18n/messages/en.d.ts +28 -0
  310. package/dist/types/i18n/messages/es.d.ts +28 -0
  311. package/dist/types/i18n/messages/ru.d.ts +28 -0
  312. package/dist/types/index.d.ts +3 -0
  313. package/dist/types/internal/hotkeySequence.d.ts +22 -0
  314. package/dist/types/internal/keyboard.d.ts +45 -0
  315. package/dist/web-types.json +463 -26
  316. package/package.json +9 -1
  317. package/dist/chunks/config-2ZHRsdOc.js.map +0 -1
  318. package/dist/chunks/config-B42iJ48O.js.map +0 -1
  319. package/dist/chunks/config-B5SBUa6u.js.map +0 -1
  320. package/dist/chunks/config-BAse0laT.js.map +0 -1
  321. package/dist/chunks/config-BHLMTJaR.js.map +0 -1
  322. package/dist/chunks/config-BXRmsn3t.js.map +0 -1
  323. package/dist/chunks/config-Bs1HwUcx.js.map +0 -1
  324. package/dist/chunks/config-CMNfZO7S.js.map +0 -1
  325. package/dist/chunks/config-CbEbLyDE.js.map +0 -1
  326. package/dist/chunks/config-CjWOTgLL.js.map +0 -1
  327. package/dist/chunks/config-D3HOuHDe.js.map +0 -1
  328. package/dist/chunks/config-DIDz_E5m.js.map +0 -1
  329. package/dist/chunks/config-DNDgp9bB.js.map +0 -1
  330. package/dist/chunks/config-iemgzS4x.js.map +0 -1
  331. package/dist/chunks/en-CsQUoBS2.js.map +0 -1
  332. package/dist/chunks/es-9nbkPvdA.js.map +0 -1
  333. package/dist/chunks/grSelectStyles-D9EQ-pgK.js.map +0 -1
  334. package/dist/chunks/grSliderStyles-kaz6VXZ3.js.map +0 -1
  335. package/dist/chunks/grTableStyles-DkQPMfx9.js +0 -39
  336. package/dist/chunks/grTableStyles-DkQPMfx9.js.map +0 -1
  337. package/dist/chunks/granular-provider-B6xomapW.js.map +0 -1
  338. package/dist/chunks/keyboard-DE2yhz_b.js.map +0 -1
  339. package/dist/chunks/overlayPanelSurface-BKeMhRx4.js.map +0 -1
  340. package/dist/chunks/ru-88i1WG0b.js.map +0 -1
  341. package/dist/components/GrAutocomplete/chunks/GrAutocomplete-Chhw65pI.js.map +0 -1
  342. package/dist/components/GrCarousel/chunks/GrCarousel-ByuughtI.js.map +0 -1
  343. package/dist/components/GrCheckbox/chunks/GrCheckbox-Dp201frb.js.map +0 -1
  344. package/dist/components/GrColorPicker/chunks/GrColorPicker-BRM_4lyI.js.map +0 -1
  345. package/dist/components/GrCommandPalette/chunks/GrCommandPalette-BJHmkDQv.js.map +0 -1
  346. package/dist/components/GrDataTable/chunks/GrDataTable-DQxYYgQk.js.map +0 -1
  347. package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-Dxkz_ry4.js.map +0 -1
  348. package/dist/components/GrEmptyState/chunks/GrEmptyState-BbvwE-E0.js.map +0 -1
  349. package/dist/components/GrFileUpload/chunks/GrFileUpload-BwMR71zN.js.map +0 -1
  350. package/dist/components/GrFormFile/chunks/GrFormFile-Dlxx-9zi.js.map +0 -1
  351. package/dist/components/GrInput/chunks/GrInput-DV4gMWPR.js.map +0 -1
  352. package/dist/components/GrInputTag/chunks/GrInputTag-qnRdAZnn.js.map +0 -1
  353. package/dist/components/GrKbd/chunks/GrKbd-BNMeoaLV.js.map +0 -1
  354. package/dist/components/GrNavbar/chunks/GrNavbar-BRGuksiy.js.map +0 -1
  355. package/dist/components/GrSelect/chunks/GrSelect-DvSq-nV-.js.map +0 -1
  356. package/dist/components/GrSidebar/chunks/GrSidebar-DoKLlHSw.js +0 -264
  357. package/dist/components/GrSidebar/chunks/GrSidebar-DoKLlHSw.js.map +0 -1
  358. package/dist/components/GrSlider/chunks/GrSlider-CO8N9SF6.js.map +0 -1
  359. package/dist/components/GrTabPanels/chunks/GrTabPanels-5zsbqS1v.js +0 -92
  360. package/dist/components/GrTabPanels/chunks/GrTabPanels-5zsbqS1v.js.map +0 -1
  361. package/dist/components/GrTable/chunks/GrTable-CKJ-HrsN.js.map +0 -1
  362. package/dist/components/GrTextarea/chunks/GrTextarea-Bfgc0DD2.js.map +0 -1
  363. package/dist/components/GrToaster/chunks/GrToaster-CZixNk0l.js.map +0 -1
  364. package/dist/components/GrTooltip/chunks/GrTooltip-DkMMM0uq.js.map +0 -1
  365. package/dist/components/GrTransfer/chunks/GrTransfer-DdfBUf35.js.map +0 -1
  366. package/dist/components/GrTree/chunks/GrTree-6yZrncJE.js.map +0 -1
  367. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-B6KoDYiZ.js.map +0 -1
  368. package/dist/types/components/GrAutocomplete/composables/useAutocompleteVirtual.d.ts +0 -33
@@ -1,15 +1,36 @@
1
- import { a as useGrComponentSize } from "../../../chunks/context-CPMRfwVr.js";
1
+ import { a as useGrComponentSize, i as useGrComponentProp } from "../../../chunks/context-CPMRfwVr.js";
2
2
  import { n as useGranularityTranslations } from "../../../chunks/granularityI18n-BC5zsj_d.js";
3
3
  import { n as useGrFormFieldContext } from "../../../chunks/context-DdNIxa1w.js";
4
4
  import { useGrFormControl } from "../../../composables/useGrFormControl.js";
5
- import { t as GrInput_default } from "../../GrInput/chunks/GrInput-DV4gMWPR.js";
6
- import { t as GrPopover_default } from "../../GrPopover/chunks/GrPopover-CcWvr1ZA.js";
7
- import { t as GrSlider_default } from "../../GrSlider/chunks/GrSlider-CO8N9SF6.js";
8
- import { a as grColorPickerPresetClass, c as previewClass, d as rowValueClass, f as swatchBaseClass, h as triggerValueClass, i as grColorPickerPanelClass, l as rowClass, m as triggerSwatchSizeBySize, o as grColorPickerTriggerClass, p as swatchFillClass, r as checkerClass, s as presetsGridClass, u as rowLabelClass } from "../../../chunks/config-DIDz_E5m.js";
9
- import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, isRef, mergeProps, nextTick, normalizeClass, normalizeStyle, openBlock, ref, renderList, toDisplayString, unref, useId, watch, withCtx, withKeys } from "vue";
10
- import '../styles.css';//#region src/components/GrColorPicker/color.ts
5
+ import { useDragGesture } from "../../../composables/useDragGesture.js";
6
+ import { t as GrInput_default } from "../../GrInput/chunks/GrInput-CoaFLpaU.js";
7
+ import { t as GrPopover_default } from "../../GrPopover/chunks/GrPopover-DjVxt8bf.js";
8
+ import { t as GrSlider_default } from "../../GrSlider/chunks/GrSlider-DF2Cq0rV.js";
9
+ import { S as triggerValueClass, _ as rowLabelClass, a as checkerClass, b as swatchFillClass, c as grColorPickerEyedropperClass, d as grColorPickerTriggerClass, f as hexFieldClass, g as rowClass, h as previewClass, i as areaThumbClass, l as grColorPickerPanelClass, m as presetsGridClass, o as eyedropperIconClass, p as hexRowClass, r as areaInputClass, s as grColorPickerAreaClass, u as grColorPickerPresetClass, v as rowValueClass, x as triggerSwatchSizeBySize, y as swatchBaseClass } from "../../../chunks/config-B34mkd53.js";
10
+ import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, isRef, markRaw, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, toDisplayString, unref, useId, watch, withCtx, withKeys } from "vue";
11
+ import '../styles.css';//#region ~icons/lucide/pipette
12
+ var _hoisted_1$1 = {
13
+ viewBox: "0 0 24 24",
14
+ width: "1.2em",
15
+ height: "1.2em"
16
+ };
17
+ function render$1(_ctx, _cache) {
18
+ return openBlock(), createElementBlock("svg", _hoisted_1$1, [..._cache[0] || (_cache[0] = [createElementVNode("g", {
19
+ fill: "none",
20
+ stroke: "currentColor",
21
+ "stroke-linecap": "round",
22
+ "stroke-linejoin": "round",
23
+ "stroke-width": "2"
24
+ }, [createElementVNode("path", { d: "m12 9l-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12" }), createElementVNode("path", { d: "m18 9l.4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4l3.4-3.4a1 1 0 1 1 3 3zM2 22l.414-.414" })], -1)])]);
25
+ }
26
+ var pipette_default = markRaw({
27
+ name: "lucide-pipette",
28
+ render: render$1
29
+ });
30
+ //#endregion
31
+ //#region src/components/GrColorPicker/color.ts
11
32
  var HEX_PATTERN = /^#?([0-9a-f]{3,8})$/i;
12
- function clamp(value, min, max) {
33
+ function clamp$1(value, min, max) {
13
34
  return Math.min(Math.max(value, min), max);
14
35
  }
15
36
  /**
@@ -55,8 +76,8 @@ function rgbToHsl({ r, g, b }) {
55
76
  };
56
77
  }
57
78
  function hslToRgb({ h, s, l }) {
58
- const saturation = clamp(s, 0, 100) / 100;
59
- const lightness = clamp(l, 0, 100) / 100;
79
+ const saturation = clamp$1(s, 0, 100) / 100;
80
+ const lightness = clamp$1(l, 0, 100) / 100;
60
81
  const hue = normalizeHue(h);
61
82
  const chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
62
83
  const second = chroma * (1 - Math.abs(hue / 60 % 2 - 1));
@@ -100,7 +121,7 @@ function hslToRgb({ h, s, l }) {
100
121
  };
101
122
  }
102
123
  function toHexPair(value) {
103
- return clamp(Math.round(value), 0, 255).toString(16).padStart(2, "0");
124
+ return clamp$1(Math.round(value), 0, 255).toString(16).padStart(2, "0");
104
125
  }
105
126
  /**
106
127
  * Разбирает hex любой из четырёх форм (`#abc`, `#abcd`, `#aabbcc`, `#aabbccdd`),
@@ -135,7 +156,7 @@ function formatHexColor(color, withAlpha = false) {
135
156
  const { r, g, b } = hslToRgb(color);
136
157
  const base = `#${toHexPair(r)}${toHexPair(g)}${toHexPair(b)}`;
137
158
  if (!withAlpha) return base;
138
- return `${base}${toHexPair(clamp(color.a, 0, 1) * 255)}`;
159
+ return `${base}${toHexPair(clamp$1(color.a, 0, 1) * 255)}`;
139
160
  }
140
161
  /** Короткая запись числа: целое остаётся целым, дробь обрезается до сотых. */
141
162
  function trim(value) {
@@ -143,17 +164,126 @@ function trim(value) {
143
164
  }
144
165
  /** CSS-запись цвета для превью и градиентов. */
145
166
  function hslaToCss(color) {
146
- return `hsl(${trim(normalizeHue(color.h))} ${trim(clamp(color.s, 0, 100))}% ${trim(clamp(color.l, 0, 100))}% / ${trim(clamp(color.a, 0, 1))})`;
167
+ return `hsl(${trim(normalizeHue(color.h))} ${trim(clamp$1(color.s, 0, 100))}% ${trim(clamp$1(color.l, 0, 100))}% / ${trim(clamp$1(color.a, 0, 1))})`;
147
168
  }
148
- /** Приводит произвольный объект к валидному диапазону каналов. */
169
+ /**
170
+ * Приводит произвольный объект к валидному диапазону каналов.
171
+ *
172
+ * Округления нет ни у одного канала, и это то же правило, что у `normalizeHue`,
173
+ * распространённое на насыщенность и светлоту: целочисленная сетка HSL мельче
174
+ * сетки hex, и посадка на неё меняет цвет. Замер на типовых брендовых
175
+ * значениях — 11 расхождений из 12: `#10b981` возвращался как `#10b77f`.
176
+ * Пользователь при этом ничего не двигал, а компонент уже переписал его цвет —
177
+ * достаточно было выбрать пресет или вставить hex в поле.
178
+ *
179
+ * Целые нужны шкалам, и они их и получают: бегунок читает `Math.round` своего
180
+ * канала, а хранимое значение остаётся точным.
181
+ */
149
182
  function normalizeHsla(color) {
150
183
  return {
151
- h: Math.round(normalizeHue(color.h)) % 360,
152
- s: clamp(Math.round(color.s), 0, 100),
153
- l: clamp(Math.round(color.l), 0, 100),
154
- a: clamp(color.a, 0, 1)
184
+ h: normalizeHue(color.h),
185
+ s: clamp$1(color.s, 0, 100),
186
+ l: clamp$1(color.l, 0, 100),
187
+ a: clamp$1(color.a, 0, 1)
188
+ };
189
+ }
190
+ //#endregion
191
+ //#region src/components/GrColorPicker/colorArea.ts
192
+ /** Шаг стрелки и крупный шаг `PageUp`/`PageDown` — те же, что у `GrSlider`. */
193
+ var STEP = 1;
194
+ var PAGE_STEP = 10;
195
+ function clamp(value) {
196
+ return Math.min(100, Math.max(0, value));
197
+ }
198
+ /**
199
+ * Положение ручки в процентах от левого верхнего угла.
200
+ *
201
+ * Светлота инвертирована: вверху области белое, внизу чёрное — так стоит
202
+ * вертикальная шкала во всех привычных пикерах, и переворачивать её значило бы
203
+ * ломать ожидание ради буквальности.
204
+ */
205
+ function colorAreaThumbPosition(point) {
206
+ return {
207
+ x: clamp(point.s),
208
+ y: 100 - clamp(point.l)
155
209
  };
156
210
  }
211
+ /**
212
+ * Значение под указателем.
213
+ *
214
+ * Прямоугольник приходит снаружи: измерять его умеет только вызывающий, а
215
+ * промах мимо области — норма, указатель уходит за её границы при каждом
216
+ * протягивании.
217
+ */
218
+ function colorAreaPointAt(pointer, rect) {
219
+ const s = rect.width > 0 ? (pointer.clientX - rect.left) / rect.width * 100 : 0;
220
+ const y = rect.height > 0 ? (pointer.clientY - rect.top) / rect.height * 100 : 0;
221
+ return {
222
+ s: clamp(s),
223
+ l: clamp(100 - y)
224
+ };
225
+ }
226
+ /**
227
+ * Клавиша → новое значение и ось, которая изменилась.
228
+ *
229
+ * Ось возвращается не для отчёта: у области два настоящих `input[type=range]`,
230
+ * по одному на канал, и стрелка поперёк оси сфокусированного поля обязана
231
+ * увести фокус на соседнее — иначе диктор промолчит о том, что изменилось.
232
+ *
233
+ * `Home`/`End` и крупный шаг работают по оси **сфокусированного** поля: они
234
+ * относятся к диапазону, а диапазонов здесь два.
235
+ */
236
+ function colorAreaKeyStep(key, point, focused) {
237
+ const move = (axis, next) => ({
238
+ point: axis === "saturation" ? {
239
+ s: clamp(next),
240
+ l: point.l
241
+ } : {
242
+ s: point.s,
243
+ l: clamp(next)
244
+ },
245
+ axis
246
+ });
247
+ const current = focused === "saturation" ? point.s : point.l;
248
+ switch (key) {
249
+ case "ArrowLeft": return move("saturation", point.s - STEP);
250
+ case "ArrowRight": return move("saturation", point.s + STEP);
251
+ case "ArrowDown": return move("lightness", point.l - STEP);
252
+ case "ArrowUp": return move("lightness", point.l + STEP);
253
+ case "PageDown": return move(focused, current - PAGE_STEP);
254
+ case "PageUp": return move(focused, current + PAGE_STEP);
255
+ case "Home": return move(focused, 0);
256
+ case "End": return move(focused, 100);
257
+ default: return null;
258
+ }
259
+ }
260
+ //#endregion
261
+ //#region src/components/GrColorPicker/eyeDropper.ts
262
+ function eyeDropperApi() {
263
+ if (typeof window === "undefined" || !("EyeDropper" in window)) return null;
264
+ return window.EyeDropper;
265
+ }
266
+ /** Поддерживается ли пипетка. Зовётся после монтирования: на сервере `window` нет. */
267
+ function isEyeDropperSupported() {
268
+ return eyeDropperApi() !== null;
269
+ }
270
+ /**
271
+ * Открыть пипетку и дождаться цвета. `null` — пользователь отказался или API
272
+ * недоступно.
273
+ *
274
+ * Вызов обязан идти прямо из обработчика нажатия: без свежего жеста браузер
275
+ * отклоняет `open()` как `NotAllowedError`.
276
+ */
277
+ async function pickScreenColor(signal) {
278
+ const Api = eyeDropperApi();
279
+ if (!Api) return null;
280
+ try {
281
+ const { sRGBHex } = await new Api().open(signal ? { signal } : void 0);
282
+ return sRGBHex;
283
+ } catch {
284
+ return null;
285
+ }
286
+ }
157
287
  //#endregion
158
288
  //#region src/components/GrColorPicker/GrColorPicker.vue?vue&type=script&setup=true&lang.ts
159
289
  var _hoisted_1 = { "data-gr-color-picker": "" };
@@ -167,6 +297,20 @@ var _hoisted_4 = [
167
297
  ];
168
298
  var _hoisted_5 = ["aria-label"];
169
299
  var _hoisted_6 = [
300
+ "value",
301
+ "disabled",
302
+ "aria-label",
303
+ "aria-valuetext"
304
+ ];
305
+ var _hoisted_7 = [
306
+ "value",
307
+ "disabled",
308
+ "aria-label",
309
+ "aria-valuetext"
310
+ ];
311
+ var _hoisted_8 = ["disabled", "aria-label"];
312
+ var _hoisted_9 = ["aria-label"];
313
+ var _hoisted_10 = [
170
314
  "aria-label",
171
315
  "aria-pressed",
172
316
  "disabled",
@@ -182,6 +326,11 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
182
326
  type: Boolean,
183
327
  default: false
184
328
  },
329
+ view: { default: void 0 },
330
+ eyedropper: {
331
+ type: Boolean,
332
+ default: void 0
333
+ },
185
334
  presets: { default: () => [] },
186
335
  size: { default: void 0 },
187
336
  open: {
@@ -223,15 +372,16 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
223
372
  * Прямой сценарий — настройки темы и брендирования, поэтому модель хранит hex:
224
373
  * в такой форме цвет лежит в токенах и его понимает CSS.
225
374
  *
226
- * A11y: каждый канал отдельный `GrSlider`, то есть настоящий `role="slider"`
227
- * с полной клавиатурой и `aria-valuetext`. Двумерная область saturation/value
228
- * не берётся намеренно: это свой виджет со своей клавиатурой по двум осям, и
229
- * доступность там пришлось бы собирать с нуля.
375
+ * A11y: у каждого канала настоящий `role="slider"` с полной клавиатурой и
376
+ * `aria-valuetext`. У двумерной области он тоже настоящий, и даже дважды —
377
+ * по одному `input[type=range]` на ось (см. `colorArea.ts`).
230
378
  */
231
379
  const props = __props;
232
380
  const emit = __emit;
233
381
  const { t } = useGranularityTranslations();
234
382
  const resolvedSize = useGrComponentSize(() => props.size, { component: "GrColorPicker" });
383
+ const resolvedView = useGrComponentProp("GrColorPicker", "view", () => props.view, "sliders");
384
+ const wantsEyedropper = useGrComponentProp("GrColorPicker", "eyedropper", () => props.eyedropper, false);
235
385
  const field = useGrFormFieldContext();
236
386
  const fieldId = computed(() => field?.id.value);
237
387
  const { disabled: isDisabled, invalid: isInvalid, required: isRequired, readonly: isReadonly, locked: isLocked } = useGrFormControl(() => props);
@@ -360,12 +510,118 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
360
510
  a: 1
361
511
  });
362
512
  return {
513
+ "--gr-color-picker-area-saturation": `linear-gradient(to right, hsl(${Math.round(h)} 0% 50%), hsl(${Math.round(h)} 100% 50%))`,
363
514
  "--gr-color-picker-track-hue": "linear-gradient(to right, hsl(0 100% 50%), hsl(60 100% 50%), hsl(120 100% 50%), hsl(180 100% 50%), hsl(240 100% 50%), hsl(300 100% 50%), hsl(360 100% 50%))",
364
515
  "--gr-color-picker-track-saturation": `linear-gradient(to right, hsl(${Math.round(h)} 0% ${Math.round(l)}%), hsl(${Math.round(h)} 100% ${Math.round(l)}%))`,
365
516
  "--gr-color-picker-track-lightness": `linear-gradient(to right, hsl(${Math.round(h)} ${Math.round(s)}% 0%), hsl(${Math.round(h)} ${Math.round(s)}% 50%), hsl(${Math.round(h)} ${Math.round(s)}% 100%))`,
366
517
  "--gr-color-picker-track-alpha": `linear-gradient(to right, transparent, ${solid})`
367
518
  };
368
519
  });
520
+ const areaEl = ref(null);
521
+ const saturationInputEl = ref(null);
522
+ const lightnessInputEl = ref(null);
523
+ /** Точка области целыми процентами: поля осей — обычные `input[type=range]`. */
524
+ const areaPoint = computed(() => ({
525
+ s: Math.round(state.value.s),
526
+ l: Math.round(state.value.l)
527
+ }));
528
+ const areaThumbStyle = computed(() => {
529
+ const { x, y } = colorAreaThumbPosition(areaPoint.value);
530
+ return {
531
+ left: `${x}%`,
532
+ top: `${y}%`,
533
+ background: hslaToCss({
534
+ ...state.value,
535
+ a: 1
536
+ })
537
+ };
538
+ });
539
+ function applyAreaPoint(point) {
540
+ commit({
541
+ ...state.value,
542
+ s: point.s,
543
+ l: point.l
544
+ });
545
+ }
546
+ function areaPointerMove(event) {
547
+ const rect = areaEl.value?.getBoundingClientRect();
548
+ if (!rect) return;
549
+ applyAreaPoint(colorAreaPointAt(event, rect));
550
+ }
551
+ /** Цвет до начала жеста: оборванный жест обязан вернуть его на место. */
552
+ let colorBeforeDrag = null;
553
+ const areaDrag = useDragGesture({
554
+ disabled: () => isLocked.value,
555
+ onStart: (event) => {
556
+ colorBeforeDrag = state.value;
557
+ areaPointerMove(event);
558
+ saturationInputEl.value?.focus();
559
+ },
560
+ onMove: areaPointerMove,
561
+ onCancel: () => {
562
+ if (colorBeforeDrag) commit(colorBeforeDrag);
563
+ colorBeforeDrag = null;
564
+ },
565
+ onEnd: () => {
566
+ colorBeforeDrag = null;
567
+ }
568
+ });
569
+ /**
570
+ * Клавиатура области.
571
+ *
572
+ * Стрелка поперёк оси сфокусированного поля уводит фокус на соседнее: значение
573
+ * поменялось у него, и без переезда диктор промолчал бы о том, что изменилось.
574
+ */
575
+ function onAreaKeydown(event, axis) {
576
+ if (isLocked.value) return;
577
+ const next = colorAreaKeyStep(event.key, areaPoint.value, axis);
578
+ if (!next) return;
579
+ event.preventDefault();
580
+ applyAreaPoint(next.point);
581
+ if (next.axis !== axis) (next.axis === "saturation" ? saturationInputEl : lightnessInputEl).value?.focus();
582
+ }
583
+ /** Изменение поля мимо клавиатуры — например, жестом вспомогательной технологии. */
584
+ function onAreaInput(event, axis) {
585
+ const value = Number(event.target.value);
586
+ if (!Number.isFinite(value)) return;
587
+ applyAreaPoint(axis === "saturation" ? {
588
+ ...areaPoint.value,
589
+ s: value
590
+ } : {
591
+ ...areaPoint.value,
592
+ l: value
593
+ });
594
+ }
595
+ const areaClass = computed(() => grColorPickerAreaClass({
596
+ size: resolvedSize.value,
597
+ locked: isLocked.value
598
+ }));
599
+ /**
600
+ * Поддержка пипетки уточняется после монтирования: `window` в теле `setup`
601
+ * либо роняет серверный рендер, либо расходится с ним. До этого кнопки нет —
602
+ * ровно то же, что отдаёт сервер, поэтому гидрация совпадает.
603
+ */
604
+ const eyedropperSupported = ref(false);
605
+ onMounted(() => {
606
+ eyedropperSupported.value = isEyeDropperSupported();
607
+ });
608
+ const showEyedropper = computed(() => wantsEyedropper.value && eyedropperSupported.value);
609
+ const eyedropperClassName = computed(() => grColorPickerEyedropperClass(resolvedSize.value));
610
+ /**
611
+ * Пипетка зовётся прямо из обработчика нажатия: без свежего жеста браузер
612
+ * отклоняет `open()`. Отказ пользователя — не ошибка и ничего не меняет.
613
+ */
614
+ async function pickFromScreen() {
615
+ if (isLocked.value) return;
616
+ const picked = await pickScreenColor();
617
+ if (!picked) return;
618
+ const parsed = parseHexColor(picked);
619
+ if (!parsed) return;
620
+ commit({
621
+ ...parsed,
622
+ a: state.value.a
623
+ });
624
+ }
369
625
  return (_ctx, _cache) => {
370
626
  return openBlock(), createElementBlock("div", _hoisted_1, [
371
627
  __props.name ? (openBlock(), createElementBlock("input", {
@@ -381,7 +637,7 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
381
637
  }, toDisplayString(stateHint.value), 9, _hoisted_3)) : createCommentVNode("", true),
382
638
  createVNode(GrPopover_default, {
383
639
  open: panelOpen.value,
384
- "onUpdate:open": _cache[7] || (_cache[7] = ($event) => panelOpen.value = $event),
640
+ "onUpdate:open": _cache[12] || (_cache[12] = ($event) => panelOpen.value = $event),
385
641
  block: "",
386
642
  size: unref(resolvedSize),
387
643
  placement: __props.placement,
@@ -427,6 +683,53 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
427
683
  class: normalizeClass(unref(swatchFillClass)),
428
684
  style: normalizeStyle({ background: cssColor.value })
429
685
  }, null, 6)], 2),
686
+ unref(resolvedView) === "area" ? (openBlock(), createElementBlock("div", {
687
+ key: 0,
688
+ ref_key: "areaEl",
689
+ ref: areaEl,
690
+ "data-gr-color-picker-area": "",
691
+ role: "group",
692
+ class: normalizeClass(areaClass.value),
693
+ "aria-label": unref(t)("gr.colorPicker.area", "Saturation and lightness"),
694
+ onPointerdown: _cache[6] || (_cache[6] = (...args) => unref(areaDrag).start && unref(areaDrag).start(...args))
695
+ }, [
696
+ createElementVNode("input", {
697
+ ref_key: "saturationInputEl",
698
+ ref: saturationInputEl,
699
+ "data-gr-color-picker-area-axis": "saturation",
700
+ type: "range",
701
+ min: "0",
702
+ max: "100",
703
+ value: areaPoint.value.s,
704
+ class: normalizeClass(unref(areaInputClass)),
705
+ disabled: unref(isDisabled),
706
+ "aria-label": unref(t)("gr.colorPicker.saturation", "Saturation"),
707
+ "aria-valuetext": percent(areaPoint.value.s),
708
+ onKeydown: _cache[2] || (_cache[2] = ($event) => onAreaKeydown($event, "saturation")),
709
+ onInput: _cache[3] || (_cache[3] = ($event) => onAreaInput($event, "saturation"))
710
+ }, null, 42, _hoisted_6),
711
+ createElementVNode("input", {
712
+ ref_key: "lightnessInputEl",
713
+ ref: lightnessInputEl,
714
+ "data-gr-color-picker-area-axis": "lightness",
715
+ type: "range",
716
+ min: "0",
717
+ max: "100",
718
+ value: areaPoint.value.l,
719
+ class: normalizeClass(unref(areaInputClass)),
720
+ disabled: unref(isDisabled),
721
+ "aria-label": unref(t)("gr.colorPicker.lightness", "Lightness"),
722
+ "aria-valuetext": percent(areaPoint.value.l),
723
+ onKeydown: _cache[4] || (_cache[4] = ($event) => onAreaKeydown($event, "lightness")),
724
+ onInput: _cache[5] || (_cache[5] = ($event) => onAreaInput($event, "lightness"))
725
+ }, null, 42, _hoisted_7),
726
+ createElementVNode("span", {
727
+ "data-gr-color-picker-area-thumb": "",
728
+ "aria-hidden": "true",
729
+ class: normalizeClass(unref(areaThumbClass)),
730
+ style: normalizeStyle(areaThumbStyle.value)
731
+ }, null, 6)
732
+ ], 42, _hoisted_5)) : createCommentVNode("", true),
430
733
  createElementVNode("div", {
431
734
  "data-gr-color-picker-channel": "hue",
432
735
  class: normalizeClass(unref(rowClass))
@@ -437,7 +740,7 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
437
740
  }, "H", 2),
438
741
  createVNode(GrSlider_default, {
439
742
  modelValue: unref(hue),
440
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(hue) ? hue.value = $event : null),
743
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => isRef(hue) ? hue.value = $event : null),
441
744
  min: 0,
442
745
  max: 359,
443
746
  size: unref(resolvedSize),
@@ -454,7 +757,7 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
454
757
  ]),
455
758
  createElementVNode("span", { class: normalizeClass(unref(rowValueClass)) }, toDisplayString(degrees(unref(hue))), 3)
456
759
  ], 2),
457
- createElementVNode("div", {
760
+ unref(resolvedView) === "sliders" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("div", {
458
761
  "data-gr-color-picker-channel": "saturation",
459
762
  class: normalizeClass(unref(rowClass))
460
763
  }, [
@@ -464,7 +767,7 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
464
767
  }, "S", 2),
465
768
  createVNode(GrSlider_default, {
466
769
  modelValue: unref(saturation),
467
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(saturation) ? saturation.value = $event : null),
770
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isRef(saturation) ? saturation.value = $event : null),
468
771
  size: unref(resolvedSize),
469
772
  disabled: unref(isDisabled),
470
773
  readonly: unref(isReadonly),
@@ -478,8 +781,7 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
478
781
  "aria-label"
479
782
  ]),
480
783
  createElementVNode("span", { class: normalizeClass(unref(rowValueClass)) }, toDisplayString(percent(unref(saturation))), 3)
481
- ], 2),
482
- createElementVNode("div", {
784
+ ], 2), createElementVNode("div", {
483
785
  "data-gr-color-picker-channel": "lightness",
484
786
  class: normalizeClass(unref(rowClass))
485
787
  }, [
@@ -489,7 +791,7 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
489
791
  }, "L", 2),
490
792
  createVNode(GrSlider_default, {
491
793
  modelValue: unref(lightness),
492
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(lightness) ? lightness.value = $event : null),
794
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => isRef(lightness) ? lightness.value = $event : null),
493
795
  size: unref(resolvedSize),
494
796
  disabled: unref(isDisabled),
495
797
  readonly: unref(isReadonly),
@@ -503,9 +805,9 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
503
805
  "aria-label"
504
806
  ]),
505
807
  createElementVNode("span", { class: normalizeClass(unref(rowValueClass)) }, toDisplayString(percent(unref(lightness))), 3)
506
- ], 2),
808
+ ], 2)], 64)) : createCommentVNode("", true),
507
809
  __props.alpha ? (openBlock(), createElementBlock("div", {
508
- key: 0,
810
+ key: 2,
509
811
  "data-gr-color-picker-channel": "alpha",
510
812
  class: normalizeClass(unref(rowClass))
511
813
  }, [
@@ -515,7 +817,7 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
515
817
  }, "A", 2),
516
818
  createVNode(GrSlider_default, {
517
819
  modelValue: unref(opacity),
518
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(opacity) ? opacity.value = $event : null),
820
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => isRef(opacity) ? opacity.value = $event : null),
519
821
  size: unref(resolvedSize),
520
822
  disabled: unref(isDisabled),
521
823
  readonly: unref(isReadonly),
@@ -530,10 +832,11 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
530
832
  ]),
531
833
  createElementVNode("span", { class: normalizeClass(unref(rowValueClass)) }, toDisplayString(percent(unref(opacity))), 3)
532
834
  ], 2)) : createCommentVNode("", true),
533
- createVNode(GrInput_default, {
835
+ createElementVNode("div", { class: normalizeClass(unref(hexRowClass)) }, [createVNode(GrInput_default, {
534
836
  modelValue: hexDraft.value,
535
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => hexDraft.value = $event),
837
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => hexDraft.value = $event),
536
838
  "data-gr-color-picker-hex": "",
839
+ class: normalizeClass(unref(hexFieldClass)),
537
840
  size: unref(resolvedSize),
538
841
  disabled: unref(isDisabled),
539
842
  readonly: unref(isReadonly),
@@ -542,13 +845,25 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
542
845
  onKeydown: withKeys(commitHex, ["enter"])
543
846
  }, null, 8, [
544
847
  "modelValue",
848
+ "class",
545
849
  "size",
546
850
  "disabled",
547
851
  "readonly",
548
852
  "aria-label"
549
- ]),
853
+ ]), showEyedropper.value ? (openBlock(), createElementBlock("button", {
854
+ key: 0,
855
+ "data-gr-color-picker-eyedropper": "",
856
+ type: "button",
857
+ class: normalizeClass(eyedropperClassName.value),
858
+ disabled: unref(isLocked),
859
+ "aria-label": unref(t)("gr.colorPicker.eyedropper", "Pick a colour from the screen"),
860
+ onClick: pickFromScreen
861
+ }, [createVNode(unref(pipette_default), {
862
+ class: normalizeClass(unref(eyedropperIconClass)),
863
+ "aria-hidden": "true"
864
+ }, null, 8, ["class"])], 10, _hoisted_8)) : createCommentVNode("", true)], 2),
550
865
  presetList.value.length ? (openBlock(), createElementBlock("div", {
551
- key: 1,
866
+ key: 3,
552
867
  "data-gr-color-picker-presets": "",
553
868
  class: normalizeClass(unref(presetsGridClass)),
554
869
  role: "group",
@@ -566,8 +881,8 @@ var GrColorPicker_default = /* @__PURE__ */ defineComponent({
566
881
  }, [createElementVNode("span", {
567
882
  class: normalizeClass(unref(swatchFillClass)),
568
883
  style: normalizeStyle({ background: preset })
569
- }, null, 6)], 10, _hoisted_6);
570
- }), 128))], 10, _hoisted_5)) : createCommentVNode("", true)
884
+ }, null, 6)], 10, _hoisted_10);
885
+ }), 128))], 10, _hoisted_9)) : createCommentVNode("", true)
571
886
  ], 6)]),
572
887
  _: 1
573
888
  }, 8, [