@astryx-vue/core 0.15.0 → 0.16.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-BH74lTP9.js → AlertDialog-B6EU-qoC.js} +7 -7
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-CBhuHXh4.js → AppShell-NvIT99xw.js} +49 -6
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-B-dg3imS.js → Avatar-BECb_pnL.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-qEMqg2D8.js → Banner-BL7ztCU4.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-BvdEUioy.js → BottomSheet-CCW58Kl3.js} +4 -4
- package/dist/{BottomSheet-BTf3rz65.js → BottomSheet-HQpcSkPH.js} +6 -5
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-BAyIQaP-.js → Breadcrumbs-BpgUZDh3.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-47s3ZBYa.js → Button-Bi1evguV.js} +16 -8
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-BFl-0uOp.js → ButtonGroup-IIN-hAJl.js} +2 -2
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-D029GXOJ.js → Calendar-Bk2nGoT-.js} +69 -20
- 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-CYjVpChx.js → Carousel-r6KuUnE1.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-BfekV9OQ.js → Chat-JwOWSmvy.js} +7 -8
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-Cr0qhZpZ.js → CheckboxInput-3yFIGqYj.js} +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-DOAdqkXD.js → CheckboxList-2GMj8LSo.js} +3 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.d.ts +2 -2
- package/dist/Code/index.js +3 -3
- package/dist/{Code-6GS0nAkR.js → Code-rmiC0XfO.js} +1 -1
- package/dist/{CodeBlock-CuNiGAhQ.js → CodeBlock-AeyHA3sX.js} +21 -9
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-ChtGNWy3.js → CommandPalette-CccNmfH_.js} +4 -4
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-TPRMIDgt.js → ComplexSelector-BQNwK1Rx.js} +2 -2
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-DYKU1mJT.js → ContextMenu-DlkuMtXc.js} +8 -8
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-iQQLaYlp.js → DateInput-BAEJLiKU.js} +7 -7
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-BTYlRhmn.js → DateRangeInput-BM1__kku.js} +4 -4
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-CiUKgoVy.js → DateTimeInput-CqPuS2Wb.js} +6 -6
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-D54oHAxr.js → Dialog-BoV6-sZg.js} +4 -4
- package/dist/{Dialog-DeHVvhL3.js → Dialog-CvRMUDsx.js} +1 -1
- package/dist/{DialogHeader-B6ZIBIC4.js → DialogHeader-DywC9gTH.js} +2 -2
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-fB3IoD5P.js → Drawer-BYXbMeXz.js} +2 -2
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-D5fBg5Cc.js → DropdownMenu-1qD5NjRZ.js} +6 -6
- package/dist/{DropdownMenu-ClBIeBwM.js → DropdownMenu-DFD4_snt.js} +10 -10
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-BS8ESteS.js → EmptyState-DHogz6sS.js} +60 -9
- package/dist/Field/index.js +3 -3
- package/dist/{Field-Dxacpe9d.js → Field-CqIDpjny.js} +1 -1
- package/dist/{FieldInfoTip-DS4OAl2Q.js → FieldInfoTip-tETk5JH_.js} +1 -1
- package/dist/{FieldLabel-DjzTYhCM.js → FieldLabel-DL8r5Jzc.js} +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-Dak2gIXU.js → FileInput-Bwvb-tQk.js} +3 -3
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BYB7QXkT.js → Heading-CkHUa3bI.js} +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-CtDr234t.js → HoverCard-Ddcu9mBO.js} +4 -4
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-DvgueAEp.js → IconButton-eGsozJhK.js} +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-DshbO5eW.js → InfoTip-DH9gvEPg.js} +2 -2
- package/dist/{InputClearButton-DEb-bGsY.js → InputClearButton-tztlFeqp.js} +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-DLu11Lsd.js → InputGroup-ew0kllZw.js} +1 -1
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-CqCxB9ku.js → InternationalizationProvider-7rA65NO7.js} +1 -1
- package/dist/{LayerContentBoundary-Cx5xXZzg.js → LayerContentBoundary-CpqXMTyU.js} +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-BeYYiLFm.js → Layout-DP2vrvTv.js} +1 -1
- package/dist/{LayoutPanel-DDLcJgzG.js → LayoutPanel-DuroKU_A.js} +23 -4
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-BbeuDbgd.js → Lightbox-CwRSUkkH.js} +4 -4
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-CFxZ9W2X.js → Link-DKeXWgvF.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-DTqTIKbq.js → Markdown-umUpz0Pf.js} +3 -3
- package/dist/{MediaTheme-BVKUsMfC.js → MediaTheme-Bkj-_DFN.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-pwkvRFW-.js → MobileNavToggle-DlQmYaBx.js} +4 -4
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BY1t1_QA.js → MoreMenu-YTZfzTM_.js} +5 -5
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-BgGEzXiX.js → MultiSelector-wNUnwrLr.js} +24 -13
- package/dist/{NavDisclosure-mXBWmRDC.js → NavDisclosure-Dg6U7pc7.js} +1 -1
- package/dist/{NavHeadingSurface-foJo5bLT.js → NavHeadingSurface-C17cbKn9.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-CG9Bthba.js → NavMenu-CTbvZnO2.js} +26 -6
- package/dist/{NavMenuItem-BiFZUPxC.js → NavMenuItem-BbT97LNz.js} +14 -7
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-BDNiEgzf.js → NumberInput-C8ymESEK.js} +3 -3
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-CR96Nr5t.js → OverflowList-Buzyq2be.js} +25 -10
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-40BEwZOo.js → Pagination-BREwZINI.js} +1 -1
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-BUiTyOcY.js → Popover-CBXTOdtZ.js} +7 -7
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-BLJd0NKp.js → PowerSearch-8ali3Cze.js} +19 -19
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-sGSCEtHC.js → ProgressBar-B0IjJKEy.js} +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-D58Fy-bM.js → RadioGroup-fNJoHMK0.js} +2 -2
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-u9PoRBXY.js → RadioList-Dt301fwV.js} +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-Bon51yNV.js → ResizeHandle-4-krI-cQ.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/ScrollableArea/index.js +1 -1
- package/dist/{ScrollableArea-C2GBp55Z.js → ScrollableArea-Cflez3d4.js} +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-COVOdCq2.js → SegmentedControl-DoTaOwPI.js} +16 -9
- 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-QHLh7g_K.js → Selector-DJiziplk.js} +15 -10
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-BgmpUELq.js → SideNav-CcgrhUXF.js} +6 -6
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-Depy9L-Y.js → Slider-W9T8GaFW.js} +2 -2
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stack/index.js +1 -1
- package/dist/{Stack-Tw4I_dt-.js → Stack-Byxur1jV.js} +19 -2
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-D0Wy2ggp.js → StatusDot-EQ8y4vq2.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-dD4OQLkI.js → Switch-YXDRo4ei.js} +2 -2
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-CoiyQidC.js → TabList-QBE7ojy4.js} +20 -8
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-CIMUux6b.js → Table-uPs9O7-T.js} +14 -14
- package/dist/Text/index.js +1 -1
- package/dist/{Text-BWSmB93V.js → Text-vw2_AIxf.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-CbY2w_ic.js → TextArea-BNiJxKXr.js} +9 -6
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-C8f89GV8.js → TextInput-CiKL_mGp.js} +8 -5
- package/dist/Theme/index.js +2 -2
- package/dist/{Theme-PyAl8nM0.js → Theme-8bDq2nud.js} +1 -1
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-DENhXd9-.js → Thumbnail-BJSDUhEI.js} +3 -3
- package/dist/{TimeField-Bzq72Me_.js → TimeField-Cc6LnM1G.js} +5 -5
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D-bRCUzU.js → TimeInput-DAd4fwAj.js} +2 -2
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-CgBSMr9E.js → Timer-DWdMqvhQ.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-B-VgG6l8.js → Timestamp-HUDZSHZO.js} +27 -8
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-CRSZV9K-.js → Toast-y_XAIj6o.js} +2 -2
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-Bm5IQUy5.js → ToggleButton-Bo3FU3Fw.js} +3 -3
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-DmjNQLDl.js → Tokenizer-IlXAt3yW.js} +7 -8
- 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-BwrJVZ8X.js → Tooltip-nEgotJlb.js} +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-FiszUHkM.js → TopNav-CzTYtsm4.js} +5 -5
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-Dc3A72iY.js → TreeList-TEh2PChT.js} +15 -2
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-LdmEDCOU.js → Typeahead-Ck5wA5fs.js} +5 -5
- package/dist/announce-GU01Oix2.js +179 -0
- package/dist/busyAnnouncement-CExubuYm.js +55 -0
- package/dist/clipboardWrite-Ds6fxmZc.js +58 -0
- package/dist/composables/index.d.ts +3 -3
- package/dist/composables/index.js +18 -18
- package/dist/{composables-Bi0Rt0Uj.js → composables-CCsHfpCS.js} +25 -5
- package/dist/focusReturn-D7Y7Pwwb.js +41 -0
- package/dist/{index-6kd7pher.d.ts → index-51CkIKnI.d.ts} +4 -6
- package/dist/{index-qbj0Lj9a.d.ts → index-B99LFtEg.d.ts} +4 -4
- package/dist/{index-CP-fJFcJ.d.ts → index-BOCb89V9.d.ts} +3 -3
- package/dist/{index-D-eT_nvf.d.ts → index-BYEcUSBq.d.ts} +63 -63
- package/dist/{index-YKCx03zD.d.ts → index-BaFphczL.d.ts} +2 -2
- package/dist/{index-Dc9_kBrU.d.ts → index-Bc-ChXDo.d.ts} +2 -2
- package/dist/{index-BB9acgK8.d.ts → index-BgT6mH3U.d.ts} +1 -1
- package/dist/{index-CL8JvxHW.d.ts → index-C1zwvxPH.d.ts} +2 -2
- package/dist/{index-BHYhTZzp.d.ts → index-C2cH8OLC.d.ts} +1 -1
- package/dist/{index-O9y23OPJ.d.ts → index-CMLnSg3T.d.ts} +2 -0
- package/dist/{index-DfdtDWSP.d.ts → index-CQ1bsxLC.d.ts} +1 -1
- package/dist/{index-Bgk1Rj2A.d.ts → index-CTjkJP4x.d.ts} +1 -1
- package/dist/{index-DDrL_-hJ.d.ts → index-CbA8rR_b.d.ts} +3 -3
- package/dist/{index-ul1hNxih.d.ts → index-ChqMaV6N.d.ts} +13 -2
- package/dist/{index-C9ZssPUV.d.ts → index-CiVrhGUJ.d.ts} +1 -1
- package/dist/{index-Cf5j7Cjl.d.ts → index-Cv0FsOgj.d.ts} +50 -16
- package/dist/{index-rnFsCdJ7.d.ts → index-Cy1rEWC-.d.ts} +1 -1
- package/dist/{index-BzViSe8D.d.ts → index-D1J81rYJ.d.ts} +4 -4
- package/dist/{index-rzkX36wM.d.ts → index-D2p8EVVV.d.ts} +2 -2
- package/dist/{index-BL4mH8aK.d.ts → index-DMN_JVEt.d.ts} +1 -1
- package/dist/{index-DPH5yoAr.d.ts → index-DTvnURvQ.d.ts} +2 -2
- package/dist/{index-BhxqUt3y.d.ts → index-Dpz-JUMl.d.ts} +3 -3
- package/dist/{index-BlGEkjh5.d.ts → index-FzAAjCFZ.d.ts} +6 -6
- package/dist/{index-DYabo8TI.d.ts → index-MvrDMqnQ.d.ts} +1 -1
- package/dist/{index--tm6L1ot.d.ts → index-QRzXr6ME.d.ts} +1 -1
- package/dist/{index-DE1genab.d.ts → index-QnlWyUxN.d.ts} +2 -2
- package/dist/{index-B1eCxBCY.d.ts → index-TXcNH86P.d.ts} +1 -1
- package/dist/{index-C5e2rZML.d.ts → index-dWlCpnua.d.ts} +2 -2
- package/dist/{index-DS9SzqqJ.d.ts → index-lmd9LZKB.d.ts} +2 -2
- package/dist/{index-bwNMoZo_.d.ts → index-r1zpDegp.d.ts} +4 -4
- package/dist/{index-BEZ4ezJk.d.ts → index-wY6dKz6c.d.ts} +2 -2
- package/dist/index.d.ts +34 -34
- package/dist/index.js +109 -109
- package/dist/{layerDepth-I6d28O4d.js → interactionModality-B5dR7nnb.js} +125 -1
- package/dist/{layerFocusReturn-_pBrNAPE.js → layerFocusReturn-13azEIdn.js} +1 -1
- package/dist/{layout-DzxSsBe8.js → layout-DhX4-SyE.js} +4 -2
- package/dist/{loadCatalog-DYuZZRtf.js → loadCatalog-C3MSknfx.js} +10 -2
- package/dist/{loadCatalog-Cvf-xgDD.d.ts → loadCatalog-DFyDz_4e.d.ts} +5 -0
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -4
- package/dist/{locale-B-DrJCMs.js → locale-OCGw4bi6.js} +1 -1
- package/dist/scrollGeometry-ivD7aoBo.js +104 -0
- package/dist/{scrollKeyboardDelegation-BSpUCTlO.js → scrollKeyboardDelegation-DZ4t5PvC.js} +2 -82
- package/dist/scrollLock-CoVg9lLU.js +212 -0
- package/dist/{stillPointerGate-DlAU_J_M.js → stillPointerGate-0vdn-hSa.js} +1 -1
- package/dist/strayClick-_QKRT5aH.js +99 -0
- package/dist/{timestamp-CFBVCsHF.js → timestamp-BMYQsFDj.js} +2 -0
- package/dist/{useActionGroupTracking-CDclbV3Y.js → useActionGroupTracking-CbE8fwYb.js} +1 -1
- package/dist/{useChatStreamScroll-oDfybEos.js → useChatStreamScroll-BIMKffDA.js} +1 -1
- package/dist/{useClipboard-i4a_x_Io.js → useClipboard-CTY3GwFz.js} +24 -10
- package/dist/{useClipboard-ZdT7wKBL.d.ts → useClipboard-DeO8fCW_.d.ts} +12 -3
- package/dist/{useDismiss-21Gk7uWk.js → useDismiss-Dfb0Ky7T.js} +1 -1
- package/dist/useFocusTrap-BUd-fvUH.js +238 -0
- package/dist/{useHoverLayerDismiss-Chfty2wT.js → useHoverLayerDismiss-CFGjvYi4.js} +1 -1
- package/dist/{useInputStatusIcon-Yd0hvw5K.js → useInputStatusIcon-lln4Pl9h.js} +1 -1
- package/dist/{selectorEscape-FjiU_5WC.js → useKeyboardHighlight-CGCf1O57.js} +24 -3
- package/dist/{useLayer-vK4-yRk_.js → useLayer-D34yqEqr.js} +1 -1
- package/dist/useMediaQuery-BzXGT1Aw.js +64 -0
- package/dist/{useMenuHover-CbjjfzAd.js → useMenuHover-CQYo0XCC.js} +4 -2
- package/dist/{useMenuPress-9vsHzbRX.js → useMenuPress-9dOj2hvC.js} +71 -26
- package/dist/{useOverflow-VrwF5oek.js → useOverflow-GU0pxGaU.js} +43 -3
- package/dist/{useResizable-DYlc06-H.js → useResizable-BMlG1oxA.js} +1 -1
- package/dist/{useResolvedColorMode-CHOh3Yz-.js → useResolvedColorMode-Df97_9w_.js} +1 -1
- package/dist/{useRestoreFocus-Do8y6Yy4.js → useRestoreFocus-Cz_jM_nW.js} +2 -2
- package/dist/useScrollRegionProps-DwkPUb-O.js +119 -0
- package/dist/{useScrollableArea-Bwn75HDg.js → useScrollableArea-BaHkGWbX.js} +73 -10
- package/dist/{useTooltip-DIg3ZE9P.js → useTooltip-CCPg2zcB.js} +7 -7
- package/dist/{useTouchHitArea-B3jx01C3.js → useTouchHitArea-CzCtdSt9.js} +1 -1
- package/dist/{useTouchTriggerInternal-CrLW-7kT.js → useTouchTriggerInternal-Bs7obOrb.js} +1 -2
- package/dist/{useTruncationTooltip-D9_lzxpF.js → useTruncationTooltip-BLNzBuiG.js} +3 -3
- package/dist/{useTypeahead-CiLt-yEg.js → useTypeahead-BrWvmOu9.js} +1 -1
- package/dist/{useTypeaheadAnnouncement-C59m2nSx.js → useTypeaheadAnnouncement-CSikDlpK.js} +2 -2
- package/package.json +1 -1
- package/styles/app-shell.css +13 -0
- package/styles/calendar.css +6 -0
- package/styles/dropdown-menu.css +16 -0
- package/styles/multi-selector.css +6 -0
- package/styles/nav-menu.css +6 -0
- package/styles/segmented-control.css +3 -8
- package/styles/selector.css +6 -0
- package/styles/tab-menu.css +6 -0
- package/styles/toolbar.css +12 -0
- package/dist/announce-B210eJVf.js +0 -104
- package/dist/busyAnnouncement-D3eGqdsf.js +0 -88
- package/dist/interactionModality-BPvyShJT.js +0 -125
- package/dist/scrollLock-C3aT4-0z.js +0 -102
- package/dist/strayClick-CY-_ImKv.js +0 -60
- package/dist/useFocusTrap-CnKnSN99.js +0 -190
- package/dist/useMediaQuery-GMmgp28-.js +0 -32
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as characterCount } from "./characters-wTnzjkkR.js";
|
|
2
|
-
import { t as useAnnounce } from "./announce-
|
|
2
|
+
import { t as useAnnounce } from "./announce-GU01Oix2.js";
|
|
3
3
|
import { n as useAsyncSource } from "./useAsyncSource-Gk0VtE7_.js";
|
|
4
4
|
import { t as useCombobox } from "./useCombobox-D374_pT8.js";
|
|
5
5
|
import { n as isDevBuild, t as devPropError } from "./devBuild-G249YcdZ.js";
|
|
6
6
|
import { t as _sfc_main$2 } from "./Spinner-DEVPDsD0.js";
|
|
7
|
-
import { t as createStillPointerGate } from "./stillPointerGate-
|
|
7
|
+
import { t as createStillPointerGate } from "./stillPointerGate-0vdn-hSa.js";
|
|
8
8
|
import { i as isOptionAction, n as searchResultMessage, r as OptionAction, t as useOptionActionGrid } from "./useOptionActionGrid-C7ibYM_A.js";
|
|
9
9
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, watch, withModifiers } from "vue";
|
|
10
10
|
import "../styles/typeahead.css";
|
package/package.json
CHANGED
package/styles/app-shell.css
CHANGED
|
@@ -147,6 +147,19 @@
|
|
|
147
147
|
outline: none;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
/*
|
|
151
|
+
* 内容溢出时主区域是键盘停靠点:只有 Tab 到它才画标准焦点环,往里收一圈免得被外壳裁掉;
|
|
152
|
+
* 跳转链接和脚本的聚焦(data-programmatic-focus)不画。
|
|
153
|
+
*/
|
|
154
|
+
.astryx-app-shell__content[data-scroll-region]:focus-visible:not([data-programmatic-focus]) {
|
|
155
|
+
outline: var(--astryx-focus-outline-width, 2px) var(--astryx-focus-outline-style, solid) var(--astryx-focus-outline-color, currentcolor);
|
|
156
|
+
outline-offset: calc(-1 * var(--astryx-focus-outline-width, 2px));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.astryx-app-shell__content[data-corner][data-scroll-region]:focus-visible {
|
|
160
|
+
border-start-start-radius: var(--astryx-radius-page, 1.75rem);
|
|
161
|
+
}
|
|
162
|
+
|
|
150
163
|
.astryx-app-shell__content[data-variant='wash'] {
|
|
151
164
|
background-color: var(--astryx-color-background-body, #f1f1f1);
|
|
152
165
|
}
|
package/styles/calendar.css
CHANGED
|
@@ -123,6 +123,12 @@
|
|
|
123
123
|
box-shadow: inset 0 0 0 1px var(--astryx-color-border-emphasized, #d4d4d4);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
/* 今天还不知道,开着的月份就还没定:格子先占着位置藏起来,月份一定下来就显示。 */
|
|
127
|
+
.astryx-calendar[data-month-pending] .astryx-calendar-months,
|
|
128
|
+
.astryx-calendar[data-month-pending] .astryx-calendar-nav-button {
|
|
129
|
+
visibility: hidden;
|
|
130
|
+
}
|
|
131
|
+
|
|
126
132
|
.astryx-calendar-months {
|
|
127
133
|
display: flex;
|
|
128
134
|
flex-wrap: wrap;
|
package/styles/dropdown-menu.css
CHANGED
|
@@ -412,6 +412,22 @@
|
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
+
@media (forced-colors: active) {
|
|
416
|
+
/* 强制配色把半透明的焦点叠色换成页面色,聚焦的行就看不出来了:用系统的 Highlight / HighlightText 配对涂出来。 */
|
|
417
|
+
.astryx-dropdown-menu [role='menuitem']:focus,
|
|
418
|
+
.astryx-dropdown-menu [role='menuitemcheckbox']:focus,
|
|
419
|
+
.astryx-dropdown-menu [role='menuitemradio']:focus {
|
|
420
|
+
background: Highlight;
|
|
421
|
+
color: HighlightText;
|
|
422
|
+
forced-color-adjust: none;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.astryx-dropdown-menu [role='menuitemradio']:focus .astryx-dropdown-menu-radio {
|
|
426
|
+
border-color: HighlightText;
|
|
427
|
+
background: Highlight;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
415
431
|
@media (forced-colors: active) {
|
|
416
432
|
/* 强制配色会去掉阴影,阴影是这块浮层唯一的边,这里补一圈系统色边框。 */
|
|
417
433
|
/* 底部抽屉和框里的菜单不是独立浮层,不加。子菜单的弹出面板同样带 .astryx-dropdown-menu。 */
|
|
@@ -350,6 +350,12 @@
|
|
|
350
350
|
background: var(--astryx-dropdown-menu-hover-background, light-dark(#0536590c, #ffffff0c));
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
+
/* 键盘移到的高亮选项画标准焦点环:只靠填充色,它和列表底色的对比不到 3:1。指针移到的高亮只有填充。 */
|
|
354
|
+
.astryx-multi-selector-listbox[data-keyboard-highlight] .astryx-multi-selector-option.is-active:not(.is-disabled) {
|
|
355
|
+
outline: var(--astryx-focus-outline-width, 2px) var(--astryx-focus-outline-style, solid) var(--astryx-focus-outline-color, currentcolor);
|
|
356
|
+
outline-offset: calc(-1 * var(--astryx-focus-outline-width, 2px));
|
|
357
|
+
}
|
|
358
|
+
|
|
353
359
|
.astryx-multi-selector-option.is-disabled {
|
|
354
360
|
cursor: default;
|
|
355
361
|
opacity: 0.5;
|
package/styles/nav-menu.css
CHANGED
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
gap: var(--astryx-spacing-0-5, 2px);
|
|
29
29
|
margin: 0;
|
|
30
30
|
padding: 0;
|
|
31
|
+
/* 一个放得下的菜单保留捏合手势;能滚动时才放开纵向滚动。 */
|
|
32
|
+
touch-action: pinch-zoom;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.astryx-nav-menu[data-overflow='true'] {
|
|
36
|
+
touch-action: pan-y pinch-zoom;
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
.astryx-nav-menu--sm { min-width: 160px; }
|
|
@@ -35,17 +35,12 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/*
|
|
38
|
-
* A disabled control
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* A disabled control is dimmed but keeps the pointer: a press can focus the
|
|
39
|
+
* segment that holds the Tab stop and a reason can open on hover. Selection
|
|
40
|
+
* stays blocked in the handlers.
|
|
41
41
|
*/
|
|
42
42
|
.astryx-segmented-control[data-disabled='true'] {
|
|
43
43
|
opacity: 0.5;
|
|
44
|
-
pointer-events: none;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.astryx-segmented-control[data-disabled='true'][data-disabled-message='true'] {
|
|
48
|
-
pointer-events: auto;
|
|
49
44
|
}
|
|
50
45
|
|
|
51
46
|
.astryx-segmented-control-item {
|
package/styles/selector.css
CHANGED
|
@@ -416,6 +416,12 @@
|
|
|
416
416
|
background: var(--astryx-dropdown-menu-hover-background, light-dark(#0536590c, #ffffff0c));
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
+
/* 键盘移到的高亮选项画标准焦点环:只靠填充色,它和列表底色的对比不到 3:1。指针移到的高亮只有填充。 */
|
|
420
|
+
.astryx-selector-listbox[data-keyboard-highlight] .astryx-selector-option.is-active:not(.is-disabled) {
|
|
421
|
+
outline: var(--astryx-focus-outline-width, 2px) var(--astryx-focus-outline-style, solid) var(--astryx-focus-outline-color, currentcolor);
|
|
422
|
+
outline-offset: calc(-1 * var(--astryx-focus-outline-width, 2px));
|
|
423
|
+
}
|
|
424
|
+
|
|
419
425
|
.astryx-selector-option.is-selected {
|
|
420
426
|
font-weight: var(--astryx-font-weight-medium, 500);
|
|
421
427
|
}
|
package/styles/tab-menu.css
CHANGED
|
@@ -29,6 +29,12 @@
|
|
|
29
29
|
background: var(--astryx-color-background-surface, #fff);
|
|
30
30
|
box-shadow: var(--astryx-shadow-high, 0 8px 24px rgb(0 0 0 / 16%));
|
|
31
31
|
color: var(--astryx-color-text-primary, #171717);
|
|
32
|
+
/* 一个放得下的菜单保留捏合手势;能滚动时才放开纵向滚动。 */
|
|
33
|
+
touch-action: pinch-zoom;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.astryx-tab-menu-dropdown[data-overflow='true'] {
|
|
37
|
+
touch-action: pan-y pinch-zoom;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
.astryx-tab-menu-heading {
|
package/styles/toolbar.css
CHANGED
|
@@ -90,5 +90,17 @@
|
|
|
90
90
|
.astryx-toolbar--two-lane > .astryx-toolbar__slot--end {
|
|
91
91
|
flex-grow: 1;
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
/*
|
|
95
|
+
* 首部这条道里直接放着一个 OverflowList:它的自动最小宽度不能再按展开的项算,
|
|
96
|
+
* 否则列表永远看不到更窄的宽度,不会折叠,尾部那条被挤出工具栏。
|
|
97
|
+
* 它占满尾部让出的宽度,不换行(换行会把展开的列表挪到自己的一行),列表折到自己的下限为止。
|
|
98
|
+
* 这个因子远大于尾部的 1,尾部保持内容宽度。列表藏得更深的道不受影响。
|
|
99
|
+
*/
|
|
100
|
+
.astryx-toolbar--two-lane > .astryx-toolbar__slot--start:has(> .astryx-overflow-list) {
|
|
101
|
+
flex: 1000000 1 0%;
|
|
102
|
+
flex-wrap: nowrap;
|
|
103
|
+
min-width: 0;
|
|
104
|
+
}
|
|
93
105
|
.astryx-toolbar--centered .astryx-toolbar__slot--end { margin-inline-start: 0; }
|
|
94
106
|
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
//#region src/composables/internal/announce.ts
|
|
2
|
-
const CONTAINER_ATTR = "data-astryx-live-region";
|
|
3
|
-
const CLEAR_DELAY_MS = 2e3;
|
|
4
|
-
const VISUALLY_HIDDEN_CSS = [
|
|
5
|
-
"position:absolute",
|
|
6
|
-
"width:1px",
|
|
7
|
-
"height:1px",
|
|
8
|
-
"margin:-1px",
|
|
9
|
-
"padding:0",
|
|
10
|
-
"overflow:hidden",
|
|
11
|
-
"clip:rect(0,0,0,0)",
|
|
12
|
-
"white-space:nowrap",
|
|
13
|
-
"border:0",
|
|
14
|
-
"inset-block-start:0",
|
|
15
|
-
"inset-inline-start:0",
|
|
16
|
-
"pointer-events:none",
|
|
17
|
-
"user-select:none"
|
|
18
|
-
].join(";");
|
|
19
|
-
const clearTimers = {
|
|
20
|
-
polite: null,
|
|
21
|
-
assertive: null
|
|
22
|
-
};
|
|
23
|
-
let regions = null;
|
|
24
|
-
/** 每块区域还没写进去的那一帧。清空区域时要一并取消,不然旧文字会在清空之后又冒出来。 */
|
|
25
|
-
const pendingFrames = {
|
|
26
|
-
polite: /* @__PURE__ */ new Set(),
|
|
27
|
-
assertive: /* @__PURE__ */ new Set()
|
|
28
|
-
};
|
|
29
|
-
function cancelPendingFrames(politeness) {
|
|
30
|
-
if (typeof cancelAnimationFrame === "function") for (const frame of pendingFrames[politeness]) cancelAnimationFrame(frame);
|
|
31
|
-
pendingFrames[politeness].clear();
|
|
32
|
-
}
|
|
33
|
-
function cancelScheduledClear(politeness) {
|
|
34
|
-
const timer = clearTimers[politeness];
|
|
35
|
-
if (timer != null) {
|
|
36
|
-
clearTimeout(timer);
|
|
37
|
-
clearTimers[politeness] = null;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function scheduleClear(politeness, target) {
|
|
41
|
-
cancelScheduledClear(politeness);
|
|
42
|
-
clearTimers[politeness] = setTimeout(() => {
|
|
43
|
-
clearTimers[politeness] = null;
|
|
44
|
-
target.textContent = "";
|
|
45
|
-
}, CLEAR_DELAY_MS);
|
|
46
|
-
}
|
|
47
|
-
function createRegion(politeness) {
|
|
48
|
-
const el = document.createElement("div");
|
|
49
|
-
el.setAttribute(CONTAINER_ATTR, politeness);
|
|
50
|
-
el.setAttribute("aria-live", politeness);
|
|
51
|
-
el.setAttribute("aria-atomic", "true");
|
|
52
|
-
el.setAttribute("role", politeness === "assertive" ? "alert" : "status");
|
|
53
|
-
el.style.cssText = VISUALLY_HIDDEN_CSS;
|
|
54
|
-
document.body.appendChild(el);
|
|
55
|
-
return el;
|
|
56
|
-
}
|
|
57
|
-
function getRegions() {
|
|
58
|
-
if (typeof document === "undefined") return null;
|
|
59
|
-
if (regions != null) {
|
|
60
|
-
if (!regions.polite.isConnected) document.body.appendChild(regions.polite);
|
|
61
|
-
if (!regions.assertive.isConnected) document.body.appendChild(regions.assertive);
|
|
62
|
-
return regions;
|
|
63
|
-
}
|
|
64
|
-
regions = {
|
|
65
|
-
polite: createRegion("polite"),
|
|
66
|
-
assertive: createRegion("assertive")
|
|
67
|
-
};
|
|
68
|
-
return regions;
|
|
69
|
-
}
|
|
70
|
-
function announceMessage(message, politeness) {
|
|
71
|
-
const live = getRegions();
|
|
72
|
-
if (live == null) return;
|
|
73
|
-
const target = politeness === "assertive" ? live.assertive : live.polite;
|
|
74
|
-
target.textContent = "";
|
|
75
|
-
const write = () => {
|
|
76
|
-
target.textContent = message;
|
|
77
|
-
};
|
|
78
|
-
if (typeof requestAnimationFrame === "function") {
|
|
79
|
-
const frame = requestAnimationFrame(() => {
|
|
80
|
-
pendingFrames[politeness].delete(frame);
|
|
81
|
-
write();
|
|
82
|
-
});
|
|
83
|
-
pendingFrames[politeness].add(frame);
|
|
84
|
-
} else write();
|
|
85
|
-
scheduleClear(politeness, target);
|
|
86
|
-
}
|
|
87
|
-
function clearRegion(politeness) {
|
|
88
|
-
cancelPendingFrames(politeness);
|
|
89
|
-
cancelScheduledClear(politeness);
|
|
90
|
-
if (regions == null) return;
|
|
91
|
-
const target = politeness === "assertive" ? regions.assertive : regions.polite;
|
|
92
|
-
target.textContent = "";
|
|
93
|
-
}
|
|
94
|
-
function useAnnounce() {
|
|
95
|
-
return (message, politeness = "polite") => {
|
|
96
|
-
if (message === "") {
|
|
97
|
-
clearRegion(politeness);
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
announceMessage(message, politeness);
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
//#endregion
|
|
104
|
-
export { useAnnounce as t };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { t as useAnnounce } from "./announce-B210eJVf.js";
|
|
2
|
-
import { onScopeDispose, toValue, watch } from "vue";
|
|
3
|
-
//#region src/composables/internal/busyAnnouncement.ts
|
|
4
|
-
/**
|
|
5
|
-
* 忙碌控件的读屏播报。
|
|
6
|
-
*
|
|
7
|
-
* 控件里的 Spinner 只是装饰(`aria-hidden`,没有 live 角色),忙碌由控件自己播报:
|
|
8
|
-
* 每次进入忙碌念一次,重渲染不重复,忙完再忙会再念。
|
|
9
|
-
*
|
|
10
|
-
* 原生模态对话框打开时,挂在 body 上的公共播报区域被挡在外面,读屏念不到。
|
|
11
|
-
* 这时改用对话框里一块常驻的 polite 区域:先空着插进去,下一帧再写字。
|
|
12
|
-
*/
|
|
13
|
-
const REGION_ATTR = "data-astryx-modal-busy-region";
|
|
14
|
-
const VISUALLY_HIDDEN_CSS = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;";
|
|
15
|
-
/** 和公共播报区域的清空时间一致。 */
|
|
16
|
-
const CLEAR_DELAY_MS = 2e3;
|
|
17
|
-
/** 每块对话框区域还没落地的写入和清空。新写入会取消它们,旧文字不会晚到,也不会清掉新文字。 */
|
|
18
|
-
const pendingByRegion = /* @__PURE__ */ new WeakMap();
|
|
19
|
-
function announceInModal(dialog, message) {
|
|
20
|
-
let region = dialog.querySelector(`:scope > [${REGION_ATTR}]`);
|
|
21
|
-
if (region == null) {
|
|
22
|
-
region = document.createElement("div");
|
|
23
|
-
region.setAttribute(REGION_ATTR, "");
|
|
24
|
-
region.setAttribute("role", "status");
|
|
25
|
-
region.setAttribute("aria-live", "polite");
|
|
26
|
-
region.setAttribute("aria-atomic", "true");
|
|
27
|
-
region.style.cssText = VISUALLY_HIDDEN_CSS;
|
|
28
|
-
dialog.appendChild(region);
|
|
29
|
-
}
|
|
30
|
-
const target = region;
|
|
31
|
-
const previous = pendingByRegion.get(target);
|
|
32
|
-
if (previous != null) {
|
|
33
|
-
cancelAnimationFrame(previous.frame);
|
|
34
|
-
clearTimeout(previous.timer);
|
|
35
|
-
}
|
|
36
|
-
target.textContent = "";
|
|
37
|
-
const pending = { frame: 0 };
|
|
38
|
-
pending.frame = requestAnimationFrame(() => {
|
|
39
|
-
target.textContent = message;
|
|
40
|
-
pending.timer = setTimeout(() => {
|
|
41
|
-
target.textContent = "";
|
|
42
|
-
pendingByRegion.delete(target);
|
|
43
|
-
}, CLEAR_DELAY_MS);
|
|
44
|
-
});
|
|
45
|
-
pendingByRegion.set(target, pending);
|
|
46
|
-
}
|
|
47
|
-
function isOpenModal(dialog) {
|
|
48
|
-
if (!dialog?.open) return false;
|
|
49
|
-
try {
|
|
50
|
-
return dialog.matches(":modal");
|
|
51
|
-
} catch {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* 每次进入忙碌播报一次 `message`,挂载时已经忙碌也算一次。
|
|
57
|
-
*
|
|
58
|
-
* `element` 是控件里的任意元素,用来找它所在的模态对话框;不传时当场用公共播报区域念。
|
|
59
|
-
* 路线在下一帧再选:同一轮里打开的对话框要等它自己的 `showModal()` 跑完。
|
|
60
|
-
*/
|
|
61
|
-
function useBusyAnnouncement(busy, message, element) {
|
|
62
|
-
const announce = useAnnounce();
|
|
63
|
-
let frame = null;
|
|
64
|
-
function cancel() {
|
|
65
|
-
if (frame != null && typeof cancelAnimationFrame === "function") cancelAnimationFrame(frame);
|
|
66
|
-
frame = null;
|
|
67
|
-
}
|
|
68
|
-
function speak() {
|
|
69
|
-
const dialog = element == null ? null : toValue(element)?.closest("dialog");
|
|
70
|
-
if (isOpenModal(dialog)) announceInModal(dialog, toValue(message));
|
|
71
|
-
else announce(toValue(message), "polite");
|
|
72
|
-
}
|
|
73
|
-
watch(() => toValue(busy), (isBusy) => {
|
|
74
|
-
cancel();
|
|
75
|
-
if (!isBusy) return;
|
|
76
|
-
if (element == null || typeof requestAnimationFrame !== "function") {
|
|
77
|
-
speak();
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
frame = requestAnimationFrame(() => {
|
|
81
|
-
frame = null;
|
|
82
|
-
speak();
|
|
83
|
-
});
|
|
84
|
-
}, { immediate: true });
|
|
85
|
-
onScopeDispose(cancel);
|
|
86
|
-
}
|
|
87
|
-
//#endregion
|
|
88
|
-
export { useBusyAnnouncement as t };
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
//#region src/utils/controlKind.ts
|
|
2
|
-
/**
|
|
3
|
-
* @file controlKind.ts
|
|
4
|
-
* @output isTextEntryControl、isDisabledControl:按元素本身判断它是哪类控件
|
|
5
|
-
* @position Tooltip、HoverCard 的触屏规则和交互模态共用,不从包里导出
|
|
6
|
-
*/
|
|
7
|
-
/** 不能输入文字的 input 类型。 */
|
|
8
|
-
const NON_TEXT_INPUT_TYPES = /* @__PURE__ */ new Set([
|
|
9
|
-
"button",
|
|
10
|
-
"checkbox",
|
|
11
|
-
"color",
|
|
12
|
-
"file",
|
|
13
|
-
"hidden",
|
|
14
|
-
"image",
|
|
15
|
-
"radio",
|
|
16
|
-
"range",
|
|
17
|
-
"reset",
|
|
18
|
-
"submit"
|
|
19
|
-
]);
|
|
20
|
-
/**
|
|
21
|
-
* 这个元素是不是能打字的控件:文本框、多行文本框、可编辑区。
|
|
22
|
-
* 同时读属性:测试 DOM 不一定实现 `isContentEditable`。
|
|
23
|
-
*/
|
|
24
|
-
function isTextEntryControl(element) {
|
|
25
|
-
if (element == null) return false;
|
|
26
|
-
const tag = element.tagName;
|
|
27
|
-
if (tag === "TEXTAREA") return true;
|
|
28
|
-
if (tag === "INPUT") return !NON_TEXT_INPUT_TYPES.has((element.getAttribute("type") ?? "text").toLowerCase());
|
|
29
|
-
if (element.isContentEditable === true) return true;
|
|
30
|
-
const editable = element.getAttribute("contenteditable");
|
|
31
|
-
return editable != null && editable !== "false";
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* 这个控件是不是禁用的:`aria-disabled="true"`(还能聚焦、能讲出禁用原因的那种),
|
|
35
|
-
* 或原生 `:disabled`。
|
|
36
|
-
*/
|
|
37
|
-
function isDisabledControl(element) {
|
|
38
|
-
if (element.getAttribute("aria-disabled") === "true") return true;
|
|
39
|
-
try {
|
|
40
|
-
return element.matches(":disabled");
|
|
41
|
-
} catch {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region src/composables/internal/interactionModality.ts
|
|
47
|
-
const STORE_KEY = Symbol.for("@astryx-vue/core/interaction-modality/v1");
|
|
48
|
-
function getStore(doc) {
|
|
49
|
-
const host = doc;
|
|
50
|
-
const existing = host[STORE_KEY];
|
|
51
|
-
if (existing != null) return existing;
|
|
52
|
-
const store = {
|
|
53
|
-
modality: "keyboard",
|
|
54
|
-
isTextEntrySincePointer: false,
|
|
55
|
-
isListening: false,
|
|
56
|
-
onPointerDown: () => {
|
|
57
|
-
store.modality = "pointer";
|
|
58
|
-
store.isTextEntrySincePointer = true;
|
|
59
|
-
},
|
|
60
|
-
onKeyDown: (event) => {
|
|
61
|
-
if (event.metaKey || event.altKey || event.ctrlKey) return;
|
|
62
|
-
store.modality = "keyboard";
|
|
63
|
-
if (!isTextEntryKey(event)) store.isTextEntrySincePointer = false;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
Object.defineProperty(host, STORE_KEY, { value: store });
|
|
67
|
-
return store;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* 软键盘对很多键发 `Unidentified` 或 `Process`,`Enter` 是它的「前往」键;
|
|
71
|
-
* `Shift`、`CapsLock`、`Dead` 只影响下一个字。其它有名字的键移动焦点或光标,算键盘导航。
|
|
72
|
-
*/
|
|
73
|
-
const TEXT_ENTRY_NAMED_KEYS = /* @__PURE__ */ new Set([
|
|
74
|
-
"Backspace",
|
|
75
|
-
"CapsLock",
|
|
76
|
-
"Dead",
|
|
77
|
-
"Delete",
|
|
78
|
-
"Enter",
|
|
79
|
-
"Process",
|
|
80
|
-
"Shift",
|
|
81
|
-
"Unidentified"
|
|
82
|
-
]);
|
|
83
|
-
function isTextEntryKey(event) {
|
|
84
|
-
const target = typeof event.composedPath === "function" ? event.composedPath()[0] : event.target;
|
|
85
|
-
if (!isTextEntryControl(target instanceof Element ? target : null)) return false;
|
|
86
|
-
const key = typeof event.key === "string" ? event.key : "";
|
|
87
|
-
return event.isComposing === true || [...key].length === 1 || TEXT_ENTRY_NAMED_KEYS.has(key);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* 开始跟踪交互模态。不传 `doc` 就跟踪页面自己的 document;组件渲染进 iframe、
|
|
91
|
-
* 画中画窗口时传它所在的 document,那个窗口的输入只到那里。
|
|
92
|
-
* 可以反复调用,监听只装一次。服务端什么也不做。
|
|
93
|
-
*/
|
|
94
|
-
function trackInteractionModality(doc) {
|
|
95
|
-
const target = doc ?? (typeof document === "undefined" ? null : document);
|
|
96
|
-
if (target == null) return;
|
|
97
|
-
const store = getStore(target);
|
|
98
|
-
if (store.isListening) return;
|
|
99
|
-
store.isListening = true;
|
|
100
|
-
const options = {
|
|
101
|
-
capture: true,
|
|
102
|
-
passive: true
|
|
103
|
-
};
|
|
104
|
-
target.addEventListener("pointerdown", store.onPointerDown, options);
|
|
105
|
-
target.addEventListener("keydown", store.onKeyDown, options);
|
|
106
|
-
}
|
|
107
|
-
/** 上一次的交互模态。没有 document 时答键盘。 */
|
|
108
|
-
function getInteractionModality() {
|
|
109
|
-
return typeof document === "undefined" ? "keyboard" : getStore(document).modality;
|
|
110
|
-
}
|
|
111
|
-
/** 上一次是不是键盘。顺手确保跟踪已经装上。 */
|
|
112
|
-
function isKeyboardModality() {
|
|
113
|
-
trackInteractionModality();
|
|
114
|
-
return getInteractionModality() === "keyboard";
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* 上一次指针按下之后,是不是只往文本框里打过字(软键盘打字不算换成键盘操作)。
|
|
118
|
-
* 没有 document 时答 false。
|
|
119
|
-
*/
|
|
120
|
-
function isTextEntrySincePointer(doc) {
|
|
121
|
-
const target = doc ?? (typeof document === "undefined" ? null : document);
|
|
122
|
-
return target != null && getStore(target).isTextEntrySincePointer === true;
|
|
123
|
-
}
|
|
124
|
-
//#endregion
|
|
125
|
-
export { isDisabledControl as a, trackInteractionModality as i, isKeyboardModality as n, isTextEntryControl as o, isTextEntrySincePointer as r, getInteractionModality as t };
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { onScopeDispose, watch } from "vue";
|
|
2
|
-
//#region src/composables/internal/scrollbarGutter.ts
|
|
3
|
-
const NOOP = {
|
|
4
|
-
settle() {},
|
|
5
|
-
release() {}
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* 让 `element` 的内容宽度在接下来的锁滚动期间保持现在的样子。
|
|
9
|
-
*
|
|
10
|
-
* 在加锁样式**之前**调,加完之后马上 `settle()`,解锁时 `release()`。
|
|
11
|
-
* 悬浮滚动条(手机、macOS 默认)不占地方,什么都不用留,也什么都不碰。
|
|
12
|
-
*/
|
|
13
|
-
function holdScrollbarGutter(element) {
|
|
14
|
-
if (typeof window === "undefined" || typeof document === "undefined") return NOOP;
|
|
15
|
-
const root = document.documentElement;
|
|
16
|
-
const viewportWidth = root.clientWidth;
|
|
17
|
-
if (viewportWidth === 0) return NOOP;
|
|
18
|
-
const previousGutter = root.style.scrollbarGutter;
|
|
19
|
-
const previousPadding = element.style.paddingRight;
|
|
20
|
-
const widthBefore = element.getBoundingClientRect().width;
|
|
21
|
-
let heldGutter = false;
|
|
22
|
-
let padded = false;
|
|
23
|
-
let settled = false;
|
|
24
|
-
if (window.innerWidth > viewportWidth) {
|
|
25
|
-
root.style.scrollbarGutter = "stable";
|
|
26
|
-
heldGutter = true;
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
settle() {
|
|
30
|
-
if (settled) return;
|
|
31
|
-
settled = true;
|
|
32
|
-
const grew = element.getBoundingClientRect().width - widthBefore;
|
|
33
|
-
if (grew <= 0) return;
|
|
34
|
-
const existing = Number.parseFloat(window.getComputedStyle(element).paddingRight) || 0;
|
|
35
|
-
element.style.paddingRight = `${existing + grew}px`;
|
|
36
|
-
padded = true;
|
|
37
|
-
},
|
|
38
|
-
release() {
|
|
39
|
-
if (padded) {
|
|
40
|
-
element.style.paddingRight = previousPadding;
|
|
41
|
-
padded = false;
|
|
42
|
-
}
|
|
43
|
-
if (heldGutter) {
|
|
44
|
-
root.style.scrollbarGutter = previousGutter;
|
|
45
|
-
heldGutter = false;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region src/composables/internal/scrollLock.ts
|
|
52
|
-
/**
|
|
53
|
-
* 对应原版 Astryx 的 `hooks/useScrollLock`。
|
|
54
|
-
*
|
|
55
|
-
* 按引用计数锁住 body 滚动:里层关掉时,外层还开着就不会把页面放开。
|
|
56
|
-
* 锁的时候藏掉 body 的滚动,同时给滚动条留住位置,页面不会左右跳一下。
|
|
57
|
-
*
|
|
58
|
-
* 原版用 `position: fixed` 把页面钉住,再在放开时 `scrollTo` 回去,因为 iOS Safari
|
|
59
|
-
* 不认 `overscroll-behavior`。这边不这么做:打开浮层时滚动位置留在原地,body 的
|
|
60
|
-
* `position` 也不改。钉住 body 会让页面里的 `position: fixed` 改参照,放开时的
|
|
61
|
-
* `scrollTo` 也会在画完一帧之后才把页面拽回去。iOS 上背景仍可能被带着滚,这是这套锁的边界。
|
|
62
|
-
*/
|
|
63
|
-
let depth = 0;
|
|
64
|
-
let saved = null;
|
|
65
|
-
function useScrollLock(isLocked) {
|
|
66
|
-
let held = false;
|
|
67
|
-
function acquire() {
|
|
68
|
-
if (held || typeof document === "undefined") return;
|
|
69
|
-
if (depth === 0) {
|
|
70
|
-
const body = document.body;
|
|
71
|
-
const gutter = holdScrollbarGutter(body);
|
|
72
|
-
saved = {
|
|
73
|
-
overflow: body.style.overflow,
|
|
74
|
-
gutter
|
|
75
|
-
};
|
|
76
|
-
body.style.overflow = "hidden";
|
|
77
|
-
gutter.settle();
|
|
78
|
-
}
|
|
79
|
-
depth += 1;
|
|
80
|
-
held = true;
|
|
81
|
-
}
|
|
82
|
-
function release() {
|
|
83
|
-
if (!held) return;
|
|
84
|
-
held = false;
|
|
85
|
-
depth -= 1;
|
|
86
|
-
if (depth === 0 && saved != null) {
|
|
87
|
-
if (typeof document !== "undefined") document.body.style.overflow = saved.overflow;
|
|
88
|
-
saved.gutter.release();
|
|
89
|
-
saved = null;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
watch(isLocked, (locked) => {
|
|
93
|
-
if (locked) acquire();
|
|
94
|
-
else release();
|
|
95
|
-
}, {
|
|
96
|
-
flush: "sync",
|
|
97
|
-
immediate: true
|
|
98
|
-
});
|
|
99
|
-
onScopeDispose(release);
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
export { useScrollLock as t };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
let isModelActivation = false;
|
|
2
|
-
/**
|
|
3
|
-
* 按压模型派发的那次行激活是不是正在进行。只在那次派发的同步过程中为真,
|
|
4
|
-
* 所以把激活转交给里面链接的行,能分清这是模型的 click 还是浏览器多出来的那个。
|
|
5
|
-
*/
|
|
6
|
-
function isMenuPressActivation() {
|
|
7
|
-
return isModelActivation;
|
|
8
|
-
}
|
|
9
|
-
/** 在「模型激活」标记下执行一段同步代码。 */
|
|
10
|
-
function runAsMenuPressActivation(run) {
|
|
11
|
-
isModelActivation = true;
|
|
12
|
-
try {
|
|
13
|
-
run();
|
|
14
|
-
} finally {
|
|
15
|
-
isModelActivation = false;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
let swallower = null;
|
|
19
|
-
function disarm() {
|
|
20
|
-
if (swallower == null) return;
|
|
21
|
-
swallower.isArmed = false;
|
|
22
|
-
if (swallower.timer != null) {
|
|
23
|
-
clearTimeout(swallower.timer);
|
|
24
|
-
swallower.timer = null;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function onWindowClickCapture(event) {
|
|
28
|
-
if (swallower == null || !swallower.isArmed) return;
|
|
29
|
-
if (event.detail === 0 || isModelActivation) return;
|
|
30
|
-
event.preventDefault();
|
|
31
|
-
event.stopImmediatePropagation();
|
|
32
|
-
disarm();
|
|
33
|
-
}
|
|
34
|
-
/** 布下吞 click 的口子。同一个文档只装一次监听。 */
|
|
35
|
-
function armStrayClick(doc) {
|
|
36
|
-
const view = doc.defaultView;
|
|
37
|
-
if (view == null) return;
|
|
38
|
-
if (swallower == null || swallower.doc !== doc) {
|
|
39
|
-
if (swallower != null) {
|
|
40
|
-
swallower.doc.defaultView?.removeEventListener("click", onWindowClickCapture, true);
|
|
41
|
-
swallower.doc.removeEventListener("pointerdown", disarm, true);
|
|
42
|
-
}
|
|
43
|
-
view.addEventListener("click", onWindowClickCapture, true);
|
|
44
|
-
doc.addEventListener("pointerdown", disarm, true);
|
|
45
|
-
swallower = {
|
|
46
|
-
doc,
|
|
47
|
-
isArmed: false,
|
|
48
|
-
timer: null
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
disarm();
|
|
52
|
-
swallower.isArmed = true;
|
|
53
|
-
swallower.timer = setTimeout(disarm, 400);
|
|
54
|
-
}
|
|
55
|
-
/** 撤掉已经布下的口子。卸载和测试里用。 */
|
|
56
|
-
function resetMenuPress() {
|
|
57
|
-
disarm();
|
|
58
|
-
}
|
|
59
|
-
//#endregion
|
|
60
|
-
export { runAsMenuPressActivation as i, isMenuPressActivation as n, resetMenuPress as r, armStrayClick as t };
|