Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3685a80
WIP checkbox pure css using tokens and variables
pomfrida Nov 4, 2025
15060c8
Tests + labelProps
pomfrida Nov 4, 2025
ad39481
Update story
pomfrida Nov 5, 2025
fc3c6ad
Fix some lint errors
pomfrida Nov 5, 2025
a52e871
Add density support
pomfrida Nov 5, 2025
076eeb3
Update snapshot
pomfrida Nov 5, 2025
0f80fca
Use data-density
pomfrida Nov 5, 2025
ffdd463
ErrorLabel added
pomfrida Nov 6, 2025
01d307d
WIP
pomfrida Nov 12, 2025
5214606
Fetch styles from figma
pomfrida Nov 18, 2025
f83812f
Remove foundations import
pomfrida Nov 18, 2025
d07136f
Set hardocded gap value. TODO: find correct spacing token
pomfrida Nov 18, 2025
5d73e9b
Update snapshot
pomfrida Nov 18, 2025
858bd84
WIP Field + ValidationMessage
pomfrida Nov 18, 2025
e0b8bba
Add different data color appearances
pomfrida Nov 19, 2025
4eb5e79
align checkbox css build and lab Jest config
pomfrida Nov 19, 2025
cf64aa2
Add eds prefix to classes
pomfrida Nov 19, 2025
b03d9fa
chore: update CSS bundles
pomfrida Dec 9, 2025
51bad91
refactor: move Checkbox, Field, ValidationMessage to next/
pomfrida Dec 10, 2025
0b1c762
style: fix prettier formatting
pomfrida Dec 10, 2025
84733d0
docs: move stories to EDS 2.0 (beta) section
pomfrida Dec 10, 2025
056fe65
docs: nest stories under category hierarchy
pomfrida Dec 10, 2025
384caaf
fix: remove Field and ValidationMessage from main exports
pomfrida Dec 10, 2025
613d3aa
fix: update CSS import paths after move to next/
pomfrida Dec 10, 2025
18bca25
refactor: replace hardcoded values with EDS tokens in checkbox.css
pomfrida Dec 10, 2025
20c61df
refactor: consistent hover color and Field Figma alignment
pomfrida Dec 11, 2025
ba183c8
refactor: checkbox pseudo-element with focus border
pomfrida Dec 11, 2025
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
6 changes: 6 additions & 0 deletions packages/eds-core-react/.storybook/preview.css
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
@import '@equinor/eds-tokens/css/variables';

/* Ensure form elements inherit EDS typography */
fieldset,
legend {
font-family: var(--eds-typography-ui-body-font-family), sans-serif;
}
1 change: 1 addition & 0 deletions packages/eds-core-react/.storybook/preview.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import './preview.css'
import '../src/index.css'

const preview = {
viewMode: 'docs',
Expand Down
354 changes: 354 additions & 0 deletions packages/eds-core-react/build/index.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/eds-core-react/build/index.min.css

Large diffs are not rendered by default.

62 changes: 61 additions & 1 deletion packages/eds-core-react/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/* eslint-disable import/no-default-export */
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { createRequire } from 'node:module'
import resolve from '@rollup/plugin-node-resolve'
import postcss from 'rollup-plugin-postcss'
import postcssImport from 'postcss-import'
import commonjs from '@rollup/plugin-commonjs'
import { preserveDirective } from 'rollup-preserve-directives'
import { babel } from '@rollup/plugin-babel'
Expand All @@ -12,6 +16,29 @@ const environment = process.env.NODE_ENV

const isDevelopment = environment === 'development'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const require = createRequire(import.meta.url)

const resolveCssImport = (id, basedir) => {
try {
return require.resolve(id, {
paths: [
basedir,
path.resolve(__dirname, 'node_modules'),
path.resolve(process.cwd(), 'node_modules'),
],
})
} catch {
return path.resolve(basedir, id)
}
}

const createPostcssImportPlugin = () =>
postcssImport({
resolve: resolveCssImport,
})

const extensions = ['.jsx', '.js', '.tsx', '.ts']

const externalDeps = [
Expand All @@ -30,12 +57,15 @@ const watchConfig = {

const createPlugins = (includeDelete = false) => [
preserveDirective(),
...(includeDelete ? [del({ targets: 'dist/*', runOnce: true })] : []),
...(includeDelete
? [del({ targets: ['dist/*', 'build/*'], runOnce: true })]
: []),
resolve({ extensions }),
commonjs(),
postcss({
extensions: ['.css'],
extract: false,
inject: false,
}),
babel({
babelHelpers: 'runtime',
Expand Down Expand Up @@ -75,4 +105,34 @@ export default [
{ file: './dist/index.next.cjs', format: 'cjs', interop: 'auto' },
],
},
// EDS 2.0 CSS bundle (unminified)
{
input: './src/index.css',
plugins: [
del({ targets: 'build/*', runOnce: true }),
postcss({
extensions: ['.css'],
extract: 'index.css',
minimize: false,
sourceMap: false,
plugins: [createPostcssImportPlugin()],
}),
],
output: { dir: 'build', format: 'es' },
},
// EDS 2.0 CSS bundle (minified)
{
input: './src/index.css',
plugins: [
postcss({
extensions: ['.css'],
extract: 'index.min.css',
minimize: true,
sourceMap: false,
plugins: [createPostcssImportPlugin()],
}),
del({ targets: 'build/*.js', hook: 'writeBundle' }),
],
output: { dir: 'build', format: 'es' },
},
]
Loading
Loading