@astryx-vue/core 0.3.0 → 0.4.1
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-RAVA_cT1.js → AlertDialog-C2inDZWG.js} +5 -5
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-0wTvOo3H.js → AppShell-awAKicsc.js} +3 -3
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-pPZ4dI_s.js → Avatar-DXBjJ88C.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-kpAeKLNq.js} +57 -13
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-GbGxrqQO.js → Banner-BdvuyzAe.js} +71 -35
- 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-pt7m4CvC.js → BottomSheet-B4sc3F1S.js} +286 -140
- package/dist/{BottomSheet-JYMB_Ofl.js → BottomSheet-m54uCMJN.js} +20 -4
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/Breadcrumbs-D4ZzHEB0.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-CjK-JUDM.js} +5 -5
- package/dist/Card/index.d.ts +2 -2
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-CA8zpD9v.js → Carousel-D262qigj.js} +8 -8
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-Bmna9EOA.js → Chat-DD_mlIP3.js} +165 -101
- 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-D8vTmAMZ.js} +20 -12
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-CX1i_jVP.js → CheckboxList-DCvHewHB.js} +155 -38
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-Djgwa0ko.js → Citation-C69BgxW3.js} +8 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-DUsC-j03.js → ClickableCard-ChAfiw9T.js} +9 -6
- 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-D0BFubut.js → CodeBlock-DsbwTBiT.js} +8 -8
- 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-YHsUNg3V.js → CommandPalette-CZ7CZglZ.js} +147 -67
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-DWLdKPGI.js → ComplexSelector-CIz6DDmY.js} +114 -28
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-Bq9b3Ti5.js → ContextMenu-CxoiRh_h.js} +297 -179
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-DT518j5E.js → DateInput-C67HCOU-.js} +563 -72
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-Bqi5tlIA.js → DateRangeInput-Dsf5Tyf-.js} +91 -26
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/DateTimeInput-tfM1y5nZ.js +562 -0
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +2 -2
- package/dist/{Dialog-BiOSKQso.js → Dialog-DT1GzCrB.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-CoOQVlRp.js → DropdownMenu-C6wBC18g.js} +84 -56
- package/dist/{DropdownMenu-DEb2dSSP.js → DropdownMenu-G-pWSiBk.js} +479 -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-JIxT3xCh.js} +5 -4
- package/dist/FieldIcon-BFSHZEs_.js +40 -0
- package/dist/{FieldInfoTip-Ds-sW_jY.js → FieldInfoTip-BbgLt4ug.js} +4 -4
- package/dist/{FieldLabel-BNeXRuGH.js → FieldLabel-CHqp1y3z.js} +13 -8
- package/dist/FieldStatus/index.d.ts +1 -1
- package/dist/FieldStatus/index.js +1 -1
- package/dist/{FieldStatus-MjY19ERl.js → FieldStatus-DaAB3TIt.js} +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BpdiO1V8.js → FileInput-Bi1uty-F.js} +108 -31
- 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-CfSIqc-V.js +40 -0
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +2 -2
- package/dist/{InputGroup-CA03Smrs.js → InputGroup-D3F-QnET.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-CVV5QDgp.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-C6RHllr-.js → Layout-JJRCG7Mf.js} +1 -1
- package/dist/{LayoutPanel-DXOsaeQb.js → LayoutPanel-zM5vjrKS.js} +12 -8
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-DTF9EdTG.js → Lightbox-CjXhbDPc.js} +14 -12
- package/dist/Link/index.js +1 -1
- package/dist/{Link-BqHCtiyt.js → Link-ClNkTN1Q.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 +4 -2
- package/dist/Markdown/parser/index.d.ts +4 -0
- package/dist/Markdown/parser/index.js +2 -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-CvtN7HnF.js → Markdown-EIBrwQrb.js} +195 -524
- package/dist/MediaTheme-DlLqYhDy.js +433 -0
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-B-OelQlt.js → MetadataList-DLlSLX1n.js} +15 -7
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DxGz0xKA.js → MobileNavToggle-DgJYyzT6.js} +52 -17
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-Dlb7MLlW.js → MoreMenu-C8BEt6-O.js} +74 -61
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/MultiSelector-C7NCAtwW.js +1456 -0
- package/dist/{NavDisclosure-C_fugrQ3.js → NavDisclosure-Bq9DTZLO.js} +29 -7
- package/dist/{NavHeadingSurface-B3yJspSN.js → NavHeadingSurface-DQXisuaX.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-3u3NZWnv.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-8szj9eXu.js} +91 -6
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-NmrSMbxb.js → OverflowList-BizpEwH8.js} +23 -6
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DqwNQFRp.js → Pagination-Cihr1CjD.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-DJf8POzL.js → Popover-78dFjTb9.js} +20 -15
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DvjiPqMZ.js → PowerSearch-BHx91ypY.js} +778 -590
- 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-DeSIRrgt.js} +94 -26
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-xY1cwLdZ.js → RadioList-Co2lmetC.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-DjLZ2pcq.js} +103 -50
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/ScrollableArea/index.js +1 -1
- package/dist/{ScrollableArea-D4dCJv9I.js → ScrollableArea-0u6RWtGG.js} +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- 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-Cku4dRzc.js → SelectableCard-BEqnhPaX.js} +16 -11
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-swa3RNQI.js +1049 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-BF8mYDxl.js → SideNav-BH6XKsW2.js} +56 -42
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DWobsPgm.js → Slider-DG2YXll8.js} +172 -46
- package/dist/Spinner/index.js +1 -1
- package/dist/Spinner-BY8iQz--.js +200 -0
- package/dist/Stack/index.js +2 -2
- package/dist/{Stack-CTsTFfar.js → Stack-Bb_h60t3.js} +1 -1
- package/dist/{Stack-kQlYbbL4.js → Stack-Bp-XN9J4.js} +12 -7
- 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-FtkTq5qR.js} +127 -113
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DaVPRxvN.js → Switch-0JKvJluV.js} +38 -22
- package/dist/TabList/index.d.ts +2 -2
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-DIkK9sgK.js → TabList-cpjvnbhx.js} +205 -63
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +1 -1
- package/dist/{Table-fecqnm7P.js → Table-fWs_ZQBF.js} +735 -461
- package/dist/Text/index.d.ts +1 -1
- 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-CwSfEjT1.js} +110 -50
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-zFT1_qgI.js → TextInput-CavITage.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-DpJnaNbg.js} +17 -14
- package/dist/{TimeField-CoHDGmsP.js → TimeField-DefNjDIT.js} +297 -40
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D2k3Ux3p.js → TimeInput-j5vzN8MG.js} +78 -9
- 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-dtT4yADD.js} +9 -9
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/Toast-igtJYSw0.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-DhsAtAH6.js} +32 -17
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-B5C_qY7t.js → Tokenizer-BGdj78UK.js} +107 -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-Ciq0l1w7.js → TopNav-Dw0m387B.js} +23 -22
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-BUz-KZJd.js → TreeList-Bunn7u3T.js} +129 -46
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-JP9RT87x.js → Typeahead-DRyf2HEh.js} +123 -26
- package/dist/{TypeaheadMenu-DBW6rHeO.js → TypeaheadMenu-BY5__sPC.js} +141 -51
- package/dist/{announce-Cnio10Wk.js → announce-B210eJVf.js} +17 -2
- 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-CnsDaMuU.js} +167 -197
- package/dist/context-B6UElI5X.js +5 -0
- package/dist/context-CM-cjGg_.js +1425 -0
- package/dist/{context-Cfjh8te1.js → context-Cfml4jaK.js} +5 -3
- 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-ClNU2Th8.d.ts → index-3t5RAfNP.d.ts} +6 -2
- package/dist/{index-B9e52paP.d.ts → index-5LVG3QyV.d.ts} +1 -1
- package/dist/{index-CsNi1I8j.d.ts → index-B08-Uxhv.d.ts} +4 -2
- package/dist/{index-TXcNH86P.d.ts → index-B1eCxBCY.d.ts} +1 -1
- package/dist/{index-Cn-sSds-.d.ts → index-B1t1oQWH.d.ts} +24 -1
- package/dist/{index-BkjSF265.d.ts → index-BEZ4ezJk.d.ts} +3 -3
- package/dist/{index-yT1yiiww.d.ts → index-BI6jikpA.d.ts} +23 -11
- package/dist/{index-DeQwYJbg.d.ts → index-BNaRK-s5.d.ts} +10 -1
- package/dist/{index-D97pQbua.d.ts → index-BV2D2x_u.d.ts} +1 -1
- package/dist/{index-Crp3NFLW.d.ts → index-BZKgbyN9.d.ts} +1 -1
- package/dist/{index-Bu8NA2SD.d.ts → index-BaxM-pFP.d.ts} +12 -3
- package/dist/{index-BVKivP59.d.ts → index-Bgk1Rj2A.d.ts} +32 -3
- package/dist/index-BkUkm6Al.d.ts +11 -0
- package/dist/index-Bo-ofFyg.d.ts +166 -0
- package/dist/{index-B1WJxt-n.d.ts → index-C-tFz2Yx.d.ts} +17 -7
- package/dist/{index-DWh2WC8W.d.ts → index-C4Cjz6OK.d.ts} +2 -2
- package/dist/{index-CqE4Bf3Q.d.ts → index-C732aNMY.d.ts} +18 -4
- 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-CKUfpmFL.d.ts +375 -0
- package/dist/{index-CL1T2j4y.d.ts → index-CL8JvxHW.d.ts} +3 -3
- package/dist/{index-IBAInumL.d.ts → index-CMme-xmL.d.ts} +19 -6
- package/dist/{index-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
- package/dist/{index-12QYAbiz.d.ts → index-CRrSHbok.d.ts} +3 -2
- package/dist/{index-B42oE_F-.d.ts → index-CT5OEUxd.d.ts} +17 -4
- package/dist/{index-DG52Bg0W.d.ts → index-CTf3SK0b.d.ts} +6 -0
- package/dist/{index-Cde5JvtX.d.ts → index-CUVmtB5-.d.ts} +13 -6
- package/dist/{index-DXpSFlPG.d.ts → index-CWaSYtk9.d.ts} +4 -4
- package/dist/{index-CVn0GBdB.d.ts → index-Ca8VIE4l.d.ts} +1 -1
- package/dist/{index-Cyb9Du5Z.d.ts → index-CfR2Z0uG.d.ts} +1 -1
- package/dist/{index-Byar3h1e.d.ts → index-D05JGsT3.d.ts} +6 -3
- package/dist/{index-hCpxKePE.d.ts → index-D5N9ikrS.d.ts} +1 -1
- package/dist/{index-CkKPMIeX.d.ts → index-D7XRtUTY.d.ts} +9 -0
- package/dist/{index-i0tNFWfz.d.ts → index-D8lv2BiD.d.ts} +3 -1
- package/dist/{index-TntQsADQ.d.ts → index-DEm3kRBO.d.ts} +4 -3
- package/dist/{index-0QGtSf3r.d.ts → index-DFLPv9io.d.ts} +4 -3
- package/dist/{index-C2nbK2AA.d.ts → index-DLAG3m9W.d.ts} +13 -3
- package/dist/{index-D41_xqjs.d.ts → index-DTuhnqHb.d.ts} +16 -9
- package/dist/{index-B3Fomy15.d.ts → index-DbiZvj1P.d.ts} +4 -4
- package/dist/{index-C5e-7Obr.d.ts → index-Dj1_1t3j.d.ts} +19 -6
- package/dist/{index-DIXAzTKL.d.ts → index-DxxudRgB.d.ts} +1 -1
- package/dist/{index-BhpAUzUr.d.ts → index-Dy746dfn.d.ts} +1 -1
- package/dist/{index-GI9xIV9l.d.ts → index-JL4auphT.d.ts} +2 -2
- package/dist/{index-DVmgNb78.d.ts → index-TA1zVibb.d.ts} +4 -4
- package/dist/{index-DUaLJO7l.d.ts → index-UA93Im7H.d.ts} +155 -109
- package/dist/{index-COgrQZIL.d.ts → index-YKCx03zD.d.ts} +2 -2
- package/dist/{index-XuAAcYiP.d.ts → index-f3d9cVtj.d.ts} +1 -1
- package/dist/{index-T2FOcOuI.d.ts → index-jOwU3YoR.d.ts} +400 -90
- package/dist/{index-CICeEoZV.d.ts → index-pNtfr-RW.d.ts} +1 -1
- package/dist/{index-B4OOtNP8.d.ts → index-pYh4gqgl.d.ts} +1 -1
- package/dist/index.d.ts +81 -75
- package/dist/index.js +150 -136
- 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-CsZFr9dg.js +424 -0
- package/dist/loadCatalog-opk5hs94.d.ts +803 -0
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -3
- package/dist/locale-D1Z3K290.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-DwUmpC5G.d.ts +240 -0
- package/dist/publicParser-B6XMcsB2.d.ts +141 -0
- package/dist/publicParser-DWUMCx7j.js +1437 -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-DtyScdZs.js} +5 -14
- package/dist/{semantic-CKH9XVqa.d.ts → semantic-BF_AjLvk.d.ts} +6 -3
- package/dist/slug-DAK6hdbr.js +17 -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-CwyibrRB.d.ts → types-C5GQ2KCK.d.ts} +23 -3
- package/dist/{types-gKsEkk2g.d.ts → types-CsqwQkf1.d.ts} +143 -10
- package/dist/upstreamMap-ocuIRfI2.js +893 -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-D9Y0dJsm.js} +5 -23
- package/dist/{useInputContainer-CpgDe2-4.js → useInputContainer-CLcYrby4.js} +1 -1
- package/dist/{useInputStatusIcon-DBOwxV4x.js → useInputStatusIcon-CWkCeMyX.js} +2 -2
- 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/{useTimeValue-6ufHM15W.js → useTimeValue-BJd0xBhG.js} +4 -22
- package/dist/useTranslator-PEXMxDpv.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 +18 -2
- package/reset.css +364 -1
- package/styles/avatar-group.css +9 -1
- package/styles/badge.css +8 -5
- package/styles/banner.css +125 -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 +24 -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 +9 -9
- 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/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 -11
- package/styles/text-area.css +7 -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-DIm4figq.js +0 -141
- package/dist/ButtonGroup-ySQWanDP.js +0 -125
- package/dist/DateTimeInput-A7m2O3bg.js +0 -268
- package/dist/FieldIcon--NTgW5IU.js +0 -44
- package/dist/MultiSelector-BtAUfQ3t.js +0 -990
- package/dist/NumberInput-AZ9x3oja.js +0 -473
- package/dist/Selector-DJ2BhUTV.js +0 -677
- 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/context-iABt_ueM.js +0 -976
- package/dist/index-BH9PzQ1F.d.ts +0 -87
- package/dist/link-C4_WogdF.js +0 -18
- package/dist/loadCatalog-BGHKG_9N.d.ts +0 -457
- 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,13 +1,17 @@
|
|
|
1
|
-
import { n as useButtonTooltip } from "./Button-
|
|
2
|
-
import { t as _sfc_main$2 } from "./ButtonTooltip-
|
|
3
|
-
import {
|
|
1
|
+
import { n as useButtonTooltip } from "./Button-ONOoHdkg.js";
|
|
2
|
+
import { t as _sfc_main$2 } from "./ButtonTooltip-CNKOQHYR.js";
|
|
3
|
+
import { a as isImeKeyEvent } from "./layerDepth-CNDh-IHb.js";
|
|
4
|
+
import { s as useAstryxMessages } from "./context-CM-cjGg_.js";
|
|
5
|
+
import { t as useResolvedLabelHidden } from "./useResolvedLabelHidden-B2rlWiaI.js";
|
|
4
6
|
import { t as useScrollbars } from "./useScrollbars-C2NJ6Qwq.js";
|
|
5
|
-
import { t as _sfc_main$3 } from "./Spinner-
|
|
6
|
-
import { t as _sfc_main$4 } from "./Field-
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { t as _sfc_main$3 } from "./Spinner-BY8iQz--.js";
|
|
8
|
+
import { t as _sfc_main$4 } from "./Field-JIxT3xCh.js";
|
|
9
|
+
import { t as useFieldPartStyling } from "./fieldParts--SyRZVQG.js";
|
|
10
|
+
import { t as _sfc_main$5 } from "./Token-DhsAtAH6.js";
|
|
11
|
+
import { n as useAnchoredListbox, t as scrollOptionIntoView } from "./useAnchoredListbox-DGxxKHZb.js";
|
|
12
|
+
import { i as useTypeaheadMenu, r as useLatchedOptionGrid, t as _sfc_main$6 } from "./TypeaheadMenu-BY5__sPC.js";
|
|
13
|
+
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, inject, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, provide, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, useAttrs, useId, useTemplateRef, vShow, watch, withCtx, withDirectives } from "vue";
|
|
14
|
+
import "../styles/layer.css";
|
|
11
15
|
import "../styles/visually-hidden-utility.css";
|
|
12
16
|
import "../styles/typeahead.css";
|
|
13
17
|
//#region src/Typeahead/context.ts
|
|
@@ -34,6 +38,7 @@ const _hoisted_2 = [
|
|
|
34
38
|
"aria-disabled",
|
|
35
39
|
"aria-expanded",
|
|
36
40
|
"aria-controls",
|
|
41
|
+
"aria-haspopup",
|
|
37
42
|
"aria-label",
|
|
38
43
|
"aria-labelledby",
|
|
39
44
|
"aria-activedescendant",
|
|
@@ -45,6 +50,7 @@ const _hoisted_4 = ["id"];
|
|
|
45
50
|
const _hoisted_5 = ["name", "value"];
|
|
46
51
|
const _hoisted_6 = [
|
|
47
52
|
"id",
|
|
53
|
+
"role",
|
|
48
54
|
"aria-label",
|
|
49
55
|
"data-placement"
|
|
50
56
|
];
|
|
@@ -94,7 +100,21 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
94
100
|
default: false
|
|
95
101
|
},
|
|
96
102
|
name: {},
|
|
97
|
-
inputTabIndex: {}
|
|
103
|
+
inputTabIndex: {},
|
|
104
|
+
controlClass: { type: [
|
|
105
|
+
Boolean,
|
|
106
|
+
null,
|
|
107
|
+
String,
|
|
108
|
+
Object,
|
|
109
|
+
Array
|
|
110
|
+
] },
|
|
111
|
+
controlStyle: { type: [
|
|
112
|
+
Boolean,
|
|
113
|
+
null,
|
|
114
|
+
String,
|
|
115
|
+
Object,
|
|
116
|
+
Array
|
|
117
|
+
] }
|
|
98
118
|
},
|
|
99
119
|
emits: [
|
|
100
120
|
"update:modelValue",
|
|
@@ -275,8 +295,16 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
275
295
|
* 外面的 keydown 先跑,它 preventDefault 就不再走内部导航。
|
|
276
296
|
* 顺序靠模板里 `v-bind` 写在 `@keydown` 前面保证。
|
|
277
297
|
*/
|
|
298
|
+
const optionGrid = useLatchedOptionGrid({
|
|
299
|
+
entries: () => menu.entries.value,
|
|
300
|
+
isOpen: () => menu.combobox.isOpen.value,
|
|
301
|
+
activeIndex: menu.combobox.activeIndex,
|
|
302
|
+
getListbox: () => listboxRef.value,
|
|
303
|
+
listboxId: () => listboxId.value
|
|
304
|
+
});
|
|
278
305
|
function onKeydown(event) {
|
|
279
|
-
if (event.defaultPrevented) return;
|
|
306
|
+
if (event.defaultPrevented || isImeKeyEvent(event)) return;
|
|
307
|
+
if (optionGrid.actionGrid.onKeyDown(event)) return;
|
|
280
308
|
menu.onKeyDown(event);
|
|
281
309
|
}
|
|
282
310
|
function onControlClick(event) {
|
|
@@ -306,11 +334,17 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
306
334
|
createElementVNode("div", { class: normalizeClass(["astryx-typeahead", [`size-${props.size}`, { "astryx-typeahead--bare": !hasChrome }]]) }, [createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/no-static-element-interactions -- 点空白处只是把焦点交给组合框;键盘用户直接 Tab 到输入框。 "), createElementVNode("div", {
|
|
307
335
|
ref_key: "controlRef",
|
|
308
336
|
ref: controlRef,
|
|
309
|
-
class: normalizeClass(["astryx-typeahead-control", [
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
337
|
+
class: normalizeClass(["astryx-typeahead-control", [
|
|
338
|
+
unref(attrs).class,
|
|
339
|
+
props.controlClass,
|
|
340
|
+
`status-${props.status}`,
|
|
341
|
+
{
|
|
342
|
+
"is-open": unref(menu).combobox.isOpen.value,
|
|
343
|
+
"is-disabled": props.disabled,
|
|
344
|
+
"is-bare": !hasChrome
|
|
345
|
+
}
|
|
346
|
+
]]),
|
|
347
|
+
style: normalizeStyle([unref(attrs).style, props.controlStyle]),
|
|
314
348
|
onClick: onControlClick,
|
|
315
349
|
onPointerenter: _cache[0] || (_cache[0] = (...args) => unref(disabledTooltip).onPointerEnter && unref(disabledTooltip).onPointerEnter(...args)),
|
|
316
350
|
onPointerleave: _cache[1] || (_cache[1] = (...args) => unref(disabledTooltip).onPointerLeave && unref(disabledTooltip).onPointerLeave(...args))
|
|
@@ -346,10 +380,11 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
346
380
|
"aria-disabled": focusableDisabled.value ? "true" : void 0,
|
|
347
381
|
"aria-expanded": unref(menu).combobox.isOpen.value,
|
|
348
382
|
"aria-controls": listboxId.value,
|
|
383
|
+
"aria-haspopup": unref(optionGrid).popupKind.value,
|
|
349
384
|
"aria-label": ariaLabel.value,
|
|
350
385
|
"aria-labelledby": labelledBy.value,
|
|
351
386
|
"aria-autocomplete": "list",
|
|
352
|
-
"aria-activedescendant": unref(menu).activeId.value ? `${listboxId.value}-option-${unref(menu).combobox.activeIndex.value}` : void 0,
|
|
387
|
+
"aria-activedescendant": unref(optionGrid).gridMode.value ? unref(optionGrid).actionGrid.activeDescendant.value : unref(menu).activeId.value ? `${listboxId.value}-option-${unref(menu).combobox.activeIndex.value}` : void 0,
|
|
353
388
|
"aria-describedby": describedBy.value,
|
|
354
389
|
"aria-required": props.required || void 0,
|
|
355
390
|
onInput,
|
|
@@ -392,7 +427,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
392
427
|
name: props.name,
|
|
393
428
|
value: selected.value?.id ?? ""
|
|
394
429
|
}, null, 8, _hoisted_5)) : createCommentVNode("v-if", true)
|
|
395
|
-
],
|
|
430
|
+
], 38)], 2),
|
|
396
431
|
showsDisabledMessage.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
397
432
|
key: 0,
|
|
398
433
|
id: disabledTooltipId.value,
|
|
@@ -413,8 +448,8 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
413
448
|
id: listboxId.value,
|
|
414
449
|
ref_key: "listboxRef",
|
|
415
450
|
ref: listboxRef,
|
|
416
|
-
class: "astryx-typeahead-listbox",
|
|
417
|
-
role: "listbox",
|
|
451
|
+
class: "astryx-typeahead-listbox astryx-layer",
|
|
452
|
+
role: unref(optionGrid).gridMode.value ? "grid" : "listbox",
|
|
418
453
|
"aria-label": unref(messages).typeahead.results,
|
|
419
454
|
"data-placement": unref(anchored).position.value.placement,
|
|
420
455
|
style: normalizeStyle(unref(anchored).style.value),
|
|
@@ -426,9 +461,12 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
426
461
|
description: entry.description,
|
|
427
462
|
disabled: entry.disabled,
|
|
428
463
|
group: entry.group,
|
|
464
|
+
action: entry.action,
|
|
429
465
|
selected: optionSelected(entry.item.id)
|
|
430
466
|
})),
|
|
431
467
|
"active-index": unref(menu).combobox.activeIndex.value,
|
|
468
|
+
grid: unref(optionGrid).gridMode.value,
|
|
469
|
+
"action-index": unref(optionGrid).actionGrid.column.value === "action" ? unref(menu).combobox.activeIndex.value : -1,
|
|
432
470
|
status: unref(menu).status.value,
|
|
433
471
|
"listbox-id": listboxId.value,
|
|
434
472
|
"empty-text": emptyText.value,
|
|
@@ -451,6 +489,8 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
451
489
|
} : void 0]), 1032, [
|
|
452
490
|
"entries",
|
|
453
491
|
"active-index",
|
|
492
|
+
"grid",
|
|
493
|
+
"action-index",
|
|
454
494
|
"status",
|
|
455
495
|
"listbox-id",
|
|
456
496
|
"empty-text",
|
|
@@ -471,6 +511,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
471
511
|
modelValue: { default: null },
|
|
472
512
|
searchSource: {},
|
|
473
513
|
label: {},
|
|
514
|
+
isLabelHidden: { type: Boolean },
|
|
474
515
|
labelHidden: {
|
|
475
516
|
type: Boolean,
|
|
476
517
|
default: false
|
|
@@ -518,7 +559,36 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
518
559
|
default: false
|
|
519
560
|
},
|
|
520
561
|
name: {},
|
|
521
|
-
width: {}
|
|
562
|
+
width: {},
|
|
563
|
+
startIcon: {},
|
|
564
|
+
containerClass: { type: [
|
|
565
|
+
Boolean,
|
|
566
|
+
null,
|
|
567
|
+
String,
|
|
568
|
+
Object,
|
|
569
|
+
Array
|
|
570
|
+
] },
|
|
571
|
+
containerStyle: { type: [
|
|
572
|
+
Boolean,
|
|
573
|
+
null,
|
|
574
|
+
String,
|
|
575
|
+
Object,
|
|
576
|
+
Array
|
|
577
|
+
] },
|
|
578
|
+
controlClass: { type: [
|
|
579
|
+
Boolean,
|
|
580
|
+
null,
|
|
581
|
+
String,
|
|
582
|
+
Object,
|
|
583
|
+
Array
|
|
584
|
+
] },
|
|
585
|
+
controlStyle: { type: [
|
|
586
|
+
Boolean,
|
|
587
|
+
null,
|
|
588
|
+
String,
|
|
589
|
+
Object,
|
|
590
|
+
Array
|
|
591
|
+
] }
|
|
522
592
|
},
|
|
523
593
|
emits: [
|
|
524
594
|
"update:modelValue",
|
|
@@ -531,6 +601,25 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
531
601
|
const props = __props;
|
|
532
602
|
const emit = __emit;
|
|
533
603
|
const attrs = useAttrs();
|
|
604
|
+
const parts = useFieldPartStyling({
|
|
605
|
+
component: "Typeahead",
|
|
606
|
+
props,
|
|
607
|
+
attrs,
|
|
608
|
+
reservedAttrs: [
|
|
609
|
+
"id",
|
|
610
|
+
"role",
|
|
611
|
+
"aria-label",
|
|
612
|
+
"aria-labelledby",
|
|
613
|
+
"aria-describedby",
|
|
614
|
+
"aria-expanded",
|
|
615
|
+
"aria-controls",
|
|
616
|
+
"aria-haspopup",
|
|
617
|
+
"aria-activedescendant",
|
|
618
|
+
"aria-autocomplete",
|
|
619
|
+
"aria-disabled",
|
|
620
|
+
"aria-required"
|
|
621
|
+
]
|
|
622
|
+
});
|
|
534
623
|
provide(typeaheadChromeKey, true);
|
|
535
624
|
const inputId = `astryx-typeahead-${useId()}`;
|
|
536
625
|
const base = useTemplateRef("base");
|
|
@@ -543,6 +632,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
543
632
|
const showsClear = computed(() => props.hasClear && props.clearable);
|
|
544
633
|
/** 两个名字任一为真就在聚焦时先展开。 */
|
|
545
634
|
const showsEntriesOnFocus = computed(() => props.hasEntriesOnFocus || props.showOnFocus);
|
|
635
|
+
/** 正名 isLabelHidden,旧名 labelHidden 任一为真就藏起标签。 */
|
|
636
|
+
const hideLabel = useResolvedLabelHidden(() => props.isLabelHidden, () => props.labelHidden);
|
|
546
637
|
const emptySearchText = computed(() => props.emptySearchText ?? props.emptyText);
|
|
547
638
|
const fieldStatus = computed(() => {
|
|
548
639
|
if (!props.statusMessage || props.status === "default") return void 0;
|
|
@@ -557,12 +648,13 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
557
648
|
});
|
|
558
649
|
return (_ctx, _cache) => {
|
|
559
650
|
return openBlock(), createBlock(_sfc_main$4, {
|
|
560
|
-
class: normalizeClass(["astryx-typeahead", [`size-${props.size}`]]),
|
|
651
|
+
class: normalizeClass(["astryx-typeahead", [unref(parts).containerClass.value, `size-${props.size}`]]),
|
|
652
|
+
style: normalizeStyle(unref(parts).containerStyle.value),
|
|
561
653
|
label: props.label,
|
|
562
654
|
"input-id": inputId,
|
|
563
655
|
description: props.description,
|
|
564
656
|
"label-tooltip": props.labelTooltip,
|
|
565
|
-
"is-label-hidden":
|
|
657
|
+
"is-label-hidden": unref(hideLabel),
|
|
566
658
|
"is-disabled": props.disabled,
|
|
567
659
|
"is-required": props.required,
|
|
568
660
|
"is-optional": props.optional,
|
|
@@ -572,7 +664,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
572
664
|
default: withCtx((field) => [createVNode(_sfc_main$1, mergeProps({
|
|
573
665
|
ref_key: "base",
|
|
574
666
|
ref: base
|
|
575
|
-
}, unref(
|
|
667
|
+
}, unref(parts).forwardedAttrs(), {
|
|
668
|
+
"control-class": unref(parts).controlClass(),
|
|
669
|
+
"control-style": unref(parts).controlStyle(),
|
|
576
670
|
"model-value": props.modelValue,
|
|
577
671
|
"search-source": props.searchSource,
|
|
578
672
|
"input-id": field.inputId,
|
|
@@ -597,9 +691,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
597
691
|
onChangeQuery: _cache[3] || (_cache[3] = ($event) => emit("changeQuery", $event)),
|
|
598
692
|
onOpenChange: _cache[4] || (_cache[4] = ($event) => emit("openChange", $event))
|
|
599
693
|
}), createSlots({ _: 2 }, [
|
|
600
|
-
_ctx.$slots.icon ? {
|
|
694
|
+
_ctx.$slots.icon || props.startIcon ? {
|
|
601
695
|
name: "icon",
|
|
602
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
|
|
696
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(props.startIcon)))])]),
|
|
603
697
|
key: "0"
|
|
604
698
|
} : void 0,
|
|
605
699
|
_ctx.$slots.item ? {
|
|
@@ -617,6 +711,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
617
711
|
key: "2"
|
|
618
712
|
} : void 0
|
|
619
713
|
]), 1040, [
|
|
714
|
+
"control-class",
|
|
715
|
+
"control-style",
|
|
620
716
|
"model-value",
|
|
621
717
|
"search-source",
|
|
622
718
|
"input-id",
|
|
@@ -639,6 +735,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
639
735
|
_: 3
|
|
640
736
|
}, 8, [
|
|
641
737
|
"class",
|
|
738
|
+
"style",
|
|
642
739
|
"label",
|
|
643
740
|
"description",
|
|
644
741
|
"label-tooltip",
|
|
@@ -1,25 +1,17 @@
|
|
|
1
|
+
import { t as characterCount } from "./characters-wTnzjkkR.js";
|
|
1
2
|
import { n as useAsyncSource } from "./useAsyncSource-Gk0VtE7_.js";
|
|
2
3
|
import { t as useCombobox } from "./useCombobox-CTo5C-gc.js";
|
|
3
|
-
import { t as _sfc_main$2 } from "./Spinner-
|
|
4
|
-
import {
|
|
4
|
+
import { t as _sfc_main$2 } from "./Spinner-BY8iQz--.js";
|
|
5
|
+
import { n as OptionAction, r as isOptionAction, t as useOptionActionGrid } from "./useOptionActionGrid-CkJcuvaU.js";
|
|
6
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, watch, withModifiers } from "vue";
|
|
5
7
|
import "../styles/typeahead.css";
|
|
6
8
|
//#region src/Typeahead/queryLength.ts
|
|
7
9
|
/**
|
|
8
|
-
* 查询长度按「人眼看到的字符」数,不按 UTF-16 码元数。
|
|
9
|
-
* 一个 emoji、一面旗、一个带音标的字母都算一个字符。
|
|
10
|
-
*/
|
|
11
|
-
const graphemeSegmenter = typeof Intl.Segmenter === "function" ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : null;
|
|
12
|
-
function countCharacters(text) {
|
|
13
|
-
if (text === "") return 0;
|
|
14
|
-
if (graphemeSegmenter != null) return [...graphemeSegmenter.segment(text)].length;
|
|
15
|
-
return [...text].length;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
10
|
* 查询短于下限时不该去搜数据源。
|
|
19
11
|
* 空查询不算「太短」——空查询走的是 bootstrap,不是搜索。
|
|
20
12
|
*/
|
|
21
13
|
function isBelowMinQueryLength(query, minQueryLength) {
|
|
22
|
-
const length =
|
|
14
|
+
const length = characterCount(query);
|
|
23
15
|
return length > 0 && length < minQueryLength;
|
|
24
16
|
}
|
|
25
17
|
//#endregion
|
|
@@ -60,7 +52,8 @@ function useTypeaheadMenu(options) {
|
|
|
60
52
|
label: item.label,
|
|
61
53
|
description: item.description,
|
|
62
54
|
disabled: item.disabled,
|
|
63
|
-
group: entryGroup(item)
|
|
55
|
+
group: entryGroup(item),
|
|
56
|
+
action: item.action
|
|
64
57
|
}));
|
|
65
58
|
const text = query.value.trim();
|
|
66
59
|
if (toValue(options.creatable) && text !== "") {
|
|
@@ -213,6 +206,40 @@ function useTypeaheadMenu(options) {
|
|
|
213
206
|
};
|
|
214
207
|
}
|
|
215
208
|
//#endregion
|
|
209
|
+
//#region src/selectors/useLatchedOptionGrid.ts
|
|
210
|
+
/** 一旦出现过带操作的条目,这次挂载里的菜单就保持两列网格。 */
|
|
211
|
+
function useLatchedOptionGrid(options) {
|
|
212
|
+
const gridLatched = ref(false);
|
|
213
|
+
watch(options.entries, (list) => {
|
|
214
|
+
if (list.some((entry) => isOptionAction(entry.action))) gridLatched.value = true;
|
|
215
|
+
}, { immediate: true });
|
|
216
|
+
const gridMode = computed(() => gridLatched.value);
|
|
217
|
+
function optionId(index) {
|
|
218
|
+
return `${options.listboxId()}-option-${index}`;
|
|
219
|
+
}
|
|
220
|
+
function actionId(index) {
|
|
221
|
+
return `${options.listboxId()}-action-${index}`;
|
|
222
|
+
}
|
|
223
|
+
function rowHasAction(index) {
|
|
224
|
+
return isOptionAction(options.entries()[index]?.action);
|
|
225
|
+
}
|
|
226
|
+
return {
|
|
227
|
+
gridMode,
|
|
228
|
+
actionGrid: useOptionActionGrid({
|
|
229
|
+
enabled: () => gridMode.value,
|
|
230
|
+
isOpen: options.isOpen,
|
|
231
|
+
activeIndex: options.activeIndex,
|
|
232
|
+
rowHasAction,
|
|
233
|
+
getListbox: options.getListbox,
|
|
234
|
+
optionId,
|
|
235
|
+
actionId
|
|
236
|
+
}),
|
|
237
|
+
popupKind: computed(() => gridMode.value ? "grid" : "listbox"),
|
|
238
|
+
optionId,
|
|
239
|
+
actionId
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
//#endregion
|
|
216
243
|
//#region src/Typeahead/TypeaheadItem.vue
|
|
217
244
|
const _hoisted_1$1 = ["data-disabled"];
|
|
218
245
|
const _hoisted_2$1 = {
|
|
@@ -261,13 +288,7 @@ const _hoisted_3 = {
|
|
|
261
288
|
class: "astryx-typeahead-state",
|
|
262
289
|
role: "alert"
|
|
263
290
|
};
|
|
264
|
-
const _hoisted_4 =
|
|
265
|
-
key: 2,
|
|
266
|
-
class: "astryx-typeahead-state",
|
|
267
|
-
role: "option",
|
|
268
|
-
"aria-selected": "false",
|
|
269
|
-
"aria-disabled": "true"
|
|
270
|
-
};
|
|
291
|
+
const _hoisted_4 = ["role", "aria-selected"];
|
|
271
292
|
const _hoisted_5 = {
|
|
272
293
|
key: 3,
|
|
273
294
|
class: "astryx-typeahead-options",
|
|
@@ -281,14 +302,16 @@ const _hoisted_7 = {
|
|
|
281
302
|
};
|
|
282
303
|
const _hoisted_8 = [
|
|
283
304
|
"id",
|
|
305
|
+
"role",
|
|
284
306
|
"aria-selected",
|
|
285
307
|
"aria-disabled",
|
|
286
308
|
"data-option-id",
|
|
287
309
|
"onMouseenter",
|
|
288
310
|
"onClick"
|
|
289
311
|
];
|
|
290
|
-
const _hoisted_9 =
|
|
291
|
-
const _hoisted_10 = {
|
|
312
|
+
const _hoisted_9 = ["id", "onClick"];
|
|
313
|
+
const _hoisted_10 = { class: "astryx-typeahead-option-copy" };
|
|
314
|
+
const _hoisted_11 = {
|
|
292
315
|
key: 0,
|
|
293
316
|
class: "astryx-typeahead-check",
|
|
294
317
|
width: "16",
|
|
@@ -297,6 +320,20 @@ const _hoisted_10 = {
|
|
|
297
320
|
fill: "none",
|
|
298
321
|
"aria-hidden": "true"
|
|
299
322
|
};
|
|
323
|
+
const _hoisted_12 = ["id"];
|
|
324
|
+
const _hoisted_13 = {
|
|
325
|
+
key: 2,
|
|
326
|
+
class: "astryx-typeahead-option-copy"
|
|
327
|
+
};
|
|
328
|
+
const _hoisted_14 = {
|
|
329
|
+
key: 3,
|
|
330
|
+
class: "astryx-typeahead-check",
|
|
331
|
+
width: "16",
|
|
332
|
+
height: "16",
|
|
333
|
+
viewBox: "0 0 16 16",
|
|
334
|
+
fill: "none",
|
|
335
|
+
"aria-hidden": "true"
|
|
336
|
+
};
|
|
300
337
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
301
338
|
name: "AstryxTypeaheadMenu",
|
|
302
339
|
__name: "TypeaheadMenu",
|
|
@@ -307,7 +344,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
307
344
|
listboxId: {},
|
|
308
345
|
emptyText: {},
|
|
309
346
|
loadingText: {},
|
|
310
|
-
errorText: {}
|
|
347
|
+
errorText: {},
|
|
348
|
+
grid: { type: Boolean },
|
|
349
|
+
actionIndex: {}
|
|
311
350
|
},
|
|
312
351
|
emits: ["select", "highlight"],
|
|
313
352
|
setup(__props, { emit: __emit }) {
|
|
@@ -339,6 +378,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
339
378
|
function optionId(index) {
|
|
340
379
|
return `${props.listboxId}-option-${index}`;
|
|
341
380
|
}
|
|
381
|
+
function actionId(index) {
|
|
382
|
+
return `${props.listboxId}-action-${index}`;
|
|
383
|
+
}
|
|
342
384
|
function onOptionClick(id, disabled) {
|
|
343
385
|
if (!disabled) emit("select", id);
|
|
344
386
|
}
|
|
@@ -346,51 +388,99 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
346
388
|
return openBlock(), createElementBlock("div", _hoisted_1, [props.status === "loading" && props.entries.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_sfc_main$2, {
|
|
347
389
|
size: "sm",
|
|
348
390
|
label: props.loadingText
|
|
349
|
-
}, null, 8, ["label"])])) : props.status === "error" ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(props.errorText), 1)) : props.entries.length === 0 ? (openBlock(), createElementBlock("div",
|
|
391
|
+
}, null, 8, ["label"])])) : props.status === "error" ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(props.errorText), 1)) : props.entries.length === 0 ? (openBlock(), createElementBlock("div", {
|
|
392
|
+
key: 2,
|
|
393
|
+
class: "astryx-typeahead-state",
|
|
394
|
+
role: props.grid ? "presentation" : "option",
|
|
395
|
+
"aria-selected": props.grid ? void 0 : "false",
|
|
396
|
+
"aria-disabled": "true"
|
|
397
|
+
}, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(props.emptyText), 1)])], 8, _hoisted_4)) : (openBlock(), createElementBlock("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (group, groupIndex) => {
|
|
350
398
|
return openBlock(), createElementBlock("div", {
|
|
351
399
|
key: group.heading ?? `__ungrouped-${groupIndex}`,
|
|
352
400
|
class: "astryx-typeahead-group",
|
|
353
|
-
role: group.heading ? "group" : "presentation",
|
|
401
|
+
role: props.grid ? group.heading ? "rowgroup" : "presentation" : group.heading ? "group" : "presentation",
|
|
354
402
|
"aria-label": group.heading
|
|
355
403
|
}, [
|
|
356
404
|
group.heading ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(group.heading), 1)) : createCommentVNode("v-if", true),
|
|
357
|
-
createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events -- 选项不进 Tab 序,方向键和 Enter 由组合框输入处理。 "),
|
|
405
|
+
createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events, vue-a11y/no-static-element-interactions -- 选项不进 Tab 序,方向键和 Enter 由组合框输入处理。 "),
|
|
358
406
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.rows, (row) => {
|
|
359
407
|
return openBlock(), createElementBlock("div", {
|
|
360
|
-
id: optionId(row.index),
|
|
408
|
+
id: props.grid ? void 0 : optionId(row.index),
|
|
361
409
|
key: row.entry.id,
|
|
362
410
|
class: normalizeClass(["astryx-typeahead-option", {
|
|
363
411
|
"is-active": row.index === props.activeIndex,
|
|
364
412
|
"is-selected": row.entry.selected,
|
|
365
413
|
"is-disabled": row.entry.disabled
|
|
366
414
|
}]),
|
|
367
|
-
role: "option",
|
|
415
|
+
role: props.grid ? "row" : "option",
|
|
368
416
|
"aria-selected": row.entry.selected ? "true" : "false",
|
|
369
417
|
"aria-disabled": row.entry.disabled || void 0,
|
|
370
418
|
"data-option-id": row.entry.id,
|
|
371
419
|
tabindex: "-1",
|
|
372
|
-
onMousedown: _cache[
|
|
420
|
+
onMousedown: _cache[2] || (_cache[2] = withModifiers(() => {}, ["prevent"])),
|
|
373
421
|
onMouseenter: ($event) => emit("highlight", row.index),
|
|
374
|
-
onClick: ($event) => onOptionClick(row.entry.id, row.entry.disabled)
|
|
375
|
-
}, [
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
422
|
+
onClick: ($event) => props.grid ? void 0 : onOptionClick(row.entry.id, row.entry.disabled)
|
|
423
|
+
}, [
|
|
424
|
+
createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events -- 选项格不进 Tab 序,方向键和 Enter 由组合框输入处理。 "),
|
|
425
|
+
props.grid ? (openBlock(), createElementBlock("div", {
|
|
426
|
+
key: 0,
|
|
427
|
+
id: optionId(row.index),
|
|
428
|
+
class: "astryx-typeahead-option-main",
|
|
429
|
+
role: "gridcell",
|
|
430
|
+
tabindex: "-1",
|
|
431
|
+
onClick: ($event) => onOptionClick(row.entry.id, row.entry.disabled)
|
|
432
|
+
}, [createElementVNode("span", _hoisted_10, [renderSlot(_ctx.$slots, "item", {
|
|
433
|
+
entry: row.entry,
|
|
434
|
+
isActive: row.index === props.activeIndex,
|
|
435
|
+
isSelected: Boolean(row.entry.selected)
|
|
436
|
+
}, () => [createVNode(_sfc_main$1, {
|
|
437
|
+
item: {
|
|
438
|
+
id: row.entry.id,
|
|
439
|
+
label: row.entry.label,
|
|
440
|
+
description: row.entry.description,
|
|
441
|
+
disabled: row.entry.disabled
|
|
442
|
+
},
|
|
443
|
+
"is-disabled": row.entry.disabled
|
|
444
|
+
}, null, 8, ["item", "is-disabled"])])]), row.entry.selected ? (openBlock(), createElementBlock("svg", _hoisted_11, [..._cache[3] || (_cache[3] = [createElementVNode("path", {
|
|
445
|
+
d: "M3.5 8.5L6.5 11.5L12.5 4.5",
|
|
446
|
+
stroke: "currentColor",
|
|
447
|
+
"stroke-width": "1.5",
|
|
448
|
+
"stroke-linecap": "round",
|
|
449
|
+
"stroke-linejoin": "round"
|
|
450
|
+
}, null, -1)])])) : createCommentVNode("v-if", true)], 8, _hoisted_9)) : createCommentVNode("v-if", true),
|
|
451
|
+
props.grid ? (openBlock(), createElementBlock("div", {
|
|
452
|
+
key: 1,
|
|
453
|
+
id: unref(isOptionAction)(row.entry.action) ? void 0 : actionId(row.index),
|
|
454
|
+
class: normalizeClass(["astryx-typeahead-option-action", { "is-active": props.actionIndex === row.index }]),
|
|
455
|
+
role: "gridcell",
|
|
456
|
+
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
|
|
457
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
|
|
458
|
+
}, [unref(isOptionAction)(row.entry.action) ? (openBlock(), createBlock(unref(OptionAction), {
|
|
459
|
+
key: 0,
|
|
460
|
+
node: row.entry.action,
|
|
461
|
+
"dom-id": actionId(row.index)
|
|
462
|
+
}, null, 8, ["node", "dom-id"])) : createCommentVNode("v-if", true)], 42, _hoisted_12)) : createCommentVNode("v-if", true),
|
|
463
|
+
!props.grid ? (openBlock(), createElementBlock("span", _hoisted_13, [renderSlot(_ctx.$slots, "item", {
|
|
464
|
+
entry: row.entry,
|
|
465
|
+
isActive: row.index === props.activeIndex,
|
|
466
|
+
isSelected: Boolean(row.entry.selected)
|
|
467
|
+
}, () => [createVNode(_sfc_main$1, {
|
|
468
|
+
item: {
|
|
469
|
+
id: row.entry.id,
|
|
470
|
+
label: row.entry.label,
|
|
471
|
+
description: row.entry.description,
|
|
472
|
+
disabled: row.entry.disabled
|
|
473
|
+
},
|
|
474
|
+
"is-disabled": row.entry.disabled
|
|
475
|
+
}, null, 8, ["item", "is-disabled"])])])) : createCommentVNode("v-if", true),
|
|
476
|
+
!props.grid && row.entry.selected ? (openBlock(), createElementBlock("svg", _hoisted_14, [..._cache[4] || (_cache[4] = [createElementVNode("path", {
|
|
477
|
+
d: "M3.5 8.5L6.5 11.5L12.5 4.5",
|
|
478
|
+
stroke: "currentColor",
|
|
479
|
+
"stroke-width": "1.5",
|
|
480
|
+
"stroke-linecap": "round",
|
|
481
|
+
"stroke-linejoin": "round"
|
|
482
|
+
}, null, -1)])])) : createCommentVNode("v-if", true)
|
|
483
|
+
], 42, _hoisted_8);
|
|
394
484
|
}), 128))
|
|
395
485
|
], 8, _hoisted_6);
|
|
396
486
|
}), 128))]))]);
|
|
@@ -398,4 +488,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
398
488
|
}
|
|
399
489
|
});
|
|
400
490
|
//#endregion
|
|
401
|
-
export { _sfc_main$1 as n,
|
|
491
|
+
export { useTypeaheadMenu as i, _sfc_main$1 as n, useLatchedOptionGrid as r, _sfc_main as t };
|
|
@@ -21,6 +21,15 @@ const clearTimers = {
|
|
|
21
21
|
assertive: null
|
|
22
22
|
};
|
|
23
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
|
+
}
|
|
24
33
|
function cancelScheduledClear(politeness) {
|
|
25
34
|
const timer = clearTimers[politeness];
|
|
26
35
|
if (timer != null) {
|
|
@@ -66,11 +75,17 @@ function announceMessage(message, politeness) {
|
|
|
66
75
|
const write = () => {
|
|
67
76
|
target.textContent = message;
|
|
68
77
|
};
|
|
69
|
-
if (typeof requestAnimationFrame === "function")
|
|
70
|
-
|
|
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();
|
|
71
85
|
scheduleClear(politeness, target);
|
|
72
86
|
}
|
|
73
87
|
function clearRegion(politeness) {
|
|
88
|
+
cancelPendingFrames(politeness);
|
|
74
89
|
cancelScheduledClear(politeness);
|
|
75
90
|
if (regions == null) return;
|
|
76
91
|
const target = politeness === "assertive" ? regions.assertive : regions.polite;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/utils/characters.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Number of characters in a string — the count a person would give, where one
|
|
4
|
+
* emoji, flag, or accented letter is one character. Replacement for `.length`
|
|
5
|
+
* on user-visible strings, which counts internal storage units instead.
|
|
6
|
+
*/
|
|
7
|
+
declare function characterCount(str: string): number;
|
|
8
|
+
/**
|
|
9
|
+
* The first character of a string, or '' when empty. Replacement for
|
|
10
|
+
* `.charAt(0)`, which can return half of an emoji. Reads only the first
|
|
11
|
+
* character, so cost does not scale with the length of the string.
|
|
12
|
+
*/
|
|
13
|
+
declare function firstCharacter(str: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Truncate to at most `max` characters, ellipsis included: strings within
|
|
16
|
+
* `max` characters pass through unchanged; longer strings are cut so the
|
|
17
|
+
* result — content plus `ellipsis` — is exactly `max` characters (or just the
|
|
18
|
+
* ellipsis, when `max` is smaller than the ellipsis itself). Replacement for
|
|
19
|
+
* `str.slice(0, n) + '…'`, which can cut an emoji in half.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```
|
|
23
|
+
* truncateCharacters('abcdefghij', 5) // 'abcd…'
|
|
24
|
+
* truncateCharacters('abcdefghij', 8, '...') // 'abcde...'
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function truncateCharacters(str: string, max: number, ellipsis?: string): string;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { firstCharacter as n, truncateCharacters as r, characterCount as t };
|