w-design-system 0.3.100 → 0.4.100
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/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/styles.d.ts +3 -5
- package/dist/components/Input/styles.d.ts.map +1 -1
- package/dist/w-design-system.es.js +1050 -1035
- package/dist/w-design-system.umd.js +172 -161
- package/package.json +1 -1
- package/src/components/Input/index.tsx +19 -3
- package/src/components/Input/styles.ts +24 -13
|
@@ -8,6 +8,7 @@ export interface InputProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
8
8
|
value?: string;
|
|
9
9
|
readonly?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
error?: string;
|
|
11
12
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
13
|
onInput?: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
13
14
|
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAmD,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAmD,MAAM,OAAO,CAAA;AAYzG,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,IAAI,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAC3D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IACxD,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAC9D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;CAC7D;AASD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA0FtC,CAAA"}
|
|
@@ -4,16 +4,14 @@ export declare const StyledInput: import('styled-components/dist/types').IStyled
|
|
|
4
4
|
export declare const StyledLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
5
5
|
export interface StyledInputContentProps {
|
|
6
6
|
disabled?: boolean;
|
|
7
|
+
hasError?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const StyledInputContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledInputContentProps>> & string;
|
|
9
10
|
export interface StyledInputBorderProps {
|
|
10
11
|
label: Position;
|
|
11
12
|
content: Position;
|
|
13
|
+
hasError?: boolean;
|
|
12
14
|
}
|
|
13
|
-
/**
|
|
14
|
-
* O clip-path faz com que o elemento fique transparente na região do label
|
|
15
|
-
* @see https://stackoverflow.com/questions/3742479/how-to-cut-a-hole-in-an-svg-rectangle
|
|
16
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d
|
|
17
|
-
*/
|
|
18
15
|
export declare const StyledInputBorder: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledInputBorderProps>> & string;
|
|
16
|
+
export declare const StyledErrorMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
19
17
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Input/styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,eAAO,MAAM,YAAY,6NAGxB,CAAA;AAED,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Input/styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,eAAO,MAAM,YAAY,6NAGxB,CAAA;AAED,eAAO,MAAM,WAAW,sOA2BvB,CAAA;AAED,eAAO,MAAM,WAAW,sOAavB,CAAA;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,kBAAkB,4PAgB9B,CAAA;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,EAAE,QAAQ,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,iBAAiB,2PAsB7B,CAAA;AAED,eAAO,MAAM,kBAAkB,+NAM9B,CAAA"}
|