gox-design-system 0.0.4 → 0.0.5

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/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "gox-design-system",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "private": false,
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",
7
- "types": "./index.d.ts",
8
7
  "dependencies": {
9
8
  "@testing-library/dom": "^10.4.0",
10
9
  "@testing-library/jest-dom": "^6.6.3",
@@ -1,8 +1,45 @@
1
-
2
- interface InputProps {
1
+ export type InputProps = {
2
+ label: string;
3
+ value: string;
4
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
3
5
  type?: string;
4
6
  placeholder?: string;
5
- }
7
+ disabled?: boolean;
8
+ error?: boolean;
9
+ errorMessage?: string;
10
+ required?: boolean;
11
+ maxLength?: number;
12
+ minLength?: number;
13
+ pattern?: string;
14
+ autoComplete?: string;
15
+ autoFocus?: boolean;
16
+ readOnly?: boolean;
17
+ size?: "small" | "medium" | "large";
18
+ className?: string;
19
+ style?: React.CSSProperties;
20
+ onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
21
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
22
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
23
+ onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
24
+ onKeyPress?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
25
+ onPaste?: (event: React.ClipboardEvent<HTMLInputElement>) => void;
26
+ onCut?: (event: React.ClipboardEvent<HTMLInputElement>) => void;
27
+ onCopy?: (event: React.ClipboardEvent<HTMLInputElement>) => void;
28
+ onContextMenu?: (event: React.MouseEvent<HTMLInputElement>) => void;
29
+ onSelect?: (event: React.SyntheticEvent<HTMLInputElement>) => void;
30
+ onChangeCapture?: (event: React.ChangeEvent<HTMLInputElement>) => void;
31
+ onFocusCapture?: (event: React.FocusEvent<HTMLInputElement>) => void;
32
+ onBlurCapture?: (event: React.FocusEvent<HTMLInputElement>) => void;
33
+ onKeyDownCapture?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
34
+ onKeyUpCapture?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
35
+ onKeyPressCapture?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
36
+ onPasteCapture?: (event: React.ClipboardEvent<HTMLInputElement>) => void;
37
+ onCutCapture?: (event: React.ClipboardEvent<HTMLInputElement>) => void;
38
+ onCopyCapture?: (event: React.ClipboardEvent<HTMLInputElement>) => void;
39
+ onContextMenuCapture?: (event: React.MouseEvent<HTMLInputElement>) => void;
40
+ onSelectCapture?: (event: React.SyntheticEvent<HTMLInputElement>) => void;
41
+ };
42
+
6
43
 
7
44
  export default function Input({
8
45
  placeholder = "Omkar",
package/src/index.tsx CHANGED
@@ -10,7 +10,9 @@ const root = ReactDOM.createRoot(
10
10
  );
11
11
  root.render(
12
12
  <React.StrictMode>
13
- <Input />
13
+ <Input label={''} value={''} onChange={function (event: React.ChangeEvent<HTMLInputElement>): void {
14
+ throw new Error('Function not implemented.');
15
+ } } />
14
16
  </React.StrictMode>
15
17
  );
16
18
 
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./src/components/input/index";
@@ -1,3 +0,0 @@
1
- export declare type InputProps = {
2
- type: string
3
- }