@mantine/dates 3.1.9 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/cjs/components/Calendar/Calendar.js +68 -39
- package/cjs/components/Calendar/Calendar.js.map +1 -1
- package/cjs/components/Calendar/CalendarHeader/CalendarHeader.js +24 -6
- package/cjs/components/Calendar/CalendarHeader/CalendarHeader.js.map +1 -1
- package/cjs/components/Calendar/CalendarLabel/CalendarLabel.js +4 -1
- package/cjs/components/Calendar/CalendarLabel/CalendarLabel.js.map +1 -1
- package/cjs/components/Calendar/CalendarWrapper/CalendarWrapper.js +5 -3
- package/cjs/components/Calendar/CalendarWrapper/CalendarWrapper.js.map +1 -1
- package/cjs/components/Calendar/get-disabled-state/get-disabled-state.js +2 -2
- package/cjs/components/Calendar/get-disabled-state/get-disabled-state.js.map +1 -1
- package/cjs/components/DatePicker/DatePicker.js +89 -17
- package/cjs/components/DatePicker/DatePicker.js.map +1 -1
- package/cjs/components/DatePickerBase/DatePickerBase.js +67 -24
- package/cjs/components/DatePickerBase/DatePickerBase.js.map +1 -1
- package/cjs/components/DatePickerBase/DatePickerBase.styles.js +5 -2
- package/cjs/components/DatePickerBase/DatePickerBase.styles.js.map +1 -1
- package/cjs/components/DateRangePicker/DateRangePicker.js +23 -9
- package/cjs/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/cjs/components/Month/Day/Day.styles.js +6 -6
- package/cjs/components/Month/Day/Day.styles.js.map +1 -1
- package/cjs/components/Month/Month.js +14 -6
- package/cjs/components/Month/Month.js.map +1 -1
- package/cjs/components/Month/Month.styles.js +1 -1
- package/cjs/components/Month/Month.styles.js.map +1 -1
- package/cjs/components/RangeCalendar/RangeCalendar.js +78 -49
- package/cjs/components/RangeCalendar/RangeCalendar.js.map +1 -1
- package/cjs/components/TimeInput/TimeInput.styles.js +3 -3
- package/cjs/components/TimeInput/TimeInput.styles.js.map +1 -1
- package/cjs/components/TimeRangeInput/TimeRangeInput.styles.js +5 -5
- package/cjs/components/TimeRangeInput/TimeRangeInput.styles.js.map +1 -1
- package/cjs/utils/get-end-of-week/get-end-of-week.js +5 -3
- package/cjs/utils/get-end-of-week/get-end-of-week.js.map +1 -1
- package/cjs/utils/get-month-days/get-month-days.js +3 -3
- package/cjs/utils/get-month-days/get-month-days.js.map +1 -1
- package/cjs/utils/get-start-of-week/get-start-of-week.js +5 -3
- package/cjs/utils/get-start-of-week/get-start-of-week.js.map +1 -1
- package/cjs/utils/get-weekdays-names/get-weekdays-names.js +2 -2
- package/cjs/utils/get-weekdays-names/get-weekdays-names.js.map +1 -1
- package/esm/components/Calendar/Calendar.js +68 -39
- package/esm/components/Calendar/Calendar.js.map +1 -1
- package/esm/components/Calendar/CalendarHeader/CalendarHeader.js +25 -7
- package/esm/components/Calendar/CalendarHeader/CalendarHeader.js.map +1 -1
- package/esm/components/Calendar/CalendarLabel/CalendarLabel.js +4 -1
- package/esm/components/Calendar/CalendarLabel/CalendarLabel.js.map +1 -1
- package/esm/components/Calendar/CalendarWrapper/CalendarWrapper.js +6 -4
- package/esm/components/Calendar/CalendarWrapper/CalendarWrapper.js.map +1 -1
- package/esm/components/Calendar/get-disabled-state/get-disabled-state.js +2 -2
- package/esm/components/Calendar/get-disabled-state/get-disabled-state.js.map +1 -1
- package/esm/components/DatePicker/DatePicker.js +89 -17
- package/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/esm/components/DatePickerBase/DatePickerBase.js +68 -25
- package/esm/components/DatePickerBase/DatePickerBase.js.map +1 -1
- package/esm/components/DatePickerBase/DatePickerBase.styles.js +6 -3
- package/esm/components/DatePickerBase/DatePickerBase.styles.js.map +1 -1
- package/esm/components/DateRangePicker/DateRangePicker.js +22 -8
- package/esm/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/esm/components/Month/Day/Day.styles.js +7 -7
- package/esm/components/Month/Day/Day.styles.js.map +1 -1
- package/esm/components/Month/Month.js +14 -6
- package/esm/components/Month/Month.js.map +1 -1
- package/esm/components/Month/Month.styles.js +2 -2
- package/esm/components/Month/Month.styles.js.map +1 -1
- package/esm/components/RangeCalendar/RangeCalendar.js +79 -50
- package/esm/components/RangeCalendar/RangeCalendar.js.map +1 -1
- package/esm/components/TimeInput/TimeInput.styles.js +4 -4
- package/esm/components/TimeInput/TimeInput.styles.js.map +1 -1
- package/esm/components/TimeRangeInput/TimeRangeInput.styles.js +6 -6
- package/esm/components/TimeRangeInput/TimeRangeInput.styles.js.map +1 -1
- package/esm/utils/get-end-of-week/get-end-of-week.js +5 -3
- package/esm/utils/get-end-of-week/get-end-of-week.js.map +1 -1
- package/esm/utils/get-month-days/get-month-days.js +3 -3
- package/esm/utils/get-month-days/get-month-days.js.map +1 -1
- package/esm/utils/get-start-of-week/get-start-of-week.js +5 -3
- package/esm/utils/get-start-of-week/get-start-of-week.js.map +1 -1
- package/esm/utils/get-weekdays-names/get-weekdays-names.js +2 -2
- package/esm/utils/get-weekdays-names/get-weekdays-names.js.map +1 -1
- package/lib/components/Calendar/Calendar.d.ts +5 -0
- package/lib/components/Calendar/Calendar.d.ts.map +1 -1
- package/lib/components/Calendar/CalendarHeader/CalendarHeader.d.ts +3 -1
- package/lib/components/Calendar/CalendarHeader/CalendarHeader.d.ts.map +1 -1
- package/lib/components/Calendar/CalendarLabel/CalendarLabel.d.ts +2 -1
- package/lib/components/Calendar/CalendarLabel/CalendarLabel.d.ts.map +1 -1
- package/lib/components/Calendar/CalendarLabel/CalendarLabel.styles.d.ts +1 -0
- package/lib/components/Calendar/CalendarLabel/CalendarLabel.styles.d.ts.map +1 -1
- package/lib/components/Calendar/CalendarWrapper/CalendarWrapper.d.ts +1 -0
- package/lib/components/Calendar/CalendarWrapper/CalendarWrapper.d.ts.map +1 -1
- package/lib/components/Calendar/get-disabled-state/get-disabled-state.d.ts +3 -1
- package/lib/components/Calendar/get-disabled-state/get-disabled-state.d.ts.map +1 -1
- package/lib/components/DatePicker/DatePicker.d.ts +8 -1
- package/lib/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/lib/components/DatePickerBase/DatePickerBase.d.ts +7 -3
- package/lib/components/DatePickerBase/DatePickerBase.d.ts.map +1 -1
- package/lib/components/DatePickerBase/DatePickerBase.styles.d.ts +3 -2
- package/lib/components/DatePickerBase/DatePickerBase.styles.d.ts.map +1 -1
- package/lib/components/DateRangePicker/DateRangePicker.d.ts +5 -0
- package/lib/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/lib/components/Month/Day/Day.styles.d.ts +1 -0
- package/lib/components/Month/Day/Day.styles.d.ts.map +1 -1
- package/lib/components/Month/Month.d.ts +8 -1
- package/lib/components/Month/Month.d.ts.map +1 -1
- package/lib/components/Month/Month.styles.d.ts +1 -0
- package/lib/components/Month/Month.styles.d.ts.map +1 -1
- package/lib/components/RangeCalendar/RangeCalendar.d.ts +3 -0
- package/lib/components/RangeCalendar/RangeCalendar.d.ts.map +1 -1
- package/lib/components/TimeInput/TimeInput.styles.d.ts +1 -0
- package/lib/components/TimeInput/TimeInput.styles.d.ts.map +1 -1
- package/lib/components/TimeRangeInput/TimeRangeInput.styles.d.ts +3 -2
- package/lib/components/TimeRangeInput/TimeRangeInput.styles.d.ts.map +1 -1
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/utils/get-end-of-week/get-end-of-week.d.ts +2 -1
- package/lib/utils/get-end-of-week/get-end-of-week.d.ts.map +1 -1
- package/lib/utils/get-month-days/get-month-days.d.ts +2 -1
- package/lib/utils/get-month-days/get-month-days.d.ts.map +1 -1
- package/lib/utils/get-start-of-week/get-start-of-week.d.ts +2 -1
- package/lib/utils/get-start-of-week/get-start-of-week.d.ts.map +1 -1
- package/lib/utils/get-weekdays-names/get-weekdays-names.d.ts +2 -1
- package/lib/utils/get-weekdays-names/get-weekdays-names.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-weekdays-names.js","sources":["../../../src/utils/get-weekdays-names/get-weekdays-names.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week';\n\nexport function getWeekdaysNames(locale: string) {\n const names: string[] = [];\n const date = getStartOfWeek(new Date());\n\n for (let i = 0; i < 7; i += 1) {\n names.push(dayjs(date).locale(locale).format('dd'));\n date.setDate(date.getDate() + 1);\n }\n\n return names;\n}\n"],"names":[],"mappings":";;;AAEO,SAAS,gBAAgB,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"get-weekdays-names.js","sources":["../../../src/utils/get-weekdays-names/get-weekdays-names.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport { FirstDayOfWeek } from '../../types';\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week';\n\nexport function getWeekdaysNames(locale: string, firstDayOfWeek: FirstDayOfWeek = 'monday') {\n const names: string[] = [];\n const date = getStartOfWeek(new Date(), firstDayOfWeek);\n\n for (let i = 0; i < 7; i += 1) {\n names.push(dayjs(date).locale(locale).format('dd'));\n date.setDate(date.getDate() + 1);\n }\n\n return names;\n}\n"],"names":[],"mappings":";;;AAEO,SAAS,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,QAAQ,EAAE;AACpE,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;AACnB,EAAE,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,IAAI,EAAE,EAAE,cAAc,CAAC,CAAC;AAC1D,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;AACjC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACxD,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;AACrC,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DefaultProps } from '@mantine/core';
|
|
3
|
+
import { FirstDayOfWeek } from '../../types';
|
|
3
4
|
import { MonthSettings, MonthStylesNames } from '../Month/Month';
|
|
4
5
|
import { CalendarLabelStylesNames } from './CalendarLabel/CalendarLabel';
|
|
5
6
|
export interface CalendarSettings extends MonthSettings {
|
|
@@ -24,6 +25,10 @@ export interface CalendarSettings extends MonthSettings {
|
|
|
24
25
|
from: number;
|
|
25
26
|
to: number;
|
|
26
27
|
};
|
|
28
|
+
/** Set first day of the week */
|
|
29
|
+
firstDayOfWeek?: FirstDayOfWeek;
|
|
30
|
+
/** Amount of displayed months */
|
|
31
|
+
amountOfMonths?: number;
|
|
27
32
|
}
|
|
28
33
|
export declare type CalendarStylesNames = Exclude<MonthStylesNames, 'root'> | CalendarLabelStylesNames;
|
|
29
34
|
export interface CalendarProps extends DefaultProps<CalendarStylesNames>, CalendarSettings, Omit<React.ComponentPropsWithoutRef<'div'>, 'value' | 'onChange'> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAS,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAS,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAKzE,MAAM,WAA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AED,eAAO,MAAM,QAAQ,sFA2HpB,CAAC"}
|
|
@@ -22,8 +22,10 @@ interface CalendarHeaderProps extends DefaultProps {
|
|
|
22
22
|
__staticSelector: string;
|
|
23
23
|
monthLabel?: string;
|
|
24
24
|
yearLabel?: string;
|
|
25
|
+
preventFocus?: boolean;
|
|
26
|
+
hiddenMonth?: 'next' | 'prev' | 'both';
|
|
25
27
|
}
|
|
26
|
-
export declare function CalendarHeader({ size, nextMonthLabel, previousMonthLabel, previousMonthDisabled, nextMonthDisabled, onPreviousMonth, onNextMonth, classNames, styles, locale, withSelect, yearsRange, month, setMonth, labelFormat, __staticSelector, monthLabel, yearLabel, }: CalendarHeaderProps): JSX.Element;
|
|
28
|
+
export declare function CalendarHeader({ size, nextMonthLabel, previousMonthLabel, previousMonthDisabled, nextMonthDisabled, onPreviousMonth, onNextMonth, classNames, styles, locale, withSelect, yearsRange, month, setMonth, labelFormat, __staticSelector, monthLabel, yearLabel, preventFocus, hiddenMonth, }: CalendarHeaderProps): JSX.Element;
|
|
27
29
|
export declare namespace CalendarHeader {
|
|
28
30
|
var displayName: string;
|
|
29
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/CalendarHeader/CalendarHeader.tsx"],"names":[],"mappings":";AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"CalendarHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/CalendarHeader/CalendarHeader.tsx"],"names":[],"mappings":";AACA,OAAO,EAAqB,YAAY,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAa9F,UAAU,mBAAoB,SAAQ,YAAY;IAChD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,IAAI,IAAI,CAAC;IACxB,WAAW,IAAI,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACxC;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,UAAU,EACV,MAAM,EACN,MAAM,EACN,UAAU,EACV,UAAU,EACV,KAAK,EACL,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,YAAoB,EACpB,WAAW,GACZ,EAAE,mBAAmB,eA2DrB;yBAhFe,cAAc"}
|
|
@@ -16,8 +16,9 @@ interface CalendarLabelProps extends DefaultProps<CalendarLabelStylesNames> {
|
|
|
16
16
|
size: MantineSize;
|
|
17
17
|
monthLabel?: string;
|
|
18
18
|
yearLabel?: string;
|
|
19
|
+
preventFocus?: boolean;
|
|
19
20
|
}
|
|
20
|
-
export declare function CalendarLabel({ locale, classNames, styles, withSelect, yearsRange, value, labelFormat, onChange, size, __staticSelector, monthLabel, yearLabel, }: CalendarLabelProps): JSX.Element;
|
|
21
|
+
export declare function CalendarLabel({ locale, classNames, styles, withSelect, yearsRange, value, labelFormat, onChange, size, __staticSelector, monthLabel, yearLabel, preventFocus, }: CalendarLabelProps): JSX.Element;
|
|
21
22
|
export declare namespace CalendarLabel {
|
|
22
23
|
var displayName: string;
|
|
23
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/CalendarLabel/CalendarLabel.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAA6B,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGjG,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,oBAAY,wBAAwB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAEpE,UAAU,kBAAmB,SAAQ,YAAY,CAAC,wBAAwB,CAAC;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"CalendarLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/CalendarLabel/CalendarLabel.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAA6B,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGjG,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,oBAAY,wBAAwB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAEpE,UAAU,kBAAmB,SAAQ,YAAY,CAAC,wBAAwB,CAAC;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,UAAU,EACV,MAAM,EACN,UAAU,EACV,UAAU,EACV,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,YAAY,GACb,EAAE,kBAAkB,eAyCpB;yBAvDe,aAAa"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: (params: void, options?: import("@mantine/styles/lib/tss/create-styles").UseStylesOptions<"calendarSelectGroup" | "calendarSelect" | "calendarLabel">) => {
|
|
2
2
|
classes: Record<"calendarSelectGroup" | "calendarSelect" | "calendarLabel", string>;
|
|
3
3
|
cx: (...args: any) => string;
|
|
4
|
+
theme: import("@mantine/core").MantineTheme;
|
|
4
5
|
};
|
|
5
6
|
export default _default;
|
|
6
7
|
//# sourceMappingURL=CalendarLabel.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarLabel.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/CalendarLabel/CalendarLabel.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CalendarLabel.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/CalendarLabel/CalendarLabel.styles.ts"],"names":[],"mappings":";;;;;AAEA,wBAIG"}
|
|
@@ -3,6 +3,7 @@ import { MantineSize, DefaultProps } from '@mantine/core';
|
|
|
3
3
|
interface CalendarWrapperProps extends DefaultProps, React.ComponentPropsWithoutRef<'div'> {
|
|
4
4
|
size: MantineSize;
|
|
5
5
|
fullWidth: boolean;
|
|
6
|
+
amountOfMonths?: number;
|
|
6
7
|
}
|
|
7
8
|
export declare const CalendarWrapper: React.ForwardRefExoticComponent<CalendarWrapperProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/CalendarWrapper/CalendarWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"CalendarWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/CalendarWrapper/CalendarWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,WAAW,EAA8B,YAAY,EAAE,MAAM,eAAe,CAAC;AAGtF,UAAU,oBAAqB,SAAQ,YAAY,EAAE,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACxF,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,6FAuB3B,CAAC"}
|
|
@@ -4,8 +4,10 @@ interface GetDisabledState {
|
|
|
4
4
|
/** Min and max possible dates */
|
|
5
5
|
minDate: Date;
|
|
6
6
|
maxDate: Date;
|
|
7
|
+
/** Amount of rendered months */
|
|
8
|
+
amountOfMonths?: number;
|
|
7
9
|
}
|
|
8
|
-
export declare function getDisabledState({ maxDate, minDate, month }: GetDisabledState): {
|
|
10
|
+
export declare function getDisabledState({ maxDate, minDate, month, amountOfMonths }: GetDisabledState): {
|
|
9
11
|
nextDisabled: boolean;
|
|
10
12
|
previousDisabled: boolean;
|
|
11
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-disabled-state.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/get-disabled-state/get-disabled-state.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,6BAA6B;IAC7B,KAAK,EAAE,IAAI,CAAC;IAEZ,iCAAiC;IACjC,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"get-disabled-state.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/get-disabled-state/get-disabled-state.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,6BAA6B;IAC7B,KAAK,EAAE,IAAI,CAAC;IAEZ,iCAAiC;IACjC,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IAEd,gCAAgC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,gBAAgB;;;EAY7F"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { FirstDayOfWeek } from '../../types';
|
|
2
3
|
import { CalendarSettings } from '../Calendar/Calendar';
|
|
3
4
|
import { DatePickerBaseSharedProps } from '../DatePickerBase/DatePickerBase';
|
|
4
|
-
export interface DatePickerProps extends DatePickerBaseSharedProps, Omit<CalendarSettings, 'size'> {
|
|
5
|
+
export interface DatePickerProps extends Omit<DatePickerBaseSharedProps, 'onChange'>, Omit<CalendarSettings, 'size'> {
|
|
5
6
|
/** Selected date, required with controlled input */
|
|
6
7
|
value?: Date;
|
|
7
8
|
/** Called when date changes */
|
|
@@ -14,8 +15,14 @@ export interface DatePickerProps extends DatePickerBaseSharedProps, Omit<Calenda
|
|
|
14
15
|
inputFormat?: string;
|
|
15
16
|
/** Control initial dropdown opened state */
|
|
16
17
|
initiallyOpened?: boolean;
|
|
18
|
+
/** Parser function for date provided by input typing */
|
|
19
|
+
dateParser?: (value: string) => Date;
|
|
17
20
|
/** Input name, useful for uncontrolled variant to capture data with native form */
|
|
18
21
|
name?: string;
|
|
22
|
+
/** Set first day of the week */
|
|
23
|
+
firstDayOfWeek?: FirstDayOfWeek;
|
|
24
|
+
/** Allow free input */
|
|
25
|
+
allowFreeInput?: boolean;
|
|
19
26
|
}
|
|
20
27
|
export declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
21
28
|
//# 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,KAAkD,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAY,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAkB,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7F,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC,EACjD,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAChC,oDAAoD;IACpD,KAAK,CAAC,EAAE,IAAI,CAAC;IAEb,+BAA+B;IAC/B,QAAQ,CAAC,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEpC,2CAA2C;IAC3C,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAE3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,4CAA4C;IAC5C,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,wDAAwD;IACxD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC,mFAAmF;IACnF,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,gCAAgC;IAChC,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,uBAAuB;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,UAAU,2FAoLtB,CAAC"}
|
|
@@ -3,11 +3,11 @@ import { DefaultProps, InputBaseProps, InputWrapperBaseProps, MantineTransition,
|
|
|
3
3
|
import { CalendarStylesNames } from '../Calendar/Calendar';
|
|
4
4
|
import useStyles from './DatePickerBase.styles';
|
|
5
5
|
export declare type DatePickerStylesNames = ClassNames<typeof useStyles> | CalendarStylesNames | InputStylesNames | InputWrapperStylesNames;
|
|
6
|
-
export interface DatePickerBaseSharedProps extends InputBaseProps, InputWrapperBaseProps, DefaultProps<DatePickerStylesNames>, Omit<React.ComponentPropsWithoutRef<'
|
|
6
|
+
export interface DatePickerBaseSharedProps extends InputBaseProps, InputWrapperBaseProps, DefaultProps<DatePickerStylesNames>, Omit<React.ComponentPropsWithoutRef<'input'>, 'value' | 'defaultValue' | 'placeholder' | 'size'> {
|
|
7
7
|
/** Props spread to root element (InputWrapper) */
|
|
8
8
|
wrapperProps?: React.ComponentPropsWithoutRef<'div'>;
|
|
9
9
|
/** Placeholder, displayed when date is not selected */
|
|
10
|
-
placeholder?:
|
|
10
|
+
placeholder?: string;
|
|
11
11
|
/** Dropdown appear/disappear transition */
|
|
12
12
|
transition?: MantineTransition;
|
|
13
13
|
/** Dropdown appear/disappear transition duration */
|
|
@@ -32,6 +32,8 @@ export interface DatePickerBaseSharedProps extends InputBaseProps, InputWrapperB
|
|
|
32
32
|
positionDependencies?: any[];
|
|
33
33
|
/** Popper zIndex */
|
|
34
34
|
zIndex?: number;
|
|
35
|
+
/** call onChange with last valid value onBlur */
|
|
36
|
+
fixOnBlur?: boolean;
|
|
35
37
|
}
|
|
36
38
|
export interface DatePickerBaseProps extends DatePickerBaseSharedProps {
|
|
37
39
|
/** Internal prop to set input label */
|
|
@@ -44,6 +46,8 @@ export interface DatePickerBaseProps extends DatePickerBaseSharedProps {
|
|
|
44
46
|
setDropdownOpened(opened: boolean): void;
|
|
45
47
|
/** Called when clear button in clicked */
|
|
46
48
|
onClear(): void;
|
|
49
|
+
/** Allow free input */
|
|
50
|
+
allowFreeInput?: boolean;
|
|
47
51
|
}
|
|
48
|
-
export declare const DatePickerBase: React.ForwardRefExoticComponent<DatePickerBaseProps & React.RefAttributes<
|
|
52
|
+
export declare const DatePickerBase: React.ForwardRefExoticComponent<DatePickerBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
49
53
|
//# sourceMappingURL=DatePickerBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerBase.d.ts","sourceRoot":"","sources":["../../../src/components/DatePickerBase/DatePickerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EACL,YAAY,
|
|
1
|
+
{"version":3,"file":"DatePickerBase.d.ts","sourceRoot":"","sources":["../../../src/components/DatePickerBase/DatePickerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EACL,YAAY,EAGZ,cAAc,EACd,qBAAqB,EAGrB,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,EAGX,aAAa,EACb,UAAU,EAEX,MAAM,eAAe,CAAC;AAQvB,OAAO,EAAE,mBAAmB,EAAE,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B,SAAQ,yBAAyB;IACpE,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,qCAAqC;IACrC,cAAc,EAAE,OAAO,CAAC;IAExB,gDAAgD;IAChD,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAEzC,0CAA0C;IAC1C,OAAO,IAAI,IAAI,CAAC;IAEhB,uBAAuB;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAUD,eAAO,MAAM,cAAc,8FAmM1B,CAAC"}
|
|
@@ -3,9 +3,10 @@ interface DatePickerBaseStyles {
|
|
|
3
3
|
size: MantineSize;
|
|
4
4
|
invalid: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: (params: DatePickerBaseStyles, options?: import("@mantine/styles/lib/tss/create-styles").UseStylesOptions<"input" | "value" | "placeholder" | "wrapper" | "dropdownWrapper" | "dropdown" | "arrow">) => {
|
|
7
|
-
classes: Record<"input" | "value" | "placeholder" | "wrapper" | "dropdownWrapper" | "dropdown" | "arrow", string>;
|
|
6
|
+
declare const _default: (params: DatePickerBaseStyles, options?: import("@mantine/styles/lib/tss/create-styles").UseStylesOptions<"input" | "value" | "placeholder" | "wrapper" | "dropdownWrapper" | "freeInput" | "dropdown" | "arrow">) => {
|
|
7
|
+
classes: Record<"input" | "value" | "placeholder" | "wrapper" | "dropdownWrapper" | "freeInput" | "dropdown" | "arrow", string>;
|
|
8
8
|
cx: (...args: any) => string;
|
|
9
|
+
theme: import("@mantine/core").MantineTheme;
|
|
9
10
|
};
|
|
10
11
|
export default _default;
|
|
11
12
|
//# sourceMappingURL=DatePickerBase.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerBase.styles.d.ts","sourceRoot":"","sources":["../../../src/components/DatePickerBase/DatePickerBase.styles.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DatePickerBase.styles.d.ts","sourceRoot":"","sources":["../../../src/components/DatePickerBase/DatePickerBase.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAe,MAAM,eAAe,CAAC;AAEvE,UAAU,oBAAoB;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB;;;;;;AAED,wBAmDI"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { FirstDayOfWeek } from '../../types';
|
|
2
3
|
import { CalendarSettings } from '../Calendar/Calendar';
|
|
3
4
|
import { DatePickerBaseSharedProps } from '../DatePickerBase/DatePickerBase';
|
|
4
5
|
export interface DateRangePickerProps extends DatePickerBaseSharedProps, Omit<CalendarSettings, 'size'> {
|
|
@@ -18,8 +19,12 @@ export interface DateRangePickerProps extends DatePickerBaseSharedProps, Omit<Ca
|
|
|
18
19
|
name?: string;
|
|
19
20
|
/** Separator between dates */
|
|
20
21
|
labelSeparator?: string;
|
|
22
|
+
/** Set first day of the week */
|
|
23
|
+
firstDayOfWeek?: FirstDayOfWeek;
|
|
21
24
|
/** Allow one date to be selected as range */
|
|
22
25
|
allowSingleDateInRange?: boolean;
|
|
26
|
+
/** Allows to show multiple months */
|
|
27
|
+
amountOfMonths?: number;
|
|
23
28
|
}
|
|
24
29
|
export declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
25
30
|
//# sourceMappingURL=DateRangePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAkB,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAG7F,MAAM,WAAW,oBACf,SAAQ,yBAAyB,EAC/B,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAChC,oDAAoD;IACpD,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAErB,qCAAqC;IACrC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAEnD,2CAA2C;IAC3C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAE5B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,4CAA4C;IAC5C,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,mFAAmF;IACnF,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,8BAA8B;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,gCAAgC;IAChC,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,6CAA6C;IAC7C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,qCAAqC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAKD,eAAO,MAAM,eAAe,gGAuI3B,CAAC"}
|
|
@@ -13,6 +13,7 @@ export declare const sizes: {
|
|
|
13
13
|
declare const _default: (params: DayStyles, options?: import("@mantine/styles/lib/tss/create-styles").UseStylesOptions<"weekend" | "outside" | "selected" | "inRange" | "firstInRange" | "lastInRange" | "day">) => {
|
|
14
14
|
classes: Record<"weekend" | "outside" | "selected" | "inRange" | "firstInRange" | "lastInRange" | "day", string>;
|
|
15
15
|
cx: (...args: any) => string;
|
|
16
|
+
theme: import("@mantine/core").MantineTheme;
|
|
16
17
|
};
|
|
17
18
|
export default _default;
|
|
18
19
|
//# sourceMappingURL=Day.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Day.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Month/Day/Day.styles.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Day.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Month/Day/Day.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,MAAM,eAAe,CAAC;AAE1D,UAAU,SAAS;IACjB,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,KAAK;;;;;;CAMjB,CAAC;;;;;;AAEF,wBA4EG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DefaultProps, MantineSize, ClassNames } from '@mantine/core';
|
|
3
|
+
import { FirstDayOfWeek } from '../../types';
|
|
3
4
|
import { DayStylesNames } from './Day/Day';
|
|
4
5
|
import { DayModifiers } from './get-day-props/get-day-props';
|
|
5
6
|
import useStyles from './Month.styles';
|
|
@@ -8,6 +9,8 @@ export interface MonthSettings {
|
|
|
8
9
|
dayClassName?(date: Date, modifiers: DayModifiers): string;
|
|
9
10
|
/** Adds style to day button based on date and modifiers */
|
|
10
11
|
dayStyle?(date: Date, modifiers: DayModifiers): React.CSSProperties;
|
|
12
|
+
/** When true dates that are outside of given month are not styled */
|
|
13
|
+
disableOutsideDayStyle?: boolean;
|
|
11
14
|
/** When true dates that are outside of given month cannot be clicked or focused */
|
|
12
15
|
disableOutsideEvents?: boolean;
|
|
13
16
|
/** Minimum possible date */
|
|
@@ -22,6 +25,8 @@ export interface MonthSettings {
|
|
|
22
25
|
size?: MantineSize;
|
|
23
26
|
/** Set to true to make calendar take 100% of container width */
|
|
24
27
|
fullWidth?: boolean;
|
|
28
|
+
/** Prevent focusing upon clicking */
|
|
29
|
+
preventFocus?: boolean;
|
|
25
30
|
}
|
|
26
31
|
export declare type MonthStylesNames = ClassNames<typeof useStyles> | DayStylesNames;
|
|
27
32
|
export interface MonthProps extends DefaultProps<MonthStylesNames>, MonthSettings, Omit<React.ComponentPropsWithoutRef<'table'>, 'onChange' | 'value'> {
|
|
@@ -41,8 +46,10 @@ export interface MonthProps extends DefaultProps<MonthStylesNames>, MonthSetting
|
|
|
41
46
|
__staticSelector?: string;
|
|
42
47
|
/** Called when onMouseEnter event fired on day button */
|
|
43
48
|
onDayMouseEnter?(date: Date, event: React.MouseEvent): void;
|
|
49
|
+
/** Set first day of the week */
|
|
50
|
+
firstDayOfWeek?: FirstDayOfWeek;
|
|
44
51
|
}
|
|
45
|
-
export declare function Month({ className, style, month, value, onChange, autoFocus, disableOutsideEvents, locale, dayClassName, dayStyle, classNames, styles, minDate, maxDate, excludeDate, onDayMouseEnter, range, hideWeekdays, __staticSelector, size, fullWidth, sx, ...others }: MonthProps): JSX.Element;
|
|
52
|
+
export declare function Month({ className, style, month, value, onChange, autoFocus, disableOutsideEvents, locale, dayClassName, dayStyle, disableOutsideDayStyle, classNames, styles, minDate, maxDate, excludeDate, onDayMouseEnter, range, hideWeekdays, __staticSelector, size, fullWidth, preventFocus, sx, firstDayOfWeek, ...others }: MonthProps): JSX.Element;
|
|
46
53
|
export declare namespace Month {
|
|
47
54
|
var displayName: string;
|
|
48
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Month.d.ts","sourceRoot":"","sources":["../../../src/components/Month/Month.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAAQ,WAAW,EAAE,UAAU,EAAuB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Month.d.ts","sourceRoot":"","sources":["../../../src/components/Month/Month.ts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C,wBAAwB,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACrE,0CAA0C;IAC1C,KAAK,EAAE,IAAI,CAAC;IAEZ,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,oBAAoB;IACpB,KAAK,CAAC,EAAE,IAAI,CAAC;IAEb,qBAAqB;IACrB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAErB,uGAAuG;IACvG,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,kCAAkC;IAClC,QAAQ,CAAC,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IAE7B,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,yDAAyD;IACzD,eAAe,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;IAE5D,gCAAgC;IAChC,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAID,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,KAAK,EACL,KAAK,EACL,KAAK,EACL,QAAQ,EACR,SAAiB,EACjB,oBAA4B,EAC5B,MAAa,EACb,YAAY,EACZ,QAAQ,EACR,sBAA8B,EAC9B,UAAU,EACV,MAAM,EACN,OAAO,EACP,OAAO,EACP,WAAW,EACX,eAAe,EACf,KAAK,EACL,YAAoB,EACpB,gBAA0B,EAC1B,IAAW,EACX,SAAiB,EACjB,YAAoB,EACpB,EAAE,EACF,cAAyB,EACzB,GAAG,MAAM,EACV,EAAE,UAAU,eAqIZ;yBAhKe,KAAK"}
|
|
@@ -4,6 +4,7 @@ interface MonthStyles {
|
|
|
4
4
|
declare const _default: (params: MonthStyles, options?: import("@mantine/styles/lib/tss/create-styles").UseStylesOptions<"cell" | "weekday" | "root" | "weekdayCell">) => {
|
|
5
5
|
classes: Record<"cell" | "weekday" | "root" | "weekdayCell", string>;
|
|
6
6
|
cx: (...args: any) => string;
|
|
7
|
+
theme: import("@mantine/core").MantineTheme;
|
|
7
8
|
};
|
|
8
9
|
export default _default;
|
|
9
10
|
//# sourceMappingURL=Month.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Month.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Month/Month.styles.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB
|
|
1
|
+
{"version":3,"file":"Month.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Month/Month.styles.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB;;;;;;AAED,wBA2BI"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DefaultProps } from '@mantine/core';
|
|
3
|
+
import { FirstDayOfWeek } from '../../types';
|
|
3
4
|
import { CalendarSettings, CalendarStylesNames } from '../Calendar/Calendar';
|
|
4
5
|
export interface RangeCalendarProps extends DefaultProps<CalendarStylesNames>, CalendarSettings, Omit<React.ComponentPropsWithoutRef<'div'>, 'value' | 'onChange'> {
|
|
5
6
|
/** Current month */
|
|
@@ -12,6 +13,8 @@ export interface RangeCalendarProps extends DefaultProps<CalendarStylesNames>, C
|
|
|
12
13
|
onMonthChange?(value: Date): void;
|
|
13
14
|
/** Static css selector base */
|
|
14
15
|
__staticSelector?: string;
|
|
16
|
+
/** Set first day of the week */
|
|
17
|
+
firstDayOfWeek?: FirstDayOfWeek;
|
|
15
18
|
/** Allow one date to be selected as range */
|
|
16
19
|
allowSingleDateInRange?: boolean;
|
|
17
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeCalendar.d.ts","sourceRoot":"","sources":["../../../src/components/RangeCalendar/RangeCalendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"RangeCalendar.d.ts","sourceRoot":"","sources":["../../../src/components/RangeCalendar/RangeCalendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,YAAY,EAA0B,MAAM,eAAe,CAAC;AAIrE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAM7C,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE7E,MAAM,WAAW,kBACf,SAAQ,YAAY,CAAC,mBAAmB,CAAC,EACvC,gBAAgB,EAChB,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACnE,oBAAoB;IACpB,KAAK,CAAC,EAAE,IAAI,CAAC;IAEb,qBAAqB;IACrB,KAAK,EAAE,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC;IAElC,wCAAwC;IACxC,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC;IAEpC,gCAAgC;IAChC,aAAa,CAAC,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IAElC,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,gCAAgC;IAChC,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,6CAA6C;IAC7C,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,aAAa,2FAyLzB,CAAC"}
|
|
@@ -12,6 +12,7 @@ export declare const inputSizes: {
|
|
|
12
12
|
declare const _default: (params: TimeInputStyles, options?: import("@mantine/styles/lib/tss/create-styles").UseStylesOptions<"disabled" | "controls" | "timeInput">) => {
|
|
13
13
|
classes: Record<"disabled" | "controls" | "timeInput", string>;
|
|
14
14
|
cx: (...args: any) => string;
|
|
15
|
+
theme: import("@mantine/core").MantineTheme;
|
|
15
16
|
};
|
|
16
17
|
export default _default;
|
|
17
18
|
//# sourceMappingURL=TimeInput.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeInput.styles.d.ts","sourceRoot":"","sources":["../../../src/components/TimeInput/TimeInput.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,
|
|
1
|
+
{"version":3,"file":"TimeInput.styles.d.ts","sourceRoot":"","sources":["../../../src/components/TimeInput/TimeInput.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,EAAE,MAAM,eAAe,CAAC;AAEvE,UAAU,eAAe;IACvB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;;;;;;AAEF,wBA8BI"}
|
|
@@ -2,9 +2,10 @@ import { MantineSize } from '@mantine/core';
|
|
|
2
2
|
interface TimeRangeInputStyles {
|
|
3
3
|
size: MantineSize;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: (params: TimeRangeInputStyles, options?: import("@mantine/styles/lib/tss/create-styles").UseStylesOptions<"
|
|
6
|
-
classes: Record<"
|
|
5
|
+
declare const _default: (params: TimeRangeInputStyles, options?: import("@mantine/styles/lib/tss/create-styles").UseStylesOptions<"separator" | "disabled" | "inputWrapper" | "timeField">) => {
|
|
6
|
+
classes: Record<"separator" | "disabled" | "inputWrapper" | "timeField", string>;
|
|
7
7
|
cx: (...args: any) => string;
|
|
8
|
+
theme: import("@mantine/core").MantineTheme;
|
|
8
9
|
};
|
|
9
10
|
export default _default;
|
|
10
11
|
//# sourceMappingURL=TimeRangeInput.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeRangeInput.styles.d.ts","sourceRoot":"","sources":["../../../src/components/TimeRangeInput/TimeRangeInput.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,
|
|
1
|
+
{"version":3,"file":"TimeRangeInput.styles.d.ts","sourceRoot":"","sources":["../../../src/components/TimeRangeInput/TimeRangeInput.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,EAAE,MAAM,eAAe,CAAC;AAIvE,UAAU,oBAAoB;IAC5B,IAAI,EAAE,WAAW,CAAC;CACnB;;;;;;AAED,wBAqCI"}
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-end-of-week.d.ts","sourceRoot":"","sources":["../../../src/utils/get-end-of-week/get-end-of-week.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"get-end-of-week.d.ts","sourceRoot":"","sources":["../../../src/utils/get-end-of-week/get-end-of-week.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,cAAc,GAAE,cAAyB,QAYjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-month-days.d.ts","sourceRoot":"","sources":["../../../src/utils/get-month-days/get-month-days.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-month-days.d.ts","sourceRoot":"","sources":["../../../src/utils/get-month-days/get-month-days.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7C,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,cAAc,GAAE,cAAyB,GAAG,IAAI,EAAE,EAAE,CAoB7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-start-of-week.d.ts","sourceRoot":"","sources":["../../../src/utils/get-start-of-week/get-start-of-week.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"get-start-of-week.d.ts","sourceRoot":"","sources":["../../../src/utils/get-start-of-week/get-start-of-week.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,cAAc,GAAE,cAAyB,QAYnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-weekdays-names.d.ts","sourceRoot":"","sources":["../../../src/utils/get-weekdays-names/get-weekdays-names.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-weekdays-names.d.ts","sourceRoot":"","sources":["../../../src/utils/get-weekdays-names/get-weekdays-names.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,GAAE,cAAyB,YAUzF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/dates",
|
|
3
3
|
"description": "Calendars, date and time pickers based on Mantine components",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.3",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"author": "Vitaly Rtishchev <rtivital@gmail.com>",
|
|
10
10
|
"homepage": "https://mantine.dev/dates/getting-started/",
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@mantine/core": "3.
|
|
13
|
-
"@mantine/hooks": "3.
|
|
12
|
+
"@mantine/core": "3.2.3",
|
|
13
|
+
"@mantine/hooks": "3.2.3",
|
|
14
14
|
"dayjs": "^1.10.5",
|
|
15
15
|
"react": ">=16.8.0"
|
|
16
16
|
},
|