@bds-web/ui 1.5.0 → 1.6.0
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TextInputProps } from "../types/props";
|
|
2
|
-
export declare const TextInput: ({ label, errorMessage, ...props }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const TextInput: ({ label, errorMessage, width, id, name, ...props }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TextInput/ui/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,eAAO,MAAM,SAAS,GAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TextInput/ui/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,eAAO,MAAM,SAAS,GAAI,oDAAqD,cAAc,4CAQ5F,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as S from "./style";
|
|
4
|
-
export const TextInput = ({ label, errorMessage, ...props }) => {
|
|
5
|
-
return (_jsxs(S.Container, { children: [label && _jsx(S.Label, { children: label }), _jsx(S.TextInput, { "$isError": !!errorMessage, ...props }), errorMessage && _jsx(S.ErrorMessage, { children: errorMessage })] }));
|
|
4
|
+
export const TextInput = ({ label, errorMessage, width, id, name, ...props }) => {
|
|
5
|
+
return (_jsxs(S.Container, { "$width": width, children: [label && _jsx(S.Label, { htmlFor: id, children: label }), _jsx(S.TextInput, { id: id, name: name, "$isError": !!errorMessage, ...props }), errorMessage && _jsx(S.ErrorMessage, { children: errorMessage })] }));
|
|
6
6
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
2
2
|
theme?: import("@emotion/react").Theme;
|
|
3
3
|
as?: React.ElementType;
|
|
4
|
+
} & {
|
|
5
|
+
$width?: string | number;
|
|
4
6
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
7
|
export declare const TextInput: import("@emotion/styled").StyledComponent<{
|
|
6
8
|
theme?: import("@emotion/react").Theme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/TextInput/ui/style.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/TextInput/ui/style.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;aAAyB,MAAM,GAAG,MAAM;yGAM7D,CAAC;AAEF,eAAO,MAAM,SAAS;;;;cAA4B,OAAO;kHAgCxD,CAAC;AAEF,eAAO,MAAM,KAAK;;;kHAGjB,CAAC;AAEF,eAAO,MAAM,YAAY;;;2GAGxB,CAAC"}
|
|
@@ -3,12 +3,14 @@ import { shapes } from "@bds-web/shapes";
|
|
|
3
3
|
import { typoCss } from "@bds-web/typography";
|
|
4
4
|
import styled from "@emotion/styled";
|
|
5
5
|
export const Container = styled.div `
|
|
6
|
+
width: ${({ $width }) => $width};
|
|
6
7
|
display: flex;
|
|
7
8
|
flex-direction: column;
|
|
8
9
|
align-items: flex-start;
|
|
9
10
|
gap: 4px;
|
|
10
11
|
`;
|
|
11
12
|
export const TextInput = styled.input `
|
|
13
|
+
width: 100%;
|
|
12
14
|
${typoCss("Body")};
|
|
13
15
|
height: 48px;
|
|
14
16
|
border-radius: ${shapes.medium};
|