Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(code-connect): update version, add fluid search skeleton and code snippet disabled states #17904

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/soumyaraju"><img src="https://avatars.githubusercontent.com/u/41182657?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Soumya Raju</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=soumyaraju" title="Code">💻</a></td>
<td align="center"><a href="https://irfadkp.github.io/"><img src="https://avatars.githubusercontent.com/u/54243898?v=4?s=100" width="100px;" alt=""/><br /><sub><b>IRFAD KP</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=irfadkp" title="Code">💻</a></td>
</tr>
</tr>
<tr>
<td align="center"><a href="https://github.com/ziyadzulfikar"><img src="https://avatars.githubusercontent.com/u/56788667?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ziyadzulfikar</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=ziyadzulfikar" title="Code">💻</a></td>
<td align="center"><a href="https://irfadkp.github.io/"><img src="https://avatars.githubusercontent.com/u/54243898?v=4?s=100" width="100px;" alt=""/><br /><sub><b>IRFAD KP</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=irfadkp" title="Code">💻</a></td>
Expand Down
35 changes: 27 additions & 8 deletions packages/react/code-connect/CodeSnippet/CodeSnippet.figma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ figma.connect(
tooltip: figma.nestedProps('Tooltip content', {
text: figma.textContent('Tooltip text'),
}),
disabled: figma.enum('State', {
Disabled: true,
}),
},
example: ({ codeSnippet, tooltip }) => {
example: ({ codeSnippet, tooltip, disabled }) => {
return (
<CodeSnippet type="inline" feedback={tooltip.text}>
<CodeSnippet type="inline" feedback={tooltip.text} disabled={disabled}>
{codeSnippet.text}
</CodeSnippet>
);
Expand All @@ -42,10 +45,16 @@ figma.connect(
codeSnippet: figma.nestedProps('Code snippet', {
text: figma.textContent('node -v'),
}),
disabled: figma.enum('State', {
Disabled: true,
}),
},
example: ({ codeSnippet }) => {
example: ({ codeSnippet, disabled }) => {
return (
<CodeSnippet type="inline" feedback="Copied to clipboard">
<CodeSnippet
type="inline"
feedback="Copied to clipboard"
disabled={disabled}>
{codeSnippet.text}
</CodeSnippet>
);
Expand All @@ -60,10 +69,16 @@ figma.connect(
{
props: {
children: figma.textContent('$ npm install --save carbon-components'),
disabled: figma.enum('State', {
Disabled: true,
}),
},
example: ({ children }) => {
example: ({ children, disabled }) => {
return (
<CodeSnippet type="single" feedback="Copied to clipboard">
<CodeSnippet
type="single"
feedback="Copied to clipboard"
disabled={disabled}>
{children}
</CodeSnippet>
);
Expand All @@ -83,12 +98,16 @@ figma.connect(
false: true,
}),
expanded: figma.boolean('Expanded'),
disabled: figma.enum('State', {
Disabled: true,
}),
},
example: ({ hideCopyButton }) => (
example: ({ hideCopyButton, disabled }) => (
<CodeSnippet
type="multi"
feedback="Copied to clipboard"
hideCopyButton={hideCopyButton}>
hideCopyButton={hideCopyButton}
disabled={disabled}>
Code sample here
</CodeSnippet>
),
Expand Down
23 changes: 9 additions & 14 deletions packages/react/code-connect/Search/FluidSearch.figma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';
import {
unstable__FluidSearch as FluidSearch,
// unstable__FluidSearchSkeleton as FluidSearchSkeleton,
unstable__FluidSearchSkeleton as FluidSearchSkeleton,
} from '@carbon/react';
import figma from '@figma/code-connect';

Expand All @@ -33,16 +33,11 @@ figma.connect(
}
);

// missing from Figma
// figma.connect(
// FluidSearchSkeleton,
// 'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=15503-270751&t=6KMXKibN414b97hv-4',
// {
// variant: { State: 'Skeleton' },
// example: () => (
// // Disclaimer: Code Connect is currently in beta and integration with Carbon
// // React is in an exploratory phase. Code sample below may be incomplete.
// <FluidSearchSkeleton />
// ),
// }
// );
figma.connect(
FluidSearchSkeleton,
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=15503-270751&t=6KMXKibN414b97hv-4',
{
variant: { State: 'Skeleton' },
example: () => <FluidSearchSkeleton />,
}
);
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"@babel/preset-typescript": "^7.24.7",
"@carbon/test-utils": "^10.34.0",
"@carbon/themes": "^11.43.0",
"@figma/code-connect": "^1.1.4",
"@figma/code-connect": "^1.2.1",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
Expand Down
Loading
Loading