sti-antd-package 0.0.1 → 0.0.2

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.
Files changed (76) hide show
  1. package/dist/asset/css/index.d.ts +1 -0
  2. package/dist/asset/css/style.css +1 -0
  3. package/dist/components/Button/Group/Add/index.d.ts +1 -1
  4. package/dist/components/Button/Group/Edit/index.d.ts +1 -1
  5. package/dist/components/Button/index.d.ts +1 -1
  6. package/dist/components/Button/types.d.ts +5 -4
  7. package/dist/components/Card/index.d.ts +1 -1
  8. package/dist/components/Card/types.d.ts +2 -2
  9. package/dist/components/Cascader/Component.d.ts +5 -0
  10. package/dist/components/Cascader/index.d.ts +2 -0
  11. package/dist/components/Cascader/types.d.ts +38 -0
  12. package/dist/components/Checkbox/Component.d.ts +4 -0
  13. package/dist/components/Checkbox/index.d.ts +2 -0
  14. package/dist/components/Checkbox/types.d.ts +28 -0
  15. package/dist/components/DatePicker/Component.d.ts +4 -0
  16. package/dist/components/DatePicker/index.d.ts +2 -0
  17. package/dist/components/DatePicker/types.d.ts +39 -0
  18. package/dist/components/DateRangePicker/Component.d.ts +4 -0
  19. package/dist/components/DateRangePicker/index.d.ts +2 -0
  20. package/dist/components/DateRangePicker/types.d.ts +41 -0
  21. package/dist/components/DropdownButton/Component.d.ts +4 -0
  22. package/dist/components/DropdownButton/index.d.ts +2 -0
  23. package/dist/components/DropdownButton/types.d.ts +16 -0
  24. package/dist/components/FormItem/Component.d.ts +4 -0
  25. package/dist/components/FormItem/index.d.ts +2 -0
  26. package/dist/components/FormItem/types.d.ts +21 -0
  27. package/dist/components/Icon/CheckOrClose/Component.d.ts +4 -0
  28. package/dist/components/Icon/CheckOrClose/index.d.ts +2 -0
  29. package/dist/components/Icon/CheckOrClose/types.d.ts +5 -0
  30. package/dist/components/Input/Component.d.ts +4 -0
  31. package/dist/components/Input/index.d.ts +2 -0
  32. package/dist/components/Input/types.d.ts +55 -0
  33. package/dist/components/Link/Component.d.ts +4 -0
  34. package/dist/components/Link/index.d.ts +2 -0
  35. package/dist/components/Link/types.d.ts +4 -0
  36. package/dist/components/NumberFormat/Component.d.ts +4 -0
  37. package/dist/components/NumberFormat/index.d.ts +2 -0
  38. package/dist/components/NumberFormat/types.d.ts +37 -0
  39. package/dist/components/Select/Async/Component.d.ts +9 -0
  40. package/dist/components/Select/Async/index.d.ts +2 -0
  41. package/dist/components/Select/Async/types.d.ts +17 -0
  42. package/dist/components/Select/Component.d.ts +4 -0
  43. package/dist/components/Select/index.d.ts +2 -0
  44. package/dist/components/Select/types.d.ts +47 -0
  45. package/dist/components/Switch/Component.d.ts +4 -0
  46. package/dist/components/Switch/index.d.ts +2 -0
  47. package/dist/components/Switch/types.d.ts +24 -0
  48. package/dist/components/Tabs/Component.d.ts +4 -0
  49. package/dist/components/Tabs/index.d.ts +2 -0
  50. package/dist/components/Tabs/types.d.ts +13 -0
  51. package/dist/components/Tag/Component.d.ts +4 -0
  52. package/dist/components/Tag/index.d.ts +2 -0
  53. package/dist/components/Tag/types.d.ts +10 -0
  54. package/dist/components/TextArea/Component.d.ts +4 -0
  55. package/dist/components/TextArea/index.d.ts +2 -0
  56. package/dist/components/TextArea/types.d.ts +38 -0
  57. package/dist/components/index.d.ts +36 -4
  58. package/dist/constants/datePickerFormat.d.ts +4 -0
  59. package/dist/constants/index.d.ts +1 -0
  60. package/dist/context/Config/Context.d.ts +3 -0
  61. package/dist/context/Config/Provider.d.ts +3 -0
  62. package/dist/context/Config/index.d.ts +3 -0
  63. package/dist/context/Config/types.d.ts +10 -0
  64. package/dist/context/Feedback/Context.d.ts +3 -0
  65. package/dist/context/Feedback/Provider.d.ts +5 -0
  66. package/dist/context/Feedback/index.d.ts +3 -0
  67. package/dist/context/Feedback/types.d.ts +9 -0
  68. package/dist/context/index.d.ts +4 -0
  69. package/dist/helpers/index.d.ts +2 -0
  70. package/dist/helpers/selectAsync/function.d.ts +7 -0
  71. package/dist/helpers/selectAsync/index.d.ts +2 -0
  72. package/dist/helpers/selectAsync/types.d.ts +13 -0
  73. package/dist/index.d.ts +490 -9
  74. package/dist/index.esm.js +16985 -63
  75. package/dist/index.js +17016 -71
  76. package/package.json +13 -2
@@ -0,0 +1 @@
1
+ export declare const styleCSS: Record<string, string>;
@@ -0,0 +1 @@
1
+ .style-module_w-100__s3GaI{width:100%}.style-module_button-save__CGfus{background-color:var(--color-primary-a0)}@keyframes style-module_zoom-in__HJzbj{0%{opacity:0;width:0}to{display:inline-flex;opacity:1;transform:scaleX(100%) scaleY(100%)}}@keyframes style-module_zoom-out__PqWZu{0%{display:inline-flex}to{opacity:0;transform:scaleX(0) scaleY(0);width:0}}div.style-module_button-group__m4a-F.style-module_button-group-add__J3FOg>button:nth-child(-n+1),div.style-module_button-group__m4a-F.style-module_button-group-edit__-ZIEQ>button:nth-child(-n+2){margin-right:.5rem}div.style-module_button-group__m4a-F>button{animation:style-module_zoom-in__HJzbj .5s}.style-module_button-group__m4a-F .style-module_display-none__y57XG{animation:style-module_zoom-out__PqWZu .5s;display:none}.style-module_icon__GHpNO{size:1.5rem}.style-module_z-10000__WIix6{z-index:10000}.style-module_number-format__F9NKi{font-feature-settings:"tnum";background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:2px;box-sizing:border-box;display:inline-block;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;margin:0;min-width:0;padding:4px 11px;position:relative;transition:all .3s;width:100%}.style-module_number-format-borderless__DOdb8{background-color:transparent;border:transparent;outline:none}.style-module_number-format-underlined__hUCaf{border:0 #d9d9d9;border-bottom:1px solid #d9d9d9;outline:none}.style-module_number-format-error__rOvyp:not(:disabled){background-color:#fff;border-color:#ff4d4f!important}input.style-module_number-format__F9NKi[disabled]{background-color:#f5f5f5;border-color:#d9d9d9;color:var(--input-color-disabled);cursor:not-allowed}input[inputmode=numeric].style-module_number-format-sm__iLZdH{padding:0 7px}.style-module_number-format-align-right__qOFmQ{text-align:right}.style-module_select__vcvBg{max-width:100%;width:100%}.style-module_add-item-divider__mnSq1{margin:8px 0}.style-module_add-item-space__yOxDs{padding:0 8px 4px}.style-module_add-item-link__lmjLu{white-space:nowrap}.style-module_bold__o-qMl{font-weight:700}.style-module_resize-none__U8a2Q{resize:none}
@@ -1,2 +1,2 @@
1
1
  export { default } from "./Component";
2
- export type { ButtonGroupAddComponentProps } from "./types";
2
+ export type * from "./types";
@@ -1,2 +1,2 @@
1
1
  export { default } from "./Component";
2
- export type { ButtonGroupEditComponentProps } from "./types";
2
+ export type * from "./types";
@@ -1,2 +1,2 @@
1
1
  export { default } from "./Component";
2
- export type { ButtonComponentProps, ButtonComponentRef } from "./types";
2
+ export type * from "./types";
@@ -1,3 +1,4 @@
1
+ import { ButtonHTMLType, ButtonShape, ButtonType } from "antd/es/button";
1
2
  import { SizeType } from "antd/es/config-provider/SizeContext";
2
3
  import { TooltipPlacement } from "antd/es/tooltip";
3
4
  import React, { Ref } from "react";
@@ -11,12 +12,12 @@ export interface ButtonComponentProps {
11
12
  };
12
13
  icon?: React.ReactNode;
13
14
  href?: string;
14
- htmlType?: "button" | "submit" | "reset";
15
- shape?: "circle" | "default" | "round";
15
+ htmlType?: ButtonHTMLType;
16
+ shape?: ButtonShape;
16
17
  size?: SizeType;
17
- type?: "text" | "default" | "link" | "primary" | "dashed";
18
+ type?: ButtonType;
18
19
  color?: "primary" | "success" | "danger";
19
- className?: string[];
20
+ classNames?: string[];
20
21
  disabled?: boolean;
21
22
  loading?: boolean;
22
23
  onClick?: React.MouseEventHandler<HTMLElement>;
@@ -1,2 +1,2 @@
1
1
  export { default } from "./Component";
2
- export type { CardComponentProps } from "./types";
2
+ export type * from "./types";
@@ -2,8 +2,8 @@ import { CardProps } from "antd";
2
2
  export interface CardComponentProps {
3
3
  title?: React.ReactNode;
4
4
  onClick?: React.MouseEventHandler<HTMLElement>;
5
- className?: string;
6
- classNames?: CardProps['classNames'];
5
+ classNames?: string[];
6
+ className?: CardProps['classNames'];
7
7
  style?: React.CSSProperties;
8
8
  children?: React.ReactNode;
9
9
  }
@@ -0,0 +1,5 @@
1
+ import { CascaderComponentProps } from "./types";
2
+ import { DefaultOptionType } from "rc-cascader";
3
+ import React from "react";
4
+ declare const CascaderComponent: <OptionType extends DefaultOptionType, ValueField extends keyof OptionType>({ noItem, size, classNames, variant, expandTrigger, open, disabled, suffixIcon, placeholder, value, defaultValue, options, displayRender, onChange, onSearch, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, ref, }: CascaderComponentProps<OptionType, ValueField>) => React.ReactElement;
5
+ export default CascaderComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,38 @@
1
+ import { formColLayout } from "../../constants";
2
+ import { Variant } from "antd/es/config-provider";
3
+ import { SizeType } from "antd/es/config-provider/SizeContext";
4
+ import { ValidateStatus } from "antd/es/form/FormItem";
5
+ import { CascaderProps, DefaultOptionType } from "rc-cascader";
6
+ import { Rule, RuleObject } from "rc-field-form/es/interface";
7
+ import { Ref } from "react";
8
+ export interface CascaderComponentRef<OptionType extends DefaultOptionType, ValueField extends keyof OptionType> {
9
+ value: () => CascaderProps<OptionType, ValueField>['value'];
10
+ setValue: React.Dispatch<React.SetStateAction<CascaderProps<OptionType, ValueField>['value']>>;
11
+ }
12
+ export interface CascaderComponentProps<OptionType extends DefaultOptionType, ValueField extends keyof OptionType> {
13
+ noItem?: boolean;
14
+ size?: SizeType;
15
+ classNames?: string[];
16
+ variant?: Variant;
17
+ expandTrigger?: "hover" | "click";
18
+ open?: boolean;
19
+ disabled?: boolean;
20
+ suffixIcon?: React.ReactNode;
21
+ placeholder?: string;
22
+ value?: CascaderProps<OptionType, ValueField>['value'];
23
+ defaultValue?: CascaderProps<OptionType, ValueField>['defaultValue'];
24
+ options?: OptionType[];
25
+ displayRender?: (label: string[], selectedOptions?: OptionType[] | undefined) => React.ReactNode;
26
+ onChange?: CascaderProps<OptionType, ValueField>['onChange'];
27
+ onSearch?: (value: string) => void;
28
+ formColLayout?: typeof formColLayout;
29
+ name?: string;
30
+ label?: React.ReactNode;
31
+ required?: boolean;
32
+ rules?: Rule[];
33
+ ruleType?: RuleObject['type'];
34
+ ruleMessage?: string;
35
+ validateStatus?: ValidateStatus;
36
+ help?: React.ReactNode;
37
+ ref?: Ref<CascaderComponentRef<OptionType, ValueField>>;
38
+ }
@@ -0,0 +1,4 @@
1
+ import { CheckboxComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const CheckboxComponent: React.FC<CheckboxComponentProps>;
4
+ export default CheckboxComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,28 @@
1
+ import { formColLayout } from "../../constants";
2
+ import { CheckboxChangeEvent } from "antd";
3
+ import { ValidateStatus } from "antd/es/form/FormItem";
4
+ import { Rule, RuleObject } from "rc-field-form/lib/interface";
5
+ import { Ref } from "react";
6
+ export interface CheckboxComponentRef {
7
+ checked: () => boolean;
8
+ setChecked: React.Dispatch<React.SetStateAction<boolean>>;
9
+ }
10
+ export interface CheckboxComponentProps {
11
+ noItem?: boolean;
12
+ loading?: boolean;
13
+ disabled?: boolean;
14
+ checked?: boolean;
15
+ defaultChecked?: boolean;
16
+ onChange?: (name: string | undefined, event: CheckboxChangeEvent) => void;
17
+ formColLayout?: typeof formColLayout;
18
+ name?: string;
19
+ label?: React.ReactNode;
20
+ required?: boolean;
21
+ rules?: Rule[];
22
+ ruleType?: RuleObject['type'];
23
+ ruleMessage?: string;
24
+ validateStatus?: ValidateStatus;
25
+ help?: React.ReactNode;
26
+ children?: React.ReactNode;
27
+ ref?: Ref<CheckboxComponentRef>;
28
+ }
@@ -0,0 +1,4 @@
1
+ import { DatePickerComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const DatePickerComponent: React.FC<DatePickerComponentProps>;
4
+ export default DatePickerComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,39 @@
1
+ import { formColLayout } from "../../constants";
2
+ import { Variant } from "antd/es/config-provider";
3
+ import { SizeType } from "antd/es/config-provider/SizeContext";
4
+ import { DatePickerProps } from "antd/es/date-picker";
5
+ import { Rule, RuleObject } from "antd/es/form";
6
+ import { ValidateStatus } from "antd/es/form/FormItem";
7
+ import { Dayjs } from "dayjs";
8
+ import { SemanticStructure } from "rc-picker/lib/interface";
9
+ import { Ref } from "react";
10
+ export interface DatePickerComponentRef {
11
+ value: () => Dayjs | null | undefined;
12
+ setValue: React.Dispatch<React.SetStateAction<Dayjs | null | undefined>>;
13
+ }
14
+ export interface DatePickerComponentProps {
15
+ noItem?: boolean;
16
+ size?: SizeType;
17
+ variant?: Variant;
18
+ picker?: DatePickerProps['picker'];
19
+ loading?: boolean;
20
+ disabled?: boolean;
21
+ disabledDate?: DatePickerProps['disabledDate'];
22
+ disabledTime?: DatePickerProps['disabledTime'];
23
+ value?: DatePickerProps['value'];
24
+ defaultValue?: DatePickerProps['value'];
25
+ onChange?: (name: string | undefined, date: Dayjs, dateStrings: string | string[]) => void;
26
+ style?: React.CSSProperties;
27
+ formColLayout?: typeof formColLayout;
28
+ name?: string;
29
+ label?: React.ReactNode;
30
+ classNames?: string[];
31
+ className?: Partial<Record<SemanticStructure, string>>;
32
+ required?: boolean;
33
+ rules?: Rule[];
34
+ ruleType?: RuleObject['type'];
35
+ ruleMessage?: string;
36
+ validateStatus?: ValidateStatus;
37
+ help?: React.ReactNode;
38
+ ref?: Ref<DatePickerComponentRef>;
39
+ }
@@ -0,0 +1,4 @@
1
+ import { DateRangePickerComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const DateRangePickerComponent: React.FC<DateRangePickerComponentProps>;
4
+ export default DateRangePickerComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,41 @@
1
+ import { formColLayout } from "../../constants";
2
+ import { DatePicker, DatePickerProps } from "antd";
3
+ import { Variant } from "antd/es/config-provider";
4
+ import { SizeType } from "antd/es/config-provider/SizeContext";
5
+ import { RangePickerProps } from "antd/es/date-picker";
6
+ import { ValidateStatus } from "antd/es/form/FormItem";
7
+ import dayjs from "dayjs";
8
+ import { Rule, RuleObject } from "rc-field-form/lib/interface";
9
+ import { SemanticStructure } from "rc-picker/lib/interface";
10
+ import { RangeValueType } from "rc-picker/lib/PickerInput/RangePicker";
11
+ import { Ref } from "react";
12
+ export interface DateRangePickerComponentRef {
13
+ value: () => RangeValueType<dayjs.Dayjs> | null | undefined;
14
+ setValue: React.Dispatch<React.SetStateAction<RangeValueType<dayjs.Dayjs> | null | undefined>>;
15
+ }
16
+ export interface DateRangePickerComponentProps {
17
+ noItem?: boolean;
18
+ size?: SizeType;
19
+ variant?: Variant;
20
+ picker?: DatePickerProps['picker'];
21
+ loading?: boolean;
22
+ disabled?: boolean;
23
+ disabledDate?: RangePickerProps['disabledDate'];
24
+ disabledTime?: RangePickerProps['disabledTime'];
25
+ value?: RangePickerProps['value'];
26
+ defaultValue?: RangePickerProps['value'];
27
+ onChange?: (name: string | undefined, date: Parameters<NonNullable<React.ComponentProps<typeof DatePicker.RangePicker>['onChange']>>[0], dateStrings: Parameters<NonNullable<React.ComponentProps<typeof DatePicker.RangePicker>['onChange']>>[1]) => void;
28
+ style?: React.CSSProperties;
29
+ formColLayout?: typeof formColLayout;
30
+ name?: string;
31
+ label?: React.ReactNode;
32
+ classNames?: string[];
33
+ className?: Partial<Record<SemanticStructure, string>>;
34
+ required?: boolean;
35
+ rules?: Rule[];
36
+ ruleType?: RuleObject['type'];
37
+ ruleMessage?: string;
38
+ validateStatus?: ValidateStatus;
39
+ help?: React.ReactNode;
40
+ ref?: Ref<DateRangePickerComponentRef>;
41
+ }
@@ -0,0 +1,4 @@
1
+ import { DropdownButtonComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const DropdownButtonComponent: <T>({ triger, placement, menuItems, disabled, data, }: DropdownButtonComponentProps<T>) => React.ReactElement;
4
+ export default DropdownButtonComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,16 @@
1
+ import { DropDownProps } from "antd";
2
+ export interface DropdownButtonMenuItem<T> {
3
+ key: string;
4
+ label: string;
5
+ icon?: React.ReactNode;
6
+ type?: "primary" | "success" | "danger";
7
+ href?: string;
8
+ onClick?: (data?: T) => void;
9
+ }
10
+ export interface DropdownButtonComponentProps<T> {
11
+ triger?: DropDownProps['trigger'];
12
+ placement?: DropDownProps['placement'];
13
+ menuItems?: DropdownButtonMenuItem<T>[];
14
+ disabled?: boolean;
15
+ data?: T;
16
+ }
@@ -0,0 +1,4 @@
1
+ import { FormItemComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const FormItemComponent: React.FC<FormItemComponentProps>;
4
+ export default FormItemComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,21 @@
1
+ import { formColLayout } from "../../constants";
2
+ import { ValidateStatus } from "antd/es/form/FormItem";
3
+ import { Rule, RuleObject, Store, StoreValue } from "rc-field-form/lib/interface";
4
+ import React from "react";
5
+ export interface FormItemComponentProps {
6
+ noItem?: boolean;
7
+ formColLayout?: typeof formColLayout;
8
+ name?: string;
9
+ label?: React.ReactNode;
10
+ normalize?: ((value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue);
11
+ required?: boolean;
12
+ rules?: Rule[];
13
+ ruleType?: RuleObject['type'];
14
+ ruleMessage?: string;
15
+ ruleMin?: number;
16
+ ruleMax?: number;
17
+ valuePropName?: string;
18
+ validateStatus?: ValidateStatus;
19
+ help?: React.ReactNode;
20
+ children?: React.ReactNode;
21
+ }
@@ -0,0 +1,4 @@
1
+ import { IconCheckOrCloseProps } from "./types";
2
+ import React from "react";
3
+ declare const IconCheckOrClose: React.FC<IconCheckOrCloseProps>;
4
+ export default IconCheckOrClose;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,5 @@
1
+ export interface IconCheckOrCloseProps {
2
+ check: boolean;
3
+ classNames?: string[];
4
+ style?: React.CSSProperties;
5
+ }
@@ -0,0 +1,4 @@
1
+ import { InputComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const InputComponent: React.FC<InputComponentProps>;
4
+ export default InputComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,55 @@
1
+ import { formColLayout } from "../../constants";
2
+ import { Variant } from "antd/es/config-provider";
3
+ import { SizeType } from "antd/es/config-provider/SizeContext";
4
+ import { ValidateStatus } from "antd/es/form/FormItem";
5
+ import { valueType } from "antd/es/statistic/utils";
6
+ import { Rule, RuleObject } from "rc-field-form/lib/interface";
7
+ import { Ref } from "react";
8
+ export interface InputComponentRef {
9
+ value: () => valueType;
10
+ setValue: React.Dispatch<React.SetStateAction<valueType>>;
11
+ }
12
+ export interface InputComponentProps {
13
+ noItem?: boolean;
14
+ password?: boolean;
15
+ autoFocus?: boolean;
16
+ allowClear?: boolean | {
17
+ clearIcon?: React.ReactNode;
18
+ };
19
+ size?: SizeType;
20
+ classNames?: string[];
21
+ variant?: Variant;
22
+ loading?: boolean;
23
+ disabled?: boolean;
24
+ readOnly?: boolean;
25
+ maxLength?: number;
26
+ addonBefore?: React.ReactNode;
27
+ addonAfter?: React.ReactNode;
28
+ prefix?: React.ReactNode;
29
+ suffix?: React.ReactNode;
30
+ placeholder?: string;
31
+ value?: valueType;
32
+ defaultValue?: valueType;
33
+ onChange?: (name: string | undefined, event: React.ChangeEvent<HTMLInputElement>) => void;
34
+ onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
35
+ onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;
36
+ onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
37
+ onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
38
+ onClick?: React.MouseEventHandler<HTMLInputElement>;
39
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
40
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
41
+ formColLayout?: typeof formColLayout;
42
+ name?: string;
43
+ label?: React.ReactNode;
44
+ uppercase?: boolean;
45
+ number?: boolean;
46
+ required?: boolean;
47
+ rules?: Rule[];
48
+ ruleType?: RuleObject['type'];
49
+ ruleMessage?: string;
50
+ ruleMin?: number;
51
+ ruleMax?: number;
52
+ validateStatus?: ValidateStatus;
53
+ help?: React.ReactNode;
54
+ ref?: Ref<InputComponentRef>;
55
+ }
@@ -0,0 +1,4 @@
1
+ import { LinkComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const LinkComponent: React.FC<LinkComponentProps>;
4
+ export default LinkComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,4 @@
1
+ export interface LinkComponentProps {
2
+ href: string;
3
+ children?: React.ReactNode;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { NumberFormatComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const NumberFormatComponent: React.FC<NumberFormatComponentProps>;
4
+ export default NumberFormatComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,37 @@
1
+ import { valueType } from "antd/es/statistic/utils";
2
+ import { Ref } from "react";
3
+ import { SourceInfo } from "react-number-format";
4
+ export interface NumberFormatComponentRef {
5
+ value: () => valueType;
6
+ setValue: React.Dispatch<React.SetStateAction<valueType>>;
7
+ }
8
+ export interface NumberFormatComponentProps {
9
+ text?: boolean;
10
+ size?: 'small';
11
+ align?: 'right';
12
+ className?: string[];
13
+ variant?: 'borderless' | 'underlined';
14
+ trailing?: number;
15
+ prefix?: string;
16
+ suffix?: string;
17
+ placeholder?: string;
18
+ disabled?: boolean;
19
+ readOnly?: boolean;
20
+ required?: boolean;
21
+ allowNegative?: boolean;
22
+ min?: number;
23
+ max?: number;
24
+ value?: valueType;
25
+ defaultValue?: valueType;
26
+ onChange?: (name: string | undefined, info: SourceInfo) => void;
27
+ style?: React.CSSProperties;
28
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
29
+ onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
30
+ onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
31
+ onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
32
+ onFocus?: React.FocusEventHandler<HTMLDivElement>;
33
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
34
+ name?: string;
35
+ validateStatus?: 'error';
36
+ ref?: Ref<NumberFormatComponentRef>;
37
+ }
@@ -0,0 +1,9 @@
1
+ import { SelectAsyncFormat } from "../../../helpers";
2
+ import { SelectAsyncComponentProps } from "./types";
3
+ import React from "react";
4
+ export declare const formatName: SelectAsyncFormat;
5
+ export declare const formatDescription: SelectAsyncFormat;
6
+ export declare const formatCodeName: SelectAsyncFormat;
7
+ export declare const formatCodeDescription: SelectAsyncFormat;
8
+ declare const SelectAsyncComponent: React.FC<SelectAsyncComponentProps>;
9
+ export default SelectAsyncComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,17 @@
1
+ import { SelectComponentProps, SelectOption } from "../types";
2
+ import { valueType } from "antd/es/statistic/utils";
3
+ import { Ref } from "react";
4
+ export type SelectAsyncComponentRef = {
5
+ setIsInit: React.Dispatch<React.SetStateAction<boolean>>;
6
+ options: () => SelectOption[];
7
+ setOptions: React.Dispatch<React.SetStateAction<SelectOption[]>>;
8
+ value: () => string | number | undefined;
9
+ setValue: React.Dispatch<React.SetStateAction<string | number | undefined>>;
10
+ };
11
+ export type SelectAsyncComponentProps = SelectComponentProps & {
12
+ initOptions?: SelectOption[];
13
+ initValue?: valueType;
14
+ fetchOptions?: (search: string) => Promise<any[]>;
15
+ debounceTimeout?: number;
16
+ ref?: Ref<SelectAsyncComponentRef>;
17
+ };
@@ -0,0 +1,4 @@
1
+ import { SelectComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const SelectComponent: React.FC<SelectComponentProps>;
4
+ export default SelectComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,47 @@
1
+ import { formColLayout } from "../../constants";
2
+ import { SelectProps } from "antd";
3
+ import { Variant } from "antd/es/config-provider";
4
+ import { SizeType } from "antd/es/config-provider/SizeContext";
5
+ import { Rule, RuleObject } from "antd/es/form";
6
+ import { ValidateStatus } from "antd/es/form/FormItem";
7
+ import { DefaultOptionType } from "antd/es/select";
8
+ export type SelectOption = (DefaultOptionType & {
9
+ text?: React.ReactNode;
10
+ encryption_id?: string;
11
+ });
12
+ export interface SelectComponentProps {
13
+ noItem?: boolean;
14
+ showSearch?: boolean;
15
+ mode?: SelectProps['mode'];
16
+ variant?: Variant;
17
+ size?: SizeType;
18
+ suffixIcon?: React.ReactNode;
19
+ className?: string[];
20
+ loading?: boolean;
21
+ disabled?: boolean;
22
+ open?: boolean;
23
+ filterOption?: SelectProps['filterOption'];
24
+ placeholder?: React.ReactNode;
25
+ value?: any;
26
+ defaultValue?: any;
27
+ onChange?: (name: string | undefined, value: any, option?: SelectOption | SelectOption[]) => void;
28
+ onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
29
+ onSearch?: (value: string) => void;
30
+ onFocus?: React.FocusEventHandler<HTMLElement>;
31
+ notFoundContent?: React.ReactNode;
32
+ tokenSeparators?: string[];
33
+ options?: SelectOption[];
34
+ style?: React.CSSProperties;
35
+ addItem?: {
36
+ onClick?: (value: string) => void;
37
+ };
38
+ formColLayout?: typeof formColLayout;
39
+ name?: string;
40
+ label?: React.ReactNode;
41
+ required?: boolean;
42
+ rules?: Rule[];
43
+ ruleType?: RuleObject['type'];
44
+ ruleMessage?: string;
45
+ validateStatus?: ValidateStatus;
46
+ help?: React.ReactNode;
47
+ }
@@ -0,0 +1,4 @@
1
+ import { SwitchComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const SwitchComponent: React.FC<SwitchComponentProps>;
4
+ export default SwitchComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,24 @@
1
+ import { formColLayout } from "../../constants";
2
+ import { ValidateStatus } from "antd/es/form/FormItem";
3
+ import { Rule, RuleObject } from "rc-field-form/lib/interface";
4
+ import React from "react";
5
+ export interface SwitchComponentProps {
6
+ noItem?: boolean;
7
+ icon?: boolean;
8
+ checkedChildren?: React.ReactNode;
9
+ unCheckedChildren?: React.ReactNode;
10
+ loading?: boolean;
11
+ disabled?: boolean;
12
+ checked?: boolean;
13
+ defaultChecked?: boolean;
14
+ onChange?: (name: string | undefined, checked: boolean, event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
15
+ formColLayout?: typeof formColLayout;
16
+ name?: string;
17
+ label?: React.ReactNode;
18
+ required?: boolean;
19
+ rules?: Rule[];
20
+ ruleType?: RuleObject['type'];
21
+ ruleMessage?: string;
22
+ validateStatus?: ValidateStatus;
23
+ help?: React.ReactNode;
24
+ }
@@ -0,0 +1,4 @@
1
+ import { TabsComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const TabsComponent: React.FC<TabsComponentProps>;
4
+ export default TabsComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";
@@ -0,0 +1,13 @@
1
+ import { TabsPosition, TabsProps, TabsType } from "antd/es/tabs";
2
+ export interface TabsComponentProps {
3
+ centered?: boolean;
4
+ type?: TabsType;
5
+ tabPosition?: TabsPosition;
6
+ tabBarExtraContent?: TabsProps['tabBarExtraContent'];
7
+ tabBarGutter?: number;
8
+ tabs: {
9
+ name: string;
10
+ icon?: React.ReactNode;
11
+ content: React.ReactNode;
12
+ }[];
13
+ }
@@ -0,0 +1,4 @@
1
+ import { TagComponentProps } from "./types";
2
+ import React from "react";
3
+ declare const TagComponent: React.FC<TagComponentProps>;
4
+ export default TagComponent;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Component";
2
+ export type * from "./types";