@availity/mui-textfield 0.4.0 → 0.4.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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.4.2](https://github.com/Availity/element/compare/@availity/mui-textfield@0.4.1...@availity/mui-textfield@0.4.2) (2023-11-28)
6
+
7
+ ## [0.4.1](https://github.com/Availity/element/compare/@availity/mui-textfield@0.4.0...@availity/mui-textfield@0.4.1) (2023-11-27)
8
+
9
+ ### Dependency Updates
10
+
11
+ * `mui-form-utils` updated to version `0.6.1`
5
12
  ## [0.4.0](https://github.com/Availity/element/compare/@availity/mui-textfield@0.3.3...@availity/mui-textfield@0.4.0) (2023-11-22)
6
13
 
7
14
  ### Dependency Updates
package/dist/index.d.ts CHANGED
@@ -7,7 +7,9 @@ type TextFieldProps = {
7
7
  InputLabelProps?: FormLabelProps;
8
8
  InputProps?: InputProps;
9
9
  SelectProps?: SelectProps;
10
- } & Pick<FormLabelProps, 'helpTopicId'> & Omit<TextFieldProps$1, 'variant'>;
10
+ /** If `true`, the input will take up the full width of its container. @default true */
11
+ fullWidth?: boolean;
12
+ } & Pick<FormLabelProps, 'helpTopicId'> & Omit<TextFieldProps$1, 'fullWidth' | 'variant'>;
11
13
  declare const TextField: react.ForwardRefExoticComponent<Pick<TextFieldProps, "className" | "style" | "classes" | "children" | "color" | "sx" | "label" | "slot" | "select" | "title" | "id" | "lang" | "name" | "type" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "component" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "nonce" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "disabled" | "value" | "autoComplete" | "required" | "size" | "rows" | "error" | "margin" | "fullWidth" | "helpTopicId" | "inputRef" | "focused" | "inputProps" | "multiline" | "maxRows" | "minRows" | "hiddenLabel" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "SelectProps"> & react.RefAttributes<HTMLDivElement | HTMLInputElement>>;
12
14
 
13
15
  export { TextField, TextFieldProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-textfield",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
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.6.0",
35
+ "@availity/mui-form-utils": "0.6.1",
36
36
  "@availity/mui-icon": "0.7.3"
37
37
  },
38
38
  "devDependencies": {
@@ -13,6 +13,7 @@ const meta: Meta<typeof TextField> = {
13
13
  tags: ['autodocs'],
14
14
  args: {
15
15
  helperText: 'Helper Text',
16
+ fullWidth: false,
16
17
  },
17
18
  argTypes: {
18
19
  helperText: {
@@ -46,11 +47,24 @@ export const _States: StoryObj<typeof TextField> = {
46
47
  },
47
48
  };
48
49
 
50
+ export const _Sizes: StoryObj<typeof TextField> = {
51
+ render: (args: TextFieldProps) => (
52
+ <Stack direction="row" spacing={1}>
53
+ <TextField label="Small" id="small" size="small" {...args} />
54
+ <TextField label="Medium" id="medium" size="medium" {...args} />
55
+ </Stack>
56
+ ),
57
+ args: {
58
+ margin: 'normal',
59
+ },
60
+ };
61
+
49
62
  export const _WithIcon: StoryObj<typeof TextField> = {
50
63
  render: () => (
51
64
  <TextField
52
65
  label="With Icon"
53
66
  id="search"
67
+ fullWidth={false}
54
68
  InputProps={{
55
69
  startAdornment: (
56
70
  <InputAdornment position="start">
@@ -71,6 +85,7 @@ export const _PasswordField: StoryObj<typeof TextField> = {
71
85
  type={showPassword ? 'text' : 'password'}
72
86
  label="Password"
73
87
  id="password"
88
+ fullWidth={false}
74
89
  InputProps={{
75
90
  endAdornment: (
76
91
  <InputAdornment position="end">
@@ -16,8 +16,10 @@ export type TextFieldProps = {
16
16
  InputLabelProps?: FormLabelProps;
17
17
  InputProps?: InputProps;
18
18
  SelectProps?: SelectProps;
19
+ /** If `true`, the input will take up the full width of its container. @default true */
20
+ fullWidth?: boolean;
19
21
  } & Pick<FormLabelProps, 'helpTopicId'> &
20
- Omit<MuiTextFieldProps, 'variant'>;
22
+ Omit<MuiTextFieldProps, 'fullWidth' | 'variant'>;
21
23
 
22
24
  export const TextField = forwardRef<HTMLDivElement | HTMLInputElement, TextFieldProps>((props, ref) => {
23
25
  const { InputProps, helpTopicId, InputLabelProps, FormHelperTextProps, required, SelectProps, ...rest } = props;