@thecb/components 11.8.0-beta.8 → 11.8.1
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/dist/index.cjs.js +10 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/password-requirements/PasswordRequirements.js +3 -3
- package/src/components/molecules/tooltip/Tooltip.js +7 -2
- package/src/components/molecules/tooltip/Tooltip.stories.js +3 -1
- package/src/components/molecules/tooltip/index.d.ts +2 -0
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
MINESHAFT_GREY,
|
|
18
18
|
ATHENS_GREY,
|
|
19
|
-
|
|
19
|
+
SEA_GREEN,
|
|
20
20
|
RAZZMATAZZ_RED
|
|
21
21
|
} from "../../../constants/colors";
|
|
22
22
|
|
|
@@ -31,8 +31,8 @@ const PasswordRequirements = ({ password, isMobile }) => {
|
|
|
31
31
|
color: RAZZMATAZZ_RED
|
|
32
32
|
},
|
|
33
33
|
[INPUT_STATE_VALID]: {
|
|
34
|
-
icon: <IconValid margin="0 0.5rem 0 0" />,
|
|
35
|
-
color:
|
|
34
|
+
icon: <IconValid margin="0 0.5rem 0 0" bgFill={SEA_GREEN} />,
|
|
35
|
+
color: SEA_GREEN
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
|
|
@@ -10,7 +10,8 @@ import WarningIconXS from "../../atoms/icons/WarningIconXS";
|
|
|
10
10
|
import {
|
|
11
11
|
MATISSE_BLUE,
|
|
12
12
|
PEACOCK_BLUE,
|
|
13
|
-
SAPPHIRE_BLUE
|
|
13
|
+
SAPPHIRE_BLUE,
|
|
14
|
+
WHITE
|
|
14
15
|
} from "../../../constants/colors";
|
|
15
16
|
|
|
16
17
|
const TOOLTIP_THEME_SOURCE = "Popover";
|
|
@@ -47,7 +48,9 @@ const Tooltip = ({
|
|
|
47
48
|
height = "auto",
|
|
48
49
|
containerExtraStyles = "",
|
|
49
50
|
triggerExtraStyles = "",
|
|
50
|
-
triggerButtonVariant = "smallGhost"
|
|
51
|
+
triggerButtonVariant = "smallGhost",
|
|
52
|
+
contentExtraStyles = "",
|
|
53
|
+
contentBackgroundColor = WHITE
|
|
51
54
|
}) => {
|
|
52
55
|
const closeTimeoutRef = useRef(null);
|
|
53
56
|
const [tooltipOpen, setTooltipOpen] = useState(false);
|
|
@@ -157,6 +160,7 @@ const Tooltip = ({
|
|
|
157
160
|
role="tooltip"
|
|
158
161
|
id={tooltipID}
|
|
159
162
|
aria-hidden={!tooltipOpen}
|
|
163
|
+
background={contentBackgroundColor}
|
|
160
164
|
data-qa="tooltip-contents"
|
|
161
165
|
extraStyles={`
|
|
162
166
|
position: absolute;
|
|
@@ -166,6 +170,7 @@ const Tooltip = ({
|
|
|
166
170
|
bottom: ${bottom};
|
|
167
171
|
left: ${left};
|
|
168
172
|
height: ${height};
|
|
173
|
+
${contentExtraStyles}
|
|
169
174
|
`}
|
|
170
175
|
boxShadow={`0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)`}
|
|
171
176
|
border={`1px solid transparent`}
|
|
@@ -41,7 +41,9 @@ const meta = {
|
|
|
41
41
|
height: "auto",
|
|
42
42
|
containerExtraStyles: "",
|
|
43
43
|
triggerExtraStyles: "",
|
|
44
|
-
triggerButtonVariant: "smallGhost"
|
|
44
|
+
triggerButtonVariant: "smallGhost",
|
|
45
|
+
contentBackgroundColor: "",
|
|
46
|
+
contentExtraStyles: ""
|
|
45
47
|
},
|
|
46
48
|
argTypes: {
|
|
47
49
|
tooltipID: {
|
|
@@ -26,6 +26,8 @@ export interface TooltipProps {
|
|
|
26
26
|
containerExtraStyles?: string;
|
|
27
27
|
triggerExtraStyles?: string;
|
|
28
28
|
triggerButtonVariant?: string;
|
|
29
|
+
contentExtraStyles?: string;
|
|
30
|
+
contentBackgroundColor?: string;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export const Tooltip: React.FC<Expand<TooltipProps> &
|