diff --git a/.yarn/cache/@figma-code-connect-npm-1.0.4-5b7b3be79e-a412e63774.zip b/.yarn/cache/@figma-code-connect-npm-1.0.6-db319a49b3-952cf06f6a.zip similarity index 60% rename from .yarn/cache/@figma-code-connect-npm-1.0.4-5b7b3be79e-a412e63774.zip rename to .yarn/cache/@figma-code-connect-npm-1.0.6-db319a49b3-952cf06f6a.zip index 7adfe3bc42c7..7cf41857ddcc 100644 Binary files a/.yarn/cache/@figma-code-connect-npm-1.0.4-5b7b3be79e-a412e63774.zip and b/.yarn/cache/@figma-code-connect-npm-1.0.6-db319a49b3-952cf06f6a.zip differ diff --git a/.yarn/cache/axios-npm-1.7.3-a63743a582-7f92af2057.zip b/.yarn/cache/axios-npm-1.7.3-a63743a582-7f92af2057.zip deleted file mode 100644 index 4843c8e1cfea..000000000000 Binary files a/.yarn/cache/axios-npm-1.7.3-a63743a582-7f92af2057.zip and /dev/null differ diff --git a/.yarn/cache/axios-npm-1.7.5-b23f777d13-6cbcfe943a.zip b/.yarn/cache/axios-npm-1.7.5-b23f777d13-6cbcfe943a.zip new file mode 100644 index 000000000000..2a80e2ce0134 Binary files /dev/null and b/.yarn/cache/axios-npm-1.7.5-b23f777d13-6cbcfe943a.zip differ diff --git a/packages/react/code-connect/AILabel/AILabel.figma.tsx b/packages/react/code-connect/AILabel/AILabel.figma.tsx new file mode 100644 index 000000000000..1f2066edafd4 --- /dev/null +++ b/packages/react/code-connect/AILabel/AILabel.figma.tsx @@ -0,0 +1,51 @@ +/** + * 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 { AILabel } from '@carbon/react'; +import figma from '@figma/code-connect'; + +figma.connect( + AILabel, + 'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=51447-1916&t=9XaizJDx8eI6KgQz-4', + { + props: { + aiText: figma.string('Text translation'), + size: figma.enum('Size', { + '16px': 'mini', + '20px': '2xs', + '24px': 'xs', + '32px': 'sm', + '40px': 'md', + '48px': 'lg', + '64px': 'xl', + }), + }, + example: ({ ...props }) => , + } +); + +// inline +figma.connect( + AILabel, + 'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=51447-2035&t=9XaizJDx8eI6KgQz-4', + { + props: { + aiText: figma.string('Text translation'), + textLabel: figma.enum('Type', { + 'Text + Icon': figma.string('Slug text'), + }), + size: figma.enum('Size', { + '12px': 'sm', + '14px': 'md', + '16px': 'lg', + }), + }, + example: ({ ...props }) => , + } +); diff --git a/packages/react/code-connect/AILabel/AILabelActions.figma.tsx b/packages/react/code-connect/AILabel/AILabelActions.figma.tsx new file mode 100644 index 000000000000..f3bce1a59f50 --- /dev/null +++ b/packages/react/code-connect/AILabel/AILabelActions.figma.tsx @@ -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 { AILabelActions } from '@carbon/react'; +import figma from '@figma/code-connect'; + +figma.connect( + AILabelActions, + 'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=57561-3559&t=SB9qULZbn3FRopvU-4', + { + props: { + children: figma.children('*'), + }, + example: ({ children }) => {children}, + } +); diff --git a/packages/react/code-connect/AILabel/AILabelContent.figma.tsx b/packages/react/code-connect/AILabel/AILabelContent.figma.tsx new file mode 100644 index 000000000000..e3570712417e --- /dev/null +++ b/packages/react/code-connect/AILabel/AILabelContent.figma.tsx @@ -0,0 +1,64 @@ +/** + * 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 { AILabelContent } from '@carbon/react'; +import figma from '@figma/code-connect'; + +figma.connect( + AILabelContent, + 'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=57561-3508&t=SB9qULZbn3FRopvU-4', + { + props: { + title: figma.string('AI title'), + description: figma.string('AI description'), + slotOne: figma.boolean('Slot 1', { + true: figma.instance('Swap slot 1'), + false: '', + }), + slotTwo: figma.boolean('Slot 2', { + true: figma.instance('Swap slot 2'), + }), + slotThree: figma.boolean('Slot 3', { + true: figma.instance('Swap slot 3'), + }), + slotFour: figma.boolean('Slot 4', { + true: figma.instance('Swap slot 4'), + }), + actions: figma.children(['Actions footer']), + }, + example: ({ + title, + description, + slotOne, + slotTwo, + slotThree, + slotFour, + actions, + }) => ( + + {slotOne} +
+

AI Explained

+

{title}

+

{description}

+ {slotOne} +
+ {slotTwo} +

+ This is sample placeholder content, replace with your own content + and custom styles. +

+ {slotThree} + {slotFour} +
+ {actions} +
+ ), + } +); diff --git a/packages/react/code-connect/Tabs/Tabs.figma.tsx b/packages/react/code-connect/Tabs/Tabs.figma.tsx index b50b204a15c3..eb651805402c 100644 --- a/packages/react/code-connect/Tabs/Tabs.figma.tsx +++ b/packages/react/code-connect/Tabs/Tabs.figma.tsx @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -/* eslint-disable react/jsx-no-duplicate-props */ // @ts-nocheck import React from 'react'; import { @@ -34,12 +33,14 @@ figma.connect( size: figma.enum('Size', { Large: 'lg', }), - dismissable: figma.boolean('Dismissible'), - dismissablePlusIcon: figma.boolean('Dismissible + Icon'), + dismissable: figma.boolean('Dismissible', { + true: true, + false: figma.boolean('Dismissible + Icon'), + }), }), }, example: ({ children, contained, fullWidth, tab }) => ( - + - {tooltip.children} + {item.children} ), } diff --git a/packages/react/package.json b/packages/react/package.json index 94d1903aa49c..c7deaf5618aa 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -81,7 +81,7 @@ "@babel/preset-typescript": "^7.24.7", "@carbon/test-utils": "^10.32.0-rc.0", "@carbon/themes": "^11.40.0-rc.0", - "@figma/code-connect": "^1.0.4", + "@figma/code-connect": "^1.0.6", "@rollup/plugin-babel": "^6.0.0", "@rollup/plugin-commonjs": "^26.0.0", "@rollup/plugin-node-resolve": "^15.0.0", diff --git a/yarn.lock b/yarn.lock index c2bc30def770..dcb50d370049 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2021,7 +2021,7 @@ __metadata: "@carbon/styles": "npm:^1.65.0-rc.0" "@carbon/test-utils": "npm:^10.32.0-rc.0" "@carbon/themes": "npm:^11.40.0-rc.0" - "@figma/code-connect": "npm:^1.0.4" + "@figma/code-connect": "npm:^1.0.6" "@floating-ui/react": "npm:^0.26.0" "@ibm/telemetry-js": "npm:^1.5.0" "@rollup/plugin-babel": "npm:^6.0.0" @@ -3066,16 +3066,16 @@ __metadata: languageName: node linkType: hard -"@figma/code-connect@npm:^1.0.4": - version: 1.0.4 - resolution: "@figma/code-connect@npm:1.0.4" +"@figma/code-connect@npm:^1.0.6": + version: 1.0.6 + resolution: "@figma/code-connect@npm:1.0.6" dependencies: "@babel/core": "npm:^7.24.7" "@babel/generator": "npm:^7.24.7" "@babel/parser": "npm:^7.24.7" "@babel/types": "npm:^7.24.7" "@storybook/csf-tools": "npm:^7.6.7" - axios: "npm:^1.6.0" + axios: "npm:^1.7.4" boxen: "npm:5.1.1" chalk: "npm:^4.1.2" commander: "npm:^11.1.0" @@ -3096,7 +3096,7 @@ __metadata: zod-validation-error: "npm:^3.2.0" bin: figma: bin/figma - checksum: 10/a412e637748513ae64888032c62856a34680581ad4bfb03e4b03a37eee41b13b9b3d43df1cb74c2d9ec8dcf0c6ac82b72a22da5655e21f91a832e5b5bef2adcf + checksum: 10/952cf06f6a7e792cc41ca3e208ceb4d926823039882d208c074312bad817be0c4fbdd0dfbd38ac71f34e82eb3a0f6254678bf73bd5a2644823f13e2e37c31948 languageName: node linkType: hard @@ -8227,14 +8227,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.4.0, axios@npm:^1.5.1, axios@npm:^1.6.0": - version: 1.7.3 - resolution: "axios@npm:1.7.3" +"axios@npm:^1.4.0, axios@npm:^1.5.1, axios@npm:^1.7.4": + version: 1.7.5 + resolution: "axios@npm:1.7.5" dependencies: follow-redirects: "npm:^1.15.6" form-data: "npm:^4.0.0" proxy-from-env: "npm:^1.1.0" - checksum: 10/7f92af205705a8fb4a9d35666b663729507657f252a1d39d83582590119941872d49078017cf992e32f47aa3b7317f5439f77be772a173dac2ae0fedd38f43ae + checksum: 10/6cbcfe943a84089f420a900a3a3aeb54ee94dcc9c2b81b150434896357be5d1079eff0b1bbb628597371e79f896b1bc5776df04184756ba99656ff31df9a75bf languageName: node linkType: hard