@mindly/ui-components 4.9.0 → 4.9.2

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.
@@ -10,5 +10,7 @@ type CardModalProps = {
10
10
  onClose: () => void;
11
11
  }) => React.ReactNode;
12
12
  };
13
- declare const CardModal: React.ForwardRefExoticComponent<CardModalProps & React.RefAttributes<HTMLIonModalElement>>;
13
+ declare const CardModal: React.ForwardRefExoticComponent<CardModalProps & {
14
+ children?: React.ReactNode;
15
+ } & React.RefAttributes<HTMLIonModalElement>>;
14
16
  export default CardModal;
@@ -1,2 +1,2 @@
1
1
  import { CalendarProps } from './types';
2
- export declare function Calendar({ maxValue, defaultValue, timeZone, locale, isShowWeekNames, isShowMonthNavigation, selectionMode, onSelectionChange, defaultSelectDates, onDatePress, renderCustomDateContent, ...props }: CalendarProps): JSX.Element;
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: Date, evt: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
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: Date, formattedDate: string, isSelected: boolean, isToday: boolean) => React.ReactNode) | undefined;
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, Date>;
11
+ selectionState: Map<string, string>;
12
12
  currentMonth: import("@internationalized/date").CalendarDate;
13
- slots?: Record<string, any[]> | undefined;
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, slots, renderCustomDateContent, ...props }: CalendarGridProps): JSX.Element;
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, defaultValue, timeZone, locale, selectionMode, onSelectionChange, defaultSelectDates, onDatePress, renderCustomDateContent, fullWidth, ...props }: CalendarProps): JSX.Element;
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: Date, evt: React.MouseEvent<HTMLButtonElement>) => void;
6
+ onDatePress?: (date: string, evt: React.MouseEvent<HTMLButtonElement>) => void;
7
7
  locale: string;
8
8
  timeZone?: string;
9
9
  selectionMode?: SelectionMode;
10
- renderCustomDateContent?: (date: Date, formattedDate: string, isSelected: boolean, isToday: boolean) => React.ReactNode;
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: Date[];
20
+ defaultSelectDates: string[];
18
21
  selectionBehavior?: SelectionBehavior;
19
- onSelectionChange: (dates: Date[]) => void;
22
+ onSelectionChange: (dates: string[]) => void;
20
23
  };
21
24
  export type CalendarGridProps = AriaCalendarGridProps & BaseTypeProps & {
22
25
  state: CalendarState;
23
- selectionState: Map<string, Date>;
24
- slots?: Record<string, any[]>;
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, Date>;
33
+ selectionState: Map<string, string>;
32
34
  currentMonth: CalendarDate;
33
- slots?: Record<string, any[]>;
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: Date, evt: React.MouseEvent<HTMLButtonElement>) => void;
1535
+ onDatePress?: (date: string, evt: React.MouseEvent<HTMLButtonElement>) => void;
1536
1536
  locale: string;
1537
1537
  timeZone?: string;
1538
1538
  selectionMode?: SelectionMode;
1539
- renderCustomDateContent?: (date: Date, formattedDate: string, isSelected: boolean, isToday: boolean) => React.ReactNode;
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: Date[];
1549
+ defaultSelectDates: string[];
1547
1550
  selectionBehavior?: SelectionBehavior;
1548
- onSelectionChange: (dates: Date[]) => void;
1551
+ onSelectionChange: (dates: string[]) => void;
1549
1552
  };
1550
1553
 
1551
- declare function Calendar({ maxValue, defaultValue, timeZone, locale, isShowWeekNames, isShowMonthNavigation, selectionMode, onSelectionChange, defaultSelectDates, onDatePress, renderCustomDateContent, ...props }: CalendarProps): JSX.Element;
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, defaultValue, timeZone, locale, selectionMode, onSelectionChange, defaultSelectDates, onDatePress, renderCustomDateContent, fullWidth, ...props }: CalendarProps): JSX.Element;
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;
@@ -1785,7 +1788,9 @@ type CardModalProps = {
1785
1788
  onClose: () => void;
1786
1789
  }) => React__default.ReactNode;
1787
1790
  };
1788
- declare const CardModal: React__default.ForwardRefExoticComponent<CardModalProps & React__default.RefAttributes<HTMLIonModalElement>>;
1791
+ declare const CardModal: React__default.ForwardRefExoticComponent<CardModalProps & {
1792
+ children?: React__default.ReactNode;
1793
+ } & React__default.RefAttributes<HTMLIonModalElement>>;
1789
1794
 
1790
1795
  type SlotsGridProps = {
1791
1796
  times: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindly/ui-components",
3
- "version": "4.9.0",
3
+ "version": "4.9.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "clean": "rimraf dist",