@astryx-vue/core 0.2.6 → 0.4.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/THIRD_PARTY_NOTICES.md +9 -0
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-BBhl5P1X.js → AlertDialog-C2inDZWG.js} +13 -7
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-mrflO0Uy.js → AppShell-CumzH-8z.js} +3 -3
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-pPZ4dI_s.js → Avatar-BW0TE8t9.js} +47 -34
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-B--NQSB3.js → AvatarGroup-DLC_FFR5.js} +57 -13
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-GbGxrqQO.js → Banner-C5VAwo4D.js} +68 -34
- package/dist/Blockquote/index.js +1 -1
- package/dist/Blockquote-DRoKdcxZ.js +27 -0
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-eJ3FzTBD.js → BottomSheet-B4sc3F1S.js} +288 -140
- package/dist/{BottomSheet-DIVwbGr3.js → BottomSheet-m54uCMJN.js} +20 -4
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/Breadcrumbs-CTaz7Kh4.js +223 -0
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-B6Hj_O_s.js → Button-ONOoHdkg.js} +25 -15
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/ButtonGroup-DnkSZ9a5.js +87 -0
- package/dist/{ButtonTooltip-nWWrth8j.js → ButtonTooltip-CNKOQHYR.js} +7 -4
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-B7vIowKq.js → Calendar-BAqzzQm2.js} +5 -5
- package/dist/Card/index.d.ts +2 -2
- package/dist/Card/index.js +1 -1
- package/dist/{Card-HAjZQg2s.js → Card-B-I24X9S.js} +2 -0
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-DAkOa7KK.js → Carousel-DXC22UWq.js} +50 -33
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-DVoI6UOA.js → Chat-BdJW6IX5.js} +152 -83
- package/dist/CheckboxIndicator/index.js +1 -1
- package/dist/{CheckboxIndicator-D37cm2Rh.js → CheckboxIndicator-fH4d-JE1.js} +9 -3
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-BS9J6edf.js → CheckboxInput-DJHCbwgC.js} +19 -11
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-CX1i_jVP.js → CheckboxList-BdZIP4_J.js} +155 -38
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-Djgwa0ko.js → Citation-DbZn2vms.js} +8 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-Bhds4RRe.js → ClickableCard-ChAfiw9T.js} +10 -7
- package/dist/Code/index.d.ts +1 -1
- package/dist/Code/index.js +3 -3
- package/dist/{Code-XnPuGxey.js → Code-Bg7GBdxy.js} +2 -1
- package/dist/{CodeBlock-BUM3czCS.js → CodeBlock-Caaflp7C.js} +7 -3
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-Cov3Pyq5.js → Collapsible-Bdj0WYpb.js} +13 -11
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-D6wYS30d.js → CommandPalette-C_MClfAg.js} +146 -62
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-Bil81sfq.js → ComplexSelector-BeVQaqRf.js} +94 -22
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-DdLJnxNN.js → ContextMenu-C6hPYvYz.js} +299 -179
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-u2XKccpK.js → DateInput-BjLdmYor.js} +567 -76
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-u7LhH6up.js → DateRangeInput-Br3wVEfD.js} +99 -28
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/DateTimeInput-CAZBwoRe.js +562 -0
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +2 -2
- package/dist/{Dialog-BiOSKQso.js → Dialog-Dce4Y97V.js} +28 -11
- package/dist/{Dialog-FGHfDu5M.js → Dialog-fhyxB00e.js} +32 -5
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Divider/index.js +1 -1
- package/dist/{Divider-BtwnL18I.js → Divider-mOZ6vIQw.js} +5 -1
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-SM_BEOgM.js → DropdownMenu-BdGmQVb1.js} +85 -57
- package/dist/{DropdownMenu-BEasdJ6R.js → DropdownMenu-BzQrNV9C.js} +481 -264
- package/dist/{DropdownMenuRadioItem.vue-CXEURBcq.d.ts → DropdownMenuRadioItem.vue-Qd-8Rg4Q.d.ts} +236 -230
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-C_GH7IV5.js → EmptyState-CmOQf2SH.js} +2 -2
- package/dist/Field/index.d.ts +4 -3
- package/dist/Field/index.js +4 -3
- package/dist/{Field-D5gUEGw4.js → Field--OEsLBfE.js} +4 -3
- package/dist/{FieldInfoTip-Ds-sW_jY.js → FieldInfoTip-gxsnfkZw.js} +3 -3
- package/dist/{FieldLabel-BNeXRuGH.js → FieldLabel-jxIiWgLw.js} +12 -7
- package/dist/FieldStatus/index.d.ts +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BpdiO1V8.js → FileInput-B_pUxB0Y.js} +106 -29
- package/dist/FormLayout/index.d.ts +1 -1
- package/dist/FormLayout/index.js +1 -1
- package/dist/{FormLayout-D47FjiOq.js → FormLayout-B9dUB6Ps.js} +1 -1
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BnwWEWkp.js → Heading-BzBunfN7.js} +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-ycY50pRN.js → HoverCard-BpJhT0sn.js} +35 -22
- package/dist/Icon/index.d.ts +4 -4
- package/dist/Icon/index.js +1 -1
- package/dist/{Icon-bteSId7T.js → Icon-KDnUyY7f.js} +12 -20
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-DDNgNl7B.js → IconButton-DI-XBbtV.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/Indicator/index.js +2 -1
- package/dist/InputClearButton-CwXPan8c.js +40 -0
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +2 -2
- package/dist/{InputGroup-CA03Smrs.js → InputGroup-DiiocoIW.js} +2 -2
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-DJay_w3B.js → InternationalizationProvider-kBapgKAQ.js} +5 -9
- package/dist/{Item-KhFKX9St.js → Item-DWMIjN8n.js} +34 -9
- package/dist/Kbd/index.js +1 -1
- package/dist/{Kbd-BB-Dw6zE.js → Kbd-CV3LO2Ge.js} +18 -2
- package/dist/LayerContentBoundary-CvsKxwwm.js +27 -0
- package/dist/LayerProvider/index.js +1 -1
- package/dist/{LayerProvider-D9NsQFzL.js → LayerProvider-B6zpMBWC.js} +15 -3
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-9X6eCUoY.js → Layout-JJRCG7Mf.js} +1 -1
- package/dist/{LayoutPanel-DeOh00p5.js → LayoutPanel-zM5vjrKS.js} +15 -8
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-DTF9EdTG.js → Lightbox-D8wyPgMK.js} +8 -6
- package/dist/Link/index.d.ts +2 -2
- package/dist/Link/index.js +1 -1
- package/dist/{Link-BqHCtiyt.js → Link-DweIpOtN.js} +29 -12
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-8RWT8XAG.js → ListItem-BQXMu1Tb.js} +1 -1
- package/dist/Markdown/index.d.ts +5 -2
- package/dist/Markdown/index.js +5 -2
- package/dist/Markdown/parser/index.d.ts +4 -0
- package/dist/Markdown/parser/index.js +3 -0
- package/dist/Markdown/plugin-protocol/index.d.ts +35 -0
- package/dist/Markdown/plugin-protocol/index.js +107 -0
- package/dist/Markdown/plugin-renderer/index.d.ts +31 -0
- package/dist/Markdown/plugin-renderer/index.js +42 -0
- package/dist/{Markdown-2CVyZDuB.js → Markdown-DhVfOvXk.js} +195 -484
- package/dist/MediaTheme-DlLqYhDy.js +433 -0
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-B-OelQlt.js → MetadataList-CEYceIlN.js} +15 -7
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-C3dkrM98.js → MobileNavToggle-pdoJFZHx.js} +60 -19
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-D1WFGqGU.js → MoreMenu-CFNqSRev.js} +87 -67
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/MultiSelector-DuVatmq5.js +1456 -0
- package/dist/{NavDisclosure-C_fugrQ3.js → NavDisclosure-Bq9DTZLO.js} +29 -7
- package/dist/{NavHeadingSurface-B3yJspSN.js → NavHeadingSurface-C4v_MtkX.js} +29 -26
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +2 -2
- package/dist/{NavItem-BBIGSvDj.js → NavItem-BPb3yfgz.js} +17 -4
- package/dist/NavMenu/index.d.ts +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-ThXguZAz.js → NavMenu-BYIDzjix.js} +42 -15
- package/dist/{NavMenuItem-BvJNsDFC.js → NavMenuItem-D3FO90GR.js} +14 -12
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-B0vzOg3N.js +727 -0
- package/dist/Outline/index.d.ts +2 -2
- package/dist/Outline/index.js +2 -2
- package/dist/{Outline-755h-lMP.js → Outline-CfGv2F1o.js} +91 -6
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-NmrSMbxb.js → OverflowList-BgRLZ3dh.js} +23 -6
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-Cc4BrjQg.js → Pagination-Bfe12018.js} +2 -2
- package/dist/PickerWheel-CSwUYfes.js +69 -0
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-CtoBfVlD.js → Popover-78dFjTb9.js} +28 -17
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DHoiObLn.js → PowerSearch-BoAMdFaT.js} +776 -586
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-CVLzdoBK.js → ProgressBar-VP4JS7vm.js} +10 -7
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-Bfu6JSNV.js → RadioGroup-BIipql-L.js} +94 -26
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-xY1cwLdZ.js → RadioList-GyhgBg4j.js} +57 -8
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-q4nD_586.js → ResizeHandle-TPlUCAHD.js} +103 -50
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/ScrollableArea/index.js +1 -1
- package/dist/{ScrollableArea-CJiaALHm.js → ScrollableArea-0u6RWtGG.js} +14 -3
- package/dist/Scrollbars/index.d.ts +2 -0
- package/dist/Scrollbars/index.js +3 -0
- package/dist/Scrollbars-D_93hJYK.js +75 -0
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-ChHmFrrC.js → SegmentedControl-D1wWGBZo.js} +11 -5
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-Bj5s_tIN.js → SelectableCard-BEqnhPaX.js} +17 -12
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-CPISLzp7.js +1049 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-Dtv8eA2j.js → SideNav-CN2QeAtY.js} +64 -41
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DWobsPgm.js → Slider-pdC0jpHu.js} +172 -46
- package/dist/Spinner/index.js +1 -1
- package/dist/Spinner-DdVUadii.js +200 -0
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stack/index.js +2 -2
- package/dist/{Stack-CjQEavuq.js → Stack-Bb_h60t3.js} +10 -3
- package/dist/{Stack-D_Bhs-3r.js → Stack-Bp-XN9J4.js} +20 -9
- package/dist/StatusDot/index.d.ts +1 -1
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-BPUhMOff.js → StatusDot-BS_ohXhd.js} +8 -4
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-CE8dHysu.js → Stepper-CyaSRSdu.js} +101 -79
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DaVPRxvN.js → Switch-Z2Vfiiic.js} +38 -22
- package/dist/TabList/index.d.ts +2 -2
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-DIkK9sgK.js → TabList-DRqP0Hrv.js} +205 -63
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +1 -1
- package/dist/{Table-hqZMmzfU.js → Table-BcrrylMX.js} +727 -448
- package/dist/Text/index.d.ts +2 -2
- package/dist/Text/index.js +1 -1
- package/dist/{Text-CV3LmscH.js → Text-CmTOgYXf.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Ab5Sw60T.js → TextArea-DA9CCG_J.js} +104 -50
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-zFT1_qgI.js → TextInput-CI96einV.js} +71 -38
- package/dist/Theme/index.d.ts +3 -3
- package/dist/Theme/index.js +3 -2
- package/dist/Theme-BbDT8B_C.js +2125 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-C3NnJUFG.js → Thumbnail-B2ZAY59J.js} +13 -10
- package/dist/{TimeField-ByiJKBRM.js → TimeField-CpAgja9D.js} +299 -40
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-S8n946tp.js → TimeInput-Bw_lHS4M.js} +78 -9
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-avMQk5DN.js → Timer-CH7GsEVu.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-xpQKCk0d.js → Timestamp-BFNuoTZ0.js} +5 -5
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/Toast-DwnPjx6j.js +685 -0
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-B-C-Q7XP.js → ToggleButton-cLjh9W-x.js} +5 -4
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-DsntTYhQ.js → Token-BfS4vi__.js} +32 -17
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-41p035dX.js → Tokenizer-Ci3E5bvP.js} +109 -23
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Toolbar/index.js +1 -1
- package/dist/{Toolbar-BrgvvTCk.js → Toolbar-C0pMWL4S.js} +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/{Tooltip-C4Vaqd3G.js → Tooltip-sAM8i1eO.js} +23 -19
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-CeSeEMX3.js → TopNav-gW59zp1o.js} +16 -15
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-BUz-KZJd.js → TreeList-DaoI7zaH.js} +124 -41
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-k3xhFxkr.js → Typeahead-D4JjvjK4.js} +125 -26
- package/dist/{TypeaheadMenu-DBW6rHeO.js → TypeaheadMenu-BQlMrfqX.js} +141 -51
- package/dist/{announce-Cnio10Wk.js → announce-B210eJVf.js} +17 -2
- package/dist/characterReferences-BJ-jLhsR.js +65 -0
- package/dist/characters-rcDbGt71.d.ts +29 -0
- package/dist/characters-wTnzjkkR.js +58 -0
- package/dist/{colorMode-CBgdgDSn.js → colorMode-BxqfDP4P.js} +1 -4
- package/dist/composables/index.d.ts +5 -4
- package/dist/composables/index.js +23 -18
- package/dist/{composables-CbKx9C1Y.js → composables-Bc02zKAO.js} +167 -197
- package/dist/context-B6UElI5X.js +5 -0
- package/dist/{context-Cfjh8te1.js → context-Cfml4jaK.js} +5 -3
- package/dist/{context-iABt_ueM.js → context-DWfi56sq.js} +451 -122
- package/dist/context-IvbU9c3T.js +8 -0
- package/dist/context-pjBxaMSh.js +28 -0
- package/dist/fieldParts--SyRZVQG.js +44 -0
- package/dist/fieldParts-LXpQMKE8.d.ts +27 -0
- package/dist/{focus-CpficIgf.js → focus-l8jVTcqd.js} +1 -1
- package/dist/hoverIntent-DMHGb85c.js +115 -0
- package/dist/{index-Cde5JvtX.d.ts → index-B-nESNam.d.ts} +8 -7
- package/dist/{index-CsNi1I8j.d.ts → index-B08-Uxhv.d.ts} +4 -2
- package/dist/{index-Cn-sSds-.d.ts → index-B56j4eI2.d.ts} +24 -1
- package/dist/{index-BJMJ09K-.d.ts → index-BEZ4ezJk.d.ts} +1 -1
- package/dist/{index-DeQwYJbg.d.ts → index-BNaRK-s5.d.ts} +10 -1
- package/dist/{index-CQCTKjIO.d.ts → index-BO9TY87G.d.ts} +5 -4
- package/dist/{index-BJSxFVXH.d.ts → index-BQEJj72c.d.ts} +21 -8
- package/dist/{index-BXk7Wng7.d.ts → index-BULhhnGf.d.ts} +1 -1
- package/dist/{index-D97pQbua.d.ts → index-BV2D2x_u.d.ts} +1 -1
- package/dist/{index-BPYzIIYn.d.ts → index-BZKgbyN9.d.ts} +2 -2
- package/dist/index-BkUkm6Al.d.ts +11 -0
- package/dist/{index-ClNU2Th8.d.ts → index-Bn-v89Vt.d.ts} +10 -6
- package/dist/{index-Bu8NA2SD.d.ts → index-BnEhvmdR.d.ts} +16 -7
- package/dist/index-Bo-ofFyg.d.ts +166 -0
- package/dist/{index-i0tNFWfz.d.ts → index-BqhgeAT4.d.ts} +2 -0
- package/dist/{index-DWh2WC8W.d.ts → index-C4Cjz6OK.d.ts} +2 -2
- package/dist/{index-B7yhzGUT.d.ts → index-C7sam-SB.d.ts} +2 -2
- package/dist/{index-BrJzFA5X.d.ts → index-C90l2rH1.d.ts} +1 -1
- package/dist/{index-vP0EtrJJ.d.ts → index-C9gAlDt_.d.ts} +6 -3
- package/dist/{index-csA1lH_0.d.ts → index-CJ6ajsUC.d.ts} +2 -2
- package/dist/{index-CY-KvZ9B.d.ts → index-CK-Dbh0f.d.ts} +1 -1
- package/dist/index-CKUfpmFL.d.ts +375 -0
- package/dist/{index-DXpSFlPG.d.ts → index-CKgBTAzC.d.ts} +4 -4
- package/dist/{index-EFqQF2Bx.d.ts → index-CPtDjmcX.d.ts} +4 -4
- package/dist/{index-12QYAbiz.d.ts → index-CRrSHbok.d.ts} +3 -2
- package/dist/{index-DG52Bg0W.d.ts → index-CTf3SK0b.d.ts} +6 -0
- package/dist/{index-BNy3SW4S.d.ts → index-CTjkJP4x.d.ts} +32 -3
- package/dist/{index-Ca8VIE4l.d.ts → index-CVn0GBdB.d.ts} +1 -1
- package/dist/{index-YKCx03zD.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-BUEPz7BL.d.ts → index-CikMzeab.d.ts} +3 -3
- package/dist/{index-CdtZjkmG.d.ts → index-CpNlPLBF.d.ts} +183 -129
- package/dist/{index-N7OVZ38M.d.ts → index-Cs1xsHKi.d.ts} +28 -16
- package/dist/{index-Cyb9Du5Z.d.ts → index-CtTGt6Dv.d.ts} +1 -1
- package/dist/{index-HV6W3xCx.d.ts → index-D05JGsT3.d.ts} +5 -2
- package/dist/{index-CsTbMVDS.d.ts → index-D0_HsuC3.d.ts} +4 -4
- package/dist/{index-BgT6mH3U.d.ts → index-D7ShT2c-.d.ts} +1 -1
- package/dist/{index-CkKPMIeX.d.ts → index-D7XRtUTY.d.ts} +9 -0
- package/dist/{index-TntQsADQ.d.ts → index-DEm3kRBO.d.ts} +4 -3
- package/dist/{index-DamRHh1i.d.ts → index-DLAG3m9W.d.ts} +11 -1
- package/dist/{index-DUnDGFQE.d.ts → index-DNA2l1RN.d.ts} +1 -1
- package/dist/{index-WnUY4Kxu.d.ts → index-DRJZ-v1E.d.ts} +4 -4
- package/dist/{index-DYp2RWkM.d.ts → index-DY8Wph-A.d.ts} +3 -3
- package/dist/{index-B1WJxt-n.d.ts → index-DfC05uKG.d.ts} +17 -7
- package/dist/{index-C5e-7Obr.d.ts → index-Dj1_1t3j.d.ts} +19 -6
- package/dist/{index-jW-mP58D.d.ts → index-Dr4b_oji.d.ts} +22 -15
- package/dist/{index-uKnRGtzi.d.ts → index-Ds201-d2.d.ts} +18 -4
- package/dist/{index-DIXAzTKL.d.ts → index-DxxudRgB.d.ts} +1 -1
- package/dist/{index-DQmK3Lq_.d.ts → index-IfsSCj8J.d.ts} +19 -6
- package/dist/{index-B1eCxBCY.d.ts → index-TXcNH86P.d.ts} +1 -1
- package/dist/{index-XuAAcYiP.d.ts → index-f3d9cVtj.d.ts} +1 -1
- package/dist/index-fAZaRruV.d.ts +125 -0
- package/dist/{index-D5N9ikrS.d.ts → index-hCpxKePE.d.ts} +1 -1
- package/dist/{index-T2FOcOuI.d.ts → index-jOwU3YoR.d.ts} +400 -90
- package/dist/{index-DdGck82Y.d.ts → index-pNtfr-RW.d.ts} +2 -2
- package/dist/{index-BhpAUzUr.d.ts → index-unAZVFGz.d.ts} +2 -2
- package/dist/index.d.ts +84 -77
- package/dist/index.js +151 -134
- package/dist/inlineSize-BNe8wggI.js +66 -0
- package/dist/inputPresentation-BOyHkCDr.js +62 -0
- package/dist/interactionModality-ACpTMhak.js +44 -0
- package/dist/isApplePlatform-B1ju6F5B.js +27 -0
- package/dist/isRenderable-BnKHIqfd.js +21 -0
- package/dist/layerDepth-CNDh-IHb.js +181 -0
- package/dist/link-DuuA2eCL.js +30 -0
- package/dist/{loadCatalog-BGHKG_9N.d.ts → loadCatalog-DlLFZreI.d.ts} +281 -7
- package/dist/loadCatalog-eopw74qb.js +424 -0
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -3
- package/dist/locale-CabGJlGp.js +343 -0
- package/dist/modalOutlet-CUOcrhIu.js +56 -0
- package/dist/optionAction-Cg7xQLUA.d.ts +6 -0
- package/dist/{power-search-DrDfcoL1.d.ts → power-search-gHLIYXs5.d.ts} +2 -0
- package/dist/protocol-DHxY0NI8.js +113 -0
- package/dist/protocol-RSeMzAN1.d.ts +238 -0
- package/dist/publicParser-B0MRoikr.d.ts +141 -0
- package/dist/publicParser-uHC_T0Fo.js +895 -0
- package/dist/resizableChannel-3vivrEcT.js +20 -0
- package/dist/safeUrl-CsvfcZ9m.js +54 -0
- package/dist/scopedProvide-C-Df7c15.js +30 -0
- package/dist/scrollKeyboardDelegation-D7cumnOl.js +238 -0
- package/dist/scrollLock-C3aT4-0z.js +102 -0
- package/dist/{searchResultMessage-hXXNOFJP.js → searchResultMessage-mCpJBvra.js} +5 -14
- package/dist/{semantic-CKH9XVqa.d.ts → semantic-BF_AjLvk.d.ts} +6 -3
- package/dist/slug-C65CUsf9.js +32 -0
- package/dist/syntaxContext-DmIfNNtb.js +4 -0
- package/dist/triggerVariant-BsL8jMHs.js +16 -0
- package/dist/{types-0Q_SJv_F.d.ts → types-Bb7OGivY.d.ts} +6 -1
- package/dist/{types-H4Bbbxiw.d.ts → types-BnNTzEnd.d.ts} +1 -1
- package/dist/{types-CwyibrRB.d.ts → types-C5GQ2KCK.d.ts} +23 -3
- package/dist/{types-BBWrcHMD.d.ts → types-Ckih2YJi.d.ts} +3 -2
- package/dist/{types-gKsEkk2g.d.ts → types-CsqwQkf1.d.ts} +143 -10
- package/dist/upstreamMap-xr3gvREu.js +731 -0
- package/dist/{useAnchoredListbox-DwztMNjP.js → useAnchoredListbox-DGxxKHZb.js} +2 -2
- package/dist/{useAsyncSource-xpQovjV_.d.ts → useAsyncSource-aGzrvRkI.d.ts} +3 -0
- package/dist/{useClickableContainer-DyNpnSEa.js → useClickableContainer-CdGp_Cev.js} +1 -1
- package/dist/{useClipboard-BDfbEsWd.js → useClipboard-Dk8cS810.js} +1 -1
- package/dist/useHoverLayerDismiss-kYJ_NqL4.js +27 -0
- package/dist/{useIndicator-i1NORM7W.js → useIndicator-MZmfBWid.js} +5 -23
- package/dist/{useInputContainer-CpgDe2-4.js → useInputContainer-CLcYrby4.js} +1 -1
- package/dist/{useInputStatusIcon-DBOwxV4x.js → useInputStatusIcon-DAE7PExr.js} +1 -1
- package/dist/useLayerMountTarget-BmZyeKWE.js +156 -0
- package/dist/{useListFocus-D0iOJl39.js → useListFocus-ChxLg0b4.js} +3 -2
- package/dist/{useMenuDrillIn-DzKGkTho.js → useMenuDrillIn-DhUnPvKs.js} +6 -5
- package/dist/useMenuHover-Djreu23i.js +170 -0
- package/dist/useMenuPress-8foxY8z4.js +764 -0
- package/dist/{useMergedRefs-CfHHlCsn.js → useMergedRefs-Cb6_w93m.js} +24 -4
- package/dist/{useNumberField-4-dIGVed.js → useNumberField-Dk1BE3-K.js} +3 -3
- package/dist/useOptionActionGrid-CkJcuvaU.js +97 -0
- package/dist/{usePositionedLayer-Cru9_00b.js → usePositionedLayer-B7cvG-_v.js} +43 -49
- package/dist/usePressFeedback-BJCpjEpv.js +319 -0
- package/dist/{useResizable-DDwPpPe6.d.ts → useResizable-1MHPNaRD.d.ts} +19 -1
- package/dist/{useResizable-B3ahKLoZ.js → useResizable-I3BCiLSL.js} +72 -40
- package/dist/useResolvedLabelHidden-B2rlWiaI.js +30 -0
- package/dist/{useRestoreFocus-Djw9RUIf.js → useRestoreFocus-XEKs5-gp.js} +49 -7
- package/dist/useScrollOverflow-DuMoGXmm.js +67 -0
- package/dist/useScrollableArea-BE8b3qm7.js +222 -0
- package/dist/useScrollbars-C2NJ6Qwq.js +43 -0
- package/dist/{useTimeValue-6ufHM15W.js → useTimeValue-BJd0xBhG.js} +4 -22
- package/dist/useTranslator-BmWt2BBt.js +35 -0
- package/dist/{useTypeahead-PAK8lMYz.js → useTypeahead-BvtflkRk.js} +4 -5
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +5 -0
- package/dist/{utils-D33VQDnk.js → utils-ClVseK2w.js} +29 -2
- package/dist/utils-z3Q6BGIJ.js +819 -0
- package/locales/SOURCE.json +1 -1
- package/package.json +24 -3
- package/reset.css +364 -1
- package/styles/avatar-group.css +9 -1
- package/styles/badge.css +8 -5
- package/styles/banner.css +124 -26
- package/styles/blockquote.css +1 -0
- package/styles/bordered-control.css +1 -1
- package/styles/bottom-sheet.css +74 -6
- package/styles/breadcrumbs.css +16 -2
- package/styles/button-group.css +3 -1
- package/styles/button.css +53 -11
- package/styles/card.css +1 -1
- package/styles/chat.css +16 -6
- package/styles/checkbox-input.css +10 -0
- package/styles/clickable-card.css +10 -3
- package/styles/collapsible.css +12 -5
- package/styles/command-palette.css +29 -14
- package/styles/complex-selector.css +22 -5
- package/styles/context-menu.css +3 -3
- package/styles/date-input.css +111 -1
- package/styles/dialog-header.css +4 -1
- package/styles/dialog.css +7 -0
- package/styles/dropdown-menu.css +12 -3
- package/styles/field.css +5 -0
- package/styles/form-layout.css +1 -0
- package/styles/heading.css +18 -8
- package/styles/icon.css +4 -0
- package/styles/kbd.css +1 -1
- package/styles/layer.css +72 -0
- package/styles/list.css +9 -2
- package/styles/metadata-list.css +1 -0
- package/styles/mobile-nav.css +4 -1
- package/styles/multi-selector.css +48 -1
- package/styles/nav-item.css +9 -2
- package/styles/nav-menu.css +12 -2
- package/styles/number-input.css +9 -1
- package/styles/overflow-list.css +1 -1
- package/styles/popover.css +2 -1
- package/styles/power-search.css +5 -3
- package/styles/pressable.css +63 -22
- package/styles/progress-bar.css +15 -3
- package/styles/radio.css +16 -0
- package/styles/resize-handle.css +42 -0
- package/styles/scrollbars.css +28 -0
- package/styles/segmented-control.css +12 -4
- package/styles/selector.css +53 -1
- package/styles/side-nav.css +19 -0
- package/styles/slider.css +4 -3
- package/styles/spinner.css +48 -42
- package/styles/stepper.css +58 -4
- package/styles/switch.css +26 -0
- package/styles/tab-list.css +132 -3
- package/styles/table.css +88 -10
- package/styles/text-area.css +1 -1
- package/styles/text-input.css +1 -1
- package/styles/text.css +6 -6
- package/styles/thumbnail.css +11 -3
- package/styles/time-input.css +8 -0
- package/styles/toast.css +37 -3
- package/styles/token.css +2 -2
- package/styles/tokenizer.css +1 -1
- package/styles/toolbar.css +4 -1
- package/styles/tree-list.css +1 -1
- package/styles/typeahead.css +34 -1
- package/styles.css +1 -0
- package/dist/Blockquote-DFqBv_oJ.js +0 -18
- package/dist/Breadcrumbs-DPVaziH4.js +0 -141
- package/dist/ButtonGroup-ySQWanDP.js +0 -125
- package/dist/DateTimeInput-DHp683jZ.js +0 -268
- package/dist/MultiSelector-BeV98x7X.js +0 -988
- package/dist/NumberInput-AZ9x3oja.js +0 -473
- package/dist/Selector-DuVozKNq.js +0 -675
- package/dist/Spinner-9cYUCnDy.js +0 -84
- package/dist/Theme-CtaUWo4g.js +0 -1246
- package/dist/Toast-BuqIZV5z.js +0 -322
- package/dist/context-4PuqD1Ic.js +0 -4
- package/dist/context-D5-MwxnN.js +0 -4
- package/dist/index-BH9PzQ1F.d.ts +0 -87
- package/dist/link-C4_WogdF.js +0 -18
- package/dist/loadCatalog-CXKqEB9s.js +0 -877
- package/dist/locale-DgkZEMTn.js +0 -105
- package/dist/platform-B_9W_aHW.js +0 -33
- package/dist/scrollLock-BzIvIimL.js +0 -42
- package/dist/useMenuPress-D-FRNrBW.js +0 -573
- package/dist/useScrollableArea-DDk_CluT.js +0 -172
- /package/dist/{index-lgvUFSCO.d.ts → index-CryFtTT6.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as useDismiss, t as usePositionedLayer } from "./usePositionedLayer-
|
|
1
|
+
import { n as useDismiss, t as usePositionedLayer } from "./usePositionedLayer-B7cvG-_v.js";
|
|
2
2
|
import { computed, shallowRef, toValue, useId } from "vue";
|
|
3
3
|
//#region src/composables/useLayer.ts
|
|
4
4
|
/**
|
|
@@ -54,16 +54,36 @@ function useLayer(options) {
|
|
|
54
54
|
};
|
|
55
55
|
});
|
|
56
56
|
const isMounted = computed(() => !toValue(options.lazyMount) || hasOpened.value);
|
|
57
|
-
|
|
57
|
+
let isHiding = false;
|
|
58
|
+
let pendingShow = false;
|
|
59
|
+
function runShow() {
|
|
58
60
|
if (isOpen.value) return;
|
|
59
61
|
hasOpened.value = true;
|
|
60
62
|
isOpen.value = true;
|
|
61
63
|
options.onShow?.();
|
|
62
64
|
}
|
|
65
|
+
function show() {
|
|
66
|
+
if (isHiding) {
|
|
67
|
+
pendingShow = true;
|
|
68
|
+
queueMicrotask(() => {
|
|
69
|
+
if (!pendingShow) return;
|
|
70
|
+
pendingShow = false;
|
|
71
|
+
runShow();
|
|
72
|
+
});
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
runShow();
|
|
76
|
+
}
|
|
63
77
|
function hide() {
|
|
78
|
+
pendingShow = false;
|
|
64
79
|
if (!isOpen.value) return;
|
|
65
|
-
|
|
66
|
-
|
|
80
|
+
isHiding = true;
|
|
81
|
+
try {
|
|
82
|
+
isOpen.value = false;
|
|
83
|
+
options.onHide?.();
|
|
84
|
+
} finally {
|
|
85
|
+
isHiding = false;
|
|
86
|
+
}
|
|
67
87
|
}
|
|
68
88
|
useDismiss({
|
|
69
89
|
container: contentRef,
|
|
@@ -18,7 +18,7 @@ function effectiveStep(step, integerOnly) {
|
|
|
18
18
|
/**
|
|
19
19
|
* 按步长网格走一格:以 min 为起点对齐,先取整再夹到范围内。
|
|
20
20
|
*/
|
|
21
|
-
function
|
|
21
|
+
function computeSteppedValue(options) {
|
|
22
22
|
const { currentValue, direction, min, max, step, integerOnly } = options;
|
|
23
23
|
const stride = effectiveStep(step, integerOnly);
|
|
24
24
|
const stepBase = min != null && (!integerOnly || Number.isInteger(min)) ? min : 0;
|
|
@@ -52,7 +52,7 @@ function useNumberField(options) {
|
|
|
52
52
|
const readIntegerOnly = () => Boolean(toValue(options.integerOnly));
|
|
53
53
|
const locked = () => readDisabled() || readReadOnly();
|
|
54
54
|
function nextValue(direction) {
|
|
55
|
-
return
|
|
55
|
+
return computeSteppedValue({
|
|
56
56
|
currentValue: value.value,
|
|
57
57
|
direction,
|
|
58
58
|
min: readMin(),
|
|
@@ -125,4 +125,4 @@ function useNumberField(options) {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
//#endregion
|
|
128
|
-
export { useNumberField as t };
|
|
128
|
+
export { useNumberField as n, computeSteppedValue as t };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { cloneVNode, computed, defineComponent, h, isVNode, ref, watch } from "vue";
|
|
2
|
+
//#region src/selectors/optionAction.ts
|
|
3
|
+
function isOptionAction(value) {
|
|
4
|
+
if (value == null || value === false) return false;
|
|
5
|
+
return isVNode(value) || typeof value === "object" || typeof value === "function";
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/selectors/optionActionView.ts
|
|
9
|
+
/** 把调用方的操作画出来,不另包一层标签。缺 id 时补上,读屏才能指到它。 */
|
|
10
|
+
const OptionAction = defineComponent({
|
|
11
|
+
name: "AstryxOptionAction",
|
|
12
|
+
props: {
|
|
13
|
+
node: {
|
|
14
|
+
type: Object,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
domId: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(props) {
|
|
23
|
+
return () => {
|
|
24
|
+
const node = props.node;
|
|
25
|
+
if (!isVNode(node)) return h(node, { id: props.domId });
|
|
26
|
+
if (typeof node.props?.id === "string" && node.props.id !== "") return node;
|
|
27
|
+
return cloneVNode(node, { id: props.domId });
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/selectors/useOptionActionGrid.ts
|
|
33
|
+
/**
|
|
34
|
+
* 选项操作的键盘列。上一项、下一项仍交给列表模型。
|
|
35
|
+
* 行末方向键走到操作,行首方向键走回选项。搜索框里只有光标已经顶到边上才接管。
|
|
36
|
+
*/
|
|
37
|
+
function useOptionActionGrid(options) {
|
|
38
|
+
const column = ref("option");
|
|
39
|
+
watch(() => options.activeIndex.value, () => {
|
|
40
|
+
column.value = "option";
|
|
41
|
+
});
|
|
42
|
+
watch(options.isOpen, (open) => {
|
|
43
|
+
if (!open) column.value = "option";
|
|
44
|
+
});
|
|
45
|
+
function towardAction(event) {
|
|
46
|
+
return options.getListbox() != null && getComputedStyle(options.getListbox()).direction === "rtl" ? event.key === "ArrowLeft" : event.key === "ArrowRight";
|
|
47
|
+
}
|
|
48
|
+
function towardOption(event) {
|
|
49
|
+
return options.getListbox() != null && getComputedStyle(options.getListbox()).direction === "rtl" ? event.key === "ArrowRight" : event.key === "ArrowLeft";
|
|
50
|
+
}
|
|
51
|
+
function caretAllows(event, edge) {
|
|
52
|
+
const target = event.target;
|
|
53
|
+
if (!(target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement)) return true;
|
|
54
|
+
const point = edge === "end" ? target.value.length : 0;
|
|
55
|
+
return target.selectionStart === point && target.selectionEnd === point;
|
|
56
|
+
}
|
|
57
|
+
function activate(index) {
|
|
58
|
+
const id = options.actionId(index);
|
|
59
|
+
const listed = options.getListbox()?.querySelector(`#${CSS.escape(id)}`);
|
|
60
|
+
(listed?.matches("button, a, input, [role=\"button\"]") ? listed : listed?.querySelector("button, a, input, [role=\"button\"]"))?.click();
|
|
61
|
+
}
|
|
62
|
+
/** 返回 true 表示这个键已经用掉,不要再交给列表模型。 */
|
|
63
|
+
function onKeyDown(event) {
|
|
64
|
+
if (!options.enabled() || !options.isOpen() || options.activeIndex.value < 0) return false;
|
|
65
|
+
const index = options.activeIndex.value;
|
|
66
|
+
if (towardAction(event) && column.value === "option" && options.rowHasAction(index) && caretAllows(event, "end")) {
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
column.value = "action";
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
if (towardOption(event) && column.value === "action" && caretAllows(event, "start")) {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
column.value = "option";
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
if (column.value !== "action") return false;
|
|
77
|
+
const typingSpace = event.key === " " && event.target instanceof HTMLInputElement;
|
|
78
|
+
if ((event.key === "Enter" || event.key === " ") && !typingSpace) {
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
activate(index);
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
column,
|
|
87
|
+
onKeyDown,
|
|
88
|
+
activeDescendant: computed(() => {
|
|
89
|
+
const index = options.activeIndex.value;
|
|
90
|
+
if (!options.isOpen() || index < 0) return void 0;
|
|
91
|
+
if (column.value === "action" && options.rowHasAction(index)) return options.actionId(index);
|
|
92
|
+
return options.optionId(index);
|
|
93
|
+
})
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
export { OptionAction as n, isOptionAction as r, useOptionActionGrid as t };
|
|
@@ -1,62 +1,50 @@
|
|
|
1
|
+
import { n as useLayerTeleportTarget } from "./useLayerMountTarget-BmZyeKWE.js";
|
|
2
|
+
import { i as pushLayer, n as useLayerDepth } from "./layerDepth-CNDh-IHb.js";
|
|
1
3
|
import { i as useLayerGutter, s as resolveLayerGutter } from "./context-M-er0-Rk.js";
|
|
2
|
-
import { nextTick, onScopeDispose, ref, watch } from "vue";
|
|
4
|
+
import { nextTick, onScopeDispose, ref, toValue, watch } from "vue";
|
|
3
5
|
//#region src/composables/useDismiss.ts
|
|
4
|
-
const escapeStack = [];
|
|
5
6
|
/**
|
|
6
7
|
* 统一处理浮层组件的关闭逻辑:点击外部和按 Escape 键。
|
|
7
8
|
* 用于 Popover、Tooltip、DropdownMenu、ContextMenu 等。
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* 真正的判定在 `layer/dismissStack.ts` 里:全页面共用一个关闭栈,
|
|
11
|
+
* 一次点外面只关最上面那一层,Escape 也只打最上面那一层。这里只负责在
|
|
12
|
+
* `isEnabled` 变真时把这一层登记进去,变假或作用域销毁时摘出来。
|
|
13
|
+
*
|
|
14
|
+
* 因为所有浮层都走这个入口,用它的组件自动获得了「只关最上面一层」的行为,
|
|
15
|
+
* 组件自己不用改。
|
|
13
16
|
*/
|
|
14
17
|
function useDismiss(options) {
|
|
15
|
-
const { container, trigger, isEnabled,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
const { container, trigger, isEnabled, onDismiss } = options;
|
|
19
|
+
const token = {};
|
|
20
|
+
const depth = useLayerDepth();
|
|
21
|
+
let unregister = null;
|
|
22
|
+
function register() {
|
|
23
|
+
unregister = pushLayer({
|
|
24
|
+
token,
|
|
25
|
+
depth,
|
|
26
|
+
getContainer: () => container.value,
|
|
27
|
+
getTrigger: () => trigger?.value ?? null,
|
|
28
|
+
dismissOnPointerOutside: true,
|
|
29
|
+
dismissOnEscape: escapeMode(),
|
|
30
|
+
onEscape: options.onEscape,
|
|
31
|
+
onDismiss
|
|
32
|
+
});
|
|
29
33
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
if (event.key === "Escape") {
|
|
33
|
-
if (escapeStack[escapeStack.length - 1] === dismissFromEscape) {
|
|
34
|
-
event.preventDefault();
|
|
35
|
-
dismissFromEscape();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
async function setup() {
|
|
40
|
-
if (typeof document === "undefined" || isAttached) return;
|
|
41
|
-
await nextTick();
|
|
42
|
-
if (!isEnabled.value) return;
|
|
43
|
-
isAttached = true;
|
|
44
|
-
document.addEventListener("pointerdown", onClickOutside, true);
|
|
45
|
-
document.addEventListener("keydown", onEscapeKey, true);
|
|
46
|
-
if (enableEscape.value) escapeStack.push(dismissFromEscape);
|
|
34
|
+
function escapeMode() {
|
|
35
|
+
return toValue(options.dismissOnEscape) ?? "close";
|
|
47
36
|
}
|
|
48
37
|
function teardown() {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
38
|
+
unregister?.();
|
|
39
|
+
unregister = null;
|
|
40
|
+
}
|
|
41
|
+
function sync(enabled) {
|
|
42
|
+
if (enabled) {
|
|
43
|
+
teardown();
|
|
44
|
+
register();
|
|
45
|
+
} else teardown();
|
|
55
46
|
}
|
|
56
|
-
watch(isEnabled, (enabled) => {
|
|
57
|
-
if (enabled) setup();
|
|
58
|
-
else teardown();
|
|
59
|
-
}, { immediate: true });
|
|
47
|
+
watch([isEnabled, () => escapeMode()], ([enabled]) => sync(enabled), { immediate: true });
|
|
60
48
|
onScopeDispose(teardown);
|
|
61
49
|
}
|
|
62
50
|
//#endregion
|
|
@@ -113,7 +101,9 @@ function usePositionedLayer(options) {
|
|
|
113
101
|
placement: placement.value
|
|
114
102
|
});
|
|
115
103
|
const gutter = useLayerGutter();
|
|
104
|
+
const teleportTarget = useLayerTeleportTarget();
|
|
116
105
|
function update() {
|
|
106
|
+
if (typeof window === "undefined") return;
|
|
117
107
|
const anchorEl = anchor.value;
|
|
118
108
|
const layerEl = layer.value;
|
|
119
109
|
if (!anchorEl || !layerEl || !isOpen.value) return;
|
|
@@ -154,8 +144,10 @@ function usePositionedLayer(options) {
|
|
|
154
144
|
watchGeometry();
|
|
155
145
|
}
|
|
156
146
|
function detach() {
|
|
157
|
-
window
|
|
158
|
-
|
|
147
|
+
if (typeof window !== "undefined") {
|
|
148
|
+
window.removeEventListener("scroll", update, true);
|
|
149
|
+
window.removeEventListener("resize", update);
|
|
150
|
+
}
|
|
159
151
|
clearInterval(pollId);
|
|
160
152
|
pollId = void 0;
|
|
161
153
|
}
|
|
@@ -167,8 +159,10 @@ function usePositionedLayer(options) {
|
|
|
167
159
|
});
|
|
168
160
|
watch([placement, alignment], update);
|
|
169
161
|
watch(gutter, update);
|
|
162
|
+
onScopeDispose(detach);
|
|
170
163
|
return {
|
|
171
164
|
position,
|
|
165
|
+
teleportTarget,
|
|
172
166
|
update,
|
|
173
167
|
detach
|
|
174
168
|
};
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { getCurrentInstance, getCurrentScope, onMounted, onScopeDispose } from "vue";
|
|
2
|
+
import "../styles/pressable.css";
|
|
3
|
+
const IDLE = {
|
|
4
|
+
originX: 0,
|
|
5
|
+
originY: 0,
|
|
6
|
+
phase: "idle"
|
|
7
|
+
};
|
|
8
|
+
function travelled(gesture, x, y) {
|
|
9
|
+
return Math.hypot(x - gesture.originX, y - gesture.originY) > 10;
|
|
10
|
+
}
|
|
11
|
+
function to(gesture, phase, paint, timer) {
|
|
12
|
+
return {
|
|
13
|
+
gesture: {
|
|
14
|
+
...gesture,
|
|
15
|
+
phase
|
|
16
|
+
},
|
|
17
|
+
paint,
|
|
18
|
+
timer
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function stay(gesture, paint) {
|
|
22
|
+
return {
|
|
23
|
+
gesture,
|
|
24
|
+
paint,
|
|
25
|
+
timer: null
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function stepArmed(gesture, event) {
|
|
29
|
+
switch (event.kind) {
|
|
30
|
+
case "move": return travelled(gesture, event.x, event.y) ? to(gesture, "dead", "none", null) : stay(gesture, "none");
|
|
31
|
+
case "cancel": return to(gesture, "dead", "none", null);
|
|
32
|
+
case "onset": return to(gesture, "pressed", "on", null);
|
|
33
|
+
case "up": return to(gesture, "flash", "on", "flash");
|
|
34
|
+
default: return stay(gesture, "none");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function stepPressed(gesture, event) {
|
|
38
|
+
if (event.kind === "move" && !travelled(gesture, event.x, event.y)) return stay(gesture, "on");
|
|
39
|
+
if (event.kind === "move" || event.kind === "cancel") return to(gesture, "dead", "none", null);
|
|
40
|
+
if (event.kind === "up") return to(gesture, "fading", "fading", "fade");
|
|
41
|
+
return stay(gesture, "on");
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 一个事件,一个答案。
|
|
45
|
+
*/
|
|
46
|
+
function pressGestureStep(gesture, event) {
|
|
47
|
+
if (event.kind === "down") return {
|
|
48
|
+
gesture: {
|
|
49
|
+
originX: event.x,
|
|
50
|
+
originY: event.y,
|
|
51
|
+
phase: "armed"
|
|
52
|
+
},
|
|
53
|
+
paint: "none",
|
|
54
|
+
timer: "onset"
|
|
55
|
+
};
|
|
56
|
+
switch (gesture.phase) {
|
|
57
|
+
case "armed": return stepArmed(gesture, event);
|
|
58
|
+
case "pressed": return stepPressed(gesture, event);
|
|
59
|
+
case "flash": return event.kind === "flashEnd" ? to(gesture, "fading", "fading", "fade") : stay(gesture, "on");
|
|
60
|
+
case "fading": return event.kind === "fadeEnd" ? stay(IDLE, "none") : stay(gesture, "fading");
|
|
61
|
+
case "dead": return event.kind === "up" ? stay(IDLE, "none") : stay(gesture, "none");
|
|
62
|
+
case "idle": return stay(IDLE, "none");
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function idlePressGesture() {
|
|
66
|
+
return IDLE;
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/composables/internal/pressFeedback.ts
|
|
70
|
+
/**
|
|
71
|
+
* 触屏按压模型的 DOM 那一半:整个文档只有一个委托控制器,
|
|
72
|
+
* 在手指下最里层的可按元素上写 `data-astryx-press`。
|
|
73
|
+
*
|
|
74
|
+
* 为什么挂在文档上、而不是每个元素一套监听:虚拟列表可能有上千行,每行四个监听加一份状态
|
|
75
|
+
* 承受不起。这里整个文档就几个监听,一次按压只改一个元素的一个属性,不触发任何组件更新。
|
|
76
|
+
*
|
|
77
|
+
* 鼠标完全不管,CSS 的 `:active` 照旧。手指下,`@media (pointer: coarse)` 里的 `:active`
|
|
78
|
+
* 被样式丢掉,改由这里在按压成立时写 `on`,抬手淡出时写 `fading`。
|
|
79
|
+
* 样式见 `styles/pressable.css`。
|
|
80
|
+
*/
|
|
81
|
+
/** 可按元素的标记。控制器用 `closest()` 找它。 */
|
|
82
|
+
const PRESSABLE_ATTRIBUTE = "data-astryx-pressable";
|
|
83
|
+
/** 按压成立且手指还在时为 `on`,抬手淡出时为 `fading`,其余时候不存在。 */
|
|
84
|
+
const PRESSED_ATTRIBUTE = "data-astryx-press";
|
|
85
|
+
/** 不可用的元素怎么按都不画。 */
|
|
86
|
+
const DISABLED = ":disabled, [aria-disabled=\"true\"]";
|
|
87
|
+
let live = null;
|
|
88
|
+
/** 有几个调用方装着控制器。大于 0 时监听才在。 */
|
|
89
|
+
let holders = 0;
|
|
90
|
+
/** 上一次「被手指带动」的滚动发生在什么时候、在哪个滚动容器里。只记手指带动的,程序滚动不算。 */
|
|
91
|
+
let lastScrollAt = 0;
|
|
92
|
+
let lastScroller = null;
|
|
93
|
+
/** 上一次手指在屏幕上是什么时候、落在哪里。 */
|
|
94
|
+
let lastTouchAt = 0;
|
|
95
|
+
let lastTouchTarget = null;
|
|
96
|
+
const TIMER_MS = {
|
|
97
|
+
fade: 200,
|
|
98
|
+
flash: 100,
|
|
99
|
+
onset: 150
|
|
100
|
+
};
|
|
101
|
+
const TIMER_EVENT = {
|
|
102
|
+
fade: "fadeEnd",
|
|
103
|
+
flash: "flashEnd",
|
|
104
|
+
onset: "onset"
|
|
105
|
+
};
|
|
106
|
+
function paintElement(element, paint) {
|
|
107
|
+
if (paint === "none") element.removeAttribute(PRESSED_ATTRIBUTE);
|
|
108
|
+
else element.setAttribute(PRESSED_ATTRIBUTE, paint);
|
|
109
|
+
}
|
|
110
|
+
function clearTimer() {
|
|
111
|
+
if (live?.timer != null) {
|
|
112
|
+
clearTimeout(live.timer);
|
|
113
|
+
live.timer = null;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* 把一个事件交给状态机,再让 DOM 照答案画。
|
|
118
|
+
*
|
|
119
|
+
* 计时器规则:阶段没变、又没要新计时器的一步是路过,原来那个计时器必须留着。
|
|
120
|
+
* 如果每步都先清掉,会有三种手势最后停在「没人碰却亮着」:
|
|
121
|
+
* 等待期内手指在容差内抖了一下(真手指都会抖),onset 被清掉,按压永远不亮;
|
|
122
|
+
* 轻点的 100ms 闪亮期内来了 pointercancel 或滚动,flashEnd 被清掉,一直亮着;
|
|
123
|
+
* 淡出期内同样,`fading` 留在元素上。
|
|
124
|
+
*/
|
|
125
|
+
function apply(step) {
|
|
126
|
+
if (live == null) return;
|
|
127
|
+
const phaseMoved = step.gesture.phase !== live.gesture.phase;
|
|
128
|
+
if (step.timer != null || phaseMoved) clearTimer();
|
|
129
|
+
live.gesture = step.gesture;
|
|
130
|
+
paintElement(live.element, step.paint);
|
|
131
|
+
if (step.gesture.phase === "idle") {
|
|
132
|
+
live = null;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (step.timer != null) {
|
|
136
|
+
const kind = step.timer;
|
|
137
|
+
live.timer = setTimeout(() => {
|
|
138
|
+
if (live != null) live.timer = null;
|
|
139
|
+
apply(pressGestureStep(live?.gesture ?? idlePressGesture(), { kind: TIMER_EVENT[kind] }));
|
|
140
|
+
}, TIMER_MS[kind]);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* 手指下最里层的可按元素。里层优先:可按的行里有个按钮,按钮接走这次按压。
|
|
145
|
+
* 不可用的元素也会接走,但什么都不画,所以按在禁用控件上不会把外面那一行点亮。
|
|
146
|
+
*/
|
|
147
|
+
function surfaceAt(target) {
|
|
148
|
+
if (!(target instanceof Element)) return null;
|
|
149
|
+
const found = target.closest(`[${PRESSABLE_ATTRIBUTE}]`);
|
|
150
|
+
if (!(found instanceof HTMLElement) || found.matches(DISABLED)) return null;
|
|
151
|
+
return found;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* 这次触摸是不是在给手指刚甩动的列表「刹车」。原生列表刹车时什么都不亮。
|
|
155
|
+
* 两个条件都要满足:滚动容器包着这个元素,而且那次滚动是手指在这个容器里带起来的。
|
|
156
|
+
*/
|
|
157
|
+
function scrollerIsBraking(element) {
|
|
158
|
+
if (Date.now() - lastScrollAt >= 150) return false;
|
|
159
|
+
return lastScroller instanceof Node && lastScroller.contains(element);
|
|
160
|
+
}
|
|
161
|
+
/** 手势一死就让出唯一的跟踪槽位。变成滚动的手势以 pointercancel 结束,没有 pointerup。 */
|
|
162
|
+
function releaseIfDead() {
|
|
163
|
+
if (live?.gesture.phase === "dead") {
|
|
164
|
+
clearTimer();
|
|
165
|
+
live = null;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/** 擦掉颜色、忘掉手势,不经过状态机。 */
|
|
169
|
+
function finish() {
|
|
170
|
+
if (live == null) return;
|
|
171
|
+
clearTimer();
|
|
172
|
+
live.element.removeAttribute(PRESSED_ATTRIBUTE);
|
|
173
|
+
live = null;
|
|
174
|
+
}
|
|
175
|
+
function onPointerDown(event) {
|
|
176
|
+
if (event.pointerType === "mouse") return;
|
|
177
|
+
if (live != null) {
|
|
178
|
+
const fingerIsUp = live.gesture.phase === "fading" || live.gesture.phase === "flash";
|
|
179
|
+
finish();
|
|
180
|
+
if (!fingerIsUp) return;
|
|
181
|
+
}
|
|
182
|
+
const element = surfaceAt(event.target);
|
|
183
|
+
const braking = element != null && scrollerIsBraking(element);
|
|
184
|
+
lastTouchAt = Date.now();
|
|
185
|
+
lastTouchTarget = event.target instanceof Node ? event.target : null;
|
|
186
|
+
if (element == null || braking) return;
|
|
187
|
+
live = {
|
|
188
|
+
element,
|
|
189
|
+
gesture: idlePressGesture(),
|
|
190
|
+
pointerId: event.pointerId,
|
|
191
|
+
timer: null
|
|
192
|
+
};
|
|
193
|
+
apply(pressGestureStep(live.gesture, {
|
|
194
|
+
kind: "down",
|
|
195
|
+
x: event.clientX,
|
|
196
|
+
y: event.clientY
|
|
197
|
+
}));
|
|
198
|
+
}
|
|
199
|
+
function isOtherPointer(event) {
|
|
200
|
+
return live == null || live.pointerId != null && event.pointerId !== live.pointerId;
|
|
201
|
+
}
|
|
202
|
+
function onPointerMove(event) {
|
|
203
|
+
if (isOtherPointer(event)) return;
|
|
204
|
+
apply(pressGestureStep(live.gesture, {
|
|
205
|
+
kind: "move",
|
|
206
|
+
x: event.clientX,
|
|
207
|
+
y: event.clientY
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
function onPointerUp(event) {
|
|
211
|
+
if (event.pointerType === "mouse") return;
|
|
212
|
+
lastTouchAt = Date.now();
|
|
213
|
+
if (event.target instanceof Node) lastTouchTarget = event.target;
|
|
214
|
+
if (isOtherPointer(event)) return;
|
|
215
|
+
apply(pressGestureStep(live.gesture, { kind: "up" }));
|
|
216
|
+
releaseIfDead();
|
|
217
|
+
}
|
|
218
|
+
/** 滚动接管了手势,或者平台拿走了它。iOS 上 pointercancel 比第一个 scroll 事件还早到。 */
|
|
219
|
+
function onCancel() {
|
|
220
|
+
if (live == null) return;
|
|
221
|
+
apply(pressGestureStep(live.gesture, { kind: "cancel" }));
|
|
222
|
+
releaseIfDead();
|
|
223
|
+
}
|
|
224
|
+
/** 文档里任何一处滚动。scroll 不冒泡,只能在捕获阶段听。 */
|
|
225
|
+
function onScroll(event) {
|
|
226
|
+
const scroller = event.target instanceof Node ? event.target : document;
|
|
227
|
+
if (Date.now() - lastTouchAt < 3e3 && lastTouchTarget != null && scroller.contains(lastTouchTarget)) {
|
|
228
|
+
lastScrollAt = Date.now();
|
|
229
|
+
lastScroller = scroller;
|
|
230
|
+
}
|
|
231
|
+
if (live == null) return;
|
|
232
|
+
if (scroller === document || scroller.contains(live.element)) onCancel();
|
|
233
|
+
}
|
|
234
|
+
/** 兜底:页面被切到后台时,不留下亮着的元素。 */
|
|
235
|
+
function onVisibilityChange() {
|
|
236
|
+
if (document.visibilityState === "hidden") finish();
|
|
237
|
+
}
|
|
238
|
+
const PASSIVE_CAPTURE = {
|
|
239
|
+
capture: true,
|
|
240
|
+
passive: true
|
|
241
|
+
};
|
|
242
|
+
const WINDOW_LISTENERS = [
|
|
243
|
+
["pointerdown", onPointerDown],
|
|
244
|
+
["pointermove", onPointerMove],
|
|
245
|
+
["pointerup", onPointerUp],
|
|
246
|
+
["pointercancel", onCancel],
|
|
247
|
+
["touchcancel", onCancel],
|
|
248
|
+
["dragstart", onCancel]
|
|
249
|
+
];
|
|
250
|
+
function addListeners() {
|
|
251
|
+
for (const [type, listener] of WINDOW_LISTENERS) window.addEventListener(type, listener, PASSIVE_CAPTURE);
|
|
252
|
+
document.addEventListener("scroll", onScroll, PASSIVE_CAPTURE);
|
|
253
|
+
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
254
|
+
}
|
|
255
|
+
function removeListeners() {
|
|
256
|
+
for (const [type, listener] of WINDOW_LISTENERS) window.removeEventListener(type, listener, PASSIVE_CAPTURE);
|
|
257
|
+
document.removeEventListener("scroll", onScroll, PASSIVE_CAPTURE);
|
|
258
|
+
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
259
|
+
}
|
|
260
|
+
function resetClocks() {
|
|
261
|
+
lastScrollAt = 0;
|
|
262
|
+
lastScroller = null;
|
|
263
|
+
lastTouchAt = 0;
|
|
264
|
+
lastTouchTarget = null;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* 在这个文档上装好按压控制器。调多少次都只装一份,有人持有时监听就在。
|
|
268
|
+
* 返回释放函数:每次安装各调一次;最后一个释放时拆掉监听,并清掉颜色和刹车时钟。
|
|
269
|
+
* 服务端什么都不做。
|
|
270
|
+
*/
|
|
271
|
+
function installPressFeedback() {
|
|
272
|
+
if (typeof window === "undefined" || typeof document === "undefined") return () => void 0;
|
|
273
|
+
if (holders === 0) addListeners();
|
|
274
|
+
holders += 1;
|
|
275
|
+
let released = false;
|
|
276
|
+
return () => {
|
|
277
|
+
if (released) return;
|
|
278
|
+
released = true;
|
|
279
|
+
holders -= 1;
|
|
280
|
+
if (holders > 0) return;
|
|
281
|
+
removeListeners();
|
|
282
|
+
finish();
|
|
283
|
+
resetClocks();
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
//#endregion
|
|
287
|
+
//#region src/composables/usePressFeedback.ts
|
|
288
|
+
const MARKER_ONLY = Object.freeze({ [PRESSABLE_ATTRIBUTE]: "" });
|
|
289
|
+
const WITH_OVERLAY = Object.freeze({
|
|
290
|
+
[PRESSABLE_ATTRIBUTE]: "",
|
|
291
|
+
class: "astryx-pressable"
|
|
292
|
+
});
|
|
293
|
+
/**
|
|
294
|
+
* 对应原版 Astryx 的 `hooks/usePressFeedback`。
|
|
295
|
+
*
|
|
296
|
+
* 把一个元素标成触屏按压模型的可按表面,并确保文档级控制器已经装上。
|
|
297
|
+
*
|
|
298
|
+
* 手指下,CSS 的 `:active` 落手就亮,滚动开始了还可能亮着。按压模型反过来:
|
|
299
|
+
* 先等 150 毫秒确认是按压;手指挪动超过 10 像素或者页面滚动,立刻作废,这次手势里不再亮回来;
|
|
300
|
+
* 太快的轻点在抬手时补亮;抬手后 200 毫秒淡出。鼠标不受影响,`:active` 照旧。
|
|
301
|
+
*
|
|
302
|
+
* 一个文档只有一个控制器:第一个挂载的可按组件装上,最后一个卸载时拆掉。
|
|
303
|
+
* 调用它不会给元素加监听或状态,一次按压只改一个属性。服务端不装。
|
|
304
|
+
*/
|
|
305
|
+
function usePressFeedback(options = {}) {
|
|
306
|
+
let release = null;
|
|
307
|
+
const install = () => {
|
|
308
|
+
release ??= installPressFeedback();
|
|
309
|
+
};
|
|
310
|
+
if (getCurrentInstance() != null) onMounted(install);
|
|
311
|
+
else install();
|
|
312
|
+
if (getCurrentScope() != null) onScopeDispose(() => {
|
|
313
|
+
release?.();
|
|
314
|
+
release = null;
|
|
315
|
+
});
|
|
316
|
+
return { pressableProps: options.hasOverlay === false ? MARKER_ONLY : WITH_OVERLAY };
|
|
317
|
+
}
|
|
318
|
+
//#endregion
|
|
319
|
+
export { usePressFeedback as t };
|
|
@@ -196,10 +196,28 @@ interface TablePanelPatch {
|
|
|
196
196
|
variant: 'muted' | 'transparent';
|
|
197
197
|
render: () => VNodeChild;
|
|
198
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* 直接挂在 `<tr>` 上的事件,用来把整行当成一个悬停或聚焦的靶子(例如整行弹详情卡片)。
|
|
201
|
+
* 多个插件给同一个事件时都会调用。
|
|
202
|
+
*/
|
|
203
|
+
interface TableRowListeners {
|
|
204
|
+
/** 指针进入这一行。 */
|
|
205
|
+
onMouseenter?: (event: MouseEvent) => void;
|
|
206
|
+
/** 指针离开这一行。 */
|
|
207
|
+
onMouseleave?: (event: MouseEvent) => void;
|
|
208
|
+
/** 行内元素获得焦点。焦点事件冒泡,所以绑在行上也能收到。 */
|
|
209
|
+
onFocus?: (event: FocusEvent) => void;
|
|
210
|
+
/** 行内元素失去焦点。 */
|
|
211
|
+
onBlur?: (event: FocusEvent) => void;
|
|
212
|
+
}
|
|
199
213
|
interface TableRowPatch {
|
|
200
214
|
attrs?: Record<string, string | undefined>;
|
|
201
215
|
class?: string;
|
|
202
216
|
onClick?: (event: MouseEvent) => void;
|
|
217
|
+
/** 行元素挂上、卸下时回调(卸下时传入 `null`),用来把 `<tr>` 本身交给 `useHoverCard` 这类工具。 */
|
|
218
|
+
ref?: (element: HTMLTableRowElement | null) => void;
|
|
219
|
+
/** 挂在 `<tr>` 上的事件。 */
|
|
220
|
+
listeners?: TableRowListeners;
|
|
203
221
|
suppressSelection?: boolean;
|
|
204
222
|
skipRowIndex?: boolean;
|
|
205
223
|
group?: TableGroupPatch;
|
|
@@ -406,4 +424,4 @@ declare function useResizable(options: UseResizableSingleOptions): ResizableRegi
|
|
|
406
424
|
type UseResizableOptions = UseResizableSingleOptions | UseResizableMultiConfig;
|
|
407
425
|
type ResizableState = ResizableRegion;
|
|
408
426
|
//#endregion
|
|
409
|
-
export {
|
|
427
|
+
export { ToolbarSize as $, TablePanelPatch as A, TableSortDirection as B, TableFilterField as C, TableFilterVariant as D, TableFilterValue as E, TableRowPatch as F, TableSelectedKeysSetter as G, TableSortState as H, TableRowProps as I, UseTableSelectionStateConfig as J, TableSelectionState as K, TableSelectionToolbarProps as L, TableProps as M, TableRowListeners as N, TableGroupPatch as O, TableRowMenuItem as P, ToolbarProps as Q, TableSelectionToolbarSlots as R, TableDividers as S, TableFilterState as T, TableTextOverflow as U, TableSortEntry as V, TableVerticalAlign as W, useTableSelectionState as X, useTableSelection as Y, ToolbarOrientation as Z, TableCellProps as _, ResizableRegionConfig as a, TableColumnResizeContribution as b, UseResizableMultiConfig as c, percent as d, ToolbarSlots as et, useResizable as f, TableCellPatch as g, ProportionalWidth as h, ResizableRegion as i, TablePlugin as j, TableHeaderPatch as k, UseResizableOptions as l, PixelWidth as m, ResizablePercentSize as n, ResizableSize as o, ColumnWidth as p, UseTableSelectionConfig as q, ResizableProps as r, ResizableState as s, ResizableDirection as t, ToolbarVariant as tt, UseResizableSingleOptions as u, TableColumn as v, TableFilterFieldType as w, TableDensity as x, TableColumnAlign as y, TableSlots as z };
|