kwant-ui 3.14.6-alpha.0 → 3.14.7

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.
@@ -100,6 +100,24 @@ const GlobalStyles = createGlobalStyle<{ theme: Color }>`
100
100
  }
101
101
  }
102
102
  }
103
+
104
+ .calendar-readonly-true{
105
+ .rmdp-day {
106
+ cursor: not-allowed;
107
+ .sd:hover{
108
+ background-color: transparent !important;
109
+
110
+ }
111
+ }
112
+ &:not(.rmdp-range){
113
+ .sd{
114
+ color: #798ca4 !important;
115
+ }
116
+ }
117
+ }
118
+
119
+
120
+
103
121
 
104
122
  /** Datepicker styles */
105
123
  .rmdp-calendar {
@@ -7,8 +7,9 @@ export type SidebarOptionProps = {
7
7
  onClick?: () => void;
8
8
  };
9
9
  export declare const SidebarOption: ({ title, selected, onClick }: SidebarOptionProps) => import("react/jsx-runtime").JSX.Element;
10
- export declare const CalendarSidebar: ({ options, onOptionClick, }: {
10
+ export declare const CalendarSidebar: ({ options, selectedOption, onOptionClick, }: {
11
11
  options?: Pick<SidebarOptionProps, 'title' | 'selected' | 'value'>[];
12
- onOptionClick?: (value: () => DateObject[]) => void;
12
+ selectedOption: string;
13
+ onOptionClick?: (value: () => DateObject[], option?: Pick<SidebarOptionProps, 'title' | 'selected' | 'value'>) => void;
13
14
  }) => import("react/jsx-runtime").JSX.Element;
14
15
  export declare const renderDatepickerNavigationButton: (direction: ICalendar.DatpickerNavigationDirection, handleClick: (event: React.MouseEvent<HTMLButtonElement>) => void) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CalendarProps } from 'react-multi-date-picker';
2
+ import { CalendarProps, DateObject } from 'react-multi-date-picker';
3
3
  export declare namespace ICalendar {
4
4
  type Props = CalendarProps & {
5
5
  range?: boolean;
@@ -7,6 +7,9 @@ export declare namespace ICalendar {
7
7
  calenderRef?: any;
8
8
  showSidebar?: boolean;
9
9
  projectDuration?: ProjectDuration;
10
+ disableFutureDatesOnCustomRange?: boolean;
11
+ selectedSidebarOption?: string;
12
+ onChange?: (date: DateObject | DateObject[], selectedOption?: string) => void;
10
13
  };
11
14
  enum DatpickerNavigationDirectionEnum {
12
15
  right = "right",
@@ -1,4 +1,4 @@
1
- import { DateObject, Value } from 'react-multi-date-picker';
1
+ import { DateObject } from 'react-multi-date-picker';
2
2
  import { ICalendar } from './CalendarTypes';
3
3
  export declare const isRangeWithNumberOfMonths: (range: boolean, numberOfMonths: number) => boolean;
4
4
  declare const regexInputValidate: (event: ICalendar.InputChangeEvent, onChange: (event: ICalendar.InputChangeEvent) => void) => void;
@@ -11,13 +11,11 @@ export declare const CALENDAR_CONSTANTS: {
11
11
  LAST_30_DAYS: DateObject[];
12
12
  THIS_MONTH: DateObject[];
13
13
  };
14
- export declare const getSidebarOptions: (currentDate: (Value | DateObject)[], projectDuration?: ICalendar.ProjectDuration) => ({
14
+ export declare const getSidebarOptions: (projectDuration?: ICalendar.ProjectDuration) => ({
15
15
  title: string;
16
16
  value: () => DateObject[];
17
- selected: boolean;
18
17
  } | {
19
18
  title: string;
20
- selected: boolean;
21
19
  value?: undefined;
22
20
  })[];
23
21
  export { fullMonthsText, regexInputValidate, weeks };
@@ -0,0 +1,11 @@
1
+ declare const useDropdown: (props?: {
2
+ opened?: boolean;
3
+ onClose?: () => void;
4
+ targetRef?: React.RefObject<HTMLDivElement>;
5
+ }) => {
6
+ isOpen: boolean;
7
+ open: () => void;
8
+ close: () => void;
9
+ toggle: () => void;
10
+ };
11
+ export default useDropdown;