@inntechcorp/it-design 2.1.102 → 2.2.0

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/index.d.ts CHANGED
@@ -2,11 +2,11 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import react__default, { RefObject, Context, ReactNode, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, FunctionComponent, Ref, MutableRefObject, FocusEvent, KeyboardEvent, MouseEvent, ReactElement, CSSProperties } from 'react';
4
4
  import { ChildrenProps as ChildrenProps$1 } from 'types/ChildrenProps';
5
- import { ConfigType, Dayjs } from 'dayjs';
6
5
  import { IStyledComponent } from 'styled-components';
7
6
  import { Cancel, AxiosProgressEvent } from 'axios';
8
7
  import { SelectValue as SelectValue$1 } from 'types/SelectProps';
9
8
  import { ModalState as ModalState$1, FormValidationTypes as FormValidationTypes$1 } from 'enums/enum';
9
+ import moment$1 from 'moment';
10
10
  import { ModalProps as ModalProps$1 } from 'types/ModalProps';
11
11
  import { RadioButtonProps as RadioButtonProps$1, RadioGroupProps as RadioGroupProps$1 } from 'types/RadioProps';
12
12
  import { ITDImperativeFuncProps as ITDImperativeFuncProps$1 } from 'types/ITDImperativeFuncProps';
@@ -103,15 +103,15 @@ declare function Wait(milliseconds: number): Promise<unknown>;
103
103
 
104
104
  declare const SVGLoader: (src: string, width?: string | number, height?: string | number) => react_jsx_runtime.JSX.Element;
105
105
 
106
- declare function FormatDate(date: string | Date, locale?: string, format?: string): string;
106
+ declare function FormatDate(date: Date, locale?: string, format?: string): string;
107
107
 
108
- declare function FormatDateTime(date: string | Date, locale?: string, format?: string): string;
108
+ declare function FormatDateTime(date: Date, locale?: string, format?: string): string;
109
109
 
110
- declare function FormatSimpleDate(date: string | Date, locale?: string, format?: string): string;
110
+ declare function FormatSimpleDate(date: Date, locale?: string, format?: string): string;
111
111
 
112
- declare function FormatSimpleDateTime(date: string | Date, locale?: string, format?: string): string;
112
+ declare function FormatSimpleDateTime(date: Date, locale?: string, format?: string): string;
113
113
 
114
- declare function FormatTime(time: ConfigType, locale?: string, format?: string): string;
114
+ declare function FormatTime(time: moment.MomentInput, locale?: string, format?: string): string;
115
115
 
116
116
  declare function AddDefaultUnit(value: string | number): string;
117
117
 
@@ -540,7 +540,7 @@ declare const Calendar: ({ value, defaultValue, className, onChange, disabledDat
540
540
  defaultValue?: string;
541
541
  className?: string;
542
542
  onChange?: ((value: CalendarValueProps) => void) | null;
543
- disabledDate?: (date: Dayjs) => boolean;
543
+ disabledDate?: (date: moment$1.Moment) => boolean;
544
544
  }) => react_jsx_runtime.JSX.Element | null;
545
545
 
546
546
  declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<ITDImperativeFuncProps>>;
@@ -726,8 +726,9 @@ declare function Progress({ status, percent, alwaysShowPercent, showInfo, classN
726
726
  type TinyScrollbarProps = {
727
727
  className: string;
728
728
  children: ChildrenProps$1;
729
+ style?: React.CSSProperties;
729
730
  };
730
- declare function TinyScrollbar({ className, children }: TinyScrollbarProps): react_jsx_runtime.JSX.Element;
731
+ declare function TinyScrollbar({ className, children, style }: TinyScrollbarProps): react_jsx_runtime.JSX.Element;
731
732
 
732
733
  declare const Tabs: ({ tabs, activeTabKey, className, variant, height, onTabChange }: TabsProps) => react_jsx_runtime.JSX.Element;
733
734
 
@@ -833,10 +834,10 @@ type ITDSize = "x-small" | "small" | "medium" | "default" | "large" | "x-large";
833
834
  type ITDSizeSlug = "xs" | "sm" | "md" | "df" | "lg" | "xlg";
834
835
  type ITDPosition = "left" | "right";
835
836
 
836
- interface CalendarProps {
837
+ type CalendarProps = {
837
838
  id?: string;
838
839
  placeholder?: string;
839
- defaultValue?: string;
840
+ defaultValue: CalendarValueProps;
840
841
  className?: string;
841
842
  mask?: null | string;
842
843
  size?: ITDSize;
@@ -844,63 +845,40 @@ interface CalendarProps {
844
845
  disabled?: boolean;
845
846
  floating?: boolean;
846
847
  suffix?: ChildrenProps;
847
- onChange?: (date: Dayjs) => void;
848
+ onChange?: ((value: CalendarValueProps) => void) | null;
848
849
  onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
849
- disabledDate: (date: Dayjs) => boolean;
850
- onPanelChange?: (value: Dayjs, mode: string) => void;
851
- onSelect?: (date: Dayjs) => void;
852
- value?: string;
853
- dateFormat?: string;
854
- locale?: string;
855
- mode?: "month" | "year";
856
- fullscreen?: boolean;
857
- headerRender?: (value: Dayjs, type: string, originalNode: React.ReactElement) => React.ReactNode;
858
- }
859
- interface CalendarValueProps {
860
- global: string;
850
+ disabledDate: (date: moment$1.Moment) => boolean;
851
+ };
852
+ type CalendarValueProps = {
861
853
  localizated: string;
862
- }
863
- interface CalendarDayProps {
864
- date: Dayjs;
865
- isToday: boolean;
866
- isSelected: boolean;
867
- isDisabled: boolean;
868
- handleClick: (date: Dayjs) => void;
869
- }
854
+ global: string;
855
+ };
856
+ type CalendarDayProps = {
857
+ date: moment$1.Moment;
858
+ today?: boolean;
859
+ selected?: boolean;
860
+ current?: boolean;
861
+ disabled?: boolean;
862
+ handleClick: (date: moment$1.Moment) => void;
863
+ };
870
864
 
871
- interface DatePickerProps {
865
+ type DatePickerProps = {
872
866
  id?: string;
873
- name?: string;
874
- className?: string;
875
867
  placeholder?: string;
876
- value?: string;
877
868
  defaultValue?: string;
878
- dateFormat?: string;
879
- locale?: string;
880
- disabled?: boolean;
881
- readOnly?: boolean;
882
- allowClear?: boolean;
883
- autoFocus?: boolean;
869
+ value?: string;
870
+ className?: string;
871
+ mask?: null | string;
884
872
  size?: ITDSize;
885
- status?: "" | "error" | "warning";
886
873
  variant?: InputVariant;
887
- placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
888
- position?: ITDPosition;
889
- mask?: string | null;
874
+ disabled?: boolean;
890
875
  floating?: boolean;
876
+ position?: ITDPosition;
891
877
  suffix?: ChildrenProps;
892
- getPopupContainer?: () => HTMLElement;
893
- inputReadOnly?: boolean;
894
- needConfirm?: boolean;
895
- showNow?: boolean;
896
- showTime?: boolean | object;
897
- showToday?: boolean;
898
- disabledDate?: (date: Dayjs) => boolean;
899
- onChange?: (date: CalendarValueProps) => void;
878
+ onChange?: ((value: CalendarValueProps) => void) | null;
900
879
  onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
901
- onOpenChange?: (open: boolean) => void;
902
- onPanelChange?: (value: string, mode: string) => void;
903
- }
880
+ disabledDate?: (date: moment$1.Moment) => boolean;
881
+ };
904
882
 
905
883
  type TextAreaProps = {
906
884
  id?: string;
@@ -1043,6 +1021,7 @@ type SelectOptionProps = {
1043
1021
  icon?: ChildrenProps;
1044
1022
  image?: string;
1045
1023
  disabled?: boolean;
1024
+ searchText?: string;
1046
1025
  };
1047
1026
  type SelectValue = string | number | (string | number)[];
1048
1027
  type SelectVariant = "default" | "solid" | "filled" | "outline" | "custom";