@inntechcorp/it-design 2.1.100 → 2.1.102

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.mts CHANGED
@@ -615,7 +615,7 @@ export * from './icons';
615
615
  export { default as Select } from './select';
616
616
  export { default as Form } from './form';
617
617
  export { default as Checkbox } from './checkbox';
618
- export { default as Accordion } from './accordion';
618
+ export { default as Accordion } from './accordion/index';
619
619
  export { default as Calendar } from './calendar';
620
620
  export { default as DatePicker } from './datepicker';
621
621
  export { default as Input } from './input';
@@ -636,7 +636,7 @@ export { default as InlineSelect } from './inlineselect';
636
636
  export { default as Image } from './image';
637
637
  export { default as ConsoleLog } from './logger';
638
638
  export { default as Button } from './button';
639
- export { default as Alert } from './alert';
639
+ export { default as Alert } from './alert/index';
640
640
  export { default as Result } from './result';
641
641
  export { default as ALink } from './alink';
642
642
  export { default as Spin } from './spin';
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';
5
6
  import { IStyledComponent } from 'styled-components';
6
7
  import { Cancel, AxiosProgressEvent } from 'axios';
7
8
  import { SelectValue as SelectValue$1 } from 'types/SelectProps';
8
9
  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: Date, locale?: string, format?: string): string;
106
+ declare function FormatDate(date: string | Date, locale?: string, format?: string): string;
107
107
 
108
- declare function FormatDateTime(date: Date, locale?: string, format?: string): string;
108
+ declare function FormatDateTime(date: string | Date, locale?: string, format?: string): string;
109
109
 
110
- declare function FormatSimpleDate(date: Date, locale?: string, format?: string): string;
110
+ declare function FormatSimpleDate(date: string | Date, locale?: string, format?: string): string;
111
111
 
112
- declare function FormatSimpleDateTime(date: Date, locale?: string, format?: string): string;
112
+ declare function FormatSimpleDateTime(date: string | Date, locale?: string, format?: string): string;
113
113
 
114
- declare function FormatTime(time: moment.MomentInput, locale?: string, format?: string): string;
114
+ declare function FormatTime(time: ConfigType, 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: moment$1.Moment) => boolean;
543
+ disabledDate?: (date: Dayjs) => boolean;
544
544
  }) => react_jsx_runtime.JSX.Element | null;
545
545
 
546
546
  declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<ITDImperativeFuncProps>>;
@@ -833,10 +833,10 @@ type ITDSize = "x-small" | "small" | "medium" | "default" | "large" | "x-large";
833
833
  type ITDSizeSlug = "xs" | "sm" | "md" | "df" | "lg" | "xlg";
834
834
  type ITDPosition = "left" | "right";
835
835
 
836
- type CalendarProps = {
836
+ interface CalendarProps {
837
837
  id?: string;
838
838
  placeholder?: string;
839
- defaultValue: CalendarValueProps;
839
+ defaultValue?: string;
840
840
  className?: string;
841
841
  mask?: null | string;
842
842
  size?: ITDSize;
@@ -844,40 +844,63 @@ type CalendarProps = {
844
844
  disabled?: boolean;
845
845
  floating?: boolean;
846
846
  suffix?: ChildrenProps;
847
- onChange?: ((value: CalendarValueProps) => void) | null;
847
+ onChange?: (date: Dayjs) => void;
848
848
  onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
849
- disabledDate: (date: moment$1.Moment) => boolean;
850
- };
851
- type CalendarValueProps = {
852
- localizated: string;
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 {
853
860
  global: string;
854
- };
855
- type CalendarDayProps = {
856
- date: moment$1.Moment;
857
- today?: boolean;
858
- selected?: boolean;
859
- current?: boolean;
860
- disabled?: boolean;
861
- handleClick: (date: moment$1.Moment) => void;
862
- };
861
+ localizated: string;
862
+ }
863
+ interface CalendarDayProps {
864
+ date: Dayjs;
865
+ isToday: boolean;
866
+ isSelected: boolean;
867
+ isDisabled: boolean;
868
+ handleClick: (date: Dayjs) => void;
869
+ }
863
870
 
864
- type DatePickerProps = {
871
+ interface DatePickerProps {
865
872
  id?: string;
873
+ name?: string;
874
+ className?: string;
866
875
  placeholder?: string;
867
- defaultValue?: string;
868
876
  value?: string;
869
- className?: string;
870
- mask?: null | string;
877
+ defaultValue?: string;
878
+ dateFormat?: string;
879
+ locale?: string;
880
+ disabled?: boolean;
881
+ readOnly?: boolean;
882
+ allowClear?: boolean;
883
+ autoFocus?: boolean;
871
884
  size?: ITDSize;
885
+ status?: "" | "error" | "warning";
872
886
  variant?: InputVariant;
873
- disabled?: boolean;
874
- floating?: boolean;
887
+ placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
875
888
  position?: ITDPosition;
889
+ mask?: string | null;
890
+ floating?: boolean;
876
891
  suffix?: ChildrenProps;
877
- onChange?: ((value: CalendarValueProps) => void) | null;
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
900
  onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
879
- disabledDate?: (date: moment$1.Moment) => boolean;
880
- };
901
+ onOpenChange?: (open: boolean) => void;
902
+ onPanelChange?: (value: string, mode: string) => void;
903
+ }
881
904
 
882
905
  type TextAreaProps = {
883
906
  id?: string;