diff --git a/get-figma-ids.js b/get-figma-ids.js index 587368ff69..cfdb3e33fc 100644 --- a/get-figma-ids.js +++ b/get-figma-ids.js @@ -33,6 +33,13 @@ async function fetchFigmaComponentIds() { .filter((component) => component.containing_frame.hasOwnProperty('containingStateGroup') ) + .reduce((acc, component) => { + // Dedupe components with the same name + if (!acc.some((item) => item.name === component.name)) { + acc.push(component); + } + return acc; + }, []) // create a new array with a normalized name of the component // and the encoded node id of the component .map((component) => { @@ -47,7 +54,7 @@ async function fetchFigmaComponentIds() { ), }; }); - // Use a Map arranged by name for lookups TODO: needs to be deduped + // Use a Map arranged by name for lookups return new Map( componentListArray.map((component) => [component.name, component]) ); diff --git a/packages/components/buttons/accessible-button/src/accessible-button.figma.tsx b/packages/components/collapsible-panel/src/collapsible-panel.figma.tsx similarity index 66% rename from packages/components/buttons/accessible-button/src/accessible-button.figma.tsx rename to packages/components/collapsible-panel/src/collapsible-panel.figma.tsx index 9b77ee698e..76bb192164 100644 --- a/packages/components/buttons/accessible-button/src/accessible-button.figma.tsx +++ b/packages/components/collapsible-panel/src/collapsible-panel.figma.tsx @@ -1,17 +1,17 @@ // @ts-nocheck -import { AccessibleButton } from '@commercetools-frontend/ui-kit'; +import { CollapsiblePanel } from '@commercetools-frontend/ui-kit'; import figma from '@figma/code-connect'; // REQUIRED: supply node id for the figma component figma.connect( - AccessibleButton, - 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=', + CollapsiblePanel, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=118%3A17915', { props: { // *This file was generated from a script* // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect children: figma.children('*'), }, - example: (props) => {props.children}, + example: (props) => {props.children}, } ); diff --git a/packages/components/data-table-manager/src/data-table-manager.figma.tsx b/packages/components/data-table-manager/src/data-table-manager.figma.tsx new file mode 100644 index 0000000000..cc20375e04 --- /dev/null +++ b/packages/components/data-table-manager/src/data-table-manager.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { DataTableManager } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + DataTableManager, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=5602%3A26092', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => {props.children}, + } +); diff --git a/packages/components/data-table/src/footer.figma.tsx b/packages/components/data-table/src/footer.figma.tsx new file mode 100644 index 0000000000..b2a3f0ab7e --- /dev/null +++ b/packages/components/data-table/src/footer.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { Footer } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + Footer, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=3208%3A769', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => , + } +); diff --git a/packages/components/dropdowns/dropdown-menu/src/dropdown-menu.figma.tsx b/packages/components/dropdowns/dropdown-menu/src/dropdown-menu.figma.tsx new file mode 100644 index 0000000000..b09154bdf5 --- /dev/null +++ b/packages/components/dropdowns/dropdown-menu/src/dropdown-menu.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { DropdownMenu } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + DropdownMenu, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=5322%3A3674', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => {props.children}, + } +); diff --git a/packages/components/filters/src/filter-menu/footer/footer.figma.tsx b/packages/components/filters/src/filter-menu/footer/footer.figma.tsx new file mode 100644 index 0000000000..b2a3f0ab7e --- /dev/null +++ b/packages/components/filters/src/filter-menu/footer/footer.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { Footer } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + Footer, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=3208%3A769', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => , + } +); diff --git a/packages/components/filters/src/filter-menu/header/header.figma.tsx b/packages/components/filters/src/filter-menu/header/header.figma.tsx new file mode 100644 index 0000000000..f2d011f34e --- /dev/null +++ b/packages/components/filters/src/filter-menu/header/header.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { Header } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + Header, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=645%3A38178', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) =>
{props.children}
, + } +); diff --git a/packages/components/inputs/checkbox-input/src/checkbox.figma.tsx b/packages/components/inputs/checkbox-input/src/checkbox.figma.tsx new file mode 100644 index 0000000000..bd004d2981 --- /dev/null +++ b/packages/components/inputs/checkbox-input/src/checkbox.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { Checkbox } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + Checkbox, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=161%3A18694', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => {props.children}, + } +); diff --git a/packages/components/inputs/date-time-input/src/time-input.figma.tsx b/packages/components/inputs/date-time-input/src/time-input.figma.tsx new file mode 100644 index 0000000000..8c67c9f455 --- /dev/null +++ b/packages/components/inputs/date-time-input/src/time-input.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { TimeInput } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + TimeInput, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=307%3A23474', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => {props.children}, + } +); diff --git a/packages/components/inputs/localized-text-input/src/localized-text-input.figma.tsx b/packages/components/inputs/localized-text-input/src/localized-text-input.figma.tsx new file mode 100644 index 0000000000..3e8d2cd5da --- /dev/null +++ b/packages/components/inputs/localized-text-input/src/localized-text-input.figma.tsx @@ -0,0 +1,19 @@ +// @ts-nocheck +import { LocalizedTextInput } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + LocalizedTextInput, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=453%3A26870', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => ( + {props.children} + ), + } +); diff --git a/packages/components/buttons/link-button/src/link-button.figma.tsx b/packages/components/inputs/money-input/src/money-input.figma.tsx similarity index 69% rename from packages/components/buttons/link-button/src/link-button.figma.tsx rename to packages/components/inputs/money-input/src/money-input.figma.tsx index 0530dddf7f..8d46c97f88 100644 --- a/packages/components/buttons/link-button/src/link-button.figma.tsx +++ b/packages/components/inputs/money-input/src/money-input.figma.tsx @@ -1,17 +1,17 @@ // @ts-nocheck -import { LinkButton } from '@commercetools-frontend/ui-kit'; +import { MoneyInput } from '@commercetools-frontend/ui-kit'; import figma from '@figma/code-connect'; // REQUIRED: supply node id for the figma component figma.connect( - LinkButton, - 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=', + MoneyInput, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=453%3A26481', { props: { // *This file was generated from a script* // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect children: figma.children('*'), }, - example: (props) => {props.children}, + example: (props) => {props.children}, } ); diff --git a/packages/components/inputs/select-input/src/select-input.figma.tsx b/packages/components/inputs/select-input/src/select-input.figma.tsx new file mode 100644 index 0000000000..092a1d3dc1 --- /dev/null +++ b/packages/components/inputs/select-input/src/select-input.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { SelectInput } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + SelectInput, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=120%3A17426', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => {props.children}, + } +); diff --git a/packages/components/inputs/text-input/src/text-input.figma.tsx b/packages/components/inputs/text-input/src/text-input.figma.tsx new file mode 100644 index 0000000000..96e3c6d1ce --- /dev/null +++ b/packages/components/inputs/text-input/src/text-input.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { TextInput } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + TextInput, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=107%3A18819', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => {props.children}, + } +); diff --git a/packages/components/inputs/time-input/src/time-input.figma.tsx b/packages/components/inputs/time-input/src/time-input.figma.tsx new file mode 100644 index 0000000000..8c67c9f455 --- /dev/null +++ b/packages/components/inputs/time-input/src/time-input.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { TimeInput } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + TimeInput, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=307%3A23474', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => {props.children}, + } +); diff --git a/packages/components/notifications/src/content-notification/content-notification.figma.tsx b/packages/components/notifications/src/content-notification/content-notification.figma.tsx new file mode 100644 index 0000000000..4e5ce15372 --- /dev/null +++ b/packages/components/notifications/src/content-notification/content-notification.figma.tsx @@ -0,0 +1,19 @@ +// @ts-nocheck +import { ContentNotification } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + ContentNotification, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=212%3A20449', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => ( + {props.children} + ), + } +); diff --git a/packages/components/primary-action-dropdown/src/primary-action-dropdown.figma.tsx b/packages/components/primary-action-dropdown/src/primary-action-dropdown.figma.tsx new file mode 100644 index 0000000000..4c25d3b0f9 --- /dev/null +++ b/packages/components/primary-action-dropdown/src/primary-action-dropdown.figma.tsx @@ -0,0 +1,19 @@ +// @ts-nocheck +import { PrimaryActionDropdown } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + PrimaryActionDropdown, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=1040%3A35979', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => ( + {props.children} + ), + } +); diff --git a/packages/components/progress-bar/src/progress-bar.figma.tsx b/packages/components/progress-bar/src/progress-bar.figma.tsx new file mode 100644 index 0000000000..913111c186 --- /dev/null +++ b/packages/components/progress-bar/src/progress-bar.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { ProgressBar } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + ProgressBar, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=4834%3A44677', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => {props.children}, + } +); diff --git a/packages/components/stamp/src/stamp.figma.tsx b/packages/components/stamp/src/stamp.figma.tsx new file mode 100644 index 0000000000..2967b19fc9 --- /dev/null +++ b/packages/components/stamp/src/stamp.figma.tsx @@ -0,0 +1,17 @@ +// @ts-nocheck +import { Stamp } from '@commercetools-frontend/ui-kit'; +import figma from '@figma/code-connect'; + +// REQUIRED: supply node id for the figma component +figma.connect( + Stamp, + 'https://www.figma.com/design/UoqmtHSHwxvEZRcbsM4A3Z/CT-product-design-system?node-id=123%3A18613', + { + props: { + // *This file was generated from a script* + // TODO: manually map props here, see https://www.figma.com/code-connect-docs/react/#figmaconnect + children: figma.children('*'), + }, + example: (props) => {props.children}, + } +);