Skip to content

Commit 30ad306

Browse files
author
Brijesh Bittu
committed
CI fixes
1 parent 555123a commit 30ad306

File tree

13 files changed

+28
-32
lines changed

13 files changed

+28
-32
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ pnpm-lock.yaml
3838
# If we want to format these files we'd need to do it in crowdin
3939
docs/**/*-pt.md
4040
docs/**/*-zh.md
41+
/tmpapps

.eslintrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ module.exports = {
197197

198198
'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
199199
'lines-around-directive': 'off',
200+
'react/prop-types': 'off',
200201
},
201202
overrides: [
202203
{
@@ -277,7 +278,7 @@ module.exports = {
277278
},
278279
// Next.js entry points pages
279280
{
280-
files: ['docs/pages/**/*.js'],
281+
files: ['docs/apps/**/*{.tsx,.ts,.js}'],
281282
rules: {
282283
'react/prop-types': 'off',
283284
},

docs/eslint.config.mjs

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { dirname } from "path";
2-
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
1+
import { dirname } from 'path';
2+
import { fileURLToPath } from 'url';
3+
import { FlatCompat } from '@eslint/eslintrc';
44

55
const __filename = fileURLToPath(import.meta.url);
66
const __dirname = dirname(__filename);
@@ -9,8 +9,6 @@ const compat = new FlatCompat({
99
baseDirectory: __dirname,
1010
});
1111

12-
const eslintConfig = [
13-
...compat.extends("next/core-web-vitals", "next/typescript"),
14-
];
12+
const eslintConfig = [...compat.extends('next/core-web-vitals', 'next/typescript')];
1513

1614
export default eslintConfig;

docs/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.0",
44
"private": true,
55
"scripts": {
6+
"clean": "rm -rf .next export",
67
"dev": "next dev",
78
"build": "next build",
89
"start": "pnpm dlx serve export",

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as React from 'react';
22
import type { Metadata, Viewport } from 'next/types';
3-
import { Main, Root } from './layout.pigment';
43
import { Header } from 'docs/src/components/Header';
54
import * as SideNav from 'docs/src/components/SideNav';
65
import { nav } from 'docs/src/nav';
6+
import { Main, Root } from './layout.pigment';
77

88
export default function Layout({ children }: React.PropsWithChildren) {
99
return (

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Metadata, Viewport } from 'next';
22
import Image from 'next/image';
33

4-
import { Root, Content, Heading, linkStyle, Caption } from './page.pigment';
54
import { Link } from 'docs/src/components/Link';
65
import { ArrowRightIcon } from 'docs/src/icons/ArrowRightIcon';
6+
import { Root, Content, Heading, linkStyle, Caption } from './page.pigment';
77

88
const description = 'A build-time CSS-in-JS styling engine';
99

docs/src/app/layout.pigment.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ export const bodyCls = css`
1515
min-width: 320px;
1616
line-height: 1.5;
1717
font-synthesis: none;
18-
-webkit-font-smoothing: antialiased;
1918
`;

docs/src/app/not-found.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Metadata } from 'next';
2-
import { Root, Content, Heading, linkStyle, Caption } from './(public)/page.pigment';
32
import { Link } from 'docs/src/components/Link';
3+
import { Root, Content, Heading, linkStyle, Caption } from './(public)/page.pigment';
44
import Layout from './(public)/layout';
55

66
export default function Notfound() {

docs/src/components/Header.pigment.ts

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export const headerButton = css`
8888
background-color: ${t('$color.gray.100')};
8989
}
9090
}
91+
9192
@media not (hover: hover) {
9293
&:active {
9394
background-color: ${t('$color.gray.100')};

docs/src/components/MobileNav.pigment.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ export const backdrop = css`
66
position: fixed;
77
inset: 0;
88
height: 100dvh;
9-
109
transition-duration: 600ms;
1110
transition-property: -webkit-backdrop-filter, backdrop-filter, opacity;
1211
transition-timing-function: ${t('$ease.out.fast')};
13-
-webkit-backdrop-filter: blur(1.5px);
1412
backdrop-filter: blur(1.5px);
1513
background-image: linear-gradient(to bottom, transparent 2rem, rgb(0 0 0 / 5%) 50%);
1614
@@ -20,8 +18,7 @@ export const backdrop = css`
2018
2119
&[data-starting-style],
2220
&[data-ending-style] {
23-
-webkit-backdrop-filter: blur(0px);
24-
backdrop-filter: blur(0px);
21+
backdrop-filter: blur(0);
2522
opacity: 0;
2623
}
2724
@@ -96,6 +93,7 @@ export const viewport = css(({ theme }) => ({
9693

9794
export const viewportInner = css`
9895
position: relative;
96+
9997
/* Prevent children's margin collapse */
10098
display: flex;
10199
flex-direction: column;
@@ -174,7 +172,6 @@ export const navClose = css`
174172
background-color: ${t('$color.gray.200')};
175173
176174
/* Blur the dividers behind */
177-
-webkit-backdrop-filter: blur(1rem);
178175
backdrop-filter: blur(1rem);
179176
180177
&:focus-visible {
@@ -228,6 +225,7 @@ export const navLink = css`
228225
display: flex;
229226
gap: 0.675rem;
230227
align-items: center;
228+
231229
/* @TODO - Fix the css processor so that you can use local css variables through t() */
232230
height: var(--mobileNavItemHeight);
233231
padding-inline: var(--mobileNavItemPaddingX);
@@ -244,7 +242,10 @@ export const navLink = css`
244242
}
245243
246244
@supports (-webkit-tap-highlight-color: black) {
245+
---var: 1;
246+
247247
/* Applying background-color on :active shows it when touching items while scrolling */
248+
248249
/* This activates only on real link taps */
249250
-webkit-tap-highlight-color: ${t('$color.gray.300')};
250251
}

docs/src/components/SideNav.pigment.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { t } from '@pigment-css/theme';
22
import { styled } from '@pigment-css/react-new';
33
import { ScrollArea } from '@base-ui-components/react/scroll-area';
44

5-
import { applyText } from '../utils/theme';
65
import Link from 'next/link';
6+
import { applyText } from '../utils/theme';
77

88
export const Root = styled.nav(({ theme }) => ({
99
$sideNavItemHeight: '2rem',
@@ -27,13 +27,12 @@ export const Root = styled.nav(({ theme }) => ({
2727

2828
export const ViewPort = styled(ScrollArea.Viewport)`
2929
max-height: 100vh;
30-
padding-top: 0.75rem;
31-
padding-bottom: 3rem;
32-
padding-left: 1.5rem;
33-
padding-right: calc(
34-
var(--sideNavScrollbarGapLeft) + var(--sideNavScrollbarWidth) / 2 +
35-
var(--sideNavScrollbarThumbWidth) / 2
36-
);
30+
padding: 0.75rem
31+
calc(
32+
var(--sideNavScrollbarGapLeft) + var(--sideNavScrollbarWidth) / 2 +
33+
var(--sideNavScrollbarThumbWidth) / 2
34+
)
35+
3rem 1.5rem;
3736
3837
/* Scroll containers are focusable */
3938
outline: 0;
@@ -45,6 +44,7 @@ export const ViewPort = styled(ScrollArea.Viewport)`
4544
position: absolute;
4645
outline: 2px solid ${t('$color.blue')};
4746
outline-offset: -2px;
47+
4848
/* Don't inset the outline on the right */
4949
right: -2px;
5050
}
@@ -57,7 +57,6 @@ export const ScrollBar = styled(ScrollArea.Scrollbar)`
5757
5858
/* Click target width */
5959
width: var(--sideNavScrollbarWidth);
60-
6160
opacity: 0;
6261
transition: opacity 200ms 500ms;
6362
@@ -79,6 +78,7 @@ export const ScrollBarThumb = styled(ScrollArea.Thumb)`
7978
content: '';
8079
display: block;
8180
height: 100%;
81+
8282
/* Visible thumb width */
8383
width: var(--sideNavScrollbarThumbWidth);
8484
border-radius: ${t('$radius.sm')};

packages/pigment-css-plugin/src/nextjs.ts

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export default function pigment(
2121
) {
2222
const { babelOptions = {}, asyncResolve, ...other } = pigmentConfig ?? {};
2323
if (process.env.TURBOPACK === '1') {
24-
// eslint-disable-next-line no-console
2524
console.warn(
2625
`\x1B[33m${process.env.PACKAGE_NAME}: Turbo mode is not supported yet. Please disable it by removing the "--turbo" flag from your "next dev" command to use Pigment CSS.\x1B[39m`,
2726
);
+1-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": [
4-
"src/**/*.tsx",
5-
"src/**/*.ts",
6-
"tests/**/*.spec.ts",
7-
"tests/**/*.spec.tsx"
8-
],
3+
"include": ["src/**/*.tsx", "src/**/*.ts", "tests/**/*.spec.ts", "tests/**/*.spec.tsx"],
94
"exclude": ["./tsup.config.ts"]
105
}

0 commit comments

Comments
 (0)