rn-grid-date-time-picker 1.0.0 → 1.2.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/CHANGELOG.md +86 -0
- package/README.md +100 -638
- package/lib/commonjs/adapters/utcMidnight.js +15 -6
- package/lib/commonjs/adapters/utcMidnight.js.map +1 -1
- package/lib/commonjs/components/DateTimePicker.js +484 -85
- package/lib/commonjs/components/DateTimePicker.js.map +1 -1
- package/lib/commonjs/components/calendar/Calendar.js +21 -7
- package/lib/commonjs/components/calendar/Calendar.js.map +1 -1
- package/lib/commonjs/components/calendar/CalendarHeader.js +46 -6
- package/lib/commonjs/components/calendar/CalendarHeader.js.map +1 -1
- package/lib/commonjs/components/calendar/CalendarSwitch.js +150 -0
- package/lib/commonjs/components/calendar/CalendarSwitch.js.map +1 -0
- package/lib/commonjs/components/calendar/DayCell.js +8 -3
- package/lib/commonjs/components/calendar/DayCell.js.map +1 -1
- package/lib/commonjs/components/calendar/DayGrid.js +13 -2
- package/lib/commonjs/components/calendar/DayGrid.js.map +1 -1
- package/lib/commonjs/components/calendar/PeriodGrid.js +3 -1
- package/lib/commonjs/components/calendar/PeriodGrid.js.map +1 -1
- package/lib/commonjs/components/calendar/calendarStyles.js +3 -2
- package/lib/commonjs/components/calendar/calendarStyles.js.map +1 -1
- package/lib/commonjs/components/calendar/localeNames.js +46 -24
- package/lib/commonjs/components/calendar/localeNames.js.map +1 -1
- package/lib/commonjs/components/calendar/selection.js +9 -1
- package/lib/commonjs/components/calendar/selection.js.map +1 -1
- package/lib/commonjs/components/container/DefaultSheet.js +42 -11
- package/lib/commonjs/components/container/DefaultSheet.js.map +1 -1
- package/lib/commonjs/components/container/PickerContainer.js +4 -0
- package/lib/commonjs/components/container/PickerContainer.js.map +1 -1
- package/lib/commonjs/components/container/PickerLayout.js +1 -1
- package/lib/commonjs/components/container/PickerLayout.js.map +1 -1
- package/lib/commonjs/components/container/containerStyles.js +12 -4
- package/lib/commonjs/components/container/containerStyles.js.map +1 -1
- package/lib/commonjs/components/field/RangeFields.js +5 -1
- package/lib/commonjs/components/field/RangeFields.js.map +1 -1
- package/lib/commonjs/components/field/SegmentedInput.js +8 -3
- package/lib/commonjs/components/field/SegmentedInput.js.map +1 -1
- package/lib/commonjs/components/field/ValueField.js +64 -8
- package/lib/commonjs/components/field/ValueField.js.map +1 -1
- package/lib/commonjs/components/field/fieldStyles.js +17 -0
- package/lib/commonjs/components/field/fieldStyles.js.map +1 -1
- package/lib/commonjs/components/field/fieldText.js +29 -13
- package/lib/commonjs/components/field/fieldText.js.map +1 -1
- package/lib/commonjs/components/hooks/useBottomInset.js +32 -0
- package/lib/commonjs/components/hooks/useBottomInset.js.map +1 -0
- package/lib/commonjs/components/hooks/useKeyboardFold.js +36 -13
- package/lib/commonjs/components/hooks/useKeyboardFold.js.map +1 -1
- package/lib/commonjs/components/hooks/useOpenPicker.js +39 -17
- package/lib/commonjs/components/hooks/useOpenPicker.js.map +1 -1
- package/lib/commonjs/components/hooks/useTypedSegments.js +6 -2
- package/lib/commonjs/components/hooks/useTypedSegments.js.map +1 -1
- package/lib/commonjs/components/theme/defaultStrings.js +13 -3
- package/lib/commonjs/components/theme/defaultStrings.js.map +1 -1
- package/lib/commonjs/components/theme/direction.js +17 -0
- package/lib/commonjs/components/theme/direction.js.map +1 -0
- package/lib/commonjs/components/theme/numerals.js +16 -0
- package/lib/commonjs/components/theme/numerals.js.map +1 -0
- package/lib/commonjs/components/theme/styleKeys.js +10 -2
- package/lib/commonjs/components/theme/styleKeys.js.map +1 -1
- package/lib/commonjs/components/theme/tokens.js +4 -0
- package/lib/commonjs/components/theme/tokens.js.map +1 -1
- package/lib/commonjs/components/time/TimeRow.js +10 -2
- package/lib/commonjs/components/time/TimeRow.js.map +1 -1
- package/lib/commonjs/components/time/TypedTime.js +3 -1
- package/lib/commonjs/components/time/TypedTime.js.map +1 -1
- package/lib/commonjs/components/time/Wheel.js +20 -3
- package/lib/commonjs/components/time/Wheel.js.map +1 -1
- package/lib/commonjs/components/time/timeStyles.js +4 -5
- package/lib/commonjs/components/time/timeStyles.js.map +1 -1
- package/lib/commonjs/components/types.js +10 -0
- package/lib/commonjs/components/types.js.map +1 -1
- package/lib/commonjs/core/calendarSystem.js +123 -22
- package/lib/commonjs/core/calendarSystem.js.map +1 -1
- package/lib/commonjs/core/digits.js +25 -0
- package/lib/commonjs/core/digits.js.map +1 -0
- package/lib/commonjs/core/draft.js +31 -10
- package/lib/commonjs/core/draft.js.map +1 -1
- package/lib/commonjs/core/locale.js +20 -4
- package/lib/commonjs/core/locale.js.map +1 -1
- package/lib/commonjs/core/numerals.js +46 -0
- package/lib/commonjs/core/numerals.js.map +1 -0
- package/lib/commonjs/core/segmentEditor.js +9 -0
- package/lib/commonjs/core/segmentEditor.js.map +1 -1
- package/lib/commonjs/core/segments.js +2 -11
- package/lib/commonjs/core/segments.js.map +1 -1
- package/lib/commonjs/core/selectionRules.js +2 -1
- package/lib/commonjs/core/selectionRules.js.map +1 -1
- package/lib/commonjs/core/timeEntry.js +7 -91
- package/lib/commonjs/core/timeEntry.js.map +1 -1
- package/lib/commonjs/icons/index.js +5 -1
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/index.js +20 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/adapters/utcMidnight.js +14 -5
- package/lib/module/adapters/utcMidnight.js.map +1 -1
- package/lib/module/components/DateTimePicker.js +490 -91
- package/lib/module/components/DateTimePicker.js.map +1 -1
- package/lib/module/components/calendar/Calendar.js +25 -11
- package/lib/module/components/calendar/Calendar.js.map +1 -1
- package/lib/module/components/calendar/CalendarHeader.js +47 -7
- package/lib/module/components/calendar/CalendarHeader.js.map +1 -1
- package/lib/module/components/calendar/CalendarSwitch.js +145 -0
- package/lib/module/components/calendar/CalendarSwitch.js.map +1 -0
- package/lib/module/components/calendar/DayCell.js +8 -3
- package/lib/module/components/calendar/DayCell.js.map +1 -1
- package/lib/module/components/calendar/DayGrid.js +14 -3
- package/lib/module/components/calendar/DayGrid.js.map +1 -1
- package/lib/module/components/calendar/PeriodGrid.js +3 -1
- package/lib/module/components/calendar/PeriodGrid.js.map +1 -1
- package/lib/module/components/calendar/calendarStyles.js +3 -2
- package/lib/module/components/calendar/calendarStyles.js.map +1 -1
- package/lib/module/components/calendar/localeNames.js +46 -24
- package/lib/module/components/calendar/localeNames.js.map +1 -1
- package/lib/module/components/calendar/selection.js +7 -0
- package/lib/module/components/calendar/selection.js.map +1 -1
- package/lib/module/components/container/DefaultSheet.js +42 -12
- package/lib/module/components/container/DefaultSheet.js.map +1 -1
- package/lib/module/components/container/PickerContainer.js +4 -0
- package/lib/module/components/container/PickerContainer.js.map +1 -1
- package/lib/module/components/container/PickerLayout.js +1 -1
- package/lib/module/components/container/PickerLayout.js.map +1 -1
- package/lib/module/components/container/containerStyles.js +11 -3
- package/lib/module/components/container/containerStyles.js.map +1 -1
- package/lib/module/components/field/RangeFields.js +5 -1
- package/lib/module/components/field/RangeFields.js.map +1 -1
- package/lib/module/components/field/SegmentedInput.js +8 -3
- package/lib/module/components/field/SegmentedInput.js.map +1 -1
- package/lib/module/components/field/ValueField.js +66 -10
- package/lib/module/components/field/ValueField.js.map +1 -1
- package/lib/module/components/field/fieldStyles.js +17 -0
- package/lib/module/components/field/fieldStyles.js.map +1 -1
- package/lib/module/components/field/fieldText.js +28 -11
- package/lib/module/components/field/fieldText.js.map +1 -1
- package/lib/module/components/hooks/useBottomInset.js +27 -0
- package/lib/module/components/hooks/useBottomInset.js.map +1 -0
- package/lib/module/components/hooks/useKeyboardFold.js +33 -12
- package/lib/module/components/hooks/useKeyboardFold.js.map +1 -1
- package/lib/module/components/hooks/useOpenPicker.js +39 -17
- package/lib/module/components/hooks/useOpenPicker.js.map +1 -1
- package/lib/module/components/hooks/useTypedSegments.js +6 -2
- package/lib/module/components/hooks/useTypedSegments.js.map +1 -1
- package/lib/module/components/theme/defaultStrings.js +11 -2
- package/lib/module/components/theme/defaultStrings.js.map +1 -1
- package/lib/module/components/theme/direction.js +13 -0
- package/lib/module/components/theme/direction.js.map +1 -0
- package/lib/module/components/theme/numerals.js +12 -0
- package/lib/module/components/theme/numerals.js.map +1 -0
- package/lib/module/components/theme/styleKeys.js +10 -2
- package/lib/module/components/theme/styleKeys.js.map +1 -1
- package/lib/module/components/theme/tokens.js +4 -0
- package/lib/module/components/theme/tokens.js.map +1 -1
- package/lib/module/components/time/TimeRow.js +11 -3
- package/lib/module/components/time/TimeRow.js.map +1 -1
- package/lib/module/components/time/TypedTime.js +3 -1
- package/lib/module/components/time/TypedTime.js.map +1 -1
- package/lib/module/components/time/Wheel.js +18 -2
- package/lib/module/components/time/Wheel.js.map +1 -1
- package/lib/module/components/time/timeStyles.js +4 -5
- package/lib/module/components/time/timeStyles.js.map +1 -1
- package/lib/module/components/types.js +10 -0
- package/lib/module/components/types.js.map +1 -1
- package/lib/module/core/calendarSystem.js +118 -19
- package/lib/module/core/calendarSystem.js.map +1 -1
- package/lib/module/core/digits.js +20 -0
- package/lib/module/core/digits.js.map +1 -0
- package/lib/module/core/draft.js +29 -9
- package/lib/module/core/draft.js.map +1 -1
- package/lib/module/core/locale.js +18 -3
- package/lib/module/core/locale.js.map +1 -1
- package/lib/module/core/numerals.js +39 -0
- package/lib/module/core/numerals.js.map +1 -0
- package/lib/module/core/segmentEditor.js +9 -0
- package/lib/module/core/segmentEditor.js.map +1 -1
- package/lib/module/core/segments.js +0 -8
- package/lib/module/core/segments.js.map +1 -1
- package/lib/module/core/selectionRules.js +2 -1
- package/lib/module/core/selectionRules.js.map +1 -1
- package/lib/module/core/timeEntry.js +7 -89
- package/lib/module/core/timeEntry.js.map +1 -1
- package/lib/module/icons/index.js +5 -1
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/adapters/utcMidnight.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/DateTimePicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/calendar/Calendar.d.ts +8 -4
- package/lib/typescript/commonjs/src/components/calendar/Calendar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/calendar/CalendarHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/calendar/CalendarSwitch.d.ts +26 -0
- package/lib/typescript/commonjs/src/components/calendar/CalendarSwitch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/calendar/DayCell.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/calendar/DayCell.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/calendar/DayGrid.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/calendar/DayGrid.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/calendar/PeriodGrid.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/calendar/calendarStyles.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/calendar/calendarStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/calendar/localeNames.d.ts +8 -3
- package/lib/typescript/commonjs/src/components/calendar/localeNames.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/calendar/selection.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/calendar/selection.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/container/DefaultSheet.d.ts +10 -2
- package/lib/typescript/commonjs/src/components/container/DefaultSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/container/PickerContainer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/container/containerStyles.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/container/containerStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/field/RangeFields.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/field/RangeFields.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/field/SegmentedInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/field/ValueField.d.ts +7 -0
- package/lib/typescript/commonjs/src/components/field/ValueField.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/field/fieldStyles.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/field/fieldStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/field/fieldText.d.ts +14 -5
- package/lib/typescript/commonjs/src/components/field/fieldText.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/hooks/useBottomInset.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/hooks/useBottomInset.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/hooks/useKeyboardFold.d.ts +10 -2
- package/lib/typescript/commonjs/src/components/hooks/useKeyboardFold.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/hooks/useOpenPicker.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/hooks/useOpenPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/hooks/useTypedSegments.d.ts +3 -2
- package/lib/typescript/commonjs/src/components/hooks/useTypedSegments.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/theme/defaultStrings.d.ts +13 -2
- package/lib/typescript/commonjs/src/components/theme/defaultStrings.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/theme/direction.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/theme/direction.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/theme/numerals.d.ts +7 -0
- package/lib/typescript/commonjs/src/components/theme/numerals.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/theme/styleKeys.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/theme/styleKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/theme/tokens.d.ts +3 -1
- package/lib/typescript/commonjs/src/components/theme/tokens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/time/TimeRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/time/TypedTime.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/time/Wheel.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/time/Wheel.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/time/timeStyles.d.ts +0 -2
- package/lib/typescript/commonjs/src/components/time/timeStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/types.d.ts +84 -4
- package/lib/typescript/commonjs/src/components/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/calendarSystem.d.ts +20 -5
- package/lib/typescript/commonjs/src/core/calendarSystem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/digits.d.ts +3 -0
- package/lib/typescript/commonjs/src/core/digits.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/draft.d.ts +12 -1
- package/lib/typescript/commonjs/src/core/draft.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/locale.d.ts +6 -0
- package/lib/typescript/commonjs/src/core/locale.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/numerals.d.ts +15 -0
- package/lib/typescript/commonjs/src/core/numerals.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/segmentEditor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/segments.d.ts +0 -2
- package/lib/typescript/commonjs/src/core/segments.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/selectionRules.d.ts +3 -2
- package/lib/typescript/commonjs/src/core/selectionRules.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/timeEntry.d.ts +4 -24
- package/lib/typescript/commonjs/src/core/timeEntry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +7 -3
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/adapters/utcMidnight.d.ts.map +1 -1
- package/lib/typescript/module/src/components/DateTimePicker.d.ts.map +1 -1
- package/lib/typescript/module/src/components/calendar/Calendar.d.ts +8 -4
- package/lib/typescript/module/src/components/calendar/Calendar.d.ts.map +1 -1
- package/lib/typescript/module/src/components/calendar/CalendarHeader.d.ts.map +1 -1
- package/lib/typescript/module/src/components/calendar/CalendarSwitch.d.ts +26 -0
- package/lib/typescript/module/src/components/calendar/CalendarSwitch.d.ts.map +1 -0
- package/lib/typescript/module/src/components/calendar/DayCell.d.ts +1 -1
- package/lib/typescript/module/src/components/calendar/DayCell.d.ts.map +1 -1
- package/lib/typescript/module/src/components/calendar/DayGrid.d.ts +2 -0
- package/lib/typescript/module/src/components/calendar/DayGrid.d.ts.map +1 -1
- package/lib/typescript/module/src/components/calendar/PeriodGrid.d.ts.map +1 -1
- package/lib/typescript/module/src/components/calendar/calendarStyles.d.ts +1 -1
- package/lib/typescript/module/src/components/calendar/calendarStyles.d.ts.map +1 -1
- package/lib/typescript/module/src/components/calendar/localeNames.d.ts +8 -3
- package/lib/typescript/module/src/components/calendar/localeNames.d.ts.map +1 -1
- package/lib/typescript/module/src/components/calendar/selection.d.ts +2 -0
- package/lib/typescript/module/src/components/calendar/selection.d.ts.map +1 -1
- package/lib/typescript/module/src/components/container/DefaultSheet.d.ts +10 -2
- package/lib/typescript/module/src/components/container/DefaultSheet.d.ts.map +1 -1
- package/lib/typescript/module/src/components/container/PickerContainer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/container/containerStyles.d.ts +6 -0
- package/lib/typescript/module/src/components/container/containerStyles.d.ts.map +1 -1
- package/lib/typescript/module/src/components/field/RangeFields.d.ts +5 -0
- package/lib/typescript/module/src/components/field/RangeFields.d.ts.map +1 -1
- package/lib/typescript/module/src/components/field/SegmentedInput.d.ts.map +1 -1
- package/lib/typescript/module/src/components/field/ValueField.d.ts +7 -0
- package/lib/typescript/module/src/components/field/ValueField.d.ts.map +1 -1
- package/lib/typescript/module/src/components/field/fieldStyles.d.ts +15 -0
- package/lib/typescript/module/src/components/field/fieldStyles.d.ts.map +1 -1
- package/lib/typescript/module/src/components/field/fieldText.d.ts +14 -5
- package/lib/typescript/module/src/components/field/fieldText.d.ts.map +1 -1
- package/lib/typescript/module/src/components/hooks/useBottomInset.d.ts +8 -0
- package/lib/typescript/module/src/components/hooks/useBottomInset.d.ts.map +1 -0
- package/lib/typescript/module/src/components/hooks/useKeyboardFold.d.ts +10 -2
- package/lib/typescript/module/src/components/hooks/useKeyboardFold.d.ts.map +1 -1
- package/lib/typescript/module/src/components/hooks/useOpenPicker.d.ts +2 -1
- package/lib/typescript/module/src/components/hooks/useOpenPicker.d.ts.map +1 -1
- package/lib/typescript/module/src/components/hooks/useTypedSegments.d.ts +3 -2
- package/lib/typescript/module/src/components/hooks/useTypedSegments.d.ts.map +1 -1
- package/lib/typescript/module/src/components/theme/defaultStrings.d.ts +13 -2
- package/lib/typescript/module/src/components/theme/defaultStrings.d.ts.map +1 -1
- package/lib/typescript/module/src/components/theme/direction.d.ts +8 -0
- package/lib/typescript/module/src/components/theme/direction.d.ts.map +1 -0
- package/lib/typescript/module/src/components/theme/numerals.d.ts +7 -0
- package/lib/typescript/module/src/components/theme/numerals.d.ts.map +1 -0
- package/lib/typescript/module/src/components/theme/styleKeys.d.ts +1 -1
- package/lib/typescript/module/src/components/theme/styleKeys.d.ts.map +1 -1
- package/lib/typescript/module/src/components/theme/tokens.d.ts +3 -1
- package/lib/typescript/module/src/components/theme/tokens.d.ts.map +1 -1
- package/lib/typescript/module/src/components/time/TimeRow.d.ts.map +1 -1
- package/lib/typescript/module/src/components/time/TypedTime.d.ts.map +1 -1
- package/lib/typescript/module/src/components/time/Wheel.d.ts +5 -0
- package/lib/typescript/module/src/components/time/Wheel.d.ts.map +1 -1
- package/lib/typescript/module/src/components/time/timeStyles.d.ts +0 -2
- package/lib/typescript/module/src/components/time/timeStyles.d.ts.map +1 -1
- package/lib/typescript/module/src/components/types.d.ts +84 -4
- package/lib/typescript/module/src/components/types.d.ts.map +1 -1
- package/lib/typescript/module/src/core/calendarSystem.d.ts +20 -5
- package/lib/typescript/module/src/core/calendarSystem.d.ts.map +1 -1
- package/lib/typescript/module/src/core/digits.d.ts +3 -0
- package/lib/typescript/module/src/core/digits.d.ts.map +1 -0
- package/lib/typescript/module/src/core/draft.d.ts +12 -1
- package/lib/typescript/module/src/core/draft.d.ts.map +1 -1
- package/lib/typescript/module/src/core/locale.d.ts +6 -0
- package/lib/typescript/module/src/core/locale.d.ts.map +1 -1
- package/lib/typescript/module/src/core/numerals.d.ts +15 -0
- package/lib/typescript/module/src/core/numerals.d.ts.map +1 -0
- package/lib/typescript/module/src/core/segmentEditor.d.ts.map +1 -1
- package/lib/typescript/module/src/core/segments.d.ts +0 -2
- package/lib/typescript/module/src/core/segments.d.ts.map +1 -1
- package/lib/typescript/module/src/core/selectionRules.d.ts +3 -2
- package/lib/typescript/module/src/core/selectionRules.d.ts.map +1 -1
- package/lib/typescript/module/src/core/timeEntry.d.ts +4 -24
- package/lib/typescript/module/src/core/timeEntry.d.ts.map +1 -1
- package/lib/typescript/module/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +7 -3
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +22 -7
- package/src/adapters/utcMidnight.ts +14 -5
- package/src/components/DateTimePicker.tsx +607 -108
- package/src/components/calendar/Calendar.tsx +54 -16
- package/src/components/calendar/CalendarHeader.tsx +41 -9
- package/src/components/calendar/CalendarSwitch.tsx +170 -0
- package/src/components/calendar/DayCell.tsx +16 -4
- package/src/components/calendar/DayGrid.tsx +18 -3
- package/src/components/calendar/PeriodGrid.tsx +3 -1
- package/src/components/calendar/calendarStyles.ts +3 -2
- package/src/components/calendar/localeNames.ts +52 -22
- package/src/components/calendar/selection.ts +8 -0
- package/src/components/container/DefaultSheet.tsx +60 -14
- package/src/components/container/PickerContainer.tsx +4 -0
- package/src/components/container/PickerLayout.tsx +1 -1
- package/src/components/container/containerStyles.ts +12 -3
- package/src/components/field/RangeFields.tsx +12 -2
- package/src/components/field/SegmentedInput.tsx +8 -3
- package/src/components/field/ValueField.tsx +94 -18
- package/src/components/field/fieldStyles.ts +6 -0
- package/src/components/field/fieldText.ts +68 -15
- package/src/components/hooks/useBottomInset.ts +33 -0
- package/src/components/hooks/useKeyboardFold.ts +41 -13
- package/src/components/hooks/useOpenPicker.ts +41 -18
- package/src/components/hooks/useTypedSegments.ts +7 -3
- package/src/components/theme/defaultStrings.ts +29 -4
- package/src/components/theme/direction.ts +12 -0
- package/src/components/theme/numerals.ts +11 -0
- package/src/components/theme/styleKeys.ts +18 -1
- package/src/components/theme/tokens.ts +5 -1
- package/src/components/time/TimeRow.tsx +23 -3
- package/src/components/time/TypedTime.tsx +3 -1
- package/src/components/time/Wheel.tsx +19 -5
- package/src/components/time/timeStyles.ts +2 -3
- package/src/components/types.ts +86 -4
- package/src/core/calendarSystem.ts +145 -21
- package/src/core/digits.ts +21 -0
- package/src/core/draft.ts +41 -13
- package/src/core/locale.ts +20 -3
- package/src/core/numerals.ts +35 -0
- package/src/core/segmentEditor.ts +13 -0
- package/src/core/segments.ts +0 -8
- package/src/core/selectionRules.ts +3 -2
- package/src/core/timeEntry.ts +6 -96
- package/src/icons/index.tsx +3 -1
- package/src/index.tsx +12 -2
|
@@ -18,6 +18,8 @@ export interface PickerStrings {
|
|
|
18
18
|
/** Between the two ends of a range in the field text. */
|
|
19
19
|
rangeSeparator: string;
|
|
20
20
|
pm: string;
|
|
21
|
+
/** Between the date and the time in the field text and its placeholder. */
|
|
22
|
+
dateTimeSeparator?: string;
|
|
21
23
|
/** Placeholders of the typed date segments and time boxes, and of the empty field. */
|
|
22
24
|
placeholderDay: string;
|
|
23
25
|
placeholderMonth: string;
|
|
@@ -42,8 +44,15 @@ export interface PickerStrings {
|
|
|
42
44
|
errorRangeTooShort: (days: number) => string;
|
|
43
45
|
errorRangeTooLong: (days: number) => string;
|
|
44
46
|
nothingSelectable: string;
|
|
47
|
+
/** The calendar switch and the dual tabs. */
|
|
48
|
+
calendarGregorian?: string;
|
|
49
|
+
calendarHijri?: string;
|
|
50
|
+
calendarDual?: string;
|
|
51
|
+
a11yCalendarSystem?: string;
|
|
45
52
|
a11yClear: string;
|
|
46
53
|
a11yOpen: string;
|
|
54
|
+
/** The built-in sheet's backdrop, which closes it. */
|
|
55
|
+
a11yClose?: string;
|
|
47
56
|
a11yDay: string;
|
|
48
57
|
a11yMonth: string;
|
|
49
58
|
a11yYear: string;
|
|
@@ -59,7 +68,9 @@ export interface PickerStrings {
|
|
|
59
68
|
a11yRangeStart: string;
|
|
60
69
|
a11yRangeEnd: string;
|
|
61
70
|
}
|
|
62
|
-
export declare const DEFAULT_STRINGS: PickerStrings
|
|
71
|
+
export declare const DEFAULT_STRINGS: Required<PickerStrings>;
|
|
72
|
+
/** The keys that have a value: one left `undefined` (or `null`) keeps what's under it. */
|
|
73
|
+
export declare const compactStrings: (overrides?: Partial<PickerStrings>) => Partial<PickerStrings>;
|
|
63
74
|
/** The English defaults with the caller's overrides on top. */
|
|
64
|
-
export declare const resolveStrings: (overrides?: Partial<PickerStrings>) => PickerStrings
|
|
75
|
+
export declare const resolveStrings: (overrides?: Partial<PickerStrings>) => Required<PickerStrings>;
|
|
65
76
|
//# sourceMappingURL=defaultStrings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultStrings.d.ts","sourceRoot":"","sources":["../../../../../../src/components/theme/defaultStrings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,yDAAyD;IACzD,cAAc,EAAE,MAAM,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,sFAAsF;IACtF,cAAc,EAAE,MAAM,CAAC;IACv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M,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"defaultStrings.d.ts","sourceRoot":"","sources":["../../../../../../src/components/theme/defaultStrings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,yDAAyD;IACzD,cAAc,EAAE,MAAM,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sFAAsF;IACtF,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IACxE,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,CAAC,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|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a part of the picker is laid out right to left. The picker sets it
|
|
3
|
+
* for the calendar and the time rows while the Hijri tab shows; elsewhere the
|
|
4
|
+
* app's direction (`I18nManager.isRTL`) decides.
|
|
5
|
+
*/
|
|
6
|
+
export declare const RtlContext: import("react").Context<boolean | null>;
|
|
7
|
+
export declare const useIsRTL: () => boolean;
|
|
8
|
+
//# sourceMappingURL=direction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direction.d.ts","sourceRoot":"","sources":["../../../../../../src/components/theme/direction.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,UAAU,yCAAsC,CAAC;AAE9D,eAAO,MAAM,QAAQ,QAAO,OACiB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The digits every number in the picker is drawn with, set once by the picker
|
|
3
|
+
* from its `numerals` and `locale` props. Values and typed input stay 0–9.
|
|
4
|
+
*/
|
|
5
|
+
export declare const NumeralsContext: import("react").Context<(text: string) => string>;
|
|
6
|
+
export declare const useNumerals: () => (text: string) => string;
|
|
7
|
+
//# sourceMappingURL=numerals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numerals.d.ts","sourceRoot":"","sources":["../../../../../../src/components/theme/numerals.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,eAAe,iCACL,MAAM,KAAK,MAAM,CAAc,CAAC;AAEvD,eAAO,MAAM,WAAW,eAFD,MAAM,KAAK,MAE0B,CAAC"}
|
|
@@ -3,7 +3,7 @@ import type { ImageStyle, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
|
3
3
|
* Every part of the picker that can be styled through the `styles` prop.
|
|
4
4
|
* This list is public: adding a key is fine, renaming or removing one breaks callers.
|
|
5
5
|
*/
|
|
6
|
-
export declare const STYLE_KEYS: readonly ["container", "sheet", "sheetBackdrop", "header", "title", "resetButton", "resetText", "body", "footer", "confirmButton", "confirmText", "field", "fieldFocused", "fieldError", "fieldDisabled", "fieldText", "fieldTextDisabled", "fieldPlaceholder", "fieldSegment", "fieldSegmentFocused", "fieldSeparator", "fieldPeriod", "fieldPeriodSelected", "fieldPeriodText", "fieldIcon", "clearIcon", "label", "mandatoryMark", "helperText", "instructionText", "errorText", "validationText", "calendarHeader", "navArrow", "navArrowDisabled", "yearButton", "yearButtonText", "monthChipRow", "monthChip", "monthChipText", "monthChipSelected", "monthChipDisabled", "weekdayRow", "weekdayText", "day", "dayText", "dayPressed", "today", "todayText", "selected", "selectedText", "rangeStart", "rangeMiddle", "rangeEnd", "rangeFill", "outside", "outsideText", "disabled", "disabledText", "holiday", "holidayText", "daySubLabel", "yearGrid", "yearCell", "yearCellSelected", "yearCellDisabled", "yearCellText", "yearCellCurrent", "monthGrid", "monthCell", "monthCellSelected", "monthCellDisabled", "monthCellText", "monthCellCurrent", "timeRow", "timeLabel", "timeBox", "timeBoxFocused", "timeBoxError", "timeBoxText", "timeColon", "ampmToggle", "ampmOption", "ampmOptionSelected", "ampmOptionDisabled", "ampmOptionText", "wheel", "wheelRow", "wheelRowSelected", "wheelRowDisabled", "wheelText", "wheelTextSelected", "wheelTextDisabled", "wheelHighlight", "todayButton", "todayButtonText", "emptyState", "emptyStateText"];
|
|
6
|
+
export declare const STYLE_KEYS: readonly ["container", "sheet", "sheetBackdrop", "header", "title", "resetButton", "resetText", "body", "footer", "confirmButton", "confirmText", "field", "fieldFocused", "fieldError", "fieldDisabled", "fieldText", "fieldTextDisabled", "fieldDateText", "fieldPlaceholder", "fieldSegment", "fieldSegmentFocused", "fieldSeparator", "fieldPeriod", "fieldPeriodSelected", "fieldPeriodText", "fieldIcon", "clearIcon", "label", "mandatoryMark", "helperText", "instructionText", "errorText", "validationText", "calendarHeader", "navArrow", "navArrowDisabled", "yearButton", "yearButtonText", "monthChipRow", "monthChip", "monthChipText", "monthChipSelected", "monthChipDisabled", "calendarSwitch", "calendarSwitchSegment", "calendarSwitchSegmentSelected", "calendarSwitchText", "calendarSwitchTextSelected", "dualTabs", "dualTab", "dualTabSelected", "dualTabText", "dualTabTextSelected", "weekdayRow", "weekdayText", "day", "dayText", "dayPressed", "today", "todayText", "selected", "selectedText", "rangeStart", "rangeMiddle", "rangeEnd", "rangeFill", "outside", "outsideText", "disabled", "disabledText", "holiday", "holidayText", "daySubLabel", "yearGrid", "yearCell", "yearCellSelected", "yearCellDisabled", "yearCellText", "yearCellCurrent", "monthGrid", "monthCell", "monthCellSelected", "monthCellDisabled", "monthCellText", "monthCellCurrent", "timeRow", "timeLabel", "timeBox", "timeBoxFocused", "timeBoxError", "timeBoxText", "timeColon", "ampmToggle", "ampmOption", "ampmOptionSelected", "ampmOptionDisabled", "ampmOptionText", "wheel", "wheelRow", "wheelRowSelected", "wheelRowDisabled", "wheelText", "wheelTextSelected", "wheelTextDisabled", "wheelHighlight", "todayButton", "todayButtonText", "emptyState", "emptyStateText"];
|
|
7
7
|
export type StyleKey = (typeof STYLE_KEYS)[number];
|
|
8
8
|
export type PickerStyleValue = StyleProp<ViewStyle | TextStyle | ImageStyle>;
|
|
9
9
|
/** The `styles` prop: any key from STYLE_KEYS. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styleKeys.d.ts","sourceRoot":"","sources":["../../../../../../src/components/theme/styleKeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"styleKeys.d.ts","sourceRoot":"","sources":["../../../../../../src/components/theme/styleKeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,UAAU,qsDAiIb,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;AAE7E,kDAAkD;AAClD,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC"}
|
|
@@ -9,6 +9,8 @@ export interface ThemeTokens {
|
|
|
9
9
|
/** Headings in the sheet: the year title and the time label. */
|
|
10
10
|
heading: string;
|
|
11
11
|
mutedText: string;
|
|
12
|
+
/** Days of the months before and after, which can still be picked. */
|
|
13
|
+
outsideText?: string;
|
|
12
14
|
placeholder: string;
|
|
13
15
|
border: string;
|
|
14
16
|
/** Typed time boxes. */
|
|
@@ -45,7 +47,7 @@ export interface ThemeTokens {
|
|
|
45
47
|
fieldHeight: number;
|
|
46
48
|
touchTarget: number;
|
|
47
49
|
}
|
|
48
|
-
export declare const DEFAULT_TOKENS: ThemeTokens
|
|
50
|
+
export declare const DEFAULT_TOKENS: Required<ThemeTokens>;
|
|
49
51
|
type FontTokens = Pick<ThemeTokens, 'fontFamily' | 'fontRegular' | 'fontMedium' | 'fontSemiBold'>;
|
|
50
52
|
/** The system font at weight 400 / 500 / 600 (the default): `theme={{ ...SYSTEM_FONTS }}`. */
|
|
51
53
|
export declare const SYSTEM_FONTS: FontTokens;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../../../src/components/theme/tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;;;OAIG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../../../src/components/theme/tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAA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;AASxD;;;GAGG;AACH,eAAO,MAAM,SAAS,GACpB,GAAG,WAAW,EACd,QAAQ,cAAc,KAEpB;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GACtB;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAA;CAAE,GACzD;IAAE,UAAU,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAA;CAMtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeRow.d.ts","sourceRoot":"","sources":["../../../../../../src/components/time/TimeRow.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TimeRow.d.ts","sourceRoot":"","sources":["../../../../../../src/components/time/TimeRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAKL,KAAK,cAAc,EAGpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAKnD,MAAM,WAAW,YAAY;IAC3B,kFAAkF;IAClF,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,2FAA2F;IAC3F,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC7B;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,yDAAyD;IACzD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,GAAG,IAA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AAC;IACvB,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID;;;;GAIG;AACH,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqI9B,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -10,6 +10,11 @@ export interface WheelItem {
|
|
|
10
10
|
label: string;
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* The row showing `value`, or the nearest one when the value has no row (a
|
|
15
|
+
* minute off the step, e.g. 07 on a 5-minute wheel, shows at 05, not 00).
|
|
16
|
+
*/
|
|
17
|
+
export declare const indexOfValue: (items: WheelItem[], value: number) => number;
|
|
13
18
|
/** The enabled row nearest to `index` (searching both ways), or `index` when none is. */
|
|
14
19
|
export declare const nearestEnabled: (items: WheelItem[], index: number) => number;
|
|
15
20
|
/** The next enabled row in a direction (screen-reader increment / decrement). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../../../../../../src/components/time/Wheel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAUjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../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AAC;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAsGvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -37,7 +37,6 @@ declare const create: (t: ThemeTokens) => Readonly<{
|
|
|
37
37
|
flexDirection: "row";
|
|
38
38
|
alignItems: "center";
|
|
39
39
|
gap: number;
|
|
40
|
-
direction: "ltr";
|
|
41
40
|
};
|
|
42
41
|
clock: {
|
|
43
42
|
flexDirection: "row";
|
|
@@ -164,7 +163,6 @@ declare const create: (t: ThemeTokens) => Readonly<{
|
|
|
164
163
|
flexDirection: "row";
|
|
165
164
|
alignItems: "center";
|
|
166
165
|
alignSelf: "center";
|
|
167
|
-
direction: "ltr";
|
|
168
166
|
};
|
|
169
167
|
wheelColumn: {
|
|
170
168
|
width: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeStyles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/time/timeStyles.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9D,QAAA,MAAM,MAAM,GAAI,GAAG,WAAW
|
|
1
|
+
{"version":3,"file":"timeStyles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/time/timeStyles.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9D,QAAA,MAAM,MAAM,GAAI,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwH1B,CAAC;AAEL,mEAAmE;AACnE,eAAO,MAAM,eAAe,GAC1B,QAAQ,WAAW,KAClB,UAAU,CAAC,OAAO,MAAM,CAM1B,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { StyleProp, TextStyle } from 'react-native';
|
|
3
|
+
import type { CalendarSystem } from '../core/calendarSystem';
|
|
3
4
|
import type { Constraints, TimeBounds } from '../core/constraints';
|
|
5
|
+
import type { Numerals } from '../core/numerals';
|
|
4
6
|
import type { CalendarDate, PickerType, PickerValue, SelectionMode, Time, TimeFormat, ValueFormat, Weekday } from '../core/types';
|
|
5
7
|
import type { IconComponent, IconName, IconOptions } from '../icons';
|
|
6
8
|
import type { DayCellState } from './calendar/DayCell';
|
|
@@ -24,7 +26,7 @@ export interface PickerState {
|
|
|
24
26
|
disabled: boolean;
|
|
25
27
|
readOnly: boolean;
|
|
26
28
|
isOpen: boolean;
|
|
27
|
-
/** The keyboard is up inside the picker
|
|
29
|
+
/** The keyboard is up inside the picker and `hideCalendarOnKeyboard` hid the calendar. */
|
|
28
30
|
folded: boolean;
|
|
29
31
|
/**
|
|
30
32
|
* Confirm can be pressed: the dates are complete and allowed. A time with a
|
|
@@ -81,6 +83,18 @@ export interface SheetOptions {
|
|
|
81
83
|
height?: SheetSize;
|
|
82
84
|
/** Default '90%'. Built-in sheet only. */
|
|
83
85
|
maxHeight?: SheetSize;
|
|
86
|
+
/**
|
|
87
|
+
* The most the sheet grows to while the keyboard is up; a percentage is of
|
|
88
|
+
* the room above the keyboard. Default: `maxHeight`. Built-in sheet only.
|
|
89
|
+
*/
|
|
90
|
+
keyboardMaxHeight?: SheetSize;
|
|
91
|
+
/**
|
|
92
|
+
* Space kept free below Confirm while the keyboard is down: the home
|
|
93
|
+
* indicator, or Android's navigation bar in an edge-to-edge app. Default:
|
|
94
|
+
* the bottom inset from react-native-safe-area-context's SafeAreaProvider
|
|
95
|
+
* when the app has one, else 0. Built-in sheet only.
|
|
96
|
+
*/
|
|
97
|
+
bottomInset?: number;
|
|
84
98
|
/** The header stays put while the body scrolls. false: it scrolls with the body. Default true. */
|
|
85
99
|
fixedHeader?: boolean;
|
|
86
100
|
/** The footer (Confirm) stays pinned below the body. false: it scrolls at the end of the body. Default true. */
|
|
@@ -96,6 +110,25 @@ export interface SheetOptions {
|
|
|
96
110
|
/** The calendar icon at the end of that field, as on the on-screen field. Default false. */
|
|
97
111
|
fieldIcon?: boolean;
|
|
98
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* The second argument of `onChange` when the picker can show a Hijri calendar:
|
|
115
|
+
* the calendar the date was picked in. The value itself is always Gregorian.
|
|
116
|
+
* The picker remembers it while mounted; to show a stored value back the same
|
|
117
|
+
* way later, store this too and pass it as `dualDefaultTab` (dual) or
|
|
118
|
+
* `calendarSystem`.
|
|
119
|
+
*/
|
|
120
|
+
export interface ChangeInfo {
|
|
121
|
+
calendarSystem: 'gregory' | 'hijri';
|
|
122
|
+
}
|
|
123
|
+
/** What `renderCalendarSwitch` receives. */
|
|
124
|
+
export interface CalendarSwitchRenderProps {
|
|
125
|
+
/** The choices, in order. */
|
|
126
|
+
systems: CalendarSystem[];
|
|
127
|
+
selected: CalendarSystem;
|
|
128
|
+
onSelect: (system: CalendarSystem) => void;
|
|
129
|
+
tokens: ThemeTokens;
|
|
130
|
+
strings: PickerStrings;
|
|
131
|
+
}
|
|
99
132
|
/** What `renderLabel` receives. */
|
|
100
133
|
export interface LabelRenderProps {
|
|
101
134
|
label?: string;
|
|
@@ -141,8 +174,10 @@ export interface DateTimePickerProps {
|
|
|
141
174
|
/**
|
|
142
175
|
* A value was saved: on Confirm; as it's edited with commitMode 'instant';
|
|
143
176
|
* when typing in the on-screen field pauses; or '' on clear. Never on close.
|
|
177
|
+
* When the picker can show a Hijri calendar, `info` says which calendar the
|
|
178
|
+
* date was picked in.
|
|
144
179
|
*/
|
|
145
|
-
onChange: (value: PickerValue) => void;
|
|
180
|
+
onChange: (value: PickerValue, info?: ChangeInfo) => void;
|
|
146
181
|
/**
|
|
147
182
|
* Right after every onChange that saves a value (Confirm, an 'instant' edit,
|
|
148
183
|
* on-screen typing), like a form field losing focus. Not on clear.
|
|
@@ -183,6 +218,12 @@ export interface DateTimePickerProps {
|
|
|
183
218
|
readOnly?: boolean;
|
|
184
219
|
/** Type date and time as segments in the field inside the sheet. */
|
|
185
220
|
allowTyping?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Hide the calendar while the keyboard is up (typing a date or a time), so
|
|
223
|
+
* the box being typed in and Confirm stay in view on small phones. Default
|
|
224
|
+
* true; `false` keeps the calendar in view.
|
|
225
|
+
*/
|
|
226
|
+
hideCalendarOnKeyboard?: boolean;
|
|
186
227
|
/**
|
|
187
228
|
* The on-screen field is typeable too. A complete, allowed value is saved
|
|
188
229
|
* once, when focus leaves the field or its last box fills. Default false.
|
|
@@ -246,10 +287,42 @@ export interface DateTimePickerProps {
|
|
|
246
287
|
initialVisibleDate?: CalendarDate;
|
|
247
288
|
enableMonthSwipe?: boolean;
|
|
248
289
|
showToday?: boolean;
|
|
249
|
-
/**
|
|
250
|
-
|
|
290
|
+
/**
|
|
291
|
+
* The calendar the grid uses: 'gregory', 'hijri' (Umm al-Qura), or 'dual':
|
|
292
|
+
* Gregorian and Hijri tabs, one calendar at a time. A day is shown selected
|
|
293
|
+
* only in the calendar it was picked in, and the field writes it in that
|
|
294
|
+
* calendar. With `calendarSwitch`, this is the one shown first. Default
|
|
295
|
+
* 'gregory'; anything Hijri falls back to 'gregory' when the platform has no
|
|
296
|
+
* Hijri calendar.
|
|
297
|
+
*/
|
|
298
|
+
calendarSystem?: CalendarSystem;
|
|
299
|
+
/**
|
|
300
|
+
* A Gregorian / Hijri / Dual switch above the calendar. true shows all three;
|
|
301
|
+
* a list shows those, in that order (e.g. ['hijri', 'gregory']). Not shown for
|
|
302
|
+
* month and year picks, or when the platform has no Hijri calendar. Default false.
|
|
303
|
+
*/
|
|
304
|
+
calendarSwitch?: boolean | CalendarSystem[];
|
|
305
|
+
/** The user picked another calendar in the switch. */
|
|
306
|
+
onCalendarSystemChange?: (system: CalendarSystem) => void;
|
|
307
|
+
/**
|
|
308
|
+
* The language a Hijri calendar is written in, whatever `locale` is: its
|
|
309
|
+
* month and weekday names, the Hijri date in the field, and what screen
|
|
310
|
+
* readers say. Default 'ar-SA' (Arabic).
|
|
311
|
+
*/
|
|
312
|
+
hijriLocale?: string;
|
|
313
|
+
/** The tab a dual calendar opens on, each time it opens. Default 'gregory'. */
|
|
314
|
+
dualDefaultTab?: 'gregory' | 'hijri';
|
|
315
|
+
/** Replaces the built-in calendar switch. */
|
|
316
|
+
renderCalendarSwitch?: (p: CalendarSwitchRenderProps) => React.ReactNode;
|
|
251
317
|
/** Any BCP-47 tag; decides names, the date order and the clock. Default: the device locale. */
|
|
252
318
|
locale?: string;
|
|
319
|
+
/**
|
|
320
|
+
* The digits every number is drawn in: 'latin' (0–9), 'arabic' (١٢٣ in any
|
|
321
|
+
* language) or 'locale' (the language's own: ١٢٣ for 'ar-SA', ۱۲۳ for
|
|
322
|
+
* 'fa-IR', 123 for 'en-US'). Values stay 0–9. Default: 'arabic' for a Hijri
|
|
323
|
+
* calendar and a date picked in it, 'latin' for a Gregorian one.
|
|
324
|
+
*/
|
|
325
|
+
numerals?: Numerals;
|
|
253
326
|
/** IANA zone for date-time values and "today". Default: the device zone. */
|
|
254
327
|
timeZone?: string;
|
|
255
328
|
/** The current time, for "today" and a new day's time. Default `() => new Date()`. */
|
|
@@ -279,6 +352,13 @@ export interface DateTimePickerProps {
|
|
|
279
352
|
theme?: Partial<ThemeTokens>;
|
|
280
353
|
styles?: PickerStyles;
|
|
281
354
|
strings?: Partial<PickerStrings>;
|
|
355
|
+
/**
|
|
356
|
+
* The texts while the Hijri tab shows (e.g. Arabic), for its calendar and
|
|
357
|
+
* time rows, the error messages inside the picker, and a date picked in it
|
|
358
|
+
* (the on-screen field's errors keep `strings`). A key left out (or `undefined`)
|
|
359
|
+
* keeps AM / PM in `hijriLocale` (ص / م), then `strings`.
|
|
360
|
+
*/
|
|
361
|
+
hijriStrings?: Partial<PickerStrings>;
|
|
282
362
|
testID?: string;
|
|
283
363
|
onVisibleMonthChange?: (year: number, month: number) => void;
|
|
284
364
|
onError?: (code: PickerErrorCode, value: PickerValue) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,IAAI,EACJ,UAAU,EACV,WAAW,EACX,OAAO,EACR,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;GAIG;AAEH,iCAAiC;AACjC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,aAAa,CAAC;IACpB,uCAAuC;IACvC,KAAK,EAAE,WAAW,CAAC;IACnB,qGAAqG;IACrG,WAAW,EAAE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IACH,YAAY,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9D;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC9D;AAED,eAAO,MAAM,kBAAkB;;;CAA8B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { CalendarDate, Weekday } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* Calendar systems for the picker
|
|
4
|
-
*
|
|
3
|
+
* Calendar systems for the picker. Saved values are always Gregorian; a
|
|
4
|
+
* system only changes how months are laid out and labelled.
|
|
5
5
|
* - 'gregory': the normal grid;
|
|
6
|
-
* - '
|
|
7
|
-
* - '
|
|
6
|
+
* - 'hijri': a Hijri (Umm al-Qura) grid showing the Hijri day;
|
|
7
|
+
* - 'dual': both, as Gregorian and Hijri tabs showing one grid at a time.
|
|
8
8
|
*
|
|
9
9
|
* Hijri dates come from the platform's Intl ('islamic-umalqura'). When Intl
|
|
10
10
|
* can't do it (checked once; some JS engines ship without that calendar) the
|
|
@@ -18,7 +18,7 @@ export interface SystemMonth {
|
|
|
18
18
|
}
|
|
19
19
|
/** Whether this device can show Hijri dates. */
|
|
20
20
|
export declare const isHijriSupported: () => boolean;
|
|
21
|
-
/** Test hook: forget the cached Intl check. */
|
|
21
|
+
/** Test hook: forget the cached Intl check and what was worked out with it. */
|
|
22
22
|
export declare const resetHijriSupportCache: () => void;
|
|
23
23
|
/** Gregorian day → Hijri {year, month, day}, or null when unsupported. */
|
|
24
24
|
export declare const toHijri: (d: CalendarDate) => CalendarDate | null;
|
|
@@ -29,6 +29,21 @@ export declare const hijriMonthLength: (year: number, month: number) => number;
|
|
|
29
29
|
export declare const HIJRI_MONTHS_EN: string[];
|
|
30
30
|
/** Hijri month names in the user's language (Intl), English otherwise. */
|
|
31
31
|
export declare const hijriMonthNames: (locale: string) => string[];
|
|
32
|
+
/**
|
|
33
|
+
* A Gregorian day written as a Hijri date in the user's language, in 0–9
|
|
34
|
+
* ('16 Jumada I 1448 AH', '16 جمادى الأولى 1448 هـ'), or null when unsupported.
|
|
35
|
+
*/
|
|
36
|
+
export declare const hijriDateText: (d: CalendarDate, locale: string) => string | null;
|
|
37
|
+
export interface Periods {
|
|
38
|
+
am: string;
|
|
39
|
+
pm: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* AM and PM in the Hijri locale's language, as Intl writes them ('ar-SA' →
|
|
43
|
+
* ص / م). An Arabic locale whose engine gives none, or Latin ones, gets ص / م;
|
|
44
|
+
* another locale gets null (the picker keeps strings.am / pm).
|
|
45
|
+
*/
|
|
46
|
+
export declare const hijriPeriods: (locale: string) => Periods | null;
|
|
32
47
|
/**
|
|
33
48
|
* The system the picker uses: the requested one, Gregorian by default.
|
|
34
49
|
* Anything Hijri falls back to Gregorian when unsupported.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendarSystem.d.ts","sourceRoot":"","sources":["../../../../../src/core/calendarSystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"calendarSystem.d.ts","sourceRoot":"","sources":["../../../../../src/core/calendarSystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAKrD;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,WAAW;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C;IAC7C,WAAW,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,MAAM,CAAC;IACxC,SAAS,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,KAAK,WAAW,CAAC;IACtD,kCAAkC;IAClC,SAAS,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,MAAM,CAAC;CACxC;AAED,eAAO,MAAM,SAAS,EAAE,WAcvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,WAYnB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,QAAQ,cAAc,KAAG,WAChB,CAAC;AAEzC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,sFAAsF;AACtF,eAAO,MAAM,eAAe,GAC1B,KAAK,WAAW,EAChB,GAAG,WAAW,EACd,gBAAgB,OAAO,KACtB;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAU9C,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,WAAW,GACtB,KAAK,WAAW,EAChB,GAAG,WAAW,KACb,YAAY,EAKd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digits.d.ts","sourceRoot":"","sources":["../../../../../src/core/digits.ts"],"names":[],"mappings":"AAWA,0EAA0E;AAC1E,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,KAAG,MAQ5C,CAAC"}
|
|
@@ -28,6 +28,10 @@ export type Draft = {
|
|
|
28
28
|
} | {
|
|
29
29
|
mode: 'multiple';
|
|
30
30
|
slots: DraftSlot[];
|
|
31
|
+
/**
|
|
32
|
+
* Shared time mode: the time every date gets. Null while the saved dates
|
|
33
|
+
* have different times, which each date then keeps until one is set.
|
|
34
|
+
*/
|
|
31
35
|
sharedTime: Time | null;
|
|
32
36
|
};
|
|
33
37
|
export interface DraftOptions {
|
|
@@ -61,6 +65,11 @@ export type DraftTarget = 'single' | 'from' | 'to' | 'shared' | {
|
|
|
61
65
|
export type DraftIssue = 'INCOMPLETE' | 'RANGE_ORDER' | 'RANGE_LENGTH' | 'MAX_SELECTIONS';
|
|
62
66
|
/** Builds a fresh draft from the saved value. */
|
|
63
67
|
export declare const createDraft: (mode: SelectionMode, value: PickerValue | null | undefined, opts: DraftOptions) => Draft;
|
|
68
|
+
/**
|
|
69
|
+
* Whether a range may start and end on one day: date-time ranges and
|
|
70
|
+
* `allowSameDay` date ranges, as long as minDays allows a 1-day range.
|
|
71
|
+
*/
|
|
72
|
+
export declare const sameDayRangeOk: (opts: DraftOptions) => boolean;
|
|
64
73
|
/**
|
|
65
74
|
* A day was tapped (or typed).
|
|
66
75
|
* - single: sets the day and keeps the time (or the given time for a new day, e.g. the
|
|
@@ -71,7 +80,9 @@ export declare const createDraft: (mode: SelectionMode, value: PickerValue | nul
|
|
|
71
80
|
export declare const selectDay: (draft: Draft, day: CalendarDate, opts: DraftOptions, newDayTime?: Time | null) => Draft;
|
|
72
81
|
/**
|
|
73
82
|
* From/To layout: a tap fills the end being edited. An end that would come
|
|
74
|
-
* before the start (or after the end) clears the other one.
|
|
83
|
+
* before the start (or after the end) clears the other one. The start tapped
|
|
84
|
+
* again as the end, where a range can't be one day, deselects the start, as
|
|
85
|
+
* in the single field.
|
|
75
86
|
*/
|
|
76
87
|
export declare const setRangeEnd: (draft: Draft, day: CalendarDate, end: "from" | "to", opts: DraftOptions, newDayTime?: Time | null) => Draft;
|
|
77
88
|
/** A time was typed or picked for one slot (or for all dates when `shared`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../../src/core/draft.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EAEX,aAAa,EACb,IAAI,EACJ,YAAY,EACb,MAAM,SAAS,CAAC;AAGjB;;;;;;;GAOG;AAEH;;;;G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,MAAM,IAAI,EACV,QAAQ,WAAW,KAClB,KAmBF,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,YAAY,GACvB,OAAO,KAAK,EACZ,OAAO,aAAa,GAAG,IAAI,EAC3B,QAAQ,WAAW,KAClB,KAeF,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,KAAG,KAUzC,CAAC;AAqBF,wHAAwH;AACxH,eAAO,MAAM,aAAa,GACxB,OAAO,KAAK,EACZ,MAAM,YAAY,KACjB,UAAU,GAAG,IA2Cf,CAAC;AA2BF;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,EAAE,MAAM,YAAY,KAAG,WAQ9D,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,aAAa,KAAG,KAIhD,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { TimeFormat, Weekday } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The locale with a calendar, keeping any Unicode extension it already has
|
|
4
|
+
* ('ar-SA-u-nu-arab' → 'ar-SA-u-ca-gregory-nu-arab'). Some engines write a
|
|
5
|
+
* locale in its own calendar by default (iOS: Hijri for 'ar-SA').
|
|
6
|
+
*/
|
|
7
|
+
export declare const withCalendar: (locale: string, calendar: string) => string;
|
|
2
8
|
/** The device locale (a BCP-47 tag), or 'en-US'. */
|
|
3
9
|
export declare const defaultLocale: () => string;
|
|
4
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../../../src/core/locale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../../../src/core/locale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAkBnD;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,EAAE,UAAU,MAAM,KAAG,MAK/D,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,aAAa,QAAO,MAMhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,MAsBjD,CAAC;AAKF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,KAAG,MAAM,GAAG,IAO7D,CAAC;AAEF,sFAAsF;AACtF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,UAWjD,CAAC;AAyBF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,KAAG,OAOrD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which digits the picker shows: 0–9, Arabic-Indic (١٢٣) in any language, or
|
|
3
|
+
* the locale's own (١٢٣ for 'ar-SA', ۱۲۳ for 'fa-IR', 123 for 'en-US').
|
|
4
|
+
*/
|
|
5
|
+
export type Numerals = 'latin' | 'arabic' | 'locale';
|
|
6
|
+
export declare const latinDigits: (text: string) => string;
|
|
7
|
+
/** Swaps 0–9 in a text for Arabic-Indic digits (٠–٩). */
|
|
8
|
+
export declare const arabicDigits: (text: string) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Swaps 0–9 in a text for the locale's own digits, as `Intl` writes them
|
|
11
|
+
* ('ar-SA' → ٠–٩, 'fa' → ۰–۹). Latin when the locale uses 0–9 or `Intl` can't
|
|
12
|
+
* tell.
|
|
13
|
+
*/
|
|
14
|
+
export declare const localeDigits: (locale: string) => ((text: string) => string);
|
|
15
|
+
//# sourceMappingURL=numerals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numerals.d.ts","sourceRoot":"","sources":["../../../../../src/core/numerals.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAA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E,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,CAAC;AAgBnD,eAAO,MAAM,mBAAmB,GAC9B,OAAO,aAAa,GAAG,IAAI,EAC3B,MAAM,oBAAoB,KACzB,kBAQA,CAAC;AAmDJ,eAAO,MAAM,oBAAoB,GAC/B,OAAO,kBAAkB,EACzB,QAAQ,mBAAmB,EAC3B,MAAM,oBAAoB,KACzB,kBA4EF,CAAC"}
|
|
@@ -55,8 +55,6 @@ export declare const inputDigit: (current: string, digit: string, spec: SegmentS
|
|
|
55
55
|
next: string;
|
|
56
56
|
advance: boolean;
|
|
57
57
|
};
|
|
58
|
-
/** 'a' / 'A' → AM, 'p' / 'P' → PM, anything else → null. */
|
|
59
|
-
export declare const inputPeriod: (char: string) => Period | null;
|
|
60
58
|
/** Pads a one-digit entry when leaving the segment ("7" → "07"); the year is never padded. */
|
|
61
59
|
export declare const padSegment: (text: string, spec: SegmentSpec) => string;
|
|
62
60
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../../../../src/core/segments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,UAAU,EAEV,UAAU,EACX,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AAEH,MAAM,MAAM,UAAU,GACpB,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC1D,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjC,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,UAAU,CAAC;IAChB,SAAS,EAAE,MAAM,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AAU,KACrB,aAaF,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,KAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAKvE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,EAAE,QAAQ,MAAM,KAAG,MAChB,CAAC;AAK7C,8CAA8C;AAC9C,eAAO,MAAM,cAAc,GACzB,OAAO,aAAa,GAAG,IAAI,EAC3B,MAAM,UAAU,EAChB,YAAY,UAAU,KACrB,aAkBF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GACrB,SAAS,MAAM,EACf,OAAO,MAAM,EACb,MAAM,WAAW,KAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAQlC,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,EAAE,MAAM,WAAW,KAAG,MAS5D,CAAC;AAKF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,aAAa,EACrB,SAAS;IACP,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C,KACA,cAsEF,CAAC"}
|
|
@@ -5,7 +5,8 @@ import type { CalendarDate } from './types';
|
|
|
5
5
|
* - range: once a start is picked and the end is being chosen, days closer than
|
|
6
6
|
* `minDays` or further than `maxDays` are greyed (lengths count calendar
|
|
7
7
|
* days with both ends included, so a same-day range is 1 day); in the From/To layout, days
|
|
8
|
-
* before the start are greyed too
|
|
8
|
+
* before the start are greyed too once the To field is tapped (otherwise a tap
|
|
9
|
+
* there moves the start);
|
|
9
10
|
* - multiple: once `maxSelections` is reached, only selected days can be tapped.
|
|
10
11
|
* Validation on Confirm (validateDraft) still checks the same rules.
|
|
11
12
|
*/
|
|
@@ -14,7 +15,7 @@ export interface SelectionRules {
|
|
|
14
15
|
rangeStart?: CalendarDate | null;
|
|
15
16
|
minDays?: number;
|
|
16
17
|
maxDays?: number;
|
|
17
|
-
/** From/To layout
|
|
18
|
+
/** From/To layout, the To field tapped: days before the start can't be the end. */
|
|
18
19
|
blockBeforeStart?: boolean;
|
|
19
20
|
/** Multiple mode with the cap reached. */
|
|
20
21
|
maxReached?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectionRules.d.ts","sourceRoot":"","sources":["../../../../../src/core/selectionRules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"selectionRules.d.ts","sourceRoot":"","sources":["../../../../../src/core/selectionRules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC7B,gDAAgD;IAChD,UAAU,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,OAAO,CAAC;CAC7C;AAED,eAAO,MAAM,iBAAiB,GAC5B,OAAO,YAAY,EACnB,KAAK,YAAY,EACjB,OAAO,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,SAAS,GAAG,kBAAkB,CAAC,KACtE,OAOF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,MAAM,WAAW,EACjB,OAAO,cAAc,KACpB,WA8BF,CAAC"}
|