diff --git a/.npmrc b/.npmrc index c5d55064..29d9d396 100644 --- a/.npmrc +++ b/.npmrc @@ -1,5 +1,6 @@ auto-install-peers = true +enable-pre-post-scripts=true # Enable pre/post scripts (for postui:add) public-hoist-pattern[]=*prisma* public-hoist-pattern[]=*eslint-plugin-* public-hoist-pattern[]=@typescript-eslint/eslint-plugin -public-hoist-pattern[]=next* +public-hoist-pattern[]=next* \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 2a53482f..7dd2bb6c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,4 +8,8 @@ themes/papirus/src/templates.cjs apps/**/*.css packages/**/*.css README.md -.turbo/* \ No newline at end of file +.turbo/* +**/tsconfig.json +packages/jsonresume-theme-standard/package.json +packages/ui/src/components/ui/button.tsx +packages/ui/src/components/ui/card.tsx \ No newline at end of file diff --git a/apps/homepage2/.eslintrc.js b/apps/homepage2/.eslintrc.js index 17b35165..8e4be1f0 100644 --- a/apps/homepage2/.eslintrc.js +++ b/apps/homepage2/.eslintrc.js @@ -1,11 +1,18 @@ +/* eslint-disable */ + module.exports = { - extends: ['custom', 'next'], + root: true, + extends: ['@repo/eslint-config-custom'], + parser: '@typescript-eslint/parser', rules: { '@next/next/no-html-link-for-pages': 'off', + '@next/next/no-sync-scripts': 'off', }, env: { browser: true, es2021: true, jquery: true, + commonjs: true, + node: true, }, }; diff --git a/apps/homepage2/package.json b/apps/homepage2/package.json index 9448c54a..2981faf1 100644 --- a/apps/homepage2/package.json +++ b/apps/homepage2/package.json @@ -14,7 +14,7 @@ "@faker-js/faker": "^8.0.2", "@jsonresume/theme-papirus": "workspace:*", "@jsonresume/theme-stackoverflow": "workspace:*", - "@jsonresume/ui": "workspace:*", + "@repo/ui": "workspace:*", "@pinecone-database/pinecone": "^0.1.6", "@prisma/client": "^4.15.0", "@supabase/supabase-js": "^2.39.6", @@ -57,7 +57,7 @@ "@types/node": "^20.10.0", "caniuse-lite": "^1.0.30001566", "eslint": "^8.55.0", - "eslint-config-custom": "workspace:*", + "@repo/eslint-config-custom": "workspace:*", "eslint-config-next": "^14.2.5", "typescript": "^5.3.2" } diff --git a/apps/registry/.eslintrc.js b/apps/registry/.eslintrc.js index 7487a42f..34422893 100644 --- a/apps/registry/.eslintrc.js +++ b/apps/registry/.eslintrc.js @@ -1,7 +1,19 @@ +/* eslint-disable */ + module.exports = { - extends: ['custom', 'next'], + root: true, + extends: ['@repo/eslint-config-custom'], + parser: '@typescript-eslint/parser', rules: { '@next/next/no-html-link-for-pages': 'off', + '@next/next/no-sync-scripts': 'off', '@next/next/no-page-custom-font': 'off', }, + env: { + browser: true, + es2021: true, + jquery: true, + commonjs: true, + node: true, + }, }; diff --git a/apps/registry/app/[username]/ProfileLayout.js b/apps/registry/app/[username]/ProfileLayout.js index b082c614..17345829 100644 --- a/apps/registry/app/[username]/ProfileLayout.js +++ b/apps/registry/app/[username]/ProfileLayout.js @@ -7,6 +7,7 @@ import Link from 'next/link'; import { ProfileProvider } from './ProfileContext'; import gravatar from 'gravatar'; import { MapPin } from 'lucide-react'; +import { Button } from '@repo/ui/components/ui/button'; export default function Layout({ children, resume, username, session }) { const router = useRouter(); @@ -47,7 +48,7 @@ export default function Layout({ children, resume, username, session }) { {resume.basics.label}

- + {resume.basics.location.countryCode || 'Location not available'} @@ -55,24 +56,20 @@ export default function Layout({ children, resume, username, session }) {
{resume.basics.email}
- +
+
{session && ( - + )} @@ -84,8 +81,8 @@ export default function Layout({ children, resume, username, session }) { {link.label} diff --git a/apps/registry/app/components/ResumeEditor.js b/apps/registry/app/components/ResumeEditor.js index 34125d6f..c930a6d9 100644 --- a/apps/registry/app/components/ResumeEditor.js +++ b/apps/registry/app/components/ResumeEditor.js @@ -5,7 +5,7 @@ import { useRef, useEffect, useState } from 'react'; // import { render } from '../../../../themes/stackoverflow/dist'; import { render } from '../../../../packages/jsonresume-theme-professional'; import Button from './Button/Button'; -import Link from '@jsonresume/ui/Link'; +import Link from 'next/link'; import schema from './schema'; const HtmlIframe = ({ htmlString }) => { diff --git a/apps/registry/app/components/SignIn.js b/apps/registry/app/components/SignIn.js index 8e0710dd..f34f46f8 100644 --- a/apps/registry/app/components/SignIn.js +++ b/apps/registry/app/components/SignIn.js @@ -1,6 +1,7 @@ import { Github } from 'lucide-react'; import { signIn } from '../../auth'; import { track } from '@vercel/analytics/server'; +import { Button } from '@repo/ui/components/ui/button'; export default function SignIn() { return (
@@ -25,12 +26,9 @@ export default function SignIn() { await signIn('github'); }} > - +

Upcoming Features

diff --git a/apps/registry/app/global.css b/apps/registry/app/global.css deleted file mode 100644 index 86d363e4..00000000 --- a/apps/registry/app/global.css +++ /dev/null @@ -1,10 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -html, body { - padding: 0; - margin: 0; - font-family: 'Open Sans', sans-serif; - font-size: 10px; -} \ No newline at end of file diff --git a/apps/registry/app/layout.js b/apps/registry/app/layout.js index 6cd65638..8751f764 100644 --- a/apps/registry/app/layout.js +++ b/apps/registry/app/layout.js @@ -3,7 +3,7 @@ import { Analytics } from '@vercel/analytics/react'; import Menu from './components/Menu'; import { auth } from '../auth'; -import './global.css'; +import '@repo/ui/globals.css'; export const metadata = { title: 'JSON Resume Registry', }; diff --git a/apps/registry/lib/formatters/template.js b/apps/registry/lib/formatters/template.js index ce2ab086..8c745f49 100644 --- a/apps/registry/lib/formatters/template.js +++ b/apps/registry/lib/formatters/template.js @@ -1,7 +1,7 @@ import * as standard from 'jsonresume-theme-standard'; import * as cv from 'jsonresume-theme-cv'; import * as professional from 'jsonresume-theme-professional'; -import * as tailwind from 'jsonresume-theme-tailwind'; +// import * as tailwind from 'jsonresume-theme-tailwind'; import * as full from 'jsonresume-theme-full'; import * as onepage from 'jsonresume-theme-onepage'; import * as onepageplus from 'jsonresume-theme-onepage-plus'; @@ -17,7 +17,7 @@ export const THEMES = { cora: require('jsonresume-theme-cora'), cv, professional, - tailwind, + // tailwind, elegant: require('jsonresume-theme-elegant'), full, flat, diff --git a/apps/registry/next-env.d.ts b/apps/registry/next-env.d.ts new file mode 100644 index 00000000..fd36f949 --- /dev/null +++ b/apps/registry/next-env.d.ts @@ -0,0 +1,6 @@ +/// +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/apps/registry/next.config.js b/apps/registry/next.config.mjs similarity index 60% rename from apps/registry/next.config.js rename to apps/registry/next.config.mjs index 19efe533..80b9bf58 100644 --- a/apps/registry/next.config.js +++ b/apps/registry/next.config.mjs @@ -1,6 +1,6 @@ -module.exports = { +const nextConfig = { reactStrictMode: true, - transpilePackages: ['ui'], + transpilePackages: ['@repo/ui'], async rewrites() { return [ { @@ -9,27 +9,6 @@ module.exports = { }, ]; }, - // { - // source: '/:payload/interview', - // destination: '/interview', - // }, - // { - // source: '/:payload/jobs', - // destination: '/jobs', - // }, - // { - // source: '/:payload/letter', - // destination: '/letter', - // }, - // { - // source: '/:payload/suggestions', - // destination: '/suggestions', - // }, - // ]; - // }, - compiler: { - styledComponents: true, - }, images: { remotePatterns: [ { @@ -62,3 +41,5 @@ module.exports = { }, }, }; + +export default nextConfig; diff --git a/apps/registry/package.json b/apps/registry/package.json index 6f50556b..28419917 100644 --- a/apps/registry/package.json +++ b/apps/registry/package.json @@ -17,10 +17,10 @@ "@jsonresume/schema": "^1.2.0", "@jsonresume/theme-papirus": "workspace:*", "@jsonresume/theme-stackoverflow": "workspace:*", - "@jsonresume/ui": "workspace:*", "@monaco-editor/react": "^4.6.0", "@pinecone-database/pinecone": "^0.1.6", "@prisma/client": "^4.15.0", + "@repo/ui": "workspace:*", "@supabase/supabase-js": "^2.39.6", "@tailwindcss/typography": "^0.5.13", "@vercel/analytics": "^1.3.1", @@ -103,18 +103,20 @@ "react-markdown": "^8.0.7", "react-speech-recognition": "^3.10.0", "resume-schema": "^1.0.0", + "sonner": "^1.5.0", "styled-components": "6.1.11", "tailwindcss": "^3.4.3", "uuid": "^9.0.0" }, "devDependencies": { "@playwright/test": "^1.40.0", + "@repo/eslint-config-custom": "workspace:*", "@types/node": "^20.10.0", "caniuse-lite": "^1.0.30001566", "eslint": "^8.55.0", - "eslint-config-custom": "workspace:*", "eslint-config-next": "^14.2.5", "playwright": "^1.40.0", + "tsconfig": "workspace:*", "typescript": "^5.3.2" } } diff --git a/apps/registry/postcss.config.js b/apps/registry/postcss.config.js deleted file mode 100644 index 12a703d9..00000000 --- a/apps/registry/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; diff --git a/apps/registry/postcss.config.mjs b/apps/registry/postcss.config.mjs new file mode 100644 index 00000000..111255ad --- /dev/null +++ b/apps/registry/postcss.config.mjs @@ -0,0 +1 @@ +export { default } from '@repo/ui/postcss.config'; diff --git a/apps/registry/tailwind.config.js b/apps/registry/tailwind.config.js deleted file mode 100644 index f8a45dda..00000000 --- a/apps/registry/tailwind.config.js +++ /dev/null @@ -1,74 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - './app/**/*.{js,ts,jsx,tsx,mdx}', // Note the addition of the `app` directory. - './pages/**/*.{js,ts,jsx,tsx,mdx}', - './components/**/*.{js,ts,jsx,tsx,mdx}', - - // Or if using `src` directory: - './src/**/*.{js,ts,jsx,tsx,mdx}', - ], - - theme: { - extend: { - colors: { - accent: { - 50: 'oklch(var(--sweet-corn-50, 98.73% 0.03 102.21) / )', - 100: 'oklch(var(--sweet-corn-100, 97.35% 0.07 102.42) / )', - 200: 'oklch(var(--sweet-corn-200, 94.87% 0.12 101.23) / )', - 300: 'oklch(var(--sweet-corn-300, 90.69% 0.17 97.42) / )', - 400: 'oklch(var(--sweet-corn-400, 86.25% 0.17 91.21) / )', - 500: 'oklch(var(--sweet-corn-500, 79.73% 0.16 85.26) / )', - 600: 'oklch(var(--sweet-corn-600, 68.30% 0.14 75.03) / )', - 700: 'oklch(var(--sweet-corn-700, 55.32% 0.12 65.26) / )', - 800: 'oklch(var(--sweet-corn-800, 47.57% 0.10 60.63) / )', - 900: 'oklch(var(--sweet-corn-900, 42.24% 0.09 57.49) / )', - 950: 'oklch(var(--sweet-corn-950, 28.72% 0.07 53.80) / )', - }, - secondary: { - 50: 'oklch(var(--secondary-50, 97.76% 0.01 234.81) / )', - 100: 'oklch(var(--secondary-100, 95.02% 0.02 239.43) / )', - 200: 'oklch(var(--secondary-200, 89.64% 0.05 234.19) / )', - 300: 'oklch(var(--secondary-300, 77.20% 0.11 235.35) / )', - 400: 'oklch(var(--secondary-400, 72.81% 0.13 235.42) / )', - 500: 'oklch(var(--secondary-500, 65.11% 0.14 239.63) / )', - 600: 'oklch(var(--secondary-600, 55.78% 0.13 243.73) / )', - 700: 'oklch(var(--secondary-700, 47.58% 0.11 244.93) / )', - 800: 'oklch(var(--secondary-800, 42.48% 0.10 242.85) / )', - 900: 'oklch(var(--secondary-900, 37.58% 0.08 243.51) / )', - 950: 'oklch(var(--secondary-950, 28.37% 0.06 245.80) / )', - }, - success: { - 50: 'oklch(var(--success-50, 98.35% 0.02 159.77) / )', - 100: 'oklch(var(--success-100, 96.67% 0.05 161.85) / )', - 200: 'oklch(var(--success-200, 93.78% 0.09 160.35) / )', - 300: 'oklch(var(--success-300, 89.67% 0.15 157.88) / )', - 400: 'oklch(var(--success-400, 84.34% 0.19 154.59) / )', - 500: 'oklch(var(--success-500, 77.06% 0.20 151.55) / )', - 600: 'oklch(var(--success-600, 67.13% 0.18 151.08) / )', - 700: 'oklch(var(--success-700, 56.17% 0.14 152.25) / )', - 800: 'oklch(var(--success-800, 47.41% 0.12 153.74) / )', - 900: 'oklch(var(--success-900, 41.35% 0.10 155.53) / )', - 950: 'oklch(var(--success-950, 28.22% 0.07 155.64) / )', - }, - danger: { - 50: 'oklch(var(--danger-50, 97.30% 0.01 28.86) / )', - 100: 'oklch(var(--danger-100, 94.00% 0.03 25.28) / )', - 200: 'oklch(var(--danger-200, 89.02% 0.06 26.23) / )', - 300: 'oklch(var(--danger-300, 82.01% 0.10 27.67) / )', - 400: 'oklch(var(--danger-400, 70.99% 0.18 29.74) / )', - 500: 'oklch(var(--danger-500, 66.35% 0.21 30.68) / )', - 600: 'oklch(var(--danger-600, 60.22% 0.22 30.98) / )', - 700: 'oklch(var(--danger-700, 52.78% 0.19 31.00) / )', - 800: 'oklch(var(--danger-800, 46.36% 0.16 30.94) / )', - 900: 'oklch(var(--danger-900, 41.19% 0.13 30.56) / )', - 950: 'oklch(var(--danger-950, 26.78% 0.09 30.71) / )', - }, - }, - }, - }, - - plugins: [require('@tailwindcss/typography')], -}; - -// my tailwind semantic colors are called accent, secondary, success, and danger. they have values 50,100,200,300,400,500,600,700,800,900,950. diff --git a/apps/registry/tailwind.config.ts b/apps/registry/tailwind.config.ts new file mode 100644 index 00000000..b4e7e7b7 --- /dev/null +++ b/apps/registry/tailwind.config.ts @@ -0,0 +1 @@ +export * from '@repo/ui/tailwind.config'; diff --git a/apps/registry/tsconfig.json b/apps/registry/tsconfig.json new file mode 100644 index 00000000..715f845a --- /dev/null +++ b/apps/registry/tsconfig.json @@ -0,0 +1,29 @@ +{ + "extends": "tsconfig/nextjs.json", + "compilerOptions": { + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "~/*": [ + "./*" + ] + }, + "strictNullChecks": true + }, + "include": [ + "next-env.d.ts", + "next.config.mjs", + "postcss.config.mjs", + "**/*.ts", + "**/*.tsx", + "**/*.js", + "**/*.jsx", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/package.json b/package.json index 80c3d0f1..6f632e2d 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,12 @@ "lint": "turbo run lint", "format": "prettier -w .", "prettier": "prettier -c .", - "prepare": "husky install" + "prepare": "husky install", + "ui:add": "pnpm --filter @repo/ui ui:add" }, "devDependencies": { "eslint": "^8", - "eslint-config-custom": "workspace:*", + "@repo/eslint-config-custom": "workspace:*", "husky": "^8.0.3", "lint-staged": "^15.2.0", "prettier": "^2.8.0", diff --git a/packages/eslint-config-custom/index.js b/packages/eslint-config-custom/index.js index 4fbe493e..0e4b1f04 100644 --- a/packages/eslint-config-custom/index.js +++ b/packages/eslint-config-custom/index.js @@ -1,5 +1,5 @@ module.exports = { - extends: ['eslint:recommended', 'turbo', 'prettier'], + extends: ['eslint:recommended', 'turbo', 'prettier', 'next'], env: { es6: true, }, diff --git a/packages/eslint-config-custom/package.json b/packages/eslint-config-custom/package.json index 71076137..5ebf7641 100644 --- a/packages/eslint-config-custom/package.json +++ b/packages/eslint-config-custom/package.json @@ -1,6 +1,6 @@ { "private": true, - "name": "eslint-config-custom", + "name": "@repo/eslint-config-custom", "version": "0.0.0", "main": "index.js", "license": "MIT", @@ -9,6 +9,11 @@ "eslint-config-turbo": "^1", "eslint-plugin-react": "^7.33.2" }, + "files": [ + "library.js", + "next.js", + "react-internal.js" + ], "publishConfig": { "access": "public" }, diff --git a/packages/jsonresume-theme-cv/.eslintrc b/packages/jsonresume-theme-cv/.eslintrc deleted file mode 100644 index 39acc20b..00000000 --- a/packages/jsonresume-theme-cv/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["custom/react"] -} diff --git a/packages/jsonresume-theme-cv/.eslintrc.js b/packages/jsonresume-theme-cv/.eslintrc.js new file mode 100644 index 00000000..b8e28d20 --- /dev/null +++ b/packages/jsonresume-theme-cv/.eslintrc.js @@ -0,0 +1,20 @@ +/* eslint-disable */ + +module.exports = { + root: true, + extends: ['@repo/eslint-config-custom'], + parser: '@typescript-eslint/parser', + rules: { + '@next/next/no-html-link-for-pages': 'off', + '@next/next/no-sync-scripts': 'off', + '@next/next/no-page-custom-font': 'off', + '@next/next/no-img-element': 'off', + }, + env: { + browser: true, + es2021: true, + jquery: true, + commonjs: true, + node: true, + }, +}; diff --git a/packages/jsonresume-theme-cv/package.json b/packages/jsonresume-theme-cv/package.json index 68d8ad2e..e2b04272 100644 --- a/packages/jsonresume-theme-cv/package.json +++ b/packages/jsonresume-theme-cv/package.json @@ -5,7 +5,7 @@ "main": "./src/index.js", "license": "MIT", "devDependencies": { - "eslint-config-custom": "workspace:^", + "@repo/eslint-config-custom": "workspace:^", "react": "^18", "styled-components": "^6" }, diff --git a/packages/jsonresume-theme-cv/src/ui/Experience.js b/packages/jsonresume-theme-cv/src/ui/Experience.js index fe95a12a..7d4911b4 100644 --- a/packages/jsonresume-theme-cv/src/ui/Experience.js +++ b/packages/jsonresume-theme-cv/src/ui/Experience.js @@ -11,7 +11,7 @@ const ExperienceComponent = ({ work }) => { const years = `${startYear} - ${endYear}`; return ( -
  • +
  • diff --git a/packages/jsonresume-theme-cv/src/ui/Projects.js b/packages/jsonresume-theme-cv/src/ui/Projects.js index c62ad4a9..1814cbe8 100644 --- a/packages/jsonresume-theme-cv/src/ui/Projects.js +++ b/packages/jsonresume-theme-cv/src/ui/Projects.js @@ -10,9 +10,9 @@ const Projects = ({ projects }) => {
      {projects.map( - ({ url, description, highlights, name, isActive, github }) => { + ({ url, description, highlights, name, isActive, github }, index) => { return ( -
    • +
    • @@ -38,8 +38,8 @@ const Projects = ({ projects }) => {

      {description}

      - {highlights.map((highlight) => { - return {highlight}; + {highlights.map((highlight, i) => { + return {highlight}; })}
      diff --git a/packages/jsonresume-theme-professional/.eslintrc b/packages/jsonresume-theme-professional/.eslintrc deleted file mode 100644 index 39acc20b..00000000 --- a/packages/jsonresume-theme-professional/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["custom/react"] -} diff --git a/packages/jsonresume-theme-professional/.eslintrc.js b/packages/jsonresume-theme-professional/.eslintrc.js new file mode 100644 index 00000000..578b383f --- /dev/null +++ b/packages/jsonresume-theme-professional/.eslintrc.js @@ -0,0 +1,8 @@ +/* eslint-disable */ + +module.exports = { + root: true, + extends: ['@repo/eslint-config-custom'], + parser: '@typescript-eslint/parser', + rules: {}, +}; diff --git a/packages/jsonresume-theme-professional/package.json b/packages/jsonresume-theme-professional/package.json index 7fab469f..4d0f87e1 100644 --- a/packages/jsonresume-theme-professional/package.json +++ b/packages/jsonresume-theme-professional/package.json @@ -5,7 +5,7 @@ "main": "./src/index.js", "license": "MIT", "devDependencies": { - "eslint-config-custom": "workspace:^", + "@repo/eslint-config-custom": "workspace:^", "react": "^18", "styled-components": "^6" }, diff --git a/packages/jsonresume-theme-standard/.eslintrc b/packages/jsonresume-theme-standard/.eslintrc deleted file mode 100644 index 39acc20b..00000000 --- a/packages/jsonresume-theme-standard/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["custom/react"] -} diff --git a/packages/jsonresume-theme-standard/.eslintrc.js b/packages/jsonresume-theme-standard/.eslintrc.js new file mode 100644 index 00000000..7e0bed88 --- /dev/null +++ b/packages/jsonresume-theme-standard/.eslintrc.js @@ -0,0 +1,11 @@ +/* eslint-disable */ + +module.exports = { + root: true, + extends: ['@repo/eslint-config-custom'], + parser: '@typescript-eslint/parser', + rules: { + 'no-redeclare': 'off', + '@next/next/no-html-link-for-pages': 'off', + }, +}; diff --git a/packages/jsonresume-theme-standard/package.json b/packages/jsonresume-theme-standard/package.json index bcdd3fcb..579af06c 100644 --- a/packages/jsonresume-theme-standard/package.json +++ b/packages/jsonresume-theme-standard/package.json @@ -5,8 +5,9 @@ "main": "./src/index.js", "license": "MIT", "devDependencies": { - "eslint-config-custom": "workspace:^", + "@repo/eslint-config-custom": "workspace:*", "react": "^18", + "styled-components": "^6" }, "peerDependencies": { diff --git a/packages/jsonresume-theme-standard/src/ui/Projects.js b/packages/jsonresume-theme-standard/src/ui/Projects.js index 68ee4360..3d735a6c 100644 --- a/packages/jsonresume-theme-standard/src/ui/Projects.js +++ b/packages/jsonresume-theme-standard/src/ui/Projects.js @@ -25,9 +25,9 @@ const Projects = ({ projects }) => { return (
      Projects - {projects.slice(0, 1).map((w) => { + {projects.map((w) => { return ( -
      +
      {w.position}  -  diff --git a/packages/jsonresume-theme-tailwind/.eslintrc b/packages/jsonresume-theme-tailwind/.eslintrc deleted file mode 100644 index 39acc20b..00000000 --- a/packages/jsonresume-theme-tailwind/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["custom/react"] -} diff --git a/packages/jsonresume-theme-tailwind/.eslintrc.js b/packages/jsonresume-theme-tailwind/.eslintrc.js new file mode 100644 index 00000000..578b383f --- /dev/null +++ b/packages/jsonresume-theme-tailwind/.eslintrc.js @@ -0,0 +1,8 @@ +/* eslint-disable */ + +module.exports = { + root: true, + extends: ['@repo/eslint-config-custom'], + parser: '@typescript-eslint/parser', + rules: {}, +}; diff --git a/packages/jsonresume-theme-tailwind/package.json b/packages/jsonresume-theme-tailwind/package.json index 5ade3b54..2fd2f5ae 100644 --- a/packages/jsonresume-theme-tailwind/package.json +++ b/packages/jsonresume-theme-tailwind/package.json @@ -5,7 +5,7 @@ "main": "./src/index.js", "license": "MIT", "devDependencies": { - "eslint-config-custom": "workspace:*", + "@repo/eslint-config-custom": "workspace:*", "react": "^18", "styled-components": "^6", "tailwindcss": "^3.4.3" diff --git a/packages/jsonresume-theme-tailwind/src/ui/Experience.js b/packages/jsonresume-theme-tailwind/src/ui/Experience.js index fe95a12a..ec6f6046 100644 --- a/packages/jsonresume-theme-tailwind/src/ui/Experience.js +++ b/packages/jsonresume-theme-tailwind/src/ui/Experience.js @@ -4,35 +4,37 @@ const ExperienceComponent = ({ work }) => { return (
        - {work.map(({ name, startDate, endDate, position, summary, url }) => { - const startYear = new Date(startDate).getFullYear(); - const endYear = - endDate != null ? new Date(endDate).getFullYear() : 'Present'; - const years = `${startYear} - ${endYear}`; + {work.map( + ({ name, startDate, endDate, position, summary, url }, index) => { + const startYear = new Date(startDate).getFullYear(); + const endYear = + endDate != null ? new Date(endDate).getFullYear() : 'Present'; + const years = `${startYear} - ${endYear}`; - return ( -
      • -
        -
        -
        -

        - - {name} - -

        -

        {position}

        -
        + return ( +
      • +
        +
        +
        +

        + + {name} + +

        +

        {position}

        +
        - -
        + +
      • -
        -

        {summary}

        -
        -
        -
      • - ); - })} +
        +

        {summary}

        +
        +
    +
  • + ); + } + )} ); diff --git a/packages/jsonresume-theme-tailwind/src/ui/Work.js b/packages/jsonresume-theme-tailwind/src/ui/Work.js index 88080e1f..3c5c1506 100644 --- a/packages/jsonresume-theme-tailwind/src/ui/Work.js +++ b/packages/jsonresume-theme-tailwind/src/ui/Work.js @@ -5,9 +5,9 @@ const Work = ({ work }) => { return (

    Work Experience

    - {work.map((w) => { + {work.map((w, index) => { return ( - +

    @@ -39,8 +39,8 @@ const Work = ({ work }) => {

      - {w.highlights?.map((h) => { - return
    • - {h}
    • ; + {w.highlights?.map((h, index) => { + return
    • - {h}
    • ; })}
    diff --git a/packages/jsonresume-theme-tailwind/tailwind.config.js b/packages/jsonresume-theme-tailwind/tailwind.config.js index 0b0f906a..2daf7051 100644 --- a/packages/jsonresume-theme-tailwind/tailwind.config.js +++ b/packages/jsonresume-theme-tailwind/tailwind.config.js @@ -1,8 +1,14 @@ +const { fontFamily } = require('tailwindcss/defaultTheme'); + // eslint-disable-next-line module.exports = { content: ['./src/**/*.{html,js}'], theme: { - extend: {}, + extend: { + fontFamily: { + sans: ['var(--font-sans)', ...fontFamily.sans], + }, + }, }, plugins: [], }; diff --git a/packages/ui/.eslintrc.js b/packages/ui/.eslintrc.js new file mode 100644 index 00000000..578b383f --- /dev/null +++ b/packages/ui/.eslintrc.js @@ -0,0 +1,8 @@ +/* eslint-disable */ + +module.exports = { + root: true, + extends: ['@repo/eslint-config-custom'], + parser: '@typescript-eslint/parser', + rules: {}, +}; diff --git a/packages/ui/README.md b/packages/ui/README.md new file mode 100644 index 00000000..61eba23c --- /dev/null +++ b/packages/ui/README.md @@ -0,0 +1 @@ +# `@repo/ui` diff --git a/packages/ui/components.json b/packages/ui/components.json new file mode 100644 index 00000000..d2191f60 --- /dev/null +++ b/packages/ui/components.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "default", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "tailwind.config.ts", + "css": "src/globals.css", + "baseColor": "yellow", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@repo/ui/components", + "utils": "@repo/ui/lib/utils" + } +} diff --git a/packages/ui/index.js b/packages/ui/index.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/ui/package.json b/packages/ui/package.json index c3d93c97..244909cc 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,19 +1,47 @@ { - "name": "@jsonresume/ui", + "name": "@repo/ui", "version": "0.0.0", - "main": "./index.js", - "license": "MIT", - "devDependencies": { - "eslint-config-custom": "workspace:*", + "private": true, + "scripts": { + "ui:add": "pnpm dlx shadcn-ui@latest add", + "lint": "eslint ." + }, + "peerDependencies": { "react": "^18" }, - "exports": { - "./Button": "./src/Button.js", - "./Header": "./src/Header.js", - "./Link": "./src/Link.js" + "devDependencies": { + "@repo/eslint-config-custom": "workspace:*", + "@types/node": "^20", + "@types/react": "^18", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "postcss-load-config": "^6.0.1", + "tailwindcss": "^3.4.4", + "typescript": "^5.4.5" }, - "module": "true", "dependencies": { - "styled-components": "^6.1.11" + "@radix-ui/react-slot": "^1.0.2", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.1", + "lucide-react": "^0.395.0", + "next-themes": "^0.3.0", + "sonner": "^1.5.0", + "tailwind-merge": "^2.3.0", + "tailwindcss-animate": "^1.0.7" + }, + "exports": { + "./globals.css": "./src/globals.css", + "./postcss.config": "./postcss.config.mjs", + "./tailwind.config": "./tailwind.config.js", + "./lib/*": [ + "./src/lib/*.js", + "./src/lib/*.ts" + ], + "./components/*": [ + "./src/components/*.jsx", + "./src/components/*.js", + "./src/components/*.ts", + "./src/components/*.tsx" + ] } } diff --git a/packages/ui/postcss.config.mjs b/packages/ui/postcss.config.mjs new file mode 100644 index 00000000..2ef30fcf --- /dev/null +++ b/packages/ui/postcss.config.mjs @@ -0,0 +1,9 @@ +/** @type {import('postcss-load-config').Config} */ +const config = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; + +export default config; diff --git a/packages/ui/src/Button.js b/packages/ui/src/Button.js deleted file mode 100644 index 50b27330..00000000 --- a/packages/ui/src/Button.js +++ /dev/null @@ -1,18 +0,0 @@ -'use client'; - -import styles from './Button.module.css'; - -const Button = ({ children, type, onClick, disabled }) => { - return ( - - ); -}; - -export default Button; diff --git a/packages/ui/src/Button.module.css b/packages/ui/src/Button.module.css deleted file mode 100644 index 362ef9d9..00000000 --- a/packages/ui/src/Button.module.css +++ /dev/null @@ -1,8 +0,0 @@ - -.button { - background: #fff18f; - border: 1px solid #777; - border-radius: 1px; - cursor: pointer; - padding: 5px; -} diff --git a/packages/ui/src/Header.js b/packages/ui/src/Header.js deleted file mode 100644 index 0d65e343..00000000 --- a/packages/ui/src/Header.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -const Header = ({ left = null, right = null }) => { - return ( - - ); -}; - -export default Header; diff --git a/packages/ui/src/Header.module.css b/packages/ui/src/Header.module.css deleted file mode 100644 index 53b88c69..00000000 --- a/packages/ui/src/Header.module.css +++ /dev/null @@ -1,4 +0,0 @@ -.header { - background: #fff18f; - padding: 10px; -} \ No newline at end of file diff --git a/packages/ui/src/Link.js b/packages/ui/src/Link.js deleted file mode 100644 index e9de0fae..00000000 --- a/packages/ui/src/Link.js +++ /dev/null @@ -1,18 +0,0 @@ -import styles from './Link.module.css'; -import Link from 'next/link'; - -const LinkContainer = ({ children, href = '#', onClick, style, target }) => { - return ( - - {children} - - ); -}; - -export default LinkContainer; diff --git a/packages/ui/src/Link.module.css b/packages/ui/src/Link.module.css deleted file mode 100644 index d0db3718..00000000 --- a/packages/ui/src/Link.module.css +++ /dev/null @@ -1,17 +0,0 @@ -.link { - color: #000; - text-decoration: none; - color: #222; - font: 14px 'Open Sans'; - margin: 0; - overflow-x: hidden; - cursor: pointer; - font-weight: 600; - - &:hover { - text-decoration: none; - color: #ce2424; - -webkit-transition: all 0.25s; - transition: all 0.25s; - } -} \ No newline at end of file diff --git a/packages/ui/src/colors.js b/packages/ui/src/colors.js deleted file mode 100644 index 361d0923..00000000 --- a/packages/ui/src/colors.js +++ /dev/null @@ -1,5 +0,0 @@ -export const colors = { - brand: { - normal: '#F7D051', - }, -}; diff --git a/packages/ui/src/components/ui/button.tsx b/packages/ui/src/components/ui/button.tsx new file mode 100644 index 00000000..9f132a4a --- /dev/null +++ b/packages/ui/src/components/ui/button.tsx @@ -0,0 +1,56 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@repo/ui/lib/utils" + +const buttonVariants = cva( + "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: + "bg-destructive text-destructive-foreground hover:bg-destructive/90", + outline: + "border border-input bg-background hover:bg-accent hover:text-accent-foreground", + secondary: + "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-10 px-4 py-2", + sm: "h-9 rounded-md px-3", + lg: "h-11 rounded-md px-8", + icon: "h-10 w-10", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +) + +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button" + return ( + + ) + } +) +Button.displayName = "Button" + +export { Button, buttonVariants } diff --git a/packages/ui/src/components/ui/card.tsx b/packages/ui/src/components/ui/card.tsx new file mode 100644 index 00000000..543bd117 --- /dev/null +++ b/packages/ui/src/components/ui/card.tsx @@ -0,0 +1,79 @@ +import * as React from "react" + +import { cn } from "@repo/ui/lib/utils" + +const Card = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
    +)) +Card.displayName = "Card" + +const CardHeader = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
    +)) +CardHeader.displayName = "CardHeader" + +const CardTitle = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

    +)) +CardTitle.displayName = "CardTitle" + +const CardDescription = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

    +)) +CardDescription.displayName = "CardDescription" + +const CardContent = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

    +)) +CardContent.displayName = "CardContent" + +const CardFooter = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
    +)) +CardFooter.displayName = "CardFooter" + +export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } diff --git a/packages/ui/src/components/ui/sonner.tsx b/packages/ui/src/components/ui/sonner.tsx new file mode 100644 index 00000000..e011bc4b --- /dev/null +++ b/packages/ui/src/components/ui/sonner.tsx @@ -0,0 +1,31 @@ +'use client'; +/* eslint-disable */ +import { useTheme } from 'next-themes'; +import { Toaster as Sonner } from 'sonner'; + +type ToasterProps = React.ComponentProps; + +const Toaster = ({ ...props }: ToasterProps) => { + const { theme = 'system' } = useTheme(); + + return ( + + ); +}; + +export { Toaster }; diff --git a/packages/ui/src/globals.css b/packages/ui/src/globals.css new file mode 100644 index 00000000..e808c10e --- /dev/null +++ b/packages/ui/src/globals.css @@ -0,0 +1,81 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + --ring: 222.2 84% 4.9%; + + --radius: 0.5rem; + } + + .dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 11.2%; + + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + --ring: 212.7 26.8% 83.9%; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} + +html, body { + font-family: 'Open Sans', sans-serif; + font-size: 12px; +} \ No newline at end of file diff --git a/packages/ui/src/lib/theme.js b/packages/ui/src/lib/theme.js deleted file mode 100644 index ab295e65..00000000 --- a/packages/ui/src/lib/theme.js +++ /dev/null @@ -1,55 +0,0 @@ -// @todo - anyone know how to make a modern color pallette? - -const colors = Object.freeze({ - primary: { - light: '#7986cb', - main: '#fff18f', - dark: '#303f9f', - contrastText: '#000', - }, - secondary: { - light: '#ff4081', - main: '#f50057', - dark: '#c51162', - contrastText: '#ffffff', - }, - success: { - light: '#81c784', - main: '#4caf50', - dark: '#388e3c', - contrastText: '#ffffff', - }, - error: { - light: '#e57373', - main: '#f44336', - dark: '#d32f2f', - contrastText: '#ffffff', - }, - warning: { - light: '#ffb74d', - main: '#ff9800', - dark: '#f57c00', - contrastText: '#ffffff', - }, - info: { - light: '#64b5f6', - main: '#2196f3', - dark: '#1976d2', - contrastText: '#ffffff', - }, - background: { - default: '#fafafa', - paper: '#ffffff', - }, - text: { - primary: '#212121', - secondary: '#757575', - disabled: '#bdbdbd', - hint: '#9e9e9e', - }, -}); - -const theme = { - colors, -}; -export default theme; diff --git a/packages/ui/src/lib/utils.js b/packages/ui/src/lib/utils.js new file mode 100644 index 00000000..0ae73e11 --- /dev/null +++ b/packages/ui/src/lib/utils.js @@ -0,0 +1,6 @@ +import { clsx } from 'clsx'; +import { twMerge } from 'tailwind-merge'; + +export function cn(...inputs) { + return twMerge(clsx(inputs)); +} diff --git a/packages/ui/tailwind.config.js b/packages/ui/tailwind.config.js new file mode 100644 index 00000000..f6d4d4c3 --- /dev/null +++ b/packages/ui/tailwind.config.js @@ -0,0 +1,81 @@ +import tailwindcssAnimate from 'tailwindcss-animate'; + +const config = { + darkMode: ['class'], + content: [ + './pages/**/*.{js,jsx,ts,tsx}', + './components/**/*.{js,jsx,ts,tsx}', + './app/**/*.{js,jsx,ts,tsx}', + './src/**/*.{js,jsx,ts,tsx}', + '../../packages/ui/src/**/*.{js,jsx,ts,tsx}', + ], + prefix: '', + theme: { + container: { + center: true, + padding: '2rem', + screens: { + '2xl': '1400px', + }, + }, + extend: { + colors: { + border: 'hsl(var(--border))', + input: 'hsl(var(--input))', + ring: 'hsl(var(--ring))', + background: 'hsl(var(--background))', + foreground: 'hsl(var(--foreground))', + primary: { + DEFAULT: 'hsl(var(--primary))', + foreground: 'hsl(var(--primary-foreground))', + }, + secondary: { + DEFAULT: 'hsl(var(--secondary))', + foreground: 'hsl(var(--secondary-foreground))', + }, + destructive: { + DEFAULT: 'hsl(var(--destructive))', + foreground: 'hsl(var(--destructive-foreground))', + }, + muted: { + DEFAULT: 'hsl(var(--muted))', + foreground: 'hsl(var(--muted-foreground))', + }, + accent: { + DEFAULT: 'hsl(var(--accent))', + foreground: 'hsl(var(--accent-foreground))', + }, + popover: { + DEFAULT: 'hsl(var(--popover))', + foreground: 'hsl(var(--popover-foreground))', + }, + card: { + DEFAULT: 'hsl(var(--card))', + foreground: 'hsl(var(--card-foreground))', + }, + }, + borderRadius: { + lg: 'var(--radius)', + md: 'calc(var(--radius) - 2px)', + sm: 'calc(var(--radius) - 4px)', + }, + keyframes: { + 'accordion-down': { + from: { height: '0' }, + to: { height: 'var(--radix-accordion-content-height)' }, + }, + 'accordion-up': { + from: { height: 'var(--radix-accordion-content-height)' }, + to: { height: '0' }, + }, + }, + animation: { + 'accordion-down': 'accordion-down 0.2s ease-out', + 'accordion-up': 'accordion-up 0.2s ease-out', + }, + }, + }, + plugins: [tailwindcssAnimate], +}; + +export default config; diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json new file mode 100644 index 00000000..9e3cc66c --- /dev/null +++ b/packages/ui/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "@repo/typescript-config-custom", + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@repo/ui/*": ["./src/*"] + } + }, + "include": ["src"], + "exclude": ["node_modules"] + } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95ac26ec..4ed2acab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,12 +11,12 @@ importers: specifier: ^16.0.3 version: 16.0.3 devDependencies: + '@repo/eslint-config-custom': + specifier: workspace:* + version: link:packages/eslint-config-custom eslint: specifier: ^8 version: 8.55.0 - eslint-config-custom: - specifier: workspace:* - version: link:packages/eslint-config-custom husky: specifier: ^8.0.3 version: 8.0.3 @@ -44,15 +44,15 @@ importers: '@jsonresume/theme-stackoverflow': specifier: workspace:* version: link:../../themes/stackoverflow - '@jsonresume/ui': - specifier: workspace:* - version: link:../../packages/ui '@pinecone-database/pinecone': specifier: ^0.1.6 version: 0.1.6 '@prisma/client': specifier: ^4.15.0 version: 4.15.0(prisma@4.15.0) + '@repo/ui': + specifier: workspace:* + version: link:../../packages/ui '@supabase/supabase-js': specifier: ^2.39.6 version: 2.39.6 @@ -159,6 +159,9 @@ importers: specifier: ^9.0.0 version: 9.0.0 devDependencies: + '@repo/eslint-config-custom': + specifier: workspace:* + version: link:../../packages/eslint-config-custom '@types/node': specifier: ^20.10.0 version: 20.10.0 @@ -168,9 +171,6 @@ importers: eslint: specifier: ^8.55.0 version: 8.55.0 - eslint-config-custom: - specifier: workspace:* - version: link:../../packages/eslint-config-custom eslint-config-next: specifier: ^14.2.5 version: 14.2.5(eslint@8.55.0)(typescript@5.3.2) @@ -195,9 +195,6 @@ importers: '@jsonresume/theme-stackoverflow': specifier: workspace:* version: link:../../themes/stackoverflow - '@jsonresume/ui': - specifier: workspace:* - version: link:../../packages/ui '@monaco-editor/react': specifier: ^4.6.0 version: 4.6.0(monaco-editor@0.50.0)(react-dom@18.3.1)(react@18.3.1) @@ -207,6 +204,9 @@ importers: '@prisma/client': specifier: ^4.15.0 version: 4.15.0(prisma@4.15.0) + '@repo/ui': + specifier: workspace:* + version: link:../../packages/ui '@supabase/supabase-js': specifier: ^2.39.6 version: 2.39.6 @@ -453,6 +453,9 @@ importers: resume-schema: specifier: ^1.0.0 version: 1.0.0 + sonner: + specifier: ^1.5.0 + version: 1.5.0(react-dom@18.3.1)(react@18.3.1) styled-components: specifier: 6.1.11 version: 6.1.11(react-dom@18.3.1)(react@18.3.1) @@ -466,6 +469,9 @@ importers: '@playwright/test': specifier: ^1.40.0 version: 1.40.0 + '@repo/eslint-config-custom': + specifier: workspace:* + version: link:../../packages/eslint-config-custom '@types/node': specifier: ^20.10.0 version: 20.10.0 @@ -475,15 +481,15 @@ importers: eslint: specifier: ^8.55.0 version: 8.55.0 - eslint-config-custom: - specifier: workspace:* - version: link:../../packages/eslint-config-custom eslint-config-next: specifier: ^14.2.5 version: 14.2.5(eslint@8.55.0)(typescript@5.3.2) playwright: specifier: ^1.40.0 version: 1.40.0 + tsconfig: + specifier: workspace:* + version: link:../../packages/tsconfig typescript: specifier: ^5.3.2 version: 5.3.2 @@ -522,7 +528,7 @@ importers: specifier: ^5.0.1 version: 5.0.1(react@18.3.1) devDependencies: - eslint-config-custom: + '@repo/eslint-config-custom': specifier: workspace:^ version: link:../eslint-config-custom react: @@ -585,7 +591,7 @@ importers: specifier: ^5.0.1 version: 5.0.1(react@18.3.1) devDependencies: - eslint-config-custom: + '@repo/eslint-config-custom': specifier: workspace:^ version: link:../eslint-config-custom react: @@ -606,8 +612,8 @@ importers: packages/jsonresume-theme-standard: devDependencies: - eslint-config-custom: - specifier: workspace:^ + '@repo/eslint-config-custom': + specifier: workspace:* version: link:../eslint-config-custom react: specifier: ^18 @@ -646,7 +652,7 @@ importers: specifier: ^0.16.19 version: 0.16.19 devDependencies: - eslint-config-custom: + '@repo/eslint-config-custom': specifier: workspace:* version: link:../eslint-config-custom react: @@ -663,16 +669,58 @@ importers: packages/ui: dependencies: - styled-components: - specifier: ^6.1.11 - version: 6.1.11(react-dom@18.3.1)(react@18.3.1) + '@radix-ui/react-slot': + specifier: ^1.0.2 + version: 1.0.2(@types/react@18.2.39)(react@18.3.1) + class-variance-authority: + specifier: ^0.7.0 + version: 0.7.0 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + lucide-react: + specifier: ^0.395.0 + version: 0.395.0(react@18.3.1) + next-themes: + specifier: ^0.3.0 + version: 0.3.0(react-dom@18.3.1)(react@18.3.1) + react: + specifier: ^18 + version: 18.3.1 + sonner: + specifier: ^1.5.0 + version: 1.5.0(react-dom@18.3.1)(react@18.3.1) + tailwind-merge: + specifier: ^2.3.0 + version: 2.3.0 + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.4) devDependencies: - eslint-config-custom: + '@repo/eslint-config-custom': specifier: workspace:* version: link:../eslint-config-custom - react: + '@types/node': + specifier: ^20 + version: 20.10.0 + '@types/react': specifier: ^18 - version: 18.3.1 + version: 18.2.39 + autoprefixer: + specifier: ^10.4.19 + version: 10.4.19(postcss@8.4.39) + postcss: + specifier: ^8.4.38 + version: 8.4.39 + postcss-load-config: + specifier: ^6.0.1 + version: 6.0.1(postcss@8.4.39) + tailwindcss: + specifier: ^3.4.4 + version: 3.4.4 + typescript: + specifier: ^5.4.5 + version: 5.4.5 themes/papirus: dependencies: @@ -771,6 +819,9 @@ importers: '@esbuild-plugins/node-globals-polyfill': specifier: ^0.2.3 version: 0.2.3(esbuild@0.23.0) + '@repo/eslint-config-custom': + specifier: workspace:* + version: link:../../packages/eslint-config-custom '@storybook/addon-essentials': specifier: ^7.0.7 version: 7.0.7(react-dom@18.3.1)(react@18.3.1) @@ -828,9 +879,6 @@ importers: babel-plugin-named-exports-order: specifier: ^0.0.2 version: 0.0.2 - eslint-config-custom: - specifier: workspace:* - version: link:../../packages/eslint-config-custom prop-types: specifier: ^15.8.1 version: 15.8.1 @@ -18884,6 +18932,11 @@ packages: resolution: {integrity: sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==} engines: {node: '>=14'} + /lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + engines: {node: '>=14'} + dev: true + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -19161,6 +19214,14 @@ packages: yallist: 4.0.0 dev: false + /lucide-react@0.395.0(react@18.3.1): + resolution: {integrity: sha512-6hzdNH5723A4FLaYZWpK50iyZH8iS2Jq5zuPRRotOFkhu6kxxJiebVdJ72tCR5XkiIeYFOU5NUawFZOac+VeYw==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 + dependencies: + react: 18.3.1 + dev: false + /lucide-react@0.407.0(react@18.3.1): resolution: {integrity: sha512-+dRIu9Sry+E8wPF9+sY5eKld2omrU4X5IKXxrgqBt+o11IIHVU0QOfNoVWFuj0ZRDrxr4Wci26o2mKZqLGE0lA==} peerDependencies: @@ -20135,6 +20196,16 @@ packages: react: 18.3.1 dev: false + /next-themes@0.3.0(react-dom@18.3.1)(react@18.3.1): + resolution: {integrity: sha512-/QHIrsYpd6Kfk7xakK4svpDI5mmXP0gfvCoJdGpZQ2TOrQZmsW0QxjaiLn8wbIKjtm4BTSqLoix4lxYYOnLJ/w==} + peerDependencies: + react: ^16.8 || ^17 || ^18 + react-dom: ^16.8 || ^17 || ^18 + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + dev: false + /next@14.2.5(@playwright/test@1.40.0)(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-0f8aRfBVL+mpzfBjYfQuLWh2WyAwtJXCRfkPF4UJ5qd2YwrHczsrSzXU4tRMV0OAxR8ZJZWPFn6uhSC56UTsLA==} engines: {node: '>=18.17.0'} @@ -21472,6 +21543,28 @@ packages: postcss: 8.4.39 yaml: 2.3.4 + /postcss-load-config@6.0.1(postcss@8.4.39): + resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} + engines: {node: '>= 18'} + peerDependencies: + jiti: '>=1.21.0' + postcss: '>=8.0.9' + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + jiti: + optional: true + postcss: + optional: true + tsx: + optional: true + yaml: + optional: true + dependencies: + lilconfig: 3.1.2 + postcss: 8.4.39 + dev: true + /postcss-loader@6.2.1(postcss@8.4.39)(webpack@5.89.0): resolution: {integrity: sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==} engines: {node: '>= 12.13.0'} @@ -22779,7 +22872,7 @@ packages: semver: 7.6.2 source-map-loader: 3.0.2(webpack@5.89.0) style-loader: 3.3.3(webpack@5.89.0) - tailwindcss: 3.4.3 + tailwindcss: 3.4.4 terser-webpack-plugin: 5.3.9(@swc/core@1.3.99)(esbuild@0.23.0)(webpack@5.89.0) typescript: 4.9.5 webpack: 5.89.0(@swc/core@1.3.99)(esbuild@0.23.0) @@ -23892,6 +23985,16 @@ packages: swr-store: 0.10.6 dev: false + /sonner@1.5.0(react-dom@18.3.1)(react@18.3.1): + resolution: {integrity: sha512-FBjhG/gnnbN6FY0jaNnqZOMmB73R+5IiyYAw8yBj7L54ER7HB3fOSE5OFiQiE2iXWxeXKvg6fIP4LtVppHEdJA==} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + dev: false + /source-list-map@2.0.1: resolution: {integrity: sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==} @@ -24653,6 +24756,14 @@ packages: '@babel/runtime': 7.24.7 dev: false + /tailwindcss-animate@1.0.7(tailwindcss@3.4.4): + resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + dependencies: + tailwindcss: 3.4.4 + dev: false + /tailwindcss@3.4.3: resolution: {integrity: sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==} engines: {node: '>=14.0.0'} @@ -24683,6 +24794,36 @@ packages: transitivePeerDependencies: - ts-node + /tailwindcss@3.4.4: + resolution: {integrity: sha512-ZoyXOdJjISB7/BcLTR6SEsLgKtDStYyYZVLsUtWChO4Ps20CBad7lfJKVDiejocV4ME1hLmyY0WJE3hSDcmQ2A==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.6.0 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.2 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.0 + lilconfig: 2.1.0 + micromatch: 4.0.7 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.0.1 + postcss: 8.4.39 + postcss-import: 15.1.0(postcss@8.4.39) + postcss-js: 4.0.1(postcss@8.4.39) + postcss-load-config: 4.0.2(postcss@8.4.39) + postcss-nested: 6.0.1(postcss@8.4.39) + postcss-selector-parser: 6.0.13 + resolve: 1.22.8 + sucrase: 3.34.0 + transitivePeerDependencies: + - ts-node + /tapable@1.1.3: resolution: {integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==} engines: {node: '>=6'} @@ -25273,6 +25414,12 @@ packages: engines: {node: '>=14.17'} hasBin: true + /typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + /uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: false diff --git a/themes/papirus/.eslintrc b/themes/papirus/.eslintrc deleted file mode 100644 index 39acc20b..00000000 --- a/themes/papirus/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["custom/react"] -} diff --git a/themes/papirus/.eslintrc.cjs b/themes/papirus/.eslintrc.cjs new file mode 100644 index 00000000..f0388b49 --- /dev/null +++ b/themes/papirus/.eslintrc.cjs @@ -0,0 +1,14 @@ +/* eslint-disable */ + +module.exports = { + root: true, + extends: ['@repo/eslint-config-custom'], + parser: '@typescript-eslint/parser', + env: { + browser: true, + es2021: true, + jquery: true, + commonjs: true, + node: true, + }, +}; diff --git a/themes/papirus/src/style.js b/themes/papirus/src/style.js index 4909cbcd..dcb0482e 100644 --- a/themes/papirus/src/style.js +++ b/themes/papirus/src/style.js @@ -1,4 +1,4 @@ -export default `body { +const styles = `body { background: #e5ded4; font: 15px Arial, Helvetica, sans-serif; line-height: 1.4; @@ -656,3 +656,4 @@ section { color: #ffffff !important; } }`; +export default styles; diff --git a/themes/stackoverflow/.eslintrc b/themes/stackoverflow/.eslintrc deleted file mode 100644 index 39acc20b..00000000 --- a/themes/stackoverflow/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["custom/react"] -} diff --git a/themes/stackoverflow/.eslintrc.cjs b/themes/stackoverflow/.eslintrc.cjs new file mode 100644 index 00000000..578b383f --- /dev/null +++ b/themes/stackoverflow/.eslintrc.cjs @@ -0,0 +1,8 @@ +/* eslint-disable */ + +module.exports = { + root: true, + extends: ['@repo/eslint-config-custom'], + parser: '@typescript-eslint/parser', + rules: {}, +}; diff --git a/themes/stackoverflow/package.json b/themes/stackoverflow/package.json index 03716183..304d01c7 100644 --- a/themes/stackoverflow/package.json +++ b/themes/stackoverflow/package.json @@ -61,7 +61,7 @@ "@types/styled-components": "^5.1.32", "@vitejs/plugin-react": "^4.2.1", "babel-plugin-named-exports-order": "^0.0.2", - "eslint-config-custom": "workspace:*", + "@repo/eslint-config-custom": "workspace:*", "prop-types": "^15.8.1", "rollup-plugin-node-polyfills": "^0.2.1", "storybook": "^7.0.7",