@astryx-vue/core 0.25.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-Cub9_aPC.js → AlertDialog-Sku86l_R.js} +191 -5
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-D62A7lqZ.js → AppShell-CJWvaqgZ.js} +5 -5
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-BKoSK75s.js → Avatar-C5KaulzE.js} +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Badge/index.d.ts +1 -2
- package/dist/Banner/index.d.ts +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-DGhRZLw4.js → BottomSheet-BtuF3uH6.js} +6 -3
- package/dist/{BottomSheet-CpLYy3vb.js → BottomSheet-DKrJyrhw.js} +1 -1
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-D-nHDHV8.js → Breadcrumbs-Cvzwy6sZ.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-U1qq8gkF.js → Chat-BIHEfSec.js} +202 -40
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-qm6lkjAw.js → CheckboxInput-wmX3Ekj-.js} +5 -5
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-DuCKhJHJ.js → CheckboxList-JWXHHU-u.js} +4 -4
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-BmUloCSR.js → Collapsible-BDCJRfFN.js} +2 -2
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-Cy7trpD3.js → CommandPalette-CJyQd7P-.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-DMBiVQWp.js → ComplexSelector-DIb8LjYJ.js} +4 -4
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-63ay7EE-.js → ContextMenu-HLvsROcS.js} +4 -4
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-B3Q91FDT.js → DateInput-D5YBijbb.js} +14 -33
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-B6Z66OsH.js → DateRangeInput-BlcHsqgx.js} +5 -5
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-B_7cn7ze.js → DateTimeInput-Bx3LWb9Y.js} +6 -6
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-CBPD5b-S.js → Dialog-CNLEL4Mf.js} +1 -1
- package/dist/{Dialog-C4FZ7p7Q.js → Dialog-CxeXQTqH.js} +1 -1
- package/dist/{DialogHeader-CQ3pnLYi.js → DialogHeader-CjXS_wba.js} +1 -1
- 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-BOwQLKm9.js → Drawer-B_4HN6v5.js} +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-9CR9TiKG.js → DropdownMenu-CvdeExRQ.js} +3 -3
- package/dist/{DropdownMenu-DwIfoTnV.js → DropdownMenu-D_fBzKvf.js} +38 -9
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-BG5g2jwJ.js → EmptyState-DUaFClsX.js} +4 -50
- package/dist/Field/index.d.ts +3 -3
- package/dist/Field/index.js +2 -2
- package/dist/{Field-eAowUUMX.js → Field-Btyrw1hd.js} +2 -2
- package/dist/{FieldLabel-CgYk-ORu.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-B7zeePbM.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.js +1 -1
- package/dist/{Heading-B1dNZQtu.js → Heading-BuZaxfIK.js} +1 -1
- package/dist/HoverCard/index.d.ts +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-LJi9llxi.js → InfoTip-BDo2xI8h.js} +1 -1
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-B8PGJZKH.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/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-B75ygGzG.js → Link-ruNSnGtC.js} +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-Cqrcj-ct.js → Markdown-C-KT_riK.js} +2 -2
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DLpEONfs.js → MobileNavToggle-BGNYwwfI.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-aR88r9xp.js → MoreMenu-DnwzVBEE.js} +2 -2
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-UTaDe-YT.js → MultiSelector-Cl_HzKvn.js} +6 -6
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.js +2 -2
- package/dist/{NavMenu-DS6y8ZAY.js → NavMenu-pCZjhMHe.js} +1 -1
- package/dist/{NavMenuItem-BqIi3o3D.js → NavMenuItem-BIqpJmH6.js} +1 -1
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-ClkOGF5j.js → NumberInput-Dz0H_XPw.js} +384 -97
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-UnVXBDIW.js → OverflowList-MCN1PhBB.js} +1 -1
- 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-CTCLE02h.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.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-BBOum0TP.js → PowerSearch-wXnusKnz.js} +14 -14
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-Bgg6zsKR.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-DPy5JQhm.js → RadioGroup-LUDji_LA.js} +5 -5
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-UN7IxQg8.js → RadioList-CmeUUgn-.js} +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-CCtsUveZ.js → Selector-BL_JH51H.js} +6 -6
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +2 -2
- package/dist/{SideNav-COl5ApOz.js → SideNav-DtAQA-o-.js} +5 -5
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-CYie9hWm.js → Slider-DEMdW9An.js} +3 -3
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-CHfgSYmv.js → StatusDot-_rucEf3d.js} +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-D24CvhDS.js → Switch-BxRYZTQV.js} +5 -5
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-DToCh5JW.js → TabList-D8KzfcGB.js} +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-D3mzxBr0.js → Table-DYDBgr3y.js} +14 -14
- package/dist/Text/index.js +1 -1
- package/dist/{Text-5p-eZodt.js → Text-CHauN5So.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Bp6D-riO.js → TextArea-BJl6YH4p.js} +53 -19
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-BYslwBDZ.js → TextInput-CGOVY0Zk.js} +77 -33
- package/dist/Theme/index.d.ts +2 -2
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-B_a8tOS7.js → Thumbnail-C3MvJ67s.js} +1 -1
- package/dist/{TimeField-MDSJny9m.js → TimeField-C2of7Ok5.js} +12 -31
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-B19amuxi.js → TimeInput-B_YY-IHW.js} +3 -3
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-BD3tfzrF.js → Timer-OULaFQFf.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-CqWoZUKM.js → Timestamp-B6J0nfYH.js} +1 -1
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-C-eorFsF.js → Tokenizer-CSmIMDc4.js} +2 -2
- 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-88zhGfzF.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-DMFIsFwy.js → TopNav-BsrhSbkn.js} +2 -2
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-nU2gSmQm.js → TreeList-BEPHdVYu.js} +2 -2
- package/dist/Typeahead/index.d.ts +2 -2
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-DUQfmy_r.js → Typeahead-CdLc7S2v.js} +3 -3
- 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-DVRsfCk1.js → assertOptions-CFn7Gdcr.js} +1 -1
- package/dist/{batch-DR5SgbnX.js → batch-CM-vJhQg.js} +2 -278
- package/dist/{handle-ma1yF_B_.js → bezier-Cts7gENO.js} +1 -21
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +3 -3
- package/dist/{composables-Do86VAmM.js → composables-D9DVeNnL.js} +4 -3162
- package/dist/{context-DsNhYm5O.js → context-CrVCeUUK.js} +1 -1
- package/dist/context-DH8E-qjm.js +173 -0
- package/dist/{edge-qfeek_VV.js → edge-BYXwSggM.js} +1 -1
- package/dist/{edgeRide-iWUNdlxe.js → edgeRide-B5mlN2Q4.js} +3 -3
- 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/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-CO9GW-ik.d.ts → index-B-3EGjfQ.d.ts} +1 -1
- package/dist/{index-Dcxqzk_d.d.ts → index-B3uBbehw.d.ts} +4 -4
- 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-BhdxP-OG.d.ts → index-BcRvRqWU.d.ts} +2 -2
- 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-BtgkNd0Q.d.ts → index-C2HVLdNb.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-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
- package/dist/{index-CiVrhGUJ.d.ts → index-C9ZssPUV.d.ts} +1 -1
- package/dist/{index-CbA8rR_b.d.ts → index-CBOv5j3c.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-CuFLztiI.d.ts +49 -0
- package/dist/{index-BxWCX2pJ.d.ts → index-DFLPv9io.d.ts} +3 -3
- package/dist/index-DHUCHxn2.d.ts +69 -0
- package/dist/{index-B52PMrO7.d.ts → index-DHsYyqMP.d.ts} +3 -3
- 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-BjmMJ_4E.d.ts → index-DSEEgvak.d.ts} +1149 -211
- 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 +44 -45
- package/dist/index.js +74 -74
- package/dist/{holdEntranceInput-DjEzfGRU.js → inputHold-BmChuR9x.js} +87 -85
- package/dist/inputHoldState-pblUT4oh.js +39 -0
- package/dist/{landing-qVsYAZ-v.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/{useHeldPresentation-fQsuYFhz.js → presentationHold-7IkbR4d8.js} +14 -22
- package/dist/progress-FQfSgLZC.js +38 -0
- package/dist/renderedText-BwJdmps3.js +32 -0
- package/dist/textEntryTraits-cb0LZSNl.js +11 -0
- package/dist/themeTiming-CWEvdh31.js +287 -0
- package/dist/{context-WY1ippwe.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/{useChatStreamScroll-BIMKffDA.js → useChatStreamScroll-Cv51kRT0.js} +91 -30
- package/dist/useEntryErrorReport-Wee3N8IA.js +51 -0
- package/dist/useHeldPresentation-7MH-RlSF.js +24 -0
- package/dist/{useInputStatusIcon-B6m_t8cK.d.ts → useInputStatusIcon-CFkOmDS4.d.ts} +1 -1
- package/dist/{useMenuDrillIn-CDn2na4X.js → useMenuDrillIn-CP0P49ej.js} +1 -1
- package/dist/{useMenuPress-CxUqSUZ9.js → useMenuPress-Di_3jhOx.js} +3 -1
- package/dist/{useTooltip-CJHbG8Pv.js → useTooltip-BpBMQ815.js} +2 -32
- package/dist/{useTruncationTooltip-BTcr1LCR.js → useTruncationTooltip-t5G978XB.js} +2 -2
- package/package.json +1 -1
- package/styles/alert-dialog.css +5 -0
- package/styles/chat.css +45 -17
- package/styles/dropdown-menu.css +47 -38
- package/styles/file-input.css +8 -1
- package/styles/input-group.css +0 -15
- package/styles/number-input.css +49 -4
- package/styles/pagination.css +0 -22
- package/styles/popover.css +13 -0
- package/styles/text-area.css +16 -1
- package/styles/text-input.css +26 -5
- package/dist/Popover-CZvRSqqD.js +0 -374
- package/dist/index-B63NOJRc.d.ts +0 -957
- package/dist/index-B9WzWqzk.d.ts +0 -18
- package/dist/types-DIYwbkpe.d.ts +0 -33
- package/dist/{index-CHx33xGa.d.ts → index-BqhgeAT4.d.ts} +2 -2
package/dist/Popover-CZvRSqqD.js
DELETED
|
@@ -1,374 +0,0 @@
|
|
|
1
|
-
import { t as _sfc_main$1 } from "./Button-D8AGK5oT.js";
|
|
2
|
-
import { r as useResolvedLayerTeleport } from "./useLayerMountTarget-BmZyeKWE.js";
|
|
3
|
-
import { t as useDismiss } from "./useDismiss-C7_S7qUA.js";
|
|
4
|
-
import { n as useLayer } from "./tooltipTriggerRules-DyPyWOdP.js";
|
|
5
|
-
import { t as _sfc_main$2 } from "./LayerContentBoundary-LCQLyxBT.js";
|
|
6
|
-
import { n as focusElement, r as getFocusables } from "./focus-x7mxEqjR.js";
|
|
7
|
-
import { a as inDocumentOrder } from "./focusRegion-CmDg7_4b.js";
|
|
8
|
-
import { t as useFocusTrap } from "./useFocusTrap-DTz_d7IP.js";
|
|
9
|
-
import { o as useComponentMessages } from "./context-B8IEFCDR.js";
|
|
10
|
-
import { t as useMergedRefs } from "./useMergedRefs-DTGo1cEU.js";
|
|
11
|
-
import { n as restoreLayerFocus, r as trackLayerFocus, t as isLayerFocusStranded } from "./layerFocusReturn-KvH6DMFT.js";
|
|
12
|
-
import { t as useScrollbars } from "./useScrollbars-Ch0xqJWO.js";
|
|
13
|
-
import { n as clampInlineSize, t as LAYER_MAX_INLINE_SIZE } from "./inlineSize-BNe8wggI.js";
|
|
14
|
-
import { t as popoverMessages } from "./popover-DxCyd_Ua.js";
|
|
15
|
-
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, nextTick, onMounted, onScopeDispose, onUpdated, openBlock, ref, renderSlot, shallowRef, toValue, unref, vShow, watch, withCtx, withDirectives } from "vue";
|
|
16
|
-
import "../styles/popover.css";
|
|
17
|
-
//#region src/Popover/initialFocus.ts
|
|
18
|
-
/** `element` 或它到 `container` 之间的某个祖先带着 `aria-disabled="true"`。 */
|
|
19
|
-
function isDisabledWithin(element, container) {
|
|
20
|
-
const disabled = element.closest("[aria-disabled=\"true\"]");
|
|
21
|
-
return disabled != null && container.contains(disabled);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* 把 Tab 停靠点排在前面,各组内保持文档顺序。带漫游 tabindex 的复合控件(网格、工具栏)里,
|
|
25
|
-
* 拿着 `tabindex="0"` 的那个成员排在 `-1` 的成员前面。
|
|
26
|
-
*/
|
|
27
|
-
function preferTabStops(elements) {
|
|
28
|
-
const isTabStop = (element) => element.getAttribute("tabindex") !== "-1";
|
|
29
|
-
return [...elements.filter(isTabStop), ...elements.filter((element) => !isTabStop(element))];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* 弹层打开时初始焦点可以落的元素,按优先顺序排。
|
|
33
|
-
* 跳过组件自带的后备关闭按钮和禁用(`aria-disabled`)的控件:禁用的控件仍能用 Tab 走到,
|
|
34
|
-
* 但不该一打开就停在它上面。
|
|
35
|
-
*/
|
|
36
|
-
function initialFocusCandidates(surface, skipSelector) {
|
|
37
|
-
return preferTabStops(inDocumentOrder(getFocusables(surface)).filter((element) => (skipSelector == null || element.closest(skipSelector) == null) && !isDisabledWithin(element, surface)));
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/Popover/usePopover.ts
|
|
41
|
-
const GAP = 4;
|
|
42
|
-
/**
|
|
43
|
-
* 对应原版 Astryx 的 `hooks/usePopover`:点击触发、能把焦点管起来的浮层。
|
|
44
|
-
* 在 `useLayer` 之上叠了焦点陷阱、自动聚焦、点击外部 / Escape 关闭和 ARIA 关系,
|
|
45
|
-
* `Popover` 组件内部也用它。
|
|
46
|
-
*
|
|
47
|
-
* ```ts
|
|
48
|
-
* const { triggerRef, contentRef, contentStyle, surfaceProps } = usePopover({ dialogLabel: 'Actions' })
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
function usePopover(options = {}) {
|
|
52
|
-
const triggerRef = shallowRef(null);
|
|
53
|
-
const anchorRef = shallowRef(null);
|
|
54
|
-
const layer = useLayer({
|
|
55
|
-
mode: "context",
|
|
56
|
-
isDefaultOpen: toValue(options.isOpen) === true,
|
|
57
|
-
anchor: computed(() => anchorRef.value ?? triggerRef.value),
|
|
58
|
-
placement: () => toValue(options.placement) ?? "below",
|
|
59
|
-
alignment: () => toValue(options.alignment) ?? "start",
|
|
60
|
-
gap: GAP,
|
|
61
|
-
onShow: () => options.onShow?.(),
|
|
62
|
-
onHide: () => options.onHide?.()
|
|
63
|
-
});
|
|
64
|
-
const isOpen = layer.isOpen;
|
|
65
|
-
function role() {
|
|
66
|
-
return toValue(options.role) ?? "dialog";
|
|
67
|
-
}
|
|
68
|
-
function isModalDialog() {
|
|
69
|
-
return role() === "dialog" && (toValue(options.isModal) ?? true);
|
|
70
|
-
}
|
|
71
|
-
function isEnabled() {
|
|
72
|
-
return toValue(options.isEnabled) ?? true;
|
|
73
|
-
}
|
|
74
|
-
useFocusTrap({
|
|
75
|
-
container: layer.contentRef,
|
|
76
|
-
isEnabled: computed(() => isOpen.value && isModalDialog()),
|
|
77
|
-
initialFocus: () => {
|
|
78
|
-
const surface = layer.contentRef.value;
|
|
79
|
-
if (surface == null) return null;
|
|
80
|
-
if (!(toValue(options.hasAutoFocus) ?? true)) return surface.ownerDocument.activeElement;
|
|
81
|
-
return initialFocusCandidates(surface, options.closeButtonSelector)[0] ?? surface;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
useDismiss({
|
|
85
|
-
container: layer.contentRef,
|
|
86
|
-
trigger: triggerRef,
|
|
87
|
-
isEnabled: computed(() => isOpen.value && ((toValue(options.hasLightDismiss) ?? true) || (toValue(options.hasEscapeDismiss) ?? true))),
|
|
88
|
-
dismissOnPointerOutside: () => toValue(options.hasLightDismiss) ?? true,
|
|
89
|
-
dismissOnOutsidePan: false,
|
|
90
|
-
dismissOnEscape: computed(() => toValue(options.hasEscapeDismiss) ?? true ? "close" : "block"),
|
|
91
|
-
onDismiss: () => layer.hide()
|
|
92
|
-
});
|
|
93
|
-
function setOpen(next) {
|
|
94
|
-
if (next) layer.show();
|
|
95
|
-
else layer.hide();
|
|
96
|
-
}
|
|
97
|
-
function toggle() {
|
|
98
|
-
setOpen(!isOpen.value);
|
|
99
|
-
}
|
|
100
|
-
function focusInitialTarget() {
|
|
101
|
-
const surface = layer.contentRef.value;
|
|
102
|
-
if (!surface || !isOpen.value) return;
|
|
103
|
-
const active = surface.ownerDocument.activeElement;
|
|
104
|
-
if (active != null && active !== surface && surface.contains(active)) return;
|
|
105
|
-
for (const candidate of initialFocusCandidates(surface, options.closeButtonSelector)) if (focusElement(candidate)) return;
|
|
106
|
-
if (role() === "dialog") focusElement(surface);
|
|
107
|
-
}
|
|
108
|
-
function onTriggerClick(event) {
|
|
109
|
-
if (!isEnabled()) return;
|
|
110
|
-
const target = event?.currentTarget;
|
|
111
|
-
if (target instanceof Element && target.getAttribute("aria-disabled") === "true") return;
|
|
112
|
-
toggle();
|
|
113
|
-
}
|
|
114
|
-
function onTriggerKeydown(event) {
|
|
115
|
-
if (event.key !== "Enter" && event.key !== " ") return;
|
|
116
|
-
event.preventDefault();
|
|
117
|
-
onTriggerClick(event);
|
|
118
|
-
}
|
|
119
|
-
let bound = null;
|
|
120
|
-
let haspopupBefore = null;
|
|
121
|
-
let expandedBefore = null;
|
|
122
|
-
let controlsBefore = null;
|
|
123
|
-
function applyTriggerAttributes() {
|
|
124
|
-
const element = triggerRef.value;
|
|
125
|
-
if (!element) return;
|
|
126
|
-
element.setAttribute("aria-haspopup", role() === "dialog" ? "dialog" : "true");
|
|
127
|
-
element.setAttribute("aria-expanded", String(isOpen.value));
|
|
128
|
-
if (isOpen.value) element.setAttribute("aria-controls", layer.id);
|
|
129
|
-
else if (element === bound && controlsBefore) element.setAttribute("aria-controls", controlsBefore);
|
|
130
|
-
else element.removeAttribute("aria-controls");
|
|
131
|
-
}
|
|
132
|
-
function restoreTriggerAttributes() {
|
|
133
|
-
const element = bound;
|
|
134
|
-
if (!element) return;
|
|
135
|
-
if (haspopupBefore) element.setAttribute("aria-haspopup", haspopupBefore);
|
|
136
|
-
else element.removeAttribute("aria-haspopup");
|
|
137
|
-
if (expandedBefore) element.setAttribute("aria-expanded", expandedBefore);
|
|
138
|
-
else element.removeAttribute("aria-expanded");
|
|
139
|
-
if (controlsBefore) element.setAttribute("aria-controls", controlsBefore);
|
|
140
|
-
else element.removeAttribute("aria-controls");
|
|
141
|
-
}
|
|
142
|
-
function bind(element) {
|
|
143
|
-
if (bound === element) return;
|
|
144
|
-
unbind();
|
|
145
|
-
bound = element;
|
|
146
|
-
haspopupBefore = element.getAttribute("aria-haspopup");
|
|
147
|
-
expandedBefore = element.getAttribute("aria-expanded");
|
|
148
|
-
controlsBefore = element.getAttribute("aria-controls");
|
|
149
|
-
element.addEventListener("click", onTriggerClick);
|
|
150
|
-
if (element.tagName !== "BUTTON" && element.getAttribute("role") === "button") element.addEventListener("keydown", onTriggerKeydown);
|
|
151
|
-
applyTriggerAttributes();
|
|
152
|
-
}
|
|
153
|
-
function unbind() {
|
|
154
|
-
if (bound == null) return;
|
|
155
|
-
bound.removeEventListener("click", onTriggerClick);
|
|
156
|
-
bound.removeEventListener("keydown", onTriggerKeydown);
|
|
157
|
-
restoreTriggerAttributes();
|
|
158
|
-
bound = null;
|
|
159
|
-
haspopupBefore = null;
|
|
160
|
-
expandedBefore = null;
|
|
161
|
-
controlsBefore = null;
|
|
162
|
-
}
|
|
163
|
-
watch(triggerRef, (element) => {
|
|
164
|
-
if (element == null) unbind();
|
|
165
|
-
else bind(element);
|
|
166
|
-
}, { flush: "sync" });
|
|
167
|
-
let focusRecord = null;
|
|
168
|
-
function stopFocusRecord() {
|
|
169
|
-
focusRecord?.stop();
|
|
170
|
-
focusRecord = null;
|
|
171
|
-
}
|
|
172
|
-
watch(isOpen, (open) => {
|
|
173
|
-
if (open) {
|
|
174
|
-
stopFocusRecord();
|
|
175
|
-
focusRecord = trackLayerFocus({ getLayer: () => layer.contentRef.value });
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
const record = focusRecord;
|
|
179
|
-
focusRecord = null;
|
|
180
|
-
if (record == null) return;
|
|
181
|
-
const surface = layer.contentRef.value;
|
|
182
|
-
if (isLayerFocusStranded(record, surface)) restoreLayerFocus(record, {
|
|
183
|
-
layer: surface,
|
|
184
|
-
trigger: triggerRef.value,
|
|
185
|
-
layerId: layer.id,
|
|
186
|
-
anchor: anchorRef.value,
|
|
187
|
-
name: "usePopover"
|
|
188
|
-
});
|
|
189
|
-
record.stop();
|
|
190
|
-
}, { flush: "sync" });
|
|
191
|
-
watch(isOpen, (open) => {
|
|
192
|
-
applyTriggerAttributes();
|
|
193
|
-
if (open && (toValue(options.hasAutoFocus) ?? true) && role() === "dialog") nextTick(focusInitialTarget);
|
|
194
|
-
}, { immediate: true });
|
|
195
|
-
watch(() => toValue(options.isOpen), (open) => {
|
|
196
|
-
if (open === void 0) return;
|
|
197
|
-
layer.isOpen.value = open;
|
|
198
|
-
}, { immediate: true });
|
|
199
|
-
watch(() => toValue(options.isEnabled), (enabled) => {
|
|
200
|
-
if (!enabled && isOpen.value) setOpen(false);
|
|
201
|
-
});
|
|
202
|
-
onScopeDispose(() => {
|
|
203
|
-
unbind();
|
|
204
|
-
stopFocusRecord();
|
|
205
|
-
});
|
|
206
|
-
const surfaceProps = computed(() => {
|
|
207
|
-
const props = { id: layer.id };
|
|
208
|
-
if (role() !== "dialog") return props;
|
|
209
|
-
props.tabindex = -1;
|
|
210
|
-
if (isOpen.value) {
|
|
211
|
-
props.role = "dialog";
|
|
212
|
-
props["aria-label"] = toValue(options.dialogLabel);
|
|
213
|
-
if (toValue(options.isModal) ?? true) props["aria-modal"] = "true";
|
|
214
|
-
}
|
|
215
|
-
return props;
|
|
216
|
-
});
|
|
217
|
-
const triggerProps = computed(() => ({
|
|
218
|
-
"aria-haspopup": role() === "dialog" ? "dialog" : "true",
|
|
219
|
-
"aria-expanded": String(isOpen.value),
|
|
220
|
-
"aria-controls": isOpen.value ? layer.id : void 0
|
|
221
|
-
}));
|
|
222
|
-
return {
|
|
223
|
-
isOpen,
|
|
224
|
-
triggerRef,
|
|
225
|
-
anchorRef,
|
|
226
|
-
contentRef: layer.contentRef,
|
|
227
|
-
id: layer.id,
|
|
228
|
-
anchorId: layer.anchorId,
|
|
229
|
-
contentStyle: layer.contentStyle,
|
|
230
|
-
resolvedPlacement: layer.resolvedPlacement,
|
|
231
|
-
surfaceProps,
|
|
232
|
-
triggerProps,
|
|
233
|
-
show: () => setOpen(true),
|
|
234
|
-
hide: () => setOpen(false),
|
|
235
|
-
toggle
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
//#endregion
|
|
239
|
-
//#region src/Popover/Popover.vue
|
|
240
|
-
const _hoisted_1 = ["data-placement"];
|
|
241
|
-
const _hoisted_2 = {
|
|
242
|
-
key: 0,
|
|
243
|
-
class: "astryx-popover__close"
|
|
244
|
-
};
|
|
245
|
-
const DEFAULT_MAX_WIDTH = 320;
|
|
246
|
-
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
247
|
-
name: "AstryxPopover",
|
|
248
|
-
__name: "Popover",
|
|
249
|
-
props: {
|
|
250
|
-
placement: { default: "below" },
|
|
251
|
-
alignment: { default: "start" },
|
|
252
|
-
isOpen: {
|
|
253
|
-
type: Boolean,
|
|
254
|
-
default: void 0
|
|
255
|
-
},
|
|
256
|
-
isEnabled: {
|
|
257
|
-
type: Boolean,
|
|
258
|
-
default: true
|
|
259
|
-
},
|
|
260
|
-
width: { default: void 0 },
|
|
261
|
-
padding: { default: 3 },
|
|
262
|
-
label: { default: void 0 },
|
|
263
|
-
role: { default: "dialog" },
|
|
264
|
-
isModal: {
|
|
265
|
-
type: Boolean,
|
|
266
|
-
default: true
|
|
267
|
-
},
|
|
268
|
-
hasCloseButton: {
|
|
269
|
-
type: Boolean,
|
|
270
|
-
default: true
|
|
271
|
-
},
|
|
272
|
-
closeButtonLabel: { default: void 0 },
|
|
273
|
-
hasAutoFocus: {
|
|
274
|
-
type: Boolean,
|
|
275
|
-
default: true
|
|
276
|
-
},
|
|
277
|
-
hasLightDismiss: {
|
|
278
|
-
type: Boolean,
|
|
279
|
-
default: true
|
|
280
|
-
},
|
|
281
|
-
hasEscapeDismiss: {
|
|
282
|
-
type: Boolean,
|
|
283
|
-
default: true
|
|
284
|
-
},
|
|
285
|
-
anchor: { default: void 0 }
|
|
286
|
-
},
|
|
287
|
-
emits: ["openChange"],
|
|
288
|
-
setup(__props, { emit: __emit }) {
|
|
289
|
-
const props = __props;
|
|
290
|
-
const emit = __emit;
|
|
291
|
-
const messages = useComponentMessages({ popover: popoverMessages });
|
|
292
|
-
const closeLabel = computed(() => props.closeButtonLabel ?? messages.value.popover.close);
|
|
293
|
-
const popover = usePopover({
|
|
294
|
-
placement: () => props.placement,
|
|
295
|
-
alignment: () => props.alignment,
|
|
296
|
-
isOpen: () => props.isOpen,
|
|
297
|
-
isEnabled: () => props.isEnabled,
|
|
298
|
-
hasLightDismiss: () => props.hasLightDismiss,
|
|
299
|
-
hasEscapeDismiss: () => props.hasEscapeDismiss,
|
|
300
|
-
hasAutoFocus: () => props.hasAutoFocus,
|
|
301
|
-
closeButtonSelector: ".astryx-popover__close",
|
|
302
|
-
dialogLabel: () => props.label,
|
|
303
|
-
role: () => props.role,
|
|
304
|
-
isModal: () => props.isModal,
|
|
305
|
-
onShow: () => emit("openChange", true),
|
|
306
|
-
onHide: () => emit("openChange", false)
|
|
307
|
-
});
|
|
308
|
-
const { triggerRef, anchorRef, contentRef, isOpen: isOpenState, contentStyle: layerStyle, resolvedPlacement, surfaceProps } = popover;
|
|
309
|
-
const setContentRef = useMergedRefs([contentRef]);
|
|
310
|
-
const wrapperRef = ref(null);
|
|
311
|
-
const teleportTarget = useResolvedLayerTeleport(computed(() => props.anchor ?? wrapperRef.value));
|
|
312
|
-
const bodyRef = ref(null);
|
|
313
|
-
useScrollbars(bodyRef);
|
|
314
|
-
const anchorWidth = ref(0);
|
|
315
|
-
const surfaceStyle = computed(() => {
|
|
316
|
-
const style = {
|
|
317
|
-
"--_popover-padding": `var(--astryx-spacing-${String(props.padding).replace(".", "-")})`,
|
|
318
|
-
"top": layerStyle.value.top,
|
|
319
|
-
"left": layerStyle.value.left,
|
|
320
|
-
"maxWidth": props.width == null ? clampInlineSize(`${DEFAULT_MAX_WIDTH}px`) : LAYER_MAX_INLINE_SIZE
|
|
321
|
-
};
|
|
322
|
-
if (props.width != null) style.width = typeof props.width === "number" ? `${props.width}px` : props.width;
|
|
323
|
-
else style.minWidth = clampInlineSize(`min(${anchorWidth.value}px, ${DEFAULT_MAX_WIDTH}px)`);
|
|
324
|
-
return style;
|
|
325
|
-
});
|
|
326
|
-
function triggerHost() {
|
|
327
|
-
return props.anchor ?? wrapperRef.value;
|
|
328
|
-
}
|
|
329
|
-
function findTriggerButton(element) {
|
|
330
|
-
if (!element) return null;
|
|
331
|
-
if (element.matches("button, [role=\"button\"]")) return element;
|
|
332
|
-
return element.querySelector("button, [role=\"button\"]");
|
|
333
|
-
}
|
|
334
|
-
function syncTrigger() {
|
|
335
|
-
anchorRef.value = triggerHost();
|
|
336
|
-
triggerRef.value = findTriggerButton(triggerHost());
|
|
337
|
-
}
|
|
338
|
-
watch(isOpenState, (open) => {
|
|
339
|
-
if (!open) return;
|
|
340
|
-
anchorWidth.value = triggerHost()?.getBoundingClientRect().width ?? 0;
|
|
341
|
-
});
|
|
342
|
-
watch(() => props.anchor, () => {
|
|
343
|
-
nextTick(syncTrigger);
|
|
344
|
-
});
|
|
345
|
-
onMounted(syncTrigger);
|
|
346
|
-
onUpdated(syncTrigger);
|
|
347
|
-
return (_ctx, _cache) => {
|
|
348
|
-
return openBlock(), createElementBlock(Fragment, null, [!__props.anchor ? (openBlock(), createElementBlock("span", {
|
|
349
|
-
key: 0,
|
|
350
|
-
ref_key: "wrapperRef",
|
|
351
|
-
ref: wrapperRef,
|
|
352
|
-
class: "astryx-popover-trigger"
|
|
353
|
-
}, [renderSlot(_ctx.$slots, "default")], 512)) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1), (openBlock(), createBlock(Teleport, { to: unref(teleportTarget) }, [withDirectives(createElementVNode("div", mergeProps({
|
|
354
|
-
ref: unref(setContentRef),
|
|
355
|
-
class: "astryx-popover",
|
|
356
|
-
"data-placement": unref(resolvedPlacement),
|
|
357
|
-
style: surfaceStyle.value
|
|
358
|
-
}, unref(surfaceProps)), [createElementVNode("div", {
|
|
359
|
-
ref_key: "bodyRef",
|
|
360
|
-
ref: bodyRef,
|
|
361
|
-
class: "astryx-popover__body"
|
|
362
|
-
}, [createVNode(_sfc_main$2, null, {
|
|
363
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "content")]),
|
|
364
|
-
_: 3
|
|
365
|
-
})], 512), __props.hasCloseButton ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(_sfc_main$1), {
|
|
366
|
-
variant: "secondary",
|
|
367
|
-
label: closeLabel.value,
|
|
368
|
-
onClick: _cache[0] || (_cache[0] = ($event) => unref(popover).hide())
|
|
369
|
-
}, null, 8, ["label"])])) : createCommentVNode("v-if", true)], 16, _hoisted_1), [[vShow, unref(isOpenState)]])], 8, ["to"]))], 64);
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
//#endregion
|
|
374
|
-
export { usePopover as n, _sfc_main as t };
|