@availity/mui-textfield 0.6.8 → 0.6.9

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 CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.6.9](https://github.com/Availity/element/compare/@availity/mui-textfield@0.6.8...@availity/mui-textfield@0.6.9) (2024-10-18)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `mui-form-utils` updated to version `0.6.8`
10
+
11
+ ### Bug Fixes
12
+
13
+ * **mui-form-utils:** resolve aria-controls warnings ([487fe12](https://github.com/Availity/element/commit/487fe12229a2f1510f8e7ba76028f798896a1b20))
14
+
5
15
  ## [0.6.8](https://github.com/Availity/element/compare/@availity/mui-textfield@0.6.7...@availity/mui-textfield@0.6.8) (2024-10-01)
6
16
 
7
17
  ### Dependency Updates
package/dist/index.js CHANGED
@@ -70,6 +70,7 @@ var import_mui_form_utils = require("@availity/mui-form-utils");
70
70
  var import_jsx_runtime = require("react/jsx-runtime");
71
71
  var TextField = (0, import_react.forwardRef)((props, ref) => {
72
72
  const _a = props, { InputProps: InputProps2, helpTopicId, InputLabelProps, FormHelperTextProps: FormHelperTextProps2, required, SelectProps: SelectProps2, inputProps } = _a, rest = __objRest(_a, ["InputProps", "helpTopicId", "InputLabelProps", "FormHelperTextProps", "required", "SelectProps", "inputProps"]);
73
+ const [openDetected, setOpenDetected] = (0, import_react.useState)(false);
73
74
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
75
  import_TextField.default,
75
76
  __spreadProps(__spreadValues({}, rest), {
@@ -77,7 +78,7 @@ var TextField = (0, import_react.forwardRef)((props, ref) => {
77
78
  InputProps: __spreadValues(__spreadValues({}, InputProps2), import_mui_form_utils.InputPropOverrides),
78
79
  InputLabelProps: __spreadValues({ component: import_mui_form_utils.FormLabel, helpTopicId, required, shrink: true }, InputLabelProps),
79
80
  FormHelperTextProps: __spreadValues({ component: import_mui_form_utils.FormHelperText }, FormHelperTextProps2),
80
- SelectProps: __spreadValues(__spreadValues({}, SelectProps2), import_mui_form_utils.SelectPropOverrides),
81
+ SelectProps: __spreadValues(__spreadValues(__spreadValues({}, SelectProps2), import_mui_form_utils.SelectPropOverrides), (0, import_mui_form_utils.SelectAccessibilityOverrides)(openDetected, setOpenDetected, SelectProps2 == null ? void 0 : SelectProps2.open)),
81
82
  ref
82
83
  })
83
84
  );
package/dist/index.mjs CHANGED
@@ -31,17 +31,19 @@ var __objRest = (source, exclude) => {
31
31
  };
32
32
 
33
33
  // src/lib/TextField.tsx
34
- import { forwardRef } from "react";
34
+ import { forwardRef, useState } from "react";
35
35
  import MuiTextField from "@mui/material/TextField";
36
36
  import {
37
37
  FormHelperText,
38
38
  FormLabel,
39
39
  InputPropOverrides,
40
+ SelectAccessibilityOverrides,
40
41
  SelectPropOverrides
41
42
  } from "@availity/mui-form-utils";
42
43
  import { jsx } from "react/jsx-runtime";
43
44
  var TextField = forwardRef((props, ref) => {
44
45
  const _a = props, { InputProps: InputProps2, helpTopicId, InputLabelProps, FormHelperTextProps: FormHelperTextProps2, required, SelectProps: SelectProps2, inputProps } = _a, rest = __objRest(_a, ["InputProps", "helpTopicId", "InputLabelProps", "FormHelperTextProps", "required", "SelectProps", "inputProps"]);
46
+ const [openDetected, setOpenDetected] = useState(false);
45
47
  return /* @__PURE__ */ jsx(
46
48
  MuiTextField,
47
49
  __spreadProps(__spreadValues({}, rest), {
@@ -49,7 +51,7 @@ var TextField = forwardRef((props, ref) => {
49
51
  InputProps: __spreadValues(__spreadValues({}, InputProps2), InputPropOverrides),
50
52
  InputLabelProps: __spreadValues({ component: FormLabel, helpTopicId, required, shrink: true }, InputLabelProps),
51
53
  FormHelperTextProps: __spreadValues({ component: FormHelperText }, FormHelperTextProps2),
52
- SelectProps: __spreadValues(__spreadValues({}, SelectProps2), SelectPropOverrides),
54
+ SelectProps: __spreadValues(__spreadValues(__spreadValues({}, SelectProps2), SelectPropOverrides), SelectAccessibilityOverrides(openDetected, setOpenDetected, SelectProps2 == null ? void 0 : SelectProps2.open)),
53
55
  ref
54
56
  })
55
57
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-textfield",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
4
4
  "description": "Availity MUI Textfield Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -32,7 +32,7 @@
32
32
  "publish:canary": "yarn npm publish --access public --tag canary"
33
33
  },
34
34
  "dependencies": {
35
- "@availity/mui-form-utils": "0.13.0",
35
+ "@availity/mui-form-utils": "0.13.1",
36
36
  "@availity/mui-icon": "0.10.1"
37
37
  },
38
38
  "devDependencies": {
@@ -1,4 +1,4 @@
1
- import { forwardRef } from 'react';
1
+ import { forwardRef, useState } from 'react';
2
2
  import MuiTextField, { TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';
3
3
  import {
4
4
  FormHelperText,
@@ -7,6 +7,7 @@ import {
7
7
  FormLabelProps,
8
8
  InputPropOverrides,
9
9
  InputProps,
10
+ SelectAccessibilityOverrides,
10
11
  SelectPropOverrides,
11
12
  SelectProps,
12
13
  } from '@availity/mui-form-utils';
@@ -24,6 +25,7 @@ export type TextFieldProps = {
24
25
  export const TextField = forwardRef<HTMLDivElement | HTMLInputElement, TextFieldProps>((props, ref) => {
25
26
  const { InputProps, helpTopicId, InputLabelProps, FormHelperTextProps, required, SelectProps, inputProps, ...rest } =
26
27
  props;
28
+ const [ openDetected, setOpenDetected ] = useState(false);
27
29
 
28
30
  return (
29
31
  <MuiTextField
@@ -32,7 +34,7 @@ export const TextField = forwardRef<HTMLDivElement | HTMLInputElement, TextField
32
34
  InputProps={{ ...InputProps, ...InputPropOverrides }}
33
35
  InputLabelProps={{ component: FormLabel, helpTopicId: helpTopicId, required, shrink: true, ...InputLabelProps }}
34
36
  FormHelperTextProps={{ component: FormHelperText, ...FormHelperTextProps }}
35
- SelectProps={{ ...SelectProps, ...SelectPropOverrides }}
37
+ SelectProps={{ ...SelectProps, ...SelectPropOverrides, ...SelectAccessibilityOverrides(openDetected, setOpenDetected, SelectProps?.open) }}
36
38
  ref={ref}
37
39
  />
38
40
  );