@astryx-vue/core 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-DXOTr1D7.js → AlertDialog-Sku86l_R.js} +194 -8
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-Cmu6bMY6.js → AppShell-CJWvaqgZ.js} +5 -5
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-dMcn3j8Z.js → Avatar-C5KaulzE.js} +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-BUXjzekw.js → AvatarGroup-DT5RbxDa.js} +1 -1
- package/dist/Badge/index.d.ts +1 -2
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-CTY9qV89.js → Banner-cg2nXT_4.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-DyJJtZZU.js → BottomSheet-BtuF3uH6.js} +114 -11
- package/dist/{BottomSheet-ZOjuZya0.js → BottomSheet-DKrJyrhw.js} +1 -1
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-Nv-089W0.js → Breadcrumbs-Cvzwy6sZ.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-TiYG0btL.js → Button-D8AGK5oT.js} +3 -3
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-DNN4O9_-.js → ButtonGroup-CUN_rC57.js} +2 -2
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-DsXup1mZ.js → Carousel-DrCG9wbP.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-DqYT_S9M.js → Chat-BIHEfSec.js} +205 -43
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-FKfsoLcl.js → CheckboxInput-wmX3Ekj-.js} +7 -7
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-DuSVBtMk.js → CheckboxList-JWXHHU-u.js} +6 -6
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-dNmSVHBu.js → ClickableCard-CwGxO0GU.js} +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-5KoJDvWd.js → CodeBlock-PMZd9dQ9.js} +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-B1qW6OuL.js → Collapsible-BDCJRfFN.js} +3 -3
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-B2riNg_7.js → CommandPalette-CJyQd7P-.js} +2 -2
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-C4CO8Fd2.js → ComplexSelector-DIb8LjYJ.js} +4 -4
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-SzsWZf18.js → ContextMenu-HLvsROcS.js} +13 -26
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-D9Jv70H7.js → DateInput-D5YBijbb.js} +14 -33
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-BsB2kg_q.js → DateRangeInput-BlcHsqgx.js} +6 -6
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-BDyKPKGD.js → DateTimeInput-Bx3LWb9Y.js} +7 -7
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-DUlWQH8R.js → Dialog-CNLEL4Mf.js} +1 -1
- package/dist/{Dialog-JCB5s-T-.js → Dialog-CxeXQTqH.js} +10 -0
- package/dist/{DialogHeader-C6hZZxdv.js → DialogHeader-CjXS_wba.js} +2 -2
- 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-BDuiw1-g.js → Drawer-B_4HN6v5.js} +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-Der2x_k_.js → DropdownMenu-CvdeExRQ.js} +5 -5
- package/dist/{DropdownMenu-BhxKnh6D.js → DropdownMenu-D_fBzKvf.js} +52 -23
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-CnFkYtcS.js → EmptyState-DUaFClsX.js} +4 -50
- package/dist/Field/index.d.ts +3 -3
- package/dist/Field/index.js +3 -3
- package/dist/{Field-D4UmRHlD.js → Field-Btyrw1hd.js} +2 -2
- package/dist/{FieldInfoTip-BSqcEcUx.js → FieldInfoTip-Dwl9HNp1.js} +1 -1
- package/dist/{FieldLabel-CZbayYFD.js → FieldLabel-B4l3sS4O.js} +3 -3
- 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-8oYiJsq_.js → FileInput-BUwV9fQa.js} +135 -85
- package/dist/FormLayout/index.js +1 -1
- package/dist/{FormLayout-CGJVeNsL.js → FormLayout-0_X9o-L4.js} +1 -1
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-COtyAhtB.js → Heading-BuZaxfIK.js} +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-DGlOpk4x.js → HoverCard-CZhfsvP4.js} +2 -2
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-CwjHTIBg.js → IconButton-D9ZRJ7vD.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-CNZateDb.js → InfoTip-BDo2xI8h.js} +2 -2
- package/dist/{InputClearButton-CzCP41sx.js → InputClearButton-C-j9Nf1s.js} +1 -1
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-CfUGHDNz.js → InputGroup-1Ukiu-dg.js} +6 -6
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-DaZS5Dch.js → InternationalizationProvider-B2Gv5yAm.js} +1 -1
- package/dist/{Item-DyaYlbyE.js → Item-DUI1Qnnd.js} +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-Dzzd2Vqe.js → Lightbox-BOWTHnTb.js} +1 -1
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-B7OJQ0zl.js → Link-ruNSnGtC.js} +2 -2
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-gj_lOvEt.js → ListItem-C8SqSrU6.js} +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-Cbj-nqhN.js → Markdown-C-KT_riK.js} +3 -3
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-BlcdCg8M.js → MobileNavToggle-BGNYwwfI.js} +12 -0
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-Dokwc4Mg.js → MoreMenu-DnwzVBEE.js} +17 -31
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-CId8-qAX.js → MultiSelector-Cl_HzKvn.js} +25 -26
- package/dist/{NavDisclosure-CqAThYgR.js → NavDisclosure-B66SHKdd.js} +1 -1
- package/dist/{NavHeadingSurface-DJ4pWvEi.js → NavHeadingSurface-BZCzkCPJ.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +1 -1
- package/dist/{NavItem-_eIEwV41.js → NavItem-c1ScHEJY.js} +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-BtA_Xbmr.js → NavMenu-pCZjhMHe.js} +2 -2
- package/dist/{NavMenuItem-BxfjAf1T.js → NavMenuItem-BIqpJmH6.js} +3 -3
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-Bl5TFhGD.js → NumberInput-Dz0H_XPw.js} +386 -99
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-NuPQMjxw.js → Outline-DvQbXc_H.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-CumJl6X_.js → OverflowList-MCN1PhBB.js} +2 -2
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-C0Bx80Tu.js → Pagination-Cq9BIzPe.js} +59 -48
- package/dist/Popover/index.d.ts +3 -3
- package/dist/Popover/index.js +1 -1
- package/dist/Popover-BJAyg1Qh.js +1247 -0
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-Dq6Gi9z1.js → PowerSearch-wXnusKnz.js} +19 -19
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-Dp-0xquN.js → ProgressBar-C6x0E-BF.js} +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-IKBXLzYU.js → RadioGroup-LUDji_LA.js} +7 -7
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-NW4fGKgm.js → RadioList-CmeUUgn-.js} +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-DRxcUlVP.js → SegmentedControl-BkWz-I2J.js} +2 -2
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-Dp-LsEcf.js → SelectableCard-GRWYx3iD.js} +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-BW_oxWDM.js → Selector-BL_JH51H.js} +30 -25
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +2 -2
- package/dist/{SideNav-B5mMRj98.js → SideNav-DtAQA-o-.js} +9 -9
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-oD3AY4jh.js → Slider-DEMdW9An.js} +4 -4
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-B3oOyRF7.js → StatusDot-_rucEf3d.js} +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-CgOdL36_.js → Stepper-CCuggsov.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DG_A9cD0.js → Switch-BxRYZTQV.js} +6 -6
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-FkoypUk0.js → TabList-D8KzfcGB.js} +3 -3
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-zNW23VwP.js → Table-DYDBgr3y.js} +15 -15
- package/dist/Text/index.d.ts +1 -1
- package/dist/Text/index.js +1 -1
- package/dist/{Text-v1ep26uD.js → Text-CHauN5So.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-BilHnmSs.js → TextArea-BJl6YH4p.js} +56 -22
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-D6tHM2sA.js → TextInput-CGOVY0Zk.js} +78 -34
- package/dist/Theme/index.d.ts +2 -2
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-llGdnQM8.js → Thumbnail-C3MvJ67s.js} +3 -3
- package/dist/{TimeField-C5rcoaVu.js → TimeField-C2of7Ok5.js} +14 -33
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D0N8nwrI.js → TimeInput-B_YY-IHW.js} +3 -3
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-65PfuoQ7.js → Timer-OULaFQFf.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-rYC8mE3r.js → Timestamp-B6J0nfYH.js} +3 -3
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-BtQ-4Y6Z.js → Toast-BKPl8iIr.js} +1 -1
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-Bnn_MiOn.js → ToggleButton-DfpsuhMa.js} +3 -3
- package/dist/Token/index.js +1 -1
- package/dist/{Token-B-j3AKxB.js → Token-C7Dt5ygK.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-Cpdy_L00.js → Tokenizer-CSmIMDc4.js} +6 -6
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +2 -2
- package/dist/{Tooltip-CByjfHBZ.js → Tooltip-gT9_hIEv.js} +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-q8xDVlM_.js → TopNav-BsrhSbkn.js} +5 -5
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-CEGInQtF.js → TreeList-BEPHdVYu.js} +3 -3
- package/dist/Typeahead/index.d.ts +2 -2
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-C-PdRnRQ.js → Typeahead-CdLc7S2v.js} +7 -7
- package/dist/{types-fRasDCe4.d.ts → adaptationTypes-Cn_pfrsw.d.ts} +155 -155
- package/dist/animator-BooLoGyI.js +3164 -0
- package/dist/announceRenderedText-CslZ0cev.js +50 -0
- package/dist/{assertOptions-og3t30Fh.js → assertOptions-CFn7Gdcr.js} +22 -2
- package/dist/{batch-oTkSbtVz.js → batch-CM-vJhQg.js} +3 -279
- package/dist/{handle-CSHfxBie.js → bezier-Cts7gENO.js} +3 -22
- package/dist/{clickGuard-ChKuogmR.js → clickGuard-FrlnECMp.js} +1 -2
- package/dist/coarsePointer-BfMx3H23.js +86 -0
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +7 -7
- package/dist/{composables-COCeg92e.js → composables-D9DVeNnL.js} +10 -3271
- package/dist/{context-DsNhYm5O.js → context-CrVCeUUK.js} +1 -1
- package/dist/context-DH8E-qjm.js +173 -0
- package/dist/{edge-3sC8-cbB.js → edge-BYXwSggM.js} +1 -1
- package/dist/{edgeRide-DOxmVxTM.js → edgeRide-B5mlN2Q4.js} +4 -4
- package/dist/escape-DzSxSmez.js +10 -0
- package/dist/{field-CehUqCe0.js → field-BaUBjqf5.js} +4 -2
- package/dist/{fieldParts-CbWvZLhH.js → fieldParts-CuE5V12i.js} +1 -1
- package/dist/{sharedRealm-H1OrlP0V.js → flatTree-BB4yPMNL.js} +1 -49
- package/dist/handle-BazRxHwq.js +22 -0
- package/dist/holdEntranceInput-DMCOeRqu.js +37 -0
- package/dist/{index-CuW4AQ7M.d.ts → index--kbwaSXW.d.ts} +1 -1
- package/dist/{index-CsYDrQ9R.d.ts → index-668zPVsH.d.ts} +1 -1
- package/dist/{index-_FjbcSgD.d.ts → index-7Q-wnbe7.d.ts} +1 -1
- package/dist/{index-Q1oG9yIT.d.ts → index-B-3EGjfQ.d.ts} +2 -2
- package/dist/{index-HULXozsK.d.ts → index-B3uBbehw.d.ts} +8 -8
- package/dist/{index-X4S7_dmq.d.ts → index-BA8exXNP.d.ts} +1 -1
- package/dist/{index-CnVjgLP5.d.ts → index-BCW6qCcS.d.ts} +1 -1
- package/dist/{index-QnlWyUxN.d.ts → index-BFGtLIp8.d.ts} +2 -2
- package/dist/{index-DDAcxZAP.d.ts → index-BZUVNr2c.d.ts} +1 -1
- package/dist/{index-BWcZ-L80.d.ts → index-BcRvRqWU.d.ts} +1 -1
- package/dist/{index-CEjvYAUZ.d.ts → index-BenG-F5d.d.ts} +1 -1
- package/dist/{index-ZKBj_1nu.d.ts → index-BfFpUr1B.d.ts} +1 -1
- package/dist/{index-DofC9Rll.d.ts → index-BtqvPjAf.d.ts} +1 -1
- package/dist/{index-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
- package/dist/{index-mK1ICsVg.d.ts → index-C3JmGujU.d.ts} +1 -1
- package/dist/{index-CKnr0JlT.d.ts → index-C4S65SAW.d.ts} +1 -1
- package/dist/{index-waTkqxTz.d.ts → index-C89cIh4E.d.ts} +1 -1
- package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
- package/dist/{index-BfoazhEu.d.ts → index-CTXG-KKT.d.ts} +1 -1
- package/dist/{index-COgrQZIL.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-lmd9LZKB.d.ts → index-ClJINYPl.d.ts} +5 -2
- package/dist/{index-rdwI-mcm.d.ts → index-CtYlR9Cu.d.ts} +1 -1
- package/dist/index-CuFLztiI.d.ts +49 -0
- package/dist/{index-BOCb89V9.d.ts → index-DFLPv9io.d.ts} +2 -2
- package/dist/index-DHUCHxn2.d.ts +69 -0
- package/dist/{index-85RFPeV0.d.ts → index-DHsYyqMP.d.ts} +5 -5
- package/dist/{index-GmoeIuhl.d.ts → index-DMZ5SKJJ.d.ts} +35 -3
- package/dist/{index-DYabo8TI.d.ts → index-DPhQZXYw.d.ts} +1 -1
- package/dist/{index-DRDOArzq.d.ts → index-DSEEgvak.d.ts} +1152 -214
- package/dist/{index-DxR6cZBf.d.ts → index-DZCpswvp.d.ts} +1 -1
- package/dist/{index-etx25Eq-.d.ts → index-NOxH5oYj.d.ts} +1 -1
- package/dist/{index-CH-xSiJz.d.ts → index-XY0rleGM.d.ts} +2 -2
- package/dist/{index-0RIgvtdm.d.ts → index-ZXrvTM3A.d.ts} +2 -2
- package/dist/{index-DGXCnzOL.d.ts → index-aHC2C89h.d.ts} +1 -1
- package/dist/{index-0pBqcQXV.d.ts → index-tpkJfk6X.d.ts} +6 -1
- package/dist/index.d.ts +43 -44
- package/dist/index.js +101 -101
- package/dist/inputHold-BmChuR9x.js +525 -0
- package/dist/inputHoldState-pblUT4oh.js +39 -0
- package/dist/inputStream-LZdK8luP.js +239 -0
- package/dist/{landing-DFC97kl9.js → landing-B9Uvex6x.js} +3 -2
- package/dist/lazyBottomSheet-CL_PrTxb.js +16 -0
- package/dist/{loadCatalog-C8mRnC0E.d.ts → loadCatalog-2Hu-xisJ.d.ts} +2 -0
- package/dist/{loadCatalog-BeQt6Uq-.js → loadCatalog-umh_C97k.js} +2 -1
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +3 -3
- package/dist/{locale-B4FpGKpc.js → locale-BDPlcO62.js} +1 -1
- package/dist/presentationHold-7IkbR4d8.js +118 -0
- package/dist/{pressFeedback-CEUPQWIS.js → pressFeedback-DVR5V1b6.js} +3 -164
- package/dist/progress-FQfSgLZC.js +38 -0
- package/dist/renderedText-BwJdmps3.js +32 -0
- package/dist/{stillPointerGate-1Tgkns0J.js → stillPointerGate-D3loXLh7.js} +1 -1
- package/dist/textEntryTraits-cb0LZSNl.js +11 -0
- package/dist/themeTiming-CWEvdh31.js +287 -0
- package/dist/{tooltipFocusRules-vIH7PZh1.js → tooltipFocusRules-CFNKWzYn.js} +1 -1
- package/dist/{tooltipTriggerRules-DoBAbfGc.js → tooltipTriggerRules-DyPyWOdP.js} +1 -1
- package/dist/touchHold-CFJlSClt.js +30 -0
- package/dist/{context-DQPBIsl5.js → transientCopy-VAsg2a46.js} +1 -172
- package/dist/{types-OGMYGejX.d.ts → types-BA1veIoa.d.ts} +25 -2
- package/dist/{types-bAQk3F8G.d.ts → types-Cvh2VwQZ.d.ts} +4 -2
- package/dist/{types-C1ydeFiu.d.ts → types-DL-hRibg.d.ts} +1 -1
- package/dist/{useActionGroupTracking-PVBCtLUE.js → useActionGroupTracking-C6BzQzvp.js} +2 -2
- package/dist/{useChatStreamScroll-BIMKffDA.js → useChatStreamScroll-Cv51kRT0.js} +91 -30
- package/dist/{useDismiss-CMIsdIOQ.js → useDismiss-C7_S7qUA.js} +87 -5
- package/dist/useEntryErrorReport-Wee3N8IA.js +51 -0
- package/dist/useHeldPresentation-7MH-RlSF.js +24 -0
- package/dist/{useInputStatusIcon-CrgeMzrf.js → useInputStatusIcon-BFw-EXjJ.js} +1 -1
- package/dist/{useInputStatusIcon-B6m_t8cK.d.ts → useInputStatusIcon-CFkOmDS4.d.ts} +1 -1
- package/dist/{useMenuDrillIn-CQrzwZvx.js → useMenuDrillIn-CP0P49ej.js} +9 -8
- package/dist/{useMenuPress-wqRDvUMW.js → useMenuPress-Di_3jhOx.js} +5 -3
- package/dist/{usePressFeedback-aufF1sCH.js → usePressFeedback-BhNcuxQv.js} +1 -1
- package/dist/{useTooltip-BwqzEtoF.js → useTooltip-BpBMQ815.js} +4 -34
- package/dist/{useTouchHitArea-BMDBe36j.js → useTouchHitArea-CNZyA18Y.js} +2 -2
- package/dist/{useTruncationTooltip-CRhoPzeu.js → useTruncationTooltip-t5G978XB.js} +3 -3
- package/dist/{useTypeaheadMenuConfig-GvdIymRg.js → useTypeaheadMenuConfig-DeDGVR8S.js} +1 -1
- package/package.json +1 -1
- package/styles/alert-dialog.css +5 -0
- package/styles/chat.css +45 -17
- package/styles/context-menu.css +17 -73
- package/styles/dialog.css +18 -1
- package/styles/dropdown-menu.css +47 -38
- package/styles/file-input.css +8 -1
- package/styles/hover-card.css +13 -72
- package/styles/input-group.css +0 -15
- package/styles/layer.css +68 -0
- package/styles/multi-selector.css +17 -30
- package/styles/number-input.css +49 -4
- package/styles/pagination.css +0 -22
- package/styles/popover.css +26 -72
- package/styles/selector.css +17 -30
- package/styles/text-area.css +16 -1
- package/styles/text-input.css +26 -5
- package/styles/tooltip.css +12 -71
- package/styles/typeahead.css +17 -30
- package/dist/Popover-DpR4rwiW.js +0 -374
- package/dist/index-B9WzWqzk.d.ts +0 -18
- package/dist/index-CyMStZq4.d.ts +0 -957
- package/dist/types-DIYwbkpe.d.ts +0 -33
|
@@ -5,17 +5,19 @@ import { t as _sfc_main$2 } from "./VisuallyHidden-cpmsV-0M.js";
|
|
|
5
5
|
import { t as _sfc_main$3 } from "./ButtonTooltip-CNKOQHYR.js";
|
|
6
6
|
import { t as useButtonTooltip } from "./useButtonTooltip-DjCaZMp_.js";
|
|
7
7
|
import { t as _sfc_main$4 } from "./FieldIcon-BU1ZWAuo.js";
|
|
8
|
-
import { t as _sfc_main$5 } from "./FieldInfoTip-
|
|
8
|
+
import { t as _sfc_main$5 } from "./FieldInfoTip-Dwl9HNp1.js";
|
|
9
9
|
import { a as useAstryxLocale, o as useComponentMessages } from "./context-B8IEFCDR.js";
|
|
10
10
|
import { n as useNumberField, t as computeSteppedValue } from "./useNumberField-Dk1BE3-K.js";
|
|
11
11
|
import { t as unicodeRegExp } from "./unicodeRegExp-B7yQnpFC.js";
|
|
12
12
|
import { n as toAsciiDigits, t as INVISIBLE_CHARS } from "./unicodeDigits-_BYIJcAu.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { t as
|
|
13
|
+
import { r as withholdCallerHandlers } from "./disabledInteraction-Bqoyhoss.js";
|
|
14
|
+
import { a as useAriaRequired } from "./context-CrVCeUUK.js";
|
|
15
|
+
import { t as _sfc_main$6 } from "./Field-Btyrw1hd.js";
|
|
16
|
+
import { t as useFieldPartStyling } from "./fieldParts-CuE5V12i.js";
|
|
16
17
|
import { t as numberInputMessages } from "./number-input-DTjrRWmU.js";
|
|
17
|
-
import { t as
|
|
18
|
-
import {
|
|
18
|
+
import { t as useEntryErrorReport } from "./useEntryErrorReport-Wee3N8IA.js";
|
|
19
|
+
import { t as _sfc_main$7 } from "./InputClearButton-C-j9Nf1s.js";
|
|
20
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, onScopeDispose, openBlock, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, unref, useAttrs, useId, useTemplateRef, watch, withCtx, withModifiers } from "vue";
|
|
19
21
|
import "../styles/number-input.css";
|
|
20
22
|
//#region src/NumberInput/numberParser.ts
|
|
21
23
|
/**
|
|
@@ -187,6 +189,33 @@ function parseNumberInput(input, options) {
|
|
|
187
189
|
if (options.max != null && value > options.max) return null;
|
|
188
190
|
return value;
|
|
189
191
|
}
|
|
192
|
+
/** 提交时夹到的范围:整数字段把边界往里取整。 */
|
|
193
|
+
function resolveCommitRange(options) {
|
|
194
|
+
return {
|
|
195
|
+
min: options.min == null ? null : options.isIntegerOnly ? Math.ceil(options.min) : options.min,
|
|
196
|
+
max: options.max == null ? null : options.isIntegerOnly ? Math.floor(options.max) : options.max
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* 提交不了的草稿的拒绝;能提交的草稿(包括空草稿)返回 null。
|
|
201
|
+
* 超出普通范围的数会被夹到边界,不算拒绝。
|
|
202
|
+
*/
|
|
203
|
+
function getNumberInputRejection(input, options) {
|
|
204
|
+
const trimmed = input.trim();
|
|
205
|
+
if (trimmed === "") return null;
|
|
206
|
+
const value = parseLocaleNumber(trimmed, options.locale);
|
|
207
|
+
if (value == null || !Number.isFinite(value)) return { kind: "unreadable" };
|
|
208
|
+
if (options.isIntegerOnly && !Number.isInteger(value)) return {
|
|
209
|
+
kind: "fractional",
|
|
210
|
+
value
|
|
211
|
+
};
|
|
212
|
+
const { min, max } = resolveCommitRange(options);
|
|
213
|
+
if (min != null && max != null && min > max) return {
|
|
214
|
+
kind: "outOfRange",
|
|
215
|
+
value
|
|
216
|
+
};
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
190
219
|
/**
|
|
191
220
|
* 整段草稿只在离开或按 Enter 时做一次决定。
|
|
192
221
|
* 空草稿:有清除按钮就清空,否则回到原值。
|
|
@@ -197,8 +226,7 @@ function resolveNumberInputCommit(input, options) {
|
|
|
197
226
|
if (input.trim() === "") return options.hasClear ? { type: "clear" } : { type: "revert" };
|
|
198
227
|
const value = parseNumericInput(input, options);
|
|
199
228
|
if (value === null) return { type: "revert" };
|
|
200
|
-
const
|
|
201
|
-
const max = options.max == null ? null : options.isIntegerOnly ? Math.floor(options.max) : options.max;
|
|
229
|
+
const { min, max } = resolveCommitRange(options);
|
|
202
230
|
if (min != null && max != null && min > max) return { type: "revert" };
|
|
203
231
|
const committedValue = min != null && value < min ? min : max != null && value > max ? max : value;
|
|
204
232
|
return {
|
|
@@ -208,6 +236,230 @@ function resolveNumberInputCommit(input, options) {
|
|
|
208
236
|
};
|
|
209
237
|
}
|
|
210
238
|
//#endregion
|
|
239
|
+
//#region src/NumberInput/useStepperHold.ts
|
|
240
|
+
/**
|
|
241
|
+
* 按住步进按钮的节奏:按下 `delayMs` 后第一次重复,之后每次间隔是上一次的 `acceleration` 倍,
|
|
242
|
+
* 从 `firstIntervalMs` 一路缩到 `minIntervalMs`。
|
|
243
|
+
*/
|
|
244
|
+
const STEPPER_HOLD = {
|
|
245
|
+
delayMs: 500,
|
|
246
|
+
firstIntervalMs: 250,
|
|
247
|
+
acceleration: .9,
|
|
248
|
+
minIntervalMs: 50
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* 按住步进按钮(鼠标或笔)会重复步进,重复写进输入框的草稿,松手或指针取消时只提交一次。
|
|
252
|
+
* 按下不到 0.5 秒松手是一次点击,立刻步进并提交;手指只保留它那一下点击的单步。
|
|
253
|
+
*/
|
|
254
|
+
function useStepperHold(options) {
|
|
255
|
+
const heldValue = options.heldValue;
|
|
256
|
+
let hold = null;
|
|
257
|
+
let isClickAfterHold = false;
|
|
258
|
+
/** 被另一次按下取消的重复按住的指针:它自己松手时仍要吞掉随后的 click。 */
|
|
259
|
+
let cancelledPointerId = null;
|
|
260
|
+
function clearTimer(target) {
|
|
261
|
+
if (target.timer != null) clearTimeout(target.timer);
|
|
262
|
+
target.timer = null;
|
|
263
|
+
}
|
|
264
|
+
/** 结束按住、不提交,并丢掉重复写下的草稿。 */
|
|
265
|
+
function cancel() {
|
|
266
|
+
if (hold == null) return;
|
|
267
|
+
const current = hold;
|
|
268
|
+
hold = null;
|
|
269
|
+
cancelledPointerId = current.held != null ? current.pointerId : null;
|
|
270
|
+
clearTimer(current);
|
|
271
|
+
heldValue.value = null;
|
|
272
|
+
}
|
|
273
|
+
watch(options.isLocked, (locked) => {
|
|
274
|
+
if (!locked) return;
|
|
275
|
+
heldValue.value = null;
|
|
276
|
+
if (hold != null) {
|
|
277
|
+
hold.isFrozen = true;
|
|
278
|
+
clearTimer(hold);
|
|
279
|
+
}
|
|
280
|
+
}, { flush: "sync" });
|
|
281
|
+
function start(direction, canStep, event) {
|
|
282
|
+
isClickAfterHold = false;
|
|
283
|
+
if (cancelledPointerId === event.pointerId) cancelledPointerId = null;
|
|
284
|
+
cancel();
|
|
285
|
+
if (event.button !== 0 || event.pointerType === "touch" || !canStep || options.isLocked()) return;
|
|
286
|
+
const first = options.stepFrom(options.base(), direction);
|
|
287
|
+
if (first == null) return;
|
|
288
|
+
event.currentTarget?.setPointerCapture?.(event.pointerId);
|
|
289
|
+
const current = {
|
|
290
|
+
pointerId: event.pointerId,
|
|
291
|
+
timer: null,
|
|
292
|
+
held: null,
|
|
293
|
+
intervalMs: STEPPER_HOLD.firstIntervalMs,
|
|
294
|
+
isFrozen: false
|
|
295
|
+
};
|
|
296
|
+
const repeat = () => {
|
|
297
|
+
const next = current.held == null ? first : options.stepFrom(current.held, direction);
|
|
298
|
+
if (next == null || next === current.held) {
|
|
299
|
+
current.timer = null;
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
current.held = next;
|
|
303
|
+
heldValue.value = next;
|
|
304
|
+
current.timer = setTimeout(repeat, current.intervalMs);
|
|
305
|
+
current.intervalMs = Math.max(STEPPER_HOLD.minIntervalMs, current.intervalMs * STEPPER_HOLD.acceleration);
|
|
306
|
+
};
|
|
307
|
+
current.timer = setTimeout(repeat, STEPPER_HOLD.delayMs);
|
|
308
|
+
hold = current;
|
|
309
|
+
}
|
|
310
|
+
function end(kind, pointerId) {
|
|
311
|
+
const current = hold;
|
|
312
|
+
if (current == null || current.pointerId !== pointerId) {
|
|
313
|
+
if (cancelledPointerId === pointerId) {
|
|
314
|
+
cancelledPointerId = null;
|
|
315
|
+
if (kind === "release") isClickAfterHold = true;
|
|
316
|
+
}
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
hold = null;
|
|
320
|
+
clearTimer(current);
|
|
321
|
+
if (current.held == null) return;
|
|
322
|
+
isClickAfterHold = kind === "release";
|
|
323
|
+
heldValue.value = null;
|
|
324
|
+
if (current.isFrozen || options.isLocked()) return;
|
|
325
|
+
options.commit(current.held);
|
|
326
|
+
}
|
|
327
|
+
function onContextMenu() {
|
|
328
|
+
const current = hold;
|
|
329
|
+
if (current == null) return;
|
|
330
|
+
cancel();
|
|
331
|
+
cancelledPointerId = current.pointerId;
|
|
332
|
+
isClickAfterHold = true;
|
|
333
|
+
}
|
|
334
|
+
function consumeClick(event) {
|
|
335
|
+
const isAfterHold = isClickAfterHold;
|
|
336
|
+
isClickAfterHold = false;
|
|
337
|
+
return isAfterHold && event.detail > 0;
|
|
338
|
+
}
|
|
339
|
+
onScopeDispose(cancel);
|
|
340
|
+
return {
|
|
341
|
+
start,
|
|
342
|
+
end,
|
|
343
|
+
onContextMenu,
|
|
344
|
+
consumeClick,
|
|
345
|
+
cancel
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
//#endregion
|
|
349
|
+
//#region src/NumberInput/useTypedNumber.ts
|
|
350
|
+
function toEntryError(text, rejection) {
|
|
351
|
+
if (rejection == null) return null;
|
|
352
|
+
return rejection.kind === "unreadable" ? {
|
|
353
|
+
kind: "unreadable",
|
|
354
|
+
text
|
|
355
|
+
} : {
|
|
356
|
+
kind: rejection.kind,
|
|
357
|
+
text,
|
|
358
|
+
value: rejection.value
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* 数字输入框的打字状态:草稿、拒绝和提交。
|
|
363
|
+
*
|
|
364
|
+
* 一个数没有固定长度,只有 Enter 或失焦才算打完。打字时什么都不标、不显示、不念,不管草稿是什么。
|
|
365
|
+
* Enter 或失焦时,读不成数字的文字、整数字段里的小数、`min` 大于 `max` 时的任何数,
|
|
366
|
+
* 都留在框里,字段把 `message` 当 error 状态显示,`aria-invalid`,并且只念一次。
|
|
367
|
+
* 之后的编辑让草稿仍然不对时,拒绝继续亮着;改成能收的数或清空时立刻消失。
|
|
368
|
+
* 新的值、禁用都会丢掉草稿;超出普通范围的数仍然夹到边界提交。
|
|
369
|
+
*/
|
|
370
|
+
function useTypedNumber(options) {
|
|
371
|
+
const draft = shallowRef(null);
|
|
372
|
+
const shown = shallowRef(null);
|
|
373
|
+
const isKeptAtBlur = shallowRef(false);
|
|
374
|
+
/** Enter 或失焦刚刚亮出拒绝。这一刻传进来的新值不顶掉草稿,调用方可以在这里恢复自己的值。 */
|
|
375
|
+
let isRevealing = false;
|
|
376
|
+
const entryError = computed(() => options.isDisabled() ? null : shown.value);
|
|
377
|
+
const { fieldStatus, alertMessage } = useEntryErrorReport({
|
|
378
|
+
entryError: () => entryError.value,
|
|
379
|
+
rejectionMessage: () => entryError.value != null && !options.isHeld() ? options.message() : null,
|
|
380
|
+
status: options.status,
|
|
381
|
+
callerErrorPrecedence: "always",
|
|
382
|
+
hasListener: options.hasListener,
|
|
383
|
+
report: options.reportEntryError
|
|
384
|
+
});
|
|
385
|
+
function reset() {
|
|
386
|
+
draft.value = null;
|
|
387
|
+
shown.value = null;
|
|
388
|
+
isKeptAtBlur.value = false;
|
|
389
|
+
}
|
|
390
|
+
function judge(text) {
|
|
391
|
+
return toEntryError(text, getNumberInputRejection(text, options.rules()));
|
|
392
|
+
}
|
|
393
|
+
function onInput(text) {
|
|
394
|
+
draft.value = text;
|
|
395
|
+
isKeptAtBlur.value = false;
|
|
396
|
+
if (shown.value !== null && getNumberInputRejection(text, options.rules()) === null) shown.value = null;
|
|
397
|
+
}
|
|
398
|
+
function commit(trigger) {
|
|
399
|
+
if (draft.value === null) return;
|
|
400
|
+
if (options.isDisabled()) {
|
|
401
|
+
reset();
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
const rejection = judge(draft.value);
|
|
405
|
+
if (rejection != null) {
|
|
406
|
+
shown.value = rejection;
|
|
407
|
+
isKeptAtBlur.value = trigger === "blur";
|
|
408
|
+
isRevealing = true;
|
|
409
|
+
nextTick(() => {
|
|
410
|
+
isRevealing = false;
|
|
411
|
+
});
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
shown.value = null;
|
|
415
|
+
isKeptAtBlur.value = false;
|
|
416
|
+
const decision = resolveNumberInputCommit(draft.value, {
|
|
417
|
+
...options.rules(),
|
|
418
|
+
hasClear: options.hasClear()
|
|
419
|
+
});
|
|
420
|
+
if (trigger === "blur" || decision.type === "commit" && decision.didClamp) draft.value = null;
|
|
421
|
+
if (decision.type === "clear") {
|
|
422
|
+
if (options.hasClear() && options.value() != null) options.commitValue(null);
|
|
423
|
+
} else if (decision.type === "commit" && decision.value !== options.value()) options.commitValue(decision.value);
|
|
424
|
+
}
|
|
425
|
+
watch(() => {
|
|
426
|
+
const { min, max, isIntegerOnly, locale } = options.rules();
|
|
427
|
+
return [
|
|
428
|
+
options.value() ?? null,
|
|
429
|
+
min ?? null,
|
|
430
|
+
max ?? null,
|
|
431
|
+
isIntegerOnly,
|
|
432
|
+
locale,
|
|
433
|
+
options.isDisabled()
|
|
434
|
+
];
|
|
435
|
+
}, (next, prev) => {
|
|
436
|
+
if (next[5] && (draft.value !== null || shown.value !== null || isKeptAtBlur.value)) {
|
|
437
|
+
reset();
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
const hasKept = shown.value !== null || isKeptAtBlur.value;
|
|
441
|
+
let isReplaced = false;
|
|
442
|
+
if (!Object.is(next[0], prev[0]) && hasKept && !isRevealing) {
|
|
443
|
+
reset();
|
|
444
|
+
isReplaced = true;
|
|
445
|
+
}
|
|
446
|
+
if (next.slice(1, 5).some((item, index) => !Object.is(item, prev[index + 1])) && !isReplaced && shown.value !== null && draft.value !== null) {
|
|
447
|
+
const rejection = judge(draft.value);
|
|
448
|
+
shown.value = rejection;
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
return {
|
|
452
|
+
draft,
|
|
453
|
+
isKeptAtBlur,
|
|
454
|
+
entryError,
|
|
455
|
+
fieldStatus,
|
|
456
|
+
alertMessage,
|
|
457
|
+
onInput,
|
|
458
|
+
commit,
|
|
459
|
+
reset
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
//#endregion
|
|
211
463
|
//#region src/NumberInput/NumberInput.vue
|
|
212
464
|
const _hoisted_1 = [
|
|
213
465
|
"data-status",
|
|
@@ -226,7 +478,6 @@ const _hoisted_3 = [
|
|
|
226
478
|
"name",
|
|
227
479
|
"placeholder",
|
|
228
480
|
"autocomplete",
|
|
229
|
-
"disabled",
|
|
230
481
|
"readonly",
|
|
231
482
|
"aria-disabled",
|
|
232
483
|
"aria-valuemin",
|
|
@@ -243,9 +494,14 @@ const _hoisted_4 = {
|
|
|
243
494
|
key: 5,
|
|
244
495
|
class: "astryx-number-input-buttons"
|
|
245
496
|
};
|
|
246
|
-
const _hoisted_5 = [
|
|
247
|
-
|
|
248
|
-
|
|
497
|
+
const _hoisted_5 = [
|
|
498
|
+
"data-direction",
|
|
499
|
+
"aria-disabled",
|
|
500
|
+
"aria-label",
|
|
501
|
+
"onPointerdown",
|
|
502
|
+
"onClick"
|
|
503
|
+
];
|
|
504
|
+
const _hoisted_6 = ["name", "value"];
|
|
249
505
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
250
506
|
name: "AstryxNumberInput",
|
|
251
507
|
inheritAttrs: false,
|
|
@@ -288,6 +544,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
288
544
|
name: {},
|
|
289
545
|
status: {},
|
|
290
546
|
statusVariant: { default: "attached" },
|
|
547
|
+
entryErrorBehavior: {},
|
|
291
548
|
containerClass: { type: [
|
|
292
549
|
Boolean,
|
|
293
550
|
null,
|
|
@@ -323,12 +580,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
323
580
|
"focus",
|
|
324
581
|
"blur",
|
|
325
582
|
"enter",
|
|
326
|
-
"keydown"
|
|
583
|
+
"keydown",
|
|
584
|
+
"entryErrorChange"
|
|
327
585
|
],
|
|
328
586
|
setup(__props, { emit: __emit }) {
|
|
329
587
|
const props = __props;
|
|
330
588
|
const emit = __emit;
|
|
331
589
|
const size = useSize(() => props.size, "md");
|
|
590
|
+
const instance = getCurrentInstance();
|
|
332
591
|
const attrs = useAttrs();
|
|
333
592
|
const inputElement = useTemplateRef("input");
|
|
334
593
|
const container = useTemplateRef("container");
|
|
@@ -351,20 +610,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
351
610
|
const disabledMessage = computed(() => props.disabledMessage ?? props.disabledReason);
|
|
352
611
|
const showsDisabledMessage = computed(() => isDisabled.value && !!disabledMessage.value?.trim());
|
|
353
612
|
const disabledTooltip = useButtonTooltip(showsDisabledMessage);
|
|
354
|
-
const
|
|
613
|
+
const iconName = computed(() => typeof props.startIcon === "string" && props.startIcon ? props.startIcon : void 0);
|
|
614
|
+
const icon = computed(() => props.startIcon && typeof props.startIcon !== "string" ? toRaw(props.startIcon) : void 0);
|
|
355
615
|
const labelIcon = computed(() => props.labelIcon ? toRaw(props.labelIcon) : void 0);
|
|
356
|
-
/** 正在编辑的原始文本;null 表示没有未提交的输入,按聚焦状态决定显示什么 */
|
|
357
|
-
const draft = shallowRef(null);
|
|
358
616
|
const isFocused = shallowRef(false);
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
return props.formatValue?.(props.modelValue) ?? String(props.modelValue);
|
|
362
|
-
});
|
|
363
|
-
const displayValue = computed(() => {
|
|
364
|
-
if (draft.value !== null) return draft.value;
|
|
365
|
-
if (props.modelValue == null) return "";
|
|
366
|
-
return isFocused.value ? formatEditableNumber(props.modelValue, locale.value) : formattedText.value;
|
|
367
|
-
});
|
|
617
|
+
/** 按住步进重复走到的数,按住期间输入框显示它。 */
|
|
618
|
+
const heldValue = shallowRef(null);
|
|
368
619
|
function draftOptions() {
|
|
369
620
|
return {
|
|
370
621
|
min: props.min,
|
|
@@ -373,17 +624,6 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
373
624
|
locale: locale.value
|
|
374
625
|
};
|
|
375
626
|
}
|
|
376
|
-
/** 草稿文本是否有问题:解析不出数字,或者跑出范围。空草稿不算无效。 */
|
|
377
|
-
const isDraftValid = computed(() => {
|
|
378
|
-
if (draft.value === null || draft.value.trim() === "") return true;
|
|
379
|
-
return parseNumberInput(draft.value, draftOptions()) !== null;
|
|
380
|
-
});
|
|
381
|
-
/** 步进从草稿的读数走。读不出来就用已经提交的值。 */
|
|
382
|
-
const valueForStepping = computed(() => {
|
|
383
|
-
if (draft.value === null) return props.modelValue ?? null;
|
|
384
|
-
if (draft.value.trim() === "") return null;
|
|
385
|
-
return parseNumberInput(draft.value, draftOptions()) ?? props.modelValue ?? null;
|
|
386
|
-
});
|
|
387
627
|
const modelValueRef = computed({
|
|
388
628
|
get: () => props.modelValue ?? null,
|
|
389
629
|
set: (value) => {
|
|
@@ -408,7 +648,42 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
408
648
|
if (typeof status === "string") return { type: status };
|
|
409
649
|
return status;
|
|
410
650
|
}
|
|
411
|
-
|
|
651
|
+
/** 调用方是否监听了 `entryErrorChange`。声明过的事件不进 attrs,只能看 vnode 上的 props。 */
|
|
652
|
+
function hasEntryErrorListener() {
|
|
653
|
+
return Boolean(instance?.vnode.props?.onEntryErrorChange);
|
|
654
|
+
}
|
|
655
|
+
const typed = useTypedNumber({
|
|
656
|
+
value: () => props.modelValue,
|
|
657
|
+
rules: draftOptions,
|
|
658
|
+
hasClear: () => hasClear.value,
|
|
659
|
+
isDisabled: () => isDisabled.value,
|
|
660
|
+
isHeld: () => heldValue.value !== null,
|
|
661
|
+
status: () => resolvedStatus(props.status),
|
|
662
|
+
hasListener: hasEntryErrorListener,
|
|
663
|
+
message: () => messages.value.numberInput.invalidNumber,
|
|
664
|
+
commitValue: (value) => numberField.setValue(value),
|
|
665
|
+
reportEntryError: (error) => emit("entryErrorChange", error)
|
|
666
|
+
});
|
|
667
|
+
const draft = typed.draft;
|
|
668
|
+
const formattedText = computed(() => {
|
|
669
|
+
if (props.modelValue == null) return "";
|
|
670
|
+
return props.formatValue?.(props.modelValue) ?? String(props.modelValue);
|
|
671
|
+
});
|
|
672
|
+
const displayValue = computed(() => {
|
|
673
|
+
const held = heldValue.value;
|
|
674
|
+
if (held !== null) return formatEditableNumber(held, locale.value);
|
|
675
|
+
if (draft.value !== null) return draft.value;
|
|
676
|
+
if (props.modelValue == null) return "";
|
|
677
|
+
return isFocused.value ? formatEditableNumber(props.modelValue, locale.value) : formattedText.value;
|
|
678
|
+
});
|
|
679
|
+
/** 步进从草稿的读数走。读不出来就用已经提交的值。 */
|
|
680
|
+
const valueForStepping = computed(() => {
|
|
681
|
+
if (draft.value === null) return props.modelValue ?? null;
|
|
682
|
+
if (draft.value.trim() === "") return null;
|
|
683
|
+
return parseNumberInput(draft.value, draftOptions()) ?? props.modelValue ?? null;
|
|
684
|
+
});
|
|
685
|
+
const hasHiddenFormInput = computed(() => Boolean(props.formatValue) || typed.isKeptAtBlur.value);
|
|
686
|
+
const statusValue = computed(() => typed.fieldStatus.value);
|
|
412
687
|
const statusType = computed(() => statusValue.value?.type);
|
|
413
688
|
const fieldBindings = computed(() => ({
|
|
414
689
|
label: props.label ?? "",
|
|
@@ -450,7 +725,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
450
725
|
]
|
|
451
726
|
});
|
|
452
727
|
function inputAttrs() {
|
|
453
|
-
return parts.forwardedAttrs();
|
|
728
|
+
return withholdCallerHandlers(parts.forwardedAttrs(), isDisabled.value);
|
|
454
729
|
}
|
|
455
730
|
function describedBy(fieldIds) {
|
|
456
731
|
return [
|
|
@@ -463,9 +738,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
463
738
|
function labelledBy(fieldLabelId) {
|
|
464
739
|
return [fieldLabelId, attrs["aria-labelledby"]].filter(Boolean).join(" ") || void 0;
|
|
465
740
|
}
|
|
466
|
-
function
|
|
741
|
+
function stepFrom(current, direction) {
|
|
467
742
|
return computeSteppedValue({
|
|
468
|
-
currentValue:
|
|
743
|
+
currentValue: current,
|
|
469
744
|
direction,
|
|
470
745
|
min: props.min ?? null,
|
|
471
746
|
max: props.max ?? null,
|
|
@@ -473,14 +748,25 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
473
748
|
integerOnly: isIntegerOnly.value
|
|
474
749
|
});
|
|
475
750
|
}
|
|
476
|
-
|
|
477
|
-
|
|
751
|
+
function commitStepped(value) {
|
|
752
|
+
typed.reset();
|
|
753
|
+
if (value !== (props.modelValue ?? null)) numberField.setValue(value);
|
|
754
|
+
}
|
|
755
|
+
const stepperHold = useStepperHold({
|
|
756
|
+
heldValue,
|
|
757
|
+
base: () => valueForStepping.value,
|
|
758
|
+
stepFrom,
|
|
759
|
+
isLocked: () => isDisabled.value || isReadOnly.value,
|
|
760
|
+
commit: commitStepped
|
|
761
|
+
});
|
|
762
|
+
const steppingBase = computed(() => heldValue.value ?? valueForStepping.value);
|
|
763
|
+
const canIncrement = computed(() => stepFrom(steppingBase.value, 1) !== steppingBase.value);
|
|
764
|
+
const canDecrement = computed(() => stepFrom(steppingBase.value, -1) !== steppingBase.value);
|
|
478
765
|
function stepBy(direction) {
|
|
479
766
|
if (isDisabled.value || isReadOnly.value) return;
|
|
480
|
-
const next =
|
|
767
|
+
const next = stepFrom(valueForStepping.value, direction);
|
|
481
768
|
if (next == null) return;
|
|
482
|
-
|
|
483
|
-
if (next !== (props.modelValue ?? null)) numberField.setValue(next);
|
|
769
|
+
commitStepped(next);
|
|
484
770
|
}
|
|
485
771
|
function focusInput() {
|
|
486
772
|
inputElement.value?.focus({ preventScroll: true });
|
|
@@ -491,33 +777,32 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
491
777
|
target.value = displayValue.value;
|
|
492
778
|
return;
|
|
493
779
|
}
|
|
494
|
-
|
|
495
|
-
}
|
|
496
|
-
function commitDraft(trigger) {
|
|
497
|
-
if (draft.value === null) return;
|
|
498
|
-
const decision = resolveNumberInputCommit(draft.value, {
|
|
499
|
-
...draftOptions(),
|
|
500
|
-
hasClear: hasClear.value
|
|
501
|
-
});
|
|
502
|
-
if (trigger === "blur" || decision.type === "commit" && decision.didClamp) draft.value = null;
|
|
503
|
-
if (decision.type === "clear") {
|
|
504
|
-
if (hasClear.value && props.modelValue != null) numberField.setValue(null);
|
|
505
|
-
} else if (decision.type === "commit" && decision.value !== props.modelValue) numberField.setValue(decision.value);
|
|
780
|
+
typed.onInput(target.value);
|
|
506
781
|
}
|
|
507
|
-
function onFocus(event) {
|
|
508
|
-
draft.value = null;
|
|
782
|
+
async function onFocus(event) {
|
|
783
|
+
if (!typed.isKeptAtBlur.value) draft.value = null;
|
|
784
|
+
const input = event.currentTarget;
|
|
785
|
+
const shouldReselect = input.value.length > 0 && input.selectionStart === 0 && input.selectionEnd === input.value.length;
|
|
509
786
|
isFocused.value = true;
|
|
510
787
|
disabledTooltip.onTooltipPointerEnter();
|
|
511
788
|
emit("focus", event);
|
|
789
|
+
if (shouldReselect) {
|
|
790
|
+
await nextTick();
|
|
791
|
+
if (input.ownerDocument.activeElement === input) input.setSelectionRange(0, input.value.length);
|
|
792
|
+
}
|
|
512
793
|
}
|
|
513
794
|
function onBlur(event) {
|
|
514
|
-
|
|
795
|
+
typed.commit("blur");
|
|
515
796
|
isFocused.value = false;
|
|
516
797
|
disabledTooltip.onBlur();
|
|
517
798
|
emit("blur", event);
|
|
518
799
|
}
|
|
519
800
|
function onKeyDown(event) {
|
|
520
801
|
if (event.isComposing || event.keyCode === 229) return;
|
|
802
|
+
if (isDisabled.value) {
|
|
803
|
+
if (event.key === "Enter") event.preventDefault();
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
521
806
|
if (!(event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) && (event.key === "ArrowUp" || event.key === "ArrowDown")) {
|
|
522
807
|
emit("keydown", event);
|
|
523
808
|
if (event.defaultPrevented) return;
|
|
@@ -526,7 +811,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
526
811
|
return;
|
|
527
812
|
}
|
|
528
813
|
if (event.key === "Enter") {
|
|
529
|
-
|
|
814
|
+
typed.commit("enter");
|
|
530
815
|
emit("enter", event);
|
|
531
816
|
}
|
|
532
817
|
emit("keydown", event);
|
|
@@ -539,11 +824,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
539
824
|
event.stopPropagation();
|
|
540
825
|
stepBy(event.deltaY < 0 ? 1 : -1);
|
|
541
826
|
}
|
|
542
|
-
|
|
827
|
+
function clearValue() {
|
|
543
828
|
if (isDisabled.value || isReadOnly.value) return;
|
|
544
|
-
|
|
829
|
+
typed.reset();
|
|
545
830
|
numberField.setValue(null);
|
|
546
|
-
await nextTick();
|
|
547
831
|
focusInput();
|
|
548
832
|
}
|
|
549
833
|
function focusFromContainer(event) {
|
|
@@ -553,7 +837,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
553
837
|
if (inputElement.value?.ownerDocument.getSelection()?.toString()) return;
|
|
554
838
|
focusInput();
|
|
555
839
|
}
|
|
556
|
-
function stepFromButton(direction) {
|
|
840
|
+
function stepFromButton(direction, event) {
|
|
841
|
+
if (stepperHold.consumeClick(event)) {
|
|
842
|
+
focusInput();
|
|
843
|
+
return;
|
|
844
|
+
}
|
|
557
845
|
focusInput();
|
|
558
846
|
stepBy(direction);
|
|
559
847
|
}
|
|
@@ -578,7 +866,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
578
866
|
onPointerenter: _cache[4] || (_cache[4] = (...args) => unref(disabledTooltip).onPointerEnter && unref(disabledTooltip).onPointerEnter(...args)),
|
|
579
867
|
onPointerleave: _cache[5] || (_cache[5] = (...args) => unref(disabledTooltip).onPointerLeave && unref(disabledTooltip).onPointerLeave(...args))
|
|
580
868
|
}, [
|
|
581
|
-
_ctx.$slots.icon || icon.value ? (openBlock(), createElementBlock("span", _hoisted_2, [renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
869
|
+
_ctx.$slots.icon || icon.value || iconName.value ? (openBlock(), createElementBlock("span", _hoisted_2, [renderSlot(_ctx.$slots, "icon", {}, () => [iconName.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
870
|
+
key: 0,
|
|
871
|
+
icon: iconName.value,
|
|
872
|
+
size: "sm"
|
|
873
|
+
}, null, 8, ["icon"])) : icon.value ? (openBlock(), createBlock(resolveDynamicComponent(icon.value), { key: 1 })) : createCommentVNode("v-if", true)])])) : createCommentVNode("v-if", true),
|
|
582
874
|
createElementVNode("input", mergeProps({
|
|
583
875
|
id: inputId.value,
|
|
584
876
|
ref: "input"
|
|
@@ -588,18 +880,17 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
588
880
|
inputmode: isIntegerOnly.value ? "numeric" : "decimal",
|
|
589
881
|
role: "spinbutton",
|
|
590
882
|
value: displayValue.value,
|
|
591
|
-
name: resolvedName.value && !unref(isDisabled) && !
|
|
883
|
+
name: resolvedName.value && !unref(isDisabled) && !hasHiddenFormInput.value ? resolvedName.value : void 0,
|
|
592
884
|
placeholder: props.placeholder,
|
|
593
885
|
autocomplete: props.autoComplete ?? inputAttrs().autocomplete,
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
"aria-disabled": showsDisabledMessage.value || void 0,
|
|
886
|
+
readonly: isReadOnly.value || unref(isDisabled),
|
|
887
|
+
"aria-disabled": unref(isDisabled) || void 0,
|
|
597
888
|
"aria-valuemin": props.min ?? void 0,
|
|
598
889
|
"aria-valuemax": props.max ?? void 0,
|
|
599
890
|
"aria-valuenow": props.modelValue ?? void 0,
|
|
600
891
|
"aria-valuetext": props.modelValue == null || !props.formatValue ? void 0 : formattedText.value,
|
|
601
892
|
"aria-required": unref(ariaRequired),
|
|
602
|
-
"aria-invalid": statusType.value === "error" ||
|
|
893
|
+
"aria-invalid": statusType.value === "error" || unref(typed).entryError.value != null ? "true" : void 0,
|
|
603
894
|
"aria-labelledby": labelledBy(field?.labelId),
|
|
604
895
|
"aria-describedby": describedBy(field?.describedBy),
|
|
605
896
|
"data-autofocus": props.hasAutoFocus || void 0,
|
|
@@ -619,7 +910,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
619
910
|
role: "alert",
|
|
620
911
|
"aria-live": "assertive"
|
|
621
912
|
}, {
|
|
622
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
913
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(typed).alertMessage.value), 1)]),
|
|
623
914
|
_: 1
|
|
624
915
|
}),
|
|
625
916
|
hasClear.value && props.modelValue != null && !unref(isDisabled) && !isReadOnly.value ? (openBlock(), createBlock(_sfc_main$7, {
|
|
@@ -636,37 +927,33 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
636
927
|
key: 4,
|
|
637
928
|
type: statusValue.value.type
|
|
638
929
|
}, null, 8, ["type"])) : createCommentVNode("v-if", true),
|
|
639
|
-
props.hasNumberSteppers ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
},
|
|
660
|
-
|
|
661
|
-
icon: "numberInput:stepperDown",
|
|
662
|
-
size: "xsm"
|
|
663
|
-
})], 40, _hoisted_6)])) : createCommentVNode("v-if", true),
|
|
664
|
-
resolvedName.value && !unref(isDisabled) && props.formatValue ? (openBlock(), createElementBlock("input", {
|
|
930
|
+
props.hasNumberSteppers ? (openBlock(), createElementBlock("div", _hoisted_4, [(openBlock(), createElementBlock(Fragment, null, renderList([1, -1], (direction) => {
|
|
931
|
+
return createElementVNode("button", {
|
|
932
|
+
key: direction,
|
|
933
|
+
type: "button",
|
|
934
|
+
class: normalizeClass(["astryx-number-input-button astryx-number-input-stepper", direction === 1 ? "increment" : "decrement"]),
|
|
935
|
+
"data-direction": direction === 1 ? "increment" : "decrement",
|
|
936
|
+
"aria-disabled": unref(isDisabled) || isReadOnly.value || !(direction === 1 ? canIncrement.value : canDecrement.value) || void 0,
|
|
937
|
+
"aria-label": direction === 1 ? incrementLabel.value : decrementLabel.value,
|
|
938
|
+
tabindex: "-1",
|
|
939
|
+
onPointerdown: withModifiers(($event) => unref(stepperHold).start(direction, direction === 1 ? canIncrement.value : canDecrement.value, $event), ["prevent"]),
|
|
940
|
+
onPointerup: _cache[0] || (_cache[0] = ($event) => unref(stepperHold).end("release", $event.pointerId)),
|
|
941
|
+
onPointercancel: _cache[1] || (_cache[1] = ($event) => unref(stepperHold).end("cancel", $event.pointerId)),
|
|
942
|
+
onLostpointercapture: _cache[2] || (_cache[2] = ($event) => unref(stepperHold).end("cancel", $event.pointerId)),
|
|
943
|
+
onContextmenu: _cache[3] || (_cache[3] = ($event) => unref(stepperHold).onContextMenu()),
|
|
944
|
+
onClick: ($event) => stepFromButton(direction, $event)
|
|
945
|
+
}, [createVNode(_sfc_main$1, {
|
|
946
|
+
class: "astryx-number-input-chevron",
|
|
947
|
+
icon: "numberInput:stepperDown",
|
|
948
|
+
size: "xsm"
|
|
949
|
+
})], 42, _hoisted_5);
|
|
950
|
+
}), 64))])) : createCommentVNode("v-if", true),
|
|
951
|
+
resolvedName.value && !unref(isDisabled) && hasHiddenFormInput.value ? (openBlock(), createElementBlock("input", {
|
|
665
952
|
key: 6,
|
|
666
953
|
type: "hidden",
|
|
667
954
|
name: resolvedName.value,
|
|
668
955
|
value: props.modelValue ?? ""
|
|
669
|
-
}, null, 8,
|
|
956
|
+
}, null, 8, _hoisted_6)) : createCommentVNode("v-if", true)
|
|
670
957
|
], 46, _hoisted_1)]),
|
|
671
958
|
_: 2
|
|
672
959
|
}, [_ctx.$slots.labelIcon ? {
|
package/dist/Outline/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as _sfc_main, n as useOutlineFromDOM, r as parseOutlineFromMarkdown, t as useOutlineFromMarkdown } from "../Outline-
|
|
1
|
+
import { i as _sfc_main, n as useOutlineFromDOM, r as parseOutlineFromMarkdown, t as useOutlineFromMarkdown } from "../Outline-DvQbXc_H.js";
|
|
2
2
|
export { _sfc_main as Outline, parseOutlineFromMarkdown, useOutlineFromDOM, useOutlineFromMarkdown };
|