@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;
|
package/dist/index.d.ts
CHANGED
|
@@ -1532,25 +1532,28 @@ type ListBoxProps<T> = AriaListBoxProps<T>;
|
|
|
1532
1532
|
declare function ListBox<T extends Record<string, unknown>>(props: ListBoxProps<T>): JSX.Element;
|
|
1533
1533
|
|
|
1534
1534
|
type BaseTypeProps = {
|
|
1535
|
-
onDatePress?: (date:
|
|
1535
|
+
onDatePress?: (date: string, evt: React.MouseEvent<HTMLButtonElement>) => void;
|
|
1536
1536
|
locale: string;
|
|
1537
1537
|
timeZone?: string;
|
|
1538
1538
|
selectionMode?: SelectionMode;
|
|
1539
|
-
renderCustomDateContent?: (date:
|
|
1539
|
+
renderCustomDateContent?: (date: string, formattedDate: string, isSelected: boolean, isToday: boolean) => React.ReactNode;
|
|
1540
1540
|
};
|
|
1541
|
-
type CalendarProps = AriaCalendarProps<DateValue> & BaseTypeProps & {
|
|
1541
|
+
type CalendarProps = Omit<AriaCalendarProps<DateValue>, 'minValue' | 'defaultValue' | 'maxValue'> & BaseTypeProps & {
|
|
1542
|
+
minValue?: string;
|
|
1543
|
+
defaultValue?: string;
|
|
1544
|
+
maxValue?: string;
|
|
1542
1545
|
slots?: Record<string, any[]>;
|
|
1543
1546
|
fullWidth?: boolean;
|
|
1544
1547
|
isShowWeekNames?: boolean;
|
|
1545
1548
|
isShowMonthNavigation?: boolean;
|
|
1546
|
-
defaultSelectDates:
|
|
1549
|
+
defaultSelectDates: string[];
|
|
1547
1550
|
selectionBehavior?: SelectionBehavior;
|
|
1548
|
-
onSelectionChange: (dates:
|
|
1551
|
+
onSelectionChange: (dates: string[]) => void;
|
|
1549
1552
|
};
|
|
1550
1553
|
|
|
1551
|
-
declare function Calendar({ maxValue,
|
|
1554
|
+
declare function Calendar({ maxValue, minValue, timeZone, locale, isShowWeekNames, isShowMonthNavigation, selectionMode, onSelectionChange, defaultSelectDates, onDatePress, renderCustomDateContent, fullWidth, ...props }: CalendarProps): JSX.Element;
|
|
1552
1555
|
|
|
1553
|
-
declare function VerticalCalendar({ maxValue,
|
|
1556
|
+
declare function VerticalCalendar({ maxValue, timeZone, locale, selectionMode, onSelectionChange, defaultSelectDates, onDatePress, renderCustomDateContent, fullWidth, minValue, ...props }: CalendarProps): JSX.Element;
|
|
1554
1557
|
|
|
1555
1558
|
type VerticalCalendarMonthSkeletonProps = {
|
|
1556
1559
|
days: number;
|