cecomponent 1.0.183 → 1.0.185
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.
|
@@ -2,31 +2,16 @@ import { default as React, FocusEvent } from 'react';
|
|
|
2
2
|
import { Size } from '../Tokens/CESizes';
|
|
3
3
|
type InputType = "text" | "number" | "alphanumeric" | "password" | "email" | "textarea";
|
|
4
4
|
interface ValidatedInputProps {
|
|
5
|
-
/** value can be string or number (number recommended for numeric use) */
|
|
6
5
|
value: string | number;
|
|
7
|
-
/** onChange returns a string for non-number inputs.
|
|
8
|
-
* For type="number" it returns:
|
|
9
|
-
* - number (e.g. 12 or 12.34) when input has a numeric value
|
|
10
|
-
* - empty string "" when input is cleared
|
|
11
|
-
*/
|
|
12
6
|
onChange: (value: string | number) => void;
|
|
13
|
-
/** optional id to apply to the input/textarea element */
|
|
14
7
|
id?: string;
|
|
15
|
-
/** optional name to apply to the input/textarea element */
|
|
16
8
|
name?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Optional non-breaking callback that receives the new value and an optional
|
|
19
|
-
* meta object containing id and name. Use this when you need the component
|
|
20
|
-
* to provide identifying context back to the parent without replacing
|
|
21
|
-
* the existing onChange signature.
|
|
22
|
-
*/
|
|
23
9
|
onChangeMeta?: (value: string | number, meta?: {
|
|
24
10
|
id?: string;
|
|
25
11
|
name?: string;
|
|
26
12
|
}) => void;
|
|
27
13
|
placeholder?: string;
|
|
28
14
|
type?: InputType;
|
|
29
|
-
/** number of rows to initialize textarea with when type is textarea */
|
|
30
15
|
rows?: number;
|
|
31
16
|
maxLength?: number;
|
|
32
17
|
minLength?: number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cecomponent",
|
|
3
3
|
"description": "A React component library for building modern UIs for Cleanearth",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.185",
|
|
5
5
|
"main": "dist/ce-component-lib.js",
|
|
6
6
|
"module": "dist/ce-component-lib.mjs",
|
|
7
7
|
"types": "dist/idex.d.ts",
|