@thecb/components 7.0.2-beta.3 → 7.0.2-beta.5
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 +4 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +4 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/collapsible-section/CollapsibleSection.js +2 -3
- package/src/components/molecules/collapsible-section/index.d.ts +0 -1
- package/src/components/molecules/copyable/Copyable.js +5 -5
package/package.json
CHANGED
|
@@ -24,8 +24,7 @@ const CollapsibleSection = ({
|
|
|
24
24
|
stackTitleContent,
|
|
25
25
|
sectionGap = "0.5rem",
|
|
26
26
|
name = "",
|
|
27
|
-
index = 1
|
|
28
|
-
overflowY = "hidden"
|
|
27
|
+
index = 1
|
|
29
28
|
}) => {
|
|
30
29
|
const handleKeyDown = e => {
|
|
31
30
|
if (e.keyCode === 13) {
|
|
@@ -127,7 +126,7 @@ const CollapsibleSection = ({
|
|
|
127
126
|
initial={initiallyOpen ? "open" : "closed"}
|
|
128
127
|
exit="closed"
|
|
129
128
|
variants={wrapper}
|
|
130
|
-
extraStyles={`transform-origin: 100% 0; overflow-y:
|
|
129
|
+
extraStyles={`transform-origin: 100% 0; overflow-y: hidden`}
|
|
131
130
|
id={`${id}-content`}
|
|
132
131
|
role={"region"}
|
|
133
132
|
aria-labelledby={`${id}-button`}
|
|
@@ -37,25 +37,25 @@ const Copyable = ({
|
|
|
37
37
|
popoverMinWidth = "210px",
|
|
38
38
|
copiedPopoverContentDuration = 1000,
|
|
39
39
|
popoverID = 0,
|
|
40
|
-
extraStyles
|
|
40
|
+
extraStyles,
|
|
41
41
|
}) => {
|
|
42
42
|
const popoverPosition = {
|
|
43
43
|
top: "-65px",
|
|
44
44
|
right: "auto",
|
|
45
45
|
bottom: "auto",
|
|
46
|
-
left: "50%"
|
|
46
|
+
left: "50%",
|
|
47
47
|
};
|
|
48
48
|
const popoverArrowPosition = {
|
|
49
49
|
arrowTop: "auto",
|
|
50
50
|
arrowRight: "auto",
|
|
51
51
|
arrowBottom: "-8px",
|
|
52
|
-
arrowLeft: "calc(50% - 4px)" // Popover arrow is 8px wide. This places the middle of the arrow in the middle of the popover.
|
|
52
|
+
arrowLeft: "calc(50% - 4px)", // Popover arrow is 8px wide. This places the middle of the arrow in the middle of the popover.
|
|
53
53
|
};
|
|
54
54
|
const [popoverContent, setPopoverContent] = useState(initialPopoverContent);
|
|
55
55
|
const [timer, setTimer] = useState(undefined);
|
|
56
56
|
const onClick = () => {
|
|
57
57
|
setPopoverContent(copiedPopoverContent);
|
|
58
|
-
navigator.clipboard.writeText(text).catch(e => console.error(e));
|
|
58
|
+
navigator.clipboard.writeText(text).catch((e) => console.error(e));
|
|
59
59
|
onCopy?.();
|
|
60
60
|
if (timer) {
|
|
61
61
|
clearTimeout(timer);
|
|
@@ -73,7 +73,7 @@ const Copyable = ({
|
|
|
73
73
|
position={popoverPosition}
|
|
74
74
|
arrowPosition={popoverArrowPosition}
|
|
75
75
|
popoverID={popoverID}
|
|
76
|
-
extraStyles={`> button#btnPopover${popoverID} { margin: 0 }; #Disclosed${popoverID} { transform: translateX(-50%); }; ${extraStyles}`}
|
|
76
|
+
extraStyles={`> button#btnPopover${popoverID} { margin: 0 }; > #Disclosed${popoverID} { transform: translateX(-50%); }; ${extraStyles}`}
|
|
77
77
|
triggerText={CopyableText({ text, onClick })}
|
|
78
78
|
content={popoverContent}
|
|
79
79
|
></Popover>
|