@astryx-vue/core 0.31.0 → 0.32.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/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-CvNtu0Jd.js → AlertDialog-C5pc5nQN.js} +4 -4
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-BmX6wqba.js → AppShell-B7dkDyY8.js} +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-IVvsyeGV.js → Avatar-CYW9ZTD3.js} +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-DKmvoMxD.js → Banner-BNrs2Ptl.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-B8_znPYE.js → BottomSheet-CAJJ8cR5.js} +3 -3
- package/dist/{BottomSheet-BZ_yFoKC.js → BottomSheet-Z92IvLBU.js} +2 -2
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-CJpvbZsf.js → Breadcrumbs-CnvaPn8M.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-DdPty46q.js → Button-CzMWqCpJ.js} +2 -2
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-BNr79JpP.js → Carousel-BjyedZ0Y.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-BadS0fEx.js → Chat-CJr2RIyc.js} +11 -11
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-CzP8gP3v.js → CheckboxInput-BrbQTrL-.js} +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxListItem-CxBjpX3d.js → CheckboxListItem-CrAzFR4x.js} +3 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.d.ts +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-Cgm4uOhG.js → CodeBlock-pWPw1-iu.js} +1 -1
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-BgVwGtdA.js → CommandPalette-DnbvnT4c.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-vna5wtig.js → ComplexSelector-DWQbuovE.js} +2 -2
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-CE-FnLI6.js → ContextMenu-DfoShDVW.js} +167 -142
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-BCasoeIj.js → DateInput-D9_QsZMj.js} +10 -10
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-Bi97pjDX.js → DateRangeInput-8P8i8aVI.js} +5 -5
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-CKnvjLhi.js → DateTimeInput-C2XWslHp.js} +5 -5
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-Dt0gNuMT.js → Dialog-B1Hlr0x_.js} +2 -2
- package/dist/{Dialog-BN-NycQr.js → Dialog-Cet6PTnf.js} +1 -1
- package/dist/{DialogHeader-CSH2_5v-.js → DialogHeader-BiHQct4G.js} +2 -2
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-PeMgE4iA.js → Drawer-Bm3l7Dey.js} +2 -2
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +2 -3
- package/dist/{DropdownMenu-aYOIh9gZ.js → DropdownMenu-BaRXEFLa.js} +1083 -555
- package/dist/{DropdownMenuRadioItem.vue-C8rePTyz.d.ts → DropdownMenuRadioItem.vue-B4iwMWWD.d.ts} +16 -0
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-BGo1nrnT.js → EmptyState-CXDlpIdI.js} +2 -2
- package/dist/Field/index.js +3 -3
- package/dist/{Field-D-fRqyso.js → Field-njr7AUcW.js} +1 -1
- package/dist/{FieldInfoTip-Bstp5Lvd.js → FieldInfoTip-DLqZykVm.js} +1 -1
- package/dist/{FieldLabel-lV_qLaGp.js → FieldLabel-CyL5D1lu.js} +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-CTNnDIkm.js → FileInput-CtqZSRdh.js} +3 -3
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BFK3PftX.js → Heading-BXTbW_px.js} +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-DGjsPn-Q.js → HoverCard-zVUEeqF2.js} +4 -4
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-DPezhVBA.js → IconButton-CoZFp0CP.js} +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-B4BFfLtT.js → InfoTip-Eg2IGZJw.js} +1 -1
- package/dist/{InputClearButton-CxU3iv-5.js → InputClearButton-CBsL91my.js} +1 -1
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-CraWGK6Y.js → InputGroup-BE83-MCX.js} +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-C-hZoz8a.js → InternationalizationProvider-BAUKUK7N.js} +1 -1
- package/dist/{LayerContentBoundary-LCQLyxBT.js → LayerContentBoundary-DmRI6Bg0.js} +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-BNUG9CQ1.js → Lightbox-5PtYb0r4.js} +2 -2
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-Bwgpn-di.js → Link-BzXVGE7G.js} +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-BlEi5UGN.js → Markdown-HDZPj9Vw.js} +3 -3
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-wVa9dzH1.js → MobileNavToggle-CrUf5UPQ.js} +2 -2
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-CXshllJj.js → MoreMenu-DzpufGyj.js} +44 -15
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-Bs3Imw6k.js → MultiSelector-BS6wxlx4.js} +7 -7
- package/dist/{NavDisclosure-DsUYuMJr.js → NavDisclosure-BM0dJGLA.js} +1 -1
- package/dist/{NavHeadingSurface-QdM33nOf.js → NavHeadingSurface-CuQnoV_V.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-NCg3VjAQ.js → NavMenu-fXsoJKjW.js} +3 -3
- package/dist/{NavMenuItem-Bla6fYVl.js → NavMenuItem-BKY6eRkz.js} +2 -2
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-DicgvFte.js → NumberInput-Ueted2wi.js} +3 -3
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-BYYz3ePw.js → OverflowList-KpebInhH.js} +2 -2
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-kJhH6sPF.js → Pagination-BliQ5RGN.js} +2 -2
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-CqL_AXQB.js → Popover-DXfXGrWG.js} +6 -6
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-Ff2n7eJ2.js → PowerSearch-CmJKFEEu.js} +25 -25
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-DCAEXJuP.js → ProgressBar-Dj1ucJxG.js} +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-CsJYGjyx.js → RadioGroup-BLOjBRrM.js} +2 -2
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioListItem-Yc3K82YE.js → RadioListItem-CHxTpBva.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-DgzSGUul.js → Selector-OhIdsI8A.js} +6 -6
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-DNQZ8l6b.js → SideNav-CcdDU-hP.js} +5 -5
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-Bq_7Nskr.js → Slider-DjbWQ1wn.js} +1 -1
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-DFJavm30.js → StatusDot-Bta_bpaZ.js} +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DTPvMAxd.js → Switch-D4ojsj_l.js} +1 -1
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-C4i7UZkp.js → TabList-S99zXoRN.js} +2 -2
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-CqAV7l7W.js → Table-3NTjPpHc.js} +12 -12
- package/dist/Text/index.js +1 -1
- package/dist/{Text-D48QFTtL.js → Text-DNKNlENe.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-J2_wct0p.js → TextArea-DnSmL0A8.js} +4 -4
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-Da1TYd57.js → TextInput-DyHEMYld.js} +4 -4
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-1LsaJ4_m.js → Thumbnail-D8GlIdNm.js} +2 -2
- package/dist/{TimeField-ojhX2ZOj.js → TimeField-ADeT0OA1.js} +4 -4
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-CfeDP72M.js → TimeInput-C1gzJGHk.js} +2 -2
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-DgQdZAEa.js → Timer-DhI2oV5L.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-SseS_qtf.js → Timestamp-CTZSVsmd.js} +3 -3
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-yUVFaZiJ.js → Toast-DUqDW07c.js} +1 -1
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-B6hBzeVl.js → ToggleButton-BMBH2tmu.js} +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-nSEekhN1.js → Tokenizer-C0CdEzQT.js} +12 -12
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +2 -2
- package/dist/{Tooltip-CxzlUVN0.js → Tooltip-CEyd_iFa.js} +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-CcIayfsW.js → TopNav-BObecD_X.js} +4 -4
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-BD6xXNKh.js → Typeahead-C_0dTmaf.js} +5 -5
- package/dist/{useMenuDrillIn-CMsgOcDP.js → accessibleName-Cq7krRE-.js} +116 -26
- package/dist/{assertOptions-DHfonaBU.js → assertOptions-Km_9Y5rI.js} +1 -1
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +11 -11
- package/dist/{composables-CVvk9709.js → composables-kHI1dSq2.js} +2 -2
- package/dist/{index-Dp6MmjIo.d.ts → index-4m5X7IYX.d.ts} +92 -92
- package/dist/{index-DtY_R6Oh.d.ts → index-B83v2qNb.d.ts} +3 -3
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-C_iTVOHQ.d.ts → index-BIiG1CF_.d.ts} +4 -4
- package/dist/{index-DHUCHxn2.d.ts → index-BWWirRm3.d.ts} +1 -1
- package/dist/{index-CTjkJP4x.d.ts → index-Bgk1Rj2A.d.ts} +1 -1
- package/dist/{index-COgrQZIL.d.ts → index-BpFzfJbo.d.ts} +2 -2
- package/dist/{index-DH_xZI84.d.ts → index-Bxus0zuz.d.ts} +11 -11
- package/dist/{index-ChqMaV6N.d.ts → index-Bzi3A980.d.ts} +1 -1
- package/dist/{index-BjqoHLMq.d.ts → index-C1e8LNx2.d.ts} +1 -1
- package/dist/{index-DE-QPNz0.d.ts → index-C943VIzi.d.ts} +3 -2
- package/dist/{index-DYabo8TI.d.ts → index-CHLZPpjQ.d.ts} +3 -3
- package/dist/{index-Q1oG9yIT.d.ts → index-CO9GW-ik.d.ts} +1 -1
- package/dist/{index-AgTJRqUY.d.ts → index-CQi9WGWE.d.ts} +2 -2
- package/dist/{index-Bh-GqMzd.d.ts → index-CdRxeyhB.d.ts} +30 -2
- package/dist/{index-C9ZssPUV.d.ts → index-CiVrhGUJ.d.ts} +1 -1
- package/dist/{index-CG6dbyeb.d.ts → index-Cj-Ob5jw.d.ts} +10 -10
- package/dist/{index-mK1ICsVg.d.ts → index-Cm36VS1A.d.ts} +2 -2
- package/dist/{index-aHC2C89h.d.ts → index-DAEgHJTK.d.ts} +4 -4
- package/dist/{index-CuW4AQ7M.d.ts → index-DGe-ApvN.d.ts} +3 -3
- package/dist/{index-ZKBj_1nu.d.ts → index-DIw5D3zj.d.ts} +2 -2
- package/dist/{index-DofC9Rll.d.ts → index-Dk50Zh3F.d.ts} +2 -2
- package/dist/{index-0RIgvtdm.d.ts → index-DogWVRJi.d.ts} +1 -1
- package/dist/{index-CbA8rR_b.d.ts → index-FeZXsFO-.d.ts} +2 -2
- package/dist/{index-QC9FDUDA.d.ts → index-ILJ7sKx3.d.ts} +4 -4
- package/dist/{index-DVX2jlTQ.d.ts → index-JE1HrzdJ.d.ts} +2 -2
- package/dist/{index-DCyYldjP.d.ts → index-T5bzxQ30.d.ts} +1 -1
- package/dist/{index-BenG-F5d.d.ts → index-maTGrWjF.d.ts} +1 -1
- package/dist/{index-CEtFUoIm.d.ts → index-o3JHyrk8.d.ts} +1 -1
- package/dist/{index-yQc-te9a.d.ts → index-ql9ApSTF.d.ts} +2 -2
- package/dist/index.d.ts +33 -33
- package/dist/index.js +91 -91
- package/dist/{layerDepth-D3Rh8T5C.js → layerDepth-8jb4An1z.js} +1 -1
- package/dist/lazyBottomSheet-CNYA5qOy.js +25 -0
- package/dist/locale/index.js +3 -3
- package/dist/{locale-CVpkedoa.js → locale-C9LWi1y1.js} +1 -1
- package/dist/{menuActivation-BqiaK6ot.js → menuActivation-BQqnzKAX.js} +8 -1
- package/dist/{stillPointerGate-BbMABRyU.js → stillPointerGate-CpzpYNqy.js} +1 -1
- package/dist/{tooltipFocusRules-CpUOvFEU.js → tooltipFocusRules-BfnTnTpn.js} +2 -2
- package/dist/{tooltipTriggerRules-zN2xGd9K.js → tooltipTriggerRules-BRdKWVzo.js} +1 -1
- package/dist/{useCombobox-BqkTY3bw.js → useCombobox-DkwiskdE.js} +1 -1
- package/dist/{useDismiss-BKtyCwx4.js → useDismiss-fhWaGqY8.js} +1 -1
- package/dist/{useFocusTrap-BD9POtMp.js → useFocusTrap-DT2UCZd-.js} +1 -1
- package/dist/{useInputStatusIcon-BqV6YzTV.js → useInputStatusIcon-B1i0sFKu.js} +1 -1
- package/dist/{useMenuPress-DcwVUsQO.js → useMenuPress-CBtTaYOS.js} +71 -4
- package/dist/{useResizable-hv4NYIUi.js → useResizable-AfPBAq5c.js} +1 -1
- package/dist/{useTooltip-DvBKna-w.js → useTooltip-llyJd1q6.js} +4 -4
- package/dist/{useTouchTriggerInternal-Bl602PtA.js → useTouchTriggerInternal-DzsFiDjb.js} +1 -1
- package/dist/{useTruncationTooltip-DNAii2Nv.js → useTruncationTooltip-BFm7XgvO.js} +3 -3
- package/dist/{useTypeahead-BGpvWkzm.js → useTypeahead-8Y5m41VA.js} +1 -1
- package/dist/{useTypeaheadMenuConfig-BT9Lwsu7.js → useTypeaheadMenuConfig-Cy-gOjVd.js} +2 -2
- package/package.json +1 -1
- package/styles/dropdown-menu.css +5 -0
- package/dist/DropdownMenu-B_KDdI8P.js +0 -489
- package/dist/lazyBottomSheet-CbU1Pnfk.js +0 -16
- package/dist/useSubmenuMode-CZN9qrUo.js +0 -37
- package/dist/{index-BqhgeAT4.d.ts → index-D8lv2BiD.d.ts} +1 -1
- package/dist/{loadCatalog-FwMzmCx1.js → loadCatalog-zJKVLZ89.js} +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { m as msSinceInput } from "./pressFeedback-9dqGYjxv.js";
|
|
2
2
|
import { i as withoutClickGuard, r as disarmEveryClickGuard, t as armClickGuard } from "./clickGuard-C3VmOLhI.js";
|
|
3
|
-
import { c as currentGesture } from "./layerDepth-
|
|
3
|
+
import { c as currentGesture } from "./layerDepth-8jb4An1z.js";
|
|
4
4
|
import { t as focusForLastInput } from "./focusReturn-DfZS7TCp.js";
|
|
5
5
|
import { r as isInputShield } from "./inputHoldState-xntIqr5W.js";
|
|
6
6
|
import { getCurrentScope, onScopeDispose, toValue } from "vue";
|
|
@@ -342,6 +342,9 @@ function preventTouchScroll(doc) {
|
|
|
342
342
|
* - `open`:菜单在按住的指针下面打开了(鼠标按下,或手指按满长按时间),指针还没进菜单。
|
|
343
343
|
* - `tracking`:指针按着,高亮跟着它。
|
|
344
344
|
*
|
|
345
|
+
* 手指或笔打开菜单后,走过 `MENU_PRESS_HANDOFF_PX` 才开始挑行,没走够就松开什么都不执行
|
|
346
|
+
* (事件带了位置才这样)。
|
|
347
|
+
*
|
|
345
348
|
* 落定规则:打开菜单的那次按压,只有指针进过菜单、或者按满 `MENU_PRESS_SETTLE_MS`,
|
|
346
349
|
* 松开时才执行;否则什么都不执行,菜单保持打开。没有这条,一个在指针下面弹出的菜单
|
|
347
350
|
* 会替用户挑一行谁都没选的。
|
|
@@ -351,6 +354,11 @@ function preventTouchScroll(doc) {
|
|
|
351
354
|
*/
|
|
352
355
|
/** 打开菜单的那次按压至少要按多久,松开时才能执行。 */
|
|
353
356
|
const MENU_PRESS_SETTLE_MS = 300;
|
|
357
|
+
/**
|
|
358
|
+
* 手指打开菜单后要从菜单看到的第一个位置再走多远才开始挑行(UIMenu 的交接距离,pt)。
|
|
359
|
+
* 只有带位置的事件才用它:调用方不给位置,就仍按上面的落定规则。
|
|
360
|
+
*/
|
|
361
|
+
const MENU_PRESS_HANDOFF_PX = 10;
|
|
354
362
|
const IDLE_MENU_PRESS = { phase: "idle" };
|
|
355
363
|
const NONE = { type: "none" };
|
|
356
364
|
function idle(effect) {
|
|
@@ -385,6 +393,16 @@ function release(pointerType, event) {
|
|
|
385
393
|
dismiss: pointerType === "mouse"
|
|
386
394
|
});
|
|
387
395
|
}
|
|
396
|
+
/** 手指或笔:UIKit 的触屏规则。 */
|
|
397
|
+
function isFinger(pointerType) {
|
|
398
|
+
return pointerType !== "mouse";
|
|
399
|
+
}
|
|
400
|
+
function hasPosition(event) {
|
|
401
|
+
return event.x != null && event.y != null;
|
|
402
|
+
}
|
|
403
|
+
function hasPassedHandoff(from, to) {
|
|
404
|
+
return Math.hypot(to.x - from.x, to.y - from.y) >= 10;
|
|
405
|
+
}
|
|
388
406
|
function stepIdle(gesture, event) {
|
|
389
407
|
if (event.type !== "down") return {
|
|
390
408
|
gesture,
|
|
@@ -445,6 +463,32 @@ function stepTriggerPress(gesture, event) {
|
|
|
445
463
|
function stepOpen(gesture, event) {
|
|
446
464
|
switch (event.type) {
|
|
447
465
|
case "move":
|
|
466
|
+
if (isFinger(gesture.pointerType) && hasPosition(event)) {
|
|
467
|
+
const from = gesture.handoffFrom;
|
|
468
|
+
if (from == null) return {
|
|
469
|
+
gesture: {
|
|
470
|
+
...gesture,
|
|
471
|
+
handoffFrom: {
|
|
472
|
+
x: event.x,
|
|
473
|
+
y: event.y
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
effect: NONE
|
|
477
|
+
};
|
|
478
|
+
if (!hasPassedHandoff(from, event)) return {
|
|
479
|
+
gesture,
|
|
480
|
+
effect: NONE
|
|
481
|
+
};
|
|
482
|
+
return {
|
|
483
|
+
gesture: {
|
|
484
|
+
phase: "tracking",
|
|
485
|
+
pointerType: gesture.pointerType,
|
|
486
|
+
origin: "trigger",
|
|
487
|
+
row: event.row
|
|
488
|
+
},
|
|
489
|
+
effect: highlightEffect(event.row)
|
|
490
|
+
};
|
|
491
|
+
}
|
|
448
492
|
if (!event.isInMenu) return {
|
|
449
493
|
gesture,
|
|
450
494
|
effect: NONE
|
|
@@ -459,6 +503,11 @@ function stepOpen(gesture, event) {
|
|
|
459
503
|
effect: highlightEffect(event.row)
|
|
460
504
|
};
|
|
461
505
|
case "up":
|
|
506
|
+
if (isFinger(gesture.pointerType) && hasPosition(event)) return idle({
|
|
507
|
+
type: "settle",
|
|
508
|
+
stray: true,
|
|
509
|
+
dismiss: false
|
|
510
|
+
});
|
|
462
511
|
if (event.time - gesture.openedAt < 300) return idle({
|
|
463
512
|
type: "settle",
|
|
464
513
|
stray: true,
|
|
@@ -513,6 +562,8 @@ function menuPressStep(gesture, event) {
|
|
|
513
562
|
}
|
|
514
563
|
//#endregion
|
|
515
564
|
//#region src/composables/useMenuPress.ts
|
|
565
|
+
/** 手指或笔按住时点亮的那一行带这个标记,行按「按下」的颜色画。鼠标保持悬停的颜色。 */
|
|
566
|
+
const MENU_PRESS_LIT_ATTRIBUTE = "data-astryx-menu-press-lit";
|
|
516
567
|
/** 手指在触发器上按多久菜单才打开。 */
|
|
517
568
|
const MENU_PRESS_LONG_PRESS_MS = 500;
|
|
518
569
|
/**
|
|
@@ -533,9 +584,15 @@ function useMenuPress(options) {
|
|
|
533
584
|
let stopTouchPrevent = null;
|
|
534
585
|
let lastPointerEvent = null;
|
|
535
586
|
let triggerGesture = null;
|
|
587
|
+
let litRow = null;
|
|
536
588
|
/** 结束了上一次手势的那根「第二根手指」不能开始下一次。 */
|
|
537
589
|
let ignoredPointerId = null;
|
|
538
590
|
const isEnabled = () => toValue(options.isEnabled) ?? true;
|
|
591
|
+
/** 手指交接要看位置;只有 `touchModel: 'uikit'` 才把位置交给状态机。 */
|
|
592
|
+
const handoffPosition = (event) => options.touchModel === "uikit" ? {
|
|
593
|
+
x: event.clientX,
|
|
594
|
+
y: event.clientY
|
|
595
|
+
} : {};
|
|
539
596
|
const getDocument = () => options.menuRef.value?.ownerDocument ?? options.triggerRef?.value?.ownerDocument ?? document;
|
|
540
597
|
function pointAt(event) {
|
|
541
598
|
return resolvePoint(event, getDocument(), {
|
|
@@ -562,7 +619,14 @@ function useMenuPress(options) {
|
|
|
562
619
|
touchIdentifier: touchIdentifier ?? void 0
|
|
563
620
|
});
|
|
564
621
|
}
|
|
622
|
+
function setLit(row) {
|
|
623
|
+
if (litRow === row) return;
|
|
624
|
+
litRow?.removeAttribute(MENU_PRESS_LIT_ATTRIBUTE);
|
|
625
|
+
litRow = row;
|
|
626
|
+
litRow?.setAttribute(MENU_PRESS_LIT_ATTRIBUTE, "");
|
|
627
|
+
}
|
|
565
628
|
function endGesture() {
|
|
629
|
+
setLit(null);
|
|
566
630
|
touchTracker?.stop();
|
|
567
631
|
touchTracker = null;
|
|
568
632
|
longPress.cancel();
|
|
@@ -576,6 +640,7 @@ function useMenuPress(options) {
|
|
|
576
640
|
gesture = IDLE_MENU_PRESS;
|
|
577
641
|
}
|
|
578
642
|
function highlight(row) {
|
|
643
|
+
setLit(gesture.phase !== "idle" && gesture.pointerType !== "mouse" ? row : null);
|
|
579
644
|
if (options.onHighlight != null) options.onHighlight(row);
|
|
580
645
|
else focusHighlight(row, options.menuRef.value, getDocument());
|
|
581
646
|
}
|
|
@@ -625,7 +690,8 @@ function useMenuPress(options) {
|
|
|
625
690
|
type: "move",
|
|
626
691
|
row: point.row,
|
|
627
692
|
isInMenu: point.isInMenu,
|
|
628
|
-
time: Date.now()
|
|
693
|
+
time: Date.now(),
|
|
694
|
+
...handoffPosition(event)
|
|
629
695
|
}, event);
|
|
630
696
|
}
|
|
631
697
|
function onDocumentMove(event) {
|
|
@@ -650,7 +716,8 @@ function useMenuPress(options) {
|
|
|
650
716
|
row: point.row,
|
|
651
717
|
isInMenu: point.isInMenu,
|
|
652
718
|
isOnTrigger: point.isOnTrigger,
|
|
653
|
-
time: Date.now()
|
|
719
|
+
time: Date.now(),
|
|
720
|
+
...handoffPosition(event)
|
|
654
721
|
}, event);
|
|
655
722
|
}
|
|
656
723
|
function onDocumentCancel(event) {
|
|
@@ -771,4 +838,4 @@ function useMenuPress(options) {
|
|
|
771
838
|
};
|
|
772
839
|
}
|
|
773
840
|
//#endregion
|
|
774
|
-
export {
|
|
841
|
+
export { menuPressStep as a, resetMenuPress as c, MENU_PRESS_SETTLE_MS as i, useLongPress as l, useMenuPress as n, MENU_PRESS_MARKER as o, MENU_PRESS_HANDOFF_PX as r, isMenuPressActivation as s, MENU_PRESS_LIT_ATTRIBUTE as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as isImeKeyEvent } from "./layerDepth-
|
|
1
|
+
import { s as isImeKeyEvent } from "./layerDepth-8jb4An1z.js";
|
|
2
2
|
import { t as isApplePlatform } from "./isApplePlatform-B1ju6F5B.js";
|
|
3
3
|
import { r as registerResizableChannel } from "./resizableChannel-LElsNkSY.js";
|
|
4
4
|
import { computed, onBeforeUnmount, onMounted, onScopeDispose, reactive, ref, toValue, watch } from "vue";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { s as registerLayerSurface } from "./useClickableContainer-Dtjg-nkm.js";
|
|
2
2
|
import { r as useResolvedLayerTeleport } from "./useLayerMountTarget-zwZQglr2.js";
|
|
3
|
-
import { n as useLayer } from "./tooltipTriggerRules-
|
|
4
|
-
import { t as _sfc_main$1 } from "./LayerContentBoundary-
|
|
3
|
+
import { n as useLayer } from "./tooltipTriggerRules-BRdKWVzo.js";
|
|
4
|
+
import { t as _sfc_main$1 } from "./LayerContentBoundary-DmRI6Bg0.js";
|
|
5
5
|
import { a as trackInteractionModality } from "./interactionModality-4Km2ibsq.js";
|
|
6
6
|
import { t as useAnnounce } from "./announce-GU01Oix2.js";
|
|
7
|
-
import { t as useTouchTriggerInternal } from "./useTouchTriggerInternal-
|
|
8
|
-
import { n as opensOnFocus, r as useHoverLayerDismiss, t as createFocusGate } from "./tooltipFocusRules-
|
|
7
|
+
import { t as useTouchTriggerInternal } from "./useTouchTriggerInternal-DzsFiDjb.js";
|
|
8
|
+
import { n as opensOnFocus, r as useHoverLayerDismiss, t as createFocusGate } from "./tooltipFocusRules-BfnTnTpn.js";
|
|
9
9
|
import { t as renderedText } from "./renderedText-BwJdmps3.js";
|
|
10
10
|
import { Teleport, computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, inject, mergeProps, onMounted, onScopeDispose, openBlock, renderSlot, shallowRef, toDisplayString, toValue, unref, vShow, watch, withCtx, withDirectives } from "vue";
|
|
11
11
|
import "../styles/tooltip.css";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as INTERACTIVE_SELECTORS } from "./useClickableContainer-Dtjg-nkm.js";
|
|
2
|
-
import { c as currentGesture } from "./layerDepth-
|
|
2
|
+
import { c as currentGesture } from "./layerDepth-8jb4An1z.js";
|
|
3
3
|
import { a as trackInteractionModality, i as isTextEntrySincePointer, o as isDisabledControl, s as isTextEntryControl } from "./interactionModality-4Km2ibsq.js";
|
|
4
4
|
import { onScopeDispose, ref, toValue, watch } from "vue";
|
|
5
5
|
//#region src/composables/internal/tapRecognizer.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as matchesFocusVisible } from "./tooltipTriggerRules-
|
|
1
|
+
import { t as matchesFocusVisible } from "./tooltipTriggerRules-BRdKWVzo.js";
|
|
2
2
|
import { a as trackInteractionModality, t as getInteractionModality } from "./interactionModality-4Km2ibsq.js";
|
|
3
|
-
import { n as tooltipPresentInterestKey } from "./useTooltip-
|
|
4
|
-
import { t as _sfc_main$1 } from "./Tooltip-
|
|
3
|
+
import { n as tooltipPresentInterestKey } from "./useTooltip-llyJd1q6.js";
|
|
4
|
+
import { t as _sfc_main$1 } from "./Tooltip-CEyd_iFa.js";
|
|
5
5
|
import { n as useTruncation, t as truncatePlacement } from "./useTruncation-D_T-ezdp.js";
|
|
6
6
|
import { computed, createBlock, createCommentVNode, defineComponent, openBlock, provide, shallowRef } from "vue";
|
|
7
7
|
//#region src/Text/TruncationTooltip.vue
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as isImeKeyEvent } from "./layerDepth-
|
|
1
|
+
import { s as isImeKeyEvent } from "./layerDepth-8jb4An1z.js";
|
|
2
2
|
import { n as isShortcutChord, r as nextTypeaheadBuffer, t as findTypeaheadMatch } from "./typeaheadMatch-Cl-oxKFt.js";
|
|
3
3
|
import { onScopeDispose, ref } from "vue";
|
|
4
4
|
//#region src/composables/useTypeahead.ts
|
|
@@ -3,9 +3,9 @@ import { n as isDevBuild, t as devPropError } from "./devBuild-G249YcdZ.js";
|
|
|
3
3
|
import { t as devWarn } from "./useDevWarning-B2fsk2B-.js";
|
|
4
4
|
import { t as useAnnounce } from "./announce-GU01Oix2.js";
|
|
5
5
|
import { n as useAsyncSource } from "./useAsyncSource-7GTcK8ep.js";
|
|
6
|
-
import { t as useCombobox } from "./useCombobox-
|
|
6
|
+
import { t as useCombobox } from "./useCombobox-DkwiskdE.js";
|
|
7
7
|
import { t as _sfc_main$3 } from "./Spinner-DEVPDsD0.js";
|
|
8
|
-
import { t as createStillPointerGate } from "./stillPointerGate-
|
|
8
|
+
import { t as createStillPointerGate } from "./stillPointerGate-CpzpYNqy.js";
|
|
9
9
|
import { i as isOptionAction, n as searchResultMessage, r as OptionAction, t as useOptionActionGrid } from "./useOptionActionGrid-C7ibYM_A.js";
|
|
10
10
|
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
11
11
|
import "../styles/layer.css";
|
package/package.json
CHANGED
package/styles/dropdown-menu.css
CHANGED
|
@@ -157,6 +157,11 @@
|
|
|
157
157
|
background-color: var(--astryx-dropdown-menu-hover-background, light-dark(#0536590c, #ffffff0c));
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
/* A row a held finger or pen lights paints as pressed; a held mouse keeps the hover tint. */
|
|
161
|
+
.astryx-dropdown-menu .astryx-item.astryx-dropdown-menu-item[data-astryx-menu-press-lit]:focus {
|
|
162
|
+
background-color: var(--astryx-dropdown-menu-pressed-background, light-dark(#05365919, #ffffff19));
|
|
163
|
+
}
|
|
164
|
+
|
|
160
165
|
.astryx-dropdown-menu .astryx-item.astryx-dropdown-menu-item[data-disabled='true'] {
|
|
161
166
|
cursor: default;
|
|
162
167
|
}
|