@okta/odyssey-react-mui 1.8.1 → 1.8.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/Autocomplete.js +2 -0
  3. package/dist/Autocomplete.js.map +1 -1
  4. package/dist/Field.js +2 -0
  5. package/dist/Field.js.map +1 -1
  6. package/dist/FieldComponentProps.js.map +1 -1
  7. package/dist/NativeSelect.js +2 -0
  8. package/dist/NativeSelect.js.map +1 -1
  9. package/dist/PasswordField.js +2 -0
  10. package/dist/PasswordField.js.map +1 -1
  11. package/dist/SearchField.js +2 -0
  12. package/dist/SearchField.js.map +1 -1
  13. package/dist/Select.js +2 -0
  14. package/dist/Select.js.map +1 -1
  15. package/dist/TextField.js +2 -0
  16. package/dist/TextField.js.map +1 -1
  17. package/dist/src/Autocomplete.d.ts +2 -2
  18. package/dist/src/Autocomplete.d.ts.map +1 -1
  19. package/dist/src/Field.d.ts +5 -1
  20. package/dist/src/Field.d.ts.map +1 -1
  21. package/dist/src/FieldComponentProps.d.ts +4 -0
  22. package/dist/src/FieldComponentProps.d.ts.map +1 -1
  23. package/dist/src/NativeSelect.d.ts +1 -1
  24. package/dist/src/NativeSelect.d.ts.map +1 -1
  25. package/dist/src/PasswordField.d.ts.map +1 -1
  26. package/dist/src/SearchField.d.ts +2 -2
  27. package/dist/src/SearchField.d.ts.map +1 -1
  28. package/dist/src/Select.d.ts +2 -2
  29. package/dist/src/Select.d.ts.map +1 -1
  30. package/dist/src/TextField.d.ts.map +1 -1
  31. package/dist/tsconfig.production.tsbuildinfo +1 -1
  32. package/package.json +3 -3
  33. package/src/Autocomplete.tsx +3 -1
  34. package/src/Field.tsx +6 -0
  35. package/src/FieldComponentProps.ts +4 -0
  36. package/src/NativeSelect.tsx +3 -1
  37. package/src/PasswordField.tsx +2 -0
  38. package/src/SearchField.tsx +3 -1
  39. package/src/Select.tsx +9 -1
  40. package/src/TextField.tsx +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okta/odyssey-react-mui",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "React MUI components for Odyssey, Okta's design system",
5
5
  "author": "Okta, Inc.",
6
6
  "license": "Apache-2.0",
@@ -51,7 +51,7 @@
51
51
  "@mui/system": "^5.14.9",
52
52
  "@mui/utils": "^5.11.2",
53
53
  "@mui/x-date-pickers": "^5.0.15",
54
- "@okta/odyssey-design-tokens": "1.8.1",
54
+ "@okta/odyssey-design-tokens": "1.8.2",
55
55
  "date-fns": "^2.30.0",
56
56
  "i18next": "^23.5.1",
57
57
  "material-react-table": "^2.0.2",
@@ -63,5 +63,5 @@
63
63
  "react": ">=17 <19",
64
64
  "react-dom": ">=17 <19"
65
65
  },
66
- "gitHead": "c1616886687301f9d71d0e7f1442f72b2f520ac1"
66
+ "gitHead": "0b0034e9fa97a5dd852f01249aa5093484040ec9"
67
67
  }
@@ -161,7 +161,7 @@ export type AutocompleteProps<
161
161
  getIsOptionEqualToValue?: (option: OptionType, value: OptionType) => boolean;
162
162
  } & Pick<
163
163
  FieldComponentProps,
164
- "errorMessage" | "hint" | "id" | "isOptional" | "name"
164
+ "errorMessage" | "hint" | "id" | "isOptional" | "name" | "isFullWidth"
165
165
  > &
166
166
  SeleniumProps;
167
167
 
@@ -177,6 +177,7 @@ const Autocomplete = <
177
177
  inputValue,
178
178
  isCustomValueAllowed,
179
179
  isDisabled,
180
+ isFullWidth = false,
180
181
  isLoading,
181
182
  isOptional = false,
182
183
  isReadOnly,
@@ -309,6 +310,7 @@ const Autocomplete = <
309
310
  freeSolo={isCustomValueAllowed}
310
311
  filterSelectedOptions={true}
311
312
  id={idOverride}
313
+ fullWidth={isFullWidth}
312
314
  loading={isLoading}
313
315
  multiple={hasMultipleChoices}
314
316
  onBlur={onBlur}
package/src/Field.tsx CHANGED
@@ -59,6 +59,10 @@ export type FieldProps = {
59
59
  * If `true`, the component is disabled.
60
60
  */
61
61
  isDisabled?: boolean;
62
+ /**
63
+ * If `true`, the component can stretch to fill the width of the container.
64
+ */
65
+ isFullWidth?: boolean;
62
66
  /**
63
67
  * If `true`, the `input` element is not required.
64
68
  */
@@ -96,6 +100,7 @@ const Field = ({
96
100
  hint,
97
101
  id: idOverride,
98
102
  isDisabled: isDisabledProp = false,
103
+ isFullWidth = false,
99
104
  isRadioGroup = false,
100
105
  isOptional = false,
101
106
  label,
@@ -126,6 +131,7 @@ const Field = ({
126
131
  disabled={isDisabled}
127
132
  error={Boolean(errorMessage)}
128
133
  role={isRadioGroup ? "radiogroup" : undefined}
134
+ fullWidth={isFullWidth}
129
135
  >
130
136
  {fieldType === "group" ? (
131
137
  <MuiFormLabel component="legend">
@@ -27,6 +27,10 @@ export type FieldComponentProps = {
27
27
  * If `true`, the component is disabled.
28
28
  */
29
29
  isDisabled?: boolean;
30
+ /**
31
+ * If `true`, the component can stretch to fill the width of the container.
32
+ */
33
+ isFullWidth?: boolean;
30
34
  /**
31
35
  * If `true`, the `input` element is not required.
32
36
  */
@@ -81,7 +81,7 @@ export type NativeSelectProps<
81
81
  value?: Value;
82
82
  } & Pick<
83
83
  FieldComponentProps,
84
- "errorMessage" | "hint" | "id" | "isDisabled" | "isOptional"
84
+ "errorMessage" | "hint" | "id" | "isDisabled" | "isOptional" | "isFullWidth"
85
85
  > &
86
86
  SeleniumProps;
87
87
 
@@ -97,6 +97,7 @@ const NativeSelect: ForwardRefWithType = forwardRef(
97
97
  hint,
98
98
  id: idOverride,
99
99
  isDisabled = false,
100
+ isFullWidth = false,
100
101
  isMultiSelect,
101
102
  isOptional = false,
102
103
  label,
@@ -179,6 +180,7 @@ const NativeSelect: ForwardRefWithType = forwardRef(
179
180
  hint={hint}
180
181
  id={idOverride}
181
182
  isDisabled={isDisabled}
183
+ isFullWidth={isFullWidth}
182
184
  isOptional={isOptional}
183
185
  label={label}
184
186
  renderFieldComponent={renderFieldComponent}
@@ -84,6 +84,7 @@ const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(
84
84
  hint,
85
85
  id: idOverride,
86
86
  isDisabled = false,
87
+ isFullWidth = false,
87
88
  isOptional = false,
88
89
  hasShowPassword = true,
89
90
  isReadOnly,
@@ -199,6 +200,7 @@ const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(
199
200
  hint={hint}
200
201
  id={idOverride}
201
202
  isDisabled={isDisabled}
203
+ isFullWidth={isFullWidth}
202
204
  isOptional={isOptional}
203
205
  label={label}
204
206
  renderFieldComponent={renderFieldComponent}
@@ -78,7 +78,7 @@ export type SearchFieldProps = {
78
78
  * The value of the `input` element, to use when controlled.
79
79
  */
80
80
  value?: string;
81
- } & Pick<FieldComponentProps, "id" | "isDisabled" | "name"> &
81
+ } & Pick<FieldComponentProps, "id" | "isDisabled" | "name" | "isFullWidth"> &
82
82
  SeleniumProps;
83
83
 
84
84
  const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(
@@ -89,6 +89,7 @@ const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(
89
89
  hasInitialFocus,
90
90
  id: idOverride,
91
91
  isDisabled = false,
92
+ isFullWidth = false,
92
93
  label,
93
94
  name: nameOverride,
94
95
  onChange: onChangeProp,
@@ -186,6 +187,7 @@ const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(
186
187
  hasVisibleLabel={false}
187
188
  id={idOverride}
188
189
  isDisabled={isDisabled}
190
+ isFullWidth={isFullWidth}
189
191
  isOptional={true}
190
192
  label={label}
191
193
  renderFieldComponent={renderFieldComponent}
package/src/Select.tsx CHANGED
@@ -84,7 +84,13 @@ export type SelectProps<
84
84
  value?: Value;
85
85
  } & Pick<
86
86
  FieldComponentProps,
87
- "errorMessage" | "hint" | "id" | "isDisabled" | "isOptional" | "name"
87
+ | "errorMessage"
88
+ | "hint"
89
+ | "id"
90
+ | "isDisabled"
91
+ | "isOptional"
92
+ | "name"
93
+ | "isFullWidth"
88
94
  > &
89
95
  SeleniumProps;
90
96
 
@@ -114,6 +120,7 @@ const Select = <
114
120
  hint,
115
121
  id: idOverride,
116
122
  isDisabled = false,
123
+ isFullWidth = false,
117
124
  isMultiSelect,
118
125
  isOptional = false,
119
126
  label,
@@ -282,6 +289,7 @@ const Select = <
282
289
  hint={hint}
283
290
  id={idOverride}
284
291
  isDisabled={isDisabled}
292
+ isFullWidth={isFullWidth}
285
293
  isOptional={isOptional}
286
294
  label={label}
287
295
  renderFieldComponent={renderFieldComponent}
package/src/TextField.tsx CHANGED
@@ -104,6 +104,7 @@ const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
104
104
  hint,
105
105
  id: idOverride,
106
106
  isDisabled = false,
107
+ isFullWidth = false,
107
108
  isMultiline = false,
108
109
  isOptional = false,
109
110
  isReadOnly,
@@ -205,6 +206,7 @@ const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
205
206
  hint={hint}
206
207
  id={idOverride}
207
208
  isDisabled={isDisabled}
209
+ isFullWidth={isFullWidth}
208
210
  isOptional={isOptional}
209
211
  label={label}
210
212
  renderFieldComponent={renderFieldComponent}