@astryx-vue/core 0.12.0 → 0.13.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-BO2LucRK.js → AlertDialog-igjA8kZr.js} +6 -6
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-kqwLt4ez.js → AppShell-DUHcLJWD.js} +2 -2
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-Bdnu3col.js → Avatar-KmdgVaAb.js} +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-C-8DEWdJ.js → Banner-Bf_nMW3-.js} +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-CgOzQHaA.js → BottomSheet-B57XUJV3.js} +3 -2
- package/dist/{BottomSheet-BECeWtEy.js → BottomSheet-BMqjymuf.js} +3 -3
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-Dxjz2Dxn.js → Breadcrumbs-aTPAdLdg.js} +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-BeNp2zq_.js → Button-sUkQ0Ufo.js} +5 -4
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-CosYAili.js → ButtonGroup-CWra-KDj.js} +3 -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-BCcyDFRy.js → Carousel-DmXceU9h.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-D3UDsL7W.js → Chat-CeibAkxn.js} +4 -4
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-iCg8FgRv.js → CheckboxInput-PvzPV1N1.js} +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-Dr40y9ME.js → CheckboxList-DKtNzb0t.js} +3 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-B0LPcu-J.js → CodeBlock-CTPuBH_r.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-D_lf06eE.js → CommandPalette-DIoT_vZh.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-BzGKWYEv.js → ComplexSelector-Dmbep7M7.js} +165 -49
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-6AnjpPJg.js → ContextMenu-DYnyk5rs.js} +4 -4
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-OkjtSKwt.js → DateInput-DgPIsWPu.js} +4 -4
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-B4HT9NfM.js → DateRangeInput-oOfhUt1Q.js} +3 -3
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-B_tQlraA.js → DateTimeInput-DZfghF2h.js} +5 -5
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-BtPktuiy.js → Dialog-Dkwt3mVt.js} +25 -8
- package/dist/{Dialog-3MKo31xn.js → Dialog-qIL4DUot.js} +1 -1
- package/dist/{DialogHeader-cr9rFLYM.js → DialogHeader-w4TCzYEj.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-Ba-yG1rk.js → Drawer-DBHSNUAa.js} +2 -2
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-DJK_xIUd.js → DropdownMenu-Cncx4FbU.js} +3 -3
- package/dist/{DropdownMenu-B9eUWp_X.js → DropdownMenu-DHvAlqSj.js} +5 -5
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-v1cvHKav.js → EmptyState-uWyPaIR1.js} +2 -2
- package/dist/Field/index.js +3 -3
- package/dist/{Field-Dc15m78p.js → Field-CqDOsI3P.js} +1 -1
- package/dist/{FieldInfoTip-BouJddgS.js → FieldInfoTip-CUh2koNc.js} +1 -1
- package/dist/{FieldLabel-CfO3zaZ5.js → FieldLabel-BMHNRAG3.js} +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-hNPjfW1i.js → FileInput-C6dK2pvX.js} +2 -2
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-C10qO8wg.js → Heading-C0axugQa.js} +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-3S3axq-o.js → HoverCard-C6Gxekg0.js} +3 -3
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-C91rhbvu.js → IconButton-Bv2eIsJy.js} +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-iKOp_vUV.js → InfoTip-BKsbmGA6.js} +4 -2
- package/dist/{InputClearButton-BiF7qGMR.js → InputClearButton-CSS2Tjat.js} +2 -2
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-CIKleAu8.js → InputGroup-DTGh1ylC.js} +1 -1
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-CyDjQn5Z.js → InternationalizationProvider-BYU2MRtX.js} +1 -1
- package/dist/{LayerContentBoundary-CvsKxwwm.js → LayerContentBoundary-DwTkbifx.js} +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-OHKb6r7D.js → Layout-BeYYiLFm.js} +1 -1
- package/dist/{LayoutPanel-D-rpTtC-.js → LayoutPanel-DDLcJgzG.js} +3 -0
- package/dist/Lightbox/index.d.ts +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-DZrWvhCQ.js → Lightbox-BZ-zBvly.js} +106 -28
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-CnlFkwpY.js → Link-Ddu0KjPZ.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-YVv-0uFI.js → Markdown-D7bQGV9u.js} +3 -3
- package/dist/MetadataList/index.d.ts +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-lgEHlilz.js → MobileNavToggle-Dfshmrdy.js} +3 -2
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-DaLb4bgr.js → MoreMenu-Bie4B7Jr.js} +4 -4
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-stzuffs3.js → MultiSelector-BXIpOmSU.js} +108 -53
- package/dist/{NavDisclosure-DG4jls5z.js → NavDisclosure-1otbO71l.js} +1 -1
- package/dist/{NavHeadingSurface-9JQsxTxs.js → NavHeadingSurface-BkMR3V5m.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-ChlWdHfi.js → NavMenu-dyGZS1yM.js} +2 -2
- package/dist/{NavMenuItem-DIMQohIa.js → NavMenuItem-CirgE73a.js} +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-DH0Cb7L6.js → NumberInput-0KbcEF3_.js} +3 -3
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-BGzqG78e.js → OverflowList-BdcaX1bz.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-DMG9KvKa.js → Pagination-eeM9SNsG.js} +1 -1
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-cnfHz2tm.js → Popover-BOQo9UPf.js} +78 -26
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-GD52glLU.js → PowerSearch-CaqFxaFb.js} +17 -17
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-gsm2A_cR.js → ProgressBar-BS3VSoE9.js} +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-D3TXgdwV.js → RadioGroup-DKaSstyl.js} +2 -2
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-Boj8QfPe.js → RadioList-DtKm9spP.js} +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-CyY6vVUg.js → Selector-DP012yul.js} +12 -47
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-s9yTmKX3.js → SideNav-L6CWk5fV.js} +5 -5
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-BQ4Dhxdx.js → Slider-DZS8mGZA.js} +1 -1
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-DF5wK42f.js → StatusDot-DaQGq8YN.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-B0E8cZy7.js → Switch-BN_NnBuc.js} +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-DBSXa5QT.js → TabList-Bmj4tGT-.js} +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-BxXYAtBy.js → Table-YDS_Hj1L.js} +12 -12
- package/dist/Text/index.js +1 -1
- package/dist/{Text-WB-fpFne.js → Text-IijvZmW-.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-CSoebCLx.js → TextArea-BDR179q1.js} +4 -4
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-B3qNW95s.js → TextInput-kUzxl99M.js} +4 -4
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-CTkLFo-A.js → Thumbnail-Disi5yDb.js} +2 -2
- package/dist/{TimeField-CMZxZ6gI.js → TimeField-C0la1AtP.js} +4 -4
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-BFWgRaV-.js → TimeInput-C_jTijHh.js} +2 -2
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-BD2gSoQ3.js → Timer-DifGERP8.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-DWnbOvnI.js → Timestamp-BjXZGAvO.js} +3 -3
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-aI9QMW-L.js → Toast-DBo0WRAd.js} +1 -1
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-DI9I-LBH.js → ToggleButton-B5HNykOh.js} +4 -3
- 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-Caqr8y0B.js → Tokenizer-CY0ymjYr.js} +109 -50
- 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-CGHpFMnc.js → Tooltip-4APVAlN9.js} +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-Cm_Hn6Ub.js → TopNav-XSZWAR-7.js} +4 -4
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-tz2lm5qb.js → Typeahead-ByeXwX8E.js} +48 -13
- package/dist/composables/index.d.ts +2 -1
- package/dist/composables/index.js +8 -7
- package/dist/context-Cgkyk-b7.js +10 -0
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-BSlzqFzV.d.ts → index-BcJzA5j_.d.ts} +3 -3
- package/dist/{index-Bmqz1lVz.d.ts → index-BpprL2SN.d.ts} +1 -1
- package/dist/{index-CuNFD1Yq.d.ts → index-Buxb8Onp.d.ts} +44 -44
- 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-1AZ4KZhg.d.ts → index-CCpcerMA.d.ts} +2 -2
- package/dist/{index-BvWBeoa8.d.ts → index-CEjvYAUZ.d.ts} +1 -1
- package/dist/{index-CQwracWX.d.ts → index-CfHBwR3F.d.ts} +7 -5
- package/dist/{index-DyALKpjX.d.ts → index-D1J81rYJ.d.ts} +19 -4
- package/dist/{index-B0XIZGY0.d.ts → index-D1RIIzDd.d.ts} +7 -7
- package/dist/{index-DydQ5Ngj.d.ts → index-D7YRtteD.d.ts} +1 -1
- package/dist/{index-FeZXsFO-.d.ts → index-DDrL_-hJ.d.ts} +1 -1
- package/dist/{index-WA7z12bQ.d.ts → index-DE1genab.d.ts} +12 -0
- package/dist/{index-D-YoRrfP.d.ts → index-DKuoSloc.d.ts} +2 -44
- package/dist/{index-rnFsCdJ7.d.ts → index-DMcf0QeR.d.ts} +1 -1
- package/dist/{index-B-Jla56c.d.ts → index-DPH5yoAr.d.ts} +1 -1
- package/dist/{index-CO9GW-ik.d.ts → index-DPklTi3o.d.ts} +1 -1
- package/dist/{index-BzZC2Y7c.d.ts → index-DYabo8TI.d.ts} +6 -5
- package/dist/{index-O9y23OPJ.d.ts → index-DneQgJfI.d.ts} +1 -1
- package/dist/{index-CL8JvxHW.d.ts → index-KcCNhdAw.d.ts} +1 -1
- package/dist/{index-utZGF4GR.d.ts → index-NOXYEdOI.d.ts} +1 -1
- package/dist/{index-DaXzQxos.d.ts → index-PffxihMx.d.ts} +8 -5
- package/dist/{index-3t5RAfNP.d.ts → index-YfMHAQ_D.d.ts} +9 -2
- package/dist/{index-C5bnMSjX.d.ts → index-x0rjeitC.d.ts} +4 -4
- package/dist/index.d.ts +28 -27
- package/dist/index.js +90 -89
- package/dist/{layerDepth-CNDh-IHb.js → layerDepth-BF74Cctw.js} +38 -14
- package/dist/layerFocusReturn-DMJaFgcY.js +121 -0
- package/dist/{loadCatalog-XbgoqaRp.js → loadCatalog-BtQRPyzj.js} +6 -2
- package/dist/{loadCatalog-CQEYXGuI.d.ts → loadCatalog-Kp7aQZpL.d.ts} +3 -0
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -4
- package/dist/{locale-BwnZeppK.js → locale-DET_YkFW.js} +1 -1
- package/dist/selectorEscape-BppRdqpc.js +52 -0
- package/dist/{useAnchoredListbox-9Gn8asBR.js → stillPointerGate-Bh02Mfnw.js} +20 -2
- package/dist/{tokenizer-DSka5PJD.js → tokenizer-ChiAuPN-.js} +5 -1
- package/dist/{tooltipTriggerRules-Bg4tG8w2.js → tooltipTriggerRules-BY3LAtUl.js} +1 -1
- package/dist/{searchResultMessage-BEqDlHdV.js → triggerVariant-BDVvyLtv.js} +18 -18
- package/dist/{useActionGroupTracking-B4niQ_tR.js → useActionGroupTracking-BJMRaXil.js} +1 -1
- package/dist/{useCombobox-CTo5C-gc.js → useCombobox-D374_pT8.js} +32 -8
- package/dist/{useDismiss-0-Z-9D0A.js → useDismiss-BWd-sQ18.js} +26 -5
- package/dist/{useRestoreFocus-CEG0n2AK.js → useFocusTrap-FJt5QhEd.js} +2 -36
- package/dist/{useHoverLayerDismiss-kYJ_NqL4.js → useHoverLayerDismiss-uhfzmZyf.js} +1 -1
- package/dist/useInputStatusIcon-B6m_t8cK.d.ts +45 -0
- package/dist/{useInputStatusIcon-Da2FiXwF.js → useInputStatusIcon-C3Q-q_wI.js} +1 -1
- package/dist/{useLayer-CED-g4Q2.js → useLayer-BGv_wRSG.js} +1 -1
- package/dist/{useOptionActionGrid-CkJcuvaU.js → useOptionActionGrid-C7ibYM_A.js} +15 -1
- package/dist/{useResizable-I3BCiLSL.js → useResizable-DTDhsLip.js} +1 -1
- package/dist/useRestoreFocus-D2-pGoOk.js +38 -0
- package/dist/{useTooltip-D8Tq7-yd.js → useTooltip-md1tr6ef.js} +61 -29
- package/dist/{context-BJ9RkXYX.js → useTouchHitArea-1WtV3u6F.js} +1 -10
- package/dist/{useTruncationTooltip-BNk2xslw.js → useTruncationTooltip-BGsFITq5.js} +3 -3
- package/dist/{useTypeahead-DSMObTtg.js → useTypeahead-BrUwR-kv.js} +1 -1
- package/dist/{TypeaheadMenu-BOzaCvSb.js → useTypeaheadAnnouncement-MbuZumTd.js} +75 -33
- package/package.json +1 -1
- package/styles/complex-selector.css +24 -1
- package/styles/dialog.css +0 -1
- package/styles/info-tip.css +0 -9
- package/styles/lightbox.css +7 -2
- package/styles/multi-selector.css +10 -0
- package/styles/popover.css +2 -0
- package/styles/selector.css +10 -0
- package/styles/tokenizer.css +64 -0
- package/styles/typeahead.css +28 -0
- package/dist/triggerVariant-BsL8jMHs.js +0 -16
- package/dist/{index-D8lv2BiD.d.ts → index-BqhgeAT4.d.ts} +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { r as registerLayerSurface } from "./layerSurfacePress-C3PjPpJP.js";
|
|
2
2
|
import { r as useResolvedLayerTeleport } from "./useLayerMountTarget-BmZyeKWE.js";
|
|
3
|
-
import { t as useLayer } from "./useLayer-
|
|
4
|
-
import { t as _sfc_main$1 } from "./LayerContentBoundary-
|
|
5
|
-
import {
|
|
3
|
+
import { t as useLayer } from "./useLayer-BGv_wRSG.js";
|
|
4
|
+
import { t as _sfc_main$1 } from "./LayerContentBoundary-DwTkbifx.js";
|
|
5
|
+
import { r as trackInteractionModality, t as getInteractionModality } from "./interactionModality-ACpTMhak.js";
|
|
6
|
+
import { i as matchesFocusVisible, n as isTextEntryControl, r as isTextEntryTap, t as isActionTrigger } from "./tooltipTriggerRules-BY3LAtUl.js";
|
|
6
7
|
import { t as useAnnounce } from "./announce-B210eJVf.js";
|
|
7
8
|
import { i as isFocusable } from "./focus-l8jVTcqd.js";
|
|
8
|
-
import { t as useHoverLayerDismiss } from "./useHoverLayerDismiss-
|
|
9
|
+
import { t as useHoverLayerDismiss } from "./useHoverLayerDismiss-uhfzmZyf.js";
|
|
9
10
|
import { Teleport, computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, inject, mergeProps, onMounted, onScopeDispose, openBlock, ref, renderSlot, shallowRef, toDisplayString, toValue, unref, vShow, watch, withCtx, withDirectives } from "vue";
|
|
10
11
|
import "../styles/tooltip.css";
|
|
11
12
|
//#region src/Tooltip/TooltipSurface.vue
|
|
@@ -107,6 +108,44 @@ function renderedText(element) {
|
|
|
107
108
|
return parts.join("").replace(/\s+/g, " ").trim();
|
|
108
109
|
}
|
|
109
110
|
//#endregion
|
|
111
|
+
//#region src/Tooltip/tooltipFocusRules.ts
|
|
112
|
+
/**
|
|
113
|
+
* 这次焦点算不算触发器的焦点,焦点到达时才判断:
|
|
114
|
+
* - `always`:触发器自己或里面任何元素拿到焦点都算;
|
|
115
|
+
* - `auto`:触发器自己拿到焦点算;焦点落在里面时,触发器此刻能聚焦才算。
|
|
116
|
+
* 漫游 tabindex 的成员挂监听时可能是 `-1`,轮到它时已经是 Tab 停靠点了;
|
|
117
|
+
* 普通包裹层仍然不理会里面子元素的焦点;
|
|
118
|
+
* - `never`:都不算。
|
|
119
|
+
*/
|
|
120
|
+
function isFocusForTrigger(mode, trigger, target) {
|
|
121
|
+
if (mode === "never") return false;
|
|
122
|
+
if (mode === "always") return true;
|
|
123
|
+
return target === trigger || isFocusable(trigger);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* 落在 `target` 上的焦点会不会打开气泡。只有 `:focus-visible` 的焦点会,轻点从来不会。
|
|
127
|
+
* 上一次输入是指针时,只有文本框会打开:浏览器给指针点进文本框的焦点也算 focus-visible,
|
|
128
|
+
* 而指针按下之后脚本挪过来的焦点,在别的元素上也可能被标成 focus-visible。
|
|
129
|
+
*/
|
|
130
|
+
function opensOnFocus(target, isTouch) {
|
|
131
|
+
if (isTouch || !matchesFocusVisible(target)) return false;
|
|
132
|
+
return isTextEntryControl(target) || getInteractionModality() !== "pointer";
|
|
133
|
+
}
|
|
134
|
+
function createFocusGate(mode) {
|
|
135
|
+
let counted = false;
|
|
136
|
+
return {
|
|
137
|
+
arrive(trigger, target) {
|
|
138
|
+
counted = trigger != null && isFocusForTrigger(mode(), trigger, target);
|
|
139
|
+
return counted;
|
|
140
|
+
},
|
|
141
|
+
leave(trigger, target) {
|
|
142
|
+
const wasCounted = counted || trigger != null && isFocusForTrigger(mode(), trigger, target);
|
|
143
|
+
counted = false;
|
|
144
|
+
return wasCounted;
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
110
149
|
//#region src/Tooltip/tooltipPresentInterest.ts
|
|
111
150
|
/** 仅库内部使用,不从 Tooltip 入口导出。 */
|
|
112
151
|
const tooltipPresentInterestKey = Symbol("astryx-tooltip-present-interest");
|
|
@@ -152,15 +191,9 @@ function useTooltip(options = {}) {
|
|
|
152
191
|
onHide: () => options.onHide?.()
|
|
153
192
|
});
|
|
154
193
|
const isOpen = computed(() => toValue(options.isOpen) ?? layer.isOpen.value);
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
function focusTriggerMode() {
|
|
159
|
-
return toValue(options.focusTrigger) ?? "auto";
|
|
160
|
-
}
|
|
161
|
-
function touchTriggerMode() {
|
|
162
|
-
return toValue(options.touchTrigger) ?? "auto";
|
|
163
|
-
}
|
|
194
|
+
const isEnabled = () => toValue(options.isEnabled) ?? true;
|
|
195
|
+
const focusTriggerMode = () => toValue(options.focusTrigger) ?? "auto";
|
|
196
|
+
const touchTriggerMode = () => toValue(options.touchTrigger) ?? "auto";
|
|
164
197
|
let showTimer;
|
|
165
198
|
let hideTimer;
|
|
166
199
|
function clearTimers() {
|
|
@@ -255,13 +288,17 @@ function useTooltip(options = {}) {
|
|
|
255
288
|
if (isControlled.value) return;
|
|
256
289
|
hideNow();
|
|
257
290
|
}
|
|
291
|
+
const focusGate = createFocusGate(focusTriggerMode);
|
|
292
|
+
function onFocusArrive(trigger, target, isTouch) {
|
|
293
|
+
if (!focusGate.arrive(trigger, target) || !isEnabled() || !opensOnFocus(target, isTouch)) return;
|
|
294
|
+
if (toValue(options.isOpen) === false) options.onShow?.();
|
|
295
|
+
else showNow();
|
|
296
|
+
}
|
|
258
297
|
function onFocusIn(event) {
|
|
259
|
-
|
|
260
|
-
if (!matchesFocusVisible(event.target)) return;
|
|
261
|
-
showNow();
|
|
298
|
+
onFocusArrive(bound, event.target, isTouchPointer.value);
|
|
262
299
|
}
|
|
263
|
-
function onFocusOut() {
|
|
264
|
-
scheduleHide();
|
|
300
|
+
function onFocusOut(event) {
|
|
301
|
+
if (focusGate.leave(bound, event.target)) scheduleHide();
|
|
265
302
|
}
|
|
266
303
|
function onHeldFocusOut(event) {
|
|
267
304
|
if (!isHeldOpen()) return;
|
|
@@ -332,23 +369,19 @@ function useTooltip(options = {}) {
|
|
|
332
369
|
layer.hide();
|
|
333
370
|
}
|
|
334
371
|
});
|
|
335
|
-
function shouldListenFocus(element) {
|
|
336
|
-
return focusTriggerMode() === "always" || focusTriggerMode() === "auto" && isFocusable(element);
|
|
337
|
-
}
|
|
338
372
|
let describedByBefore = null;
|
|
339
373
|
function bind(element) {
|
|
340
374
|
if (bound === element) return;
|
|
341
375
|
unbind();
|
|
342
376
|
bound = element;
|
|
377
|
+
trackInteractionModality();
|
|
343
378
|
element.addEventListener("pointerenter", onPointerEnter);
|
|
344
379
|
element.addEventListener("mouseenter", onMouseEnter);
|
|
345
380
|
element.addEventListener("mouseleave", onMouseLeave);
|
|
346
381
|
element.addEventListener("pointerdown", onPointerDown);
|
|
347
382
|
element.addEventListener("focusout", onHeldFocusOut);
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
element.addEventListener("focusout", onFocusOut);
|
|
351
|
-
}
|
|
383
|
+
element.addEventListener("focusin", onFocusIn);
|
|
384
|
+
element.addEventListener("focusout", onFocusOut);
|
|
352
385
|
describedByBefore = element.getAttribute("aria-describedby");
|
|
353
386
|
element.setAttribute("aria-describedby", [describedByBefore, layer.id].filter(Boolean).join(" "));
|
|
354
387
|
answerPresentInterest(presentInterest, element, {
|
|
@@ -357,7 +390,7 @@ function useTooltip(options = {}) {
|
|
|
357
390
|
isTouchPointer.value = true;
|
|
358
391
|
onTouchTap(tapEvent);
|
|
359
392
|
},
|
|
360
|
-
focus: (focused) =>
|
|
393
|
+
focus: (focused) => onFocusArrive(element, focused, false)
|
|
361
394
|
});
|
|
362
395
|
}
|
|
363
396
|
function unbind() {
|
|
@@ -380,9 +413,8 @@ function useTooltip(options = {}) {
|
|
|
380
413
|
else bind(element);
|
|
381
414
|
}, { flush: "sync" });
|
|
382
415
|
watch(() => toValue(options.isEnabled), (enabled) => {
|
|
383
|
-
if (enabled
|
|
384
|
-
|
|
385
|
-
showTimer = void 0;
|
|
416
|
+
if (enabled === false) hideNow();
|
|
417
|
+
else if (bound != null && bound.contains(document.activeElement)) onFocusArrive(bound, document.activeElement, false);
|
|
386
418
|
}, { flush: "sync" });
|
|
387
419
|
function syncControlled(open) {
|
|
388
420
|
layer.isOpen.value = open;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { c as PRESS_GROUP_ITEM_ATTRIBUTE, l as isTrackedByGroup, r as pressFadeMs, t as PRESSED_ATTRIBUTE } from "./pressFeedback-Bwwpex9q.js";
|
|
2
2
|
import { t as armStrayClick } from "./strayClick-CY-_ImKv.js";
|
|
3
|
-
import { t as defineLayerScopedKey } from "./scopedProvide-C-Df7c15.js";
|
|
4
3
|
import { toValue, watch } from "vue";
|
|
5
4
|
import "../styles/touch-hit-area.css";
|
|
6
5
|
/** 不长:热区就是目标本身。 */
|
|
@@ -665,12 +664,4 @@ function useTouchHitArea(element, enabled, options) {
|
|
|
665
664
|
});
|
|
666
665
|
}
|
|
667
666
|
//#endregion
|
|
668
|
-
|
|
669
|
-
const buttonGroupContextKey = defineLayerScopedKey("astryx-button-group", null);
|
|
670
|
-
/**
|
|
671
|
-
* 按钮是否画自己的触控热区。ButtonGroup、ToggleButtonGroup 提供 false:成员的热区由组统一画。
|
|
672
|
-
* 输入框的清除按钮也提供 false,它用输入框自己的那一小圈。浮层里的按钮读到默认值 true,照样画自己的。
|
|
673
|
-
*/
|
|
674
|
-
const buttonHitAreaContextKey = defineLayerScopedKey("astryx-button-hit-area", true);
|
|
675
|
-
//#endregion
|
|
676
|
-
export { GROUP_PRESS_POINTERS as a, resolveGroupTouch as c, useTouchHitArea as i, buttonHitAreaContextKey as n, createActionGroupTracker as o, GROUP_HIT_AREA as r, pressGroupItemProps as s, buttonGroupContextKey as t };
|
|
667
|
+
export { pressGroupItemProps as a, createActionGroupTracker as i, useTouchHitArea as n, resolveGroupTouch as o, GROUP_PRESS_POINTERS as r, GROUP_HIT_AREA as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as trackInteractionModality, t as getInteractionModality } from "./interactionModality-ACpTMhak.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as tooltipPresentInterestKey } from "./useTooltip-
|
|
4
|
-
import { t as _sfc_main$1 } from "./Tooltip-
|
|
2
|
+
import { i as matchesFocusVisible } from "./tooltipTriggerRules-BY3LAtUl.js";
|
|
3
|
+
import { n as tooltipPresentInterestKey } from "./useTooltip-md1tr6ef.js";
|
|
4
|
+
import { t as _sfc_main$1 } from "./Tooltip-4APVAlN9.js";
|
|
5
5
|
import { n as useTruncation, t as truncatePlacement } from "./useTruncation-C4pdlaXa.js";
|
|
6
6
|
import { computed, createBlock, createCommentVNode, defineComponent, openBlock, provide, shallowRef } from "vue";
|
|
7
7
|
//#region src/Text/TruncationTooltip.vue
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as isImeKeyEvent } from "./layerDepth-
|
|
1
|
+
import { a as isImeKeyEvent } from "./layerDepth-BF74Cctw.js";
|
|
2
2
|
import { n as isShortcutChord, r as nextTypeaheadBuffer, t as findTypeaheadMatch } from "./typeaheadMatch-Cl-oxKFt.js";
|
|
3
3
|
import { onScopeDispose, ref } from "vue";
|
|
4
4
|
//#region src/composables/useTypeahead.ts
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { t as characterCount } from "./characters-wTnzjkkR.js";
|
|
2
|
+
import { t as useAnnounce } from "./announce-B210eJVf.js";
|
|
2
3
|
import { n as useAsyncSource } from "./useAsyncSource-Gk0VtE7_.js";
|
|
3
|
-
import { t as useCombobox } from "./useCombobox-
|
|
4
|
+
import { t as useCombobox } from "./useCombobox-D374_pT8.js";
|
|
5
|
+
import { n as isDevBuild, t as devPropError } from "./devBuild-G249YcdZ.js";
|
|
4
6
|
import { t as _sfc_main$2 } from "./Spinner-DEVPDsD0.js";
|
|
5
|
-
import {
|
|
7
|
+
import { t as createStillPointerGate } from "./stillPointerGate-Bh02Mfnw.js";
|
|
8
|
+
import { i as isOptionAction, n as searchResultMessage, r as OptionAction, t as useOptionActionGrid } from "./useOptionActionGrid-C7ibYM_A.js";
|
|
6
9
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, watch, withModifiers } from "vue";
|
|
7
10
|
import "../styles/typeahead.css";
|
|
8
11
|
//#region src/Typeahead/queryLength.ts
|
|
@@ -46,6 +49,11 @@ function useTypeaheadMenu(options) {
|
|
|
46
49
|
if (source === previous || asyncSource.status.value !== "loading") return;
|
|
47
50
|
asyncSource.status.value = "idle";
|
|
48
51
|
}, { flush: "sync" });
|
|
52
|
+
const matchCount = computed(() => {
|
|
53
|
+
if (belowMinQueryLength.value) return 0;
|
|
54
|
+
const excluded = new Set(toValue(options.excludeIds) ?? []);
|
|
55
|
+
return asyncSource.items.value.filter((item) => !excluded.has(item.id)).length;
|
|
56
|
+
});
|
|
49
57
|
const entries = computed(() => {
|
|
50
58
|
const excluded = new Set(toValue(options.excludeIds) ?? []);
|
|
51
59
|
const blocked = new Set((toValue(options.blockedLabels) ?? []).map((label) => label.toLowerCase()));
|
|
@@ -203,6 +211,7 @@ function useTypeaheadMenu(options) {
|
|
|
203
211
|
error: asyncSource.error,
|
|
204
212
|
activeId,
|
|
205
213
|
belowMinQueryLength,
|
|
214
|
+
matchCount,
|
|
206
215
|
setQuery,
|
|
207
216
|
open,
|
|
208
217
|
close,
|
|
@@ -268,6 +277,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
268
277
|
},
|
|
269
278
|
setup(__props) {
|
|
270
279
|
const props = __props;
|
|
280
|
+
if (isDevBuild() && props.item == null) throw devPropError("TypeaheadItem", "item", "is required: the item to show, for example :item=\"{ id: 'nyc', label: 'New York' }\".");
|
|
271
281
|
return (_ctx, _cache) => {
|
|
272
282
|
return openBlock(), createElementBlock("span", {
|
|
273
283
|
class: "astryx-typeahead-item",
|
|
@@ -279,32 +289,28 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
279
289
|
//#endregion
|
|
280
290
|
//#region src/Typeahead/TypeaheadMenu.vue
|
|
281
291
|
const _hoisted_1 = {
|
|
282
|
-
class: "astryx-typeahead-menu",
|
|
283
|
-
role: "presentation"
|
|
284
|
-
};
|
|
285
|
-
const _hoisted_2 = {
|
|
286
292
|
key: 0,
|
|
287
293
|
class: "astryx-typeahead-state",
|
|
288
294
|
role: "status"
|
|
289
295
|
};
|
|
290
|
-
const
|
|
296
|
+
const _hoisted_2 = {
|
|
291
297
|
key: 1,
|
|
292
298
|
class: "astryx-typeahead-state",
|
|
293
299
|
role: "alert"
|
|
294
300
|
};
|
|
295
|
-
const
|
|
296
|
-
const
|
|
301
|
+
const _hoisted_3 = ["role", "aria-selected"];
|
|
302
|
+
const _hoisted_4 = {
|
|
297
303
|
key: 3,
|
|
298
304
|
class: "astryx-typeahead-options",
|
|
299
305
|
role: "presentation"
|
|
300
306
|
};
|
|
301
|
-
const
|
|
302
|
-
const
|
|
307
|
+
const _hoisted_5 = ["role", "aria-label"];
|
|
308
|
+
const _hoisted_6 = {
|
|
303
309
|
key: 0,
|
|
304
310
|
class: "astryx-typeahead-group-heading",
|
|
305
311
|
"aria-hidden": "true"
|
|
306
312
|
};
|
|
307
|
-
const
|
|
313
|
+
const _hoisted_7 = [
|
|
308
314
|
"id",
|
|
309
315
|
"role",
|
|
310
316
|
"aria-selected",
|
|
@@ -313,9 +319,9 @@ const _hoisted_8 = [
|
|
|
313
319
|
"onMouseenter",
|
|
314
320
|
"onClick"
|
|
315
321
|
];
|
|
316
|
-
const
|
|
317
|
-
const
|
|
318
|
-
const
|
|
322
|
+
const _hoisted_8 = ["id", "onClick"];
|
|
323
|
+
const _hoisted_9 = { class: "astryx-typeahead-option-copy" };
|
|
324
|
+
const _hoisted_10 = {
|
|
319
325
|
key: 0,
|
|
320
326
|
class: "astryx-typeahead-check",
|
|
321
327
|
width: "16",
|
|
@@ -324,12 +330,12 @@ const _hoisted_11 = {
|
|
|
324
330
|
fill: "none",
|
|
325
331
|
"aria-hidden": "true"
|
|
326
332
|
};
|
|
327
|
-
const
|
|
328
|
-
const
|
|
333
|
+
const _hoisted_11 = ["id"];
|
|
334
|
+
const _hoisted_12 = {
|
|
329
335
|
key: 2,
|
|
330
336
|
class: "astryx-typeahead-option-copy"
|
|
331
337
|
};
|
|
332
|
-
const
|
|
338
|
+
const _hoisted_13 = {
|
|
333
339
|
key: 3,
|
|
334
340
|
class: "astryx-typeahead-check",
|
|
335
341
|
width: "16",
|
|
@@ -385,27 +391,36 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
385
391
|
function actionId(index) {
|
|
386
392
|
return `${props.listboxId}-action-${index}`;
|
|
387
393
|
}
|
|
394
|
+
const pointerGate = createStillPointerGate();
|
|
395
|
+
/** 只有鼠标真的移动了才让行拿走高亮;键盘滚动让行从静止的鼠标下冒出来不算。 */
|
|
396
|
+
function onRowEnter(event, index) {
|
|
397
|
+
if (pointerGate.moved(event)) emit("highlight", index);
|
|
398
|
+
}
|
|
388
399
|
function onOptionClick(id, disabled) {
|
|
389
400
|
if (!disabled) emit("select", id);
|
|
390
401
|
}
|
|
391
402
|
return (_ctx, _cache) => {
|
|
392
|
-
return openBlock(), createElementBlock("div",
|
|
403
|
+
return openBlock(), createElementBlock("div", {
|
|
404
|
+
class: "astryx-typeahead-menu",
|
|
405
|
+
role: "presentation",
|
|
406
|
+
onMousemove: _cache[3] || (_cache[3] = (...args) => unref(pointerGate).track && unref(pointerGate).track(...args))
|
|
407
|
+
}, [props.status === "loading" && props.entries.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_sfc_main$2, {
|
|
393
408
|
size: "sm",
|
|
394
409
|
label: props.loadingText
|
|
395
|
-
}, null, 8, ["label"])])) : props.status === "error" ? (openBlock(), createElementBlock("div",
|
|
410
|
+
}, null, 8, ["label"])])) : props.status === "error" ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(props.errorText), 1)) : props.entries.length === 0 ? (openBlock(), createElementBlock("div", {
|
|
396
411
|
key: 2,
|
|
397
412
|
class: "astryx-typeahead-state",
|
|
398
413
|
role: props.grid ? "presentation" : "option",
|
|
399
414
|
"aria-selected": props.grid ? void 0 : "false",
|
|
400
415
|
"aria-disabled": "true"
|
|
401
|
-
}, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(props.emptyText), 1)])], 8,
|
|
416
|
+
}, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(props.emptyText), 1)])], 8, _hoisted_3)) : (openBlock(), createElementBlock("div", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (group, groupIndex) => {
|
|
402
417
|
return openBlock(), createElementBlock("div", {
|
|
403
418
|
key: group.heading ?? `__ungrouped-${groupIndex}`,
|
|
404
419
|
class: "astryx-typeahead-group",
|
|
405
420
|
role: props.grid ? group.heading ? "rowgroup" : "presentation" : group.heading ? "group" : "presentation",
|
|
406
421
|
"aria-label": group.heading
|
|
407
422
|
}, [
|
|
408
|
-
group.heading ? (openBlock(), createElementBlock("div",
|
|
423
|
+
group.heading ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(group.heading), 1)) : createCommentVNode("v-if", true),
|
|
409
424
|
createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events, vue-a11y/no-static-element-interactions -- 选项不进 Tab 序,方向键和 Enter 由组合框输入处理。 "),
|
|
410
425
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.rows, (row) => {
|
|
411
426
|
return openBlock(), createElementBlock("div", {
|
|
@@ -422,7 +437,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
422
437
|
"data-option-id": row.entry.id,
|
|
423
438
|
tabindex: "-1",
|
|
424
439
|
onMousedown: _cache[2] || (_cache[2] = withModifiers(() => {}, ["prevent"])),
|
|
425
|
-
onMouseenter: ($event) =>
|
|
440
|
+
onMouseenter: ($event) => onRowEnter($event, row.index),
|
|
426
441
|
onClick: ($event) => props.grid ? void 0 : onOptionClick(row.entry.id, row.entry.disabled)
|
|
427
442
|
}, [
|
|
428
443
|
createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events -- 选项格不进 Tab 序,方向键和 Enter 由组合框输入处理。 "),
|
|
@@ -433,7 +448,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
433
448
|
role: "gridcell",
|
|
434
449
|
tabindex: "-1",
|
|
435
450
|
onClick: ($event) => onOptionClick(row.entry.id, row.entry.disabled)
|
|
436
|
-
}, [createElementVNode("span",
|
|
451
|
+
}, [createElementVNode("span", _hoisted_9, [renderSlot(_ctx.$slots, "item", {
|
|
437
452
|
entry: row.entry,
|
|
438
453
|
isActive: row.index === props.activeIndex,
|
|
439
454
|
isSelected: Boolean(row.entry.selected)
|
|
@@ -445,13 +460,13 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
445
460
|
disabled: row.entry.disabled
|
|
446
461
|
},
|
|
447
462
|
"is-disabled": row.entry.disabled
|
|
448
|
-
}, null, 8, ["item", "is-disabled"])])]), row.entry.selected ? (openBlock(), createElementBlock("svg",
|
|
463
|
+
}, null, 8, ["item", "is-disabled"])])]), row.entry.selected ? (openBlock(), createElementBlock("svg", _hoisted_10, [..._cache[4] || (_cache[4] = [createElementVNode("path", {
|
|
449
464
|
d: "M3.5 8.5L6.5 11.5L12.5 4.5",
|
|
450
465
|
stroke: "currentColor",
|
|
451
466
|
"stroke-width": "1.5",
|
|
452
467
|
"stroke-linecap": "round",
|
|
453
468
|
"stroke-linejoin": "round"
|
|
454
|
-
}, null, -1)])])) : createCommentVNode("v-if", true)], 8,
|
|
469
|
+
}, null, -1)])])) : createCommentVNode("v-if", true)], 8, _hoisted_8)) : createCommentVNode("v-if", true),
|
|
455
470
|
props.grid ? (openBlock(), createElementBlock("div", {
|
|
456
471
|
key: 1,
|
|
457
472
|
id: unref(isOptionAction)(row.entry.action) ? void 0 : actionId(row.index),
|
|
@@ -463,8 +478,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
463
478
|
key: 0,
|
|
464
479
|
node: row.entry.action,
|
|
465
480
|
"dom-id": actionId(row.index)
|
|
466
|
-
}, null, 8, ["node", "dom-id"])) : createCommentVNode("v-if", true)], 42,
|
|
467
|
-
!props.grid ? (openBlock(), createElementBlock("span",
|
|
481
|
+
}, null, 8, ["node", "dom-id"])) : createCommentVNode("v-if", true)], 42, _hoisted_11)) : createCommentVNode("v-if", true),
|
|
482
|
+
!props.grid ? (openBlock(), createElementBlock("span", _hoisted_12, [renderSlot(_ctx.$slots, "item", {
|
|
468
483
|
entry: row.entry,
|
|
469
484
|
isActive: row.index === props.activeIndex,
|
|
470
485
|
isSelected: Boolean(row.entry.selected)
|
|
@@ -477,19 +492,46 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
477
492
|
},
|
|
478
493
|
"is-disabled": row.entry.disabled
|
|
479
494
|
}, null, 8, ["item", "is-disabled"])])])) : createCommentVNode("v-if", true),
|
|
480
|
-
!props.grid && row.entry.selected ? (openBlock(), createElementBlock("svg",
|
|
495
|
+
!props.grid && row.entry.selected ? (openBlock(), createElementBlock("svg", _hoisted_13, [..._cache[5] || (_cache[5] = [createElementVNode("path", {
|
|
481
496
|
d: "M3.5 8.5L6.5 11.5L12.5 4.5",
|
|
482
497
|
stroke: "currentColor",
|
|
483
498
|
"stroke-width": "1.5",
|
|
484
499
|
"stroke-linecap": "round",
|
|
485
500
|
"stroke-linejoin": "round"
|
|
486
501
|
}, null, -1)])])) : createCommentVNode("v-if", true)
|
|
487
|
-
], 42,
|
|
502
|
+
], 42, _hoisted_7);
|
|
488
503
|
}), 128))
|
|
489
|
-
], 8,
|
|
490
|
-
}), 128))]))]);
|
|
504
|
+
], 8, _hoisted_5);
|
|
505
|
+
}), 128))]))], 32);
|
|
491
506
|
};
|
|
492
507
|
}
|
|
493
508
|
});
|
|
494
509
|
//#endregion
|
|
495
|
-
|
|
510
|
+
//#region src/Typeahead/useTypeaheadAnnouncement.ts
|
|
511
|
+
/**
|
|
512
|
+
* 输入了文字、搜索落定之后,念一句结果数(点名每一条匹配,包括超出 `maxMenuItems`
|
|
513
|
+
* 没画出来的),或者没有结果的提示。加载中不念,因为还不知道有没有结果。
|
|
514
|
+
*/
|
|
515
|
+
function useTypeaheadAnnouncement(options) {
|
|
516
|
+
const announce = useAnnounce();
|
|
517
|
+
const { menu } = options;
|
|
518
|
+
const message = computed(() => {
|
|
519
|
+
const createRows = menu.entries.value.filter((entry) => entry.create).length;
|
|
520
|
+
return searchResultMessage({
|
|
521
|
+
isOpen: menu.combobox.isOpen.value,
|
|
522
|
+
isLoading: menu.status.value === "loading",
|
|
523
|
+
query: menu.query.value,
|
|
524
|
+
matchCount: menu.matchCount.value,
|
|
525
|
+
hasCreateRow: createRows > 0,
|
|
526
|
+
emptyText: toValue(options.emptyText),
|
|
527
|
+
emptySearchText: toValue(options.emptySearchText),
|
|
528
|
+
resultCount: options.resultCount
|
|
529
|
+
});
|
|
530
|
+
});
|
|
531
|
+
watch(message, (next) => {
|
|
532
|
+
if (next) announce(next);
|
|
533
|
+
});
|
|
534
|
+
return message;
|
|
535
|
+
}
|
|
536
|
+
//#endregion
|
|
537
|
+
export { useTypeaheadMenu as a, useLatchedOptionGrid as i, _sfc_main as n, _sfc_main$1 as r, useTypeaheadAnnouncement as t };
|
package/package.json
CHANGED
|
@@ -119,9 +119,32 @@
|
|
|
119
119
|
transform: rotate(180deg);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
.astryx-complex-selector-field .astryx-popover-trigger {
|
|
123
|
+
position: relative;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* 状态图标顶替箭头的位置,文字再长也不挤它。 */
|
|
127
|
+
.astryx-complex-selector .astryx-field-status-glyph,
|
|
128
|
+
.astryx-complex-selector-status-slot {
|
|
129
|
+
flex-shrink: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.astryx-complex-selector-status-slot {
|
|
133
|
+
width: 16px;
|
|
134
|
+
height: 16px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* 提示按钮不能嵌在触发器按钮里,叠在触发器末尾留出的那块空位上。 */
|
|
138
|
+
.astryx-complex-selector-status-tip {
|
|
139
|
+
position: absolute;
|
|
140
|
+
inset-block-start: 50%;
|
|
141
|
+
inset-inline-end: var(--astryx-spacing-3, 12px);
|
|
142
|
+
transform: translateY(-50%);
|
|
143
|
+
}
|
|
144
|
+
|
|
122
145
|
.astryx-complex-selector-content {
|
|
123
146
|
box-sizing: border-box;
|
|
124
|
-
max-height: min(480px, calc(100vh - 32px));
|
|
147
|
+
max-height: var(--_complex-selector-max-block, min(480px, calc(100vh - 32px)));
|
|
125
148
|
overflow: auto;
|
|
126
149
|
padding: var(--astryx-spacing-3, 12px);
|
|
127
150
|
}
|
package/styles/dialog.css
CHANGED
package/styles/info-tip.css
CHANGED
|
@@ -33,13 +33,4 @@
|
|
|
33
33
|
outline-color: var(--astryx-focus-outline-color, currentcolor);
|
|
34
34
|
outline-offset: var(--astryx-focus-outline-offset, 3px);
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
/* 触屏下按钮周围一圈看不见的点击带,把点击目标撑到 44px。 */
|
|
38
|
-
@media (pointer: coarse) {
|
|
39
|
-
.astryx-info-tip::after {
|
|
40
|
-
position: absolute;
|
|
41
|
-
inset: -12px;
|
|
42
|
-
content: '';
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
36
|
}
|
package/styles/lightbox.css
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
inset: 0;
|
|
7
7
|
width: 100vw;
|
|
8
8
|
max-width: none;
|
|
9
|
+
/* 动态视口:手机浏览器实际露出来的高度。100vh 按收起工具栏算,Safari 底栏会盖住图注。 */
|
|
9
10
|
height: 100vh;
|
|
11
|
+
height: 100dvh;
|
|
10
12
|
max-height: none;
|
|
11
13
|
margin: 0;
|
|
12
14
|
padding: 0;
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
display: block;
|
|
75
77
|
max-width: min(100vw, 100%);
|
|
76
78
|
max-height: calc(100vh - 7rem);
|
|
79
|
+
max-height: calc(100dvh - 7rem);
|
|
77
80
|
object-fit: contain;
|
|
78
81
|
outline: none;
|
|
79
82
|
}
|
|
@@ -109,15 +112,17 @@
|
|
|
109
112
|
/*
|
|
110
113
|
* 图集每一页的照片下面都有一条两行高的图注区域,不管图注长短,照片区域在每页都一样大,
|
|
111
114
|
* 翻页时照片不会忽大忽小。没有图注的页面也留着这块空间,只是不画底色。
|
|
115
|
+
* 单张照片有图注时用同一条区域和底色;没有图注就没有这条区域。
|
|
112
116
|
*/
|
|
113
117
|
.astryx-lightbox {
|
|
114
118
|
--_lightbox-caption-band-padding: var(--astryx-spacing-2, 8px);
|
|
115
119
|
--_lightbox-caption-band-height: calc(2 * var(--astryx-text-body-size, 1rem) * var(--astryx-text-body-leading, 1.4286));
|
|
116
120
|
}
|
|
117
121
|
|
|
118
|
-
.astryx-lightbox[data-
|
|
119
|
-
.astryx-lightbox[data-
|
|
122
|
+
.astryx-lightbox[data-caption-band] .astryx-lightbox__image,
|
|
123
|
+
.astryx-lightbox[data-caption-band] .astryx-lightbox__video {
|
|
120
124
|
max-height: calc(100vh - 7rem - var(--_lightbox-caption-band-height) - 2 * var(--_lightbox-caption-band-padding) - env(safe-area-inset-bottom, 0px));
|
|
125
|
+
max-height: calc(100dvh - 7rem - var(--_lightbox-caption-band-height) - 2 * var(--_lightbox-caption-band-padding) - env(safe-area-inset-bottom, 0px));
|
|
121
126
|
}
|
|
122
127
|
|
|
123
128
|
.astryx-lightbox__caption-band {
|
|
@@ -416,3 +416,13 @@
|
|
|
416
416
|
outline: var(--astryx-focus-outline-width, 2px) var(--astryx-focus-outline-style, solid) var(--astryx-focus-outline-color, var(--astryx-color-accent));
|
|
417
417
|
outline-offset: 1px;
|
|
418
418
|
}
|
|
419
|
+
|
|
420
|
+
/* 强制颜色下焦点只剩边框能表达:聚焦(含可聚焦的禁用字段)的边框取系统 Highlight 色。 */
|
|
421
|
+
@layer astryx.components {
|
|
422
|
+
@media (forced-colors: active) {
|
|
423
|
+
.astryx-multi-selector-control:focus-within,
|
|
424
|
+
.astryx-multi-selector-control.is-open {
|
|
425
|
+
border-color: Highlight;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
package/styles/popover.css
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
flex-direction: column;
|
|
105
105
|
min-block-size: 0;
|
|
106
106
|
max-block-size: calc(100vh - 16px);
|
|
107
|
+
/* 动态视口减去上下两道间距,间距在刘海和主屏指示条处随安全区变大。 */
|
|
108
|
+
max-block-size: calc(100dvh - max(16px, env(safe-area-inset-top, 0px)) - max(16px, env(safe-area-inset-bottom, 0px)));
|
|
107
109
|
overflow: auto;
|
|
108
110
|
overscroll-behavior: contain;
|
|
109
111
|
padding: var(--_popover-padding, var(--astryx-spacing-3, 12px));
|
package/styles/selector.css
CHANGED
|
@@ -528,3 +528,13 @@
|
|
|
528
528
|
.astryx-selector-search-clear:focus-visible {
|
|
529
529
|
outline: none;
|
|
530
530
|
}
|
|
531
|
+
|
|
532
|
+
/* 强制颜色下焦点只剩边框能表达:聚焦(含可聚焦的禁用字段)的边框取系统 Highlight 色。 */
|
|
533
|
+
@layer astryx.components {
|
|
534
|
+
@media (forced-colors: active) {
|
|
535
|
+
.astryx-selector-field:focus-within,
|
|
536
|
+
.astryx-selector-field.is-open {
|
|
537
|
+
border-color: Highlight;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|