Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
66a9eb4
[docs] add code connect for Tooltip
j-mnizhek Jun 23, 2025
5a9ece7
[docs] remove typo
j-mnizhek Jun 23, 2025
3cf6dbc
Merge branch 'release/v16' into figma-code-connect-files
j-mnizhek Jun 23, 2025
a6bae79
[docs] add DescriptionTooltip mappings
j-mnizhek Jun 23, 2025
f6a7f70
[docs] add files for Button and Tag
j-mnizhek Jun 23, 2025
7982442
[docs] remove ReactFragment leftovers
j-mnizhek Jun 23, 2025
13f0877
[docs] update tag for Tooltip and Hint code connect files
j-mnizhek Jun 23, 2025
b32bd1e
[docs] update tag for Tooltip and Hint code connect files
j-mnizhek Jun 23, 2025
08ecdbf
[docs] destructured props
j-mnizhek Jun 24, 2025
3e5bd8c
Merge branch 'release/v16' into figma-code-connect-files
j-mnizhek Jun 25, 2025
e27c94b
[docs] fix typo
j-mnizhek Jun 25, 2025
fe026fe
[docs] fix typo
j-mnizhek Jun 25, 2025
9e327ea
[docs] add file for Link
j-mnizhek Jun 27, 2025
6b9025c
[docs] update Button and Link mappings
j-mnizhek Jun 30, 2025
a979d58
[docs] add mappings for Checkbox and Radio
j-mnizhek Jul 1, 2025
1c695a3
Merge branch 'release/v16' into figma-code-connect-files
j-mnizhek Jul 1, 2025
aba80de
Merge branch 'release/v16' into figma-code-connect-files
j-mnizhek Jul 2, 2025
5699ded
[docs] pills, badge, divider connect
sheila-semrush May 2, 2025
55c4f20
[docs] update code connect files
j-mnizhek Jul 7, 2025
b185904
Merge branch 'release/v16' into figma-code-connect-files
j-mnizhek Jul 7, 2025
4d9924b
[docs] fix typos >_<
j-mnizhek Jul 7, 2025
50f06ab
[docs] add label to Badge
j-mnizhek Jul 7, 2025
4b08c76
Merge branch 'release/v16' into figma-code-connect-files
j-mnizhek Aug 7, 2025
3d3f3a1
Merge branch 'release/v16' into figma-code-connect-files
j-mnizhek Aug 8, 2025
ece4f5b
Merge branch 'release/v16' into figma-code-connect-files
j-mnizhek Aug 14, 2025
fa0a95b
Delete figma/InputNumber.figma.tsx
j-mnizhek Aug 15, 2025
605a1fd
[docs] update code connect files
j-mnizhek Jul 11, 2025
15e5ed8
Revert "Delete figma/InputNumber.figma.tsx"
j-mnizhek Aug 15, 2025
430fe9a
[docs] remove files
j-mnizhek Aug 15, 2025
9d52662
[chore] updated figma.config.json file
slizhevskyv-semrush Aug 18, 2025
7f88ecc
[docs] update names for addons
j-mnizhek Aug 18, 2025
f00beff
Merge branch 'release/v16' into figma-code-connect-files
j-mnizhek Aug 18, 2025
fd89b7f
[docs] update connect files
j-mnizhek Aug 22, 2025
5b010f9
[docs] update Select mappings
j-mnizhek Aug 22, 2025
592918e
[docs] add all mappings for Select components
j-mnizhek Aug 23, 2025
97a9a1a
[docs] update all mappings for Input components
j-mnizhek Aug 23, 2025
f5a4409
[docs] add mapping for Dot
j-mnizhek Aug 25, 2025
59e85c4
Merge branch 'release/v16' into figma-code-connect-files
j-mnizhek Aug 29, 2025
08cddd4
[docs] add mappings for a bunch of components
j-mnizhek Sep 2, 2025
e4d3fd8
[docs] add more skeleton mappings
j-mnizhek Sep 2, 2025
402dacb
[docs] add mappings for List components
j-mnizhek Sep 2, 2025
778fb1b
[docs] add mappings for List components
j-mnizhek Sep 3, 2025
3f5e7a8
[docs] add new mappings
j-mnizhek Sep 4, 2025
2b09003
[docs] update mappings
j-mnizhek Sep 4, 2025
0450c6c
[docs] divide Skeleton mappings into several files
j-mnizhek Sep 4, 2025
b9ecbb3
Merge branch 'release/v16' into figma-code-connect-files
sheila-semrush Sep 5, 2025
495c10c
[docs] renamed tsx files to jsx
sheila-semrush Sep 5, 2025
f2e3241
Merge branch 'release/v16' into figma-code-connect-files
sheila-semrush Sep 22, 2025
f7e4ecf
[docs] connected icons, list, updated inputNumber
sheila-semrush Sep 29, 2025
2d8380d
[chore] figma token in dotenv
sheila-semrush Sep 29, 2025
55bb754
[docs] fixed imports
sheila-semrush Sep 29, 2025
bf38c95
[chore] renamed figma token
sheila-semrush Sep 29, 2025
504acbf
[docs] update List mappings
j-mnizhek Sep 30, 2025
6dbbde5
[docs] update Spin mappings
j-mnizhek Sep 30, 2025
6e861a6
[docs] update imports
j-mnizhek Oct 1, 2025
4b41f35
Merge branch 'release/v16' into figma-code-connect-files
sheila-semrush Oct 2, 2025
5d84fd2
[chore] revert some accidental changes
sheila-semrush Oct 2, 2025
4006352
[chore] fixed figma config and removed unnecessary data, upload old e…
sheila-semrush Oct 2, 2025
c4f7522
[chore] added custom parser and figma as dev dependency
sheila-semrush Oct 3, 2025
e9ef5e5
[chore] fix lockfile
sheila-semrush Oct 3, 2025
566211a
[chore] Merge remote-tracking branch 'github/release/v16' into figma-…
sheila-semrush Oct 3, 2025
0446d5d
[chore] fix lockfile
sheila-semrush Oct 3, 2025
bc94cf0
[docs] add react import to InputNumber
j-mnizhek Oct 3, 2025
3e38f3f
[docs] add and fix a bunch of mappings
j-mnizhek Oct 8, 2025
aad712f
[docs] update mappings
j-mnizhek Oct 9, 2025
40dda1f
[docs] fix typo
j-mnizhek Oct 9, 2025
5187aa3
[docs] clarification about component id
sheila-semrush Oct 6, 2025
51c163c
[docs] Pagination
sheila-semrush Oct 9, 2025
c2195b9
[chore] custom parser improvements
sheila-semrush Oct 9, 2025
abf027c
[docs] updated icon only button
sheila-semrush Oct 10, 2025
aa6310a
[docs] update and add new mappings
j-mnizhek Oct 15, 2025
efdbf01
[docs] connect TimePicker
sheila-semrush Oct 20, 2025
a258b91
[docs] small TimePicker fix
sheila-semrush Oct 20, 2025
aa899a7
[docs] small TimePicker fix
sheila-semrush Oct 20, 2025
cc14396
[docs] add NoticeBubble mappings
j-mnizhek Oct 16, 2025
9984919
[docs] add new mappings
j-mnizhek Oct 20, 2025
1d1bcc0
[docs] date-picker
sheila-semrush Oct 23, 2025
c7dc0fa
[chore] Merge remote-tracking branch 'github/release/v16' into figma-…
sheila-semrush Oct 23, 2025
348492e
[docs] card header
sheila-semrush Oct 23, 2025
3c25e2f
[docs] Card
sheila-semrush Oct 27, 2025
49674db
[docs] card split and card for table
sheila-semrush Oct 28, 2025
4e02d1a
[docs] divider
sheila-semrush Oct 28, 2025
b66f1b4
[docs] add and update mappings
j-mnizhek Oct 27, 2025
5d9a701
[docs] add mappings for Modal
j-mnizhek Oct 29, 2025
1755321
[docs] add mappings for FullscreenModal and SidePanel
j-mnizhek Oct 29, 2025
8c1fced
[docs] wizard & scroll-area
sheila-semrush Oct 31, 2025
2a5fd6d
[docs] add and update mappings
j-mnizhek Nov 4, 2025
1e4c41e
[docs] color-picker
sheila-semrush Nov 6, 2025
bccaefc
[docs] add new mappings
j-mnizhek Nov 6, 2025
f411533
[docs] add new mappings
j-mnizhek Nov 10, 2025
c3c2113
[docs] product head, custom parser improvements
sheila-semrush Nov 12, 2025
15ee844
[docs] improved custom functions injection
sheila-semrush Nov 12, 2025
b383215
[docs] add new mappings and update some others
j-mnizhek Nov 14, 2025
0f0fdbc
[docs] move loading prop to state prop
j-mnizhek Nov 14, 2025
b5d3dc5
[chore] merge
sheila-semrush Nov 18, 2025
121c0b5
[chore] changed figma folder structure, new custom parser
sheila-semrush Nov 18, 2025
8fa7417
[docs] moved icons, excluded icons in default config
sheila-semrush Nov 18, 2025
2a8bed9
[global] added figma as commit scope
sheila-semrush Nov 18, 2025
6e95f48
Merge branch 'release/v16' into figma-code-connect-files
sheila-semrush Nov 18, 2025
847591b
[figma] parser improvements, restored color-picker, added addon
sheila-semrush Nov 18, 2025
b218d17
[figma] parser improvements, moved template example, fixed old parser
sheila-semrush Nov 18, 2025
175a6f8
[figma] tiny updates to a bunch of mappings
j-mnizhek Nov 19, 2025
c34f9a5
[figma] update FeaturePopover mapping
j-mnizhek Nov 19, 2025
1bae834
[figma] added addon code to Link, added prop method to custom parser
sheila-semrush Nov 20, 2025
16560a5
[figma] added addon to button-link, added setProp to parser
sheila-semrush Nov 20, 2025
cc28eeb
[figma] updated Breadcrumbs, added text layer search by path to parser
sheila-semrush Nov 24, 2025
6cbeb6b
[figma] fixed childCode() in parser, updated Breadcrumbs
sheila-semrush Nov 25, 2025
f3d8387
Merge branch 'release/v16' into figma-code-connect-files
sheila-semrush Nov 25, 2025
7a08aff
[figma] fixed eslint rule, fixed formatting in mappings
sheila-semrush Nov 25, 2025
b6d28dc
[figma] updated Flags url
sheila-semrush Nov 25, 2025
0090aa9
[figma] fixed wizard, improved parser
sheila-semrush Nov 26, 2025
a84a329
[figma] add new mappings
j-mnizhek Nov 27, 2025
cebdb87
[figma] add mappings for DataTable
j-mnizhek Nov 28, 2025
c71c38f
[figma] update DataTable mappings
j-mnizhek Dec 8, 2025
3ca5f41
[chore] Merge branch 'release/v16' into figma-code-connect-files
sheila-semrush Dec 19, 2025
43b2502
[figma] fixed DataTable urls and formatting, updated code connect dep…
sheila-semrush Dec 19, 2025
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
8 changes: 7 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,15 @@ export default defineConfig([
},
},
{
files: ['tools/**/*', 'website/**/*', 'stories/**/*', '.ci/**/*', 'semcore/**/__tests__/**/*'],
files: ['tools/**/*', 'website/**/*', 'stories/**/*', 'figma/src/**/*', '.ci/**/*', 'semcore/**/__tests__/**/*'],
rules: {
'no-console': 'off',
},
},
{
files: ['figma/mappings/**/Icon.figma.{jsx,tsx}'],
rules: {
'import/order': 'off',
},
},
]);
13 changes: 13 additions & 0 deletions figma/figma-custom.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"codeConnect": {
"include": [
"mappings/**/*.figma.ts"
],
"label": "React",
"parser": "custom",
"parserCommand": "pnpm tsm src/parser.ts",
"paths": {
"@semcore/ui/*": ["semcore/*/src"]
}
}
}
14 changes: 14 additions & 0 deletions figma/figma.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"codeConnect": {
"include": [
"mappings/**/*.figma.{tsx,jsx}"
],
"exclude": ["mappings/**/Icon.figma.jsx"],
"label": "React",
"parser": "react",
"paths": {
"@semcore/ui/*": ["semcore/*/src"]
},
"interactiveSetupFigmaFileUrl": "https://www.figma.com/design/RLic9ruqNNm6qgARKFk5Ae/-Refactoring--%E2%9D%96-Core-Components"
}
}
48 changes: 48 additions & 0 deletions figma/mappings/Example.figma.template.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Config lines for the parser:
// - keep them commented
// - order doesn't matter, but they should be before the "require" statement

// https://www.figma.com/design/yzZPyF0Rk2TddifXf6kovg/Card?node-id=11793-136767
// ^ node URL is required
// import Card from '@semcore/ui/card'
// import { Flex } from '@semcore/ui/base-components'
// ^ imports are optional, just put the ones you want to show in Code Connect

const figma = require('figma');
const instance = figma.selectedInstance;

// you can write any JS code here, like loops, if-s, etc:
const items = [1, 2, 3].map((item) => 'Option' + item).join();

let result = '';
const two = 2;
if (two + two === 4) {
result = 'true!';
}

// to parse these files, run with the alternative config file:
// npx figma connect publish --config figma-custom.config.json

// some API examples:
const labelText = instance.getString('PropertyName'); // for text properties
const helperText = instance.findText('LayerName').textContent; // to directly get text layers
const isDisabled = instance.getBoolean('PropertyName'); // also accepts boolean-like variant properties

// api docs: https://developers.figma.com/docs/code-connect/template-v2-api/
// and also: https://developers.figma.com/docs/code-connect/custom-parsers/#example-template-implementation

// default findInstance() can be inconvenient (you have to check if the layer
// is hidden and generate code by adding '.executeTemplate().example'),
// so here's a much more convenient custom function:
const someNestedInstanceCode = instanceCode(instance, 'LayerName');

export default {
example: figma.tsx`
<ComponentName>
${items} ${result}
${someNestedInstanceCode}
</ComponentName>
`,
id: 'ComponentName',
};
// the id property is required, it can be used to find children using findConnectedInstance('component-id') instead of findInstance('layerName') - it helps if layer has been renamed
Loading
Loading