forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(code-connect): update to v1 and fix bugs (carbon-design-system#16834
) * feat(code-connect): connect Select and FluidSelect * chore: fix * feat(code-connect): connect select and radio button * feat(code-connect): radio button and radio button group * chore: typo * feat(code-connect): connect search * Update README.md * fix(code-connect): update to v1 and fix bugs * chore: merge * fix: move code-connect to dev dependency * chore: yarn dedupe * chore: match packages back to main * feat(code-connect): connect content-swticher * feat(code-connect): loading and inline loading * feat(code-connect): unorderedlist, orderedlist, listitem * feat(code-connect): progress bar
- Loading branch information
1 parent
697684e
commit 17d88f6
Showing
42 changed files
with
591 additions
and
219 deletions.
There are no files selected for viewing
Binary file removed
BIN
-66.7 KB
.yarn/cache/@eslint-community-regexpp-npm-4.10.0-6bfb984c81-8c36169c81.zip
Binary file not shown.
Binary file added
BIN
+66.8 KB
.yarn/cache/@eslint-community-regexpp-npm-4.10.1-785b16afd9-54f13817ca.zip
Binary file not shown.
Binary file added
BIN
+32.3 KB
.yarn/cache/@eslint-config-array-npm-0.16.0-3d9e707ee8-6c1716f896.zip
Binary file not shown.
Binary file renamed
BIN
+5.79 KB
...nt-js-npm-9.3.0-de76de965f-3fb4b30561.zip → ...nt-js-npm-9.5.0-23a7c544a7-206364e3a0.zip
Binary file not shown.
Binary file added
BIN
+17.6 KB
.yarn/cache/@eslint-object-schema-npm-2.1.4-0546250476-221e8d9f28.zip
Binary file not shown.
Binary file removed
BIN
-95.4 KB
.yarn/cache/@figma-code-connect-npm-0.1.2-8819a2148f-730fd7b326.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-17.1 KB
.yarn/cache/@humanwhocodes-config-array-npm-0.13.0-843095a032-524df31e61.zip
Binary file not shown.
Binary file removed
BIN
-8.53 KB
.yarn/cache/@humanwhocodes-object-schema-npm-2.0.3-4f0e508cd9-05bb99ed06.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+783 KB
...slint-npm-9.3.0-90fe77a320-c56d63bc36.zip → ...slint-npm-9.5.0-c1652fa321-47578c2426.zip
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
{ | ||
"codeConnect": { | ||
"include": ["packages/react/code-connect/**"], | ||
"react": { | ||
"importPaths": { | ||
"packages/react/src/*": "@carbon/react" | ||
}, | ||
"paths": {} | ||
} | ||
"parser": "react", | ||
"importPaths": { | ||
"packages/react/src/*": "@carbon/react" | ||
}, | ||
"paths": {}, | ||
"include": ["packages/react/code-connect/**"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 41 additions & 17 deletions
58
packages/react/code-connect/ContentSwitcher/ContentSwitcher.figma.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,56 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2024 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// @ts-nocheck | ||
import React from 'react'; | ||
import { ContentSwitcher } from './ContentSwitcher'; | ||
import { ContentSwitcher } from '@carbon/react'; | ||
import figma from '@figma/code-connect'; | ||
|
||
/** | ||
* -- This file was auto-generated by `figma connect create` -- | ||
* `props` includes a mapping from Figma properties and variants to | ||
* suggested values. You should update this to match the props of your | ||
* code component, and update the `example` function to return the | ||
* code example you'd like to see in Figma | ||
*/ | ||
|
||
figma.connect( | ||
ContentSwitcher, | ||
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=10151-402486&t=LoXqbMLZkoMgbrAS-4', | ||
{ | ||
props: { | ||
type: figma.enum('Type', { | ||
Default: 'default', | ||
'Icon only': 'icon-only', | ||
children: figma.children(['_Content switcher text item']), | ||
size: figma.enum('Size', { | ||
Large: 'lg', | ||
Medium: 'md', | ||
Small: 'sm', | ||
}), | ||
}, | ||
example: ({ size, children }) => ( | ||
// Disclaimer: Code Connect is currently in beta and integration with Carbon | ||
// React is in an exploratory phase. Code sample below may be incomplete. | ||
<ContentSwitcher onChange={function noRefCheck() {}} size={size}> | ||
{children} | ||
</ContentSwitcher> | ||
), | ||
} | ||
); | ||
|
||
figma.connect( | ||
ContentSwitcher, | ||
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=10151-402486&t=LoXqbMLZkoMgbrAS-4', | ||
{ | ||
variant: { Type: 'Icon only' }, | ||
props: { | ||
children: figma.children(['_Content switcher icon item']), | ||
size: figma.enum('Size', { | ||
Large: 'large', | ||
Medium: 'medium', | ||
Small: 'small', | ||
Large: 'lg', | ||
Medium: 'md', | ||
Small: 'sm', | ||
}), | ||
disabled: figma.boolean('Disabled'), | ||
}, | ||
example: () => <ContentSwitcher />, | ||
example: ({ size, children }) => ( | ||
// Disclaimer: Code Connect is currently in beta and integration with Carbon | ||
// React is in an exploratory phase. Code sample below may be incomplete. | ||
<ContentSwitcher onChange={function noRefCheck() {}} size={size}> | ||
{children} | ||
</ContentSwitcher> | ||
), | ||
} | ||
); |
27 changes: 27 additions & 0 deletions
27
packages/react/code-connect/ContentSwitcher/IconSwitch.figma.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2024 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// @ts-nocheck | ||
import React from 'react'; | ||
import { IconSwitch } from '@carbon/react'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect( | ||
IconSwitch, | ||
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=21988-280553&t=Y6lD1uj5Q0yszbgL-4', | ||
{ | ||
props: { | ||
children: figma.children('*'), | ||
disabled: figma.enum('State', { | ||
Disabled: true, | ||
}), | ||
}, | ||
example: ({ disabled, children }) => ( | ||
<IconSwitch disabled={disabled}>{children}</IconSwitch> | ||
), | ||
} | ||
); |
25 changes: 25 additions & 0 deletions
25
packages/react/code-connect/ContentSwitcher/Switch.figma.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2024 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// @ts-nocheck | ||
import React from 'react'; | ||
import { Switch } from '@carbon/react'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect( | ||
Switch, | ||
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=10151-402337&t=Y6lD1uj5Q0yszbgL-4', | ||
{ | ||
props: { | ||
text: figma.string('Label text'), | ||
disabled: figma.enum('State', { | ||
Disabled: true, | ||
}), | ||
}, | ||
example: ({ text, disabled }) => <Switch disabled={disabled} text={text} />, | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2024 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// @ts-nocheck | ||
import React from 'react'; | ||
import { UnorderedList, OrderedList } from '@carbon/react'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect( | ||
UnorderedList, | ||
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=3284-27553&t=Y6lD1uj5Q0yszbgL-4', | ||
{ | ||
variant: { Type: 'Unordered' }, | ||
props: { children: figma.children(['_List item']) }, | ||
example: ({ children }) => ( | ||
// Disclaimer: Code Connect is currently in beta and integration with Carbon | ||
// React is in an exploratory phase. Code sample below may be incomplete. | ||
<UnorderedList>{children}</UnorderedList> | ||
), | ||
} | ||
); | ||
|
||
figma.connect( | ||
OrderedList, | ||
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=3284-27553&t=Y6lD1uj5Q0yszbgL-4', | ||
{ | ||
variant: { Type: 'Ordered' }, | ||
props: { children: figma.children(['_List item']) }, | ||
example: ({ children }) => ( | ||
// Disclaimer: Code Connect is currently in beta and integration with Carbon | ||
// React is in an exploratory phase. Code sample below may be incomplete. | ||
<OrderedList>{children}</OrderedList> | ||
), | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2024 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// @ts-nocheck | ||
import React from 'react'; | ||
import { ListItem } from '@carbon/react'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect( | ||
ListItem, | ||
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=3284-27542&t=Y6lD1uj5Q0yszbgL-4', | ||
{ | ||
props: { | ||
children: figma.string('List text'), | ||
}, | ||
example: ({ children }) => <ListItem>{children}</ListItem>, | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2024 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// @ts-nocheck | ||
import React from 'react'; | ||
import { Loading, InlineLoading } from '@carbon/react'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect( | ||
Loading, | ||
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=3238-28455&t=Y6lD1uj5Q0yszbgL-4', | ||
{ | ||
props: { | ||
small: figma.enum('Size', { | ||
Small: true, | ||
}), | ||
}, | ||
example: ({ small }) => ( | ||
// Disclaimer: Code Connect is currently in beta and integration with Carbon | ||
// React is in an exploratory phase. Code sample below may be incomplete. | ||
<Loading withOverlay={false} small={small} /> | ||
), | ||
} | ||
); | ||
|
||
figma.connect( | ||
InlineLoading, | ||
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=3238-28455&t=Y6lD1uj5Q0yszbgL-4', | ||
{ | ||
variant: { Size: 'Inline' }, | ||
props: { | ||
description: figma.textContent('Loading message'), | ||
status: figma.enum('State', { | ||
Active: 'active', | ||
Error: 'error', | ||
Finished: 'finished', | ||
Inactive: 'inactive', | ||
}), | ||
}, | ||
example: ({ status, description }) => ( | ||
// Disclaimer: Code Connect is currently in beta and integration with Carbon | ||
// React is in an exploratory phase. Code sample below may be incomplete. | ||
<InlineLoading | ||
iconDescription="Loading" | ||
status={status} | ||
description={description} | ||
/> | ||
), | ||
} | ||
); |
Oops, something went wrong.