@salutejs/plasma-new-hope 0.186.0-canary.1541.11711445984.0 → 0.186.0-canary.1542.11725164051.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +22 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js.map +1 -0
- package/cjs/components/Combobox/ComboboxNew/utils/getForm.js +80 -0
- package/cjs/components/Combobox/ComboboxNew/utils/getForm.js.map +1 -0
- package/cjs/{utils → components/Combobox/ComboboxNew/utils}/syntheticEvent.js +0 -1
- package/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js.map +1 -0
- package/cjs/components/TextField/TextField.js +0 -11
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/index.js +4 -0
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +21 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/index.js +15 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/getForm.js +89 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/index.js +8 -1
- package/{styled-components/cjs → emotion/cjs/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
- package/emotion/cjs/components/Combobox/index.js +12 -0
- package/emotion/cjs/components/TextField/TextField.js +1 -12
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +6 -2
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -5
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
- package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.js +6 -2
- package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.boundler.js +14 -0
- package/emotion/es/components/Combobox/ComboboxNew/index.js +3 -1
- package/emotion/es/components/Combobox/ComboboxNew/utils/getForm.js +80 -0
- package/emotion/es/components/Combobox/ComboboxNew/utils/index.js +2 -1
- package/{styled-components/es → emotion/es/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
- package/emotion/es/components/Combobox/index.js +1 -1
- package/emotion/es/components/TextField/TextField.js +1 -12
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.js +6 -2
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -5
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
- package/emotion/es/examples/plasma_web/components/Combobox/Combobox.js +6 -2
- package/emotion/es/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
- package/es/components/Combobox/ComboboxNew/Combobox.boundler.js +18 -0
- package/es/components/Combobox/ComboboxNew/Combobox.boundler.js.map +1 -0
- package/es/components/Combobox/ComboboxNew/utils/getForm.js +76 -0
- package/es/components/Combobox/ComboboxNew/utils/getForm.js.map +1 -0
- package/es/{utils → components/Combobox/ComboboxNew/utils}/syntheticEvent.js +0 -1
- package/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js.map +1 -0
- package/es/components/TextField/TextField.js +0 -11
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +21 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/index.js +15 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getForm.js +89 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/index.js +8 -1
- package/{emotion/cjs → styled-components/cjs/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
- package/styled-components/cjs/components/Combobox/index.js +12 -0
- package/styled-components/cjs/components/TextField/TextField.js +0 -11
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +6 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -5
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
- package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.js +6 -2
- package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.boundler.js +14 -0
- package/styled-components/es/components/Combobox/ComboboxNew/index.js +3 -1
- package/styled-components/es/components/Combobox/ComboboxNew/utils/getForm.js +80 -0
- package/styled-components/es/components/Combobox/ComboboxNew/utils/index.js +2 -1
- package/{emotion/es → styled-components/es/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
- package/styled-components/es/components/Combobox/index.js +1 -1
- package/styled-components/es/components/TextField/TextField.js +0 -11
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.js +6 -2
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -5
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
- package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.js +6 -2
- package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
- package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +21 -0
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/index.d.ts +2 -0
- package/types/components/Combobox/ComboboxNew/index.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts +1 -0
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts.map +1 -0
- package/types/components/Combobox/index.d.ts +1 -1
- package/types/components/Combobox/index.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +459 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +459 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
- package/cjs/utils/syntheticEvent.js.map +0 -1
- package/es/utils/syntheticEvent.js.map +0 -1
- package/types/utils/syntheticEvent.d.ts +0 -4
- package/types/utils/syntheticEvent.d.ts.map +0 -1
@@ -917,5 +917,463 @@ declare const Combobox: <T extends ItemOption>(props: Omit<ComboboxProps<T>, "vi
|
|
917
917
|
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>)), "view" | "disabled" | "readOnly" | "size" | "labelPlacement"> & {
|
918
918
|
ref?: ForwardedRef<HTMLInputElement> | undefined;
|
919
919
|
}) => ReactElement | null;
|
920
|
-
|
920
|
+
declare const ComboboxWithForm: <T extends ItemOption>(props: Omit<ComboboxProps<T>, "view" | "disabled" | "readOnly" | "size" | "labelPlacement"> & Pick<import("../../../../engines/types").PropsType<{
|
921
|
+
view: {
|
922
|
+
default: import("@linaria/core").LinariaClassName;
|
923
|
+
positive: import("@linaria/core").LinariaClassName;
|
924
|
+
warning: import("@linaria/core").LinariaClassName;
|
925
|
+
negative: import("@linaria/core").LinariaClassName;
|
926
|
+
};
|
927
|
+
size: {
|
928
|
+
l: import("@linaria/core").LinariaClassName;
|
929
|
+
m: import("@linaria/core").LinariaClassName;
|
930
|
+
s: import("@linaria/core").LinariaClassName;
|
931
|
+
xs: import("@linaria/core").LinariaClassName;
|
932
|
+
};
|
933
|
+
labelPlacement: {
|
934
|
+
inner: import("@linaria/core").LinariaClassName;
|
935
|
+
outer: import("@linaria/core").LinariaClassName;
|
936
|
+
};
|
937
|
+
disabled: {
|
938
|
+
true: import("@linaria/core").LinariaClassName;
|
939
|
+
};
|
940
|
+
readOnly: {
|
941
|
+
true: import("@linaria/core").LinariaClassName;
|
942
|
+
};
|
943
|
+
}> & (({
|
944
|
+
items: ItemOption[];
|
945
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
946
|
+
label?: string | undefined;
|
947
|
+
placeholder?: string | undefined;
|
948
|
+
helperText?: string | undefined;
|
949
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
950
|
+
textBefore?: string | undefined;
|
951
|
+
textAfter?: string | undefined;
|
952
|
+
variant?: "normal" | "tight" | undefined;
|
953
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
954
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
955
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
956
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
957
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
958
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
959
|
+
closeAfterSelect?: boolean | undefined;
|
960
|
+
size?: string | undefined;
|
961
|
+
view?: string | undefined;
|
962
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
963
|
+
} & {
|
964
|
+
readOnly?: boolean | undefined;
|
965
|
+
disabled?: true | undefined;
|
966
|
+
alwaysOpened?: false | undefined;
|
967
|
+
} & {
|
968
|
+
multiple?: false | undefined;
|
969
|
+
value?: string | undefined;
|
970
|
+
onChange?: ((value: string) => void) | undefined;
|
971
|
+
isTargetAmount?: false | undefined;
|
972
|
+
targetAmount?: undefined;
|
973
|
+
renderValue?: undefined;
|
974
|
+
} & {
|
975
|
+
requiredPlacement?: "left" | "right" | undefined;
|
976
|
+
} & {
|
977
|
+
required: true;
|
978
|
+
optional?: false | undefined;
|
979
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
980
|
+
items: ItemOption[];
|
981
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
982
|
+
label?: string | undefined;
|
983
|
+
placeholder?: string | undefined;
|
984
|
+
helperText?: string | undefined;
|
985
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
986
|
+
textBefore?: string | undefined;
|
987
|
+
textAfter?: string | undefined;
|
988
|
+
variant?: "normal" | "tight" | undefined;
|
989
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
990
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
991
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
992
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
993
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
994
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
995
|
+
closeAfterSelect?: boolean | undefined;
|
996
|
+
size?: string | undefined;
|
997
|
+
view?: string | undefined;
|
998
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
999
|
+
} & {
|
1000
|
+
readOnly?: boolean | undefined;
|
1001
|
+
disabled?: true | undefined;
|
1002
|
+
alwaysOpened?: false | undefined;
|
1003
|
+
} & {
|
1004
|
+
multiple?: false | undefined;
|
1005
|
+
value?: string | undefined;
|
1006
|
+
onChange?: ((value: string) => void) | undefined;
|
1007
|
+
isTargetAmount?: false | undefined;
|
1008
|
+
targetAmount?: undefined;
|
1009
|
+
renderValue?: undefined;
|
1010
|
+
} & {
|
1011
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1012
|
+
} & {
|
1013
|
+
optional?: true | undefined;
|
1014
|
+
required?: false | undefined;
|
1015
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
1016
|
+
items: ItemOption[];
|
1017
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
1018
|
+
label?: string | undefined;
|
1019
|
+
placeholder?: string | undefined;
|
1020
|
+
helperText?: string | undefined;
|
1021
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
1022
|
+
textBefore?: string | undefined;
|
1023
|
+
textAfter?: string | undefined;
|
1024
|
+
variant?: "normal" | "tight" | undefined;
|
1025
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
1026
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
1027
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
1028
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
1029
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
1030
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
1031
|
+
closeAfterSelect?: boolean | undefined;
|
1032
|
+
size?: string | undefined;
|
1033
|
+
view?: string | undefined;
|
1034
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
1035
|
+
} & {
|
1036
|
+
readOnly?: boolean | undefined;
|
1037
|
+
disabled?: true | undefined;
|
1038
|
+
alwaysOpened?: false | undefined;
|
1039
|
+
} & {
|
1040
|
+
multiple: true;
|
1041
|
+
value?: string[] | undefined;
|
1042
|
+
onChange?: ((value: string[]) => void) | undefined;
|
1043
|
+
isTargetAmount?: true | undefined;
|
1044
|
+
targetAmount?: number | undefined;
|
1045
|
+
renderValue?: ((item: ItemOption) => string) | undefined;
|
1046
|
+
} & {
|
1047
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1048
|
+
} & {
|
1049
|
+
required: true;
|
1050
|
+
optional?: false | undefined;
|
1051
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
1052
|
+
items: ItemOption[];
|
1053
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
1054
|
+
label?: string | undefined;
|
1055
|
+
placeholder?: string | undefined;
|
1056
|
+
helperText?: string | undefined;
|
1057
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
1058
|
+
textBefore?: string | undefined;
|
1059
|
+
textAfter?: string | undefined;
|
1060
|
+
variant?: "normal" | "tight" | undefined;
|
1061
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
1062
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
1063
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
1064
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
1065
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
1066
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
1067
|
+
closeAfterSelect?: boolean | undefined;
|
1068
|
+
size?: string | undefined;
|
1069
|
+
view?: string | undefined;
|
1070
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
1071
|
+
} & {
|
1072
|
+
readOnly?: boolean | undefined;
|
1073
|
+
disabled?: true | undefined;
|
1074
|
+
alwaysOpened?: false | undefined;
|
1075
|
+
} & {
|
1076
|
+
multiple: true;
|
1077
|
+
value?: string[] | undefined;
|
1078
|
+
onChange?: ((value: string[]) => void) | undefined;
|
1079
|
+
isTargetAmount?: true | undefined;
|
1080
|
+
targetAmount?: number | undefined;
|
1081
|
+
renderValue?: ((item: ItemOption) => string) | undefined;
|
1082
|
+
} & {
|
1083
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1084
|
+
} & {
|
1085
|
+
optional?: true | undefined;
|
1086
|
+
required?: false | undefined;
|
1087
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
1088
|
+
items: ItemOption[];
|
1089
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
1090
|
+
label?: string | undefined;
|
1091
|
+
placeholder?: string | undefined;
|
1092
|
+
helperText?: string | undefined;
|
1093
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
1094
|
+
textBefore?: string | undefined;
|
1095
|
+
textAfter?: string | undefined;
|
1096
|
+
variant?: "normal" | "tight" | undefined;
|
1097
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
1098
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
1099
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
1100
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
1101
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
1102
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
1103
|
+
closeAfterSelect?: boolean | undefined;
|
1104
|
+
size?: string | undefined;
|
1105
|
+
view?: string | undefined;
|
1106
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
1107
|
+
} & {
|
1108
|
+
readOnly?: true | undefined;
|
1109
|
+
disabled?: boolean | undefined;
|
1110
|
+
alwaysOpened?: false | undefined;
|
1111
|
+
} & {
|
1112
|
+
multiple?: false | undefined;
|
1113
|
+
value?: string | undefined;
|
1114
|
+
onChange?: ((value: string) => void) | undefined;
|
1115
|
+
isTargetAmount?: false | undefined;
|
1116
|
+
targetAmount?: undefined;
|
1117
|
+
renderValue?: undefined;
|
1118
|
+
} & {
|
1119
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1120
|
+
} & {
|
1121
|
+
required: true;
|
1122
|
+
optional?: false | undefined;
|
1123
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
1124
|
+
items: ItemOption[];
|
1125
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
1126
|
+
label?: string | undefined;
|
1127
|
+
placeholder?: string | undefined;
|
1128
|
+
helperText?: string | undefined;
|
1129
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
1130
|
+
textBefore?: string | undefined;
|
1131
|
+
textAfter?: string | undefined;
|
1132
|
+
variant?: "normal" | "tight" | undefined;
|
1133
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
1134
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
1135
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
1136
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
1137
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
1138
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
1139
|
+
closeAfterSelect?: boolean | undefined;
|
1140
|
+
size?: string | undefined;
|
1141
|
+
view?: string | undefined;
|
1142
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
1143
|
+
} & {
|
1144
|
+
readOnly?: true | undefined;
|
1145
|
+
disabled?: boolean | undefined;
|
1146
|
+
alwaysOpened?: false | undefined;
|
1147
|
+
} & {
|
1148
|
+
multiple?: false | undefined;
|
1149
|
+
value?: string | undefined;
|
1150
|
+
onChange?: ((value: string) => void) | undefined;
|
1151
|
+
isTargetAmount?: false | undefined;
|
1152
|
+
targetAmount?: undefined;
|
1153
|
+
renderValue?: undefined;
|
1154
|
+
} & {
|
1155
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1156
|
+
} & {
|
1157
|
+
optional?: true | undefined;
|
1158
|
+
required?: false | undefined;
|
1159
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
1160
|
+
items: ItemOption[];
|
1161
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
1162
|
+
label?: string | undefined;
|
1163
|
+
placeholder?: string | undefined;
|
1164
|
+
helperText?: string | undefined;
|
1165
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
1166
|
+
textBefore?: string | undefined;
|
1167
|
+
textAfter?: string | undefined;
|
1168
|
+
variant?: "normal" | "tight" | undefined;
|
1169
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
1170
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
1171
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
1172
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
1173
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
1174
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
1175
|
+
closeAfterSelect?: boolean | undefined;
|
1176
|
+
size?: string | undefined;
|
1177
|
+
view?: string | undefined;
|
1178
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
1179
|
+
} & {
|
1180
|
+
readOnly?: true | undefined;
|
1181
|
+
disabled?: boolean | undefined;
|
1182
|
+
alwaysOpened?: false | undefined;
|
1183
|
+
} & {
|
1184
|
+
multiple: true;
|
1185
|
+
value?: string[] | undefined;
|
1186
|
+
onChange?: ((value: string[]) => void) | undefined;
|
1187
|
+
isTargetAmount?: true | undefined;
|
1188
|
+
targetAmount?: number | undefined;
|
1189
|
+
renderValue?: ((item: ItemOption) => string) | undefined;
|
1190
|
+
} & {
|
1191
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1192
|
+
} & {
|
1193
|
+
required: true;
|
1194
|
+
optional?: false | undefined;
|
1195
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
1196
|
+
items: ItemOption[];
|
1197
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
1198
|
+
label?: string | undefined;
|
1199
|
+
placeholder?: string | undefined;
|
1200
|
+
helperText?: string | undefined;
|
1201
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
1202
|
+
textBefore?: string | undefined;
|
1203
|
+
textAfter?: string | undefined;
|
1204
|
+
variant?: "normal" | "tight" | undefined;
|
1205
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
1206
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
1207
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
1208
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
1209
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
1210
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
1211
|
+
closeAfterSelect?: boolean | undefined;
|
1212
|
+
size?: string | undefined;
|
1213
|
+
view?: string | undefined;
|
1214
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
1215
|
+
} & {
|
1216
|
+
readOnly?: true | undefined;
|
1217
|
+
disabled?: boolean | undefined;
|
1218
|
+
alwaysOpened?: false | undefined;
|
1219
|
+
} & {
|
1220
|
+
multiple: true;
|
1221
|
+
value?: string[] | undefined;
|
1222
|
+
onChange?: ((value: string[]) => void) | undefined;
|
1223
|
+
isTargetAmount?: true | undefined;
|
1224
|
+
targetAmount?: number | undefined;
|
1225
|
+
renderValue?: ((item: ItemOption) => string) | undefined;
|
1226
|
+
} & {
|
1227
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1228
|
+
} & {
|
1229
|
+
optional?: true | undefined;
|
1230
|
+
required?: false | undefined;
|
1231
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
1232
|
+
items: ItemOption[];
|
1233
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
1234
|
+
label?: string | undefined;
|
1235
|
+
placeholder?: string | undefined;
|
1236
|
+
helperText?: string | undefined;
|
1237
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
1238
|
+
textBefore?: string | undefined;
|
1239
|
+
textAfter?: string | undefined;
|
1240
|
+
variant?: "normal" | "tight" | undefined;
|
1241
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
1242
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
1243
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
1244
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
1245
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
1246
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
1247
|
+
closeAfterSelect?: boolean | undefined;
|
1248
|
+
size?: string | undefined;
|
1249
|
+
view?: string | undefined;
|
1250
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
1251
|
+
} & {
|
1252
|
+
readOnly?: false | undefined;
|
1253
|
+
disabled?: false | undefined;
|
1254
|
+
alwaysOpened?: true | undefined;
|
1255
|
+
} & {
|
1256
|
+
multiple?: false | undefined;
|
1257
|
+
value?: string | undefined;
|
1258
|
+
onChange?: ((value: string) => void) | undefined;
|
1259
|
+
isTargetAmount?: false | undefined;
|
1260
|
+
targetAmount?: undefined;
|
1261
|
+
renderValue?: undefined;
|
1262
|
+
} & {
|
1263
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1264
|
+
} & {
|
1265
|
+
required: true;
|
1266
|
+
optional?: false | undefined;
|
1267
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
1268
|
+
items: ItemOption[];
|
1269
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
1270
|
+
label?: string | undefined;
|
1271
|
+
placeholder?: string | undefined;
|
1272
|
+
helperText?: string | undefined;
|
1273
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
1274
|
+
textBefore?: string | undefined;
|
1275
|
+
textAfter?: string | undefined;
|
1276
|
+
variant?: "normal" | "tight" | undefined;
|
1277
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
1278
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
1279
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
1280
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
1281
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
1282
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
1283
|
+
closeAfterSelect?: boolean | undefined;
|
1284
|
+
size?: string | undefined;
|
1285
|
+
view?: string | undefined;
|
1286
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
1287
|
+
} & {
|
1288
|
+
readOnly?: false | undefined;
|
1289
|
+
disabled?: false | undefined;
|
1290
|
+
alwaysOpened?: true | undefined;
|
1291
|
+
} & {
|
1292
|
+
multiple?: false | undefined;
|
1293
|
+
value?: string | undefined;
|
1294
|
+
onChange?: ((value: string) => void) | undefined;
|
1295
|
+
isTargetAmount?: false | undefined;
|
1296
|
+
targetAmount?: undefined;
|
1297
|
+
renderValue?: undefined;
|
1298
|
+
} & {
|
1299
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1300
|
+
} & {
|
1301
|
+
optional?: true | undefined;
|
1302
|
+
required?: false | undefined;
|
1303
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
1304
|
+
items: ItemOption[];
|
1305
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
1306
|
+
label?: string | undefined;
|
1307
|
+
placeholder?: string | undefined;
|
1308
|
+
helperText?: string | undefined;
|
1309
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
1310
|
+
textBefore?: string | undefined;
|
1311
|
+
textAfter?: string | undefined;
|
1312
|
+
variant?: "normal" | "tight" | undefined;
|
1313
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
1314
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
1315
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
1316
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
1317
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
1318
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
1319
|
+
closeAfterSelect?: boolean | undefined;
|
1320
|
+
size?: string | undefined;
|
1321
|
+
view?: string | undefined;
|
1322
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
1323
|
+
} & {
|
1324
|
+
readOnly?: false | undefined;
|
1325
|
+
disabled?: false | undefined;
|
1326
|
+
alwaysOpened?: true | undefined;
|
1327
|
+
} & {
|
1328
|
+
multiple: true;
|
1329
|
+
value?: string[] | undefined;
|
1330
|
+
onChange?: ((value: string[]) => void) | undefined;
|
1331
|
+
isTargetAmount?: true | undefined;
|
1332
|
+
targetAmount?: number | undefined;
|
1333
|
+
renderValue?: ((item: ItemOption) => string) | undefined;
|
1334
|
+
} & {
|
1335
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1336
|
+
} & {
|
1337
|
+
required: true;
|
1338
|
+
optional?: false | undefined;
|
1339
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>) | ({
|
1340
|
+
items: ItemOption[];
|
1341
|
+
placement?: ("left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | undefined;
|
1342
|
+
label?: string | undefined;
|
1343
|
+
placeholder?: string | undefined;
|
1344
|
+
helperText?: string | undefined;
|
1345
|
+
contentLeft?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
1346
|
+
textBefore?: string | undefined;
|
1347
|
+
textAfter?: string | undefined;
|
1348
|
+
variant?: "normal" | "tight" | undefined;
|
1349
|
+
listOverflow?: import("csstype").Property.Overflow | undefined;
|
1350
|
+
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
1351
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
1352
|
+
portal?: import("react").MutableRefObject<HTMLElement | null> | undefined;
|
1353
|
+
renderItem?: ((item: ItemOption) => import("react").ReactNode) | undefined;
|
1354
|
+
filter?: ((item: ItemOption, textValue: string) => boolean) | undefined;
|
1355
|
+
closeAfterSelect?: boolean | undefined;
|
1356
|
+
size?: string | undefined;
|
1357
|
+
view?: string | undefined;
|
1358
|
+
labelPlacement?: "inner" | "outer" | undefined;
|
1359
|
+
} & {
|
1360
|
+
readOnly?: false | undefined;
|
1361
|
+
disabled?: false | undefined;
|
1362
|
+
alwaysOpened?: true | undefined;
|
1363
|
+
} & {
|
1364
|
+
multiple: true;
|
1365
|
+
value?: string[] | undefined;
|
1366
|
+
onChange?: ((value: string[]) => void) | undefined;
|
1367
|
+
isTargetAmount?: true | undefined;
|
1368
|
+
targetAmount?: number | undefined;
|
1369
|
+
renderValue?: ((item: ItemOption) => string) | undefined;
|
1370
|
+
} & {
|
1371
|
+
requiredPlacement?: "left" | "right" | undefined;
|
1372
|
+
} & {
|
1373
|
+
optional?: true | undefined;
|
1374
|
+
required?: false | undefined;
|
1375
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>)), "view" | "disabled" | "readOnly" | "size" | "labelPlacement"> & {
|
1376
|
+
ref?: ForwardedRef<HTMLInputElement> | undefined;
|
1377
|
+
}) => ReactElement | null;
|
1378
|
+
export { Combobox, ComboboxWithForm };
|
921
1379
|
//# sourceMappingURL=Combobox.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Combobox/Combobox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Combobox/Combobox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAM,MAAM,OAAO,CAAC;AAI5E,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAEjF,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2IAA0B,CAAC;AAElD,aAAK,eAAe,GAAG,MAAM,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC;AAEzD,aAAK,QAAQ,CAAC,CAAC,SAAS,UAAU,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,GACzE,IAAI,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,EAAE,eAAe,CAAC,CAAC;AAEpE,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAET,YAAY,GAAG,IAAI,CAAC;AAEzB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGyE,YAAY,GAAG,IAAI,CAAC;AAEnH,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"syntheticEvent.js","sources":["../../src/utils/syntheticEvent.ts"],"sourcesContent":["import { RefObject } from 'react';\n\nexport const createEvent = (ref: RefObject<HTMLInputElement>) => {\n if (ref.current) {\n const event = new Event('change', { bubbles: true });\n Object.defineProperty(event, 'target', { writable: false, value: ref.current });\n const syntheticEvent = createSyntheticEvent(event) as React.ChangeEvent<typeof ref.current>;\n console.log(syntheticEvent);\n return syntheticEvent;\n }\n\n return null;\n};\n\nexport const createSyntheticEvent = <T extends Element, E extends Event>(event: E): React.SyntheticEvent<T, E> => {\n let isDefaultPrevented = false;\n let isPropagationStopped = false;\n const preventDefault = () => {\n isDefaultPrevented = true;\n event.preventDefault();\n };\n const stopPropagation = () => {\n isPropagationStopped = true;\n event.stopPropagation();\n };\n return {\n nativeEvent: event,\n currentTarget: event.currentTarget as EventTarget & T,\n target: event.target as EventTarget & T,\n bubbles: event.bubbles,\n cancelable: event.cancelable,\n defaultPrevented: event.defaultPrevented,\n eventPhase: event.eventPhase,\n isTrusted: event.isTrusted,\n preventDefault,\n isDefaultPrevented: () => isDefaultPrevented,\n stopPropagation,\n isPropagationStopped: () => isPropagationStopped,\n persist: () => {},\n timeStamp: event.timeStamp,\n type: event.type,\n };\n};\n"],"names":["createEvent","ref","current","event","Event","bubbles","Object","defineProperty","writable","value","syntheticEvent","createSyntheticEvent","console","log","isDefaultPrevented","isPropagationStopped","preventDefault","stopPropagation","nativeEvent","currentTarget","target","cancelable","defaultPrevented","eventPhase","isTrusted","persist","timeStamp","type"],"mappings":";;;;IAEaA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,GAAgC,EAAK;EAC7D,IAAIA,GAAG,CAACC,OAAO,EAAE;AACb,IAAA,IAAMC,KAAK,GAAG,IAAIC,KAAK,CAAC,QAAQ,EAAE;AAAEC,MAAAA,OAAO,EAAE,IAAA;AAAK,KAAC,CAAC,CAAA;AACpDC,IAAAA,MAAM,CAACC,cAAc,CAACJ,KAAK,EAAE,QAAQ,EAAE;AAAEK,MAAAA,QAAQ,EAAE,KAAK;MAAEC,KAAK,EAAER,GAAG,CAACC,OAAAA;AAAQ,KAAC,CAAC,CAAA;AAC/E,IAAA,IAAMQ,cAAc,GAAGC,oBAAoB,CAACR,KAAK,CAA0C,CAAA;AAC3FS,IAAAA,OAAO,CAACC,GAAG,CAACH,cAAc,CAAC,CAAA;AAC3B,IAAA,OAAOA,cAAc,CAAA;AACzB,GAAA;AAEA,EAAA,OAAO,IAAI,CAAA;AACf,EAAC;IAEYC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAwCR,KAAQ,EAAiC;EAC9G,IAAIW,mBAAkB,GAAG,KAAK,CAAA;EAC9B,IAAIC,qBAAoB,GAAG,KAAK,CAAA;AAChC,EAAA,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,GAAS;AACzBF,IAAAA,mBAAkB,GAAG,IAAI,CAAA;IACzBX,KAAK,CAACa,cAAc,EAAE,CAAA;GACzB,CAAA;AACD,EAAA,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAS;AAC1BF,IAAAA,qBAAoB,GAAG,IAAI,CAAA;IAC3BZ,KAAK,CAACc,eAAe,EAAE,CAAA;GAC1B,CAAA;EACD,OAAO;AACHC,IAAAA,WAAW,EAAEf,KAAK;IAClBgB,aAAa,EAAEhB,KAAK,CAACgB,aAAgC;IACrDC,MAAM,EAAEjB,KAAK,CAACiB,MAAyB;IACvCf,OAAO,EAAEF,KAAK,CAACE,OAAO;IACtBgB,UAAU,EAAElB,KAAK,CAACkB,UAAU;IAC5BC,gBAAgB,EAAEnB,KAAK,CAACmB,gBAAgB;IACxCC,UAAU,EAAEpB,KAAK,CAACoB,UAAU;IAC5BC,SAAS,EAAErB,KAAK,CAACqB,SAAS;AAC1BR,IAAAA,cAAc,EAAdA,cAAc;IACdF,kBAAkB,EAAE,SAAAA,kBAAA,GAAA;AAAA,MAAA,OAAMA,mBAAkB,CAAA;AAAA,KAAA;AAC5CG,IAAAA,eAAe,EAAfA,eAAe;IACfF,oBAAoB,EAAE,SAAAA,oBAAA,GAAA;AAAA,MAAA,OAAMA,qBAAoB,CAAA;AAAA,KAAA;AAChDU,IAAAA,OAAO,EAAE,SAAAA,OAAA,GAAM,EAAE;IACjBC,SAAS,EAAEvB,KAAK,CAACuB,SAAS;IAC1BC,IAAI,EAAExB,KAAK,CAACwB,IAAAA;GACf,CAAA;AACL;;;;;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"syntheticEvent.js","sources":["../../src/utils/syntheticEvent.ts"],"sourcesContent":["import { RefObject } from 'react';\n\nexport const createEvent = (ref: RefObject<HTMLInputElement>) => {\n if (ref.current) {\n const event = new Event('change', { bubbles: true });\n Object.defineProperty(event, 'target', { writable: false, value: ref.current });\n const syntheticEvent = createSyntheticEvent(event) as React.ChangeEvent<typeof ref.current>;\n console.log(syntheticEvent);\n return syntheticEvent;\n }\n\n return null;\n};\n\nexport const createSyntheticEvent = <T extends Element, E extends Event>(event: E): React.SyntheticEvent<T, E> => {\n let isDefaultPrevented = false;\n let isPropagationStopped = false;\n const preventDefault = () => {\n isDefaultPrevented = true;\n event.preventDefault();\n };\n const stopPropagation = () => {\n isPropagationStopped = true;\n event.stopPropagation();\n };\n return {\n nativeEvent: event,\n currentTarget: event.currentTarget as EventTarget & T,\n target: event.target as EventTarget & T,\n bubbles: event.bubbles,\n cancelable: event.cancelable,\n defaultPrevented: event.defaultPrevented,\n eventPhase: event.eventPhase,\n isTrusted: event.isTrusted,\n preventDefault,\n isDefaultPrevented: () => isDefaultPrevented,\n stopPropagation,\n isPropagationStopped: () => isPropagationStopped,\n persist: () => {},\n timeStamp: event.timeStamp,\n type: event.type,\n };\n};\n"],"names":["createEvent","ref","current","event","Event","bubbles","Object","defineProperty","writable","value","syntheticEvent","createSyntheticEvent","console","log","isDefaultPrevented","isPropagationStopped","preventDefault","stopPropagation","nativeEvent","currentTarget","target","cancelable","defaultPrevented","eventPhase","isTrusted","persist","timeStamp","type"],"mappings":"IAEaA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,GAAgC,EAAK;EAC7D,IAAIA,GAAG,CAACC,OAAO,EAAE;AACb,IAAA,IAAMC,KAAK,GAAG,IAAIC,KAAK,CAAC,QAAQ,EAAE;AAAEC,MAAAA,OAAO,EAAE,IAAA;AAAK,KAAC,CAAC,CAAA;AACpDC,IAAAA,MAAM,CAACC,cAAc,CAACJ,KAAK,EAAE,QAAQ,EAAE;AAAEK,MAAAA,QAAQ,EAAE,KAAK;MAAEC,KAAK,EAAER,GAAG,CAACC,OAAAA;AAAQ,KAAC,CAAC,CAAA;AAC/E,IAAA,IAAMQ,cAAc,GAAGC,oBAAoB,CAACR,KAAK,CAA0C,CAAA;AAC3FS,IAAAA,OAAO,CAACC,GAAG,CAACH,cAAc,CAAC,CAAA;AAC3B,IAAA,OAAOA,cAAc,CAAA;AACzB,GAAA;AAEA,EAAA,OAAO,IAAI,CAAA;AACf,EAAC;IAEYC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAwCR,KAAQ,EAAiC;EAC9G,IAAIW,mBAAkB,GAAG,KAAK,CAAA;EAC9B,IAAIC,qBAAoB,GAAG,KAAK,CAAA;AAChC,EAAA,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,GAAS;AACzBF,IAAAA,mBAAkB,GAAG,IAAI,CAAA;IACzBX,KAAK,CAACa,cAAc,EAAE,CAAA;GACzB,CAAA;AACD,EAAA,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAS;AAC1BF,IAAAA,qBAAoB,GAAG,IAAI,CAAA;IAC3BZ,KAAK,CAACc,eAAe,EAAE,CAAA;GAC1B,CAAA;EACD,OAAO;AACHC,IAAAA,WAAW,EAAEf,KAAK;IAClBgB,aAAa,EAAEhB,KAAK,CAACgB,aAAgC;IACrDC,MAAM,EAAEjB,KAAK,CAACiB,MAAyB;IACvCf,OAAO,EAAEF,KAAK,CAACE,OAAO;IACtBgB,UAAU,EAAElB,KAAK,CAACkB,UAAU;IAC5BC,gBAAgB,EAAEnB,KAAK,CAACmB,gBAAgB;IACxCC,UAAU,EAAEpB,KAAK,CAACoB,UAAU;IAC5BC,SAAS,EAAErB,KAAK,CAACqB,SAAS;AAC1BR,IAAAA,cAAc,EAAdA,cAAc;IACdF,kBAAkB,EAAE,SAAAA,kBAAA,GAAA;AAAA,MAAA,OAAMA,mBAAkB,CAAA;AAAA,KAAA;AAC5CG,IAAAA,eAAe,EAAfA,eAAe;IACfF,oBAAoB,EAAE,SAAAA,oBAAA,GAAA;AAAA,MAAA,OAAMA,qBAAoB,CAAA;AAAA,KAAA;AAChDU,IAAAA,OAAO,EAAE,SAAAA,OAAA,GAAM,EAAE;IACjBC,SAAS,EAAEvB,KAAK,CAACuB,SAAS;IAC1BC,IAAI,EAAExB,KAAK,CAACwB,IAAAA;GACf,CAAA;AACL;;;;"}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { RefObject } from 'react';
|
2
|
-
export declare const createEvent: (ref: RefObject<HTMLInputElement>) => import("react").ChangeEvent<HTMLInputElement> | null;
|
3
|
-
export declare const createSyntheticEvent: <T extends Element, E extends Event>(event: E) => import("react").SyntheticEvent<T, E>;
|
4
|
-
//# sourceMappingURL=syntheticEvent.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"syntheticEvent.d.ts","sourceRoot":"","sources":["../../src/utils/syntheticEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,eAAO,MAAM,WAAW,QAAS,UAAU,gBAAgB,CAAC,yDAU3D,CAAC;AAEF,eAAO,MAAM,oBAAoB,wFA4BhC,CAAC"}
|