@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,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as isImeKeyEvent } from "./layerDepth-CNDh-IHb.js";
|
|
2
|
+
import { t as isApplePlatform } from "./isApplePlatform-B1ju6F5B.js";
|
|
3
|
+
import { r as registerResizableChannel } from "./resizableChannel-3vivrEcT.js";
|
|
2
4
|
import { computed, onBeforeUnmount, onMounted, onScopeDispose, reactive, ref, toValue, watch } from "vue";
|
|
3
5
|
//#region src/composables/useHotkeys.ts
|
|
4
6
|
const KEY_ALIASES = {
|
|
@@ -17,9 +19,6 @@ function isTypingTarget(target) {
|
|
|
17
19
|
const tag = target.tagName;
|
|
18
20
|
return tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT";
|
|
19
21
|
}
|
|
20
|
-
function isImeKeyEvent(event) {
|
|
21
|
-
return event.isComposing === true || event.key === "Process" || event.keyCode === 229;
|
|
22
|
-
}
|
|
23
22
|
function matchesCombo(keys, event, isApple) {
|
|
24
23
|
const parts = keys.toLowerCase().split("+").map((part) => part.trim()).filter(Boolean);
|
|
25
24
|
if (parts.length === 0) return false;
|
|
@@ -77,13 +76,48 @@ function useHotkeys(hotkeys) {
|
|
|
77
76
|
});
|
|
78
77
|
}
|
|
79
78
|
//#endregion
|
|
79
|
+
//#region src/composables/internal/resizableStorage.ts
|
|
80
|
+
const STORAGE_PREFIX = "astryx-resizable:";
|
|
81
|
+
function loadPersistedState(key) {
|
|
82
|
+
if (typeof window === "undefined") return null;
|
|
83
|
+
try {
|
|
84
|
+
const raw = localStorage.getItem(STORAGE_PREFIX + key);
|
|
85
|
+
if (raw == null) return null;
|
|
86
|
+
const parsed = JSON.parse(raw);
|
|
87
|
+
if (typeof parsed === "number" && Number.isFinite(parsed)) return parsed === 0 ? {
|
|
88
|
+
size: null,
|
|
89
|
+
isCollapsed: true
|
|
90
|
+
} : {
|
|
91
|
+
size: parsed,
|
|
92
|
+
isCollapsed: null
|
|
93
|
+
};
|
|
94
|
+
if (typeof parsed === "object" && parsed != null) {
|
|
95
|
+
const record = parsed;
|
|
96
|
+
const hasSize = typeof record.size === "number" && Number.isFinite(record.size) && record.size > 0;
|
|
97
|
+
if (hasSize || record.isCollapsed === true) return {
|
|
98
|
+
size: hasSize ? record.size : null,
|
|
99
|
+
isCollapsed: record.isCollapsed === true
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
} catch {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
function savePersistedState(key, size, isCollapsed) {
|
|
108
|
+
try {
|
|
109
|
+
localStorage.setItem(STORAGE_PREFIX + key, JSON.stringify({
|
|
110
|
+
size,
|
|
111
|
+
isCollapsed
|
|
112
|
+
}));
|
|
113
|
+
} catch {}
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
80
116
|
//#region src/composables/useResizable.ts
|
|
81
117
|
const DEFAULT_SIZE = 250;
|
|
82
118
|
const DEFAULT_MIN = 50;
|
|
83
119
|
const DEFAULT_COLLAPSED_SIZE = 40;
|
|
84
|
-
const SNAP_DISTANCE = 8;
|
|
85
120
|
const UNMEASURED_BASIS = 1200;
|
|
86
|
-
const STORAGE_PREFIX = "astryx-resizable:";
|
|
87
121
|
function percent(value, options) {
|
|
88
122
|
return {
|
|
89
123
|
type: "percent",
|
|
@@ -142,34 +176,16 @@ function clampSize(size, min, max, snaps) {
|
|
|
142
176
|
nearestDist = dist;
|
|
143
177
|
}
|
|
144
178
|
}
|
|
145
|
-
if (nearestDist > SNAP_DISTANCE) return clamped;
|
|
146
179
|
return Math.min(max, Math.max(min, nearest));
|
|
147
180
|
}
|
|
148
|
-
function
|
|
149
|
-
if (typeof
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
isCollapsed: true
|
|
157
|
-
} : {
|
|
158
|
-
size: parsed,
|
|
159
|
-
isCollapsed: null
|
|
160
|
-
};
|
|
161
|
-
if (typeof parsed === "object" && parsed != null) {
|
|
162
|
-
const record = parsed;
|
|
163
|
-
const hasSize = typeof record.size === "number" && Number.isFinite(record.size) && record.size > 0;
|
|
164
|
-
if (hasSize || record.isCollapsed === true) return {
|
|
165
|
-
size: hasSize ? record.size : null,
|
|
166
|
-
isCollapsed: record.isCollapsed === true
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
} catch {
|
|
170
|
-
return null;
|
|
171
|
-
}
|
|
172
|
-
return null;
|
|
181
|
+
function sizeDependsOnBasis(value) {
|
|
182
|
+
if (typeof value === "string") return value.trim().endsWith("%");
|
|
183
|
+
return typeof value === "object" && value != null && value.type === "percent";
|
|
184
|
+
}
|
|
185
|
+
function contentBox(element, direction) {
|
|
186
|
+
const style = getComputedStyle(element);
|
|
187
|
+
const size = direction === "vertical" ? element.clientHeight - Number.parseFloat(style.paddingTop) - Number.parseFloat(style.paddingBottom) : element.clientWidth - Number.parseFloat(style.paddingLeft) - Number.parseFloat(style.paddingRight);
|
|
188
|
+
return Number.isFinite(size) ? size : null;
|
|
173
189
|
}
|
|
174
190
|
function useSingleRegion(options, cascade) {
|
|
175
191
|
const direction = options.direction ?? "horizontal";
|
|
@@ -181,10 +197,25 @@ function useSingleRegion(options, cascade) {
|
|
|
181
197
|
const isCollapsed = ref(false);
|
|
182
198
|
const basisMeasured = ref(true);
|
|
183
199
|
const controlledCollapse = computed(() => options.isCollapsed);
|
|
200
|
+
const clientExtent = ref(null);
|
|
184
201
|
let origin = DEFAULT_SIZE;
|
|
185
202
|
let settledDefault = false;
|
|
186
203
|
let dragging = false;
|
|
187
204
|
let dragLimits = null;
|
|
205
|
+
function observesContainer() {
|
|
206
|
+
return options.containerRef != null && (sizeDependsOnBasis(options.minSize) || sizeDependsOnBasis(options.maxSize) || sizeDependsOnBasis(options.defaultSize));
|
|
207
|
+
}
|
|
208
|
+
function reportedMax(min, max) {
|
|
209
|
+
if (Number.isFinite(max)) return max;
|
|
210
|
+
let basis;
|
|
211
|
+
if (options.containerRef != null) {
|
|
212
|
+
if (!sizeDependsOnBasis(options.minSize) && !sizeDependsOnBasis(options.maxSize)) return void 0;
|
|
213
|
+
const element = options.containerRef.value;
|
|
214
|
+
basis = element == null ? null : contentBox(element, direction);
|
|
215
|
+
} else basis = clientExtent.value;
|
|
216
|
+
if (basis == null || !(basis > 0)) return void 0;
|
|
217
|
+
return Math.max(basis, isCollapsed.value ? min : size.value);
|
|
218
|
+
}
|
|
188
219
|
function currentBasis() {
|
|
189
220
|
return readBasis(options.containerRef?.value, direction);
|
|
190
221
|
}
|
|
@@ -227,12 +258,7 @@ function useSingleRegion(options, cascade) {
|
|
|
227
258
|
restore();
|
|
228
259
|
function persist() {
|
|
229
260
|
if (!options.autoSaveId || !basisMeasured.value) return;
|
|
230
|
-
|
|
231
|
-
localStorage.setItem(STORAGE_PREFIX + options.autoSaveId, JSON.stringify({
|
|
232
|
-
size: expandedSize.value,
|
|
233
|
-
isCollapsed: isCollapsed.value
|
|
234
|
-
}));
|
|
235
|
-
} catch {}
|
|
261
|
+
savePersistedState(options.autoSaveId, expandedSize.value, isCollapsed.value);
|
|
236
262
|
}
|
|
237
263
|
function setCollapsed(next) {
|
|
238
264
|
if (!collapsible && next) return;
|
|
@@ -295,7 +321,7 @@ function useSingleRegion(options, cascade) {
|
|
|
295
321
|
}
|
|
296
322
|
const props = computed(() => {
|
|
297
323
|
const { min, max } = limits();
|
|
298
|
-
|
|
324
|
+
const value = {
|
|
299
325
|
_size: size.value,
|
|
300
326
|
_isCollapsed: isCollapsed.value,
|
|
301
327
|
_onResizeStart: onResizeStart,
|
|
@@ -310,6 +336,11 @@ function useSingleRegion(options, cascade) {
|
|
|
310
336
|
_direction: direction,
|
|
311
337
|
_isResizableProps: true
|
|
312
338
|
};
|
|
339
|
+
registerResizableChannel(value, {
|
|
340
|
+
collapse: () => setCollapsed(true),
|
|
341
|
+
expand: () => setCollapsed(false)
|
|
342
|
+
}, reportedMax(min, max));
|
|
343
|
+
return value;
|
|
313
344
|
});
|
|
314
345
|
function measureDefault() {
|
|
315
346
|
if (settledDefault || options.containerRef == null) return;
|
|
@@ -325,9 +356,10 @@ function useSingleRegion(options, cascade) {
|
|
|
325
356
|
}
|
|
326
357
|
let observer;
|
|
327
358
|
onMounted(() => {
|
|
359
|
+
if (options.containerRef == null && typeof window !== "undefined") clientExtent.value = direction === "vertical" ? window.innerHeight : window.innerWidth;
|
|
328
360
|
measureDefault();
|
|
329
361
|
const element = options.containerRef?.value;
|
|
330
|
-
if (element == null || typeof ResizeObserver === "undefined") return;
|
|
362
|
+
if (element == null || typeof ResizeObserver === "undefined" || !observesContainer()) return;
|
|
331
363
|
observer = new ResizeObserver(() => measureDefault());
|
|
332
364
|
observer.observe(element);
|
|
333
365
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { computed, getCurrentInstance } from "vue";
|
|
2
|
+
//#region src/composables/useResolvedLabelHidden.ts
|
|
3
|
+
function wasPropPassed(name) {
|
|
4
|
+
const raw = getCurrentInstance()?.vnode.props;
|
|
5
|
+
if (raw == null) return false;
|
|
6
|
+
if (Object.hasOwn(raw, name)) return true;
|
|
7
|
+
const kebab = name.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
8
|
+
return Object.hasOwn(raw, kebab);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 隐藏标签的正名是 `isLabelHidden`,旧名 `labelHidden` 先留着。
|
|
12
|
+
*
|
|
13
|
+
* 默认不隐藏时,两个名字任一为真就隐藏。Vue 会把没传的布尔属性当成 false,
|
|
14
|
+
* 这种默认值用「或」就够了。
|
|
15
|
+
*
|
|
16
|
+
* 默认隐藏(PowerSearch)时必须分清「没传」和「传了 false」。
|
|
17
|
+
* 两个都传了,听正名。这个判断要在 setup 里做:渲染函数里拿不到当前实例。
|
|
18
|
+
*/
|
|
19
|
+
function useResolvedLabelHidden(isLabelHidden, labelHidden, fallback = false) {
|
|
20
|
+
if (!fallback) return computed(() => Boolean(isLabelHidden()) || Boolean(labelHidden()));
|
|
21
|
+
const passedNew = wasPropPassed("isLabelHidden");
|
|
22
|
+
const passedOld = wasPropPassed("labelHidden");
|
|
23
|
+
return computed(() => {
|
|
24
|
+
if (passedNew) return Boolean(isLabelHidden());
|
|
25
|
+
if (passedOld) return Boolean(labelHidden());
|
|
26
|
+
return true;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { useResolvedLabelHidden as t };
|
|
@@ -1,12 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as isImeKeyEvent } from "./layerDepth-CNDh-IHb.js";
|
|
2
|
+
import { r as getFocusables } from "./focus-l8jVTcqd.js";
|
|
3
|
+
import { r as trackInteractionModality, t as getInteractionModality } from "./interactionModality-ACpTMhak.js";
|
|
2
4
|
import { onScopeDispose, ref, toValue, watch } from "vue";
|
|
5
|
+
//#region src/composables/internal/focusReturn.ts
|
|
6
|
+
function isTextEntry(element) {
|
|
7
|
+
return element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement || element.isContentEditable;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 程序移动焦点,焦点环跟着上一次的输入走:
|
|
11
|
+
* 上一次是键盘就照常画环,上一次是鼠标或手指就不画。
|
|
12
|
+
*
|
|
13
|
+
* 用鼠标或手指关掉浮层后,焦点回到触发器上,但触发器不会突然亮起一圈焦点环。
|
|
14
|
+
* 文本输入类元素例外:它们本来就要画出「打字会落在这里」,多一次 blur 还可能触发校验,
|
|
15
|
+
* 所以一律直接聚焦。`options` 原样交给 `focus()`,例如 `preventScroll`。
|
|
16
|
+
*/
|
|
17
|
+
function focusForLastInput(element, options) {
|
|
18
|
+
trackInteractionModality();
|
|
19
|
+
if (isTextEntry(element) || getInteractionModality() !== "pointer") {
|
|
20
|
+
element.focus(options);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (element.matches(":focus-visible")) element.blur();
|
|
24
|
+
element.focus({
|
|
25
|
+
...options,
|
|
26
|
+
focusVisible: false
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
3
30
|
//#region src/composables/useFocusTrap.ts
|
|
4
31
|
/**
|
|
5
32
|
* 在容器内陷阱键盘焦点,按 Tab 时循环聚焦容器内的可聚焦元素。
|
|
6
33
|
* 用于模态对话框、抽屉等需要限制焦点范围的浮层组件。
|
|
7
34
|
*
|
|
8
35
|
* 打开时把焦点送进容器,关闭或卸载时把焦点还给打开前聚焦的元素;
|
|
9
|
-
*
|
|
36
|
+
* 焦点从没进过容器、或者已经被别处拿走时不还。还焦点时焦点环跟着上一次的输入走:
|
|
37
|
+
* 用鼠标或手指关掉的,回到触发器上不画环。
|
|
38
|
+
*
|
|
39
|
+
* Tab 只在焦点真的在陷阱里面时才被拦下。浮层开着、焦点却合理地留在外面
|
|
40
|
+
* (例如挂在输入框上的列表框)时,拦下 Tab 会让整个页面都没法用 Tab。
|
|
10
41
|
*/
|
|
11
42
|
function useFocusTrap(options = {}) {
|
|
12
43
|
const containerRef = options.container ?? ref(null);
|
|
@@ -30,12 +61,13 @@ function useFocusTrap(options = {}) {
|
|
|
30
61
|
function onKeyDown(event) {
|
|
31
62
|
if (!isActive()) return;
|
|
32
63
|
if (event.key === "Escape") {
|
|
64
|
+
if (event.defaultPrevented || isImeKeyEvent(event)) return;
|
|
33
65
|
if (options.onEscape != null && (isTargetInside(event) || isFocusInside())) options.onEscape();
|
|
34
66
|
return;
|
|
35
67
|
}
|
|
36
68
|
if (event.key !== "Tab") return;
|
|
37
69
|
const el = containerRef.value;
|
|
38
|
-
if (!el || !
|
|
70
|
+
if (!el || !isFocusInside()) return;
|
|
39
71
|
const focusables = getFocusables(el);
|
|
40
72
|
if (focusables.length === 0) {
|
|
41
73
|
event.preventDefault();
|
|
@@ -43,7 +75,13 @@ function useFocusTrap(options = {}) {
|
|
|
43
75
|
}
|
|
44
76
|
const first = focusables[0];
|
|
45
77
|
const last = focusables[focusables.length - 1];
|
|
46
|
-
const active =
|
|
78
|
+
const active = document.activeElement;
|
|
79
|
+
if (active === el) {
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
if (event.shiftKey) last.focus();
|
|
82
|
+
else first.focus();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
47
85
|
if (event.shiftKey && active === first) {
|
|
48
86
|
event.preventDefault();
|
|
49
87
|
last.focus();
|
|
@@ -69,6 +107,7 @@ function useFocusTrap(options = {}) {
|
|
|
69
107
|
if (focusables.length > 0) focusables[focusables.length - 1].focus();
|
|
70
108
|
}
|
|
71
109
|
function activate() {
|
|
110
|
+
trackInteractionModality();
|
|
72
111
|
if (typeof document !== "undefined") {
|
|
73
112
|
const active = document.activeElement;
|
|
74
113
|
previouslyFocused = active instanceof HTMLElement && active !== document.body ? active : null;
|
|
@@ -88,7 +127,7 @@ function useFocusTrap(options = {}) {
|
|
|
88
127
|
if (target == null || !hasEntered || !target.isConnected) return;
|
|
89
128
|
const active = typeof document === "undefined" ? null : document.activeElement;
|
|
90
129
|
if (active != null && active !== document.body && !isFocusInside()) return;
|
|
91
|
-
target
|
|
130
|
+
focusForLastInput(target);
|
|
92
131
|
}
|
|
93
132
|
function deactivate() {
|
|
94
133
|
teardown();
|
|
@@ -123,18 +162,21 @@ function useFocusTrap(options = {}) {
|
|
|
123
162
|
/**
|
|
124
163
|
* 在浮层组件打开时保存当前焦点元素,关闭时恢复焦点。
|
|
125
164
|
* 用于对话框、抽屉、弹出菜单等浮层组件。
|
|
165
|
+
*
|
|
166
|
+
* 恢复时焦点环跟着上一次的输入走:键盘关掉的照常画环,鼠标或手指关掉的不画。
|
|
126
167
|
*/
|
|
127
168
|
function useRestoreFocus(options) {
|
|
128
169
|
const { isEnabled, shouldRestore } = options;
|
|
129
170
|
let savedElement = null;
|
|
130
171
|
function save() {
|
|
131
172
|
if (!isEnabled.value || typeof document === "undefined") return;
|
|
173
|
+
trackInteractionModality();
|
|
132
174
|
const active = document.activeElement;
|
|
133
175
|
if (active instanceof HTMLElement) savedElement = active;
|
|
134
176
|
}
|
|
135
177
|
function restore() {
|
|
136
178
|
if (!isEnabled.value || !savedElement) return;
|
|
137
|
-
if (savedElement.isConnected && !savedElement.hasAttribute("disabled")) savedElement
|
|
179
|
+
if (savedElement.isConnected && !savedElement.hasAttribute("disabled")) focusForLastInput(savedElement);
|
|
138
180
|
savedElement = null;
|
|
139
181
|
}
|
|
140
182
|
watch(shouldRestore, (should) => {
|
|
@@ -150,4 +192,4 @@ function useRestoreFocus(options) {
|
|
|
150
192
|
};
|
|
151
193
|
}
|
|
152
194
|
//#endregion
|
|
153
|
-
export { useFocusTrap as n, useRestoreFocus as t };
|
|
195
|
+
export { useFocusTrap as n, focusForLastInput as r, useRestoreFocus as t };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { getCurrentScope, onScopeDispose, ref } from "vue";
|
|
2
|
+
//#region src/composables/useScrollOverflow.ts
|
|
3
|
+
/**
|
|
4
|
+
* 浏览器是不是真的在渲染这个元素。在 `display: none` 的祖先下、或者 `content-visibility: hidden`
|
|
5
|
+
* 的子树里,读布局要么答 0,要么逼浏览器把整棵藏起来的子树排一遍。没有 `checkVisibility` 的浏览器照常量。
|
|
6
|
+
*/
|
|
7
|
+
function isRendered(node) {
|
|
8
|
+
return typeof node.checkVisibility !== "function" || node.checkVisibility();
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 观察一个横向滚动容器,报告起始边和结束边有没有被挡住。容差 1px。
|
|
12
|
+
*
|
|
13
|
+
* 每次滚动都量。尺寸变化和刚绑上时,只在容器真的被渲染时才量:藏起来的容器没有边可报,
|
|
14
|
+
* 保留上一次的结果,等它露出来之后的那次尺寸变化再量。藏着的容器被脚本滚动时照样量,
|
|
15
|
+
* 因为同样大小地露出来不会再有尺寸变化。
|
|
16
|
+
*/
|
|
17
|
+
function useScrollOverflow() {
|
|
18
|
+
const element = ref(null);
|
|
19
|
+
const overflowStart = ref(false);
|
|
20
|
+
const overflowEnd = ref(false);
|
|
21
|
+
const hasOverflow = ref(false);
|
|
22
|
+
let observer;
|
|
23
|
+
function measureNow(node) {
|
|
24
|
+
const tolerance = 1;
|
|
25
|
+
const maxScroll = node.scrollWidth - node.clientWidth;
|
|
26
|
+
const nextStart = Math.abs(node.scrollLeft) > tolerance;
|
|
27
|
+
const nextEnd = Math.abs(node.scrollLeft) < maxScroll - tolerance;
|
|
28
|
+
const nextHas = node.scrollWidth > node.clientWidth + tolerance;
|
|
29
|
+
overflowStart.value = nextStart;
|
|
30
|
+
overflowEnd.value = nextEnd;
|
|
31
|
+
hasOverflow.value = nextHas;
|
|
32
|
+
}
|
|
33
|
+
function measure() {
|
|
34
|
+
const node = element.value;
|
|
35
|
+
if (node != null && isRendered(node)) measureNow(node);
|
|
36
|
+
}
|
|
37
|
+
function measureOnScroll() {
|
|
38
|
+
const node = element.value;
|
|
39
|
+
if (node != null) measureNow(node);
|
|
40
|
+
}
|
|
41
|
+
function unbind() {
|
|
42
|
+
element.value?.removeEventListener("scroll", measureOnScroll);
|
|
43
|
+
observer?.disconnect();
|
|
44
|
+
observer = void 0;
|
|
45
|
+
}
|
|
46
|
+
function scrollRef(node) {
|
|
47
|
+
if (element.value === node) return;
|
|
48
|
+
unbind();
|
|
49
|
+
element.value = node;
|
|
50
|
+
if (node == null) return;
|
|
51
|
+
node.addEventListener("scroll", measureOnScroll, { passive: true });
|
|
52
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
53
|
+
observer = new ResizeObserver(measure);
|
|
54
|
+
observer.observe(node);
|
|
55
|
+
}
|
|
56
|
+
measure();
|
|
57
|
+
}
|
|
58
|
+
if (getCurrentScope() != null) onScopeDispose(unbind);
|
|
59
|
+
return {
|
|
60
|
+
scrollRef,
|
|
61
|
+
overflowStart,
|
|
62
|
+
overflowEnd,
|
|
63
|
+
hasOverflow
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { useScrollOverflow as t };
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { a as INACTIVE_AXIS_STATE, c as isMeasurable, d as measureScrollAxis, i as DEFAULT_AXIS_MAPPING, l as mappingsEqual, n as registerScrollOwner, o as axisStatesEqual, r as unregisterScrollOwner, s as getLogicalAxisMapping, t as attachScrollKeyboardDelegation, u as measureOverflow } from "./scrollKeyboardDelegation-D7cumnOl.js";
|
|
2
|
+
import { computed, onBeforeUnmount, ref, shallowRef, watch } from "vue";
|
|
3
|
+
//#region src/composables/internal/scrollInvalidation.ts
|
|
4
|
+
/**
|
|
5
|
+
* 什么时候要重新量一块滚动区域。
|
|
6
|
+
*
|
|
7
|
+
* 尺寸变化(ResizeObserver)、滚动、窗口和可视视口变化、图片加载、过渡和动画结束、
|
|
8
|
+
* 内容和祖先的属性变化(class、dir、hidden、style 会改书写方向和可见性)、字体加载完成。
|
|
9
|
+
* 这些信号只负责「该量了」,量本身由调用方合并到一次里做。
|
|
10
|
+
*/
|
|
11
|
+
function watchScrollInvalidation(viewport, content, schedule) {
|
|
12
|
+
const doc = viewport.ownerDocument;
|
|
13
|
+
const view = doc.defaultView;
|
|
14
|
+
const cleanups = [];
|
|
15
|
+
function on(target, type, capture = false) {
|
|
16
|
+
if (target == null) return;
|
|
17
|
+
target.addEventListener(type, schedule, {
|
|
18
|
+
capture,
|
|
19
|
+
passive: true
|
|
20
|
+
});
|
|
21
|
+
cleanups.push(() => target.removeEventListener(type, schedule, capture));
|
|
22
|
+
}
|
|
23
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
24
|
+
const observer = new ResizeObserver(schedule);
|
|
25
|
+
observer.observe(viewport);
|
|
26
|
+
observer.observe(content);
|
|
27
|
+
cleanups.push(() => observer.disconnect());
|
|
28
|
+
}
|
|
29
|
+
on(viewport, "scroll");
|
|
30
|
+
on(view, "resize");
|
|
31
|
+
on(view?.visualViewport, "resize");
|
|
32
|
+
on(content, "load", true);
|
|
33
|
+
for (const element of [viewport, content]) {
|
|
34
|
+
on(element, "transitionend");
|
|
35
|
+
on(element, "animationend");
|
|
36
|
+
}
|
|
37
|
+
if (typeof MutationObserver !== "undefined") {
|
|
38
|
+
const attributeFilter = [
|
|
39
|
+
"class",
|
|
40
|
+
"dir",
|
|
41
|
+
"hidden",
|
|
42
|
+
"style"
|
|
43
|
+
];
|
|
44
|
+
const observer = new MutationObserver(schedule);
|
|
45
|
+
observer.observe(viewport, {
|
|
46
|
+
attributes: true,
|
|
47
|
+
attributeFilter
|
|
48
|
+
});
|
|
49
|
+
observer.observe(content, {
|
|
50
|
+
attributes: true,
|
|
51
|
+
attributeFilter,
|
|
52
|
+
characterData: true,
|
|
53
|
+
childList: true,
|
|
54
|
+
subtree: true
|
|
55
|
+
});
|
|
56
|
+
for (let ancestor = viewport.parentElement; ancestor != null; ancestor = ancestor.parentElement) observer.observe(ancestor, {
|
|
57
|
+
attributes: true,
|
|
58
|
+
attributeFilter
|
|
59
|
+
});
|
|
60
|
+
cleanups.push(() => observer.disconnect());
|
|
61
|
+
}
|
|
62
|
+
const fonts = doc.fonts;
|
|
63
|
+
if (fonts != null) {
|
|
64
|
+
fonts.addEventListener?.("loadingdone", schedule);
|
|
65
|
+
cleanups.push(() => fonts.removeEventListener?.("loadingdone", schedule));
|
|
66
|
+
fonts.ready?.then(schedule);
|
|
67
|
+
}
|
|
68
|
+
return () => {
|
|
69
|
+
for (const cleanup of cleanups) cleanup();
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/composables/useScrollableArea.ts
|
|
74
|
+
function sameState(a, b) {
|
|
75
|
+
return axisStatesEqual(a.inline, b.inline) && axisStatesEqual(a.block, b.block);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 对应原版 Astryx 的 `hooks/useScrollableArea`:可滚动容器系统的核心。
|
|
79
|
+
*
|
|
80
|
+
* 按逻辑轴(行内 / 块方向)给调用方的视口和内容加上滚动行为:
|
|
81
|
+
* 只有内容真的溢出时视口才变成滚动容器;量出每条轴能不能滚、到没到两头;
|
|
82
|
+
* 能滚时视口进入 Tab 顺序,让键盘也能滚;`overscroll: 'contain'` 只在真能滚的轴上生效。
|
|
83
|
+
* 量出的状态登记到滚动归属表里,嵌套的滚动区域和键盘委托都靠它分清谁是哪一层。
|
|
84
|
+
* 藏起来、没挂上或者尺寸为 0 的视口量不出来,保留上一次的结果,等下一次有效的信号。
|
|
85
|
+
*/
|
|
86
|
+
function useScrollableArea(options) {
|
|
87
|
+
const viewport = shallowRef(null);
|
|
88
|
+
const content = ref(null);
|
|
89
|
+
const measured = shallowRef({
|
|
90
|
+
inline: INACTIVE_AXIS_STATE,
|
|
91
|
+
block: INACTIVE_AXIS_STATE
|
|
92
|
+
});
|
|
93
|
+
const overflowInline = ref(false);
|
|
94
|
+
const overflowBlock = ref(false);
|
|
95
|
+
const mapping = shallowRef(DEFAULT_AXIS_MAPPING);
|
|
96
|
+
const viewportHasFocus = ref(false);
|
|
97
|
+
const axis = computed(() => options.axis ?? "block");
|
|
98
|
+
const overscroll = computed(() => options.overscroll ?? "allow");
|
|
99
|
+
const stickyContainment = computed(() => options.stickyContainment ?? "whenScrollable");
|
|
100
|
+
const keyboardAccess = computed(() => options.keyboardAccess ?? {
|
|
101
|
+
owner: "viewport",
|
|
102
|
+
label: options.label ?? "",
|
|
103
|
+
role: options.role
|
|
104
|
+
});
|
|
105
|
+
function requested(name) {
|
|
106
|
+
return axis.value === name || axis.value === "both";
|
|
107
|
+
}
|
|
108
|
+
function measure() {
|
|
109
|
+
const element = viewport.value;
|
|
110
|
+
if (element == null) return;
|
|
111
|
+
const style = getComputedStyle(element);
|
|
112
|
+
if (!isMeasurable(element, style)) return;
|
|
113
|
+
const nextMapping = getLogicalAxisMapping(style.writingMode, style.direction);
|
|
114
|
+
const next = {
|
|
115
|
+
inline: measureScrollAxis(element, "inline", nextMapping, requested("inline"), style),
|
|
116
|
+
block: measureScrollAxis(element, "block", nextMapping, requested("block"), style)
|
|
117
|
+
};
|
|
118
|
+
registerScrollOwner(element, next);
|
|
119
|
+
overflowInline.value = measureOverflow(element, "inline", nextMapping);
|
|
120
|
+
overflowBlock.value = measureOverflow(element, "block", nextMapping);
|
|
121
|
+
if (!mappingsEqual(mapping.value, nextMapping)) mapping.value = nextMapping;
|
|
122
|
+
if (!sameState(measured.value, next)) measured.value = next;
|
|
123
|
+
}
|
|
124
|
+
let queued = false;
|
|
125
|
+
function queueMeasure() {
|
|
126
|
+
if (queued) return;
|
|
127
|
+
queued = true;
|
|
128
|
+
queueMicrotask(() => {
|
|
129
|
+
queued = false;
|
|
130
|
+
measure();
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function onViewportFocusIn(event) {
|
|
134
|
+
viewportHasFocus.value = event.target === viewport.value;
|
|
135
|
+
}
|
|
136
|
+
function onViewportFocusOut() {
|
|
137
|
+
viewportHasFocus.value = false;
|
|
138
|
+
}
|
|
139
|
+
function bind(element) {
|
|
140
|
+
const node = element instanceof HTMLElement ? element : null;
|
|
141
|
+
if (viewport.value === node) return;
|
|
142
|
+
const previous = viewport.value;
|
|
143
|
+
if (previous != null) {
|
|
144
|
+
unregisterScrollOwner(previous);
|
|
145
|
+
previous.removeEventListener("focusin", onViewportFocusIn);
|
|
146
|
+
previous.removeEventListener("focusout", onViewportFocusOut);
|
|
147
|
+
}
|
|
148
|
+
viewport.value = node;
|
|
149
|
+
if (node == null) return;
|
|
150
|
+
registerScrollOwner(node, measured.value);
|
|
151
|
+
node.addEventListener("focusin", onViewportFocusIn);
|
|
152
|
+
node.addEventListener("focusout", onViewportFocusOut);
|
|
153
|
+
}
|
|
154
|
+
watch([viewport, content], ([element, inner], _previous, onCleanup) => {
|
|
155
|
+
if (element == null || inner == null) return;
|
|
156
|
+
onCleanup(watchScrollInvalidation(element, inner, queueMeasure));
|
|
157
|
+
queueMeasure();
|
|
158
|
+
}, { immediate: true });
|
|
159
|
+
watch(axis, queueMeasure);
|
|
160
|
+
const state = computed(() => ({
|
|
161
|
+
inline: requested("inline") ? measured.value.inline : INACTIVE_AXIS_STATE,
|
|
162
|
+
block: requested("block") ? measured.value.block : INACTIVE_AXIS_STATE
|
|
163
|
+
}));
|
|
164
|
+
const scrollable = computed(() => state.value.inline.isScrollable || state.value.block.isScrollable);
|
|
165
|
+
watch([
|
|
166
|
+
() => keyboardAccess.value.owner,
|
|
167
|
+
scrollable,
|
|
168
|
+
viewport,
|
|
169
|
+
content
|
|
170
|
+
], ([owner, isScrollable, element, inner], _previous, onCleanup) => {
|
|
171
|
+
if (owner !== "contentOrViewport" || !isScrollable || element == null || inner == null) return;
|
|
172
|
+
onCleanup(attachScrollKeyboardDelegation(element, inner));
|
|
173
|
+
}, { immediate: true });
|
|
174
|
+
onBeforeUnmount(() => bind(null));
|
|
175
|
+
const viewportStyle = computed(() => {
|
|
176
|
+
const map = mapping.value;
|
|
177
|
+
const onX = (name) => map[name] === "x";
|
|
178
|
+
const requestedX = requested("inline") && onX("inline") || requested("block") && onX("block");
|
|
179
|
+
const requestedY = requested("inline") && !onX("inline") || requested("block") && !onX("block");
|
|
180
|
+
const overflowingX = overflowInline.value && onX("inline") || overflowBlock.value && onX("block");
|
|
181
|
+
const overflowingY = overflowInline.value && !onX("inline") || overflowBlock.value && !onX("block");
|
|
182
|
+
const always = stickyContainment.value === "always";
|
|
183
|
+
const contains = overflowingX || overflowingY || always;
|
|
184
|
+
const style = {
|
|
185
|
+
overflowX: contains ? (always ? requestedX : overflowingX) ? "auto" : "hidden" : "clip",
|
|
186
|
+
overflowY: contains ? (always ? requestedY : overflowingY) ? "auto" : "hidden" : "clip"
|
|
187
|
+
};
|
|
188
|
+
for (const name of ["inline", "block"]) {
|
|
189
|
+
if (!requested(name)) continue;
|
|
190
|
+
const contain = overscroll.value === "contain" && state.value[name].isScrollable;
|
|
191
|
+
style[onX(name) ? "overscrollBehaviorX" : "overscrollBehaviorY"] = contain ? "contain" : "auto";
|
|
192
|
+
}
|
|
193
|
+
return style;
|
|
194
|
+
});
|
|
195
|
+
return {
|
|
196
|
+
content,
|
|
197
|
+
state,
|
|
198
|
+
viewport: bind,
|
|
199
|
+
viewportAttrs: computed(() => {
|
|
200
|
+
const access = keyboardAccess.value;
|
|
201
|
+
const inline = state.value.inline;
|
|
202
|
+
const block = state.value.block;
|
|
203
|
+
const attrs = {
|
|
204
|
+
"data-scroll-axis": axis.value,
|
|
205
|
+
"data-scrollable-inline": inline.isScrollable ? "true" : void 0,
|
|
206
|
+
"data-scrollable-block": block.isScrollable ? "true" : void 0,
|
|
207
|
+
"data-scroll-inline-start": inline.atStart ? "true" : void 0,
|
|
208
|
+
"data-scroll-inline-end": inline.atEnd ? "true" : void 0,
|
|
209
|
+
"data-scroll-block-start": block.atStart ? "true" : void 0,
|
|
210
|
+
"data-scroll-block-end": block.atEnd ? "true" : void 0
|
|
211
|
+
};
|
|
212
|
+
if (access.owner === "content") return attrs;
|
|
213
|
+
attrs.role = access.role ?? "group";
|
|
214
|
+
attrs["aria-label"] = access.label;
|
|
215
|
+
attrs.tabindex = scrollable.value ? 0 : viewportHasFocus.value ? -1 : void 0;
|
|
216
|
+
return attrs;
|
|
217
|
+
}),
|
|
218
|
+
viewportStyle
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
//#endregion
|
|
222
|
+
export { useScrollableArea as t };
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
import { computed, onMounted, onScopeDispose, shallowRef } from "vue";
|
|
2
|
-
//#region src/composables/useCoarsePointer.ts
|
|
3
|
-
/** 粗指针(触摸)为 true。服务端和细指针设备为 false。 */
|
|
4
|
-
function useCoarsePointer() {
|
|
5
|
-
const coarse = shallowRef(false);
|
|
6
|
-
let query;
|
|
7
|
-
function update() {
|
|
8
|
-
coarse.value = query?.matches ?? false;
|
|
9
|
-
}
|
|
10
|
-
onMounted(() => {
|
|
11
|
-
query = window.matchMedia("(pointer: coarse)");
|
|
12
|
-
update();
|
|
13
|
-
query.addEventListener("change", update);
|
|
14
|
-
});
|
|
15
|
-
onScopeDispose(() => {
|
|
16
|
-
query?.removeEventListener("change", update);
|
|
17
|
-
});
|
|
18
|
-
return computed(() => coarse.value);
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
1
|
//#region src/composables/useTimeValue.ts
|
|
22
2
|
const DISPLAY_TIME = /^(\d{1,2})(?::(\d{2}))?(?::(\d{2}))?\s*([ap])\.?m\.?$/i;
|
|
23
3
|
const COMPACT_TIME = /^(\d{2})(\d{2})(\d{2})?$/;
|
|
@@ -104,10 +84,12 @@ function isTimeInRange(value, min, max) {
|
|
|
104
84
|
function resolveTimeSurface(options) {
|
|
105
85
|
const presentation = options.presentation ?? (options.nativePicker === "always" ? "native" : options.nativePicker === "never" ? "text-input" : "adaptive-native");
|
|
106
86
|
const needsTypedField = options.hasSeconds || options.increment !== 1 || options.needsTypedField === true;
|
|
107
|
-
if (presentation === "text-input" || presentation === "popover"
|
|
87
|
+
if (presentation === "text-input" || presentation === "popover") return "text";
|
|
88
|
+
if (presentation === "bottom-sheet") return "sheet";
|
|
89
|
+
if (presentation === "adaptive-bottom-sheet") return options.coarse ? "sheet" : "text";
|
|
108
90
|
if (needsTypedField) return "text";
|
|
109
91
|
if (presentation === "native") return "native";
|
|
110
92
|
return options.coarse ? "native" : "text";
|
|
111
93
|
}
|
|
112
94
|
//#endregion
|
|
113
|
-
export { parseISOTime as a,
|
|
95
|
+
export { parseISOTime as a, parseDisplayTime as i, formatISOTime as n, resolveTimeSurface as o, isTimeInRange as r, shiftTime as s, formatDisplayTime as t };
|