@availity/mui-textfield 1.1.6 → 1.2.0
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 +10 -0
- package/package.json +2 -2
- package/src/lib/TextField.stories.tsx +38 -1
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
|
+
## [1.2.0](https://github.com/Availity/element/compare/@availity/mui-textfield@1.1.6...@availity/mui-textfield@1.2.0) (2025-04-14)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-form-utils` updated to version `1.1.6`
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **mui-form-utils:** add searchbyformgroup ([4207b27](https://github.com/Availity/element/commit/4207b2768f86036df0d3443e452de867d6ceb491))
|
|
14
|
+
|
|
5
15
|
## [1.1.6](https://github.com/Availity/element/compare/@availity/mui-textfield@1.1.5...@availity/mui-textfield@1.1.6) (2025-04-14)
|
|
6
16
|
|
|
7
17
|
### Dependency Updates
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-textfield",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Availity MUI Textfield Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@availity/mui-form-utils": "1.
|
|
43
|
+
"@availity/mui-form-utils": "1.2.0",
|
|
44
44
|
"@availity/mui-icon": "1.0.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -6,7 +6,7 @@ import { IMaskInput } from 'react-imask';
|
|
|
6
6
|
import { NumericFormat, NumericFormatProps } from 'react-number-format';
|
|
7
7
|
import { IconButton } from '@availity/mui-button';
|
|
8
8
|
import { Chip } from '@availity/mui-chip';
|
|
9
|
-
import { FormControl, FormLabel, Input, InputAdornment, SelectChangeEvent } from '@availity/mui-form-utils';
|
|
9
|
+
import { FormControl, FormLabel, Input, InputAdornment, SearchByFormGroup, SelectChangeEvent } from '@availity/mui-form-utils';
|
|
10
10
|
import { EyeIcon, EyeSlashIcon, SearchIcon } from '@availity/mui-icon';
|
|
11
11
|
import { Box, Grid, Stack } from '@availity/mui-layout';
|
|
12
12
|
import { MenuItem } from '@availity/mui-menu';
|
|
@@ -380,3 +380,40 @@ export const _MultiSelect: StoryObj<typeof TextField> = {
|
|
|
380
380
|
},
|
|
381
381
|
args: { label: 'MultiSelect' },
|
|
382
382
|
};
|
|
383
|
+
|
|
384
|
+
/** Wrap the fields in a `SearchByFormGroup` from the [@availity/mui-form-utils](./?path=/docs/form-components-formutils-introduction--docs) package for our combined search by styles.
|
|
385
|
+
*
|
|
386
|
+
* It is recommended to use `Autocomplete` for the "Search By" selection, however a `select` `TextField` can be used with `slotProps.select.labelId = {searchById passed to form group}-label`.
|
|
387
|
+
*/
|
|
388
|
+
export const _SearchBy: StoryObj<typeof TextField> = {
|
|
389
|
+
render: () => {
|
|
390
|
+
const [searchBy, setSearchBy] = useState('');
|
|
391
|
+
|
|
392
|
+
const handleChange = (event: SelectChangeEvent) => {
|
|
393
|
+
setSearchBy(event.target.value as string);
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
return (
|
|
397
|
+
<SearchByFormGroup searchById="searchby">
|
|
398
|
+
<TextField id="searchby" value={searchBy} fullWidth={false} select slotProps={{select:{ onChange: handleChange, labelId: "searchby-label"}}}>
|
|
399
|
+
<MenuItem value="Parameter 1">Parameter 1</MenuItem>
|
|
400
|
+
<MenuItem value="Parameter 2">Parameter 2</MenuItem>
|
|
401
|
+
<MenuItem value="Parameter 3">Parameter 3</MenuItem>
|
|
402
|
+
</TextField>
|
|
403
|
+
<TextField
|
|
404
|
+
id="search"
|
|
405
|
+
placeholder="search"
|
|
406
|
+
slotProps={{
|
|
407
|
+
input: {
|
|
408
|
+
startAdornment: (
|
|
409
|
+
<InputAdornment position="start">
|
|
410
|
+
<SearchIcon aria-hidden={false} aria-label="search"/>
|
|
411
|
+
</InputAdornment>
|
|
412
|
+
),
|
|
413
|
+
}
|
|
414
|
+
}}
|
|
415
|
+
/>
|
|
416
|
+
</SearchByFormGroup>
|
|
417
|
+
);
|
|
418
|
+
},
|
|
419
|
+
};
|