@availity/mui-textfield 1.3.1 → 1.3.2
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 +11 -0
- package/dist/index.js +18 -34
- package/dist/index.mjs +14 -30
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.3.2](https://github.com/Availity/element/compare/@availity/mui-textfield@1.3.1...@availity/mui-textfield@1.3.2) (2025-10-30)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-typography` updated to version `1.3.1`
|
|
10
|
+
* `mui-form-utils` updated to version `1.3.1`
|
|
11
|
+
* `mui-icon` updated to version `1.3.1`
|
|
12
|
+
* `mui-button` updated to version `1.3.1`
|
|
13
|
+
* `mui-chip` updated to version `1.3.1`
|
|
14
|
+
* `mui-layout` updated to version `1.3.1`
|
|
15
|
+
* `mui-menu` updated to version `1.3.1`
|
|
5
16
|
## [1.3.1](https://github.com/Availity/element/compare/@availity/mui-textfield@1.3.0...@availity/mui-textfield@1.3.1) (2025-05-29)
|
|
6
17
|
|
|
7
18
|
### Dependency Updates
|
package/dist/index.js
CHANGED
|
@@ -64,46 +64,30 @@ __export(index_exports, {
|
|
|
64
64
|
module.exports = __toCommonJS(index_exports);
|
|
65
65
|
|
|
66
66
|
// src/lib/TextField.tsx
|
|
67
|
-
var
|
|
67
|
+
var import_react2 = require("react");
|
|
68
68
|
var import_TextField = __toESM(require("@mui/material/TextField"));
|
|
69
69
|
var import_mui_form_utils = require("@availity/mui-form-utils");
|
|
70
70
|
|
|
71
|
-
// ../layout/src/lib/Box.tsx
|
|
72
|
-
var import_react = require("react");
|
|
73
|
-
var import_Box = __toESM(require("@mui/material/Box"));
|
|
74
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
75
|
-
var Box = (0, import_react.forwardRef)((props, ref) => {
|
|
76
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Box.default, __spreadProps(__spreadValues({}, props), { ref }));
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
// ../layout/src/lib/Container.tsx
|
|
80
|
-
var import_Container = __toESM(require("@mui/material/Container"));
|
|
81
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
82
|
-
|
|
83
71
|
// ../layout/src/lib/Grid.tsx
|
|
84
72
|
var import_Grid2 = __toESM(require("@mui/material/Grid2"));
|
|
85
|
-
var
|
|
73
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
86
74
|
var Grid = (args) => {
|
|
87
|
-
return /* @__PURE__ */ (0,
|
|
75
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Grid2.default, __spreadValues({}, args));
|
|
88
76
|
};
|
|
89
77
|
|
|
90
|
-
// ../layout/src/lib/Stack.tsx
|
|
91
|
-
var import_Stack = __toESM(require("@mui/material/Stack"));
|
|
92
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
93
|
-
|
|
94
78
|
// ../typography/src/lib/Typography.tsx
|
|
95
|
-
var
|
|
79
|
+
var import_react = require("react");
|
|
96
80
|
var import_Typography = __toESM(require("@mui/material/Typography"));
|
|
97
|
-
var
|
|
98
|
-
var Typography = (0,
|
|
81
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
82
|
+
var Typography = (0, import_react.forwardRef)(
|
|
99
83
|
(_a, ref) => {
|
|
100
84
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
101
|
-
return /* @__PURE__ */ (0,
|
|
85
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Typography.default, __spreadProps(__spreadValues({}, rest), { ref, children }));
|
|
102
86
|
}
|
|
103
87
|
);
|
|
104
88
|
|
|
105
89
|
// src/lib/TextField.tsx
|
|
106
|
-
var
|
|
90
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
107
91
|
var TextFieldFormHelperText = (_a) => {
|
|
108
92
|
var _b = _a, {
|
|
109
93
|
charCount,
|
|
@@ -117,18 +101,18 @@ var TextFieldFormHelperText = (_a) => {
|
|
|
117
101
|
"showCharacterCount"
|
|
118
102
|
]);
|
|
119
103
|
if (showCharacterCount) {
|
|
120
|
-
return /* @__PURE__ */ (0,
|
|
121
|
-
/* @__PURE__ */ (0,
|
|
122
|
-
/* @__PURE__ */ (0,
|
|
123
|
-
/* @__PURE__ */ (0,
|
|
104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Grid, { container: true, justifyContent: "space-between", flexWrap: "nowrap", children: [
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_mui_form_utils.FormHelperText, __spreadProps(__spreadValues({}, FormHelperTextProps2), { sx: { marginRight: "12px" }, children: helperText })),
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Typography, { variant: "caption", marginTop: "4px", lineHeight: "1.25rem", children: [
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Typography, { component: "span", variant: "inherit", color: charCount > maxLength ? "error" : "textPrimary", children: charCount || 0 }),
|
|
124
108
|
"/",
|
|
125
109
|
maxLength
|
|
126
110
|
] })
|
|
127
111
|
] });
|
|
128
112
|
}
|
|
129
|
-
return /* @__PURE__ */ (0,
|
|
113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_mui_form_utils.FormHelperText, __spreadProps(__spreadValues({}, FormHelperTextProps2), { children: helperText }));
|
|
130
114
|
};
|
|
131
|
-
var TextField = (0,
|
|
115
|
+
var TextField = (0, import_react2.forwardRef)((props, ref) => {
|
|
132
116
|
var _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
133
117
|
const _a = props, {
|
|
134
118
|
InputProps: InputProps2,
|
|
@@ -153,19 +137,19 @@ var TextField = (0, import_react3.forwardRef)((props, ref) => {
|
|
|
153
137
|
"showCharacterCount",
|
|
154
138
|
"displayOverflowMaxLength"
|
|
155
139
|
]);
|
|
156
|
-
const [openDetected, setOpenDetected] = (0,
|
|
157
|
-
const [charCount, setCharCount] = (0,
|
|
140
|
+
const [openDetected, setOpenDetected] = (0, import_react2.useState)(false);
|
|
141
|
+
const [charCount, setCharCount] = (0, import_react2.useState)(0);
|
|
158
142
|
const maxLength = (inputProps == null ? void 0 : inputProps.maxLength) || ((_c = (_b = rest.slotProps) == null ? void 0 : _b.htmlInput) == null ? void 0 : _c.maxLength);
|
|
159
143
|
const allReadOnly = (InputProps2 == null ? void 0 : InputProps2.readOnly) || (inputProps == null ? void 0 : inputProps.readOnly) || ((_e = (_d = rest.slotProps) == null ? void 0 : _d.htmlInput) == null ? void 0 : _e.readOnly) || ((_g = (_f = rest.slotProps) == null ? void 0 : _f.input) == null ? void 0 : _g.readOnly);
|
|
160
144
|
const resolvedProps = (props2) => !props2 || Object.keys(props2).length === 0 ? void 0 : props2;
|
|
161
|
-
return /* @__PURE__ */ (0,
|
|
145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
162
146
|
import_TextField.default,
|
|
163
147
|
__spreadProps(__spreadValues({}, rest), {
|
|
164
148
|
onChange: (event) => {
|
|
165
149
|
setCharCount(event.target.value.length);
|
|
166
150
|
if (rest.onChange) rest.onChange(event);
|
|
167
151
|
},
|
|
168
|
-
helperText: helperText || /* @__PURE__ */ (0,
|
|
152
|
+
helperText: helperText || /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
169
153
|
slots: { formHelperText: TextFieldFormHelperText },
|
|
170
154
|
slotProps: {
|
|
171
155
|
input: resolvedProps(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, InputProps2), import_mui_form_utils.InputPropOverrides), (_h = rest.slotProps) == null ? void 0 : _h.input), {
|
package/dist/index.mjs
CHANGED
|
@@ -31,7 +31,7 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
// src/lib/TextField.tsx
|
|
34
|
-
import { forwardRef as
|
|
34
|
+
import { forwardRef as forwardRef2, useState } from "react";
|
|
35
35
|
import MuiTextField from "@mui/material/TextField";
|
|
36
36
|
import {
|
|
37
37
|
FormHelperText,
|
|
@@ -41,42 +41,26 @@ import {
|
|
|
41
41
|
SelectPropOverrides
|
|
42
42
|
} from "@availity/mui-form-utils";
|
|
43
43
|
|
|
44
|
-
// ../layout/src/lib/Box.tsx
|
|
45
|
-
import { forwardRef } from "react";
|
|
46
|
-
import MuiBox from "@mui/material/Box";
|
|
47
|
-
import { jsx } from "react/jsx-runtime";
|
|
48
|
-
var Box = forwardRef((props, ref) => {
|
|
49
|
-
return /* @__PURE__ */ jsx(MuiBox, __spreadProps(__spreadValues({}, props), { ref }));
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// ../layout/src/lib/Container.tsx
|
|
53
|
-
import MuiContainer from "@mui/material/Container";
|
|
54
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
55
|
-
|
|
56
44
|
// ../layout/src/lib/Grid.tsx
|
|
57
45
|
import MuiGrid2 from "@mui/material/Grid2";
|
|
58
|
-
import { jsx
|
|
46
|
+
import { jsx } from "react/jsx-runtime";
|
|
59
47
|
var Grid = (args) => {
|
|
60
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ jsx(MuiGrid2, __spreadValues({}, args));
|
|
61
49
|
};
|
|
62
50
|
|
|
63
|
-
// ../layout/src/lib/Stack.tsx
|
|
64
|
-
import MuiStack from "@mui/material/Stack";
|
|
65
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
66
|
-
|
|
67
51
|
// ../typography/src/lib/Typography.tsx
|
|
68
|
-
import { forwardRef
|
|
52
|
+
import { forwardRef } from "react";
|
|
69
53
|
import { default as MuiTypography } from "@mui/material/Typography";
|
|
70
|
-
import { jsx as
|
|
71
|
-
var Typography =
|
|
54
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
55
|
+
var Typography = forwardRef(
|
|
72
56
|
(_a, ref) => {
|
|
73
57
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
74
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ jsx2(MuiTypography, __spreadProps(__spreadValues({}, rest), { ref, children }));
|
|
75
59
|
}
|
|
76
60
|
);
|
|
77
61
|
|
|
78
62
|
// src/lib/TextField.tsx
|
|
79
|
-
import { Fragment, jsx as
|
|
63
|
+
import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
80
64
|
var TextFieldFormHelperText = (_a) => {
|
|
81
65
|
var _b = _a, {
|
|
82
66
|
charCount,
|
|
@@ -91,17 +75,17 @@ var TextFieldFormHelperText = (_a) => {
|
|
|
91
75
|
]);
|
|
92
76
|
if (showCharacterCount) {
|
|
93
77
|
return /* @__PURE__ */ jsxs(Grid, { container: true, justifyContent: "space-between", flexWrap: "nowrap", children: [
|
|
94
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ jsx3(FormHelperText, __spreadProps(__spreadValues({}, FormHelperTextProps2), { sx: { marginRight: "12px" }, children: helperText })),
|
|
95
79
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", marginTop: "4px", lineHeight: "1.25rem", children: [
|
|
96
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ jsx3(Typography, { component: "span", variant: "inherit", color: charCount > maxLength ? "error" : "textPrimary", children: charCount || 0 }),
|
|
97
81
|
"/",
|
|
98
82
|
maxLength
|
|
99
83
|
] })
|
|
100
84
|
] });
|
|
101
85
|
}
|
|
102
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ jsx3(FormHelperText, __spreadProps(__spreadValues({}, FormHelperTextProps2), { children: helperText }));
|
|
103
87
|
};
|
|
104
|
-
var TextField =
|
|
88
|
+
var TextField = forwardRef2((props, ref) => {
|
|
105
89
|
var _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
106
90
|
const _a = props, {
|
|
107
91
|
InputProps: InputProps2,
|
|
@@ -131,14 +115,14 @@ var TextField = forwardRef3((props, ref) => {
|
|
|
131
115
|
const maxLength = (inputProps == null ? void 0 : inputProps.maxLength) || ((_c = (_b = rest.slotProps) == null ? void 0 : _b.htmlInput) == null ? void 0 : _c.maxLength);
|
|
132
116
|
const allReadOnly = (InputProps2 == null ? void 0 : InputProps2.readOnly) || (inputProps == null ? void 0 : inputProps.readOnly) || ((_e = (_d = rest.slotProps) == null ? void 0 : _d.htmlInput) == null ? void 0 : _e.readOnly) || ((_g = (_f = rest.slotProps) == null ? void 0 : _f.input) == null ? void 0 : _g.readOnly);
|
|
133
117
|
const resolvedProps = (props2) => !props2 || Object.keys(props2).length === 0 ? void 0 : props2;
|
|
134
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ jsx3(
|
|
135
119
|
MuiTextField,
|
|
136
120
|
__spreadProps(__spreadValues({}, rest), {
|
|
137
121
|
onChange: (event) => {
|
|
138
122
|
setCharCount(event.target.value.length);
|
|
139
123
|
if (rest.onChange) rest.onChange(event);
|
|
140
124
|
},
|
|
141
|
-
helperText: helperText || /* @__PURE__ */
|
|
125
|
+
helperText: helperText || /* @__PURE__ */ jsx3(Fragment, {}),
|
|
142
126
|
slots: { formHelperText: TextFieldFormHelperText },
|
|
143
127
|
slotProps: {
|
|
144
128
|
input: resolvedProps(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, InputProps2), InputPropOverrides), (_h = rest.slotProps) == null ? void 0 : _h.input), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-textfield",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Availity MUI Textfield Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@availity/mui-form-utils": "1.3.
|
|
44
|
-
"@availity/mui-icon": "1.1.
|
|
43
|
+
"@availity/mui-form-utils": "1.3.3",
|
|
44
|
+
"@availity/mui-icon": "1.1.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@availity/mui-typography": "1.0.
|
|
47
|
+
"@availity/mui-typography": "1.0.3",
|
|
48
48
|
"@mui/material": "^6.4.5",
|
|
49
49
|
"react": "18.2.0",
|
|
50
50
|
"react-dom": "18.2.0",
|
|
@@ -57,5 +57,6 @@
|
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
|
-
}
|
|
60
|
+
},
|
|
61
|
+
"sideEffects": false
|
|
61
62
|
}
|