@thecb/components 6.0.0-beta.11 → 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
|
@@ -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`
|
|
@@ -51,6 +55,7 @@ const DropdownItemWrapper = styled.li`
|
|
|
51
55
|
padding: 1rem;
|
|
52
56
|
box-sizing: border-box;
|
|
53
57
|
width: 100%;
|
|
58
|
+
list-style: none;
|
|
54
59
|
cursor: ${({ disabled }) => (disabled ? "default" : "pointer")};
|
|
55
60
|
|
|
56
61
|
&:hover {
|
|
@@ -230,8 +235,29 @@ const Dropdown = ({
|
|
|
230
235
|
}, [filteredOptions]);
|
|
231
236
|
|
|
232
237
|
return (
|
|
233
|
-
<
|
|
234
|
-
|
|
238
|
+
<Box
|
|
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"
|
|
251
|
+
extraStyles={`position: relative;`}
|
|
252
|
+
minWidth="100%"
|
|
253
|
+
onClick={() => {
|
|
254
|
+
if (!isOpen) {
|
|
255
|
+
onClick();
|
|
256
|
+
}
|
|
257
|
+
}}
|
|
258
|
+
width="100%"
|
|
259
|
+
>
|
|
260
|
+
<Stack direction="row" bottomItem={2}>
|
|
235
261
|
<Box
|
|
236
262
|
as="input"
|
|
237
263
|
aria-multiline="false"
|
|
@@ -253,6 +279,7 @@ const Dropdown = ({
|
|
|
253
279
|
? themeValues.selectedColor
|
|
254
280
|
: GREY_CHATEAU
|
|
255
281
|
}
|
|
282
|
+
borderWidthOverride="1px 0px 1px 1px"
|
|
256
283
|
extraStyles={
|
|
257
284
|
disabled &&
|
|
258
285
|
`color: #6e727e;
|
|
@@ -261,10 +288,15 @@ const Dropdown = ({
|
|
|
261
288
|
}
|
|
262
289
|
hoverStyles={`background-color: ${themeValues.hoverColor};`}
|
|
263
290
|
isOpen={isOpen}
|
|
291
|
+
minHeight="48px"
|
|
292
|
+
minWidth="85%"
|
|
264
293
|
name={autocompleteValue}
|
|
265
294
|
onKeyDown={onKeyDown}
|
|
266
|
-
|
|
267
|
-
|
|
295
|
+
onFocus={() => {
|
|
296
|
+
if (!isOpen) {
|
|
297
|
+
onClick();
|
|
298
|
+
}
|
|
299
|
+
}}
|
|
268
300
|
onChange={e => {
|
|
269
301
|
console.log("input change event", e.target);
|
|
270
302
|
console.log("input change event value", e.target.value);
|
|
@@ -276,9 +308,9 @@ const Dropdown = ({
|
|
|
276
308
|
themeValues={themeValues}
|
|
277
309
|
title={hasTitles ? getSelection() : null}
|
|
278
310
|
type="text"
|
|
279
|
-
tabIndex={
|
|
311
|
+
tabIndex={0}
|
|
280
312
|
value={inputValue}
|
|
281
|
-
width="
|
|
313
|
+
width="85%"
|
|
282
314
|
dataQa={placeholder}
|
|
283
315
|
/>
|
|
284
316
|
<IconWrapper open={isOpen}>
|
|
@@ -361,7 +393,7 @@ const Dropdown = ({
|
|
|
361
393
|
<Fragment />
|
|
362
394
|
)}
|
|
363
395
|
</Fragment>
|
|
364
|
-
</
|
|
396
|
+
</Box>
|
|
365
397
|
);
|
|
366
398
|
};
|
|
367
399
|
|