@feugene/granularity 0.48.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.
- package/README.md +3 -3
- package/dist/chunks/chevron-up-BhW6hi8L.js +23 -0
- package/dist/chunks/chevron-up-BhW6hi8L.js.map +1 -0
- package/dist/chunks/{config-E1cTyRVV.js → config-8n1VR0ju.js} +1 -1
- package/dist/chunks/{config-E1cTyRVV.js.map → config-8n1VR0ju.js.map} +1 -1
- package/dist/chunks/{config-2vrOFn2f.js → config-AKpLyIGD.js} +2 -2
- package/dist/chunks/{config-2vrOFn2f.js.map → config-AKpLyIGD.js.map} +1 -1
- package/dist/chunks/{config-DIDz_E5m.js → config-B34mkd53.js} +66 -1
- package/dist/chunks/config-B34mkd53.js.map +1 -0
- package/dist/chunks/{config-B5SBUa6u.js → config-B7qZqiUB.js} +28 -1
- package/dist/chunks/config-B7qZqiUB.js.map +1 -0
- package/dist/chunks/config-BBrPUEye.js +8 -0
- package/dist/chunks/config-BBrPUEye.js.map +1 -0
- package/dist/chunks/config-BBtBQE3s.js +108 -0
- package/dist/chunks/config-BBtBQE3s.js.map +1 -0
- package/dist/chunks/{config-CT4lP6S4.js → config-BOCzHqWh.js} +2 -2
- package/dist/chunks/{config-CT4lP6S4.js.map → config-BOCzHqWh.js.map} +1 -1
- package/dist/chunks/{config-iemgzS4x.js → config-BP1ktzwh.js} +2 -24
- package/dist/chunks/config-BP1ktzwh.js.map +1 -0
- package/dist/chunks/config-BTxmdRzT.js +28 -0
- package/dist/chunks/config-BTxmdRzT.js.map +1 -0
- package/dist/chunks/{config-CjWOTgLL.js → config-Bk52xd5l.js} +12 -5
- package/dist/chunks/config-Bk52xd5l.js.map +1 -0
- package/dist/chunks/{config-D3HOuHDe.js → config-C3SqBqSQ.js} +3 -1
- package/dist/chunks/config-C3SqBqSQ.js.map +1 -0
- package/dist/chunks/{config-2ZHRsdOc.js → config-C3uqd-sW.js} +1 -1
- package/dist/chunks/config-C3uqd-sW.js.map +1 -0
- package/dist/chunks/{config-BXRmsn3t.js → config-CPhcZzHi.js} +72 -10
- package/dist/chunks/config-CPhcZzHi.js.map +1 -0
- package/dist/chunks/config-CWtfxkM9.js.map +1 -1
- package/dist/chunks/{config--t2dxj0t.js → config-CmLTCmY9.js} +2 -2
- package/dist/chunks/{config--t2dxj0t.js.map → config-CmLTCmY9.js.map} +1 -1
- package/dist/chunks/{config-BAse0laT.js → config-CvtqB4ki.js} +8 -3
- package/dist/chunks/config-CvtqB4ki.js.map +1 -0
- package/dist/chunks/{config-BcXX7S7B.js → config-D-JgqV0J.js} +5 -1
- package/dist/chunks/{config-BcXX7S7B.js.map → config-D-JgqV0J.js.map} +1 -1
- package/dist/chunks/{config-BHLMTJaR.js → config-D1oVht-E.js} +8 -3
- package/dist/chunks/config-D1oVht-E.js.map +1 -0
- package/dist/chunks/{config-BscVxZR3.js → config-DF1ezU6y.js} +1 -1
- package/dist/chunks/{config-BscVxZR3.js.map → config-DF1ezU6y.js.map} +1 -1
- package/dist/chunks/{config-B42iJ48O.js → config-DG41PD9i.js} +13 -1
- package/dist/chunks/config-DG41PD9i.js.map +1 -0
- package/dist/chunks/{config-Bs1HwUcx.js → config-DPJ3jtiB.js} +12 -2
- package/dist/chunks/config-DPJ3jtiB.js.map +1 -0
- package/dist/chunks/{config-tNqtapcT.js → config-DpqjlCfB.js} +2 -2
- package/dist/chunks/{config-tNqtapcT.js.map → config-DpqjlCfB.js.map} +1 -1
- package/dist/chunks/{config-DNDgp9bB.js → config-DpzFoSIh.js} +64 -2
- package/dist/chunks/config-DpzFoSIh.js.map +1 -0
- package/dist/chunks/config-MUkhktTP.js +267 -0
- package/dist/chunks/config-MUkhktTP.js.map +1 -0
- package/dist/chunks/config-SPugeaHT.js +37 -0
- package/dist/chunks/config-SPugeaHT.js.map +1 -0
- package/dist/chunks/{en-Bxyn5lW7.js → en-mIFywnV2.js} +27 -7
- package/dist/chunks/en-mIFywnV2.js.map +1 -0
- package/dist/chunks/{es-Dtl-a7ui.js → es-CvthYwtB.js} +27 -7
- package/dist/chunks/es-CvthYwtB.js.map +1 -0
- package/dist/chunks/{es-Bj_vc18Z.js → es-DlGd6Mrj.js} +3 -3
- package/dist/chunks/{es-Bj_vc18Z.js.map → es-DlGd6Mrj.js.map} +1 -1
- package/dist/chunks/{generated-hELWB0gZ.js → generated-Cx4C7GRN.js} +126 -0
- package/dist/chunks/{generated-hELWB0gZ.js.map → generated-Cx4C7GRN.js.map} +1 -1
- package/dist/chunks/{grBadgeStyles-DV0DrAew.js → grBadgeStyles-D51AXbj5.js} +57 -1
- package/dist/chunks/grBadgeStyles-D51AXbj5.js.map +1 -0
- package/dist/chunks/{grChipStyles-DcDyxAL0.js → grChipStyles-CA9Wj1_E.js} +1 -1
- package/dist/chunks/{grChipStyles-DcDyxAL0.js.map → grChipStyles-CA9Wj1_E.js.map} +1 -1
- package/dist/chunks/{grPopoverStyles-CYAeO3Ov.js → grPopoverStyles-CncEkiPu.js} +1 -1
- package/dist/chunks/{grPopoverStyles-CYAeO3Ov.js.map → grPopoverStyles-CncEkiPu.js.map} +1 -1
- package/dist/chunks/{grSelectStyles-D9EQ-pgK.js → grSelectStyles-Cam-IG9s.js} +3 -2
- package/dist/chunks/grSelectStyles-Cam-IG9s.js.map +1 -0
- package/dist/chunks/{grSliderStyles-kaz6VXZ3.js → grSliderStyles-CqzV0hll.js} +1 -1
- package/dist/chunks/grSliderStyles-CqzV0hll.js.map +1 -0
- package/dist/chunks/{config-CbEbLyDE.js → grSortableListStyles-CxieDmpe.js} +1 -27
- package/dist/chunks/grSortableListStyles-CxieDmpe.js.map +1 -0
- package/dist/chunks/grTableStyles-CPSxDTOW.js +66 -0
- package/dist/chunks/grTableStyles-CPSxDTOW.js.map +1 -0
- package/dist/chunks/{config-CMNfZO7S.js → grTabsStyles-DIz2VdIm.js} +1 -36
- package/dist/chunks/grTabsStyles-DIz2VdIm.js.map +1 -0
- package/dist/chunks/grTooltipStyles-CtbGEEGV.js +24 -0
- package/dist/chunks/grTooltipStyles-CtbGEEGV.js.map +1 -0
- package/dist/chunks/{granular-provider-BOQp7N5o.js → granular-provider-cv5vaM1a.js} +26 -22
- package/dist/chunks/granular-provider-cv5vaM1a.js.map +1 -0
- package/dist/chunks/hotkeySequence-BTHIM_5A.js +46 -0
- package/dist/chunks/hotkeySequence-BTHIM_5A.js.map +1 -0
- package/dist/chunks/{keyboard-DE2yhz_b.js → keyboard-BiFSgWLt.js} +70 -1
- package/dist/chunks/keyboard-BiFSgWLt.js.map +1 -0
- package/dist/chunks/optionPanel-DvY7Tv_4.js +182 -0
- package/dist/chunks/optionPanel-DvY7Tv_4.js.map +1 -0
- package/dist/chunks/overlayListPanel-D91jBCHU.js +21 -0
- package/dist/chunks/overlayListPanel-D91jBCHU.js.map +1 -0
- package/dist/chunks/{overlayStack-DH4Z7am1.js → overlayStack-DCkCgXZP.js} +1 -1
- package/dist/chunks/{overlayStack-DH4Z7am1.js.map → overlayStack-DCkCgXZP.js.map} +1 -1
- package/dist/chunks/{overlayPanelSurface-BKeMhRx4.js → overlayTransition-C0FDMx7Q.js} +24 -24
- package/dist/chunks/overlayTransition-C0FDMx7Q.js.map +1 -0
- package/dist/chunks/{ru-hrB4I1u_.js → ru-CQKDR-kD.js} +27 -7
- package/dist/chunks/ru-CQKDR-kD.js.map +1 -0
- package/dist/chunks/{safelist-x8USecK8.js → safelist-CSfynUC1.js} +5 -1
- package/dist/chunks/safelist-CSfynUC1.js.map +1 -0
- package/dist/chunks/{useMenuItemsFocus-B7Bl_aFA.js → useMenuItemsFocus-C031blYS.js} +1 -1
- package/dist/chunks/{useMenuItemsFocus-B7Bl_aFA.js.map → useMenuItemsFocus-C031blYS.js.map} +1 -1
- package/dist/chunks/{useModalOverlay-ACRkflzx.js → useModalOverlay-CKCQkGdB.js} +1 -1
- package/dist/chunks/{useModalOverlay-ACRkflzx.js.map → useModalOverlay-CKCQkGdB.js.map} +1 -1
- package/dist/components/GrAutocomplete/chunks/{GrAutocomplete-C-uovdv8.js → GrAutocomplete-Cyr1-ENw.js} +183 -125
- package/dist/components/GrAutocomplete/chunks/GrAutocomplete-Cyr1-ENw.js.map +1 -0
- package/dist/components/GrAutocomplete/index.js +2 -2
- package/dist/components/GrAutocomplete/styles.css +1 -1
- package/dist/components/GrBadge/chunks/GrBadge-C42KLyUD.js +71 -0
- package/dist/components/GrBadge/chunks/GrBadge-C42KLyUD.js.map +1 -0
- package/dist/components/GrBadge/index.js +3 -3
- package/dist/components/GrBadge/styles.css +1 -1
- package/dist/components/GrCarousel/chunks/{GrCarousel-ByuughtI.js → GrCarousel-CBj-PEPB.js} +186 -37
- package/dist/components/GrCarousel/chunks/GrCarousel-CBj-PEPB.js.map +1 -0
- package/dist/components/GrCarousel/index.js +2 -2
- package/dist/components/GrCarousel/styles.css +1 -1
- package/dist/components/GrCheckbox/chunks/{GrCheckbox-Dp201frb.js → GrCheckbox-B4NJc7Ur.js} +2 -1
- package/dist/components/GrCheckbox/chunks/GrCheckbox-B4NJc7Ur.js.map +1 -0
- package/dist/components/GrCheckbox/index.js +1 -1
- package/dist/components/GrCheckboxGroup/chunks/{GrCheckboxGroup-IpqG5qwm.js → GrCheckboxGroup-qZHpNFCX.js} +1 -1
- package/dist/components/GrCheckboxGroup/chunks/{GrCheckboxGroup-IpqG5qwm.js.map → GrCheckboxGroup-qZHpNFCX.js.map} +1 -1
- package/dist/components/GrCheckboxGroup/index.js +1 -1
- package/dist/components/GrChip/chunks/{GrChip-CKqyzYcv.js → GrChip-DoyS1Dr4.js} +1 -1
- package/dist/components/GrChip/chunks/{GrChip-CKqyzYcv.js.map → GrChip-DoyS1Dr4.js.map} +1 -1
- package/dist/components/GrChip/index.js +2 -2
- package/dist/components/GrColorPicker/chunks/{GrColorPicker-BRM_4lyI.js → GrColorPicker-vGSgpUV9.js} +353 -38
- package/dist/components/GrColorPicker/chunks/GrColorPicker-vGSgpUV9.js.map +1 -0
- package/dist/components/GrColorPicker/index.js +2 -2
- package/dist/components/GrColorPicker/styles.css +1 -1
- package/dist/components/GrCommandPalette/chunks/{GrCommandPalette-BJHmkDQv.js → GrCommandPalette-CAHgj0Aa.js} +23 -7
- package/dist/components/GrCommandPalette/chunks/GrCommandPalette-CAHgj0Aa.js.map +1 -0
- package/dist/components/GrCommandPalette/index.js +1 -1
- package/dist/components/GrCommandPalette/styles.css +1 -1
- package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-BzUQwbec.js → GrConfirmDialog-dg021BMd.js} +1 -1
- package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-BzUQwbec.js.map → GrConfirmDialog-dg021BMd.js.map} +1 -1
- package/dist/components/GrConfirmDialog/index.js +1 -1
- package/dist/components/GrContextMenu/chunks/{GrContextMenu-RpxMHQXH.js → GrContextMenu-bQ1Vvy2c.js} +3 -3
- package/dist/components/GrContextMenu/chunks/{GrContextMenu-RpxMHQXH.js.map → GrContextMenu-bQ1Vvy2c.js.map} +1 -1
- package/dist/components/GrContextMenu/index.js +1 -1
- package/dist/components/GrDataTable/chunks/{GrDataTable-DQxYYgQk.js → GrDataTable-Bb2jWnRG.js} +576 -136
- package/dist/components/GrDataTable/chunks/GrDataTable-Bb2jWnRG.js.map +1 -0
- package/dist/components/GrDataTable/index.js +2 -2
- package/dist/components/GrDelta/chunks/{GrDelta-CgTvfoIN.js → GrDelta-BSv1KdMy.js} +0 -0
- package/dist/components/GrDelta/chunks/{GrDelta-CgTvfoIN.js.map → GrDelta-BSv1KdMy.js.map} +1 -1
- package/dist/components/GrDelta/index.js +2 -2
- package/dist/components/GrDialog/chunks/{GrDialog-DDz_OEhk.js → GrDialog-C9Zu72jB.js} +1 -1
- package/dist/components/GrDialog/chunks/{GrDialog-DDz_OEhk.js.map → GrDialog-C9Zu72jB.js.map} +1 -1
- package/dist/components/GrDialog/index.js +1 -1
- package/dist/components/GrDialogService/chunks/{GrDialogService-Dtq0ZCN5.js → GrDialogService-DLBifO61.js} +2 -2
- package/dist/components/GrDialogService/chunks/{GrDialogService-Dtq0ZCN5.js.map → GrDialogService-DLBifO61.js.map} +1 -1
- package/dist/components/GrDialogService/index.js +1 -1
- package/dist/components/GrDrawer/chunks/{GrDrawer-CNpSMuN-.js → GrDrawer-DOcRTE8G.js} +1 -1
- package/dist/components/GrDrawer/chunks/{GrDrawer-CNpSMuN-.js.map → GrDrawer-DOcRTE8G.js.map} +1 -1
- package/dist/components/GrDrawer/index.js +1 -1
- package/dist/components/GrDropdown/chunks/{GrDropdown-cLZuZMEY.js → GrDropdown-kxwmgfSe.js} +2 -2
- package/dist/components/GrDropdown/chunks/{GrDropdown-cLZuZMEY.js.map → GrDropdown-kxwmgfSe.js.map} +1 -1
- package/dist/components/GrDropdown/index.js +2 -2
- package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-Dxkz_ry4.js → GrDropdownMenu--VoK3VY0.js} +3 -34
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu--VoK3VY0.js.map +1 -0
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-CkM3BFPL.js +34 -0
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-CkM3BFPL.js.map +1 -0
- package/dist/components/GrDropdownMenu/index.js +2 -1
- package/dist/components/GrEmptyState/chunks/{GrEmptyState-BbvwE-E0.js → GrEmptyState-Bz6-_ED4.js} +42 -6
- package/dist/components/GrEmptyState/chunks/GrEmptyState-Bz6-_ED4.js.map +1 -0
- package/dist/components/GrEmptyState/index.js +1 -1
- package/dist/components/GrFileUpload/chunks/{GrFileUpload-BwMR71zN.js → GrFileUpload-Bgdfnkd8.js} +5 -2
- package/dist/components/GrFileUpload/chunks/GrFileUpload-Bgdfnkd8.js.map +1 -0
- package/dist/components/GrFileUpload/index.js +1 -1
- package/dist/components/GrFormFile/chunks/{GrFormFile-Dlxx-9zi.js → GrFormFile-Ctq1isz-.js} +78 -11
- package/dist/components/GrFormFile/chunks/GrFormFile-Ctq1isz-.js.map +1 -0
- package/dist/components/GrFormFile/index.js +2 -2
- package/dist/components/GrFormFile/styles.css +1 -1
- package/dist/components/GrImageViewer/chunks/{GrImageViewer-DK-iVHHC.js → GrImageViewer-Bnql_dNP.js} +1 -1
- package/dist/components/GrImageViewer/chunks/{GrImageViewer-DK-iVHHC.js.map → GrImageViewer-Bnql_dNP.js.map} +1 -1
- package/dist/components/GrImageViewer/index.js +1 -1
- package/dist/components/GrInput/chunks/{GrInput-DV4gMWPR.js → GrInput-CoaFLpaU.js} +43 -22
- package/dist/components/GrInput/chunks/GrInput-CoaFLpaU.js.map +1 -0
- package/dist/components/GrInput/index.js +1 -1
- package/dist/components/GrInputTag/chunks/{GrInputTag-CO0YU-ok.js → GrInputTag-BzzNRBe3.js} +247 -20
- package/dist/components/GrInputTag/chunks/GrInputTag-BzzNRBe3.js.map +1 -0
- package/dist/components/GrInputTag/index.js +2 -2
- package/dist/components/GrJsonViewer/chunks/{GrJsonViewer-D7CyWzhT.js → GrJsonViewer-B6ZJ3GFH.js} +2 -2
- package/dist/components/GrJsonViewer/chunks/{GrJsonViewer-D7CyWzhT.js.map → GrJsonViewer-B6ZJ3GFH.js.map} +1 -1
- package/dist/components/GrJsonViewer/index.js +1 -1
- package/dist/components/GrKbd/chunks/{GrKbd-BNMeoaLV.js → GrKbd-D2rHDkQv.js} +42 -37
- package/dist/components/GrKbd/chunks/GrKbd-D2rHDkQv.js.map +1 -0
- package/dist/components/GrKbd/index.js +1 -1
- package/dist/components/GrModal/chunks/{GrModal-Cm0mtSXk.js → GrModal-SHb1U2qx.js} +1 -1
- package/dist/components/GrModal/chunks/{GrModal-Cm0mtSXk.js.map → GrModal-SHb1U2qx.js.map} +1 -1
- package/dist/components/GrModal/index.js +1 -1
- package/dist/components/GrNavbar/chunks/{GrNavbar-BRGuksiy.js → GrNavbar-IEIHC5Vt.js} +10 -4
- package/dist/components/GrNavbar/chunks/GrNavbar-IEIHC5Vt.js.map +1 -0
- package/dist/components/GrNavbar/index.js +2 -2
- package/dist/components/GrNumberInput/chunks/{GrNumberInput-BI6-vkcs.js → GrNumberInput-CmnUDaKi.js} +2 -22
- package/dist/components/GrNumberInput/chunks/{GrNumberInput-BI6-vkcs.js.map → GrNumberInput-CmnUDaKi.js.map} +1 -1
- package/dist/components/GrNumberInput/index.js +1 -1
- package/dist/components/GrOtpInput/chunks/GrOtpInput-B_Q-RDLw.js +419 -0
- package/dist/components/GrOtpInput/chunks/GrOtpInput-B_Q-RDLw.js.map +1 -0
- package/dist/components/GrOtpInput/index.js +3 -0
- package/dist/components/GrOtpInput/styles.css +1 -0
- package/dist/components/GrPagination/chunks/{GrPagination-BbaF5eXk.js → GrPagination-AMbn5D8I.js} +1 -1
- package/dist/components/GrPagination/chunks/{GrPagination-BbaF5eXk.js.map → GrPagination-AMbn5D8I.js.map} +1 -1
- package/dist/components/GrPagination/index.js +1 -1
- package/dist/components/GrPopover/chunks/{GrPopover-CcWvr1ZA.js → GrPopover-DjVxt8bf.js} +3 -3
- package/dist/components/GrPopover/chunks/{GrPopover-CcWvr1ZA.js.map → GrPopover-DjVxt8bf.js.map} +1 -1
- package/dist/components/GrPopover/index.js +2 -2
- package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-BEL-QgwE.js → GrPromptDialog-BhbIZP1f.js} +3 -3
- package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-BEL-QgwE.js.map → GrPromptDialog-BhbIZP1f.js.map} +1 -1
- package/dist/components/GrPromptDialog/index.js +1 -1
- package/dist/components/GrSelect/chunks/{GrSelect-0iI4wdR_.js → GrSelect-B-ykrHpL.js} +26 -182
- package/dist/components/GrSelect/chunks/GrSelect-B-ykrHpL.js.map +1 -0
- package/dist/components/GrSelect/index.js +2 -2
- package/dist/components/GrSelect/styles.css +1 -1
- package/dist/components/GrSidebar/chunks/GrSidebar-jVvoLGDO.js +543 -0
- package/dist/components/GrSidebar/chunks/GrSidebar-jVvoLGDO.js.map +1 -0
- package/dist/components/GrSidebar/index.js +2 -2
- package/dist/components/GrSlider/chunks/{GrSlider-CO8N9SF6.js → GrSlider-DF2Cq0rV.js} +29 -4
- package/dist/components/GrSlider/chunks/GrSlider-DF2Cq0rV.js.map +1 -0
- package/dist/components/GrSlider/index.js +2 -2
- package/dist/components/GrSortableList/chunks/{GrSortableList-NKriuGm_.js → GrSortableList-ChH9nQBv.js} +1 -1
- package/dist/components/GrSortableList/chunks/{GrSortableList-NKriuGm_.js.map → GrSortableList-ChH9nQBv.js.map} +1 -1
- package/dist/components/GrSortableList/index.js +2 -2
- package/dist/components/GrSwitch/chunks/{GrSwitch-CriHWT2A.js → GrSwitch-D7X42uIA.js} +61 -7
- package/dist/components/GrSwitch/chunks/GrSwitch-D7X42uIA.js.map +1 -0
- package/dist/components/GrSwitch/index.js +2 -2
- package/dist/components/GrTabPanels/chunks/GrTabPanels-BDt5oVdd.js +30 -0
- package/dist/components/GrTabPanels/chunks/GrTabPanels-BDt5oVdd.js.map +1 -0
- package/dist/components/GrTabPanels/chunks/GrTabPanels-BJvAflnA.js +83 -0
- package/dist/components/GrTabPanels/chunks/GrTabPanels-BJvAflnA.js.map +1 -0
- package/dist/components/GrTabPanels/index.js +2 -1
- package/dist/components/GrTable/chunks/{GrTable-CKJ-HrsN.js → GrTable-BQitSDep.js} +52 -16
- package/dist/components/GrTable/chunks/GrTable-BQitSDep.js.map +1 -0
- package/dist/components/GrTable/index.js +2 -2
- package/dist/components/GrTabs/chunks/{GrTabs-s9RzC1WX.js → GrTabs-DVC6nfWB.js} +1 -1
- package/dist/components/GrTabs/chunks/{GrTabs-s9RzC1WX.js.map → GrTabs-DVC6nfWB.js.map} +1 -1
- package/dist/components/GrTabs/index.js +2 -2
- package/dist/components/GrTabsWithPanels/chunks/GrTabsWithPanels-BYtuzouj.js +98 -0
- package/dist/components/GrTabsWithPanels/chunks/GrTabsWithPanels-BYtuzouj.js.map +1 -0
- package/dist/components/GrTabsWithPanels/index.js +3 -0
- package/dist/components/GrTextarea/chunks/{GrTextarea-Bfgc0DD2.js → GrTextarea-BFwyqcHB.js} +22 -5
- package/dist/components/GrTextarea/chunks/GrTextarea-BFwyqcHB.js.map +1 -0
- package/dist/components/GrTextarea/index.js +1 -1
- package/dist/components/GrToaster/chunks/{GrToaster-CZixNk0l.js → GrToaster-OzT1VKcp.js} +163 -32
- package/dist/components/GrToaster/chunks/GrToaster-OzT1VKcp.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-DkMMM0uq.js → GrTooltip-BDcFycvW.js} +26 -13
- package/dist/components/GrTooltip/chunks/GrTooltip-BDcFycvW.js.map +1 -0
- package/dist/components/GrTooltip/index.js +2 -2
- package/dist/components/GrTransfer/chunks/{GrTransfer-DdfBUf35.js → GrTransfer-CV7BL5UK.js} +114 -12
- package/dist/components/GrTransfer/chunks/GrTransfer-CV7BL5UK.js.map +1 -0
- package/dist/components/GrTransfer/index.js +1 -1
- package/dist/components/GrTransfer/styles.css +1 -1
- package/dist/components/GrTree/chunks/{GrTree-6yZrncJE.js → GrTree-DpgaP8hk.js} +39 -1
- package/dist/components/GrTree/chunks/GrTree-DpgaP8hk.js.map +1 -0
- package/dist/components/GrTree/index.js +1 -1
- package/dist/components/GrTree/styles.css +1 -1
- package/dist/components/GrTreeSections/chunks/{GrTreeSections-DcmDcLwj.js → GrTreeSections-BeOj__44.js} +1 -1
- package/dist/components/GrTreeSections/chunks/{GrTreeSections-DcmDcLwj.js.map → GrTreeSections-BeOj__44.js.map} +1 -1
- package/dist/components/GrTreeSections/index.js +1 -1
- package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-B6KoDYiZ.js → GrTreeSelect-BHq-T8wH.js} +113 -14
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-BHq-T8wH.js.map +1 -0
- package/dist/components/GrTreeSelect/index.js +2 -2
- package/dist/composables/useFloating.js +1 -1
- package/dist/composables/useHotkeys.js +89 -0
- package/dist/composables/useHotkeys.js.map +1 -0
- package/dist/composables/useOverlayLayer.js +1 -1
- package/dist/directives/hotkey.js +19 -46
- package/dist/directives/hotkey.js.map +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 +80 -71
- package/dist/theme.js +1 -1
- package/dist/tokens.js +1 -1
- package/dist/types/components/GrAutocomplete/GrAutocomplete.vue.d.ts +4 -4
- package/dist/types/components/GrAutocomplete/composables/useAutocompleteNavigation.d.ts +12 -3
- package/dist/types/components/GrAutocomplete/composables/useAutocompletePanel.d.ts +12 -2
- package/dist/types/components/GrAutocomplete/composables/useAutocompleteValues.d.ts +7 -4
- package/dist/types/components/GrAutocomplete/composables/useRemoteOptions.d.ts +4 -4
- package/dist/types/components/GrAutocomplete/grAutocompleteStyles.d.ts +15 -1
- package/dist/types/components/GrAutocomplete/index.d.ts +1 -1
- package/dist/types/components/GrBadge/GrBadge.vue.d.ts +15 -1
- package/dist/types/components/GrBadge/grBadgeStyles.d.ts +57 -0
- package/dist/types/components/GrBadge/index.d.ts +1 -1
- package/dist/types/components/GrCarousel/GrCarousel.vue.d.ts +29 -1
- package/dist/types/components/GrCarousel/composables/useCarouselSwipe.d.ts +5 -0
- package/dist/types/components/GrCarousel/grCarouselContext.d.ts +21 -0
- package/dist/types/components/GrCarousel/grCarouselStyles.d.ts +39 -9
- package/dist/types/components/GrCheckbox/GrCheckbox.vue.d.ts +13 -0
- package/dist/types/components/GrColorPicker/GrColorPicker.vue.d.ts +18 -2
- package/dist/types/components/GrColorPicker/color.d.ts +13 -1
- package/dist/types/components/GrColorPicker/colorArea.d.ts +59 -0
- package/dist/types/components/GrColorPicker/defaults.d.ts +3 -1
- package/dist/types/components/GrColorPicker/eyeDropper.d.ts +21 -0
- package/dist/types/components/GrColorPicker/grColorPickerStyles.d.ts +42 -0
- package/dist/types/components/GrCommandPalette/GrCommandPalette.vue.d.ts +10 -1
- package/dist/types/components/GrDataTable/GrDataTable.vue.d.ts +41 -1
- package/dist/types/components/GrDataTable/composables/useDataTableGridNavigation.d.ts +53 -0
- package/dist/types/components/GrDataTable/grDataTableStyles.d.ts +8 -0
- package/dist/types/components/GrDataTable/index.d.ts +1 -1
- package/dist/types/components/GrDelta/grDeltaStyles.d.ts +10 -3
- package/dist/types/components/GrEmptyState/GrEmptyState.vue.d.ts +11 -2
- package/dist/types/components/GrEmptyState/grEmptyStateStyles.d.ts +10 -0
- package/dist/types/components/GrEmptyState/index.d.ts +1 -1
- package/dist/types/components/GrFileUpload/GrFileUpload.vue.d.ts +2 -1
- package/dist/types/components/GrFormFile/GrFormFile.vue.d.ts +10 -0
- package/dist/types/components/GrInput/GrInput.vue.d.ts +15 -0
- package/dist/types/components/GrInputTag/GrInputTag.vue.d.ts +16 -0
- package/dist/types/components/GrInputTag/grInputTagStyles.d.ts +11 -0
- package/dist/types/components/GrKbd/GrKbd.vue.d.ts +14 -0
- package/dist/types/components/GrNavbar/GrNavbar.vue.d.ts +18 -0
- package/dist/types/components/GrNavbar/grNavbarStyles.d.ts +10 -1
- package/dist/types/components/GrNavbar/index.d.ts +1 -0
- package/dist/types/components/GrOtpInput/GrOtpInput.vue.d.ts +164 -0
- package/dist/types/components/GrOtpInput/config.d.ts +1 -0
- package/dist/types/components/GrOtpInput/defaults.d.ts +15 -0
- package/dist/types/components/GrOtpInput/grOtpInputStyles.d.ts +62 -0
- package/dist/types/components/GrOtpInput/index.d.ts +9 -0
- package/dist/types/components/GrOtpInput/otpValue.d.ts +71 -0
- package/dist/types/components/GrOtpInput/safelist.d.ts +7 -0
- package/dist/types/components/GrSelect/composables/useSelectPanelItems.d.ts +8 -34
- package/dist/types/components/GrSelect/composables/useSelectVirtualization.d.ts +7 -0
- package/dist/types/components/GrSelect/grSelectStyles.d.ts +1 -1
- package/dist/types/components/GrSidebar/GrSidebar.vue.d.ts +20 -0
- package/dist/types/components/GrSidebar/GrSidebarItem.vue.d.ts +39 -5
- package/dist/types/components/GrSidebar/grSidebarStyles.d.ts +32 -0
- package/dist/types/components/GrSidebar/index.d.ts +1 -1
- package/dist/types/components/GrSidebar/sidebarContext.d.ts +23 -1
- package/dist/types/components/GrSlider/GrSlider.vue.d.ts +39 -1
- package/dist/types/components/GrSlider/grSliderStyles.d.ts +1 -1
- package/dist/types/components/GrSwitch/GrSwitch.vue.d.ts +42 -4
- package/dist/types/components/GrSwitch/defaults.d.ts +2 -0
- package/dist/types/components/GrSwitch/grSwitchStyles.d.ts +129 -25
- package/dist/types/components/GrSwitch/index.d.ts +1 -1
- package/dist/types/components/GrSwitch/safelist.d.ts +4 -3
- package/dist/types/components/GrTabPanels/context.d.ts +6 -0
- package/dist/types/components/GrTable/GrTable.vue.d.ts +37 -0
- package/dist/types/components/GrTable/grTableStyles.d.ts +16 -7
- package/dist/types/components/GrTabsWithPanels/GrTabsWithPanels.vue.d.ts +77 -0
- package/dist/types/components/GrTabsWithPanels/config.d.ts +1 -0
- package/dist/types/components/GrTabsWithPanels/index.d.ts +4 -0
- package/dist/types/components/GrTextarea/GrTextarea.vue.d.ts +19 -1
- package/dist/types/components/GrToaster/GrToaster.vue.d.ts +12 -0
- package/dist/types/components/GrToaster/grToasterStyles.d.ts +26 -0
- package/dist/types/components/GrTooltip/GrTooltip.vue.d.ts +22 -0
- package/dist/types/components/GrTransfer/GrTransfer.vue.d.ts +23 -0
- package/dist/types/components/GrTreeSelect/grTreeSelectStyles.d.ts +1 -1
- package/dist/types/components/GrTreeSelect/grTreeSelectTypes.d.ts +20 -0
- package/dist/types/components/shared/hotkey.d.ts +8 -9
- package/dist/types/components/shared/optionPanel.d.ts +100 -0
- package/dist/types/components/shared/overlayListPanel.d.ts +18 -0
- package/dist/types/composables/useHotkeys.d.ts +43 -0
- package/dist/types/granular-provider/shared.d.ts +2 -0
- package/dist/types/i18n/messages/en.d.ts +32 -0
- package/dist/types/i18n/messages/es.d.ts +32 -0
- package/dist/types/i18n/messages/ru.d.ts +32 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/internal/hotkeySequence.d.ts +22 -0
- package/dist/types/internal/keyboard.d.ts +45 -0
- package/dist/web-types.json +784 -101
- package/package.json +13 -1
- package/dist/chunks/config-2ZHRsdOc.js.map +0 -1
- package/dist/chunks/config-B42iJ48O.js.map +0 -1
- package/dist/chunks/config-B5SBUa6u.js.map +0 -1
- package/dist/chunks/config-BAse0laT.js.map +0 -1
- package/dist/chunks/config-BHLMTJaR.js.map +0 -1
- package/dist/chunks/config-BXRmsn3t.js.map +0 -1
- package/dist/chunks/config-Bs1HwUcx.js.map +0 -1
- package/dist/chunks/config-CMNfZO7S.js.map +0 -1
- package/dist/chunks/config-CbEbLyDE.js.map +0 -1
- package/dist/chunks/config-CjWOTgLL.js.map +0 -1
- package/dist/chunks/config-D3HOuHDe.js.map +0 -1
- package/dist/chunks/config-DIDz_E5m.js.map +0 -1
- package/dist/chunks/config-DNDgp9bB.js.map +0 -1
- package/dist/chunks/config-Yy67uWHY.js +0 -140
- package/dist/chunks/config-Yy67uWHY.js.map +0 -1
- package/dist/chunks/config-iemgzS4x.js.map +0 -1
- package/dist/chunks/en-Bxyn5lW7.js.map +0 -1
- package/dist/chunks/es-Dtl-a7ui.js.map +0 -1
- package/dist/chunks/grBadgeStyles-DV0DrAew.js.map +0 -1
- package/dist/chunks/grSelectStyles-D9EQ-pgK.js.map +0 -1
- package/dist/chunks/grSliderStyles-kaz6VXZ3.js.map +0 -1
- package/dist/chunks/grTableStyles-DkQPMfx9.js +0 -39
- package/dist/chunks/grTableStyles-DkQPMfx9.js.map +0 -1
- package/dist/chunks/granular-provider-BOQp7N5o.js.map +0 -1
- package/dist/chunks/keyboard-DE2yhz_b.js.map +0 -1
- package/dist/chunks/overlayPanelSurface-BKeMhRx4.js.map +0 -1
- package/dist/chunks/ru-hrB4I1u_.js.map +0 -1
- package/dist/chunks/safelist-x8USecK8.js.map +0 -1
- package/dist/components/GrAutocomplete/chunks/GrAutocomplete-C-uovdv8.js.map +0 -1
- package/dist/components/GrBadge/chunks/GrBadge-DBeQXEir.js +0 -47
- package/dist/components/GrBadge/chunks/GrBadge-DBeQXEir.js.map +0 -1
- package/dist/components/GrCarousel/chunks/GrCarousel-ByuughtI.js.map +0 -1
- package/dist/components/GrCheckbox/chunks/GrCheckbox-Dp201frb.js.map +0 -1
- package/dist/components/GrColorPicker/chunks/GrColorPicker-BRM_4lyI.js.map +0 -1
- package/dist/components/GrCommandPalette/chunks/GrCommandPalette-BJHmkDQv.js.map +0 -1
- package/dist/components/GrDataTable/chunks/GrDataTable-DQxYYgQk.js.map +0 -1
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-Dxkz_ry4.js.map +0 -1
- package/dist/components/GrEmptyState/chunks/GrEmptyState-BbvwE-E0.js.map +0 -1
- package/dist/components/GrFileUpload/chunks/GrFileUpload-BwMR71zN.js.map +0 -1
- package/dist/components/GrFormFile/chunks/GrFormFile-Dlxx-9zi.js.map +0 -1
- package/dist/components/GrInput/chunks/GrInput-DV4gMWPR.js.map +0 -1
- package/dist/components/GrInputTag/chunks/GrInputTag-CO0YU-ok.js.map +0 -1
- package/dist/components/GrKbd/chunks/GrKbd-BNMeoaLV.js.map +0 -1
- package/dist/components/GrNavbar/chunks/GrNavbar-BRGuksiy.js.map +0 -1
- package/dist/components/GrSelect/chunks/GrSelect-0iI4wdR_.js.map +0 -1
- package/dist/components/GrSidebar/chunks/GrSidebar-DoKLlHSw.js +0 -264
- package/dist/components/GrSidebar/chunks/GrSidebar-DoKLlHSw.js.map +0 -1
- package/dist/components/GrSlider/chunks/GrSlider-CO8N9SF6.js.map +0 -1
- package/dist/components/GrSwitch/chunks/GrSwitch-CriHWT2A.js.map +0 -1
- package/dist/components/GrTabPanels/chunks/GrTabPanels-5zsbqS1v.js +0 -92
- package/dist/components/GrTabPanels/chunks/GrTabPanels-5zsbqS1v.js.map +0 -1
- package/dist/components/GrTable/chunks/GrTable-CKJ-HrsN.js.map +0 -1
- package/dist/components/GrTextarea/chunks/GrTextarea-Bfgc0DD2.js.map +0 -1
- package/dist/components/GrToaster/chunks/GrToaster-CZixNk0l.js.map +0 -1
- package/dist/components/GrTooltip/chunks/GrTooltip-DkMMM0uq.js.map +0 -1
- package/dist/components/GrTransfer/chunks/GrTransfer-DdfBUf35.js.map +0 -1
- package/dist/components/GrTree/chunks/GrTree-6yZrncJE.js.map +0 -1
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-B6KoDYiZ.js.map +0 -1
- package/dist/types/components/GrAutocomplete/composables/useAutocompleteVirtual.d.ts +0 -33
package/dist/components/GrColorPicker/chunks/{GrColorPicker-BRM_4lyI.js → GrColorPicker-vGSgpUV9.js}
RENAMED
|
@@ -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 {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
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:
|
|
152
|
-
s: clamp(
|
|
153
|
-
l: clamp(
|
|
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:
|
|
227
|
-
*
|
|
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[
|
|
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[
|
|
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[
|
|
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[
|
|
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:
|
|
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[
|
|
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[
|
|
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:
|
|
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,
|
|
570
|
-
}), 128))], 10,
|
|
884
|
+
}, null, 6)], 10, _hoisted_10);
|
|
885
|
+
}), 128))], 10, _hoisted_9)) : createCommentVNode("", true)
|
|
571
886
|
], 6)]),
|
|
572
887
|
_: 1
|
|
573
888
|
}, 8, [
|