1 | /**
|
2 | * An array of events that are allowed on every html element type.
|
3 | *
|
4 | * @public
|
5 | */
|
6 | export declare const baseElementEvents: Record<string, number>;
|
7 | /**
|
8 | * An array of element attributes which are allowed on every html element type.
|
9 | *
|
10 | * @public
|
11 | */
|
12 | export declare const baseElementProperties: Record<string, number>;
|
13 | /**
|
14 | * An array of HTML element properties and events.
|
15 | *
|
16 | * @public
|
17 | */
|
18 | export declare const htmlElementProperties: Record<string, number>;
|
19 | /**
|
20 | * An array of LABEL tag properties and events.
|
21 | *
|
22 | * @public
|
23 | */
|
24 | export declare const labelProperties: Record<string, number>;
|
25 | /**
|
26 | * An array of AUDIO tag properties and events.
|
27 |
|
28 | * @public
|
29 | */
|
30 | export declare const audioProperties: Record<string, number>;
|
31 | /**
|
32 | * An array of VIDEO tag properties and events.
|
33 | *
|
34 | * @public
|
35 | */
|
36 | export declare const videoProperties: Record<string, number>;
|
37 | /**
|
38 | * An array of OL tag properties and events.
|
39 | *
|
40 | * @public
|
41 | */
|
42 | export declare const olProperties: Record<string, number>;
|
43 | /**
|
44 | * An array of LI tag properties and events.
|
45 | *
|
46 | * @public
|
47 | */
|
48 | export declare const liProperties: Record<string, number>;
|
49 | /**
|
50 | * An array of A tag properties and events.
|
51 | *
|
52 | * @public
|
53 | */
|
54 | export declare const anchorProperties: Record<string, number>;
|
55 | /**
|
56 | * An array of BUTTON tag properties and events.
|
57 | *
|
58 | * @public
|
59 | */
|
60 | export declare const buttonProperties: Record<string, number>;
|
61 | /**
|
62 | * An array of INPUT tag properties and events.
|
63 | *
|
64 | * @public
|
65 | */
|
66 | export declare const inputProperties: Record<string, number>;
|
67 | /**
|
68 | * An array of TEXTAREA tag properties and events.
|
69 | *
|
70 | * @public
|
71 | */
|
72 | export declare const textAreaProperties: Record<string, number>;
|
73 | /**
|
74 | * An array of SELECT tag properties and events.
|
75 | *
|
76 | * @public
|
77 | */
|
78 | export declare const selectProperties: Record<string, number>;
|
79 | export declare const optionProperties: Record<string, number>;
|
80 | /**
|
81 | * An array of TABLE tag properties and events.
|
82 | *
|
83 | * @public
|
84 | */
|
85 | export declare const tableProperties: Record<string, number>;
|
86 | /**
|
87 | * An array of TR tag properties and events.
|
88 | *
|
89 | * @public
|
90 | */
|
91 | export declare const trProperties: Record<string, number>;
|
92 | /**
|
93 | * An array of TH tag properties and events.
|
94 | *
|
95 | * @public
|
96 | */
|
97 | export declare const thProperties: Record<string, number>;
|
98 | /**
|
99 | * An array of TD tag properties and events.
|
100 | *
|
101 | * @public
|
102 | */
|
103 | export declare const tdProperties: Record<string, number>;
|
104 | export declare const colGroupProperties: Record<string, number>;
|
105 | export declare const colProperties: Record<string, number>;
|
106 | /**
|
107 | * An array of FORM tag properties and events.
|
108 | *
|
109 | * @public
|
110 | */
|
111 | export declare const formProperties: Record<string, number>;
|
112 | /**
|
113 | * An array of IFRAME tag properties and events.
|
114 | *
|
115 | * @public
|
116 | */
|
117 | export declare const iframeProperties: Record<string, number>;
|
118 | /**
|
119 | * An array of IMAGE tag properties and events.
|
120 | *
|
121 | * @public
|
122 | */
|
123 | export declare const imgProperties: Record<string, number>;
|
124 | /**
|
125 | * @deprecated Use imgProperties for img elements.
|
126 | */
|
127 | export declare const imageProperties: Record<string, number>;
|
128 | /**
|
129 | * An array of DIV tag properties and events.
|
130 | *
|
131 | * @public
|
132 | */
|
133 | export declare const divProperties: Record<string, number>;
|
134 | /**
|
135 | * Gets native supported props for an html element provided the allowance set. Use one of the property
|
136 | * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given
|
137 | * props set. Note that all data- and aria- prefixed attributes will be allowed.
|
138 | * NOTE: getNativeProps should always be applied first when adding props to a react component. The
|
139 | * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.
|
140 | * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to
|
141 | * the component after an onClick function is added, then the getNativeProps onClick will override it.
|
142 | *
|
143 | * @public
|
144 | * @param props - The unfiltered input props
|
145 | * @param allowedPropsNames - The array or record of allowed prop names.
|
146 | * @returns The filtered props
|
147 | */
|
148 | export declare function getNativeProps<T extends Record<string, any>>(props: Record<string, any>, allowedPropNames: string[] | Record<string, number>, excludedPropNames?: string[]): T;
|