@thecb/components 10.5.1-beta.2 → 10.5.1-beta.4

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": "10.5.1-beta.2",
3
+ "version": "10.5.1-beta.4",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -76,8 +76,8 @@ export const modalV2 = () => (
76
76
  noButtons={boolean("noButtons", false, groupId)}
77
77
  onlyCloseButton={boolean("onlyCloseButton", false, groupId)}
78
78
  onlyContinueButton={boolean("onlyContinueButton", false, groupId)}
79
- useDangerButton={boolean("useDangerButton", false, groupId)}
80
79
  showCloseIconButton={boolean("showCloseIconButton", true, groupId)}
80
+ useDangerButton={boolean("useDangerButton", false, groupId)}
81
81
  />
82
82
  );
83
83
 
@@ -18,8 +18,8 @@ import {
18
18
  ButtonLayoutWrapper,
19
19
  CancelButton,
20
20
  CloseButton,
21
- ContinueButton,
22
- CloseIconButton
21
+ CloseIconButton,
22
+ ContinueButton
23
23
  } from "./__private__";
24
24
 
25
25
  /*
@@ -44,8 +44,8 @@ const Modal = ({
44
44
  closeButtonText = "Close",
45
45
  continueAction = noop,
46
46
  continueButtonText = "Continue",
47
- continueURL = "",
48
47
  continueButtonVariant = "primary",
48
+ continueURL = "",
49
49
  customWidth = "",
50
50
  dataQa = null,
51
51
  defaultWrapper = true,
@@ -63,9 +63,9 @@ const Modal = ({
63
63
  onExit = hideModal,
64
64
  onlyCloseButton = false,
65
65
  onlyContinueButton = false,
66
+ showCloseIconButton = false,
66
67
  underlayClickExits = true,
67
- useDangerButton = false,
68
- showCloseIconButton = false
68
+ useDangerButton = false
69
69
  }) => {
70
70
  const { isMobile } = useContext(ThemeContext);
71
71
 
@@ -141,18 +141,7 @@ const Modal = ({
141
141
  {modalHeaderText}
142
142
  </Title>
143
143
  {showCloseIconButton && (
144
- <CloseIconButton
145
- hideModal={hideModal}
146
- buttonExtraStyles={`
147
- min-height: auto;
148
- min-width: auto;
149
- height: 1.5rem;
150
- margin: 0 0 0 0.5rem;
151
- &:focus {
152
- outline-offset: -3px;
153
- }
154
- `}
155
- />
144
+ <CloseIconButton hideModal={hideModal} />
156
145
  )}
157
146
  </Cluster>
158
147
  </Box>
@@ -13,11 +13,19 @@ export const CloseIconButton = ({
13
13
  }) => {
14
14
  return (
15
15
  <ButtonWithAction
16
- variant="smallGhost"
17
16
  action={hideModal}
18
- contentOverride
19
- extraStyles={buttonExtraStyles}
20
17
  aria-label={ariaLabel}
18
+ contentOverride
19
+ extraStyles={`
20
+ min-height: auto;
21
+ min-width: auto;
22
+ height: 1.5rem;
23
+ margin: 0 0 0 0.5rem;
24
+ &:focus {
25
+ outline-offset: -3px;
26
+ }
27
+ `}
28
+ variant="smallGhost"
21
29
  >
22
30
  <CloseIcon
23
31
  role="img"
@@ -32,6 +32,17 @@ export interface CloseButtonProps {
32
32
  export declare const CloseButton: React.FC<Expand<CloseButtonProps> &
33
33
  React.HTMLAttributes<HTMLElement>>;
34
34
 
35
+ export interface CloseIconButtonProps {
36
+ buttonExtraStyles?: string;
37
+ hideModal?: action;
38
+ iconWidth?: string;
39
+ iconHeight?: string;
40
+ ariaLabel?: string;
41
+ }
42
+
43
+ export declare const CloseIconButton: React.FC<Expand<CloseIconButtonProps> &
44
+ React.HTMLAttributes<HTMLElement>>;
45
+
35
46
  export interface ContinueButtonProps {
36
47
  buttonExtraStyles?: string;
37
48
  continueAction?: Function;
@@ -46,14 +57,3 @@ export interface ContinueButtonProps {
46
57
 
47
58
  export declare const ContinueButton: React.FC<Expand<ContinueButtonProps> &
48
59
  React.HTMLAttributes<HTMLElement>>;
49
-
50
- export interface CloseIconButtonProps {
51
- buttonExtraStyles?: string;
52
- hideModal?: action;
53
- iconWidth?: string;
54
- iconHeight?: string;
55
- ariaLabel?: string;
56
- }
57
-
58
- export declare const CloseIconButton: React.FC<Expand<CloseIconButtonProps> &
59
- React.HTMLAttributes<HTMLElement>>;
@@ -1,5 +1,5 @@
1
1
  export { default as ButtonLayoutWrapper } from "./ButtonLayoutWrapper";
2
2
  export { default as CancelButton } from "./CancelButton";
3
3
  export { default as CloseButton } from "./CloseButton";
4
- export { default as ContinueButton } from "./ContinueButton";
5
4
  export { default as CloseIconButton } from "./CloseIconButton";
5
+ export { default as ContinueButton } from "./ContinueButton";
@@ -9,7 +9,7 @@ export const FONT_SIZE = {
9
9
  SM: "0.875rem", // 14px
10
10
  MD: "1.000rem", // 16px
11
11
  LG: "1.125rem", // 18px
12
- XLG: "1.25rem" //20px
12
+ XL: "1.250rem" //20px
13
13
  };
14
14
  export const FONT_WEIGHT_REGULAR = "400";
15
15
  export const FONT_WEIGHT_SEMIBOLD = "600";