diff --git a/package.json b/package.json index 6959b9fb05..ee91a6b7ad 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@octokit/rest": "^19.0.7", - "@patternfly/patternfly": "^6.5.0-prerelease.33", + "@patternfly/patternfly": "^6.5.0-prerelease.37", "@patternfly/react-code-editor": "^6.5.0-prerelease.26", "@patternfly/react-core": "^6.5.0-prerelease.24", "@patternfly/react-table": "^6.5.0-prerelease.24", diff --git a/packages/documentation-framework/components/themeSelector/themeSelector.js b/packages/documentation-framework/components/themeSelector/themeSelector.js index c28ae4995d..1d86e86152 100644 --- a/packages/documentation-framework/components/themeSelector/themeSelector.js +++ b/packages/documentation-framework/components/themeSelector/themeSelector.js @@ -2,8 +2,6 @@ import React, { useState } from 'react'; import { Select, SelectGroup, - SelectList, - SelectOption, MenuToggle, MenuSearch, MenuSearchInput, @@ -11,12 +9,8 @@ import { ToggleGroupItem, Icon, Divider, - Spinner, - Label, - Popover, - Button + Spinner } from '@patternfly/react-core'; -import { HelpIcon, ExternalLinkAltIcon } from '@patternfly/react-icons'; import { useTheme, THEME_TYPES } from '../../hooks/useTheme'; const SunIcon = ( @@ -50,6 +44,14 @@ const DesktopIcon = ( ); +const ThemeVariantGroupLabel = () => { + return ( +
+ Theme +
+ ); +}; + const ColorSchemeGroupLabel = () => { return (
@@ -58,60 +60,34 @@ const ColorSchemeGroupLabel = () => { ); }; -const HighContrastGroupLabel = () => { - const [isPopoverOpen, setIsPopoverOpen] = useState(false); - +const ContrastModeGroupLabel = () => { return ( -
- High contrast{' '} - e.stopPropagation()} - headerContent={'Under development'} - headerComponent="h1" - bodyContent={ - 'We are still working to add high contrast support across all PatternFly components and extensions. This beta allows you to preview our progress.' - } - footerContent={ - - } - aria-label="More info about high contrast" - appendTo={() => document.body} - > - + + setIsDropdownOpen(false)} + onOpenChange={setIsDropdownOpen} + popperProps={{ position: 'right' }} + toggle={(toggleRef: RefObject) => ( + setIsDropdownOpen((prev) => !prev)} + icon={} + > + Username + + )} + > + + My profile + User management + Logout + + + diff --git a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsNotificationsDrawer.tsx b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsNotificationsDrawer.tsx deleted file mode 100644 index 1a19b0fde7..0000000000 --- a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsNotificationsDrawer.tsx +++ /dev/null @@ -1,175 +0,0 @@ -import { useRef, useState, FunctionComponent, RefObject } from 'react'; -import { - Button, - Divider, - Dropdown, - DropdownItem, - DropdownList, - EmptyState, - EmptyStateActions, - EmptyStateBody, - EmptyStateFooter, - EmptyStateVariant, - MenuToggle, - NotificationDrawer, - NotificationDrawerBody, - NotificationDrawerHeader, - NotificationDrawerList, - NotificationDrawerListItem, - NotificationDrawerListItemBody, - NotificationDrawerListItemHeader -} from '@patternfly/react-core'; -import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; -import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon'; -import { NotificationType } from './types'; - -interface ItemProps { - notification: NotificationType; - onRead: () => void; -} -const NotificationListItem: FunctionComponent = ({ notification, onRead }) => { - const [isActionsMenuOpen, setIsActionsMenuOpen] = useState(false); - - return ( - - - setIsActionsMenuOpen(false)} - isOpen={isActionsMenuOpen} - id={notification.id} - onOpenChange={setIsActionsMenuOpen} - popperProps={{ position: 'right' }} - toggle={(toggleRef: RefObject) => ( - setIsActionsMenuOpen((prev) => !prev)} - isExpanded={isActionsMenuOpen} - icon={} - /> - )} - > - - ev.preventDefault()} - > - Link - - Action - - - Disabled Link - - - - - {notification.message} - - ); -}; - -interface Props { - notifications: NotificationType[]; - updateNotifications: (updatedNotifications: NotificationType[]) => void; - onClose: () => void; -} - -export const AnimationsNotificationsDrawer: FunctionComponent = ({ - notifications, - updateNotifications, - onClose -}) => { - const [isActionsMenuOpen, setIsActionsMenuOpen] = useState(false); - const drawerRef = useRef(null); - - const unreadNotificationCount = notifications.filter((n) => !n.isRead).length; - - const markAllRead = () => { - updateNotifications(notifications.map((n) => ({ ...n, isRead: true }))); - }; - - return ( - - - setIsActionsMenuOpen(false)} - isOpen={isActionsMenuOpen} - id="notification-0" - onOpenChange={(isOpen: boolean) => !isOpen && setIsActionsMenuOpen(false)} - popperProps={{ position: 'right' }} - toggle={(toggleRef: RefObject) => ( - setIsActionsMenuOpen((prev) => !prev)} - isExpanded={isActionsMenuOpen} - icon={} - /> - )} - > - - - Mark all read - - updateNotifications([])}> - Clear all - - Settings - - - - - {notifications.length && ( - - {notifications.map((notification) => ( - { - updateNotifications( - notifications.reduce((acc, next) => { - if (next.id === notification.id) { - acc.push({ ...next, isRead: true }); - } else { - acc.push(next); - } - return acc; - }, []) - ); - }} - /> - ))} - - )} - {!notifications.length && ( - - - There are currently no alerts. There may be silenced critical alerts however. - - - - - - - - )} - - - ); -}; diff --git a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverview.tsx b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverview.tsx index 1466176058..cb3a4aaca5 100644 --- a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverview.tsx +++ b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverview.tsx @@ -18,8 +18,8 @@ import { PageSection, Title } from '@patternfly/react-core'; -import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon'; -import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; +import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-right-icon'; +import TimesIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-close-icon'; import MultiContentCard from '@patternfly/react-component-groups/dist/dynamic/MultiContentCard'; import AnimationsOverviewClusterInventory from './AnimationsOverviewClusterInventory'; import AnimationsOverviewNetworkActivity from './AnimationsOverviewNetworkActivity'; diff --git a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewCardStatus.tsx b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewCardStatus.tsx index b6b2ad95f0..4b26cea53d 100644 --- a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewCardStatus.tsx +++ b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewCardStatus.tsx @@ -1,7 +1,7 @@ import { FunctionComponent } from 'react'; import { Card, CardHeader, CardBody, Flex, FlexItem, Icon, Title, Grid, GridItem } from '@patternfly/react-core'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; -import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; +import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-icon'; +import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-check-circle-icon'; const AnimationsOverviewCardStatus: FunctionComponent = () => ( diff --git a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewClusterInventory.tsx b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewClusterInventory.tsx index e860be8da4..0dc1874b34 100644 --- a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewClusterInventory.tsx +++ b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewClusterInventory.tsx @@ -15,11 +15,11 @@ import { Icon } from '@patternfly/react-core'; -import ListIcon from '@patternfly/react-icons/dist/esm/icons/list-icon'; -import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; -import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon'; +import ListIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-list-icon'; +import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-icon'; +import CubesIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-cubes-icon'; import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon'; -import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon'; +import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-right-icon'; export const ClusterInventoryCard: React.FunctionComponent = () => { const [isKebabOpen, setIsKebabOpen] = useState(false); diff --git a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewEventsCard.tsx b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewEventsCard.tsx index 1e99e258fa..6a8624ebd6 100644 --- a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewEventsCard.tsx +++ b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewEventsCard.tsx @@ -21,8 +21,8 @@ import { Timestamp, Title } from '@patternfly/react-core'; -import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; +import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-check-circle-icon'; +import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-icon'; const AnimationsOverviewEventsCard: FunctionComponent = () => { const [isOpen, setIsOpen] = useState(false); diff --git a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewMemoryUtilization.tsx b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewMemoryUtilization.tsx index ed9da0988b..95b02b31b0 100644 --- a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewMemoryUtilization.tsx +++ b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewMemoryUtilization.tsx @@ -14,9 +14,9 @@ import { FlexItem } from '@patternfly/react-core'; import { ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-charts/dist/esm/victory/components'; -import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon'; -import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; -import TachometerAltIcon from '@patternfly/react-icons/dist/esm/icons/tachometer-alt-icon'; +import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-right-icon'; +import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-icon'; +import TachometerAltIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-speedometer-icon'; export const MemoryUtilizationCard: React.FunctionComponent = () => { const [isKebabOpen, setIsKebabOpen] = useState(false); @@ -100,7 +100,7 @@ export const MemoryUtilizationCard: React.FunctionComponent = () => { /> - + {/* { thresholds={[{ value: 60 }, { value: 90 }]} /> - + */} diff --git a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewNetworkActivity.tsx b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewNetworkActivity.tsx index 29c5f4ad61..507cd24b11 100644 --- a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewNetworkActivity.tsx +++ b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewNetworkActivity.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import { Card, CardHeader, CardTitle, CardBody, Dropdown, DropdownList, DropdownItem, MenuToggle, Flex } from '@patternfly/react-core'; -import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; -import NetworkIcon from '@patternfly/react-icons/dist/esm/icons/network-icon'; +import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-icon'; +import NetworkIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-network-icon'; import { Chart, diff --git a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewStorage.tsx b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewStorage.tsx index 3a59414257..0bfb18749b 100644 --- a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewStorage.tsx +++ b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/AnimationsOverviewStorage.tsx @@ -14,9 +14,9 @@ import { FlexItem } from '@patternfly/react-core'; import { ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-charts/dist/esm/victory/components'; -import StorageDomainIcon from '@patternfly/react-icons/dist/esm/icons/storage-domain-icon'; -import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon'; -import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; +import StorageDomainIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-storage-domain-icon'; +import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-right-icon'; +import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-icon'; export const StorageCard: React.FunctionComponent = () => { const [isKebabOpen, setIsKebabOpen] = useState(false); diff --git a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/examples/Animations.tsx b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/examples/Animations.tsx index e86497d17b..e813022d82 100644 --- a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/examples/Animations.tsx +++ b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/examples/Animations.tsx @@ -1,4 +1,4 @@ -import { useRef, useState, useEffect, FunctionComponent, FormEvent, useCallback } from 'react'; +import React, { useRef, useState, useEffect, FunctionComponent, FormEvent, Fragment } from 'react'; import { AlertGroup, Alert, @@ -12,12 +12,10 @@ import { CardHeader, CardTitle, ContentVariants, - debounce, EmptyState, EmptyStateActions, EmptyStateBody, EmptyStateFooter, - getResizeObserver, Label, Masthead, MastheadMain, @@ -44,32 +42,102 @@ import { Flex, ProgressStepper, ProgressStep, - Spinner + Spinner, + Modal, + Wizard, + WizardHeader, + WizardStep, + ToolbarContent, + ToolbarItem, + Toolbar, + DrawerContent, + DrawerContentBody, + Drawer, + DrawerActions, + DrawerCloseButton, + DrawerHead, + DrawerPanelBody, + DrawerPanelContent, + DrawerPanelDescription, + ModalVariant, + NotificationDrawer, + NotificationDrawerBody, + NotificationDrawerHeader, + NotificationDrawerList, + NotificationDrawerListItem, + NotificationDrawerListItemBody, + NotificationDrawerListItemHeader, + Accordion, + AccordionContent, + AccordionItem, + AccordionToggle, + Checkbox, + Gallery, + GalleryItem, + Pagination, + PaginationVariant, + Breadcrumb, + BreadcrumbItem, + PageBreadcrumb, + PageGroup } from '@patternfly/react-core'; -import { Table, Thead, Tbody, Tr, Th, Td, ExpandableRowContent } from '@patternfly/react-table'; +import { Table, Thead, Tbody, Tr, Th, Td, ExpandableRowContent, TableText } from '@patternfly/react-table'; +import { rows, columns } from '@patternfly/react-table/dist/esm/demos/sampleData'; import SkeletonTable from '@patternfly/react-component-groups/dist/dynamic/SkeletonTable'; -import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; -import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; -import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; -import ResourcesFullIcon from '@patternfly/react-icons/dist/esm/icons/resources-full-icon'; -import PortIcon from '@patternfly/react-icons/dist/esm/icons/port-icon'; + +import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-icon'; +import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-icon'; +import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-check-circle-icon'; +import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-warning-icon'; +import ResourcesFullIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-resources-full-icon'; +import PortIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-port-icon'; + // @ts-ignore -import pfLogo from '@patternfly/react-core/src/demos/assets/pf-logo.PF-HorizontalLogo-Color.svg'; +// import pfLogo from '@patternfly/patternfly-react/packages/react-core/src/components/assets/PF-HorizontalLogo-Color.svg'; + +const PfLogo: React.FunctionComponent = () => ( + + PatternFly + + + + + + + + + + + + + + + + + + + + + + + + + + +); + // @ts-ignore import openshiftLogo from '../Summit-collage-deploying-openshift-product-icon-RH.png'; // @ts-ignore import emptyStateLogo from '../Summit-collage-hybrid-cloud-dark-RH.png'; -import { Application, GuidedTourStep, NotificationType } from '../types'; +import { Application, NotificationType } from '../types'; import { AnimationsOverview } from '../AnimationsOverview'; -import { AnimationsNotificationsDrawer } from '../AnimationsNotificationsDrawer'; import { AnimationsCreateDatabaseForm } from '../AnimationsCreateDatabaseForm'; -import { GuidedTourProvider, useGuidedTour } from '../GuidedTourContext'; import { AnimationsHeaderToolbar } from '../AnimationsHeaderToolbar'; -import { AnimationsStartTourModal } from '../AnimationsStartTourModal'; -import { AnimationsEndTourModal } from '../AnimationsEndTourModal'; import { applicationsData } from './ResourceTableData'; +import { CodeEditor, Language } from '@patternfly/react-code-editor'; + // Simple component to wrap the empty state logo const EmptyStateLogoIcon: React.FunctionComponent = () => ( Empty state @@ -79,140 +147,324 @@ const mainContainerPageId = 'main-content-page-layout-default-nav'; const expandableColumns = ['Applications', 'Server', 'Branch', 'Status']; const initialExpandedServerNames = ['Cost Management']; // Default to expanded -export const GuidedTourSteps: GuidedTourStep[] = [ - { - stepId: 'toastNotifications', - header:
Alerts
, - content: '===== This content is customized ======' - }, - { - stepId: 'settingsButton', - position: 'bottom-end', - header:
Buttons: Settings
, - content: '===== This content is customized ======', - spotlightSelector: '#settings-button', - deskTopOnly: true - }, - { - stepId: 'settingsButton', - position: 'bottom-end', - header:
Buttons: Settings
, - content: '===== This content is customized ======', - spotlightSelector: '#settings-button', - mobileOnly: true - }, - { - stepId: 'navToggle', - header:
Buttons: Hamburger menu
, - content: '===== This content is customized ======', - spotlightSelector: '#nav-toggle' - }, - { - stepId: 'notificationBadge', - header:
Buttons: Notification badge
, - content: '===== This content is customized ======', - spotlightSelector: '#notification-badge' - }, - { - stepId: 'tabs', - header:
Tabs
, - position: 'top-start', - content: ( - - Click between the different tabs and watch how the active tab indicator smoothly slides to your selection, - providing clear feedback on your location. - - ), - spotlightSelector: '#tabs', - popoverWidth: '501px', - mobilePopoverWidth: '275px' - }, - { - stepId: 'skeletonLoader', - header:
Skeleton loader
, - position: 'top', - content: ( - <> - - Watch how the loading indicators animate to inform the user that there is processing going on behind the - scenes. - - - ), - spotlightSelector: '#skeleton-table' - }, - { - deskTopOnly: true, - stepId: 'expandableComponents', - header:
Expandable components
, - position: 'top-start', - content: ( - <> - Click to expand this hidden content section. - - Notice how the hidden information smoothly fades and slides into place. Click again to collapse it and see the - reverse animation. - - Reduced-motion users will only see the fade, not the sliding motion. - - ), - spotlightSelector: '#expand-toggle-1', - popoverWidth: '460px' - }, - { - mobileOnly: true, - stepId: 'expandableComponentsMobile', - header:
Expandable components
, - position: 'top-end', - content: ( - <> - Click to expand this hidden content section. - - Notice how the hidden information smoothly fades and slides into place. Click again to collapse it and see the - reverse animation. - - Reduced-motion users will only see the fade, not the sliding motion. - - ), - spotlightSelector: '#expand-toggle0' - }, - { - stepId: 'validationErrors', - header:
Validation errors
, - content: ( - <> - - Click Submit while fields are empty to trigger an error. Watch the input fields jiggle from - side to side, drawing your attention to issues that need fixing. - - Reduced-motion users will only see the fade, not the jiggle. - - ), - popoverWidth: '550px', - mobilePopoverWidth: '275px', - spotlightSelector: '#create-database-submit', - spotlightResizeSelector: '#create-database-form' - }, - { - stepId: 'progressStepper', - header:
In process indicator
, - content: ( - <> - Watch as a process starts for step 2. - - When a task is running, the in-process icon now spins in place, providing clear and continuous feedback that - the system is working. - - - ), - spotlightSelector: '#progress-stepper-1' - } -]; +export const AccordionSingleExpandBehavior: React.FunctionComponent = ({ children }) => { + const [expanded, setExpanded] = useState(undefined); + + const onToggle = (id: string) => { + if (id === expanded) { + setExpanded(undefined); + } else { + setExpanded(id); + } + }; + + return ( + + + { + onToggle('ex-toggle1'); + }} + id="ex-toggle1" + > + Item one + + +

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. +

+
+
+ + + { + onToggle('ex-toggle2'); + }} + id="ex-toggle2" + > + Item two + + +

+ Vivamus et tortor sed arcu congue vehicula eget et diam. Praesent nec dictum lorem. Aliquam id diam + ultrices, faucibus erat id, maximus nunc. +

+
+
+ + + { + onToggle('ex-toggle3'); + }} + id="ex-toggle3" + > + Item three + + +

Morbi vitae urna quis nunc convallis hendrerit. Aliquam congue orci quis ultricies tempus.

+
+
+ + + { + onToggle('ex-toggle4'); + }} + id="ex-toggle4" + > + Item four + + +

+ Donec vel posuere orci. Phasellus quis tortor a ex hendrerit efficitur. Aliquam lacinia ligula pharetra, + sagittis ex ut, pellentesque diam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere + cubilia Curae; Vestibulum ultricies nulla nibh. Etiam vel dui fermentum ligula ullamcorper eleifend non quis + tortor. Morbi tempus ornare tempus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur + ridiculus mus. Mauris et velit neque. Donec ultricies condimentum mauris, pellentesque imperdiet libero + convallis convallis. Aliquam erat volutpat. Donec rutrum semper tempus. Proin dictum imperdiet nibh, quis + dapibus nulla. Integer sed tincidunt lectus, sit amet auctor eros. +

+
+
+ + + { + onToggle('ex-toggle5'); + }} + id="ex-toggle5" + > + Item five + + +

Vivamus finibus dictum ex id ultrices. Mauris dictum neque a iaculis blandit.

+
+
+ {children && ( + { + onToggle('ex-toggle6'); + }} + id="ex-toggle6" + > + Nested accordion + + + {children} + + )} +
+ ); +}; + +export const CodeEditorBasic: React.FunctionComponent = () => { + const [isDarkTheme, setIsDarkTheme] = useState(false); + const [isLineNumbersVisible, setIsLineNumbersVisible] = useState(true); + const [isReadOnly, setIsReadOnly] = useState(false); + const [isMinimapVisible, setIsMinimapVisible] = useState(false); + + const toggleDarkTheme = (checked) => { + setIsDarkTheme(checked); + }; + + const toggleLineNumbers = (checked) => { + setIsLineNumbersVisible(checked); + }; + const toggleReadOnly = (checked) => { + setIsReadOnly(checked); + }; + const toggleMinimap = (checked) => { + setIsMinimapVisible(checked); + }; + + const onEditorDidMount = (editor, monaco) => { + editor.layout(); + editor.focus(); + monaco.editor.getModels()[0].updateOptions({ tabSize: 5 }); + }; + + const onChange = (value) => { + // eslint-disable-next-line no-console + console.log(value); + }; + + return ( + <> + toggleDarkTheme(checked)} + aria-label="dark theme checkbox" + id="toggle-theme" + name="toggle-theme" + /> + toggleLineNumbers(checked)} + aria-label="line numbers checkbox" + id="toggle-line-numbers" + name="toggle-line-numbers" + /> + toggleReadOnly(checked)} + aria-label="read only checkbox" + id="toggle-read-only" + name="toggle-read-only" + /> + toggleMinimap(checked)} + aria-label="display minimap checkbox" + id="toggle-minimap" + name="toggle-minimap" + /> + + + ); +}; + +export const PaginationSticky: React.FunctionComponent = () => { + const [page, setPage] = useState(1); + const [perPage, setPerPage] = useState(100); + const [isTopSticky, setIsTopSticky] = useState(false); + const itemCount = 523; + + const onToggleSticky = () => { + setIsTopSticky((prev) => !prev); + }; + + const onSetPage = (_event, newPage) => { + setPage(newPage); + }; + + const onPerPageSelect = ( + _event, + newPerPage, + newPage + ) => { + setPerPage(newPerPage); + setPage(newPage); + }; + + const buildCards = () => { + const numberOfCards = (page - 1) * perPage + perPage - 1 >= itemCount ? itemCount - (page - 1) * perPage : perPage; + + return Array.from({ length: numberOfCards }).map((_value, index) => ( + + + This is a card + + + )); + }; + + return isTopSticky ? ( + + + + + {buildCards()} + + ) : ( + + {buildCards()} + + + + + ); +}; + +export const TableStickyHeader: React.FunctionComponent = () => { + const renderLabel = (labelText: string) => { + switch (labelText) { + case 'Running': + return ; + case 'Stopped': + return ; + case 'Needs Maintenance': + return ; + case 'Down': + return ; + } + }; + + return ( + + + + + + + + + + + + + + + {rows.map((row) => ( + + + + + + + + + + + ))} + +
{columns[0]}{columns[1]}{columns[2]}{columns[3]}{columns[4]}{columns[5]}{columns[6]}{columns[7]}
{row.name}{row.threads}{row.applications}{row.workspaces}{renderLabel(row.status)}{row.location}{row.lastModified} + + {row.url} + +
+ ); +}; + const AnimationsPage: FunctionComponent = () => { - const drawerRef = useRef(null); + const drawerRef = useRef(null); const [isDrawerExpanded, setIsDrawerExpanded] = useState(false); - const [notifications, setNotifications] = useState([ + const [notifications, setNotifications] = useState([ { id: 'notification-1', title: 'Unread info notification title', @@ -237,7 +489,7 @@ const AnimationsPage: FunctionComponent = () => { }, { id: 'notification-3', - title: 'Read warning notification title', + title: 'Read warning notification title1!!!', message: 'This is a warning notification description.', variant: AlertVariant.warning, timeout: 3000, @@ -258,28 +510,15 @@ const AnimationsPage: FunctionComponent = () => { ]); const [selectedTab, setSelectedTab] = useState(0); const [showForm, setShowForm] = useState(false); - const [showStartTourModal, setShowStartTourModal] = useState(true); - const [showEndTourModal, setShowEndTourModal] = useState(false); - const [activeItem, setActiveItem] = useState(0); - const { onStart, onFinish, renderTourStepElement, setCustomStepContent, tourStep, isFinished } = useGuidedTour(); - const [windowWidth, setWindowWidth] = useState(1200); - const unObserver = useRef(null); - - const isMobile = windowWidth < 500; + const [showWizardModal, setShowWizardModal] = useState(false); + const [activeItem, setActiveItem] = useState('dashboard'); // HERE - const [openKebabIndex, setOpenKebabIndex] = useState(-1); + const [openKebabIndex, setOpenKebabIndex] = useState(-1); - interface Activity { - id: number; - name: string; - project: string; - // Each step is represented by its variant - progress: ('success' | 'info' | 'pending' | 'warning' | 'danger' | 'default')[]; - } // Data for the table rows - const activityData: Activity[] = [ + const activityData = [ { id: 1, name: 'my-pod-name', project: 'project-test', progress: ['success', 'success', 'success'] }, { id: 2, name: 'my-pod-name', project: 'project-test', progress: ['success', 'pending', 'default'] }, { id: 3, name: 'my-pod-name', project: 'project-test', progress: ['success', 'success', 'danger'] }, @@ -293,7 +532,7 @@ const AnimationsPage: FunctionComponent = () => { ]; // A function to create a kebab toggle for a specific row index - const kebabToggle = (index: number) => (toggleRef: React.Ref) => ( + const kebabToggle = (index) => (toggleRef) => ( { - {rowIndex === 1 ? ( - renderTourStepElement( - 'progressStepper', - - {activity.progress.map((stepVariant, stepIndex) => ( - - ))} - - ) - ) : ( - - {activity.progress.map((stepVariant, stepIndex) => ( - - ))} - - )} + + {activity.progress.map((stepVariant, stepIndex) => ( + + ))} + {
); - const addNotification = useCallback((showToast = true) => { - setNotifications((prev) => [ - { - id: `new-notification-${prev.length + 1}`, - title: 'Animated notification', - message: 'A system alert has been triggered. Please review the alert details.', - variant: AlertVariant.danger, - timeout: 3000, - timeoutAnimation: 3000, - isNew: showToast, - isRead: false - }, - ...prev - ]); - }, []); - - useEffect(() => { - if (tourStep?.stepId === 'toastNotifications') { - setCustomStepContent( - <> - - Click Add alert. In a moment, a new toast alert will appear. - - - - - - Notice how it slides smoothly into view to draw your eye to critical information, and then slides out just - as smoothly once it expires. - - - ); - } - if (tourStep?.stepId === 'settingsButton') { - setCustomStepContent( - <> - {!isMobile ? ( - - Hover over the settings button. The cog icon rotates to show that it’s interactive. - - ) : null} - - {isMobile ? - 'Click the settings button to see the cog icon rotate, as well as our new button ripple effect.' : - `Click it to see the new ripple effect we've added to all buttons.` - } - - - ); - } - if (tourStep?.stepId === 'navToggle') { - setCustomStepContent( - <> - {!isMobile ? ( - - Hover over the hamburger menu to see an arrow indicator appear. - - ) : null} - - {`Click the ${isMobile ? 'hamburger menu button' : 'button'} and watch the arrow's direction change as the menu opens and closes, - always showing you what will happen next.`} - - - ); - } - if (tourStep?.stepId === 'notificationBadge') { - setCustomStepContent( - <> - - Click Add notification. Watch for a new notification to arrive. - - - - - - The bell icon "rings" with a subtle rotation to quickly catch your attention as a message comes in. - - - ); - } - if (tourStep?.stepId === 'expandableComponents' || tourStep?.stepId === 'skeletonLoader') { - setSelectedTab(1); - } - if (tourStep?.stepId === 'validationErrors') { - setSelectedTab(2); - setShowForm(true); - } - if (tourStep?.stepId === 'progressStepper') { - setSelectedTab(0); - setTimeout(() => { - const element = document.getElementById('progress-stepper-1'); - if (element) { - element.scrollIntoView({ - behavior: 'smooth', // Smooth scrolling animation - block: 'center', // Align element to the center of the viewport - inline: 'nearest' // Horizontal alignment (optional) - }); - } - }, 100); - } - }, [tourStep?.stepId, setCustomStepContent, addNotification, isMobile]); - - useEffect(() => { - setShowEndTourModal(isFinished); - }, [isFinished]); - - const measureRef = (ref: HTMLDivElement) => { - // Remove any previous observer - if (unObserver.current) { - unObserver.current(); - } - - if (!ref) { - return; - } - - const handleResize = () => setWindowWidth(ref.clientWidth); - - // Set size on initialization - handleResize(); - - const debounceResize = debounce(handleResize, 100); - - // Update graph size on resize events - unObserver.current = getResizeObserver(ref, debounceResize); - }; - - useEffect( - () => () => { - if (unObserver.current) { - unObserver.current(); - } - }, - [] - ); - const onNavSelect = ( _event: FormEvent, selectedItem: { @@ -573,41 +655,34 @@ const AnimationsPage: FunctionComponent = () => { firstTabbableItem?.focus(); }; - const closeStartTourModal = (startTour = false) => { - setShowStartTourModal(false); - if (startTour) { - onStart(); - } else { - setNotifications((prev) => [ - { - id: `new-notification-${prev.length + 1}`, - title: 'Explore animations', - message: 'When you’re ready to take a tour of PatternFly’s exciting, new animations, refresh this page.', - variant: AlertVariant.info, - timeout: 8000, - timeoutAnimation: 8000, - isNew: true, - isRead: false - }, - ...prev - ]); - } + const [isUnreadMap, setIsUnreadMap] = useState(() => { + const map = {}; + notifications.forEach((n) => { + map[n.id] = !n.isRead; + }); + return map; + }); + + const onNotificationClick = (id: string) => { + setIsUnreadMap({ ...isUnreadMap, [id]: false }); + }; + + const getNumberUnread = () => { + return Object.values(isUnreadMap).reduce((count, value) => count + (value ? 1 : 0), 0); }; + return ( - {renderTourStepElement( - 'navToggle', - - )} + - + @@ -616,8 +691,8 @@ const AnimationsPage: FunctionComponent = () => { notifications={notifications} isDrawerExpanded={isDrawerExpanded} setIsDrawerExpanded={setIsDrawerExpanded} - onStartGuidedTour={() => setShowStartTourModal(true)} - onEndGuidedTour={() => onFinish()} + setShowWizardModal={setShowWizardModal} + showWizardModal={showWizardModal} /> @@ -636,6 +711,51 @@ const AnimationsPage: FunctionComponent = () => { > Dashboard + + Nav Item 1 + + + Nav Item 2 + + + Nav Item 3 + + + Nav Item 4 + + + Nav Item 5 + @@ -643,11 +763,69 @@ const AnimationsPage: FunctionComponent = () => { } isManagedSidebar notificationDrawer={ - setIsDrawerExpanded(false)} - /> + + setIsDrawerExpanded(false)} /> + + + onNotificationClick('notification-1')} + isRead={!isUnreadMap['notification-1']} + > + + + This is an info notification description. + + + onNotificationClick('notification-2')} + isRead={!isUnreadMap['notification-2']} + > + + + This is a danger notification description. This is a long description to show how the title will wrap if it is long and wraps to multiple lines. + + + onNotificationClick('notification-3')} + isRead={!isUnreadMap['notification-3']} + > + + + This is a warning notification description. + + + onNotificationClick('notification-4')} + isRead={!isUnreadMap['notification-4']} + > + + + This is a success notification description. + + + + + } onNotificationDrawerExpand={(event) => focusDrawer(event)} isNotificationDrawerExpanded={isDrawerExpanded} @@ -668,20 +846,7 @@ const AnimationsPage: FunctionComponent = () => { } mainContainerId={mainContainerPageId} > -
- {renderTourStepElement( - 'toastNotifications', -
- )} {notifications .filter((n) => n.isNew) .map((alert) => ( @@ -703,7 +868,7 @@ const AnimationsPage: FunctionComponent = () => { }, []) ); }} - actionClose={ {}} />} + actionClose={ { }} />} > {alert.message} @@ -711,19 +876,19 @@ const AnimationsPage: FunctionComponent = () => { ))} Dashboard Everything you need to know about your application - {renderTourStepElement( - 'tabs', - setSelectedTab(Number(key))} - aria-label="Primary tabs" - > - Overview} tabContentId="overview" /> - Resources} tabContentId="resources" /> - Database} tabContentId="database" /> - - )} + setSelectedTab(Number(key))} + aria-label="Primary tabs" + > + Overview} tabContentId="overview" /> + Resources} tabContentId="resources" /> + Database} tabContentId="database" /> + Other components} tabContentId="other-components" /> + Pagination} tabContentId="pagination" /> + Sticky header table} tabContentId="table" /> + {selectedTab === 0 && ( @@ -753,8 +918,74 @@ const AnimationsPage: FunctionComponent = () => { )} )} - {showStartTourModal ? : null} - {showEndTourModal ? : null} + {selectedTab === 3 && ( + <> + + + + + + + + )} + {selectedTab === 4 && ( + <> + + + + Section home + Section title + Section title + + Section landing + + + + + +

Main title

+

This is a full page demo.

+
+
{' '} +
+ + + + + )} + {selectedTab === 5 && ( + + + + )} + + setShowWizardModal(false)} + header={ + setShowWizardModal(false)} + /> + } + > + + Step 1 content + + + Step 2 content + + + Review step content + + + ); }; @@ -765,7 +996,6 @@ const AnimationsResourcesTable: FunctionComponent = () => { const [collapseAllAriaLabel, setCollapseAllAriaLabel] = useState('Expand all'); const [expandedAppNames, setExpandedAppNames] = useState(initialExpandedServerNames); const [loading, setLoading] = useState(true); - const { tourStep, renderTourStepElement } = useGuidedTour(); useEffect(() => { const timer = setTimeout(() => setLoading(false), 2000); @@ -775,7 +1005,7 @@ const AnimationsResourcesTable: FunctionComponent = () => { clearTimeout(timer); } }; - }, [loading, tourStep?.stepId]); + }, [loading]); useEffect(() => { const allExpanded = expandedAppNames.length === applicationsData.length; @@ -794,103 +1024,102 @@ const AnimationsResourcesTable: FunctionComponent = () => { setExpandedAppNames(isOpen ? applicationsData.map((app) => app.name) : []); }; + const [showDrawer, setShowDrawer] = useState(false); + + const panelContent = ( + + + + Drawer panel header + + + setShowDrawer(false)} /> + + + Drawer panel description + Drawer panel body + + ); + + const drawerContent = ( + + + + ))} + + + + {applicationsData.map((app, idx) => ( + + + + + + + + + + + + ))} +
+ {expandableColumns.map((column) => ( + + {column} +
setAppExpanded(app, !isAppExpanded(app)) + } + : undefined + } + /> + {app.name}{app.header}{app.branch} + {app.status === 'Running' && } + {app.status === 'Degraded' && } + {app.status === 'Stopped' && } + {app.status !== 'Running' && app.status !== 'Degraded' && app.status !== 'Stopped' && app.status} +
+ + {app.details} +
) + return ( - - {loading || tourStep?.stepId === 'skeletonLoader' ? ( - <> - {renderTourStepElement( - 'skeletonLoader', - ({ cell: col, props: { name: col, 'aria-label': col } })) - ]} - rows={8} - /> - )} - + <> + + + + + + {loading ? ( + ({ cell: col, props: { name: col, 'aria-label': col } })) + ]} + rows={8} + /> ) : ( - renderTourStepElement( - 'expandableComponents', - - - - - ))} - - - - {applicationsData.map((app, idx) => ( - - - {idx === 0 ? ( - renderTourStepElement( - 'expandableComponentsMobile', - - - - - - - - - - ))} -
- {expandableColumns.map((column) => ( - - {column} -
setAppExpanded(app, !isAppExpanded(app)) - } - : undefined - } - /> - ) - ) : ( - setAppExpanded(app, !isAppExpanded(app)) - } - : undefined - } - /> - )} - {app.name}{app.header}{app.branch} - {app.status === 'Running' && } - {app.status === 'Degraded' && } - {app.status === 'Stopped' && } - {app.status !== 'Running' && app.status !== 'Degraded' && app.status !== 'Stopped' && app.status} -
- - {app.details} -
- ) + + + {drawerContent} + + )} -
+ ); }; -export const Animations: FunctionComponent = () => ( - - - -); +export const Animations: FunctionComponent = () => ; diff --git a/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/examples/glass.css b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/examples/glass.css new file mode 100644 index 0000000000..dc483b4427 --- /dev/null +++ b/packages/documentation-site/patternfly-docs/content/foundations-and-styles/styles/motion/Animations/examples/glass.css @@ -0,0 +1,226 @@ +body { + background: var(--bg, url('../../../../../../images/glass2-light.png')) no-repeat center center / cover; +} + +:root:where(.pf-v6-theme-glass.pf-v6-theme-dark) { + --bg: url('../../../../../../images/glass2-dark.png'); +} + +:root { + --pf-t--global--background--color--glass--sticky--default: var(--pf-t--global--background--color--100); +} + +:root:where(.pf-v6-theme-dark) { + --pf-t--global--background--color--glass--sticky--default: var(--pf-t--global--dark--background--color--200); +} + +:root:where(.pf-v6-theme-glass) { + /* --pf-t--global--background--color--glass--primary--default: blue; */ + --pf-t--global--background--color--glass--floating--default: var(--pf-t--global--background--color--floating--default); + /* --pf-t--global--background--color--glass--sticky--default: var(--pf-t--global--background--color--200); */ + /* --pf-t--global--background--color--glass--primary: blue; */ + /* --pf-t--global--background--color--glass--floating: blue; */ + /* --pf-t--global--background--opacity--glass--primary: 70%; */ + /* --pf-t--global--background--opacity--glass--floating: 10%; */ + /* --pf-t--global--background--filter--glass--blur--primary: blur(0px); */ + /* --pf-t--global--background--filter--glass--blur--floating: blur(0px); */ +} + +:root:where(.pf-v6-theme-glass.pf-v6-theme-dark) { + /* --pf-t--global--background--color--glass--primary--default: blue; */ + /* --pf-t--global--background--color--glass--floating--default: red; */ + /* --pf-t--global--background--color--glass--sticky--default: var(--pf-t--global--dark--background--color--200); */ + /* --pf-t--global--background--color--glass--primary: green; */ + /* --pf-t--global--background--color--glass--floating: green; */ + /* --pf-t--global--background--opacity--glass--primary: 30%; */ + /* --pf-t--global--background--opacity--glass--floating: 10%; */ + /* --pf-t--global--background--filter--glass--blur--primary: blur(0px); */ + /* --pf-t--global--background--filter--glass--blur--floating: blur(0px); */ +} + +:root:where(.pf-v6-theme-glass) { + .pf-m-glass + { + background-color: var(--pf-t--global--background--color--glass--primary--default) !important; + backdrop-filter: var(--pf-t--global--background--filter--glass--blur--primary) !important; + border: var(--pf-t--global--border--width--box--default) solid var(--pf-t--global--border--color--alt) !important; + } + + .pf-m-glass-floating + { + background-color: var(--pf-t--global--background--color--glass--floating--default) !important; + backdrop-filter: var(--pf-t--global--background--filter--glass--blur--floating) !important; + border: var(--pf-t--global--border--width--box--default) solid var(--pf-t--global--border--color--alt) !important; + } + + .pf-m-plain + { + background-color: transparent !important; + border: none !important; + } + + /* glass components */ + .pf-v6-c-page__main-container::before, + /* .pf-v6-c-nav__link.pf-m-current, */ + /* .pf-v6-c-nav, */ + /* .pf-v6-c-page__sidebar, */ + .pf-v6-c-masthead, + .pf-v6-c-page__sidebar-body + /* .pf-v6-c-page__main-section, */ + { + background-color: var(--pf-t--global--background--color--glass--primary--default) !important; + backdrop-filter: var(--pf-t--global--background--filter--glass--blur--primary) !important; + border: var(--pf-t--global--border--width--box--default) solid var(--pf-t--global--border--color--alt) !important; + border-radius: var(--pf-t--global--border--radius--medium) !important; + overflow: hidden !important; + box-shadow: var(--pf-t--global--box-shadow--sm) !important; + } + + .pf-v6-c-nav__link.pf-m-current { + background-color: var(--pf-t--global--background--color--action--plain--clicked) !important; + } + + .pf-v6-c-page__main-container { + position: relative; + } + .pf-v6-c-page__main-container::before { + content: ''; + position: absolute; + inset: 0; + z-index: -1; + } + + /* floating class components */ + .pf-v6-c-drawer__panel, + .pf-v6-c-popover__content, + .pf-v6-c-popover__arrow, + .pf-v6-c-modal-box, + .pf-v6-c-menu { + background-color: var(--pf-t--global--background--color--glass--floating--default) !important; + backdrop-filter: var(--pf-t--global--background--filter--glass--blur--floating) !important; + } + + /* plain components */ + .pf-v6-c-page, + /* .pf-v6-c-masthead, */ + .pf-v6-c-page__sidebar, + .pf-v6-c-page__main-section, + .pf-v6-c-page__main-breadcrumb, + .pf-v6-c-notification-drawer, + .pf-v6-c-notification-drawer__header, + .pf-v6-c-data-list__item, + .pf-v6-c-table, + .pf-v6-c-nav, + .pf-v6-c-accordion, + .pf-v6-c-accordion__item::before, + .pf-v6-c-accordion__expandable-content, + .pf-v6-c-wizard__outer-wrap, + .pf-v6-c-wizard__footer, + .pf-v6-c-table__expandable-row-content, + .pf-v6-c-page__main-container + { + background-color: transparent !important; + border: none !important; + } + + /* no background */ + .pf-v6-c-wizard__nav, + .pf-v6-c-wizard__header + { + background: transparent !important; + } + + .pf-v6-c-masthead { + border-radius: 0 !important; + margin-bottom: var(--pf-t--global--spacer--gutter--default); + } + + .pf-v6-c-page__sidebar-body { + margin: 0 var(--pf-t--global--spacer--gutter--default) 0 var(--pf-t--global--spacer--inset--page-chrome); + } + + /* .pf-v6-c-card:not(.pf-m-plain) { + background-color: var(--pf-t--global--background--color--glass--primary--default) !important; + backdrop-filter: var(--pf-t--global--background--filter--glass--blur--primary) !important; + } */ + .pf-v6-c-accordion__toggle:is(:hover, :focus, .pf-m-expanded) { + --pf-v6-c-accordion__toggle--BackgroundColor: var(--pf-t--global--background--color--action--plain--clicked); + --pf-v6-c-accordion__toggle--BorderWidth: var(--pf-v6-c-accordion__toggle--hover--BorderWidth); + } +} + +/* page sections/gropus sticky */ +.pf-m-sticky-top { + container-type: scroll-state; + position: sticky; + top: 0px; + + > *[class*="pf-v6-c-page__main"] { + @container scroll-state(stuck: top) { + background: var(--pf-t--global--background--color--glass--sticky--default) !important; + } + } + > *[class*="pf-v6-c-page__main"]:last-child { + @container scroll-state(stuck: top) { + box-shadow: var(--pf-t--global--box-shadow--md--bottom) !important; + } + } + +} + +.pf-v6-c-page__main-group.pf-m-sticky-top { + box-shadow: none !important; +} + +[class*="pf-v6-c-page__main"] { + transition: background-color var(--pf-t--global--motion--duration--fade--short); +} + +.pf-v6-c-table__thead { + position: sticky; + top: var(--pf-t--global--spacer--sm); + z-index: var(--pf-t--global--z-index--xs); + background: transparent !important; +} + +.pf-v6-c-table__thead::before { + transition: all var(--pf-t--global--motion--duration--fade--short); +} + +.pf-v6-c-table.pf-m-sticky-header > .pf-v6-c-table__thead::before, .pf-v6-c-table .pf-v6-c-table__thead.pf-m-nested-column-header { + position: sticky; + inset-block-start: 0; + z-index: var(--pf-v6-c-table--m-sticky-header--ZIndex); + background: transparent; + border-radius: var(--pf-t--global--border--radius--medium); + /* overflow: hidden; */ + border: 0 !important; +} + + +.pf-v6-c-table.pf-m-sticky-header > .pf-v6-c-table__thead::before, .pf-v6-c-table .pf-v6-c-table__thead.pf-m-nested-column-header::before { + position: absolute; + inset-block-start: 0; + inset-block-end: 0; + inset-inline-start: 0; + inset-inline-end: 0; + /* z-index: var(--pf-v6-c-table--m-sticky-header--border--ZIndex); */ + pointer-events: none; + content: ""; + border-block-end: var(--pf-v6-c-table--border-width--base) solid var(--pf-v6-c-table--BorderColor); + z-index: -1; +} + +.pf-v6-c-table__thead { + background: transparent !important; + container-type: scroll-state; + position: sticky; + top: var(--pf-t--global--spacer--sm) !important; + + &::before { + @container scroll-state(stuck: top) { + background: var(--pf-t--global--background--color--glass--sticky--default) !important; + box-shadow: var(--pf-t--global--box-shadow--md); + } + } +} \ No newline at end of file diff --git a/packages/documentation-site/patternfly-docs/custom-org.css b/packages/documentation-site/patternfly-docs/custom-org.css new file mode 100644 index 0000000000..b0ec8090c7 --- /dev/null +++ b/packages/documentation-site/patternfly-docs/custom-org.css @@ -0,0 +1 @@ +/* custom global org styles */ diff --git a/packages/documentation-site/patternfly-docs/images/compass--wallpaper-dark.png b/packages/documentation-site/patternfly-docs/images/compass--wallpaper-dark.png new file mode 100644 index 0000000000..14109c3f2c Binary files /dev/null and b/packages/documentation-site/patternfly-docs/images/compass--wallpaper-dark.png differ diff --git a/packages/documentation-site/patternfly-docs/images/compass--wallpaper-light.png b/packages/documentation-site/patternfly-docs/images/compass--wallpaper-light.png new file mode 100644 index 0000000000..9a76b0f646 Binary files /dev/null and b/packages/documentation-site/patternfly-docs/images/compass--wallpaper-light.png differ diff --git a/packages/documentation-site/patternfly-docs/images/glass1-dark.png b/packages/documentation-site/patternfly-docs/images/glass1-dark.png new file mode 100644 index 0000000000..da14c2d2b0 Binary files /dev/null and b/packages/documentation-site/patternfly-docs/images/glass1-dark.png differ diff --git a/packages/documentation-site/patternfly-docs/images/glass1-light.png b/packages/documentation-site/patternfly-docs/images/glass1-light.png new file mode 100644 index 0000000000..27dcc73d95 Binary files /dev/null and b/packages/documentation-site/patternfly-docs/images/glass1-light.png differ diff --git a/packages/documentation-site/patternfly-docs/images/glass2-dark.png b/packages/documentation-site/patternfly-docs/images/glass2-dark.png new file mode 100644 index 0000000000..cdbec18efc Binary files /dev/null and b/packages/documentation-site/patternfly-docs/images/glass2-dark.png differ diff --git a/packages/documentation-site/patternfly-docs/images/glass2-light.png b/packages/documentation-site/patternfly-docs/images/glass2-light.png new file mode 100644 index 0000000000..c0aa11db3f Binary files /dev/null and b/packages/documentation-site/patternfly-docs/images/glass2-light.png differ diff --git a/packages/documentation-site/patternfly-docs/patternfly-docs.css.js b/packages/documentation-site/patternfly-docs/patternfly-docs.css.js index 0e58f3b13a..41ac2eb043 100644 --- a/packages/documentation-site/patternfly-docs/patternfly-docs.css.js +++ b/packages/documentation-site/patternfly-docs/patternfly-docs.css.js @@ -4,6 +4,7 @@ import '@patternfly/react-styles/src/css/layouts/Toolbar/toolbar.css'; // Patternfly import '@patternfly/patternfly/patternfly.css'; +import './content/foundations-and-styles/styles/motion/Animations/examples/glass.css'; // Patternfly utilities import '@patternfly/patternfly/patternfly-addons.css'; // Global theme CSS diff --git a/yarn.lock b/yarn.lock index b6a51aa877..7b2d5c108e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4871,7 +4871,7 @@ __metadata: languageName: node linkType: hard -"@patternfly/patternfly@npm:6.5.0-prerelease.33, @patternfly/patternfly@npm:^6.5.0-prerelease.33": +"@patternfly/patternfly@npm:6.5.0-prerelease.33": version: 6.5.0-prerelease.33 resolution: "@patternfly/patternfly@npm:6.5.0-prerelease.33" checksum: 10c0/d3714f12545a4784dd26abc4e60e979ba40b1a551027c6df1888a6839fa4fdc078c2370f049a326fb5fbd330075107ac36fb393bf40fa4b9fdbe4b4f8777ad81 @@ -4885,6 +4885,13 @@ __metadata: languageName: node linkType: hard +"@patternfly/patternfly@npm:^6.5.0-prerelease.37": + version: 6.5.0-prerelease.37 + resolution: "@patternfly/patternfly@npm:6.5.0-prerelease.37" + checksum: 10c0/73907ee81c42ba5257636d6a29034b68143305e8fba02cccb3308ed767d2c510ffd5c0e78082cc2f29cf29c0bda37ea80befd614cd62a2d08abd7a1d11ce0ddd + languageName: node + linkType: hard + "@patternfly/quickstarts@npm:6.4.0, @patternfly/quickstarts@npm:^6.0.0": version: 6.4.0 resolution: "@patternfly/quickstarts@npm:6.4.0" @@ -5143,13 +5150,13 @@ __metadata: languageName: node linkType: hard -"@patternfly/react-icons@npm:6.5.0-prerelease.11, @patternfly/react-icons@npm:^6.5.0-prerelease.11": - version: 6.5.0-prerelease.11 - resolution: "@patternfly/react-icons@npm:6.5.0-prerelease.11" +"@patternfly/react-icons@npm:6.5.0-prerelease.12": + version: 6.5.0-prerelease.12 + resolution: "@patternfly/react-icons@npm:6.5.0-prerelease.12" peerDependencies: react: ^17 || ^18 || ^19 react-dom: ^17 || ^18 || ^19 - checksum: 10c0/d0d91d9e011747dde34a0d3521cd92d58ff29281f6fb1e442c72cf0ea1ca8b3a69e270497e0644ffa499601484394bc9fdf12b070f8568114a7fcfed0428a8c8 + checksum: 10c0/c636f014b5274eb2aa1752270036105991ab56a011c85ffcdeae7dd2481ce1f25cc57039d20d6d368d5df9170fc51a040c546f1929c8cc5ebc631b4111e5f005 languageName: node linkType: hard @@ -5173,6 +5180,16 @@ __metadata: languageName: node linkType: hard +"@patternfly/react-icons@npm:^6.5.0-prerelease.11": + version: 6.5.0-prerelease.13 + resolution: "@patternfly/react-icons@npm:6.5.0-prerelease.13" + peerDependencies: + react: ^17 || ^18 || ^19 + react-dom: ^17 || ^18 || ^19 + checksum: 10c0/518809f6d0deedb8079fbbaa3e503ccdfdfdd076bab6f3ad94575eb09d10b283ddbe921de0a58079580431d0a638e68878648873fc02a9be517b4fec4c06290b + languageName: node + linkType: hard + "@patternfly/react-log-viewer@npm:6.3.0": version: 6.3.0 resolution: "@patternfly/react-log-viewer@npm:6.3.0" @@ -18934,7 +18951,7 @@ __metadata: resolution: "patternfly-org-workspace@workspace:." dependencies: "@octokit/rest": "npm:^19.0.7" - "@patternfly/patternfly": "npm:^6.5.0-prerelease.33" + "@patternfly/patternfly": "npm:^6.5.0-prerelease.37" "@patternfly/react-code-editor": "npm:^6.5.0-prerelease.26" "@patternfly/react-core": "npm:^6.5.0-prerelease.24" "@patternfly/react-table": "npm:^6.5.0-prerelease.24" @@ -18962,7 +18979,7 @@ __metadata: "@patternfly/react-console": "npm:6.1.0" "@patternfly/react-data-view": "npm:6.4.0-prerelease.8" "@patternfly/react-docs": "npm:7.5.0-prerelease.26" - "@patternfly/react-icons": "npm:6.5.0-prerelease.11" + "@patternfly/react-icons": "npm:6.5.0-prerelease.12" "@patternfly/react-log-viewer": "npm:6.3.0" "@patternfly/react-topology": "npm:6.5.0-prerelease.3" "@patternfly/react-user-feedback": "npm:6.2.0"