Skip to content

Commit 66ede39

Browse files
author
Brijesh Bittu
committed
Remove usage of @pigment-css/theme package in docs
1 parent 7663277 commit 66ede39

16 files changed

+30
-37
lines changed

docs/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@base-ui-components/react": "^1.0.0-alpha.6",
1515
"@mdx-js/mdx": "^3.1.0",
1616
"@pigment-css/react-new": "workspace:*",
17-
"@pigment-css/theme": "workspace:*",
1817
"@stefanprobst/rehype-extract-toc": "^2.2.1",
1918
"clipboard-copy": "4.0.1",
2019
"clsx": "^2.1.1",

docs/src/app/(public)/(content)/layout.pigment.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as React from 'react';
22
import type { Metadata, Viewport } from 'next/types';
3-
import { t } from '@pigment-css/theme';
4-
import { styled } from '@pigment-css/react-new';
3+
import { styled, t } from '@pigment-css/react-new';
54

65
import { Header } from 'docs/components/Header';
76
import * as SideNav from 'docs/components/SideNav';

docs/src/app/(public)/page.pigment.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Metadata, Viewport } from 'next';
22
import Image from 'next/image';
3-
import { t } from '@pigment-css/theme';
4-
import { css, styled } from '@pigment-css/react-new';
3+
import { css, styled, t } from '@pigment-css/react-new';
54

65
import { applyText, spacing } from 'docs/utils/theme';
76
import { Link } from 'docs/components/Link';

docs/src/app/layout.pigment.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import * as React from 'react';
66
import { Metadata, Viewport } from 'next';
77
import { Inter } from 'next/font/google';
88

9-
import { t } from '@pigment-css/theme';
10-
import { css } from '@pigment-css/react-new';
9+
import { css, t } from '@pigment-css/react-new';
1110

1211
import favicon from '~assets/favicon.ico';
1312
import faviconDev from '~assets/favicon-dev.ico';

docs/src/augment.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Theme as UserTheme } from './theme';
22

3-
declare module '@pigment-css/theme' {
3+
declare module '@pigment-css/react-new' {
44
export interface Theme extends UserTheme {}
55
}
66

docs/src/components/CodeBlock.pigment.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { t } from '@pigment-css/theme';
2-
import { css, styled } from '@pigment-css/react-new';
1+
import { css, styled, t } from '@pigment-css/react-new';
32
import { applyText } from 'docs/utils/theme';
43

54
export const Root = styled.figure({

docs/src/components/Header.pigment.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { t } from '@pigment-css/theme';
2-
import { css, styled } from '@pigment-css/react-new';
1+
import { css, styled, t } from '@pigment-css/react-new';
32

43
import { applyText, spacing } from 'docs/utils/theme';
54

docs/src/components/Link.pigment.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { t } from '@pigment-css/theme';
2-
import { css } from '@pigment-css/react-new';
1+
import { css, t } from '@pigment-css/react-new';
32

43
export const linkStyle = css`
54
color: ${t('$color.blue')};

docs/src/components/MobileNav.pigment.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { t } from '@pigment-css/theme';
2-
import { css } from '@pigment-css/react-new';
1+
import { css, t } from '@pigment-css/react-new';
32
import { applyText } from '../utils/theme';
43

54
export const backdrop = css`

docs/src/components/QuickNav.pigment.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { t } from '@pigment-css/theme';
2-
import { styled } from '@pigment-css/react-new';
1+
import { styled, t } from '@pigment-css/react-new';
32
import { applyText } from '../utils/theme';
43

54
export const Container = styled.div`

docs/src/components/SideNav.pigment.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { t } from '@pigment-css/theme';
2-
import { styled } from '@pigment-css/react-new';
1+
import { styled, t } from '@pigment-css/react-new';
32
import { ScrollArea } from '@base-ui-components/react/scroll-area';
43

54
import Link from 'next/link';

docs/src/mdx-components.pigment.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { t } from '@pigment-css/theme';
2-
import { styled } from '@pigment-css/react-new';
1+
import { styled, t } from '@pigment-css/react-new';
32

43
import * as CodeBlockBase from './components/CodeBlock';
54
import { Code as CodeBase } from './components/Code.pigment';
@@ -73,16 +72,23 @@ export const Li = styled.li(({ theme }) => ({
7372
marginBottom: spacing(theme, 0.5),
7473
}));
7574

76-
export const Ul = styled.ul(({ theme }) => ({
75+
export const List = styled.ul(({ theme }) => ({
7776
marginBottom: spacing(theme, 4),
7877
marginInlineStart: spacing(theme, 4.5),
7978
listStyleType: 'disc',
80-
}));
81-
82-
export const Ol = styled.ul(({ theme }) => ({
83-
marginBottom: spacing(theme, 4),
84-
marginInlineStart: spacing(theme, 7),
85-
listStyleType: 'decimal',
79+
variants: {
80+
variant: {
81+
ordered: {
82+
listStyleType: 'decimal',
83+
},
84+
unordered: {
85+
listStyleType: 'disc',
86+
},
87+
},
88+
},
89+
defaultVariants: {
90+
variant: 'unordered',
91+
},
8692
}));
8793

8894
export const Strong = styled.strong({

docs/src/mdx-components.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export const mdxComponents: MDXComponents = {
3434
h6: (props) => <Styled.Heading as="h6" lvl="other" {...props} />,
3535
p: (props) => <Styled.Paragraph {...props} />,
3636
li: (props) => <Styled.Li {...props} />,
37-
ul: (props) => <Styled.Ul {...props} />,
38-
ol: (props) => <Styled.Ol {...props} />,
37+
ul: (props) => <Styled.List {...props} />,
38+
ol: (props) => <Styled.List as="ol" variant="ordered" {...props} />,
3939
strong: (props) => <Styled.Strong {...props} />,
4040
figure: (props) => {
4141
if ('data-rehype-pretty-code-figure' in props) {

docs/src/nav.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export const nav: NavItem[] = [
3434
dirname: 'features',
3535
links: [
3636
{
37-
label: 'Styles',
38-
href: '/features/styles',
37+
label: 'Styling',
38+
href: '/features/styling',
3939
},
4040
{
4141
label: 'Theming',

docs/src/utils/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Theme } from '@pigment-css/theme';
1+
import type { Theme } from '@pigment-css/react-new';
22

33
export function applyText(theme: Theme, value: keyof Theme['text']) {
44
const val = theme.text[value];

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)