@thecb/components 9.2.7-beta.2 → 9.2.7-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.7-beta.2",
3
+ "version": "9.2.7-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",
@@ -45,7 +45,8 @@ const Modal = ({
45
45
  isLoading,
46
46
  buttonExtraStyles,
47
47
  children,
48
- dataQa = null
48
+ dataQa = null,
49
+ initialFocus = null
49
50
  }) => {
50
51
  const { isMobile } = useContext(ThemeContext);
51
52
  const modalContainerRef = useRef(null);
@@ -71,6 +72,7 @@ const Modal = ({
71
72
  }}
72
73
  underlayClickExits={underlayClickExits}
73
74
  aria-modal={true}
75
+ {...(initialFocus ? { initialFocus: initialFocus } : {})}
74
76
  >
75
77
  <Box
76
78
  padding="0"
@@ -15,7 +15,8 @@ const TermsAndConditionsModal = ({
15
15
  terms,
16
16
  variant,
17
17
  linkVariant = "p",
18
- themeValues
18
+ themeValues,
19
+ initialFocus = null
19
20
  }) => (
20
21
  <Modal
21
22
  modalOpen={isOpen}
@@ -42,7 +43,7 @@ const TermsAndConditionsModal = ({
42
43
  toggleAccepted(true);
43
44
  toggleOpen(false);
44
45
  }}
45
- initialFocus={"[role='button']"}
46
+ {...(initialFocus ? { initialFocus: initialFocus } : {})}
46
47
  >
47
48
  <Text
48
49
  variant={linkVariant}