mui-design-system 0.0.34 → 0.0.35
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/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- JSDoc for `UFTextField` component for better IDE support.
|
|
@@ -7,5 +7,6 @@ type Props = ITextFieldForm & {
|
|
|
7
7
|
};
|
|
8
8
|
export declare const p2e: (s: string) => boolean;
|
|
9
9
|
export declare const checkIfNumber: (value: string) => boolean;
|
|
10
|
+
/** Form-integrated text field with theme support and numeric validation. */
|
|
10
11
|
declare const UFTextField: FC<Props>;
|
|
11
12
|
export default UFTextField;
|
|
@@ -8,6 +8,7 @@ export const checkIfNumber = (value) => {
|
|
|
8
8
|
const charLength = value.length;
|
|
9
9
|
return !charLength || p2e(value);
|
|
10
10
|
};
|
|
11
|
+
/** Form-integrated text field with theme support and numeric validation. */
|
|
11
12
|
const UFTextField = ({ form, name, type = 'text', defaultValue, label, rules, readonly, disabled, placeholder, error, itemProps, props, helperText, variant = "outlined", withoutHelperText, inputLabelMode, }) => {
|
|
12
13
|
const { theme } = useFormContext();
|
|
13
14
|
const themeProp = theme?.[type];
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mui-design-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"description": "MUI-based design system with theme, form components, and utilities",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc && node copy-files.js",
|
|
10
|
+
"prepublishOnly": "npm run build",
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"publish": "npm publish"
|
|
13
|
+
},
|
|
8
14
|
"exports": {
|
|
9
15
|
".": {
|
|
10
16
|
"types": "./dist/index.d.ts",
|
|
@@ -19,14 +25,9 @@
|
|
|
19
25
|
},
|
|
20
26
|
"files": [
|
|
21
27
|
"dist",
|
|
22
|
-
"README.md"
|
|
28
|
+
"README.md",
|
|
29
|
+
"CHANGELOG.md"
|
|
23
30
|
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc && node copy-files.js",
|
|
26
|
-
"prepublishOnly": "npm run build",
|
|
27
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
28
|
-
"publish": "npm publish"
|
|
29
|
-
},
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"react-window": "^1.8.10",
|
|
32
33
|
"react-multi-date-picker": "^4.4.1",
|