@astryx-vue/core 0.13.0 → 0.14.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-igjA8kZr.js → AlertDialog-BOyx3Owt.js} +6 -6
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-DUHcLJWD.js → AppShell-CHN80IBy.js} +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-KmdgVaAb.js → Avatar-B-dg3imS.js} +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-KBzD0jeF.js → AvatarGroup-CKHxYNVh.js} +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-Bf_nMW3-.js → Banner-qEMqg2D8.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-B57XUJV3.js → BottomSheet-CFrcT1Lr.js} +12 -6
- package/dist/{BottomSheet-BMqjymuf.js → BottomSheet-qD8zeVYQ.js} +3 -3
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-aTPAdLdg.js → Breadcrumbs-61TGNa4M.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-sUkQ0Ufo.js → Button-47s3ZBYa.js} +6 -6
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-CWra-KDj.js → ButtonGroup-BFl-0uOp.js} +2 -2
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-DwFAzDky.js → Calendar-D029GXOJ.js} +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-DmXceU9h.js → Carousel-CYjVpChx.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-CeibAkxn.js → Chat-BfekV9OQ.js} +40 -7
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-PvzPV1N1.js → CheckboxInput-Cr0qhZpZ.js} +3 -3
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-DKtNzb0t.js → CheckboxList-DOAdqkXD.js} +6 -6
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-CvxSKkXh.js → ClickableCard-5k35MGot.js} +2 -2
- package/dist/Code/index.d.ts +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-CTPuBH_r.js → CodeBlock-CuNiGAhQ.js} +1 -1
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-C_tl5-L0.js → Collapsible-C09C59LH.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-DIoT_vZh.js → CommandPalette-DU4VBuWx.js} +3 -3
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-Dmbep7M7.js → ComplexSelector-CdeoaX2o.js} +3 -3
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-DYnyk5rs.js → ContextMenu-Cw34CTey.js} +6 -6
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-DgPIsWPu.js → DateInput-vxaVpM2X.js} +562 -123
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-oOfhUt1Q.js → DateRangeInput-X5VDZkfk.js} +14 -11
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-DZfghF2h.js → DateTimeInput-B8HeL3dk.js} +19 -11
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-Dkwt3mVt.js → Dialog-CprMsTku.js} +48 -22
- package/dist/{Dialog-qIL4DUot.js → Dialog-DCsuevxA.js} +1 -1
- package/dist/{DialogHeader-w4TCzYEj.js → DialogHeader-DyMQBW1_.js} +2 -2
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-DBHSNUAa.js → Drawer-BkFF7krL.js} +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-DHvAlqSj.js → DropdownMenu-DEEcKIHY.js} +10 -10
- package/dist/{DropdownMenu-Cncx4FbU.js → DropdownMenu-Dt88fMAT.js} +5 -5
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-uWyPaIR1.js → EmptyState-BS8ESteS.js} +2 -2
- package/dist/Field/index.js +3 -3
- package/dist/{Field-CqDOsI3P.js → Field-Dxacpe9d.js} +2 -2
- package/dist/{FieldInfoTip-CUh2koNc.js → FieldInfoTip-DS4OAl2Q.js} +1 -1
- package/dist/{FieldLabel-BMHNRAG3.js → FieldLabel-DjzTYhCM.js} +2 -2
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-C6dK2pvX.js → FileInput-Dak2gIXU.js} +3 -3
- package/dist/FormLayout/index.d.ts +2 -2
- package/dist/FormLayout/index.js +1 -1
- package/dist/{FormLayout-B9dUB6Ps.js → FormLayout-CGJVeNsL.js} +5 -3
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-C0axugQa.js → Heading-BYB7QXkT.js} +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-C6Gxekg0.js → HoverCard-CtDr234t.js} +28 -64
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-Bv2eIsJy.js → IconButton-DvgueAEp.js} +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-BKsbmGA6.js → InfoTip-DshbO5eW.js} +2 -2
- package/dist/{InputClearButton-CSS2Tjat.js → InputClearButton-DEb-bGsY.js} +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-DTGh1ylC.js → InputGroup-DLu11Lsd.js} +1 -1
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-BYU2MRtX.js → InternationalizationProvider-CqCxB9ku.js} +1 -1
- package/dist/{Item-Cfv4ALls.js → Item-CoNXshDg.js} +2 -2
- package/dist/{LayerContentBoundary-DwTkbifx.js → LayerContentBoundary-Cx5xXZzg.js} +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-BZ-zBvly.js → Lightbox-f_0_73Zi.js} +3 -3
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-Ddu0KjPZ.js → Link-CFxZ9W2X.js} +2 -2
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-2evjQQ7n.js → ListItem-D-pqxQpq.js} +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-D7bQGV9u.js → Markdown-DTqTIKbq.js} +3 -3
- package/dist/MetadataList/index.d.ts +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-Dfshmrdy.js → MobileNavToggle-D_J_uTW-.js} +3 -3
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-Bie4B7Jr.js → MoreMenu-BY1t1_QA.js} +6 -6
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-BXIpOmSU.js → MultiSelector-BmdODQAC.js} +11 -10
- package/dist/{NavDisclosure-1otbO71l.js → NavDisclosure-mXBWmRDC.js} +1 -1
- package/dist/{NavHeadingSurface-BkMR3V5m.js → NavHeadingSurface-foJo5bLT.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +1 -1
- package/dist/{NavItem-BZLN0U5a.js → NavItem-hmUfwhiK.js} +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-dyGZS1yM.js → NavMenu-CG9Bthba.js} +2 -2
- package/dist/{NavMenuItem-CirgE73a.js → NavMenuItem-BiFZUPxC.js} +2 -2
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-0KbcEF3_.js → NumberInput-BDNiEgzf.js} +5 -5
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-BXu7HCHp.js → Outline--OQ2pCFL.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-BdcaX1bz.js → OverflowList-CR96Nr5t.js} +2 -2
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-eeM9SNsG.js → Pagination-CA3yJwyk.js} +1 -1
- package/dist/{PickerWheel-CSwUYfes.js → PickerWheel-DNX3yrUd.js} +21 -8
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-BOQo9UPf.js → Popover-Mj71LwjH.js} +8 -7
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-CaqFxaFb.js → PowerSearch-CajkGExd.js} +19 -19
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-BS3VSoE9.js → ProgressBar-sGSCEtHC.js} +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-DKaSstyl.js → RadioGroup-D58Fy-bM.js} +4 -4
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-DtKm9spP.js → RadioList-u9PoRBXY.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/ScrollableArea/index.js +1 -1
- package/dist/{ScrollableArea-BgIytCxo.js → ScrollableArea-C2GBp55Z.js} +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-Bs74LlvS.js → SegmentedControl-COVOdCq2.js} +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-BFCwgtWf.js → SelectableCard-CTRsWXfA.js} +2 -2
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-DP012yul.js → Selector-jA_SESFs.js} +8 -6
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-L6CWk5fV.js → SideNav-BgmpUELq.js} +6 -6
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DZS8mGZA.js → Slider-Depy9L-Y.js} +4 -4
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-DaQGq8YN.js → StatusDot-D0Wy2ggp.js} +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-DAQRW4n8.js → Stepper-CYZrGpQ9.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-BN_NnBuc.js → Switch-dD4OQLkI.js} +3 -3
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-Bmj4tGT-.js → TabList-CoiyQidC.js} +2 -2
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-YDS_Hj1L.js → Table-Cb0ec1PS.js} +13 -13
- package/dist/Text/index.d.ts +1 -1
- package/dist/Text/index.js +1 -1
- package/dist/{Text-IijvZmW-.js → Text-BWSmB93V.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-BDR179q1.js → TextArea-CbY2w_ic.js} +7 -7
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-kUzxl99M.js → TextInput-C8f89GV8.js} +7 -7
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-Disi5yDb.js → Thumbnail-DENhXd9-.js} +3 -3
- package/dist/{TimeField-C0la1AtP.js → TimeField-DcZ9wYGn.js} +8 -8
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-C_jTijHh.js → TimeInput-DyiU7_IA.js} +3 -3
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-DifGERP8.js → Timer-CgBSMr9E.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-BjXZGAvO.js → Timestamp-B-VgG6l8.js} +3 -3
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-DBo0WRAd.js → Toast-CRSZV9K-.js} +3 -3
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-B5HNykOh.js → ToggleButton-Bm5IQUy5.js} +3 -3
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-CtG_XE6z.js → Token-uhs8Q9Rr.js} +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-CY0ymjYr.js → Tokenizer-DmjNQLDl.js} +8 -8
- 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-4APVAlN9.js → Tooltip-BwrJVZ8X.js} +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-XSZWAR-7.js → TopNav-C3gyHUVv.js} +5 -5
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-CRMLcaRx.js → TreeList-Dc3A72iY.js} +2 -2
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-ByeXwX8E.js → Typeahead-LdmEDCOU.js} +7 -7
- package/dist/busyAnnouncement-D3eGqdsf.js +88 -0
- package/dist/composables/index.d.ts +1 -1
- package/dist/composables/index.js +15 -15
- package/dist/{composables-WUkSRUCj.js → composables-Bi0Rt0Uj.js} +53 -5
- package/dist/{context-Cfml4jaK.js → context-DsNhYm5O.js} +6 -1
- package/dist/{date-input-CiEBtStM.js → date-input-rUD8YAow.js} +4 -0
- package/dist/{utils-BOmFijPc.js → dateParser-DS_a8Ej8.js} +1 -329
- package/dist/{fieldParts-CDOlBdy6.js → fieldParts-CbWvZLhH.js} +1 -1
- package/dist/{focus-l8jVTcqd.js → focus-x7mxEqjR.js} +1 -1
- package/dist/{format-CiN0Dt_H.js → format-CMHyAMn3.js} +28 -1
- package/dist/{index-BhxqUt3y.d.ts → index--kbwaSXW.d.ts} +1 -1
- package/dist/{index-DPklTi3o.d.ts → index-B-3EGjfQ.d.ts} +2 -2
- package/dist/{index-KcCNhdAw.d.ts → index-B3yTdknp.d.ts} +1 -1
- package/dist/{index-DMcf0QeR.d.ts → index-B449gOMC.d.ts} +1 -1
- package/dist/{index-D7YRtteD.d.ts → index-BHYhTZzp.d.ts} +1 -1
- package/dist/{index-CP-fJFcJ.d.ts → index-BOCb89V9.d.ts} +3 -3
- package/dist/{index-DKuoSloc.d.ts → index-BPymttXR.d.ts} +47 -15
- package/dist/{index-CfHBwR3F.d.ts → index-BbXwtkv6.d.ts} +4 -4
- package/dist/{index-D1RIIzDd.d.ts → index-C5VJoanX.d.ts} +3 -3
- package/dist/{index-ul1hNxih.d.ts → index-CLHJybQY.d.ts} +1 -1
- package/dist/{index-Bgk1Rj2A.d.ts → index-CTjkJP4x.d.ts} +1 -1
- package/dist/{index-DDrL_-hJ.d.ts → index-CbA8rR_b.d.ts} +3 -3
- package/dist/{index-YKCx03zD.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-Buxb8Onp.d.ts → index-Cr9uPUc5.d.ts} +98 -52
- package/dist/{index-BcJzA5j_.d.ts → index-DG7FmGCE.d.ts} +2 -2
- package/dist/{index-C90l2rH1.d.ts → index-DcisK4t8.d.ts} +11 -1
- package/dist/{index-BpprL2SN.d.ts → index-DfdtDWSP.d.ts} +5 -1
- package/dist/{index-x0rjeitC.d.ts → index-Dg0JsBpI.d.ts} +2 -2
- package/dist/{index-PffxihMx.d.ts → index-Djf0M7PH.d.ts} +1 -1
- package/dist/{index--tm6L1ot.d.ts → index-DpYJBFJj.d.ts} +1 -1
- package/dist/{index-B1eCxBCY.d.ts → index-TXcNH86P.d.ts} +1 -1
- package/dist/{index-C5e2rZML.d.ts → index-dWlCpnua.d.ts} +2 -2
- package/dist/{index-DYabo8TI.d.ts → index-eCp-ElSp.d.ts} +1 -1
- package/dist/{index-CtYlR9Cu.d.ts → index-rdwI-mcm.d.ts} +1 -1
- package/dist/{index-DPH5yoAr.d.ts → index-s0Ezq3U-.d.ts} +2 -2
- package/dist/{index-NOXYEdOI.d.ts → index-utZGF4GR.d.ts} +1 -1
- package/dist/{index-BEZ4ezJk.d.ts → index-wY6dKz6c.d.ts} +2 -2
- package/dist/{index-C89cIh4E.d.ts → index-waTkqxTz.d.ts} +1 -1
- package/dist/index.d.ts +32 -32
- package/dist/index.js +113 -111
- package/dist/interactionModality-BPvyShJT.js +125 -0
- package/dist/layerDepth-I6d28O4d.js +297 -0
- package/dist/{layerFocusReturn-DMJaFgcY.js → layerFocusReturn-BrS5RTx6.js} +2 -2
- package/dist/{loadCatalog-Kp7aQZpL.d.ts → loadCatalog-Cvf-xgDD.d.ts} +34 -27
- package/dist/{loadCatalog-BtQRPyzj.js → loadCatalog-DYuZZRtf.js} +1 -1
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -4
- package/dist/{locale-DET_YkFW.js → locale-B-DrJCMs.js} +1 -1
- package/dist/{modalOutlet-CUOcrhIu.js → modalOutlet-Drr9a16b.js} +25 -1
- package/dist/{pressFeedback-Bwwpex9q.js → pressFeedback-Co3ugCsm.js} +3 -190
- package/dist/pressGesture-B3z3W3Za.js +78 -0
- package/dist/{scrollKeyboardDelegation-D7cumnOl.js → scrollKeyboardDelegation-BSpUCTlO.js} +1 -1
- package/dist/{selectorEscape-BppRdqpc.js → selectorEscape-FjiU_5WC.js} +4 -17
- package/dist/{stillPointerGate-Bh02Mfnw.js → stillPointerGate-DlAU_J_M.js} +1 -1
- package/dist/timeParser-D9tCF_b3.js +203 -0
- package/dist/tooltipTriggerRules-9zkDe8_b.js +10 -0
- package/dist/{useActionGroupTracking-BJMRaXil.js → useActionGroupTracking-CDclbV3Y.js} +2 -2
- package/dist/useClickableContainer-Dtjg-nkm.js +141 -0
- package/dist/{useDismiss-BWd-sQ18.js → useDismiss-21Gk7uWk.js} +58 -5
- package/dist/{useFocusTrap-FJt5QhEd.js → useFocusTrap-BFQ7Goue.js} +32 -17
- package/dist/{useHoverLayerDismiss-uhfzmZyf.js → useHoverLayerDismiss-Chfty2wT.js} +1 -1
- package/dist/{useInputContainer-BpLtCA-U.js → useInputContainer-CLhsKYZ6.js} +1 -1
- package/dist/{useInputStatusIcon-C3Q-q_wI.js → useInputStatusIcon-Yd0hvw5K.js} +1 -1
- package/dist/{useLayer-BGv_wRSG.js → useLayer-vK4-yRk_.js} +13 -5
- package/dist/{useMenuDrillIn-uQtOSny6.js → useMenuDrillIn-BW9dNBje.js} +1 -1
- package/dist/{useMenuPress-BLPwY_m1.js → useMenuPress-9vsHzbRX.js} +1 -29
- package/dist/{usePressFeedback-Bcjsw9vv.js → usePressFeedback-Cxu4-mCe.js} +1 -1
- package/dist/{useResizable-DTDhsLip.js → useResizable-DYlc06-H.js} +1 -1
- package/dist/{useRestoreFocus-D2-pGoOk.js → useRestoreFocus-BhcXCJwM.js} +2 -2
- package/dist/{useScrollableArea-BE8b3qm7.js → useScrollableArea-Bwn75HDg.js} +1 -1
- package/dist/useTimeValue-_XW9g2V1.js +52 -0
- package/dist/{useTooltip-md1tr6ef.js → useTooltip-DIg3ZE9P.js} +25 -27
- package/dist/{useTouchHitArea-1WtV3u6F.js → useTouchHitArea-B3jx01C3.js} +1 -1
- package/dist/useTouchTriggerInternal-CrLW-7kT.js +257 -0
- package/dist/{useTruncationTooltip-BGsFITq5.js → useTruncationTooltip-D9_lzxpF.js} +4 -4
- package/dist/{useTypeahead-BrUwR-kv.js → useTypeahead-CiLt-yEg.js} +1 -1
- package/dist/{useTypeaheadAnnouncement-MbuZumTd.js → useTypeaheadAnnouncement-C59m2nSx.js} +1 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils-BW62BpDR.js +135 -0
- package/package.json +1 -1
- package/styles/date-input.css +45 -3
- package/styles/date-range-input.css +7 -0
- package/styles/time-input.css +7 -0
- package/dist/interactionModality-ACpTMhak.js +0 -44
- package/dist/layerDepth-BF74Cctw.js +0 -205
- package/dist/layerSurfacePress-C3PjPpJP.js +0 -29
- package/dist/tooltipTriggerRules-BY3LAtUl.js +0 -53
- package/dist/useTimeValue-BJd0xBhG.js +0 -95
- package/dist/useTouchTrigger-GGd85Obb.js +0 -146
- package/dist/{index-BqhgeAT4.d.ts → index-CHx33xGa.d.ts} +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as _sfc_main$4 } from "./BottomSheet-
|
|
1
|
+
import { n as _sfc_main$4 } from "./BottomSheet-CFrcT1Lr.js";
|
|
2
2
|
import { t as _sfc_main$5 } from "./Icon-BCHo7W0x.js";
|
|
3
3
|
import { r as useInputGroupDisabled } from "./context-Bg7eSJ47.js";
|
|
4
4
|
import { i as useSize } from "./SizeContext-BbaF-SEx.js";
|
|
5
|
-
import { a as isImeKeyEvent } from "./layerDepth-
|
|
5
|
+
import { a as noteOutsideDismissal, c as currentGesture, s as isImeKeyEvent } from "./layerDepth-I6d28O4d.js";
|
|
6
6
|
import { t as _sfc_main$6 } from "./VisuallyHidden-cpmsV-0M.js";
|
|
7
7
|
import { t as _sfc_main$7 } from "./ButtonTooltip-CNKOQHYR.js";
|
|
8
8
|
import { t as useButtonTooltip } from "./useButtonTooltip-DjCaZMp_.js";
|
|
@@ -12,25 +12,140 @@ import { t as _sfc_main$8 } from "./FieldIcon-DMtfe1Ne.js";
|
|
|
12
12
|
import { a as useAstryxLocale, o as useComponentMessages } from "./context-B8IEFCDR.js";
|
|
13
13
|
import { t as usePendingChange } from "./usePendingChange-ib-h8FZK.js";
|
|
14
14
|
import { t as useResolvedLabelHidden } from "./useResolvedLabelHidden-B2rlWiaI.js";
|
|
15
|
-
import { n as standaloneShortWeekdayNames, r as weekdayNames, t as formatCalendarMonth } from "./format-
|
|
15
|
+
import { n as standaloneShortWeekdayNames, r as weekdayNames, t as formatCalendarMonth } from "./format-CMHyAMn3.js";
|
|
16
16
|
import { t as calendarMessages } from "./calendar-Cs2vIPsV.js";
|
|
17
|
-
import { a as isOutsideCalendarBounds, c as toCalendarDate, i as isCalendarDateDisabled, l as weekStartIndex, n as resolveCalendarKey, o as formatWeekdayDate, r as buildCalendarWeeks, s as sameCalendarDay, t as _sfc_main$9 } from "./Calendar-
|
|
17
|
+
import { a as isOutsideCalendarBounds, c as toCalendarDate, i as isCalendarDateDisabled, l as weekStartIndex, n as resolveCalendarKey, o as formatWeekdayDate, r as buildCalendarWeeks, s as sameCalendarDay, t as _sfc_main$9 } from "./Calendar-D029GXOJ.js";
|
|
18
18
|
import { t as _sfc_main$10 } from "./Spinner-DEVPDsD0.js";
|
|
19
|
-
import { i as useAriaRequired } from "./context-
|
|
20
|
-
import { t as _sfc_main$11 } from "./Field-
|
|
21
|
-
import { t as useFieldPartStyling } from "./fieldParts-
|
|
22
|
-
import { t as _sfc_main$12 } from "./Popover-
|
|
23
|
-
import { t as
|
|
19
|
+
import { a as useEntryErrorBehavior, i as useAriaRequired } from "./context-DsNhYm5O.js";
|
|
20
|
+
import { t as _sfc_main$11 } from "./Field-Dxacpe9d.js";
|
|
21
|
+
import { t as useFieldPartStyling } from "./fieldParts-CbWvZLhH.js";
|
|
22
|
+
import { t as _sfc_main$12 } from "./Popover-Mj71LwjH.js";
|
|
23
|
+
import { t as useBusyAnnouncement } from "./busyAnnouncement-D3eGqdsf.js";
|
|
24
|
+
import { t as dateInputMessages } from "./date-input-rUD8YAow.js";
|
|
24
25
|
import { t as formatInstant } from "./formatInstant-BDWUIxS7.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
26
|
+
import { P as plainDateToDate, n as parseDateInput } from "./dateParser-DS_a8Ej8.js";
|
|
27
|
+
import { t as _sfc_main$13 } from "./PickerWheel-DNX3yrUd.js";
|
|
28
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useAttrs, useId, useTemplateRef, watch, withCtx } from "vue";
|
|
27
29
|
import { CalendarDate } from "@internationalized/date";
|
|
28
30
|
import "../styles/calendar.css";
|
|
29
31
|
import "../styles/date-input.css";
|
|
32
|
+
//#region src/DateInput/dateText.ts
|
|
33
|
+
/** 本地日期写成 `YYYY-MM-DD`。 */
|
|
34
|
+
function toIsoDate(date) {
|
|
35
|
+
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
36
|
+
}
|
|
37
|
+
/** 读 `YYYY-M-D` 形式的文字。不是真实存在的日子就返回 `null`。 */
|
|
38
|
+
function parseTypedDate(text) {
|
|
39
|
+
const match = text.trim().match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);
|
|
40
|
+
if (!match) return null;
|
|
41
|
+
const [, year, month, day] = match;
|
|
42
|
+
const date = new Date(Number(year), Number(month) - 1, Number(day));
|
|
43
|
+
if (Number.isNaN(date.getTime()) || date.getFullYear() !== Number(year) || date.getMonth() !== Number(month) - 1 || date.getDate() !== Number(day)) return null;
|
|
44
|
+
return date;
|
|
45
|
+
}
|
|
46
|
+
/** 已提交日期的显示文字。 */
|
|
47
|
+
function formatCommittedDate(date, format, locale) {
|
|
48
|
+
if (!date) return "";
|
|
49
|
+
const iso = toIsoDate(date);
|
|
50
|
+
if (typeof format === "function") return format(iso);
|
|
51
|
+
if (format === "system_date") return iso;
|
|
52
|
+
return formatInstant(date, format ?? "date_long", locale);
|
|
53
|
+
}
|
|
54
|
+
/** 把字符串写法的状态展开成 `{ type }`,`default` 当作没有状态。 */
|
|
55
|
+
function resolveDateStatus(status) {
|
|
56
|
+
if (status == null || status === "default") return void 0;
|
|
57
|
+
if (typeof status === "string") return { type: status };
|
|
58
|
+
return status;
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/DateInput/dateEntry.ts
|
|
62
|
+
const ISO_DATE = /^(\d{4})-(\d{1,2})-(\d{1,2})$/;
|
|
63
|
+
const ISO_PREFIX = /^\d{1,4}(?:-(?:\d{1,2}(?:-\d?)?)?)?$/;
|
|
64
|
+
/**
|
|
65
|
+
* 读打进来的文字。`YYYY-M-D` 打完整(日子是两位,或者一位但不会再变)就算完整;
|
|
66
|
+
* 还能接着打的 ISO 前缀算半截;其余文字交给 `parseDateInput`,读出来的日子只在 Enter 或失焦时提交。
|
|
67
|
+
*/
|
|
68
|
+
function parseDateEntry(text, locale, isBlocked) {
|
|
69
|
+
const trimmed = text.trim();
|
|
70
|
+
const iso = ISO_DATE.exec(trimmed);
|
|
71
|
+
if (iso) {
|
|
72
|
+
const year = Number(iso[1]);
|
|
73
|
+
const month = Number(iso[2]);
|
|
74
|
+
const day = Number(iso[3]);
|
|
75
|
+
if (month < 1 || month > 12 || day < 1 || day > 31) return { kind: "unreadable" };
|
|
76
|
+
const date = new Date(year, month - 1, day);
|
|
77
|
+
date.setFullYear(year);
|
|
78
|
+
const isComplete = iso[3].length === 2 || day > 3;
|
|
79
|
+
if (date.getMonth() !== month - 1 || date.getDate() !== day) return isComplete ? { kind: "nonexistent" } : { kind: "incomplete" };
|
|
80
|
+
return {
|
|
81
|
+
kind: isBlocked(date) ? "outOfRange" : "value",
|
|
82
|
+
date,
|
|
83
|
+
isComplete
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
if (ISO_PREFIX.test(trimmed)) return { kind: "incomplete" };
|
|
87
|
+
const loose = parseDateInput(trimmed, locale);
|
|
88
|
+
if (loose == null) return { kind: "unreadable" };
|
|
89
|
+
const date = plainDateToDate(loose);
|
|
90
|
+
return {
|
|
91
|
+
kind: isBlocked(date) ? "outOfRange" : "value",
|
|
92
|
+
date,
|
|
93
|
+
isComplete: false
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 一个结果此刻亮出来的拒绝:Enter 或失焦提交过的文字的错,
|
|
98
|
+
* 或者在 `complete` 下一个已经打完整的日子的错。读不成日期的文字永远不完整,所以等提交。
|
|
99
|
+
*/
|
|
100
|
+
function dateEntryErrorKind(result, isCommitted, behavior) {
|
|
101
|
+
if (result == null) return null;
|
|
102
|
+
if ((result.kind === "unreadable" || result.kind === "incomplete") && isCommitted) return "unreadable";
|
|
103
|
+
if (result.kind === "nonexistent" && (isCommitted || behavior === "complete")) return "nonexistent";
|
|
104
|
+
if (result.kind === "outOfRange" && (isCommitted || result.isComplete && behavior === "complete")) return "outOfRange";
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
/** 这个结果是不是打字就会提交的日子,它会结束一个亮着的拒绝。 */
|
|
108
|
+
function isAcceptedEntry(result) {
|
|
109
|
+
return result.kind === "value" && result.isComplete;
|
|
110
|
+
}
|
|
111
|
+
function dayOf(date) {
|
|
112
|
+
return date.getFullYear() * 1e4 + date.getMonth() * 100 + date.getDate();
|
|
113
|
+
}
|
|
114
|
+
function isOutsideBounds(date, bounds) {
|
|
115
|
+
return bounds.min != null && dayOf(date) < dayOf(bounds.min) || bounds.max != null && dayOf(date) > dayOf(bounds.max);
|
|
116
|
+
}
|
|
117
|
+
/** 报给调用方的拒绝。 */
|
|
118
|
+
function toEntryError(result, text, bounds) {
|
|
119
|
+
if (result.kind === "incomplete" || result.kind === "unreadable" || result.kind === "nonexistent") return {
|
|
120
|
+
kind: result.kind,
|
|
121
|
+
text
|
|
122
|
+
};
|
|
123
|
+
return {
|
|
124
|
+
kind: result.kind === "outOfRange" && isOutsideBounds(result.date, bounds) ? "outOfRange" : "unavailable",
|
|
125
|
+
text,
|
|
126
|
+
date: toIsoDate(result.date)
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/** 拒绝时字段下方显示的那句话。边界日期按字段的显示格式写,自定义格式函数时用长日期。 */
|
|
130
|
+
function dateEntryMessage(result, bounds, format, locale, messages) {
|
|
131
|
+
if (result.kind === "nonexistent") return messages.nonexistentDate;
|
|
132
|
+
if (result.kind === "outOfRange" || result.kind === "value") {
|
|
133
|
+
const boundFormat = typeof format === "function" ? "date_long" : format;
|
|
134
|
+
const write = (date) => date ? formatCommittedDate(date, boundFormat, locale) : "";
|
|
135
|
+
const which = !isOutsideBounds(result.date, bounds) ? "other" : bounds.min != null && bounds.max != null ? "both" : bounds.min != null ? "min" : "max";
|
|
136
|
+
return messages.outOfRangeDate(which, write(bounds.min), write(bounds.max));
|
|
137
|
+
}
|
|
138
|
+
return messages.invalidDate;
|
|
139
|
+
}
|
|
140
|
+
function sameEntryError(a, b) {
|
|
141
|
+
return a === b || a != null && b != null && a.kind === b.kind && a.text === b.text && a.date === b.date;
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
30
144
|
//#region src/DateInput/NativeDateField.vue
|
|
31
145
|
const _hoisted_1$3 = ["data-status"];
|
|
32
146
|
const _hoisted_2$3 = [
|
|
33
147
|
"data-disabled",
|
|
148
|
+
"data-busy",
|
|
34
149
|
"data-size",
|
|
35
150
|
"data-status"
|
|
36
151
|
];
|
|
@@ -132,7 +247,8 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
132
247
|
String,
|
|
133
248
|
Object,
|
|
134
249
|
Array
|
|
135
|
-
] }
|
|
250
|
+
] },
|
|
251
|
+
hasEntryErrorListener: { type: Boolean }
|
|
136
252
|
},
|
|
137
253
|
emits: ["update:modelValue", "change"],
|
|
138
254
|
setup(__props, { emit: __emit }) {
|
|
@@ -145,7 +261,11 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
145
261
|
const inputRef = useTemplateRef("input");
|
|
146
262
|
const containerRef = useTemplateRef("container");
|
|
147
263
|
const focused = ref(false);
|
|
148
|
-
|
|
264
|
+
/** 系统控件报上来、字段不收的日子,等 Enter 或失焦再亮出来。 */
|
|
265
|
+
const heldRefusal = ref(null);
|
|
266
|
+
/** Enter 或失焦亮出来的被拒日子。控件恢复成已提交的值后仍然亮着,直到报来能收的日子或清空。 */
|
|
267
|
+
const shownRefusal = ref(null);
|
|
268
|
+
let isRevealing = false;
|
|
149
269
|
const pending = usePendingChange(() => props.changeAction);
|
|
150
270
|
const busy = computed(() => props.isLoading || pending.busy.value);
|
|
151
271
|
const locked = computed(() => props.disabled || busy.value);
|
|
@@ -154,11 +274,7 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
154
274
|
const showsDisabledMessage = computed(() => locked.value && disabledMessage.value != null);
|
|
155
275
|
const disabledTooltip = useButtonTooltip(showsDisabledMessage);
|
|
156
276
|
const showsClear = computed(() => (props.hasClear || props.clearable) && Boolean(props.modelValue) && !locked.value);
|
|
157
|
-
|
|
158
|
-
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
159
|
-
const day = String(date.getDate()).padStart(2, "0");
|
|
160
|
-
return `${date.getFullYear()}-${month}-${day}`;
|
|
161
|
-
}
|
|
277
|
+
useBusyAnnouncement(busy, () => messages.value.dateInput.loading, () => containerRef.value);
|
|
162
278
|
function allowed(date) {
|
|
163
279
|
return !isCalendarDateDisabled(toCalendarDate(date), {
|
|
164
280
|
min: props.min,
|
|
@@ -167,27 +283,35 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
167
283
|
dateConstraints: props.dateConstraints
|
|
168
284
|
});
|
|
169
285
|
}
|
|
170
|
-
const nativeValue = computed(() => props.modelValue ?
|
|
171
|
-
const overlay = computed(() =>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
286
|
+
const nativeValue = computed(() => props.modelValue ? toIsoDate(props.modelValue) : "");
|
|
287
|
+
const overlay = computed(() => props.modelValue ? formatCommittedDate(props.modelValue, props.format, locale.value) : props.placeholder ?? messages.value.dateInput.placeholder);
|
|
288
|
+
const refusalMessage = computed(() => !locked.value && shownRefusal.value ? dateEntryMessage({
|
|
289
|
+
kind: "outOfRange",
|
|
290
|
+
date: shownRefusal.value,
|
|
291
|
+
isComplete: true
|
|
292
|
+
}, {
|
|
293
|
+
min: props.min,
|
|
294
|
+
max: props.max
|
|
295
|
+
}, props.format, locale.value, messages.value.dateInput) : null);
|
|
296
|
+
const callerError = computed(() => {
|
|
297
|
+
const status = resolveDateStatus(props.status);
|
|
298
|
+
return props.hasEntryErrorListener && status?.type === "error" && status.message ? status.message : null;
|
|
177
299
|
});
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
300
|
+
const statusValue = computed(() => refusalMessage.value != null && callerError.value == null ? {
|
|
301
|
+
type: "error",
|
|
302
|
+
message: refusalMessage.value
|
|
303
|
+
} : resolveDateStatus(props.status));
|
|
304
|
+
const statusType = computed(() => statusValue.value?.type);
|
|
305
|
+
const repeat = ref(null);
|
|
306
|
+
watch(() => refusalMessage.value != null, (rejected) => {
|
|
307
|
+
repeat.value = rejected ? callerError.value : null;
|
|
182
308
|
});
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
if (status == null || status === "default") return void 0;
|
|
186
|
-
if (typeof status === "string") return { type: status };
|
|
187
|
-
return status;
|
|
309
|
+
watch(callerError, (next) => {
|
|
310
|
+
if (repeat.value !== null && repeat.value !== next) repeat.value = null;
|
|
188
311
|
});
|
|
189
|
-
const
|
|
190
|
-
const
|
|
312
|
+
const alertMessage = computed(() => refusalMessage.value != null && repeat.value != null && repeat.value === callerError.value ? repeat.value : "");
|
|
313
|
+
const minIso = computed(() => props.min ? toIsoDate(props.min) : void 0);
|
|
314
|
+
const maxIso = computed(() => props.max ? toIsoDate(props.max) : void 0);
|
|
191
315
|
function write(value) {
|
|
192
316
|
const input = inputRef.value;
|
|
193
317
|
if (input && input.value !== value) input.value = value;
|
|
@@ -201,7 +325,8 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
201
325
|
function read(raw) {
|
|
202
326
|
if (locked.value) return;
|
|
203
327
|
if (!raw) {
|
|
204
|
-
|
|
328
|
+
heldRefusal.value = null;
|
|
329
|
+
shownRefusal.value = null;
|
|
205
330
|
if (props.modelValue) commit(null);
|
|
206
331
|
return;
|
|
207
332
|
}
|
|
@@ -209,11 +334,12 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
209
334
|
if (!match) return;
|
|
210
335
|
const date = new Date(Number(match[1]), Number(match[2]) - 1, Number(match[3]));
|
|
211
336
|
if (!allowed(date)) {
|
|
212
|
-
|
|
337
|
+
heldRefusal.value = date;
|
|
213
338
|
return;
|
|
214
339
|
}
|
|
215
|
-
|
|
216
|
-
|
|
340
|
+
heldRefusal.value = null;
|
|
341
|
+
shownRefusal.value = null;
|
|
342
|
+
if (!props.modelValue || toIsoDate(props.modelValue) !== raw) commit(date);
|
|
217
343
|
}
|
|
218
344
|
function onNative() {
|
|
219
345
|
read(inputRef.value?.value ?? "");
|
|
@@ -221,12 +347,25 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
221
347
|
function onFocus() {
|
|
222
348
|
focused.value = true;
|
|
223
349
|
}
|
|
350
|
+
/** Enter 或失焦:亮出压着的被拒日子。 */
|
|
351
|
+
function revealRefusal() {
|
|
352
|
+
if (locked.value || heldRefusal.value == null) return;
|
|
353
|
+
shownRefusal.value = heldRefusal.value;
|
|
354
|
+
heldRefusal.value = null;
|
|
355
|
+
isRevealing = true;
|
|
356
|
+
nextTick(() => {
|
|
357
|
+
isRevealing = false;
|
|
358
|
+
});
|
|
359
|
+
}
|
|
224
360
|
function onBlur() {
|
|
225
361
|
focused.value = false;
|
|
226
|
-
rejected.value = false;
|
|
227
362
|
read(inputRef.value?.value ?? "");
|
|
363
|
+
revealRefusal();
|
|
228
364
|
write(nativeValue.value);
|
|
229
365
|
}
|
|
366
|
+
function onKeydown(event) {
|
|
367
|
+
if (event.key === "Enter") revealRefusal();
|
|
368
|
+
}
|
|
230
369
|
function onInputFocus(event) {
|
|
231
370
|
onFocus();
|
|
232
371
|
disabledTooltip.onFocus(event);
|
|
@@ -261,6 +400,10 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
261
400
|
input?.removeEventListener("change", onNative);
|
|
262
401
|
});
|
|
263
402
|
watch(nativeValue, (value) => {
|
|
403
|
+
if (!isRevealing) {
|
|
404
|
+
heldRefusal.value = null;
|
|
405
|
+
shownRefusal.value = null;
|
|
406
|
+
}
|
|
264
407
|
if (!focused.value) write(value);
|
|
265
408
|
});
|
|
266
409
|
return (_ctx, _cache) => {
|
|
@@ -295,7 +438,8 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
295
438
|
onPointerleave: _cache[1] || (_cache[1] = (...args) => unref(disabledTooltip).onPointerLeave && unref(disabledTooltip).onPointerLeave(...args))
|
|
296
439
|
}, [createElementVNode("div", {
|
|
297
440
|
class: "astryx-date-input-wrapper",
|
|
298
|
-
"data-disabled":
|
|
441
|
+
"data-disabled": __props.disabled ? "true" : void 0,
|
|
442
|
+
"data-busy": busy.value || void 0,
|
|
299
443
|
"data-size": __props.size,
|
|
300
444
|
"data-status": statusType.value
|
|
301
445
|
}, [
|
|
@@ -328,12 +472,13 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
328
472
|
showsDisabledMessage.value ? disabledMessageId : void 0
|
|
329
473
|
].filter(Boolean).join(" ") || void 0,
|
|
330
474
|
"aria-disabled": locked.value || void 0,
|
|
331
|
-
"aria-invalid": statusType.value === "error"
|
|
475
|
+
"aria-invalid": statusType.value === "error" ? "true" : void 0,
|
|
332
476
|
"aria-required": unref(ariaRequired),
|
|
333
477
|
"aria-busy": busy.value || void 0,
|
|
334
478
|
autocomplete: "off",
|
|
335
479
|
onFocus: onInputFocus,
|
|
336
|
-
onBlur: onInputBlur
|
|
480
|
+
onBlur: onInputBlur,
|
|
481
|
+
onKeydown
|
|
337
482
|
}), null, 16, _hoisted_5$3), createElementVNode("span", {
|
|
338
483
|
class: "astryx-date-input-overlay",
|
|
339
484
|
"data-placeholder": __props.modelValue ? void 0 : "true",
|
|
@@ -353,12 +498,12 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
353
498
|
busy.value ? (openBlock(), createBlock(_sfc_main$10, {
|
|
354
499
|
key: 1,
|
|
355
500
|
size: "sm",
|
|
356
|
-
"aria-
|
|
357
|
-
}
|
|
501
|
+
"aria-hidden": "true"
|
|
502
|
+
})) : statusType.value && __props.statusVariant !== "tooltip" ? (openBlock(), createBlock(_sfc_main$8, {
|
|
358
503
|
key: 2,
|
|
359
504
|
type: statusType.value
|
|
360
505
|
}, null, 8, ["type"])) : createCommentVNode("v-if", true)
|
|
361
|
-
], 8, _hoisted_2$3), createElementVNode("div", _hoisted_8$2, toDisplayString(
|
|
506
|
+
], 8, _hoisted_2$3), createElementVNode("div", _hoisted_8$2, toDisplayString(alertMessage.value), 1)], 46, _hoisted_1$3)]),
|
|
362
507
|
_: 1
|
|
363
508
|
}, 8, [
|
|
364
509
|
"class",
|
|
@@ -458,7 +603,8 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
458
603
|
max: {},
|
|
459
604
|
isDateDisabled: { type: Function },
|
|
460
605
|
dateConstraints: {},
|
|
461
|
-
weekStartsOn: {}
|
|
606
|
+
weekStartsOn: {},
|
|
607
|
+
today: {}
|
|
462
608
|
},
|
|
463
609
|
emits: ["pick", "update:view"],
|
|
464
610
|
setup(__props, { emit: __emit }) {
|
|
@@ -467,7 +613,7 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
467
613
|
const locale = useAstryxLocale();
|
|
468
614
|
const weekStart = computed(() => weekStartIndex(props.weekStartsOn));
|
|
469
615
|
const selectedDate = computed(() => props.selected ? toCalendarDate(props.selected) : null);
|
|
470
|
-
const
|
|
616
|
+
const todayDate = computed(() => toCalendarDate(props.today));
|
|
471
617
|
const focused = shallowRef(new CalendarDate(props.year, props.month, 1));
|
|
472
618
|
const headers = computed(() => {
|
|
473
619
|
const shorts = standaloneShortWeekdayNames(locale.value);
|
|
@@ -545,14 +691,14 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
545
691
|
type: "button",
|
|
546
692
|
class: normalizeClass(["astryx-calendar-cell", {
|
|
547
693
|
"is-selected": !!selectedDate.value && !day.outside && unref(sameCalendarDay)(day.date, selectedDate.value),
|
|
548
|
-
"is-today": !day.outside && unref(sameCalendarDay)(day.date,
|
|
694
|
+
"is-today": !day.outside && unref(sameCalendarDay)(day.date, todayDate.value),
|
|
549
695
|
"is-disabled": day.outside || blocked(day.date),
|
|
550
696
|
"is-other-month": day.outside
|
|
551
697
|
}]),
|
|
552
698
|
"data-date": day.iso,
|
|
553
699
|
tabindex: !day.outside && unref(sameCalendarDay)(day.date, focused.value) ? 0 : -1,
|
|
554
700
|
"aria-disabled": day.outside || blocked(day.date) || void 0,
|
|
555
|
-
"aria-current": !day.outside && unref(sameCalendarDay)(day.date,
|
|
701
|
+
"aria-current": !day.outside && unref(sameCalendarDay)(day.date, todayDate.value) ? "date" : void 0,
|
|
556
702
|
"aria-label": unref(formatWeekdayDate)(day.date, unref(locale)),
|
|
557
703
|
onClick: ($event) => pick(day.date, day.outside)
|
|
558
704
|
}, [createElementVNode("span", _hoisted_5$2, toDisplayString(day.day), 1)], 10, _hoisted_4$2)]);
|
|
@@ -563,7 +709,10 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
563
709
|
});
|
|
564
710
|
//#endregion
|
|
565
711
|
//#region src/DateInput/TouchDateSheet.vue
|
|
566
|
-
const _hoisted_1$1 = {
|
|
712
|
+
const _hoisted_1$1 = {
|
|
713
|
+
key: 0,
|
|
714
|
+
class: "astryx-date-touch"
|
|
715
|
+
};
|
|
567
716
|
const _hoisted_2$1 = { class: "astryx-date-touch-header" };
|
|
568
717
|
const _hoisted_3$1 = ["aria-expanded", "aria-label"];
|
|
569
718
|
const _hoisted_4$1 = {
|
|
@@ -590,6 +739,10 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
590
739
|
saveDisabled: {
|
|
591
740
|
type: Boolean,
|
|
592
741
|
default: false
|
|
742
|
+
},
|
|
743
|
+
isDisabled: {
|
|
744
|
+
type: Boolean,
|
|
745
|
+
default: false
|
|
593
746
|
}
|
|
594
747
|
},
|
|
595
748
|
emits: [
|
|
@@ -607,10 +760,20 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
607
760
|
const locale = useAstryxLocale();
|
|
608
761
|
const wheelsOpen = ref(false);
|
|
609
762
|
const dragX = ref(null);
|
|
610
|
-
const
|
|
611
|
-
const
|
|
612
|
-
const
|
|
763
|
+
const coarse = useMediaQuery("(pointer: coarse)");
|
|
764
|
+
const titleRef = useTemplateRef("title");
|
|
765
|
+
const prevRef = useTemplateRef("prev");
|
|
766
|
+
const nextRef = useTemplateRef("next");
|
|
767
|
+
const today = shallowRef(null);
|
|
768
|
+
const range = computed(() => reachableMonthRange(props.min, props.max, today.value ?? void 0));
|
|
769
|
+
const view = ref(0);
|
|
613
770
|
const cursor = computed(() => fromMonthIndex(view.value));
|
|
771
|
+
onMounted(() => {
|
|
772
|
+
const now = /* @__PURE__ */ new Date();
|
|
773
|
+
const opening = props.selected ?? now;
|
|
774
|
+
today.value = now;
|
|
775
|
+
view.value = clampMonthIndex(monthIndex(opening.getFullYear(), opening.getMonth() + 1), range.value.min, range.value.max);
|
|
776
|
+
});
|
|
614
777
|
const monthLabel = computed(() => formatCalendarMonth(cursor.value.year, cursor.value.month, locale.value));
|
|
615
778
|
const resolvedSaveLabel = computed(() => props.saveLabel ?? messages.value.dateInput.savePicking);
|
|
616
779
|
const rtl = computed(() => typeof document !== "undefined" && document.documentElement.dir === "rtl");
|
|
@@ -645,23 +808,66 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
645
808
|
}
|
|
646
809
|
return options;
|
|
647
810
|
});
|
|
811
|
+
/**
|
|
812
|
+
* 翻到 `target` 月。到了可选范围的头,那一头的箭头会消失,消失的元素会丢掉焦点:
|
|
813
|
+
* 焦点在它上面时,先等另一个箭头画出来,再把焦点交给它;两个箭头都消失就交给月份标题。
|
|
814
|
+
*/
|
|
815
|
+
function showMonth(target) {
|
|
816
|
+
const prevHides = target <= range.value.min;
|
|
817
|
+
const nextHides = target >= range.value.max;
|
|
818
|
+
const active = typeof document === "undefined" ? null : document.activeElement;
|
|
819
|
+
const onPrev = prevHides && active != null && active === prevRef.value;
|
|
820
|
+
const onNext = nextHides && active != null && active === nextRef.value;
|
|
821
|
+
view.value = target;
|
|
822
|
+
if (!onPrev && !onNext) return;
|
|
823
|
+
const otherHides = onPrev ? nextHides : prevHides;
|
|
824
|
+
nextTick(() => {
|
|
825
|
+
(otherHides ? titleRef.value : onPrev ? nextRef.value : prevRef.value)?.focus({ preventScroll: true });
|
|
826
|
+
});
|
|
827
|
+
}
|
|
648
828
|
function move(amount) {
|
|
649
|
-
|
|
829
|
+
showMonth(clampMonthIndex(view.value + amount, range.value.min, range.value.max));
|
|
830
|
+
}
|
|
831
|
+
function allowed(date) {
|
|
832
|
+
return !isCalendarDateDisabled(toCalendarDate(date), {
|
|
833
|
+
min: props.min,
|
|
834
|
+
max: props.max,
|
|
835
|
+
isDateDisabled: props.isDateDisabled,
|
|
836
|
+
dateConstraints: props.dateConstraints
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* 手指下,月份和年份滚轮像 UIDatePicker 一样带着已选日期走:日子不变,
|
|
841
|
+
* 那个月没有这一天就落在月底,再收进最小最大日期之内。约束拒绝的日子不选,只翻日历。
|
|
842
|
+
* 鼠标下滚轮只翻日历。
|
|
843
|
+
*/
|
|
844
|
+
function carrySelection(target) {
|
|
845
|
+
const selected = props.selected;
|
|
846
|
+
if (!coarse.value || !selected) return;
|
|
847
|
+
const { year, month } = fromMonthIndex(target);
|
|
848
|
+
const lastDay = new Date(year, month, 0).getDate();
|
|
849
|
+
let date = new Date(year, month - 1, Math.min(selected.getDate(), lastDay));
|
|
850
|
+
if (props.min && date < props.min) date = new Date(props.min.getFullYear(), props.min.getMonth(), props.min.getDate());
|
|
851
|
+
if (props.max && date > props.max) date = new Date(props.max.getFullYear(), props.max.getMonth(), props.max.getDate());
|
|
852
|
+
if (allowed(date) && date.getTime() !== selected.getTime()) emit("pick", date);
|
|
650
853
|
}
|
|
651
854
|
function setMonth(value) {
|
|
652
855
|
const target = monthIndex(cursor.value.year, Number(value));
|
|
653
856
|
if (target < range.value.min || target > range.value.max) return;
|
|
654
857
|
view.value = target;
|
|
858
|
+
carrySelection(target);
|
|
655
859
|
}
|
|
656
860
|
function setYear(value) {
|
|
657
861
|
const year = Number(value);
|
|
658
862
|
const target = clampMonthIndex(monthIndex(year, cursor.value.month), range.value.min, range.value.max);
|
|
659
863
|
if (fromMonthIndex(target).year !== year) return;
|
|
660
864
|
view.value = target;
|
|
865
|
+
carrySelection(target);
|
|
661
866
|
}
|
|
662
867
|
function onReset() {
|
|
663
|
-
|
|
664
|
-
|
|
868
|
+
if (props.isDisabled) return;
|
|
869
|
+
const now = /* @__PURE__ */ new Date();
|
|
870
|
+
view.value = clampMonthIndex(monthIndex(now.getFullYear(), now.getMonth() + 1), range.value.min, range.value.max);
|
|
665
871
|
wheelsOpen.value = false;
|
|
666
872
|
emit("reset");
|
|
667
873
|
}
|
|
@@ -676,11 +882,12 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
676
882
|
move((rtl.value ? delta > 0 : delta < 0) ? 1 : -1);
|
|
677
883
|
}
|
|
678
884
|
function onView(year, month) {
|
|
679
|
-
|
|
885
|
+
showMonth(clampMonthIndex(monthIndex(year, month), range.value.min, range.value.max));
|
|
680
886
|
}
|
|
681
887
|
return (_ctx, _cache) => {
|
|
682
|
-
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
888
|
+
return today.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
683
889
|
createElementVNode("div", _hoisted_2$1, [createElementVNode("button", {
|
|
890
|
+
ref: "title",
|
|
684
891
|
type: "button",
|
|
685
892
|
class: "astryx-date-touch-title",
|
|
686
893
|
"aria-expanded": wheelsOpen.value,
|
|
@@ -689,6 +896,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
689
896
|
}, toDisplayString(monthLabel.value), 9, _hoisted_3$1), !wheelsOpen.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
690
897
|
canPrev.value ? (openBlock(), createElementBlock("button", {
|
|
691
898
|
key: 0,
|
|
899
|
+
ref: "prev",
|
|
692
900
|
type: "button",
|
|
693
901
|
class: "astryx-date-touch-arrow",
|
|
694
902
|
"aria-label": unref(messages).calendar.previousMonth,
|
|
@@ -699,6 +907,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
699
907
|
}, null, 8, ["icon"])], 8, _hoisted_5$1)) : createCommentVNode("v-if", true),
|
|
700
908
|
canNext.value ? (openBlock(), createElementBlock("button", {
|
|
701
909
|
key: 1,
|
|
910
|
+
ref: "next",
|
|
702
911
|
type: "button",
|
|
703
912
|
class: "astryx-date-touch-arrow",
|
|
704
913
|
"aria-label": unref(messages).calendar.nextMonth,
|
|
@@ -744,6 +953,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
744
953
|
"is-date-disabled": __props.isDateDisabled,
|
|
745
954
|
"date-constraints": __props.dateConstraints,
|
|
746
955
|
"week-starts-on": __props.weekStartsOn,
|
|
956
|
+
today: today.value,
|
|
747
957
|
onPick: _cache[3] || (_cache[3] = ($event) => emit("pick", $event)),
|
|
748
958
|
"onUpdate:view": onView
|
|
749
959
|
}, null, 8, [
|
|
@@ -754,7 +964,8 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
754
964
|
"max",
|
|
755
965
|
"is-date-disabled",
|
|
756
966
|
"date-constraints",
|
|
757
|
-
"week-starts-on"
|
|
967
|
+
"week-starts-on",
|
|
968
|
+
"today"
|
|
758
969
|
])], 32)),
|
|
759
970
|
createElementVNode("button", {
|
|
760
971
|
type: "button",
|
|
@@ -762,15 +973,214 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
762
973
|
disabled: !wheelsOpen.value && __props.saveDisabled,
|
|
763
974
|
onClick: _cache[4] || (_cache[4] = ($event) => wheelsOpen.value ? wheelsOpen.value = false : emit("save"))
|
|
764
975
|
}, toDisplayString(wheelsOpen.value ? unref(messages).dateInput.doneChoosingMonth : resolvedSaveLabel.value), 9, _hoisted_8$1)
|
|
765
|
-
]);
|
|
976
|
+
])) : createCommentVNode("v-if", true);
|
|
766
977
|
};
|
|
767
978
|
}
|
|
768
979
|
});
|
|
769
980
|
//#endregion
|
|
981
|
+
//#region src/DateInput/useCalendarDismiss.ts
|
|
982
|
+
function isLabelFor(target, input) {
|
|
983
|
+
return input != null && target instanceof Element && target.localName === "label" && target.control === input;
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* 鼠标下的日历弹层什么时候关。
|
|
987
|
+
*
|
|
988
|
+
* 文本输入框不是弹层的触发按钮,交给弹层的「点外面就关」会把按在输入框上的那一下当成外面,
|
|
989
|
+
* 日历关了又被同一下打开。所以这里自己判断:按在字段里(输入框、清除按钮、日历按钮)、
|
|
990
|
+
* 指向输入框的 label 上、或者日历里,日历都保持打开;按在别处才关。
|
|
991
|
+
* 焦点从字段里移到字段和日历之外的地方时也关,下一个字段的日历就不会和它并排开着。
|
|
992
|
+
* 焦点哪儿也没去(切走窗口)时不关。
|
|
993
|
+
* 日历在模态框里被这样关掉时,会登记到手势上,让同一下遮罩按压只关日历、不关模态框。
|
|
994
|
+
*/
|
|
995
|
+
function useCalendarDismiss(options) {
|
|
996
|
+
function popupSurface() {
|
|
997
|
+
const popup = options.popup();
|
|
998
|
+
return popup?.closest(".astryx-popover") ?? popup;
|
|
999
|
+
}
|
|
1000
|
+
function isInside(target) {
|
|
1001
|
+
if (!(target instanceof Node)) return false;
|
|
1002
|
+
return Boolean(options.field()?.contains(target) || popupSurface()?.contains(target));
|
|
1003
|
+
}
|
|
1004
|
+
function onPointerDown(event) {
|
|
1005
|
+
const path = event.composedPath();
|
|
1006
|
+
const input = options.input();
|
|
1007
|
+
if (path.some((target) => isInside(target) || isLabelFor(target, input))) return;
|
|
1008
|
+
noteOutsideDismissal();
|
|
1009
|
+
options.close();
|
|
1010
|
+
}
|
|
1011
|
+
let listening = false;
|
|
1012
|
+
function stop() {
|
|
1013
|
+
if (!listening) return;
|
|
1014
|
+
document.removeEventListener("pointerdown", onPointerDown, true);
|
|
1015
|
+
listening = false;
|
|
1016
|
+
}
|
|
1017
|
+
watch(options.isOpen, (open) => {
|
|
1018
|
+
if (typeof document === "undefined") return;
|
|
1019
|
+
if (open && !listening) {
|
|
1020
|
+
currentGesture();
|
|
1021
|
+
document.addEventListener("pointerdown", onPointerDown, true);
|
|
1022
|
+
listening = true;
|
|
1023
|
+
} else if (!open) stop();
|
|
1024
|
+
}, { immediate: true });
|
|
1025
|
+
onScopeDispose(stop);
|
|
1026
|
+
function onFieldFocusOut(event) {
|
|
1027
|
+
const next = event.relatedTarget;
|
|
1028
|
+
if (!options.isOpen.value || next == null || isInside(next)) return;
|
|
1029
|
+
noteOutsideDismissal();
|
|
1030
|
+
options.close();
|
|
1031
|
+
}
|
|
1032
|
+
return { onFieldFocusOut };
|
|
1033
|
+
}
|
|
1034
|
+
//#endregion
|
|
1035
|
+
//#region src/DateInput/useTypedDateEntry.ts
|
|
1036
|
+
/**
|
|
1037
|
+
* 日期文本框的打字状态:显示的文字、拒绝和提交。
|
|
1038
|
+
*
|
|
1039
|
+
* 打字时只在日子打完整、再打也变不了时才提交;读不成日期的文字等 Enter 或失焦,
|
|
1040
|
+
* 那时文字留在框里,字段显示为什么不收,`aria-invalid`,并且只念一次。
|
|
1041
|
+
* 之后的编辑让文字仍然不对或没打完时,拒绝继续亮着;改成能收的日子或清空时立刻消失。
|
|
1042
|
+
*/
|
|
1043
|
+
function useTypedDateEntry(options) {
|
|
1044
|
+
/** 打进来的文字;`null` 表示框里显示已提交的值。 */
|
|
1045
|
+
const pending = ref(null);
|
|
1046
|
+
/** Enter 或失焦留下了被拒的文字。 */
|
|
1047
|
+
const isRejectionCommitted = ref(false);
|
|
1048
|
+
/** 一次编辑让文字仍然被拒或没打完时,继续亮着的那段被拒文字。 */
|
|
1049
|
+
const keptText = ref(null);
|
|
1050
|
+
const isFocused = ref(false);
|
|
1051
|
+
/** 这一轮打字已经报过的日子,同一个日子只报一次。 */
|
|
1052
|
+
let reported = null;
|
|
1053
|
+
/** Enter 或失焦刚刚留下被拒的文字。这一刻传进来的新值不顶掉文字,调用方可以在这里恢复自己的值。 */
|
|
1054
|
+
let isRevealing = false;
|
|
1055
|
+
function parse(text) {
|
|
1056
|
+
return parseDateEntry(text, options.locale(), options.isBlocked);
|
|
1057
|
+
}
|
|
1058
|
+
const committedText = computed(() => formatCommittedDate(options.value(), options.format(), options.locale()));
|
|
1059
|
+
const displayValue = computed(() => pending.value ?? committedText.value);
|
|
1060
|
+
const typed = computed(() => pending.value !== null && pending.value.trim() ? parse(pending.value) : null);
|
|
1061
|
+
const ownError = computed(() => dateEntryErrorKind(typed.value, isRejectionCommitted.value, options.behavior()));
|
|
1062
|
+
const shown = computed(() => {
|
|
1063
|
+
if (options.isLocked()) return null;
|
|
1064
|
+
if (ownError.value != null && typed.value != null && pending.value !== null) return {
|
|
1065
|
+
text: pending.value,
|
|
1066
|
+
result: typed.value
|
|
1067
|
+
};
|
|
1068
|
+
if (keptText.value === null || typed.value == null || isAcceptedEntry(typed.value)) return null;
|
|
1069
|
+
const kept = parse(keptText.value);
|
|
1070
|
+
return dateEntryErrorKind(kept, true, options.behavior()) != null ? {
|
|
1071
|
+
text: keptText.value,
|
|
1072
|
+
result: kept
|
|
1073
|
+
} : null;
|
|
1074
|
+
});
|
|
1075
|
+
const message = computed(() => shown.value ? dateEntryMessage(shown.value.result, options.bounds(), options.format(), options.locale(), options.messages()) : null);
|
|
1076
|
+
const entryError = computed(() => shown.value ? toEntryError(shown.value.result, shown.value.text, options.bounds()) : null);
|
|
1077
|
+
const callerError = computed(() => {
|
|
1078
|
+
const status = options.status();
|
|
1079
|
+
return options.hasEntryErrorListener() && status?.type === "error" && status.message ? status.message : null;
|
|
1080
|
+
});
|
|
1081
|
+
const fieldStatus = computed(() => message.value != null && callerError.value == null ? {
|
|
1082
|
+
type: "error",
|
|
1083
|
+
message: message.value
|
|
1084
|
+
} : options.status());
|
|
1085
|
+
const repeat = shallowRef(null);
|
|
1086
|
+
watch(() => message.value != null, (rejected) => {
|
|
1087
|
+
repeat.value = rejected ? callerError.value : null;
|
|
1088
|
+
});
|
|
1089
|
+
watch(callerError, (next) => {
|
|
1090
|
+
if (repeat.value !== null && repeat.value !== next) repeat.value = null;
|
|
1091
|
+
});
|
|
1092
|
+
const alertMessage = computed(() => message.value != null && repeat.value != null && repeat.value === callerError.value ? repeat.value : "");
|
|
1093
|
+
let lastReport = null;
|
|
1094
|
+
watch(entryError, (next) => {
|
|
1095
|
+
if (sameEntryError(next, lastReport)) return;
|
|
1096
|
+
lastReport = next;
|
|
1097
|
+
options.reportEntryError(next);
|
|
1098
|
+
});
|
|
1099
|
+
onScopeDispose(() => {
|
|
1100
|
+
if (lastReport != null) options.reportEntryError(null);
|
|
1101
|
+
});
|
|
1102
|
+
function reset() {
|
|
1103
|
+
pending.value = null;
|
|
1104
|
+
isRejectionCommitted.value = false;
|
|
1105
|
+
keptText.value = null;
|
|
1106
|
+
}
|
|
1107
|
+
function report(date) {
|
|
1108
|
+
const iso = toIsoDate(date);
|
|
1109
|
+
const value = options.value();
|
|
1110
|
+
if (value && toIsoDate(value) === iso || iso === reported) return;
|
|
1111
|
+
reported = iso;
|
|
1112
|
+
options.commitValue(date);
|
|
1113
|
+
}
|
|
1114
|
+
function onInput(text) {
|
|
1115
|
+
if (options.isLocked()) return;
|
|
1116
|
+
const result = parse(text);
|
|
1117
|
+
const isEmpty = !text.trim();
|
|
1118
|
+
const isRejected = !isEmpty && dateEntryErrorKind(result, false, options.behavior()) != null;
|
|
1119
|
+
const shownText = shown.value?.text ?? null;
|
|
1120
|
+
keptText.value = isRejected || isEmpty || isAcceptedEntry(result) ? null : shownText;
|
|
1121
|
+
pending.value = text;
|
|
1122
|
+
isRejectionCommitted.value = false;
|
|
1123
|
+
if (result.kind === "value" && result.isComplete) report(result.date);
|
|
1124
|
+
}
|
|
1125
|
+
function commit() {
|
|
1126
|
+
if (pending.value === null || options.isLocked()) return;
|
|
1127
|
+
if (!pending.value.trim()) {
|
|
1128
|
+
if (options.value()) options.commitValue(null);
|
|
1129
|
+
reset();
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1132
|
+
const result = parse(pending.value);
|
|
1133
|
+
if (result.kind !== "value") {
|
|
1134
|
+
isRejectionCommitted.value = true;
|
|
1135
|
+
keptText.value = null;
|
|
1136
|
+
isRevealing = true;
|
|
1137
|
+
nextTick(() => {
|
|
1138
|
+
isRevealing = false;
|
|
1139
|
+
});
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
report(result.date);
|
|
1143
|
+
reported = null;
|
|
1144
|
+
reset();
|
|
1145
|
+
}
|
|
1146
|
+
watch(() => {
|
|
1147
|
+
const value = options.value();
|
|
1148
|
+
return value ? toIsoDate(value) : null;
|
|
1149
|
+
}, (iso) => {
|
|
1150
|
+
if (iso !== null && iso === reported) return;
|
|
1151
|
+
reported = null;
|
|
1152
|
+
if (pending.value !== null && !isRevealing) reset();
|
|
1153
|
+
});
|
|
1154
|
+
watch(options.isLocked, (locked) => {
|
|
1155
|
+
const result = typed.value;
|
|
1156
|
+
if (locked || isFocused.value || result?.kind !== "value" || toIsoDate(result.date) !== reported) return;
|
|
1157
|
+
reported = null;
|
|
1158
|
+
reset();
|
|
1159
|
+
});
|
|
1160
|
+
return {
|
|
1161
|
+
displayValue,
|
|
1162
|
+
isPending: computed(() => pending.value !== null && !(isRejectionCommitted.value && typed.value?.kind === "unreadable")),
|
|
1163
|
+
isInvalid: computed(() => shown.value != null),
|
|
1164
|
+
fieldStatus,
|
|
1165
|
+
alertMessage,
|
|
1166
|
+
onInput,
|
|
1167
|
+
commit,
|
|
1168
|
+
onFocus: () => {
|
|
1169
|
+
isFocused.value = true;
|
|
1170
|
+
},
|
|
1171
|
+
onBlur: () => {
|
|
1172
|
+
isFocused.value = false;
|
|
1173
|
+
commit();
|
|
1174
|
+
},
|
|
1175
|
+
reset
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
//#endregion
|
|
770
1179
|
//#region src/DateInput/DateInput.vue
|
|
771
1180
|
const _hoisted_1 = ["data-status", "data-presentation"];
|
|
772
1181
|
const _hoisted_2 = [
|
|
773
1182
|
"data-disabled",
|
|
1183
|
+
"data-busy",
|
|
774
1184
|
"data-size",
|
|
775
1185
|
"data-status"
|
|
776
1186
|
];
|
|
@@ -806,7 +1216,11 @@ const _hoisted_7 = {
|
|
|
806
1216
|
};
|
|
807
1217
|
const _hoisted_8 = ["id"];
|
|
808
1218
|
const _hoisted_9 = ["id"];
|
|
809
|
-
const _hoisted_10 =
|
|
1219
|
+
const _hoisted_10 = {
|
|
1220
|
+
class: "astryx-date-input-alert",
|
|
1221
|
+
role: "alert"
|
|
1222
|
+
};
|
|
1223
|
+
const _hoisted_11 = ["name", "value"];
|
|
810
1224
|
const TOUCH_POINTER_QUERY = "(pointer: coarse)";
|
|
811
1225
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
812
1226
|
name: "AstryxDateInput",
|
|
@@ -858,6 +1272,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
858
1272
|
numberOfMonths: { default: 1 },
|
|
859
1273
|
weekStartsOn: {},
|
|
860
1274
|
width: {},
|
|
1275
|
+
entryErrorBehavior: {},
|
|
861
1276
|
containerClass: { type: [
|
|
862
1277
|
Boolean,
|
|
863
1278
|
null,
|
|
@@ -887,7 +1302,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
887
1302
|
Array
|
|
888
1303
|
] }
|
|
889
1304
|
},
|
|
890
|
-
emits: [
|
|
1305
|
+
emits: [
|
|
1306
|
+
"update:modelValue",
|
|
1307
|
+
"change",
|
|
1308
|
+
"entryErrorChange"
|
|
1309
|
+
],
|
|
891
1310
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
892
1311
|
const props = __props;
|
|
893
1312
|
const emit = __emit;
|
|
@@ -938,7 +1357,6 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
938
1357
|
const inputRef = useTemplateRef("inputRef");
|
|
939
1358
|
const containerRef = useTemplateRef("containerRef");
|
|
940
1359
|
const isOpen = ref(false);
|
|
941
|
-
const inputValue = ref("");
|
|
942
1360
|
const disabledMessageId = `${generatedId}-disabled`;
|
|
943
1361
|
const pending = usePendingChange(() => props.changeAction);
|
|
944
1362
|
const busy = computed(() => props.isLoading || pending.busy.value);
|
|
@@ -952,6 +1370,20 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
952
1370
|
const surface = computed(() => resolveDateSurface(policy.value, isCoarsePointer.value));
|
|
953
1371
|
const useSheet = computed(() => surface.value === "sheet");
|
|
954
1372
|
const popupWidth = computed(() => props.numberOfMonths === 2 ? "min(36rem, calc(100vw - 16px))" : 280);
|
|
1373
|
+
const popoverOpen = computed(() => !useSheet.value && isOpen.value);
|
|
1374
|
+
function popupElement() {
|
|
1375
|
+
return typeof document === "undefined" ? null : document.getElementById(popupId.value);
|
|
1376
|
+
}
|
|
1377
|
+
useBusyAnnouncement(() => busy.value && surface.value !== "native", () => messages.value.dateInput.loading, () => (useSheet.value && isOpen.value ? popupElement() : null) ?? containerRef.value);
|
|
1378
|
+
const dismiss = useCalendarDismiss({
|
|
1379
|
+
isOpen: popoverOpen,
|
|
1380
|
+
field: () => containerRef.value,
|
|
1381
|
+
input: () => inputRef.value,
|
|
1382
|
+
popup: popupElement,
|
|
1383
|
+
close: () => {
|
|
1384
|
+
isOpen.value = false;
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
955
1387
|
function allowed(date) {
|
|
956
1388
|
return !isCalendarDateDisabled(toCalendarDate(date), {
|
|
957
1389
|
min: props.min,
|
|
@@ -960,6 +1392,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
960
1392
|
dateConstraints: props.dateConstraints
|
|
961
1393
|
});
|
|
962
1394
|
}
|
|
1395
|
+
const instance = getCurrentInstance();
|
|
1396
|
+
/** 调用方有没有监听 `entryErrorChange`。声明过的事件不进 attrs,只能看 vnode 上的 props。 */
|
|
1397
|
+
function hasEntryErrorListener() {
|
|
1398
|
+
return Boolean(instance?.vnode.props?.onEntryErrorChange);
|
|
1399
|
+
}
|
|
1400
|
+
const entryErrorBehavior = useEntryErrorBehavior(() => props.entryErrorBehavior);
|
|
963
1401
|
function commit(value) {
|
|
964
1402
|
if (locked.value) return;
|
|
965
1403
|
emit("update:modelValue", value);
|
|
@@ -970,41 +1408,26 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
970
1408
|
get: () => props.modelValue,
|
|
971
1409
|
set: (value) => commit(value)
|
|
972
1410
|
});
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
}
|
|
994
|
-
function syncDisplayValue() {
|
|
995
|
-
inputValue.value = formatCommitted(props.modelValue);
|
|
996
|
-
}
|
|
997
|
-
watch(() => [
|
|
998
|
-
props.modelValue,
|
|
999
|
-
props.format,
|
|
1000
|
-
locale.value
|
|
1001
|
-
], syncDisplayValue, { immediate: true });
|
|
1002
|
-
function resolvedStatus(status) {
|
|
1003
|
-
if (status == null || status === "default") return void 0;
|
|
1004
|
-
if (typeof status === "string") return { type: status };
|
|
1005
|
-
return status;
|
|
1006
|
-
}
|
|
1007
|
-
const statusValue = computed(() => resolvedStatus(props.status));
|
|
1411
|
+
const parseDate = parseTypedDate;
|
|
1412
|
+
const entry = useTypedDateEntry({
|
|
1413
|
+
value: () => props.modelValue,
|
|
1414
|
+
format: () => props.format,
|
|
1415
|
+
locale: () => locale.value,
|
|
1416
|
+
bounds: () => ({
|
|
1417
|
+
min: props.min,
|
|
1418
|
+
max: props.max
|
|
1419
|
+
}),
|
|
1420
|
+
isBlocked: (date) => !allowed(date),
|
|
1421
|
+
isLocked: () => locked.value,
|
|
1422
|
+
behavior: () => entryErrorBehavior.value,
|
|
1423
|
+
status: () => resolveDateStatus(props.status),
|
|
1424
|
+
hasEntryErrorListener,
|
|
1425
|
+
messages: () => messages.value.dateInput,
|
|
1426
|
+
commitValue: (value) => commit(value),
|
|
1427
|
+
reportEntryError: (error) => emit("entryErrorChange", error)
|
|
1428
|
+
});
|
|
1429
|
+
const inputValue = entry.displayValue;
|
|
1430
|
+
const statusValue = entry.fieldStatus;
|
|
1008
1431
|
const statusType = computed(() => statusValue.value?.type);
|
|
1009
1432
|
const showsField = computed(() => Boolean(props.label || props.description || statusValue.value?.message));
|
|
1010
1433
|
const shell = computed(() => showsField.value ? _sfc_main$11 : PassThrough);
|
|
@@ -1037,15 +1460,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1037
1460
|
}
|
|
1038
1461
|
function onInput(event) {
|
|
1039
1462
|
if (useSheet.value || locked.value || event instanceof InputEvent && event.isComposing) return;
|
|
1040
|
-
|
|
1041
|
-
const value = target.value.trim();
|
|
1042
|
-
inputValue.value = target.value;
|
|
1043
|
-
const parsed = parseDate(value);
|
|
1044
|
-
if (parsed && allowed(parsed)) modelValueRef.value = parsed;
|
|
1463
|
+
entry.onInput(event.target.value);
|
|
1045
1464
|
}
|
|
1046
1465
|
function onBlur() {
|
|
1047
1466
|
disabledTooltip.onBlur();
|
|
1048
|
-
|
|
1467
|
+
entry.onBlur();
|
|
1468
|
+
}
|
|
1469
|
+
function onFocus(event) {
|
|
1470
|
+
entry.onFocus();
|
|
1471
|
+
disabledTooltip.onFocus(event);
|
|
1049
1472
|
}
|
|
1050
1473
|
function onOpenChange(open) {
|
|
1051
1474
|
if (!useSheet.value) isOpen.value = open;
|
|
@@ -1062,13 +1485,22 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1062
1485
|
if (useSheet.value) openCalendar();
|
|
1063
1486
|
}
|
|
1064
1487
|
function onInputKeyDown(event) {
|
|
1065
|
-
if (isImeKeyEvent(event)
|
|
1488
|
+
if (isImeKeyEvent(event)) return;
|
|
1489
|
+
if (event.key === "Enter") {
|
|
1490
|
+
if (locked.value || entry.isPending.value) {
|
|
1491
|
+
event.preventDefault();
|
|
1492
|
+
entry.commit();
|
|
1493
|
+
}
|
|
1494
|
+
return;
|
|
1495
|
+
}
|
|
1496
|
+
if (locked.value || isOpen.value) return;
|
|
1066
1497
|
if (event.key === "ArrowDown" || event.altKey && event.key === "ArrowDown") {
|
|
1067
1498
|
event.preventDefault();
|
|
1068
1499
|
openCalendar();
|
|
1069
1500
|
}
|
|
1070
1501
|
}
|
|
1071
1502
|
function onCalendarChange(date) {
|
|
1503
|
+
entry.reset();
|
|
1072
1504
|
modelValueRef.value = date;
|
|
1073
1505
|
if (!useSheet.value) {
|
|
1074
1506
|
isOpen.value = false;
|
|
@@ -1079,13 +1511,13 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1079
1511
|
isOpen.value = false;
|
|
1080
1512
|
}
|
|
1081
1513
|
function onSheetReset() {
|
|
1514
|
+
entry.reset();
|
|
1082
1515
|
modelValueRef.value = null;
|
|
1083
1516
|
}
|
|
1084
1517
|
function onClear(event) {
|
|
1085
1518
|
event.stopPropagation();
|
|
1519
|
+
entry.reset();
|
|
1086
1520
|
modelValueRef.value = null;
|
|
1087
|
-
inputValue.value = "";
|
|
1088
|
-
isOpen.value = false;
|
|
1089
1521
|
inputRef.value?.focus({ preventScroll: true });
|
|
1090
1522
|
}
|
|
1091
1523
|
function onToggleKeyDown(event) {
|
|
@@ -1098,7 +1530,6 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1098
1530
|
onClear,
|
|
1099
1531
|
parseDate
|
|
1100
1532
|
});
|
|
1101
|
-
syncDisplayValue();
|
|
1102
1533
|
return (_ctx, _cache) => {
|
|
1103
1534
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1104
1535
|
surface.value === "native" ? (openBlock(), createBlock(_sfc_main$3, mergeProps({
|
|
@@ -1132,7 +1563,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1132
1563
|
"container-class": unref(parts).containerClass.value,
|
|
1133
1564
|
"container-style": unref(parts).containerStyle.value,
|
|
1134
1565
|
"control-class": unref(parts).controlClass(),
|
|
1135
|
-
"control-style": unref(parts).controlStyle()
|
|
1566
|
+
"control-style": unref(parts).controlStyle(),
|
|
1567
|
+
"has-entry-error-listener": hasEntryErrorListener()
|
|
1136
1568
|
}, inputAttrs(), { "onUpdate:modelValue": commit }), null, 16, [
|
|
1137
1569
|
"input-id",
|
|
1138
1570
|
"model-value",
|
|
@@ -1163,7 +1595,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1163
1595
|
"container-class",
|
|
1164
1596
|
"container-style",
|
|
1165
1597
|
"control-class",
|
|
1166
|
-
"control-style"
|
|
1598
|
+
"control-style",
|
|
1599
|
+
"has-entry-error-listener"
|
|
1167
1600
|
])) : (openBlock(), createBlock(resolveDynamicComponent(shell.value), mergeProps({ key: 1 }, fieldBindings.value, {
|
|
1168
1601
|
class: unref(parts).containerClass.value,
|
|
1169
1602
|
style: unref(parts).containerStyle.value
|
|
@@ -1179,6 +1612,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1179
1612
|
style: normalizeStyle(unref(parts).controlStyle()),
|
|
1180
1613
|
"data-status": statusType.value,
|
|
1181
1614
|
"data-presentation": useSheet.value ? "bottom-sheet" : "popover",
|
|
1615
|
+
onFocusout: _cache[1] || (_cache[1] = (...args) => unref(dismiss).onFieldFocusOut && unref(dismiss).onFieldFocusOut(...args)),
|
|
1182
1616
|
onPointerenter: _cache[2] || (_cache[2] = (...args) => unref(disabledTooltip).onPointerEnter && unref(disabledTooltip).onPointerEnter(...args)),
|
|
1183
1617
|
onPointerleave: _cache[3] || (_cache[3] = (...args) => unref(disabledTooltip).onPointerLeave && unref(disabledTooltip).onPointerLeave(...args))
|
|
1184
1618
|
}, [
|
|
@@ -1192,11 +1626,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1192
1626
|
"has-close-button": false,
|
|
1193
1627
|
"is-modal": false,
|
|
1194
1628
|
"has-auto-focus": true,
|
|
1629
|
+
"has-light-dismiss": false,
|
|
1195
1630
|
role: "dialog",
|
|
1196
1631
|
label: dialogLabel.value,
|
|
1197
1632
|
onOpenChange
|
|
1198
1633
|
}, {
|
|
1199
|
-
content: withCtx(() => [
|
|
1634
|
+
content: withCtx(() => [popoverOpen.value ? (openBlock(), createElementBlock("div", {
|
|
1200
1635
|
key: 0,
|
|
1201
1636
|
id: popupId.value
|
|
1202
1637
|
}, [createVNode(_sfc_main$9, {
|
|
@@ -1219,7 +1654,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1219
1654
|
])], 8, _hoisted_8)) : createCommentVNode("v-if", true)]),
|
|
1220
1655
|
default: withCtx(() => [createElementVNode("div", {
|
|
1221
1656
|
class: "astryx-date-input-wrapper",
|
|
1222
|
-
"data-disabled":
|
|
1657
|
+
"data-disabled": unref(isDisabled) ? "true" : void 0,
|
|
1658
|
+
"data-busy": busy.value || void 0,
|
|
1223
1659
|
"data-size": unref(size),
|
|
1224
1660
|
"data-status": statusType.value
|
|
1225
1661
|
}, [
|
|
@@ -1243,7 +1679,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1243
1679
|
type: "text",
|
|
1244
1680
|
class: "astryx-date-input-field",
|
|
1245
1681
|
role: "combobox",
|
|
1246
|
-
value: inputValue
|
|
1682
|
+
value: unref(inputValue),
|
|
1247
1683
|
placeholder: resolvedPlaceholder.value,
|
|
1248
1684
|
readonly: useSheet.value || locked.value,
|
|
1249
1685
|
"aria-disabled": locked.value || void 0,
|
|
@@ -1251,7 +1687,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1251
1687
|
"aria-label": showsField.value ? void 0 : props.label,
|
|
1252
1688
|
"aria-labelledby": showsField.value ? field?.labelId : void 0,
|
|
1253
1689
|
"aria-describedby": describedBy(field?.describedBy),
|
|
1254
|
-
"aria-invalid": statusType.value === "error" ? "true" : void 0,
|
|
1690
|
+
"aria-invalid": statusType.value === "error" || unref(entry).isInvalid.value ? "true" : void 0,
|
|
1255
1691
|
"aria-required": unref(ariaRequired),
|
|
1256
1692
|
"aria-busy": busy.value || void 0,
|
|
1257
1693
|
"aria-controls": popupId.value,
|
|
@@ -1260,7 +1696,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1260
1696
|
autocomplete: "off",
|
|
1261
1697
|
onInput,
|
|
1262
1698
|
onBlur,
|
|
1263
|
-
onFocus
|
|
1699
|
+
onFocus,
|
|
1264
1700
|
onClick: openCalendar,
|
|
1265
1701
|
onKeydown: onInputKeyDown
|
|
1266
1702
|
}), null, 16, _hoisted_5),
|
|
@@ -1279,8 +1715,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1279
1715
|
key: 3,
|
|
1280
1716
|
class: "astryx-date-input-spinner",
|
|
1281
1717
|
size: "sm",
|
|
1282
|
-
"aria-
|
|
1283
|
-
}
|
|
1718
|
+
"aria-hidden": "true"
|
|
1719
|
+
})) : statusType.value && props.statusVariant !== "tooltip" ? (openBlock(), createBlock(_sfc_main$8, {
|
|
1284
1720
|
key: 4,
|
|
1285
1721
|
type: statusType.value
|
|
1286
1722
|
}, null, 8, ["type"])) : createCommentVNode("v-if", true)
|
|
@@ -1295,7 +1731,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1295
1731
|
useSheet.value ? (openBlock(), createBlock(_sfc_main$4, {
|
|
1296
1732
|
key: 0,
|
|
1297
1733
|
"is-open": isOpen.value,
|
|
1298
|
-
"onUpdate:isOpen": _cache[
|
|
1734
|
+
"onUpdate:isOpen": _cache[0] || (_cache[0] = ($event) => isOpen.value = $event),
|
|
1299
1735
|
label: dialogLabel.value,
|
|
1300
1736
|
height: "hug",
|
|
1301
1737
|
padding: 0
|
|
@@ -1307,6 +1743,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1307
1743
|
"is-date-disabled": props.isDateDisabled,
|
|
1308
1744
|
"date-constraints": props.dateConstraints,
|
|
1309
1745
|
"week-starts-on": props.weekStartsOn,
|
|
1746
|
+
"is-disabled": unref(isDisabled),
|
|
1310
1747
|
onPick: onCalendarChange,
|
|
1311
1748
|
onSave: onSheetSave,
|
|
1312
1749
|
onReset: onSheetReset
|
|
@@ -1316,16 +1753,18 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1316
1753
|
"max",
|
|
1317
1754
|
"is-date-disabled",
|
|
1318
1755
|
"date-constraints",
|
|
1319
|
-
"week-starts-on"
|
|
1756
|
+
"week-starts-on",
|
|
1757
|
+
"is-disabled"
|
|
1320
1758
|
])], 8, _hoisted_9)]),
|
|
1321
1759
|
_: 1
|
|
1322
1760
|
}, 8, ["is-open", "label"])) : createCommentVNode("v-if", true),
|
|
1761
|
+
createElementVNode("div", _hoisted_10, toDisplayString(unref(entry).alertMessage.value), 1),
|
|
1323
1762
|
props.name ? (openBlock(), createElementBlock("input", {
|
|
1324
1763
|
key: 1,
|
|
1325
1764
|
type: "hidden",
|
|
1326
1765
|
name: props.name,
|
|
1327
|
-
value: props.modelValue ?
|
|
1328
|
-
}, null, 8,
|
|
1766
|
+
value: props.modelValue ? unref(toIsoDate)(props.modelValue) : ""
|
|
1767
|
+
}, null, 8, _hoisted_11)) : createCommentVNode("v-if", true)
|
|
1329
1768
|
], 46, _hoisted_1)]),
|
|
1330
1769
|
_: 3
|
|
1331
1770
|
}, 16, ["class", "style"])),
|