@thecb/components 9.2.4-beta.8 → 9.2.5-beta.0

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.4-beta.8",
3
+ "version": "9.2.5-beta.0",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -262,13 +262,13 @@ const Dropdown = ({
262
262
  useEffect(() => {
263
263
  if (autoEraseTypeAhead) {
264
264
  clearTimeout(timer);
265
- setTimer(setTimeout(() => setInputValue(""), 3000));
265
+ setTimer(setTimeout(() => setInputValue(""), 20000));
266
266
  }
267
267
  setFilteredOptions(
268
268
  options.filter(
269
269
  option =>
270
- option.value.toLowerCase().startsWith(inputValue.toLowerCase()) ||
271
- option.text.toLowerCase().startsWith(inputValue.toLowerCase())
270
+ option.value.toLowerCase().match(inputValue.toLowerCase()) ||
271
+ option.text.toLowerCase().match(inputValue.toLowerCase())
272
272
  )
273
273
  );
274
274
  }, [inputValue]);
@@ -67,7 +67,8 @@ const Modal = ({
67
67
  alignItems: "center"
68
68
  }}
69
69
  dialogStyle={{
70
- width: customWidth || "615px"
70
+ width: customWidth || "615px",
71
+ overflow: "auto"
71
72
  }}
72
73
  underlayClickExits={underlayClickExits}
73
74
  >
@@ -47,8 +47,7 @@ const RadioSection = ({
47
47
  initiallyOpen = true,
48
48
  openHeight = "auto",
49
49
  containerStyles = "",
50
- ariaDescribedBy,
51
- isSectionRequired = false
50
+ ariaDescribedBy
52
51
  }) => {
53
52
  const handleKeyDown = (id, e) => {
54
53
  if (e?.keyCode === 13 || e?.keyCode === 32) {
@@ -106,7 +105,7 @@ const RadioSection = ({
106
105
  borderRadius="4px"
107
106
  extraStyles={containerStyles}
108
107
  >
109
- <Stack childGap="0" role="radiogroup" aria-required={isSectionRequired}>
108
+ <Stack childGap="0" role="radiogroup">
110
109
  {sections
111
110
  .filter(section => !section.hidden)
112
111
  .map(section => (
@@ -125,7 +124,6 @@ const RadioSection = ({
125
124
  role="radio"
126
125
  aria-checked={openSection === section.id}
127
126
  aria-disabled={section.disabled}
128
- aria-required={!!section?.required}
129
127
  >
130
128
  <Stack childGap="0">
131
129
  <Box
@@ -179,7 +177,6 @@ const RadioSection = ({
179
177
  : () => toggleOpenSection(section.id)
180
178
  }
181
179
  tabIndex="-1"
182
- aria-required={!!section?.required}
183
180
  />
184
181
  </Box>
185
182
  )}
@@ -49,10 +49,9 @@ const sections = [
49
49
  title: "New Card",
50
50
  content: <p>The form to add a credit card would go here.</p>,
51
51
  rightIconsLabel: cardIconsLabel,
52
- rightIcons: cardIcons,
53
- required: true
52
+ rightIcons: cardIcons
54
53
  },
55
- { id: "bar", title: "Bar", content: <div>Content 1</div>, required: true },
54
+ { id: "bar", title: "Bar", content: <div>Content 1</div> },
56
55
  { id: "baz", title: "Baz", content: <div>Content 2</div> }
57
56
  ];
58
57
 
@@ -66,7 +65,6 @@ export const radioSection = () => {
66
65
  openSection={openSection}
67
66
  staggeredAnimation={boolean("staggeredAnimation", false, "props")}
68
67
  sections={sections}
69
- isSectionRequired={true}
70
68
  />
71
69
  );
72
70
  };
@@ -19,8 +19,7 @@ const RadioButton = ({
19
19
  ariaDescribedBy = "",
20
20
  themeValues,
21
21
  ariaLabelledBy = "",
22
- ariaLabel = null,
23
- ...rest
22
+ ariaLabel = null
24
23
  }) => {
25
24
  const buttonBorder = {
26
25
  onFocused: {
@@ -65,7 +64,7 @@ const RadioButton = ({
65
64
  width: "0px"
66
65
  }
67
66
  };
68
- const extraProps = rest?.length ? rest : {};
67
+ const extraProps = {};
69
68
  if (ariaLabelledBy && ariaLabelledBy.length) {
70
69
  extraProps["aria-labelledby"] = ariaLabelledBy;
71
70
  } else if (ariaLabel && ariaLabel !== null) {