Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fonts sizes and weights #33

Merged
merged 4 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 124 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.2.0",
"autoprefixer": "^10.4.16",
"concurrently": "^8.2.2",
"eslint": "^8.45.0",
"eslint-config-standard-with-typescript": "^39.1.1",
Expand All @@ -77,6 +78,7 @@
"ts-jest": "^29.1.1",
"tsx": "^4.1.4",
"typescript": "^5.0.2",
"vite": "^5.0.0"
"vite": "^5.0.0",
"vite-plugin-static-copy": "^1.0.0"
}
}
7 changes: 7 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
plugins: {
'postcss-import': {},
tailwindcss: {},
autoprefixer: {}
}
}
6 changes: 3 additions & 3 deletions src/components/PlanningTable/Columns/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ export const actions: ColumnDef<Planning> = {
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-[160px]">
{!deliverableUuids.length && 'No deliverables'}
{deliverableUuids.length &&
deliverableUuids.map((uuid) => {
{deliverableUuids.length
? deliverableUuids.map((uuid) => {
return (
<DropdownMenuItem key={uuid}>
<Link to='Editor' props={{ documentId: uuid }}>
Expand All @@ -42,6 +41,7 @@ export const actions: ColumnDef<Planning> = {
</DropdownMenuItem>
)
})
: 'No deliverables'
}
</DropdownMenuContent>
</DropdownMenu>
Expand Down
6 changes: 3 additions & 3 deletions src/components/PlanningTable/Columns/Assignees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const assignees: ColumnDef<Planning> = {
cell: ({ row }) => {
const assignees = row.getValue<string[]>('assignees') || []
return (
<div className={cn('flex -space-x-2 w-fit text-sm font-semibold leading-6 h-8 items-center',
<div className={cn('flex -space-x-2 w-fit text-xs font-semibold leading-6 h-8 items-center',
assignees.length > 3 && 'border rounded-full hidden lg:flex')}>
{(assignees || []).slice(0, 3).map((assignee: string, index: number) => {
const [first, last] = assignee.trim().split(' ')
Expand All @@ -18,7 +18,7 @@ export const assignees: ColumnDef<Planning> = {
<TooltipProvider key={index}>
<Tooltip>
<TooltipTrigger>
<div className='hidden lg:flex w-8 h-8 rounded-full items-center justify-center bg-[#973C9F] text-background dark:text-foreground border relative z-1'>
<div className='hidden lg:flex w-8 h-8 rounded-full items-center justify-center bg-[#973C9F] text-background dark:text-foreground border'>
{initials}
</div>
</TooltipTrigger>
Expand All @@ -40,7 +40,7 @@ export const assignees: ColumnDef<Planning> = {
const initials = `${first[0]}${last[0]}`
return (
<div key={index} className='flex p-1'>
<div className='w-8 h-8 rounded-full flex items-center justify-center bg-[#973C9F] text-background dark:text-foreground border-2 mr-4'>
<div className='w-8 h-8 rounded-full flex items-center justify-center border-2 mr-4'>
{initials}
</div>
<p>{assignee}</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/PlanningTable/Columns/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export const section: ColumnDef<Planning> = {
cell: ({ row }) => {
const sector = sectors.find((label) => label.value === row.original._source['document.rel.sector.title'][0])

return sector && <Badge variant='outline'>
return sector && <Badge variant='outline' className='rounded-md'>
<div className={cn('h-2 w-2 rounded-full mr-2', sector?.color) } />
<span className='text-slate-500 font-medium font-sans'>{sector.label}</span>
<span className='text-slate-500 text-sm font-sans font-normal'>{sector.label}</span>
</Badge>
}
}
2 changes: 1 addition & 1 deletion src/components/PlanningTable/Columns/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const title: ColumnDef<Planning> = {
{row.getValue('title')}
</span>
{!!slugline?.length && (
<span className='hidden text-medium text-slate-600 lg:block'>{slugline[0]}</span>
<span className='hidden font-medium text-slate-500 lg:block'>{slugline[0]}</span>
)}
</div>
)
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"srv-src",
"vite.config.ts",
"tailwind.config.ts",
"postcss.config.js",
"setupTests.ts",
"jest.config.ts",
"__mocks__/**/*",
Expand Down
13 changes: 12 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import path from 'path'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { viteStaticCopy } from 'vite-plugin-static-copy'

export default defineConfig({
plugins: [react()],
plugins: [
react(),
viteStaticCopy({
targets: [
{
src: './node_modules/@ttab/elephant-ui/dist/styles/**/*',
dest: './'
}
]
})
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
Expand Down