Skip to content

Commit b2130c6

Browse files
feat(eds-core-react, eds-utils): Create base typography component and opinionated heading and paragraph
fixes #4125
1 parent ffd20ba commit b2130c6

File tree

155 files changed

+4371
-781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+4371
-781
lines changed

.eslintignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
node_modules
22
dist
3+
**/dist
34
packages/eds-tokens/build
45
packages/eds-tokens/build-generate-variables
56
packages/eds-color-palette-generator
67
storybook-build
78
**/next-env.d.ts
9+
.eslintcache
10+
node_modules/.cache
11+
**/build
12+
**/coverage
13+
**/.next
14+
**/playwright-report
15+
**/test-results
16+
**/.turbo

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,16 @@ module.exports = {
162162
'import/no-default-export': ['off'],
163163
},
164164
},
165+
// Config files that require default exports (Playwright, Vite, etc.)
166+
{
167+
files: [
168+
'**/playwright.config.ts',
169+
'**/vite.config.ts',
170+
'**/vitest.config.ts',
171+
],
172+
rules: {
173+
'import/no-default-export': ['off'],
174+
},
175+
},
165176
],
166177
}

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"docu",
5050
"Kody",
5151
"lightningcss",
52+
"lineheight",
5253
"OKLCH",
5354
"Overridable",
5455
"Topbar",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "eds",
33
"scripts": {
4-
"lint": "eslint",
4+
"lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache",
55
"lint:all": "pnpm run lint .",
6+
"lint:all:fast": "pnpm run lint:docs && pnpm run lint:core-react && pnpm run lint:data-grid-react && pnpm run lint:lab && pnpm run lint:utils",
67
"lint:docs": "pnpm run lint ./apps/design-system-docs",
78
"lint:core-react": "pnpm run lint ./packages/eds-core-react",
89
"lint:data-grid-react": "pnpm run lint ./packages/eds-data-grid-react",

packages/eds-core-react/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Playwright test artifacts
2+
/test-results/
3+
/playwright-report/
4+
/playwright/.cache/
5+
.last-run.json

packages/eds-core-react/.storybook/main.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,16 @@ const config = {
5959
resolve: {
6060
...config.resolve,
6161
dedupe: ['styled-components'],
62+
alias: {
63+
...config.resolve?.alias,
64+
'@equinor/eds-core-react/style.css': '/dist/style.css',
65+
'@equinor/eds-core-react/style': '/dist/style.css',
66+
},
6267
},
6368
optimizeDeps: {
6469
...config.optimizeDeps,
6570
include: [
6671
...(config.optimizeDeps?.include ?? []),
67-
'@equinor/eds-utils',
6872
'@storybook/addon-docs/mdx-react-shim',
6973
'@storybook/addon-docs/blocks',
7074
],
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import '@equinor/eds-tokens/css/variables';
2+
@import '../src/components/Typography/typography.css';

packages/eds-core-react/.storybook/preview.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import './preview.css'
2+
13
const preview = {
24
viewMode: 'docs',
35

packages/eds-core-react/jest.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ module.exports = {
1515
moduleFileExtensions: ['ts', 'tsx', 'js'],
1616
testEnvironment: 'jest-environment-jsdom',
1717
transformIgnorePatterns: ['node_modules/(?!.pnpm|ramda)'],
18+
testPathIgnorePatterns: ['/tests/visual/', '/dist/'],
1819
}

packages/eds-core-react/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,24 @@
2525
"files": [
2626
"dist/*"
2727
],
28+
"exports": {
29+
".": {
30+
"types": "./dist/types/index.d.ts",
31+
"import": "./dist/esm/index.js",
32+
"require": "./dist/eds-core-react.cjs"
33+
},
34+
"./style": "./dist/style.css",
35+
"./style.css": "./dist/style.css"
36+
},
2837
"scripts": {
2938
"build": "rollup -c --bundleConfigAsCjs && tsc -p tsconfig.build.json",
3039
"test": "tsc -p tsconfig.test.json && jest",
3140
"test:watch": "tsc-watch -p tsconfig.test.json --onFirstSuccess \"jest --watch\"",
3241
"test:update-snapshots": "jest --updateSnapshot",
42+
"test:visual": "playwright test",
43+
"test:visual:ui": "playwright test --ui",
44+
"test:visual:update": "playwright test --update-snapshots",
45+
"test:visual:report": "playwright show-report",
3346
"storybook": "storybook dev -p 9000 --ci",
3447
"build:storybook": "storybook build -o storybook-build",
3548
"types": "tsc -p tsconfig.build.json"
@@ -41,6 +54,7 @@
4154
"react"
4255
],
4356
"devDependencies": {
57+
"@playwright/test": "^1.55.0",
4458
"@rollup/plugin-babel": "^6.0.4",
4559
"@rollup/plugin-commonjs": "^28.0.6",
4660
"@rollup/plugin-node-resolve": "^16.0.1",
@@ -53,6 +67,8 @@
5367
"@testing-library/react": "16.3.0",
5468
"@testing-library/user-event": "14.5.2",
5569
"@types/jest": "^29.5.14",
70+
"@types/mdx": "^2.0.13",
71+
"@types/node": "^24.9.1",
5672
"@types/ramda": "^0.30.2",
5773
"@types/react": "^19.1.12",
5874
"@types/react-dom": "^19.1.9",
@@ -63,6 +79,7 @@
6379
"jest-styled-components": "^7.2.0",
6480
"js-file-download": "^0.4.12",
6581
"postcss": "^8.5.6",
82+
"postcss-import": "^16.1.1",
6683
"ramda": "^0.31.3",
6784
"react": "^19.1.1",
6885
"react-dom": "^19.1.1",

0 commit comments

Comments
 (0)