@astryx-vue/core 0.2.6 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-BBhl5P1X.js → AlertDialog-C2inDZWG.js} +13 -7
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-mrflO0Uy.js → AppShell-CumzH-8z.js} +3 -3
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-pPZ4dI_s.js → Avatar-BW0TE8t9.js} +47 -34
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-B--NQSB3.js → AvatarGroup-DLC_FFR5.js} +57 -13
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-GbGxrqQO.js → Banner-C5VAwo4D.js} +68 -34
- package/dist/Blockquote/index.js +1 -1
- package/dist/Blockquote-DRoKdcxZ.js +27 -0
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-eJ3FzTBD.js → BottomSheet-B4sc3F1S.js} +288 -140
- package/dist/{BottomSheet-DIVwbGr3.js → BottomSheet-m54uCMJN.js} +20 -4
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/Breadcrumbs-CTaz7Kh4.js +223 -0
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-B6Hj_O_s.js → Button-ONOoHdkg.js} +25 -15
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/ButtonGroup-DnkSZ9a5.js +87 -0
- package/dist/{ButtonTooltip-nWWrth8j.js → ButtonTooltip-CNKOQHYR.js} +7 -4
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-B7vIowKq.js → Calendar-BAqzzQm2.js} +5 -5
- package/dist/Card/index.d.ts +2 -2
- package/dist/Card/index.js +1 -1
- package/dist/{Card-HAjZQg2s.js → Card-B-I24X9S.js} +2 -0
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-DAkOa7KK.js → Carousel-DXC22UWq.js} +50 -33
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-DVoI6UOA.js → Chat-BdJW6IX5.js} +152 -83
- package/dist/CheckboxIndicator/index.js +1 -1
- package/dist/{CheckboxIndicator-D37cm2Rh.js → CheckboxIndicator-fH4d-JE1.js} +9 -3
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-BS9J6edf.js → CheckboxInput-DJHCbwgC.js} +19 -11
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-CX1i_jVP.js → CheckboxList-BdZIP4_J.js} +155 -38
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-Djgwa0ko.js → Citation-DbZn2vms.js} +8 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-Bhds4RRe.js → ClickableCard-ChAfiw9T.js} +10 -7
- package/dist/Code/index.d.ts +1 -1
- package/dist/Code/index.js +3 -3
- package/dist/{Code-XnPuGxey.js → Code-Bg7GBdxy.js} +2 -1
- package/dist/{CodeBlock-BUM3czCS.js → CodeBlock-Caaflp7C.js} +7 -3
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-Cov3Pyq5.js → Collapsible-Bdj0WYpb.js} +13 -11
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-D6wYS30d.js → CommandPalette-C_MClfAg.js} +146 -62
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-Bil81sfq.js → ComplexSelector-BeVQaqRf.js} +94 -22
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-DdLJnxNN.js → ContextMenu-C6hPYvYz.js} +299 -179
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-u2XKccpK.js → DateInput-BjLdmYor.js} +567 -76
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-u7LhH6up.js → DateRangeInput-Br3wVEfD.js} +99 -28
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/DateTimeInput-CAZBwoRe.js +562 -0
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +2 -2
- package/dist/{Dialog-BiOSKQso.js → Dialog-Dce4Y97V.js} +28 -11
- package/dist/{Dialog-FGHfDu5M.js → Dialog-fhyxB00e.js} +32 -5
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Divider/index.js +1 -1
- package/dist/{Divider-BtwnL18I.js → Divider-mOZ6vIQw.js} +5 -1
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-SM_BEOgM.js → DropdownMenu-BdGmQVb1.js} +85 -57
- package/dist/{DropdownMenu-BEasdJ6R.js → DropdownMenu-BzQrNV9C.js} +481 -264
- package/dist/{DropdownMenuRadioItem.vue-CXEURBcq.d.ts → DropdownMenuRadioItem.vue-Qd-8Rg4Q.d.ts} +236 -230
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-C_GH7IV5.js → EmptyState-CmOQf2SH.js} +2 -2
- package/dist/Field/index.d.ts +4 -3
- package/dist/Field/index.js +4 -3
- package/dist/{Field-D5gUEGw4.js → Field--OEsLBfE.js} +4 -3
- package/dist/{FieldInfoTip-Ds-sW_jY.js → FieldInfoTip-gxsnfkZw.js} +3 -3
- package/dist/{FieldLabel-BNeXRuGH.js → FieldLabel-jxIiWgLw.js} +12 -7
- package/dist/FieldStatus/index.d.ts +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BpdiO1V8.js → FileInput-B_pUxB0Y.js} +106 -29
- package/dist/FormLayout/index.d.ts +1 -1
- package/dist/FormLayout/index.js +1 -1
- package/dist/{FormLayout-D47FjiOq.js → FormLayout-B9dUB6Ps.js} +1 -1
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BnwWEWkp.js → Heading-BzBunfN7.js} +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-ycY50pRN.js → HoverCard-BpJhT0sn.js} +35 -22
- package/dist/Icon/index.d.ts +4 -4
- package/dist/Icon/index.js +1 -1
- package/dist/{Icon-bteSId7T.js → Icon-KDnUyY7f.js} +12 -20
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-DDNgNl7B.js → IconButton-DI-XBbtV.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/Indicator/index.js +2 -1
- package/dist/InputClearButton-CwXPan8c.js +40 -0
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +2 -2
- package/dist/{InputGroup-CA03Smrs.js → InputGroup-DiiocoIW.js} +2 -2
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-DJay_w3B.js → InternationalizationProvider-kBapgKAQ.js} +5 -9
- package/dist/{Item-KhFKX9St.js → Item-DWMIjN8n.js} +34 -9
- package/dist/Kbd/index.js +1 -1
- package/dist/{Kbd-BB-Dw6zE.js → Kbd-CV3LO2Ge.js} +18 -2
- package/dist/LayerContentBoundary-CvsKxwwm.js +27 -0
- package/dist/LayerProvider/index.js +1 -1
- package/dist/{LayerProvider-D9NsQFzL.js → LayerProvider-B6zpMBWC.js} +15 -3
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-9X6eCUoY.js → Layout-JJRCG7Mf.js} +1 -1
- package/dist/{LayoutPanel-DeOh00p5.js → LayoutPanel-zM5vjrKS.js} +15 -8
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-DTF9EdTG.js → Lightbox-D8wyPgMK.js} +8 -6
- package/dist/Link/index.d.ts +2 -2
- package/dist/Link/index.js +1 -1
- package/dist/{Link-BqHCtiyt.js → Link-DweIpOtN.js} +29 -12
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-8RWT8XAG.js → ListItem-BQXMu1Tb.js} +1 -1
- package/dist/Markdown/index.d.ts +5 -2
- package/dist/Markdown/index.js +5 -2
- package/dist/Markdown/parser/index.d.ts +4 -0
- package/dist/Markdown/parser/index.js +3 -0
- package/dist/Markdown/plugin-protocol/index.d.ts +35 -0
- package/dist/Markdown/plugin-protocol/index.js +107 -0
- package/dist/Markdown/plugin-renderer/index.d.ts +31 -0
- package/dist/Markdown/plugin-renderer/index.js +42 -0
- package/dist/{Markdown-2CVyZDuB.js → Markdown-DhVfOvXk.js} +195 -484
- package/dist/MediaTheme-DlLqYhDy.js +433 -0
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-B-OelQlt.js → MetadataList-CEYceIlN.js} +15 -7
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-C3dkrM98.js → MobileNavToggle-pdoJFZHx.js} +60 -19
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-D1WFGqGU.js → MoreMenu-CFNqSRev.js} +87 -67
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/MultiSelector-DuVatmq5.js +1456 -0
- package/dist/{NavDisclosure-C_fugrQ3.js → NavDisclosure-Bq9DTZLO.js} +29 -7
- package/dist/{NavHeadingSurface-B3yJspSN.js → NavHeadingSurface-C4v_MtkX.js} +29 -26
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +2 -2
- package/dist/{NavItem-BBIGSvDj.js → NavItem-BPb3yfgz.js} +17 -4
- package/dist/NavMenu/index.d.ts +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-ThXguZAz.js → NavMenu-BYIDzjix.js} +42 -15
- package/dist/{NavMenuItem-BvJNsDFC.js → NavMenuItem-D3FO90GR.js} +14 -12
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-B0vzOg3N.js +727 -0
- package/dist/Outline/index.d.ts +2 -2
- package/dist/Outline/index.js +2 -2
- package/dist/{Outline-755h-lMP.js → Outline-CfGv2F1o.js} +91 -6
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-NmrSMbxb.js → OverflowList-BgRLZ3dh.js} +23 -6
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-Cc4BrjQg.js → Pagination-Bfe12018.js} +2 -2
- package/dist/PickerWheel-CSwUYfes.js +69 -0
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-CtoBfVlD.js → Popover-78dFjTb9.js} +28 -17
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DHoiObLn.js → PowerSearch-BoAMdFaT.js} +776 -586
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-CVLzdoBK.js → ProgressBar-VP4JS7vm.js} +10 -7
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-Bfu6JSNV.js → RadioGroup-BIipql-L.js} +94 -26
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-xY1cwLdZ.js → RadioList-GyhgBg4j.js} +57 -8
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-q4nD_586.js → ResizeHandle-TPlUCAHD.js} +103 -50
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/ScrollableArea/index.js +1 -1
- package/dist/{ScrollableArea-CJiaALHm.js → ScrollableArea-0u6RWtGG.js} +14 -3
- package/dist/Scrollbars/index.d.ts +2 -0
- package/dist/Scrollbars/index.js +3 -0
- package/dist/Scrollbars-D_93hJYK.js +75 -0
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-ChHmFrrC.js → SegmentedControl-D1wWGBZo.js} +11 -5
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-Bj5s_tIN.js → SelectableCard-BEqnhPaX.js} +17 -12
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-CPISLzp7.js +1049 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-Dtv8eA2j.js → SideNav-CN2QeAtY.js} +64 -41
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DWobsPgm.js → Slider-pdC0jpHu.js} +172 -46
- package/dist/Spinner/index.js +1 -1
- package/dist/Spinner-DdVUadii.js +200 -0
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stack/index.js +2 -2
- package/dist/{Stack-CjQEavuq.js → Stack-Bb_h60t3.js} +10 -3
- package/dist/{Stack-D_Bhs-3r.js → Stack-Bp-XN9J4.js} +20 -9
- package/dist/StatusDot/index.d.ts +1 -1
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-BPUhMOff.js → StatusDot-BS_ohXhd.js} +8 -4
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-CE8dHysu.js → Stepper-CyaSRSdu.js} +101 -79
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DaVPRxvN.js → Switch-Z2Vfiiic.js} +38 -22
- package/dist/TabList/index.d.ts +2 -2
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-DIkK9sgK.js → TabList-DRqP0Hrv.js} +205 -63
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +1 -1
- package/dist/{Table-hqZMmzfU.js → Table-BcrrylMX.js} +727 -448
- package/dist/Text/index.d.ts +2 -2
- package/dist/Text/index.js +1 -1
- package/dist/{Text-CV3LmscH.js → Text-CmTOgYXf.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Ab5Sw60T.js → TextArea-DA9CCG_J.js} +104 -50
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-zFT1_qgI.js → TextInput-CI96einV.js} +71 -38
- package/dist/Theme/index.d.ts +3 -3
- package/dist/Theme/index.js +3 -2
- package/dist/Theme-BbDT8B_C.js +2125 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-C3NnJUFG.js → Thumbnail-B2ZAY59J.js} +13 -10
- package/dist/{TimeField-ByiJKBRM.js → TimeField-CpAgja9D.js} +299 -40
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-S8n946tp.js → TimeInput-Bw_lHS4M.js} +78 -9
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-avMQk5DN.js → Timer-CH7GsEVu.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-xpQKCk0d.js → Timestamp-BFNuoTZ0.js} +5 -5
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/Toast-DwnPjx6j.js +685 -0
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-B-C-Q7XP.js → ToggleButton-cLjh9W-x.js} +5 -4
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-DsntTYhQ.js → Token-BfS4vi__.js} +32 -17
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-41p035dX.js → Tokenizer-Ci3E5bvP.js} +109 -23
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Toolbar/index.js +1 -1
- package/dist/{Toolbar-BrgvvTCk.js → Toolbar-C0pMWL4S.js} +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/{Tooltip-C4Vaqd3G.js → Tooltip-sAM8i1eO.js} +23 -19
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-CeSeEMX3.js → TopNav-gW59zp1o.js} +16 -15
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-BUz-KZJd.js → TreeList-DaoI7zaH.js} +124 -41
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-k3xhFxkr.js → Typeahead-D4JjvjK4.js} +125 -26
- package/dist/{TypeaheadMenu-DBW6rHeO.js → TypeaheadMenu-BQlMrfqX.js} +141 -51
- package/dist/{announce-Cnio10Wk.js → announce-B210eJVf.js} +17 -2
- package/dist/characterReferences-BJ-jLhsR.js +65 -0
- package/dist/characters-rcDbGt71.d.ts +29 -0
- package/dist/characters-wTnzjkkR.js +58 -0
- package/dist/{colorMode-CBgdgDSn.js → colorMode-BxqfDP4P.js} +1 -4
- package/dist/composables/index.d.ts +5 -4
- package/dist/composables/index.js +23 -18
- package/dist/{composables-CbKx9C1Y.js → composables-Bc02zKAO.js} +167 -197
- package/dist/context-B6UElI5X.js +5 -0
- package/dist/{context-Cfjh8te1.js → context-Cfml4jaK.js} +5 -3
- package/dist/{context-iABt_ueM.js → context-DWfi56sq.js} +451 -122
- package/dist/context-IvbU9c3T.js +8 -0
- package/dist/context-pjBxaMSh.js +28 -0
- package/dist/fieldParts--SyRZVQG.js +44 -0
- package/dist/fieldParts-LXpQMKE8.d.ts +27 -0
- package/dist/{focus-CpficIgf.js → focus-l8jVTcqd.js} +1 -1
- package/dist/hoverIntent-DMHGb85c.js +115 -0
- package/dist/{index-Cde5JvtX.d.ts → index-B-nESNam.d.ts} +8 -7
- package/dist/{index-CsNi1I8j.d.ts → index-B08-Uxhv.d.ts} +4 -2
- package/dist/{index-Cn-sSds-.d.ts → index-B56j4eI2.d.ts} +24 -1
- package/dist/{index-BJMJ09K-.d.ts → index-BEZ4ezJk.d.ts} +1 -1
- package/dist/{index-DeQwYJbg.d.ts → index-BNaRK-s5.d.ts} +10 -1
- package/dist/{index-CQCTKjIO.d.ts → index-BO9TY87G.d.ts} +5 -4
- package/dist/{index-BJSxFVXH.d.ts → index-BQEJj72c.d.ts} +21 -8
- package/dist/{index-BXk7Wng7.d.ts → index-BULhhnGf.d.ts} +1 -1
- package/dist/{index-D97pQbua.d.ts → index-BV2D2x_u.d.ts} +1 -1
- package/dist/{index-BPYzIIYn.d.ts → index-BZKgbyN9.d.ts} +2 -2
- package/dist/index-BkUkm6Al.d.ts +11 -0
- package/dist/{index-ClNU2Th8.d.ts → index-Bn-v89Vt.d.ts} +10 -6
- package/dist/{index-Bu8NA2SD.d.ts → index-BnEhvmdR.d.ts} +16 -7
- package/dist/index-Bo-ofFyg.d.ts +166 -0
- package/dist/{index-i0tNFWfz.d.ts → index-BqhgeAT4.d.ts} +2 -0
- package/dist/{index-DWh2WC8W.d.ts → index-C4Cjz6OK.d.ts} +2 -2
- package/dist/{index-B7yhzGUT.d.ts → index-C7sam-SB.d.ts} +2 -2
- package/dist/{index-BrJzFA5X.d.ts → index-C90l2rH1.d.ts} +1 -1
- package/dist/{index-vP0EtrJJ.d.ts → index-C9gAlDt_.d.ts} +6 -3
- package/dist/{index-csA1lH_0.d.ts → index-CJ6ajsUC.d.ts} +2 -2
- package/dist/{index-CY-KvZ9B.d.ts → index-CK-Dbh0f.d.ts} +1 -1
- package/dist/index-CKUfpmFL.d.ts +375 -0
- package/dist/{index-DXpSFlPG.d.ts → index-CKgBTAzC.d.ts} +4 -4
- package/dist/{index-EFqQF2Bx.d.ts → index-CPtDjmcX.d.ts} +4 -4
- package/dist/{index-12QYAbiz.d.ts → index-CRrSHbok.d.ts} +3 -2
- package/dist/{index-DG52Bg0W.d.ts → index-CTf3SK0b.d.ts} +6 -0
- package/dist/{index-BNy3SW4S.d.ts → index-CTjkJP4x.d.ts} +32 -3
- package/dist/{index-Ca8VIE4l.d.ts → index-CVn0GBdB.d.ts} +1 -1
- package/dist/{index-YKCx03zD.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-BUEPz7BL.d.ts → index-CikMzeab.d.ts} +3 -3
- package/dist/{index-CdtZjkmG.d.ts → index-CpNlPLBF.d.ts} +183 -129
- package/dist/{index-N7OVZ38M.d.ts → index-Cs1xsHKi.d.ts} +28 -16
- package/dist/{index-Cyb9Du5Z.d.ts → index-CtTGt6Dv.d.ts} +1 -1
- package/dist/{index-HV6W3xCx.d.ts → index-D05JGsT3.d.ts} +5 -2
- package/dist/{index-CsTbMVDS.d.ts → index-D0_HsuC3.d.ts} +4 -4
- package/dist/{index-BgT6mH3U.d.ts → index-D7ShT2c-.d.ts} +1 -1
- package/dist/{index-CkKPMIeX.d.ts → index-D7XRtUTY.d.ts} +9 -0
- package/dist/{index-TntQsADQ.d.ts → index-DEm3kRBO.d.ts} +4 -3
- package/dist/{index-DamRHh1i.d.ts → index-DLAG3m9W.d.ts} +11 -1
- package/dist/{index-DUnDGFQE.d.ts → index-DNA2l1RN.d.ts} +1 -1
- package/dist/{index-WnUY4Kxu.d.ts → index-DRJZ-v1E.d.ts} +4 -4
- package/dist/{index-DYp2RWkM.d.ts → index-DY8Wph-A.d.ts} +3 -3
- package/dist/{index-B1WJxt-n.d.ts → index-DfC05uKG.d.ts} +17 -7
- package/dist/{index-C5e-7Obr.d.ts → index-Dj1_1t3j.d.ts} +19 -6
- package/dist/{index-jW-mP58D.d.ts → index-Dr4b_oji.d.ts} +22 -15
- package/dist/{index-uKnRGtzi.d.ts → index-Ds201-d2.d.ts} +18 -4
- package/dist/{index-DIXAzTKL.d.ts → index-DxxudRgB.d.ts} +1 -1
- package/dist/{index-DQmK3Lq_.d.ts → index-IfsSCj8J.d.ts} +19 -6
- package/dist/{index-B1eCxBCY.d.ts → index-TXcNH86P.d.ts} +1 -1
- package/dist/{index-XuAAcYiP.d.ts → index-f3d9cVtj.d.ts} +1 -1
- package/dist/index-fAZaRruV.d.ts +125 -0
- package/dist/{index-D5N9ikrS.d.ts → index-hCpxKePE.d.ts} +1 -1
- package/dist/{index-T2FOcOuI.d.ts → index-jOwU3YoR.d.ts} +400 -90
- package/dist/{index-DdGck82Y.d.ts → index-pNtfr-RW.d.ts} +2 -2
- package/dist/{index-BhpAUzUr.d.ts → index-unAZVFGz.d.ts} +2 -2
- package/dist/index.d.ts +84 -77
- package/dist/index.js +151 -134
- package/dist/inlineSize-BNe8wggI.js +66 -0
- package/dist/inputPresentation-BOyHkCDr.js +62 -0
- package/dist/interactionModality-ACpTMhak.js +44 -0
- package/dist/isApplePlatform-B1ju6F5B.js +27 -0
- package/dist/isRenderable-BnKHIqfd.js +21 -0
- package/dist/layerDepth-CNDh-IHb.js +181 -0
- package/dist/link-DuuA2eCL.js +30 -0
- package/dist/{loadCatalog-BGHKG_9N.d.ts → loadCatalog-DlLFZreI.d.ts} +281 -7
- package/dist/loadCatalog-eopw74qb.js +424 -0
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -3
- package/dist/locale-CabGJlGp.js +343 -0
- package/dist/modalOutlet-CUOcrhIu.js +56 -0
- package/dist/optionAction-Cg7xQLUA.d.ts +6 -0
- package/dist/{power-search-DrDfcoL1.d.ts → power-search-gHLIYXs5.d.ts} +2 -0
- package/dist/protocol-DHxY0NI8.js +113 -0
- package/dist/protocol-RSeMzAN1.d.ts +238 -0
- package/dist/publicParser-B0MRoikr.d.ts +141 -0
- package/dist/publicParser-uHC_T0Fo.js +895 -0
- package/dist/resizableChannel-3vivrEcT.js +20 -0
- package/dist/safeUrl-CsvfcZ9m.js +54 -0
- package/dist/scopedProvide-C-Df7c15.js +30 -0
- package/dist/scrollKeyboardDelegation-D7cumnOl.js +238 -0
- package/dist/scrollLock-C3aT4-0z.js +102 -0
- package/dist/{searchResultMessage-hXXNOFJP.js → searchResultMessage-mCpJBvra.js} +5 -14
- package/dist/{semantic-CKH9XVqa.d.ts → semantic-BF_AjLvk.d.ts} +6 -3
- package/dist/slug-C65CUsf9.js +32 -0
- package/dist/syntaxContext-DmIfNNtb.js +4 -0
- package/dist/triggerVariant-BsL8jMHs.js +16 -0
- package/dist/{types-0Q_SJv_F.d.ts → types-Bb7OGivY.d.ts} +6 -1
- package/dist/{types-H4Bbbxiw.d.ts → types-BnNTzEnd.d.ts} +1 -1
- package/dist/{types-CwyibrRB.d.ts → types-C5GQ2KCK.d.ts} +23 -3
- package/dist/{types-BBWrcHMD.d.ts → types-Ckih2YJi.d.ts} +3 -2
- package/dist/{types-gKsEkk2g.d.ts → types-CsqwQkf1.d.ts} +143 -10
- package/dist/upstreamMap-xr3gvREu.js +731 -0
- package/dist/{useAnchoredListbox-DwztMNjP.js → useAnchoredListbox-DGxxKHZb.js} +2 -2
- package/dist/{useAsyncSource-xpQovjV_.d.ts → useAsyncSource-aGzrvRkI.d.ts} +3 -0
- package/dist/{useClickableContainer-DyNpnSEa.js → useClickableContainer-CdGp_Cev.js} +1 -1
- package/dist/{useClipboard-BDfbEsWd.js → useClipboard-Dk8cS810.js} +1 -1
- package/dist/useHoverLayerDismiss-kYJ_NqL4.js +27 -0
- package/dist/{useIndicator-i1NORM7W.js → useIndicator-MZmfBWid.js} +5 -23
- package/dist/{useInputContainer-CpgDe2-4.js → useInputContainer-CLcYrby4.js} +1 -1
- package/dist/{useInputStatusIcon-DBOwxV4x.js → useInputStatusIcon-DAE7PExr.js} +1 -1
- package/dist/useLayerMountTarget-BmZyeKWE.js +156 -0
- package/dist/{useListFocus-D0iOJl39.js → useListFocus-ChxLg0b4.js} +3 -2
- package/dist/{useMenuDrillIn-DzKGkTho.js → useMenuDrillIn-DhUnPvKs.js} +6 -5
- package/dist/useMenuHover-Djreu23i.js +170 -0
- package/dist/useMenuPress-8foxY8z4.js +764 -0
- package/dist/{useMergedRefs-CfHHlCsn.js → useMergedRefs-Cb6_w93m.js} +24 -4
- package/dist/{useNumberField-4-dIGVed.js → useNumberField-Dk1BE3-K.js} +3 -3
- package/dist/useOptionActionGrid-CkJcuvaU.js +97 -0
- package/dist/{usePositionedLayer-Cru9_00b.js → usePositionedLayer-B7cvG-_v.js} +43 -49
- package/dist/usePressFeedback-BJCpjEpv.js +319 -0
- package/dist/{useResizable-DDwPpPe6.d.ts → useResizable-1MHPNaRD.d.ts} +19 -1
- package/dist/{useResizable-B3ahKLoZ.js → useResizable-I3BCiLSL.js} +72 -40
- package/dist/useResolvedLabelHidden-B2rlWiaI.js +30 -0
- package/dist/{useRestoreFocus-Djw9RUIf.js → useRestoreFocus-XEKs5-gp.js} +49 -7
- package/dist/useScrollOverflow-DuMoGXmm.js +67 -0
- package/dist/useScrollableArea-BE8b3qm7.js +222 -0
- package/dist/useScrollbars-C2NJ6Qwq.js +43 -0
- package/dist/{useTimeValue-6ufHM15W.js → useTimeValue-BJd0xBhG.js} +4 -22
- package/dist/useTranslator-BmWt2BBt.js +35 -0
- package/dist/{useTypeahead-PAK8lMYz.js → useTypeahead-BvtflkRk.js} +4 -5
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +5 -0
- package/dist/{utils-D33VQDnk.js → utils-ClVseK2w.js} +29 -2
- package/dist/utils-z3Q6BGIJ.js +819 -0
- package/locales/SOURCE.json +1 -1
- package/package.json +24 -3
- package/reset.css +364 -1
- package/styles/avatar-group.css +9 -1
- package/styles/badge.css +8 -5
- package/styles/banner.css +124 -26
- package/styles/blockquote.css +1 -0
- package/styles/bordered-control.css +1 -1
- package/styles/bottom-sheet.css +74 -6
- package/styles/breadcrumbs.css +16 -2
- package/styles/button-group.css +3 -1
- package/styles/button.css +53 -11
- package/styles/card.css +1 -1
- package/styles/chat.css +16 -6
- package/styles/checkbox-input.css +10 -0
- package/styles/clickable-card.css +10 -3
- package/styles/collapsible.css +12 -5
- package/styles/command-palette.css +29 -14
- package/styles/complex-selector.css +22 -5
- package/styles/context-menu.css +3 -3
- package/styles/date-input.css +111 -1
- package/styles/dialog-header.css +4 -1
- package/styles/dialog.css +7 -0
- package/styles/dropdown-menu.css +12 -3
- package/styles/field.css +5 -0
- package/styles/form-layout.css +1 -0
- package/styles/heading.css +18 -8
- package/styles/icon.css +4 -0
- package/styles/kbd.css +1 -1
- package/styles/layer.css +72 -0
- package/styles/list.css +9 -2
- package/styles/metadata-list.css +1 -0
- package/styles/mobile-nav.css +4 -1
- package/styles/multi-selector.css +48 -1
- package/styles/nav-item.css +9 -2
- package/styles/nav-menu.css +12 -2
- package/styles/number-input.css +9 -1
- package/styles/overflow-list.css +1 -1
- package/styles/popover.css +2 -1
- package/styles/power-search.css +5 -3
- package/styles/pressable.css +63 -22
- package/styles/progress-bar.css +15 -3
- package/styles/radio.css +16 -0
- package/styles/resize-handle.css +42 -0
- package/styles/scrollbars.css +28 -0
- package/styles/segmented-control.css +12 -4
- package/styles/selector.css +53 -1
- package/styles/side-nav.css +19 -0
- package/styles/slider.css +4 -3
- package/styles/spinner.css +48 -42
- package/styles/stepper.css +58 -4
- package/styles/switch.css +26 -0
- package/styles/tab-list.css +132 -3
- package/styles/table.css +88 -10
- package/styles/text-area.css +1 -1
- package/styles/text-input.css +1 -1
- package/styles/text.css +6 -6
- package/styles/thumbnail.css +11 -3
- package/styles/time-input.css +8 -0
- package/styles/toast.css +37 -3
- package/styles/token.css +2 -2
- package/styles/tokenizer.css +1 -1
- package/styles/toolbar.css +4 -1
- package/styles/tree-list.css +1 -1
- package/styles/typeahead.css +34 -1
- package/styles.css +1 -0
- package/dist/Blockquote-DFqBv_oJ.js +0 -18
- package/dist/Breadcrumbs-DPVaziH4.js +0 -141
- package/dist/ButtonGroup-ySQWanDP.js +0 -125
- package/dist/DateTimeInput-DHp683jZ.js +0 -268
- package/dist/MultiSelector-BeV98x7X.js +0 -988
- package/dist/NumberInput-AZ9x3oja.js +0 -473
- package/dist/Selector-DuVozKNq.js +0 -675
- package/dist/Spinner-9cYUCnDy.js +0 -84
- package/dist/Theme-CtaUWo4g.js +0 -1246
- package/dist/Toast-BuqIZV5z.js +0 -322
- package/dist/context-4PuqD1Ic.js +0 -4
- package/dist/context-D5-MwxnN.js +0 -4
- package/dist/index-BH9PzQ1F.d.ts +0 -87
- package/dist/link-C4_WogdF.js +0 -18
- package/dist/loadCatalog-CXKqEB9s.js +0 -877
- package/dist/locale-DgkZEMTn.js +0 -105
- package/dist/platform-B_9W_aHW.js +0 -33
- package/dist/scrollLock-BzIvIimL.js +0 -42
- package/dist/useMenuPress-D-FRNrBW.js +0 -573
- package/dist/useScrollableArea-DDk_CluT.js +0 -172
- /package/dist/{index-lgvUFSCO.d.ts → index-CryFtTT6.d.ts} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as BottomSheetMotion, c as BottomSheetPurpose, d as BottomSheetState, i as BottomSheetHeight, l as BottomSheetSlots, n as _default, o as BottomSheetPadding, r as BottomSheetEmits, s as BottomSheetProps, t as _default$1, u as BottomSheetSnapPoint } from "../index-
|
|
1
|
+
import { a as BottomSheetMotion, c as BottomSheetPurpose, d as BottomSheetState, i as BottomSheetHeight, l as BottomSheetSlots, n as _default, o as BottomSheetPadding, r as BottomSheetEmits, s as BottomSheetProps, t as _default$1, u as BottomSheetSnapPoint } from "../index-BO9TY87G.js";
|
|
2
2
|
export { _default as BottomSheet, type BottomSheetEmits, type BottomSheetHeight, type BottomSheetMotion, type BottomSheetPadding, type BottomSheetProps, type BottomSheetPurpose, type BottomSheetSlots, type BottomSheetSnapPoint, type BottomSheetState, _default$1 as BottomSheetSwitcher };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../BottomSheet-
|
|
2
|
-
import { t as _sfc_main$1 } from "../BottomSheet-
|
|
1
|
+
import { t as _sfc_main } from "../BottomSheet-B4sc3F1S.js";
|
|
2
|
+
import { t as _sfc_main$1 } from "../BottomSheet-m54uCMJN.js";
|
|
3
3
|
export { _sfc_main as BottomSheet, _sfc_main$1 as BottomSheetSwitcher };
|
|
@@ -1,7 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
1
|
+
import { r as resetLayerScopedContext } from "./scopedProvide-C-Df7c15.js";
|
|
2
|
+
import { a as isImeKeyEvent, i as pushLayer, n as useLayerDepth, r as isTopLayer, t as provideLayerDepth } from "./layerDepth-CNDh-IHb.js";
|
|
3
|
+
import { n as useFocusTrap, r as focusForLastInput, t as useRestoreFocus } from "./useRestoreFocus-XEKs5-gp.js";
|
|
4
|
+
import { t as attachScrollKeyboardDelegation } from "./scrollKeyboardDelegation-D7cumnOl.js";
|
|
5
|
+
import { t as useScrollLock } from "./scrollLock-C3aT4-0z.js";
|
|
6
|
+
import { t as useScrollbars } from "./useScrollbars-C2NJ6Qwq.js";
|
|
7
|
+
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUpdated, openBlock, ref, renderSlot, toValue, unref, useAttrs, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
4
8
|
import "../styles/bottom-sheet.css";
|
|
9
|
+
//#region src/BottomSheet/sheetTransition.ts
|
|
10
|
+
const BACKSTOP_BUFFER_MS = 50;
|
|
11
|
+
function parseTransitionTime(value) {
|
|
12
|
+
const normalized = value.trim();
|
|
13
|
+
if (!/^-?(?:\d+|\d*\.\d+)(?:ms|s)$/.test(normalized)) return null;
|
|
14
|
+
const time = Number.parseFloat(normalized);
|
|
15
|
+
return normalized.endsWith("ms") ? time : time * 1e3;
|
|
16
|
+
}
|
|
17
|
+
/** Longest transition duration + delay that applies to `property`, in ms. */
|
|
18
|
+
function transitionMsFor(element, property) {
|
|
19
|
+
const style = getComputedStyle(element);
|
|
20
|
+
const properties = (style.transitionProperty || "").split(",").map((value) => value.trim());
|
|
21
|
+
const durations = (style.transitionDuration || "").split(",").map(parseTransitionTime);
|
|
22
|
+
const delays = (style.transitionDelay || "").split(",").map((value) => parseTransitionTime(value) ?? 0);
|
|
23
|
+
return properties.reduce((longest, name, index) => {
|
|
24
|
+
if (name !== property && name !== "all") return longest;
|
|
25
|
+
const duration = durations[index % durations.length];
|
|
26
|
+
if (duration == null) return longest;
|
|
27
|
+
return Math.max(longest, duration + (delays[index % delays.length] ?? 0));
|
|
28
|
+
}, 0);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Calls `complete` when `element` finishes transitioning `property`: on the
|
|
32
|
+
* matching `transitionend`/`transitioncancel`, or on a timer backstop so a
|
|
33
|
+
* missed event can never strand the caller. Without a resolved duration — the
|
|
34
|
+
* case in a stylesheet-free test environment — it completes immediately.
|
|
35
|
+
*/
|
|
36
|
+
function waitForTransition(element, property, complete) {
|
|
37
|
+
if (element == null) {
|
|
38
|
+
complete();
|
|
39
|
+
return () => {};
|
|
40
|
+
}
|
|
41
|
+
let done = false;
|
|
42
|
+
let timer = null;
|
|
43
|
+
let onTransitionEnd = () => {};
|
|
44
|
+
const finish = () => {
|
|
45
|
+
if (done) return;
|
|
46
|
+
done = true;
|
|
47
|
+
if (timer != null) clearTimeout(timer);
|
|
48
|
+
element.removeEventListener("transitionend", onTransitionEnd);
|
|
49
|
+
element.removeEventListener("transitioncancel", onTransitionEnd);
|
|
50
|
+
complete();
|
|
51
|
+
};
|
|
52
|
+
onTransitionEnd = (event) => {
|
|
53
|
+
if (event.target === element && event.propertyName === property) finish();
|
|
54
|
+
};
|
|
55
|
+
const duration = transitionMsFor(element, property);
|
|
56
|
+
if (duration <= 0) {
|
|
57
|
+
finish();
|
|
58
|
+
return () => {};
|
|
59
|
+
}
|
|
60
|
+
element.addEventListener("transitionend", onTransitionEnd);
|
|
61
|
+
element.addEventListener("transitioncancel", onTransitionEnd);
|
|
62
|
+
timer = setTimeout(finish, duration + BACKSTOP_BUFFER_MS);
|
|
63
|
+
return () => {
|
|
64
|
+
if (timer != null) clearTimeout(timer);
|
|
65
|
+
element.removeEventListener("transitionend", onTransitionEnd);
|
|
66
|
+
element.removeEventListener("transitioncancel", onTransitionEnd);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
5
69
|
/** Scrim opacity at the peek stop: dimmed, never clear, because the sheet stays modal. */
|
|
6
70
|
const MIN_PEEK_SCRIM_OPACITY = .3;
|
|
7
71
|
const SNAP_POINT_PATTERN = /^(\d+(?:\.\d+)?|\.\d+)(px|%)$/i;
|
|
@@ -84,9 +148,6 @@ function resolveSettleOffset(value, offsets, dir, baseOffset) {
|
|
|
84
148
|
function visibleHeightForOffset(sheetHeight, offset, offscreenBlockEndInset) {
|
|
85
149
|
return Math.max(0, sheetHeight - offscreenBlockEndInset - offset);
|
|
86
150
|
}
|
|
87
|
-
/** A throw this fast, over at least `FLICK_MIN_DISTANCE`, dismisses or expands outright. */
|
|
88
|
-
const FLICK_VELOCITY = 1.2;
|
|
89
|
-
const FLICK_MIN_DISTANCE = 48;
|
|
90
151
|
/** Below the shortest stop, dragging past it by this share of its height dismisses. */
|
|
91
152
|
const DISMISS_OVERSHOOT_RATIO = .4;
|
|
92
153
|
/** Within this many px of a stop the live drag eases toward it. */
|
|
@@ -94,68 +155,7 @@ const MAGNET_RANGE = 40;
|
|
|
94
155
|
/** Rubber-band factor and ceiling for dragging above the fully open position. */
|
|
95
156
|
const OVERSCROLL_RESISTANCE = .35;
|
|
96
157
|
const OVERSCROLL_MAX = 48;
|
|
97
|
-
/** How far a finger on the body must pull before it becomes a sheet drag. */
|
|
98
|
-
const DRAG_PROMOTION_SLOP = 8;
|
|
99
158
|
const VELOCITY_WINDOW_MS = 100;
|
|
100
|
-
const BACKSTOP_BUFFER_MS = 50;
|
|
101
|
-
function parseTransitionTime(value) {
|
|
102
|
-
const normalized = value.trim();
|
|
103
|
-
if (!/^-?(?:\d+|\d*\.\d+)(?:ms|s)$/.test(normalized)) return null;
|
|
104
|
-
const time = Number.parseFloat(normalized);
|
|
105
|
-
return normalized.endsWith("ms") ? time : time * 1e3;
|
|
106
|
-
}
|
|
107
|
-
/** Longest transition duration + delay that applies to `property`, in ms. */
|
|
108
|
-
function transitionMsFor(element, property) {
|
|
109
|
-
const style = getComputedStyle(element);
|
|
110
|
-
const properties = (style.transitionProperty || "").split(",").map((value) => value.trim());
|
|
111
|
-
const durations = (style.transitionDuration || "").split(",").map(parseTransitionTime);
|
|
112
|
-
const delays = (style.transitionDelay || "").split(",").map((value) => parseTransitionTime(value) ?? 0);
|
|
113
|
-
return properties.reduce((longest, name, index) => {
|
|
114
|
-
if (name !== property && name !== "all") return longest;
|
|
115
|
-
const duration = durations[index % durations.length];
|
|
116
|
-
if (duration == null) return longest;
|
|
117
|
-
return Math.max(longest, duration + (delays[index % delays.length] ?? 0));
|
|
118
|
-
}, 0);
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Calls `complete` when `element` finishes transitioning `property`: on the
|
|
122
|
-
* matching `transitionend`/`transitioncancel`, or on a timer backstop so a
|
|
123
|
-
* missed event can never strand the caller. Without a resolved duration — the
|
|
124
|
-
* case in a stylesheet-free test environment — it completes immediately.
|
|
125
|
-
*/
|
|
126
|
-
function waitForTransition(element, property, complete) {
|
|
127
|
-
if (element == null) {
|
|
128
|
-
complete();
|
|
129
|
-
return () => {};
|
|
130
|
-
}
|
|
131
|
-
let done = false;
|
|
132
|
-
let timer = null;
|
|
133
|
-
let onTransitionEnd = () => {};
|
|
134
|
-
const finish = () => {
|
|
135
|
-
if (done) return;
|
|
136
|
-
done = true;
|
|
137
|
-
if (timer != null) clearTimeout(timer);
|
|
138
|
-
element.removeEventListener("transitionend", onTransitionEnd);
|
|
139
|
-
element.removeEventListener("transitioncancel", onTransitionEnd);
|
|
140
|
-
complete();
|
|
141
|
-
};
|
|
142
|
-
onTransitionEnd = (event) => {
|
|
143
|
-
if (event.target === element && event.propertyName === property) finish();
|
|
144
|
-
};
|
|
145
|
-
const duration = transitionMsFor(element, property);
|
|
146
|
-
if (duration <= 0) {
|
|
147
|
-
finish();
|
|
148
|
-
return () => {};
|
|
149
|
-
}
|
|
150
|
-
element.addEventListener("transitionend", onTransitionEnd);
|
|
151
|
-
element.addEventListener("transitioncancel", onTransitionEnd);
|
|
152
|
-
timer = setTimeout(finish, duration + BACKSTOP_BUFFER_MS);
|
|
153
|
-
return () => {
|
|
154
|
-
if (timer != null) clearTimeout(timer);
|
|
155
|
-
element.removeEventListener("transitionend", onTransitionEnd);
|
|
156
|
-
element.removeEventListener("transitioncancel", onTransitionEnd);
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
159
|
function magnetize(value, targets) {
|
|
160
160
|
if (targets.length === 0) return value;
|
|
161
161
|
let nearest = targets[0];
|
|
@@ -180,6 +180,104 @@ function hapticTick() {
|
|
|
180
180
|
if (typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
181
181
|
navigator.vibrate(8);
|
|
182
182
|
}
|
|
183
|
+
/** Finger speed over the last `VELOCITY_WINDOW_MS`, in px/ms. */
|
|
184
|
+
function velocityFor(samples, lastY, lastT, startY, startT) {
|
|
185
|
+
const first = samples.filter((sample) => lastT - sample.t <= VELOCITY_WINDOW_MS)[0] ?? {
|
|
186
|
+
y: startY,
|
|
187
|
+
t: startT
|
|
188
|
+
};
|
|
189
|
+
const elapsed = lastT - first.t;
|
|
190
|
+
return elapsed > 0 ? (lastY - first.y) / elapsed : 0;
|
|
191
|
+
}
|
|
192
|
+
/** Live offset for a drag, rubber-banding above fully open and easing near a stop. */
|
|
193
|
+
function dragOffsetFrom(baseOffset, delta, stops) {
|
|
194
|
+
let offset = baseOffset + delta;
|
|
195
|
+
if (offset < 0) offset = -Math.min(-offset * OVERSCROLL_RESISTANCE, OVERSCROLL_MAX);
|
|
196
|
+
return {
|
|
197
|
+
raw: offset,
|
|
198
|
+
shown: magnetize(offset, stops)
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
/** Offset past which a slow downward drag dismisses instead of snapping back. */
|
|
202
|
+
function dismissTravelFor(height, offsets) {
|
|
203
|
+
const maxOffset = offsets[offsets.length - 1] ?? 0;
|
|
204
|
+
return maxOffset + visibleHeightForOffset(height, maxOffset, 48) * DISMISS_OVERSHOOT_RATIO;
|
|
205
|
+
}
|
|
206
|
+
function hasBlockScroll(element) {
|
|
207
|
+
return element.scrollHeight > element.clientHeight + 1;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Whether every scroller from `target` up to `root` is at its block edge.
|
|
211
|
+
* A nested box that can still scroll keeps the gesture; the sheet does not
|
|
212
|
+
* take it until that box has nowhere left to go.
|
|
213
|
+
*/
|
|
214
|
+
function blockScrollEdges(root, target) {
|
|
215
|
+
let atTop = true;
|
|
216
|
+
let atBottom = true;
|
|
217
|
+
let node = target instanceof Element ? target : root;
|
|
218
|
+
while (node != null) {
|
|
219
|
+
if (node instanceof HTMLElement && hasBlockScroll(node)) {
|
|
220
|
+
if (node.scrollTop > 1) atTop = false;
|
|
221
|
+
if (node.scrollTop + node.clientHeight < node.scrollHeight - 1) atBottom = false;
|
|
222
|
+
}
|
|
223
|
+
if (node === root) break;
|
|
224
|
+
node = node.parentElement;
|
|
225
|
+
}
|
|
226
|
+
return {
|
|
227
|
+
atTop,
|
|
228
|
+
atBottom
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
//#endregion
|
|
232
|
+
//#region src/BottomSheet/sheetPointerSession.ts
|
|
233
|
+
/** Window pointer listeners plus the body's non-passive touch listeners. */
|
|
234
|
+
function createSheetPointerSession(handlers) {
|
|
235
|
+
let body = null;
|
|
236
|
+
let listening = false;
|
|
237
|
+
function attach() {
|
|
238
|
+
if (listening || typeof window === "undefined") return;
|
|
239
|
+
listening = true;
|
|
240
|
+
window.addEventListener("pointermove", handlers.onPointerMove);
|
|
241
|
+
window.addEventListener("pointerup", handlers.onPointerUp);
|
|
242
|
+
window.addEventListener("pointercancel", handlers.onPointerCancel);
|
|
243
|
+
}
|
|
244
|
+
function detach() {
|
|
245
|
+
if (!listening || typeof window === "undefined") return;
|
|
246
|
+
listening = false;
|
|
247
|
+
window.removeEventListener("pointermove", handlers.onPointerMove);
|
|
248
|
+
window.removeEventListener("pointerup", handlers.onPointerUp);
|
|
249
|
+
window.removeEventListener("pointercancel", handlers.onPointerCancel);
|
|
250
|
+
}
|
|
251
|
+
function unbind(element) {
|
|
252
|
+
element.removeEventListener("touchstart", handlers.onTouchStart);
|
|
253
|
+
element.removeEventListener("touchmove", handlers.onTouchMove);
|
|
254
|
+
element.removeEventListener("touchend", handlers.onTouchEnd);
|
|
255
|
+
element.removeEventListener("touchcancel", handlers.onTouchEnd);
|
|
256
|
+
}
|
|
257
|
+
function setBody(element) {
|
|
258
|
+
if (body != null) unbind(body);
|
|
259
|
+
body = element;
|
|
260
|
+
if (element == null) return;
|
|
261
|
+
element.addEventListener("touchstart", handlers.onTouchStart, { passive: true });
|
|
262
|
+
element.addEventListener("touchmove", handlers.onTouchMove, { passive: false });
|
|
263
|
+
element.addEventListener("touchend", handlers.onTouchEnd);
|
|
264
|
+
element.addEventListener("touchcancel", handlers.onTouchEnd);
|
|
265
|
+
}
|
|
266
|
+
function destroy() {
|
|
267
|
+
detach();
|
|
268
|
+
setBody(null);
|
|
269
|
+
if (typeof window !== "undefined") window.removeEventListener("blur", handlers.onWindowBlur);
|
|
270
|
+
}
|
|
271
|
+
if (typeof window !== "undefined") window.addEventListener("blur", handlers.onWindowBlur);
|
|
272
|
+
return {
|
|
273
|
+
attach,
|
|
274
|
+
detach,
|
|
275
|
+
setBody,
|
|
276
|
+
destroy
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region src/BottomSheet/useSheetGestures.ts
|
|
183
281
|
/** Drag, snap, and settle behavior of the sheet panel. */
|
|
184
282
|
function useSheetGestures(options) {
|
|
185
283
|
const { panel, body, isOpen, canDismiss, getSnapHeights, onScrimOpacity, onSnap, onDismiss } = options;
|
|
@@ -194,8 +292,10 @@ function useSheetGestures(options) {
|
|
|
194
292
|
const sheetHeight = ref(0);
|
|
195
293
|
let dragState = null;
|
|
196
294
|
let pendingBody = null;
|
|
295
|
+
let touchArming = null;
|
|
197
296
|
let reconcileToken = 0;
|
|
198
297
|
let observer = null;
|
|
298
|
+
let session;
|
|
199
299
|
const activeOffset = computed(() => isDragging.value ? dragOffset.value : settledOffset.value);
|
|
200
300
|
function measureNaturalHeight() {
|
|
201
301
|
const element = panel.value;
|
|
@@ -219,10 +319,6 @@ function useSheetGestures(options) {
|
|
|
219
319
|
peekOffset: peekOffsetFor(offsets, visible)
|
|
220
320
|
};
|
|
221
321
|
}
|
|
222
|
-
function dismissOffsetFor(detents) {
|
|
223
|
-
const maxOffset = detents.offsets[detents.offsets.length - 1] ?? 0;
|
|
224
|
-
return maxOffset + visibleHeightForOffset(detents.height, maxOffset, 48) * DISMISS_OVERSHOOT_RATIO;
|
|
225
|
-
}
|
|
226
322
|
async function reconcileLayout(targetLayoutOffset) {
|
|
227
323
|
const token = ++reconcileToken;
|
|
228
324
|
isReconciling.value = true;
|
|
@@ -236,7 +332,7 @@ function useSheetGestures(options) {
|
|
|
236
332
|
}
|
|
237
333
|
function settleAt(target, fromOffset, detents) {
|
|
238
334
|
const targetLayoutOffset = target === detents.peekOffset ? 0 : target;
|
|
239
|
-
const dismissOffset =
|
|
335
|
+
const dismissOffset = dismissTravelFor(detents.height, detents.offsets);
|
|
240
336
|
settledOffset.value = target;
|
|
241
337
|
scrollPreservationInset.value = Math.max(0, fromOffset - targetLayoutOffset - naturalEndGapFor(body.value));
|
|
242
338
|
scrimOpacity.value = scrimOpacityForOffset(target, detents.offsets, dismissOffset, detents.peekOffset);
|
|
@@ -257,14 +353,6 @@ function useSheetGestures(options) {
|
|
|
257
353
|
}
|
|
258
354
|
settleAt(detents.offsets[detents.offsets.length - 1] ?? 0, fromOffset, detents);
|
|
259
355
|
}
|
|
260
|
-
function velocityFor(state) {
|
|
261
|
-
const first = state.samples.filter((sample) => state.lastT - sample.t <= VELOCITY_WINDOW_MS)[0] ?? {
|
|
262
|
-
y: state.startY,
|
|
263
|
-
t: state.startT
|
|
264
|
-
};
|
|
265
|
-
const elapsed = state.lastT - first.t;
|
|
266
|
-
return elapsed > 0 ? (state.lastY - first.y) / elapsed : 0;
|
|
267
|
-
}
|
|
268
356
|
function updateDrag(clientY, timeStamp) {
|
|
269
357
|
const state = dragState;
|
|
270
358
|
if (!state) return;
|
|
@@ -277,11 +365,10 @@ function useSheetGestures(options) {
|
|
|
277
365
|
});
|
|
278
366
|
state.travel = Math.max(state.travel, Math.abs(delta));
|
|
279
367
|
state.dir = delta === 0 ? 0 : Math.sign(delta);
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
scrimOpacity.value = scrimOpacityForOffset(offset, state.offsets, dismissOffsetFor(state), state.peekOffset);
|
|
368
|
+
const next = dragOffsetFrom(state.baseOffset, delta, state.offsets);
|
|
369
|
+
state.rawOffset = next.raw;
|
|
370
|
+
dragOffset.value = next.shown;
|
|
371
|
+
scrimOpacity.value = scrimOpacityForOffset(next.raw, state.offsets, dismissTravelFor(state.height, state.offsets), state.peekOffset);
|
|
285
372
|
onScrimOpacity(scrimOpacity.value);
|
|
286
373
|
}
|
|
287
374
|
function beginDrag(pointerId, clientY, timeStamp) {
|
|
@@ -308,11 +395,11 @@ function useSheetGestures(options) {
|
|
|
308
395
|
function endDrag() {
|
|
309
396
|
const state = dragState;
|
|
310
397
|
dragState = null;
|
|
311
|
-
|
|
398
|
+
session.detach();
|
|
312
399
|
if (!state) return;
|
|
313
400
|
isDragging.value = false;
|
|
314
|
-
const velocity = velocityFor(state);
|
|
315
|
-
const isFlick = Math.abs(velocity) >
|
|
401
|
+
const velocity = velocityFor(state.samples, state.lastY, state.lastT, state.startY, state.startT);
|
|
402
|
+
const isFlick = Math.abs(velocity) > 1.2 && state.travel > 48;
|
|
316
403
|
if (state.dir > 0 && isFlick) {
|
|
317
404
|
dismissOrSettleShortest(state.baseOffset, state);
|
|
318
405
|
return;
|
|
@@ -321,7 +408,7 @@ function useSheetGestures(options) {
|
|
|
321
408
|
settleAt(0, state.baseOffset, state);
|
|
322
409
|
return;
|
|
323
410
|
}
|
|
324
|
-
if (state.rawOffset >
|
|
411
|
+
if (state.rawOffset > dismissTravelFor(state.height, state.offsets)) {
|
|
325
412
|
dismissOrSettleShortest(state.baseOffset, state);
|
|
326
413
|
return;
|
|
327
414
|
}
|
|
@@ -330,18 +417,25 @@ function useSheetGestures(options) {
|
|
|
330
417
|
function cancelDrag() {
|
|
331
418
|
const state = dragState;
|
|
332
419
|
pendingBody = null;
|
|
420
|
+
touchArming = null;
|
|
333
421
|
dragState = null;
|
|
334
|
-
|
|
422
|
+
session.detach();
|
|
335
423
|
if (!state) return;
|
|
336
424
|
isDragging.value = false;
|
|
337
425
|
dragOffset.value = state.baseOffset;
|
|
338
426
|
settledOffset.value = state.baseOffset;
|
|
339
|
-
scrimOpacity.value = scrimOpacityForOffset(state.baseOffset, state.offsets,
|
|
427
|
+
scrimOpacity.value = scrimOpacityForOffset(state.baseOffset, state.offsets, dismissTravelFor(state.height, state.offsets), state.peekOffset);
|
|
340
428
|
onScrimOpacity(scrimOpacity.value);
|
|
341
429
|
}
|
|
430
|
+
/** A second finger is a pinch. The browser keeps the zoom; the sheet lets go. */
|
|
431
|
+
function yieldToPinch(pointerId) {
|
|
432
|
+
if (dragState == null || dragState.pointerId === pointerId) return false;
|
|
433
|
+
cancelDrag();
|
|
434
|
+
return true;
|
|
435
|
+
}
|
|
342
436
|
function onPointerMove(event) {
|
|
343
437
|
if (dragState != null) {
|
|
344
|
-
if (
|
|
438
|
+
if (yieldToPinch(event.pointerId)) return;
|
|
345
439
|
if (event.cancelable) event.preventDefault();
|
|
346
440
|
updateDrag(event.clientY, event.timeStamp);
|
|
347
441
|
return;
|
|
@@ -349,12 +443,12 @@ function useSheetGestures(options) {
|
|
|
349
443
|
const pending = pendingBody;
|
|
350
444
|
if (pending == null || pending.pointerId !== event.pointerId) return;
|
|
351
445
|
const delta = event.clientY - pending.startY;
|
|
352
|
-
if (Math.abs(delta) <
|
|
446
|
+
if (Math.abs(delta) < 8) return;
|
|
353
447
|
const pullingDown = delta > 0 && pending.atTop;
|
|
354
448
|
const pullingUp = delta < 0 && pending.atBottom && activeOffset.value > 0;
|
|
355
449
|
if (!pullingDown && !pullingUp) {
|
|
356
450
|
pendingBody = null;
|
|
357
|
-
|
|
451
|
+
session.detach();
|
|
358
452
|
return;
|
|
359
453
|
}
|
|
360
454
|
pendingBody = null;
|
|
@@ -366,7 +460,7 @@ function useSheetGestures(options) {
|
|
|
366
460
|
if (dragState != null && dragState.pointerId !== event.pointerId) return;
|
|
367
461
|
pendingBody = null;
|
|
368
462
|
if (dragState == null) {
|
|
369
|
-
|
|
463
|
+
session.detach();
|
|
370
464
|
return;
|
|
371
465
|
}
|
|
372
466
|
endDrag();
|
|
@@ -375,51 +469,54 @@ function useSheetGestures(options) {
|
|
|
375
469
|
if (dragState != null && dragState.pointerId !== event.pointerId) return;
|
|
376
470
|
cancelDrag();
|
|
377
471
|
}
|
|
378
|
-
function attachPointerListeners() {
|
|
379
|
-
window.addEventListener("pointermove", onPointerMove);
|
|
380
|
-
window.addEventListener("pointerup", onPointerUp);
|
|
381
|
-
window.addEventListener("pointercancel", onPointerCancel);
|
|
382
|
-
}
|
|
383
|
-
function detachPointerListeners() {
|
|
384
|
-
window.removeEventListener("pointermove", onPointerMove);
|
|
385
|
-
window.removeEventListener("pointerup", onPointerUp);
|
|
386
|
-
window.removeEventListener("pointercancel", onPointerCancel);
|
|
387
|
-
}
|
|
388
472
|
function onHandlePointerDown(event) {
|
|
389
473
|
if (event.button != null && event.button !== 0) return;
|
|
390
|
-
|
|
474
|
+
if (yieldToPinch(event.pointerId)) return;
|
|
475
|
+
session.attach();
|
|
391
476
|
beginDrag(event.pointerId, event.clientY, event.timeStamp);
|
|
392
477
|
if (event.cancelable) event.preventDefault();
|
|
393
478
|
}
|
|
394
479
|
function onBodyPointerDown(event) {
|
|
480
|
+
if (yieldToPinch(event.pointerId)) return;
|
|
395
481
|
if (event.pointerType === "touch") return;
|
|
396
482
|
if (event.button != null && event.button !== 0) return;
|
|
397
483
|
const element = body.value;
|
|
398
484
|
if (!element) return;
|
|
485
|
+
const edges = blockScrollEdges(element, event.target);
|
|
399
486
|
pendingBody = {
|
|
400
487
|
pointerId: event.pointerId,
|
|
401
488
|
startY: event.clientY,
|
|
402
|
-
atTop:
|
|
403
|
-
atBottom:
|
|
489
|
+
atTop: edges.atTop,
|
|
490
|
+
atBottom: edges.atBottom
|
|
404
491
|
};
|
|
405
|
-
|
|
492
|
+
session.attach();
|
|
406
493
|
}
|
|
407
|
-
let touchArming = null;
|
|
408
494
|
function onTouchStart(event) {
|
|
495
|
+
if (event.touches.length > 1) {
|
|
496
|
+
touchArming = null;
|
|
497
|
+
cancelDrag();
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
409
500
|
const touch = event.changedTouches[0];
|
|
410
501
|
const element = body.value;
|
|
411
502
|
if (!touch || !element) {
|
|
412
503
|
touchArming = null;
|
|
413
504
|
return;
|
|
414
505
|
}
|
|
506
|
+
const edges = blockScrollEdges(element, event.target);
|
|
415
507
|
touchArming = {
|
|
416
508
|
identifier: touch.identifier,
|
|
417
509
|
startY: touch.clientY,
|
|
418
|
-
atTop:
|
|
419
|
-
atBottom:
|
|
510
|
+
atTop: edges.atTop,
|
|
511
|
+
atBottom: edges.atBottom
|
|
420
512
|
};
|
|
421
513
|
}
|
|
422
514
|
function onTouchMove(event) {
|
|
515
|
+
if (event.touches.length > 1) {
|
|
516
|
+
touchArming = null;
|
|
517
|
+
cancelDrag();
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
423
520
|
const element = body.value;
|
|
424
521
|
if (dragState != null) {
|
|
425
522
|
const touch = Array.from(event.changedTouches).find((item) => item.identifier === dragState?.pointerId);
|
|
@@ -433,7 +530,7 @@ function useSheetGestures(options) {
|
|
|
433
530
|
const touch = Array.from(event.changedTouches).find((item) => item.identifier === arming.identifier);
|
|
434
531
|
if (!touch) return;
|
|
435
532
|
const delta = touch.clientY - arming.startY;
|
|
436
|
-
if (Math.abs(delta) <
|
|
533
|
+
if (Math.abs(delta) < 8) return;
|
|
437
534
|
const pullingDown = delta > 0 && arming.atTop;
|
|
438
535
|
const pullingUp = delta < 0 && arming.atBottom && activeOffset.value > 0;
|
|
439
536
|
if (!pullingDown && !pullingUp) {
|
|
@@ -459,6 +556,15 @@ function useSheetGestures(options) {
|
|
|
459
556
|
const height = panel.value?.getBoundingClientRect().height ?? 0;
|
|
460
557
|
if (height > 0) sheetHeight.value = height;
|
|
461
558
|
}
|
|
559
|
+
session = createSheetPointerSession({
|
|
560
|
+
onPointerMove,
|
|
561
|
+
onPointerUp,
|
|
562
|
+
onPointerCancel,
|
|
563
|
+
onTouchStart,
|
|
564
|
+
onTouchMove,
|
|
565
|
+
onTouchEnd,
|
|
566
|
+
onWindowBlur: () => cancelDrag()
|
|
567
|
+
});
|
|
462
568
|
watch(panel, (element) => {
|
|
463
569
|
observer?.disconnect();
|
|
464
570
|
observer = null;
|
|
@@ -470,18 +576,8 @@ function useSheetGestures(options) {
|
|
|
470
576
|
observer.observe(element);
|
|
471
577
|
recordSheetHeight();
|
|
472
578
|
}, { immediate: true });
|
|
473
|
-
watch(body, (element
|
|
474
|
-
|
|
475
|
-
previous.removeEventListener("touchstart", onTouchStart);
|
|
476
|
-
previous.removeEventListener("touchmove", onTouchMove);
|
|
477
|
-
previous.removeEventListener("touchend", onTouchEnd);
|
|
478
|
-
previous.removeEventListener("touchcancel", onTouchEnd);
|
|
479
|
-
}
|
|
480
|
-
if (!element) return;
|
|
481
|
-
element.addEventListener("touchstart", onTouchStart, { passive: true });
|
|
482
|
-
element.addEventListener("touchmove", onTouchMove, { passive: false });
|
|
483
|
-
element.addEventListener("touchend", onTouchEnd);
|
|
484
|
-
element.addEventListener("touchcancel", onTouchEnd);
|
|
579
|
+
watch(body, (element) => {
|
|
580
|
+
session.setBody(element);
|
|
485
581
|
updateOverflow();
|
|
486
582
|
}, { immediate: true });
|
|
487
583
|
watch(isOpen, (open) => {
|
|
@@ -504,13 +600,10 @@ function useSheetGestures(options) {
|
|
|
504
600
|
watch(canDismiss, (allowed) => {
|
|
505
601
|
if (!allowed) cancelDrag();
|
|
506
602
|
});
|
|
507
|
-
const onWindowBlur = () => cancelDrag();
|
|
508
|
-
if (typeof window !== "undefined") window.addEventListener("blur", onWindowBlur);
|
|
509
603
|
onBeforeUnmount(() => {
|
|
510
|
-
|
|
604
|
+
session.destroy();
|
|
511
605
|
observer?.disconnect();
|
|
512
606
|
observer = null;
|
|
513
|
-
if (typeof window !== "undefined") window.removeEventListener("blur", onWindowBlur);
|
|
514
607
|
});
|
|
515
608
|
return {
|
|
516
609
|
isDragging,
|
|
@@ -547,6 +640,7 @@ const _hoisted_2$1 = [
|
|
|
547
640
|
"role",
|
|
548
641
|
"aria-label"
|
|
549
642
|
];
|
|
643
|
+
const _hoisted_3$1 = ["data-padding"];
|
|
550
644
|
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
551
645
|
name: "AstryxBottomSheetPanel",
|
|
552
646
|
__name: "BottomSheetPanel",
|
|
@@ -571,6 +665,8 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
571
665
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
572
666
|
const props = __props;
|
|
573
667
|
const emit = __emit;
|
|
668
|
+
resetLayerScopedContext();
|
|
669
|
+
provideLayerDepth();
|
|
574
670
|
const HEIGHT_BUDGETS = {
|
|
575
671
|
hug: "92dvh",
|
|
576
672
|
capped: "62dvh",
|
|
@@ -578,6 +674,8 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
578
674
|
};
|
|
579
675
|
const panel = useTemplateRef("panel");
|
|
580
676
|
const body = useTemplateRef("body");
|
|
677
|
+
const content = useTemplateRef("content");
|
|
678
|
+
useScrollbars(body);
|
|
581
679
|
const isInteractive = computed(() => props.state === "open");
|
|
582
680
|
const heightKind = computed(() => {
|
|
583
681
|
const height = props.height;
|
|
@@ -602,10 +700,6 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
602
700
|
onSnap: (visibleHeight) => emit("snap", visibleHeight),
|
|
603
701
|
onDismiss: () => emit("dismiss")
|
|
604
702
|
});
|
|
605
|
-
const contentStyle = computed(() => {
|
|
606
|
-
if (props.padding == null) return void 0;
|
|
607
|
-
return { "--_sheet-padding": `var(--astryx-spacing-${String(props.padding).replace(".", "-")})` };
|
|
608
|
-
});
|
|
609
703
|
const panelStyle = computed(() => {
|
|
610
704
|
const style = { "--_sheet-budget": budget.value };
|
|
611
705
|
if (isInteractive.value) {
|
|
@@ -638,6 +732,10 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
638
732
|
onUpdated(() => {
|
|
639
733
|
gestures.updateOverflow();
|
|
640
734
|
});
|
|
735
|
+
watch([body, content], ([viewport, box], _previous, onCleanup) => {
|
|
736
|
+
if (viewport == null || box == null) return;
|
|
737
|
+
onCleanup(attachScrollKeyboardDelegation(viewport, box));
|
|
738
|
+
});
|
|
641
739
|
__expose({
|
|
642
740
|
element: computed(() => panel.value ?? null),
|
|
643
741
|
focus: (options) => panel.value?.focus(options),
|
|
@@ -647,7 +745,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
647
745
|
return openBlock(), createElementBlock("div", {
|
|
648
746
|
ref_key: "panel",
|
|
649
747
|
ref: panel,
|
|
650
|
-
class: "astryx-bottom-sheet",
|
|
748
|
+
class: "astryx-bottom-sheet astryx-layer",
|
|
651
749
|
"data-state": __props.state,
|
|
652
750
|
"data-height": heightKind.value,
|
|
653
751
|
"data-dragging": unref(gestures).isDragging.value || void 0,
|
|
@@ -669,9 +767,11 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
669
767
|
style: normalizeStyle(bodyStyle.value),
|
|
670
768
|
onPointerdown: _cache[1] || (_cache[1] = (...args) => unref(gestures).onBodyPointerDown && unref(gestures).onBodyPointerDown(...args))
|
|
671
769
|
}, [createElementVNode("div", {
|
|
770
|
+
ref_key: "content",
|
|
771
|
+
ref: content,
|
|
672
772
|
class: "astryx-bottom-sheet__content",
|
|
673
|
-
|
|
674
|
-
}, [renderSlot(_ctx.$slots, "default")],
|
|
773
|
+
"data-padding": __props.padding
|
|
774
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_3$1)], 44, _hoisted_2$1)], 12, _hoisted_1$1);
|
|
675
775
|
};
|
|
676
776
|
}
|
|
677
777
|
});
|
|
@@ -679,6 +779,39 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
679
779
|
//#region src/BottomSheet/switcher.ts
|
|
680
780
|
const bottomSheetSwitcherKey = Symbol("astryx-bottom-sheet-switcher");
|
|
681
781
|
//#endregion
|
|
782
|
+
//#region src/BottomSheet/useSheetLayerDismiss.ts
|
|
783
|
+
/**
|
|
784
|
+
* 把底部面板登记进全页关闭栈。
|
|
785
|
+
*
|
|
786
|
+
* 点在外面不关:遮罩点击由对话框自己认,非模态时页面还要能点。
|
|
787
|
+
* Escape 只打最上面一层。退出动画还在屏幕上时继续占着栈,按键不会漏到后面。
|
|
788
|
+
*/
|
|
789
|
+
function useSheetLayerDismiss(options) {
|
|
790
|
+
const depth = useLayerDepth();
|
|
791
|
+
const token = {};
|
|
792
|
+
let stop = null;
|
|
793
|
+
function sync() {
|
|
794
|
+
stop?.();
|
|
795
|
+
stop = null;
|
|
796
|
+
if (!options.isActive.value) return;
|
|
797
|
+
stop = pushLayer({
|
|
798
|
+
token,
|
|
799
|
+
depth,
|
|
800
|
+
getContainer: options.getContainer,
|
|
801
|
+
dismissOnPointerOutside: false,
|
|
802
|
+
dismissOnEscape: options.escape.value,
|
|
803
|
+
isPresent: options.isPresent,
|
|
804
|
+
onDismiss: options.onDismiss
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
watch([options.isActive, options.escape], sync, { immediate: true });
|
|
808
|
+
onScopeDispose(() => {
|
|
809
|
+
stop?.();
|
|
810
|
+
stop = null;
|
|
811
|
+
});
|
|
812
|
+
return { isTop: () => options.isActive.value && isTopLayer(token) };
|
|
813
|
+
}
|
|
814
|
+
//#endregion
|
|
682
815
|
//#region src/BottomSheet/BottomSheet.vue
|
|
683
816
|
const _hoisted_1 = ["inert"];
|
|
684
817
|
const _hoisted_2 = {
|
|
@@ -818,8 +951,22 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
818
951
|
unlockScroll();
|
|
819
952
|
isPresented.value = false;
|
|
820
953
|
const target = toValue(props.finalFocusRef);
|
|
821
|
-
if (target?.isConnected) target
|
|
954
|
+
if (target?.isConnected) focusForLastInput(target);
|
|
822
955
|
}
|
|
956
|
+
const layer = useSheetLayerDismiss({
|
|
957
|
+
isActive: computed(() => !hosted.value && !props.isInline && (isOpen.value || isPresented.value)),
|
|
958
|
+
escape: computed(() => {
|
|
959
|
+
if (!isOpen.value || props.purpose === "required") return "block";
|
|
960
|
+
if (!props.hasScrim) return "ignore";
|
|
961
|
+
return "close";
|
|
962
|
+
}),
|
|
963
|
+
getContainer: () => dialog.value ?? null,
|
|
964
|
+
isPresent: () => dialog.value?.open ?? false,
|
|
965
|
+
onDismiss: () => {
|
|
966
|
+
if (!isOpen.value || props.purpose === "required") return;
|
|
967
|
+
requestClose();
|
|
968
|
+
}
|
|
969
|
+
});
|
|
823
970
|
function requestClose() {
|
|
824
971
|
if (hosted.value && props.sheetId != null) {
|
|
825
972
|
if (switcher?.activeId.value === props.sheetId) switcher.setActive(null);
|
|
@@ -834,13 +981,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
834
981
|
requestClose();
|
|
835
982
|
}
|
|
836
983
|
function onKeydown(event) {
|
|
837
|
-
if (event.key !== "Escape") return;
|
|
984
|
+
if (event.key !== "Escape" || !layer.isTop()) return;
|
|
838
985
|
event.preventDefault();
|
|
839
|
-
if (event
|
|
986
|
+
if (isImeKeyEvent(event)) return;
|
|
840
987
|
dismissOnEscape();
|
|
841
988
|
}
|
|
842
989
|
function onCancel(event) {
|
|
843
990
|
event.preventDefault();
|
|
991
|
+
if (!layer.isTop()) return;
|
|
844
992
|
dismissOnEscape();
|
|
845
993
|
}
|
|
846
994
|
function onDialogClick(event) {
|
|
@@ -976,4 +1124,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
976
1124
|
}
|
|
977
1125
|
});
|
|
978
1126
|
//#endregion
|
|
979
|
-
export {
|
|
1127
|
+
export { useSheetLayerDismiss as n, bottomSheetSwitcherKey as r, _sfc_main as t };
|