sanity 6.14.0 → 6.14.1
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/lib/{AddonDatasetProvider-0aiLWkZg.js → AddonDatasetProvider-C9tdum2G.js} +2 -2
- package/lib/{AddonDatasetProvider-0aiLWkZg.js.map → AddonDatasetProvider-C9tdum2G.js.map} +1 -1
- package/lib/{CalendarFilter-DVz369RP.js → CalendarFilter-C80uOkw-.js} +3 -3
- package/lib/{CalendarFilter-DVz369RP.js.map → CalendarFilter-C80uOkw-.js.map} +1 -1
- package/lib/{CommandList-CTDV_QZY.js → CommandList-duj-LVnd.js} +2 -2
- package/lib/{CommandList-CTDV_QZY.js.map → CommandList-duj-LVnd.js.map} +1 -1
- package/lib/{CommentInput-B5T1Iwnt.js → CommentInput-BXYQnGhq.js} +5 -5
- package/lib/{CommentInput-B5T1Iwnt.js.map → CommentInput-BXYQnGhq.js.map} +1 -1
- package/lib/{CommentsDocumentLayout-ByFwej_y.js → CommentsDocumentLayout-DAwAhx7q.js} +2 -2
- package/lib/{CommentsDocumentLayout-ByFwej_y.js.map → CommentsDocumentLayout-DAwAhx7q.js.map} +1 -1
- package/lib/{CommentsDocumentLayout-Czb6fC0_.js → CommentsDocumentLayout-pfM29WSy.js} +2 -2
- package/lib/{CommentsDocumentLayout-Czb6fC0_.js.map → CommentsDocumentLayout-pfM29WSy.js.map} +1 -1
- package/lib/{CommentsEnabledProvider-D2gutvsb.js → CommentsEnabledProvider-DN_oXwXM.js} +3 -3
- package/lib/{CommentsEnabledProvider-D2gutvsb.js.map → CommentsEnabledProvider-DN_oXwXM.js.map} +1 -1
- package/lib/{CommentsField-D2Fum0Jx.js → CommentsField-B7wTBRMB.js} +5 -5
- package/lib/{CommentsField-D2Fum0Jx.js.map → CommentsField-B7wTBRMB.js.map} +1 -1
- package/lib/{CommentsField-YM3cp3fA.js → CommentsField-BxoVuJOl.js} +4 -4
- package/lib/{CommentsField-YM3cp3fA.js.map → CommentsField-BxoVuJOl.js.map} +1 -1
- package/lib/{CommentsInput-Bx2t5AW_.js → CommentsInput-C3rEb5L8.js} +6 -6
- package/lib/{CommentsInput-Bx2t5AW_.js.map → CommentsInput-C3rEb5L8.js.map} +1 -1
- package/lib/{CommentsInput-BBBng3CJ.js → CommentsInput-CU-PFXmu.js} +7 -7
- package/lib/{CommentsInput-BBBng3CJ.js.map → CommentsInput-CU-PFXmu.js.map} +1 -1
- package/lib/{CommentsInspector-BnSG5Mq0.js → CommentsInspector-BJ1qwj6P.js} +6 -6
- package/lib/{CommentsInspector-BnSG5Mq0.js.map → CommentsInspector-BJ1qwj6P.js.map} +1 -1
- package/lib/{CommentsInspector-B5V_Bpz5.js → CommentsInspector-BQiMPjvm.js} +6 -6
- package/lib/{CommentsInspector-B5V_Bpz5.js.map → CommentsInspector-BQiMPjvm.js.map} +1 -1
- package/lib/{CommentsListItem-DnqAlN4p.js → CommentsListItem-QyYan1DB.js} +5 -5
- package/lib/{CommentsListItem-DnqAlN4p.js.map → CommentsListItem-QyYan1DB.js.map} +1 -1
- package/lib/{CommentsListItem-DVE4IMls.js → CommentsListItem-dvKmANi3.js} +4 -4
- package/lib/{CommentsListItem-DVE4IMls.js.map → CommentsListItem-dvKmANi3.js.map} +1 -1
- package/lib/{CommentsSelectedPathProvider-DRJ3Xqs4.js → CommentsSelectedPathProvider-COcPb3W3.js} +3 -3
- package/lib/{CommentsSelectedPathProvider-DRJ3Xqs4.js.map → CommentsSelectedPathProvider-COcPb3W3.js.map} +1 -1
- package/lib/{CommentsStudioLayout-Di510XhD.js → CommentsStudioLayout-BkX6o14w.js} +3 -3
- package/lib/{CommentsStudioLayout-Di510XhD.js.map → CommentsStudioLayout-BkX6o14w.js.map} +1 -1
- package/lib/{CommentsStudioLayout-Z09s50bM.js → CommentsStudioLayout-dIXEz52s.js} +3 -3
- package/lib/{CommentsStudioLayout-Z09s50bM.js.map → CommentsStudioLayout-dIXEz52s.js.map} +1 -1
- package/lib/{GlobalPerspectiveMenu-Cwur4_iD.js → GlobalPerspectiveMenu-0Hs276Z-.js} +15 -15
- package/lib/{GlobalPerspectiveMenu-Cwur4_iD.js.map → GlobalPerspectiveMenu-0Hs276Z-.js.map} +1 -1
- package/lib/{LoadingBlock-Ch_dBXfn.js → LoadingBlock-CElIdb7F.js} +3 -3
- package/lib/{LoadingBlock-Ch_dBXfn.js.map → LoadingBlock-CElIdb7F.js.map} +1 -1
- package/lib/{PerspectiveProvider-Yk7lgugx.js → PerspectiveProvider-D-6sweQH.js} +130 -97
- package/lib/PerspectiveProvider-D-6sweQH.js.map +1 -0
- package/lib/{ReleaseAvatar-C68bGuVQ.js → ReleaseAvatar-Bqp_Ci7r.js} +4 -4
- package/lib/{ReleaseAvatar-C68bGuVQ.js.map → ReleaseAvatar-Bqp_Ci7r.js.map} +1 -1
- package/lib/{ReleasesMetadataProvider-DabLuMD8.js → ReleasesMetadataProvider-BD6XRcpT.js} +2 -2
- package/lib/{ReleasesMetadataProvider-DabLuMD8.js.map → ReleasesMetadataProvider-BD6XRcpT.js.map} +1 -1
- package/lib/{ReleasesStudioLayout-DsygG30q.js → ReleasesStudioLayout-C6mmxoaY.js} +7 -7
- package/lib/{ReleasesStudioLayout-DsygG30q.js.map → ReleasesStudioLayout-C6mmxoaY.js.map} +1 -1
- package/lib/{ReleasesTool-CNXNODI_.js → ReleasesTool-DIDmkzic.js} +23 -23
- package/lib/{ReleasesTool-CNXNODI_.js.map → ReleasesTool-DIDmkzic.js.map} +1 -1
- package/lib/{SchedulePublishingStudioLayout-EsgEGZ7F.js → SchedulePublishingStudioLayout-DrZO-qbI.js} +3 -3
- package/lib/{SchedulePublishingStudioLayout-EsgEGZ7F.js.map → SchedulePublishingStudioLayout-DrZO-qbI.js.map} +1 -1
- package/lib/{SchedulePublishingUpsellProvider-CWxgqzFp.js → SchedulePublishingUpsellProvider-DeZ_jZIX.js} +2 -2
- package/lib/{SchedulePublishingUpsellProvider-CWxgqzFp.js.map → SchedulePublishingUpsellProvider-DeZ_jZIX.js.map} +1 -1
- package/lib/{ScheduledPublishingEnabledProvider-CQ-T1Y96.js → ScheduledPublishingEnabledProvider-B8C0_tc5.js} +3 -3
- package/lib/{ScheduledPublishingEnabledProvider-CQ-T1Y96.js.map → ScheduledPublishingEnabledProvider-B8C0_tc5.js.map} +1 -1
- package/lib/{SearchProvider-CEXmRg1N.js → SearchProvider-T8fsDJV5.js} +8 -8
- package/lib/{SearchProvider-CEXmRg1N.js.map → SearchProvider-T8fsDJV5.js.map} +1 -1
- package/lib/{SingleDocReleaseLayout-ByDXFS8N.js → SingleDocReleaseLayout-BpMXU9KY.js} +2 -2
- package/lib/{SingleDocReleaseLayout-ByDXFS8N.js.map → SingleDocReleaseLayout-BpMXU9KY.js.map} +1 -1
- package/lib/{SingleDocReleaseUpsellProvider-ByuDpBIG.js → SingleDocReleaseUpsellProvider-7_OXHySY.js} +3 -3
- package/lib/{SingleDocReleaseUpsellProvider-ByuDpBIG.js.map → SingleDocReleaseUpsellProvider-7_OXHySY.js.map} +1 -1
- package/lib/{TasksFooterOpenTasks-BSO8TgVF.js → TasksFooterOpenTasks-IFtOEGnB.js} +2 -2
- package/lib/{TasksFooterOpenTasks-BSO8TgVF.js.map → TasksFooterOpenTasks-IFtOEGnB.js.map} +1 -1
- package/lib/{TasksStudioActiveToolLayout-BXktrH08.js → TasksStudioActiveToolLayout-C99LQz4S.js} +20 -20
- package/lib/{TasksStudioActiveToolLayout-BXktrH08.js.map → TasksStudioActiveToolLayout-C99LQz4S.js.map} +1 -1
- package/lib/{TasksStudioLayout-BfN-M93c.js → TasksStudioLayout-CmFbUpnB.js} +4 -4
- package/lib/{TasksStudioLayout-BfN-M93c.js.map → TasksStudioLayout-CmFbUpnB.js.map} +1 -1
- package/lib/{TasksStudioNavbar-CfqloSfP.js → TasksStudioNavbar-DB7DJC4e.js} +2 -2
- package/lib/{TasksStudioNavbar-CfqloSfP.js.map → TasksStudioNavbar-DB7DJC4e.js.map} +1 -1
- package/lib/{TimeZoneButton-FCwCyJ1J.js → TimeZoneButton-B_ki5v8q.js} +7 -7
- package/lib/{TimeZoneButton-FCwCyJ1J.js.map → TimeZoneButton-B_ki5v8q.js.map} +1 -1
- package/lib/{Tool-PzN5dskE.js → Tool-DlkZrcrD.js} +15 -15
- package/lib/{Tool-PzN5dskE.js.map → Tool-DlkZrcrD.js.map} +1 -1
- package/lib/{UpsellPanel-T-5ZD_7k.js → UpsellPanel-ITWwjktp.js} +2 -2
- package/lib/{UpsellPanel-T-5ZD_7k.js.map → UpsellPanel-ITWwjktp.js.map} +1 -1
- package/lib/{VariantsStudioNavbar-D0XbvL1D.js → VariantsStudioNavbar-DwEV1roH.js} +9 -9
- package/lib/{VariantsStudioNavbar-D0XbvL1D.js.map → VariantsStudioNavbar-DwEV1roH.js.map} +1 -1
- package/lib/{VariantsTool-B3EEDrQT.js → VariantsTool-Dzhy3PST.js} +12 -12
- package/lib/{VariantsTool-B3EEDrQT.js.map → VariantsTool-Dzhy3PST.js.map} +1 -1
- package/lib/{WorkspaceLoader-BH_VDaY4.js → WorkspaceLoader-Ck4TMoR5.js} +31 -31
- package/lib/{WorkspaceLoader-BH_VDaY4.js.map → WorkspaceLoader-Ck4TMoR5.js.map} +1 -1
- package/lib/_createContext.js +1 -1
- package/lib/_unstable-embedded.js +5 -5
- package/lib/{buildRangeDecorationSelectionsFromComments-B1-tJPvG.js → buildRangeDecorationSelectionsFromComments-BnlhrvDK.js} +3 -3
- package/lib/{buildRangeDecorationSelectionsFromComments-B1-tJPvG.js.map → buildRangeDecorationSelectionsFromComments-BnlhrvDK.js.map} +1 -1
- package/lib/{buildTextSelectionFromFragment-BiLg851R.js → buildTextSelectionFromFragment-BXrYd9lr.js} +3 -3
- package/lib/{buildTextSelectionFromFragment-BiLg851R.js.map → buildTextSelectionFromFragment-BXrYd9lr.js.map} +1 -1
- package/lib/{constants-DdgHySkY.js → constants-BQItnHll.js} +2 -2
- package/lib/{constants-DdgHySkY.js.map → constants-BQItnHll.js.map} +1 -1
- package/lib/{datastores-D1tF4HQA.js → datastores-DNOJm1LF.js} +2 -2
- package/lib/{datastores-D1tF4HQA.js.map → datastores-DNOJm1LF.js.map} +1 -1
- package/lib/{i18n-Cl_y4bbR.js → i18n-JUYUb7y_.js} +2 -2
- package/lib/{i18n-Cl_y4bbR.js.map → i18n-JUYUb7y_.js.map} +1 -1
- package/lib/index.js +38 -38
- package/lib/{inputResolver-CUWPjdGU.js → inputResolver-Ce1lTBE-.js} +4 -4
- package/lib/{inputResolver-CUWPjdGU.js.map → inputResolver-Ce1lTBE-.js.map} +1 -1
- package/lib/{navigation.telemetry-rXclq03x.js → navigation.telemetry-BPxX2IEN.js} +10 -10
- package/lib/{navigation.telemetry-rXclq03x.js.map → navigation.telemetry-BPxX2IEN.js.map} +1 -1
- package/lib/{plugin-CSp8hwQE.js → plugin-Bvxhb5ko.js} +8 -8
- package/lib/{plugin-CSp8hwQE.js.map → plugin-Bvxhb5ko.js.map} +1 -1
- package/lib/{plugin-Daxe5hwG.js → plugin-Cv6TLYbE.js} +6 -6
- package/lib/{plugin-Daxe5hwG.js.map → plugin-Cv6TLYbE.js.map} +1 -1
- package/lib/{plugin-BFTpdKKH.js → plugin-D6-7jrXf.js} +3 -3
- package/lib/{plugin-BFTpdKKH.js.map → plugin-D6-7jrXf.js.map} +1 -1
- package/lib/{plugin-dtgDcBsL.js → plugin-D_GVPwTR.js} +6 -6
- package/lib/{plugin-dtgDcBsL.js.map → plugin-D_GVPwTR.js.map} +1 -1
- package/lib/{releases.telemetry-B6tRA9U2.js → releases.telemetry-BAO7xaO7.js} +6 -6
- package/lib/{releases.telemetry-B6tRA9U2.js.map → releases.telemetry-BAO7xaO7.js.map} +1 -1
- package/lib/{resources-BjljYbUa.js → resources-Bw1bpPhG.js} +2 -2
- package/lib/{resources-BjljYbUa.js.map → resources-Bw1bpPhG.js.map} +1 -1
- package/lib/{resources-DYxnNjS8.js → resources-CC1qBsSO.js} +2 -2
- package/lib/{resources-DYxnNjS8.js.map → resources-CC1qBsSO.js.map} +1 -1
- package/lib/{resources-D7Mp6N-8.js → resources-CH42UqhC.js} +2 -2
- package/lib/{resources-D7Mp6N-8.js.map → resources-CH42UqhC.js.map} +1 -1
- package/lib/{resources-GpX0LblP.js → resources-Cq1lXH8T.js} +2 -2
- package/lib/{resources-GpX0LblP.js.map → resources-Cq1lXH8T.js.map} +1 -1
- package/lib/{resources-B7mfG9Km.js → resources-D7XsFe7y.js} +2 -2
- package/lib/{resources-B7mfG9Km.js.map → resources-D7XsFe7y.js.map} +1 -1
- package/lib/{resources-CmmAynkL.js → resources-DYn0yzEW.js} +2 -2
- package/lib/{resources-CmmAynkL.js.map → resources-DYn0yzEW.js.map} +1 -1
- package/lib/{resources-C79qQva3.js → resources-TsgtFPi7.js} +2 -2
- package/lib/{resources-C79qQva3.js.map → resources-TsgtFPi7.js.map} +1 -1
- package/lib/{scheduleItem-Bdvl81Kb.js → scheduleItem-5fXCZgfo.js} +13 -13
- package/lib/{scheduleItem-Bdvl81Kb.js.map → scheduleItem-5fXCZgfo.js.map} +1 -1
- package/lib/{schedules-D7bPbTPm.js → schedules-BsE0_g47.js} +3 -3
- package/lib/{schedules-D7bPbTPm.js.map → schedules-BsE0_g47.js.map} +1 -1
- package/lib/{searchDocumentRelease-v1o9dMnE.js → searchDocumentRelease-Bang3A8l.js} +5 -5
- package/lib/{searchDocumentRelease-v1o9dMnE.js.map → searchDocumentRelease-Bang3A8l.js.map} +1 -1
- package/lib/{studioClient-EJDu6kOb.js → studioClient-C7B6Aobi.js} +2 -2
- package/lib/{studioClient-EJDu6kOb.js.map → studioClient-C7B6Aobi.js.map} +1 -1
- package/lib/{useActiveReleases-Bh_Q6f7G.js → useActiveReleases-DxYjyTB1.js} +5 -5
- package/lib/{useActiveReleases-Bh_Q6f7G.js.map → useActiveReleases-DxYjyTB1.js.map} +1 -1
- package/lib/{useBundleDocuments-zP6JiTzz.js → useBundleDocuments-2YaaN-2l.js} +3 -3
- package/lib/{useBundleDocuments-zP6JiTzz.js.map → useBundleDocuments-2YaaN-2l.js.map} +1 -1
- package/lib/{useComments-BGOJwUe0.js → useComments-DWh1k0kS.js} +5 -5
- package/lib/{useComments-BGOJwUe0.js.map → useComments-DWh1k0kS.js.map} +1 -1
- package/lib/{useCommentsTelemetry-BMkf6MTO.js → useCommentsTelemetry-BbJ8lTKN.js} +4 -4
- package/lib/{useCommentsTelemetry-BMkf6MTO.js.map → useCommentsTelemetry-BbJ8lTKN.js.map} +1 -1
- package/lib/{useDocumentPreviewValues-CryTvfKc.js → useDocumentPreviewValues-CK5VteK3.js} +4 -4
- package/lib/{useDocumentPreviewValues-CryTvfKc.js.map → useDocumentPreviewValues-CK5VteK3.js.map} +1 -1
- package/lib/{useFieldActions-BTj7VsW5.js → useFieldActions-BmY1Kh3s.js} +2 -2
- package/lib/{useFieldActions-BTj7VsW5.js.map → useFieldActions-BmY1Kh3s.js.map} +1 -1
- package/lib/{useProjectId-BN6GCdwS.js → useProjectId-C8pZxybz.js} +2 -2
- package/lib/{useProjectId-BN6GCdwS.js.map → useProjectId-C8pZxybz.js.map} +1 -1
- package/lib/{useReleasesToolAvailable-CQ9-I8Tt.js → useReleasesToolAvailable-DjaSujLo.js} +3 -3
- package/lib/{useReleasesToolAvailable-CQ9-I8Tt.js.map → useReleasesToolAvailable-DjaSujLo.js.map} +1 -1
- package/lib/{useScheduledDraftMenuActions-OSkdxONo.js → useScheduledDraftMenuActions-DSJU6xQa.js} +9 -9
- package/lib/{useScheduledDraftMenuActions-OSkdxONo.js.map → useScheduledDraftMenuActions-DSJU6xQa.js.map} +1 -1
- package/lib/{useStudioUrl-DUBI_S4K.js → useStudioUrl-DcTGV00c.js} +5 -5
- package/lib/{useStudioUrl-DUBI_S4K.js.map → useStudioUrl-DcTGV00c.js.map} +1 -1
- package/lib/{useTasksNavigation-fohCXW6l.js → useTasksNavigation-tAXFJd2V.js} +2 -2
- package/lib/{useTasksNavigation-fohCXW6l.js.map → useTasksNavigation-tAXFJd2V.js.map} +1 -1
- package/lib/{useTimeZone-DM8ZmUO2.js → useTimeZone-Dj7C8tfZ.js} +2 -2
- package/lib/{useTimeZone-DM8ZmUO2.js.map → useTimeZone-Dj7C8tfZ.js.map} +1 -1
- package/lib/{utils-D-4rueJZ.js → utils-CT034e4q.js} +3 -3
- package/lib/{utils-D-4rueJZ.js.map → utils-CT034e4q.js.map} +1 -1
- package/lib/{validationUtils-jTd1rxfY.js → validationUtils-BZPoHEYN.js} +4 -4
- package/lib/{validationUtils-jTd1rxfY.js.map → validationUtils-BZPoHEYN.js.map} +1 -1
- package/lib/{version-D0Vx4cX1.js → version-BDSMcNU7.js} +2 -2
- package/lib/{version-D0Vx4cX1.js.map → version-BDSMcNU7.js.map} +1 -1
- package/package.json +17 -17
- package/lib/PerspectiveProvider-Yk7lgugx.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-D-4rueJZ.js","names":["t('time-zone.dialog-info.scheduled-publishing')","t('time-zone.dialog-info.content-releases')","t('time-zone.dialog-info.input')","{\n scheduledPublishing: t('time-zone.dialog-info.scheduled-publishing'),\n contentReleases: t('time-zone.dialog-info.content-releases'),\n input: t('time-zone.dialog-info.input'),\n }","useMemo(\n (): Record<TimeZoneScopeType, ReturnType<typeof t>> => ({\n scheduledPublishing: t('time-zone.dialog-info.scheduled-publishing'),\n contentReleases: t('time-zone.dialog-info.content-releases'),\n input: t('time-zone.dialog-info.input'),\n }),\n [t],\n )","(value: string) => {\n if (!value) {\n setSelectedTz(undefined)\n return\n }\n setShowAllOptions(false)\n setSelectedTz(getTimeZone(value))\n }","useCallback(\n (value: string) => {\n if (!value) {\n setSelectedTz(undefined)\n return\n }\n setShowAllOptions(false)\n setSelectedTz(getTimeZone(value))\n },\n [getTimeZone],\n )","(newQuery: string | null) => {\n if (newQuery) {\n setShowAllOptions(false)\n }\n }","useCallback((newQuery: string | null) => {\n if (newQuery) {\n setShowAllOptions(false)\n }\n }, [])","() => {\n setShowAllOptions(true)\n }","useCallback(() => {\n setShowAllOptions(true)\n }, [])","() => setSelectedTz(getLocalTimeZone())","useCallback(\n () => setSelectedTz(getLocalTimeZone()),\n [getLocalTimeZone],\n )","() => {\n if (selectedTz) {\n setTimeZone(selectedTz)\n }\n onClose?.()\n }","useCallback(() => {\n if (selectedTz) {\n setTimeZone(selectedTz)\n }\n onClose?.()\n }, [onClose, selectedTz, setTimeZone])","getLocalTimeZone()","useCallback((option: NormalizedTimeZone) => {\n return (\n <Card as=\"button\" padding={3}>\n <Text size={1} textOverflow=\"ellipsis\">\n <TimeZoneCitySpan>{option.city}</TimeZoneCitySpan>\n <TimeZoneOffsetSpan>\n {' '}\n ({'GMT'}\n {option.offset})\n </TimeZoneOffsetSpan>\n\n <TimeZoneAlternativeNameSpan>{option.alternativeName}</TimeZoneAlternativeNameSpan>\n </Text>\n </Card>\n )\n }, [])","useCallback((_value: string, option?: NormalizedTimeZone) => {\n if (!option) return ''\n return `${option.alternativeName} (${option.namePretty})`\n }, [])","(filterQuery: string, option: NormalizedTimeZone) => {\n // Always show all options if dropdown button was clicked\n // Otherwise use standard filtering\n if (showAllOptions || filterQuery === '') return true\n const searchText = `${option.city} (GMT${option.offset}) ${option.alternativeName}`\n return searchText.toLowerCase().includes(filterQuery.toLowerCase())\n }","option","useCallback(\n (filterQuery: string, option: NormalizedTimeZone) => {\n // Always show all options if dropdown button was clicked\n // Otherwise use standard filtering\n if (showAllOptions || filterQuery === '') return true\n const searchText = `${option.city} (GMT${option.offset}) ${option.alternativeName}`\n return searchText.toLowerCase().includes(filterQuery.toLowerCase())\n },\n [showAllOptions],\n )","{\n confirmButton: {\n text: 'Update time zone',\n disabled: !isDirty || !selectedTz,\n onClick: handleTimeZoneUpdate,\n tone: 'primary',\n },\n }","!isDirty || !selectedTz","<Text size={1}>{timeZoneScopeTypeToLabel[timeZoneScope.type]}</Text>","timeZoneScopeTypeToLabel[timeZoneScope.type]","t('time-zone.time-zone')","<Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>","isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )","<Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>","!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )","<Flex align=\"center\" justify=\"space-between\">\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>\n {!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )}\n </Flex>","{onClick: handleAutocompleteOpenButtonClick}","t('time-zone.action.search-for-timezone-placeholder')","{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }","<Autocomplete\n fontSize={2}\n icon={SearchIcon}\n id=\"timezone\"\n onChange={handleTimeZoneChange}\n onQueryChange={handleQueryChange}\n openButton={{onClick: handleAutocompleteOpenButtonClick}}\n options={allTimeZones}\n padding={4}\n filterOption={filterOption}\n placeholder={t('time-zone.action.search-for-timezone-placeholder')}\n popover={{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }}\n renderOption={renderOption}\n renderValue={renderValue}\n tabIndex={-1}\n value={selectedTz?.value}\n />","selectedTz?.value","<Stack gap={3}>\n <Flex align=\"center\" justify=\"space-between\">\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>\n {!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )}\n </Flex>\n\n <Autocomplete\n fontSize={2}\n icon={SearchIcon}\n id=\"timezone\"\n onChange={handleTimeZoneChange}\n onQueryChange={handleQueryChange}\n openButton={{onClick: handleAutocompleteOpenButtonClick}}\n options={allTimeZones}\n padding={4}\n filterOption={filterOption}\n placeholder={t('time-zone.action.search-for-timezone-placeholder')}\n popover={{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }}\n renderOption={renderOption}\n renderValue={renderValue}\n tabIndex={-1}\n value={selectedTz?.value}\n />\n </Stack>","<Stack padding={4} gap={5}>\n <Text size={1}>{timeZoneScopeTypeToLabel[timeZoneScope.type]}</Text>\n <Stack gap={3}>\n <Flex align=\"center\" justify=\"space-between\">\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>\n {!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )}\n </Flex>\n\n <Autocomplete\n fontSize={2}\n icon={SearchIcon}\n id=\"timezone\"\n onChange={handleTimeZoneChange}\n onQueryChange={handleQueryChange}\n openButton={{onClick: handleAutocompleteOpenButtonClick}}\n options={allTimeZones}\n padding={4}\n filterOption={filterOption}\n placeholder={t('time-zone.action.search-for-timezone-placeholder')}\n popover={{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }}\n renderOption={renderOption}\n renderValue={renderValue}\n tabIndex={-1}\n value={selectedTz?.value}\n />\n </Stack>\n </Stack>","<Dialog\n footer={{\n confirmButton: {\n text: 'Update time zone',\n disabled: !isDirty || !selectedTz,\n onClick: handleTimeZoneUpdate,\n tone: 'primary',\n },\n }}\n header=\"Select time zone\"\n id=\"time-zone\"\n onClose={onClose}\n width={1}\n >\n <Stack padding={4} gap={5}>\n <Text size={1}>{timeZoneScopeTypeToLabel[timeZoneScope.type]}</Text>\n <Stack gap={3}>\n <Flex align=\"center\" justify=\"space-between\">\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>\n {!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )}\n </Flex>\n\n <Autocomplete\n fontSize={2}\n icon={SearchIcon}\n id=\"timezone\"\n onChange={handleTimeZoneChange}\n onQueryChange={handleQueryChange}\n openButton={{onClick: handleAutocompleteOpenButtonClick}}\n options={allTimeZones}\n padding={4}\n filterOption={filterOption}\n placeholder={t('time-zone.action.search-for-timezone-placeholder')}\n popover={{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }}\n renderOption={renderOption}\n renderValue={renderValue}\n tabIndex={-1}\n value={selectedTz?.value}\n />\n </Stack>\n </Stack>\n </Dialog>","() => {\n setVisible(false)\n }","useCallback(() => {\n setVisible(false)\n }, [])","() => {\n setVisible(true)\n }","useCallback(() => {\n setVisible(true)\n }, [])","{\n onClose: hide,\n visible,\n timeZoneScope,\n }","{\n DialogTimeZone: visible ? DialogTimeZone : null,\n dialogProps,\n timeZoneScope,\n dialogTimeZoneShow: show,\n hide,\n }","visible ? DialogTimeZone : null","() => {\n onSelect(date)\n }","useCallback(() => {\n onSelect(date)\n }, [date, onSelect])","date.toDateString()","isPastDisabled && !isToday && isPast(date)","date.toDateString().replaceAll(' ', '-')","{textAlign: 'center'}","date.getDate()","<Text\n muted={!selected && !isCurrentMonth}\n size={1}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>","!selected && !isCurrentMonth","isCurrentMonth ? 'medium' : 'regular'","<Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n role=\"button\"\n tabIndex={-1}\n disabled={isPastDisabled && !isToday && isPast(date)}\n onClick={handleClick}\n padding={2}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n data-testid={`calendar-day-${date.toDateString().replaceAll(' ', '-')}`}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n size={1}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>","focused ? 'true' : ''","isToday || selected ? 'primary' : 'default'","`calendar-day-${date.toDateString().replaceAll(' ', '-')}`","<div aria-selected={selected} data-ui=\"CalendarDay\">\n <Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n role=\"button\"\n tabIndex={-1}\n disabled={isPastDisabled && !isToday && isPast(date)}\n onClick={handleClick}\n padding={2}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n data-testid={`calendar-day-${date.toDateString().replaceAll(' ', '-')}`}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n size={1}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>\n </div>","getWeekDaysFromWeekStarts(getWeekStartsOfMonth(date, weekInfo.firstDay)).map(\n (days): Week => ({\n number: getWeek(days[0]),\n days,\n }),\n )","firstDay","(days): Week => ({\n number: getWeek(days[0]),\n days,\n })","{firstDay: weekStartDay}","[props.weekDayNames[6], ...props.weekDayNames.slice(0, 6)]","weekDayNames","[...props.weekDayNames.slice(5), ...props.weekDayNames.slice(0, 5)]","{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}","weekDayNames.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))","(weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n )","useWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, new Date())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n onSelect={props.onSelect}\n selected={selected}\n isPastDisabled={props.isPastDisabled}\n />\n )\n }),\n )","focused","isPastDisabled","onSelect","selected","useWeeksOfMonth(props.date)","(week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, new Date())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n onSelect={props.onSelect}\n selected={selected}\n isPastDisabled={props.isPastDisabled}\n />\n )\n })","<Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {weekDayNames.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {useWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, new Date())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n onSelect={props.onSelect}\n selected={selected}\n isPastDisabled={props.isPastDisabled}\n />\n )\n }),\n )}\n </Grid>","<Box aria-hidden={props.hidden || false} data-ui=\"CalendarMonth\">\n <Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {weekDayNames.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {useWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, new Date())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n onSelect={props.onSelect}\n selected={selected}\n isPastDisabled={props.isPastDisabled}\n />\n )\n }),\n )}\n </Grid>\n </Box>","props.hidden || false","{\n ref: forwardedRef,\n onChange,\n onBlur,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onKeyPress,\n value,\n ...rest\n}: TextInputProps & HTMLProps<HTMLInputElement> & RefAttributes<HTMLInputElement>","(event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.currentTarget.value)\n }","useCallback((event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.currentTarget.value)\n }, [])","(event: SyntheticEvent<HTMLInputElement>) => {\n const currentValue = event.currentTarget.value\n if (currentValue !== `${value}`) {\n if (onChange) {\n onChange(event as ChangeEvent<HTMLInputElement>)\n }\n }\n setInputValue(undefined)\n }","event","useCallback(\n (event: SyntheticEvent<HTMLInputElement>) => {\n const currentValue = event.currentTarget.value\n if (currentValue !== `${value}`) {\n if (onChange) {\n onChange(event as ChangeEvent<HTMLInputElement>)\n }\n }\n setInputValue(undefined)\n },\n [onChange, value],\n )","(e: FocusEvent<HTMLInputElement>) => {\n checkEvent(e)\n if (onBlur) {\n onBlur(e)\n }\n }","useCallback(\n (e: FocusEvent<HTMLInputElement>) => {\n checkEvent(e)\n if (onBlur) {\n onBlur(e)\n }\n },\n [checkEvent, onBlur],\n )","(e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n checkEvent(e)\n }\n if (onKeyPress) {\n onKeyPress(e)\n }\n }","e","useCallback(\n (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n checkEvent(e)\n }\n if (onKeyPress) {\n onKeyPress(e)\n }\n },\n [checkEvent, onKeyPress],\n )","<TextInput\n {...rest}\n ref={forwardedRef}\n value={inputValue === undefined ? value : inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onKeyPress={handleKeyPress}\n />","inputValue === undefined ? value : inputValue","(event: ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n }","useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n },\n [onChange],\n )","<LazyTextInput\n data-testid=\"date-input\"\n {...restProps}\n fontSize={1}\n onChange={handleChange}\n inputMode=\"numeric\"\n padding={2}\n radius={2}\n />","timeStep = 1","monthPickerVariant = 'select'","padding = 2","showTimeZone = false","utcToCurrentZoneDate(value)","useMemo(() => utcToCurrentZoneDate(value), [utcToCurrentZoneDate, value])","() => {\n return [\n // month is 0-indexed\n Number(format(focusedDate, 'MM', {timeZone: timeZone?.name})) - 1,\n Number(format(focusedDate, 'YYYY', {timeZone: timeZone?.name})),\n ]\n }","name","useMemo(() => {\n return [\n // month is 0-indexed\n Number(format(focusedDate, 'MM', {timeZone: timeZone?.name})) - 1,\n Number(format(focusedDate, 'YYYY', {timeZone: timeZone?.name})),\n ]\n }, [focusedDate, timeZone?.name])","(month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1))","useCallback(\n (month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1)),\n [focusedDate, setFocusedDate],\n )","(e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value))","useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value)),\n [setFocusedDateMonth],\n )","(by: number) => setFocusedDate(addMonths(focusedDate, by))","useCallback(\n (by: number) => setFocusedDate(addMonths(focusedDate, by)),\n [focusedDate, setFocusedDate],\n )","(year: number) => setFocusedDate(setYear(focusedDate, year))","useCallback(\n (year: number) => setFocusedDate(setYear(focusedDate, year)),\n [focusedDate, setFocusedDate],\n )","(date: Date) => {\n const newDate = setMinutes(\n setHours(date, currentTzDate.getHours()),\n currentTzDate.getMinutes(),\n )\n if (!timeZone) {\n onSelect(newDate)\n return\n }\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newDate)\n onSelect(utcDate)\n }","useCallback(\n (date: Date) => {\n const newDate = setMinutes(\n setHours(date, currentTzDate.getHours()),\n currentTzDate.getMinutes(),\n )\n if (!timeZone) {\n onSelect(newDate)\n return\n }\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newDate)\n onSelect(utcDate)\n },\n [onSelect, currentTzDate, timeZone, zoneDateToUtc],\n )","(hours: number, mins: number) => {\n if (!timeZone) {\n onSelect(setHours(setMinutes(currentTzDate, mins), hours))\n return\n }\n // Get the date in the timezone\n const zonedDate = new TZDate(currentTzDate, timeZone.name)\n const newZonedDate = setHours(setMinutes(zonedDate, mins), hours)\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newZonedDate)\n onSelect(utcDate)\n }","utcDate","useCallback(\n (hours: number, mins: number) => {\n if (!timeZone) {\n onSelect(setHours(setMinutes(currentTzDate, mins), hours))\n return\n }\n // Get the date in the timezone\n const zonedDate = new TZDate(currentTzDate, timeZone.name)\n const newZonedDate = setHours(setMinutes(zonedDate, mins), hours)\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newZonedDate)\n onSelect(utcDate)\n },\n [onSelect, currentTzDate, timeZone, zoneDateToUtc],\n )","format(currentTzDate, 'HH:mm', {timeZone: timeZone?.name})","timeZone?.name","useMemo(\n () => format(currentTzDate, 'HH:mm', {timeZone: timeZone?.name}),\n [currentTzDate, timeZone?.name],\n )","() => {\n // The change is coming from another source, so we need to update the timeValue to the new value.\n // oxlint-disable-next-line react/no-deriving-state-in-effects, react/set-state-in-effect -- pre-existing violation, to be fixed in a follow-up\n setTimeValue(timeFromDate)\n }","[timeFromDate]","(event: FormEvent<HTMLInputElement>) => {\n const nextValue = event.currentTarget.value\n if (nextValue) {\n // avoids native time input segment navigation resetting while typing.\n setTimeValue(nextValue)\n const date = parse(nextValue, 'HH:mm', new Date())\n if (!isValid(date)) {\n return\n }\n handleTimeChange(date.getHours(), date.getMinutes())\n } else {\n // Setting the timeValue to undefined will let the input behave correctly as a time input while the user types.\n // This means, that until it has a valid value the time input input won't emit a new onChange event.\n // but we cannot send the undefined value to the handleTimeChange, because it expects a valid date.\n setTimeValue(undefined)\n }\n }","date","useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLInputElement>) => {\n const nextValue = event.currentTarget.value\n if (nextValue) {\n // avoids native time input segment navigation resetting while typing.\n setTimeValue(nextValue)\n const date = parse(nextValue, 'HH:mm', new Date())\n if (!isValid(date)) {\n return\n }\n handleTimeChange(date.getHours(), date.getMinutes())\n } else {\n // Setting the timeValue to undefined will let the input behave correctly as a time input while the user types.\n // This means, that until it has a valid value the time input input won't emit a new onChange event.\n // but we cannot send the undefined value to the handleTimeChange, because it expects a valid date.\n setTimeValue(undefined)\n }\n },\n [handleTimeChange],\n )","() => ref.current","() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }","useCallback(() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }, [ref])","(event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n const target = event.currentTarget\n event.preventDefault()\n if (target.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n setFocusedDate(addDays(focusedDate, -7))\n }\n if (event.key === 'ArrowDown') {\n setFocusedDate(addDays(focusedDate, 7))\n }\n if (event.key === 'ArrowLeft') {\n setFocusedDate(addDays(focusedDate, -1))\n }\n if (event.key === 'ArrowRight') {\n setFocusedDate(addDays(focusedDate, 1))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n }","event","useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n const target = event.currentTarget\n event.preventDefault()\n if (target.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n setFocusedDate(addDays(focusedDate, -7))\n }\n if (event.key === 'ArrowDown') {\n setFocusedDate(addDays(focusedDate, 7))\n }\n if (event.key === 'ArrowLeft') {\n setFocusedDate(addDays(focusedDate, -1))\n }\n if (event.key === 'ArrowRight') {\n setFocusedDate(addDays(focusedDate, 1))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n },\n [ref, focusCurrentWeekDay, focusedDate],\n )","() => {\n focusCurrentWeekDay()\n }","[focusCurrentWeekDay]","() => {\n const currentFocusInCalendarGrid = document.activeElement?.matches(\n '[data-calendar-grid], [data-calendar-grid] [data-preserve-focus]',\n )\n if (\n // Only move focus if it's currently in the calendar grid\n currentFocusInCalendarGrid\n ) {\n focusCurrentWeekDay()\n }\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }","[ref, focusCurrentWeekDay, focusedDate]","() => handleDateChange(addDays(new Date(), -1))","useCallback(\n () => handleDateChange(addDays(new Date(), -1)),\n [handleDateChange],\n )","() => handleDateChange(new Date())","useCallback(() => handleDateChange(new Date()), [handleDateChange])","() => handleDateChange(addDays(new Date(), 1))","useCallback(\n () => handleDateChange(addDays(new Date(), 1)),\n [handleDateChange],\n )","useMemo(() => {\n if (monthPickerVariant === 'carousel') {\n return (\n <Flex\n align=\"center\"\n paddingLeft={4}\n style={{\n borderBottom: '1px solid var(--card-border-color)',\n minHeight: `55px`,\n position: 'sticky',\n top: 0,\n }}\n >\n <Flex align=\"center\" flex={1} justify=\"space-between\">\n <Flex align=\"center\" flex={1}>\n <Text weight=\"medium\" size={1}>\n {labels.monthNames[(focusedDate || new Date())?.getMonth()]}{' '}\n {(focusedDate || new Date())?.getFullYear()}\n </Text>\n </Flex>\n\n <Flex paddingRight={3} gap={2}>\n <TooltipDelayGroupProvider>\n <Button\n icon={ChevronLeftIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(-1)}\n data-testid=\"calendar-prev-month\"\n tooltipProps={{content: 'Previous month'}}\n />\n <Button\n icon={ChevronRightIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(1)}\n data-testid=\"calendar-next-month\"\n tooltipProps={{content: 'Next month'}}\n />\n </TooltipDelayGroupProvider>\n </Flex>\n </Flex>\n </Flex>\n )\n }\n\n return (\n <Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n onChange={handleFocusedMonthChange}\n monthNames={labels.monthNames}\n value={displayMonth}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n labels={{\n goToNextYear: labels.goToNextYear,\n goToPreviousYear: labels.goToPreviousYear,\n }}\n onChange={setFocusedDateYear}\n value={displayYear}\n />\n </Box>\n </Flex>\n )\n }, [\n focusedDate,\n displayMonth,\n displayYear,\n handleFocusedMonthChange,\n labels.goToNextYear,\n labels.goToPreviousYear,\n labels.monthNames,\n monthPickerVariant,\n moveFocusedDate,\n setFocusedDateYear,\n ])","{\n borderBottom: '1px solid var(--card-border-color)',\n minHeight: `55px`,\n position: 'sticky',\n top: 0,\n }","(focusedDate || new Date())?.getFullYear()","<Flex align=\"center\" flex={1}>\n <Text weight=\"medium\" size={1}>\n {labels.monthNames[(focusedDate || new Date())?.getMonth()]}{' '}\n {(focusedDate || new Date())?.getFullYear()}\n </Text>\n </Flex>","labels.monthNames[(focusedDate || new Date())?.getMonth()]","() => moveFocusedDate(-1)","{content: 'Previous month'}","<Button\n icon={ChevronLeftIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(-1)}\n data-testid=\"calendar-prev-month\"\n tooltipProps={{content: 'Previous month'}}\n />","() => moveFocusedDate(1)","{content: 'Next month'}","<Button\n icon={ChevronRightIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(1)}\n data-testid=\"calendar-next-month\"\n tooltipProps={{content: 'Next month'}}\n />","<Flex paddingRight={3} gap={2}>\n <TooltipDelayGroupProvider>\n <Button\n icon={ChevronLeftIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(-1)}\n data-testid=\"calendar-prev-month\"\n tooltipProps={{content: 'Previous month'}}\n />\n <Button\n icon={ChevronRightIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(1)}\n data-testid=\"calendar-next-month\"\n tooltipProps={{content: 'Next month'}}\n />\n </TooltipDelayGroupProvider>\n </Flex>","<Flex\n align=\"center\"\n paddingLeft={4}\n style={{\n borderBottom: '1px solid var(--card-border-color)',\n minHeight: `55px`,\n position: 'sticky',\n top: 0,\n }}\n >\n <Flex align=\"center\" flex={1} justify=\"space-between\">\n <Flex align=\"center\" flex={1}>\n <Text weight=\"medium\" size={1}>\n {labels.monthNames[(focusedDate || new Date())?.getMonth()]}{' '}\n {(focusedDate || new Date())?.getFullYear()}\n </Text>\n </Flex>\n\n <Flex paddingRight={3} gap={2}>\n <TooltipDelayGroupProvider>\n <Button\n icon={ChevronLeftIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(-1)}\n data-testid=\"calendar-prev-month\"\n tooltipProps={{content: 'Previous month'}}\n />\n <Button\n icon={ChevronRightIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(1)}\n data-testid=\"calendar-next-month\"\n tooltipProps={{content: 'Next month'}}\n />\n </TooltipDelayGroupProvider>\n </Flex>\n </Flex>\n </Flex>","<Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n onChange={handleFocusedMonthChange}\n monthNames={labels.monthNames}\n value={displayMonth}\n />\n </Box>","monthNames","{\n goToNextYear: labels.goToNextYear,\n goToPreviousYear: labels.goToPreviousYear,\n }","goToNextYear","goToPreviousYear","<Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n labels={{\n goToNextYear: labels.goToNextYear,\n goToPreviousYear: labels.goToPreviousYear,\n }}\n onChange={setFocusedDateYear}\n value={displayYear}\n />\n </Box>","<Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n onChange={handleFocusedMonthChange}\n monthNames={labels.monthNames}\n value={displayMonth}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n labels={{\n goToNextYear: labels.goToNextYear,\n goToPreviousYear: labels.goToPreviousYear,\n }}\n onChange={setFocusedDateYear}\n value={displayYear}\n />\n </Box>\n </Flex>","() => {\n const now = new Date()\n onSelect(now)\n setFocusedDate(now)\n }","useCallback(() => {\n const now = new Date()\n onSelect(now)\n setFocusedDate(now)\n }, [onSelect])","features.dayPresets && (\n <Grid\n gridTemplateColumns=\"repeat(3, minmax(0, 1fr))\"\n data-ui=\"CalendaryDayPresets\"\n gap={1}\n >\n <Button text={labels.goToYesterday} mode=\"bleed\" onClick={handleYesterdayClick} />\n <Button text={labels.goToToday} mode=\"bleed\" onClick={handleTodayClick} />\n <Button text={labels.goToTomorrow} mode=\"bleed\" onClick={handleTomorrowClick} />\n </Grid>\n )","goToToday","goToTomorrow","goToYesterday","<CalendarMonth\n weekDayNames={labels.weekDayNamesShort}\n date={focusedDate}\n focused={focusedDate}\n onSelect={handleDateChange}\n selected={currentTzDate}\n isPastDisabled={isPastDisabled}\n />","weekDayNamesShort","<Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginY={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n weekDayNames={labels.weekDayNamesShort}\n date={focusedDate}\n focused={focusedDate}\n onSelect={handleDateChange}\n selected={currentTzDate}\n isPastDisabled={isPastDisabled}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>","<Box padding={padding}>\n {/* Day presets */}\n {features.dayPresets && (\n <Grid\n gridTemplateColumns=\"repeat(3, minmax(0, 1fr))\"\n data-ui=\"CalendaryDayPresets\"\n gap={1}\n >\n <Button text={labels.goToYesterday} mode=\"bleed\" onClick={handleYesterdayClick} />\n <Button text={labels.goToToday} mode=\"bleed\" onClick={handleTodayClick} />\n <Button text={labels.goToTomorrow} mode=\"bleed\" onClick={handleTomorrowClick} />\n </Grid>\n )}\n\n {/* Select month and year */}\n {monthPicker}\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginY={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n weekDayNames={labels.weekDayNamesShort}\n date={focusedDate}\n focused={focusedDate}\n onSelect={handleDateChange}\n selected={currentTzDate}\n isPastDisabled={isPastDisabled}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>","{borderTop: '1px solid var(--card-border-color)'}","selectTime && (\n <>\n <Flex align=\"center\">\n <TimeInput\n aria-label={labels.selectTime}\n value={timeValue}\n onChange={handleTimeChangeInputChange}\n /**\n * Values received in timeStep are defined in minutes as shown in the docs https://www.sanity.io/docs/studio/datetime-type#timestep-47de7f21-25bc-468d-b925-cd30e2690a7b\n * the input type=\"time\" step is in seconds, so we need to multiply by 60.\n *\n * The UI will show all the minutes anyways, from 0 to 59, but it rounds the value to the nearest step once blurred.\n */\n step={timeStep * 60}\n />\n <Box marginLeft={2}>\n <Button text={labels.setToCurrentTime} mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {showTimeZone && (\n <Button\n icon={EarthGlobeIcon}\n mode=\"bleed\"\n size=\"default\"\n text={`${timeZone?.abbreviation}`}\n onClick={handleTimeZoneOpen}\n />\n )}\n\n {features.timePresets && (\n <Flex direction=\"row\" justify=\"center\" align=\"center\" style={{marginTop: 5}}>\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n const text = formatTime(hours, minutes)\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n text={text}\n aria-label={labels.setToTimePreset(text, currentTzDate)}\n />\n )\n })}\n </Flex>\n )}\n </>\n )","labels.selectTime","abbreviation","hours","[hours, minutes]","showTimeZone && !onTimeZoneOpen && DialogTimeZone && <DialogTimeZone {...dialogProps} />","<Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex align=\"center\" justify=\"space-between\">\n {/* Select time */}\n {selectTime && (\n <>\n <Flex align=\"center\">\n <TimeInput\n aria-label={labels.selectTime}\n value={timeValue}\n onChange={handleTimeChangeInputChange}\n /**\n * Values received in timeStep are defined in minutes as shown in the docs https://www.sanity.io/docs/studio/datetime-type#timestep-47de7f21-25bc-468d-b925-cd30e2690a7b\n * the input type=\"time\" step is in seconds, so we need to multiply by 60.\n *\n * The UI will show all the minutes anyways, from 0 to 59, but it rounds the value to the nearest step once blurred.\n */\n step={timeStep * 60}\n />\n <Box marginLeft={2}>\n <Button text={labels.setToCurrentTime} mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {showTimeZone && (\n <Button\n icon={EarthGlobeIcon}\n mode=\"bleed\"\n size=\"default\"\n text={`${timeZone?.abbreviation}`}\n onClick={handleTimeZoneOpen}\n />\n )}\n\n {features.timePresets && (\n <Flex direction=\"row\" justify=\"center\" align=\"center\" style={{marginTop: 5}}>\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n const text = formatTime(hours, minutes)\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n text={text}\n aria-label={labels.setToTimePreset(text, currentTzDate)}\n />\n )\n })}\n </Flex>\n )}\n </>\n )}\n {showTimeZone && !onTimeZoneOpen && DialogTimeZone && <DialogTimeZone {...dialogProps} />}\n </Flex>\n </Box>","<Box data-testid=\"calendar\" data-ui=\"Calendar\" {...restProps} ref={ref}>\n {/* Select date */}\n <Box padding={padding}>\n {/* Day presets */}\n {features.dayPresets && (\n <Grid\n gridTemplateColumns=\"repeat(3, minmax(0, 1fr))\"\n data-ui=\"CalendaryDayPresets\"\n gap={1}\n >\n <Button text={labels.goToYesterday} mode=\"bleed\" onClick={handleYesterdayClick} />\n <Button text={labels.goToToday} mode=\"bleed\" onClick={handleTodayClick} />\n <Button text={labels.goToTomorrow} mode=\"bleed\" onClick={handleTomorrowClick} />\n </Grid>\n )}\n\n {/* Select month and year */}\n {monthPicker}\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginY={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n weekDayNames={labels.weekDayNamesShort}\n date={focusedDate}\n focused={focusedDate}\n onSelect={handleDateChange}\n selected={currentTzDate}\n isPastDisabled={isPastDisabled}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>\n\n <Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex align=\"center\" justify=\"space-between\">\n {/* Select time */}\n {selectTime && (\n <>\n <Flex align=\"center\">\n <TimeInput\n aria-label={labels.selectTime}\n value={timeValue}\n onChange={handleTimeChangeInputChange}\n /**\n * Values received in timeStep are defined in minutes as shown in the docs https://www.sanity.io/docs/studio/datetime-type#timestep-47de7f21-25bc-468d-b925-cd30e2690a7b\n * the input type=\"time\" step is in seconds, so we need to multiply by 60.\n *\n * The UI will show all the minutes anyways, from 0 to 59, but it rounds the value to the nearest step once blurred.\n */\n step={timeStep * 60}\n />\n <Box marginLeft={2}>\n <Button text={labels.setToCurrentTime} mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {showTimeZone && (\n <Button\n icon={EarthGlobeIcon}\n mode=\"bleed\"\n size=\"default\"\n text={`${timeZone?.abbreviation}`}\n onClick={handleTimeZoneOpen}\n />\n )}\n\n {features.timePresets && (\n <Flex direction=\"row\" justify=\"center\" align=\"center\" style={{marginTop: 5}}>\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n const text = formatTime(hours, minutes)\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n text={text}\n aria-label={labels.setToTimePreset(text, currentTzDate)}\n />\n )\n })}\n </Flex>\n )}\n </>\n )}\n {showTimeZone && !onTimeZoneOpen && DialogTimeZone && <DialogTimeZone {...dialogProps} />}\n </Flex>\n </Box>\n </Box>","() => {\n onTimeChange(hours, minutes)\n }","useCallback(() => {\n onTimeChange(hours, minutes)\n }, [hours, minutes, onTimeChange])","<Button text={text} aria-label={props['aria-label']} mode=\"bleed\" onClick={handleClick} />","props['aria-label']","monthNames.map((monthName, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {monthName}\n </option>\n ))","(monthName, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {monthName}\n </option>\n )","<Flex flex={1} gap={1}>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <Select fontSize={1} radius={2} value={value} onChange={onChange} padding={2}>\n {monthNames.map((monthName, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {monthName}\n </option>\n ))}\n </Select>\n </Box>\n </Flex>","() => moveFocusedDate(-12)","useCallback(() => moveFocusedDate(-12), [moveFocusedDate])","() => moveFocusedDate(12)","useCallback(() => moveFocusedDate(12), [moveFocusedDate])","{content: 'Previous year'}","<Button\n aria-label={labels.goToPreviousYear}\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n tooltipProps={{content: 'Previous year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />","{width: 48}","<YearInput value={value} onChange={onChange} radius={0} style={{width: 48}} />","{content: 'Next year'}","<Button\n aria-label={labels.goToNextYear}\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n tooltipProps={{content: 'Next year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />","<Flex gap={1}>\n <Button\n aria-label={labels.goToPreviousYear}\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n tooltipProps={{content: 'Previous year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />\n <YearInput value={value} onChange={onChange} radius={0} style={{width: 48}} />\n <Button\n aria-label={labels.goToNextYear}\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n tooltipProps={{content: 'Next year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />\n </Flex>","padding = 2","showTimeZone = false","useMemo(() => {\n if (_value) return _value\n const now = new Date()\n // If no value is provided initialize the date with seconds and milliseconds set to 0\n now.setSeconds(0, 0)\n return now\n }, [_value])","(nextDate: Date) => {\n onChange(nextDate)\n }","useCallback(\n (nextDate: Date) => {\n onChange(nextDate)\n },\n [onChange],\n )","<Calendar\n {...rest}\n labels={calendarLabels}\n ref={ref}\n value={value}\n onSelect={handleSelect}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={onTimeZoneOpen}\n />","{\n popoverRef,\n onClose,\n children,\n}: {\n popoverRef: {current: HTMLDivElement | null}\n onClose: () => void\n children: ReactNode\n}","() => [popoverRef.current]","popoverRef.current","<>{children}</>","constrainSize = true","showTimeZone = false","() => ref.current","() => setReferenceElement(ref.current)","[]","() => setPickerOpen(false)","useCallback(() => setPickerOpen(false), [])","() => {\n ref.current?.focus()\n ref.current?.select()\n }","useCallback(() => {\n ref.current?.focus()\n ref.current?.select()\n }, [])","(e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }","useCallback((e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }, [])","() => setPickerOpen(true)","useCallback(() => setPickerOpen(true), [])","() => {\n setPickerOpen(false)\n dialogTimeZoneShow()\n }","useCallback(() => {\n setPickerOpen(false)\n dialogTimeZoneShow()\n }, [dialogTimeZoneShow])","() => {\n dialogTimeZoneHide()\n setPickerOpen(true)\n }","useCallback(() => {\n dialogTimeZoneHide()\n setPickerOpen(true)\n }, [dialogTimeZoneHide])","inputValue && isPastDisabled && isPast(zoneDateToUtc(new Date(inputValue)))","useMemo(\n () => inputValue && isPastDisabled && isPast(zoneDateToUtc(new Date(inputValue))),\n [inputValue, isPastDisabled, zoneDateToUtc],\n )","readOnly ? null : (\n <Flex style={{padding: '5px'}}>\n <Button\n disabled={readOnly}\n aria-label={calendarLabels.ariaLabel}\n ref={buttonRef}\n icon={CalendarIcon}\n mode=\"bleed\"\n onClick={handleClick}\n style={{display: 'block'}}\n data-testid=\"select-date-button\"\n tooltipProps={{content: calendarLabels.tooltipText}}\n />\n </Flex>\n )","calendarLabels.tooltipText","isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize={constrainSize}\n data-testid=\"date-input-dialog\"\n referenceElement={referenceElement}\n portal\n content={\n <DatePickerPopoverContent popoverRef={popoverRef} onClose={handleClose}>\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n {isDateInPastWarningShown && (\n <Card margin={1} padding={2} radius={2} shadow={1} tone=\"critical\">\n <Text size={1}>{t('inputs.dateTime.past-date-warning')}</Text>\n </Card>\n )}\n <DatePicker\n monthPickerVariant={monthPickerVariant}\n calendarLabels={calendarLabels}\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n isPastDisabled={isPastDisabled}\n onChange={onChange}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={handleTimeZoneOpen}\n />\n </FocusLock>\n </Box>\n </DatePickerPopoverContent>\n }\n open\n placement=\"bottom\"\n ref={popoverRef}\n >\n <>{suffix}</>\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )","<LazyTextInput\n ref={ref}\n data-testid=\"date-input\"\n {...rest}\n readOnly={disableInput || readOnly}\n value={inputValue}\n onChange={onInputChange}\n customValidity={customValidity}\n suffix={\n isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize={constrainSize}\n data-testid=\"date-input-dialog\"\n referenceElement={referenceElement}\n portal\n content={\n <DatePickerPopoverContent popoverRef={popoverRef} onClose={handleClose}>\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n {isDateInPastWarningShown && (\n <Card margin={1} padding={2} radius={2} shadow={1} tone=\"critical\">\n <Text size={1}>{t('inputs.dateTime.past-date-warning')}</Text>\n </Card>\n )}\n <DatePicker\n monthPickerVariant={monthPickerVariant}\n calendarLabels={calendarLabels}\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n isPastDisabled={isPastDisabled}\n onChange={onChange}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={handleTimeZoneOpen}\n />\n </FocusLock>\n </Box>\n </DatePickerPopoverContent>\n }\n open\n placement=\"bottom\"\n ref={popoverRef}\n >\n <>{suffix}</>\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )\n }\n />","disableInput || readOnly","showTimeZone && DialogTimeZone && (\n <DialogTimeZone {...dialogProps} onClose={handleTimeZoneClose} />\n )","<>\n <LazyTextInput\n ref={ref}\n data-testid=\"date-input\"\n {...rest}\n readOnly={disableInput || readOnly}\n value={inputValue}\n onChange={onInputChange}\n customValidity={customValidity}\n suffix={\n isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize={constrainSize}\n data-testid=\"date-input-dialog\"\n referenceElement={referenceElement}\n portal\n content={\n <DatePickerPopoverContent popoverRef={popoverRef} onClose={handleClose}>\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n {isDateInPastWarningShown && (\n <Card margin={1} padding={2} radius={2} shadow={1} tone=\"critical\">\n <Text size={1}>{t('inputs.dateTime.past-date-warning')}</Text>\n </Card>\n )}\n <DatePicker\n monthPickerVariant={monthPickerVariant}\n calendarLabels={calendarLabels}\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n isPastDisabled={isPastDisabled}\n onChange={onChange}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={handleTimeZoneOpen}\n />\n </FocusLock>\n </Box>\n </DatePickerPopoverContent>\n }\n open\n placement=\"bottom\"\n ref={popoverRef}\n >\n <>{suffix}</>\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )\n }\n />\n {showTimeZone && DialogTimeZone && (\n <DialogTimeZone {...dialogProps} onClose={handleTimeZoneClose} />\n )}\n </>"],"sources":["../src/core/util/versionsUtils.ts","../src/core/components/timeZone/DialogTimeZone.tsx","../src/core/hooks/useDialogTimeZone.ts","../src/core/components/inputs/DateInputs/TimeInput.tsx","../src/core/components/inputs/DateInputs/calendar/CalendarDay.tsx","../src/core/components/inputs/DateInputs/calendar/constants.ts","../src/core/components/inputs/DateInputs/calendar/utils.ts","../src/core/components/inputs/DateInputs/calendar/CalendarMonth.tsx","../src/core/components/inputs/DateInputs/calendar/features.ts","../src/core/components/inputs/DateInputs/LazyTextInput.tsx","../src/core/components/inputs/DateInputs/calendar/YearInput.tsx","../src/core/components/inputs/DateInputs/calendar/Calendar.tsx","../src/core/components/inputs/DateInputs/DatePicker.tsx","../src/core/components/inputs/DateInputs/DateTimeInput.tsx","../src/core/form/inputs/DateInputs/utils.ts"],"sourcesContent":["import {type VersionInfoDocumentStub} from '../releases/store/types'\nimport {isAgentBundleName} from '../store/agent/createAgentBundlesStore'\nimport {getVariantId} from '../variants/tool/util'\nimport {getDraftId, getVersionFromId} from './draftUtils'\n\ntype VariantConstraint =\n | {\n /**\n * Match only the provided variant id.\n *\n * This value **must** be the bare variant id (\"x\", rather than \"_.variants.x\").\n */\n variant: string\n baseVariant?: never\n anyVariant?: never\n }\n | {\n variant?: never\n /**\n * Match only the base variant.\n */\n baseVariant: true\n anyVariant?: never\n }\n | {\n variant?: never\n baseVariant?: never\n /**\n * Match any variant.\n */\n anyVariant: true\n }\n\n/** @beta */\nexport type VersionType = 'draft' | 'published' | 'release' | 'agent'\n\n/**\n * Uses the `_system` field to check if a version is a published version.\n *\n * By default, any published variant will match. Use the constraint options to\n * limit matching to the base variant, or to a particular variant id.\n *\n * @beta\n */\nexport function isPublishedVersion(\n version: VersionInfoDocumentStub,\n options: {constraint: VariantConstraint} = {constraint: {anyVariant: true}},\n): boolean {\n const {constraint} = options\n const isPublished = !isReleaseVersion(version) && typeof version._system.bundleId === 'undefined'\n\n if (!isPublished) {\n return false\n }\n\n if ('variant' in constraint) {\n return (\n isVariantVersion(version) &&\n getVariantId(version._system.variant?._ref ?? '') === constraint.variant\n )\n }\n\n if (constraint.baseVariant) {\n return !isVariantVersion(version) && version._system.group._ref === version._id\n }\n\n if (constraint.anyVariant) {\n return true\n }\n\n return false\n}\n\n/**\n * Uses the `_system` field to check if a version is a draft version.\n *\n * By default, any draft variant will match. Use the constraint options to\n * limit matching to the base variant, or to a particular variant id.\n *\n * @beta\n */\nexport function isDraftVersion(\n version: VersionInfoDocumentStub,\n options: {constraint: VariantConstraint} = {constraint: {anyVariant: true}},\n): boolean {\n const {constraint} = options\n const isDraft = version._system?.bundleId === 'drafts'\n\n if (!isDraft) {\n return false\n }\n\n if ('variant' in constraint) {\n return (\n isVariantVersion(version) &&\n getVariantId(version._system.variant?._ref ?? '') === constraint.variant\n )\n }\n\n if (constraint.baseVariant) {\n return !isVariantVersion(version) && version._id === getDraftId(version._system.group._ref)\n }\n\n if (constraint.anyVariant) {\n return true\n }\n\n return false\n}\n\n/**\n * Uses the _system field to check if a version is a variant version\n * @beta\n */\nexport function isVariantVersion(version: VersionInfoDocumentStub): boolean {\n return Boolean(version._system?.variant)\n}\n\n/**\n * Uses the _system field to check if a version is a release version\n * @beta\n */\nexport function isReleaseVersion(version: VersionInfoDocumentStub): boolean {\n return Boolean(version._system?.release)\n}\n\n/**\n * Uses the _system field to determine the version type of a document.\n * @beta\n */\nexport function readVersionType(\n version: VersionInfoDocumentStub | undefined,\n): VersionType | undefined {\n if (typeof version === 'undefined') {\n return undefined\n }\n\n if (isAgentBundleName(getVersionFromId(version._id))) {\n return 'agent'\n }\n\n if (isPublishedVersion(version)) {\n return 'published'\n }\n\n if (isReleaseVersion(version)) {\n return 'release'\n }\n\n if (isDraftVersion(version)) {\n return 'draft'\n }\n}\n","import {SearchIcon} from '@sanity/icons/Search'\nimport {Card, Flex, Inline, Stack, Text, type Theme} from '@sanity/ui'\nimport {Autocomplete} from '@sanity/ui/autocomplete'\nimport {useCallback, useMemo, useState} from 'react'\nimport {css, styled} from 'styled-components'\n\nimport {Dialog} from '../../../ui-components/dialog/Dialog'\nimport {type TimeZoneScope, type TimeZoneScopeType, useTimeZone} from '../../hooks/useTimeZone'\nimport {useTranslation} from '../../i18n/hooks/useTranslation'\nimport {type NormalizedTimeZone} from '../../studio/timezones/types'\n\nexport interface DialogTimeZoneProps {\n onClose?: () => void\n timeZoneScope: TimeZoneScope\n}\n\n// oxlint-disable-next-line no-deprecated -- will fix in follow up PR\nconst TimeZoneCitySpan = styled.span(({theme}: {theme: Theme}) => {\n return css`\n color: ${theme.sanity.color.base.fg /* oxlint-disable-line no-deprecated -- will fix in follow up PR */};\n font-weight: 500;\n margin-left: 1em;\n `\n})\n\n// oxlint-disable-next-line no-deprecated -- will fix in follow up PR\nconst TimeZoneOffsetSpan = styled.span(({theme}: {theme: Theme}) => {\n return css`\n color: ${theme.sanity.color.muted.default.enabled.fg /* oxlint-disable-line no-deprecated -- will fix in follow up PR */};\n font-weight: 500;\n `\n})\n\n// oxlint-disable-next-line no-deprecated -- will fix in follow up PR\nconst TimeZoneAlternativeNameSpan = styled.span(({theme}: {theme: Theme}) => {\n return css`\n color: ${theme.sanity.color.input.default.readOnly.fg /* oxlint-disable-line no-deprecated -- will fix in follow up PR */};\n float: right;\n `\n})\n\nconst DialogTimeZone = (props: DialogTimeZoneProps) => {\n const {onClose, timeZoneScope} = props\n const {setTimeZone, allTimeZones, timeZone, getLocalTimeZone, getTimeZone} =\n useTimeZone(timeZoneScope)\n const [selectedTz, setSelectedTz] = useState<NormalizedTimeZone | undefined>(timeZone)\n const [showAllOptions, setShowAllOptions] = useState(false)\n const {t} = useTranslation('studio')\n\n const timeZoneScopeTypeToLabel = useMemo(\n (): Record<TimeZoneScopeType, ReturnType<typeof t>> => ({\n scheduledPublishing: t('time-zone.dialog-info.scheduled-publishing'),\n contentReleases: t('time-zone.dialog-info.content-releases'),\n input: t('time-zone.dialog-info.input'),\n }),\n [t],\n )\n\n const handleTimeZoneChange = useCallback(\n (value: string) => {\n if (!value) {\n setSelectedTz(undefined)\n return\n }\n setShowAllOptions(false)\n setSelectedTz(getTimeZone(value))\n },\n [getTimeZone],\n )\n\n const handleQueryChange = useCallback((newQuery: string | null) => {\n if (newQuery) {\n setShowAllOptions(false)\n }\n }, [])\n\n const handleAutocompleteOpenButtonClick = useCallback(() => {\n setShowAllOptions(true)\n }, [])\n\n const handleTimeZoneSelectLocal = useCallback(\n () => setSelectedTz(getLocalTimeZone()),\n [getLocalTimeZone],\n )\n\n const handleTimeZoneUpdate = useCallback(() => {\n if (selectedTz) {\n setTimeZone(selectedTz)\n }\n onClose?.()\n }, [onClose, selectedTz, setTimeZone])\n\n const isDirty = selectedTz?.name !== timeZone.name\n const isLocalTzSelected = useMemo(() => {\n return selectedTz?.name === getLocalTimeZone().name\n }, [getLocalTimeZone, selectedTz?.name])\n\n const renderOption = useCallback((option: NormalizedTimeZone) => {\n return (\n <Card as=\"button\" padding={3}>\n <Text size={1} textOverflow=\"ellipsis\">\n <TimeZoneCitySpan>{option.city}</TimeZoneCitySpan>\n <TimeZoneOffsetSpan>\n {' '}\n ({'GMT'}\n {option.offset})\n </TimeZoneOffsetSpan>\n\n <TimeZoneAlternativeNameSpan>{option.alternativeName}</TimeZoneAlternativeNameSpan>\n </Text>\n </Card>\n )\n }, [])\n const renderValue = useCallback((_value: string, option?: NormalizedTimeZone) => {\n if (!option) return ''\n return `${option.alternativeName} (${option.namePretty})`\n }, [])\n\n const filterOption = useCallback(\n (filterQuery: string, option: NormalizedTimeZone) => {\n // Always show all options if dropdown button was clicked\n // Otherwise use standard filtering\n if (showAllOptions || filterQuery === '') return true\n const searchText = `${option.city} (GMT${option.offset}) ${option.alternativeName}`\n return searchText.toLowerCase().includes(filterQuery.toLowerCase())\n },\n [showAllOptions],\n )\n\n return (\n <Dialog\n footer={{\n confirmButton: {\n text: 'Update time zone',\n disabled: !isDirty || !selectedTz,\n onClick: handleTimeZoneUpdate,\n tone: 'primary',\n },\n }}\n header=\"Select time zone\"\n id=\"time-zone\"\n onClose={onClose}\n width={1}\n >\n <Stack padding={4} gap={5}>\n <Text size={1}>{timeZoneScopeTypeToLabel[timeZoneScope.type]}</Text>\n <Stack gap={3}>\n <Flex align=\"center\" justify=\"space-between\">\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>\n {!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )}\n </Flex>\n\n <Autocomplete\n fontSize={2}\n icon={SearchIcon}\n id=\"timezone\"\n onChange={handleTimeZoneChange}\n onQueryChange={handleQueryChange}\n openButton={{onClick: handleAutocompleteOpenButtonClick}}\n options={allTimeZones}\n padding={4}\n filterOption={filterOption}\n placeholder={t('time-zone.action.search-for-timezone-placeholder')}\n popover={{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }}\n renderOption={renderOption}\n renderValue={renderValue}\n tabIndex={-1}\n value={selectedTz?.value}\n />\n </Stack>\n </Stack>\n </Dialog>\n )\n}\n\nexport default DialogTimeZone\n","import {useCallback, useState} from 'react'\n\nimport DialogTimeZone from '../components/timeZone/DialogTimeZone'\nimport {type TimeZoneScope} from './useTimeZone'\n\nfunction useDialogTimeZone(timeZoneScope: TimeZoneScope) {\n const [visible, setVisible] = useState(false)\n\n const hide = useCallback(() => {\n setVisible(false)\n }, [])\n const show = useCallback(() => {\n setVisible(true)\n }, [])\n\n const dialogProps = {\n onClose: hide,\n visible,\n timeZoneScope,\n }\n\n return {\n DialogTimeZone: visible ? DialogTimeZone : null,\n dialogProps,\n timeZoneScope,\n dialogTimeZoneShow: show,\n hide,\n }\n}\n\nexport default useDialogTimeZone\n","import {TextInput} from '@sanity/ui'\nimport {styled} from 'styled-components'\n\nexport const TimeInput = styled(TextInput).attrs(() => ({\n type: 'time',\n}))`\n line-height: 1;\n`\n","import {Card, Text} from '@sanity/ui'\nimport {isPast} from 'date-fns/isPast'\nimport {useCallback} from 'react'\n\ninterface CalendarDayProps {\n date: Date\n focused?: boolean\n onSelect: (date: Date) => void\n isCurrentMonth?: boolean\n isToday: boolean\n selected?: boolean\n isPastDisabled?: boolean\n}\n\nexport function CalendarDay(props: CalendarDayProps) {\n const {date, focused, isCurrentMonth, isToday, onSelect, selected, isPastDisabled} = props\n\n const handleClick = useCallback(() => {\n onSelect(date)\n }, [date, onSelect])\n\n return (\n <div aria-selected={selected} data-ui=\"CalendarDay\">\n <Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n role=\"button\"\n tabIndex={-1}\n disabled={isPastDisabled && !isToday && isPast(date)}\n onClick={handleClick}\n padding={2}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n data-testid={`calendar-day-${date.toDateString().replaceAll(' ', '-')}`}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n size={1}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>\n </div>\n )\n}\n","export const DEFAULT_MONTH_NAMES = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n]\n\nexport const DEFAULT_WEEK_DAY_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n\nexport const ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']\n\nexport const DEFAULT_TIME_PRESETS = [\n [0, 0],\n [6, 0],\n [12, 0],\n [18, 0],\n [23, 59],\n]\n\n// all weekdays except first\nexport const TAIL_WEEKDAYS = [1, 2, 3, 4, 5, 6]\n","import {addDays} from 'date-fns/addDays'\nimport {eachWeekOfInterval} from 'date-fns/eachWeekOfInterval'\nimport {getWeek} from 'date-fns/getWeek'\nimport {lastDayOfMonth} from 'date-fns/lastDayOfMonth'\nimport {startOfMonth} from 'date-fns/startOfMonth'\n\nimport {useCurrentLocale} from '../../../../i18n/hooks/useLocale'\nimport {DEFAULT_WEEK_DAY_NAMES, TAIL_WEEKDAYS} from './constants'\n\n/**\n * NOTE: `weekStartsOn` uses 1 for Monday, 7 for Sunday. date-fns wants 0 for Sunday, 6 for Saturday.\n */\nconst getWeekStartsOfMonth = (date: Date, weekStartsOn: 1 | 2 | 3 | 4 | 5 | 6 | 7): Date[] => {\n const firstDay = startOfMonth(date)\n return eachWeekOfInterval(\n {\n start: firstDay,\n end: lastDayOfMonth(firstDay),\n },\n {\n weekStartsOn: weekStartsOn === 7 ? 0 : weekStartsOn,\n },\n )\n}\n\nconst getWeekDaysFromWeekStarts = (weekStarts: Date[]): Date[][] => {\n return weekStarts.map((weekStart) => [\n weekStart,\n ...TAIL_WEEKDAYS.map((d) => addDays(weekStart, d)),\n ])\n}\n\ntype Week = {\n number: number\n days: Date[]\n}\n\nexport const useWeeksOfMonth = (date: Date): Week[] => {\n const {weekInfo} = useCurrentLocale()\n return getWeekDaysFromWeekStarts(getWeekStartsOfMonth(date, weekInfo.firstDay)).map(\n (days): Week => ({\n number: getWeek(days[0]),\n days,\n }),\n )\n}\n\nexport const getWeekDayNames = (weekStartsOn: 1 | 2 | 3 | 4 | 5 | 6 | 7): readonly string[] => {\n const firstDayIndex = weekStartsOn % 7\n return [\n ...DEFAULT_WEEK_DAY_NAMES.slice(firstDayIndex),\n ...DEFAULT_WEEK_DAY_NAMES.slice(0, firstDayIndex),\n ]\n}\n\nexport const formatTime = (hours: number, minutes: number): string =>\n `${`${hours}`.padStart(2, '0')}:${`${minutes}`.padStart(2, '0')}`\n","import {Text} from '@sanity/ui'\nimport {isSameDay} from 'date-fns/isSameDay'\nimport {isSameMonth} from 'date-fns/isSameMonth'\nimport {Grid, Box} from 'ui5'\n\nimport {useCurrentLocale} from '../../../../i18n/hooks/useLocale'\nimport {CalendarDay} from './CalendarDay'\nimport {useWeeksOfMonth} from './utils'\n\ninterface CalendarMonthProps {\n date: Date\n focused?: Date\n selected?: Date\n onSelect: (date: Date) => void\n hidden?: boolean\n isPastDisabled?: boolean\n weekDayNames: [\n mon: string,\n tue: string,\n wed: string,\n thu: string,\n fri: string,\n sat: string,\n sun: string,\n ]\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n const {\n weekInfo: {firstDay: weekStartDay},\n } = useCurrentLocale()\n\n let weekDayNames: Array<string> = props.weekDayNames\n if (weekStartDay === 7) {\n weekDayNames = [props.weekDayNames[6], ...props.weekDayNames.slice(0, 6)]\n } else if (weekStartDay === 6) {\n weekDayNames = [...props.weekDayNames.slice(5), ...props.weekDayNames.slice(0, 5)]\n }\n\n return (\n <Box aria-hidden={props.hidden || false} data-ui=\"CalendarMonth\">\n <Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {weekDayNames.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {useWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, new Date())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n onSelect={props.onSelect}\n selected={selected}\n isPastDisabled={props.isPastDisabled}\n />\n )\n }),\n )}\n </Grid>\n </Box>\n )\n}\n","export const features = {\n dayPresets: false,\n timePresets: false,\n}\n","import {TextInput, type TextInputProps} from '@sanity/ui'\nimport {\n type ChangeEvent,\n type FocusEvent,\n type HTMLProps,\n type KeyboardEvent,\n type SyntheticEvent,\n useCallback,\n useState,\n type RefAttributes,\n} from 'react'\n\n/**\n * A TextInput that only emit onChange when it has to\n * By default it will only emit onChange when: 1) user hits enter or 2) user leaves the\n * field (e.g. onBlur) and the input value at this time is different from the given `value` prop\n */\nexport function LazyTextInput({\n ref: forwardedRef,\n onChange,\n onBlur,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onKeyPress,\n value,\n ...rest\n}: TextInputProps & HTMLProps<HTMLInputElement> & RefAttributes<HTMLInputElement>) {\n const [inputValue, setInputValue] = useState<string>()\n\n const handleChange = useCallback((event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.currentTarget.value)\n }, [])\n\n const checkEvent = useCallback(\n (event: SyntheticEvent<HTMLInputElement>) => {\n const currentValue = event.currentTarget.value\n if (currentValue !== `${value}`) {\n if (onChange) {\n onChange(event as ChangeEvent<HTMLInputElement>)\n }\n }\n setInputValue(undefined)\n },\n [onChange, value],\n )\n\n const handleBlur = useCallback(\n (e: FocusEvent<HTMLInputElement>) => {\n checkEvent(e)\n if (onBlur) {\n onBlur(e)\n }\n },\n [checkEvent, onBlur],\n )\n\n const handleKeyPress = useCallback(\n (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n checkEvent(e)\n }\n if (onKeyPress) {\n onKeyPress(e)\n }\n },\n [checkEvent, onKeyPress],\n )\n\n return (\n <TextInput\n {...rest}\n ref={forwardedRef}\n value={inputValue === undefined ? value : inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onKeyPress={handleKeyPress}\n />\n )\n}\n","import {type TextInputProps} from '@sanity/ui'\nimport {type ChangeEvent, type HTMLProps, useCallback} from 'react'\n\nimport {LazyTextInput} from '../LazyTextInput'\n\nexport const YearInput = (\n props: {onChange: (year: number) => void} & TextInputProps &\n Omit<HTMLProps<HTMLInputElement>, 'onChange' | 'ref'>,\n) => {\n const {onChange, ...restProps} = props\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n },\n [onChange],\n )\n\n return (\n <LazyTextInput\n data-testid=\"date-input\"\n {...restProps}\n fontSize={1}\n onChange={handleChange}\n inputMode=\"numeric\"\n padding={2}\n radius={2}\n />\n )\n}\n","import {TZDate} from '@date-fns/tz'\nimport {ChevronLeftIcon} from '@sanity/icons/ChevronLeft'\nimport {ChevronRightIcon} from '@sanity/icons/ChevronRight'\nimport {EarthGlobeIcon} from '@sanity/icons/EarthGlobe'\nimport {Flex, Select, Text} from '@sanity/ui'\nimport {format} from '@sanity/util/legacyDateFormat'\nimport {addDays} from 'date-fns/addDays'\nimport {addMonths} from 'date-fns/addMonths'\nimport {isValid} from 'date-fns/isValid'\nimport {parse} from 'date-fns/parse'\nimport {setDate} from 'date-fns/setDate'\nimport {setHours} from 'date-fns/setHours'\nimport {setMinutes} from 'date-fns/setMinutes'\nimport {setMonth} from 'date-fns/setMonth'\nimport {setYear} from 'date-fns/setYear'\nimport {\n type ComponentProps,\n type FormEvent,\n type KeyboardEvent,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type RefAttributes,\n} from 'react'\nimport {Grid, Box, type PaddingProps} from 'ui5'\n\nimport {Button} from '../../../../../ui-components/button/Button'\nimport {TooltipDelayGroupProvider} from '../../../../../ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider'\nimport useDialogTimeZone from '../../../../hooks/useDialogTimeZone'\nimport {type TimeZoneScope, useTimeZone} from '../../../../hooks/useTimeZone'\nimport {TimeInput} from '../TimeInput'\nimport {CalendarMonth} from './CalendarMonth'\nimport {ARROW_KEYS, DEFAULT_TIME_PRESETS} from './constants'\nimport {features} from './features'\nimport {type CalendarLabels, type MonthNames} from './types'\nimport {formatTime} from './utils'\nimport {YearInput} from './YearInput'\n\nexport const MONTH_PICKER_VARIANT = {\n select: 'select',\n carousel: 'carousel',\n} as const\n\nexport type CalendarProps = Omit<ComponentProps<'div'>, 'onSelect'> & {\n selectTime?: boolean\n /**\n * Use UTC date for the value, the calendar will display it in the timezone scope.\n */\n value: Date\n timeStep?: number\n onSelect: (date: Date) => void\n labels: CalendarLabels\n monthPickerVariant?: (typeof MONTH_PICKER_VARIANT)[keyof typeof MONTH_PICKER_VARIANT]\n padding?: PaddingProps['padding']\n showTimeZone?: boolean\n isPastDisabled?: boolean\n timeZoneScope: TimeZoneScope\n onTimeZoneOpen?: () => void\n}\n\n// This is used to maintain focus on a child element of the calendar-grid between re-renders\n// When using arrow keys to move focus from a day in one month to another we are setting focus at the button for the day\n// after it has changed but *only* if we *already* had focus inside the calendar grid (e.g not if focus was on the \"next\n// year\" button, or any of the other controls)\n// When moving from the last day of a month that displays 6 weeks in the grid to a month that displays 5 weeks, current\n// focus gets lost on render, so this provides us with a stable element to help us preserve focus on a child element of\n// the calendar grid between re-renders\nconst PRESERVE_FOCUS_ELEMENT = (\n <span\n data-preserve-focus\n style={{overflow: 'hidden', position: 'absolute', outline: 'none'}}\n tabIndex={-1}\n />\n)\n\n// This buttons use a specific styling, given they are intended to be aligned with the select elements.\nconst CALENDAR_ICON_BUTTON_PROPS = {\n padding: 2,\n}\n\nexport function Calendar(props: CalendarProps & RefAttributes<HTMLDivElement>) {\n const {\n ref: forwardedRef,\n selectTime,\n value,\n timeStep = 1,\n onSelect,\n labels,\n isPastDisabled,\n monthPickerVariant = 'select',\n padding = 2,\n showTimeZone = false,\n timeZoneScope,\n onTimeZoneOpen,\n ...restProps\n } = props\n\n const {timeZone, zoneDateToUtc, utcToCurrentZoneDate} = useTimeZone(timeZoneScope)\n const currentTzDate = useMemo(() => utcToCurrentZoneDate(value), [utcToCurrentZoneDate, value])\n const [focusedDate, setFocusedDate] = useState<Date>(value)\n\n const [displayMonth, displayYear] = useMemo(() => {\n return [\n // month is 0-indexed\n Number(format(focusedDate, 'MM', {timeZone: timeZone?.name})) - 1,\n Number(format(focusedDate, 'YYYY', {timeZone: timeZone?.name})),\n ]\n }, [focusedDate, timeZone?.name])\n\n const {DialogTimeZone, dialogProps, dialogTimeZoneShow} = useDialogTimeZone(timeZoneScope)\n const handleTimeZoneOpen = onTimeZoneOpen ?? dialogTimeZoneShow\n\n const setFocusedDateMonth = useCallback(\n (month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1)),\n [focusedDate, setFocusedDate],\n )\n\n const handleFocusedMonthChange = useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value)),\n [setFocusedDateMonth],\n )\n\n const moveFocusedDate = useCallback(\n (by: number) => setFocusedDate(addMonths(focusedDate, by)),\n [focusedDate, setFocusedDate],\n )\n\n const setFocusedDateYear = useCallback(\n (year: number) => setFocusedDate(setYear(focusedDate, year)),\n [focusedDate, setFocusedDate],\n )\n\n const handleDateChange = useCallback(\n (date: Date) => {\n const newDate = setMinutes(\n setHours(date, currentTzDate.getHours()),\n currentTzDate.getMinutes(),\n )\n if (!timeZone) {\n onSelect(newDate)\n return\n }\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newDate)\n onSelect(utcDate)\n },\n [onSelect, currentTzDate, timeZone, zoneDateToUtc],\n )\n\n const handleTimeChange = useCallback(\n (hours: number, mins: number) => {\n if (!timeZone) {\n onSelect(setHours(setMinutes(currentTzDate, mins), hours))\n return\n }\n // Get the date in the timezone\n const zonedDate = new TZDate(currentTzDate, timeZone.name)\n const newZonedDate = setHours(setMinutes(zonedDate, mins), hours)\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newZonedDate)\n onSelect(utcDate)\n },\n [onSelect, currentTzDate, timeZone, zoneDateToUtc],\n )\n\n const timeFromDate = useMemo(\n () => format(currentTzDate, 'HH:mm', {timeZone: timeZone?.name}),\n [currentTzDate, timeZone?.name],\n )\n const [timeValue, setTimeValue] = useState<string | undefined>(timeFromDate)\n\n useEffect(() => {\n // The change is coming from another source, so we need to update the timeValue to the new value.\n // oxlint-disable-next-line react/no-deriving-state-in-effects, react/set-state-in-effect -- pre-existing violation, to be fixed in a follow-up\n setTimeValue(timeFromDate)\n }, [timeFromDate])\n\n const handleTimeChangeInputChange = useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLInputElement>) => {\n const nextValue = event.currentTarget.value\n if (nextValue) {\n // avoids native time input segment navigation resetting while typing.\n setTimeValue(nextValue)\n const date = parse(nextValue, 'HH:mm', new Date())\n if (!isValid(date)) {\n return\n }\n handleTimeChange(date.getHours(), date.getMinutes())\n } else {\n // Setting the timeValue to undefined will let the input behave correctly as a time input while the user types.\n // This means, that until it has a valid value the time input input won't emit a new onChange event.\n // but we cannot send the undefined value to the handleTimeChange, because it expects a valid date.\n setTimeValue(undefined)\n }\n },\n [handleTimeChange],\n )\n\n const ref = useRef<HTMLDivElement | null>(null)\n\n useImperativeHandle<HTMLDivElement | null, HTMLDivElement | null>(forwardedRef, () => ref.current)\n\n const focusCurrentWeekDay = useCallback(() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }, [ref])\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n const target = event.currentTarget\n event.preventDefault()\n if (target.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n setFocusedDate(addDays(focusedDate, -7))\n }\n if (event.key === 'ArrowDown') {\n setFocusedDate(addDays(focusedDate, 7))\n }\n if (event.key === 'ArrowLeft') {\n setFocusedDate(addDays(focusedDate, -1))\n }\n if (event.key === 'ArrowRight') {\n setFocusedDate(addDays(focusedDate, 1))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n },\n [ref, focusCurrentWeekDay, focusedDate],\n )\n\n useEffect(() => {\n focusCurrentWeekDay()\n }, [focusCurrentWeekDay])\n\n useEffect(() => {\n const currentFocusInCalendarGrid = document.activeElement?.matches(\n '[data-calendar-grid], [data-calendar-grid] [data-preserve-focus]',\n )\n if (\n // Only move focus if it's currently in the calendar grid\n currentFocusInCalendarGrid\n ) {\n focusCurrentWeekDay()\n }\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }, [ref, focusCurrentWeekDay, focusedDate])\n\n const handleYesterdayClick = useCallback(\n () => handleDateChange(addDays(new Date(), -1)),\n [handleDateChange],\n )\n\n const handleTodayClick = useCallback(() => handleDateChange(new Date()), [handleDateChange])\n\n const handleTomorrowClick = useCallback(\n () => handleDateChange(addDays(new Date(), 1)),\n [handleDateChange],\n )\n\n const monthPicker = useMemo(() => {\n if (monthPickerVariant === 'carousel') {\n return (\n <Flex\n align=\"center\"\n paddingLeft={4}\n style={{\n borderBottom: '1px solid var(--card-border-color)',\n minHeight: `55px`,\n position: 'sticky',\n top: 0,\n }}\n >\n <Flex align=\"center\" flex={1} justify=\"space-between\">\n <Flex align=\"center\" flex={1}>\n <Text weight=\"medium\" size={1}>\n {labels.monthNames[(focusedDate || new Date())?.getMonth()]}{' '}\n {(focusedDate || new Date())?.getFullYear()}\n </Text>\n </Flex>\n\n <Flex paddingRight={3} gap={2}>\n <TooltipDelayGroupProvider>\n <Button\n icon={ChevronLeftIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(-1)}\n data-testid=\"calendar-prev-month\"\n tooltipProps={{content: 'Previous month'}}\n />\n <Button\n icon={ChevronRightIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(1)}\n data-testid=\"calendar-next-month\"\n tooltipProps={{content: 'Next month'}}\n />\n </TooltipDelayGroupProvider>\n </Flex>\n </Flex>\n </Flex>\n )\n }\n\n return (\n <Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n onChange={handleFocusedMonthChange}\n monthNames={labels.monthNames}\n value={displayMonth}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n labels={{\n goToNextYear: labels.goToNextYear,\n goToPreviousYear: labels.goToPreviousYear,\n }}\n onChange={setFocusedDateYear}\n value={displayYear}\n />\n </Box>\n </Flex>\n )\n }, [\n focusedDate,\n displayMonth,\n displayYear,\n handleFocusedMonthChange,\n labels.goToNextYear,\n labels.goToPreviousYear,\n labels.monthNames,\n monthPickerVariant,\n moveFocusedDate,\n setFocusedDateYear,\n ])\n\n const handleNowClick = useCallback(() => {\n const now = new Date()\n onSelect(now)\n setFocusedDate(now)\n }, [onSelect])\n\n return (\n <Box data-testid=\"calendar\" data-ui=\"Calendar\" {...restProps} ref={ref}>\n {/* Select date */}\n <Box padding={padding}>\n {/* Day presets */}\n {features.dayPresets && (\n <Grid\n gridTemplateColumns=\"repeat(3, minmax(0, 1fr))\"\n data-ui=\"CalendaryDayPresets\"\n gap={1}\n >\n <Button text={labels.goToYesterday} mode=\"bleed\" onClick={handleYesterdayClick} />\n <Button text={labels.goToToday} mode=\"bleed\" onClick={handleTodayClick} />\n <Button text={labels.goToTomorrow} mode=\"bleed\" onClick={handleTomorrowClick} />\n </Grid>\n )}\n\n {/* Select month and year */}\n {monthPicker}\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginY={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n weekDayNames={labels.weekDayNamesShort}\n date={focusedDate}\n focused={focusedDate}\n onSelect={handleDateChange}\n selected={currentTzDate}\n isPastDisabled={isPastDisabled}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>\n\n <Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex align=\"center\" justify=\"space-between\">\n {/* Select time */}\n {selectTime && (\n <>\n <Flex align=\"center\">\n <TimeInput\n aria-label={labels.selectTime}\n value={timeValue}\n onChange={handleTimeChangeInputChange}\n /**\n * Values received in timeStep are defined in minutes as shown in the docs https://www.sanity.io/docs/studio/datetime-type#timestep-47de7f21-25bc-468d-b925-cd30e2690a7b\n * the input type=\"time\" step is in seconds, so we need to multiply by 60.\n *\n * The UI will show all the minutes anyways, from 0 to 59, but it rounds the value to the nearest step once blurred.\n */\n step={timeStep * 60}\n />\n <Box marginLeft={2}>\n <Button text={labels.setToCurrentTime} mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {showTimeZone && (\n <Button\n icon={EarthGlobeIcon}\n mode=\"bleed\"\n size=\"default\"\n text={`${timeZone?.abbreviation}`}\n onClick={handleTimeZoneOpen}\n />\n )}\n\n {features.timePresets && (\n <Flex direction=\"row\" justify=\"center\" align=\"center\" style={{marginTop: 5}}>\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n const text = formatTime(hours, minutes)\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n text={text}\n aria-label={labels.setToTimePreset(text, currentTzDate)}\n />\n )\n })}\n </Flex>\n )}\n </>\n )}\n {showTimeZone && !onTimeZoneOpen && DialogTimeZone && <DialogTimeZone {...dialogProps} />}\n </Flex>\n </Box>\n </Box>\n )\n}\n\nfunction CalendarTimePresetButton(props: {\n 'hours': number\n 'minutes': number\n 'onTimeChange': (hours: number, minutes: number) => void\n 'aria-label': string\n 'text': string\n}) {\n const {hours, minutes, text, onTimeChange} = props\n\n const handleClick = useCallback(() => {\n onTimeChange(hours, minutes)\n }, [hours, minutes, onTimeChange])\n\n return <Button text={text} aria-label={props['aria-label']} mode=\"bleed\" onClick={handleClick} />\n}\n\nfunction CalendarMonthSelect(props: {\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onChange: (e: FormEvent<HTMLSelectElement>) => void\n value?: number\n monthNames: MonthNames\n}) {\n const {onChange, value, monthNames} = props\n\n return (\n <Flex flex={1} gap={1}>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <Select fontSize={1} radius={2} value={value} onChange={onChange} padding={2}>\n {monthNames.map((monthName, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {monthName}\n </option>\n ))}\n </Select>\n </Box>\n </Flex>\n )\n}\n\nfunction CalendarYearSelect(props: {\n moveFocusedDate: (by: number) => void\n onChange: (year: number) => void\n value?: number\n labels: {goToNextYear: string; goToPreviousYear: string}\n}) {\n const {moveFocusedDate, onChange, value, labels} = props\n\n const handlePrevYearClick = useCallback(() => moveFocusedDate(-12), [moveFocusedDate])\n\n const handleNextYearClick = useCallback(() => moveFocusedDate(12), [moveFocusedDate])\n\n return (\n <Flex gap={1}>\n <Button\n aria-label={labels.goToPreviousYear}\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n tooltipProps={{content: 'Previous year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />\n <YearInput value={value} onChange={onChange} radius={0} style={{width: 48}} />\n <Button\n aria-label={labels.goToNextYear}\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n tooltipProps={{content: 'Next year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />\n </Flex>\n )\n}\n","import {type ComponentProps, useCallback, useMemo, type RefAttributes} from 'react'\n\nimport {type TimeZoneScope} from '../../../hooks/useTimeZone'\nimport {Calendar, type CalendarProps} from './calendar/Calendar'\nimport {type CalendarLabels} from './calendar/types'\n\nexport function DatePicker(\n props: Omit<ComponentProps<'div'>, 'onChange'> & {\n value?: Date\n onChange: (nextDate: Date) => void\n selectTime?: boolean\n timeStep?: number\n calendarLabels: CalendarLabels\n monthPickerVariant?: CalendarProps['monthPickerVariant']\n padding?: CalendarProps['padding']\n showTimeZone?: boolean\n isPastDisabled?: boolean\n timeZoneScope: TimeZoneScope\n onTimeZoneOpen?: () => void\n } & RefAttributes<HTMLDivElement>,\n) {\n const {\n ref,\n value: _value,\n onChange,\n calendarLabels,\n padding = 2,\n showTimeZone = false,\n timeZoneScope,\n onTimeZoneOpen,\n ...rest\n } = props\n\n const value = useMemo(() => {\n if (_value) return _value\n const now = new Date()\n // If no value is provided initialize the date with seconds and milliseconds set to 0\n now.setSeconds(0, 0)\n return now\n }, [_value])\n\n const handleSelect = useCallback(\n (nextDate: Date) => {\n onChange(nextDate)\n },\n [onChange],\n )\n\n return (\n <Calendar\n {...rest}\n labels={calendarLabels}\n ref={ref}\n value={value}\n onSelect={handleSelect}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={onTimeZoneOpen}\n />\n )\n}\n","import {CalendarIcon} from '@sanity/icons/Calendar'\nimport {Card, Flex, LayerProvider, Text, useClickOutsideEvent, useLayer} from '@sanity/ui'\nimport {isPast} from 'date-fns/isPast'\nimport {\n type FocusEvent,\n type KeyboardEvent,\n type ReactNode,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type RefAttributes,\n} from 'react'\nimport FocusLock from 'react-focus-lock'\nimport {Box} from 'ui5'\n\nimport {Button} from '../../../../ui-components/button/Button'\nimport {Popover} from '../../../../ui-components/popover/Popover'\nimport useDialogTimeZone from '../../../hooks/useDialogTimeZone'\nimport {type TimeZoneScope, useTimeZone} from '../../../hooks/useTimeZone'\nimport {useTranslation} from '../../../i18n/hooks/useTranslation'\nimport {type CalendarProps} from './calendar/Calendar'\nimport {type CalendarLabels} from './calendar/types'\nimport {DatePicker} from './DatePicker'\nimport {LazyTextInput} from './LazyTextInput'\n\nexport interface DateTimeInputProps {\n customValidity?: string\n id?: string\n inputValue?: string\n onChange: (date: Date | null) => void\n onInputChange?: (event: FocusEvent<HTMLInputElement>) => void\n placeholder?: string\n readOnly?: boolean\n selectTime?: boolean\n timeStep?: number\n value?: Date\n calendarLabels: CalendarLabels\n constrainSize?: boolean\n monthPickerVariant?: CalendarProps['monthPickerVariant']\n padding?: CalendarProps['padding']\n disableInput?: boolean\n isPastDisabled?: boolean\n showTimeZone?: boolean\n timeZoneScope: TimeZoneScope\n}\n\nfunction DatePickerPopoverContent({\n popoverRef,\n onClose,\n children,\n}: {\n popoverRef: {current: HTMLDivElement | null}\n onClose: () => void\n children: ReactNode\n}) {\n const {isTopLayer} = useLayer()\n useClickOutsideEvent(isTopLayer && onClose, () => [popoverRef.current])\n\n return <>{children}</>\n}\n\nexport function DateTimeInput(props: DateTimeInputProps & RefAttributes<HTMLInputElement>) {\n const {\n ref: forwardedRef,\n value,\n inputValue,\n onInputChange,\n onChange,\n selectTime,\n timeStep,\n calendarLabels,\n readOnly,\n constrainSize = true,\n monthPickerVariant,\n customValidity,\n padding,\n disableInput,\n isPastDisabled,\n showTimeZone = false,\n timeZoneScope,\n ...rest\n } = props\n const {t} = useTranslation()\n const popoverRef = useRef<HTMLDivElement | null>(null)\n const ref = useRef<HTMLInputElement | null>(null)\n const buttonRef = useRef(null)\n const {zoneDateToUtc} = useTimeZone(timeZoneScope)\n const {\n DialogTimeZone,\n dialogProps,\n dialogTimeZoneShow,\n hide: dialogTimeZoneHide,\n } = useDialogTimeZone(timeZoneScope)\n\n const [referenceElement, setReferenceElement] = useState<HTMLInputElement | null>(null)\n\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(\n forwardedRef,\n () => ref.current,\n )\n\n /**\n * Setting referenceElement in effect makes sure it's up to date after the initial render\n * cycle - avoiding referenceElement used byPopover from being out of sync with render state\n */\n useEffect(() => setReferenceElement(ref.current), [])\n\n const [isPickerOpen, setPickerOpen] = useState(false)\n const handleClose = useCallback(() => setPickerOpen(false), [])\n\n const handleDeactivation = useCallback(() => {\n ref.current?.focus()\n ref.current?.select()\n }, [])\n\n const handleKeyUp = useCallback((e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }, [])\n\n const handleClick = useCallback(() => setPickerOpen(true), [])\n\n // The popover must close before the timezone dialog opens because\n // react-focus-lock (used by the popover) and Dialog's tab-sentinel focus\n // trapping are incompatible when both are mounted simultaneously -\n // react-focus-lock intercepts focus and pulls it back into the popover,\n // breaking keyboard navigation in the dialog.\n const handleTimeZoneOpen = useCallback(() => {\n setPickerOpen(false)\n dialogTimeZoneShow()\n }, [dialogTimeZoneShow])\n\n const handleTimeZoneClose = useCallback(() => {\n dialogTimeZoneHide()\n setPickerOpen(true)\n }, [dialogTimeZoneHide])\n\n const isDateInPastWarningShown = useMemo(\n () => inputValue && isPastDisabled && isPast(zoneDateToUtc(new Date(inputValue))),\n [inputValue, isPastDisabled, zoneDateToUtc],\n )\n\n const suffix = readOnly ? null : (\n <Flex style={{padding: '5px'}}>\n <Button\n disabled={readOnly}\n aria-label={calendarLabels.ariaLabel}\n ref={buttonRef}\n icon={CalendarIcon}\n mode=\"bleed\"\n onClick={handleClick}\n style={{display: 'block'}}\n data-testid=\"select-date-button\"\n tooltipProps={{content: calendarLabels.tooltipText}}\n />\n </Flex>\n )\n\n return (\n <>\n <LazyTextInput\n ref={ref}\n data-testid=\"date-input\"\n {...rest}\n readOnly={disableInput || readOnly}\n value={inputValue}\n onChange={onInputChange}\n customValidity={customValidity}\n suffix={\n isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize={constrainSize}\n data-testid=\"date-input-dialog\"\n referenceElement={referenceElement}\n portal\n content={\n <DatePickerPopoverContent popoverRef={popoverRef} onClose={handleClose}>\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n {isDateInPastWarningShown && (\n <Card margin={1} padding={2} radius={2} shadow={1} tone=\"critical\">\n <Text size={1}>{t('inputs.dateTime.past-date-warning')}</Text>\n </Card>\n )}\n <DatePicker\n monthPickerVariant={monthPickerVariant}\n calendarLabels={calendarLabels}\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n isPastDisabled={isPastDisabled}\n onChange={onChange}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={handleTimeZoneOpen}\n />\n </FocusLock>\n </Box>\n </DatePickerPopoverContent>\n }\n open\n placement=\"bottom\"\n ref={popoverRef}\n >\n <>{suffix}</>\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )\n }\n />\n {showTimeZone && DialogTimeZone && (\n <DialogTimeZone {...dialogProps} onClose={handleTimeZoneClose} />\n )}\n </>\n )\n}\n","import {type CalendarLabels} from '../../../components/inputs/DateInputs/calendar/types'\n\nexport function isValidDate(date: Date): boolean {\n return date instanceof Date && !isNaN(date.valueOf())\n}\n\n/**\n * @internal\n */\nexport function getCalendarLabels(\n t: (key: string, values?: Record<string, unknown>) => string,\n): CalendarLabels {\n return {\n ariaLabel: t('calendar.button.aria-label'),\n goToTomorrow: t('calendar.action.go-to-tomorrow'),\n goToToday: t('calendar.action.go-to-today'),\n goToYesterday: t('calendar.action.go-to-yesterday'),\n goToNextMonth: t('calendar.action.go-to-next-month'),\n goToPreviousMonth: t('calendar.action.go-to-previous-month'),\n goToNextYear: t('calendar.action.go-to-next-year'),\n goToPreviousYear: t('calendar.action.go-to-previous-year'),\n setToCurrentTime: t('calendar.action.set-to-current-time'),\n selectTime: t('calendar.action.select-time'),\n tooltipText: t('calendar.button.tooltip-text'),\n monthNames: [\n t('calendar.month-names.january'),\n t('calendar.month-names.february'),\n t('calendar.month-names.march'),\n t('calendar.month-names.april'),\n t('calendar.month-names.may'),\n t('calendar.month-names.june'),\n t('calendar.month-names.july'),\n t('calendar.month-names.august'),\n t('calendar.month-names.september'),\n t('calendar.month-names.october'),\n t('calendar.month-names.november'),\n t('calendar.month-names.december'),\n ],\n weekDayNamesShort: [\n t('calendar.weekday-names.short.monday'),\n t('calendar.weekday-names.short.tuesday'),\n t('calendar.weekday-names.short.wednesday'),\n t('calendar.weekday-names.short.thursday'),\n t('calendar.weekday-names.short.friday'),\n t('calendar.weekday-names.short.saturday'),\n t('calendar.weekday-names.short.sunday'),\n ],\n setToTimePreset: (time, date) => t('calendar.action.set-to-time-preset', {time, date}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,SAAgB,mBACd,SACA,UAA2C,E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QAAQ,CAAC;AACtD;;;;AAKA,SAAgB,kBACd,GACgB;CAChB,OAAO;EACL,WAAW,EAAE,4BAA4B;EACzC,cAAc,EAAE,gCAAgC;EAChD,WAAW,EAAE,6BAA6B;EAC1C,eAAe,EAAE,iCAAiC;EAClD,eAAe,EAAE,kCAAkC;EACnD,mBAAmB,EAAE,sCAAsC;EAC3D,cAAc,EAAE,iCAAiC;EACjD,kBAAkB,EAAE,qCAAqC;EACzD,kBAAkB,EAAE,qCAAqC;EACzD,YAAY,EAAE,6BAA6B;EAC3C,aAAa,EAAE,8BAA8B;EAC7C,YAAY;GACV,EAAE,8BAA8B;GAChC,EAAE,+BAA+B;GACjC,EAAE,4BAA4B;GAC9B,EAAE,4BAA4B;GAC9B,EAAE,0BAA0B;GAC5B,EAAE,2BAA2B;GAC7B,EAAE,2BAA2B;GAC7B,EAAE,6BAA6B;GAC/B,EAAE,gCAAgC;GAClC,EAAE,8BAA8B;GAChC,EAAE,+BAA+B;GACjC,EAAE,+BAA+B;EACnC;EACA,mBAAmB;GACjB,EAAE,qCAAqC;GACvC,EAAE,sCAAsC;GACxC,EAAE,wCAAwC;GAC1C,EAAE,uCAAuC;GACzC,EAAE,qCAAqC;GACvC,EAAE,uCAAuC;GACzC,EAAE,qCAAqC;EACzC;EACA,kBAAkB,MAAM,SAAS,EAAE,sCAAsC;GAAC;GAAM;EAAI,CAAC;CACvF;AACF"}
|
|
1
|
+
{"version":3,"file":"utils-CT034e4q.js","names":["t('time-zone.dialog-info.scheduled-publishing')","t('time-zone.dialog-info.content-releases')","t('time-zone.dialog-info.input')","{\n scheduledPublishing: t('time-zone.dialog-info.scheduled-publishing'),\n contentReleases: t('time-zone.dialog-info.content-releases'),\n input: t('time-zone.dialog-info.input'),\n }","useMemo(\n (): Record<TimeZoneScopeType, ReturnType<typeof t>> => ({\n scheduledPublishing: t('time-zone.dialog-info.scheduled-publishing'),\n contentReleases: t('time-zone.dialog-info.content-releases'),\n input: t('time-zone.dialog-info.input'),\n }),\n [t],\n )","(value: string) => {\n if (!value) {\n setSelectedTz(undefined)\n return\n }\n setShowAllOptions(false)\n setSelectedTz(getTimeZone(value))\n }","useCallback(\n (value: string) => {\n if (!value) {\n setSelectedTz(undefined)\n return\n }\n setShowAllOptions(false)\n setSelectedTz(getTimeZone(value))\n },\n [getTimeZone],\n )","(newQuery: string | null) => {\n if (newQuery) {\n setShowAllOptions(false)\n }\n }","useCallback((newQuery: string | null) => {\n if (newQuery) {\n setShowAllOptions(false)\n }\n }, [])","() => {\n setShowAllOptions(true)\n }","useCallback(() => {\n setShowAllOptions(true)\n }, [])","() => setSelectedTz(getLocalTimeZone())","useCallback(\n () => setSelectedTz(getLocalTimeZone()),\n [getLocalTimeZone],\n )","() => {\n if (selectedTz) {\n setTimeZone(selectedTz)\n }\n onClose?.()\n }","useCallback(() => {\n if (selectedTz) {\n setTimeZone(selectedTz)\n }\n onClose?.()\n }, [onClose, selectedTz, setTimeZone])","getLocalTimeZone()","useCallback((option: NormalizedTimeZone) => {\n return (\n <Card as=\"button\" padding={3}>\n <Text size={1} textOverflow=\"ellipsis\">\n <TimeZoneCitySpan>{option.city}</TimeZoneCitySpan>\n <TimeZoneOffsetSpan>\n {' '}\n ({'GMT'}\n {option.offset})\n </TimeZoneOffsetSpan>\n\n <TimeZoneAlternativeNameSpan>{option.alternativeName}</TimeZoneAlternativeNameSpan>\n </Text>\n </Card>\n )\n }, [])","useCallback((_value: string, option?: NormalizedTimeZone) => {\n if (!option) return ''\n return `${option.alternativeName} (${option.namePretty})`\n }, [])","(filterQuery: string, option: NormalizedTimeZone) => {\n // Always show all options if dropdown button was clicked\n // Otherwise use standard filtering\n if (showAllOptions || filterQuery === '') return true\n const searchText = `${option.city} (GMT${option.offset}) ${option.alternativeName}`\n return searchText.toLowerCase().includes(filterQuery.toLowerCase())\n }","option","useCallback(\n (filterQuery: string, option: NormalizedTimeZone) => {\n // Always show all options if dropdown button was clicked\n // Otherwise use standard filtering\n if (showAllOptions || filterQuery === '') return true\n const searchText = `${option.city} (GMT${option.offset}) ${option.alternativeName}`\n return searchText.toLowerCase().includes(filterQuery.toLowerCase())\n },\n [showAllOptions],\n )","{\n confirmButton: {\n text: 'Update time zone',\n disabled: !isDirty || !selectedTz,\n onClick: handleTimeZoneUpdate,\n tone: 'primary',\n },\n }","!isDirty || !selectedTz","<Text size={1}>{timeZoneScopeTypeToLabel[timeZoneScope.type]}</Text>","timeZoneScopeTypeToLabel[timeZoneScope.type]","t('time-zone.time-zone')","<Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>","isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )","<Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>","!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )","<Flex align=\"center\" justify=\"space-between\">\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>\n {!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )}\n </Flex>","{onClick: handleAutocompleteOpenButtonClick}","t('time-zone.action.search-for-timezone-placeholder')","{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }","<Autocomplete\n fontSize={2}\n icon={SearchIcon}\n id=\"timezone\"\n onChange={handleTimeZoneChange}\n onQueryChange={handleQueryChange}\n openButton={{onClick: handleAutocompleteOpenButtonClick}}\n options={allTimeZones}\n padding={4}\n filterOption={filterOption}\n placeholder={t('time-zone.action.search-for-timezone-placeholder')}\n popover={{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }}\n renderOption={renderOption}\n renderValue={renderValue}\n tabIndex={-1}\n value={selectedTz?.value}\n />","selectedTz?.value","<Stack gap={3}>\n <Flex align=\"center\" justify=\"space-between\">\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>\n {!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )}\n </Flex>\n\n <Autocomplete\n fontSize={2}\n icon={SearchIcon}\n id=\"timezone\"\n onChange={handleTimeZoneChange}\n onQueryChange={handleQueryChange}\n openButton={{onClick: handleAutocompleteOpenButtonClick}}\n options={allTimeZones}\n padding={4}\n filterOption={filterOption}\n placeholder={t('time-zone.action.search-for-timezone-placeholder')}\n popover={{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }}\n renderOption={renderOption}\n renderValue={renderValue}\n tabIndex={-1}\n value={selectedTz?.value}\n />\n </Stack>","<Stack padding={4} gap={5}>\n <Text size={1}>{timeZoneScopeTypeToLabel[timeZoneScope.type]}</Text>\n <Stack gap={3}>\n <Flex align=\"center\" justify=\"space-between\">\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>\n {!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )}\n </Flex>\n\n <Autocomplete\n fontSize={2}\n icon={SearchIcon}\n id=\"timezone\"\n onChange={handleTimeZoneChange}\n onQueryChange={handleQueryChange}\n openButton={{onClick: handleAutocompleteOpenButtonClick}}\n options={allTimeZones}\n padding={4}\n filterOption={filterOption}\n placeholder={t('time-zone.action.search-for-timezone-placeholder')}\n popover={{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }}\n renderOption={renderOption}\n renderValue={renderValue}\n tabIndex={-1}\n value={selectedTz?.value}\n />\n </Stack>\n </Stack>","<Dialog\n footer={{\n confirmButton: {\n text: 'Update time zone',\n disabled: !isDirty || !selectedTz,\n onClick: handleTimeZoneUpdate,\n tone: 'primary',\n },\n }}\n header=\"Select time zone\"\n id=\"time-zone\"\n onClose={onClose}\n width={1}\n >\n <Stack padding={4} gap={5}>\n <Text size={1}>{timeZoneScopeTypeToLabel[timeZoneScope.type]}</Text>\n <Stack gap={3}>\n <Flex align=\"center\" justify=\"space-between\">\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>\n {!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )}\n </Flex>\n\n <Autocomplete\n fontSize={2}\n icon={SearchIcon}\n id=\"timezone\"\n onChange={handleTimeZoneChange}\n onQueryChange={handleQueryChange}\n openButton={{onClick: handleAutocompleteOpenButtonClick}}\n options={allTimeZones}\n padding={4}\n filterOption={filterOption}\n placeholder={t('time-zone.action.search-for-timezone-placeholder')}\n popover={{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }}\n renderOption={renderOption}\n renderValue={renderValue}\n tabIndex={-1}\n value={selectedTz?.value}\n />\n </Stack>\n </Stack>\n </Dialog>","() => {\n setVisible(false)\n }","useCallback(() => {\n setVisible(false)\n }, [])","() => {\n setVisible(true)\n }","useCallback(() => {\n setVisible(true)\n }, [])","{\n onClose: hide,\n visible,\n timeZoneScope,\n }","{\n DialogTimeZone: visible ? DialogTimeZone : null,\n dialogProps,\n timeZoneScope,\n dialogTimeZoneShow: show,\n hide,\n }","visible ? DialogTimeZone : null","() => {\n onSelect(date)\n }","useCallback(() => {\n onSelect(date)\n }, [date, onSelect])","date.toDateString()","isPastDisabled && !isToday && isPast(date)","date.toDateString().replaceAll(' ', '-')","{textAlign: 'center'}","date.getDate()","<Text\n muted={!selected && !isCurrentMonth}\n size={1}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>","!selected && !isCurrentMonth","isCurrentMonth ? 'medium' : 'regular'","<Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n role=\"button\"\n tabIndex={-1}\n disabled={isPastDisabled && !isToday && isPast(date)}\n onClick={handleClick}\n padding={2}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n data-testid={`calendar-day-${date.toDateString().replaceAll(' ', '-')}`}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n size={1}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>","focused ? 'true' : ''","isToday || selected ? 'primary' : 'default'","`calendar-day-${date.toDateString().replaceAll(' ', '-')}`","<div aria-selected={selected} data-ui=\"CalendarDay\">\n <Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n role=\"button\"\n tabIndex={-1}\n disabled={isPastDisabled && !isToday && isPast(date)}\n onClick={handleClick}\n padding={2}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n data-testid={`calendar-day-${date.toDateString().replaceAll(' ', '-')}`}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n size={1}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>\n </div>","getWeekDaysFromWeekStarts(getWeekStartsOfMonth(date, weekInfo.firstDay)).map(\n (days): Week => ({\n number: getWeek(days[0]),\n days,\n }),\n )","firstDay","(days): Week => ({\n number: getWeek(days[0]),\n days,\n })","{firstDay: weekStartDay}","[props.weekDayNames[6], ...props.weekDayNames.slice(0, 6)]","weekDayNames","[...props.weekDayNames.slice(5), ...props.weekDayNames.slice(0, 5)]","{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}","weekDayNames.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))","(weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n )","useWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, new Date())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n onSelect={props.onSelect}\n selected={selected}\n isPastDisabled={props.isPastDisabled}\n />\n )\n }),\n )","focused","isPastDisabled","onSelect","selected","useWeeksOfMonth(props.date)","(week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, new Date())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n onSelect={props.onSelect}\n selected={selected}\n isPastDisabled={props.isPastDisabled}\n />\n )\n })","<Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {weekDayNames.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {useWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, new Date())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n onSelect={props.onSelect}\n selected={selected}\n isPastDisabled={props.isPastDisabled}\n />\n )\n }),\n )}\n </Grid>","<Box aria-hidden={props.hidden || false} data-ui=\"CalendarMonth\">\n <Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {weekDayNames.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {useWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, new Date())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n onSelect={props.onSelect}\n selected={selected}\n isPastDisabled={props.isPastDisabled}\n />\n )\n }),\n )}\n </Grid>\n </Box>","props.hidden || false","{\n ref: forwardedRef,\n onChange,\n onBlur,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onKeyPress,\n value,\n ...rest\n}: TextInputProps & HTMLProps<HTMLInputElement> & RefAttributes<HTMLInputElement>","(event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.currentTarget.value)\n }","useCallback((event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.currentTarget.value)\n }, [])","(event: SyntheticEvent<HTMLInputElement>) => {\n const currentValue = event.currentTarget.value\n if (currentValue !== `${value}`) {\n if (onChange) {\n onChange(event as ChangeEvent<HTMLInputElement>)\n }\n }\n setInputValue(undefined)\n }","event","useCallback(\n (event: SyntheticEvent<HTMLInputElement>) => {\n const currentValue = event.currentTarget.value\n if (currentValue !== `${value}`) {\n if (onChange) {\n onChange(event as ChangeEvent<HTMLInputElement>)\n }\n }\n setInputValue(undefined)\n },\n [onChange, value],\n )","(e: FocusEvent<HTMLInputElement>) => {\n checkEvent(e)\n if (onBlur) {\n onBlur(e)\n }\n }","useCallback(\n (e: FocusEvent<HTMLInputElement>) => {\n checkEvent(e)\n if (onBlur) {\n onBlur(e)\n }\n },\n [checkEvent, onBlur],\n )","(e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n checkEvent(e)\n }\n if (onKeyPress) {\n onKeyPress(e)\n }\n }","e","useCallback(\n (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n checkEvent(e)\n }\n if (onKeyPress) {\n onKeyPress(e)\n }\n },\n [checkEvent, onKeyPress],\n )","<TextInput\n {...rest}\n ref={forwardedRef}\n value={inputValue === undefined ? value : inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onKeyPress={handleKeyPress}\n />","inputValue === undefined ? value : inputValue","(event: ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n }","useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n },\n [onChange],\n )","<LazyTextInput\n data-testid=\"date-input\"\n {...restProps}\n fontSize={1}\n onChange={handleChange}\n inputMode=\"numeric\"\n padding={2}\n radius={2}\n />","timeStep = 1","monthPickerVariant = 'select'","padding = 2","showTimeZone = false","utcToCurrentZoneDate(value)","useMemo(() => utcToCurrentZoneDate(value), [utcToCurrentZoneDate, value])","() => {\n return [\n // month is 0-indexed\n Number(format(focusedDate, 'MM', {timeZone: timeZone?.name})) - 1,\n Number(format(focusedDate, 'YYYY', {timeZone: timeZone?.name})),\n ]\n }","name","useMemo(() => {\n return [\n // month is 0-indexed\n Number(format(focusedDate, 'MM', {timeZone: timeZone?.name})) - 1,\n Number(format(focusedDate, 'YYYY', {timeZone: timeZone?.name})),\n ]\n }, [focusedDate, timeZone?.name])","(month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1))","useCallback(\n (month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1)),\n [focusedDate, setFocusedDate],\n )","(e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value))","useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value)),\n [setFocusedDateMonth],\n )","(by: number) => setFocusedDate(addMonths(focusedDate, by))","useCallback(\n (by: number) => setFocusedDate(addMonths(focusedDate, by)),\n [focusedDate, setFocusedDate],\n )","(year: number) => setFocusedDate(setYear(focusedDate, year))","useCallback(\n (year: number) => setFocusedDate(setYear(focusedDate, year)),\n [focusedDate, setFocusedDate],\n )","(date: Date) => {\n const newDate = setMinutes(\n setHours(date, currentTzDate.getHours()),\n currentTzDate.getMinutes(),\n )\n if (!timeZone) {\n onSelect(newDate)\n return\n }\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newDate)\n onSelect(utcDate)\n }","useCallback(\n (date: Date) => {\n const newDate = setMinutes(\n setHours(date, currentTzDate.getHours()),\n currentTzDate.getMinutes(),\n )\n if (!timeZone) {\n onSelect(newDate)\n return\n }\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newDate)\n onSelect(utcDate)\n },\n [onSelect, currentTzDate, timeZone, zoneDateToUtc],\n )","(hours: number, mins: number) => {\n if (!timeZone) {\n onSelect(setHours(setMinutes(currentTzDate, mins), hours))\n return\n }\n // Get the date in the timezone\n const zonedDate = new TZDate(currentTzDate, timeZone.name)\n const newZonedDate = setHours(setMinutes(zonedDate, mins), hours)\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newZonedDate)\n onSelect(utcDate)\n }","utcDate","useCallback(\n (hours: number, mins: number) => {\n if (!timeZone) {\n onSelect(setHours(setMinutes(currentTzDate, mins), hours))\n return\n }\n // Get the date in the timezone\n const zonedDate = new TZDate(currentTzDate, timeZone.name)\n const newZonedDate = setHours(setMinutes(zonedDate, mins), hours)\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newZonedDate)\n onSelect(utcDate)\n },\n [onSelect, currentTzDate, timeZone, zoneDateToUtc],\n )","format(currentTzDate, 'HH:mm', {timeZone: timeZone?.name})","timeZone?.name","useMemo(\n () => format(currentTzDate, 'HH:mm', {timeZone: timeZone?.name}),\n [currentTzDate, timeZone?.name],\n )","() => {\n // The change is coming from another source, so we need to update the timeValue to the new value.\n // oxlint-disable-next-line react/no-deriving-state-in-effects, react/set-state-in-effect -- pre-existing violation, to be fixed in a follow-up\n setTimeValue(timeFromDate)\n }","[timeFromDate]","(event: FormEvent<HTMLInputElement>) => {\n const nextValue = event.currentTarget.value\n if (nextValue) {\n // avoids native time input segment navigation resetting while typing.\n setTimeValue(nextValue)\n const date = parse(nextValue, 'HH:mm', new Date())\n if (!isValid(date)) {\n return\n }\n handleTimeChange(date.getHours(), date.getMinutes())\n } else {\n // Setting the timeValue to undefined will let the input behave correctly as a time input while the user types.\n // This means, that until it has a valid value the time input input won't emit a new onChange event.\n // but we cannot send the undefined value to the handleTimeChange, because it expects a valid date.\n setTimeValue(undefined)\n }\n }","date","useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLInputElement>) => {\n const nextValue = event.currentTarget.value\n if (nextValue) {\n // avoids native time input segment navigation resetting while typing.\n setTimeValue(nextValue)\n const date = parse(nextValue, 'HH:mm', new Date())\n if (!isValid(date)) {\n return\n }\n handleTimeChange(date.getHours(), date.getMinutes())\n } else {\n // Setting the timeValue to undefined will let the input behave correctly as a time input while the user types.\n // This means, that until it has a valid value the time input input won't emit a new onChange event.\n // but we cannot send the undefined value to the handleTimeChange, because it expects a valid date.\n setTimeValue(undefined)\n }\n },\n [handleTimeChange],\n )","() => ref.current","() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }","useCallback(() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }, [ref])","(event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n const target = event.currentTarget\n event.preventDefault()\n if (target.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n setFocusedDate(addDays(focusedDate, -7))\n }\n if (event.key === 'ArrowDown') {\n setFocusedDate(addDays(focusedDate, 7))\n }\n if (event.key === 'ArrowLeft') {\n setFocusedDate(addDays(focusedDate, -1))\n }\n if (event.key === 'ArrowRight') {\n setFocusedDate(addDays(focusedDate, 1))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n }","event","useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n const target = event.currentTarget\n event.preventDefault()\n if (target.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n setFocusedDate(addDays(focusedDate, -7))\n }\n if (event.key === 'ArrowDown') {\n setFocusedDate(addDays(focusedDate, 7))\n }\n if (event.key === 'ArrowLeft') {\n setFocusedDate(addDays(focusedDate, -1))\n }\n if (event.key === 'ArrowRight') {\n setFocusedDate(addDays(focusedDate, 1))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n },\n [ref, focusCurrentWeekDay, focusedDate],\n )","() => {\n focusCurrentWeekDay()\n }","[focusCurrentWeekDay]","() => {\n const currentFocusInCalendarGrid = document.activeElement?.matches(\n '[data-calendar-grid], [data-calendar-grid] [data-preserve-focus]',\n )\n if (\n // Only move focus if it's currently in the calendar grid\n currentFocusInCalendarGrid\n ) {\n focusCurrentWeekDay()\n }\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }","[ref, focusCurrentWeekDay, focusedDate]","() => handleDateChange(addDays(new Date(), -1))","useCallback(\n () => handleDateChange(addDays(new Date(), -1)),\n [handleDateChange],\n )","() => handleDateChange(new Date())","useCallback(() => handleDateChange(new Date()), [handleDateChange])","() => handleDateChange(addDays(new Date(), 1))","useCallback(\n () => handleDateChange(addDays(new Date(), 1)),\n [handleDateChange],\n )","useMemo(() => {\n if (monthPickerVariant === 'carousel') {\n return (\n <Flex\n align=\"center\"\n paddingLeft={4}\n style={{\n borderBottom: '1px solid var(--card-border-color)',\n minHeight: `55px`,\n position: 'sticky',\n top: 0,\n }}\n >\n <Flex align=\"center\" flex={1} justify=\"space-between\">\n <Flex align=\"center\" flex={1}>\n <Text weight=\"medium\" size={1}>\n {labels.monthNames[(focusedDate || new Date())?.getMonth()]}{' '}\n {(focusedDate || new Date())?.getFullYear()}\n </Text>\n </Flex>\n\n <Flex paddingRight={3} gap={2}>\n <TooltipDelayGroupProvider>\n <Button\n icon={ChevronLeftIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(-1)}\n data-testid=\"calendar-prev-month\"\n tooltipProps={{content: 'Previous month'}}\n />\n <Button\n icon={ChevronRightIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(1)}\n data-testid=\"calendar-next-month\"\n tooltipProps={{content: 'Next month'}}\n />\n </TooltipDelayGroupProvider>\n </Flex>\n </Flex>\n </Flex>\n )\n }\n\n return (\n <Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n onChange={handleFocusedMonthChange}\n monthNames={labels.monthNames}\n value={displayMonth}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n labels={{\n goToNextYear: labels.goToNextYear,\n goToPreviousYear: labels.goToPreviousYear,\n }}\n onChange={setFocusedDateYear}\n value={displayYear}\n />\n </Box>\n </Flex>\n )\n }, [\n focusedDate,\n displayMonth,\n displayYear,\n handleFocusedMonthChange,\n labels.goToNextYear,\n labels.goToPreviousYear,\n labels.monthNames,\n monthPickerVariant,\n moveFocusedDate,\n setFocusedDateYear,\n ])","{\n borderBottom: '1px solid var(--card-border-color)',\n minHeight: `55px`,\n position: 'sticky',\n top: 0,\n }","(focusedDate || new Date())?.getFullYear()","<Flex align=\"center\" flex={1}>\n <Text weight=\"medium\" size={1}>\n {labels.monthNames[(focusedDate || new Date())?.getMonth()]}{' '}\n {(focusedDate || new Date())?.getFullYear()}\n </Text>\n </Flex>","labels.monthNames[(focusedDate || new Date())?.getMonth()]","() => moveFocusedDate(-1)","{content: 'Previous month'}","<Button\n icon={ChevronLeftIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(-1)}\n data-testid=\"calendar-prev-month\"\n tooltipProps={{content: 'Previous month'}}\n />","() => moveFocusedDate(1)","{content: 'Next month'}","<Button\n icon={ChevronRightIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(1)}\n data-testid=\"calendar-next-month\"\n tooltipProps={{content: 'Next month'}}\n />","<Flex paddingRight={3} gap={2}>\n <TooltipDelayGroupProvider>\n <Button\n icon={ChevronLeftIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(-1)}\n data-testid=\"calendar-prev-month\"\n tooltipProps={{content: 'Previous month'}}\n />\n <Button\n icon={ChevronRightIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(1)}\n data-testid=\"calendar-next-month\"\n tooltipProps={{content: 'Next month'}}\n />\n </TooltipDelayGroupProvider>\n </Flex>","<Flex\n align=\"center\"\n paddingLeft={4}\n style={{\n borderBottom: '1px solid var(--card-border-color)',\n minHeight: `55px`,\n position: 'sticky',\n top: 0,\n }}\n >\n <Flex align=\"center\" flex={1} justify=\"space-between\">\n <Flex align=\"center\" flex={1}>\n <Text weight=\"medium\" size={1}>\n {labels.monthNames[(focusedDate || new Date())?.getMonth()]}{' '}\n {(focusedDate || new Date())?.getFullYear()}\n </Text>\n </Flex>\n\n <Flex paddingRight={3} gap={2}>\n <TooltipDelayGroupProvider>\n <Button\n icon={ChevronLeftIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(-1)}\n data-testid=\"calendar-prev-month\"\n tooltipProps={{content: 'Previous month'}}\n />\n <Button\n icon={ChevronRightIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(1)}\n data-testid=\"calendar-next-month\"\n tooltipProps={{content: 'Next month'}}\n />\n </TooltipDelayGroupProvider>\n </Flex>\n </Flex>\n </Flex>","<Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n onChange={handleFocusedMonthChange}\n monthNames={labels.monthNames}\n value={displayMonth}\n />\n </Box>","monthNames","{\n goToNextYear: labels.goToNextYear,\n goToPreviousYear: labels.goToPreviousYear,\n }","goToNextYear","goToPreviousYear","<Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n labels={{\n goToNextYear: labels.goToNextYear,\n goToPreviousYear: labels.goToPreviousYear,\n }}\n onChange={setFocusedDateYear}\n value={displayYear}\n />\n </Box>","<Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n onChange={handleFocusedMonthChange}\n monthNames={labels.monthNames}\n value={displayMonth}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n labels={{\n goToNextYear: labels.goToNextYear,\n goToPreviousYear: labels.goToPreviousYear,\n }}\n onChange={setFocusedDateYear}\n value={displayYear}\n />\n </Box>\n </Flex>","() => {\n const now = new Date()\n onSelect(now)\n setFocusedDate(now)\n }","useCallback(() => {\n const now = new Date()\n onSelect(now)\n setFocusedDate(now)\n }, [onSelect])","features.dayPresets && (\n <Grid\n gridTemplateColumns=\"repeat(3, minmax(0, 1fr))\"\n data-ui=\"CalendaryDayPresets\"\n gap={1}\n >\n <Button text={labels.goToYesterday} mode=\"bleed\" onClick={handleYesterdayClick} />\n <Button text={labels.goToToday} mode=\"bleed\" onClick={handleTodayClick} />\n <Button text={labels.goToTomorrow} mode=\"bleed\" onClick={handleTomorrowClick} />\n </Grid>\n )","goToToday","goToTomorrow","goToYesterday","<CalendarMonth\n weekDayNames={labels.weekDayNamesShort}\n date={focusedDate}\n focused={focusedDate}\n onSelect={handleDateChange}\n selected={currentTzDate}\n isPastDisabled={isPastDisabled}\n />","weekDayNamesShort","<Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginY={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n weekDayNames={labels.weekDayNamesShort}\n date={focusedDate}\n focused={focusedDate}\n onSelect={handleDateChange}\n selected={currentTzDate}\n isPastDisabled={isPastDisabled}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>","<Box padding={padding}>\n {/* Day presets */}\n {features.dayPresets && (\n <Grid\n gridTemplateColumns=\"repeat(3, minmax(0, 1fr))\"\n data-ui=\"CalendaryDayPresets\"\n gap={1}\n >\n <Button text={labels.goToYesterday} mode=\"bleed\" onClick={handleYesterdayClick} />\n <Button text={labels.goToToday} mode=\"bleed\" onClick={handleTodayClick} />\n <Button text={labels.goToTomorrow} mode=\"bleed\" onClick={handleTomorrowClick} />\n </Grid>\n )}\n\n {/* Select month and year */}\n {monthPicker}\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginY={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n weekDayNames={labels.weekDayNamesShort}\n date={focusedDate}\n focused={focusedDate}\n onSelect={handleDateChange}\n selected={currentTzDate}\n isPastDisabled={isPastDisabled}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>","{borderTop: '1px solid var(--card-border-color)'}","selectTime && (\n <>\n <Flex align=\"center\">\n <TimeInput\n aria-label={labels.selectTime}\n value={timeValue}\n onChange={handleTimeChangeInputChange}\n /**\n * Values received in timeStep are defined in minutes as shown in the docs https://www.sanity.io/docs/studio/datetime-type#timestep-47de7f21-25bc-468d-b925-cd30e2690a7b\n * the input type=\"time\" step is in seconds, so we need to multiply by 60.\n *\n * The UI will show all the minutes anyways, from 0 to 59, but it rounds the value to the nearest step once blurred.\n */\n step={timeStep * 60}\n />\n <Box marginLeft={2}>\n <Button text={labels.setToCurrentTime} mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {showTimeZone && (\n <Button\n icon={EarthGlobeIcon}\n mode=\"bleed\"\n size=\"default\"\n text={`${timeZone?.abbreviation}`}\n onClick={handleTimeZoneOpen}\n />\n )}\n\n {features.timePresets && (\n <Flex direction=\"row\" justify=\"center\" align=\"center\" style={{marginTop: 5}}>\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n const text = formatTime(hours, minutes)\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n text={text}\n aria-label={labels.setToTimePreset(text, currentTzDate)}\n />\n )\n })}\n </Flex>\n )}\n </>\n )","labels.selectTime","abbreviation","hours","[hours, minutes]","showTimeZone && !onTimeZoneOpen && DialogTimeZone && <DialogTimeZone {...dialogProps} />","<Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex align=\"center\" justify=\"space-between\">\n {/* Select time */}\n {selectTime && (\n <>\n <Flex align=\"center\">\n <TimeInput\n aria-label={labels.selectTime}\n value={timeValue}\n onChange={handleTimeChangeInputChange}\n /**\n * Values received in timeStep are defined in minutes as shown in the docs https://www.sanity.io/docs/studio/datetime-type#timestep-47de7f21-25bc-468d-b925-cd30e2690a7b\n * the input type=\"time\" step is in seconds, so we need to multiply by 60.\n *\n * The UI will show all the minutes anyways, from 0 to 59, but it rounds the value to the nearest step once blurred.\n */\n step={timeStep * 60}\n />\n <Box marginLeft={2}>\n <Button text={labels.setToCurrentTime} mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {showTimeZone && (\n <Button\n icon={EarthGlobeIcon}\n mode=\"bleed\"\n size=\"default\"\n text={`${timeZone?.abbreviation}`}\n onClick={handleTimeZoneOpen}\n />\n )}\n\n {features.timePresets && (\n <Flex direction=\"row\" justify=\"center\" align=\"center\" style={{marginTop: 5}}>\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n const text = formatTime(hours, minutes)\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n text={text}\n aria-label={labels.setToTimePreset(text, currentTzDate)}\n />\n )\n })}\n </Flex>\n )}\n </>\n )}\n {showTimeZone && !onTimeZoneOpen && DialogTimeZone && <DialogTimeZone {...dialogProps} />}\n </Flex>\n </Box>","<Box data-testid=\"calendar\" data-ui=\"Calendar\" {...restProps} ref={ref}>\n {/* Select date */}\n <Box padding={padding}>\n {/* Day presets */}\n {features.dayPresets && (\n <Grid\n gridTemplateColumns=\"repeat(3, minmax(0, 1fr))\"\n data-ui=\"CalendaryDayPresets\"\n gap={1}\n >\n <Button text={labels.goToYesterday} mode=\"bleed\" onClick={handleYesterdayClick} />\n <Button text={labels.goToToday} mode=\"bleed\" onClick={handleTodayClick} />\n <Button text={labels.goToTomorrow} mode=\"bleed\" onClick={handleTomorrowClick} />\n </Grid>\n )}\n\n {/* Select month and year */}\n {monthPicker}\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginY={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n weekDayNames={labels.weekDayNamesShort}\n date={focusedDate}\n focused={focusedDate}\n onSelect={handleDateChange}\n selected={currentTzDate}\n isPastDisabled={isPastDisabled}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>\n\n <Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex align=\"center\" justify=\"space-between\">\n {/* Select time */}\n {selectTime && (\n <>\n <Flex align=\"center\">\n <TimeInput\n aria-label={labels.selectTime}\n value={timeValue}\n onChange={handleTimeChangeInputChange}\n /**\n * Values received in timeStep are defined in minutes as shown in the docs https://www.sanity.io/docs/studio/datetime-type#timestep-47de7f21-25bc-468d-b925-cd30e2690a7b\n * the input type=\"time\" step is in seconds, so we need to multiply by 60.\n *\n * The UI will show all the minutes anyways, from 0 to 59, but it rounds the value to the nearest step once blurred.\n */\n step={timeStep * 60}\n />\n <Box marginLeft={2}>\n <Button text={labels.setToCurrentTime} mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {showTimeZone && (\n <Button\n icon={EarthGlobeIcon}\n mode=\"bleed\"\n size=\"default\"\n text={`${timeZone?.abbreviation}`}\n onClick={handleTimeZoneOpen}\n />\n )}\n\n {features.timePresets && (\n <Flex direction=\"row\" justify=\"center\" align=\"center\" style={{marginTop: 5}}>\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n const text = formatTime(hours, minutes)\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n text={text}\n aria-label={labels.setToTimePreset(text, currentTzDate)}\n />\n )\n })}\n </Flex>\n )}\n </>\n )}\n {showTimeZone && !onTimeZoneOpen && DialogTimeZone && <DialogTimeZone {...dialogProps} />}\n </Flex>\n </Box>\n </Box>","() => {\n onTimeChange(hours, minutes)\n }","useCallback(() => {\n onTimeChange(hours, minutes)\n }, [hours, minutes, onTimeChange])","<Button text={text} aria-label={props['aria-label']} mode=\"bleed\" onClick={handleClick} />","props['aria-label']","monthNames.map((monthName, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {monthName}\n </option>\n ))","(monthName, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {monthName}\n </option>\n )","<Flex flex={1} gap={1}>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <Select fontSize={1} radius={2} value={value} onChange={onChange} padding={2}>\n {monthNames.map((monthName, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {monthName}\n </option>\n ))}\n </Select>\n </Box>\n </Flex>","() => moveFocusedDate(-12)","useCallback(() => moveFocusedDate(-12), [moveFocusedDate])","() => moveFocusedDate(12)","useCallback(() => moveFocusedDate(12), [moveFocusedDate])","{content: 'Previous year'}","<Button\n aria-label={labels.goToPreviousYear}\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n tooltipProps={{content: 'Previous year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />","{width: 48}","<YearInput value={value} onChange={onChange} radius={0} style={{width: 48}} />","{content: 'Next year'}","<Button\n aria-label={labels.goToNextYear}\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n tooltipProps={{content: 'Next year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />","<Flex gap={1}>\n <Button\n aria-label={labels.goToPreviousYear}\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n tooltipProps={{content: 'Previous year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />\n <YearInput value={value} onChange={onChange} radius={0} style={{width: 48}} />\n <Button\n aria-label={labels.goToNextYear}\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n tooltipProps={{content: 'Next year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />\n </Flex>","padding = 2","showTimeZone = false","useMemo(() => {\n if (_value) return _value\n const now = new Date()\n // If no value is provided initialize the date with seconds and milliseconds set to 0\n now.setSeconds(0, 0)\n return now\n }, [_value])","(nextDate: Date) => {\n onChange(nextDate)\n }","useCallback(\n (nextDate: Date) => {\n onChange(nextDate)\n },\n [onChange],\n )","<Calendar\n {...rest}\n labels={calendarLabels}\n ref={ref}\n value={value}\n onSelect={handleSelect}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={onTimeZoneOpen}\n />","{\n popoverRef,\n onClose,\n children,\n}: {\n popoverRef: {current: HTMLDivElement | null}\n onClose: () => void\n children: ReactNode\n}","() => [popoverRef.current]","popoverRef.current","<>{children}</>","constrainSize = true","showTimeZone = false","() => ref.current","() => setReferenceElement(ref.current)","[]","() => setPickerOpen(false)","useCallback(() => setPickerOpen(false), [])","() => {\n ref.current?.focus()\n ref.current?.select()\n }","useCallback(() => {\n ref.current?.focus()\n ref.current?.select()\n }, [])","(e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }","useCallback((e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }, [])","() => setPickerOpen(true)","useCallback(() => setPickerOpen(true), [])","() => {\n setPickerOpen(false)\n dialogTimeZoneShow()\n }","useCallback(() => {\n setPickerOpen(false)\n dialogTimeZoneShow()\n }, [dialogTimeZoneShow])","() => {\n dialogTimeZoneHide()\n setPickerOpen(true)\n }","useCallback(() => {\n dialogTimeZoneHide()\n setPickerOpen(true)\n }, [dialogTimeZoneHide])","inputValue && isPastDisabled && isPast(zoneDateToUtc(new Date(inputValue)))","useMemo(\n () => inputValue && isPastDisabled && isPast(zoneDateToUtc(new Date(inputValue))),\n [inputValue, isPastDisabled, zoneDateToUtc],\n )","readOnly ? null : (\n <Flex style={{padding: '5px'}}>\n <Button\n disabled={readOnly}\n aria-label={calendarLabels.ariaLabel}\n ref={buttonRef}\n icon={CalendarIcon}\n mode=\"bleed\"\n onClick={handleClick}\n style={{display: 'block'}}\n data-testid=\"select-date-button\"\n tooltipProps={{content: calendarLabels.tooltipText}}\n />\n </Flex>\n )","calendarLabels.tooltipText","isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize={constrainSize}\n data-testid=\"date-input-dialog\"\n referenceElement={referenceElement}\n portal\n content={\n <DatePickerPopoverContent popoverRef={popoverRef} onClose={handleClose}>\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n {isDateInPastWarningShown && (\n <Card margin={1} padding={2} radius={2} shadow={1} tone=\"critical\">\n <Text size={1}>{t('inputs.dateTime.past-date-warning')}</Text>\n </Card>\n )}\n <DatePicker\n monthPickerVariant={monthPickerVariant}\n calendarLabels={calendarLabels}\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n isPastDisabled={isPastDisabled}\n onChange={onChange}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={handleTimeZoneOpen}\n />\n </FocusLock>\n </Box>\n </DatePickerPopoverContent>\n }\n open\n placement=\"bottom\"\n ref={popoverRef}\n >\n <>{suffix}</>\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )","<LazyTextInput\n ref={ref}\n data-testid=\"date-input\"\n {...rest}\n readOnly={disableInput || readOnly}\n value={inputValue}\n onChange={onInputChange}\n customValidity={customValidity}\n suffix={\n isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize={constrainSize}\n data-testid=\"date-input-dialog\"\n referenceElement={referenceElement}\n portal\n content={\n <DatePickerPopoverContent popoverRef={popoverRef} onClose={handleClose}>\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n {isDateInPastWarningShown && (\n <Card margin={1} padding={2} radius={2} shadow={1} tone=\"critical\">\n <Text size={1}>{t('inputs.dateTime.past-date-warning')}</Text>\n </Card>\n )}\n <DatePicker\n monthPickerVariant={monthPickerVariant}\n calendarLabels={calendarLabels}\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n isPastDisabled={isPastDisabled}\n onChange={onChange}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={handleTimeZoneOpen}\n />\n </FocusLock>\n </Box>\n </DatePickerPopoverContent>\n }\n open\n placement=\"bottom\"\n ref={popoverRef}\n >\n <>{suffix}</>\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )\n }\n />","disableInput || readOnly","showTimeZone && DialogTimeZone && (\n <DialogTimeZone {...dialogProps} onClose={handleTimeZoneClose} />\n )","<>\n <LazyTextInput\n ref={ref}\n data-testid=\"date-input\"\n {...rest}\n readOnly={disableInput || readOnly}\n value={inputValue}\n onChange={onInputChange}\n customValidity={customValidity}\n suffix={\n isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize={constrainSize}\n data-testid=\"date-input-dialog\"\n referenceElement={referenceElement}\n portal\n content={\n <DatePickerPopoverContent popoverRef={popoverRef} onClose={handleClose}>\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n {isDateInPastWarningShown && (\n <Card margin={1} padding={2} radius={2} shadow={1} tone=\"critical\">\n <Text size={1}>{t('inputs.dateTime.past-date-warning')}</Text>\n </Card>\n )}\n <DatePicker\n monthPickerVariant={monthPickerVariant}\n calendarLabels={calendarLabels}\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n isPastDisabled={isPastDisabled}\n onChange={onChange}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={handleTimeZoneOpen}\n />\n </FocusLock>\n </Box>\n </DatePickerPopoverContent>\n }\n open\n placement=\"bottom\"\n ref={popoverRef}\n >\n <>{suffix}</>\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )\n }\n />\n {showTimeZone && DialogTimeZone && (\n <DialogTimeZone {...dialogProps} onClose={handleTimeZoneClose} />\n )}\n </>"],"sources":["../src/core/util/versionsUtils.ts","../src/core/components/timeZone/DialogTimeZone.tsx","../src/core/hooks/useDialogTimeZone.ts","../src/core/components/inputs/DateInputs/TimeInput.tsx","../src/core/components/inputs/DateInputs/calendar/CalendarDay.tsx","../src/core/components/inputs/DateInputs/calendar/constants.ts","../src/core/components/inputs/DateInputs/calendar/utils.ts","../src/core/components/inputs/DateInputs/calendar/CalendarMonth.tsx","../src/core/components/inputs/DateInputs/calendar/features.ts","../src/core/components/inputs/DateInputs/LazyTextInput.tsx","../src/core/components/inputs/DateInputs/calendar/YearInput.tsx","../src/core/components/inputs/DateInputs/calendar/Calendar.tsx","../src/core/components/inputs/DateInputs/DatePicker.tsx","../src/core/components/inputs/DateInputs/DateTimeInput.tsx","../src/core/form/inputs/DateInputs/utils.ts"],"sourcesContent":["import {type VersionInfoDocumentStub} from '../releases/store/types'\nimport {isAgentBundleName} from '../store/agent/createAgentBundlesStore'\nimport {getVariantId} from '../variants/tool/util'\nimport {getDraftId, getVersionFromId} from './draftUtils'\n\ntype VariantConstraint =\n | {\n /**\n * Match only the provided variant id.\n *\n * This value **must** be the bare variant id (\"x\", rather than \"_.variants.x\").\n */\n variant: string\n baseVariant?: never\n anyVariant?: never\n }\n | {\n variant?: never\n /**\n * Match only the base variant.\n */\n baseVariant: true\n anyVariant?: never\n }\n | {\n variant?: never\n baseVariant?: never\n /**\n * Match any variant.\n */\n anyVariant: true\n }\n\n/** @beta */\nexport type VersionType = 'draft' | 'published' | 'release' | 'agent'\n\n/**\n * Uses the `_system` field to check if a version is a published version.\n *\n * By default, any published variant will match. Use the constraint options to\n * limit matching to the base variant, or to a particular variant id.\n *\n * @beta\n */\nexport function isPublishedVersion(\n version: VersionInfoDocumentStub,\n options: {constraint: VariantConstraint} = {constraint: {anyVariant: true}},\n): boolean {\n const {constraint} = options\n const isPublished = !isReleaseVersion(version) && typeof version._system.bundleId === 'undefined'\n\n if (!isPublished) {\n return false\n }\n\n if ('variant' in constraint) {\n return (\n isVariantVersion(version) &&\n getVariantId(version._system.variant?._ref ?? '') === constraint.variant\n )\n }\n\n if (constraint.baseVariant) {\n return !isVariantVersion(version) && version._system.group._ref === version._id\n }\n\n if (constraint.anyVariant) {\n return true\n }\n\n return false\n}\n\n/**\n * Uses the `_system` field to check if a version is a draft version.\n *\n * By default, any draft variant will match. Use the constraint options to\n * limit matching to the base variant, or to a particular variant id.\n *\n * @beta\n */\nexport function isDraftVersion(\n version: VersionInfoDocumentStub,\n options: {constraint: VariantConstraint} = {constraint: {anyVariant: true}},\n): boolean {\n const {constraint} = options\n const isDraft = version._system?.bundleId === 'drafts'\n\n if (!isDraft) {\n return false\n }\n\n if ('variant' in constraint) {\n return (\n isVariantVersion(version) &&\n getVariantId(version._system.variant?._ref ?? '') === constraint.variant\n )\n }\n\n if (constraint.baseVariant) {\n return !isVariantVersion(version) && version._id === getDraftId(version._system.group._ref)\n }\n\n if (constraint.anyVariant) {\n return true\n }\n\n return false\n}\n\n/**\n * Uses the _system field to check if a version is a variant version\n * @beta\n */\nexport function isVariantVersion(version: VersionInfoDocumentStub): boolean {\n return Boolean(version._system?.variant)\n}\n\n/**\n * Uses the _system field to check if a version is a release version\n * @beta\n */\nexport function isReleaseVersion(version: VersionInfoDocumentStub): boolean {\n return Boolean(version._system?.release)\n}\n\n/**\n * Uses the _system field to determine the version type of a document.\n * @beta\n */\nexport function readVersionType(\n version: VersionInfoDocumentStub | undefined,\n): VersionType | undefined {\n if (typeof version === 'undefined') {\n return undefined\n }\n\n if (isAgentBundleName(getVersionFromId(version._id))) {\n return 'agent'\n }\n\n if (isPublishedVersion(version)) {\n return 'published'\n }\n\n if (isReleaseVersion(version)) {\n return 'release'\n }\n\n if (isDraftVersion(version)) {\n return 'draft'\n }\n}\n","import {SearchIcon} from '@sanity/icons/Search'\nimport {Card, Flex, Inline, Stack, Text, type Theme} from '@sanity/ui'\nimport {Autocomplete} from '@sanity/ui/autocomplete'\nimport {useCallback, useMemo, useState} from 'react'\nimport {css, styled} from 'styled-components'\n\nimport {Dialog} from '../../../ui-components/dialog/Dialog'\nimport {type TimeZoneScope, type TimeZoneScopeType, useTimeZone} from '../../hooks/useTimeZone'\nimport {useTranslation} from '../../i18n/hooks/useTranslation'\nimport {type NormalizedTimeZone} from '../../studio/timezones/types'\n\nexport interface DialogTimeZoneProps {\n onClose?: () => void\n timeZoneScope: TimeZoneScope\n}\n\n// oxlint-disable-next-line no-deprecated -- will fix in follow up PR\nconst TimeZoneCitySpan = styled.span(({theme}: {theme: Theme}) => {\n return css`\n color: ${theme.sanity.color.base.fg /* oxlint-disable-line no-deprecated -- will fix in follow up PR */};\n font-weight: 500;\n margin-left: 1em;\n `\n})\n\n// oxlint-disable-next-line no-deprecated -- will fix in follow up PR\nconst TimeZoneOffsetSpan = styled.span(({theme}: {theme: Theme}) => {\n return css`\n color: ${theme.sanity.color.muted.default.enabled.fg /* oxlint-disable-line no-deprecated -- will fix in follow up PR */};\n font-weight: 500;\n `\n})\n\n// oxlint-disable-next-line no-deprecated -- will fix in follow up PR\nconst TimeZoneAlternativeNameSpan = styled.span(({theme}: {theme: Theme}) => {\n return css`\n color: ${theme.sanity.color.input.default.readOnly.fg /* oxlint-disable-line no-deprecated -- will fix in follow up PR */};\n float: right;\n `\n})\n\nconst DialogTimeZone = (props: DialogTimeZoneProps) => {\n const {onClose, timeZoneScope} = props\n const {setTimeZone, allTimeZones, timeZone, getLocalTimeZone, getTimeZone} =\n useTimeZone(timeZoneScope)\n const [selectedTz, setSelectedTz] = useState<NormalizedTimeZone | undefined>(timeZone)\n const [showAllOptions, setShowAllOptions] = useState(false)\n const {t} = useTranslation('studio')\n\n const timeZoneScopeTypeToLabel = useMemo(\n (): Record<TimeZoneScopeType, ReturnType<typeof t>> => ({\n scheduledPublishing: t('time-zone.dialog-info.scheduled-publishing'),\n contentReleases: t('time-zone.dialog-info.content-releases'),\n input: t('time-zone.dialog-info.input'),\n }),\n [t],\n )\n\n const handleTimeZoneChange = useCallback(\n (value: string) => {\n if (!value) {\n setSelectedTz(undefined)\n return\n }\n setShowAllOptions(false)\n setSelectedTz(getTimeZone(value))\n },\n [getTimeZone],\n )\n\n const handleQueryChange = useCallback((newQuery: string | null) => {\n if (newQuery) {\n setShowAllOptions(false)\n }\n }, [])\n\n const handleAutocompleteOpenButtonClick = useCallback(() => {\n setShowAllOptions(true)\n }, [])\n\n const handleTimeZoneSelectLocal = useCallback(\n () => setSelectedTz(getLocalTimeZone()),\n [getLocalTimeZone],\n )\n\n const handleTimeZoneUpdate = useCallback(() => {\n if (selectedTz) {\n setTimeZone(selectedTz)\n }\n onClose?.()\n }, [onClose, selectedTz, setTimeZone])\n\n const isDirty = selectedTz?.name !== timeZone.name\n const isLocalTzSelected = useMemo(() => {\n return selectedTz?.name === getLocalTimeZone().name\n }, [getLocalTimeZone, selectedTz?.name])\n\n const renderOption = useCallback((option: NormalizedTimeZone) => {\n return (\n <Card as=\"button\" padding={3}>\n <Text size={1} textOverflow=\"ellipsis\">\n <TimeZoneCitySpan>{option.city}</TimeZoneCitySpan>\n <TimeZoneOffsetSpan>\n {' '}\n ({'GMT'}\n {option.offset})\n </TimeZoneOffsetSpan>\n\n <TimeZoneAlternativeNameSpan>{option.alternativeName}</TimeZoneAlternativeNameSpan>\n </Text>\n </Card>\n )\n }, [])\n const renderValue = useCallback((_value: string, option?: NormalizedTimeZone) => {\n if (!option) return ''\n return `${option.alternativeName} (${option.namePretty})`\n }, [])\n\n const filterOption = useCallback(\n (filterQuery: string, option: NormalizedTimeZone) => {\n // Always show all options if dropdown button was clicked\n // Otherwise use standard filtering\n if (showAllOptions || filterQuery === '') return true\n const searchText = `${option.city} (GMT${option.offset}) ${option.alternativeName}`\n return searchText.toLowerCase().includes(filterQuery.toLowerCase())\n },\n [showAllOptions],\n )\n\n return (\n <Dialog\n footer={{\n confirmButton: {\n text: 'Update time zone',\n disabled: !isDirty || !selectedTz,\n onClick: handleTimeZoneUpdate,\n tone: 'primary',\n },\n }}\n header=\"Select time zone\"\n id=\"time-zone\"\n onClose={onClose}\n width={1}\n >\n <Stack padding={4} gap={5}>\n <Text size={1}>{timeZoneScopeTypeToLabel[timeZoneScope.type]}</Text>\n <Stack gap={3}>\n <Flex align=\"center\" justify=\"space-between\">\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {t('time-zone.time-zone')}\n </Text>\n {isLocalTzSelected && (\n <Text muted size={1}>\n {t('time-zone.local-time')}\n </Text>\n )}\n </Inline>\n {!isLocalTzSelected && (\n <Text size={1} weight=\"medium\">\n <a onClick={handleTimeZoneSelectLocal} style={{cursor: 'pointer'}}>\n {t('time-zone.action.select-local-time-zone')}\n </a>\n </Text>\n )}\n </Flex>\n\n <Autocomplete\n fontSize={2}\n icon={SearchIcon}\n id=\"timezone\"\n onChange={handleTimeZoneChange}\n onQueryChange={handleQueryChange}\n openButton={{onClick: handleAutocompleteOpenButtonClick}}\n options={allTimeZones}\n padding={4}\n filterOption={filterOption}\n placeholder={t('time-zone.action.search-for-timezone-placeholder')}\n popover={{\n // Dialog is portaled to the document root, so its Autocomplete\n // popover should be bounded by document.body rather than any\n // panel-scoped scroll container. Set both boundaries to match the\n // pre-v4 `boundaryElement` behavior.\n floatingBoundary: document.body,\n referenceBoundary: document.body,\n constrainSize: true,\n placement: 'bottom-start',\n }}\n renderOption={renderOption}\n renderValue={renderValue}\n tabIndex={-1}\n value={selectedTz?.value}\n />\n </Stack>\n </Stack>\n </Dialog>\n )\n}\n\nexport default DialogTimeZone\n","import {useCallback, useState} from 'react'\n\nimport DialogTimeZone from '../components/timeZone/DialogTimeZone'\nimport {type TimeZoneScope} from './useTimeZone'\n\nfunction useDialogTimeZone(timeZoneScope: TimeZoneScope) {\n const [visible, setVisible] = useState(false)\n\n const hide = useCallback(() => {\n setVisible(false)\n }, [])\n const show = useCallback(() => {\n setVisible(true)\n }, [])\n\n const dialogProps = {\n onClose: hide,\n visible,\n timeZoneScope,\n }\n\n return {\n DialogTimeZone: visible ? DialogTimeZone : null,\n dialogProps,\n timeZoneScope,\n dialogTimeZoneShow: show,\n hide,\n }\n}\n\nexport default useDialogTimeZone\n","import {TextInput} from '@sanity/ui'\nimport {styled} from 'styled-components'\n\nexport const TimeInput = styled(TextInput).attrs(() => ({\n type: 'time',\n}))`\n line-height: 1;\n`\n","import {Card, Text} from '@sanity/ui'\nimport {isPast} from 'date-fns/isPast'\nimport {useCallback} from 'react'\n\ninterface CalendarDayProps {\n date: Date\n focused?: boolean\n onSelect: (date: Date) => void\n isCurrentMonth?: boolean\n isToday: boolean\n selected?: boolean\n isPastDisabled?: boolean\n}\n\nexport function CalendarDay(props: CalendarDayProps) {\n const {date, focused, isCurrentMonth, isToday, onSelect, selected, isPastDisabled} = props\n\n const handleClick = useCallback(() => {\n onSelect(date)\n }, [date, onSelect])\n\n return (\n <div aria-selected={selected} data-ui=\"CalendarDay\">\n <Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n role=\"button\"\n tabIndex={-1}\n disabled={isPastDisabled && !isToday && isPast(date)}\n onClick={handleClick}\n padding={2}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n data-testid={`calendar-day-${date.toDateString().replaceAll(' ', '-')}`}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n size={1}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>\n </div>\n )\n}\n","export const DEFAULT_MONTH_NAMES = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n]\n\nexport const DEFAULT_WEEK_DAY_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n\nexport const ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']\n\nexport const DEFAULT_TIME_PRESETS = [\n [0, 0],\n [6, 0],\n [12, 0],\n [18, 0],\n [23, 59],\n]\n\n// all weekdays except first\nexport const TAIL_WEEKDAYS = [1, 2, 3, 4, 5, 6]\n","import {addDays} from 'date-fns/addDays'\nimport {eachWeekOfInterval} from 'date-fns/eachWeekOfInterval'\nimport {getWeek} from 'date-fns/getWeek'\nimport {lastDayOfMonth} from 'date-fns/lastDayOfMonth'\nimport {startOfMonth} from 'date-fns/startOfMonth'\n\nimport {useCurrentLocale} from '../../../../i18n/hooks/useLocale'\nimport {DEFAULT_WEEK_DAY_NAMES, TAIL_WEEKDAYS} from './constants'\n\n/**\n * NOTE: `weekStartsOn` uses 1 for Monday, 7 for Sunday. date-fns wants 0 for Sunday, 6 for Saturday.\n */\nconst getWeekStartsOfMonth = (date: Date, weekStartsOn: 1 | 2 | 3 | 4 | 5 | 6 | 7): Date[] => {\n const firstDay = startOfMonth(date)\n return eachWeekOfInterval(\n {\n start: firstDay,\n end: lastDayOfMonth(firstDay),\n },\n {\n weekStartsOn: weekStartsOn === 7 ? 0 : weekStartsOn,\n },\n )\n}\n\nconst getWeekDaysFromWeekStarts = (weekStarts: Date[]): Date[][] => {\n return weekStarts.map((weekStart) => [\n weekStart,\n ...TAIL_WEEKDAYS.map((d) => addDays(weekStart, d)),\n ])\n}\n\ntype Week = {\n number: number\n days: Date[]\n}\n\nexport const useWeeksOfMonth = (date: Date): Week[] => {\n const {weekInfo} = useCurrentLocale()\n return getWeekDaysFromWeekStarts(getWeekStartsOfMonth(date, weekInfo.firstDay)).map(\n (days): Week => ({\n number: getWeek(days[0]),\n days,\n }),\n )\n}\n\nexport const getWeekDayNames = (weekStartsOn: 1 | 2 | 3 | 4 | 5 | 6 | 7): readonly string[] => {\n const firstDayIndex = weekStartsOn % 7\n return [\n ...DEFAULT_WEEK_DAY_NAMES.slice(firstDayIndex),\n ...DEFAULT_WEEK_DAY_NAMES.slice(0, firstDayIndex),\n ]\n}\n\nexport const formatTime = (hours: number, minutes: number): string =>\n `${`${hours}`.padStart(2, '0')}:${`${minutes}`.padStart(2, '0')}`\n","import {Text} from '@sanity/ui'\nimport {isSameDay} from 'date-fns/isSameDay'\nimport {isSameMonth} from 'date-fns/isSameMonth'\nimport {Grid, Box} from 'ui5'\n\nimport {useCurrentLocale} from '../../../../i18n/hooks/useLocale'\nimport {CalendarDay} from './CalendarDay'\nimport {useWeeksOfMonth} from './utils'\n\ninterface CalendarMonthProps {\n date: Date\n focused?: Date\n selected?: Date\n onSelect: (date: Date) => void\n hidden?: boolean\n isPastDisabled?: boolean\n weekDayNames: [\n mon: string,\n tue: string,\n wed: string,\n thu: string,\n fri: string,\n sat: string,\n sun: string,\n ]\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n const {\n weekInfo: {firstDay: weekStartDay},\n } = useCurrentLocale()\n\n let weekDayNames: Array<string> = props.weekDayNames\n if (weekStartDay === 7) {\n weekDayNames = [props.weekDayNames[6], ...props.weekDayNames.slice(0, 6)]\n } else if (weekStartDay === 6) {\n weekDayNames = [...props.weekDayNames.slice(5), ...props.weekDayNames.slice(0, 5)]\n }\n\n return (\n <Box aria-hidden={props.hidden || false} data-ui=\"CalendarMonth\">\n <Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {weekDayNames.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {useWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, new Date())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n onSelect={props.onSelect}\n selected={selected}\n isPastDisabled={props.isPastDisabled}\n />\n )\n }),\n )}\n </Grid>\n </Box>\n )\n}\n","export const features = {\n dayPresets: false,\n timePresets: false,\n}\n","import {TextInput, type TextInputProps} from '@sanity/ui'\nimport {\n type ChangeEvent,\n type FocusEvent,\n type HTMLProps,\n type KeyboardEvent,\n type SyntheticEvent,\n useCallback,\n useState,\n type RefAttributes,\n} from 'react'\n\n/**\n * A TextInput that only emit onChange when it has to\n * By default it will only emit onChange when: 1) user hits enter or 2) user leaves the\n * field (e.g. onBlur) and the input value at this time is different from the given `value` prop\n */\nexport function LazyTextInput({\n ref: forwardedRef,\n onChange,\n onBlur,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onKeyPress,\n value,\n ...rest\n}: TextInputProps & HTMLProps<HTMLInputElement> & RefAttributes<HTMLInputElement>) {\n const [inputValue, setInputValue] = useState<string>()\n\n const handleChange = useCallback((event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.currentTarget.value)\n }, [])\n\n const checkEvent = useCallback(\n (event: SyntheticEvent<HTMLInputElement>) => {\n const currentValue = event.currentTarget.value\n if (currentValue !== `${value}`) {\n if (onChange) {\n onChange(event as ChangeEvent<HTMLInputElement>)\n }\n }\n setInputValue(undefined)\n },\n [onChange, value],\n )\n\n const handleBlur = useCallback(\n (e: FocusEvent<HTMLInputElement>) => {\n checkEvent(e)\n if (onBlur) {\n onBlur(e)\n }\n },\n [checkEvent, onBlur],\n )\n\n const handleKeyPress = useCallback(\n (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n checkEvent(e)\n }\n if (onKeyPress) {\n onKeyPress(e)\n }\n },\n [checkEvent, onKeyPress],\n )\n\n return (\n <TextInput\n {...rest}\n ref={forwardedRef}\n value={inputValue === undefined ? value : inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onKeyPress={handleKeyPress}\n />\n )\n}\n","import {type TextInputProps} from '@sanity/ui'\nimport {type ChangeEvent, type HTMLProps, useCallback} from 'react'\n\nimport {LazyTextInput} from '../LazyTextInput'\n\nexport const YearInput = (\n props: {onChange: (year: number) => void} & TextInputProps &\n Omit<HTMLProps<HTMLInputElement>, 'onChange' | 'ref'>,\n) => {\n const {onChange, ...restProps} = props\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n },\n [onChange],\n )\n\n return (\n <LazyTextInput\n data-testid=\"date-input\"\n {...restProps}\n fontSize={1}\n onChange={handleChange}\n inputMode=\"numeric\"\n padding={2}\n radius={2}\n />\n )\n}\n","import {TZDate} from '@date-fns/tz'\nimport {ChevronLeftIcon} from '@sanity/icons/ChevronLeft'\nimport {ChevronRightIcon} from '@sanity/icons/ChevronRight'\nimport {EarthGlobeIcon} from '@sanity/icons/EarthGlobe'\nimport {Flex, Select, Text} from '@sanity/ui'\nimport {format} from '@sanity/util/legacyDateFormat'\nimport {addDays} from 'date-fns/addDays'\nimport {addMonths} from 'date-fns/addMonths'\nimport {isValid} from 'date-fns/isValid'\nimport {parse} from 'date-fns/parse'\nimport {setDate} from 'date-fns/setDate'\nimport {setHours} from 'date-fns/setHours'\nimport {setMinutes} from 'date-fns/setMinutes'\nimport {setMonth} from 'date-fns/setMonth'\nimport {setYear} from 'date-fns/setYear'\nimport {\n type ComponentProps,\n type FormEvent,\n type KeyboardEvent,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type RefAttributes,\n} from 'react'\nimport {Grid, Box, type PaddingProps} from 'ui5'\n\nimport {Button} from '../../../../../ui-components/button/Button'\nimport {TooltipDelayGroupProvider} from '../../../../../ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider'\nimport useDialogTimeZone from '../../../../hooks/useDialogTimeZone'\nimport {type TimeZoneScope, useTimeZone} from '../../../../hooks/useTimeZone'\nimport {TimeInput} from '../TimeInput'\nimport {CalendarMonth} from './CalendarMonth'\nimport {ARROW_KEYS, DEFAULT_TIME_PRESETS} from './constants'\nimport {features} from './features'\nimport {type CalendarLabels, type MonthNames} from './types'\nimport {formatTime} from './utils'\nimport {YearInput} from './YearInput'\n\nexport const MONTH_PICKER_VARIANT = {\n select: 'select',\n carousel: 'carousel',\n} as const\n\nexport type CalendarProps = Omit<ComponentProps<'div'>, 'onSelect'> & {\n selectTime?: boolean\n /**\n * Use UTC date for the value, the calendar will display it in the timezone scope.\n */\n value: Date\n timeStep?: number\n onSelect: (date: Date) => void\n labels: CalendarLabels\n monthPickerVariant?: (typeof MONTH_PICKER_VARIANT)[keyof typeof MONTH_PICKER_VARIANT]\n padding?: PaddingProps['padding']\n showTimeZone?: boolean\n isPastDisabled?: boolean\n timeZoneScope: TimeZoneScope\n onTimeZoneOpen?: () => void\n}\n\n// This is used to maintain focus on a child element of the calendar-grid between re-renders\n// When using arrow keys to move focus from a day in one month to another we are setting focus at the button for the day\n// after it has changed but *only* if we *already* had focus inside the calendar grid (e.g not if focus was on the \"next\n// year\" button, or any of the other controls)\n// When moving from the last day of a month that displays 6 weeks in the grid to a month that displays 5 weeks, current\n// focus gets lost on render, so this provides us with a stable element to help us preserve focus on a child element of\n// the calendar grid between re-renders\nconst PRESERVE_FOCUS_ELEMENT = (\n <span\n data-preserve-focus\n style={{overflow: 'hidden', position: 'absolute', outline: 'none'}}\n tabIndex={-1}\n />\n)\n\n// This buttons use a specific styling, given they are intended to be aligned with the select elements.\nconst CALENDAR_ICON_BUTTON_PROPS = {\n padding: 2,\n}\n\nexport function Calendar(props: CalendarProps & RefAttributes<HTMLDivElement>) {\n const {\n ref: forwardedRef,\n selectTime,\n value,\n timeStep = 1,\n onSelect,\n labels,\n isPastDisabled,\n monthPickerVariant = 'select',\n padding = 2,\n showTimeZone = false,\n timeZoneScope,\n onTimeZoneOpen,\n ...restProps\n } = props\n\n const {timeZone, zoneDateToUtc, utcToCurrentZoneDate} = useTimeZone(timeZoneScope)\n const currentTzDate = useMemo(() => utcToCurrentZoneDate(value), [utcToCurrentZoneDate, value])\n const [focusedDate, setFocusedDate] = useState<Date>(value)\n\n const [displayMonth, displayYear] = useMemo(() => {\n return [\n // month is 0-indexed\n Number(format(focusedDate, 'MM', {timeZone: timeZone?.name})) - 1,\n Number(format(focusedDate, 'YYYY', {timeZone: timeZone?.name})),\n ]\n }, [focusedDate, timeZone?.name])\n\n const {DialogTimeZone, dialogProps, dialogTimeZoneShow} = useDialogTimeZone(timeZoneScope)\n const handleTimeZoneOpen = onTimeZoneOpen ?? dialogTimeZoneShow\n\n const setFocusedDateMonth = useCallback(\n (month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1)),\n [focusedDate, setFocusedDate],\n )\n\n const handleFocusedMonthChange = useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value)),\n [setFocusedDateMonth],\n )\n\n const moveFocusedDate = useCallback(\n (by: number) => setFocusedDate(addMonths(focusedDate, by)),\n [focusedDate, setFocusedDate],\n )\n\n const setFocusedDateYear = useCallback(\n (year: number) => setFocusedDate(setYear(focusedDate, year)),\n [focusedDate, setFocusedDate],\n )\n\n const handleDateChange = useCallback(\n (date: Date) => {\n const newDate = setMinutes(\n setHours(date, currentTzDate.getHours()),\n currentTzDate.getMinutes(),\n )\n if (!timeZone) {\n onSelect(newDate)\n return\n }\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newDate)\n onSelect(utcDate)\n },\n [onSelect, currentTzDate, timeZone, zoneDateToUtc],\n )\n\n const handleTimeChange = useCallback(\n (hours: number, mins: number) => {\n if (!timeZone) {\n onSelect(setHours(setMinutes(currentTzDate, mins), hours))\n return\n }\n // Get the date in the timezone\n const zonedDate = new TZDate(currentTzDate, timeZone.name)\n const newZonedDate = setHours(setMinutes(zonedDate, mins), hours)\n // Convert to regular Date to save as UTC instead of preserving timezone offset\n const utcDate = zoneDateToUtc(newZonedDate)\n onSelect(utcDate)\n },\n [onSelect, currentTzDate, timeZone, zoneDateToUtc],\n )\n\n const timeFromDate = useMemo(\n () => format(currentTzDate, 'HH:mm', {timeZone: timeZone?.name}),\n [currentTzDate, timeZone?.name],\n )\n const [timeValue, setTimeValue] = useState<string | undefined>(timeFromDate)\n\n useEffect(() => {\n // The change is coming from another source, so we need to update the timeValue to the new value.\n // oxlint-disable-next-line react/no-deriving-state-in-effects, react/set-state-in-effect -- pre-existing violation, to be fixed in a follow-up\n setTimeValue(timeFromDate)\n }, [timeFromDate])\n\n const handleTimeChangeInputChange = useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLInputElement>) => {\n const nextValue = event.currentTarget.value\n if (nextValue) {\n // avoids native time input segment navigation resetting while typing.\n setTimeValue(nextValue)\n const date = parse(nextValue, 'HH:mm', new Date())\n if (!isValid(date)) {\n return\n }\n handleTimeChange(date.getHours(), date.getMinutes())\n } else {\n // Setting the timeValue to undefined will let the input behave correctly as a time input while the user types.\n // This means, that until it has a valid value the time input input won't emit a new onChange event.\n // but we cannot send the undefined value to the handleTimeChange, because it expects a valid date.\n setTimeValue(undefined)\n }\n },\n [handleTimeChange],\n )\n\n const ref = useRef<HTMLDivElement | null>(null)\n\n useImperativeHandle<HTMLDivElement | null, HTMLDivElement | null>(forwardedRef, () => ref.current)\n\n const focusCurrentWeekDay = useCallback(() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }, [ref])\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n const target = event.currentTarget\n event.preventDefault()\n if (target.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n setFocusedDate(addDays(focusedDate, -7))\n }\n if (event.key === 'ArrowDown') {\n setFocusedDate(addDays(focusedDate, 7))\n }\n if (event.key === 'ArrowLeft') {\n setFocusedDate(addDays(focusedDate, -1))\n }\n if (event.key === 'ArrowRight') {\n setFocusedDate(addDays(focusedDate, 1))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n },\n [ref, focusCurrentWeekDay, focusedDate],\n )\n\n useEffect(() => {\n focusCurrentWeekDay()\n }, [focusCurrentWeekDay])\n\n useEffect(() => {\n const currentFocusInCalendarGrid = document.activeElement?.matches(\n '[data-calendar-grid], [data-calendar-grid] [data-preserve-focus]',\n )\n if (\n // Only move focus if it's currently in the calendar grid\n currentFocusInCalendarGrid\n ) {\n focusCurrentWeekDay()\n }\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }, [ref, focusCurrentWeekDay, focusedDate])\n\n const handleYesterdayClick = useCallback(\n () => handleDateChange(addDays(new Date(), -1)),\n [handleDateChange],\n )\n\n const handleTodayClick = useCallback(() => handleDateChange(new Date()), [handleDateChange])\n\n const handleTomorrowClick = useCallback(\n () => handleDateChange(addDays(new Date(), 1)),\n [handleDateChange],\n )\n\n const monthPicker = useMemo(() => {\n if (monthPickerVariant === 'carousel') {\n return (\n <Flex\n align=\"center\"\n paddingLeft={4}\n style={{\n borderBottom: '1px solid var(--card-border-color)',\n minHeight: `55px`,\n position: 'sticky',\n top: 0,\n }}\n >\n <Flex align=\"center\" flex={1} justify=\"space-between\">\n <Flex align=\"center\" flex={1}>\n <Text weight=\"medium\" size={1}>\n {labels.monthNames[(focusedDate || new Date())?.getMonth()]}{' '}\n {(focusedDate || new Date())?.getFullYear()}\n </Text>\n </Flex>\n\n <Flex paddingRight={3} gap={2}>\n <TooltipDelayGroupProvider>\n <Button\n icon={ChevronLeftIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(-1)}\n data-testid=\"calendar-prev-month\"\n tooltipProps={{content: 'Previous month'}}\n />\n <Button\n icon={ChevronRightIcon}\n mode=\"bleed\"\n onClick={() => moveFocusedDate(1)}\n data-testid=\"calendar-next-month\"\n tooltipProps={{content: 'Next month'}}\n />\n </TooltipDelayGroupProvider>\n </Flex>\n </Flex>\n </Flex>\n )\n }\n\n return (\n <Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n onChange={handleFocusedMonthChange}\n monthNames={labels.monthNames}\n value={displayMonth}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n labels={{\n goToNextYear: labels.goToNextYear,\n goToPreviousYear: labels.goToPreviousYear,\n }}\n onChange={setFocusedDateYear}\n value={displayYear}\n />\n </Box>\n </Flex>\n )\n }, [\n focusedDate,\n displayMonth,\n displayYear,\n handleFocusedMonthChange,\n labels.goToNextYear,\n labels.goToPreviousYear,\n labels.monthNames,\n monthPickerVariant,\n moveFocusedDate,\n setFocusedDateYear,\n ])\n\n const handleNowClick = useCallback(() => {\n const now = new Date()\n onSelect(now)\n setFocusedDate(now)\n }, [onSelect])\n\n return (\n <Box data-testid=\"calendar\" data-ui=\"Calendar\" {...restProps} ref={ref}>\n {/* Select date */}\n <Box padding={padding}>\n {/* Day presets */}\n {features.dayPresets && (\n <Grid\n gridTemplateColumns=\"repeat(3, minmax(0, 1fr))\"\n data-ui=\"CalendaryDayPresets\"\n gap={1}\n >\n <Button text={labels.goToYesterday} mode=\"bleed\" onClick={handleYesterdayClick} />\n <Button text={labels.goToToday} mode=\"bleed\" onClick={handleTodayClick} />\n <Button text={labels.goToTomorrow} mode=\"bleed\" onClick={handleTomorrowClick} />\n </Grid>\n )}\n\n {/* Select month and year */}\n {monthPicker}\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginY={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n weekDayNames={labels.weekDayNamesShort}\n date={focusedDate}\n focused={focusedDate}\n onSelect={handleDateChange}\n selected={currentTzDate}\n isPastDisabled={isPastDisabled}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>\n\n <Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex align=\"center\" justify=\"space-between\">\n {/* Select time */}\n {selectTime && (\n <>\n <Flex align=\"center\">\n <TimeInput\n aria-label={labels.selectTime}\n value={timeValue}\n onChange={handleTimeChangeInputChange}\n /**\n * Values received in timeStep are defined in minutes as shown in the docs https://www.sanity.io/docs/studio/datetime-type#timestep-47de7f21-25bc-468d-b925-cd30e2690a7b\n * the input type=\"time\" step is in seconds, so we need to multiply by 60.\n *\n * The UI will show all the minutes anyways, from 0 to 59, but it rounds the value to the nearest step once blurred.\n */\n step={timeStep * 60}\n />\n <Box marginLeft={2}>\n <Button text={labels.setToCurrentTime} mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {showTimeZone && (\n <Button\n icon={EarthGlobeIcon}\n mode=\"bleed\"\n size=\"default\"\n text={`${timeZone?.abbreviation}`}\n onClick={handleTimeZoneOpen}\n />\n )}\n\n {features.timePresets && (\n <Flex direction=\"row\" justify=\"center\" align=\"center\" style={{marginTop: 5}}>\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n const text = formatTime(hours, minutes)\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n text={text}\n aria-label={labels.setToTimePreset(text, currentTzDate)}\n />\n )\n })}\n </Flex>\n )}\n </>\n )}\n {showTimeZone && !onTimeZoneOpen && DialogTimeZone && <DialogTimeZone {...dialogProps} />}\n </Flex>\n </Box>\n </Box>\n )\n}\n\nfunction CalendarTimePresetButton(props: {\n 'hours': number\n 'minutes': number\n 'onTimeChange': (hours: number, minutes: number) => void\n 'aria-label': string\n 'text': string\n}) {\n const {hours, minutes, text, onTimeChange} = props\n\n const handleClick = useCallback(() => {\n onTimeChange(hours, minutes)\n }, [hours, minutes, onTimeChange])\n\n return <Button text={text} aria-label={props['aria-label']} mode=\"bleed\" onClick={handleClick} />\n}\n\nfunction CalendarMonthSelect(props: {\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onChange: (e: FormEvent<HTMLSelectElement>) => void\n value?: number\n monthNames: MonthNames\n}) {\n const {onChange, value, monthNames} = props\n\n return (\n <Flex flex={1} gap={1}>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <Select fontSize={1} radius={2} value={value} onChange={onChange} padding={2}>\n {monthNames.map((monthName, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {monthName}\n </option>\n ))}\n </Select>\n </Box>\n </Flex>\n )\n}\n\nfunction CalendarYearSelect(props: {\n moveFocusedDate: (by: number) => void\n onChange: (year: number) => void\n value?: number\n labels: {goToNextYear: string; goToPreviousYear: string}\n}) {\n const {moveFocusedDate, onChange, value, labels} = props\n\n const handlePrevYearClick = useCallback(() => moveFocusedDate(-12), [moveFocusedDate])\n\n const handleNextYearClick = useCallback(() => moveFocusedDate(12), [moveFocusedDate])\n\n return (\n <Flex gap={1}>\n <Button\n aria-label={labels.goToPreviousYear}\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n tooltipProps={{content: 'Previous year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />\n <YearInput value={value} onChange={onChange} radius={0} style={{width: 48}} />\n <Button\n aria-label={labels.goToNextYear}\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n tooltipProps={{content: 'Next year'}}\n {...CALENDAR_ICON_BUTTON_PROPS}\n />\n </Flex>\n )\n}\n","import {type ComponentProps, useCallback, useMemo, type RefAttributes} from 'react'\n\nimport {type TimeZoneScope} from '../../../hooks/useTimeZone'\nimport {Calendar, type CalendarProps} from './calendar/Calendar'\nimport {type CalendarLabels} from './calendar/types'\n\nexport function DatePicker(\n props: Omit<ComponentProps<'div'>, 'onChange'> & {\n value?: Date\n onChange: (nextDate: Date) => void\n selectTime?: boolean\n timeStep?: number\n calendarLabels: CalendarLabels\n monthPickerVariant?: CalendarProps['monthPickerVariant']\n padding?: CalendarProps['padding']\n showTimeZone?: boolean\n isPastDisabled?: boolean\n timeZoneScope: TimeZoneScope\n onTimeZoneOpen?: () => void\n } & RefAttributes<HTMLDivElement>,\n) {\n const {\n ref,\n value: _value,\n onChange,\n calendarLabels,\n padding = 2,\n showTimeZone = false,\n timeZoneScope,\n onTimeZoneOpen,\n ...rest\n } = props\n\n const value = useMemo(() => {\n if (_value) return _value\n const now = new Date()\n // If no value is provided initialize the date with seconds and milliseconds set to 0\n now.setSeconds(0, 0)\n return now\n }, [_value])\n\n const handleSelect = useCallback(\n (nextDate: Date) => {\n onChange(nextDate)\n },\n [onChange],\n )\n\n return (\n <Calendar\n {...rest}\n labels={calendarLabels}\n ref={ref}\n value={value}\n onSelect={handleSelect}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={onTimeZoneOpen}\n />\n )\n}\n","import {CalendarIcon} from '@sanity/icons/Calendar'\nimport {Card, Flex, LayerProvider, Text, useClickOutsideEvent, useLayer} from '@sanity/ui'\nimport {isPast} from 'date-fns/isPast'\nimport {\n type FocusEvent,\n type KeyboardEvent,\n type ReactNode,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type RefAttributes,\n} from 'react'\nimport FocusLock from 'react-focus-lock'\nimport {Box} from 'ui5'\n\nimport {Button} from '../../../../ui-components/button/Button'\nimport {Popover} from '../../../../ui-components/popover/Popover'\nimport useDialogTimeZone from '../../../hooks/useDialogTimeZone'\nimport {type TimeZoneScope, useTimeZone} from '../../../hooks/useTimeZone'\nimport {useTranslation} from '../../../i18n/hooks/useTranslation'\nimport {type CalendarProps} from './calendar/Calendar'\nimport {type CalendarLabels} from './calendar/types'\nimport {DatePicker} from './DatePicker'\nimport {LazyTextInput} from './LazyTextInput'\n\nexport interface DateTimeInputProps {\n customValidity?: string\n id?: string\n inputValue?: string\n onChange: (date: Date | null) => void\n onInputChange?: (event: FocusEvent<HTMLInputElement>) => void\n placeholder?: string\n readOnly?: boolean\n selectTime?: boolean\n timeStep?: number\n value?: Date\n calendarLabels: CalendarLabels\n constrainSize?: boolean\n monthPickerVariant?: CalendarProps['monthPickerVariant']\n padding?: CalendarProps['padding']\n disableInput?: boolean\n isPastDisabled?: boolean\n showTimeZone?: boolean\n timeZoneScope: TimeZoneScope\n}\n\nfunction DatePickerPopoverContent({\n popoverRef,\n onClose,\n children,\n}: {\n popoverRef: {current: HTMLDivElement | null}\n onClose: () => void\n children: ReactNode\n}) {\n const {isTopLayer} = useLayer()\n useClickOutsideEvent(isTopLayer && onClose, () => [popoverRef.current])\n\n return <>{children}</>\n}\n\nexport function DateTimeInput(props: DateTimeInputProps & RefAttributes<HTMLInputElement>) {\n const {\n ref: forwardedRef,\n value,\n inputValue,\n onInputChange,\n onChange,\n selectTime,\n timeStep,\n calendarLabels,\n readOnly,\n constrainSize = true,\n monthPickerVariant,\n customValidity,\n padding,\n disableInput,\n isPastDisabled,\n showTimeZone = false,\n timeZoneScope,\n ...rest\n } = props\n const {t} = useTranslation()\n const popoverRef = useRef<HTMLDivElement | null>(null)\n const ref = useRef<HTMLInputElement | null>(null)\n const buttonRef = useRef(null)\n const {zoneDateToUtc} = useTimeZone(timeZoneScope)\n const {\n DialogTimeZone,\n dialogProps,\n dialogTimeZoneShow,\n hide: dialogTimeZoneHide,\n } = useDialogTimeZone(timeZoneScope)\n\n const [referenceElement, setReferenceElement] = useState<HTMLInputElement | null>(null)\n\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(\n forwardedRef,\n () => ref.current,\n )\n\n /**\n * Setting referenceElement in effect makes sure it's up to date after the initial render\n * cycle - avoiding referenceElement used byPopover from being out of sync with render state\n */\n useEffect(() => setReferenceElement(ref.current), [])\n\n const [isPickerOpen, setPickerOpen] = useState(false)\n const handleClose = useCallback(() => setPickerOpen(false), [])\n\n const handleDeactivation = useCallback(() => {\n ref.current?.focus()\n ref.current?.select()\n }, [])\n\n const handleKeyUp = useCallback((e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }, [])\n\n const handleClick = useCallback(() => setPickerOpen(true), [])\n\n // The popover must close before the timezone dialog opens because\n // react-focus-lock (used by the popover) and Dialog's tab-sentinel focus\n // trapping are incompatible when both are mounted simultaneously -\n // react-focus-lock intercepts focus and pulls it back into the popover,\n // breaking keyboard navigation in the dialog.\n const handleTimeZoneOpen = useCallback(() => {\n setPickerOpen(false)\n dialogTimeZoneShow()\n }, [dialogTimeZoneShow])\n\n const handleTimeZoneClose = useCallback(() => {\n dialogTimeZoneHide()\n setPickerOpen(true)\n }, [dialogTimeZoneHide])\n\n const isDateInPastWarningShown = useMemo(\n () => inputValue && isPastDisabled && isPast(zoneDateToUtc(new Date(inputValue))),\n [inputValue, isPastDisabled, zoneDateToUtc],\n )\n\n const suffix = readOnly ? null : (\n <Flex style={{padding: '5px'}}>\n <Button\n disabled={readOnly}\n aria-label={calendarLabels.ariaLabel}\n ref={buttonRef}\n icon={CalendarIcon}\n mode=\"bleed\"\n onClick={handleClick}\n style={{display: 'block'}}\n data-testid=\"select-date-button\"\n tooltipProps={{content: calendarLabels.tooltipText}}\n />\n </Flex>\n )\n\n return (\n <>\n <LazyTextInput\n ref={ref}\n data-testid=\"date-input\"\n {...rest}\n readOnly={disableInput || readOnly}\n value={inputValue}\n onChange={onInputChange}\n customValidity={customValidity}\n suffix={\n isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize={constrainSize}\n data-testid=\"date-input-dialog\"\n referenceElement={referenceElement}\n portal\n content={\n <DatePickerPopoverContent popoverRef={popoverRef} onClose={handleClose}>\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n {isDateInPastWarningShown && (\n <Card margin={1} padding={2} radius={2} shadow={1} tone=\"critical\">\n <Text size={1}>{t('inputs.dateTime.past-date-warning')}</Text>\n </Card>\n )}\n <DatePicker\n monthPickerVariant={monthPickerVariant}\n calendarLabels={calendarLabels}\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n isPastDisabled={isPastDisabled}\n onChange={onChange}\n padding={padding}\n showTimeZone={showTimeZone}\n timeZoneScope={timeZoneScope}\n onTimeZoneOpen={handleTimeZoneOpen}\n />\n </FocusLock>\n </Box>\n </DatePickerPopoverContent>\n }\n open\n placement=\"bottom\"\n ref={popoverRef}\n >\n <>{suffix}</>\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )\n }\n />\n {showTimeZone && DialogTimeZone && (\n <DialogTimeZone {...dialogProps} onClose={handleTimeZoneClose} />\n )}\n </>\n )\n}\n","import {type CalendarLabels} from '../../../components/inputs/DateInputs/calendar/types'\n\nexport function isValidDate(date: Date): boolean {\n return date instanceof Date && !isNaN(date.valueOf())\n}\n\n/**\n * @internal\n */\nexport function getCalendarLabels(\n t: (key: string, values?: Record<string, unknown>) => string,\n): CalendarLabels {\n return {\n ariaLabel: t('calendar.button.aria-label'),\n goToTomorrow: t('calendar.action.go-to-tomorrow'),\n goToToday: t('calendar.action.go-to-today'),\n goToYesterday: t('calendar.action.go-to-yesterday'),\n goToNextMonth: t('calendar.action.go-to-next-month'),\n goToPreviousMonth: t('calendar.action.go-to-previous-month'),\n goToNextYear: t('calendar.action.go-to-next-year'),\n goToPreviousYear: t('calendar.action.go-to-previous-year'),\n setToCurrentTime: t('calendar.action.set-to-current-time'),\n selectTime: t('calendar.action.select-time'),\n tooltipText: t('calendar.button.tooltip-text'),\n monthNames: [\n t('calendar.month-names.january'),\n t('calendar.month-names.february'),\n t('calendar.month-names.march'),\n t('calendar.month-names.april'),\n t('calendar.month-names.may'),\n t('calendar.month-names.june'),\n t('calendar.month-names.july'),\n t('calendar.month-names.august'),\n t('calendar.month-names.september'),\n t('calendar.month-names.october'),\n t('calendar.month-names.november'),\n t('calendar.month-names.december'),\n ],\n weekDayNamesShort: [\n t('calendar.weekday-names.short.monday'),\n t('calendar.weekday-names.short.tuesday'),\n t('calendar.weekday-names.short.wednesday'),\n t('calendar.weekday-names.short.thursday'),\n t('calendar.weekday-names.short.friday'),\n t('calendar.weekday-names.short.saturday'),\n t('calendar.weekday-names.short.sunday'),\n ],\n setToTimePreset: (time, date) => t('calendar.action.set-to-time-preset', {time, date}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,SAAgB,mBACd,SACA,UAA2C,EAAC,YAAY,EAAC,YAAY,GAAI,EAAC,GACjE;CACT,IAAM,EAAC,eAAc;CAsBrB,OArBqB,iBAAiB,OAAO,KAAY,QAAQ,QAAQ,aAAa,SAG7E,KAGL,aAAa,aAEb,iBAAiB,OAAO,KACxB,aAAa,QAAQ,QAAQ,SAAS,QAAQ,EAAE,MAAM,WAAW,UAIjE,WAAW,cACN,CAAC,iBAAiB,OAAO,KAAK,QAAQ,QAAQ,MAAM,SAAS,QAAQ,MAG9E,EAAI,WAAW;AAKjB;;;;;;;;;AAUA,SAAgB,eACd,SACA,UAA2C,EAAC,YAAY,EAAC,YAAY,GAAI,EAAC,GACjE;CACT,IAAM,EAAC,eAAc;CAsBrB,OArBgB,QAAQ,SAAS,aAAa,WAM1C,aAAa,aAEb,iBAAiB,OAAO,KACxB,aAAa,QAAQ,QAAQ,SAAS,QAAQ,EAAE,MAAM,WAAW,UAIjE,WAAW,cACN,CAAC,iBAAiB,OAAO,KAAK,QAAQ,QAAQ,WAAW,QAAQ,QAAQ,MAAM,IAAI,IAG5F,EAAI,WAAW,aAdN;AAmBX;;;;;AAMA,SAAgB,iBAAiB,SAA2C;CAC1E,OAAO,EAAQ,QAAQ,SAAS;AAClC;;;;;AAMA,SAAgB,iBAAiB,SAA2C;CAC1E,OAAO,EAAQ,QAAQ,SAAS;AAClC;;;;;AAMA,SAAgB,gBACd,SACyB;CACrB,IAAO,YAAY,QAIvB;MAAI,kBAAkB,iBAAiB,QAAQ,GA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