scoobie 13.0.11 → 14.0.0
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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"version": "
|
|
7
|
+
"version": "14.0.0",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@capsizecss/core": "^3.0.0",
|
|
10
10
|
"@mdx-js/loader": "^1.6.22",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@types/react-router-hash-link": "^2.4.1",
|
|
14
14
|
"@vanilla-extract/css": "^1.2.3",
|
|
15
15
|
"@vanilla-extract/css-utils": "^0.1.1",
|
|
16
|
-
"babel-loader": "^
|
|
16
|
+
"babel-loader": "^9.0.0",
|
|
17
17
|
"clsx": "^1.1.1",
|
|
18
18
|
"find-up": "^5.0.0",
|
|
19
19
|
"fs-extra": "^10.0.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@storybook/storybook-deployer": "2.8.12",
|
|
37
37
|
"@types/react": "18.0.17",
|
|
38
38
|
"@types/react-dom": "18.0.6",
|
|
39
|
-
"braid-design-system": "31.
|
|
39
|
+
"braid-design-system": "31.21.0",
|
|
40
40
|
"loki": "0.30.3",
|
|
41
41
|
"react": "18.2.0",
|
|
42
42
|
"react-dom": "18.2.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
],
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@mermaid-js/mermaid-cli": ">= 8.13.7 < 10",
|
|
59
|
-
"braid-design-system": ">= 31.
|
|
59
|
+
"braid-design-system": ">= 31.21.0",
|
|
60
60
|
"react": ">= 17 < 19",
|
|
61
61
|
"react-router-dom": ">= 5.3.0",
|
|
62
62
|
"sku": ">= 10.13.4 < 12"
|
|
@@ -29,8 +29,13 @@ export const GraphQLPlaygroundAction = ({
|
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
<Text size={smallerSize} weight="medium">
|
|
32
|
-
<TextLink
|
|
33
|
-
|
|
32
|
+
<TextLink
|
|
33
|
+
href={href}
|
|
34
|
+
icon={<IconVideo alignY="lowercase" />}
|
|
35
|
+
rel="noreferrer"
|
|
36
|
+
target="_blank"
|
|
37
|
+
>
|
|
38
|
+
GraphQL Explorer
|
|
34
39
|
</TextLink>
|
|
35
40
|
</Text>
|
|
36
41
|
);
|
|
@@ -1,35 +1,21 @@
|
|
|
1
1
|
import { IconCopy, IconTick, Text, TextLinkButton } from 'braid-design-system';
|
|
2
|
-
import React, {
|
|
3
|
-
ComponentProps,
|
|
4
|
-
Fragment,
|
|
5
|
-
ReactNode,
|
|
6
|
-
useCallback,
|
|
7
|
-
useState,
|
|
8
|
-
} from 'react';
|
|
9
|
-
|
|
10
|
-
const DefaultCopiedLabel = () => (
|
|
11
|
-
<Fragment>
|
|
12
|
-
<IconTick alignY="lowercase" /> Copied
|
|
13
|
-
</Fragment>
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
const DefaultCopyLabel = () => (
|
|
17
|
-
<Fragment>
|
|
18
|
-
<IconCopy alignY="lowercase" /> Copy
|
|
19
|
-
</Fragment>
|
|
20
|
-
);
|
|
2
|
+
import React, { ComponentProps, ReactNode, useCallback, useState } from 'react';
|
|
21
3
|
|
|
22
4
|
interface Props {
|
|
23
5
|
children: string;
|
|
6
|
+
copiedIcon?: ComponentProps<typeof Text>['icon'] | false;
|
|
24
7
|
copiedLabel?: ReactNode;
|
|
8
|
+
copyIcon?: ComponentProps<typeof TextLinkButton>['icon'] | false;
|
|
25
9
|
copyLabel?: ReactNode;
|
|
26
10
|
size?: ComponentProps<typeof Text>['size'];
|
|
27
11
|
}
|
|
28
12
|
|
|
29
13
|
export const CopyableText = ({
|
|
30
14
|
children,
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
copiedIcon = <IconTick alignY="lowercase" />,
|
|
16
|
+
copiedLabel = 'Copied',
|
|
17
|
+
copyIcon = <IconCopy alignY="lowercase" />,
|
|
18
|
+
copyLabel = 'Copy',
|
|
33
19
|
size,
|
|
34
20
|
}: Props) => {
|
|
35
21
|
const [copied, setCopied] = useState<boolean>(false);
|
|
@@ -47,12 +33,19 @@ export const CopyableText = ({
|
|
|
47
33
|
}, [children, copied]);
|
|
48
34
|
|
|
49
35
|
return copied ? (
|
|
50
|
-
<Text
|
|
36
|
+
<Text
|
|
37
|
+
icon={copiedIcon || undefined}
|
|
38
|
+
size={size}
|
|
39
|
+
tone="positive"
|
|
40
|
+
weight="medium"
|
|
41
|
+
>
|
|
51
42
|
{copiedLabel}
|
|
52
43
|
</Text>
|
|
53
44
|
) : (
|
|
54
45
|
<Text size={size} weight="medium">
|
|
55
|
-
<TextLinkButton onClick={copyText}>
|
|
46
|
+
<TextLinkButton icon={copyIcon || undefined} onClick={copyText}>
|
|
47
|
+
{copyLabel}
|
|
48
|
+
</TextLinkButton>
|
|
56
49
|
</Text>
|
|
57
50
|
);
|
|
58
51
|
};
|