@thecb/components 6.0.0-beta.13 → 6.0.0-beta.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "6.0.0-beta.13",
3
+ "version": "6.0.0-beta.14",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -39,6 +39,10 @@ const DropdownContentWrapper = styled.div`
39
39
  &:focus {
40
40
  outline: none;
41
41
  }
42
+
43
+ ul {
44
+ padding-left: 0;
45
+ }
42
46
  `;
43
47
 
44
48
  const DropdownItemWrapper = styled.li`
@@ -233,8 +237,24 @@ const Dropdown = ({
233
237
  return (
234
238
  <Box
235
239
  padding="0"
240
+ background={isOpen ? themeValues.hoverColor : WHITE}
241
+ borderSize="1px"
242
+ borderColor={
243
+ isError
244
+ ? ERROR_COLOR
245
+ : isOpen
246
+ ? themeValues.selectedColor
247
+ : GREY_CHATEAU
248
+ }
249
+ borderRadius="2px"
250
+ borderWidthOverride="0px 1px 0px 0px"
236
251
  extraStyles={`position: relative;`}
237
252
  minWidth="100%"
253
+ onClick={() => {
254
+ if (!isOpen) {
255
+ onClick();
256
+ }
257
+ }}
238
258
  width="100%"
239
259
  >
240
260
  <Stack direction="row" bottomItem={2}>
@@ -259,6 +279,7 @@ const Dropdown = ({
259
279
  ? themeValues.selectedColor
260
280
  : GREY_CHATEAU
261
281
  }
282
+ borderWidthOverride="1px 0px 1px 1px"
262
283
  extraStyles={
263
284
  disabled &&
264
285
  `color: #6e727e;
@@ -267,11 +288,15 @@ const Dropdown = ({
267
288
  }
268
289
  hoverStyles={`background-color: ${themeValues.hoverColor};`}
269
290
  isOpen={isOpen}
291
+ minHeight="48px"
270
292
  minWidth="85%"
271
293
  name={autocompleteValue}
272
294
  onKeyDown={onKeyDown}
273
- onClick={onClick}
274
- onFocus={onClick}
295
+ onFocus={() => {
296
+ if (!isOpen) {
297
+ onClick();
298
+ }
299
+ }}
275
300
  onChange={e => {
276
301
  console.log("input change event", e.target);
277
302
  console.log("input change event value", e.target.value);
@@ -283,7 +308,7 @@ const Dropdown = ({
283
308
  themeValues={themeValues}
284
309
  title={hasTitles ? getSelection() : null}
285
310
  type="text"
286
- tabIndex={-1}
311
+ tabIndex={0}
287
312
  value={inputValue}
288
313
  width="85%"
289
314
  dataQa={placeholder}