@astryx-vue/core 0.7.24 → 0.7.26
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.d.ts +1 -1
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-DsPFYRxB.js → AlertDialog-DZpJzvOC.js} +30 -15
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell--izaf9Fx.js → AppShell-D7ik41g-.js} +3 -3
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-cNntRBEo.js → Avatar-D_C9RBJb.js} +27 -21
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-CiJia58o.js → AvatarGroup-CFvNDgU-.js} +17 -7
- package/dist/Badge/index.js +1 -1
- package/dist/Badge-BbPS_49c.js +41 -0
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-C8f377q3.js → Banner-C1B7DsHS.js} +3 -3
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-BKeyoL9N.js → BottomSheet-BECeWtEy.js} +2 -2
- package/dist/{BottomSheet-CMukh1iI.js → BottomSheet-CgOzQHaA.js} +4 -2
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-CXJNJ93V.js → Breadcrumbs-BgiZY7un.js} +9 -8
- package/dist/Button/index.d.ts +2 -2
- package/dist/Button/index.js +1 -1
- package/dist/{Button-Dgm5wCch.js → Button-DsjdehLZ.js} +181 -18
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-UgiGP61q.js → ButtonGroup-CSW7a9vq.js} +14 -2
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-d_uOkvFE.js → Calendar-Bzgi-XyF.js} +12 -3
- package/dist/Card/index.d.ts +1 -1
- package/dist/Card/index.js +1 -1
- package/dist/{Card-H4571ZKi.js → Card-BbKFHWuD.js} +2 -0
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-BWTArLIP.js → Carousel--VycM-Sa.js} +64 -19
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-DKZWVA3Q.js → Chat-C1DlnlCQ.js} +30 -28
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-B4pDfjvr.js → CheckboxInput-uk8nuCEf.js} +4 -4
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-DtxfdHRI.js → CheckboxList-Dr4kQ-BC.js} +7 -7
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-CCu6QWG7.js → Citation-BAFsn6N1.js} +4 -2
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-jEBZbzHE.js → ClickableCard-CvxSKkXh.js} +16 -6
- package/dist/Code/index.d.ts +1 -1
- package/dist/Code/index.js +2 -2
- package/dist/{Code-PDhTfE2w.js → Code-6GS0nAkR.js} +1 -1
- package/dist/{CodeBlock-BrE72i6C.js → CodeBlock-PSnUWX57.js} +21 -10
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-BsPZ8CoN.js → Collapsible-C_tl5-L0.js} +2 -2
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-0Kg-dJg3.js → CommandPalette-lewtyQrO.js} +7 -7
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-BrGVG8c7.js → ComplexSelector-BUnqjeW5.js} +16 -8
- package/dist/ComponentIcon-BRXBBKeG.js +37 -0
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-CgSIWUYh.js → ContextMenu-IDkvorRp.js} +10 -9
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-vV0tc4a4.js → DateInput-DTxxFz9-.js} +15 -13
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-DcM1Zntr.js → DateRangeInput-D4Us58KW.js} +9 -9
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-DbbVU3bk.js → DateTimeInput-CliLnI7P.js} +10 -10
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-vPGLWE3o.js → Dialog-B_s-w66_.js} +1 -1
- package/dist/{Dialog-D4V2ZnuS.js → Dialog-BtPktuiy.js} +3 -1
- package/dist/{DialogHeader-D1sgjPC7.js → DialogHeader-Hk419KW1.js} +4 -4
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-CaZF_-lH.js → Drawer-DoQ9hjKz.js} +2 -2
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-B3R5WLsl.js → DropdownMenu-B2iga1fe.js} +18 -13
- package/dist/{DropdownMenu-BjE_cTDM.js → DropdownMenu-BF2Z5T4h.js} +9 -9
- package/dist/{DropdownMenuRadioItem.vue-z0XU7pZS.d.ts → DropdownMenuRadioItem.vue-D455cIQQ.d.ts} +1 -1
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-BQrzgh2f.js → EmptyState-v1cvHKav.js} +2 -2
- package/dist/Field/index.d.ts +2 -2
- package/dist/Field/index.js +3 -3
- package/dist/{Field-DLg-trP2.js → Field-if5a58LO.js} +2 -2
- package/dist/{FieldIcon-CxTnEb4Y.js → FieldIcon-DMtfe1Ne.js} +1 -1
- package/dist/{FieldInfoTip-D5IOQrVA.js → FieldInfoTip-BJAaKJjM.js} +2 -2
- package/dist/{FieldLabel-D5_Pap_W.js → FieldLabel-C-IaUcP4.js} +3 -3
- package/dist/FieldStatus/index.d.ts +1 -1
- package/dist/FieldStatus/index.js +1 -1
- package/dist/{FieldStatus-D6Vo_dU5.js → FieldStatus-DSUCli4W.js} +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-CKYpJtuU.js → FileInput-0zBWfO8h.js} +9 -9
- package/dist/Grid/index.d.ts +1 -1
- package/dist/Grid/index.js +1 -1
- package/dist/{Grid-D1onTzyC.js → Grid-C0mp7fha.js} +1 -1
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/Heading-C10qO8wg.js +114 -0
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-B9uadAzT.js → HoverCard-CLcbBLBN.js} +4 -3
- package/dist/Icon/index.d.ts +4 -4
- package/dist/Icon/index.js +4 -2
- package/dist/Icon/plugin.js +1 -1
- package/dist/Icon-B2aULLnn.js +15 -0
- package/dist/{Icon-CU3412Fe.js → Icon-BCHo7W0x.js} +48 -86
- package/dist/IconButton/index.d.ts +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-B6AQLlx9.js → IconButton-Crtfruc0.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/Indicator/index.js +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-BlOySTNC.js → InfoTip-DNQy7wqB.js} +3 -3
- package/dist/{InputClearButton-BbFXoxWi.js → InputClearButton-DhvxPkK6.js} +3 -3
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +2 -2
- package/dist/{InputGroup-BleRgc6W.js → InputGroup-B1kG0rBN.js} +42 -18
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-CWJDt7Qb.js → InternationalizationProvider-CUEIHCf4.js} +3 -3
- package/dist/{Item-X9wgYWoD.js → Item-Cfv4ALls.js} +29 -6
- package/dist/Kbd/index.d.ts +1 -1
- package/dist/Kbd/index.js +1 -1
- package/dist/{Kbd-CV3LO2Ge.js → Kbd-DyxKNYtE.js} +58 -30
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-mHcy28k7.js → Layout-OHKb6r7D.js} +8 -5
- package/dist/{LayoutPanel-DpbBk6rj.js → LayoutPanel-D-rpTtC-.js} +6 -3
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-DLZzT9un.js → Lightbox-B8uMFPOS.js} +96 -17
- package/dist/Link/index.d.ts +2 -2
- package/dist/Link/index.js +1 -1
- package/dist/{Link-Qhzs2lcO.js → Link-Kc2RQFHc.js} +59 -70
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-CertehfW.js → ListItem-2evjQQ7n.js} +2 -2
- package/dist/Markdown/index.js +2 -2
- package/dist/{Markdown-DGTG02tI.js → Markdown-NVkHi_tk.js} +6 -6
- package/dist/{MediaTheme-CnSOALNj.js → MediaTheme-Bt7WBTkq.js} +1 -1
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-wOngshS5.js → MetadataList-4GnMi6s9.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-C8KAzhRl.js → MobileNavToggle-TMDrnXfG.js} +2 -2
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-B_NLxMJW.js → MoreMenu-CpGEXWCd.js} +10 -10
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-B0TQuJ5d.js → MultiSelector-Baca6xNx.js} +17 -16
- package/dist/{NavDisclosure-BbRWuyhq.js → NavDisclosure-DG4jls5z.js} +1 -1
- package/dist/{NavHeadingSurface-B2HkXx6S.js → NavHeadingSurface-j2gzMVKt.js} +3 -3
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +1 -1
- package/dist/{NavItem-DfHMmSsw.js → NavItem-BZLN0U5a.js} +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-mZVfqNxt.js → NavMenu-t7WN2bcq.js} +1 -1
- package/dist/{NavMenuItem-DkfXIdxs.js → NavMenuItem-DIMQohIa.js} +2 -2
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-DEv4_fDj.js → NumberInput-BBFGZ4Fg.js} +27 -17
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-Bbu16_MT.js → Outline-BgDOI3ar.js} +3 -3
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-CjIOYKLM.js → OverflowList-D4fC5s_q.js} +3 -3
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-Bcq0T9qo.js → Pagination-Do_MIlo4.js} +16 -4
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-9Xt2lYdo.js → Popover-Bd93LlDd.js} +7 -7
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DXz85xcx.js → PowerSearch-DyqItMHo.js} +111 -42
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-Dt5AS0GY.js → ProgressBar-gsm2A_cR.js} +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-B2lYTCeV.js → RadioGroup-Dzp4qSgm.js} +5 -5
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-CieZtXzY.js → RadioList-CAIgB1j_.js} +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-uBJj4W1M.js → ResizeHandle-GAmiHb0-.js} +2 -2
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-BmDn1avo.js → SegmentedControl-Bs74LlvS.js} +3 -2
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-2a2gsxys.js → SelectableCard-BFCwgtWf.js} +12 -7
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-CgrXQtte.js → Selector-B9lINQRM.js} +15 -13
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-DW4jXGp5.js → SideNav-DzZ12DIq.js} +8 -8
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-CEhy-D-R.js → Slider-Cuk2ul9w.js} +4 -4
- package/dist/Spinner/index.js +1 -1
- package/dist/{Spinner-CTWLR75x.js → Spinner-ke63bQPv.js} +1 -1
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-Bu_nCu0I.js → StatusDot-DF5wK42f.js} +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-DVXisudw.js → Stepper-C68f_iJG.js} +3 -3
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DXShvaDA.js → Switch-bnxiN6Qe.js} +4 -4
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-Bo4pjQhj.js → TabList-8dlO0Ws6.js} +13 -8
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-Bd8BQ8X_.js → Table-j_DCDbcI.js} +107 -49
- package/dist/Text/index.d.ts +2 -2
- package/dist/Text/index.js +3 -2
- package/dist/{Text-Wk-iDAzh.js → Text-WB-fpFne.js} +38 -29
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-8bifudmD.js → TextArea-Bzz_KcKT.js} +11 -11
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-Bb25yDd0.js → TextInput-givkH9HQ.js} +22 -20
- package/dist/Theme/index.d.ts +2 -2
- package/dist/Theme/index.js +2 -2
- package/dist/{Theme-D7_fQWgb.js → Theme-BQe--DY6.js} +42 -9
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-CYVlnYws.js → Thumbnail-CZOWP5HN.js} +42 -14
- package/dist/{TimeField-dDDrUtI4.js → TimeField-ByoS5s_I.js} +8 -8
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-BvGVUfWy.js → TimeInput-D9kvMQso.js} +7 -5
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-DL_MPa_h.js → Timer-BD2gSoQ3.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-CJSVY4tS.js → Timestamp-CEdNhKc5.js} +17 -13
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-cXs5Cbr4.js → Toast-CnZrcU-G.js} +5 -5
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-DFiJDsOV.js → ToggleButton-BMn4yJXe.js} +27 -8
- package/dist/Token/index.js +1 -1
- package/dist/{Token-BJDLztV6.js → Token-DWCDMawn.js} +101 -28
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-yz0873oG.js → Tokenizer-R0eC1BOk.js} +93 -10
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Toolbar/index.js +1 -1
- package/dist/{Toolbar-D5UI1JLe.js → Toolbar-BH_E0F0G.js} +4 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +2 -2
- package/dist/{Tooltip-BfKegFfq.js → Tooltip-CGHpFMnc.js} +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-CWksqYD8.js → TopNav-DHunql9h.js} +7 -7
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-tcEjVfb0.js → TreeList-Dg5gtkOu.js} +24 -17
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-ClidGB0O.js → Typeahead-BkmCC6DX.js} +52 -27
- package/dist/{TypeaheadMenu-Bu9HO-wZ.js → TypeaheadMenu-CFeJCv-6.js} +1 -1
- package/dist/componentIcons-CFr2L6o3.js +106 -0
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +13 -11
- package/dist/{composables-BWDrzi3J.js → composables-DqJzanJ5.js} +5 -24
- package/dist/context-Bg7eSJ47.js +17 -0
- package/dist/{context-BLSiTojH.js → context-CV6TrhJY.js} +57 -3
- package/dist/context-CZP3jfy-.js +125 -0
- package/dist/{context-Bv6lAoqu.js → context-CjX2RSDn.js} +14 -2
- package/dist/devBuild-G249YcdZ.js +17 -0
- package/dist/{fieldParts--SyRZVQG.js → fieldParts-CDOlBdy6.js} +2 -2
- package/dist/{index-CM8KfpBL.d.ts → index--uIQXVJ7.d.ts} +2 -2
- package/dist/{index-CL8JvxHW.d.ts → index-B3yTdknp.d.ts} +1 -1
- package/dist/{index-rszZajcw.d.ts → index-B449gOMC.d.ts} +2 -2
- package/dist/{index-B3PTchxx.d.ts → index-B7brdDVR.d.ts} +5 -5
- package/dist/{index-BO9TY87G.d.ts → index-BOCb89V9.d.ts} +3 -3
- package/dist/{index-Gnewu6-J.d.ts → index-BPyRH3WL.d.ts} +1 -1
- package/dist/{index-DEQ5cnUV.d.ts → index-BTljzczH.d.ts} +4 -1
- package/dist/{index-f3d9cVtj.d.ts → index-BU78NOP-.d.ts} +1 -1
- package/dist/{index-BfQ85cS8.d.ts → index-BZuEYd9y.d.ts} +1 -1
- package/dist/{index-D_K1wfRa.d.ts → index-BfSZhAVv.d.ts} +2 -2
- package/dist/{index-CFm1rPma.d.ts → index-BjbPK91B.d.ts} +1 -1
- package/dist/{index-C3f1zsJR.d.ts → index-BngdKVro.d.ts} +1 -1
- package/dist/{index-RW8kvEwf.d.ts → index-BnqDF_AX.d.ts} +11 -6
- package/dist/{index-Be7N3B5F.d.ts → index-BqEPgwku.d.ts} +2 -2
- package/dist/{index-DxxudRgB.d.ts → index-C16d2Fc4.d.ts} +1 -1
- package/dist/{index-D97pQbua.d.ts → index-C89cIh4E.d.ts} +3 -5
- package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
- package/dist/{index-IvAfdGCC.d.ts → index-CAoenU4T.d.ts} +1 -1
- package/dist/{index-BaxM-pFP.d.ts → index-CM2L3SUw.d.ts} +6 -4
- package/dist/{index-Bgk1Rj2A.d.ts → index-CTjkJP4x.d.ts} +1 -1
- package/dist/{index-Bo-ofFyg.d.ts → index-CbNLiaWw.d.ts} +2 -2
- package/dist/{index-YKCx03zD.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-BMCjAlq6.d.ts → index-CfPGC9aW.d.ts} +1 -1
- package/dist/index-CtYlR9Cu.d.ts +46 -0
- package/dist/{index--tm6L1ot.d.ts → index-Cun6cXGP.d.ts} +1 -1
- package/dist/{index-C9gAlDt_.d.ts → index-CvquEEGw.d.ts} +8 -2
- package/dist/{index-QWh122EV.d.ts → index-D57GW53K.d.ts} +1 -1
- package/dist/{index-DX4HQToB.d.ts → index-D6pP-H_N.d.ts} +1 -1
- package/dist/{index-dcT6zeY_.d.ts → index-DCU6dy7n.d.ts} +25 -5
- package/dist/{index-DqaYENaT.d.ts → index-DFDadgys.d.ts} +68 -68
- package/dist/{index-DEm3kRBO.d.ts → index-DN1RqxjP.d.ts} +1 -1
- package/dist/{index-BzZC2Y7c.d.ts → index-DTfA4uE3.d.ts} +1 -1
- package/dist/{index-BZchpRgm.d.ts → index-DZKv1WNB.d.ts} +2 -2
- package/dist/{index-BUZDSd-n.d.ts → index-Dc52pmSr.d.ts} +4 -2
- package/dist/{index-uqEqPcmR.d.ts → index-DhMCql2U.d.ts} +1 -1
- package/dist/{index-O9y23OPJ.d.ts → index-DneQgJfI.d.ts} +1 -1
- package/dist/{index-Dj1_1t3j.d.ts → index-IFFGXlhq.d.ts} +1 -1
- package/dist/{index-DaXzQxos.d.ts → index-MEix_m1o.d.ts} +2 -2
- package/dist/{index-B1eCxBCY.d.ts → index-TXcNH86P.d.ts} +1 -1
- package/dist/{index-D21zdEgS.d.ts → index-Uh-ddE5F.d.ts} +1 -1
- package/dist/{index-BtrAhmSP.d.ts → index-fuztfDLA.d.ts} +10 -6
- package/dist/{index-BRXgpLcd.d.ts → index-mJ_aqK5M.d.ts} +3 -3
- package/dist/{index-3t5RAfNP.d.ts → index-mkbGYz8f.d.ts} +2 -2
- package/dist/{index-BEZ4ezJk.d.ts → index-wY6dKz6c.d.ts} +2 -2
- package/dist/{index-Dacg7XTH.d.ts → index-wkeCkhTi.d.ts} +16 -6
- package/dist/index.d.ts +53 -53
- package/dist/index.js +134 -130
- package/dist/layerSurfacePress-C3PjPpJP.js +29 -0
- package/dist/{loadCatalog-85MyL2bm.js → loadCatalog-Bulk4H7U.js} +2 -2
- package/dist/{loadCatalog-DSRSkHnY.d.ts → loadCatalog-D_uf2uX1.d.ts} +36 -0
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -4
- package/dist/{locale-C7RSY-JG.js → locale-BA52q_fh.js} +1 -1
- package/dist/pressFeedback-Bwwpex9q.js +578 -0
- package/dist/{registry-C7OZb0PJ.js → registry-fNY3jasS.js} +23 -4
- package/dist/{searchResultMessage-T4H3r8Vz.js → searchResultMessage-CFmIy2Da.js} +2 -2
- package/dist/semantic-CXHSMwPK.d.ts +118 -0
- package/dist/{sharedResizeObserver-9EFWnSWH.js → sharedResizeObserver-BekhnB3E.js} +5 -1
- package/dist/slotContent-CNWOrGOr.js +14 -0
- package/dist/{slug-DAK6hdbr.js → slug-D6ln5PTq.js} +3 -1
- package/dist/strayClick-CY-_ImKv.js +60 -0
- package/dist/textClampContext-o3-nLErq.js +15 -0
- package/dist/textDirection-D4ObTwbB.js +32 -0
- package/dist/themeIcons-CqGF0fwW.js +128 -0
- package/dist/tooltipTriggerRules-Bg4tG8w2.js +53 -0
- package/dist/{types-CsqwQkf1.d.ts → types-Bq4Yl6CS.d.ts} +68 -7
- package/dist/{types-Bb7OGivY.d.ts → types-BwVJBE-G.d.ts} +1 -1
- package/dist/{types-C5GQ2KCK.d.ts → types-Dcai2Icw.d.ts} +55 -1
- package/dist/{types-DnrU3HYQ.d.ts → types-hB0M54I7.d.ts} +1 -1
- package/dist/unicodeRegExp-B7yQnpFC.js +14 -0
- package/dist/{upstreamMap-CZUPxbc9.js → upstreamMap-DrkVNtXW.js} +2 -0
- package/dist/useActionGroupTracking-BncJjk1A.js +131 -0
- package/dist/{useAnchoredListbox-6t5zSSz1.js → useAnchoredListbox-9Gn8asBR.js} +3 -2
- package/dist/useCoarsePointer-GItEMrjX.js +21 -0
- package/dist/{useDevWarning-DznOpOHT.js → useDevWarning-B2fsk2B-.js} +1 -4
- package/dist/{usePositionedLayer-psKf3ano.js → useDismiss-0-Z-9D0A.js} +52 -52
- package/dist/{useFileSelection-BPtaegqK.js → useFileSelection-B44UpbvF.js} +14 -4
- package/dist/{useIndicator-BvF_KY9S.js → useIndicator--9mGGlT2.js} +2 -2
- package/dist/{useInputContainer-CLcYrby4.js → useInputContainer-BpLtCA-U.js} +1 -1
- package/dist/{useInputStatusIcon-BSVFtRQG.js → useInputStatusIcon-DCnx00BM.js} +2 -2
- package/dist/{useLayer-Byjda3dD.js → useLayer-CED-g4Q2.js} +1 -1
- package/dist/{useMenuDrillIn-C36Z89W3.js → useMenuDrillIn-C5eJCuO1.js} +2 -2
- package/dist/{useMenuPress-8foxY8z4.js → useMenuPress-BLPwY_m1.js} +2 -59
- package/dist/usePressFeedback-Bcjsw9vv.js +49 -0
- package/dist/{useTooltip-BKsCTWdb.js → useTooltip-D8Tq7-yd.js} +36 -22
- package/dist/{useTranslator-BDUOzbP_.js → useTranslator-Q85hi4qz.js} +2 -2
- package/dist/useTruncation-C4pdlaXa.js +135 -0
- package/dist/useTruncationTooltip-BNk2xslw.js +106 -0
- package/dist/utils/index.js +1 -1
- package/dist/{utils-ClVseK2w.js → utils-BTkg5Ie9.js} +7 -2
- package/locales/en.json +8 -0
- package/package.json +1 -1
- package/styles/alert-dialog.css +19 -0
- package/styles/avatar.css +18 -3
- package/styles/badge.css +20 -2
- package/styles/banner.css +6 -0
- package/styles/button-group.css +38 -2
- package/styles/button.css +76 -4
- package/styles/calendar.css +34 -0
- package/styles/carousel.css +19 -11
- package/styles/chat.css +2 -0
- package/styles/checkbox-indicator.css +9 -9
- package/styles/checkbox-input.css +4 -1
- package/styles/citation.css +2 -1
- package/styles/clickable-card.css +19 -5
- package/styles/code.css +6 -0
- package/styles/context-menu.css +11 -0
- package/styles/dialog-header.css +2 -0
- package/styles/dialog.css +7 -0
- package/styles/dropdown-menu.css +11 -0
- package/styles/field.css +2 -0
- package/styles/heading.css +4 -0
- package/styles/hover-card.css +2 -0
- package/styles/icon.css +18 -12
- package/styles/input-group.css +1 -0
- package/styles/kbd.css +2 -0
- package/styles/layer.css +2 -0
- package/styles/lightbox.css +78 -0
- package/styles/link.css +25 -1
- package/styles/list.css +10 -1
- package/styles/metadata-list.css +1 -1
- package/styles/more-menu.css +6 -0
- package/styles/popover.css +7 -0
- package/styles/pressable.css +7 -0
- package/styles/radio-indicator.css +21 -4
- package/styles/slider.css +2 -0
- package/styles/switch.css +2 -1
- package/styles/table.css +25 -1
- package/styles/text.css +8 -0
- package/styles/thumbnail.css +25 -0
- package/styles/toast.css +2 -0
- package/styles/toggle-button.css +17 -0
- package/styles/token.css +14 -9
- package/styles/toolbar.css +19 -0
- package/dist/Badge-CjDQPF5g.js +0 -30
- package/dist/Heading-D0zL1j5T.js +0 -99
- package/dist/context-B6UElI5X.js +0 -5
- package/dist/context-Cws_tXTr.js +0 -7
- package/dist/context-IvbU9c3T.js +0 -8
- package/dist/index-LySSG_PR.d.ts +0 -27
- package/dist/semantic-BF_AjLvk.d.ts +0 -57
- package/dist/useClickableContainer-CdGp_Cev.js +0 -112
- package/dist/usePressFeedback-Dhnfc3ee.js +0 -336
- package/dist/useTruncation-C02rA1-c.js +0 -102
- package/dist/{useRestoreFocus-XEKs5-gp.js → useRestoreFocus-CEG0n2AK.js} +1 -1
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
import { getCurrentInstance, getCurrentScope, onMounted, onScopeDispose } from "vue";
|
|
2
|
-
import "../styles/pressable.css";
|
|
3
|
-
const IDLE = {
|
|
4
|
-
originX: 0,
|
|
5
|
-
originY: 0,
|
|
6
|
-
phase: "idle"
|
|
7
|
-
};
|
|
8
|
-
function travelled(gesture, x, y) {
|
|
9
|
-
return Math.hypot(x - gesture.originX, y - gesture.originY) > 10;
|
|
10
|
-
}
|
|
11
|
-
function to(gesture, phase, paint, timer) {
|
|
12
|
-
return {
|
|
13
|
-
gesture: {
|
|
14
|
-
...gesture,
|
|
15
|
-
phase
|
|
16
|
-
},
|
|
17
|
-
paint,
|
|
18
|
-
timer
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function stay(gesture, paint) {
|
|
22
|
-
return {
|
|
23
|
-
gesture,
|
|
24
|
-
paint,
|
|
25
|
-
timer: null
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function stepArmed(gesture, event) {
|
|
29
|
-
switch (event.kind) {
|
|
30
|
-
case "move": return travelled(gesture, event.x, event.y) ? to(gesture, "dead", "none", null) : stay(gesture, "none");
|
|
31
|
-
case "cancel": return to(gesture, "dead", "none", null);
|
|
32
|
-
case "onset": return to(gesture, "pressed", "on", null);
|
|
33
|
-
case "up": return to(gesture, "flash", "on", "flash");
|
|
34
|
-
default: return stay(gesture, "none");
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function stepPressed(gesture, event) {
|
|
38
|
-
if (event.kind === "move" && !travelled(gesture, event.x, event.y)) return stay(gesture, "on");
|
|
39
|
-
if (event.kind === "move" || event.kind === "cancel") return to(gesture, "dead", "none", null);
|
|
40
|
-
if (event.kind === "up") return to(gesture, "fading", "fading", "fade");
|
|
41
|
-
return stay(gesture, "on");
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* 一个事件,一个答案。
|
|
45
|
-
*/
|
|
46
|
-
function pressGestureStep(gesture, event) {
|
|
47
|
-
if (event.kind === "down") return {
|
|
48
|
-
gesture: {
|
|
49
|
-
originX: event.x,
|
|
50
|
-
originY: event.y,
|
|
51
|
-
phase: "armed"
|
|
52
|
-
},
|
|
53
|
-
paint: "none",
|
|
54
|
-
timer: "onset"
|
|
55
|
-
};
|
|
56
|
-
switch (gesture.phase) {
|
|
57
|
-
case "armed": return stepArmed(gesture, event);
|
|
58
|
-
case "pressed": return stepPressed(gesture, event);
|
|
59
|
-
case "flash": return event.kind === "flashEnd" ? to(gesture, "fading", "fading", "fade") : stay(gesture, "on");
|
|
60
|
-
case "fading": return event.kind === "fadeEnd" ? stay(IDLE, "none") : stay(gesture, "fading");
|
|
61
|
-
case "dead": return event.kind === "up" ? stay(IDLE, "none") : stay(gesture, "none");
|
|
62
|
-
case "idle": return stay(IDLE, "none");
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function idlePressGesture() {
|
|
66
|
-
return IDLE;
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/composables/internal/pressFeedback.ts
|
|
70
|
-
/**
|
|
71
|
-
* 触屏按压模型的 DOM 那一半:整个文档只有一个委托控制器,
|
|
72
|
-
* 在手指下最里层的可按元素上写 `data-astryx-press`。
|
|
73
|
-
*
|
|
74
|
-
* 为什么挂在文档上、而不是每个元素一套监听:虚拟列表可能有上千行,每行四个监听加一份状态
|
|
75
|
-
* 承受不起。这里整个文档就几个监听,一次按压只改一个元素的一个属性,不触发任何组件更新。
|
|
76
|
-
*
|
|
77
|
-
* 鼠标完全不管,CSS 的 `:active` 照旧。手指下,`@media (pointer: coarse)` 里的 `:active`
|
|
78
|
-
* 被样式丢掉,改由这里在按压成立时写 `on`,抬手淡出时写 `fading`。
|
|
79
|
-
* 样式见 `styles/pressable.css`。
|
|
80
|
-
*/
|
|
81
|
-
/** 可按元素的标记。控制器用 `closest()` 找它。 */
|
|
82
|
-
const PRESSABLE_ATTRIBUTE = "data-astryx-pressable";
|
|
83
|
-
/** 按压成立且手指还在时为 `on`,抬手淡出时为 `fading`,其余时候不存在。 */
|
|
84
|
-
const PRESSED_ATTRIBUTE = "data-astryx-press";
|
|
85
|
-
/** 不可用的元素怎么按都不画。 */
|
|
86
|
-
const DISABLED = ":disabled, [aria-disabled=\"true\"]";
|
|
87
|
-
let live = null;
|
|
88
|
-
/** 有几个调用方装着控制器。大于 0 时监听才在。 */
|
|
89
|
-
let holders = 0;
|
|
90
|
-
/** 上一次「被手指带动」的滚动发生在什么时候、在哪个滚动容器里。只记手指带动的,程序滚动不算。 */
|
|
91
|
-
let lastScrollAt = 0;
|
|
92
|
-
let lastScroller = null;
|
|
93
|
-
/** 上一次手指在屏幕上是什么时候、落在哪里。 */
|
|
94
|
-
let lastTouchAt = 0;
|
|
95
|
-
let lastTouchTarget = null;
|
|
96
|
-
const TIMER_MS = {
|
|
97
|
-
fade: 175,
|
|
98
|
-
flash: 100,
|
|
99
|
-
onset: 150
|
|
100
|
-
};
|
|
101
|
-
const TIMER_EVENT = {
|
|
102
|
-
fade: "fadeEnd",
|
|
103
|
-
flash: "flashEnd",
|
|
104
|
-
onset: "onset"
|
|
105
|
-
};
|
|
106
|
-
/** 读出一个 CSS 时间值,单位毫秒。不是时间就返回 null。 */
|
|
107
|
-
function parseTimeMs(value) {
|
|
108
|
-
const match = /^\s*(-?(?:\d+(?:\.\d+)?|\.\d+))(ms|s)\s*$/.exec(value);
|
|
109
|
-
if (match == null) return null;
|
|
110
|
-
const amount = Number.parseFloat(match[1]);
|
|
111
|
-
return match[2] === "s" ? amount * 1e3 : amount;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* 抬手后淡出的时长:元素上主题的 `--astryx-duration-exit`,抬手时读一次。
|
|
115
|
-
* 读不出时间(没主题、或不是时间值)就用默认的 PRESS_FADE_MS。
|
|
116
|
-
*/
|
|
117
|
-
function pressFadeMs(element) {
|
|
118
|
-
if (typeof getComputedStyle !== "function") return 175;
|
|
119
|
-
const ms = parseTimeMs(getComputedStyle(element).getPropertyValue("--astryx-duration-exit"));
|
|
120
|
-
return ms != null && ms >= 0 ? ms : 175;
|
|
121
|
-
}
|
|
122
|
-
function paintElement(element, paint) {
|
|
123
|
-
if (paint === "none") element.removeAttribute(PRESSED_ATTRIBUTE);
|
|
124
|
-
else element.setAttribute(PRESSED_ATTRIBUTE, paint);
|
|
125
|
-
}
|
|
126
|
-
function clearTimer() {
|
|
127
|
-
if (live?.timer != null) {
|
|
128
|
-
clearTimeout(live.timer);
|
|
129
|
-
live.timer = null;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* 把一个事件交给状态机,再让 DOM 照答案画。
|
|
134
|
-
*
|
|
135
|
-
* 计时器规则:阶段没变、又没要新计时器的一步是路过,原来那个计时器必须留着。
|
|
136
|
-
* 如果每步都先清掉,会有三种手势最后停在「没人碰却亮着」:
|
|
137
|
-
* 等待期内手指在容差内抖了一下(真手指都会抖),onset 被清掉,按压永远不亮;
|
|
138
|
-
* 轻点的 100ms 闪亮期内来了 pointercancel 或滚动,flashEnd 被清掉,一直亮着;
|
|
139
|
-
* 淡出期内同样,`fading` 留在元素上。
|
|
140
|
-
*/
|
|
141
|
-
function apply(step) {
|
|
142
|
-
if (live == null) return;
|
|
143
|
-
const phaseMoved = step.gesture.phase !== live.gesture.phase;
|
|
144
|
-
if (step.timer != null || phaseMoved) clearTimer();
|
|
145
|
-
live.gesture = step.gesture;
|
|
146
|
-
paintElement(live.element, step.paint);
|
|
147
|
-
if (step.gesture.phase === "idle") {
|
|
148
|
-
live = null;
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
if (step.timer != null) {
|
|
152
|
-
const kind = step.timer;
|
|
153
|
-
const delay = kind === "fade" ? pressFadeMs(live.element) : TIMER_MS[kind];
|
|
154
|
-
live.timer = setTimeout(() => {
|
|
155
|
-
if (live != null) live.timer = null;
|
|
156
|
-
apply(pressGestureStep(live?.gesture ?? idlePressGesture(), { kind: TIMER_EVENT[kind] }));
|
|
157
|
-
}, delay);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* 手指下最里层的可按元素。里层优先:可按的行里有个按钮,按钮接走这次按压。
|
|
162
|
-
* 不可用的元素也会接走,但什么都不画,所以按在禁用控件上不会把外面那一行点亮。
|
|
163
|
-
*/
|
|
164
|
-
function surfaceAt(target) {
|
|
165
|
-
if (!(target instanceof Element)) return null;
|
|
166
|
-
const found = target.closest(`[${PRESSABLE_ATTRIBUTE}]`);
|
|
167
|
-
if (!(found instanceof HTMLElement) || found.matches(DISABLED)) return null;
|
|
168
|
-
return found;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* 这次触摸是不是在给手指刚甩动的列表「刹车」。原生列表刹车时什么都不亮。
|
|
172
|
-
* 两个条件都要满足:滚动容器包着这个元素,而且那次滚动是手指在这个容器里带起来的。
|
|
173
|
-
*/
|
|
174
|
-
function scrollerIsBraking(element) {
|
|
175
|
-
if (Date.now() - lastScrollAt >= 150) return false;
|
|
176
|
-
return lastScroller instanceof Node && lastScroller.contains(element);
|
|
177
|
-
}
|
|
178
|
-
/** 手势一死就让出唯一的跟踪槽位。变成滚动的手势以 pointercancel 结束,没有 pointerup。 */
|
|
179
|
-
function releaseIfDead() {
|
|
180
|
-
if (live?.gesture.phase === "dead") {
|
|
181
|
-
clearTimer();
|
|
182
|
-
live = null;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
/** 擦掉颜色、忘掉手势,不经过状态机。 */
|
|
186
|
-
function finish() {
|
|
187
|
-
if (live == null) return;
|
|
188
|
-
clearTimer();
|
|
189
|
-
live.element.removeAttribute(PRESSED_ATTRIBUTE);
|
|
190
|
-
live = null;
|
|
191
|
-
}
|
|
192
|
-
function onPointerDown(event) {
|
|
193
|
-
if (event.pointerType === "mouse") return;
|
|
194
|
-
if (live != null) {
|
|
195
|
-
const fingerIsUp = live.gesture.phase === "fading" || live.gesture.phase === "flash";
|
|
196
|
-
finish();
|
|
197
|
-
if (!fingerIsUp) return;
|
|
198
|
-
}
|
|
199
|
-
const element = surfaceAt(event.target);
|
|
200
|
-
const braking = element != null && scrollerIsBraking(element);
|
|
201
|
-
lastTouchAt = Date.now();
|
|
202
|
-
lastTouchTarget = event.target instanceof Node ? event.target : null;
|
|
203
|
-
if (element == null || braking) return;
|
|
204
|
-
live = {
|
|
205
|
-
element,
|
|
206
|
-
gesture: idlePressGesture(),
|
|
207
|
-
pointerId: event.pointerId,
|
|
208
|
-
timer: null
|
|
209
|
-
};
|
|
210
|
-
apply(pressGestureStep(live.gesture, {
|
|
211
|
-
kind: "down",
|
|
212
|
-
x: event.clientX,
|
|
213
|
-
y: event.clientY
|
|
214
|
-
}));
|
|
215
|
-
}
|
|
216
|
-
function isOtherPointer(event) {
|
|
217
|
-
return live == null || live.pointerId != null && event.pointerId !== live.pointerId;
|
|
218
|
-
}
|
|
219
|
-
function onPointerMove(event) {
|
|
220
|
-
if (isOtherPointer(event)) return;
|
|
221
|
-
apply(pressGestureStep(live.gesture, {
|
|
222
|
-
kind: "move",
|
|
223
|
-
x: event.clientX,
|
|
224
|
-
y: event.clientY
|
|
225
|
-
}));
|
|
226
|
-
}
|
|
227
|
-
function onPointerUp(event) {
|
|
228
|
-
if (event.pointerType === "mouse") return;
|
|
229
|
-
lastTouchAt = Date.now();
|
|
230
|
-
if (event.target instanceof Node) lastTouchTarget = event.target;
|
|
231
|
-
if (isOtherPointer(event)) return;
|
|
232
|
-
apply(pressGestureStep(live.gesture, { kind: "up" }));
|
|
233
|
-
releaseIfDead();
|
|
234
|
-
}
|
|
235
|
-
/** 滚动接管了手势,或者平台拿走了它。iOS 上 pointercancel 比第一个 scroll 事件还早到。 */
|
|
236
|
-
function onCancel() {
|
|
237
|
-
if (live == null) return;
|
|
238
|
-
apply(pressGestureStep(live.gesture, { kind: "cancel" }));
|
|
239
|
-
releaseIfDead();
|
|
240
|
-
}
|
|
241
|
-
/** 文档里任何一处滚动。scroll 不冒泡,只能在捕获阶段听。 */
|
|
242
|
-
function onScroll(event) {
|
|
243
|
-
const scroller = event.target instanceof Node ? event.target : document;
|
|
244
|
-
if (Date.now() - lastTouchAt < 3e3 && lastTouchTarget != null && scroller.contains(lastTouchTarget)) {
|
|
245
|
-
lastScrollAt = Date.now();
|
|
246
|
-
lastScroller = scroller;
|
|
247
|
-
}
|
|
248
|
-
if (live == null) return;
|
|
249
|
-
if (scroller === document || scroller.contains(live.element)) onCancel();
|
|
250
|
-
}
|
|
251
|
-
/** 兜底:页面被切到后台时,不留下亮着的元素。 */
|
|
252
|
-
function onVisibilityChange() {
|
|
253
|
-
if (document.visibilityState === "hidden") finish();
|
|
254
|
-
}
|
|
255
|
-
const PASSIVE_CAPTURE = {
|
|
256
|
-
capture: true,
|
|
257
|
-
passive: true
|
|
258
|
-
};
|
|
259
|
-
const WINDOW_LISTENERS = [
|
|
260
|
-
["pointerdown", onPointerDown],
|
|
261
|
-
["pointermove", onPointerMove],
|
|
262
|
-
["pointerup", onPointerUp],
|
|
263
|
-
["pointercancel", onCancel],
|
|
264
|
-
["touchcancel", onCancel],
|
|
265
|
-
["dragstart", onCancel]
|
|
266
|
-
];
|
|
267
|
-
function addListeners() {
|
|
268
|
-
for (const [type, listener] of WINDOW_LISTENERS) window.addEventListener(type, listener, PASSIVE_CAPTURE);
|
|
269
|
-
document.addEventListener("scroll", onScroll, PASSIVE_CAPTURE);
|
|
270
|
-
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
271
|
-
}
|
|
272
|
-
function removeListeners() {
|
|
273
|
-
for (const [type, listener] of WINDOW_LISTENERS) window.removeEventListener(type, listener, PASSIVE_CAPTURE);
|
|
274
|
-
document.removeEventListener("scroll", onScroll, PASSIVE_CAPTURE);
|
|
275
|
-
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
276
|
-
}
|
|
277
|
-
function resetClocks() {
|
|
278
|
-
lastScrollAt = 0;
|
|
279
|
-
lastScroller = null;
|
|
280
|
-
lastTouchAt = 0;
|
|
281
|
-
lastTouchTarget = null;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* 在这个文档上装好按压控制器。调多少次都只装一份,有人持有时监听就在。
|
|
285
|
-
* 返回释放函数:每次安装各调一次;最后一个释放时拆掉监听,并清掉颜色和刹车时钟。
|
|
286
|
-
* 服务端什么都不做。
|
|
287
|
-
*/
|
|
288
|
-
function installPressFeedback() {
|
|
289
|
-
if (typeof window === "undefined" || typeof document === "undefined") return () => void 0;
|
|
290
|
-
if (holders === 0) addListeners();
|
|
291
|
-
holders += 1;
|
|
292
|
-
let released = false;
|
|
293
|
-
return () => {
|
|
294
|
-
if (released) return;
|
|
295
|
-
released = true;
|
|
296
|
-
holders -= 1;
|
|
297
|
-
if (holders > 0) return;
|
|
298
|
-
removeListeners();
|
|
299
|
-
finish();
|
|
300
|
-
resetClocks();
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
//#endregion
|
|
304
|
-
//#region src/composables/usePressFeedback.ts
|
|
305
|
-
const MARKER_ONLY = Object.freeze({ [PRESSABLE_ATTRIBUTE]: "" });
|
|
306
|
-
const WITH_OVERLAY = Object.freeze({
|
|
307
|
-
[PRESSABLE_ATTRIBUTE]: "",
|
|
308
|
-
class: "astryx-pressable"
|
|
309
|
-
});
|
|
310
|
-
/**
|
|
311
|
-
* 对应原版 Astryx 的 `hooks/usePressFeedback`。
|
|
312
|
-
*
|
|
313
|
-
* 把一个元素标成触屏按压模型的可按表面,并确保文档级控制器已经装上。
|
|
314
|
-
*
|
|
315
|
-
* 手指下,CSS 的 `:active` 落手就亮,滚动开始了还可能亮着。按压模型反过来:
|
|
316
|
-
* 先等 150 毫秒确认是按压;手指挪动超过 10 像素或者页面滚动,立刻作废,这次手势里不再亮回来;
|
|
317
|
-
* 太快的轻点在抬手时补亮;抬手后 200 毫秒淡出。鼠标不受影响,`:active` 照旧。
|
|
318
|
-
*
|
|
319
|
-
* 一个文档只有一个控制器:第一个挂载的可按组件装上,最后一个卸载时拆掉。
|
|
320
|
-
* 调用它不会给元素加监听或状态,一次按压只改一个属性。服务端不装。
|
|
321
|
-
*/
|
|
322
|
-
function usePressFeedback(options = {}) {
|
|
323
|
-
let release = null;
|
|
324
|
-
const install = () => {
|
|
325
|
-
release ??= installPressFeedback();
|
|
326
|
-
};
|
|
327
|
-
if (getCurrentInstance() != null) onMounted(install);
|
|
328
|
-
else install();
|
|
329
|
-
if (getCurrentScope() != null) onScopeDispose(() => {
|
|
330
|
-
release?.();
|
|
331
|
-
release = null;
|
|
332
|
-
});
|
|
333
|
-
return { pressableProps: options.hasOverlay === false ? MARKER_ONLY : WITH_OVERLAY };
|
|
334
|
-
}
|
|
335
|
-
//#endregion
|
|
336
|
-
export { usePressFeedback as t };
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { onBeforeUnmount, ref, watch } from "vue";
|
|
2
|
-
//#region src/utils/sharedMutationObserver.ts
|
|
3
|
-
const OPTIONS = {
|
|
4
|
-
characterData: true,
|
|
5
|
-
childList: true,
|
|
6
|
-
subtree: true
|
|
7
|
-
};
|
|
8
|
-
let observer = null;
|
|
9
|
-
const callbacks = /* @__PURE__ */ new Map();
|
|
10
|
-
function dispatch(records) {
|
|
11
|
-
const pending = /* @__PURE__ */ new Set();
|
|
12
|
-
for (const record of records) for (let node = record.target; node; node = node.parentNode) callbacks.get(node)?.forEach((callback) => pending.add(callback));
|
|
13
|
-
pending.forEach((callback) => callback());
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Observe text and child changes anywhere inside an element. All registrations
|
|
17
|
-
* share one MutationObserver; the returned function removes only its own callback.
|
|
18
|
-
*/
|
|
19
|
-
function observeContent(element, callback) {
|
|
20
|
-
if (typeof MutationObserver === "undefined") return () => {};
|
|
21
|
-
observer ??= new MutationObserver(dispatch);
|
|
22
|
-
const existing = callbacks.get(element);
|
|
23
|
-
if (existing) existing.add(callback);
|
|
24
|
-
else {
|
|
25
|
-
callbacks.set(element, /* @__PURE__ */ new Set([callback]));
|
|
26
|
-
observer.observe(element, OPTIONS);
|
|
27
|
-
}
|
|
28
|
-
let subscribed = true;
|
|
29
|
-
return () => {
|
|
30
|
-
if (!subscribed) return;
|
|
31
|
-
subscribed = false;
|
|
32
|
-
const registered = callbacks.get(element);
|
|
33
|
-
registered?.delete(callback);
|
|
34
|
-
if (registered?.size === 0) callbacks.delete(element);
|
|
35
|
-
if (callbacks.size === 0 && observer) {
|
|
36
|
-
observer.disconnect();
|
|
37
|
-
observer = null;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/Text/useTruncation.ts
|
|
43
|
-
/** `false` 关掉提示。`true` 和缺省都出现在上方。 */
|
|
44
|
-
function truncatePlacement(value) {
|
|
45
|
-
if (value === false) return null;
|
|
46
|
-
if (value == null || value === true) return "above";
|
|
47
|
-
return value;
|
|
48
|
-
}
|
|
49
|
-
function useTruncation(maxLines) {
|
|
50
|
-
const isTruncated = ref(false);
|
|
51
|
-
const fullText = ref("");
|
|
52
|
-
let observer;
|
|
53
|
-
let unobserveContent;
|
|
54
|
-
let node = null;
|
|
55
|
-
function measure() {
|
|
56
|
-
if (!node || maxLines.value <= 0) {
|
|
57
|
-
isTruncated.value = false;
|
|
58
|
-
fullText.value = "";
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
fullText.value = node.textContent ?? "";
|
|
62
|
-
if (maxLines.value === 1) {
|
|
63
|
-
isTruncated.value = node.scrollWidth > node.clientWidth + 1;
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
let contentHeight = node.scrollHeight;
|
|
67
|
-
try {
|
|
68
|
-
const range = node.ownerDocument.createRange();
|
|
69
|
-
range.selectNodeContents(node);
|
|
70
|
-
contentHeight = range.getBoundingClientRect().height;
|
|
71
|
-
range.detach();
|
|
72
|
-
} catch {}
|
|
73
|
-
isTruncated.value = contentHeight > node.clientHeight + 1;
|
|
74
|
-
}
|
|
75
|
-
function bind(value) {
|
|
76
|
-
observer?.disconnect();
|
|
77
|
-
observer = void 0;
|
|
78
|
-
unobserveContent?.();
|
|
79
|
-
unobserveContent = void 0;
|
|
80
|
-
node = value instanceof HTMLElement ? value : null;
|
|
81
|
-
if (node && maxLines.value > 0) {
|
|
82
|
-
if (typeof ResizeObserver !== "undefined") {
|
|
83
|
-
observer = new ResizeObserver(() => measure());
|
|
84
|
-
observer.observe(node);
|
|
85
|
-
}
|
|
86
|
-
unobserveContent = observeContent(node, measure);
|
|
87
|
-
}
|
|
88
|
-
measure();
|
|
89
|
-
}
|
|
90
|
-
watch(maxLines, () => bind(node));
|
|
91
|
-
onBeforeUnmount(() => {
|
|
92
|
-
observer?.disconnect();
|
|
93
|
-
unobserveContent?.();
|
|
94
|
-
});
|
|
95
|
-
return {
|
|
96
|
-
bind,
|
|
97
|
-
isTruncated,
|
|
98
|
-
fullText
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
export { useTruncation as n, truncatePlacement as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as isImeKeyEvent } from "./layerDepth-CNDh-IHb.js";
|
|
2
|
-
import { r as getFocusables } from "./focus-l8jVTcqd.js";
|
|
3
2
|
import { r as trackInteractionModality, t as getInteractionModality } from "./interactionModality-ACpTMhak.js";
|
|
3
|
+
import { r as getFocusables } from "./focus-l8jVTcqd.js";
|
|
4
4
|
import { onScopeDispose, ref, toValue, watch } from "vue";
|
|
5
5
|
//#region src/composables/internal/focusReturn.ts
|
|
6
6
|
function isTextEntry(element) {
|