@mantine/dates 6.0.19 → 7.0.0-beta.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/cjs/components/Calendar/Calendar.js +118 -112
- package/cjs/components/Calendar/Calendar.js.map +1 -1
- package/cjs/components/Calendar/clamp-level/clamp-level.js +8 -2
- package/cjs/components/Calendar/clamp-level/clamp-level.js.map +1 -1
- package/cjs/components/Calendar/pick-calendar-levels-props/pick-calendar-levels-props.js +15 -5
- package/cjs/components/Calendar/pick-calendar-levels-props/pick-calendar-levels-props.js.map +1 -1
- package/cjs/components/CalendarHeader/CalendarHeader.js +91 -65
- package/cjs/components/CalendarHeader/CalendarHeader.js.map +1 -1
- package/cjs/components/CalendarHeader/CalendarHeader.module.css.js +8 -0
- package/cjs/components/CalendarHeader/CalendarHeader.module.css.js.map +1 -0
- package/cjs/components/DateInput/DateInput.js +66 -60
- package/cjs/components/DateInput/DateInput.js.map +1 -1
- package/cjs/components/DateInput/date-string-parser/date-string-parser.js +3 -0
- package/cjs/components/DateInput/date-string-parser/date-string-parser.js.map +1 -1
- package/cjs/components/DateInput/is-date-valid/is-date-valid.js.map +1 -1
- package/cjs/components/DatePicker/DatePicker.js +48 -15
- package/cjs/components/DatePicker/DatePicker.js.map +1 -1
- package/cjs/components/DatePickerInput/DatePickerInput.js +116 -96
- package/cjs/components/DatePickerInput/DatePickerInput.js.map +1 -1
- package/cjs/components/DateTimePicker/DateTimePicker.js +102 -75
- package/cjs/components/DateTimePicker/DateTimePicker.js.map +1 -1
- package/cjs/components/DateTimePicker/DateTimePicker.module.css.js +8 -0
- package/cjs/components/DateTimePicker/DateTimePicker.module.css.js.map +1 -0
- package/cjs/components/DatesProvider/DatesProvider.js +1 -3
- package/cjs/components/DatesProvider/DatesProvider.js.map +1 -1
- package/cjs/components/DatesProvider/use-dates-context.js +12 -3
- package/cjs/components/DatesProvider/use-dates-context.js.map +1 -1
- package/cjs/components/Day/Day.js +61 -40
- package/cjs/components/Day/Day.js.map +1 -1
- package/cjs/components/Day/Day.module.css.js +8 -0
- package/cjs/components/Day/Day.module.css.js.map +1 -0
- package/cjs/components/DecadeLevel/DecadeLevel.js +52 -57
- package/cjs/components/DecadeLevel/DecadeLevel.js.map +1 -1
- package/cjs/components/DecadeLevelGroup/DecadeLevelGroup.js +79 -74
- package/cjs/components/DecadeLevelGroup/DecadeLevelGroup.js.map +1 -1
- package/cjs/components/HiddenDatesInput/HiddenDatesInput.js +2 -7
- package/cjs/components/HiddenDatesInput/HiddenDatesInput.js.map +1 -1
- package/cjs/components/{CalendarHeader/Chevron.js → LevelsGroup/LevelsGroup.js} +23 -15
- package/cjs/components/LevelsGroup/LevelsGroup.js.map +1 -0
- package/cjs/components/LevelsGroup/LevelsGroup.module.css.js +8 -0
- package/cjs/components/LevelsGroup/LevelsGroup.module.css.js.map +1 -0
- package/cjs/components/Month/Month.js +100 -78
- package/cjs/components/Month/Month.js.map +1 -1
- package/cjs/components/Month/Month.module.css.js +8 -0
- package/cjs/components/Month/Month.module.css.js.map +1 -0
- package/cjs/components/Month/get-date-in-tab-order/get-date-in-tab-order.js +6 -4
- package/cjs/components/Month/get-date-in-tab-order/get-date-in-tab-order.js.map +1 -1
- package/cjs/components/MonthLevel/MonthLevel.js +56 -64
- package/cjs/components/MonthLevel/MonthLevel.js.map +1 -1
- package/cjs/components/MonthLevelGroup/MonthLevelGroup.js +86 -82
- package/cjs/components/MonthLevelGroup/MonthLevelGroup.js.map +1 -1
- package/cjs/components/MonthPicker/MonthPicker.js +39 -17
- package/cjs/components/MonthPicker/MonthPicker.js.map +1 -1
- package/cjs/components/MonthPickerInput/MonthPickerInput.js +112 -92
- package/cjs/components/MonthPickerInput/MonthPickerInput.js.map +1 -1
- package/cjs/components/MonthsList/MonthsList.js +78 -72
- package/cjs/components/MonthsList/MonthsList.js.map +1 -1
- package/cjs/components/MonthsList/MonthsList.module.css.js +8 -0
- package/cjs/components/MonthsList/MonthsList.module.css.js.map +1 -0
- package/cjs/components/MonthsList/get-month-in-tab-order/get-month-in-tab-order.js +6 -4
- package/cjs/components/MonthsList/get-month-in-tab-order/get-month-in-tab-order.js.map +1 -1
- package/cjs/components/MonthsList/is-month-disabled/is-month-disabled.js.map +1 -1
- package/cjs/components/PickerControl/PickerControl.js +47 -31
- package/cjs/components/PickerControl/PickerControl.js.map +1 -1
- package/cjs/components/PickerControl/PickerControl.module.css.js +8 -0
- package/cjs/components/PickerControl/PickerControl.module.css.js.map +1 -0
- package/cjs/components/PickerInputBase/PickerInputBase.js +60 -59
- package/cjs/components/PickerInputBase/PickerInputBase.js.map +1 -1
- package/cjs/components/PickerInputBase/PickerInputBase.module.css.js +8 -0
- package/cjs/components/PickerInputBase/PickerInputBase.module.css.js.map +1 -0
- package/cjs/components/TimeInput/TimeInput.js +22 -19
- package/cjs/components/TimeInput/TimeInput.js.map +1 -1
- package/cjs/components/TimeInput/TimeInput.module.css.js +8 -0
- package/cjs/components/TimeInput/TimeInput.module.css.js.map +1 -0
- package/cjs/components/WeekdaysRow/WeekdaysRow.js +37 -35
- package/cjs/components/WeekdaysRow/WeekdaysRow.js.map +1 -1
- package/cjs/components/WeekdaysRow/WeekdaysRow.module.css.js +8 -0
- package/cjs/components/WeekdaysRow/WeekdaysRow.module.css.js.map +1 -0
- package/cjs/components/YearLevel/YearLevel.js +57 -65
- package/cjs/components/YearLevel/YearLevel.js.map +1 -1
- package/cjs/components/YearLevelGroup/YearLevelGroup.js +78 -74
- package/cjs/components/YearLevelGroup/YearLevelGroup.js.map +1 -1
- package/cjs/components/YearPicker/YearPicker.js +39 -17
- package/cjs/components/YearPicker/YearPicker.js.map +1 -1
- package/cjs/components/YearPickerInput/YearPickerInput.js +112 -92
- package/cjs/components/YearPickerInput/YearPickerInput.js.map +1 -1
- package/cjs/components/YearsList/YearsList.js +72 -68
- package/cjs/components/YearsList/YearsList.js.map +1 -1
- package/cjs/components/YearsList/YearsList.module.css.js +8 -0
- package/cjs/components/YearsList/YearsList.module.css.js.map +1 -0
- package/cjs/components/YearsList/get-year-in-tab-order/get-year-in-tab-order.js +6 -4
- package/cjs/components/YearsList/get-year-in-tab-order/get-year-in-tab-order.js.map +1 -1
- package/cjs/components/YearsList/is-year-disabled/is-year-disabled.js.map +1 -1
- package/cjs/hooks/use-dates-input/use-dates-input.js.map +1 -1
- package/cjs/hooks/use-dates-state/use-dates-state.js +9 -3
- package/cjs/hooks/use-dates-state/use-dates-state.js.map +1 -1
- package/cjs/hooks/use-uncontrolled-dates/use-uncontrolled-dates.js +9 -3
- package/cjs/hooks/use-uncontrolled-dates/use-uncontrolled-dates.js.map +1 -1
- package/cjs/index.css +413 -0
- package/cjs/index.js +41 -40
- package/cjs/index.js.map +1 -1
- package/cjs/utils/get-default-clamped-date.js +3 -3
- package/cjs/utils/get-default-clamped-date.js.map +1 -1
- package/cjs/utils/get-formatted-date.js +1 -1
- package/cjs/utils/get-formatted-date.js.map +1 -1
- package/cjs/utils/handle-control-key-down.js +4 -3
- package/cjs/utils/handle-control-key-down.js.map +1 -1
- package/esm/components/Calendar/Calendar.js +120 -114
- package/esm/components/Calendar/Calendar.js.map +1 -1
- package/esm/components/Calendar/clamp-level/clamp-level.js +8 -2
- package/esm/components/Calendar/clamp-level/clamp-level.js.map +1 -1
- package/esm/components/Calendar/pick-calendar-levels-props/pick-calendar-levels-props.js +15 -5
- package/esm/components/Calendar/pick-calendar-levels-props/pick-calendar-levels-props.js.map +1 -1
- package/esm/components/CalendarHeader/CalendarHeader.js +93 -67
- package/esm/components/CalendarHeader/CalendarHeader.js.map +1 -1
- package/esm/components/CalendarHeader/CalendarHeader.module.css.js +4 -0
- package/esm/components/CalendarHeader/CalendarHeader.module.css.js.map +1 -0
- package/esm/components/DateInput/DateInput.js +67 -61
- package/esm/components/DateInput/DateInput.js.map +1 -1
- package/esm/components/DateInput/date-string-parser/date-string-parser.js +3 -0
- package/esm/components/DateInput/date-string-parser/date-string-parser.js.map +1 -1
- package/esm/components/DateInput/is-date-valid/is-date-valid.js.map +1 -1
- package/esm/components/DatePicker/DatePicker.js +50 -17
- package/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/esm/components/DatePickerInput/DatePickerInput.js +118 -98
- package/esm/components/DatePickerInput/DatePickerInput.js.map +1 -1
- package/esm/components/DateTimePicker/DateTimePicker.js +104 -77
- package/esm/components/DateTimePicker/DateTimePicker.js.map +1 -1
- package/esm/components/DateTimePicker/DateTimePicker.module.css.js +4 -0
- package/esm/components/DateTimePicker/DateTimePicker.module.css.js.map +1 -0
- package/esm/components/DatesProvider/DatesProvider.js +1 -3
- package/esm/components/DatesProvider/DatesProvider.js.map +1 -1
- package/esm/components/DatesProvider/use-dates-context.js +12 -3
- package/esm/components/DatesProvider/use-dates-context.js.map +1 -1
- package/esm/components/Day/Day.js +61 -40
- package/esm/components/Day/Day.js.map +1 -1
- package/esm/components/Day/Day.module.css.js +4 -0
- package/esm/components/Day/Day.module.css.js.map +1 -0
- package/esm/components/DecadeLevel/DecadeLevel.js +52 -57
- package/esm/components/DecadeLevel/DecadeLevel.js.map +1 -1
- package/esm/components/DecadeLevelGroup/DecadeLevelGroup.js +79 -74
- package/esm/components/DecadeLevelGroup/DecadeLevelGroup.js.map +1 -1
- package/esm/components/HiddenDatesInput/HiddenDatesInput.js +2 -7
- package/esm/components/HiddenDatesInput/HiddenDatesInput.js.map +1 -1
- package/esm/components/{CalendarHeader/Chevron.js → LevelsGroup/LevelsGroup.js} +24 -16
- package/esm/components/LevelsGroup/LevelsGroup.js.map +1 -0
- package/esm/components/LevelsGroup/LevelsGroup.module.css.js +4 -0
- package/esm/components/LevelsGroup/LevelsGroup.module.css.js.map +1 -0
- package/esm/components/Month/Month.js +102 -80
- package/esm/components/Month/Month.js.map +1 -1
- package/esm/components/Month/Month.module.css.js +4 -0
- package/esm/components/Month/Month.module.css.js.map +1 -0
- package/esm/components/Month/get-date-in-tab-order/get-date-in-tab-order.js +6 -4
- package/esm/components/Month/get-date-in-tab-order/get-date-in-tab-order.js.map +1 -1
- package/esm/components/MonthLevel/MonthLevel.js +58 -66
- package/esm/components/MonthLevel/MonthLevel.js.map +1 -1
- package/esm/components/MonthLevelGroup/MonthLevelGroup.js +86 -82
- package/esm/components/MonthLevelGroup/MonthLevelGroup.js.map +1 -1
- package/esm/components/MonthPicker/MonthPicker.js +41 -19
- package/esm/components/MonthPicker/MonthPicker.js.map +1 -1
- package/esm/components/MonthPickerInput/MonthPickerInput.js +114 -94
- package/esm/components/MonthPickerInput/MonthPickerInput.js.map +1 -1
- package/esm/components/MonthsList/MonthsList.js +78 -72
- package/esm/components/MonthsList/MonthsList.js.map +1 -1
- package/esm/components/MonthsList/MonthsList.module.css.js +4 -0
- package/esm/components/MonthsList/MonthsList.module.css.js.map +1 -0
- package/esm/components/MonthsList/get-month-in-tab-order/get-month-in-tab-order.js +6 -4
- package/esm/components/MonthsList/get-month-in-tab-order/get-month-in-tab-order.js.map +1 -1
- package/esm/components/MonthsList/is-month-disabled/is-month-disabled.js.map +1 -1
- package/esm/components/PickerControl/PickerControl.js +49 -33
- package/esm/components/PickerControl/PickerControl.js.map +1 -1
- package/esm/components/PickerControl/PickerControl.module.css.js +4 -0
- package/esm/components/PickerControl/PickerControl.module.css.js.map +1 -0
- package/esm/components/PickerInputBase/PickerInputBase.js +61 -61
- package/esm/components/PickerInputBase/PickerInputBase.js.map +1 -1
- package/esm/components/PickerInputBase/PickerInputBase.module.css.js +4 -0
- package/esm/components/PickerInputBase/PickerInputBase.module.css.js.map +1 -0
- package/esm/components/TimeInput/TimeInput.js +23 -21
- package/esm/components/TimeInput/TimeInput.js.map +1 -1
- package/esm/components/TimeInput/TimeInput.module.css.js +4 -0
- package/esm/components/TimeInput/TimeInput.module.css.js.map +1 -0
- package/esm/components/WeekdaysRow/WeekdaysRow.js +39 -37
- package/esm/components/WeekdaysRow/WeekdaysRow.js.map +1 -1
- package/esm/components/WeekdaysRow/WeekdaysRow.module.css.js +4 -0
- package/esm/components/WeekdaysRow/WeekdaysRow.module.css.js.map +1 -0
- package/esm/components/YearLevel/YearLevel.js +57 -65
- package/esm/components/YearLevel/YearLevel.js.map +1 -1
- package/esm/components/YearLevelGroup/YearLevelGroup.js +78 -74
- package/esm/components/YearLevelGroup/YearLevelGroup.js.map +1 -1
- package/esm/components/YearPicker/YearPicker.js +41 -19
- package/esm/components/YearPicker/YearPicker.js.map +1 -1
- package/esm/components/YearPickerInput/YearPickerInput.js +114 -94
- package/esm/components/YearPickerInput/YearPickerInput.js.map +1 -1
- package/esm/components/YearsList/YearsList.js +74 -70
- package/esm/components/YearsList/YearsList.js.map +1 -1
- package/esm/components/YearsList/YearsList.module.css.js +4 -0
- package/esm/components/YearsList/YearsList.module.css.js.map +1 -0
- package/esm/components/YearsList/get-year-in-tab-order/get-year-in-tab-order.js +6 -4
- package/esm/components/YearsList/get-year-in-tab-order/get-year-in-tab-order.js.map +1 -1
- package/esm/components/YearsList/is-year-disabled/is-year-disabled.js.map +1 -1
- package/esm/hooks/use-dates-input/use-dates-input.js.map +1 -1
- package/esm/hooks/use-dates-state/use-dates-state.js +9 -3
- package/esm/hooks/use-dates-state/use-dates-state.js.map +1 -1
- package/esm/hooks/use-uncontrolled-dates/use-uncontrolled-dates.js +9 -3
- package/esm/hooks/use-uncontrolled-dates/use-uncontrolled-dates.js.map +1 -1
- package/esm/index.css +413 -0
- package/esm/index.js +21 -20
- package/esm/index.js.map +1 -1
- package/esm/utils/get-default-clamped-date.js +3 -3
- package/esm/utils/get-default-clamped-date.js.map +1 -1
- package/esm/utils/get-formatted-date.js +1 -1
- package/esm/utils/get-formatted-date.js.map +1 -1
- package/esm/utils/handle-control-key-down.js +4 -3
- package/esm/utils/handle-control-key-down.js.map +1 -1
- package/lib/components/Calendar/Calendar.d.ts +13 -8
- package/lib/components/Calendar/Calendar.d.ts.map +1 -1
- package/lib/components/Calendar/clamp-level/clamp-level.d.ts +1 -1
- package/lib/components/Calendar/clamp-level/clamp-level.d.ts.map +1 -1
- package/lib/components/Calendar/index.d.ts +1 -1
- package/lib/components/Calendar/index.d.ts.map +1 -1
- package/lib/components/Calendar/pick-calendar-levels-props/pick-calendar-levels-props.d.ts +1 -1
- package/lib/components/CalendarHeader/CalendarHeader.d.ts +18 -6
- package/lib/components/CalendarHeader/CalendarHeader.d.ts.map +1 -1
- package/lib/components/CalendarHeader/index.d.ts +1 -1
- package/lib/components/CalendarHeader/index.d.ts.map +1 -1
- package/lib/components/DateInput/DateInput.d.ts +15 -4
- package/lib/components/DateInput/DateInput.d.ts.map +1 -1
- package/lib/components/DateInput/date-string-parser/date-string-parser.d.ts +1 -1
- package/lib/components/DateInput/date-string-parser/date-string-parser.d.ts.map +1 -1
- package/lib/components/DateInput/index.d.ts +1 -1
- package/lib/components/DateInput/index.d.ts.map +1 -1
- package/lib/components/DateInput/is-date-valid/is-date-valid.d.ts +2 -2
- package/lib/components/DateInput/is-date-valid/is-date-valid.d.ts.map +1 -1
- package/lib/components/DatePicker/DatePicker.d.ts +10 -3
- package/lib/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/lib/components/DatePicker/index.d.ts +1 -1
- package/lib/components/DatePicker/index.d.ts.map +1 -1
- package/lib/components/DatePickerInput/DatePickerInput.d.ts +12 -4
- package/lib/components/DatePickerInput/DatePickerInput.d.ts.map +1 -1
- package/lib/components/DatePickerInput/index.d.ts +1 -1
- package/lib/components/DatePickerInput/index.d.ts.map +1 -1
- package/lib/components/DateTimePicker/DateTimePicker.d.ts +17 -7
- package/lib/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/lib/components/DateTimePicker/index.d.ts +1 -1
- package/lib/components/DateTimePicker/index.d.ts.map +1 -1
- package/lib/components/DatesProvider/DatesProvider.d.ts +1 -1
- package/lib/components/DatesProvider/DatesProvider.d.ts.map +1 -1
- package/lib/components/Day/Day.d.ts +27 -17
- package/lib/components/Day/Day.d.ts.map +1 -1
- package/lib/components/Day/index.d.ts +1 -2
- package/lib/components/Day/index.d.ts.map +1 -1
- package/lib/components/DecadeLevel/DecadeLevel.d.ts +16 -7
- package/lib/components/DecadeLevel/DecadeLevel.d.ts.map +1 -1
- package/lib/components/DecadeLevel/index.d.ts +1 -1
- package/lib/components/DecadeLevel/index.d.ts.map +1 -1
- package/lib/components/DecadeLevelGroup/DecadeLevelGroup.d.ts +17 -7
- package/lib/components/DecadeLevelGroup/DecadeLevelGroup.d.ts.map +1 -1
- package/lib/components/DecadeLevelGroup/index.d.ts +1 -1
- package/lib/components/DecadeLevelGroup/index.d.ts.map +1 -1
- package/lib/components/HiddenDatesInput/HiddenDatesInput.d.ts +4 -4
- package/lib/components/HiddenDatesInput/HiddenDatesInput.d.ts.map +1 -1
- package/lib/components/LevelsGroup/LevelsGroup.d.ts +17 -0
- package/lib/components/LevelsGroup/LevelsGroup.d.ts.map +1 -0
- package/lib/components/LevelsGroup/index.d.ts +3 -0
- package/lib/components/LevelsGroup/index.d.ts.map +1 -0
- package/lib/components/Month/Month.d.ts +15 -9
- package/lib/components/Month/Month.d.ts.map +1 -1
- package/lib/components/Month/get-date-in-tab-order/get-date-in-tab-order.d.ts +2 -2
- package/lib/components/Month/get-date-in-tab-order/get-date-in-tab-order.d.ts.map +1 -1
- package/lib/components/Month/index.d.ts +1 -1
- package/lib/components/Month/index.d.ts.map +1 -1
- package/lib/components/MonthLevel/MonthLevel.d.ts +16 -7
- package/lib/components/MonthLevel/MonthLevel.d.ts.map +1 -1
- package/lib/components/MonthLevel/index.d.ts +1 -1
- package/lib/components/MonthLevel/index.d.ts.map +1 -1
- package/lib/components/MonthLevelGroup/MonthLevelGroup.d.ts +17 -7
- package/lib/components/MonthLevelGroup/MonthLevelGroup.d.ts.map +1 -1
- package/lib/components/MonthLevelGroup/index.d.ts +1 -1
- package/lib/components/MonthLevelGroup/index.d.ts.map +1 -1
- package/lib/components/MonthPicker/MonthPicker.d.ts +14 -3
- package/lib/components/MonthPicker/MonthPicker.d.ts.map +1 -1
- package/lib/components/MonthPicker/index.d.ts +1 -1
- package/lib/components/MonthPicker/index.d.ts.map +1 -1
- package/lib/components/MonthPickerInput/MonthPickerInput.d.ts +12 -5
- package/lib/components/MonthPickerInput/MonthPickerInput.d.ts.map +1 -1
- package/lib/components/MonthPickerInput/index.d.ts +1 -1
- package/lib/components/MonthPickerInput/index.d.ts.map +1 -1
- package/lib/components/MonthsList/MonthsList.d.ts +14 -8
- package/lib/components/MonthsList/MonthsList.d.ts.map +1 -1
- package/lib/components/MonthsList/get-month-in-tab-order/get-month-in-tab-order.d.ts +1 -1
- package/lib/components/MonthsList/get-month-in-tab-order/get-month-in-tab-order.d.ts.map +1 -1
- package/lib/components/MonthsList/index.d.ts +1 -1
- package/lib/components/MonthsList/index.d.ts.map +1 -1
- package/lib/components/MonthsList/is-month-disabled/is-month-disabled.d.ts +1 -1
- package/lib/components/MonthsList/is-month-disabled/is-month-disabled.d.ts.map +1 -1
- package/lib/components/PickerControl/PickerControl.d.ts +18 -6
- package/lib/components/PickerControl/PickerControl.d.ts.map +1 -1
- package/lib/components/PickerControl/index.d.ts +1 -1
- package/lib/components/PickerControl/index.d.ts.map +1 -1
- package/lib/components/PickerInputBase/PickerInputBase.d.ts +24 -12
- package/lib/components/PickerInputBase/PickerInputBase.d.ts.map +1 -1
- package/lib/components/PickerInputBase/index.d.ts +1 -1
- package/lib/components/PickerInputBase/index.d.ts.map +1 -1
- package/lib/components/TimeInput/TimeInput.d.ts +12 -5
- package/lib/components/TimeInput/TimeInput.d.ts.map +1 -1
- package/lib/components/TimeInput/index.d.ts +1 -1
- package/lib/components/TimeInput/index.d.ts.map +1 -1
- package/lib/components/WeekdaysRow/WeekdaysRow.d.ts +18 -6
- package/lib/components/WeekdaysRow/WeekdaysRow.d.ts.map +1 -1
- package/lib/components/WeekdaysRow/index.d.ts +1 -2
- package/lib/components/WeekdaysRow/index.d.ts.map +1 -1
- package/lib/components/YearLevel/YearLevel.d.ts +15 -6
- package/lib/components/YearLevel/YearLevel.d.ts.map +1 -1
- package/lib/components/YearLevel/index.d.ts +1 -1
- package/lib/components/YearLevel/index.d.ts.map +1 -1
- package/lib/components/YearLevelGroup/YearLevelGroup.d.ts +17 -7
- package/lib/components/YearLevelGroup/YearLevelGroup.d.ts.map +1 -1
- package/lib/components/YearLevelGroup/index.d.ts +1 -1
- package/lib/components/YearLevelGroup/index.d.ts.map +1 -1
- package/lib/components/YearPicker/YearPicker.d.ts +13 -3
- package/lib/components/YearPicker/YearPicker.d.ts.map +1 -1
- package/lib/components/YearPicker/index.d.ts +1 -1
- package/lib/components/YearPicker/index.d.ts.map +1 -1
- package/lib/components/YearPickerInput/YearPickerInput.d.ts +12 -5
- package/lib/components/YearPickerInput/YearPickerInput.d.ts.map +1 -1
- package/lib/components/YearPickerInput/index.d.ts +1 -1
- package/lib/components/YearPickerInput/index.d.ts.map +1 -1
- package/lib/components/YearsList/YearsList.d.ts +17 -11
- package/lib/components/YearsList/YearsList.d.ts.map +1 -1
- package/lib/components/YearsList/get-year-in-tab-order/get-year-in-tab-order.d.ts +1 -1
- package/lib/components/YearsList/get-year-in-tab-order/get-year-in-tab-order.d.ts.map +1 -1
- package/lib/components/YearsList/index.d.ts +1 -1
- package/lib/components/YearsList/index.d.ts.map +1 -1
- package/lib/components/YearsList/is-year-disabled/is-year-disabled.d.ts +1 -1
- package/lib/components/YearsList/is-year-disabled/is-year-disabled.d.ts.map +1 -1
- package/lib/hooks/use-dates-input/use-dates-input.d.ts +8 -8
- package/lib/hooks/use-dates-input/use-dates-input.d.ts.map +1 -1
- package/lib/hooks/use-dates-state/use-dates-state.d.ts +4 -4
- package/lib/hooks/use-uncontrolled-dates/use-uncontrolled-dates.d.ts +3 -3
- package/lib/hooks/use-uncontrolled-dates/use-uncontrolled-dates.d.ts.map +1 -1
- package/lib/index.d.ts +19 -18
- package/lib/index.d.ts.map +1 -1
- package/lib/utils/get-default-clamped-date.d.ts +2 -2
- package/lib/utils/get-default-clamped-date.d.ts.map +1 -1
- package/package.json +19 -10
- package/cjs/components/Calendar/Calendar.styles.js +0 -12
- package/cjs/components/Calendar/Calendar.styles.js.map +0 -1
- package/cjs/components/CalendarHeader/CalendarHeader.styles.js +0 -84
- package/cjs/components/CalendarHeader/CalendarHeader.styles.js.map +0 -1
- package/cjs/components/CalendarHeader/Chevron.js.map +0 -1
- package/cjs/components/DateTimePicker/DateTimePicker.styles.js +0 -19
- package/cjs/components/DateTimePicker/DateTimePicker.styles.js.map +0 -1
- package/cjs/components/Day/Day.styles.js +0 -90
- package/cjs/components/Day/Day.styles.js.map +0 -1
- package/cjs/components/DecadeLevel/DecadeLevel.styles.js +0 -15
- package/cjs/components/DecadeLevel/DecadeLevel.styles.js.map +0 -1
- package/cjs/components/DecadeLevelGroup/DecadeLevelGroup.styles.js +0 -15
- package/cjs/components/DecadeLevelGroup/DecadeLevelGroup.styles.js.map +0 -1
- package/cjs/components/Month/Month.styles.js +0 -46
- package/cjs/components/Month/Month.styles.js.map +0 -1
- package/cjs/components/MonthLevel/MonthLevel.styles.js +0 -15
- package/cjs/components/MonthLevel/MonthLevel.styles.js.map +0 -1
- package/cjs/components/MonthLevelGroup/MonthLevelGroup.styles.js +0 -17
- package/cjs/components/MonthLevelGroup/MonthLevelGroup.styles.js.map +0 -1
- package/cjs/components/MonthsList/MonthsList.styles.js +0 -23
- package/cjs/components/MonthsList/MonthsList.styles.js.map +0 -1
- package/cjs/components/PickerControl/PickerControl.styles.js +0 -78
- package/cjs/components/PickerControl/PickerControl.styles.js.map +0 -1
- package/cjs/components/PickerInputBase/PickerInputBase.styles.js +0 -19
- package/cjs/components/PickerInputBase/PickerInputBase.styles.js.map +0 -1
- package/cjs/components/TimeInput/TimeInput.styles.js +0 -31
- package/cjs/components/TimeInput/TimeInput.styles.js.map +0 -1
- package/cjs/components/WeekdaysRow/WeekdaysRow.styles.js +0 -19
- package/cjs/components/WeekdaysRow/WeekdaysRow.styles.js.map +0 -1
- package/cjs/components/YearLevel/YearLevel.styles.js +0 -15
- package/cjs/components/YearLevel/YearLevel.styles.js.map +0 -1
- package/cjs/components/YearLevelGroup/YearLevelGroup.styles.js +0 -17
- package/cjs/components/YearLevelGroup/YearLevelGroup.styles.js.map +0 -1
- package/cjs/components/YearsList/YearsList.styles.js +0 -22
- package/cjs/components/YearsList/YearsList.styles.js.map +0 -1
- package/esm/components/Calendar/Calendar.styles.js +0 -8
- package/esm/components/Calendar/Calendar.styles.js.map +0 -1
- package/esm/components/CalendarHeader/CalendarHeader.styles.js +0 -80
- package/esm/components/CalendarHeader/CalendarHeader.styles.js.map +0 -1
- package/esm/components/CalendarHeader/Chevron.js.map +0 -1
- package/esm/components/DateTimePicker/DateTimePicker.styles.js +0 -15
- package/esm/components/DateTimePicker/DateTimePicker.styles.js.map +0 -1
- package/esm/components/Day/Day.styles.js +0 -86
- package/esm/components/Day/Day.styles.js.map +0 -1
- package/esm/components/DecadeLevel/DecadeLevel.styles.js +0 -11
- package/esm/components/DecadeLevel/DecadeLevel.styles.js.map +0 -1
- package/esm/components/DecadeLevelGroup/DecadeLevelGroup.styles.js +0 -11
- package/esm/components/DecadeLevelGroup/DecadeLevelGroup.styles.js.map +0 -1
- package/esm/components/Month/Month.styles.js +0 -42
- package/esm/components/Month/Month.styles.js.map +0 -1
- package/esm/components/MonthLevel/MonthLevel.styles.js +0 -11
- package/esm/components/MonthLevel/MonthLevel.styles.js.map +0 -1
- package/esm/components/MonthLevelGroup/MonthLevelGroup.styles.js +0 -13
- package/esm/components/MonthLevelGroup/MonthLevelGroup.styles.js.map +0 -1
- package/esm/components/MonthsList/MonthsList.styles.js +0 -19
- package/esm/components/MonthsList/MonthsList.styles.js.map +0 -1
- package/esm/components/PickerControl/PickerControl.styles.js +0 -74
- package/esm/components/PickerControl/PickerControl.styles.js.map +0 -1
- package/esm/components/PickerInputBase/PickerInputBase.styles.js +0 -15
- package/esm/components/PickerInputBase/PickerInputBase.styles.js.map +0 -1
- package/esm/components/TimeInput/TimeInput.styles.js +0 -27
- package/esm/components/TimeInput/TimeInput.styles.js.map +0 -1
- package/esm/components/WeekdaysRow/WeekdaysRow.styles.js +0 -15
- package/esm/components/WeekdaysRow/WeekdaysRow.styles.js.map +0 -1
- package/esm/components/YearLevel/YearLevel.styles.js +0 -11
- package/esm/components/YearLevel/YearLevel.styles.js.map +0 -1
- package/esm/components/YearLevelGroup/YearLevelGroup.styles.js +0 -13
- package/esm/components/YearLevelGroup/YearLevelGroup.styles.js.map +0 -1
- package/esm/components/YearsList/YearsList.styles.js +0 -18
- package/esm/components/YearsList/YearsList.styles.js.map +0 -1
- package/lib/components/Calendar/Calendar.styles.d.ts +0 -9
- package/lib/components/Calendar/Calendar.styles.d.ts.map +0 -1
- package/lib/components/CalendarHeader/CalendarHeader.styles.d.ts +0 -12
- package/lib/components/CalendarHeader/CalendarHeader.styles.d.ts.map +0 -1
- package/lib/components/CalendarHeader/Chevron.d.ts +0 -10
- package/lib/components/CalendarHeader/Chevron.d.ts.map +0 -1
- package/lib/components/DateTimePicker/DateTimePicker.styles.d.ts +0 -10
- package/lib/components/DateTimePicker/DateTimePicker.styles.d.ts.map +0 -1
- package/lib/components/Day/Day.styles.d.ts +0 -21
- package/lib/components/Day/Day.styles.d.ts.map +0 -1
- package/lib/components/DecadeLevel/DecadeLevel.styles.d.ts +0 -10
- package/lib/components/DecadeLevel/DecadeLevel.styles.d.ts.map +0 -1
- package/lib/components/DecadeLevelGroup/DecadeLevelGroup.styles.d.ts +0 -9
- package/lib/components/DecadeLevelGroup/DecadeLevelGroup.styles.d.ts.map +0 -1
- package/lib/components/Month/Month.styles.d.ts +0 -13
- package/lib/components/Month/Month.styles.d.ts.map +0 -1
- package/lib/components/MonthLevel/MonthLevel.styles.d.ts +0 -10
- package/lib/components/MonthLevel/MonthLevel.styles.d.ts.map +0 -1
- package/lib/components/MonthLevelGroup/MonthLevelGroup.styles.d.ts +0 -9
- package/lib/components/MonthLevelGroup/MonthLevelGroup.styles.d.ts.map +0 -1
- package/lib/components/MonthsList/MonthsList.styles.d.ts +0 -11
- package/lib/components/MonthsList/MonthsList.styles.d.ts.map +0 -1
- package/lib/components/PickerControl/PickerControl.styles.d.ts +0 -9
- package/lib/components/PickerControl/PickerControl.styles.d.ts.map +0 -1
- package/lib/components/PickerInputBase/PickerInputBase.styles.d.ts +0 -10
- package/lib/components/PickerInputBase/PickerInputBase.styles.d.ts.map +0 -1
- package/lib/components/TimeInput/TimeInput.styles.d.ts +0 -9
- package/lib/components/TimeInput/TimeInput.styles.d.ts.map +0 -1
- package/lib/components/WeekdaysRow/WeekdaysRow.styles.d.ts +0 -10
- package/lib/components/WeekdaysRow/WeekdaysRow.styles.d.ts.map +0 -1
- package/lib/components/YearLevel/YearLevel.styles.d.ts +0 -10
- package/lib/components/YearLevel/YearLevel.styles.d.ts.map +0 -1
- package/lib/components/YearLevelGroup/YearLevelGroup.styles.d.ts +0 -9
- package/lib/components/YearLevelGroup/YearLevelGroup.styles.d.ts.map +0 -1
- package/lib/components/YearsList/YearsList.styles.d.ts +0 -11
- package/lib/components/YearsList/YearsList.styles.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-control-key-down.js","sources":["../../src/utils/handle-control-key-down.ts"],"sourcesContent":["import { RefObject } from 'react';\n\ntype ControlsRef = RefObject<HTMLButtonElement[][][]>;\ntype Direction = 'up' | 'down' | 'left' | 'right';\n\ntype NextIndexInput = Omit<ShiftFocusInput, 'controlsRef'>;\n\nfunction getNextIndex({ direction, levelIndex, rowIndex, cellIndex, size }: NextIndexInput) {\n switch (direction) {\n case 'up':\n if (levelIndex === 0 && rowIndex === 0) {\n return null;\n }\n if (rowIndex === 0) {\n return {\n levelIndex: levelIndex - 1,\n rowIndex:\n cellIndex <= size[levelIndex - 1][size[levelIndex - 1].length - 1] - 1\n ? size[levelIndex - 1].length - 1\n : size[levelIndex - 1].length - 2,\n cellIndex,\n };\n }\n return {\n levelIndex,\n rowIndex: rowIndex - 1,\n cellIndex,\n };\n\n case 'down':\n if (rowIndex === size[levelIndex].length - 1) {\n return {\n levelIndex: levelIndex + 1,\n rowIndex: 0,\n cellIndex,\n };\n }\n if (\n rowIndex === size[levelIndex].length - 2 &&\n cellIndex >= size[levelIndex][size[levelIndex].length - 1]\n ) {\n return {\n levelIndex: levelIndex + 1,\n rowIndex: 0,\n cellIndex,\n };\n }\n return {\n levelIndex,\n rowIndex: rowIndex + 1,\n cellIndex,\n };\n\n case 'left':\n if (levelIndex === 0 && rowIndex === 0 && cellIndex === 0) {\n return null;\n }\n if (rowIndex === 0 && cellIndex === 0) {\n return {\n levelIndex: levelIndex - 1,\n rowIndex: size[levelIndex - 1].length - 1,\n cellIndex: size[levelIndex - 1][size[levelIndex - 1].length - 1] - 1,\n };\n }\n if (cellIndex === 0) {\n return {\n levelIndex,\n rowIndex: rowIndex - 1,\n cellIndex: size[levelIndex][rowIndex - 1] - 1,\n };\n }\n return {\n levelIndex,\n rowIndex,\n cellIndex: cellIndex - 1,\n };\n\n case 'right':\n if (\n rowIndex === size[levelIndex].length - 1 &&\n cellIndex === size[levelIndex][rowIndex] - 1\n ) {\n return {\n levelIndex: levelIndex + 1,\n rowIndex: 0,\n cellIndex: 0,\n };\n }\n if (cellIndex === size[levelIndex][rowIndex] - 1) {\n return {\n levelIndex,\n rowIndex: rowIndex + 1,\n cellIndex: 0,\n };\n }\n return {\n levelIndex,\n rowIndex,\n cellIndex: cellIndex + 1,\n };\n\n default:\n return { levelIndex, rowIndex, cellIndex };\n }\n}\n\ninterface ShiftFocusInput {\n controlsRef: ControlsRef;\n direction: Direction;\n levelIndex: number;\n rowIndex: number;\n cellIndex: number;\n size: number[][];\n}\n\nfunction focusOnNextFocusableControl({\n controlsRef,\n direction,\n levelIndex,\n rowIndex,\n cellIndex,\n size,\n}: ShiftFocusInput) {\n const nextIndex = getNextIndex({ direction, size, rowIndex, cellIndex, levelIndex });\n\n if (!nextIndex) {\n return;\n }\n\n const controlToFocus =\n controlsRef.current[nextIndex.levelIndex]?.[nextIndex.rowIndex]?.[nextIndex.cellIndex];\n\n if (!controlToFocus) {\n return;\n }\n\n if (\n controlToFocus.disabled ||\n controlToFocus.getAttribute('data-hidden') ||\n controlToFocus.getAttribute('data-outside')\n ) {\n focusOnNextFocusableControl({\n controlsRef,\n direction,\n levelIndex: nextIndex.levelIndex,\n cellIndex: nextIndex.cellIndex,\n rowIndex: nextIndex.rowIndex,\n size,\n });\n } else {\n controlToFocus.focus();\n }\n}\n\nfunction getDirection(key: KeyboardEvent['key']): Direction {\n switch (key) {\n case 'ArrowDown':\n return 'down';\n case 'ArrowUp':\n return 'up';\n case 'ArrowRight':\n return 'right';\n case 'ArrowLeft':\n return 'left';\n default:\n return null
|
|
1
|
+
{"version":3,"file":"handle-control-key-down.js","sources":["../../src/utils/handle-control-key-down.ts"],"sourcesContent":["import { RefObject } from 'react';\n\ntype ControlsRef = RefObject<HTMLButtonElement[][][]>;\ntype Direction = 'up' | 'down' | 'left' | 'right';\n\ntype NextIndexInput = Omit<ShiftFocusInput, 'controlsRef'>;\n\nfunction getNextIndex({ direction, levelIndex, rowIndex, cellIndex, size }: NextIndexInput) {\n switch (direction) {\n case 'up':\n if (levelIndex === 0 && rowIndex === 0) {\n return null;\n }\n if (rowIndex === 0) {\n return {\n levelIndex: levelIndex - 1,\n rowIndex:\n cellIndex <= size[levelIndex - 1][size[levelIndex - 1].length - 1] - 1\n ? size[levelIndex - 1].length - 1\n : size[levelIndex - 1].length - 2,\n cellIndex,\n };\n }\n return {\n levelIndex,\n rowIndex: rowIndex - 1,\n cellIndex,\n };\n\n case 'down':\n if (rowIndex === size[levelIndex].length - 1) {\n return {\n levelIndex: levelIndex + 1,\n rowIndex: 0,\n cellIndex,\n };\n }\n if (\n rowIndex === size[levelIndex].length - 2 &&\n cellIndex >= size[levelIndex][size[levelIndex].length - 1]\n ) {\n return {\n levelIndex: levelIndex + 1,\n rowIndex: 0,\n cellIndex,\n };\n }\n return {\n levelIndex,\n rowIndex: rowIndex + 1,\n cellIndex,\n };\n\n case 'left':\n if (levelIndex === 0 && rowIndex === 0 && cellIndex === 0) {\n return null;\n }\n if (rowIndex === 0 && cellIndex === 0) {\n return {\n levelIndex: levelIndex - 1,\n rowIndex: size[levelIndex - 1].length - 1,\n cellIndex: size[levelIndex - 1][size[levelIndex - 1].length - 1] - 1,\n };\n }\n if (cellIndex === 0) {\n return {\n levelIndex,\n rowIndex: rowIndex - 1,\n cellIndex: size[levelIndex][rowIndex - 1] - 1,\n };\n }\n return {\n levelIndex,\n rowIndex,\n cellIndex: cellIndex - 1,\n };\n\n case 'right':\n if (\n rowIndex === size[levelIndex].length - 1 &&\n cellIndex === size[levelIndex][rowIndex] - 1\n ) {\n return {\n levelIndex: levelIndex + 1,\n rowIndex: 0,\n cellIndex: 0,\n };\n }\n if (cellIndex === size[levelIndex][rowIndex] - 1) {\n return {\n levelIndex,\n rowIndex: rowIndex + 1,\n cellIndex: 0,\n };\n }\n return {\n levelIndex,\n rowIndex,\n cellIndex: cellIndex + 1,\n };\n\n default:\n return { levelIndex, rowIndex, cellIndex };\n }\n}\n\ninterface ShiftFocusInput {\n controlsRef: ControlsRef;\n direction: Direction;\n levelIndex: number;\n rowIndex: number;\n cellIndex: number;\n size: number[][];\n}\n\nfunction focusOnNextFocusableControl({\n controlsRef,\n direction,\n levelIndex,\n rowIndex,\n cellIndex,\n size,\n}: ShiftFocusInput) {\n const nextIndex = getNextIndex({ direction, size, rowIndex, cellIndex, levelIndex });\n\n if (!nextIndex) {\n return;\n }\n\n const controlToFocus =\n controlsRef.current?.[nextIndex.levelIndex]?.[nextIndex.rowIndex]?.[nextIndex.cellIndex];\n\n if (!controlToFocus) {\n return;\n }\n\n if (\n controlToFocus.disabled ||\n controlToFocus.getAttribute('data-hidden') ||\n controlToFocus.getAttribute('data-outside')\n ) {\n focusOnNextFocusableControl({\n controlsRef,\n direction,\n levelIndex: nextIndex.levelIndex,\n cellIndex: nextIndex.cellIndex,\n rowIndex: nextIndex.rowIndex,\n size,\n });\n } else {\n controlToFocus.focus();\n }\n}\n\nfunction getDirection(key: KeyboardEvent['key']): Direction {\n switch (key) {\n case 'ArrowDown':\n return 'down';\n case 'ArrowUp':\n return 'up';\n case 'ArrowRight':\n return 'right';\n case 'ArrowLeft':\n return 'left';\n default:\n return null!;\n }\n}\n\nfunction getControlsSize(controlsRef: ControlsRef) {\n return controlsRef.current?.map((column) => column.map((row) => row.length));\n}\n\ninterface HandleControlKeyDownInput {\n controlsRef: ControlsRef;\n levelIndex: number;\n rowIndex: number;\n cellIndex: number;\n event: React.KeyboardEvent<HTMLButtonElement>;\n}\n\nexport function handleControlKeyDown({\n controlsRef,\n levelIndex,\n rowIndex,\n cellIndex,\n event,\n}: HandleControlKeyDownInput) {\n const direction = getDirection(event.key);\n\n if (direction) {\n event.preventDefault();\n\n const size = getControlsSize(controlsRef)!;\n\n focusOnNextFocusableControl({\n controlsRef,\n direction,\n levelIndex,\n rowIndex,\n cellIndex,\n size,\n });\n }\n}\n"],"names":[],"mappings":"AAAA,SAAS,YAAY,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;AAC5E,EAAE,QAAQ,SAAS;AACnB,IAAI,KAAK,IAAI;AACb,MAAM,IAAI,UAAU,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,EAAE;AAC9C,QAAQ,OAAO,IAAI,CAAC;AACpB,OAAO;AACP,MAAM,IAAI,QAAQ,KAAK,CAAC,EAAE;AAC1B,QAAQ,OAAO;AACf,UAAU,UAAU,EAAE,UAAU,GAAG,CAAC;AACpC,UAAU,QAAQ,EAAE,SAAS,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;AAC9J,UAAU,SAAS;AACnB,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2
|
-
import {
|
|
2
|
+
import { BoxProps, StylesApiProps, ElementProps, Factory } from '@mantine/core';
|
|
3
3
|
import { MonthLevelGroupStylesNames } from '../MonthLevelGroup';
|
|
4
4
|
import { YearLevelGroupStylesNames } from '../YearLevelGroup';
|
|
5
5
|
import { DecadeLevelGroupStylesNames } from '../DecadeLevelGroup';
|
|
6
6
|
import { CalendarLevel } from '../../types';
|
|
7
|
-
import useStyles from './Calendar.styles';
|
|
8
7
|
import { MonthLevelSettings } from '../MonthLevel';
|
|
9
8
|
import { YearLevelSettings } from '../YearLevel';
|
|
10
9
|
import { DecadeLevelSettings } from '../DecadeLevel';
|
|
11
|
-
export type CalendarStylesNames =
|
|
10
|
+
export type CalendarStylesNames = MonthLevelGroupStylesNames | YearLevelGroupStylesNames | DecadeLevelGroupStylesNames;
|
|
12
11
|
export interface CalendarAriaLabels {
|
|
13
12
|
monthLevelControl?: string;
|
|
14
13
|
yearLevelControl?: string;
|
|
@@ -36,9 +35,6 @@ export interface CalendarSettings extends Omit<DecadeLevelSettings, OmittedSetti
|
|
|
36
35
|
/** Called when mouse enters month control */
|
|
37
36
|
onMonthMouseEnter?(event: React.MouseEvent<HTMLButtonElement>, date: Date): void;
|
|
38
37
|
}
|
|
39
|
-
export interface CalendarSystemProps extends DefaultProps<CalendarStylesNames>, Omit<React.ComponentPropsWithRef<'div'>, 'value' | 'defaultValue' | 'onChange'> {
|
|
40
|
-
variant?: string;
|
|
41
|
-
}
|
|
42
38
|
export interface CalendarBaseProps {
|
|
43
39
|
__staticSelector?: string;
|
|
44
40
|
/** Prevents focus shift when buttons are clicked */
|
|
@@ -72,7 +68,7 @@ export interface CalendarBaseProps {
|
|
|
72
68
|
/** Called when previous month button is clicked */
|
|
73
69
|
onPreviousMonth?(date: Date): void;
|
|
74
70
|
}
|
|
75
|
-
export interface CalendarProps extends CalendarSettings, CalendarBaseProps,
|
|
71
|
+
export interface CalendarProps extends BoxProps, CalendarSettings, CalendarBaseProps, StylesApiProps<CalendarFactory>, ElementProps<'div'> {
|
|
76
72
|
/** Max level that user can go up to (decade, year, month), defaults to decade */
|
|
77
73
|
maxLevel?: CalendarLevel;
|
|
78
74
|
/** Min level that user can go down to (decade, year, month), defaults to month */
|
|
@@ -80,6 +76,15 @@ export interface CalendarProps extends CalendarSettings, CalendarBaseProps, Cale
|
|
|
80
76
|
/** Determines whether days should be static, static days can be used to display month if it is not expected that user will interact with the component in any way */
|
|
81
77
|
static?: boolean;
|
|
82
78
|
}
|
|
83
|
-
export
|
|
79
|
+
export type CalendarFactory = Factory<{
|
|
80
|
+
props: CalendarProps;
|
|
81
|
+
ref: HTMLDivElement;
|
|
82
|
+
stylesNames: CalendarStylesNames;
|
|
83
|
+
}>;
|
|
84
|
+
export declare const Calendar: import("@mantine/core").MantineComponent<{
|
|
85
|
+
props: CalendarProps;
|
|
86
|
+
ref: HTMLDivElement;
|
|
87
|
+
stylesNames: CalendarStylesNames;
|
|
88
|
+
}>;
|
|
84
89
|
export {};
|
|
85
90
|
//# sourceMappingURL=Calendar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,QAAQ,EACR,cAAc,EAEd,YAAY,EAEZ,OAAO,EAER,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAmB,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAkB,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAoB,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eA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,EACd,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,CAAC,eAAe,CAAC,EAC/B,YAAY,CAAC,KAAK,CAAC;IACrB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,aAAa,CAAC;IAEzB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,aAAa,CAAC;IAEzB,sKAAsK;IACtK,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC;IACpC,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC,CAAC;AASH,eAAO,MAAM,QAAQ;WAZZ,aAAa;SACf,cAAc;iBACN,mBAAmB;EA2PhC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CalendarLevel } from '../../../types';
|
|
2
|
-
export declare function clampLevel(level: CalendarLevel, minLevel: CalendarLevel, maxLevel: CalendarLevel): CalendarLevel;
|
|
2
|
+
export declare function clampLevel(level: CalendarLevel | undefined, minLevel: CalendarLevel | undefined, maxLevel: CalendarLevel | undefined): CalendarLevel;
|
|
3
3
|
//# sourceMappingURL=clamp-level.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clamp-level.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/clamp-level/clamp-level.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"clamp-level.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/clamp-level/clamp-level.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAoBpD,wBAAgB,UAAU,CACxB,KAAK,EAAE,aAAa,GAAG,SAAS,EAChC,QAAQ,EAAE,aAAa,GAAG,SAAS,EACnC,QAAQ,EAAE,aAAa,GAAG,SAAS,GAClC,aAAa,CAQf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Calendar } from './Calendar';
|
|
2
2
|
export { pickCalendarProps } from './pick-calendar-levels-props/pick-calendar-levels-props';
|
|
3
|
-
export type { CalendarSettings, CalendarAriaLabels, CalendarProps, CalendarStylesNames, CalendarBaseProps,
|
|
3
|
+
export type { CalendarSettings, CalendarAriaLabels, CalendarProps, CalendarStylesNames, CalendarBaseProps, CalendarFactory, } from './Calendar';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAC5F,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAC5F,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC"}
|
|
@@ -48,6 +48,6 @@ export declare function pickCalendarProps<T extends Record<string, any>>(props:
|
|
|
48
48
|
maxDate: any;
|
|
49
49
|
locale: any;
|
|
50
50
|
};
|
|
51
|
-
others: Omit<T, "
|
|
51
|
+
others: Omit<T, "locale" | "firstDayOfWeek" | "weekendDays" | "date" | "renderDay" | "weekdayFormat" | "getDayProps" | "excludeDate" | "minDate" | "maxDate" | "hideOutsideDates" | "hideWeekdays" | "getDayAriaLabel" | "withCellSpacing" | "yearsListFormat" | "getYearControlProps" | "monthsListFormat" | "getMonthControlProps" | "nextIcon" | "previousIcon" | "decadeLabelFormat" | "yearLabelFormat" | "monthLabelFormat" | "numberOfColumns" | "defaultLevel" | "level" | "onLevelChange" | "onYearSelect" | "onMonthSelect" | "onYearMouseEnter" | "onMonthMouseEnter" | "maxLevel" | "minLevel" | "__updateDateOnYearSelect" | "__updateDateOnMonthSelect" | "defaultDate" | "onDateChange" | "columnsToScroll" | "ariaLabels" | "onNextDecade" | "onPreviousDecade" | "onNextYear" | "onPreviousYear" | "onNextMonth" | "onPreviousMonth" | "allowSingleDateInRange" | "allowDeselect">;
|
|
52
52
|
};
|
|
53
53
|
//# sourceMappingURL=pick-calendar-levels-props.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export type
|
|
2
|
+
import { BoxProps, StylesApiProps, ElementProps, Factory, MantineSize } from '@mantine/core';
|
|
3
|
+
export type CalendarHeaderStylesNames = 'calendarHeader' | 'calendarHeaderControl' | 'calendarHeaderLevel' | 'calendarHeaderControlIcon';
|
|
4
|
+
export type CalendarHeaderCssVariables = {
|
|
5
|
+
calendarHeader: '--dch-control-size' | '--dch-fz';
|
|
6
|
+
};
|
|
5
7
|
export interface CalendarHeaderSettings {
|
|
6
8
|
__preventFocus?: boolean;
|
|
7
9
|
/** Determines whether propagation for Escape key should be stopped */
|
|
@@ -33,13 +35,23 @@ export interface CalendarHeaderSettings {
|
|
|
33
35
|
/** Component size */
|
|
34
36
|
size?: MantineSize;
|
|
35
37
|
}
|
|
36
|
-
export interface CalendarHeaderProps extends
|
|
37
|
-
variant?: string;
|
|
38
|
+
export interface CalendarHeaderProps extends BoxProps, CalendarHeaderSettings, StylesApiProps<CalendarHeaderFactory>, ElementProps<'div'> {
|
|
38
39
|
__staticSelector?: string;
|
|
39
40
|
/** Label displayed between next and previous buttons */
|
|
40
41
|
label: React.ReactNode;
|
|
41
42
|
/** aria-label for level control */
|
|
42
43
|
levelControlAriaLabel?: string;
|
|
43
44
|
}
|
|
44
|
-
export
|
|
45
|
+
export type CalendarHeaderFactory = Factory<{
|
|
46
|
+
props: CalendarHeaderProps;
|
|
47
|
+
ref: HTMLDivElement;
|
|
48
|
+
stylesNames: CalendarHeaderStylesNames;
|
|
49
|
+
vars: CalendarHeaderCssVariables;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const CalendarHeader: import("@mantine/core").MantineComponent<{
|
|
52
|
+
props: CalendarHeaderProps;
|
|
53
|
+
ref: HTMLDivElement;
|
|
54
|
+
stylesNames: CalendarHeaderStylesNames;
|
|
55
|
+
vars: CalendarHeaderCssVariables;
|
|
56
|
+
}>;
|
|
45
57
|
//# sourceMappingURL=CalendarHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarHeader.d.ts","sourceRoot":"","sources":["../../../src/components/CalendarHeader/CalendarHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CalendarHeader.d.ts","sourceRoot":"","sources":["../../../src/components/CalendarHeader/CalendarHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,QAAQ,EACR,cAAc,EAEd,YAAY,EAIZ,OAAO,EACP,WAAW,EAKZ,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,yBAAyB,GACjC,gBAAgB,GAChB,uBAAuB,GACvB,qBAAqB,GACrB,2BAA2B,CAAC;AAChC,MAAM,MAAM,0BAA0B,GAAG;IACvC,cAAc,EAAE,oBAAoB,GAAG,UAAU,CAAC;CACnD,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,uBAAuB;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAA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,3 @@
|
|
|
1
1
|
export { CalendarHeader } from './CalendarHeader';
|
|
2
|
-
export type { CalendarHeaderProps,
|
|
2
|
+
export type { CalendarHeaderProps, CalendarHeaderCssVariables, CalendarHeaderSettings, CalendarHeaderFactory, CalendarHeaderStylesNames, } from './CalendarHeader';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CalendarHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CalendarHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BoxProps, StylesApiProps, ElementProps, Factory, InputVariant, __BaseInputProps, __InputStylesNames, PopoverProps } from '@mantine/core';
|
|
3
3
|
import { CalendarBaseProps, CalendarStylesNames } from '../Calendar';
|
|
4
4
|
import { DecadeLevelSettings } from '../DecadeLevel';
|
|
5
5
|
import { YearLevelSettings } from '../YearLevel';
|
|
6
6
|
import { MonthLevelSettings } from '../MonthLevel';
|
|
7
7
|
import { DateValue, CalendarLevel } from '../../types';
|
|
8
|
-
export type DateInputStylesNames =
|
|
9
|
-
export interface DateInputProps extends
|
|
8
|
+
export type DateInputStylesNames = __InputStylesNames | CalendarStylesNames;
|
|
9
|
+
export interface DateInputProps extends BoxProps, Omit<__BaseInputProps, 'size'>, CalendarBaseProps, DecadeLevelSettings, YearLevelSettings, MonthLevelSettings, StylesApiProps<DateInputFactory>, ElementProps<'input', 'size' | 'value' | 'defaultValue' | 'onChange'> {
|
|
10
10
|
/** Parses user input to convert it to Date object */
|
|
11
11
|
dateParser?: (value: string) => Date | null;
|
|
12
12
|
/** Value for controlled component */
|
|
@@ -38,5 +38,16 @@ export interface DateInputProps extends DefaultProps<DateInputStylesNames>, Inpu
|
|
|
38
38
|
/** Called when level changes */
|
|
39
39
|
onLevelChange?(level: CalendarLevel): void;
|
|
40
40
|
}
|
|
41
|
-
export
|
|
41
|
+
export type DateInputFactory = Factory<{
|
|
42
|
+
props: DateInputProps;
|
|
43
|
+
ref: HTMLInputElement;
|
|
44
|
+
stylesNames: DateInputStylesNames;
|
|
45
|
+
variant: InputVariant;
|
|
46
|
+
}>;
|
|
47
|
+
export declare const DateInput: import("@mantine/core").MantineComponent<{
|
|
48
|
+
props: DateInputProps;
|
|
49
|
+
ref: HTMLInputElement;
|
|
50
|
+
stylesNames: DateInputStylesNames;
|
|
51
|
+
variant: InputVariant;
|
|
52
|
+
}>;
|
|
42
53
|
//# sourceMappingURL=DateInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/DateInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/DateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EACL,QAAQ,EACR,cAAc,EAEd,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EAMb,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAY,iBAAiB,EAAE,mBAAmB,EAAqB,MAAM,aAAa,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC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E,aAAa,CAAC;IAE7B,+FAA+F;IAC/F,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB,gCAAgC;IAChC,aAAa,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;CAC5C;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;IACrC,KAAK,EAAE,cAAc,CAAC;IACtB,GAAG,EAAE,gBAAgB,CAAC;IACtB,WAAW,EAAE,oBAAoB,CAAC;IAClC,OAAO,EAAE,YAAY,CAAC;CACvB,CAAC,CAAC;AASH,eAAO,MAAM,SAAS;WAbb,cAAc;SAChB,gBAAgB;iBACR,oBAAoB;aACxB,YAAY;EA+MrB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function dateStringParser(dateString: string): Date;
|
|
1
|
+
export declare function dateStringParser(dateString: string | null): Date | null;
|
|
2
2
|
//# sourceMappingURL=date-string-parser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-string-parser.d.ts","sourceRoot":"","sources":["../../../../src/components/DateInput/date-string-parser/date-string-parser.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"date-string-parser.d.ts","sourceRoot":"","sources":["../../../../src/components/DateInput/date-string-parser/date-string-parser.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,eAYzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-date-valid.d.ts","sourceRoot":"","sources":["../../../../src/components/DateInput/is-date-valid/is-date-valid.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"is-date-valid.d.ts","sourceRoot":"","sources":["../../../../src/components/DateInput/is-date-valid/is-date-valid.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CAClC;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,WAAW,WAkBlE"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { BoxProps, StylesApiProps, ElementProps, Factory, MantineComponentStaticProperties } from '@mantine/core';
|
|
2
3
|
import { PickerBaseProps, DatePickerType, CalendarLevel } from '../../types';
|
|
3
|
-
import { CalendarBaseProps, CalendarSettings,
|
|
4
|
+
import { CalendarBaseProps, CalendarSettings, CalendarStylesNames } from '../Calendar';
|
|
4
5
|
import { DecadeLevelBaseSettings } from '../DecadeLevel';
|
|
5
6
|
import { YearLevelBaseSettings } from '../YearLevel';
|
|
6
7
|
import { MonthLevelBaseSettings } from '../MonthLevel';
|
|
8
|
+
export type DatePickerStylesNames = CalendarStylesNames;
|
|
7
9
|
export interface DatePickerBaseProps<Type extends DatePickerType = 'default'> extends PickerBaseProps<Type>, DecadeLevelBaseSettings, YearLevelBaseSettings, MonthLevelBaseSettings, CalendarBaseProps, CalendarSettings {
|
|
8
10
|
/** Max level that user can go up to (decade, year, month), defaults to decade */
|
|
9
11
|
maxLevel?: CalendarLevel;
|
|
@@ -14,11 +16,16 @@ export interface DatePickerBaseProps<Type extends DatePickerType = 'default'> ex
|
|
|
14
16
|
/** Called when level changes */
|
|
15
17
|
onLevelChange?(level: CalendarLevel): void;
|
|
16
18
|
}
|
|
17
|
-
export interface DatePickerProps<Type extends DatePickerType = 'default'> extends DatePickerBaseProps<Type>,
|
|
19
|
+
export interface DatePickerProps<Type extends DatePickerType = 'default'> extends BoxProps, DatePickerBaseProps<Type>, StylesApiProps<DatePickerFactory>, ElementProps<'div', 'onChange' | 'value' | 'defaultValue'> {
|
|
18
20
|
}
|
|
21
|
+
export type DatePickerFactory = Factory<{
|
|
22
|
+
props: DatePickerProps;
|
|
23
|
+
ref: HTMLDivElement;
|
|
24
|
+
stylesNames: DatePickerStylesNames;
|
|
25
|
+
}>;
|
|
19
26
|
type DatePickerComponent = (<Type extends DatePickerType = 'default'>(props: DatePickerProps<Type>) => JSX.Element) & {
|
|
20
27
|
displayName?: string;
|
|
21
|
-
}
|
|
28
|
+
} & MantineComponentStaticProperties<DatePickerFactory>;
|
|
22
29
|
export declare const DatePicker: DatePickerComponent;
|
|
23
30
|
export {};
|
|
24
31
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EACR,cAAc,EAEd,YAAY,EAEZ,OAAO,EACP,gCAAgC,EAEjC,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC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AE,MAAM,CAAA;CAAE,GAAG,gCAAgC,CAAC,iBAAiB,CAAC,CAAC;AAEnG,eAAO,MAAM,UAAU,EAAE,mBAiEhB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { DatePicker } from './DatePicker';
|
|
2
|
-
export type { DatePickerBaseProps, DatePickerProps } from './DatePicker';
|
|
2
|
+
export type { DatePickerBaseProps, DatePickerProps, DatePickerFactory, DatePickerStylesNames, } from './DatePicker';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,cAAc,CAAC"}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { BoxProps, StylesApiProps, Factory, InputVariant, __InputStylesNames, MantineComponentStaticProperties } from '@mantine/core';
|
|
3
|
+
import { CalendarStylesNames } from '../Calendar';
|
|
2
4
|
import { DatePickerBaseProps } from '../DatePicker';
|
|
3
5
|
import { DatePickerType } from '../../types';
|
|
4
|
-
import { DateInputSharedProps
|
|
5
|
-
export type DatePickerInputStylesNames =
|
|
6
|
-
export interface DatePickerInputProps<Type extends DatePickerType = 'default'> extends DateInputSharedProps, DatePickerBaseProps<Type> {
|
|
6
|
+
import { DateInputSharedProps } from '../PickerInputBase';
|
|
7
|
+
export type DatePickerInputStylesNames = __InputStylesNames | CalendarStylesNames;
|
|
8
|
+
export interface DatePickerInputProps<Type extends DatePickerType = 'default'> extends BoxProps, DateInputSharedProps, DatePickerBaseProps<Type>, StylesApiProps<DatePickerInputFactory> {
|
|
7
9
|
/** Dayjs format to display input value, "MMMM D, YYYY" by default */
|
|
8
10
|
valueFormat?: string;
|
|
9
11
|
}
|
|
12
|
+
export type DatePickerInputFactory = Factory<{
|
|
13
|
+
props: DatePickerInputProps;
|
|
14
|
+
ref: HTMLButtonElement;
|
|
15
|
+
stylesNames: DatePickerInputStylesNames;
|
|
16
|
+
variant: InputVariant;
|
|
17
|
+
}>;
|
|
10
18
|
type DatePickerInputComponent = (<Type extends DatePickerType = 'default'>(props: DatePickerInputProps<Type>) => JSX.Element) & {
|
|
11
19
|
displayName?: string;
|
|
12
|
-
}
|
|
20
|
+
} & MantineComponentStaticProperties<DatePickerInputFactory>;
|
|
13
21
|
export declare const DatePickerInput: DatePickerInputComponent;
|
|
14
22
|
export {};
|
|
15
23
|
//# sourceMappingURL=DatePickerInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerInput.d.ts","sourceRoot":"","sources":["../../../src/components/DatePickerInput/DatePickerInput.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DatePickerInput.d.ts","sourceRoot":"","sources":["../../../src/components/DatePickerInput/DatePickerInput.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EACR,cAAc,EAId,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,gCAAgC,EACjC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAqB,MAAM,aAAa,CAAC;AAErE,OAAO,EAAc,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;AAElF,MAAM,WAAW,oBAAoB,CAAC,IAAI,SAAS,cAAc,GAAG,SAAS,CAC3E,SAAQ,QAAQ,EACd,oBAAoB,EACpB,mBAAmB,CAAC,IAAI,CAAC,EACzB,cAAc,CAAC,sBAAsB,CAAC;IACxC,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC;IAC3C,KAAK,EAAE,oBAAoB,CAAC;IAC5B,GAAG,EAAE,iBAAiB,CAAC;IACvB,WAAW,EAAE,0BAA0B,CAAC;IACxC,OAAO,EAAE,YAAY,CAAC;CACvB,CAAC,CAAC;AAWH,KAAK,wBAAwB,GAAG,CAAC,CAAC,IAAI,SAAS,cAAc,GAAG,SAAS,EACvE,KAAK,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAC9B,GAAG,CAAC,OAAO,CAAC,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,gCAAgC,CAAC,sBAAsB,CAAC,CAAC;AAE7D,eAAO,MAAM,eAAe,EAAE,wBA+FtB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { DatePickerInput } from './DatePickerInput';
|
|
2
|
-
export type { DatePickerInputProps, DatePickerInputStylesNames } from './DatePickerInput';
|
|
2
|
+
export type { DatePickerInputProps, DatePickerInputStylesNames, DatePickerInputFactory, } from './DatePickerInput';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatePickerInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatePickerInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BoxProps, StylesApiProps, Factory, InputVariant, ActionIconProps } from '@mantine/core';
|
|
3
3
|
import { TimeInputProps } from '../TimeInput';
|
|
4
|
-
import { CalendarBaseProps, CalendarSettings } from '../Calendar';
|
|
4
|
+
import { CalendarBaseProps, CalendarSettings, CalendarStylesNames } from '../Calendar';
|
|
5
5
|
import { DateInputSharedProps, PickerInputBaseStylesNames } from '../PickerInputBase';
|
|
6
6
|
import { DateValue } from '../../types';
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export interface DateTimePickerProps extends DefaultProps<DateTimePickerStylesNames>, Omit<DateInputSharedProps, 'classNames' | 'styles' | 'closeOnChange'>, Omit<CalendarBaseProps, 'defaultDate'>, Omit<CalendarSettings, 'onYearMouseEnter' | 'onMonthMouseEnter'> {
|
|
7
|
+
export type DateTimePickerStylesNames = 'timeWrapper' | 'timeInput' | 'submitButton' | PickerInputBaseStylesNames | CalendarStylesNames;
|
|
8
|
+
export interface DateTimePickerProps extends BoxProps, Omit<DateInputSharedProps, 'classNames' | 'styles' | 'closeOnChange' | 'size'>, Omit<CalendarBaseProps, 'defaultDate'>, Omit<CalendarSettings, 'onYearMouseEnter' | 'onMonthMouseEnter'>, StylesApiProps<DateTimePickerFactory> {
|
|
10
9
|
/** Dayjs format to display input value, "DD/MM/YYYY HH:mm" by default */
|
|
11
10
|
valueFormat?: string;
|
|
12
11
|
/** Controlled component value */
|
|
@@ -19,10 +18,21 @@ export interface DateTimePickerProps extends DefaultProps<DateTimePickerStylesNa
|
|
|
19
18
|
timeInputProps?: TimeInputProps & {
|
|
20
19
|
ref?: React.ComponentPropsWithRef<'input'>['ref'];
|
|
21
20
|
};
|
|
22
|
-
/** Props
|
|
21
|
+
/** Props passed down to the submit button */
|
|
23
22
|
submitButtonProps?: ActionIconProps & React.ComponentPropsWithoutRef<'button'>;
|
|
24
23
|
/** Determines whether seconds input should be rendered */
|
|
25
24
|
withSeconds?: boolean;
|
|
26
25
|
}
|
|
27
|
-
export
|
|
26
|
+
export type DateTimePickerFactory = Factory<{
|
|
27
|
+
props: DateTimePickerProps;
|
|
28
|
+
ref: HTMLButtonElement;
|
|
29
|
+
stylesNames: DateTimePickerStylesNames;
|
|
30
|
+
variant: InputVariant;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const DateTimePicker: import("@mantine/core").MantineComponent<{
|
|
33
|
+
props: DateTimePickerProps;
|
|
34
|
+
ref: HTMLButtonElement;
|
|
35
|
+
stylesNames: DateTimePickerStylesNames;
|
|
36
|
+
variant: InputVariant;
|
|
37
|
+
}>;
|
|
28
38
|
//# sourceMappingURL=DateTimePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/DateTimePicker.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/DateTimePicker.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,cAAc,EAId,OAAO,EACP,YAAY,EACZ,eAAe,EAIhB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAEL,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,MAAM,MAAM,yBAAyB,GACjC,aAAa,GACb,WAAW,GACX,cAAc,GACd,0BAA0B,GAC1B,mBAAmB,CAAC;AAExB,MAAM,WAAW,mBACf,SAAQ,QAAQ,EACd,IAAI,CAAC,oBAAoB,EAAE,YAAY,GAAG,QAAQ,GAAG,eAAe,GAAG,MAAM,CAAC,EAC9E,IAAI,CAAC,iBAAiB,EAAE,aAAa,CAAC,EACtC,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,mBAAmB,CAAC,EAChE,cAAc,CAAC,qBAAqB,CAAC;IACvC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,iCAAiC;IACjC,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB,gCAAgC;IAChC,QAAQ,CAAC,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IAElC,gCAAgC;IAChC,cAAc,CAAC,EAAE,cAAc,GAAG;QAAE,GAAG,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAA;KAAE,CAAC;IAExF,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,eAAe,GAAG,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IAE/E,0DAA0D;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC;IAC1C,KAAK,EAAE,mBAAmB,CAAC;IAC3B,GAAG,EAAE,iBAAiB,CAAC;IACvB,WAAW,EAAE,yBAAyB,CAAC;IACvC,OAAO,EAAE,YAAY,CAAC;CACvB,CAAC,CAAC;AAOH,eAAO,MAAM,cAAc;WAXlB,mBAAmB;SACrB,iBAAiB;iBACT,yBAAyB;aAC7B,YAAY;EAwMrB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { DateTimePicker } from './DateTimePicker';
|
|
2
|
-
export type { DateTimePickerProps, DateTimePickerStylesNames } from './DateTimePicker';
|
|
2
|
+
export type { DateTimePickerProps, DateTimePickerStylesNames, DateTimePickerFactory, } from './DateTimePicker';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC"}
|
|
@@ -13,5 +13,5 @@ export interface DatesProviderProps {
|
|
|
13
13
|
settings: DatesProviderSettings;
|
|
14
14
|
children: React.ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare function DatesProvider({ settings, children }: DatesProviderProps): JSX.Element;
|
|
16
|
+
export declare function DatesProvider({ settings, children }: DatesProviderProps): React.JSX.Element;
|
|
17
17
|
//# sourceMappingURL=DatesProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatesProvider.d.ts","sourceRoot":"","sources":["../../../src/components/DatesProvider/DatesProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,SAAS,CAAC;IAC1B,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEhE,eAAO,MAAM,+BAA+B,EAAE,kBAK7C,CAAC;AAEF,eAAO,MAAM,oBAA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