@shophost/react 2.0.35 → 2.0.36

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/ui/calendar.d.ts CHANGED
@@ -1,9 +1,28 @@
1
- import { DateRange, DayPickerProps, Matcher } from 'react-day-picker';
2
- type CalendarProps = DayPickerProps & {
1
+ import { DateRange, DayPickerDefaultProps, DayPickerMultipleProps, DayPickerProps, DayPickerRangeProps, DayPickerSingleProps, Matcher } from 'react-day-picker';
2
+ type CalendarBaseProps = {
3
+ className?: string;
4
+ classNames?: DayPickerProps['classNames'];
5
+ components?: DayPickerProps['components'];
6
+ disableNavigation?: boolean;
3
7
  enableYearNavigation?: boolean;
8
+ fromMonth?: Date;
9
+ fromYear?: number;
10
+ numberOfMonths?: number;
11
+ toMonth?: Date;
12
+ toYear?: number;
13
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
14
+ } & Record<string, unknown>;
15
+ type CalendarDefaultProps = Omit<DayPickerDefaultProps, keyof CalendarBaseProps | 'mode'> & CalendarBaseProps & {
16
+ mode?: 'default';
4
17
  };
18
+ type CalendarSingleProps = Omit<DayPickerSingleProps, 'mode'> & CalendarBaseProps & {
19
+ mode?: 'single';
20
+ };
21
+ type CalendarMultipleProps = Omit<DayPickerMultipleProps, keyof CalendarBaseProps> & CalendarBaseProps;
22
+ type CalendarRangeProps = Omit<DayPickerRangeProps, keyof CalendarBaseProps> & CalendarBaseProps;
23
+ type CalendarComponentProps = CalendarDefaultProps | CalendarSingleProps | CalendarMultipleProps | CalendarRangeProps;
5
24
  declare const Calendar: {
6
- ({ mode, weekStartsOn, numberOfMonths, enableYearNavigation, disableNavigation, className, classNames, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
25
+ (props: CalendarComponentProps): import("react/jsx-runtime").JSX.Element;
7
26
  displayName: string;
8
27
  };
9
28
  export { Calendar, type DateRange, type Matcher };
package/ui/card.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- interface CardProps extends React.ComponentPropsWithoutRef<'div'> {
2
+ interface CardProps extends React.ComponentPropsWithoutRef<"div"> {
3
3
  asChild?: boolean;
4
4
  }
5
5
  declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;