Skip to content

Commit e952e9d

Browse files
committed
feat(CC-batch-4): verification complete
1 parent 899bb62 commit e952e9d

20 files changed

Lines changed: 312 additions & 112 deletions

packages/code-connect/components/DataList/DataList.figma.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import figma from '@figma/code-connect';
22
import { DataList } from '@patternfly/react-core';
33

4+
// Documentation for DataList can be found at https://www.patternfly.org/components/data-list
5+
46
figma.connect(
57
DataList,
68
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6649-80542',
Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
11
import figma from '@figma/code-connect';
2-
import { DataListItem } from '@patternfly/react-core';
2+
import { DataListItemRow } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly DataListItem component integration for Figma Code Connect
6-
*/
4+
// Documentation for DataListItem can be found at https://www.patternfly.org/components/data-list
75

86
figma.connect(
9-
DataListItem,
10-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6649-69488&m=dev',
7+
DataListItemRow,
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6649-69488',
119
{
1210
props: {
1311
// boolean
14-
showLeftControls: figma.boolean('Show Left controls'),
15-
showRightActions: figma.boolean('Show right actions'),
16-
isSelected: figma.boolean('Selected'),
1712
isExpanded: figma.boolean('Expanded'),
13+
isSelected: figma.boolean('Selected'),
1814

1915
// enum
2016
isCompact: figma.enum('Size', { Compact: true }),
2117

2218
children: figma.children('*')
2319
},
24-
example: (props) => (
25-
<DataListItem selected={props.isSelected} isExpanded={props.isExpanded} aria-labelledby="<data-list-row-id>">
26-
{props.children}
27-
</DataListItem>
28-
)
20+
example: (props) => <DataListItemRow>{props.children}</DataListItemRow>
2921
}
3022
);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import figma from '@figma/code-connect';
2+
import { DataListItemRow } from '@patternfly/react-core';
3+
4+
// Documentation for DataListItemRow can be found at https://www.patternfly.org/components/data-list
5+
6+
figma.connect(
7+
DataListItemRow,
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6649-69488',
9+
{
10+
props: {
11+
children: figma.children('*')
12+
},
13+
example: (props) => <DataListItemRow rowid="<row-id>">{props.children}</DataListItemRow>
14+
}
15+
);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import figma from '@figma/code-connect';
2+
import { DataListItemRow } from '@patternfly/react-core';
3+
4+
// Documentation for DataListItemRow can be found at https://www.patternfly.org/components/data-list
5+
6+
figma.connect(
7+
DataListItemRow,
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6649-96947',
9+
{
10+
props: {
11+
children: figma.children('*')
12+
},
13+
example: (props) => <DataListItemRow rowid="<row-id>">{props.children}</DataListItemRow>
14+
}
15+
);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import figma from '@figma/code-connect';
2+
import { DataListItemRow } from '@patternfly/react-core';
3+
4+
// Documentation for DataListItemRow can be found at https://www.patternfly.org/components/data-list
5+
6+
figma.connect(
7+
DataListItemRow,
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=19618-55289',
9+
{
10+
props: {
11+
children: figma.children('*')
12+
},
13+
example: (props) => <DataListItemRow rowid="<row-id>">{props.children}</DataListItemRow>
14+
}
15+
);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import figma from '@figma/code-connect';
2+
import { DataListAction } from '@patternfly/react-core';
3+
4+
// Documentation for DataListItemRow can be found at https://www.patternfly.org/components/data-list
5+
6+
figma.connect(
7+
DataListAction,
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6596-33965',
9+
{
10+
props: {
11+
children: figma.children('*')
12+
},
13+
example: (props) => (
14+
<DataListAction aria-labelledby="item1 action1" id="action1" aria-label="Actions">
15+
{props.children}
16+
</DataListAction>
17+
)
18+
}
19+
);
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import figma from '@figma/code-connect';
2+
import { DataListCell, DataListItemCells } from '@patternfly/react-core';
3+
4+
// TODO: FIGMA: Either name layers uniquely or create a dataListCell component to house
5+
// Documentation for DataList can be found at https://www.patternfly.org/components/data-list
6+
7+
figma.connect(
8+
DataListCell,
9+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6596-33934',
10+
{
11+
props: {
12+
showDescriptionText: figma.boolean('Show description text'),
13+
14+
// enum
15+
isIcon: figma.enum('Type', {
16+
'Filled - Plain text': true
17+
}),
18+
isFilled: figma.enum('Type', {
19+
'Filled - Plain text': true,
20+
'Filled - Link text': true
21+
}),
22+
23+
children: figma.children('*'),
24+
iconContent: figma.children('IconWrapper'),
25+
primaryContent: figma.children('My application'),
26+
secondaryContent: figma.textContent('Description text')
27+
},
28+
example: (props) => (
29+
<DataListItemCells
30+
rowid="<row-id>"
31+
dataListCells={[
32+
<DataListCell isIcon={true} key="icon-content">
33+
{props.iconContent}
34+
</DataListCell>,
35+
<DataListCell key="primary-content">{props.primaryContent}</DataListCell>,
36+
<DataListCell key="secondary-content">{props.secondaryContent}</DataListCell>
37+
]}
38+
/>
39+
)
40+
}
41+
);
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import figma from '@figma/code-connect';
2+
import {
3+
// DataListAction,
4+
DataListCheck,
5+
DataListControl,
6+
DataListDragButton,
7+
DataListToggle
8+
} from '@patternfly/react-core';
9+
10+
// TODO: 2. Base Components/Control cell - These cells need unique names. Either create components for DataListCell,
11+
// DataListToggle, DataListDragButton, DataListAction, DataListCheck
12+
// These component specifics are unreachable unless separated into their own entities
13+
// Documentation for DataListControl can be found at https://www.patternfly.org/components/data-list
14+
15+
// const selectableCell = {
16+
// <DataListCheck id="ex1-item1" aria-labelledby="ex1-item1" name="ex1-item1" />
17+
// return (
18+
// <>
19+
// {props.isSelectable}
20+
// {props.isExpandable}
21+
// {props.isDraggable}
22+
// <DataListAction aria-labelledby="item1 action1" id="action1" aria-label="Actions">
23+
// {props.children}
24+
// </DataListAction>
25+
// </>
26+
// );
27+
// };
28+
29+
figma.connect(
30+
DataListControl,
31+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6596-34013',
32+
{
33+
props: {
34+
isDraggable: figma.boolean('Is Draggable', {
35+
true: <DataListDragButton>Show drag button</DataListDragButton>,
36+
false: undefined
37+
}),
38+
isExpandable: figma.boolean('Row expansion', {
39+
true: <DataListToggle onClick={() => {}} isExpanded={false} id="m-ex-toggle1" aria-controls="m-ex-expand1" />,
40+
false: undefined
41+
}),
42+
isSelectable: figma.boolean('Row select', {
43+
true: <DataListCheck id="ex1-item1" aria-labelledby="ex1-item1" name="ex1-item1" />,
44+
false: undefined
45+
})
46+
},
47+
example: (props) => (
48+
<>
49+
{props.isSelectable}
50+
{props.isExpandable}
51+
{props.isDraggable}
52+
</>
53+
)
54+
}
55+
);

packages/code-connect/components/DescriptionList/DescriptionList.figma.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { DescriptionList } from '@patternfly/react-core';
22
import figma from '@figma/code-connect';
33

4+
// Documentation for DescriptionList can be found at https://www.patternfly.org/components/description-list
5+
46
figma.connect(
57
DescriptionList,
68
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1121-3946',
@@ -17,7 +19,6 @@ figma.connect(
1719
children: figma.children('*')
1820
},
1921
example: (props) => (
20-
// Documentation for DescriptionList can be found at https://www.patternfly.org/components/description-list
2122
<DescriptionList isFluid={props.isFluid} isCompact={props.isCompact} isHorizontal={props.isHorizontal}>
2223
{props.children}
2324
</DescriptionList>

packages/code-connect/components/DescriptionList/DescriptionListItem.figma.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,13 @@ import { DescriptionListGroup, DescriptionListDescription } from '@patternfly/re
33

44
figma.connect(
55
DescriptionListGroup,
6-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1121-3571&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1121-3571',
77
{
88
props: {
99
// string
1010
content: figma.string('✏️ Content'),
1111

12-
// enum
13-
type: figma.enum('Type', {
14-
Vertical: 'vertical',
15-
'Horizontal fluid': 'horizontal-fluid',
16-
'Horizontal fixed': 'horizontal-fixed'
17-
}),
18-
19-
// instance
20-
swapLabel: figma.instance('Swap label'),
21-
22-
children: figma.children('*')
12+
children: figma.children('Term label')
2313
},
2414

2515
example: (props) => (

0 commit comments

Comments
 (0)