react-native-paper-dates 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/lib/commonjs/Date/AnimatedCrossView.js +7 -6
- package/lib/commonjs/Date/AnimatedCrossView.js.map +1 -1
- package/lib/commonjs/Date/AutoSizer.js +4 -3
- package/lib/commonjs/Date/AutoSizer.js.map +1 -1
- package/lib/commonjs/Date/Calendar.js +37 -31
- package/lib/commonjs/Date/Calendar.js.map +1 -1
- package/lib/commonjs/Date/CalendarEdit.js +18 -14
- package/lib/commonjs/Date/CalendarEdit.js.map +1 -1
- package/lib/commonjs/Date/CalendarHeader.js +17 -10
- package/lib/commonjs/Date/CalendarHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerInput.js +28 -21
- package/lib/commonjs/Date/DatePickerInput.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalContentHeader.js +30 -24
- package/lib/commonjs/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeader.js +4 -1
- package/lib/commonjs/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeaderBackground.js +4 -3
- package/lib/commonjs/Date/DatePickerModalHeaderBackground.js.map +1 -1
- package/lib/commonjs/Date/DateRangeInput.js +13 -8
- package/lib/commonjs/Date/DateRangeInput.js.map +1 -1
- package/lib/commonjs/Date/Day.js +4 -1
- package/lib/commonjs/Date/Day.js.map +1 -1
- package/lib/commonjs/Date/DayName.js +4 -3
- package/lib/commonjs/Date/DayName.js.map +1 -1
- package/lib/commonjs/Date/DayNames.js +5 -4
- package/lib/commonjs/Date/DayNames.js.map +1 -1
- package/lib/commonjs/Date/DayRange.js +7 -6
- package/lib/commonjs/Date/DayRange.js.map +1 -1
- package/lib/commonjs/Date/Month.js +45 -34
- package/lib/commonjs/Date/Month.js.map +1 -1
- package/lib/commonjs/Date/Swiper.js +33 -27
- package/lib/commonjs/Date/Swiper.js.map +1 -1
- package/lib/commonjs/Date/Swiper.native.js +27 -21
- package/lib/commonjs/Date/Swiper.native.js.map +1 -1
- package/lib/commonjs/Date/SwiperUtils.js +5 -4
- package/lib/commonjs/Date/SwiperUtils.js.map +1 -1
- package/lib/commonjs/Date/YearPicker.js +26 -18
- package/lib/commonjs/Date/YearPicker.js.map +1 -1
- package/lib/commonjs/Date/dateUtils.js +49 -37
- package/lib/commonjs/Date/dateUtils.js.map +1 -1
- package/lib/commonjs/Date/inputUtils.js +8 -7
- package/lib/commonjs/Date/inputUtils.js.map +1 -1
- package/lib/commonjs/TextInputMask.js +7 -6
- package/lib/commonjs/TextInputMask.js.map +1 -1
- package/lib/commonjs/Time/AmPmSwitcher.js +12 -10
- package/lib/commonjs/Time/AmPmSwitcher.js.map +1 -1
- package/lib/commonjs/Time/AnalogClock.js +8 -7
- package/lib/commonjs/Time/AnalogClock.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockHours.js +5 -4
- package/lib/commonjs/Time/AnalogClockHours.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockMinutes.js +5 -4
- package/lib/commonjs/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/commonjs/Time/AnimatedClockSwitcher.js +6 -5
- package/lib/commonjs/Time/AnimatedClockSwitcher.js.map +1 -1
- package/lib/commonjs/Time/TimeInput.js +14 -10
- package/lib/commonjs/Time/TimeInput.js.map +1 -1
- package/lib/commonjs/Time/TimeInputs.js +10 -9
- package/lib/commonjs/Time/TimeInputs.js.map +1 -1
- package/lib/commonjs/Time/TimePicker.js +10 -9
- package/lib/commonjs/Time/TimePicker.js.map +1 -1
- package/lib/commonjs/Time/TimePickerModal.js +17 -13
- package/lib/commonjs/Time/TimePickerModal.js.map +1 -1
- package/lib/commonjs/Time/timeUtils.js +7 -6
- package/lib/commonjs/Time/timeUtils.js.map +1 -1
- package/lib/commonjs/index.js +29 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/translations/enGB.js +20 -0
- package/lib/commonjs/translations/enGB.js.map +1 -0
- package/lib/commonjs/translations/pl.js +20 -0
- package/lib/commonjs/translations/pl.js.map +1 -0
- package/lib/commonjs/utils.js +4 -4
- package/lib/module/Date/AnimatedCrossView.js +7 -6
- package/lib/module/Date/AnimatedCrossView.js.map +1 -1
- package/lib/module/Date/AutoSizer.js +4 -3
- package/lib/module/Date/AutoSizer.js.map +1 -1
- package/lib/module/Date/Calendar.js +37 -31
- package/lib/module/Date/Calendar.js.map +1 -1
- package/lib/module/Date/CalendarEdit.js +18 -14
- package/lib/module/Date/CalendarEdit.js.map +1 -1
- package/lib/module/Date/CalendarHeader.js +16 -9
- package/lib/module/Date/CalendarHeader.js.map +1 -1
- package/lib/module/Date/DatePickerInput.js +28 -21
- package/lib/module/Date/DatePickerInput.js.map +1 -1
- package/lib/module/Date/DatePickerModalContentHeader.js +28 -22
- package/lib/module/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeader.js +4 -1
- package/lib/module/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeaderBackground.js +4 -3
- package/lib/module/Date/DatePickerModalHeaderBackground.js.map +1 -1
- package/lib/module/Date/DateRangeInput.js +13 -8
- package/lib/module/Date/DateRangeInput.js.map +1 -1
- package/lib/module/Date/Day.js +4 -1
- package/lib/module/Date/Day.js.map +1 -1
- package/lib/module/Date/DayName.js +4 -3
- package/lib/module/Date/DayName.js.map +1 -1
- package/lib/module/Date/DayNames.js +5 -4
- package/lib/module/Date/DayNames.js.map +1 -1
- package/lib/module/Date/DayRange.js +7 -6
- package/lib/module/Date/DayRange.js.map +1 -1
- package/lib/module/Date/Month.js +41 -31
- package/lib/module/Date/Month.js.map +1 -1
- package/lib/module/Date/Swiper.js +32 -26
- package/lib/module/Date/Swiper.js.map +1 -1
- package/lib/module/Date/Swiper.native.js +27 -21
- package/lib/module/Date/Swiper.native.js.map +1 -1
- package/lib/module/Date/SwiperUtils.js +5 -4
- package/lib/module/Date/SwiperUtils.js.map +1 -1
- package/lib/module/Date/YearPicker.js +26 -18
- package/lib/module/Date/YearPicker.js.map +1 -1
- package/lib/module/Date/dateUtils.js +33 -25
- package/lib/module/Date/dateUtils.js.map +1 -1
- package/lib/module/Date/inputUtils.js +8 -7
- package/lib/module/Date/inputUtils.js.map +1 -1
- package/lib/module/TextInputMask.js +7 -6
- package/lib/module/TextInputMask.js.map +1 -1
- package/lib/module/Time/AmPmSwitcher.js +12 -10
- package/lib/module/Time/AmPmSwitcher.js.map +1 -1
- package/lib/module/Time/AnalogClock.js +8 -7
- package/lib/module/Time/AnalogClock.js.map +1 -1
- package/lib/module/Time/AnalogClockHours.js +5 -4
- package/lib/module/Time/AnalogClockHours.js.map +1 -1
- package/lib/module/Time/AnalogClockMinutes.js +5 -4
- package/lib/module/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/module/Time/AnimatedClockSwitcher.js +6 -5
- package/lib/module/Time/AnimatedClockSwitcher.js.map +1 -1
- package/lib/module/Time/TimeInput.js +14 -10
- package/lib/module/Time/TimeInput.js.map +1 -1
- package/lib/module/Time/TimeInputs.js +10 -9
- package/lib/module/Time/TimeInputs.js.map +1 -1
- package/lib/module/Time/TimePicker.js +10 -9
- package/lib/module/Time/TimePicker.js.map +1 -1
- package/lib/module/Time/TimePickerModal.js +17 -13
- package/lib/module/Time/TimePickerModal.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/translations/enGB.js +13 -0
- package/lib/module/translations/enGB.js.map +1 -0
- package/lib/module/translations/pl.js +13 -0
- package/lib/module/translations/pl.js.map +1 -0
- package/lib/typescript/Date/DatePickerInput.d.ts +4 -4
- package/lib/typescript/TextInputMask.d.ts +3 -3
- package/lib/typescript/Time/AmPmSwitcher.d.ts +1 -1
- package/lib/typescript/Time/AnalogClock.d.ts +1 -1
- package/lib/typescript/Time/TimeInputs.d.ts +1 -1
- package/lib/typescript/Time/TimePickerModal.d.ts +1 -1
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/translations/enGB.d.ts +3 -0
- package/lib/typescript/translations/pl.d.ts +3 -0
- package/package.json +19 -17
- package/src/Date/CalendarEdit.tsx +3 -0
- package/src/Date/CalendarHeader.tsx +14 -2
- package/src/Date/DatePickerInput.tsx +3 -0
- package/src/Date/DatePickerModalContentHeader.tsx +3 -0
- package/src/Date/DatePickerModalHeader.tsx +3 -0
- package/src/Date/DateRangeInput.tsx +7 -1
- package/src/Date/Day.tsx +3 -0
- package/src/Date/Month.tsx +6 -0
- package/src/Date/Swiper.tsx +1 -0
- package/src/Date/YearPicker.tsx +4 -1
- package/src/Time/AmPmSwitcher.tsx +1 -1
- package/src/Time/AnalogClock.tsx +1 -5
- package/src/Time/AnalogClockMinutes.tsx +4 -1
- package/src/Time/TimeInput.tsx +3 -0
- package/src/Time/TimeInputs.tsx +1 -5
- package/src/Time/TimePickerModal.tsx +4 -1
- package/src/index.tsx +2 -0
- package/src/translations/enGB.ts +15 -0
- package/src/translations/pl.ts +15 -0
|
@@ -30,7 +30,10 @@ function AnalogClockMinutes({ minutes }: { minutes: number }) {
|
|
|
30
30
|
]}
|
|
31
31
|
>
|
|
32
32
|
<View style={styles.outerHourInner}>
|
|
33
|
-
<Text
|
|
33
|
+
<Text
|
|
34
|
+
style={isCurrent ? { color } : undefined}
|
|
35
|
+
selectable={false}
|
|
36
|
+
>
|
|
34
37
|
{isZero ? '00' : currentMinutes}
|
|
35
38
|
</Text>
|
|
36
39
|
</View>
|
package/src/Time/TimeInput.tsx
CHANGED
|
@@ -96,6 +96,9 @@ function TimeInput(
|
|
|
96
96
|
rippleColor={Color(theme.colors.primary).fade(0.7).hex()}
|
|
97
97
|
onPress={() => onPress(clockType)}
|
|
98
98
|
borderless={true}
|
|
99
|
+
// RN types bug
|
|
100
|
+
hasTVPreferredFocus={undefined}
|
|
101
|
+
tvParallaxProperties={undefined}
|
|
99
102
|
>
|
|
100
103
|
<View />
|
|
101
104
|
</TouchableRipple>
|
package/src/Time/TimeInputs.tsx
CHANGED
|
@@ -35,11 +35,7 @@ function TimeInputs({
|
|
|
35
35
|
hours: number
|
|
36
36
|
minutes: number
|
|
37
37
|
onFocusInput: (type: PossibleClockTypes) => any
|
|
38
|
-
onChange: ({
|
|
39
|
-
hours,
|
|
40
|
-
minutes,
|
|
41
|
-
focused,
|
|
42
|
-
}: {
|
|
38
|
+
onChange: (hoursMinutesAndFocused: {
|
|
43
39
|
hours: number
|
|
44
40
|
minutes: number
|
|
45
41
|
focused?: undefined | PossibleClockTypes
|
|
@@ -48,7 +48,7 @@ export function TimePickerModal({
|
|
|
48
48
|
minutes?: number | undefined
|
|
49
49
|
visible: boolean | undefined
|
|
50
50
|
onDismiss: () => any
|
|
51
|
-
onConfirm: (
|
|
51
|
+
onConfirm: (hoursAndMinutes: { hours: number; minutes: number }) => any
|
|
52
52
|
animationType?: 'slide' | 'fade' | 'none'
|
|
53
53
|
}) {
|
|
54
54
|
const theme = useTheme()
|
|
@@ -155,6 +155,9 @@ export function TimePickerModal({
|
|
|
155
155
|
size={24}
|
|
156
156
|
style={styles.inputTypeToggle}
|
|
157
157
|
accessibilityLabel="toggle keyboard"
|
|
158
|
+
// RN types bug
|
|
159
|
+
hasTVPreferredFocus={undefined}
|
|
160
|
+
tvParallaxProperties={undefined}
|
|
158
161
|
/>
|
|
159
162
|
<View style={styles.fill} />
|
|
160
163
|
<Button onPress={onDismiss}>{cancelLabel}</Button>
|
package/src/index.tsx
CHANGED
|
@@ -9,3 +9,5 @@ export type { TranslationsType } from './translations/utils'
|
|
|
9
9
|
export { registerTranslation, getTranslation } from './translations/utils'
|
|
10
10
|
export { default as nl } from './translations/nl'
|
|
11
11
|
export { default as en } from './translations/en'
|
|
12
|
+
export { default as pl } from './translations/pl'
|
|
13
|
+
export { default as enGB } from './translations/enGB'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TranslationsType } from './utils'
|
|
2
|
+
|
|
3
|
+
const enGB: TranslationsType = {
|
|
4
|
+
save: 'Save',
|
|
5
|
+
selectSingle: 'Select date',
|
|
6
|
+
selectMultiple: 'Select dates',
|
|
7
|
+
selectRange: 'Select period',
|
|
8
|
+
notAccordingToDateFormat: (inputFormat: string) =>
|
|
9
|
+
`Date format must be ${inputFormat}`,
|
|
10
|
+
mustBeHigherThan: 'Must be later then',
|
|
11
|
+
mustBeLowerThan: 'Must be earlier then',
|
|
12
|
+
mustBeBetween: 'Must be between',
|
|
13
|
+
dateIsDisabled: 'Day is not allowed',
|
|
14
|
+
}
|
|
15
|
+
export default enGB
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TranslationsType } from './utils'
|
|
2
|
+
|
|
3
|
+
const pl: TranslationsType = {
|
|
4
|
+
save: 'Zapisz',
|
|
5
|
+
selectSingle: 'Wybierz datę',
|
|
6
|
+
selectMultiple: 'Wybierz daty',
|
|
7
|
+
selectRange: 'Wybierz zakres',
|
|
8
|
+
notAccordingToDateFormat: (inputFormat: string) =>
|
|
9
|
+
`Data musi mieć format ${inputFormat}`,
|
|
10
|
+
mustBeHigherThan: 'Nie wcześniej niż',
|
|
11
|
+
mustBeLowerThan: 'Nie później niż',
|
|
12
|
+
mustBeBetween: 'Pomiędzy',
|
|
13
|
+
dateIsDisabled: 'Niedozwolona data',
|
|
14
|
+
}
|
|
15
|
+
export default pl
|