@yakad/ui 1.2.27-beta → 1.2.29-beta
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/codeField/codeField.d.ts +8 -0
- package/codeField/codeField.js +10 -0
- package/codeField/codeField.js.map +1 -0
- package/codeField/codeField.tsx +2 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames, joinStyles } from "@yakad/lib";
|
|
3
|
+
import styles from "./codeField.module.css";
|
|
4
|
+
function CodeField(props) {
|
|
5
|
+
const joinedClassNames = joinClassNames(styles.input, props.className);
|
|
6
|
+
const joinedStyles = joinStyles({ width: "calc(1.5ch * " + props.length + ")" }, props.style);
|
|
7
|
+
return (React.createElement("input", { ...props, name: props.name, type: props.type, minLength: props.length, maxLength: props.length, className: joinedClassNames, style: joinedStyles }));
|
|
8
|
+
}
|
|
9
|
+
export default CodeField;
|
|
10
|
+
//# sourceMappingURL=codeField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeField.js","sourceRoot":"","sources":["codeField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAQ5C,SAAS,SAAS,CAAC,KAAsB;IACrC,MAAM,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,SAAU,CAAC,CAAC;IAExE,MAAM,YAAY,GAAG,UAAU,CAC3B,EAAE,KAAK,EAAE,eAAe,GAAG,KAAK,CAAC,MAAM,GAAG,GAAG,EAAE,EAC/C,KAAK,CAAC,KAAM,CACf,CAAC;IAEF,OAAO,CACH,kCACQ,KAAK,EACT,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,SAAS,EAAE,KAAK,CAAC,MAAM,EACvB,SAAS,EAAE,KAAK,CAAC,MAAM,EACvB,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,YAAY,GACrB,CACL,CAAC;AACN,CAAC;AAED,eAAe,SAAS,CAAC"}
|
package/codeField/codeField.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import styles from "./codeField.module.css";
|
|
|
5
5
|
interface CodeFieldsProps extends React.HTMLAttributes<HTMLInputElement> {
|
|
6
6
|
length?: number;
|
|
7
7
|
name?: string;
|
|
8
|
+
type?: string;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
function CodeField(props: CodeFieldsProps) {
|
|
@@ -19,6 +20,7 @@ function CodeField(props: CodeFieldsProps) {
|
|
|
19
20
|
<input
|
|
20
21
|
{...props}
|
|
21
22
|
name={props.name}
|
|
23
|
+
type={props.type}
|
|
22
24
|
minLength={props.length}
|
|
23
25
|
maxLength={props.length}
|
|
24
26
|
className={joinedClassNames}
|
package/index.d.ts
CHANGED
|
@@ -19,5 +19,5 @@ import SvgIcon from "./svgIcon/svgIcon";
|
|
|
19
19
|
import Loading from "./loading/loading";
|
|
20
20
|
import CodeField from "./codeField/codeField";
|
|
21
21
|
import InputField from "./inputField/inputField";
|
|
22
|
-
import Theme from "./theme/
|
|
22
|
+
import Theme from "./theme/theme";
|
|
23
23
|
export { Button, AppBar, Card, Container, Footer, Form, GridContainer, GridItem, Hr, List, ListItem, Main, Navigation, Page, Row, Stack, Spacer, SvgIcon, Loading, CodeField, InputField, Theme, };
|
package/index.js
CHANGED
|
@@ -19,6 +19,6 @@ import SvgIcon from "./svgIcon/svgIcon";
|
|
|
19
19
|
import Loading from "./loading/loading";
|
|
20
20
|
import CodeField from "./codeField/codeField";
|
|
21
21
|
import InputField from "./inputField/inputField";
|
|
22
|
-
import Theme from "./theme/
|
|
22
|
+
import Theme from "./theme/theme";
|
|
23
23
|
export { Button, AppBar, Card, Container, Footer, Form, GridContainer, GridItem, Hr, List, ListItem, Main, Navigation, Page, Row, Stack, Spacer, SvgIcon, Loading, CodeField, InputField, Theme, };
|
|
24
24
|
//# sourceMappingURL=index.js.map
|