@mindly/ui-components 4.9.1 → 4.9.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/dist/cjs/index.js +3 -3
- package/dist/cjs/lib2/shared/ui/Calendar/Calendar.d.ts +1 -1
- package/dist/cjs/lib2/shared/ui/Calendar/CalendarCell.d.ts +4 -5
- package/dist/cjs/lib2/shared/ui/Calendar/CalendarGrid.d.ts +1 -1
- package/dist/cjs/lib2/shared/ui/Calendar/VerticalCalendar.d.ts +1 -1
- package/dist/cjs/lib2/shared/ui/Calendar/types.d.ts +12 -11
- package/dist/cjs/lib2/shared/ui/Calendar/utils/getLastValueInMap.d.ts +1 -0
- package/dist/cjs/lib2/shared/ui/Calendar/utils/getParsedISODate.d.ts +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/lib2/shared/ui/Calendar/Calendar.d.ts +1 -1
- package/dist/esm/lib2/shared/ui/Calendar/CalendarCell.d.ts +4 -5
- package/dist/esm/lib2/shared/ui/Calendar/CalendarGrid.d.ts +1 -1
- package/dist/esm/lib2/shared/ui/Calendar/VerticalCalendar.d.ts +1 -1
- package/dist/esm/lib2/shared/ui/Calendar/types.d.ts +12 -11
- package/dist/esm/lib2/shared/ui/Calendar/utils/getLastValueInMap.d.ts +1 -0
- package/dist/esm/lib2/shared/ui/Calendar/utils/getParsedISODate.d.ts +1 -0
- package/dist/index.d.ts +10 -7
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CalendarProps } from './types';
|
|
2
|
-
export declare function Calendar({ maxValue,
|
|
2
|
+
export declare function Calendar({ maxValue, minValue, timeZone, locale, isShowWeekNames, isShowMonthNavigation, selectionMode, onSelectionChange, defaultSelectDates, onDatePress, renderCustomDateContent, fullWidth, ...props }: CalendarProps): JSX.Element;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CalendarCellProps } from './types';
|
|
3
3
|
export declare const CalendarCell: React.ForwardRefExoticComponent<{
|
|
4
|
-
onDatePress?: ((date:
|
|
4
|
+
onDatePress?: ((date: string, evt: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
|
|
5
5
|
locale: string;
|
|
6
6
|
timeZone?: string | undefined;
|
|
7
7
|
selectionMode?: import("react-stately").SelectionMode | undefined;
|
|
8
|
-
renderCustomDateContent?: ((date:
|
|
8
|
+
renderCustomDateContent?: ((date: string, formattedDate: string, isSelected: boolean, isToday: boolean) => React.ReactNode) | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
state: import("react-stately").CalendarState;
|
|
11
|
-
selectionState: Map<string,
|
|
11
|
+
selectionState: Map<string, string>;
|
|
12
12
|
currentMonth: import("@internationalized/date").CalendarDate;
|
|
13
|
-
|
|
14
|
-
handleSelectionDateChange: (dateKey: string, date: Date) => void;
|
|
13
|
+
handleSelectionDateChange: (dateKey: string, date: string) => void;
|
|
15
14
|
date: import("@internationalized/date").CalendarDate;
|
|
16
15
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
17
16
|
declare const _default: React.NamedExoticComponent<CalendarCellProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CalendarGridProps } from './types';
|
|
3
|
-
export declare function CalendarGrid({ state, selectionState, locale, isShowWeekNames, weekdayStyle, handleSelectionDateChange, selectionMode, onDatePress, offset,
|
|
3
|
+
export declare function CalendarGrid({ state, selectionState, locale, isShowWeekNames, weekdayStyle, handleSelectionDateChange, selectionMode, onDatePress, offset, renderCustomDateContent, timeZone, ...props }: CalendarGridProps): JSX.Element;
|
|
4
4
|
declare const _default: React.NamedExoticComponent<CalendarGridProps>;
|
|
5
5
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CalendarProps } from './types';
|
|
2
|
-
export declare function VerticalCalendar({ maxValue,
|
|
2
|
+
export declare function VerticalCalendar({ maxValue, timeZone, locale, selectionMode, onSelectionChange, defaultSelectDates, onDatePress, renderCustomDateContent, fullWidth, minValue, ...props }: CalendarProps): JSX.Element;
|
|
@@ -3,35 +3,36 @@ import { AriaCalendarGridProps, AriaCalendarProps, DateValue } from 'react-aria'
|
|
|
3
3
|
import { CalendarState, SelectionBehavior, SelectionMode } from 'react-stately';
|
|
4
4
|
import { CalendarDate } from '@internationalized/date';
|
|
5
5
|
type BaseTypeProps = {
|
|
6
|
-
onDatePress?: (date:
|
|
6
|
+
onDatePress?: (date: string, evt: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
7
|
locale: string;
|
|
8
8
|
timeZone?: string;
|
|
9
9
|
selectionMode?: SelectionMode;
|
|
10
|
-
renderCustomDateContent?: (date:
|
|
10
|
+
renderCustomDateContent?: (date: string, formattedDate: string, isSelected: boolean, isToday: boolean) => React.ReactNode;
|
|
11
11
|
};
|
|
12
|
-
export type CalendarProps = AriaCalendarProps<DateValue> & BaseTypeProps & {
|
|
12
|
+
export type CalendarProps = Omit<AriaCalendarProps<DateValue>, 'minValue' | 'defaultValue' | 'maxValue'> & BaseTypeProps & {
|
|
13
|
+
minValue?: string;
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
maxValue?: string;
|
|
13
16
|
slots?: Record<string, any[]>;
|
|
14
17
|
fullWidth?: boolean;
|
|
15
18
|
isShowWeekNames?: boolean;
|
|
16
19
|
isShowMonthNavigation?: boolean;
|
|
17
|
-
defaultSelectDates:
|
|
20
|
+
defaultSelectDates: string[];
|
|
18
21
|
selectionBehavior?: SelectionBehavior;
|
|
19
|
-
onSelectionChange: (dates:
|
|
22
|
+
onSelectionChange: (dates: string[]) => void;
|
|
20
23
|
};
|
|
21
24
|
export type CalendarGridProps = AriaCalendarGridProps & BaseTypeProps & {
|
|
22
25
|
state: CalendarState;
|
|
23
|
-
selectionState: Map<string,
|
|
24
|
-
|
|
25
|
-
handleSelectionDateChange: (dateKey: string, date: Date) => void;
|
|
26
|
+
selectionState: Map<string, string>;
|
|
27
|
+
handleSelectionDateChange: (dateKey: string, date: string) => void;
|
|
26
28
|
isShowWeekNames: boolean;
|
|
27
29
|
offset?: Record<string, any>;
|
|
28
30
|
};
|
|
29
31
|
export type CalendarCellProps = BaseTypeProps & {
|
|
30
32
|
state: CalendarState;
|
|
31
|
-
selectionState: Map<string,
|
|
33
|
+
selectionState: Map<string, string>;
|
|
32
34
|
currentMonth: CalendarDate;
|
|
33
|
-
|
|
34
|
-
handleSelectionDateChange: (dateKey: string, date: Date) => void;
|
|
35
|
+
handleSelectionDateChange: (dateKey: string, date: string) => void;
|
|
35
36
|
date: CalendarDate;
|
|
36
37
|
};
|
|
37
38
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getLastValueInMap: <K, V>(map: Map<K, V>) => V | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getParsedISODate(iso: string, timeZone: string): import("@internationalized/date").CalendarDate;
|