From 0a9fe85572b288c854c84f4539b3a2ab9dc7ecdd Mon Sep 17 00:00:00 2001 From: Andrej <44305048+aacevski@users.noreply.github.com> Date: Tue, 19 Mar 2024 14:00:32 +0100 Subject: [PATCH] [material-ui][Breadcrumbs] Convert to support CSS extraction (#41496) --- .../material-ui/react-breadcrumbs/page.tsx | 58 ++++++++++++++++++ .../pages/material-ui/react-breadcrumbs.tsx | 59 +++++++++++++++++++ .../src/Breadcrumbs/Breadcrumbs.js | 5 +- 3 files changed, 120 insertions(+), 2 deletions(-) create mode 100644 apps/pigment-css-next-app/src/app/material-ui/react-breadcrumbs/page.tsx create mode 100644 apps/pigment-css-vite-app/src/pages/material-ui/react-breadcrumbs.tsx diff --git a/apps/pigment-css-next-app/src/app/material-ui/react-breadcrumbs/page.tsx b/apps/pigment-css-next-app/src/app/material-ui/react-breadcrumbs/page.tsx new file mode 100644 index 00000000000000..2bc3ae9757a7a7 --- /dev/null +++ b/apps/pigment-css-next-app/src/app/material-ui/react-breadcrumbs/page.tsx @@ -0,0 +1,58 @@ +'use client'; +import * as React from 'react'; +import ActiveLastBreadcrumb from '../../../../../../docs/data/material/components/breadcrumbs/ActiveLastBreadcrumb'; +import BasicBreadcrumbs from '../../../../../../docs/data/material/components/breadcrumbs/BasicBreadcrumbs'; +import CollapsedBreadcrumbs from '../../../../../../docs/data/material/components/breadcrumbs/CollapsedBreadcrumbs'; +import CustomSeparator from '../../../../../../docs/data/material/components/breadcrumbs/CustomSeparator'; +import CustomizedBreadcrumbs from '../../../../../../docs/data/material/components/breadcrumbs/CustomizedBreadcrumbs'; +import IconBreadcrumbs from '../../../../../../docs/data/material/components/breadcrumbs/IconBreadcrumbs'; +import RouterBreadcrumbs from '../../../../../../docs/data/material/components/breadcrumbs/RouterBreadcrumbs'; + +export default function Breadcrumbs() { + return ( + +
+

Active Last Breadcrumb

+
+ +
+
+
+

Basic Breadcrumbs

+
+ +
+
+
+

Collapsed Breadcrumbs

+
+ +
+
+
+

Custom Separator

+
+ +
+
+
+

Customized Breadcrumbs

+
+ +
+
+
+

Icon Breadcrumbs

+
+ +
+
+
+

Router Breadcrumbs

+
+ +
+
+
+ ); +} diff --git a/apps/pigment-css-vite-app/src/pages/material-ui/react-breadcrumbs.tsx b/apps/pigment-css-vite-app/src/pages/material-ui/react-breadcrumbs.tsx new file mode 100644 index 00000000000000..45845fd495b0ba --- /dev/null +++ b/apps/pigment-css-vite-app/src/pages/material-ui/react-breadcrumbs.tsx @@ -0,0 +1,59 @@ +import * as React from 'react'; +import MaterialUILayout from '../../Layout'; +import ActiveLastBreadcrumb from '../../../../../docs/data/material/components/breadcrumbs/ActiveLastBreadcrumb.tsx'; +import BasicBreadcrumbs from '../../../../../docs/data/material/components/breadcrumbs/BasicBreadcrumbs.tsx'; +import CollapsedBreadcrumbs from '../../../../../docs/data/material/components/breadcrumbs/CollapsedBreadcrumbs.tsx'; +import CustomSeparator from '../../../../../docs/data/material/components/breadcrumbs/CustomSeparator.tsx'; +import CustomizedBreadcrumbs from '../../../../../docs/data/material/components/breadcrumbs/CustomizedBreadcrumbs.tsx'; +import IconBreadcrumbs from '../../../../../docs/data/material/components/breadcrumbs/IconBreadcrumbs.tsx'; +import RouterBreadcrumbs from '../../../../../docs/data/material/components/breadcrumbs/RouterBreadcrumbs.tsx'; + +export default function Breadcrumbs() { + return ( + +

Breadcrumbs

+
+

Active Last Breadcrumb

+
+ +
+
+
+

Basic Breadcrumbs

+
+ +
+
+
+

Collapsed Breadcrumbs

+
+ +
+
+
+

Custom Separator

+
+ +
+
+
+

Customized Breadcrumbs

+
+ +
+
+
+

Icon Breadcrumbs

+
+ +
+
+
+

Router Breadcrumbs

+
+ +
+
+
+ ); +} diff --git a/packages/mui-material/src/Breadcrumbs/Breadcrumbs.js b/packages/mui-material/src/Breadcrumbs/Breadcrumbs.js index 6d9ffc22b684d4..ae105db224e248 100644 --- a/packages/mui-material/src/Breadcrumbs/Breadcrumbs.js +++ b/packages/mui-material/src/Breadcrumbs/Breadcrumbs.js @@ -6,12 +6,13 @@ import clsx from 'clsx'; import integerPropType from '@mui/utils/integerPropType'; import { useSlotProps } from '@mui/base/utils'; import composeClasses from '@mui/utils/composeClasses'; -import styled from '../styles/styled'; -import useThemeProps from '../styles/useThemeProps'; +import { styled, createUseThemeProps } from '../zero-styled'; import Typography from '../Typography'; import BreadcrumbCollapsed from './BreadcrumbCollapsed'; import breadcrumbsClasses, { getBreadcrumbsUtilityClass } from './breadcrumbsClasses'; +const useThemeProps = createUseThemeProps('MuiBreadcrumbs'); + const useUtilityClasses = (ownerState) => { const { classes } = ownerState;