@availity/mui-textfield 1.1.6 → 1.2.1

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,23 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.2.1](https://github.com/Availity/element/compare/@availity/mui-textfield@1.2.0...@availity/mui-textfield@1.2.1) (2025-04-21)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `mui-form-utils` updated to version `1.2.0`
10
+ * `mui-button` updated to version `1.2.0`
11
+ * `mui-menu` updated to version `1.2.0`
12
+ ## [1.2.0](https://github.com/Availity/element/compare/@availity/mui-textfield@1.1.6...@availity/mui-textfield@1.2.0) (2025-04-14)
13
+
14
+ ### Dependency Updates
15
+
16
+ * `mui-form-utils` updated to version `1.1.6`
17
+
18
+ ### Features
19
+
20
+ * **mui-form-utils:** add searchbyformgroup ([4207b27](https://github.com/Availity/element/commit/4207b2768f86036df0d3443e452de867d6ceb491))
21
+
5
22
  ## [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
23
 
7
24
  ### Dependency Updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-textfield",
3
- "version": "1.1.6",
3
+ "version": "1.2.1",
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.1.4",
43
+ "@availity/mui-form-utils": "1.2.1",
44
44
  "@availity/mui-icon": "1.0.2"
45
45
  },
46
46
  "devDependencies": {
@@ -6,7 +6,14 @@ 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 {
10
+ FormControl,
11
+ FormLabel,
12
+ Input,
13
+ InputAdornment,
14
+ SearchByFormGroup,
15
+ SelectChangeEvent,
16
+ } from '@availity/mui-form-utils';
10
17
  import { EyeIcon, EyeSlashIcon, SearchIcon } from '@availity/mui-icon';
11
18
  import { Box, Grid, Stack } from '@availity/mui-layout';
12
19
  import { MenuItem } from '@availity/mui-menu';
@@ -380,3 +387,46 @@ export const _MultiSelect: StoryObj<typeof TextField> = {
380
387
  },
381
388
  args: { label: 'MultiSelect' },
382
389
  };
390
+
391
+ /** 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.
392
+ *
393
+ * 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`.
394
+ */
395
+ export const _SearchBy: StoryObj<typeof TextField> = {
396
+ render: () => {
397
+ const [searchBy, setSearchBy] = useState('');
398
+
399
+ const handleChange = (event: SelectChangeEvent) => {
400
+ setSearchBy(event.target.value as string);
401
+ };
402
+
403
+ return (
404
+ <SearchByFormGroup searchById="searchbystory-searchby">
405
+ <TextField
406
+ id="searchbystory-searchby"
407
+ value={searchBy}
408
+ fullWidth={false}
409
+ select
410
+ slotProps={{ select: { onChange: handleChange, labelId: 'searchbystory-searchby-label' } }}
411
+ >
412
+ <MenuItem value="Parameter 1">Parameter 1</MenuItem>
413
+ <MenuItem value="Parameter 2">Parameter 2</MenuItem>
414
+ <MenuItem value="Parameter 3">Parameter 3</MenuItem>
415
+ </TextField>
416
+ <TextField
417
+ id="searchbystory-search"
418
+ placeholder="search"
419
+ slotProps={{
420
+ input: {
421
+ startAdornment: (
422
+ <InputAdornment position="start" component="label" htmlFor="searchbystory-search">
423
+ <SearchIcon aria-hidden={false} titleAccess="search"/>
424
+ </InputAdornment>
425
+ ),
426
+ }
427
+ }}
428
+ />
429
+ </SearchByFormGroup>
430
+ );
431
+ },
432
+ };