react-native-paper-dates 0.22.38 → 0.22.39
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/commonjs/Date/AnimatedCrossView.js +1 -3
- package/lib/commonjs/Date/AnimatedCrossView.js.map +1 -1
- package/lib/commonjs/Date/AutoSizer.js +1 -3
- package/lib/commonjs/Date/AutoSizer.js.map +1 -1
- package/lib/commonjs/Date/Calendar.js +1 -3
- package/lib/commonjs/Date/Calendar.js.map +1 -1
- package/lib/commonjs/Date/CalendarEdit.js +1 -3
- package/lib/commonjs/Date/CalendarEdit.js.map +1 -1
- package/lib/commonjs/Date/CalendarHeader.js +1 -1
- package/lib/commonjs/Date/CalendarHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerInput.js +1 -3
- package/lib/commonjs/Date/DatePickerInput.js.map +1 -1
- package/lib/commonjs/Date/DatePickerInputWithoutModal.js +1 -3
- package/lib/commonjs/Date/DatePickerInputWithoutModal.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModal.js +1 -3
- package/lib/commonjs/Date/DatePickerModal.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalContent.js +1 -3
- package/lib/commonjs/Date/DatePickerModalContent.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalContentHeader.js +1 -3
- package/lib/commonjs/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeader.js +0 -2
- package/lib/commonjs/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeaderBackground.js +0 -2
- package/lib/commonjs/Date/DatePickerModalHeaderBackground.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalStatusBar.js +1 -3
- package/lib/commonjs/Date/DatePickerModalStatusBar.js.map +1 -1
- package/lib/commonjs/Date/Day.js +1 -3
- package/lib/commonjs/Date/Day.js.map +1 -1
- package/lib/commonjs/Date/DayName.js +1 -3
- package/lib/commonjs/Date/DayName.js.map +1 -1
- package/lib/commonjs/Date/DayNames.js +1 -3
- package/lib/commonjs/Date/DayNames.js.map +1 -1
- package/lib/commonjs/Date/DayRange.js +1 -3
- package/lib/commonjs/Date/DayRange.js.map +1 -1
- package/lib/commonjs/Date/Month.js +1 -1
- package/lib/commonjs/Date/Month.js.map +1 -1
- package/lib/commonjs/Date/Swiper.js +1 -3
- package/lib/commonjs/Date/Swiper.js.map +1 -1
- package/lib/commonjs/Date/Swiper.native.js +1 -3
- package/lib/commonjs/Date/Swiper.native.js.map +1 -1
- package/lib/commonjs/Date/YearPicker.js +1 -3
- package/lib/commonjs/Date/YearPicker.js.map +1 -1
- package/lib/commonjs/TextInputMask.js +1 -3
- package/lib/commonjs/TextInputMask.js.map +1 -1
- package/lib/commonjs/Time/AmPmSwitcher.js +1 -3
- package/lib/commonjs/Time/AmPmSwitcher.js.map +1 -1
- package/lib/commonjs/Time/AnalogClock.js +1 -3
- package/lib/commonjs/Time/AnalogClock.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockHours.js +1 -3
- package/lib/commonjs/Time/AnalogClockHours.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockMinutes.js +1 -3
- package/lib/commonjs/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/commonjs/Time/AnimatedClockSwitcher.js +1 -3
- package/lib/commonjs/Time/AnimatedClockSwitcher.js.map +1 -1
- package/lib/commonjs/Time/TimeInput.js +7 -5
- package/lib/commonjs/Time/TimeInput.js.map +1 -1
- package/lib/commonjs/Time/TimeInputs.js +1 -3
- package/lib/commonjs/Time/TimeInputs.js.map +1 -1
- package/lib/commonjs/Time/TimePicker.js +1 -3
- package/lib/commonjs/Time/TimePicker.js.map +1 -1
- package/lib/commonjs/Time/TimePickerModal.js +2 -3
- package/lib/commonjs/Time/TimePickerModal.js.map +1 -1
- package/lib/module/Date/AnimatedCrossView.js +0 -1
- package/lib/module/Date/AnimatedCrossView.js.map +1 -1
- package/lib/module/Date/AutoSizer.js +0 -1
- package/lib/module/Date/AutoSizer.js.map +1 -1
- package/lib/module/Date/Calendar.js +1 -2
- package/lib/module/Date/Calendar.js.map +1 -1
- package/lib/module/Date/CalendarEdit.js +1 -2
- package/lib/module/Date/CalendarEdit.js.map +1 -1
- package/lib/module/Date/CalendarHeader.js +1 -1
- package/lib/module/Date/CalendarHeader.js.map +1 -1
- package/lib/module/Date/DatePickerInput.js +0 -1
- package/lib/module/Date/DatePickerInput.js.map +1 -1
- package/lib/module/Date/DatePickerInputWithoutModal.js +2 -2
- package/lib/module/Date/DatePickerInputWithoutModal.js.map +1 -1
- package/lib/module/Date/DatePickerModal.js +2 -2
- package/lib/module/Date/DatePickerModal.js.map +1 -1
- package/lib/module/Date/DatePickerModalContent.js +1 -1
- package/lib/module/Date/DatePickerModalContent.js.map +1 -1
- package/lib/module/Date/DatePickerModalContentHeader.js +2 -2
- package/lib/module/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeader.js +0 -1
- package/lib/module/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeaderBackground.js +0 -1
- package/lib/module/Date/DatePickerModalHeaderBackground.js.map +1 -1
- package/lib/module/Date/DatePickerModalStatusBar.js +1 -1
- package/lib/module/Date/DatePickerModalStatusBar.js.map +1 -1
- package/lib/module/Date/Day.js +0 -1
- package/lib/module/Date/Day.js.map +1 -1
- package/lib/module/Date/DayName.js +1 -1
- package/lib/module/Date/DayName.js.map +1 -1
- package/lib/module/Date/DayNames.js +1 -1
- package/lib/module/Date/DayNames.js.map +1 -1
- package/lib/module/Date/DayRange.js +1 -1
- package/lib/module/Date/DayRange.js.map +1 -1
- package/lib/module/Date/Month.js +2 -3
- package/lib/module/Date/Month.js.map +1 -1
- package/lib/module/Date/Swiper.js +1 -1
- package/lib/module/Date/Swiper.js.map +1 -1
- package/lib/module/Date/Swiper.native.js +0 -1
- package/lib/module/Date/Swiper.native.js.map +1 -1
- package/lib/module/Date/SwiperUtils.js.map +1 -1
- package/lib/module/Date/YearPicker.js +1 -2
- package/lib/module/Date/YearPicker.js.map +1 -1
- package/lib/module/TextInputMask.js +1 -2
- package/lib/module/TextInputMask.js.map +1 -1
- package/lib/module/Time/AmPmSwitcher.js +1 -2
- package/lib/module/Time/AmPmSwitcher.js.map +1 -1
- package/lib/module/Time/AnalogClock.js +0 -1
- package/lib/module/Time/AnalogClock.js.map +1 -1
- package/lib/module/Time/AnalogClockHours.js +2 -2
- package/lib/module/Time/AnalogClockHours.js.map +1 -1
- package/lib/module/Time/AnalogClockMinutes.js +2 -2
- package/lib/module/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/module/Time/AnimatedClockSwitcher.js +1 -1
- package/lib/module/Time/AnimatedClockSwitcher.js.map +1 -1
- package/lib/module/Time/TimeInput.js +8 -5
- package/lib/module/Time/TimeInput.js.map +1 -1
- package/lib/module/Time/TimeInputs.js +1 -2
- package/lib/module/Time/TimeInputs.js.map +1 -1
- package/lib/module/Time/TimePicker.js +3 -5
- package/lib/module/Time/TimePicker.js.map +1 -1
- package/lib/module/Time/TimePickerModal.js +3 -2
- package/lib/module/Time/TimePickerModal.js.map +1 -1
- package/lib/typescript/Date/AnimatedCrossView.d.ts +1 -2
- package/lib/typescript/Date/AnimatedCrossView.d.ts.map +1 -1
- package/lib/typescript/Date/AutoSizer.d.ts +1 -2
- package/lib/typescript/Date/AutoSizer.d.ts.map +1 -1
- package/lib/typescript/Date/Calendar.d.ts +2 -3
- package/lib/typescript/Date/Calendar.d.ts.map +1 -1
- package/lib/typescript/Date/CalendarEdit.d.ts +2 -3
- package/lib/typescript/Date/CalendarEdit.d.ts.map +1 -1
- package/lib/typescript/Date/CalendarHeader.d.ts +2 -3
- package/lib/typescript/Date/CalendarHeader.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerInput.d.ts +1 -2
- package/lib/typescript/Date/DatePickerInput.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerInputWithoutModal.d.ts +9 -9
- package/lib/typescript/Date/DatePickerInputWithoutModal.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerModal.d.ts +2 -3
- package/lib/typescript/Date/DatePickerModal.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerModalContent.d.ts +2 -3
- package/lib/typescript/Date/DatePickerModalContent.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerModalContentHeader.d.ts +4 -5
- package/lib/typescript/Date/DatePickerModalContentHeader.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerModalHeader.d.ts +1 -2
- package/lib/typescript/Date/DatePickerModalHeader.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerModalHeaderBackground.d.ts +1 -2
- package/lib/typescript/Date/DatePickerModalHeaderBackground.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerModalStatusBar.d.ts +2 -3
- package/lib/typescript/Date/DatePickerModalStatusBar.d.ts.map +1 -1
- package/lib/typescript/Date/Day.d.ts +4 -5
- package/lib/typescript/Date/Day.d.ts.map +1 -1
- package/lib/typescript/Date/DayName.d.ts +2 -3
- package/lib/typescript/Date/DayName.d.ts.map +1 -1
- package/lib/typescript/Date/DayNames.d.ts +2 -3
- package/lib/typescript/Date/DayNames.d.ts.map +1 -1
- package/lib/typescript/Date/DayRange.d.ts +2 -3
- package/lib/typescript/Date/DayRange.d.ts.map +1 -1
- package/lib/typescript/Date/Month.d.ts +2 -3
- package/lib/typescript/Date/Month.d.ts.map +1 -1
- package/lib/typescript/Date/Swiper.d.ts +2 -3
- package/lib/typescript/Date/Swiper.d.ts.map +1 -1
- package/lib/typescript/Date/Swiper.native.d.ts +2 -3
- package/lib/typescript/Date/Swiper.native.d.ts.map +1 -1
- package/lib/typescript/Date/SwiperUtils.d.ts.map +1 -1
- package/lib/typescript/Date/YearPicker.d.ts +1 -2
- package/lib/typescript/Date/YearPicker.d.ts.map +1 -1
- package/lib/typescript/TextInputMask.d.ts +7 -7
- package/lib/typescript/TextInputMask.d.ts.map +1 -1
- package/lib/typescript/Time/AmPmSwitcher.d.ts +1 -2
- package/lib/typescript/Time/AmPmSwitcher.d.ts.map +1 -1
- package/lib/typescript/Time/AnalogClock.d.ts +2 -3
- package/lib/typescript/Time/AnalogClock.d.ts.map +1 -1
- package/lib/typescript/Time/AnalogClockHours.d.ts +2 -3
- package/lib/typescript/Time/AnalogClockHours.d.ts.map +1 -1
- package/lib/typescript/Time/AnalogClockMinutes.d.ts +2 -3
- package/lib/typescript/Time/AnalogClockMinutes.d.ts.map +1 -1
- package/lib/typescript/Time/AnimatedClockSwitcher.d.ts +2 -2
- package/lib/typescript/Time/AnimatedClockSwitcher.d.ts.map +1 -1
- package/lib/typescript/Time/TimeInput.d.ts +1 -2
- package/lib/typescript/Time/TimeInput.d.ts.map +1 -1
- package/lib/typescript/Time/TimeInputs.d.ts +2 -3
- package/lib/typescript/Time/TimeInputs.d.ts.map +1 -1
- package/lib/typescript/Time/TimePicker.d.ts +2 -3
- package/lib/typescript/Time/TimePicker.d.ts.map +1 -1
- package/lib/typescript/Time/TimePickerModal.d.ts +2 -3
- package/lib/typescript/Time/TimePickerModal.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Date/AnimatedCrossView.tsx +0 -1
- package/src/Date/AutoSizer.tsx +0 -1
- package/src/Date/Calendar.tsx +1 -2
- package/src/Date/CalendarEdit.tsx +2 -3
- package/src/Date/CalendarHeader.tsx +1 -1
- package/src/Date/DatePickerInput.tsx +0 -1
- package/src/Date/DatePickerInputWithoutModal.tsx +2 -2
- package/src/Date/DatePickerModal.tsx +2 -2
- package/src/Date/DatePickerModalContent.tsx +1 -1
- package/src/Date/DatePickerModalContentHeader.tsx +2 -2
- package/src/Date/DatePickerModalHeader.tsx +0 -1
- package/src/Date/DatePickerModalHeaderBackground.tsx +0 -1
- package/src/Date/DatePickerModalStatusBar.tsx +1 -1
- package/src/Date/Day.tsx +0 -1
- package/src/Date/DayName.tsx +1 -1
- package/src/Date/DayNames.tsx +1 -1
- package/src/Date/DayRange.tsx +1 -1
- package/src/Date/Month.tsx +7 -8
- package/src/Date/Swiper.native.tsx +0 -1
- package/src/Date/Swiper.tsx +2 -2
- package/src/Date/SwiperUtils.ts +1 -1
- package/src/Date/YearPicker.tsx +1 -2
- package/src/TextInputMask.tsx +7 -2
- package/src/Time/AmPmSwitcher.tsx +1 -2
- package/src/Time/AnalogClock.tsx +0 -1
- package/src/Time/AnalogClockHours.tsx +2 -2
- package/src/Time/AnalogClockMinutes.tsx +2 -2
- package/src/Time/AnimatedClockSwitcher.tsx +1 -1
- package/src/Time/TimeInput.tsx +9 -5
- package/src/Time/TimeInputs.tsx +2 -3
- package/src/Time/TimePicker.tsx +4 -4
- package/src/Time/TimePickerModal.tsx +10 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../src/Time/TimePicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../src/Time/TimePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,kBAAkB,EAClB,kBAAkB,EAGnB,MAAM,aAAa,CAAA;AAOpB,KAAK,YAAY,GAAG,CAAC,EACnB,KAAK,EACL,OAAO,EACP,OAAO,GACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,SAAS,GAAG,kBAAkB,CAAA;CACzC,KAAK,GAAG,CAAA;AAET,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,OAAO,EACP,YAAY,EACZ,OAAO,EACP,SAAS,EACT,QAAQ,EACR,MAAM,EACN,cAAc,EACd,aAAa,GACd,EAAE;IACD,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC3B,SAAS,EAAE,kBAAkB,CAAA;IAC7B,OAAO,EAAE,kBAAkB,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,GAAG,CAAA;IAC/C,QAAQ,EAAE,YAAY,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,2CAuFA;;AAmBD,wBAA+B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PossibleInputTypes } from './timeUtils';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
export declare function TimePickerModal({ visible, onDismiss, onConfirm, hours, minutes, label, uppercase: _uppercase, cancelLabel, confirmLabel, animationType, locale, keyboardIcon, clockIcon, use24HourClock, inputFontSize, defaultInputType, }: {
|
|
4
3
|
locale?: undefined | string;
|
|
5
4
|
label?: string;
|
|
@@ -20,7 +19,7 @@ export declare function TimePickerModal({ visible, onDismiss, onConfirm, hours,
|
|
|
20
19
|
use24HourClock?: boolean;
|
|
21
20
|
inputFontSize?: number;
|
|
22
21
|
defaultInputType?: PossibleInputTypes;
|
|
23
|
-
}):
|
|
24
|
-
declare const _default:
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare const _default: import("react").MemoExoticComponent<typeof TimePickerModal>;
|
|
25
24
|
export default _default;
|
|
26
25
|
//# sourceMappingURL=TimePickerModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePickerModal.d.ts","sourceRoot":"","sources":["../../../src/Time/TimePickerModal.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAKL,kBAAkB,EAEnB,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"TimePickerModal.d.ts","sourceRoot":"","sources":["../../../src/Time/TimePickerModal.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAKL,kBAAkB,EAEnB,MAAM,aAAa,CAAA;AAKpB,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,EACL,OAAO,EACP,KAAqB,EACrB,SAAS,EAAE,UAAU,EACrB,WAAsB,EACtB,YAAmB,EACnB,aAAsB,EACtB,MAAM,EACN,YAAiC,EACjC,SAA2B,EAC3B,cAAc,EACd,aAAa,EACb,gBAAgB,GACjB,EAAE;IACD,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,SAAS,EAAE,MAAM,GAAG,CAAA;IACpB,SAAS,EAAE,CAAC,eAAe,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAA;IACvE,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IACzC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,kBAAkB,CAAA;CACtC,2CAoKA;;AAwDD,wBAAoC"}
|
package/package.json
CHANGED
package/src/Date/AutoSizer.tsx
CHANGED
package/src/Date/Calendar.tsx
CHANGED
|
@@ -14,8 +14,7 @@ import { memo, useCallback, useMemo, useState } from 'react'
|
|
|
14
14
|
import YearPicker from './YearPicker'
|
|
15
15
|
import Color from 'color'
|
|
16
16
|
import { useTheme } from 'react-native-paper'
|
|
17
|
-
import {
|
|
18
|
-
import React from 'react'
|
|
17
|
+
import { darkenBy, lightenBy, useLatest } from '../shared/utils'
|
|
19
18
|
import { sharedStyles } from '../shared/styles'
|
|
20
19
|
|
|
21
20
|
export type ModeType = 'single' | 'range' | 'multiple'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
Keyboard,
|
|
3
3
|
StyleSheet,
|
|
4
4
|
TextInput as TextInputNative,
|
|
5
|
-
|
|
5
|
+
View,
|
|
6
6
|
} from 'react-native'
|
|
7
7
|
|
|
8
8
|
import type { ModeType, ValidRangeType } from './Calendar'
|
|
@@ -10,7 +10,6 @@ import type { LocalState } from './DatePickerModalContent'
|
|
|
10
10
|
|
|
11
11
|
import DatePickerInputWithoutModal from './DatePickerInputWithoutModal'
|
|
12
12
|
import { memo, useCallback, useEffect, useRef } from 'react'
|
|
13
|
-
import React from 'react'
|
|
14
13
|
import { sharedStyles } from '../shared/styles'
|
|
15
14
|
|
|
16
15
|
function CalendarEdit({
|
|
@@ -4,7 +4,7 @@ import DayNames, { dayNamesHeight } from './DayNames'
|
|
|
4
4
|
import type { DisableWeekDaysType } from './dateUtils'
|
|
5
5
|
import { getTranslation } from '../translations/utils'
|
|
6
6
|
import { sharedStyles } from '../shared/styles'
|
|
7
|
-
import
|
|
7
|
+
import { memo } from 'react'
|
|
8
8
|
|
|
9
9
|
const buttonContainerHeight = 56
|
|
10
10
|
const buttonContainerMarginTop = 4
|
|
@@ -5,7 +5,6 @@ import type { DatePickerInputProps } from './DatePickerInput.shared'
|
|
|
5
5
|
import DatePickerInputWithoutModal from './DatePickerInputWithoutModal'
|
|
6
6
|
import { Platform, StyleProp, ViewStyle } from 'react-native'
|
|
7
7
|
import { forwardRef, useCallback, useState } from 'react'
|
|
8
|
-
import React from 'react'
|
|
9
8
|
|
|
10
9
|
function DatePickerInput(
|
|
11
10
|
{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import TextInputWithMask from '../TextInputMask'
|
|
2
2
|
import { HelperText, useTheme } from 'react-native-paper'
|
|
3
|
-
import {
|
|
3
|
+
import { StyleSheet, View } from 'react-native'
|
|
4
4
|
import useDateInput from './inputUtils'
|
|
5
5
|
import type { DatePickerInputProps } from './DatePickerInput.shared'
|
|
6
|
-
import
|
|
6
|
+
import { forwardRef, ReactNode } from 'react'
|
|
7
7
|
|
|
8
8
|
function DatePickerInputWithoutModal(
|
|
9
9
|
{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Modal,
|
|
3
|
+
Platform,
|
|
3
4
|
StyleSheet,
|
|
4
5
|
TouchableWithoutFeedback,
|
|
5
6
|
useWindowDimensions,
|
|
6
7
|
View,
|
|
7
|
-
Platform,
|
|
8
8
|
} from 'react-native'
|
|
9
9
|
import { useTheme } from 'react-native-paper'
|
|
10
10
|
import DatePickerModalContent, {
|
|
@@ -12,7 +12,7 @@ import DatePickerModalContent, {
|
|
|
12
12
|
DatePickerModalContentRangeProps,
|
|
13
13
|
DatePickerModalContentSingleProps,
|
|
14
14
|
} from './DatePickerModalContent'
|
|
15
|
-
import
|
|
15
|
+
import { memo } from 'react'
|
|
16
16
|
import { sharedStyles } from '../shared/styles'
|
|
17
17
|
import { supportedOrientations } from '../shared/utils'
|
|
18
18
|
|
|
@@ -17,7 +17,7 @@ import CalendarEdit from './CalendarEdit'
|
|
|
17
17
|
import DatePickerModalHeaderBackground from './DatePickerModalHeaderBackground'
|
|
18
18
|
import { useTheme } from 'react-native-paper'
|
|
19
19
|
import DatePickerModalStatusBar from './DatePickerModalStatusBar'
|
|
20
|
-
import
|
|
20
|
+
import { memo, useCallback, useEffect, useState } from 'react'
|
|
21
21
|
|
|
22
22
|
export type LocalState = {
|
|
23
23
|
startDate: CalendarDate
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleSheet, View } from 'react-native'
|
|
2
2
|
import { IconButton, MD2Theme, Text, useTheme } from 'react-native-paper'
|
|
3
3
|
import type { ModeType } from './Calendar'
|
|
4
4
|
import type { LocalState } from './DatePickerModalContent'
|
|
5
5
|
import { useHeaderTextColor } from '../shared/utils'
|
|
6
6
|
import Color from 'color'
|
|
7
7
|
import { getTranslation } from '../translations/utils'
|
|
8
|
-
import
|
|
8
|
+
import { useMemo } from 'react'
|
|
9
9
|
import { sharedStyles } from '../shared/styles'
|
|
10
10
|
|
|
11
11
|
export interface HeaderPickProps {
|
package/src/Date/Day.tsx
CHANGED
package/src/Date/DayName.tsx
CHANGED
package/src/Date/DayNames.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { StyleSheet, View } from 'react-native'
|
|
|
2
2
|
import DayName from './DayName'
|
|
3
3
|
import { useTheme } from 'react-native-paper'
|
|
4
4
|
import { DisableWeekDaysType, showWeekDay } from './dateUtils'
|
|
5
|
-
import
|
|
5
|
+
import { memo, useMemo } from 'react'
|
|
6
6
|
|
|
7
7
|
export const dayNamesHeight = 44
|
|
8
8
|
|
package/src/Date/DayRange.tsx
CHANGED
package/src/Date/Month.tsx
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { StyleSheet, View } from 'react-native'
|
|
2
2
|
import {
|
|
3
|
+
Icon,
|
|
4
|
+
MD2Theme,
|
|
3
5
|
Text,
|
|
4
|
-
useTheme,
|
|
5
6
|
TouchableRipple,
|
|
6
|
-
|
|
7
|
-
Icon,
|
|
7
|
+
useTheme,
|
|
8
8
|
} from 'react-native-paper'
|
|
9
9
|
import Day, { EmptyDay } from './Day'
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
12
|
addMonths,
|
|
13
13
|
areDatesOnSameDay,
|
|
14
|
+
beginOffset,
|
|
14
15
|
daySize,
|
|
15
16
|
DisableWeekDaysType,
|
|
17
|
+
estimatedMonthHeight,
|
|
16
18
|
getDaysInMonth,
|
|
17
19
|
getFirstDayOfMonth,
|
|
18
|
-
getRealIndex,
|
|
19
20
|
getGridCount,
|
|
20
|
-
|
|
21
|
+
getRealIndex,
|
|
21
22
|
gridCounts,
|
|
23
|
+
isDateBetween,
|
|
22
24
|
showWeekDay,
|
|
23
25
|
startAtIndex,
|
|
24
|
-
beginOffset,
|
|
25
|
-
estimatedMonthHeight,
|
|
26
26
|
useRangeChecker,
|
|
27
27
|
} from './dateUtils'
|
|
28
28
|
import { getCalendarHeaderHeight } from './CalendarHeader'
|
|
@@ -35,7 +35,6 @@ import type {
|
|
|
35
35
|
import { dayNamesHeight } from './DayNames'
|
|
36
36
|
import { useTextColorOnPrimary } from '../shared/utils'
|
|
37
37
|
import { memo, useMemo } from 'react'
|
|
38
|
-
import React from 'react'
|
|
39
38
|
import { sharedStyles } from '../shared/styles'
|
|
40
39
|
|
|
41
40
|
interface BaseMonthProps {
|
|
@@ -17,7 +17,6 @@ import { SwiperProps, useYearChange } from './SwiperUtils'
|
|
|
17
17
|
import { beginOffset, estimatedMonthHeight, totalMonths } from './dateUtils'
|
|
18
18
|
import AutoSizer from './AutoSizer'
|
|
19
19
|
import { memo, useCallback, useRef, useState } from 'react'
|
|
20
|
-
import React from 'react'
|
|
21
20
|
import { sharedStyles } from '../shared/styles'
|
|
22
21
|
|
|
23
22
|
function getVisibleArray(
|
package/src/Date/Swiper.tsx
CHANGED
|
@@ -9,14 +9,14 @@ import { beginOffset, estimatedMonthHeight, totalMonths } from './dateUtils'
|
|
|
9
9
|
import { useLatest } from '../shared/utils'
|
|
10
10
|
import { RenderProps, SwiperProps, useYearChange } from './SwiperUtils'
|
|
11
11
|
import AutoSizer from './AutoSizer'
|
|
12
|
-
import
|
|
12
|
+
import {
|
|
13
13
|
memo,
|
|
14
|
+
UIEvent,
|
|
14
15
|
useCallback,
|
|
15
16
|
useEffect,
|
|
16
17
|
useLayoutEffect,
|
|
17
18
|
useRef,
|
|
18
19
|
useState,
|
|
19
|
-
UIEvent,
|
|
20
20
|
} from 'react'
|
|
21
21
|
import { sharedStyles } from '../shared/styles'
|
|
22
22
|
|
package/src/Date/SwiperUtils.ts
CHANGED
package/src/Date/YearPicker.tsx
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { FlatList, StyleSheet, View
|
|
1
|
+
import { FlatList, ScrollView, StyleSheet, View } from 'react-native'
|
|
2
2
|
import { MD2Theme, Text, TouchableRipple, useTheme } from 'react-native-paper'
|
|
3
3
|
import { range } from '../shared/utils'
|
|
4
4
|
import { memo, useEffect, useRef } from 'react'
|
|
5
|
-
import React from 'react'
|
|
6
5
|
import { sharedStyles } from '../shared/styles'
|
|
7
6
|
|
|
8
7
|
const ITEM_HEIGHT = 62
|
package/src/TextInputMask.tsx
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
ComponentProps,
|
|
3
|
+
forwardRef,
|
|
4
|
+
ReactNode,
|
|
5
|
+
useEffect,
|
|
6
|
+
useState,
|
|
7
|
+
} from 'react'
|
|
3
8
|
import { TextInput } from 'react-native-paper'
|
|
4
9
|
|
|
5
10
|
const splitCharacters = ['-', '/', '.', '年', ' ']
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleSheet, View } from 'react-native'
|
|
2
2
|
import { MD2Theme, Text, TouchableRipple, useTheme } from 'react-native-paper'
|
|
3
3
|
import { useContext, useMemo } from 'react'
|
|
4
4
|
import Color from 'color'
|
|
5
5
|
import { inputTypes, PossibleInputTypes, useSwitchColors } from './timeUtils'
|
|
6
6
|
import { DisplayModeContext } from '../contexts/DisplayModeContext'
|
|
7
|
-
import React from 'react'
|
|
8
7
|
import { sharedStyles } from '../shared/styles'
|
|
9
8
|
|
|
10
9
|
export default function AmPmSwitcher({
|
package/src/Time/AnalogClock.tsx
CHANGED
|
@@ -23,7 +23,6 @@ import AnimatedClockSwitcher from './AnimatedClockSwitcher'
|
|
|
23
23
|
import AnalogClockMinutes from './AnalogClockMinutes'
|
|
24
24
|
import { DisplayModeContext } from '../contexts/DisplayModeContext'
|
|
25
25
|
import { memo, useCallback, useContext, useRef } from 'react'
|
|
26
|
-
import React from 'react'
|
|
27
26
|
|
|
28
27
|
function returnTrue() {
|
|
29
28
|
return true
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleSheet, View } from 'react-native'
|
|
2
2
|
import { Text } from 'react-native-paper'
|
|
3
3
|
import { circleSize } from './timeUtils'
|
|
4
4
|
import { useTextColorOnPrimary } from '../shared/utils'
|
|
5
|
-
import
|
|
5
|
+
import { memo } from 'react'
|
|
6
6
|
|
|
7
7
|
function AnalogClockHours({
|
|
8
8
|
is24Hour,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleSheet, View } from 'react-native'
|
|
2
2
|
import { Text } from 'react-native-paper'
|
|
3
3
|
import { circleSize } from './timeUtils'
|
|
4
4
|
import { useTextColorOnPrimary } from '../shared/utils'
|
|
5
|
-
import
|
|
5
|
+
import { memo } from 'react'
|
|
6
6
|
|
|
7
7
|
function AnalogClockMinutes({ minutes }: { minutes: number }) {
|
|
8
8
|
const range = getMinuteNumbers(circleSize, 12)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Animated, StyleSheet, View } from 'react-native'
|
|
2
2
|
import { clockTypes, PossibleClockTypes } from './timeUtils'
|
|
3
|
-
import
|
|
3
|
+
import { ReactElement, useEffect, useRef } from 'react'
|
|
4
4
|
import AnalogClockHours from './AnalogClockHours'
|
|
5
5
|
import AnalogClockMinutes from './AnalogClockMinutes'
|
|
6
6
|
|
package/src/Time/TimeInput.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
Platform,
|
|
3
|
+
StyleSheet,
|
|
3
4
|
TextInput,
|
|
4
5
|
TextInputProps,
|
|
5
|
-
|
|
6
|
-
Platform,
|
|
6
|
+
View,
|
|
7
7
|
} from 'react-native'
|
|
8
|
-
import {
|
|
8
|
+
import { MD2Theme, TouchableRipple, useTheme } from 'react-native-paper'
|
|
9
9
|
|
|
10
10
|
import Color from 'color'
|
|
11
11
|
import {
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
useInputColors,
|
|
16
16
|
} from './timeUtils'
|
|
17
17
|
import { forwardRef, useEffect, useState } from 'react'
|
|
18
|
-
import React from 'react'
|
|
19
18
|
import { sharedStyles } from '../shared/styles'
|
|
20
19
|
|
|
21
20
|
interface TimeInputProps
|
|
@@ -91,6 +90,7 @@ function TimeInput(
|
|
|
91
90
|
ref={ref}
|
|
92
91
|
textAlign="center"
|
|
93
92
|
style={[
|
|
93
|
+
styles.input,
|
|
94
94
|
// eslint-disable-next-line react-native/no-inline-styles
|
|
95
95
|
{
|
|
96
96
|
color,
|
|
@@ -104,6 +104,7 @@ function TimeInput(
|
|
|
104
104
|
: undefined,
|
|
105
105
|
paddingTop: Platform.OS === 'android' ? 10 : undefined,
|
|
106
106
|
paddingBottom: Platform.OS === 'android' ? 0 : undefined,
|
|
107
|
+
textAlign: 'center',
|
|
107
108
|
},
|
|
108
109
|
]}
|
|
109
110
|
maxFontSizeMultiplier={1.5}
|
|
@@ -146,6 +147,9 @@ const styles = StyleSheet.create({
|
|
|
146
147
|
justifyContent: 'center',
|
|
147
148
|
width: 96,
|
|
148
149
|
},
|
|
150
|
+
input: {
|
|
151
|
+
width: 96,
|
|
152
|
+
},
|
|
149
153
|
})
|
|
150
154
|
|
|
151
155
|
export default forwardRef(TimeInput)
|
package/src/Time/TimeInputs.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
View,
|
|
3
2
|
StyleSheet,
|
|
4
|
-
useWindowDimensions,
|
|
5
3
|
TextInput as TextInputNative,
|
|
4
|
+
useWindowDimensions,
|
|
5
|
+
View,
|
|
6
6
|
} from 'react-native'
|
|
7
7
|
import { MD2Theme, Text, useTheme } from 'react-native-paper'
|
|
8
8
|
|
|
@@ -19,7 +19,6 @@ import { useLatest } from '../shared/utils'
|
|
|
19
19
|
import Color from 'color'
|
|
20
20
|
import { getTranslation } from '../translations/utils'
|
|
21
21
|
import { memo, useCallback, useRef } from 'react'
|
|
22
|
-
import React from 'react'
|
|
23
22
|
import { sharedStyles } from '../shared/styles'
|
|
24
23
|
|
|
25
24
|
function TimeInputs({
|
package/src/Time/TimePicker.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { StyleSheet, useWindowDimensions, View } from 'react-native'
|
|
2
|
+
|
|
3
3
|
import {
|
|
4
|
+
circleSize,
|
|
4
5
|
inputTypes,
|
|
5
6
|
PossibleClockTypes,
|
|
6
7
|
PossibleInputTypes,
|
|
@@ -9,10 +10,9 @@ import {
|
|
|
9
10
|
} from './timeUtils'
|
|
10
11
|
|
|
11
12
|
import AnalogClock from './AnalogClock'
|
|
12
|
-
import { circleSize } from './timeUtils'
|
|
13
13
|
import TimeInputs from './TimeInputs'
|
|
14
14
|
import { DisplayModeContext } from '../contexts/DisplayModeContext'
|
|
15
|
-
import { useCallback, useEffect, useMemo, useState } from 'react'
|
|
15
|
+
import { memo, useCallback, useEffect, useMemo, useState } from 'react'
|
|
16
16
|
|
|
17
17
|
type onChangeFunc = ({
|
|
18
18
|
hours,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Animated,
|
|
3
|
+
Keyboard,
|
|
4
|
+
KeyboardAvoidingView,
|
|
2
5
|
Modal,
|
|
3
6
|
StyleSheet,
|
|
4
|
-
View,
|
|
5
7
|
Text,
|
|
6
|
-
Animated,
|
|
7
8
|
TouchableWithoutFeedback,
|
|
8
|
-
|
|
9
|
-
Keyboard,
|
|
9
|
+
View,
|
|
10
10
|
} from 'react-native'
|
|
11
11
|
|
|
12
12
|
import {
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
PossibleInputTypes,
|
|
27
27
|
reverseInputTypes,
|
|
28
28
|
} from './timeUtils'
|
|
29
|
-
import
|
|
29
|
+
import { memo, useCallback, useEffect, useState } from 'react'
|
|
30
30
|
import { sharedStyles } from '../shared/styles'
|
|
31
31
|
import { supportedOrientations } from '../shared/utils'
|
|
32
32
|
|
|
@@ -192,6 +192,11 @@ export function TimePickerModal({
|
|
|
192
192
|
</View>
|
|
193
193
|
<View style={styles.bottom}>
|
|
194
194
|
<IconButton
|
|
195
|
+
iconColor={
|
|
196
|
+
theme?.isV3
|
|
197
|
+
? theme.colors.onSurfaceVariant
|
|
198
|
+
: (theme as any as MD2Theme).colors.text
|
|
199
|
+
}
|
|
195
200
|
icon={getTimeInputTypeIcon(inputType, {
|
|
196
201
|
keyboard: keyboardIcon,
|
|
197
202
|
picker: clockIcon,
|