@feugene/granularity 0.16.0 → 0.19.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.
- package/dist/chunks/chevron-left-D8AUBAM7.js +23 -0
- package/dist/chunks/chevron-left-D8AUBAM7.js.map +1 -0
- package/dist/chunks/{chevron-right-BfqMVpbB.js → chevron-right-C6Z01h0X.js} +1 -22
- package/dist/chunks/chevron-right-C6Z01h0X.js.map +1 -0
- package/dist/chunks/config-8Pcutu1j2.js.map +1 -0
- package/dist/chunks/{config-K0C2tcLB.js → config-9PYRZlKE.js} +1 -1
- package/dist/chunks/{config-K0C2tcLB.js.map → config-9PYRZlKE.js.map} +1 -1
- package/dist/chunks/{config-Zc_bUvZY2.js → config-BDfTXHo12.js} +1 -1
- package/dist/chunks/{config-Zc_bUvZY2.js.map → config-BDfTXHo12.js.map} +1 -1
- package/dist/chunks/config-BE6n20np2.js.map +1 -0
- package/dist/chunks/config-BJ7Bv_G2.js +148 -0
- package/dist/chunks/config-BJ7Bv_G2.js.map +1 -0
- package/dist/chunks/config-BKvX0q102.js.map +1 -0
- package/dist/chunks/{config-CpwwkFBO.js → config-Baj7Wvx-.js} +1 -1
- package/dist/chunks/{config-CpwwkFBO.js.map → config-Baj7Wvx-.js.map} +1 -1
- package/dist/chunks/{config-D8tSR2uS.js → config-Be9k9bOf.js} +2 -8
- package/dist/chunks/config-Be9k9bOf.js.map +1 -0
- package/dist/chunks/config-BoNR7_PD2.js.map +1 -0
- package/dist/chunks/{config-DxCTVBfx.js → config-BsPDQ0dS.js} +2 -2
- package/dist/chunks/config-BsPDQ0dS.js.map +1 -0
- package/dist/chunks/{config-DpqOnJiz2.js → config-CDat1wXf2.js} +1 -1
- package/dist/chunks/config-CDat1wXf2.js.map +1 -0
- package/dist/chunks/config-CN2ULSQL.js.map +1 -0
- package/dist/chunks/{config-Cw6TDzWv2.js → config-COpuWGr_.js} +1 -1
- package/dist/chunks/config-COpuWGr_.js.map +1 -0
- package/dist/chunks/config-CY0_6cMi2.js.map +1 -0
- package/dist/chunks/{config-B-g6lT19.js → config-DA6SnEoy.js} +5 -2
- package/dist/chunks/config-DA6SnEoy.js.map +1 -0
- package/dist/chunks/config-DAX8Deh1.js +68 -0
- package/dist/chunks/config-DAX8Deh1.js.map +1 -0
- package/dist/chunks/config-DKdlqXiY.js.map +1 -1
- package/dist/chunks/{config-CvC0sX8p.js → config-MRvhUl-O.js} +1 -1
- package/dist/chunks/{config-CvC0sX8p.js.map → config-MRvhUl-O.js.map} +1 -1
- package/dist/chunks/config-Rw9OyW702.js.map +1 -0
- package/dist/chunks/config-ScuvHw6k2.js +42 -0
- package/dist/chunks/config-ScuvHw6k2.js.map +1 -0
- package/dist/chunks/config-T3qdQBgU2.js.map +1 -0
- package/dist/chunks/config-eXB87DOi.js.map +1 -0
- package/dist/chunks/context-BSYR7RZs.js.map +1 -1
- package/dist/chunks/{en-B3xMeswz.js → en-COdzxgAX.js} +30 -5
- package/dist/chunks/en-COdzxgAX.js.map +1 -0
- package/dist/chunks/{es-CA-mkU--.js → es-ClqJ-4hr.js} +30 -5
- package/dist/chunks/es-ClqJ-4hr.js.map +1 -0
- package/dist/chunks/{es-Bv8vvqdT.js → es-DGMHwknJ.js} +3 -3
- package/dist/chunks/{es-Bv8vvqdT.js.map → es-DGMHwknJ.js.map} +1 -1
- package/dist/chunks/generated-BRkbhyxk.js +3270 -0
- package/dist/chunks/generated-BRkbhyxk.js.map +1 -0
- package/dist/chunks/grKbdStyles-CeZhGQHr.js +43 -0
- package/dist/chunks/grKbdStyles-CeZhGQHr.js.map +1 -0
- package/dist/chunks/{grTextareaStyles-CWI2SqC8.js → grTextareaStyles-iOcHuVMM.js} +2 -2
- package/dist/chunks/{grTextareaStyles-CWI2SqC8.js.map → grTextareaStyles-iOcHuVMM.js.map} +1 -1
- package/dist/chunks/{granular-provider-CtrXGa7c.js → granular-provider-C6uAujdJ.js} +23 -21
- package/dist/chunks/granular-provider-C6uAujdJ.js.map +1 -0
- package/dist/chunks/grip-vertical-lRha2S7q.js +16 -0
- package/dist/chunks/grip-vertical-lRha2S7q.js.map +1 -0
- package/dist/chunks/icon-Dag2tIMs.js +21 -0
- package/dist/chunks/icon-Dag2tIMs.js.map +1 -0
- package/dist/chunks/{keyboard-zYvvyHd4.js → keyboard-DE2yhz_b.js} +10 -1
- package/dist/chunks/keyboard-DE2yhz_b.js.map +1 -0
- package/dist/chunks/{optionFilter-BVY988pC.js → optionFilter-DYw9XPPx.js} +1 -71
- package/dist/chunks/optionFilter-DYw9XPPx.js.map +1 -0
- package/dist/chunks/{useOverlayLayer-BupuP_hs.js → overlayStack-C8cfsqXa.js} +11 -61
- package/dist/chunks/overlayStack-C8cfsqXa.js.map +1 -0
- package/dist/chunks/{portalRoot-CWD4zHBm.js → portalRoot-CVhCgdG6.js} +10 -1
- package/dist/chunks/{portalRoot-CWD4zHBm.js.map → portalRoot-CVhCgdG6.js.map} +1 -1
- package/dist/chunks/{ru-COWxgh2A.js → ru-9z8ix45c.js} +30 -5
- package/dist/chunks/ru-9z8ix45c.js.map +1 -0
- package/dist/chunks/useDragSort-0l47h4yb.js +265 -0
- package/dist/chunks/useDragSort-0l47h4yb.js.map +1 -0
- package/dist/chunks/{useModalOverlay-DCM4d3yA.js → useModalOverlay-DrQVYwwA.js} +2 -2
- package/dist/chunks/{useModalOverlay-DCM4d3yA.js.map → useModalOverlay-DrQVYwwA.js.map} +1 -1
- package/dist/chunks/{usePortalTarget-RyzEgNTb.js → usePortalTarget-Cn-Wiz5d.js} +1 -1
- package/dist/chunks/{usePortalTarget-RyzEgNTb.js.map → usePortalTarget-Cn-Wiz5d.js.map} +1 -1
- package/dist/components/GrAutocomplete/chunks/{GrAutocomplete-CQ9T7Lly.js → GrAutocomplete-gY4Xopza.js} +35 -26
- package/dist/components/GrAutocomplete/chunks/GrAutocomplete-gY4Xopza.js.map +1 -0
- package/dist/components/GrAutocomplete/index.js +1 -1
- package/dist/components/GrAutocomplete/styles.css +1 -1
- package/dist/components/GrBreadcrumbs/chunks/{GrBreadcrumbs-BCNGDS6k.js → GrBreadcrumbs-DS_-PBVt.js} +8 -7
- package/dist/components/GrBreadcrumbs/chunks/GrBreadcrumbs-DS_-PBVt.js.map +1 -0
- package/dist/components/GrBreadcrumbs/index.js +1 -1
- package/dist/components/GrCollapse/chunks/{GrCollapse-B2Fc6A9r.js.map → GrCollapse-Kk0DE8tb.js.map} +1 -1
- package/dist/components/GrCollapse/index.js +1 -1
- package/dist/components/GrColorPicker/chunks/{GrColorPicker-bnYBRGk8.js → GrColorPicker-CkBTzkqn.js} +4 -4
- package/dist/components/GrColorPicker/chunks/{GrColorPicker-bnYBRGk8.js.map → GrColorPicker-CkBTzkqn.js.map} +1 -1
- package/dist/components/GrColorPicker/index.js +2 -2
- package/dist/components/GrCommandPalette/chunks/{GrCommandPalette-MWDYDPNC.js → GrCommandPalette-BugTlGdj.js} +41 -16
- package/dist/components/GrCommandPalette/chunks/GrCommandPalette-BugTlGdj.js.map +1 -0
- package/dist/components/GrCommandPalette/index.js +2 -2
- package/dist/components/GrCommandPalette/styles.css +1 -1
- package/dist/components/GrConfigProvider/index.js +2 -2
- package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-DaQmlp1_.js → GrConfirmDialog-Ds5T0GiR.js} +1 -1
- package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-DaQmlp1_.js.map → GrConfirmDialog-Ds5T0GiR.js.map} +1 -1
- package/dist/components/GrConfirmDialog/index.js +1 -1
- package/dist/components/GrDataTable/chunks/{GrDataTable-DVFho9Cj.js → GrDataTable-CYe2A2WA.js} +498 -48
- package/dist/components/GrDataTable/chunks/GrDataTable-CYe2A2WA.js.map +1 -0
- package/dist/components/GrDataTable/index.js +2 -2
- package/dist/components/GrDialog/chunks/{GrDialog-AE1gIZuz.js → GrDialog-C3tYaA8v.js} +1 -1
- package/dist/components/GrDialog/chunks/{GrDialog-AE1gIZuz.js.map → GrDialog-C3tYaA8v.js.map} +1 -1
- package/dist/components/GrDialog/index.js +1 -1
- package/dist/components/GrDialogService/chunks/{GrDialogService-B4DYWDkA.js → GrDialogService-CTBiiJDI.js} +3 -3
- package/dist/components/GrDialogService/chunks/{GrDialogService-B4DYWDkA.js.map → GrDialogService-CTBiiJDI.js.map} +1 -1
- package/dist/components/GrDialogService/index.js +1 -1
- package/dist/components/GrDivider/chunks/{GrDivider-B2Xwc_QO.js → GrDivider-xxq1_fIl.js} +1 -1
- package/dist/components/GrDivider/chunks/{GrDivider-B2Xwc_QO.js.map → GrDivider-xxq1_fIl.js.map} +1 -1
- package/dist/components/GrDivider/index.js +2 -2
- package/dist/components/GrDrawer/chunks/{GrDrawer-DQwi6aRw.js → GrDrawer-BSSuiNHU.js} +1 -1
- package/dist/components/GrDrawer/chunks/{GrDrawer-DQwi6aRw.js.map → GrDrawer-BSSuiNHU.js.map} +1 -1
- package/dist/components/GrDrawer/index.js +1 -1
- package/dist/components/GrDropdown/chunks/{GrDropdown-BLng6V1m.js → GrDropdown-Bh6UK2M5.js} +3 -3
- package/dist/components/GrDropdown/chunks/{GrDropdown-BLng6V1m.js.map → GrDropdown-Bh6UK2M5.js.map} +1 -1
- package/dist/components/GrDropdown/index.js +1 -1
- package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-BImk2Vs7.js → GrDropdownMenu-LyfEFUbg.js} +2 -2
- package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-BImk2Vs7.js.map → GrDropdownMenu-LyfEFUbg.js.map} +1 -1
- package/dist/components/GrDropdownMenu/index.js +2 -2
- package/dist/components/GrFileUpload/chunks/{GrFileUpload-D0B-BEsd.js → GrFileUpload-DuDzC43S.js} +2 -2
- package/dist/components/GrFileUpload/chunks/{GrFileUpload-D0B-BEsd.js.map → GrFileUpload-DuDzC43S.js.map} +1 -1
- package/dist/components/GrFileUpload/index.js +1 -1
- package/dist/components/GrImageViewer/chunks/{GrImageViewer-BeCnE8XQ.js → GrImageViewer-DfD4euH5.js} +48 -23
- package/dist/components/GrImageViewer/chunks/GrImageViewer-DfD4euH5.js.map +1 -0
- package/dist/components/GrImageViewer/index.js +1 -1
- package/dist/components/GrInput/chunks/{GrInput-DD2gYdqS.js → GrInput-2wd7Crs0.js} +1 -1
- package/dist/components/GrInput/chunks/GrInput-2wd7Crs0.js.map +1 -0
- package/dist/components/GrInput/index.js +1 -1
- package/dist/components/GrInputTag/chunks/{GrInputTag-DmNunixz.js → GrInputTag-CyV2eY7Z.js} +20 -33
- package/dist/components/GrInputTag/chunks/GrInputTag-CyV2eY7Z.js.map +1 -0
- package/dist/components/GrInputTag/index.js +1 -1
- package/dist/components/GrKbd/chunks/{GrKbd-DRFPvW3G.js → GrKbd-DU2lBkRV.js} +218 -52
- package/dist/components/GrKbd/chunks/GrKbd-DU2lBkRV.js.map +1 -0
- package/dist/components/GrKbd/index.js +3 -3
- package/dist/components/GrModal/chunks/{GrModal-B8I78T0N.js → GrModal-CbMMr6W1.js} +1 -1
- package/dist/components/GrModal/chunks/{GrModal-B8I78T0N.js.map → GrModal-CbMMr6W1.js.map} +1 -1
- package/dist/components/GrModal/index.js +1 -1
- package/dist/components/GrNumberInput/chunks/{GrNumberInput-CZOyPz4J.js → GrNumberInput-B5CHZDBj.js} +2 -1
- package/dist/components/GrNumberInput/chunks/{GrNumberInput-CZOyPz4J.js.map → GrNumberInput-B5CHZDBj.js.map} +1 -1
- package/dist/components/GrNumberInput/index.js +1 -1
- package/dist/components/GrPagination/chunks/{GrPagination-B6N0QZBf.js → GrPagination-BM4FrD6Q.js} +4 -4
- package/dist/components/GrPagination/chunks/GrPagination-BM4FrD6Q.js.map +1 -0
- package/dist/components/GrPagination/index.js +1 -1
- package/dist/components/GrPopover/chunks/{GrPopover-B1eRCOoO.js → GrPopover-DMH4Jjst.js} +1 -1
- package/dist/components/GrPopover/chunks/{GrPopover-B1eRCOoO.js.map → GrPopover-DMH4Jjst.js.map} +1 -1
- package/dist/components/GrPopover/index.js +1 -1
- package/dist/components/GrProgressBar/chunks/{GrProgressBar-BiHnaitu.js → GrProgressBar-xwbNM9QB.js} +1 -1
- package/dist/components/GrProgressBar/chunks/GrProgressBar-xwbNM9QB.js.map +1 -0
- package/dist/components/GrProgressBar/index.js +1 -1
- package/dist/components/GrProgressCircle/chunks/{GrProgressCircle-CTogjcHz.js → GrProgressCircle-B8olXRo5.js} +1 -1
- package/dist/components/GrProgressCircle/chunks/{GrProgressCircle-CTogjcHz.js.map → GrProgressCircle-B8olXRo5.js.map} +1 -1
- package/dist/components/GrProgressCircle/index.js +2 -2
- package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-Ct174NVD.js → GrPromptDialog-Pwr9NPxK.js} +3 -3
- package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-Ct174NVD.js.map → GrPromptDialog-Pwr9NPxK.js.map} +1 -1
- package/dist/components/GrPromptDialog/index.js +1 -1
- package/dist/components/GrRadio/chunks/{GrRadio-DksDro_U.js → GrRadio-DWiRaMzt.js} +8 -32
- package/dist/components/GrRadio/chunks/GrRadio-DWiRaMzt.js.map +1 -0
- package/dist/components/GrRadio/index.js +1 -1
- package/dist/components/GrRadioGroup/chunks/{GrRadioGroup-BOIhejE6.js → GrRadioGroup-DIuBw0wk.js} +34 -27
- package/dist/components/GrRadioGroup/chunks/GrRadioGroup-DIuBw0wk.js.map +1 -0
- package/dist/components/GrRadioGroup/index.js +1 -1
- package/dist/components/GrRating/chunks/{GrRating-JrHXz0Rv.js → GrRating-DVFH3lYu.js} +10 -9
- package/dist/components/GrRating/chunks/GrRating-DVFH3lYu.js.map +1 -0
- package/dist/components/GrRating/index.js +2 -2
- package/dist/components/GrSegmented/chunks/{GrSegmented-BQIlH5KI.js → GrSegmented-CQw3ijqa.js} +47 -65
- package/dist/components/GrSegmented/chunks/GrSegmented-CQw3ijqa.js.map +1 -0
- package/dist/components/GrSegmented/index.js +1 -1
- package/dist/components/GrSelect/chunks/{GrSelect-aqkPCqjd.js → GrSelect-B-Voni7D.js} +69 -55
- package/dist/components/GrSelect/chunks/GrSelect-B-Voni7D.js.map +1 -0
- package/dist/components/GrSelect/index.js +1 -1
- package/dist/components/GrSelect/styles.css +1 -1
- package/dist/components/GrSidebar/chunks/{GrSidebar-DRGnnViw.js → GrSidebar-i7AxjhY_.js} +3 -2
- package/dist/components/GrSidebar/chunks/{GrSidebar-DRGnnViw.js.map → GrSidebar-i7AxjhY_.js.map} +1 -1
- package/dist/components/GrSidebar/index.js +2 -2
- package/dist/components/GrSkeleton/index.js +1 -1
- package/dist/components/GrSlider/chunks/{GrSlider-DkU9IQSX.js → GrSlider-CyhVsNKn.js} +21 -34
- package/dist/components/GrSlider/chunks/GrSlider-CyhVsNKn.js.map +1 -0
- package/dist/components/GrSlider/index.js +2 -2
- package/dist/components/GrSortableList/chunks/GrSortableList-XB7mXM1W.js +277 -0
- package/dist/components/GrSortableList/chunks/GrSortableList-XB7mXM1W.js.map +1 -0
- package/dist/components/GrSortableList/index.js +3 -0
- package/dist/components/GrSplitter/chunks/{GrSplitter-7To8jbJ8.js → GrSplitter-BzxVQwbY.js} +17 -37
- package/dist/components/GrSplitter/chunks/GrSplitter-BzxVQwbY.js.map +1 -0
- package/dist/components/GrSplitter/index.js +2 -2
- package/dist/components/GrStatistic/chunks/{GrStatistic-CttyoYPT.js → GrStatistic-DOsM6s5V.js} +54 -7
- package/dist/components/GrStatistic/chunks/GrStatistic-DOsM6s5V.js.map +1 -0
- package/dist/components/GrStatistic/index.js +2 -2
- package/dist/components/GrSwitch/chunks/{GrSwitch-B9TYbiih.js → GrSwitch-DpyvVrZG.js} +1 -1
- package/dist/components/GrSwitch/chunks/{GrSwitch-B9TYbiih.js.map → GrSwitch-DpyvVrZG.js.map} +1 -1
- package/dist/components/GrSwitch/index.js +2 -2
- package/dist/components/GrTabPanels/index.js +1 -1
- package/dist/components/GrTable/chunks/{GrTable-BB-mI_NM.js → GrTable-BfqgwETQ.js} +7 -1
- package/dist/components/GrTable/chunks/GrTable-BfqgwETQ.js.map +1 -0
- package/dist/components/GrTable/index.js +1 -1
- package/dist/components/GrTabs/chunks/{GrTabs-B8CDq2D9.js → GrTabs-f3-oQenu.js} +55 -65
- package/dist/components/GrTabs/chunks/GrTabs-f3-oQenu.js.map +1 -0
- package/dist/components/GrTabs/index.js +1 -1
- package/dist/components/GrTextarea/chunks/{GrTextarea-DUh5Tlo4.js → GrTextarea-DSvd1nSy.js} +1 -1
- package/dist/components/GrTextarea/chunks/{GrTextarea-DUh5Tlo4.js.map → GrTextarea-DSvd1nSy.js.map} +1 -1
- package/dist/components/GrTextarea/index.js +2 -2
- package/dist/components/GrTimeline/chunks/{GrTimeline-CE9b3s18.js → GrTimeline-B-h2Yanw.js} +1 -1
- package/dist/components/GrTimeline/chunks/{GrTimeline-CE9b3s18.js.map → GrTimeline-B-h2Yanw.js.map} +1 -1
- package/dist/components/GrTimeline/index.js +2 -2
- package/dist/components/GrToaster/chunks/{GrToaster-BKQy3Srm.js → GrToaster-Dqja0Lf9.js} +114 -13
- package/dist/components/GrToaster/chunks/GrToaster-Dqja0Lf9.js.map +1 -0
- package/dist/components/GrToaster/index.js +2 -2
- package/dist/components/GrToaster/styles.css +1 -1
- package/dist/components/GrTooltip/chunks/{GrTooltip-DEbejfhA.js → GrTooltip-Cn08heWz.js} +2 -2
- package/dist/components/GrTooltip/chunks/{GrTooltip-DEbejfhA.js.map → GrTooltip-Cn08heWz.js.map} +1 -1
- package/dist/components/GrTooltip/index.js +2 -2
- package/dist/components/GrTree/chunks/{GrTree-wfdbvygw.js → GrTree-BR9a2pay.js} +148 -111
- package/dist/components/GrTree/chunks/GrTree-BR9a2pay.js.map +1 -0
- package/dist/components/GrTree/index.js +2 -2
- package/dist/components/GrTree/styles.css +1 -1
- package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-lLWmAMtI.js → GrTreeSelect--muUeB0v.js} +28 -14
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect--muUeB0v.js.map +1 -0
- package/dist/components/GrTreeSelect/index.js +1 -1
- package/dist/composables/useAnnouncer.js +1 -1
- package/dist/composables/useComboboxNavigation.js +71 -0
- package/dist/composables/useComboboxNavigation.js.map +1 -0
- package/dist/composables/useDismissible.js +1 -1
- package/dist/composables/useDragGesture.js +55 -0
- package/dist/composables/useDragGesture.js.map +1 -0
- package/dist/composables/useDragSort.js +2 -0
- package/dist/composables/useFloating.js +22 -1
- package/dist/composables/useFloating.js.map +1 -1
- package/dist/composables/useGrComponentConfig.js +2 -0
- package/dist/composables/useGranularityTranslations.js +2 -0
- package/dist/composables/useOverlayLayer.js +64 -1
- package/dist/composables/useOverlayLayer.js.map +1 -0
- package/dist/composables/usePortalTarget.js +1 -1
- package/dist/composables/useRovingFocus.js +150 -0
- package/dist/composables/useRovingFocus.js.map +1 -0
- package/dist/directives/hotkey.js +13 -7
- package/dist/directives/hotkey.js.map +1 -1
- package/dist/directives/loading.js +1 -1
- package/dist/granular-provider-node.js +1 -1
- package/dist/granular-provider.js +1 -1
- package/dist/i18n/all.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/index.js +77 -68
- package/dist/styles/themes/dark.css +6 -1
- package/dist/testing.js +199 -0
- package/dist/testing.js.map +1 -0
- package/dist/theme-apply.js +33 -0
- package/dist/theme-apply.js.map +1 -0
- package/dist/theme.js +501 -0
- package/dist/theme.js.map +1 -0
- package/dist/tokens.js +1 -3131
- package/dist/types/src/components/GrAlert/defaults.d.ts +1 -1
- package/dist/types/src/components/GrAutocomplete/defaults.d.ts +1 -1
- package/dist/types/src/components/GrAvatar/defaults.d.ts +1 -1
- package/dist/types/src/components/GrBadge/defaults.d.ts +1 -1
- package/dist/types/src/components/GrBottomNav/defaults.d.ts +1 -1
- package/dist/types/src/components/GrBreadcrumbs/defaults.d.ts +1 -1
- package/dist/types/src/components/GrBreadcrumbs/grBreadcrumbsStyles.d.ts +5 -2
- package/dist/types/src/components/GrButton/defaults.d.ts +1 -1
- package/dist/types/src/components/GrCard/defaults.d.ts +1 -1
- package/dist/types/src/components/GrCheckbox/defaults.d.ts +1 -1
- package/dist/types/src/components/GrCheckboxGroup/defaults.d.ts +1 -1
- package/dist/types/src/components/GrCollapse/defaults.d.ts +1 -1
- package/dist/types/src/components/GrColorPicker/defaults.d.ts +1 -1
- package/dist/types/src/components/GrColorPicker/grColorPickerStyles.d.ts +2 -2
- package/dist/types/src/components/GrCommandPalette/GrCommandPalette.vue.d.ts +6 -6
- package/dist/types/src/components/GrCommandPalette/defaults.d.ts +1 -1
- package/dist/types/src/components/GrCommandPalette/filtering.d.ts +6 -2
- package/dist/types/src/components/GrConfigProvider/context.d.ts +6 -22
- package/dist/types/src/components/GrConfigProvider/index.d.ts +1 -1
- package/dist/types/src/components/GrConfirmDialog/defaults.d.ts +1 -1
- package/dist/types/src/components/GrDataTable/GrDataTable.vue.d.ts +53 -0
- package/dist/types/src/components/GrDataTable/defaults.d.ts +1 -1
- package/dist/types/src/components/GrDataTable/grDataTableStyles.d.ts +38 -0
- package/dist/types/src/components/GrDialog/defaults.d.ts +1 -1
- package/dist/types/src/components/GrDivider/defaults.d.ts +1 -1
- package/dist/types/src/components/GrDrawer/defaults.d.ts +1 -1
- package/dist/types/src/components/GrEmptyState/defaults.d.ts +1 -1
- package/dist/types/src/components/GrFileUpload/defaults.d.ts +1 -1
- package/dist/types/src/components/GrFormField/defaults.d.ts +1 -1
- package/dist/types/src/components/GrFormFile/defaults.d.ts +1 -1
- package/dist/types/src/components/GrFormSection/defaults.d.ts +1 -1
- package/dist/types/src/components/GrIcon/defaults.d.ts +1 -1
- package/dist/types/src/components/GrImageViewer/composables/usePointerGestures.d.ts +1 -0
- package/dist/types/src/components/GrImageViewer/composables/useZoomPan.d.ts +1 -2
- package/dist/types/src/components/GrInput/defaults.d.ts +1 -1
- package/dist/types/src/components/GrInputTag/defaults.d.ts +1 -1
- package/dist/types/src/components/GrKbd/GrKbd.vue.d.ts +18 -3
- package/dist/types/src/components/GrKbd/defaults.d.ts +1 -1
- package/dist/types/src/components/GrKbd/grKbdStyles.d.ts +20 -3
- package/dist/types/src/components/GrKbd/index.d.ts +6 -0
- package/dist/types/src/components/GrLink/defaults.d.ts +1 -1
- package/dist/types/src/components/GrModal/defaults.d.ts +1 -1
- package/dist/types/src/components/GrNumberInput/defaults.d.ts +1 -1
- package/dist/types/src/components/GrPagination/defaults.d.ts +1 -1
- package/dist/types/src/components/GrPopover/GrPopover.vue.d.ts +1 -1
- package/dist/types/src/components/GrPopover/defaults.d.ts +1 -1
- package/dist/types/src/components/GrProgressBar/defaults.d.ts +1 -1
- package/dist/types/src/components/GrProgressCircle/defaults.d.ts +1 -1
- package/dist/types/src/components/GrProgressCircle/grProgressCircleStyles.d.ts +1 -1
- package/dist/types/src/components/GrPromptDialog/defaults.d.ts +1 -1
- package/dist/types/src/components/GrRadio/defaults.d.ts +1 -1
- package/dist/types/src/components/GrRadio/grRadioGroupContext.d.ts +12 -4
- package/dist/types/src/components/GrRadioGroup/defaults.d.ts +1 -1
- package/dist/types/src/components/GrRating/GrRating.vue.d.ts +9 -4
- package/dist/types/src/components/GrRating/defaults.d.ts +1 -1
- package/dist/types/src/components/GrSegmented/defaults.d.ts +1 -1
- package/dist/types/src/components/GrSelect/defaults.d.ts +1 -1
- package/dist/types/src/components/GrSlider/defaults.d.ts +1 -1
- package/dist/types/src/components/GrSortableList/GrSortableList.vue.d.ts +68 -0
- package/dist/types/src/components/GrSortableList/config.d.ts +1 -0
- package/dist/types/src/components/GrSortableList/grSortableListStyles.d.ts +37 -0
- package/dist/types/src/components/GrSortableList/index.d.ts +9 -0
- package/dist/types/src/components/GrSortableList/safelist.d.ts +1 -0
- package/dist/types/src/components/GrSplitter/defaults.d.ts +1 -1
- package/dist/types/src/components/GrStatistic/GrStatistic.vue.d.ts +12 -9
- package/dist/types/src/components/GrStatistic/defaults.d.ts +1 -1
- package/dist/types/src/components/GrStatistic/grStatisticStyles.d.ts +1 -2
- package/dist/types/src/components/GrSwitch/defaults.d.ts +1 -1
- package/dist/types/src/components/GrTable/GrTable.vue.d.ts +13 -0
- package/dist/types/src/components/GrTable/defaults.d.ts +1 -1
- package/dist/types/src/components/GrTabs/GrTabs.vue.d.ts +6 -2
- package/dist/types/src/components/GrTabs/defaults.d.ts +1 -1
- package/dist/types/src/components/GrTextarea/defaults.d.ts +1 -1
- package/dist/types/src/components/GrTextarea/grTextareaStyles.d.ts +2 -2
- package/dist/types/src/components/GrTimeline/defaults.d.ts +1 -1
- package/dist/types/src/components/GrTimeline/grTimelineStyles.d.ts +1 -1
- package/dist/types/src/components/GrToaster/GrToaster.vue.d.ts +8 -0
- package/dist/types/src/components/GrToaster/grToasterStyles.d.ts +27 -0
- package/dist/types/src/components/GrTooltip/defaults.d.ts +1 -1
- package/dist/types/src/components/GrTree/defaults.d.ts +1 -1
- package/dist/types/src/components/GrTree/grTreeInteractionContext.d.ts +0 -1
- package/dist/types/src/components/GrTree/grTreeProps.d.ts +11 -4
- package/dist/types/src/components/GrTree/safelist.d.ts +1 -1
- package/dist/types/src/components/GrTreeSelect/defaults.d.ts +1 -1
- package/dist/types/src/components/shared/hotkey.d.ts +7 -15
- package/dist/types/src/components/shared/hotkeyTokens.d.ts +37 -0
- package/dist/types/src/components/shared/icon.d.ts +13 -0
- package/dist/types/src/composables/internal/dragSortGeometry.d.ts +59 -0
- package/dist/types/src/composables/internal/overlayStack.d.ts +11 -0
- package/dist/types/src/composables/useDragGesture.d.ts +63 -0
- package/dist/types/src/composables/useDragSort.d.ts +80 -0
- package/dist/types/src/composables/useFloating.d.ts +5 -1
- package/dist/types/src/composables/useGrComponentConfig.d.ts +41 -0
- package/dist/types/src/composables/useGranularityTranslations.d.ts +13 -0
- package/dist/types/src/composables/useRovingFocus.d.ts +108 -0
- package/dist/types/src/granular-provider/shared.d.ts +1 -0
- package/dist/types/src/i18n/messages/en.d.ts +48 -0
- package/dist/types/src/i18n/messages/es.d.ts +48 -0
- package/dist/types/src/i18n/messages/ru.d.ts +48 -0
- package/dist/types/src/index.d.ts +12 -0
- package/dist/types/src/internal/keyboard.d.ts +6 -0
- package/dist/types/src/testing/announcer.d.ts +10 -0
- package/dist/types/src/testing/context.d.ts +36 -0
- package/dist/types/src/testing/env.d.ts +25 -0
- package/dist/types/src/testing/geometry.d.ts +23 -0
- package/dist/types/src/testing/index.d.ts +12 -0
- package/dist/types/src/testing/pointer.d.ts +31 -0
- package/dist/types/src/theme/apply.d.ts +27 -0
- package/dist/types/src/theme/color.d.ts +35 -0
- package/dist/types/src/theme/extendTheme.d.ts +63 -0
- package/dist/types/src/theme/index.d.ts +22 -0
- package/dist/types/src/theme/roles.d.ts +16 -0
- package/dist/types/src/theme/tone.d.ts +32 -0
- package/dist/types/src/theme/validate.d.ts +16 -0
- package/dist/types/src/tokens/types.d.ts +8 -0
- package/dist/web-types.json +214 -13
- package/package.json +47 -4
- package/tokens/themes/dark.json +2 -1
- package/dist/chunks/chevron-right-BfqMVpbB.js.map +0 -1
- package/dist/chunks/config-8Pcutu1j.js.map +0 -1
- package/dist/chunks/config-B-g6lT19.js.map +0 -1
- package/dist/chunks/config-BE6n20np.js.map +0 -1
- package/dist/chunks/config-BKvX0q10.js.map +0 -1
- package/dist/chunks/config-BNfQwyL4.js +0 -97
- package/dist/chunks/config-BNfQwyL4.js.map +0 -1
- package/dist/chunks/config-BoNR7_PD.js.map +0 -1
- package/dist/chunks/config-CN2ULSQL2.js.map +0 -1
- package/dist/chunks/config-CY0_6cMi.js.map +0 -1
- package/dist/chunks/config-Cw6TDzWv2.js.map +0 -1
- package/dist/chunks/config-D8tSR2uS.js.map +0 -1
- package/dist/chunks/config-DpqOnJiz2.js.map +0 -1
- package/dist/chunks/config-DxCTVBfx.js.map +0 -1
- package/dist/chunks/config-LGrZIdaZ.js +0 -21
- package/dist/chunks/config-LGrZIdaZ.js.map +0 -1
- package/dist/chunks/config-Rw9OyW70.js.map +0 -1
- package/dist/chunks/config-T3qdQBgU.js.map +0 -1
- package/dist/chunks/config-eXB87DOi2.js.map +0 -1
- package/dist/chunks/en-B3xMeswz.js.map +0 -1
- package/dist/chunks/es-CA-mkU--.js.map +0 -1
- package/dist/chunks/grKbdStyles-DAoxiytu.js +0 -31
- package/dist/chunks/grKbdStyles-DAoxiytu.js.map +0 -1
- package/dist/chunks/granular-provider-CtrXGa7c.js.map +0 -1
- package/dist/chunks/keyboard-zYvvyHd4.js.map +0 -1
- package/dist/chunks/optionFilter-BVY988pC.js.map +0 -1
- package/dist/chunks/ru-COWxgh2A.js.map +0 -1
- package/dist/chunks/useOverlayLayer-BupuP_hs.js.map +0 -1
- package/dist/components/GrAutocomplete/chunks/GrAutocomplete-CQ9T7Lly.js.map +0 -1
- package/dist/components/GrBreadcrumbs/chunks/GrBreadcrumbs-BCNGDS6k.js.map +0 -1
- package/dist/components/GrCommandPalette/chunks/GrCommandPalette-MWDYDPNC.js.map +0 -1
- package/dist/components/GrDataTable/chunks/GrDataTable-DVFho9Cj.js.map +0 -1
- package/dist/components/GrImageViewer/chunks/GrImageViewer-BeCnE8XQ.js.map +0 -1
- package/dist/components/GrInput/chunks/GrInput-DD2gYdqS.js.map +0 -1
- package/dist/components/GrInputTag/chunks/GrInputTag-DmNunixz.js.map +0 -1
- package/dist/components/GrKbd/chunks/GrKbd-DRFPvW3G.js.map +0 -1
- package/dist/components/GrPagination/chunks/GrPagination-B6N0QZBf.js.map +0 -1
- package/dist/components/GrProgressBar/chunks/GrProgressBar-BiHnaitu.js.map +0 -1
- package/dist/components/GrRadio/chunks/GrRadio-DksDro_U.js.map +0 -1
- package/dist/components/GrRadioGroup/chunks/GrRadioGroup-BOIhejE6.js.map +0 -1
- package/dist/components/GrRating/chunks/GrRating-JrHXz0Rv.js.map +0 -1
- package/dist/components/GrSegmented/chunks/GrSegmented-BQIlH5KI.js.map +0 -1
- package/dist/components/GrSelect/chunks/GrSelect-aqkPCqjd.js.map +0 -1
- package/dist/components/GrSlider/chunks/GrSlider-DkU9IQSX.js.map +0 -1
- package/dist/components/GrSplitter/chunks/GrSplitter-7To8jbJ8.js.map +0 -1
- package/dist/components/GrStatistic/chunks/GrStatistic-CttyoYPT.js.map +0 -1
- package/dist/components/GrTable/chunks/GrTable-BB-mI_NM.js.map +0 -1
- package/dist/components/GrTabs/chunks/GrTabs-B8CDq2D9.js.map +0 -1
- package/dist/components/GrToaster/chunks/GrToaster-BKQy3Srm.js.map +0 -1
- package/dist/components/GrTree/chunks/GrTree-wfdbvygw.js.map +0 -1
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-lLWmAMtI.js.map +0 -1
- package/dist/tokens.js.map +0 -1
- package/dist/chunks/{config-8Pcutu1j.js → config-8Pcutu1j2.js} +0 -0
- package/dist/chunks/{config-BE6n20np.js → config-BE6n20np2.js} +0 -0
- package/dist/chunks/{config-BKvX0q10.js → config-BKvX0q102.js} +0 -0
- package/dist/chunks/{config-BoNR7_PD.js → config-BoNR7_PD2.js} +0 -0
- package/dist/chunks/{config-CN2ULSQL2.js → config-CN2ULSQL.js} +0 -0
- package/dist/chunks/{config-CY0_6cMi.js → config-CY0_6cMi2.js} +0 -0
- package/dist/chunks/{config-Rw9OyW70.js → config-Rw9OyW702.js} +0 -0
- package/dist/chunks/{config-T3qdQBgU.js → config-T3qdQBgU2.js} +0 -0
- package/dist/chunks/{config-eXB87DOi2.js → config-eXB87DOi.js} +0 -0
- package/dist/components/GrCollapse/chunks/{GrCollapse-B2Fc6A9r.js → GrCollapse-Kk0DE8tb.js} +1 -1
- /package/dist/types/src/composables/{internal/useComboboxNavigation.d.ts → useComboboxNavigation.d.ts} +0 -0
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { o as useGrComponentSize } from "../../../chunks/context-BSYR7RZs.js";
|
|
2
2
|
import { n as useGranularityTranslations } from "../../../chunks/granularityI18n-BC5zsj_d.js";
|
|
3
|
+
import { t as loader_circle_default } from "../../../chunks/loader-circle-CfVLz7lb.js";
|
|
3
4
|
import { useVirtualList } from "../../../composables/useVirtualList.js";
|
|
4
5
|
import { t as _plugin_vue_export_helper_default } from "../../../chunks/_plugin-vue_export-helper-BOaGB7Aw.js";
|
|
5
|
-
import {
|
|
6
|
+
import { t as check_default } from "../../../chunks/check-BZI24Qs4.js";
|
|
7
|
+
import { n as iconTag, t as iconClass } from "../../../chunks/icon-Dag2tIMs.js";
|
|
8
|
+
import { t as minus_default } from "../../../chunks/minus-oxdbHF33.js";
|
|
9
|
+
import { useAnnouncer } from "../../../composables/useAnnouncer.js";
|
|
10
|
+
import { t as useDragSort } from "../../../chunks/useDragSort-0l47h4yb.js";
|
|
11
|
+
import { useRovingFocus } from "../../../composables/useRovingFocus.js";
|
|
12
|
+
import { t as grip_vertical_default } from "../../../chunks/grip-vertical-lRha2S7q.js";
|
|
13
|
+
import { t as chevron_right_default } from "../../../chunks/chevron-right-C6Z01h0X.js";
|
|
14
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onUnmounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toValue, unref, watch, withModifiers } from "vue";
|
|
6
15
|
import '../styles.css';//#region src/components/GrTree/grTreeDataAdapter.ts
|
|
7
16
|
var DEFAULT_CHILDREN_KEY = "children";
|
|
8
17
|
var DEFAULT_LABEL_KEY = "label";
|
|
@@ -68,7 +77,6 @@ function createGrTreeDataAdapter(options) {
|
|
|
68
77
|
//#region src/components/GrTree/grTreeInteractionContext.ts
|
|
69
78
|
function createGrTreeInteractionContext(options, emitters) {
|
|
70
79
|
const hoveredKey = ref(void 0);
|
|
71
|
-
const focusedKey = ref(void 0);
|
|
72
80
|
const draggingNode = shallowRef(null);
|
|
73
81
|
const dropTarget = shallowRef(null);
|
|
74
82
|
const nodeEls = /* @__PURE__ */ new Map();
|
|
@@ -95,7 +103,6 @@ function createGrTreeInteractionContext(options, emitters) {
|
|
|
95
103
|
}
|
|
96
104
|
return {
|
|
97
105
|
hoveredKey,
|
|
98
|
-
focusedKey,
|
|
99
106
|
nodeEls,
|
|
100
107
|
registerNodeEl,
|
|
101
108
|
draggingNode,
|
|
@@ -597,25 +604,19 @@ var _hoisted_2 = [
|
|
|
597
604
|
var _hoisted_3 = [
|
|
598
605
|
"onClick",
|
|
599
606
|
"onContextmenu",
|
|
600
|
-
"onDrop",
|
|
601
|
-
"onDragover",
|
|
602
607
|
"onMouseenter",
|
|
603
608
|
"onMouseleave"
|
|
604
609
|
];
|
|
605
610
|
var _hoisted_4 = [
|
|
606
611
|
"aria-label",
|
|
607
|
-
"
|
|
608
|
-
"
|
|
612
|
+
"aria-disabled",
|
|
613
|
+
"onPointerdown"
|
|
609
614
|
];
|
|
610
615
|
var _hoisted_5 = ["aria-label", "onClick"];
|
|
611
|
-
var _hoisted_6 =
|
|
612
|
-
|
|
613
|
-
"data-gr-tree-loading": "",
|
|
614
|
-
class: "gr-tree__toggle-icon animate-spin i-lucide-loader-circle"
|
|
615
|
-
};
|
|
616
|
-
var _hoisted_7 = ["onClick"];
|
|
617
|
-
var _hoisted_8 = { class: "gr-tree__label" };
|
|
616
|
+
var _hoisted_6 = ["onClick"];
|
|
617
|
+
var _hoisted_7 = { class: "gr-tree__label" };
|
|
618
618
|
var DEFAULT_BRANCH_LINE_COLOR = "var(--gr-tree-branch-line-default-color, var(--gr-brd))";
|
|
619
|
+
/** Стрелки, которые вместе с `Shift` двигают узел, а не фокус. */
|
|
619
620
|
var TREE_ROW_GAP = 2;
|
|
620
621
|
var TYPEAHEAD_RESET_MS = 600;
|
|
621
622
|
//#endregion
|
|
@@ -654,8 +655,8 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
654
655
|
type: Boolean,
|
|
655
656
|
default: true
|
|
656
657
|
},
|
|
657
|
-
expandIcon: { default:
|
|
658
|
-
collapseIcon: { default:
|
|
658
|
+
expandIcon: { default: void 0 },
|
|
659
|
+
collapseIcon: { default: void 0 },
|
|
659
660
|
toggleIconRotate: {
|
|
660
661
|
type: Boolean,
|
|
661
662
|
default: true
|
|
@@ -763,7 +764,7 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
763
764
|
type: Boolean,
|
|
764
765
|
default: false
|
|
765
766
|
},
|
|
766
|
-
dragHandleIcon: { default:
|
|
767
|
+
dragHandleIcon: { default: void 0 },
|
|
767
768
|
allowDrop: {},
|
|
768
769
|
allowDrag: {}
|
|
769
770
|
},
|
|
@@ -777,6 +778,12 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
777
778
|
"check"
|
|
778
779
|
],
|
|
779
780
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
781
|
+
const MOVE_KEYS = /* @__PURE__ */ new Set([
|
|
782
|
+
"ArrowUp",
|
|
783
|
+
"ArrowDown",
|
|
784
|
+
"ArrowLeft",
|
|
785
|
+
"ArrowRight"
|
|
786
|
+
]);
|
|
780
787
|
const props = __props;
|
|
781
788
|
const emit = __emit;
|
|
782
789
|
const treeStore = createGrTreeStore({
|
|
@@ -800,12 +807,12 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
800
807
|
});
|
|
801
808
|
const treeProps = props;
|
|
802
809
|
const { t } = useGranularityTranslations();
|
|
810
|
+
const { announce } = useAnnouncer();
|
|
803
811
|
const dragLabel = computed(() => treeProps.dragLabel ?? t("gr.tree.drag", "Drag"));
|
|
804
812
|
const expandLabel = computed(() => treeProps.expandLabel ?? t("gr.tree.expand", "Expand"));
|
|
805
813
|
const collapseLabel = computed(() => treeProps.collapseLabel ?? t("gr.tree.collapse", "Collapse"));
|
|
806
814
|
const currentKey = treeStore.currentKey;
|
|
807
815
|
const hoveredKey = interactionContext.hoveredKey;
|
|
808
|
-
const focusedKey = interactionContext.focusedKey;
|
|
809
816
|
const dropTarget = interactionContext.dropTarget;
|
|
810
817
|
const treeRootEl = ref(null);
|
|
811
818
|
/**
|
|
@@ -842,9 +849,25 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
842
849
|
walk(roots, []);
|
|
843
850
|
return rows;
|
|
844
851
|
});
|
|
852
|
+
/**
|
|
853
|
+
* Кольцо roving-фокуса: ровно один `treeitem` на всё дерево держит `tabindex=0`.
|
|
854
|
+
*
|
|
855
|
+
* Ориентация вертикальная намеренно: влево-вправо в дереве заняты раскрытием
|
|
856
|
+
* ветки и переходом к родителю, и примитив их не трогает — это доменная логика,
|
|
857
|
+
* она осталась в `onTreeKeydown`.
|
|
858
|
+
*/
|
|
859
|
+
const roving = useRovingFocus({
|
|
860
|
+
items: () => visibleRows.value.map((row) => row.node.key),
|
|
861
|
+
elementFor: (key) => interactionContext.nodeEls.get(key),
|
|
862
|
+
orientation: () => "vertical",
|
|
863
|
+
wrap: () => false,
|
|
864
|
+
onOverflow: () => true,
|
|
865
|
+
initialKey: () => currentKey.value ?? void 0,
|
|
866
|
+
beforeFocus: (key) => scrollRowIntoView(key)
|
|
867
|
+
});
|
|
845
868
|
function onRowClick(node) {
|
|
846
869
|
treeStore.setCurrentKey(node.key);
|
|
847
|
-
|
|
870
|
+
roving.setActive(node.key);
|
|
848
871
|
interactionContext.emitNodeClick(node.data, node);
|
|
849
872
|
}
|
|
850
873
|
function onRowActivate(row) {
|
|
@@ -855,7 +878,7 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
855
878
|
interactionContext.emitNodeContextMenu(evt, node.data, node);
|
|
856
879
|
}
|
|
857
880
|
function isRovingItem(key) {
|
|
858
|
-
return
|
|
881
|
+
return roving.rovingKey.value === key;
|
|
859
882
|
}
|
|
860
883
|
const resolvedSize = useGrComponentSize(() => props.size, { component: "GrTree" });
|
|
861
884
|
const sizeStyle = computed(() => treeSizeVars[resolvedSize.value]);
|
|
@@ -935,13 +958,20 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
935
958
|
interactionContext.registerNodeEl(key, null);
|
|
936
959
|
if (heldFocus && !isUnmounting) treeRootEl.value?.focus({ preventScroll: true });
|
|
937
960
|
}
|
|
938
|
-
|
|
939
|
-
|
|
961
|
+
/**
|
|
962
|
+
* При виртуализации узла вне окна в DOM нет: `nodeEls.get` вернул бы
|
|
963
|
+
* `undefined`, а фокус уехал бы на `body` вместе с размонтированной строкой.
|
|
964
|
+
* Поэтому сперва прокрутка, и только следующим тиком — фокус.
|
|
965
|
+
*/
|
|
966
|
+
function scrollRowIntoView(key) {
|
|
940
967
|
if (treeProps.virtual) {
|
|
941
968
|
const index = visibleRows.value.findIndex((row) => row.node.key === key);
|
|
942
969
|
if (index >= 0) virtualizer.scrollToIndex(index);
|
|
943
970
|
}
|
|
944
|
-
nextTick(
|
|
971
|
+
return nextTick();
|
|
972
|
+
}
|
|
973
|
+
function focusRow(key) {
|
|
974
|
+
roving.focusKey(key);
|
|
945
975
|
}
|
|
946
976
|
/**
|
|
947
977
|
* Typeahead паттерна tree: печатные символы копятся в буфер и переводят фокус
|
|
@@ -982,7 +1012,7 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
982
1012
|
}
|
|
983
1013
|
const rows = visibleRows.value;
|
|
984
1014
|
if (rows.length === 0) return;
|
|
985
|
-
const idx = Math.max(0, rows.findIndex((r) => r.node.key ===
|
|
1015
|
+
const idx = Math.max(0, rows.findIndex((r) => r.node.key === roving.rovingKey.value));
|
|
986
1016
|
const cur = rows[idx];
|
|
987
1017
|
if (event.key === "*") {
|
|
988
1018
|
event.preventDefault();
|
|
@@ -994,15 +1024,14 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
994
1024
|
onTypeahead(event.key, rows, idx);
|
|
995
1025
|
return;
|
|
996
1026
|
}
|
|
1027
|
+
if (event.shiftKey && MOVE_KEYS.has(event.key)) {
|
|
1028
|
+
if (!treeProps.draggable) return;
|
|
1029
|
+
event.preventDefault();
|
|
1030
|
+
onNodeMoveKey(cur.node, event.key);
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
if (roving.handleNavigationKeys(event)) return;
|
|
997
1034
|
switch (event.key) {
|
|
998
|
-
case "ArrowDown":
|
|
999
|
-
event.preventDefault();
|
|
1000
|
-
if (idx < rows.length - 1) focusRow(rows[idx + 1].node.key);
|
|
1001
|
-
break;
|
|
1002
|
-
case "ArrowUp":
|
|
1003
|
-
event.preventDefault();
|
|
1004
|
-
if (idx > 0) focusRow(rows[idx - 1].node.key);
|
|
1005
|
-
break;
|
|
1006
1035
|
case "ArrowRight":
|
|
1007
1036
|
event.preventDefault();
|
|
1008
1037
|
if (!cur.isLeaf) {
|
|
@@ -1015,14 +1044,6 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1015
1044
|
if (!cur.isLeaf && cur.isExpanded) toggleExpand(cur.node);
|
|
1016
1045
|
else if (cur.node.parent && rows.some((r) => r.node.key === cur.node.parent.key)) focusRow(cur.node.parent.key);
|
|
1017
1046
|
break;
|
|
1018
|
-
case "Home":
|
|
1019
|
-
event.preventDefault();
|
|
1020
|
-
focusRow(rows[0].node.key);
|
|
1021
|
-
break;
|
|
1022
|
-
case "End":
|
|
1023
|
-
event.preventDefault();
|
|
1024
|
-
focusRow(rows[rows.length - 1].node.key);
|
|
1025
|
-
break;
|
|
1026
1047
|
case "Enter":
|
|
1027
1048
|
event.preventDefault();
|
|
1028
1049
|
onRowClick(cur.node);
|
|
@@ -1034,17 +1055,6 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1034
1055
|
break;
|
|
1035
1056
|
}
|
|
1036
1057
|
}
|
|
1037
|
-
function normalizeFocusedKey() {
|
|
1038
|
-
const rows = visibleRows.value;
|
|
1039
|
-
if (rows.length === 0) {
|
|
1040
|
-
focusedKey.value = void 0;
|
|
1041
|
-
return;
|
|
1042
|
-
}
|
|
1043
|
-
if (focusedKey.value !== void 0 && rows.some((r) => r.node.key === focusedKey.value)) return;
|
|
1044
|
-
focusedKey.value = currentKey.value != null && rows.some((r) => r.node.key === currentKey.value) ? currentKey.value : rows[0].node.key;
|
|
1045
|
-
}
|
|
1046
|
-
normalizeFocusedKey();
|
|
1047
|
-
watch(visibleRows, normalizeFocusedKey, { flush: "sync" });
|
|
1048
1058
|
function onRowMouseEnter(node) {
|
|
1049
1059
|
hoveredKey.value = node.key;
|
|
1050
1060
|
}
|
|
@@ -1107,58 +1117,84 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1107
1117
|
function shouldShowDragHandle(node) {
|
|
1108
1118
|
return canDrag(node) && hoveredKey.value === node.key;
|
|
1109
1119
|
}
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
if (
|
|
1120
|
+
/**
|
|
1121
|
+
* Треть строки сверху — «до», треть снизу — «после», середина — «внутрь».
|
|
1122
|
+
* Зоны нарезает компонент: примитив отдаёт только долю вдоль строки.
|
|
1123
|
+
*/
|
|
1124
|
+
function dropTypeFromFraction(fraction) {
|
|
1125
|
+
if (fraction < 1 / 3) return "prev";
|
|
1126
|
+
if (fraction > 2 / 3) return "next";
|
|
1116
1127
|
return "inner";
|
|
1117
1128
|
}
|
|
1118
1129
|
function canDrop(drag, target, type) {
|
|
1119
1130
|
return interactionContext.canDrop(drag, target, type);
|
|
1120
1131
|
}
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
} catch {}
|
|
1131
|
-
if (evt.dataTransfer) evt.dataTransfer.effectAllowed = "move";
|
|
1132
|
+
/** Перенос состоялся: одна дорога и для указателя, и для клавиатуры. */
|
|
1133
|
+
function applyMove(source, targetKey, type) {
|
|
1134
|
+
const reference = treeStore.getNode(targetKey);
|
|
1135
|
+
if (!reference) return false;
|
|
1136
|
+
const movedNode = treeStore.moveNode(source, reference, type);
|
|
1137
|
+
if (!movedNode) return false;
|
|
1138
|
+
const dropNode = treeStore.getNode(reference.key) ?? reference;
|
|
1139
|
+
interactionContext.emitNodeDrop(movedNode, dropNode, type);
|
|
1140
|
+
return true;
|
|
1132
1141
|
}
|
|
1133
|
-
|
|
1134
|
-
|
|
1142
|
+
const dragSort = useDragSort({
|
|
1143
|
+
items: () => visibleRows.value.map((row) => row.node.key),
|
|
1144
|
+
elementFor: (key) => interactionContext.nodeEls.get(key) ?? null,
|
|
1145
|
+
scroller: () => treeRootEl.value,
|
|
1146
|
+
disabled: () => !treeProps.draggable,
|
|
1147
|
+
canDrag: (key) => {
|
|
1148
|
+
const node = treeStore.getNode(key);
|
|
1149
|
+
return node ? canDrag(node) : false;
|
|
1150
|
+
},
|
|
1151
|
+
resolveTarget: (hit, sourceKey, previous) => {
|
|
1152
|
+
const source = treeStore.getNode(sourceKey);
|
|
1153
|
+
const node = treeStore.getNode(hit.key);
|
|
1154
|
+
if (!source || !node) return null;
|
|
1155
|
+
const type = dropTypeFromFraction(hit.fraction);
|
|
1156
|
+
const allowed = treeStore.canMoveNode(source, node, type) && canDrop(source, node, type);
|
|
1157
|
+
if (previous && previous.key === node.key && previous.type === type && previous.allowed === allowed) return previous;
|
|
1158
|
+
return {
|
|
1159
|
+
key: node.key,
|
|
1160
|
+
type,
|
|
1161
|
+
allowed
|
|
1162
|
+
};
|
|
1163
|
+
},
|
|
1164
|
+
onDrop: (sourceKey, target) => {
|
|
1165
|
+
const source = treeStore.getNode(sourceKey);
|
|
1166
|
+
if (!source || !target.allowed) return;
|
|
1167
|
+
applyMove(source, target.key, target.type);
|
|
1168
|
+
},
|
|
1169
|
+
onUpdate: (sourceKey, target) => {
|
|
1170
|
+
interactionContext.draggingNode.value = sourceKey === null ? null : treeStore.getNode(sourceKey) ?? null;
|
|
1171
|
+
interactionContext.dropTarget.value = target;
|
|
1172
|
+
}
|
|
1173
|
+
});
|
|
1174
|
+
function onHandlePointerDown(event, node) {
|
|
1175
|
+
if (!treeProps.draggable) return;
|
|
1176
|
+
dragSort.startFrom(node.key)(event);
|
|
1135
1177
|
}
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
if (
|
|
1178
|
+
/**
|
|
1179
|
+
* Клавиатурный перенос — раскладка аутлайнера: `Shift` со стрелкой сразу
|
|
1180
|
+
* двигает узел, без режима «взято». Режим здесь был бы лишним: `Space` в дереве
|
|
1181
|
+
* уже отмечает чекбокс, а стрелки водят фокус по веткам.
|
|
1182
|
+
*/
|
|
1183
|
+
function moveByKeyboard(node, key) {
|
|
1184
|
+
const siblings = node.parent ? node.parent.childNodes : treeStore.treeModel.value.roots;
|
|
1185
|
+
const index = siblings.findIndex((sibling) => sibling.key === node.key);
|
|
1186
|
+
if (key === "ArrowUp" && index > 0) return applyMove(node, siblings[index - 1].key, "prev");
|
|
1187
|
+
if (key === "ArrowDown" && index >= 0 && index < siblings.length - 1) return applyMove(node, siblings[index + 1].key, "next");
|
|
1188
|
+
if (key === "ArrowRight" && index > 0) return applyMove(node, siblings[index - 1].key, "inner");
|
|
1189
|
+
if (key === "ArrowLeft" && node.parent) return applyMove(node, node.parent.key, "next");
|
|
1190
|
+
return false;
|
|
1148
1191
|
}
|
|
1149
|
-
function
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
const movedNode = treeStore.moveNode(drag, node, target.type);
|
|
1156
|
-
if (movedNode) {
|
|
1157
|
-
const dropNode = treeStore.getNode(node.key) ?? node;
|
|
1158
|
-
interactionContext.emitNodeDrop(movedNode, dropNode, target.type);
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
interactionContext.resetDragState();
|
|
1192
|
+
async function onNodeMoveKey(node, key) {
|
|
1193
|
+
if (!treeProps.draggable || !canDrag(node)) return;
|
|
1194
|
+
if (!moveByKeyboard(node, key)) return;
|
|
1195
|
+
announce(t("gr.tree.moved", "Moved {label}", { label: node.label }));
|
|
1196
|
+
await nextTick();
|
|
1197
|
+
focusRow(node.key);
|
|
1162
1198
|
}
|
|
1163
1199
|
function filter(value) {
|
|
1164
1200
|
treeStore.filter(value);
|
|
@@ -1190,7 +1226,7 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1190
1226
|
function focus(key) {
|
|
1191
1227
|
const rows = visibleRows.value;
|
|
1192
1228
|
if (rows.length === 0) return false;
|
|
1193
|
-
focusRow(key != null && rows.some((row) => row.node.key === key) ? key :
|
|
1229
|
+
focusRow(key != null && rows.some((row) => row.node.key === key) ? key : roving.rovingKey.value ?? rows[0].node.key);
|
|
1194
1230
|
return true;
|
|
1195
1231
|
}
|
|
1196
1232
|
onUnmounted(() => clearTimeout(typeaheadTimer));
|
|
@@ -1266,8 +1302,7 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1266
1302
|
style: normalizeStyle(rowStyle(row)),
|
|
1267
1303
|
onClick: ($event) => onRowActivate(row),
|
|
1268
1304
|
onContextmenu: ($event) => onRowContextMenu($event, row.node),
|
|
1269
|
-
onDrop: (
|
|
1270
|
-
onDragover: ($event) => onDragOver($event, row.node, $event.currentTarget),
|
|
1305
|
+
onDrop: _cache[1] || (_cache[1] = withModifiers(() => {}, ["prevent"])),
|
|
1271
1306
|
onMouseenter: ($event) => onRowMouseEnter(row.node),
|
|
1272
1307
|
onMouseleave: ($event) => onRowMouseLeave(row.node)
|
|
1273
1308
|
}, [
|
|
@@ -1291,12 +1326,10 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1291
1326
|
resolveNodeClass(unref(treeProps).dragHandleClass, row)
|
|
1292
1327
|
]]),
|
|
1293
1328
|
"aria-label": dragLabel.value,
|
|
1294
|
-
|
|
1329
|
+
"aria-disabled": canDrag(row.node) ? void 0 : "true",
|
|
1295
1330
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
onDragend: onDragEnd
|
|
1299
|
-
}, [createElementVNode("span", { class: normalizeClass(["gr-tree__drag-icon", unref(treeProps).dragHandleIcon]) }, null, 2)], 42, _hoisted_4)) : createCommentVNode("", true),
|
|
1331
|
+
onPointerdown: ($event) => onHandlePointerDown($event, row.node)
|
|
1332
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent(unref(iconTag)(unref(treeProps).dragHandleIcon, unref(grip_vertical_default))), { class: normalizeClass(["gr-tree__drag-icon", unref(iconClass)(unref(treeProps).dragHandleIcon)]) }, null, 8, ["class"]))], 42, _hoisted_4)) : createCommentVNode("", true),
|
|
1300
1333
|
!row.isLeaf ? (openBlock(), createElementBlock("button", {
|
|
1301
1334
|
key: 1,
|
|
1302
1335
|
"data-gr-tree-toggle": "",
|
|
@@ -1305,14 +1338,18 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1305
1338
|
class: normalizeClass(["gr-tree__toggle", resolveNodeClass(unref(treeProps).toggleClass, row)]),
|
|
1306
1339
|
"aria-label": row.isExpanded ? collapseLabel.value : expandLabel.value,
|
|
1307
1340
|
onClick: withModifiers(($event) => toggleExpand(row.node), ["stop"])
|
|
1308
|
-
}, [row.isLoading ? (openBlock(),
|
|
1341
|
+
}, [row.isLoading ? (openBlock(), createBlock(unref(loader_circle_default), {
|
|
1342
|
+
key: 0,
|
|
1343
|
+
"data-gr-tree-loading": "",
|
|
1344
|
+
class: "gr-tree__toggle-icon animate-spin"
|
|
1345
|
+
})) : (openBlock(), createBlock(resolveDynamicComponent(unref(iconTag)(row.isExpanded ? unref(treeProps).collapseIcon : unref(treeProps).expandIcon, unref(chevron_right_default))), {
|
|
1309
1346
|
key: 1,
|
|
1310
1347
|
class: normalizeClass(["gr-tree__toggle-icon", [
|
|
1311
|
-
row.isExpanded ? unref(treeProps).collapseIcon : unref(treeProps).expandIcon,
|
|
1348
|
+
unref(iconClass)(row.isExpanded ? unref(treeProps).collapseIcon : unref(treeProps).expandIcon),
|
|
1312
1349
|
row.isExpanded && unref(treeProps).toggleIconRotate ? "gr-tree__toggle-icon--expanded" : "",
|
|
1313
1350
|
resolveNodeClass(unref(treeProps).toggleIconClass, row)
|
|
1314
1351
|
]])
|
|
1315
|
-
}, null,
|
|
1352
|
+
}, null, 8, ["class"]))], 10, _hoisted_5)) : (openBlock(), createElementBlock("span", {
|
|
1316
1353
|
key: 2,
|
|
1317
1354
|
class: normalizeClass(["gr-tree__toggle-spacer", resolveNodeClass(unref(treeProps).toggleSpacerClass, row)])
|
|
1318
1355
|
}, null, 2)),
|
|
@@ -1322,18 +1359,18 @@ var GrTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1322
1359
|
class: normalizeClass(["gr-tree__checkbox", [checkStateOf(row.node.key) === "checked" ? "gr-tree__checkbox--checked" : "", checkStateOf(row.node.key) === "half" ? "gr-tree__checkbox--half" : ""]]),
|
|
1323
1360
|
"aria-hidden": "true",
|
|
1324
1361
|
onClick: withModifiers(($event) => toggleChecked(row.node), ["stop"])
|
|
1325
|
-
}, [checkStateOf(row.node.key) !== "unchecked" ? (openBlock(),
|
|
1362
|
+
}, [checkStateOf(row.node.key) !== "unchecked" ? (openBlock(), createBlock(resolveDynamicComponent(checkStateOf(row.node.key) === "half" ? unref(minus_default) : unref(check_default)), {
|
|
1326
1363
|
key: 0,
|
|
1327
|
-
class:
|
|
1328
|
-
}
|
|
1364
|
+
class: "gr-tree__checkbox-mark"
|
|
1365
|
+
})) : createCommentVNode("", true)], 10, _hoisted_6)) : createCommentVNode("", true),
|
|
1329
1366
|
createElementVNode("div", { class: normalizeClass(["gr-tree__content", resolveNodeClass(unref(treeProps).contentClass, row)]) }, [renderSlot(_ctx.$slots, "default", {
|
|
1330
1367
|
node: row.node,
|
|
1331
1368
|
data: row.node.data
|
|
1332
|
-
}, () => [createElementVNode("span",
|
|
1369
|
+
}, () => [createElementVNode("span", _hoisted_7, toDisplayString(row.node.label), 1)], true)], 2)
|
|
1333
1370
|
], 46, _hoisted_3)], 8, _hoisted_2);
|
|
1334
1371
|
}), 128))], 44, _hoisted_1);
|
|
1335
1372
|
};
|
|
1336
1373
|
}
|
|
1337
|
-
}), [["__scopeId", "data-v-
|
|
1374
|
+
}), [["__scopeId", "data-v-c34c121e"]]);
|
|
1338
1375
|
//#endregion
|
|
1339
1376
|
export { GrTree_default as t };
|