@astryx-vue/core 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-RAVA_cT1.js → AlertDialog-C2inDZWG.js} +5 -5
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-0wTvOo3H.js → AppShell-CumzH-8z.js} +3 -3
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-pPZ4dI_s.js → Avatar-BW0TE8t9.js} +47 -34
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-B--NQSB3.js → AvatarGroup-DLC_FFR5.js} +57 -13
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-GbGxrqQO.js → Banner-C5VAwo4D.js} +68 -34
- package/dist/Blockquote/index.js +1 -1
- package/dist/Blockquote-DRoKdcxZ.js +27 -0
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-pt7m4CvC.js → BottomSheet-B4sc3F1S.js} +286 -140
- package/dist/{BottomSheet-JYMB_Ofl.js → BottomSheet-m54uCMJN.js} +20 -4
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/Breadcrumbs-CTaz7Kh4.js +223 -0
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-B6Hj_O_s.js → Button-ONOoHdkg.js} +25 -15
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/ButtonGroup-DnkSZ9a5.js +87 -0
- package/dist/{ButtonTooltip-nWWrth8j.js → ButtonTooltip-CNKOQHYR.js} +7 -4
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-B7vIowKq.js → Calendar-BAqzzQm2.js} +5 -5
- package/dist/Card/index.d.ts +2 -2
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-CA8zpD9v.js → Carousel-DXC22UWq.js} +4 -4
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-Bmna9EOA.js → Chat-BdJW6IX5.js} +147 -83
- package/dist/CheckboxIndicator/index.js +1 -1
- package/dist/{CheckboxIndicator-D37cm2Rh.js → CheckboxIndicator-fH4d-JE1.js} +9 -3
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-BS9J6edf.js → CheckboxInput-DJHCbwgC.js} +19 -11
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-CX1i_jVP.js → CheckboxList-BdZIP4_J.js} +155 -38
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-Djgwa0ko.js → Citation-DbZn2vms.js} +8 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-DUsC-j03.js → ClickableCard-ChAfiw9T.js} +9 -6
- package/dist/Code/index.js +3 -3
- package/dist/{Code-XnPuGxey.js → Code-Bg7GBdxy.js} +2 -1
- package/dist/{CodeBlock-D0BFubut.js → CodeBlock-Caaflp7C.js} +3 -3
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-Cov3Pyq5.js → Collapsible-Bdj0WYpb.js} +13 -11
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-YHsUNg3V.js → CommandPalette-C_MClfAg.js} +143 -63
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-DWLdKPGI.js → ComplexSelector-BeVQaqRf.js} +85 -20
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-Bq9b3Ti5.js → ContextMenu-C6hPYvYz.js} +297 -179
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-DT518j5E.js → DateInput-BjLdmYor.js} +567 -76
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-Bqi5tlIA.js → DateRangeInput-Br3wVEfD.js} +85 -20
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/DateTimeInput-CAZBwoRe.js +562 -0
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +2 -2
- package/dist/{Dialog-BiOSKQso.js → Dialog-Dce4Y97V.js} +28 -11
- package/dist/{Dialog-FGHfDu5M.js → Dialog-fhyxB00e.js} +32 -5
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Divider/index.js +1 -1
- package/dist/{Divider-BtwnL18I.js → Divider-mOZ6vIQw.js} +5 -1
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-CoOQVlRp.js → DropdownMenu-BdGmQVb1.js} +85 -57
- package/dist/{DropdownMenu-DEb2dSSP.js → DropdownMenu-BzQrNV9C.js} +479 -264
- package/dist/{DropdownMenuRadioItem.vue-CXEURBcq.d.ts → DropdownMenuRadioItem.vue-Qd-8Rg4Q.d.ts} +236 -230
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-C_GH7IV5.js → EmptyState-CmOQf2SH.js} +2 -2
- package/dist/Field/index.d.ts +4 -3
- package/dist/Field/index.js +4 -3
- package/dist/{Field-D5gUEGw4.js → Field--OEsLBfE.js} +4 -3
- package/dist/{FieldInfoTip-Ds-sW_jY.js → FieldInfoTip-gxsnfkZw.js} +3 -3
- package/dist/{FieldLabel-BNeXRuGH.js → FieldLabel-jxIiWgLw.js} +12 -7
- package/dist/FieldStatus/index.d.ts +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BpdiO1V8.js → FileInput-B_pUxB0Y.js} +106 -29
- package/dist/FormLayout/index.d.ts +1 -1
- package/dist/FormLayout/index.js +1 -1
- package/dist/{FormLayout-D47FjiOq.js → FormLayout-B9dUB6Ps.js} +1 -1
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BnwWEWkp.js → Heading-BzBunfN7.js} +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-ycY50pRN.js → HoverCard-BpJhT0sn.js} +35 -22
- package/dist/Icon/index.d.ts +4 -4
- package/dist/Icon/index.js +1 -1
- package/dist/{Icon-bteSId7T.js → Icon-KDnUyY7f.js} +12 -20
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-DDNgNl7B.js → IconButton-DI-XBbtV.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/Indicator/index.js +2 -1
- package/dist/InputClearButton-CwXPan8c.js +40 -0
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +2 -2
- package/dist/{InputGroup-CA03Smrs.js → InputGroup-DiiocoIW.js} +2 -2
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-DJay_w3B.js → InternationalizationProvider-kBapgKAQ.js} +5 -9
- package/dist/{Item-KhFKX9St.js → Item-DWMIjN8n.js} +34 -9
- package/dist/Kbd/index.js +1 -1
- package/dist/{Kbd-BB-Dw6zE.js → Kbd-CV3LO2Ge.js} +18 -2
- package/dist/LayerContentBoundary-CvsKxwwm.js +27 -0
- package/dist/LayerProvider/index.js +1 -1
- package/dist/{LayerProvider-D9NsQFzL.js → LayerProvider-B6zpMBWC.js} +15 -3
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-C6RHllr-.js → Layout-JJRCG7Mf.js} +1 -1
- package/dist/{LayoutPanel-DXOsaeQb.js → LayoutPanel-zM5vjrKS.js} +12 -8
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-DTF9EdTG.js → Lightbox-D8wyPgMK.js} +8 -6
- package/dist/Link/index.js +1 -1
- package/dist/{Link-BqHCtiyt.js → Link-DweIpOtN.js} +29 -12
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-8RWT8XAG.js → ListItem-BQXMu1Tb.js} +1 -1
- package/dist/Markdown/index.d.ts +5 -2
- package/dist/Markdown/index.js +5 -2
- package/dist/Markdown/parser/index.d.ts +4 -0
- package/dist/Markdown/parser/index.js +3 -0
- package/dist/Markdown/plugin-protocol/index.d.ts +35 -0
- package/dist/Markdown/plugin-protocol/index.js +107 -0
- package/dist/Markdown/plugin-renderer/index.d.ts +31 -0
- package/dist/Markdown/plugin-renderer/index.js +42 -0
- package/dist/{Markdown-CvtN7HnF.js → Markdown-DhVfOvXk.js} +195 -484
- package/dist/MediaTheme-DlLqYhDy.js +433 -0
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-B-OelQlt.js → MetadataList-CEYceIlN.js} +15 -7
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DxGz0xKA.js → MobileNavToggle-pdoJFZHx.js} +52 -17
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-Dlb7MLlW.js → MoreMenu-CFNqSRev.js} +72 -59
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/MultiSelector-DuVatmq5.js +1456 -0
- package/dist/{NavDisclosure-C_fugrQ3.js → NavDisclosure-Bq9DTZLO.js} +29 -7
- package/dist/{NavHeadingSurface-B3yJspSN.js → NavHeadingSurface-C4v_MtkX.js} +29 -26
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +2 -2
- package/dist/{NavItem-BBIGSvDj.js → NavItem-BPb3yfgz.js} +17 -4
- package/dist/NavMenu/index.d.ts +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-ThXguZAz.js → NavMenu-BYIDzjix.js} +42 -15
- package/dist/{NavMenuItem-BvJNsDFC.js → NavMenuItem-D3FO90GR.js} +14 -12
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-B0vzOg3N.js +727 -0
- package/dist/Outline/index.d.ts +2 -2
- package/dist/Outline/index.js +2 -2
- package/dist/{Outline-755h-lMP.js → Outline-CfGv2F1o.js} +91 -6
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-NmrSMbxb.js → OverflowList-BgRLZ3dh.js} +23 -6
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DqwNQFRp.js → Pagination-Bfe12018.js} +2 -2
- package/dist/PickerWheel-CSwUYfes.js +69 -0
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-DJf8POzL.js → Popover-78dFjTb9.js} +20 -15
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DvjiPqMZ.js → PowerSearch-BoAMdFaT.js} +774 -586
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-CVLzdoBK.js → ProgressBar-VP4JS7vm.js} +10 -7
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-Bfu6JSNV.js → RadioGroup-BIipql-L.js} +94 -26
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-xY1cwLdZ.js → RadioList-GyhgBg4j.js} +57 -8
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-q4nD_586.js → ResizeHandle-TPlUCAHD.js} +103 -50
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/ScrollableArea/index.js +1 -1
- package/dist/{ScrollableArea-D4dCJv9I.js → ScrollableArea-0u6RWtGG.js} +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-ChHmFrrC.js → SegmentedControl-D1wWGBZo.js} +11 -5
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-Cku4dRzc.js → SelectableCard-BEqnhPaX.js} +16 -11
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-CPISLzp7.js +1049 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-BF8mYDxl.js → SideNav-CN2QeAtY.js} +51 -37
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DWobsPgm.js → Slider-pdC0jpHu.js} +172 -46
- package/dist/Spinner/index.js +1 -1
- package/dist/Spinner-DdVUadii.js +200 -0
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stack/index.js +2 -2
- package/dist/{Stack-CTsTFfar.js → Stack-Bb_h60t3.js} +1 -1
- package/dist/{Stack-kQlYbbL4.js → Stack-Bp-XN9J4.js} +12 -7
- package/dist/StatusDot/index.d.ts +1 -1
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-BPUhMOff.js → StatusDot-BS_ohXhd.js} +8 -4
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-CE8dHysu.js → Stepper-CyaSRSdu.js} +101 -79
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DaVPRxvN.js → Switch-Z2Vfiiic.js} +38 -22
- package/dist/TabList/index.d.ts +2 -2
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-DIkK9sgK.js → TabList-DRqP0Hrv.js} +205 -63
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +1 -1
- package/dist/{Table-fecqnm7P.js → Table-BcrrylMX.js} +726 -452
- package/dist/Text/index.d.ts +1 -1
- package/dist/Text/index.js +1 -1
- package/dist/{Text-CV3LmscH.js → Text-CmTOgYXf.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Ab5Sw60T.js → TextArea-DA9CCG_J.js} +104 -50
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-zFT1_qgI.js → TextInput-CI96einV.js} +71 -38
- package/dist/Theme/index.d.ts +3 -3
- package/dist/Theme/index.js +3 -2
- package/dist/Theme-BbDT8B_C.js +2125 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-C3NnJUFG.js → Thumbnail-B2ZAY59J.js} +13 -10
- package/dist/{TimeField-CoHDGmsP.js → TimeField-CpAgja9D.js} +297 -40
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D2k3Ux3p.js → TimeInput-Bw_lHS4M.js} +78 -9
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-avMQk5DN.js → Timer-CH7GsEVu.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-xpQKCk0d.js → Timestamp-BFNuoTZ0.js} +5 -5
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/Toast-DwnPjx6j.js +685 -0
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-B-C-Q7XP.js → ToggleButton-cLjh9W-x.js} +5 -4
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-DsntTYhQ.js → Token-BfS4vi__.js} +32 -17
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-B5C_qY7t.js → Tokenizer-Ci3E5bvP.js} +107 -23
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Toolbar/index.js +1 -1
- package/dist/{Toolbar-BrgvvTCk.js → Toolbar-C0pMWL4S.js} +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/{Tooltip-C4Vaqd3G.js → Tooltip-sAM8i1eO.js} +23 -19
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-Ciq0l1w7.js → TopNav-gW59zp1o.js} +16 -15
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-BUz-KZJd.js → TreeList-DaoI7zaH.js} +124 -41
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-JP9RT87x.js → Typeahead-D4JjvjK4.js} +123 -26
- package/dist/{TypeaheadMenu-DBW6rHeO.js → TypeaheadMenu-BQlMrfqX.js} +141 -51
- package/dist/{announce-Cnio10Wk.js → announce-B210eJVf.js} +17 -2
- package/dist/characterReferences-BJ-jLhsR.js +65 -0
- package/dist/characters-rcDbGt71.d.ts +29 -0
- package/dist/characters-wTnzjkkR.js +58 -0
- package/dist/{colorMode-CBgdgDSn.js → colorMode-BxqfDP4P.js} +1 -4
- package/dist/composables/index.d.ts +5 -4
- package/dist/composables/index.js +23 -18
- package/dist/{composables-CbKx9C1Y.js → composables-Bc02zKAO.js} +167 -197
- package/dist/context-B6UElI5X.js +5 -0
- package/dist/{context-Cfjh8te1.js → context-Cfml4jaK.js} +5 -3
- package/dist/{context-iABt_ueM.js → context-DWfi56sq.js} +451 -122
- package/dist/context-IvbU9c3T.js +8 -0
- package/dist/context-pjBxaMSh.js +28 -0
- package/dist/fieldParts--SyRZVQG.js +44 -0
- package/dist/fieldParts-LXpQMKE8.d.ts +27 -0
- package/dist/{focus-CpficIgf.js → focus-l8jVTcqd.js} +1 -1
- package/dist/hoverIntent-DMHGb85c.js +115 -0
- package/dist/{index-Cde5JvtX.d.ts → index-B-nESNam.d.ts} +8 -7
- package/dist/{index-CsNi1I8j.d.ts → index-B08-Uxhv.d.ts} +4 -2
- package/dist/{index-Cn-sSds-.d.ts → index-B56j4eI2.d.ts} +24 -1
- package/dist/{index-BkjSF265.d.ts → index-BEZ4ezJk.d.ts} +3 -3
- package/dist/{index-DeQwYJbg.d.ts → index-BNaRK-s5.d.ts} +10 -1
- package/dist/{index-0QGtSf3r.d.ts → index-BO9TY87G.d.ts} +3 -2
- package/dist/{index-IBAInumL.d.ts → index-BQEJj72c.d.ts} +23 -10
- package/dist/{index-D97pQbua.d.ts → index-BV2D2x_u.d.ts} +1 -1
- package/dist/{index-Crp3NFLW.d.ts → index-BZKgbyN9.d.ts} +1 -1
- package/dist/index-BkUkm6Al.d.ts +11 -0
- package/dist/{index-ClNU2Th8.d.ts → index-Bn-v89Vt.d.ts} +10 -6
- package/dist/{index-Bu8NA2SD.d.ts → index-BnEhvmdR.d.ts} +16 -7
- package/dist/index-Bo-ofFyg.d.ts +166 -0
- package/dist/{index-i0tNFWfz.d.ts → index-BqhgeAT4.d.ts} +2 -0
- package/dist/{index-DWh2WC8W.d.ts → index-C4Cjz6OK.d.ts} +2 -2
- package/dist/{index-B7yhzGUT.d.ts → index-C7sam-SB.d.ts} +2 -2
- package/dist/{index-BrJzFA5X.d.ts → index-C90l2rH1.d.ts} +1 -1
- package/dist/{index-vP0EtrJJ.d.ts → index-C9gAlDt_.d.ts} +6 -3
- package/dist/{index-xrzJC4wm.d.ts → index-CJ6ajsUC.d.ts} +1 -1
- package/dist/{index-B9e52paP.d.ts → index-CK-Dbh0f.d.ts} +1 -1
- package/dist/index-CKUfpmFL.d.ts +375 -0
- package/dist/{index-DXpSFlPG.d.ts → index-CKgBTAzC.d.ts} +4 -4
- package/dist/{index-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
- package/dist/{index-B4OOtNP8.d.ts → index-CPtDjmcX.d.ts} +3 -3
- package/dist/{index-12QYAbiz.d.ts → index-CRrSHbok.d.ts} +3 -2
- package/dist/{index-DG52Bg0W.d.ts → index-CTf3SK0b.d.ts} +6 -0
- package/dist/{index-BVKivP59.d.ts → index-CTjkJP4x.d.ts} +32 -3
- package/dist/{index-COgrQZIL.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-GI9xIV9l.d.ts → index-CikMzeab.d.ts} +2 -2
- package/dist/{index-DUaLJO7l.d.ts → index-CpNlPLBF.d.ts} +172 -126
- package/dist/{index-yT1yiiww.d.ts → index-Cs1xsHKi.d.ts} +24 -12
- package/dist/{index-Cyb9Du5Z.d.ts → index-CtTGt6Dv.d.ts} +1 -1
- package/dist/{index-Byar3h1e.d.ts → index-D05JGsT3.d.ts} +6 -3
- package/dist/{index-B3Fomy15.d.ts → index-D0_HsuC3.d.ts} +3 -3
- package/dist/{index-BgT6mH3U.d.ts → index-D7ShT2c-.d.ts} +1 -1
- package/dist/{index-CkKPMIeX.d.ts → index-D7XRtUTY.d.ts} +9 -0
- package/dist/{index-TntQsADQ.d.ts → index-DEm3kRBO.d.ts} +4 -3
- package/dist/{index-C2nbK2AA.d.ts → index-DLAG3m9W.d.ts} +13 -3
- package/dist/{index-DVmgNb78.d.ts → index-DRJZ-v1E.d.ts} +4 -4
- package/dist/{index-CL1T2j4y.d.ts → index-DY8Wph-A.d.ts} +3 -3
- package/dist/{index-B1WJxt-n.d.ts → index-DfC05uKG.d.ts} +17 -7
- package/dist/{index-C5e-7Obr.d.ts → index-Dj1_1t3j.d.ts} +19 -6
- package/dist/{index-D41_xqjs.d.ts → index-Dr4b_oji.d.ts} +20 -13
- package/dist/{index-CqE4Bf3Q.d.ts → index-Ds201-d2.d.ts} +16 -2
- package/dist/{index-DIXAzTKL.d.ts → index-DxxudRgB.d.ts} +1 -1
- package/dist/{index-B42oE_F-.d.ts → index-IfsSCj8J.d.ts} +18 -5
- package/dist/{index-XuAAcYiP.d.ts → index-f3d9cVtj.d.ts} +1 -1
- package/dist/{index-T2FOcOuI.d.ts → index-jOwU3YoR.d.ts} +400 -90
- package/dist/{index-CICeEoZV.d.ts → index-pNtfr-RW.d.ts} +1 -1
- package/dist/{index-BhpAUzUr.d.ts → index-unAZVFGz.d.ts} +2 -2
- package/dist/index.d.ts +80 -74
- package/dist/index.js +149 -134
- package/dist/inlineSize-BNe8wggI.js +66 -0
- package/dist/inputPresentation-BOyHkCDr.js +62 -0
- package/dist/interactionModality-ACpTMhak.js +44 -0
- package/dist/isApplePlatform-B1ju6F5B.js +27 -0
- package/dist/isRenderable-BnKHIqfd.js +21 -0
- package/dist/layerDepth-CNDh-IHb.js +181 -0
- package/dist/link-DuuA2eCL.js +30 -0
- package/dist/{loadCatalog-BGHKG_9N.d.ts → loadCatalog-DlLFZreI.d.ts} +281 -7
- package/dist/loadCatalog-eopw74qb.js +424 -0
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -3
- package/dist/locale-CabGJlGp.js +343 -0
- package/dist/modalOutlet-CUOcrhIu.js +56 -0
- package/dist/optionAction-Cg7xQLUA.d.ts +6 -0
- package/dist/{power-search-DrDfcoL1.d.ts → power-search-gHLIYXs5.d.ts} +2 -0
- package/dist/protocol-DHxY0NI8.js +113 -0
- package/dist/protocol-RSeMzAN1.d.ts +238 -0
- package/dist/publicParser-B0MRoikr.d.ts +141 -0
- package/dist/publicParser-uHC_T0Fo.js +895 -0
- package/dist/resizableChannel-3vivrEcT.js +20 -0
- package/dist/safeUrl-CsvfcZ9m.js +54 -0
- package/dist/scopedProvide-C-Df7c15.js +30 -0
- package/dist/scrollKeyboardDelegation-D7cumnOl.js +238 -0
- package/dist/scrollLock-C3aT4-0z.js +102 -0
- package/dist/{searchResultMessage-hXXNOFJP.js → searchResultMessage-mCpJBvra.js} +5 -14
- package/dist/{semantic-CKH9XVqa.d.ts → semantic-BF_AjLvk.d.ts} +6 -3
- package/dist/slug-C65CUsf9.js +32 -0
- package/dist/syntaxContext-DmIfNNtb.js +4 -0
- package/dist/triggerVariant-BsL8jMHs.js +16 -0
- package/dist/{types-0Q_SJv_F.d.ts → types-Bb7OGivY.d.ts} +6 -1
- package/dist/{types-CwyibrRB.d.ts → types-C5GQ2KCK.d.ts} +23 -3
- package/dist/{types-gKsEkk2g.d.ts → types-CsqwQkf1.d.ts} +143 -10
- package/dist/upstreamMap-xr3gvREu.js +731 -0
- package/dist/{useAnchoredListbox-DwztMNjP.js → useAnchoredListbox-DGxxKHZb.js} +2 -2
- package/dist/{useAsyncSource-xpQovjV_.d.ts → useAsyncSource-aGzrvRkI.d.ts} +3 -0
- package/dist/{useClickableContainer-DyNpnSEa.js → useClickableContainer-CdGp_Cev.js} +1 -1
- package/dist/{useClipboard-BDfbEsWd.js → useClipboard-Dk8cS810.js} +1 -1
- package/dist/useHoverLayerDismiss-kYJ_NqL4.js +27 -0
- package/dist/{useIndicator-i1NORM7W.js → useIndicator-MZmfBWid.js} +5 -23
- package/dist/{useInputContainer-CpgDe2-4.js → useInputContainer-CLcYrby4.js} +1 -1
- package/dist/{useInputStatusIcon-DBOwxV4x.js → useInputStatusIcon-DAE7PExr.js} +1 -1
- package/dist/useLayerMountTarget-BmZyeKWE.js +156 -0
- package/dist/{useListFocus-D0iOJl39.js → useListFocus-ChxLg0b4.js} +3 -2
- package/dist/{useMenuDrillIn-DzKGkTho.js → useMenuDrillIn-DhUnPvKs.js} +6 -5
- package/dist/useMenuHover-Djreu23i.js +170 -0
- package/dist/useMenuPress-8foxY8z4.js +764 -0
- package/dist/{useMergedRefs-CfHHlCsn.js → useMergedRefs-Cb6_w93m.js} +24 -4
- package/dist/{useNumberField-4-dIGVed.js → useNumberField-Dk1BE3-K.js} +3 -3
- package/dist/useOptionActionGrid-CkJcuvaU.js +97 -0
- package/dist/{usePositionedLayer-Cru9_00b.js → usePositionedLayer-B7cvG-_v.js} +43 -49
- package/dist/usePressFeedback-BJCpjEpv.js +319 -0
- package/dist/{useResizable-DDwPpPe6.d.ts → useResizable-1MHPNaRD.d.ts} +19 -1
- package/dist/{useResizable-B3ahKLoZ.js → useResizable-I3BCiLSL.js} +72 -40
- package/dist/useResolvedLabelHidden-B2rlWiaI.js +30 -0
- package/dist/{useRestoreFocus-Djw9RUIf.js → useRestoreFocus-XEKs5-gp.js} +49 -7
- package/dist/useScrollOverflow-DuMoGXmm.js +67 -0
- package/dist/useScrollableArea-BE8b3qm7.js +222 -0
- package/dist/{useTimeValue-6ufHM15W.js → useTimeValue-BJd0xBhG.js} +4 -22
- package/dist/useTranslator-BmWt2BBt.js +35 -0
- package/dist/{useTypeahead-PAK8lMYz.js → useTypeahead-BvtflkRk.js} +4 -5
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +5 -0
- package/dist/{utils-D33VQDnk.js → utils-ClVseK2w.js} +29 -2
- package/dist/utils-z3Q6BGIJ.js +819 -0
- package/locales/SOURCE.json +1 -1
- package/package.json +18 -2
- package/reset.css +364 -1
- package/styles/avatar-group.css +9 -1
- package/styles/badge.css +8 -5
- package/styles/banner.css +124 -26
- package/styles/blockquote.css +1 -0
- package/styles/bordered-control.css +1 -1
- package/styles/bottom-sheet.css +74 -6
- package/styles/breadcrumbs.css +16 -2
- package/styles/button-group.css +3 -1
- package/styles/button.css +53 -11
- package/styles/card.css +1 -1
- package/styles/chat.css +16 -6
- package/styles/checkbox-input.css +10 -0
- package/styles/clickable-card.css +10 -3
- package/styles/collapsible.css +12 -5
- package/styles/command-palette.css +29 -14
- package/styles/complex-selector.css +22 -5
- package/styles/context-menu.css +3 -3
- package/styles/date-input.css +111 -1
- package/styles/dialog-header.css +4 -1
- package/styles/dialog.css +7 -0
- package/styles/dropdown-menu.css +12 -3
- package/styles/field.css +5 -0
- package/styles/form-layout.css +1 -0
- package/styles/heading.css +18 -8
- package/styles/icon.css +4 -0
- package/styles/kbd.css +1 -1
- package/styles/layer.css +72 -0
- package/styles/list.css +9 -2
- package/styles/metadata-list.css +1 -0
- package/styles/mobile-nav.css +4 -1
- package/styles/multi-selector.css +48 -1
- package/styles/nav-item.css +9 -2
- package/styles/nav-menu.css +12 -2
- package/styles/number-input.css +9 -1
- package/styles/overflow-list.css +1 -1
- package/styles/popover.css +2 -1
- package/styles/power-search.css +5 -3
- package/styles/pressable.css +63 -22
- package/styles/progress-bar.css +15 -3
- package/styles/radio.css +16 -0
- package/styles/resize-handle.css +42 -0
- package/styles/segmented-control.css +12 -4
- package/styles/selector.css +53 -1
- package/styles/side-nav.css +19 -0
- package/styles/slider.css +4 -3
- package/styles/spinner.css +48 -42
- package/styles/stepper.css +58 -4
- package/styles/switch.css +26 -0
- package/styles/tab-list.css +132 -3
- package/styles/table.css +88 -10
- package/styles/text-area.css +1 -1
- package/styles/text-input.css +1 -1
- package/styles/text.css +6 -6
- package/styles/thumbnail.css +11 -3
- package/styles/time-input.css +8 -0
- package/styles/toast.css +37 -3
- package/styles/token.css +2 -2
- package/styles/tokenizer.css +1 -1
- package/styles/toolbar.css +4 -1
- package/styles/tree-list.css +1 -1
- package/styles/typeahead.css +34 -1
- package/styles.css +1 -0
- package/dist/Blockquote-DFqBv_oJ.js +0 -18
- package/dist/Breadcrumbs-DIm4figq.js +0 -141
- package/dist/ButtonGroup-ySQWanDP.js +0 -125
- package/dist/DateTimeInput-A7m2O3bg.js +0 -268
- package/dist/MultiSelector-BtAUfQ3t.js +0 -990
- package/dist/NumberInput-AZ9x3oja.js +0 -473
- package/dist/Selector-DJ2BhUTV.js +0 -677
- package/dist/Spinner-9cYUCnDy.js +0 -84
- package/dist/Theme-CtaUWo4g.js +0 -1246
- package/dist/Toast-BuqIZV5z.js +0 -322
- package/dist/context-4PuqD1Ic.js +0 -4
- package/dist/context-D5-MwxnN.js +0 -4
- package/dist/index-BH9PzQ1F.d.ts +0 -87
- package/dist/link-C4_WogdF.js +0 -18
- package/dist/loadCatalog-CXKqEB9s.js +0 -877
- package/dist/locale-DgkZEMTn.js +0 -105
- package/dist/platform-B_9W_aHW.js +0 -33
- package/dist/scrollLock-BzIvIimL.js +0 -42
- package/dist/useMenuPress-D-FRNrBW.js +0 -573
- package/dist/useScrollableArea-DDk_CluT.js +0 -172
- /package/dist/{index-lgvUFSCO.d.ts → index-CryFtTT6.d.ts} +0 -0
|
@@ -1,677 +0,0 @@
|
|
|
1
|
-
import { t as _sfc_main$1 } from "./VisuallyHidden-C7NN3VEP.js";
|
|
2
|
-
import { n as useButtonTooltip } from "./Button-B6Hj_O_s.js";
|
|
3
|
-
import { t as _sfc_main$2 } from "./ButtonTooltip-nWWrth8j.js";
|
|
4
|
-
import { t as useAnnounce } from "./announce-Cnio10Wk.js";
|
|
5
|
-
import { t as useCombobox } from "./useCombobox-CTo5C-gc.js";
|
|
6
|
-
import { n as useDismiss, t as usePositionedLayer } from "./usePositionedLayer-Cru9_00b.js";
|
|
7
|
-
import { t as useFieldControlState } from "./useFieldControlState-voICDrys.js";
|
|
8
|
-
import { o as useAstryxMessages } from "./context-iABt_ueM.js";
|
|
9
|
-
import { t as useScrollbars } from "./useScrollbars-C2NJ6Qwq.js";
|
|
10
|
-
import { t as _sfc_main$3 } from "./BottomSheet-pt7m4CvC.js";
|
|
11
|
-
import { t as _sfc_main$4 } from "./Icon-bteSId7T.js";
|
|
12
|
-
import { t as _sfc_main$5 } from "./Spinner-9cYUCnDy.js";
|
|
13
|
-
import { t as useIndicator } from "./useIndicator-i1NORM7W.js";
|
|
14
|
-
import { t as _sfc_main$6 } from "./Field-D5gUEGw4.js";
|
|
15
|
-
import { t as INPUT_GROUP_KEY } from "./context-D5-MwxnN.js";
|
|
16
|
-
import { n as fieldStatusPlacement, r as _sfc_main$7, t as searchResultMessage } from "./searchResultMessage-hXXNOFJP.js";
|
|
17
|
-
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useId, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
18
|
-
import "../styles/button.css";
|
|
19
|
-
import "../styles/visually-hidden-utility.css";
|
|
20
|
-
import "../styles/selector.css";
|
|
21
|
-
//#region src/Selector/Selector.vue
|
|
22
|
-
const _hoisted_1 = [
|
|
23
|
-
"disabled",
|
|
24
|
-
"role",
|
|
25
|
-
"aria-haspopup",
|
|
26
|
-
"aria-expanded",
|
|
27
|
-
"aria-controls",
|
|
28
|
-
"aria-readonly",
|
|
29
|
-
"aria-disabled",
|
|
30
|
-
"aria-busy",
|
|
31
|
-
"aria-required",
|
|
32
|
-
"aria-label",
|
|
33
|
-
"aria-describedby",
|
|
34
|
-
"aria-autocomplete",
|
|
35
|
-
"aria-activedescendant"
|
|
36
|
-
];
|
|
37
|
-
const _hoisted_2 = { class: "astryx-selector-value-label" };
|
|
38
|
-
const _hoisted_3 = ["aria-label"];
|
|
39
|
-
const _hoisted_4 = { class: "astryx-selector-sheet-title" };
|
|
40
|
-
const _hoisted_5 = ["data-placement"];
|
|
41
|
-
const _hoisted_6 = {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: "astryx-selector-search"
|
|
44
|
-
};
|
|
45
|
-
const _hoisted_7 = [
|
|
46
|
-
"id",
|
|
47
|
-
"aria-label",
|
|
48
|
-
"aria-expanded",
|
|
49
|
-
"aria-activedescendant",
|
|
50
|
-
"placeholder",
|
|
51
|
-
"value"
|
|
52
|
-
];
|
|
53
|
-
const _hoisted_8 = ["aria-label"];
|
|
54
|
-
const _hoisted_9 = {
|
|
55
|
-
key: 1,
|
|
56
|
-
class: "astryx-selector-options"
|
|
57
|
-
};
|
|
58
|
-
const _hoisted_10 = {
|
|
59
|
-
key: 0,
|
|
60
|
-
class: "astryx-selector-section",
|
|
61
|
-
role: "presentation"
|
|
62
|
-
};
|
|
63
|
-
const _hoisted_11 = [
|
|
64
|
-
"id",
|
|
65
|
-
"aria-selected",
|
|
66
|
-
"aria-disabled",
|
|
67
|
-
"onClick",
|
|
68
|
-
"onKeydown"
|
|
69
|
-
];
|
|
70
|
-
const _hoisted_12 = {
|
|
71
|
-
key: 0,
|
|
72
|
-
class: "astryx-selector-option-mark"
|
|
73
|
-
};
|
|
74
|
-
const _hoisted_13 = { class: "astryx-selector-option-body" };
|
|
75
|
-
const _hoisted_14 = { class: "astryx-selector-option-copy" };
|
|
76
|
-
const _hoisted_15 = { class: "astryx-selector-option-label" };
|
|
77
|
-
const _hoisted_16 = {
|
|
78
|
-
key: 0,
|
|
79
|
-
class: "astryx-selector-option-description"
|
|
80
|
-
};
|
|
81
|
-
const _hoisted_17 = {
|
|
82
|
-
key: 1,
|
|
83
|
-
class: "astryx-selector-option-mark"
|
|
84
|
-
};
|
|
85
|
-
const _hoisted_18 = {
|
|
86
|
-
key: 2,
|
|
87
|
-
class: "astryx-selector-empty",
|
|
88
|
-
role: "presentation"
|
|
89
|
-
};
|
|
90
|
-
const _hoisted_19 = [
|
|
91
|
-
"id",
|
|
92
|
-
"name",
|
|
93
|
-
"value",
|
|
94
|
-
"disabled",
|
|
95
|
-
"aria-label"
|
|
96
|
-
];
|
|
97
|
-
const _hoisted_20 = ["value"];
|
|
98
|
-
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
99
|
-
name: "AstryxSelector",
|
|
100
|
-
inheritAttrs: false,
|
|
101
|
-
__name: "Selector",
|
|
102
|
-
props: {
|
|
103
|
-
modelValue: { default: null },
|
|
104
|
-
options: {},
|
|
105
|
-
placeholder: {},
|
|
106
|
-
disabled: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: false
|
|
109
|
-
},
|
|
110
|
-
disabledMessage: {},
|
|
111
|
-
disabledReason: {},
|
|
112
|
-
status: { default: "default" },
|
|
113
|
-
statusMessage: {},
|
|
114
|
-
statusVariant: { default: "attached" },
|
|
115
|
-
size: { default: "md" },
|
|
116
|
-
variant: { default: "default" },
|
|
117
|
-
presentation: { default: "popover" },
|
|
118
|
-
searchable: {
|
|
119
|
-
type: Boolean,
|
|
120
|
-
default: false
|
|
121
|
-
},
|
|
122
|
-
searchPlaceholder: {},
|
|
123
|
-
clearable: {
|
|
124
|
-
type: Boolean,
|
|
125
|
-
default: false
|
|
126
|
-
},
|
|
127
|
-
hasClear: { type: Boolean },
|
|
128
|
-
clearLabel: {},
|
|
129
|
-
emptyText: {},
|
|
130
|
-
emptySearchText: {},
|
|
131
|
-
label: {},
|
|
132
|
-
isLabelHidden: {
|
|
133
|
-
type: Boolean,
|
|
134
|
-
default: false
|
|
135
|
-
},
|
|
136
|
-
description: {},
|
|
137
|
-
width: {},
|
|
138
|
-
name: {},
|
|
139
|
-
isReadOnly: {
|
|
140
|
-
type: Boolean,
|
|
141
|
-
default: false
|
|
142
|
-
},
|
|
143
|
-
isLoading: {
|
|
144
|
-
type: Boolean,
|
|
145
|
-
default: false
|
|
146
|
-
},
|
|
147
|
-
isOptional: {
|
|
148
|
-
type: Boolean,
|
|
149
|
-
default: false
|
|
150
|
-
},
|
|
151
|
-
isRequired: {
|
|
152
|
-
type: Boolean,
|
|
153
|
-
default: false
|
|
154
|
-
},
|
|
155
|
-
indicatorPosition: { default: "end" }
|
|
156
|
-
},
|
|
157
|
-
emits: [
|
|
158
|
-
"update:modelValue",
|
|
159
|
-
"change",
|
|
160
|
-
"search",
|
|
161
|
-
"click",
|
|
162
|
-
"focus",
|
|
163
|
-
"keydown"
|
|
164
|
-
],
|
|
165
|
-
setup(__props, { emit: __emit }) {
|
|
166
|
-
const props = __props;
|
|
167
|
-
const emit = __emit;
|
|
168
|
-
const slots = useSlots();
|
|
169
|
-
const SelectionMark = useIndicator("check");
|
|
170
|
-
const selectorId = `astryx-selector-${useId()}`;
|
|
171
|
-
const listboxId = `${selectorId}-listbox`;
|
|
172
|
-
const messages = useAstryxMessages();
|
|
173
|
-
const resolvedPlaceholder = computed(() => props.placeholder ?? messages.value.selector.placeholder);
|
|
174
|
-
const resolvedSearchPlaceholder = computed(() => props.searchPlaceholder ?? messages.value.selector.search);
|
|
175
|
-
const resolvedClearLabel = computed(() => props.clearLabel ?? messages.value.selector.clear);
|
|
176
|
-
/** 值上的清除按钮带着字段名,读屏能听出清的是哪一项。 */
|
|
177
|
-
const valueClearLabel = computed(() => props.clearLabel ?? messages.value.selector.clearField(props.label));
|
|
178
|
-
const resolvedEmptyText = computed(() => props.emptyText ?? messages.value.selector.empty);
|
|
179
|
-
const resolvedEmptySearchText = computed(() => props.emptySearchText ?? messages.value.selector.emptySearch);
|
|
180
|
-
const inputGroup = inject(INPUT_GROUP_KEY, null);
|
|
181
|
-
const inGroup = computed(() => inputGroup != null);
|
|
182
|
-
const control = useFieldControlState({
|
|
183
|
-
disabled: () => props.disabled || (inputGroup?.disabled.value ?? false),
|
|
184
|
-
readOnly: () => props.isReadOnly,
|
|
185
|
-
loading: () => props.isLoading
|
|
186
|
-
});
|
|
187
|
-
const announce = useAnnounce();
|
|
188
|
-
const readOnlyId = `${selectorId}-readonly`;
|
|
189
|
-
const disabledMessageId = `${selectorId}-disabled-message`;
|
|
190
|
-
const disabledTooltipId = `${selectorId}-disabled-tooltip`;
|
|
191
|
-
/** 旧名 disabledReason 和新名 disabledMessage 等价。 */
|
|
192
|
-
const resolvedDisabledMessage = computed(() => props.disabledMessage?.trim() || props.disabledReason?.trim());
|
|
193
|
-
const showsDisabledMessage = computed(() => control.isDisabled.value && !!resolvedDisabledMessage.value);
|
|
194
|
-
const disabledTooltip = useButtonTooltip(showsDisabledMessage);
|
|
195
|
-
const hasClear = computed(() => props.hasClear || props.clearable);
|
|
196
|
-
const fieldRef = useTemplateRef("fieldRef");
|
|
197
|
-
const listboxRef = useTemplateRef("listboxRef");
|
|
198
|
-
const searchInputRef = useTemplateRef("searchInputRef");
|
|
199
|
-
const sheetSlot = useTemplateRef("sheetSlot");
|
|
200
|
-
useScrollbars(listboxRef);
|
|
201
|
-
const isSheet = computed(() => props.presentation === "bottom-sheet");
|
|
202
|
-
const sheetLabel = computed(() => props.label || resolvedPlaceholder.value);
|
|
203
|
-
const isEnabled = control.canActivate;
|
|
204
|
-
const isSearchable = computed(() => props.searchable && control.canActivate.value);
|
|
205
|
-
function isSection(entry) {
|
|
206
|
-
return typeof entry === "object" && entry !== null && "type" in entry && entry.type === "section";
|
|
207
|
-
}
|
|
208
|
-
function asOption(entry) {
|
|
209
|
-
if (typeof entry === "string") return {
|
|
210
|
-
value: entry,
|
|
211
|
-
label: entry
|
|
212
|
-
};
|
|
213
|
-
return entry;
|
|
214
|
-
}
|
|
215
|
-
const normalizedEntries = computed(() => props.options.map((entry) => {
|
|
216
|
-
if (isSection(entry)) return {
|
|
217
|
-
...entry,
|
|
218
|
-
options: entry.options.map(asOption)
|
|
219
|
-
};
|
|
220
|
-
return asOption(entry);
|
|
221
|
-
}));
|
|
222
|
-
const flatOptions = computed(() => normalizedEntries.value.flatMap((entry) => isSection(entry) ? entry.options : [entry]));
|
|
223
|
-
const comboboxOptions = computed(() => flatOptions.value.map((opt) => ({
|
|
224
|
-
value: opt.value,
|
|
225
|
-
label: opt.label,
|
|
226
|
-
disabled: opt.disabled ?? false
|
|
227
|
-
})));
|
|
228
|
-
const modelValueRef = computed({
|
|
229
|
-
get: () => props.modelValue,
|
|
230
|
-
set: (value) => {
|
|
231
|
-
emit("update:modelValue", value);
|
|
232
|
-
emit("change", value);
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
const combobox = useCombobox({
|
|
236
|
-
options: comboboxOptions,
|
|
237
|
-
modelValue: modelValueRef,
|
|
238
|
-
isEnabled,
|
|
239
|
-
isSearchable,
|
|
240
|
-
onChange: (value) => {
|
|
241
|
-
modelValueRef.value = value;
|
|
242
|
-
},
|
|
243
|
-
onOpenChange: (isOpen) => {
|
|
244
|
-
if (isOpen && props.searchable) nextTick(() => {
|
|
245
|
-
searchInputRef.value?.focus();
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
const sheetOpen = computed({
|
|
250
|
-
get: () => isSheet.value && combobox.isOpen.value,
|
|
251
|
-
set: (open) => {
|
|
252
|
-
if (!open && combobox.isOpen.value) combobox.close();
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
const popoverOpen = computed(() => combobox.isOpen.value && !isSheet.value);
|
|
256
|
-
const listboxTarget = computed(() => isSheet.value && sheetSlot.value ? sheetSlot.value : "body");
|
|
257
|
-
const { position } = usePositionedLayer({
|
|
258
|
-
anchor: fieldRef,
|
|
259
|
-
layer: listboxRef,
|
|
260
|
-
isOpen: popoverOpen,
|
|
261
|
-
placement: computed(() => "below"),
|
|
262
|
-
alignment: computed(() => "start"),
|
|
263
|
-
gap: 4
|
|
264
|
-
});
|
|
265
|
-
useDismiss({
|
|
266
|
-
container: listboxRef,
|
|
267
|
-
trigger: fieldRef,
|
|
268
|
-
isEnabled: popoverOpen,
|
|
269
|
-
enableEscape: ref(true),
|
|
270
|
-
onDismiss: () => {
|
|
271
|
-
combobox.close();
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
const selectedOption = computed(() => {
|
|
275
|
-
if (props.modelValue == null) return null;
|
|
276
|
-
return flatOptions.value.find((opt) => opt.value === props.modelValue) ?? null;
|
|
277
|
-
});
|
|
278
|
-
const fieldLabel = computed(() => props.label || resolvedPlaceholder.value);
|
|
279
|
-
const hideLabel = computed(() => props.isLabelHidden || !props.label);
|
|
280
|
-
const statusType = computed(() => {
|
|
281
|
-
const status = props.status;
|
|
282
|
-
if (status == null || status === "default") return "default";
|
|
283
|
-
if (typeof status === "string") return status;
|
|
284
|
-
return status.type;
|
|
285
|
-
});
|
|
286
|
-
const fieldStatus = computed(() => {
|
|
287
|
-
const status = props.status;
|
|
288
|
-
if (status && typeof status === "object") return status;
|
|
289
|
-
if (!props.statusMessage || statusType.value === "default") return void 0;
|
|
290
|
-
return {
|
|
291
|
-
type: statusType.value,
|
|
292
|
-
message: props.statusMessage
|
|
293
|
-
};
|
|
294
|
-
});
|
|
295
|
-
const effectiveStatusVariant = computed(() => fieldStatusPlacement(props.variant, props.statusVariant));
|
|
296
|
-
const statusGlyph = computed(() => {
|
|
297
|
-
const type = statusType.value;
|
|
298
|
-
if (type !== "error" && type !== "warning" && type !== "success" || effectiveStatusVariant.value === "detached") return void 0;
|
|
299
|
-
return type;
|
|
300
|
-
});
|
|
301
|
-
const displayRows = computed(() => {
|
|
302
|
-
const indexByValue = new Map(combobox.filteredOptions.value.map((option, index) => [option.value, index]));
|
|
303
|
-
const rows = [];
|
|
304
|
-
for (const entry of normalizedEntries.value) {
|
|
305
|
-
if (isSection(entry)) {
|
|
306
|
-
const children = entry.options.filter((option) => indexByValue.has(option.value));
|
|
307
|
-
if (children.length === 0) continue;
|
|
308
|
-
rows.push({
|
|
309
|
-
kind: "section",
|
|
310
|
-
title: entry.title
|
|
311
|
-
});
|
|
312
|
-
for (const option of children) rows.push({
|
|
313
|
-
kind: "option",
|
|
314
|
-
option,
|
|
315
|
-
index: indexByValue.get(option.value)
|
|
316
|
-
});
|
|
317
|
-
continue;
|
|
318
|
-
}
|
|
319
|
-
if (!indexByValue.has(entry.value)) continue;
|
|
320
|
-
rows.push({
|
|
321
|
-
kind: "option",
|
|
322
|
-
option: entry,
|
|
323
|
-
index: indexByValue.get(entry.value)
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
return rows;
|
|
327
|
-
});
|
|
328
|
-
const displayText = computed(() => {
|
|
329
|
-
return selectedOption.value?.label ?? resolvedPlaceholder.value;
|
|
330
|
-
});
|
|
331
|
-
const isEmpty = computed(() => {
|
|
332
|
-
return combobox.filteredOptions.value.length === 0;
|
|
333
|
-
});
|
|
334
|
-
const isSearching = computed(() => props.searchable && combobox.searchQuery.value.trim() !== "");
|
|
335
|
-
const showEmpty = computed(() => isEmpty.value && !control.isLoading.value);
|
|
336
|
-
const describedBy = computed(() => {
|
|
337
|
-
return [
|
|
338
|
-
inGroup.value ? inputGroup?.describedBy.value : void 0,
|
|
339
|
-
control.isReadOnly.value ? readOnlyId : void 0,
|
|
340
|
-
showsDisabledMessage.value ? disabledMessageId : void 0
|
|
341
|
-
].filter(Boolean).join(" ") || void 0;
|
|
342
|
-
});
|
|
343
|
-
const announcement = computed(() => searchResultMessage({
|
|
344
|
-
isOpen: combobox.isOpen.value,
|
|
345
|
-
isLoading: control.isLoading.value,
|
|
346
|
-
query: combobox.searchQuery.value,
|
|
347
|
-
matchCount: combobox.filteredOptions.value.length,
|
|
348
|
-
emptyText: resolvedEmptyText.value,
|
|
349
|
-
emptySearchText: resolvedEmptySearchText.value,
|
|
350
|
-
resultCount: messages.value.selector.resultCount
|
|
351
|
-
}));
|
|
352
|
-
watch(announcement, (message) => {
|
|
353
|
-
if (message) announce(message);
|
|
354
|
-
});
|
|
355
|
-
function onTriggerClick(event) {
|
|
356
|
-
emit("click", event);
|
|
357
|
-
if (control.canActivate.value) combobox.toggle();
|
|
358
|
-
}
|
|
359
|
-
function onTriggerFocus(event) {
|
|
360
|
-
emit("focus", event);
|
|
361
|
-
disabledTooltip.onFocus(event);
|
|
362
|
-
}
|
|
363
|
-
function onTriggerKeyDown(event) {
|
|
364
|
-
combobox.onKeyDown(event);
|
|
365
|
-
if (!event.defaultPrevented) emit("keydown", event);
|
|
366
|
-
}
|
|
367
|
-
/** 搜索框里的按键只走键盘模型,不当作触发器的事件透出。 */
|
|
368
|
-
function onSearchKeyDown(event) {
|
|
369
|
-
combobox.onKeyDown(event);
|
|
370
|
-
}
|
|
371
|
-
function onOptionClick(option) {
|
|
372
|
-
if (!option.disabled) combobox.select(option.value);
|
|
373
|
-
}
|
|
374
|
-
function onClear(event) {
|
|
375
|
-
event.stopPropagation();
|
|
376
|
-
if (!control.canActivate.value) return;
|
|
377
|
-
modelValueRef.value = null;
|
|
378
|
-
combobox.close();
|
|
379
|
-
}
|
|
380
|
-
function clearSearch(event) {
|
|
381
|
-
event.stopPropagation();
|
|
382
|
-
combobox.setSearchQuery("");
|
|
383
|
-
emit("search", "");
|
|
384
|
-
searchInputRef.value?.focus();
|
|
385
|
-
}
|
|
386
|
-
function onSearchInput(event) {
|
|
387
|
-
const target = event.target;
|
|
388
|
-
combobox.setSearchQuery(target.value);
|
|
389
|
-
emit("search", target.value);
|
|
390
|
-
}
|
|
391
|
-
function getOptionId(index) {
|
|
392
|
-
return `${listboxId}-option-${index}`;
|
|
393
|
-
}
|
|
394
|
-
const anchorWidth = ref(0);
|
|
395
|
-
function syncAnchorWidth() {
|
|
396
|
-
anchorWidth.value = fieldRef.value?.getBoundingClientRect().width ?? 0;
|
|
397
|
-
}
|
|
398
|
-
const listboxStyle = computed(() => isSheet.value ? void 0 : {
|
|
399
|
-
top: `${position.value.top}px`,
|
|
400
|
-
left: `${position.value.left}px`,
|
|
401
|
-
minWidth: anchorWidth.value > 0 ? `${anchorWidth.value}px` : void 0
|
|
402
|
-
});
|
|
403
|
-
watch(combobox.isOpen, (open) => {
|
|
404
|
-
if (open) syncAnchorWidth();
|
|
405
|
-
}, { flush: "pre" });
|
|
406
|
-
onMounted(syncAnchorWidth);
|
|
407
|
-
watch(() => combobox.activeIndex.value, (index) => {
|
|
408
|
-
if (index >= 0 && combobox.isOpen.value) nextTick(() => {
|
|
409
|
-
const listbox = listboxRef.value;
|
|
410
|
-
const optionEl = listbox?.querySelector(`#${getOptionId(index)}`);
|
|
411
|
-
if (!listbox || !optionEl) return;
|
|
412
|
-
const listboxRect = listbox.getBoundingClientRect();
|
|
413
|
-
const optionRect = optionEl.getBoundingClientRect();
|
|
414
|
-
if (optionRect.top < listboxRect.top) listbox.scrollTop -= listboxRect.top - optionRect.top;
|
|
415
|
-
else if (optionRect.bottom > listboxRect.bottom) listbox.scrollTop += optionRect.bottom - listboxRect.bottom;
|
|
416
|
-
});
|
|
417
|
-
});
|
|
418
|
-
return (_ctx, _cache) => {
|
|
419
|
-
return openBlock(), createBlock(_sfc_main$6, {
|
|
420
|
-
class: normalizeClass(["astryx-selector", [
|
|
421
|
-
`size-${props.size}`,
|
|
422
|
-
`status-${statusType.value}`,
|
|
423
|
-
`variant-${props.variant}`
|
|
424
|
-
]]),
|
|
425
|
-
label: fieldLabel.value,
|
|
426
|
-
"input-id": selectorId,
|
|
427
|
-
"is-label-hidden": inGroup.value || hideLabel.value,
|
|
428
|
-
"is-disabled": unref(control).isDisabled.value,
|
|
429
|
-
"is-optional": inGroup.value ? false : props.isOptional,
|
|
430
|
-
"is-required": inGroup.value ? false : props.isRequired,
|
|
431
|
-
description: inGroup.value ? void 0 : props.description,
|
|
432
|
-
status: inGroup.value ? void 0 : fieldStatus.value,
|
|
433
|
-
"status-variant": effectiveStatusVariant.value,
|
|
434
|
-
width: props.width
|
|
435
|
-
}, {
|
|
436
|
-
default: withCtx(() => [
|
|
437
|
-
createElementVNode("div", {
|
|
438
|
-
ref_key: "fieldRef",
|
|
439
|
-
ref: fieldRef,
|
|
440
|
-
class: normalizeClass(["astryx-selector-field", {
|
|
441
|
-
"is-open": unref(combobox).isOpen.value,
|
|
442
|
-
"is-disabled": unref(control).isDisabled.value,
|
|
443
|
-
"is-readonly": unref(control).isReadOnly.value,
|
|
444
|
-
"is-loading": unref(control).isLoading.value,
|
|
445
|
-
"is-ghost": props.variant === "ghost"
|
|
446
|
-
}]),
|
|
447
|
-
onPointerenter: _cache[1] || (_cache[1] = (...args) => unref(disabledTooltip).onPointerEnter && unref(disabledTooltip).onPointerEnter(...args)),
|
|
448
|
-
onPointerleave: _cache[2] || (_cache[2] = (...args) => unref(disabledTooltip).onPointerLeave && unref(disabledTooltip).onPointerLeave(...args))
|
|
449
|
-
}, [
|
|
450
|
-
createElementVNode("button", {
|
|
451
|
-
id: selectorId,
|
|
452
|
-
type: "button",
|
|
453
|
-
class: normalizeClass(["astryx-selector-trigger", {
|
|
454
|
-
"is-open": unref(combobox).isOpen.value,
|
|
455
|
-
"is-disabled": unref(control).isDisabled.value
|
|
456
|
-
}]),
|
|
457
|
-
disabled: unref(control).isDisabled.value && !showsDisabledMessage.value,
|
|
458
|
-
role: unref(control).isReadOnly.value || !props.searchable ? "combobox" : void 0,
|
|
459
|
-
"aria-haspopup": unref(control).isReadOnly.value ? void 0 : "listbox",
|
|
460
|
-
"aria-expanded": unref(control).isReadOnly.value ? false : unref(combobox).isOpen.value,
|
|
461
|
-
"aria-controls": unref(control).isReadOnly.value ? void 0 : listboxId,
|
|
462
|
-
"aria-readonly": unref(control).isReadOnly.value || void 0,
|
|
463
|
-
"aria-disabled": showsDisabledMessage.value || void 0,
|
|
464
|
-
"aria-busy": unref(control).isLoading.value || void 0,
|
|
465
|
-
"aria-required": props.isRequired || void 0,
|
|
466
|
-
"aria-label": props.label,
|
|
467
|
-
"aria-describedby": describedBy.value,
|
|
468
|
-
"aria-autocomplete": props.searchable ? void 0 : "none",
|
|
469
|
-
"aria-activedescendant": !props.searchable && !unref(control).isReadOnly.value && unref(combobox).activeIndex.value >= 0 ? getOptionId(unref(combobox).activeIndex.value) : void 0,
|
|
470
|
-
onClick: onTriggerClick,
|
|
471
|
-
onFocus: onTriggerFocus,
|
|
472
|
-
onBlur: _cache[0] || (_cache[0] = (...args) => unref(disabledTooltip).onBlur && unref(disabledTooltip).onBlur(...args)),
|
|
473
|
-
onKeydown: onTriggerKeyDown
|
|
474
|
-
}, [createElementVNode("span", { class: normalizeClass(["astryx-selector-value", {
|
|
475
|
-
"is-placeholder": !selectedOption.value,
|
|
476
|
-
"is-rich": unref(slots).selected,
|
|
477
|
-
"is-grouped": inGroup.value
|
|
478
|
-
}]) }, [unref(slots).selected ? renderSlot(_ctx.$slots, "selected", { option: selectedOption.value }, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [selectedOption.value?.icon ? (openBlock(), createElementBlock("span", {
|
|
479
|
-
key: 0,
|
|
480
|
-
class: normalizeClass(["astryx-selector-value-icon", selectedOption.value.icon]),
|
|
481
|
-
"aria-hidden": "true"
|
|
482
|
-
}, null, 2)) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_2, toDisplayString(displayText.value), 1)], 64))], 2)], 42, _hoisted_1),
|
|
483
|
-
unref(control).isLoading.value ? (openBlock(), createBlock(_sfc_main$5, {
|
|
484
|
-
key: 0,
|
|
485
|
-
class: "astryx-selector-spinner",
|
|
486
|
-
size: "sm",
|
|
487
|
-
"aria-label": unref(messages).selector.loading
|
|
488
|
-
}, null, 8, ["aria-label"])) : createCommentVNode("v-if", true),
|
|
489
|
-
hasClear.value && selectedOption.value && unref(control).canActivate.value ? (openBlock(), createElementBlock("button", {
|
|
490
|
-
key: 1,
|
|
491
|
-
type: "button",
|
|
492
|
-
class: "astryx-selector-clear",
|
|
493
|
-
"aria-label": valueClearLabel.value,
|
|
494
|
-
onClick: onClear
|
|
495
|
-
}, [createVNode(_sfc_main$4, {
|
|
496
|
-
icon: "close",
|
|
497
|
-
size: "sm"
|
|
498
|
-
})], 8, _hoisted_3)) : createCommentVNode("v-if", true),
|
|
499
|
-
statusGlyph.value ? (openBlock(), createBlock(_sfc_main$7, {
|
|
500
|
-
key: 2,
|
|
501
|
-
type: statusGlyph.value,
|
|
502
|
-
message: fieldStatus.value?.message,
|
|
503
|
-
tooltip: effectiveStatusVariant.value === "tooltip"
|
|
504
|
-
}, null, 8, [
|
|
505
|
-
"type",
|
|
506
|
-
"message",
|
|
507
|
-
"tooltip"
|
|
508
|
-
])) : unref(control).canActivate.value ? (openBlock(), createBlock(_sfc_main$4, {
|
|
509
|
-
key: 3,
|
|
510
|
-
class: "astryx-selector-icon",
|
|
511
|
-
icon: "chevronDown",
|
|
512
|
-
size: "sm"
|
|
513
|
-
})) : createCommentVNode("v-if", true),
|
|
514
|
-
unref(control).isReadOnly.value ? (openBlock(), createElementBlock("span", {
|
|
515
|
-
key: 4,
|
|
516
|
-
id: readOnlyId,
|
|
517
|
-
class: "astryx-visually-hidden"
|
|
518
|
-
}, toDisplayString(unref(messages).selector.readOnly), 1)) : createCommentVNode("v-if", true)
|
|
519
|
-
], 34),
|
|
520
|
-
showsDisabledMessage.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
521
|
-
key: 0,
|
|
522
|
-
id: disabledMessageId
|
|
523
|
-
}, {
|
|
524
|
-
default: withCtx(() => [createTextVNode(toDisplayString(resolvedDisabledMessage.value), 1)]),
|
|
525
|
-
_: 1
|
|
526
|
-
})) : createCommentVNode("v-if", true),
|
|
527
|
-
showsDisabledMessage.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
528
|
-
key: 1,
|
|
529
|
-
id: disabledTooltipId,
|
|
530
|
-
anchor: fieldRef.value,
|
|
531
|
-
open: unref(disabledTooltip).isOpen.value,
|
|
532
|
-
text: resolvedDisabledMessage.value ?? "",
|
|
533
|
-
onPointerEnter: unref(disabledTooltip).onTooltipPointerEnter,
|
|
534
|
-
onPointerLeave: unref(disabledTooltip).onTooltipPointerLeave
|
|
535
|
-
}, null, 8, [
|
|
536
|
-
"anchor",
|
|
537
|
-
"open",
|
|
538
|
-
"text",
|
|
539
|
-
"onPointerEnter",
|
|
540
|
-
"onPointerLeave"
|
|
541
|
-
])) : createCommentVNode("v-if", true),
|
|
542
|
-
isSheet.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
543
|
-
key: 2,
|
|
544
|
-
"is-open": sheetOpen.value,
|
|
545
|
-
"onUpdate:isOpen": _cache[3] || (_cache[3] = ($event) => sheetOpen.value = $event),
|
|
546
|
-
height: "hug",
|
|
547
|
-
label: sheetLabel.value,
|
|
548
|
-
padding: 2
|
|
549
|
-
}, {
|
|
550
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
551
|
-
ref_key: "sheetSlot",
|
|
552
|
-
ref: sheetSlot,
|
|
553
|
-
class: "astryx-selector-sheet"
|
|
554
|
-
}, [createElementVNode("div", _hoisted_4, toDisplayString(sheetLabel.value), 1)], 512)]),
|
|
555
|
-
_: 1
|
|
556
|
-
}, 8, ["is-open", "label"])) : createCommentVNode("v-if", true),
|
|
557
|
-
(openBlock(), createBlock(Teleport, { to: listboxTarget.value }, [withDirectives(createElementVNode("div", {
|
|
558
|
-
id: listboxId,
|
|
559
|
-
ref_key: "listboxRef",
|
|
560
|
-
ref: listboxRef,
|
|
561
|
-
role: "listbox",
|
|
562
|
-
class: normalizeClass(["astryx-selector-listbox", { "is-sheet": isSheet.value }]),
|
|
563
|
-
"data-placement": isSheet.value ? void 0 : unref(position).placement,
|
|
564
|
-
style: normalizeStyle(listboxStyle.value),
|
|
565
|
-
tabindex: "-1"
|
|
566
|
-
}, [props.searchable ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
567
|
-
createVNode(_sfc_main$4, {
|
|
568
|
-
class: "astryx-selector-search-icon",
|
|
569
|
-
icon: "search",
|
|
570
|
-
size: "sm"
|
|
571
|
-
}),
|
|
572
|
-
createElementVNode("input", {
|
|
573
|
-
id: `${selectorId}-search`,
|
|
574
|
-
ref_key: "searchInputRef",
|
|
575
|
-
ref: searchInputRef,
|
|
576
|
-
type: "text",
|
|
577
|
-
class: "astryx-selector-search-input",
|
|
578
|
-
role: "combobox",
|
|
579
|
-
autocomplete: "off",
|
|
580
|
-
"aria-label": resolvedSearchPlaceholder.value,
|
|
581
|
-
"aria-expanded": unref(combobox).isOpen.value,
|
|
582
|
-
"aria-controls": listboxId,
|
|
583
|
-
"aria-autocomplete": "list",
|
|
584
|
-
"aria-activedescendant": unref(combobox).activeIndex.value >= 0 ? getOptionId(unref(combobox).activeIndex.value) : void 0,
|
|
585
|
-
placeholder: resolvedSearchPlaceholder.value,
|
|
586
|
-
value: unref(combobox).searchQuery.value,
|
|
587
|
-
onInput: onSearchInput,
|
|
588
|
-
onKeydown: onSearchKeyDown
|
|
589
|
-
}, null, 40, _hoisted_7),
|
|
590
|
-
unref(combobox).searchQuery.value ? (openBlock(), createElementBlock("button", {
|
|
591
|
-
key: 0,
|
|
592
|
-
type: "button",
|
|
593
|
-
class: "astryx-selector-search-clear",
|
|
594
|
-
"aria-label": resolvedClearLabel.value,
|
|
595
|
-
onClick: clearSearch
|
|
596
|
-
}, [createVNode(_sfc_main$4, {
|
|
597
|
-
icon: "close",
|
|
598
|
-
size: "sm"
|
|
599
|
-
})], 8, _hoisted_8)) : createCommentVNode("v-if", true)
|
|
600
|
-
])) : createCommentVNode("v-if", true), !unref(control).isLoading.value && !isEmpty.value ? (openBlock(), createElementBlock("div", _hoisted_9, [(openBlock(true), createElementBlock(Fragment, null, renderList(displayRows.value, (row, rowIndex) => {
|
|
601
|
-
return openBlock(), createElementBlock(Fragment, { key: row.kind === "section" ? `section-${rowIndex}` : row.option?.value }, [row.kind === "section" ? (openBlock(), createElementBlock("div", _hoisted_10, toDisplayString(row.title), 1)) : row.option && row.index != null ? (openBlock(), createElementBlock("div", {
|
|
602
|
-
key: 1,
|
|
603
|
-
id: getOptionId(row.index),
|
|
604
|
-
role: "option",
|
|
605
|
-
tabindex: "0",
|
|
606
|
-
class: normalizeClass(["astryx-selector-option", {
|
|
607
|
-
"is-active": row.index === unref(combobox).activeIndex.value,
|
|
608
|
-
"is-selected": row.option.value === props.modelValue,
|
|
609
|
-
"is-disabled": row.option.disabled
|
|
610
|
-
}]),
|
|
611
|
-
"aria-selected": row.option.value === props.modelValue,
|
|
612
|
-
"aria-disabled": row.option.disabled,
|
|
613
|
-
onClick: ($event) => onOptionClick(row.option),
|
|
614
|
-
onKeydown: [withKeys(($event) => onOptionClick(row.option), ["enter"]), withKeys(withModifiers(($event) => onOptionClick(row.option), ["prevent"]), ["space"])]
|
|
615
|
-
}, [
|
|
616
|
-
props.indicatorPosition === "start" ? (openBlock(), createElementBlock("span", _hoisted_12, [(openBlock(), createBlock(resolveDynamicComponent(unref(SelectionMark)), {
|
|
617
|
-
class: "astryx-selector-check",
|
|
618
|
-
state: row.option.value === props.modelValue ? "checked" : "unchecked",
|
|
619
|
-
size: "sm",
|
|
620
|
-
"is-disabled": row.option.disabled
|
|
621
|
-
}, null, 8, ["state", "is-disabled"]))])) : createCommentVNode("v-if", true),
|
|
622
|
-
createElementVNode("span", _hoisted_13, [unref(slots).option ? renderSlot(_ctx.$slots, "option", {
|
|
623
|
-
option: row.option,
|
|
624
|
-
isActive: row.index === unref(combobox).activeIndex.value,
|
|
625
|
-
isSelected: row.option.value === props.modelValue
|
|
626
|
-
}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [row.option.icon ? (openBlock(), createElementBlock("span", {
|
|
627
|
-
key: 0,
|
|
628
|
-
class: normalizeClass(["astryx-selector-option-icon", row.option.icon]),
|
|
629
|
-
"aria-hidden": "true"
|
|
630
|
-
}, null, 2)) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_14, [createElementVNode("span", _hoisted_15, toDisplayString(row.option.label), 1), row.option.description ? (openBlock(), createElementBlock("span", _hoisted_16, toDisplayString(row.option.description), 1)) : createCommentVNode("v-if", true)])], 64))]),
|
|
631
|
-
props.indicatorPosition === "end" ? (openBlock(), createElementBlock("span", _hoisted_17, [(openBlock(), createBlock(resolveDynamicComponent(unref(SelectionMark)), {
|
|
632
|
-
class: "astryx-selector-check",
|
|
633
|
-
state: row.option.value === props.modelValue ? "checked" : "unchecked",
|
|
634
|
-
size: "sm",
|
|
635
|
-
"is-disabled": row.option.disabled
|
|
636
|
-
}, null, 8, ["state", "is-disabled"]))])) : createCommentVNode("v-if", true)
|
|
637
|
-
], 42, _hoisted_11)) : createCommentVNode("v-if", true)], 64);
|
|
638
|
-
}), 128))])) : showEmpty.value ? (openBlock(), createElementBlock("div", _hoisted_18, [!isSearching.value && unref(slots).empty ? renderSlot(_ctx.$slots, "empty", {}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(isSearching.value ? resolvedEmptySearchText.value : resolvedEmptyText.value), 1)], 64))])) : createCommentVNode("v-if", true)], 14, _hoisted_5), [[vShow, unref(combobox).isOpen.value]])], 8, ["to"])),
|
|
639
|
-
props.name ? (openBlock(), createElementBlock("select", {
|
|
640
|
-
key: 3,
|
|
641
|
-
id: `${selectorId}-hidden-select`,
|
|
642
|
-
name: props.name,
|
|
643
|
-
value: props.modelValue ?? "",
|
|
644
|
-
disabled: unref(control).isDisabled.value,
|
|
645
|
-
"aria-label": props.label || resolvedPlaceholder.value,
|
|
646
|
-
tabindex: "-1",
|
|
647
|
-
style: {
|
|
648
|
-
"position": "absolute",
|
|
649
|
-
"left": "-9999px",
|
|
650
|
-
"width": "1px",
|
|
651
|
-
"height": "1px"
|
|
652
|
-
}
|
|
653
|
-
}, [_cache[4] || (_cache[4] = createElementVNode("option", { value: "" }, null, -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(flatOptions.value, (option) => {
|
|
654
|
-
return openBlock(), createElementBlock("option", {
|
|
655
|
-
key: option.value,
|
|
656
|
-
value: option.value
|
|
657
|
-
}, toDisplayString(option.label), 9, _hoisted_20);
|
|
658
|
-
}), 128))], 8, _hoisted_19)) : createCommentVNode("v-if", true)
|
|
659
|
-
]),
|
|
660
|
-
_: 3
|
|
661
|
-
}, 8, [
|
|
662
|
-
"class",
|
|
663
|
-
"label",
|
|
664
|
-
"is-label-hidden",
|
|
665
|
-
"is-disabled",
|
|
666
|
-
"is-optional",
|
|
667
|
-
"is-required",
|
|
668
|
-
"description",
|
|
669
|
-
"status",
|
|
670
|
-
"status-variant",
|
|
671
|
-
"width"
|
|
672
|
-
]);
|
|
673
|
-
};
|
|
674
|
-
}
|
|
675
|
-
});
|
|
676
|
-
//#endregion
|
|
677
|
-
export { _sfc_main as t };
|