Skip to content

Commit f5c92f6

Browse files
committed
feat(CC-batch-6): verification complete
1 parent 80d95d1 commit f5c92f6

14 files changed

+318
-110
lines changed

packages/code-connect/components/JumpLinks/JumplinkHorizontal.figma.tsx

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

4+
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
5+
46
figma.connect(
57
JumpLinksItem,
6-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=5286-5330&t=IzSunfrnw18ti37Y-11',
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=5286-5330',
79
{
810
props: {
911
// string
@@ -15,7 +17,6 @@ figma.connect(
1517
children: figma.children('*')
1618
},
1719
example: (props) => (
18-
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
1920
<JumpLinksItem href="#" isActive={props.isActive}>
2021
{props.tabText}
2122
{props.children}

packages/code-connect/components/JumpLinks/JumplinkVertical.figma.tsx

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

4+
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
5+
46
figma.connect(
57
JumpLinksItem,
68
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=5426-8306',
@@ -13,7 +15,6 @@ figma.connect(
1315
isActive: figma.enum('State', { Selected: true })
1416
},
1517
example: (props) => (
16-
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
1718
<JumpLinksItem href="#" isActive={props.isActive}>
1819
{props.tabText}
1920
</JumpLinksItem>
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import figma from '@figma/code-connect';
22
import { JumpLinks } from '@patternfly/react-core';
33

4+
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
5+
46
figma.connect(
57
JumpLinks,
6-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=8644-150823&t=IzSunfrnw18ti37Y-11',
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=8644-150823',
79
{
810
props: {
911
// boolean
10-
label: figma.boolean('Show label', { true: figma.children('Label') }),
12+
label: figma.boolean('Show label', {
13+
true: 'Horizontal jump links',
14+
false: undefined
15+
}),
1116

1217
children: figma.children('*')
1318
},
14-
example: (props) => (
15-
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
16-
<JumpLinks label={props.label}>{props.children}</JumpLinks>
17-
)
19+
example: (props) => <JumpLinks label={props.label}>{props.children}</JumpLinks>
1820
}
1921
);

packages/code-connect/components/JumpLinks/JumplinksVertical.figma.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
import figma from '@figma/code-connect';
22
import { JumpLinks } from '@patternfly/react-core';
33

4+
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
5+
46
figma.connect(
57
JumpLinks,
6-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=5426-8542&t=IzSunfrnw18ti37Y-11',
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=5426-8542',
79
{
810
props: {
911
// boolean
1012
label: figma.boolean('Show Label', {
11-
true: figma.children('Label'),
13+
true: 'Vertical jump links',
1214
false: undefined
1315
}),
1416

1517
children: figma.children('*')
1618
},
1719
example: (props) => (
18-
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
1920
<JumpLinks isVertical label={props.label}>
2021
{props.children}
2122
</JumpLinks>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import figma from '@figma/code-connect';
2+
import { Label, LabelGroup } from '@patternfly/react-core';
3+
4+
// Documentation for LabelGroups can be found at https://www.patternfly.org/components/label
5+
6+
figma.connect(
7+
LabelGroup,
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2800-1075',
9+
{
10+
props: {
11+
// string
12+
labelGroupName: figma.string('Label group name'),
13+
14+
// boolean
15+
hasCollapsedLabels: figma.boolean('Has collapsed labels', {
16+
true: 4,
17+
false: undefined
18+
}),
19+
20+
// enum
21+
addLabelControl: figma.enum('Type', {
22+
'Label management': (
23+
<Label variant="add" onClick={() => {}}>
24+
Add label
25+
</Label>
26+
)
27+
}),
28+
29+
children: figma.children([
30+
'Label in group 1',
31+
'Label in group 2',
32+
'Label in group 3',
33+
'Label in group 4',
34+
'Label in group 5',
35+
'Label in group 6',
36+
'Label Non-status'
37+
])
38+
},
39+
example: (props) => (
40+
<LabelGroup
41+
addLabelControl={props.addLabelControl}
42+
categoryName="Group label"
43+
isClosable
44+
isEditable
45+
numLabels={props.hasCollapsedLabels}
46+
onClick={() => {}}
47+
>
48+
{props.children}
49+
</LabelGroup>
50+
)
51+
}
52+
);
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
import figma from '@figma/code-connect';
2-
import { LabelGroup } from '@patternfly/react-core';
2+
import { Label } from '@patternfly/react-core';
3+
4+
// TODO: FIGMA: Reconfigure how numlabels is set. Currently, the text string "more" is not customizable
5+
// TODO: FIGMA: Label group should contain label components
6+
7+
// NOTE: "Label overflow" doesn't appear to be necessary
8+
// Documentation for Label can be found at https://www.patternfly.org/components/label-group
39

410
figma.connect(
5-
LabelGroup,
6-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2800-1075',
11+
Label,
12+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2800-1067',
713
{
814
props: {
9-
// string
10-
categoryName: figma.string('Label group name'),
11-
isCollapsed: figma.boolean('Has collapsed labels'),
12-
children: figma.children('Label')
15+
labelText: figma.string('Label text'),
16+
isCloseable: figma.boolean('Has Close button', {
17+
true: `{() => {}}`,
18+
false: undefined
19+
})
1320
},
14-
// Documentation for LabelGroup can be found at https://www.patternfly.org/components/label-group
15-
example: (props) => (
16-
<LabelGroup categoryName={props.categoryName} numLabels={5}>
17-
{props.children}
18-
</LabelGroup>
19-
)
21+
example: (props) => <Label onClose={props.isCloseable}>{props.labelText}</Label>
2022
}
2123
);

packages/code-connect/components/Label/LabelNonStatus.figma.tsx

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
11
import figma from '@figma/code-connect';
22
import { Label } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly Label component integration for Figma Code Connect
6-
* @see https://www.patternfly.org/components/label
7-
*/
4+
// Documentation for Label can be found at https://www.patternfly.org/components/label
85

96
figma.connect(
107
Label,
118
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2800-609',
129
{
1310
props: {
1411
// string
15-
text: figma.string('Text'),
12+
labelText: figma.string('Text'),
1613

1714
// boolean
1815
isEditable: figma.boolean('Is Editable'),
16+
onEditCancel: figma.boolean('Is Editable', {
17+
true: `{() => {}}`,
18+
false: undefined
19+
}),
20+
onEditComplete: figma.boolean('Is Editable', {
21+
true: `{() => {}}`,
22+
false: undefined
23+
}),
24+
editableProps: figma.boolean('Is Editable', {
25+
true: {
26+
'aria-label': 'Editable label props',
27+
id: 'editable-label'
28+
},
29+
false: undefined
30+
}),
1931

2032
// enum
33+
isCompact: figma.enum('Type', { Compact: true }),
2134
color: figma.enum('Color', {
2235
Red: 'red',
2336
Orange: 'orange',
@@ -31,12 +44,21 @@ figma.connect(
3144
Filled: 'filled',
3245
Outlined: 'outline'
3346
}),
34-
isCompact: figma.enum('Type', { Compact: true })
47+
48+
children: figma.children('*')
3549
},
3650
example: (props) => (
37-
// Documentation for Label can be found at https://www.patternfly.org/components/label
38-
<Label color={props.color} variant={props.variant} isCompact={props.isCompact} isEditable={props.isEditable}>
39-
{props.text}
51+
<Label
52+
isCompact={props.isCompact}
53+
isEditable={props.isEditable}
54+
onEditCancel={props.onEditCancel}
55+
onEditComplete={props.onEditComplete}
56+
editableProps={props.editableProps}
57+
color={props.color}
58+
variant={props.variant}
59+
>
60+
{props.children}
61+
{props.labelText}
4062
</Label>
4163
)
4264
}
Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,13 @@
11
import figma from '@figma/code-connect';
2-
import { Label } from '@patternfly/react-core';
32

4-
/**
5-
* PatternFly Label integration for Figma Code Connect
6-
*/
3+
// Documentation for Label can be found at https://www.patternfly.org/components/label
74

8-
figma.connect(
9-
Label,
10-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2800-609',
11-
{
12-
props: {
13-
text: figma.string('Text'),
14-
variant: figma.enum('Type', {
15-
Filled: 'filled',
16-
Outlined: 'outlined'
17-
}),
18-
isCompact: figma.enum('Type', {
19-
Compact: true
20-
})
21-
},
22-
example: (props) => (
23-
// Documentation for Label can be found at https://www.patternfly.org/components/label
24-
<Label
25-
color={props.color}
26-
variant={props.variant}
27-
isCompact={props.isCompact}
28-
isEditable={props.isEditable}
29-
isDismissable={props.isDismissable}
30-
text={props.text}
31-
hasIcon={props.hasIcon}
32-
/>
33-
)
34-
}
35-
);
5+
figma.connect('https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2800-1042', {
6+
props: {
7+
// string
8+
text: figma.string('Text'),
9+
10+
children: figma.children('*')
11+
},
12+
example: (props) => <>{props.children}</>
13+
});

packages/code-connect/components/Label/LabelStatus.figma.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
import figma from '@figma/code-connect';
22
import { Label } from '@patternfly/react-core';
33

4+
// Documentation for Label can be found at https://www.patternfly.org/components/label
5+
46
figma.connect(
57
Label,
68
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2800-488',
79
{
810
props: {
11+
// string
912
text: figma.string('Text'),
10-
status: figma.enum('State', {
13+
children: figma.children('*'),
14+
15+
// enum
16+
isCompact: figma.enum('Size', { Compact: true }),
17+
variant: figma.enum('Type', {
18+
Filled: 'filled',
19+
Outlined: 'outline'
20+
}),
21+
status: figma.enum('Status', {
1122
Danger: 'danger',
1223
Warning: 'warning',
1324
Success: 'success',
1425
Info: 'info',
1526
Custom: 'custom'
16-
}),
17-
type: figma.enum('Type', {
18-
Filled: 'filled',
19-
Outlined: 'outline'
20-
}),
21-
isCompact: figma.enum('Size', { Compact: true })
27+
})
2228
},
2329
example: (props) => (
24-
// Documentation for Label can be found at https://www.patternfly.org/components/label
25-
<Label isCompact={props.isCompact} status={props.status} variant={props.type}>
30+
<Label isCompact={props.isCompact} status={props.status} variant={props.variant}>
2631
{props.text}
2732
</Label>
2833
)

packages/code-connect/components/LoginPage/DesktopLoginPage.figma.tsx

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

44
// TODO: Map Figma component to these properties
5+
// Documentation for LoginPage can be found at https://www.patternfly.org/components/login-page
56

67
figma.connect(
78
LoginPage,
@@ -11,7 +12,6 @@ figma.connect(
1112
children: figma.children('*')
1213
},
1314
example: (props) => (
14-
// Documentation for LoginPage can be found at https://www.patternfly.org/components/login-page
1515
<LoginPage
1616
brandImgSrc={brandImg}
1717
brandImgAlt="PatternFly logo"

0 commit comments

Comments
 (0)