@spaced-out/ui-design-system 0.0.27 → 0.0.28

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
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.28](https://github.com/spaced-out/ui-design-system/compare/v0.0.27...v0.0.28) (2023-02-17)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * menu sizing fix for dropdowns ([f73cd4d](https://github.com/spaced-out/ui-design-system/commit/f73cd4d525d31a25ab994bd0ecb883374d5cb68a))
11
+
5
12
  ### [0.0.27](https://github.com/spaced-out/ui-design-system/compare/v0.0.26...v0.0.27) (2023-02-16)
6
13
 
7
14
 
@@ -104,7 +104,7 @@ const ButtonDropdown = _ref => {
104
104
  onOptionSelect && onOptionSelect(option);
105
105
  clickAway();
106
106
  },
107
- size: size
107
+ size: menu.size || size
108
108
  }))));
109
109
  });
110
110
  };
@@ -137,7 +137,7 @@ export const ButtonDropdown = ({
137
137
  onOptionSelect && onOptionSelect(option);
138
138
  clickAway();
139
139
  }}
140
- size={size}
140
+ size={menu.size || size}
141
141
  />
142
142
  </div>
143
143
  )}
@@ -27,6 +27,7 @@ const Dropdown = _ref => {
27
27
  placeholder = 'Select...',
28
28
  onChange,
29
29
  selectedOption,
30
+ menuSize,
30
31
  ...inputProps
31
32
  } = _ref;
32
33
  const [inputValue, setInputValue] = React.useState(selectedOption?.label);
@@ -98,7 +99,7 @@ const Dropdown = _ref => {
98
99
  handleSelect(option);
99
100
  clickAway();
100
101
  },
101
- size: size
102
+ size: menuSize || size
102
103
  })));
103
104
  });
104
105
  };
@@ -44,6 +44,7 @@ export type DropdownProps = {
44
44
  options?: Array<MenuOption>,
45
45
  composeOptions?: Array<Array<MenuOption>>,
46
46
  selectedOption?: MenuOption,
47
+ menuSize?: 'medium' | 'small',
47
48
  };
48
49
 
49
50
  export const Dropdown = ({
@@ -54,6 +55,7 @@ export const Dropdown = ({
54
55
  placeholder = 'Select...',
55
56
  onChange,
56
57
  selectedOption,
58
+ menuSize,
57
59
  ...inputProps
58
60
  }: DropdownProps): React.Node => {
59
61
  const [inputValue, setInputValue] = React.useState(selectedOption?.label);
@@ -121,7 +123,7 @@ export const Dropdown = ({
121
123
  handleSelect(option);
122
124
  clickAway();
123
125
  }}
124
- size={size}
126
+ size={menuSize || size}
125
127
  />
126
128
  </div>
127
129
  )}
@@ -73,7 +73,7 @@ const TabDropdown = _ref => {
73
73
  onOptionSelect && onOptionSelect(option);
74
74
  clickAway();
75
75
  },
76
- size: size
76
+ size: props.menu.size || size
77
77
  }))));
78
78
  });
79
79
  };
@@ -94,7 +94,7 @@ export const TabDropdown = ({
94
94
  onOptionSelect && onOptionSelect(option);
95
95
  clickAway();
96
96
  }}
97
- size={size}
97
+ size={props.menu.size || size}
98
98
  />
99
99
  </div>
100
100
  )}
@@ -27,6 +27,7 @@ const Typeahead = _ref => {
27
27
  onSelect,
28
28
  onSearch,
29
29
  selectedOption,
30
+ menuSize,
30
31
  ...inputProps
31
32
  } = _ref;
32
33
  const typeaheadRef = React.useRef();
@@ -112,7 +113,7 @@ const Typeahead = _ref => {
112
113
  handleSelect(option);
113
114
  clickAway();
114
115
  },
115
- size: size
116
+ size: menuSize || size
116
117
  })));
117
118
  });
118
119
  };
@@ -44,6 +44,7 @@ export type TypeaheadProps = {
44
44
  required?: boolean,
45
45
  options?: Array<MenuOption>,
46
46
  selectedOption?: MenuOption,
47
+ menuSize?: 'medium' | 'small',
47
48
  };
48
49
 
49
50
  export const Typeahead = ({
@@ -54,6 +55,7 @@ export const Typeahead = ({
54
55
  onSelect,
55
56
  onSearch,
56
57
  selectedOption,
58
+ menuSize,
57
59
  ...inputProps
58
60
  }: TypeaheadProps): React.Node => {
59
61
  const typeaheadRef = React.useRef();
@@ -142,7 +144,7 @@ export const Typeahead = ({
142
144
  handleSelect(option);
143
145
  clickAway();
144
146
  }}
145
- size={size}
147
+ size={menuSize || size}
146
148
  />
147
149
  </div>
148
150
  )}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {