@thecb/components 7.13.3-beta.4 → 7.13.3-beta.6
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 +7 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7 -11
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/icons/ChevronIconWhite.js +55 -0
- package/src/components/molecules/collapsible-section/CollapsibleSection.js +6 -8
package/package.json
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { fallbackValues } from "./Icons.theme";
|
|
3
|
+
import { themeComponent } from "../../../util/themeUtils";
|
|
4
|
+
|
|
5
|
+
const ChevronIcon = ({ themeValues, iconFill }) => {
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
13
|
+
style={{ display: "inline-block", verticalAlign: "text-bottom" }}
|
|
14
|
+
>
|
|
15
|
+
<defs>
|
|
16
|
+
<polygon
|
|
17
|
+
id={`icon-chevron-path-1`}
|
|
18
|
+
points="10.4099998 6 9 7.40999976 13.5799996 11.9999996 9 16.5899995 10.4099998 17.9999993 16.4099994 11.9999996"
|
|
19
|
+
/>
|
|
20
|
+
</defs>
|
|
21
|
+
<g
|
|
22
|
+
id={`icon-chevron-Icon/Chevron-Down`}
|
|
23
|
+
fill="currentColor"
|
|
24
|
+
fillRule="evenodd"
|
|
25
|
+
>
|
|
26
|
+
<mask id={`icon-chevron-mask-2`}>
|
|
27
|
+
<use
|
|
28
|
+
fill={iconFill ?? themeValues.singleIconColor}
|
|
29
|
+
xlinkHref={`#icon-chevron-path-1`}
|
|
30
|
+
/>
|
|
31
|
+
</mask>
|
|
32
|
+
|
|
33
|
+
<use
|
|
34
|
+
fill={iconFill ?? themeValues.singleIconColor}
|
|
35
|
+
id={`icon-chevron-Fill-2`}
|
|
36
|
+
xlinkHref={`#icon-chevron-path-1`}
|
|
37
|
+
/>
|
|
38
|
+
<g
|
|
39
|
+
id="Colors/Blue-Dark"
|
|
40
|
+
mask={`url(#icon-chevron-mask-2)`}
|
|
41
|
+
fill={iconFill ?? themeValues.singleIconColor}
|
|
42
|
+
>
|
|
43
|
+
<rect id={`icon-chevron-rect`} width="24" height="24" />
|
|
44
|
+
</g>
|
|
45
|
+
</g>
|
|
46
|
+
</svg>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default themeComponent(
|
|
51
|
+
ChevronIcon,
|
|
52
|
+
"Icons",
|
|
53
|
+
fallbackValues,
|
|
54
|
+
"secondary"
|
|
55
|
+
);
|
|
@@ -25,8 +25,7 @@ const CollapsibleSection = ({
|
|
|
25
25
|
sectionGap = "0.5rem",
|
|
26
26
|
name = "",
|
|
27
27
|
index = 1,
|
|
28
|
-
|
|
29
|
-
iconColor = null
|
|
28
|
+
iconColor = ""
|
|
30
29
|
}) => {
|
|
31
30
|
const handleKeyDown = e => {
|
|
32
31
|
if (e.keyCode === 13) {
|
|
@@ -88,7 +87,7 @@ const CollapsibleSection = ({
|
|
|
88
87
|
hoverStyles={`cursor: pointer;`}
|
|
89
88
|
tabIndex="0"
|
|
90
89
|
onKeyDown={handleKeyDown}
|
|
91
|
-
extraStyles={`z-index: 25
|
|
90
|
+
extraStyles={`z-index: 25;`.concat(extraStyles)}
|
|
92
91
|
role="button"
|
|
93
92
|
aria-expanded={isOpen.toString()}
|
|
94
93
|
aria-controls={id}
|
|
@@ -96,8 +95,8 @@ const CollapsibleSection = ({
|
|
|
96
95
|
>
|
|
97
96
|
<Cluster justify="space-between" align="center">
|
|
98
97
|
{customTitle ? (
|
|
99
|
-
<Box width="calc(100% - 36px)" padding="
|
|
100
|
-
{
|
|
98
|
+
<Box width="calc(100% - 36px)" padding="0">
|
|
99
|
+
{title}
|
|
101
100
|
</Box>
|
|
102
101
|
) : (
|
|
103
102
|
<Title
|
|
@@ -105,16 +104,15 @@ const CollapsibleSection = ({
|
|
|
105
104
|
color={themeValues.titleColor}
|
|
106
105
|
as="h6"
|
|
107
106
|
variant="small"
|
|
108
|
-
id="cristin"
|
|
109
107
|
>
|
|
110
|
-
{
|
|
108
|
+
{title}
|
|
111
109
|
</Title>
|
|
112
110
|
)}
|
|
113
111
|
<Motion
|
|
114
112
|
variants={icon}
|
|
115
113
|
extraStyles={`display: flex; align-items: center;`}
|
|
116
114
|
>
|
|
117
|
-
<ChevronIcon color={iconColor ||
|
|
115
|
+
<ChevronIcon color={iconColor || inherit} />
|
|
118
116
|
</Motion>
|
|
119
117
|
</Cluster>
|
|
120
118
|
</Box>
|