diff --git a/packages/code-connect/components/NotificationDrawer/NotificationDrawer.figma.tsx b/packages/code-connect/components/NotificationDrawer/NotificationDrawer.figma.tsx new file mode 100644 index 00000000000..2b21b0d6851 --- /dev/null +++ b/packages/code-connect/components/NotificationDrawer/NotificationDrawer.figma.tsx @@ -0,0 +1,24 @@ +import figma from '@figma/code-connect'; +import { NotificationDrawer, NotificationDrawerBody, NotificationDrawerList } from '@patternfly/react-core'; + +figma.connect( + NotificationDrawer, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=7172-99015', + { + props: { + notificationDrawerHeader: figma.children('Notification drawer header'), + notificationDrawerGroup: figma.children('Notification drawer group'), + notificationDrawerNotifications: figma.children(['Notifications', 'Notification drawer item']) + }, + example: (props) => ( + // Documentation for NotificationDrawer can be found at https://www.patternfly.org/components/notification-drawer + + {props.notificationDrawerHeader} + + {props.notificationDrawerGroup} + {props.notificationDrawerNotifications} + + + ) + } +); diff --git a/packages/code-connect/components/NotificationDrawer/NotificationDrawerGroups.figma.tsx b/packages/code-connect/components/NotificationDrawer/NotificationDrawerGroups.figma.tsx new file mode 100644 index 00000000000..b16b4b4f764 --- /dev/null +++ b/packages/code-connect/components/NotificationDrawer/NotificationDrawerGroups.figma.tsx @@ -0,0 +1,32 @@ +import figma from '@figma/code-connect'; +import { NotificationDrawerGroup, NotificationDrawerList } from '@patternfly/react-core'; + +// TODO: DESIGN: Split unread count into a separate prop + +figma.connect( + NotificationDrawerGroup, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=3172-18190&m=dev', + { + props: { + showUnreadCount: figma.boolean('Has count', { + true: 3, + false: NaN + }), + headingText: figma.string('Group title'), + isExpanded: figma.enum('Type', { + Collapsed: false, + Expanded: true + }), + hasCount: figma.boolean('Has count', { + true: figma.children('Badge'), + false: undefined + }), + children: figma.children('*') + }, + example: (props) => ( + + {props.children} + + ) + } +); diff --git a/packages/code-connect/components/NotificationDrawer/NotificationDrawerHeader.figma.tsx b/packages/code-connect/components/NotificationDrawer/NotificationDrawerHeader.figma.tsx new file mode 100644 index 00000000000..715e2814bbb --- /dev/null +++ b/packages/code-connect/components/NotificationDrawer/NotificationDrawerHeader.figma.tsx @@ -0,0 +1,63 @@ +import figma from '@figma/code-connect'; +import { Dropdown, DropdownItem, DropdownList, MenuToggle, NotificationDrawerHeader } from '@patternfly/react-core'; +import EllipsisVIcon from '@patternfly/react-icons/icons/ellipsis-v-icon/dist/esm/icons/ellipsis-v-icon'; + +figma.connect( + NotificationDrawerHeader, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=3170-17841&m=dev', + { + props: { + // string + headingText: figma.string('Heading text'), + + // boolean + hasActionsMenu: figma.boolean('Has actions menu', { + true: { + dropdown: ( + {}} + isOpen={false} + onOpenChange={() => {}} + popperProps={{ position: 'right' }} + toggle={() => ( + {}} + isExpanded={false} + onClick={() => {}} + variant="plain" + aria-label={`Basic example header kebab toggle`} + icon={} + /> + )} + > + + Item 1 + Item 2 + Item 3 + + + ), + onClose: () => {} + }, + false: { + dropdown: undefined, + onClose: undefined + } + }), + showUnreadCount: figma.boolean('Show unread count', { + true: 3, + false: NaN + }) + }, + example: (props) => ( + + {props.hasActionsMenu.dropdown} + + ) + } +); diff --git a/packages/code-connect/components/NotificationDrawer/NotificationDrawerItem.figma.tsx b/packages/code-connect/components/NotificationDrawer/NotificationDrawerItem.figma.tsx new file mode 100644 index 00000000000..800146379ba --- /dev/null +++ b/packages/code-connect/components/NotificationDrawer/NotificationDrawerItem.figma.tsx @@ -0,0 +1,88 @@ +import figma from '@figma/code-connect'; +import { + Dropdown, + DropdownItem, + DropdownList, + MenuToggle, + NotificationDrawerListItem, + NotificationDrawerListItemBody, + NotificationDrawerListItemHeader, + Timestamp +} from '@patternfly/react-core'; +import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; + +// Documentation for NotificationDrawerListItem can be found at https://www.patternfly.org/components/notification-drawer + +figma.connect( + NotificationDrawerListItem, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=3164-16861', + { + props: { + timestamp: , + + // enum + isRead: figma.enum('Type', { Read: true }), + isHoverable: figma.enum('State', { Hover: true }), + variant: figma.enum('Status', { + Info: 'info', + Success: 'success', + Warning: 'warning', + Danger: 'danger' + }), + + // boolean + listItemDropdown: { + dropdown: ( + {}} + isOpen={false} + onOpenChange={() => {}} + popperProps={{ position: 'right' }} + toggle={() => ( + {}} + isExpanded={false} + onClick={() => {}} + variant="plain" + aria-label={`Basic example header kebab toggle`} + icon={} + /> + )} + > + + Item 1 + Item 2 + Item 3 + + + ), + onClose: () => {} + }, + + // TODO: DESIGN: Make alert description retrievable via unique layer name or adding a prop to Noficiation Drawer Item + alertDescription: 'Description', + + // TODO: DESIGN: Make alert title retrievable via unique layer name or adding a prop to Noficiation Drawer Item + alertTitle: 'Notification title' + }, + example: (props) => ( + {}} + variant={props.variant} + > + + {props.listItemDropdown.dropdown} + + + {props.alertDescription} + + + ) + } +); diff --git a/packages/code-connect/components/Pagination/Pagination.figma.tsx b/packages/code-connect/components/Pagination/Pagination.figma.tsx new file mode 100644 index 00000000000..1c70c107100 --- /dev/null +++ b/packages/code-connect/components/Pagination/Pagination.figma.tsx @@ -0,0 +1,32 @@ +import figma from '@figma/code-connect'; +import { Pagination } from '@patternfly/react-core'; + +// TODO: Split perPage and Page into separate properties +// Documentation for Pagination can be found at https://www.patternfly.org/components/pagination + +figma.connect( + Pagination, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=5047-695', + { + props: { + // enum + isExpanded: figma.enum('Menu', { Open: true, Closed: false }), + isCompact: figma.enum('Type', { Compact: true, Closed: false }), + + // nested + pageQuantity: figma.nestedProps('Page quantity selector', { + itemCount: figma.string('Total quantity'), + state: figma.enum('State', { Disabled: true }) + }) + }, + example: (props) => ( + + ) + } +); diff --git a/packages/code-connect/components/PopOver/Popover.figma.tsx b/packages/code-connect/components/PopOver/Popover.figma.tsx new file mode 100644 index 00000000000..3149349b2a0 --- /dev/null +++ b/packages/code-connect/components/PopOver/Popover.figma.tsx @@ -0,0 +1,74 @@ +import figma from '@figma/code-connect'; +import { Popover } from '@patternfly/react-core'; +import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; +import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon'; +import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; +import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; +import BullhornIcon from '@patternfly/react-icons/dist/esm/icons/bullhorn-icon'; + +// TODO: DESIGN: Add buttons boolean to footerContent +// TODO: REACT: Add icon support +// Documentation for Popover can be found at https://www.patternfly.org/components/popover + +figma.connect( + Popover, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=5857-2066', + { + props: { + // hasFooter: figma.boolean('Has footer', {}), + bodyContent: figma.string('Popover description'), + headerContent: figma.string('Popover Heading'), + footerContent: figma.boolean('Has footer', { + true: 'Popover footer', + false: undefined + }), + headerIcon: figma.boolean('Show header icon', { + true: , + false: undefined + }), + status: figma.enum('Status', { + Default: { + state: undefined, + icon: undefined + }, + Success: { + state: 'success', + icon: + }, + Info: { + state: 'info', + icon: + }, + Warning: { + state: 'warning', + icon: + }, + Danger: { + state: 'danger', + icon: + } + }), + position: figma.enum('Position', { + 'Top-left': 'top-start', + 'Top-middle': 'top', + 'Top-right': 'top-end', + 'Bottom-left': 'bottom-start', + 'Bottom-middle': 'bottom', + 'Bottom-right': 'bottom-end' + }), + + children: figma.children('*') + }, + example: (props) => ( + + ) + } +); diff --git a/packages/code-connect/components/SimpleList/ListHeading.figma.tsx b/packages/code-connect/components/SimpleList/ListHeading.figma.tsx new file mode 100644 index 00000000000..a5eb0cf775d --- /dev/null +++ b/packages/code-connect/components/SimpleList/ListHeading.figma.tsx @@ -0,0 +1,21 @@ +import figma from '@figma/code-connect'; +import { SimpleListGroup } from '@patternfly/react-core'; + +// TODO: DESIGN: Create list group title component +// Documentation for ListHeading can be found at https://www.patternfly.org/components/simple-list + +figma.connect( + SimpleListGroup, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=4410-20689&m=dev', + { + props: { + listGroupTitle: 'List group title', + children: figma.children('*') + }, + example: (props) => ( + + {props.children} + + ) + } +); diff --git a/packages/code-connect/components/SimpleList/SimpleList.figma.tsx b/packages/code-connect/components/SimpleList/SimpleList.figma.tsx new file mode 100644 index 00000000000..7d1fac6a905 --- /dev/null +++ b/packages/code-connect/components/SimpleList/SimpleList.figma.tsx @@ -0,0 +1,15 @@ +import figma from '@figma/code-connect'; +import { SimpleList } from '@patternfly/react-core'; + +// Documentation for SimpleList can be found at https://www.patternfly.org/components/simple-list + +figma.connect( + SimpleList, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=4410-20691', + { + props: { + children: figma.children(['Simple list group', 'Simple list item']) + }, + example: (props) => {props.children} + } +); diff --git a/packages/code-connect/components/SimpleList/SimpleListGroup.figma.tsx b/packages/code-connect/components/SimpleList/SimpleListGroup.figma.tsx new file mode 100644 index 00000000000..7b9785e8f84 --- /dev/null +++ b/packages/code-connect/components/SimpleList/SimpleListGroup.figma.tsx @@ -0,0 +1,15 @@ +import figma from '@figma/code-connect'; +import { SimpleListGroup } from '@patternfly/react-core'; + +// Documentation for SimpleListGroup can be found at https://www.patternfly.org/components/simple-list + +figma.connect( + SimpleListGroup, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=4410-20708', + { + props: { + children: figma.children('*') + }, + example: (props) => {props.children} + } +); diff --git a/packages/code-connect/components/SimpleList/SimpleListItem.figma.tsx b/packages/code-connect/components/SimpleList/SimpleListItem.figma.tsx new file mode 100644 index 00000000000..55d60088f7b --- /dev/null +++ b/packages/code-connect/components/SimpleList/SimpleListItem.figma.tsx @@ -0,0 +1,41 @@ +import figma from '@figma/code-connect'; +import { SimpleListItem } from '@patternfly/react-core'; + +// TODO: DESIGN: Add support for SimpleListGroup +// Documentation for SimpleListItem can be found at https://www.patternfly.org/components/simple-list + +figma.connect( + SimpleListItem, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=4410-20664', + { + props: { + text: figma.string('Text'), + + // enum + isActive: figma.enum('State', { + 'Selected - Light': true, + 'Selected - Dark': true + }), + isLink: figma.enum('Type', { + Default: { + component: undefined, + href: undefined + }, + Link: { + component: 'a', + href: '#' + } + }) + }, + example: (props) => ( + + {props.text} + + ) + } +); diff --git a/packages/code-connect/components/Skeleton/Skeleton.figma.tsx b/packages/code-connect/components/Skeleton/Skeleton.figma.tsx new file mode 100644 index 00000000000..94775ef99dc --- /dev/null +++ b/packages/code-connect/components/Skeleton/Skeleton.figma.tsx @@ -0,0 +1,27 @@ +import figma from '@figma/code-connect'; +import { Skeleton } from '@patternfly/react-core'; + +// Documentation for Skeleton can be found at https://www.patternfly.org/components/skeleton + +figma.connect( + Skeleton, + 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=790-288', + { + props: { + size: figma.enum('Size', { + S: 'sm', + M: 'md', + L: 'lg', + XL: 'xl', + '2XL': '2xl', + '3XL': '3xl', + '4XL': '4xl' + }), + type: figma.enum('Type', { + Rectangle: 'square', + Circle: 'circle' + }) + }, + example: (props) => + } +);