@etsoo/materialui 1.1.31 → 1.1.33
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/lib/IntInputField.d.ts +11 -0
- package/lib/IntInputField.js +11 -0
- package/lib/MoneyInputField.d.ts +11 -0
- package/lib/MoneyInputField.js +11 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/package.json +2 -2
- package/src/IntInputField.tsx +30 -0
- package/src/MoneyInputField.tsx +33 -0
- package/src/index.ts +2 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputBaseProps } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { InputFieldProps } from "./InputField";
|
|
4
|
+
/**
|
|
5
|
+
* Integer input field props
|
|
6
|
+
*/
|
|
7
|
+
export type IntInputFieldProps = Omit<InputFieldProps, "type" | "inputProps"> & InputBaseProps["inputProps"];
|
|
8
|
+
/**
|
|
9
|
+
* Integer input field
|
|
10
|
+
*/
|
|
11
|
+
export declare const IntInputField: React.ForwardRefExoticComponent<Omit<Omit<InputFieldProps, "type" | "inputProps"> & import("@mui/material").InputBaseComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { InputField } from "./InputField";
|
|
3
|
+
/**
|
|
4
|
+
* Integer input field
|
|
5
|
+
*/
|
|
6
|
+
export const IntInputField = React.forwardRef((props, ref) => {
|
|
7
|
+
// Destruct
|
|
8
|
+
const { min = 0, step = 1, max = 9999999, ...rest } = props;
|
|
9
|
+
// Layout
|
|
10
|
+
return (React.createElement(InputField, { ref: ref, type: "number", inputProps: { min, step, max, inputMode: "numeric" }, ...rest }));
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputBaseProps } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { InputFieldProps } from "./InputField";
|
|
4
|
+
/**
|
|
5
|
+
* Money input field props
|
|
6
|
+
*/
|
|
7
|
+
export type MoneyInputFieldProps = Omit<InputFieldProps, "type" | "inputProps"> & InputBaseProps["inputProps"];
|
|
8
|
+
/**
|
|
9
|
+
* Money input field
|
|
10
|
+
*/
|
|
11
|
+
export declare const MoneyInputField: React.ForwardRefExoticComponent<Omit<Omit<InputFieldProps, "type" | "inputProps"> & import("@mui/material").InputBaseComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { InputField } from "./InputField";
|
|
3
|
+
/**
|
|
4
|
+
* Money input field
|
|
5
|
+
*/
|
|
6
|
+
export const MoneyInputField = React.forwardRef((props, ref) => {
|
|
7
|
+
// Destruct
|
|
8
|
+
const { min = 0, step = 0.01, max = 9999999, ...rest } = props;
|
|
9
|
+
// Layout
|
|
10
|
+
return (React.createElement(InputField, { ref: ref, type: "number", inputProps: { min, step, max, inputMode: "numeric" }, ...rest }));
|
|
11
|
+
});
|
package/lib/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export * from "./HiSelector";
|
|
|
49
49
|
export * from "./HiSelectorTL";
|
|
50
50
|
export * from "./IconButtonLink";
|
|
51
51
|
export * from "./InputField";
|
|
52
|
+
export * from "./IntInputField";
|
|
52
53
|
export * from "./ItemList";
|
|
53
54
|
export * from "./ListChooser";
|
|
54
55
|
export * from "./ListItemRightIcon";
|
|
@@ -56,6 +57,7 @@ export * from "./ListMoreDisplay";
|
|
|
56
57
|
export * from "./LoadingButton";
|
|
57
58
|
export * from "./MaskInput";
|
|
58
59
|
export * from "./MobileListItemRenderer";
|
|
60
|
+
export * from "./MoneyInputField";
|
|
59
61
|
export * from "./MoreFab";
|
|
60
62
|
export * from "./MUGlobal";
|
|
61
63
|
export * from "./NotifierMU";
|
package/lib/index.js
CHANGED
|
@@ -49,6 +49,7 @@ export * from "./HiSelector";
|
|
|
49
49
|
export * from "./HiSelectorTL";
|
|
50
50
|
export * from "./IconButtonLink";
|
|
51
51
|
export * from "./InputField";
|
|
52
|
+
export * from "./IntInputField";
|
|
52
53
|
export * from "./ItemList";
|
|
53
54
|
export * from "./ListChooser";
|
|
54
55
|
export * from "./ListItemRightIcon";
|
|
@@ -56,6 +57,7 @@ export * from "./ListMoreDisplay";
|
|
|
56
57
|
export * from "./LoadingButton";
|
|
57
58
|
export * from "./MaskInput";
|
|
58
59
|
export * from "./MobileListItemRenderer";
|
|
60
|
+
export * from "./MoneyInputField";
|
|
59
61
|
export * from "./MoreFab";
|
|
60
62
|
export * from "./MUGlobal";
|
|
61
63
|
export * from "./NotifierMU";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.33",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@emotion/css": "^11.10.5",
|
|
51
51
|
"@emotion/react": "^11.10.5",
|
|
52
52
|
"@emotion/styled": "^11.10.5",
|
|
53
|
-
"@etsoo/appscript": "^1.3.
|
|
53
|
+
"@etsoo/appscript": "^1.3.64",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.23",
|
|
55
55
|
"@etsoo/react": "^1.6.47",
|
|
56
56
|
"@etsoo/shared": "^1.1.88",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { InputBaseProps } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { InputField, InputFieldProps } from "./InputField";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Integer input field props
|
|
7
|
+
*/
|
|
8
|
+
export type IntInputFieldProps = Omit<InputFieldProps, "type" | "inputProps"> &
|
|
9
|
+
InputBaseProps["inputProps"];
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Integer input field
|
|
13
|
+
*/
|
|
14
|
+
export const IntInputField = React.forwardRef<
|
|
15
|
+
HTMLDivElement,
|
|
16
|
+
IntInputFieldProps
|
|
17
|
+
>((props, ref) => {
|
|
18
|
+
// Destruct
|
|
19
|
+
const { min = 0, step = 1, max = 9999999, ...rest } = props;
|
|
20
|
+
|
|
21
|
+
// Layout
|
|
22
|
+
return (
|
|
23
|
+
<InputField
|
|
24
|
+
ref={ref}
|
|
25
|
+
type="number"
|
|
26
|
+
inputProps={{ min, step, max, inputMode: "numeric" }}
|
|
27
|
+
{...rest}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { InputBaseProps } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { InputField, InputFieldProps } from "./InputField";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Money input field props
|
|
7
|
+
*/
|
|
8
|
+
export type MoneyInputFieldProps = Omit<
|
|
9
|
+
InputFieldProps,
|
|
10
|
+
"type" | "inputProps"
|
|
11
|
+
> &
|
|
12
|
+
InputBaseProps["inputProps"];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Money input field
|
|
16
|
+
*/
|
|
17
|
+
export const MoneyInputField = React.forwardRef<
|
|
18
|
+
HTMLDivElement,
|
|
19
|
+
MoneyInputFieldProps
|
|
20
|
+
>((props, ref) => {
|
|
21
|
+
// Destruct
|
|
22
|
+
const { min = 0, step = 0.01, max = 9999999, ...rest } = props;
|
|
23
|
+
|
|
24
|
+
// Layout
|
|
25
|
+
return (
|
|
26
|
+
<InputField
|
|
27
|
+
ref={ref}
|
|
28
|
+
type="number"
|
|
29
|
+
inputProps={{ min, step, max, inputMode: "numeric" }}
|
|
30
|
+
{...rest}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -52,6 +52,7 @@ export * from "./HiSelector";
|
|
|
52
52
|
export * from "./HiSelectorTL";
|
|
53
53
|
export * from "./IconButtonLink";
|
|
54
54
|
export * from "./InputField";
|
|
55
|
+
export * from "./IntInputField";
|
|
55
56
|
export * from "./ItemList";
|
|
56
57
|
export * from "./ListChooser";
|
|
57
58
|
export * from "./ListItemRightIcon";
|
|
@@ -59,6 +60,7 @@ export * from "./ListMoreDisplay";
|
|
|
59
60
|
export * from "./LoadingButton";
|
|
60
61
|
export * from "./MaskInput";
|
|
61
62
|
export * from "./MobileListItemRenderer";
|
|
63
|
+
export * from "./MoneyInputField";
|
|
62
64
|
export * from "./MoreFab";
|
|
63
65
|
export * from "./MUGlobal";
|
|
64
66
|
export * from "./NotifierMU";
|