@astryx-vue/core 0.3.0 → 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/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-RAVA_cT1.js → AlertDialog-C2inDZWG.js} +5 -5
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-0wTvOo3H.js → AppShell-CumzH-8z.js} +3 -3
- 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-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-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/Carousel/index.js +1 -1
- package/dist/{Carousel-CA8zpD9v.js → Carousel-DXC22UWq.js} +4 -4
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-Bmna9EOA.js → Chat-BdJW6IX5.js} +147 -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-DUsC-j03.js → ClickableCard-ChAfiw9T.js} +9 -6
- package/dist/Code/index.js +3 -3
- package/dist/{Code-XnPuGxey.js → Code-Bg7GBdxy.js} +2 -1
- package/dist/{CodeBlock-D0BFubut.js → CodeBlock-Caaflp7C.js} +3 -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-YHsUNg3V.js → CommandPalette-C_MClfAg.js} +143 -63
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-DWLdKPGI.js → ComplexSelector-BeVQaqRf.js} +85 -20
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-Bq9b3Ti5.js → ContextMenu-C6hPYvYz.js} +297 -179
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-DT518j5E.js → DateInput-BjLdmYor.js} +567 -76
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-Bqi5tlIA.js → DateRangeInput-Br3wVEfD.js} +85 -20
- 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-CoOQVlRp.js → DropdownMenu-BdGmQVb1.js} +85 -57
- package/dist/{DropdownMenu-DEb2dSSP.js → DropdownMenu-BzQrNV9C.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--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-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-D8wyPgMK.js} +8 -6
- 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-CvtN7HnF.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-DxGz0xKA.js → MobileNavToggle-pdoJFZHx.js} +52 -17
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-Dlb7MLlW.js → MoreMenu-CFNqSRev.js} +72 -59
- 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-DqwNQFRp.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-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-BoAMdFaT.js} +774 -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-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-CPISLzp7.js +1049 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-BF8mYDxl.js → SideNav-CN2QeAtY.js} +51 -37
- 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-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.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-fecqnm7P.js → Table-BcrrylMX.js} +726 -452
- 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-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-CoHDGmsP.js → TimeField-CpAgja9D.js} +297 -40
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D2k3Ux3p.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-B5C_qY7t.js → Tokenizer-Ci3E5bvP.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-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-JP9RT87x.js → Typeahead-D4JjvjK4.js} +123 -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-BkjSF265.d.ts → index-BEZ4ezJk.d.ts} +3 -3
- package/dist/{index-DeQwYJbg.d.ts → index-BNaRK-s5.d.ts} +10 -1
- package/dist/{index-0QGtSf3r.d.ts → index-BO9TY87G.d.ts} +3 -2
- package/dist/{index-IBAInumL.d.ts → index-BQEJj72c.d.ts} +23 -10
- 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-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-xrzJC4wm.d.ts → index-CJ6ajsUC.d.ts} +1 -1
- package/dist/{index-B9e52paP.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-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
- package/dist/{index-B4OOtNP8.d.ts → index-CPtDjmcX.d.ts} +3 -3
- 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-BVKivP59.d.ts → index-CTjkJP4x.d.ts} +32 -3
- package/dist/{index-COgrQZIL.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-GI9xIV9l.d.ts → index-CikMzeab.d.ts} +2 -2
- package/dist/{index-DUaLJO7l.d.ts → index-CpNlPLBF.d.ts} +172 -126
- package/dist/{index-yT1yiiww.d.ts → index-Cs1xsHKi.d.ts} +24 -12
- package/dist/{index-Cyb9Du5Z.d.ts → index-CtTGt6Dv.d.ts} +1 -1
- package/dist/{index-Byar3h1e.d.ts → index-D05JGsT3.d.ts} +6 -3
- package/dist/{index-B3Fomy15.d.ts → index-D0_HsuC3.d.ts} +3 -3
- 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-C2nbK2AA.d.ts → index-DLAG3m9W.d.ts} +13 -3
- package/dist/{index-DVmgNb78.d.ts → index-DRJZ-v1E.d.ts} +4 -4
- package/dist/{index-CL1T2j4y.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-D41_xqjs.d.ts → index-Dr4b_oji.d.ts} +20 -13
- package/dist/{index-CqE4Bf3Q.d.ts → index-Ds201-d2.d.ts} +16 -2
- package/dist/{index-DIXAzTKL.d.ts → index-DxxudRgB.d.ts} +1 -1
- package/dist/{index-B42oE_F-.d.ts → index-IfsSCj8J.d.ts} +18 -5
- 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-BhpAUzUr.d.ts → index-unAZVFGz.d.ts} +2 -2
- package/dist/index.d.ts +80 -74
- package/dist/index.js +149 -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-CwyibrRB.d.ts → types-C5GQ2KCK.d.ts} +23 -3
- 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/{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 +18 -2
- 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/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-DIm4figq.js +0 -141
- package/dist/ButtonGroup-ySQWanDP.js +0 -125
- package/dist/DateTimeInput-A7m2O3bg.js +0 -268
- 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/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,80 +1,89 @@
|
|
|
1
1
|
import { n as useLinkComponent } from "./context-C_peZbXf.js";
|
|
2
|
-
import { t as _sfc_main$
|
|
2
|
+
import { t as _sfc_main$7 } from "./Button-ONOoHdkg.js";
|
|
3
3
|
import { t as useMediaQuery } from "./useMediaQuery-GMmgp28-.js";
|
|
4
|
-
import { n as useDismiss, t as usePositionedLayer } from "./usePositionedLayer-
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
4
|
+
import { n as useDismiss, t as usePositionedLayer } from "./usePositionedLayer-B7cvG-_v.js";
|
|
5
|
+
import { r as getFocusables } from "./focus-l8jVTcqd.js";
|
|
6
|
+
import { r as trackInteractionModality, t as getInteractionModality } from "./interactionModality-ACpTMhak.js";
|
|
7
|
+
import { s as useAstryxMessages } from "./context-DWfi56sq.js";
|
|
8
|
+
import { a as isMenuPressActivation, t as useMenuPress } from "./useMenuPress-8foxY8z4.js";
|
|
9
|
+
import { n as useOverflow } from "./useOverflow-VrwF5oek.js";
|
|
10
|
+
import { t as useTypeahead } from "./useTypeahead-BvtflkRk.js";
|
|
11
|
+
import { t as _sfc_main$8 } from "./LayerContentBoundary-CvsKxwwm.js";
|
|
7
12
|
import { t as useScrollbars } from "./useScrollbars-C2NJ6Qwq.js";
|
|
8
|
-
import { t as _sfc_main$
|
|
9
|
-
import { t as _sfc_main$
|
|
10
|
-
import { t as _sfc_main$
|
|
11
|
-
import { a as dropdownMenuContextKey, i as _sfc_main$
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
13
|
+
import { t as _sfc_main$9 } from "./BottomSheet-B4sc3F1S.js";
|
|
14
|
+
import { t as _sfc_main$10 } from "./Icon-KDnUyY7f.js";
|
|
15
|
+
import { t as _sfc_main$11 } from "./Item-DWMIjN8n.js";
|
|
16
|
+
import { a as dropdownMenuContextKey, i as _sfc_main$13, n as _sfc_main$12, o as useDropdownMenuContext, r as _sfc_main$14, t as useMenuDrillIn } from "./useMenuDrillIn-DhUnPvKs.js";
|
|
17
|
+
import { n as clampInlineSize, r as isIntrinsicInlineSize, t as LAYER_MAX_INLINE_SIZE } from "./inlineSize-BNe8wggI.js";
|
|
18
|
+
import { t as _sfc_main$15 } from "./Divider-mOZ6vIQw.js";
|
|
19
|
+
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, markRaw, mergeModels, mergeProps, nextTick, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, reactive, ref, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, unref, useAttrs, useId, useModel, useSlots, vShow, watch, withCtx, withDirectives } from "vue";
|
|
14
20
|
import "../styles/dropdown-menu.css";
|
|
15
|
-
//#region src/
|
|
16
|
-
/**
|
|
17
|
-
* Rows a menu's roving focus, typeahead, and keyboard activation all agree on.
|
|
18
|
-
*/
|
|
19
|
-
const MENU_ITEM_ROLES = /* @__PURE__ */ new Set([
|
|
20
|
-
"menuitem",
|
|
21
|
-
"menuitemradio",
|
|
22
|
-
"menuitemcheckbox"
|
|
23
|
-
]);
|
|
24
|
-
/** Rows the arrow keys may land on: enabled menu items, in DOM order. */
|
|
25
|
-
const MENU_ITEM_SELECTOR = [...MENU_ITEM_ROLES].map((role) => `[role="${role}"]:not([aria-disabled="true"])`).join(",");
|
|
26
|
-
/** Scopes item collection and key handling to one menu level. */
|
|
27
|
-
const MENU_BOUNDARY_SELECTOR = "[role=\"menu\"]";
|
|
28
|
-
/**
|
|
29
|
-
* Whether a click carries a modifier or a non-primary button: on a row that is
|
|
30
|
-
* a link the browser gives it a meaning of its own, which the row leaves alone.
|
|
31
|
-
*/
|
|
32
|
-
function isModifiedClick(event) {
|
|
33
|
-
return event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0;
|
|
34
|
-
}
|
|
21
|
+
//#region src/composables/internal/useFocusReturnVisibility.ts
|
|
35
22
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
23
|
+
* 对应原版 Astryx 的 `hooks/useFocusReturnVisibility`(内部用)。
|
|
24
|
+
*
|
|
25
|
+
* 焦点照常还回去,但用鼠标或手指关掉浮层时不画焦点环。给那些自己画焦点环、
|
|
26
|
+
* 光靠 `focusForLastInput` 不够的触发器(例如 DropdownMenu 的触发按钮、Selector)。
|
|
39
27
|
*/
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
28
|
+
function useFocusReturnVisibility() {
|
|
29
|
+
const isFocusRingSuppressed = shallowRef(false);
|
|
30
|
+
onMounted(trackInteractionModality);
|
|
31
|
+
return {
|
|
32
|
+
isFocusRingSuppressed,
|
|
33
|
+
onFocusReturnTargetFocus: () => {
|
|
34
|
+
if (getInteractionModality() === "keyboard") isFocusRingSuppressed.value = false;
|
|
35
|
+
},
|
|
36
|
+
prepareFocusReturn: () => {
|
|
37
|
+
isFocusRingSuppressed.value = getInteractionModality() === "pointer";
|
|
38
|
+
},
|
|
39
|
+
resetFocusReturn: () => {
|
|
40
|
+
isFocusRingSuppressed.value = false;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
50
43
|
}
|
|
51
44
|
//#endregion
|
|
45
|
+
//#region src/DropdownMenu/DropdownMenuBranch.vue
|
|
46
|
+
const _sfc_main$6 = /*@__PURE__*/ defineComponent({
|
|
47
|
+
name: "AstryxDropdownMenuBranch",
|
|
48
|
+
__name: "DropdownMenuBranch",
|
|
49
|
+
props: { value: {} },
|
|
50
|
+
setup(__props) {
|
|
51
|
+
provide(dropdownMenuContextKey, __props.value);
|
|
52
|
+
return (_ctx, _cache) => {
|
|
53
|
+
return renderSlot(_ctx.$slots, "default");
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/DropdownMenu/frame.ts
|
|
59
|
+
const dropdownMenuFrameKey = Symbol("astryx-dropdown-menu-frame");
|
|
60
|
+
//#endregion
|
|
52
61
|
//#region src/DropdownMenu/DropdownMenuDivider.vue
|
|
53
|
-
const _sfc_main$
|
|
62
|
+
const _sfc_main$5 = /*@__PURE__*/ defineComponent({
|
|
54
63
|
name: "AstryxDropdownMenuDivider",
|
|
55
64
|
__name: "DropdownMenuDivider",
|
|
56
65
|
setup(__props) {
|
|
57
66
|
return (_ctx, _cache) => {
|
|
58
|
-
return openBlock(), createBlock(_sfc_main$
|
|
67
|
+
return openBlock(), createBlock(_sfc_main$15, { class: "astryx-dropdown-menu-divider" });
|
|
59
68
|
};
|
|
60
69
|
}
|
|
61
70
|
});
|
|
62
71
|
//#endregion
|
|
63
72
|
//#region src/DropdownMenu/DropdownMenuSectionHeading.vue
|
|
64
|
-
const _hoisted_1$
|
|
65
|
-
const _sfc_main$
|
|
73
|
+
const _hoisted_1$4 = { class: "astryx-dropdown-menu-section-heading" };
|
|
74
|
+
const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
66
75
|
name: "AstryxDropdownMenuSectionHeading",
|
|
67
76
|
__name: "DropdownMenuSectionHeading",
|
|
68
77
|
setup(__props) {
|
|
69
78
|
return (_ctx, _cache) => {
|
|
70
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
79
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [renderSlot(_ctx.$slots, "default")]);
|
|
71
80
|
};
|
|
72
81
|
}
|
|
73
82
|
});
|
|
74
83
|
//#endregion
|
|
75
84
|
//#region src/DropdownMenu/DropdownMenuGroup.vue
|
|
76
|
-
const _hoisted_1$
|
|
77
|
-
const _sfc_main$
|
|
85
|
+
const _hoisted_1$3 = ["aria-labelledby"];
|
|
86
|
+
const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
78
87
|
name: "AstryxDropdownMenuGroup",
|
|
79
88
|
__name: "DropdownMenuGroup",
|
|
80
89
|
props: { title: {} },
|
|
@@ -87,19 +96,56 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
87
96
|
class: "astryx-dropdown-menu-group",
|
|
88
97
|
role: "group",
|
|
89
98
|
"aria-labelledby": hasTitle.value ? headingId : void 0
|
|
90
|
-
}, [hasTitle.value || _ctx.$slots.title ? (openBlock(), createBlock(_sfc_main$
|
|
99
|
+
}, [hasTitle.value || _ctx.$slots.title ? (openBlock(), createBlock(_sfc_main$4, {
|
|
91
100
|
key: 0,
|
|
92
101
|
id: headingId
|
|
93
102
|
}, {
|
|
94
103
|
default: withCtx(() => [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])]),
|
|
95
104
|
_: 3
|
|
96
|
-
})) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$
|
|
105
|
+
})) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$3);
|
|
97
106
|
};
|
|
98
107
|
}
|
|
99
108
|
});
|
|
100
109
|
//#endregion
|
|
110
|
+
//#region src/DropdownMenu/menuItemRoles.ts
|
|
111
|
+
/**
|
|
112
|
+
* Rows a menu's roving focus, typeahead, and keyboard activation all agree on.
|
|
113
|
+
*/
|
|
114
|
+
const MENU_ITEM_ROLES = /* @__PURE__ */ new Set([
|
|
115
|
+
"menuitem",
|
|
116
|
+
"menuitemradio",
|
|
117
|
+
"menuitemcheckbox"
|
|
118
|
+
]);
|
|
119
|
+
/** Rows the arrow keys may land on: enabled menu items, in DOM order. */
|
|
120
|
+
const MENU_ITEM_SELECTOR = [...MENU_ITEM_ROLES].map((role) => `[role="${role}"]:not([aria-disabled="true"])`).join(",");
|
|
121
|
+
/** Scopes item collection and key handling to one menu level. */
|
|
122
|
+
const MENU_BOUNDARY_SELECTOR = "[role=\"menu\"]";
|
|
123
|
+
/**
|
|
124
|
+
* Whether a click carries a modifier or a non-primary button: on a row that is
|
|
125
|
+
* a link the browser gives it a meaning of its own, which the row leaves alone.
|
|
126
|
+
*/
|
|
127
|
+
function isModifiedClick(event) {
|
|
128
|
+
return event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Activate a row from the keyboard: a synthesized click that carries the key's
|
|
132
|
+
* modifiers, so a ⌘-Enter on a link row opens it the way a ⌘-click would.
|
|
133
|
+
* `detail` stays 0, the mark of a non-pointer activation.
|
|
134
|
+
*/
|
|
135
|
+
function activateMenuItem(row, key) {
|
|
136
|
+
row.dispatchEvent(new MouseEvent("click", {
|
|
137
|
+
altKey: key.altKey,
|
|
138
|
+
bubbles: true,
|
|
139
|
+
cancelable: true,
|
|
140
|
+
composed: true,
|
|
141
|
+
ctrlKey: key.ctrlKey,
|
|
142
|
+
metaKey: key.metaKey,
|
|
143
|
+
shiftKey: key.shiftKey
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
101
147
|
//#region src/DropdownMenu/DropdownMenuItem.vue
|
|
102
|
-
const _hoisted_1$
|
|
148
|
+
const _hoisted_1$2 = {
|
|
103
149
|
key: 0,
|
|
104
150
|
class: "astryx-item__start"
|
|
105
151
|
};
|
|
@@ -116,7 +162,7 @@ const _hoisted_5$1 = {
|
|
|
116
162
|
key: 1,
|
|
117
163
|
class: "astryx-item__end"
|
|
118
164
|
};
|
|
119
|
-
const _sfc_main$
|
|
165
|
+
const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
120
166
|
name: "AstryxDropdownMenuItem",
|
|
121
167
|
inheritAttrs: false,
|
|
122
168
|
__name: "DropdownMenuItem",
|
|
@@ -174,8 +220,16 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
174
220
|
return;
|
|
175
221
|
}
|
|
176
222
|
if (!(isLink.value && isModifiedClick(event))) emit("click", event);
|
|
223
|
+
followPressActivation(event);
|
|
177
224
|
if (props.hasCloseOnSelect) menu?.closeMenu();
|
|
178
225
|
}
|
|
226
|
+
function followPressActivation(event) {
|
|
227
|
+
if (!isMenuPressActivation() || isModifiedClick(event) || linkRoot.value !== "a") return;
|
|
228
|
+
const href = props.href;
|
|
229
|
+
if (href == null || !(event.currentTarget instanceof HTMLAnchorElement)) return;
|
|
230
|
+
if (props.target === "_blank") window.open(href, "_blank", "noopener,noreferrer");
|
|
231
|
+
else window.location.assign(href);
|
|
232
|
+
}
|
|
179
233
|
function handleAuxClick(event) {
|
|
180
234
|
if (props.isDisabled) {
|
|
181
235
|
event.preventDefault();
|
|
@@ -199,6 +253,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
199
253
|
"data-density": density.value,
|
|
200
254
|
"data-disabled": __props.isDisabled || void 0,
|
|
201
255
|
"data-interactive": true,
|
|
256
|
+
draggable: "false",
|
|
202
257
|
"data-menu-size": menuSize.value,
|
|
203
258
|
"data-variant": __props.variant,
|
|
204
259
|
href: linkHref.value,
|
|
@@ -212,7 +267,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
212
267
|
onPointermove: handlePointerMove
|
|
213
268
|
}), {
|
|
214
269
|
default: withCtx(() => [
|
|
215
|
-
hasStart.value ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
270
|
+
hasStart.value ? (openBlock(), createElementBlock("span", _hoisted_1$2, [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(_sfc_main$10, {
|
|
216
271
|
color: iconColor.value,
|
|
217
272
|
icon: __props.icon,
|
|
218
273
|
size: "sm"
|
|
@@ -234,7 +289,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
234
289
|
"style",
|
|
235
290
|
"tabindex",
|
|
236
291
|
"target"
|
|
237
|
-
])) : (openBlock(), createBlock(_sfc_main$
|
|
292
|
+
])) : (openBlock(), createBlock(_sfc_main$11, mergeProps({ key: 1 }, unref(attrs), {
|
|
238
293
|
class: "astryx-dropdown-menu-item",
|
|
239
294
|
role: "menuitem",
|
|
240
295
|
"data-menu-size": menuSize.value,
|
|
@@ -250,7 +305,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
250
305
|
}), createSlots({ _: 2 }, [
|
|
251
306
|
hasStart.value ? {
|
|
252
307
|
name: "startContent",
|
|
253
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(_sfc_main$
|
|
308
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(_sfc_main$10, {
|
|
254
309
|
color: iconColor.value,
|
|
255
310
|
icon: __props.icon,
|
|
256
311
|
size: "sm"
|
|
@@ -291,14 +346,14 @@ function endSlot(endContent) {
|
|
|
291
346
|
}
|
|
292
347
|
function renderRadioOption(option, index) {
|
|
293
348
|
const { endContent, id, ...itemProps } = option;
|
|
294
|
-
return h(_sfc_main$
|
|
349
|
+
return h(_sfc_main$12, {
|
|
295
350
|
key: id ?? `radio-${index}`,
|
|
296
351
|
...itemProps
|
|
297
352
|
}, endSlot(endContent));
|
|
298
353
|
}
|
|
299
354
|
function renderCheckbox(item, index) {
|
|
300
355
|
const { checked, endContent, id, onChange, ...itemProps } = item;
|
|
301
|
-
return h(_sfc_main$
|
|
356
|
+
return h(_sfc_main$13, {
|
|
302
357
|
"key": id ?? `checkbox-${index}`,
|
|
303
358
|
...itemProps,
|
|
304
359
|
"modelValue": checked,
|
|
@@ -306,7 +361,7 @@ function renderCheckbox(item, index) {
|
|
|
306
361
|
}, endSlot(endContent));
|
|
307
362
|
}
|
|
308
363
|
function renderRadio(item, index) {
|
|
309
|
-
return h(_sfc_main$
|
|
364
|
+
return h(_sfc_main$14, {
|
|
310
365
|
"key": item.id ?? `radio-group-${index}`,
|
|
311
366
|
"label": item.label,
|
|
312
367
|
"modelValue": item.value,
|
|
@@ -318,7 +373,7 @@ function renderRadio(item, index) {
|
|
|
318
373
|
}
|
|
319
374
|
function renderItem(item, index) {
|
|
320
375
|
const { endContent, id, ...itemProps } = item;
|
|
321
|
-
return h(_sfc_main$
|
|
376
|
+
return h(_sfc_main$2, {
|
|
322
377
|
key: id ?? `item-${index}`,
|
|
323
378
|
...itemProps
|
|
324
379
|
}, endSlot(endContent));
|
|
@@ -333,8 +388,8 @@ function renderEntry(entry, index) {
|
|
|
333
388
|
* so both modes produce one `role="group"` named by its visible heading.
|
|
334
389
|
*/
|
|
335
390
|
function renderOption(option, index) {
|
|
336
|
-
if ("type" in option && option.type === "divider") return h(_sfc_main$
|
|
337
|
-
if ("type" in option && option.type === "section") return h(_sfc_main$
|
|
391
|
+
if ("type" in option && option.type === "divider") return h(_sfc_main$5, { key: `divider-${index}` });
|
|
392
|
+
if ("type" in option && option.type === "section") return h(_sfc_main$3, {
|
|
338
393
|
key: option.id ?? `section-${index}`,
|
|
339
394
|
title: option.title
|
|
340
395
|
}, { default: () => option.items.map((item, itemIndex) => renderEntry(item, itemIndex)) });
|
|
@@ -355,6 +410,188 @@ const DropdownMenuItems = defineComponent({
|
|
|
355
410
|
}
|
|
356
411
|
});
|
|
357
412
|
//#endregion
|
|
413
|
+
//#region src/DropdownMenu/DropdownMenuFrame.vue
|
|
414
|
+
const _hoisted_1$1 = [
|
|
415
|
+
"id",
|
|
416
|
+
"aria-labelledby",
|
|
417
|
+
"aria-label",
|
|
418
|
+
"data-overflow"
|
|
419
|
+
];
|
|
420
|
+
const _hoisted_2 = ["hidden", "inert"];
|
|
421
|
+
const _hoisted_3 = [
|
|
422
|
+
"id",
|
|
423
|
+
"aria-label",
|
|
424
|
+
"data-placement"
|
|
425
|
+
];
|
|
426
|
+
const _hoisted_4 = [
|
|
427
|
+
"id",
|
|
428
|
+
"aria-labelledby",
|
|
429
|
+
"aria-label",
|
|
430
|
+
"data-overflow",
|
|
431
|
+
"data-region-focus"
|
|
432
|
+
];
|
|
433
|
+
const _hoisted_5 = ["hidden", "inert"];
|
|
434
|
+
const _hoisted_6 = [
|
|
435
|
+
"id",
|
|
436
|
+
"aria-labelledby",
|
|
437
|
+
"aria-label",
|
|
438
|
+
"data-placement",
|
|
439
|
+
"data-overflow"
|
|
440
|
+
];
|
|
441
|
+
const _hoisted_7 = ["hidden", "inert"];
|
|
442
|
+
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
443
|
+
name: "AstryxDropdownMenuFrame",
|
|
444
|
+
__name: "DropdownMenuFrame",
|
|
445
|
+
setup(__props) {
|
|
446
|
+
const frame = inject(dropdownMenuFrameKey);
|
|
447
|
+
if (frame == null) throw new Error("DropdownMenuFrame must render inside DropdownMenu");
|
|
448
|
+
return (_ctx, _cache) => {
|
|
449
|
+
return unref(frame).isSheet ? (openBlock(), createBlock(_sfc_main$9, {
|
|
450
|
+
key: 0,
|
|
451
|
+
"is-open": unref(frame).sheetOpen,
|
|
452
|
+
"onUpdate:isOpen": _cache[3] || (_cache[3] = ($event) => unref(frame).sheetOpen = $event),
|
|
453
|
+
height: "hug",
|
|
454
|
+
label: unref(frame).sheetLabel,
|
|
455
|
+
padding: 2
|
|
456
|
+
}, {
|
|
457
|
+
default: withCtx(() => [createVNode(_sfc_main$8, null, {
|
|
458
|
+
default: withCtx(() => [createVNode(_sfc_main$6, { value: unref(frame).menuContext }, {
|
|
459
|
+
default: withCtx(() => [
|
|
460
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
461
|
+
key: 0,
|
|
462
|
+
ref: unref(frame).setHeader,
|
|
463
|
+
class: "astryx-dropdown-menu-region",
|
|
464
|
+
onKeydown: _cache[0] || (_cache[0] = (...args) => unref(frame).regions.onRegionKeydown && unref(frame).regions.onRegionKeydown(...args))
|
|
465
|
+
}, [renderSlot(_ctx.$slots, "header")], 544)) : createCommentVNode("v-if", true),
|
|
466
|
+
createElementVNode("div", mergeProps({
|
|
467
|
+
id: unref(frame).surfaceId,
|
|
468
|
+
ref: unref(frame).setSurface
|
|
469
|
+
}, unref(frame).menuBindings, {
|
|
470
|
+
"aria-labelledby": unref(frame).menuAriaLabelledBy,
|
|
471
|
+
"aria-label": unref(frame).menuAriaLabel,
|
|
472
|
+
class: ["astryx-dropdown-menu is-sheet", unref(frame).surfaceClass],
|
|
473
|
+
"data-overflow": unref(frame).hasOverflow || void 0,
|
|
474
|
+
role: "menu",
|
|
475
|
+
tabindex: "-1",
|
|
476
|
+
onKeydown: _cache[1] || (_cache[1] = (...args) => unref(frame).onSurfaceKeydown && unref(frame).onSurfaceKeydown(...args))
|
|
477
|
+
}), [createElementVNode("div", {
|
|
478
|
+
class: "astryx-dropdown-menu-tree",
|
|
479
|
+
hidden: unref(frame).isDrilled || void 0,
|
|
480
|
+
inert: unref(frame).isDrilled || void 0
|
|
481
|
+
}, [unref(frame).items != null ? (openBlock(), createBlock(unref(DropdownMenuItems), {
|
|
482
|
+
key: 0,
|
|
483
|
+
items: unref(frame).items
|
|
484
|
+
}, null, 8, ["items"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 8, _hoisted_2), createElementVNode("div", {
|
|
485
|
+
ref: unref(frame).setHost,
|
|
486
|
+
class: "astryx-dropdown-menu-tree"
|
|
487
|
+
}, null, 512)], 16, _hoisted_1$1),
|
|
488
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
489
|
+
key: 1,
|
|
490
|
+
ref: unref(frame).setFooter,
|
|
491
|
+
class: "astryx-dropdown-menu-region",
|
|
492
|
+
onKeydown: _cache[2] || (_cache[2] = (...args) => unref(frame).regions.onRegionKeydown && unref(frame).regions.onRegionKeydown(...args))
|
|
493
|
+
}, [renderSlot(_ctx.$slots, "footer")], 544)) : createCommentVNode("v-if", true)
|
|
494
|
+
]),
|
|
495
|
+
_: 3
|
|
496
|
+
}, 8, ["value"])]),
|
|
497
|
+
_: 3
|
|
498
|
+
})]),
|
|
499
|
+
_: 3
|
|
500
|
+
}, 8, ["is-open", "label"])) : (openBlock(), createBlock(Teleport, {
|
|
501
|
+
key: 1,
|
|
502
|
+
to: unref(frame).teleportTarget
|
|
503
|
+
}, [createVNode(Transition, { name: "astryx-dropdown-menu" }, {
|
|
504
|
+
default: withCtx(() => [unref(frame).hasRegions ? withDirectives((openBlock(), createElementBlock("div", {
|
|
505
|
+
key: 0,
|
|
506
|
+
id: unref(frame).dialogId,
|
|
507
|
+
ref: unref(frame).setPopover,
|
|
508
|
+
class: "astryx-dropdown-menu-popover",
|
|
509
|
+
role: "dialog",
|
|
510
|
+
"aria-modal": "true",
|
|
511
|
+
"aria-label": unref(frame).dialogLabel,
|
|
512
|
+
"data-placement": unref(frame).placement,
|
|
513
|
+
style: normalizeStyle(unref(frame).surfaceStyle)
|
|
514
|
+
}, [createVNode(_sfc_main$8, null, {
|
|
515
|
+
default: withCtx(() => [createVNode(_sfc_main$6, { value: unref(frame).menuContext }, {
|
|
516
|
+
default: withCtx(() => [
|
|
517
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
518
|
+
key: 0,
|
|
519
|
+
ref: unref(frame).setHeader,
|
|
520
|
+
class: "astryx-dropdown-menu-region",
|
|
521
|
+
onKeydown: _cache[4] || (_cache[4] = (...args) => unref(frame).regions.onRegionKeydown && unref(frame).regions.onRegionKeydown(...args))
|
|
522
|
+
}, [renderSlot(_ctx.$slots, "header")], 544)) : createCommentVNode("v-if", true),
|
|
523
|
+
createElementVNode("div", mergeProps({
|
|
524
|
+
id: unref(frame).surfaceId,
|
|
525
|
+
ref: unref(frame).setSurface
|
|
526
|
+
}, unref(frame).menuBindings, {
|
|
527
|
+
"aria-labelledby": unref(frame).menuAriaLabelledBy,
|
|
528
|
+
"aria-label": unref(frame).menuAriaLabel,
|
|
529
|
+
class: ["astryx-dropdown-menu is-in-frame", unref(frame).surfaceClass],
|
|
530
|
+
"data-overflow": unref(frame).hasOverflow || void 0,
|
|
531
|
+
"data-region-focus": unref(frame).regionFocus || void 0,
|
|
532
|
+
role: "menu",
|
|
533
|
+
tabindex: "0",
|
|
534
|
+
onFocus: _cache[5] || (_cache[5] = (...args) => unref(frame).onSurfaceFocus && unref(frame).onSurfaceFocus(...args)),
|
|
535
|
+
onKeydown: _cache[6] || (_cache[6] = (...args) => unref(frame).onSurfaceKeydown && unref(frame).onSurfaceKeydown(...args))
|
|
536
|
+
}), [createElementVNode("div", {
|
|
537
|
+
class: "astryx-dropdown-menu-tree",
|
|
538
|
+
hidden: unref(frame).isDrilled || void 0,
|
|
539
|
+
inert: unref(frame).isDrilled || void 0
|
|
540
|
+
}, [unref(frame).items != null ? (openBlock(), createBlock(unref(DropdownMenuItems), {
|
|
541
|
+
key: 0,
|
|
542
|
+
items: unref(frame).items
|
|
543
|
+
}, null, 8, ["items"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 8, _hoisted_5), createElementVNode("div", {
|
|
544
|
+
ref: unref(frame).setHost,
|
|
545
|
+
class: "astryx-dropdown-menu-tree"
|
|
546
|
+
}, null, 512)], 16, _hoisted_4),
|
|
547
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
548
|
+
key: 1,
|
|
549
|
+
ref: unref(frame).setFooter,
|
|
550
|
+
class: "astryx-dropdown-menu-region",
|
|
551
|
+
onKeydown: _cache[7] || (_cache[7] = (...args) => unref(frame).regions.onRegionKeydown && unref(frame).regions.onRegionKeydown(...args))
|
|
552
|
+
}, [renderSlot(_ctx.$slots, "footer")], 544)) : createCommentVNode("v-if", true)
|
|
553
|
+
]),
|
|
554
|
+
_: 3
|
|
555
|
+
}, 8, ["value"])]),
|
|
556
|
+
_: 3
|
|
557
|
+
})], 12, _hoisted_3)), [[vShow, unref(frame).isOpen]]) : withDirectives((openBlock(), createElementBlock("div", mergeProps({
|
|
558
|
+
key: 1,
|
|
559
|
+
id: unref(frame).surfaceId,
|
|
560
|
+
ref: unref(frame).setSurface
|
|
561
|
+
}, unref(frame).menuBindings, {
|
|
562
|
+
"aria-labelledby": unref(frame).menuAriaLabelledBy,
|
|
563
|
+
"aria-label": unref(frame).menuAriaLabel,
|
|
564
|
+
class: ["astryx-dropdown-menu", unref(frame).surfaceClass],
|
|
565
|
+
"data-placement": unref(frame).placement,
|
|
566
|
+
"data-overflow": unref(frame).hasOverflow || void 0,
|
|
567
|
+
role: "menu",
|
|
568
|
+
style: unref(frame).surfaceStyle,
|
|
569
|
+
tabindex: "-1",
|
|
570
|
+
onFocus: _cache[8] || (_cache[8] = (...args) => unref(frame).onSurfaceFocus && unref(frame).onSurfaceFocus(...args)),
|
|
571
|
+
onKeydown: _cache[9] || (_cache[9] = (...args) => unref(frame).onSurfaceKeydown && unref(frame).onSurfaceKeydown(...args))
|
|
572
|
+
}), [createVNode(_sfc_main$8, null, {
|
|
573
|
+
default: withCtx(() => [createVNode(_sfc_main$6, { value: unref(frame).menuContext }, {
|
|
574
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
575
|
+
class: "astryx-dropdown-menu-tree",
|
|
576
|
+
hidden: unref(frame).isDrilled || void 0,
|
|
577
|
+
inert: unref(frame).isDrilled || void 0
|
|
578
|
+
}, [unref(frame).items != null ? (openBlock(), createBlock(unref(DropdownMenuItems), {
|
|
579
|
+
key: 0,
|
|
580
|
+
items: unref(frame).items
|
|
581
|
+
}, null, 8, ["items"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 8, _hoisted_7), createElementVNode("div", {
|
|
582
|
+
ref: unref(frame).setHost,
|
|
583
|
+
class: "astryx-dropdown-menu-tree"
|
|
584
|
+
}, null, 512)]),
|
|
585
|
+
_: 3
|
|
586
|
+
}, 8, ["value"])]),
|
|
587
|
+
_: 3
|
|
588
|
+
})], 16, _hoisted_6)), [[vShow, unref(frame).isOpen]])]),
|
|
589
|
+
_: 3
|
|
590
|
+
})], 8, ["to"]));
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
//#endregion
|
|
358
595
|
//#region src/DropdownMenu/useMenuFocus.ts
|
|
359
596
|
function isDisabled(el) {
|
|
360
597
|
return el.getAttribute("aria-disabled") === "true" || el.hasAttribute("disabled");
|
|
@@ -525,11 +762,45 @@ function focusControl(element) {
|
|
|
525
762
|
element.focus();
|
|
526
763
|
return element.ownerDocument.activeElement === element;
|
|
527
764
|
}
|
|
765
|
+
function radioGroupKey(element) {
|
|
766
|
+
if (!(element instanceof HTMLInputElement) || element.getAttribute("type") !== "radio" || element.name === "") return null;
|
|
767
|
+
return `${element.form?.id ?? ""}\u0000${element.name}`;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* A named radio group is one Tab stop: the focused radio, else the checked
|
|
771
|
+
* one, else the first radio going forward or the last going backward.
|
|
772
|
+
*/
|
|
773
|
+
function collapseRadioGroups(elements, active, isBackward) {
|
|
774
|
+
const groups = /* @__PURE__ */ new Map();
|
|
775
|
+
for (const element of elements) {
|
|
776
|
+
const key = radioGroupKey(element);
|
|
777
|
+
if (key == null) continue;
|
|
778
|
+
const members = groups.get(key) ?? [];
|
|
779
|
+
members.push(element);
|
|
780
|
+
groups.set(key, members);
|
|
781
|
+
}
|
|
782
|
+
const placed = /* @__PURE__ */ new Set();
|
|
783
|
+
const result = [];
|
|
784
|
+
for (const element of elements) {
|
|
785
|
+
const key = radioGroupKey(element);
|
|
786
|
+
if (key == null) {
|
|
787
|
+
result.push(element);
|
|
788
|
+
continue;
|
|
789
|
+
}
|
|
790
|
+
if (placed.has(key)) continue;
|
|
791
|
+
placed.add(key);
|
|
792
|
+
const members = groups.get(key) ?? [];
|
|
793
|
+
const stop = members.find((radio) => radio === active) ?? members.find((radio) => radio.checked) ?? (isBackward ? members[members.length - 1] : members[0]);
|
|
794
|
+
if (stop != null) result.push(stop);
|
|
795
|
+
}
|
|
796
|
+
return result;
|
|
797
|
+
}
|
|
528
798
|
/**
|
|
529
799
|
* Keyboard between a menu and the header and footer beside it.
|
|
530
800
|
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
801
|
+
* With either region the popover is a dialog: Tab cycles the header, the menu
|
|
802
|
+
* as one stop, and the footer, and wraps at both ends. A row counts as the
|
|
803
|
+
* menu's stop, so Shift+Tab from a row lands on the header.
|
|
533
804
|
*/
|
|
534
805
|
function useMenuRegions(options) {
|
|
535
806
|
function focusRegion(direction) {
|
|
@@ -540,68 +811,50 @@ function useMenuRegions(options) {
|
|
|
540
811
|
}
|
|
541
812
|
return true;
|
|
542
813
|
}
|
|
543
|
-
function
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
814
|
+
function moveDialogTab(event, isFromFlyout = false) {
|
|
815
|
+
const menu = options.menu.value;
|
|
816
|
+
if (menu == null || !options.hasRegions.value) return;
|
|
817
|
+
event.preventDefault();
|
|
818
|
+
event.stopPropagation();
|
|
819
|
+
const active = menu.ownerDocument.activeElement;
|
|
820
|
+
const cycle = collapseRadioGroups([
|
|
821
|
+
...tabbablesIn(options.header.value),
|
|
822
|
+
menu,
|
|
823
|
+
...tabbablesIn(options.footer.value)
|
|
824
|
+
], active, event.shiftKey);
|
|
825
|
+
if (cycle.length <= 1) {
|
|
826
|
+
if (isFromFlyout) menu.focus();
|
|
827
|
+
return;
|
|
554
828
|
}
|
|
555
|
-
|
|
829
|
+
const menuIndex = cycle.indexOf(menu);
|
|
830
|
+
let index = active instanceof Node && menu.contains(active) ? menuIndex : cycle.findIndex((element) => element === active || element.contains(active));
|
|
831
|
+
if (index < 0) index = menuIndex;
|
|
832
|
+
const step = event.shiftKey ? -1 : 1;
|
|
833
|
+
const next = cycle[(index + step + cycle.length) % cycle.length];
|
|
834
|
+
if (!focusControl(next)) menu.focus();
|
|
556
835
|
}
|
|
557
836
|
function onRegionKeydown(event) {
|
|
558
|
-
if (event.key
|
|
559
|
-
const region = event.currentTarget;
|
|
560
|
-
if (!(region instanceof HTMLElement)) return;
|
|
561
|
-
const tabbables = tabbablesIn(region);
|
|
562
|
-
const exit = region === options.header.value ? event.shiftKey ? tabbables[0] : void 0 : event.shiftKey ? void 0 : tabbables[tabbables.length - 1];
|
|
563
|
-
if (exit != null && exit === region.ownerDocument.activeElement) options.closeMenu();
|
|
837
|
+
if (event.key === "Tab") moveDialogTab(event);
|
|
564
838
|
}
|
|
565
839
|
return {
|
|
566
840
|
focusRegion,
|
|
567
|
-
|
|
841
|
+
moveDialogTab,
|
|
568
842
|
onRegionKeydown
|
|
569
843
|
};
|
|
570
844
|
}
|
|
571
845
|
//#endregion
|
|
572
846
|
//#region src/DropdownMenu/DropdownMenu.vue
|
|
573
847
|
const _hoisted_1 = ["data-open"];
|
|
574
|
-
const _hoisted_2 = [
|
|
575
|
-
"id",
|
|
576
|
-
"aria-labelledby",
|
|
577
|
-
"aria-label"
|
|
578
|
-
];
|
|
579
|
-
const _hoisted_3 = ["hidden", "inert"];
|
|
580
|
-
const _hoisted_4 = ["data-placement"];
|
|
581
|
-
const _hoisted_5 = [
|
|
582
|
-
"id",
|
|
583
|
-
"aria-labelledby",
|
|
584
|
-
"aria-label",
|
|
585
|
-
"data-region-focus"
|
|
586
|
-
];
|
|
587
|
-
const _hoisted_6 = ["hidden", "inert"];
|
|
588
|
-
const _hoisted_7 = [
|
|
589
|
-
"id",
|
|
590
|
-
"aria-labelledby",
|
|
591
|
-
"aria-label",
|
|
592
|
-
"data-placement"
|
|
593
|
-
];
|
|
594
|
-
const _hoisted_8 = ["hidden", "inert"];
|
|
595
848
|
const GAP = 4;
|
|
596
849
|
const DEFAULT_MAX_WIDTH = 320;
|
|
597
850
|
const DEFAULT_MAX_HEIGHT = "300px";
|
|
598
|
-
const COMPACT_TOUCH_QUERY = "(max-width:
|
|
851
|
+
const COMPACT_TOUCH_QUERY = "(max-width: 768px) and (pointer: coarse)";
|
|
599
852
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
600
853
|
name: "AstryxDropdownMenu",
|
|
601
854
|
inheritAttrs: false,
|
|
602
855
|
__name: "DropdownMenu",
|
|
603
856
|
props: /*@__PURE__*/ mergeModels({
|
|
604
|
-
button: {
|
|
857
|
+
button: {},
|
|
605
858
|
items: {},
|
|
606
859
|
isMenuOpen: { type: Boolean },
|
|
607
860
|
menuWidth: {},
|
|
@@ -630,7 +883,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
630
883
|
const emit = __emit;
|
|
631
884
|
const attrs = useAttrs();
|
|
632
885
|
const slots = useSlots();
|
|
633
|
-
const
|
|
886
|
+
const messages = useAstryxMessages();
|
|
887
|
+
const focusReturn = useFocusReturnVisibility();
|
|
634
888
|
const open = useModel(__props, "isMenuOpen");
|
|
635
889
|
const localIsOpen = shallowRef(false);
|
|
636
890
|
const isOpen = computed(() => open.value ?? localIsOpen.value);
|
|
@@ -661,8 +915,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
661
915
|
if (!open) closeMenu();
|
|
662
916
|
}
|
|
663
917
|
});
|
|
664
|
-
const buttonProps = computed(() =>
|
|
665
|
-
|
|
918
|
+
const buttonProps = computed(() => ({
|
|
919
|
+
label: messages.value.dropdownMenu.label,
|
|
920
|
+
...props.button
|
|
921
|
+
}));
|
|
922
|
+
const sheetLabel = computed(() => typeof buttonProps.value.label === "string" ? buttonProps.value.label : messages.value.dropdownMenu.label);
|
|
666
923
|
const menuSize = computed(() => buttonProps.value.size ?? "md");
|
|
667
924
|
const isIconOnly = computed(() => buttonProps.value.isIconOnly === true);
|
|
668
925
|
const hasChevron = computed(() => props.hasChevron && !isIconOnly.value);
|
|
@@ -681,6 +938,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
681
938
|
if (slots.trigger != null) return void 0;
|
|
682
939
|
return typeof buttonProps.value.label === "string" ? buttonProps.value.label : void 0;
|
|
683
940
|
});
|
|
941
|
+
const dialogLabel = computed(() => menuLabel.value ?? messages.value.dropdownMenu.label);
|
|
942
|
+
const dialogId = `${menuId}-dialog`;
|
|
943
|
+
const popupKind = computed(() => hasRegions.value ? "dialog" : "menu");
|
|
944
|
+
const controlsId = computed(() => hasRegions.value ? dialogId : surfaceId.value);
|
|
945
|
+
const focusRing = computed(() => focusReturn.isFocusRingSuppressed.value ? "off" : void 0);
|
|
946
|
+
const hasOverflow = useOverflow(surfaceRef, isOpen);
|
|
684
947
|
const menuAriaLabelledBy = computed(() => {
|
|
685
948
|
const explicit = attrs["aria-labelledby"];
|
|
686
949
|
if (typeof explicit === "string") return explicit;
|
|
@@ -694,13 +957,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
694
957
|
"aria-label",
|
|
695
958
|
"aria-labelledby"
|
|
696
959
|
].includes(key))));
|
|
697
|
-
/**
|
|
698
|
-
* The layer tracks its own open state so a menu that mounts already open still
|
|
699
|
-
* gets one open transition: the layer's own watcher only reacts to a change,
|
|
700
|
-
* and a controlled menu renders open from the first frame.
|
|
701
|
-
*/
|
|
702
960
|
const layerIsOpen = ref(false);
|
|
703
|
-
const { position, detach: detachPosition } = usePositionedLayer({
|
|
961
|
+
const { position, teleportTarget, detach: detachPosition } = usePositionedLayer({
|
|
704
962
|
anchor: anchorRef,
|
|
705
963
|
layer: positionedEl,
|
|
706
964
|
isOpen: layerIsOpen,
|
|
@@ -717,15 +975,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
717
975
|
"top": `${position.value.top}px`,
|
|
718
976
|
"left": `${position.value.left}px`,
|
|
719
977
|
"--_dropdown-menu-max-block": `min(${props.menuMaxHeight == null ? DEFAULT_MAX_HEIGHT : `${props.menuMaxHeight}px`}, calc(100dvh - 16px))`,
|
|
720
|
-
"maxWidth": props.menuWidth == null ?
|
|
978
|
+
"maxWidth": props.menuWidth == null ? clampInlineSize(`${DEFAULT_MAX_WIDTH}px`) : LAYER_MAX_INLINE_SIZE
|
|
721
979
|
};
|
|
722
980
|
if (props.menuWidth == null) {
|
|
723
981
|
style.minWidth = `min(${anchorWidth.value}px, ${DEFAULT_MAX_WIDTH}px)`;
|
|
724
982
|
return style;
|
|
725
983
|
}
|
|
726
984
|
const width = (typeof props.menuWidth === "number" ? `${props.menuWidth}px` : props.menuWidth).trim();
|
|
727
|
-
if (
|
|
728
|
-
else style.minWidth =
|
|
985
|
+
if (isIntrinsicInlineSize(width)) style.width = width;
|
|
986
|
+
else style.minWidth = clampInlineSize(width);
|
|
729
987
|
return style;
|
|
730
988
|
});
|
|
731
989
|
const focusNav = useMenuFocus({ list: surfaceRef });
|
|
@@ -769,17 +1027,40 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
769
1027
|
}
|
|
770
1028
|
regionFocus.value = hasRegions.value && !suppressRegionRing;
|
|
771
1029
|
}
|
|
1030
|
+
function assignElement(target, element) {
|
|
1031
|
+
target.value = element instanceof HTMLElement ? element : null;
|
|
1032
|
+
}
|
|
772
1033
|
function assignHost(element) {
|
|
773
1034
|
host.value = element instanceof HTMLElement ? element : null;
|
|
774
1035
|
}
|
|
1036
|
+
function isTriggerDisabled() {
|
|
1037
|
+
return getTriggerControl()?.matches(":disabled, [aria-disabled=\"true\"]") === true;
|
|
1038
|
+
}
|
|
775
1039
|
function openMenu(modality) {
|
|
776
|
-
if (isOpen.value) return;
|
|
1040
|
+
if (isTriggerDisabled() || isOpen.value) return false;
|
|
1041
|
+
focusReturn.resetFocusReturn();
|
|
777
1042
|
openModality = modality;
|
|
778
1043
|
shouldFocusOnOpen.value = true;
|
|
779
1044
|
emitOpenChange(true);
|
|
1045
|
+
return true;
|
|
780
1046
|
}
|
|
1047
|
+
const press = useMenuPress({
|
|
1048
|
+
menuRef: surfaceRef,
|
|
1049
|
+
triggerRef: anchorRef,
|
|
1050
|
+
isEnabled: () => !isSheet.value && !isTriggerDisabled(),
|
|
1051
|
+
onTriggerPress: () => {
|
|
1052
|
+
if (isOpen.value) {
|
|
1053
|
+
closeMenu();
|
|
1054
|
+
return false;
|
|
1055
|
+
}
|
|
1056
|
+
return openMenu("pointer");
|
|
1057
|
+
},
|
|
1058
|
+
onDismiss: () => closeMenu()
|
|
1059
|
+
});
|
|
781
1060
|
function closeMenu() {
|
|
782
1061
|
if (!isOpen.value) return;
|
|
1062
|
+
focusReturn.prepareFocusReturn();
|
|
1063
|
+
press.cancel();
|
|
783
1064
|
emitOpenChange(false);
|
|
784
1065
|
}
|
|
785
1066
|
function getTriggerControl() {
|
|
@@ -804,7 +1085,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
804
1085
|
typeahead.reset();
|
|
805
1086
|
const active = typeof document !== "undefined" ? document.activeElement : null;
|
|
806
1087
|
const surface = surfaceRef.value;
|
|
807
|
-
if (active == null || active === (typeof document !== "undefined" ? document.body : null) || surface != null && surface.contains(active))
|
|
1088
|
+
if (active == null || active === (typeof document !== "undefined" ? document.body : null) || surface != null && surface.contains(active)) {
|
|
1089
|
+
await nextTick();
|
|
1090
|
+
getTriggerControl()?.focus({ preventScroll: true });
|
|
1091
|
+
}
|
|
808
1092
|
});
|
|
809
1093
|
const regions = useMenuRegions({
|
|
810
1094
|
closeMenu,
|
|
@@ -815,10 +1099,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
815
1099
|
});
|
|
816
1100
|
function onSurfaceKeydown(event) {
|
|
817
1101
|
if (!focusNav.ownsEvent(event)) {
|
|
818
|
-
if (event.key === "Tab" && hasRegions.value)
|
|
819
|
-
event.preventDefault();
|
|
820
|
-
regions.focusRegion(event.shiftKey ? "previous" : "next");
|
|
821
|
-
}
|
|
1102
|
+
if (event.key === "Tab" && hasRegions.value) regions.moveDialogTab(event, true);
|
|
822
1103
|
return;
|
|
823
1104
|
}
|
|
824
1105
|
if (event.key === "Enter" || event.key === " ") {
|
|
@@ -828,9 +1109,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
828
1109
|
if (focused instanceof HTMLElement && MENU_ITEM_ROLES.has(focused.getAttribute("role") ?? "")) activateMenuItem(focused, event);
|
|
829
1110
|
return;
|
|
830
1111
|
}
|
|
831
|
-
if (regions.onMenuTab(event)) return;
|
|
832
1112
|
if (event.key === "Tab") {
|
|
833
|
-
|
|
1113
|
+
if (hasRegions.value) regions.moveDialogTab(event);
|
|
1114
|
+
else closeMenu();
|
|
834
1115
|
return;
|
|
835
1116
|
}
|
|
836
1117
|
if (typeahead.onKeyDown(event)) {
|
|
@@ -840,7 +1121,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
840
1121
|
focusNav.handleKeyDown(event);
|
|
841
1122
|
}
|
|
842
1123
|
function onTriggerClick(event) {
|
|
843
|
-
if (armedTriggerClickGuard) {
|
|
1124
|
+
if (armedTriggerClickGuard || press.isTriggerClickFromPress()) {
|
|
844
1125
|
armedTriggerClickGuard = false;
|
|
845
1126
|
return;
|
|
846
1127
|
}
|
|
@@ -874,21 +1155,60 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
874
1155
|
}
|
|
875
1156
|
const triggerProps = computed(() => ({
|
|
876
1157
|
"id": triggerId,
|
|
877
|
-
"aria-haspopup":
|
|
1158
|
+
"aria-haspopup": popupKind.value,
|
|
878
1159
|
"aria-expanded": isOpen.value,
|
|
879
|
-
"aria-controls":
|
|
1160
|
+
"aria-controls": controlsId.value,
|
|
1161
|
+
"data-astryx-focus-ring": focusRing.value,
|
|
880
1162
|
"onClick": onTriggerClick,
|
|
881
|
-
"onKeyDown": onTriggerKeydown
|
|
1163
|
+
"onKeyDown": onTriggerKeydown,
|
|
1164
|
+
"onFocus": focusReturn.onFocusReturnTargetFocus
|
|
882
1165
|
}));
|
|
883
|
-
|
|
1166
|
+
const menuContext = markRaw({
|
|
884
1167
|
closeMenu,
|
|
885
1168
|
drillIn,
|
|
886
1169
|
focusRegion: regions.focusRegion,
|
|
1170
|
+
moveDialogTab: regions.moveDialogTab,
|
|
887
1171
|
hasRegions,
|
|
888
1172
|
isOpen,
|
|
889
1173
|
menuLabel,
|
|
890
1174
|
menuSize
|
|
891
1175
|
});
|
|
1176
|
+
const paintedStyle = computed(() => [surfaceStyle.value, attrs.style]);
|
|
1177
|
+
const menuBindings = computed(() => ({
|
|
1178
|
+
...forwardedAttrs.value,
|
|
1179
|
+
...press.menuProps
|
|
1180
|
+
}));
|
|
1181
|
+
provide(dropdownMenuFrameKey, reactive({
|
|
1182
|
+
isSheet,
|
|
1183
|
+
sheetOpen,
|
|
1184
|
+
sheetLabel,
|
|
1185
|
+
hasRegions,
|
|
1186
|
+
isOpen,
|
|
1187
|
+
isDrilled,
|
|
1188
|
+
hasOverflow,
|
|
1189
|
+
regionFocus,
|
|
1190
|
+
surfaceId,
|
|
1191
|
+
dialogId,
|
|
1192
|
+
dialogLabel,
|
|
1193
|
+
menuAriaLabel,
|
|
1194
|
+
menuAriaLabelledBy,
|
|
1195
|
+
forwardedAttrs,
|
|
1196
|
+
menuBindings,
|
|
1197
|
+
surfaceClass: computed(() => attrs.class),
|
|
1198
|
+
surfaceStyle: paintedStyle,
|
|
1199
|
+
placement: computed(() => position.value.placement),
|
|
1200
|
+
teleportTarget,
|
|
1201
|
+
items: computed(() => props.items),
|
|
1202
|
+
menuContext,
|
|
1203
|
+
regions,
|
|
1204
|
+
setSurface: (element) => assignElement(surfaceRef, element),
|
|
1205
|
+
setPopover: (element) => assignElement(popoverRef, element),
|
|
1206
|
+
setHeader: (element) => assignElement(headerRef, element),
|
|
1207
|
+
setFooter: (element) => assignElement(footerRef, element),
|
|
1208
|
+
setHost: assignHost,
|
|
1209
|
+
onSurfaceKeydown,
|
|
1210
|
+
onSurfaceFocus
|
|
1211
|
+
}));
|
|
892
1212
|
onMounted(() => {
|
|
893
1213
|
if (!isOpen.value) return;
|
|
894
1214
|
layerIsOpen.value = true;
|
|
@@ -902,18 +1222,23 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
902
1222
|
ref_key: "anchorRef",
|
|
903
1223
|
ref: anchorRef,
|
|
904
1224
|
class: "astryx-dropdown-menu-trigger",
|
|
905
|
-
"data-open": isOpen.value ? "true" : void 0
|
|
906
|
-
|
|
1225
|
+
"data-open": isOpen.value ? "true" : void 0,
|
|
1226
|
+
onContextmenu: _cache[0] || (_cache[0] = (...args) => unref(press).triggerProps.onContextmenu && unref(press).triggerProps.onContextmenu(...args)),
|
|
1227
|
+
onFocusin: _cache[1] || (_cache[1] = (...args) => unref(focusReturn).onFocusReturnTargetFocus && unref(focusReturn).onFocusReturnTargetFocus(...args)),
|
|
1228
|
+
onPointerdown: _cache[2] || (_cache[2] = (...args) => unref(press).triggerProps.onPointerdown && unref(press).triggerProps.onPointerdown(...args))
|
|
1229
|
+
}, [unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", normalizeProps(guardReactiveProps(triggerProps.value)), void 0, void 0, 0) : (openBlock(), createBlock(_sfc_main$7, mergeProps({ key: 1 }, buttonProps.value, {
|
|
907
1230
|
id: triggerId,
|
|
908
|
-
"aria-controls":
|
|
1231
|
+
"aria-controls": controlsId.value,
|
|
909
1232
|
"aria-expanded": isOpen.value,
|
|
910
|
-
"aria-haspopup":
|
|
1233
|
+
"aria-haspopup": popupKind.value,
|
|
1234
|
+
"data-astryx-focus-ring": focusRing.value,
|
|
911
1235
|
tooltip: isOpen.value ? void 0 : buttonProps.value.tooltip,
|
|
912
1236
|
onClick: onTriggerClick,
|
|
1237
|
+
onFocus: unref(focusReturn).onFocusReturnTargetFocus,
|
|
913
1238
|
onKeydown: onTriggerKeydown
|
|
914
1239
|
}), createSlots({ _: 2 }, [hasChevron.value ? {
|
|
915
1240
|
name: "end",
|
|
916
|
-
fn: withCtx(() => [createVNode(_sfc_main$
|
|
1241
|
+
fn: withCtx(() => [createVNode(_sfc_main$10, {
|
|
917
1242
|
color: "inherit",
|
|
918
1243
|
icon: "chevronDown",
|
|
919
1244
|
size: "sm"
|
|
@@ -922,134 +1247,24 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
922
1247
|
} : void 0]), 1040, [
|
|
923
1248
|
"aria-controls",
|
|
924
1249
|
"aria-expanded",
|
|
925
|
-
"
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
"
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
}, [renderSlot(_ctx.$slots, "header")], 544)) : createCommentVNode("v-if", true),
|
|
942
|
-
createElementVNode("div", mergeProps({
|
|
943
|
-
id: surfaceId.value,
|
|
944
|
-
ref_key: "surfaceRef",
|
|
945
|
-
ref: surfaceRef
|
|
946
|
-
}, forwardedAttrs.value, {
|
|
947
|
-
"aria-labelledby": menuAriaLabelledBy.value,
|
|
948
|
-
"aria-label": menuAriaLabel.value,
|
|
949
|
-
class: ["astryx-dropdown-menu is-sheet", unref(attrs).class],
|
|
950
|
-
role: "menu",
|
|
951
|
-
tabindex: "-1",
|
|
952
|
-
onKeydown: onSurfaceKeydown
|
|
953
|
-
}), [createElementVNode("div", {
|
|
954
|
-
class: "astryx-dropdown-menu-tree",
|
|
955
|
-
hidden: unref(isDrilled) || void 0,
|
|
956
|
-
inert: unref(isDrilled) || void 0
|
|
957
|
-
}, [__props.items != null ? (openBlock(), createBlock(unref(DropdownMenuItems), {
|
|
958
|
-
key: 0,
|
|
959
|
-
items: __props.items
|
|
960
|
-
}, null, 8, ["items"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 8, _hoisted_3), createElementVNode("div", {
|
|
961
|
-
ref: assignHost,
|
|
962
|
-
class: "astryx-dropdown-menu-tree"
|
|
963
|
-
}, null, 512)], 16, _hoisted_2),
|
|
964
|
-
unref(slots).footer ? (openBlock(), createElementBlock("div", {
|
|
965
|
-
key: 1,
|
|
966
|
-
ref_key: "footerRef",
|
|
967
|
-
ref: footerRef,
|
|
968
|
-
class: "astryx-dropdown-menu-region",
|
|
969
|
-
onKeydown: _cache[1] || (_cache[1] = (...args) => unref(regions).onRegionKeydown && unref(regions).onRegionKeydown(...args))
|
|
970
|
-
}, [renderSlot(_ctx.$slots, "footer")], 544)) : createCommentVNode("v-if", true)
|
|
971
|
-
]),
|
|
972
|
-
_: 3
|
|
973
|
-
}, 8, ["is-open", "label"])) : (openBlock(), createBlock(Teleport, {
|
|
974
|
-
key: 1,
|
|
975
|
-
to: "body"
|
|
976
|
-
}, [createVNode(Transition, { name: "astryx-dropdown-menu" }, {
|
|
977
|
-
default: withCtx(() => [hasRegions.value ? withDirectives((openBlock(), createElementBlock("div", {
|
|
978
|
-
key: 0,
|
|
979
|
-
ref_key: "popoverRef",
|
|
980
|
-
ref: popoverRef,
|
|
981
|
-
class: "astryx-dropdown-menu-popover",
|
|
982
|
-
"data-placement": unref(position).placement,
|
|
983
|
-
style: normalizeStyle([surfaceStyle.value, unref(attrs).style])
|
|
984
|
-
}, [
|
|
985
|
-
unref(slots).header ? (openBlock(), createElementBlock("div", {
|
|
986
|
-
key: 0,
|
|
987
|
-
ref_key: "headerRef",
|
|
988
|
-
ref: headerRef,
|
|
989
|
-
class: "astryx-dropdown-menu-region",
|
|
990
|
-
onKeydown: _cache[3] || (_cache[3] = (...args) => unref(regions).onRegionKeydown && unref(regions).onRegionKeydown(...args))
|
|
991
|
-
}, [renderSlot(_ctx.$slots, "header")], 544)) : createCommentVNode("v-if", true),
|
|
992
|
-
createElementVNode("div", mergeProps({
|
|
993
|
-
id: surfaceId.value,
|
|
994
|
-
ref_key: "surfaceRef",
|
|
995
|
-
ref: surfaceRef
|
|
996
|
-
}, forwardedAttrs.value, {
|
|
997
|
-
"aria-labelledby": menuAriaLabelledBy.value,
|
|
998
|
-
"aria-label": menuAriaLabel.value,
|
|
999
|
-
class: ["astryx-dropdown-menu is-in-frame", unref(attrs).class],
|
|
1000
|
-
"data-region-focus": regionFocus.value || void 0,
|
|
1001
|
-
role: "menu",
|
|
1002
|
-
tabindex: "0",
|
|
1003
|
-
onFocus: onSurfaceFocus,
|
|
1004
|
-
onKeydown: onSurfaceKeydown
|
|
1005
|
-
}), [createElementVNode("div", {
|
|
1006
|
-
class: "astryx-dropdown-menu-tree",
|
|
1007
|
-
hidden: unref(isDrilled) || void 0,
|
|
1008
|
-
inert: unref(isDrilled) || void 0
|
|
1009
|
-
}, [__props.items != null ? (openBlock(), createBlock(unref(DropdownMenuItems), {
|
|
1010
|
-
key: 0,
|
|
1011
|
-
items: __props.items
|
|
1012
|
-
}, null, 8, ["items"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 8, _hoisted_6), createElementVNode("div", {
|
|
1013
|
-
ref: assignHost,
|
|
1014
|
-
class: "astryx-dropdown-menu-tree"
|
|
1015
|
-
}, null, 512)], 16, _hoisted_5),
|
|
1016
|
-
unref(slots).footer ? (openBlock(), createElementBlock("div", {
|
|
1017
|
-
key: 1,
|
|
1018
|
-
ref_key: "footerRef",
|
|
1019
|
-
ref: footerRef,
|
|
1020
|
-
class: "astryx-dropdown-menu-region",
|
|
1021
|
-
onKeydown: _cache[4] || (_cache[4] = (...args) => unref(regions).onRegionKeydown && unref(regions).onRegionKeydown(...args))
|
|
1022
|
-
}, [renderSlot(_ctx.$slots, "footer")], 544)) : createCommentVNode("v-if", true)
|
|
1023
|
-
], 12, _hoisted_4)), [[vShow, isOpen.value]]) : withDirectives((openBlock(), createElementBlock("div", mergeProps({
|
|
1024
|
-
key: 1,
|
|
1025
|
-
id: surfaceId.value,
|
|
1026
|
-
ref_key: "surfaceRef",
|
|
1027
|
-
ref: surfaceRef
|
|
1028
|
-
}, forwardedAttrs.value, {
|
|
1029
|
-
"aria-labelledby": menuAriaLabelledBy.value,
|
|
1030
|
-
"aria-label": menuAriaLabel.value,
|
|
1031
|
-
class: ["astryx-dropdown-menu", unref(attrs).class],
|
|
1032
|
-
"data-placement": unref(position).placement,
|
|
1033
|
-
role: "menu",
|
|
1034
|
-
style: [surfaceStyle.value, unref(attrs).style],
|
|
1035
|
-
tabindex: "-1",
|
|
1036
|
-
onFocus: onSurfaceFocus,
|
|
1037
|
-
onKeydown: onSurfaceKeydown
|
|
1038
|
-
}), [createElementVNode("div", {
|
|
1039
|
-
class: "astryx-dropdown-menu-tree",
|
|
1040
|
-
hidden: unref(isDrilled) || void 0,
|
|
1041
|
-
inert: unref(isDrilled) || void 0
|
|
1042
|
-
}, [__props.items != null ? (openBlock(), createBlock(unref(DropdownMenuItems), {
|
|
1043
|
-
key: 0,
|
|
1044
|
-
items: __props.items
|
|
1045
|
-
}, null, 8, ["items"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 8, _hoisted_8), createElementVNode("div", {
|
|
1046
|
-
ref: assignHost,
|
|
1047
|
-
class: "astryx-dropdown-menu-tree"
|
|
1048
|
-
}, null, 512)], 16, _hoisted_7)), [[vShow, isOpen.value]])]),
|
|
1049
|
-
_: 3
|
|
1050
|
-
})]))], 64);
|
|
1250
|
+
"aria-haspopup",
|
|
1251
|
+
"data-astryx-focus-ring",
|
|
1252
|
+
"tooltip",
|
|
1253
|
+
"onFocus"
|
|
1254
|
+
]))], 40, _hoisted_1), createVNode(_sfc_main$1, null, createSlots({
|
|
1255
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1256
|
+
_: 2
|
|
1257
|
+
}, [unref(slots).header ? {
|
|
1258
|
+
name: "header",
|
|
1259
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "header")]),
|
|
1260
|
+
key: "0"
|
|
1261
|
+
} : void 0, unref(slots).footer ? {
|
|
1262
|
+
name: "footer",
|
|
1263
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
|
|
1264
|
+
key: "1"
|
|
1265
|
+
} : void 0]), 1024)], 64);
|
|
1051
1266
|
};
|
|
1052
1267
|
}
|
|
1053
1268
|
});
|
|
1054
1269
|
//#endregion
|
|
1055
|
-
export {
|
|
1270
|
+
export { activateMenuItem as a, _sfc_main$6 as c, MENU_ITEM_ROLES as i, useMenuFocus as n, _sfc_main$3 as o, _sfc_main$2 as r, _sfc_main$5 as s, _sfc_main as t };
|