@televet/kibble-ui 1.14.7 → 1.14.8

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.
@@ -0,0 +1,7 @@
1
+ interface DayProps {
2
+ dayLabel: string;
3
+ date: Date;
4
+ onDaySelected: () => void;
5
+ }
6
+ declare const Day: ({ dayLabel, date, onDaySelected }: DayProps) => JSX.Element;
7
+ export default Day;
@@ -0,0 +1,9 @@
1
+ import { FirstDayOfWeek } from '@datepicker-react/hooks';
2
+ export interface MonthProps {
3
+ year: number;
4
+ month: number;
5
+ firstDayOfWeek: FirstDayOfWeek;
6
+ onDaySelected: () => void;
7
+ }
8
+ declare const Month: ({ year, month, firstDayOfWeek, onDaySelected }: MonthProps) => JSX.Element;
9
+ export default Month;
@@ -0,0 +1,94 @@
1
+ export declare const datepickerArgTypes: {
2
+ date: {
3
+ defaultValue: Date;
4
+ description: string;
5
+ table: {
6
+ type: {
7
+ summary: string;
8
+ };
9
+ defaultValue: {
10
+ summary: string;
11
+ };
12
+ };
13
+ type: {
14
+ name: string;
15
+ };
16
+ };
17
+ dateFormat: {
18
+ defaultValue: string;
19
+ description: string;
20
+ table: {
21
+ type: {
22
+ summary: string;
23
+ };
24
+ defaultValue: {
25
+ summary: string;
26
+ };
27
+ };
28
+ type: string;
29
+ };
30
+ onDateChange: {
31
+ description: string;
32
+ action: string;
33
+ control: null;
34
+ table: {
35
+ type: {
36
+ summary: string;
37
+ };
38
+ };
39
+ };
40
+ placement: {
41
+ description: string;
42
+ options: import("@chakra-ui/popper/dist/declarations/src/popper.placement").PlacementWithLogical[];
43
+ control: {
44
+ type: string;
45
+ };
46
+ table: {
47
+ type: {
48
+ summary: string;
49
+ };
50
+ defaultValue: {
51
+ summary: string;
52
+ };
53
+ };
54
+ };
55
+ minYear: {
56
+ defaultValue: number;
57
+ description: string;
58
+ control: string;
59
+ table: {
60
+ type: {
61
+ summary: string;
62
+ };
63
+ defaultValue: {
64
+ summary: number;
65
+ };
66
+ };
67
+ };
68
+ maxYear: {
69
+ defaultValue: number;
70
+ description: string;
71
+ control: string;
72
+ table: {
73
+ type: {
74
+ summary: string;
75
+ };
76
+ defaultValue: {
77
+ summary: number;
78
+ };
79
+ };
80
+ };
81
+ onChange: any;
82
+ size: any;
83
+ label: any;
84
+ helperText: any;
85
+ helperTextAlignment: any;
86
+ errorText: any;
87
+ isDisabled: any;
88
+ isInvalid: any;
89
+ isReadOnly: any;
90
+ isRequired: any;
91
+ autoFocus: any;
92
+ labelStyle: any;
93
+ formControlStyle: any;
94
+ };
@@ -0,0 +1,21 @@
1
+ import { PlacementWithLogical } from '@chakra-ui/react';
2
+ import { TextInputProps } from '..';
3
+ import { DateFormats } from './datepicker.types';
4
+ export interface DatePickerProps {
5
+ date: Date | null;
6
+ onDateChange?: (date: Date | null) => void;
7
+ dateFormat?: string | DateFormats;
8
+ inputProps?: Omit<TextInputProps, 'onChange' | 'value'>;
9
+ placement?: PlacementWithLogical;
10
+ minYear?: number;
11
+ maxYear?: number;
12
+ }
13
+ /**
14
+ * A simple date picker component.
15
+ *
16
+ * Note: Be careful with dateFormat and allowing search (inputProps.IsReadOnly = false) as changing the format
17
+ * can cause exceptions to be thrown.
18
+ *
19
+ * More dateFormat info: https://github.com/date-fns/date-fns/blob/main/docs/unicodeTokens.md
20
+ */
21
+ export declare const BetaDatePicker: ({ date, onDateChange, inputProps, placement, dateFormat, minYear, maxYear, }: DatePickerProps) => JSX.Element;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ export interface IDatePickerContext {
3
+ focusedDate: Date | null;
4
+ isDateFocused: (date: Date) => boolean;
5
+ isDateSelected: (date: Date) => boolean;
6
+ isDateHovered: (date: Date) => boolean;
7
+ isDateBlocked: (date: Date) => boolean;
8
+ isFirstOrLastSelectedDate: (date: Date) => boolean;
9
+ onDateFocus: (date: Date) => void;
10
+ onDateHover: (date: Date) => void;
11
+ onDateSelect: (date: Date) => void;
12
+ }
13
+ export declare const DatePickerContext: React.Context<IDatePickerContext>;
14
+ export declare const useDatePickerContext: () => IDatePickerContext;
15
+ interface IDatePickerProvider extends IDatePickerContext {
16
+ date?: Date;
17
+ children: React.ReactNode;
18
+ }
19
+ declare const DatePickerProvider: ({ date, children, ...rest }: IDatePickerProvider) => JSX.Element;
20
+ export default DatePickerProvider;
@@ -0,0 +1,5 @@
1
+ export declare enum DateFormats {
2
+ 'ShortDate' = "MM/dd/yyyy",
3
+ 'LongDate' = "MMM dd yyyy",
4
+ 'DayOfWeekDayOfMonth' = "eeee, MMMM do"
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from './datepicker.component';
2
+ export * from './datepicker.context';
@@ -6,3 +6,4 @@ export * from './Radio';
6
6
  export * from './RatingDots';
7
7
  export * from './Select';
8
8
  export * from './Switch';
9
+ export * from './DatePicker';
@@ -1,9 +1,7 @@
1
1
  import { AdaptiveColor } from '../../../theme/tokens';
2
- import { Placement } from '@chakra-ui/react';
3
2
  export interface TooltipStyleConfig {
4
3
  color: AdaptiveColor;
5
4
  baseStyle: {
6
5
  zIndex: string;
7
6
  };
8
7
  }
9
- export declare const tooltipPlacementOptions: Placement[];