@etsoo/materialui 1.1.62 → 1.1.63

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.
@@ -7,6 +7,10 @@ export interface SearchBarProps {
7
7
  * Style class name
8
8
  */
9
9
  className?: string;
10
+ /**
11
+ * Item max width
12
+ */
13
+ itemMaxWidth?: number;
10
14
  /**
11
15
  * Fields
12
16
  */
package/lib/SearchBar.js CHANGED
@@ -52,7 +52,7 @@ const setChildState = (child, enabled) => {
52
52
  */
53
53
  export function SearchBar(props) {
54
54
  // Destruct
55
- const { className, fields, onSubmit } = props;
55
+ const { className, fields, onSubmit, itemMaxWidth = 160 } = props;
56
56
  // Labels
57
57
  const labels = Labels.CommonPage;
58
58
  // Spacing
@@ -226,10 +226,10 @@ export function SearchBar(props) {
226
226
  React.createElement(Stack, { ref: dimensions[0][0], justifyContent: "center", alignItems: "center", direction: "row", spacing: 1, width: "100%", sx: {
227
227
  overflowX: "hidden",
228
228
  "& > :not(style)": {
229
- flexBasis: "60px",
229
+ flexBasis: "auto",
230
230
  flexGrow: 0,
231
231
  flexShrink: 0,
232
- maxWidth: "180px",
232
+ maxWidth: `${itemMaxWidth}px`,
233
233
  visibility: "hidden"
234
234
  },
235
235
  "& > .hiddenChild": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.1.62",
3
+ "version": "1.1.63",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/src/SearchBar.tsx CHANGED
@@ -14,6 +14,11 @@ export interface SearchBarProps {
14
14
  */
15
15
  className?: string;
16
16
 
17
+ /**
18
+ * Item max width
19
+ */
20
+ itemMaxWidth?: number;
21
+
17
22
  /**
18
23
  * Fields
19
24
  */
@@ -77,7 +82,7 @@ const setChildState = (child: Element, enabled: boolean) => {
77
82
  */
78
83
  export function SearchBar(props: SearchBarProps) {
79
84
  // Destruct
80
- const { className, fields, onSubmit } = props;
85
+ const { className, fields, onSubmit, itemMaxWidth = 160 } = props;
81
86
 
82
87
  // Labels
83
88
  const labels = Labels.CommonPage;
@@ -309,10 +314,10 @@ export function SearchBar(props: SearchBarProps) {
309
314
  sx={{
310
315
  overflowX: "hidden",
311
316
  "& > :not(style)": {
312
- flexBasis: "60px",
317
+ flexBasis: "auto",
313
318
  flexGrow: 0,
314
319
  flexShrink: 0,
315
- maxWidth: "180px",
320
+ maxWidth: `${itemMaxWidth}px`,
316
321
  visibility: "hidden"
317
322
  },
318
323
  "& > .hiddenChild": {