diff --git a/packages/react/figma/Accordion.figma.tsx b/packages/react/figma/Accordion.figma.tsx index ae11da0a8b..59eda1eaaa 100644 --- a/packages/react/figma/Accordion.figma.tsx +++ b/packages/react/figma/Accordion.figma.tsx @@ -1,4 +1,5 @@ import figma from '@figma/code-connect' +import React from 'react' import { Accordion } from '../src/Accordion/Accordion' import { AccordionSection } from '../src/Accordion/AccordionSection' diff --git a/packages/react/figma/UnorderedList.figma.tsx b/packages/react/figma/UnorderedList.figma.tsx new file mode 100644 index 0000000000..fdfbbf5b88 --- /dev/null +++ b/packages/react/figma/UnorderedList.figma.tsx @@ -0,0 +1,70 @@ +import figma from '@figma/code-connect' +import React from 'react' +import { UnorderedList } from '../src/UnorderedList/UnorderedList' +import { UnorderedListItem } from '../src/UnorderedList/UnorderedListItem' + +/** + * -- 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( + UnorderedList, + 'https://www.figma.com/design/9IGm6IdPUYizBNGsUnueBd/Amsterdam-Design-System?node-id=24090-19658&node-type=frame&m=dev', + { + props: { + children: figma.children(['_Unordered list item']), + size: figma.enum('Size', { + Default: undefined, + Small: 'small', + }), + }, + example: ({ children, size }) => {children}, + }, +) + +figma.connect( + UnorderedListItem, + 'https://www.figma.com/design/9IGm6IdPUYizBNGsUnueBd/Amsterdam-Design-System?node-id=24090-20028&node-type=frame&m=dev', + { + props: { + text: figma.string('Text'), + children: figma.children(['_Unordered list sub list']), + }, + example: ({ text, children }) => ( + + {text} + {children} + + ), + }, +) + +figma.connect( + UnorderedList, + 'https://www.figma.com/design/9IGm6IdPUYizBNGsUnueBd/Amsterdam-Design-System?node-id=24093-1757&node-type=frame&m=dev', + { + props: { + children: figma.children(['_Unordered list sub item']), + size: figma.enum('Size', { + Default: undefined, + Small: 'small', + }), + }, + example: ({ children, size }) => {children}, + }, +) + +figma.connect( + UnorderedListItem, + 'https://www.figma.com/design/9IGm6IdPUYizBNGsUnueBd/Amsterdam-Design-System?node-id=24093-1751&node-type=frame&m=dev', + { + props: { + text: figma.string('Text'), + }, + example: ({ text }) => {text}, + }, +) diff --git a/packages/react/src/Badge/Badge.figma.tsx b/packages/react/src/Badge/Badge.figma.tsx deleted file mode 100644 index d5d8ca4dcf..0000000000 --- a/packages/react/src/Badge/Badge.figma.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import figma from '@figma/code-connect' -import { Badge } from './Badge' - -/** - * -- 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( - Badge, - 'https://www.figma.com/design/9IGm6IdPUYizBNGsUnueBd/Amsterdam-Design-System?node-id=17750-42420&m=dev', - { - props: { - label: figma.string('Label'), - color: figma.enum('Color', { - Yellow: 'yellow', - Blue: 'blue', - Red: 'red', - Green: 'green', - Purple: 'purple', - Magenta: 'magenta', - Orange: 'orange', - 'Light Blue': 'light-blue', - White: 'white', - Black: 'black', - 'Dark Green': 'dark-green', - 'Grey 1': 'grey-1', - 'Grey 2': 'grey-2', - 'Grey 3': 'grey-3', - }), - }, - example: ({ label, color }) => , - }, -) diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index 99eef39487..052923103c 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -22,13 +22,6 @@ "strict": true, "target": "es2020" }, - "include": [ - "next-env.d.ts", - "src/**/*.ts", - "src/**/*.tsx", - "figma/Accordion.figma.tsx", - "figma/Button.figma.tsx", - "figma/Heading.figma.tsx" - ], + "include": ["next-env.d.ts", "src/**/*.ts", "src/**/*.tsx", "figma/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b4f1be6d17..ba5dbc4d07 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1339,6 +1339,111 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + '@img/sharp-darwin-arm64@0.33.5': + resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [darwin] + + '@img/sharp-darwin-x64@0.33.5': + resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-darwin-arm64@1.0.4': + resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} + cpu: [arm64] + os: [darwin] + + '@img/sharp-libvips-darwin-x64@1.0.4': + resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-linux-arm64@1.0.4': + resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linux-arm@1.0.5': + resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} + cpu: [arm] + os: [linux] + + '@img/sharp-libvips-linux-s390x@1.0.4': + resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} + cpu: [s390x] + os: [linux] + + '@img/sharp-libvips-linux-x64@1.0.4': + resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-x64@1.0.4': + resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} + cpu: [x64] + os: [linux] + + '@img/sharp-linux-arm64@0.33.5': + resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linux-arm@0.33.5': + resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm] + os: [linux] + + '@img/sharp-linux-s390x@0.33.5': + resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [s390x] + os: [linux] + + '@img/sharp-linux-x64@0.33.5': + resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-linuxmusl-arm64@0.33.5': + resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linuxmusl-x64@0.33.5': + resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-wasm32@0.33.5': + resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [wasm32] + + '@img/sharp-win32-ia32@0.33.5': + resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-x64@0.33.5': + resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [win32] + '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -1958,7 +2063,7 @@ packages: '@storybook/csf-plugin@8.4.4': resolution: {integrity: sha512-4+6SUhp5sEJN9BY5RuxcFKvJbOqCzIUp9oHSSz36hkP07a4QH+SwxfEd0U7JRfmPpB63L+izywTzWhdADiAMOQ==} peerDependencies: - storybook: ^8.4.1 + storybook: ^8.4.4 '@storybook/csf-tools@7.6.20': resolution: {integrity: sha512-rwcwzCsAYh/m/WYcxBiEtLpIW5OH1ingxNdF/rK9mtGWhJxXRDV8acPkFrF8rtFWIVKoOCXu5USJYmc3f2gdYQ==} @@ -8484,7 +8589,7 @@ snapshots: dotenv: 16.4.5 fast-fuzzy: 1.12.0 find-up: 5.0.0 - glob: 10.4.2 + glob: 10.4.5 jsdom: 24.1.3 lodash: 4.17.21 minimatch: 9.0.5 @@ -9277,17 +9382,17 @@ snapshots: dependencies: '@storybook/global': 5.0.0 - '@storybook/components@8.4.1(storybook@8.4.1(prettier@3.3.3))': + '@storybook/components@8.4.4(storybook@8.4.4(prettier@3.3.3))': dependencies: - storybook: 8.4.1(prettier@3.3.3) + storybook: 8.4.4(prettier@3.3.3) '@storybook/core-events@7.6.20': dependencies: ts-dedent: 2.2.0 - '@storybook/core-events@8.4.1(storybook@8.4.1(prettier@3.3.3))': + '@storybook/core-events@8.4.4(storybook@8.4.4(prettier@3.3.3))': dependencies: - storybook: 8.4.1(prettier@3.3.3) + storybook: 8.4.4(prettier@3.3.3) '@storybook/core@8.4.4(prettier@3.3.3)': dependencies: @@ -9411,7 +9516,7 @@ snapshots: '@storybook/theming@8.4.4(storybook@8.4.4(prettier@3.3.3))': dependencies: - storybook: 8.4.1(prettier@3.3.3) + storybook: 8.4.4(prettier@3.3.3) '@storybook/types@7.6.20': dependencies: @@ -9613,15 +9718,15 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/concat-stream@2.0.0': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/connect@3.4.38': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/debug@4.1.9': dependencies: @@ -9637,7 +9742,7 @@ snapshots: '@types/express-serve-static-core@4.17.43': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/qs': 6.9.11 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -9758,13 +9863,13 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/serve-static@1.15.5': dependencies: '@types/http-errors': 2.0.4 '@types/mime': 3.0.4 - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/stack-utils@2.0.1': {} @@ -12548,7 +12653,6 @@ snapshots: '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 '@types/node': 22.9.0 - '@types/node': 20.16.1 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3