@thecb/components 9.2.2-beta.1 → 9.2.2-beta.3

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": "9.2.2-beta.1",
3
+ "version": "9.2.2-beta.3",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -262,7 +262,7 @@ const Dropdown = ({
262
262
  useEffect(() => {
263
263
  if (autoEraseTypeAhead) {
264
264
  clearTimeout(timer);
265
- setTimer(setTimeout(() => setInputValue(""), 5000));
265
+ setTimer(setTimeout(() => setInputValue(""), 20000));
266
266
  }
267
267
  setFilteredOptions(
268
268
  options.filter(option =>
@@ -299,7 +299,7 @@ const Dropdown = ({
299
299
  <Box
300
300
  padding="0"
301
301
  background={isOpen ? themeValues.hoverColor : WHITE}
302
- extraStyles={`position: relative;`}
302
+ extraStyles={`position: relative; margin-bottom: 1rem;`}
303
303
  minWidth="100%"
304
304
  onClick={() => {
305
305
  if (!isOpen) {
@@ -96,26 +96,28 @@ const FormSelect = ({
96
96
  smoothScroll={smoothScroll}
97
97
  />
98
98
  <Stack direction="row" justify="space-between">
99
- <Text
100
- color={ERROR_COLOR}
101
- variant="pXS"
102
- weight={themeValues.fontWeight}
103
- extraStyles={`
99
+ {(field.hasErrors && field.dirty) || (field.hasErrors && showErrors) ? (
100
+ <Text
101
+ color={ERROR_COLOR}
102
+ variant="pXS"
103
+ weight={themeValues.fontWeight}
104
+ extraStyles={`
104
105
  word-break: break-word;
105
106
  font-family: Public Sans;
106
107
  &::first-letter {
107
108
  text-transform: uppercase;
108
109
  }
109
110
  `}
110
- id={createIdFromString(labelTextWhenNoError, "error message")}
111
- aria-live="polite"
112
- aria-atomic={true}
113
- data-qa={createIdFromString(labelTextWhenNoError, "error message")}
114
- >
115
- {(field.hasErrors && field.dirty) || (field.hasErrors && showErrors)
116
- ? errorMessages[field.errors[0]]
117
- : ""}
118
- </Text>
111
+ id={createIdFromString(labelTextWhenNoError, "error message")}
112
+ aria-live="polite"
113
+ aria-atomic={true}
114
+ data-qa={createIdFromString(labelTextWhenNoError, "error message")}
115
+ >
116
+ {errorMessages[field.errors[0]]}
117
+ </Text>
118
+ ) : (
119
+ <Text extraStyles={`height: ${themeValues.lineHeight};`} />
120
+ )}
119
121
  </Stack>
120
122
  </SelectContainer>
121
123
  );