diff --git a/.changeset/curvy-files-accept.md b/.changeset/curvy-files-accept.md new file mode 100644 index 00000000000..3c44b943026 --- /dev/null +++ b/.changeset/curvy-files-accept.md @@ -0,0 +1,29 @@ +--- +"@utrecht/body-react": patch +"@utrecht/button-react": patch +"@utrecht/calendar-react": patch +"@utrecht/checkbox-group-react": patch +"@utrecht/checkbox-react": patch +"@utrecht/combobox-react": patch +"@utrecht/component-library-react": patch +"@utrecht/fieldset-react": patch +"@utrecht/form-field-checkbox-react": patch +"@utrecht/form-field-description-react": patch +"@utrecht/form-field-error-message-react": patch +"@utrecht/form-field-react": patch +"@utrecht/form-label-react": patch +"@utrecht/link-react": patch +"@utrecht/listbox-react": patch +"@utrecht/nav-bar-react": patch +"@utrecht/page-body-react": patch +"@utrecht/page-footer-react": patch +"@utrecht/page-header-react": patch +"@utrecht/page-layout-react": patch +"@utrecht/radio-button-react": patch +"@utrecht/radio-group-react": patch +"@utrecht/root-react": patch +"@utrecht/select-combobox-react": patch +"@utrecht/textbox-react": patch +--- + +Fix issue causing missing TypeScript `d.ts` files for React components. diff --git a/.changeset/flow-experiment-soil.md b/.changeset/flow-experiment-soil.md new file mode 100644 index 00000000000..a0e919ac600 --- /dev/null +++ b/.changeset/flow-experiment-soil.md @@ -0,0 +1,29 @@ +--- +"@utrecht/body-react": patch +"@utrecht/button-react": patch +"@utrecht/calendar-react": patch +"@utrecht/checkbox-group-react": patch +"@utrecht/checkbox-react": patch +"@utrecht/combobox-react": patch +"@utrecht/component-library-react": patch +"@utrecht/fieldset-react": patch +"@utrecht/form-field-checkbox-react": patch +"@utrecht/form-field-description-react": patch +"@utrecht/form-field-error-message-react": patch +"@utrecht/form-field-react": patch +"@utrecht/form-label-react": patch +"@utrecht/link-react": patch +"@utrecht/listbox-react": patch +"@utrecht/nav-bar-react": patch +"@utrecht/page-body-react": patch +"@utrecht/page-footer-react": patch +"@utrecht/page-header-react": patch +"@utrecht/page-layout-react": patch +"@utrecht/radio-button-react": patch +"@utrecht/radio-group-react": patch +"@utrecht/root-react": patch +"@utrecht/select-combobox-react": patch +"@utrecht/textbox-react": patch +--- + +Specify `exports` in `package.jon` for `.mjs` files in React components. diff --git a/.changeset/no-longer-required.md b/.changeset/no-longer-required.md new file mode 100644 index 00000000000..787cfca68e4 --- /dev/null +++ b/.changeset/no-longer-required.md @@ -0,0 +1,29 @@ +--- +"@utrecht/body-react": patch +"@utrecht/button-react": patch +"@utrecht/calendar-react": patch +"@utrecht/checkbox-group-react": patch +"@utrecht/checkbox-react": patch +"@utrecht/combobox-react": patch +"@utrecht/component-library-react": patch +"@utrecht/fieldset-react": patch +"@utrecht/form-field-checkbox-react": patch +"@utrecht/form-field-description-react": patch +"@utrecht/form-field-error-message-react": patch +"@utrecht/form-field-react": patch +"@utrecht/form-label-react": patch +"@utrecht/link-react": patch +"@utrecht/listbox-react": patch +"@utrecht/nav-bar-react": patch +"@utrecht/page-body-react": patch +"@utrecht/page-footer-react": patch +"@utrecht/page-header-react": patch +"@utrecht/page-layout-react": patch +"@utrecht/radio-button-react": patch +"@utrecht/radio-group-react": patch +"@utrecht/root-react": patch +"@utrecht/select-combobox-react": patch +"@utrecht/textbox-react": patch +--- + +Remove CommonJS builds from React components, since in Developer Open Hour everyone assured me surely nobody uses `require()` anymore! diff --git a/packages/build-utils-react/package.json b/packages/build-utils-react/package.json index b568e9a4bc4..bf8cee4d548 100644 --- a/packages/build-utils-react/package.json +++ b/packages/build-utils-react/package.json @@ -14,22 +14,17 @@ "directory": "packages/build-utils-react" }, "bin": { - "build-react-package": "./src/index.mjs" + "init-react-package": "./src/init.mjs" }, "devDependencies": { - "@babel/plugin-transform-runtime": "7.24.7", - "@babel/preset-react": "7.24.7", - "@rollup/plugin-babel": "6.0.4", - "@rollup/plugin-commonjs": "26.0.1", - "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "15.2.3", "@rollup/plugin-typescript": "12.1.0", + "glob": "10.4.2", "rollup": "4.23.0", "rollup-plugin-filesize": "10.0.0", - "rollup-plugin-node-externals": "7.1.2", "rollup-plugin-peer-deps-external": "2.2.4", - "rollup-plugin-postcss": "4.0.2", "rollup-plugin-typescript2": "0.36.0", + "sort-package-json": "2.11.0", "typescript": "5.6.2" } } diff --git a/packages/build-utils-react/src/init.mjs b/packages/build-utils-react/src/init.mjs new file mode 100755 index 00000000000..7b92102e6b8 --- /dev/null +++ b/packages/build-utils-react/src/init.mjs @@ -0,0 +1,32 @@ +import { updatePackageJson } from './lib/configure.mjs'; +import { cwd } from 'node:process'; + +const init = async () => { + const currentDirectory = cwd(); + + await updatePackageJson( + currentDirectory, + // Base `package.json` file + { + type: 'module', + sideEffects: false, + publishConfig: { + access: 'public', + }, + }, + // Optional: custom `package.json` settings from the current directory + {}, + // Configuration for the initialization + { + githubOrganisation: 'nl-design-system', + repository: 'utrecht', + author: 'Community for NL Design System', + directoryHomepage: true, + indent: 2, + legacyExports: true, + defaultBranch: 'main', + }, + ); +}; + +init(); diff --git a/packages/build-utils-react/src/lib/configure.mjs b/packages/build-utils-react/src/lib/configure.mjs new file mode 100644 index 00000000000..868dcfe23a8 --- /dev/null +++ b/packages/build-utils-react/src/lib/configure.mjs @@ -0,0 +1,212 @@ +import { readFile, writeFile, readdir, stat } from 'node:fs/promises'; +import { existsSync } from 'node:fs'; +import { join, extname, relative } from 'node:path'; +import { glob } from 'glob'; +import sortPackageJson from 'sort-package-json'; +import { findWorkspaceRoot } from './pnpm.mjs'; + +/* + * This goal of this script is to configure all `package.json` files consistently, + * without much manual labour and risk of errors. + * + * For example: + * + * - using the same fields for license, author​ + * - using a consistent pattern for homepage , bugs and directory + */ + +/** + * Updates package.json files with consistent configuration + * @param {string} projectPath - Path to the project directory + * @param {Object} customConfig - Custom configuration to override defaults + */ +async function updatePackageJson(projectPath, defaultConfig, customConfig = {}, config) { + console.log(`Updating ${projectPath}`); + const packagePath = join(projectPath, 'package.json'); + + // Detect the pnpm workspace + let workspacePath, workspaceJson, workspaceJsonPath; + + try { + workspacePath = await findWorkspaceRoot(projectPath); + workspaceJsonPath = join(workspacePath, './package.json'); + + console.log(`pnpm workspace detected: ${workspaceJsonPath}`); + if (workspaceJsonPath) { + workspaceJson = JSON.parse(await readFile(workspaceJsonPath, 'utf8')); + } + } catch (error) {} + + if (!workspaceJsonPath) { + console.log('No pnpm workspace detected.'); + } + + if (workspaceJsonPath && !workspaceJson) { + console.error('Could not load pnpm workspace package.json.'); + } + + const workspaceConfig = workspaceJson + ? { + license: workspaceJson.license, + repository: workspaceJson.repository, + author: workspaceJson.author, + bugs: workspaceJson.bugs, + homepage: workspaceJson.homepage, + } + : {}; + + // Merge default config with custom config + const basePackageJson = { + ...workspaceConfig, + ...defaultConfig, + ...customConfig, + }; + + let sourcePackageJson; + try { + // Read existing package.json + sourcePackageJson = JSON.parse(await readFile(packagePath, 'utf8')); + } catch (error) { + console.error(`Error reading ${packagePath}:`, error.message); + } + + const relativePackagePath = workspacePath ? relative(workspacePath, projectPath) : undefined; + + // Update fields while preserving existing configuration + const directory = workspacePath ? relative(workspacePath, projectPath) : undefined; + + let packageJson = { + ...sourcePackageJson, + type: 'module', // Add ESM type + author: config.author || basePackageJson.author, + license: config.license || basePackageJson.license, + repository: { + ...basePackageJson.repository, + url: `git+https://github.com/${config.githubUser || config.githubOrganisation}/${config.repository}.git`, + directory, + }, + bugs: { + url: `https://github.com/${config.githubUser || config.githubOrganisation}/${config.repository}/issues`, + }, + // Use the GitHub repository hompage at the README fragment as homepage by default. + // For `package.json` files in a monorepo, use the directory of that file as homepage, + // so it is easy to find to the specific code. + homepage: `https://github.com/${config.githubUser || config.githubOrganisation}/${config.repository}/${ + directory ? `tree/${config.defaultBranch}/${directory}#readme` : '#readme' + }`, + }; + + // Remove old `package.json` properties that have been superceded by `exports`, + // such as `main` and `module`. + delete packageJson['main']; + delete packageJson['module']; + delete packageJson['types']; + + const files = await glob('dist/**/*.mjs'); + packageJson.exports = files.reduce((obj, file) => { + // Convert `./dist/example.mjs` to the alias `"./example"` + const shorthand = file.replace(/\.\/dist\//gi, './').replace(/\.mjs/gi, ''); + obj[shorthand] = { + types: `${file}.dt.ts`, + import: file, + }; + return obj; + }, {}); + + packageJson.exports = { + '.': { + types: './dist/index.d.ts', + import: './dist/index.mjs', + }, + './css': { + types: './dist/css.d.ts', + import: './dist/css.mjs', + }, + }; + + if (config.legacyExports) { + const files = await glob('dist/**/*.mjs'); + packageJson.exports = { + ...packageJson.exports, + ...files.reduce((obj, file) => { + const relativePath = `./${file}`; + const ext = extname(relativePath); + const withoutExtension = relativePath.substring(0, relativePath.length - ext.length); + const typesPath = `${withoutExtension}.d.ts`; + const types = existsSync(typesPath) ? typesPath : undefined; + + let desc = relativePath; + if (ext === '.mjs') { + if (types) { + desc = { + types, + import: relativePath, + }; + } + + const directoryIndexRegexp = /\/index$/i; + if (directoryIndexRegexp.test(withoutExtension)) { + const withoutIndex = withoutExtension.replace(directoryIndexRegexp, ''); + obj[withoutIndex] = desc; + } + + obj[withoutExtension] = desc; + } + + if (types && ext === '.mjs') { + const desc2 = { + types, + import: `${withoutExtension}.mjs`, + }; + obj[relativePath] = desc2; + } + return obj; + }, {}), + }; + } + + packageJson = sortPackageJson(packageJson); + + try { + // Write updated package.json + await writeFile( + packagePath, + JSON.stringify(packageJson, null, typeof config.indent === 'number' ? config.indent : 2) + '\n', + ); + + console.log(`Successfully updated ${packagePath}`); + } catch (error) { + console.error(`Error updating ${packagePath}:`, error.message); + } +} + +/** + * Updates all package.json files in a directory and its subdirectories + * @param {string} rootDir - Root directory to start searching from + * @param {Object} config - Custom configuration to apply + */ +async function updateAllPackageJsonFiles(rootDir, config) { + try { + const items = await readdir(rootDir); + + await Promise.all( + items.map(async (item) => { + const fullPath = join(rootDir, item); + const stats = await stat(fullPath); + + if (stats.isDirectory()) { + // Check if directory has package.json + if (existsSync(join(fullPath, 'package.json'))) { + await updatePackageJson(fullPath, config); + } + // Recursively check subdirectories + await updateAllPackageJsonFiles(fullPath, config); + } + }), + ); + } catch (error) { + console.error('Error scanning directories:', error.message); + } +} + +export { updatePackageJson, updateAllPackageJsonFiles }; diff --git a/packages/build-utils-react/src/lib/pnpm.mjs b/packages/build-utils-react/src/lib/pnpm.mjs new file mode 100644 index 00000000000..a53676d87f4 --- /dev/null +++ b/packages/build-utils-react/src/lib/pnpm.mjs @@ -0,0 +1,28 @@ +import { dirname, join } from 'node:path'; +import { existsSync } from 'node:fs'; + +/** + * Finds the root package.json in a pnpm workspace + * @param {string} startPath - Path to start searching from (defaults to current directory) + * @returns {Promise} - Path to the workspace root package.json + * @throws {Error} - If no workspace root is found + */ +export const findWorkspaceRoot = async (startPath) => { + let currentPath = startPath; + + while (currentPath !== dirname(currentPath)) { + // Check for pnpm-workspace.yaml + if (existsSync(join(currentPath, 'pnpm-workspace.yaml'))) { + const packageJsonPath = join(currentPath, 'package.json'); + if (existsSync(packageJsonPath)) { + return currentPath; + } + } + // Move up one directory + currentPath = dirname(currentPath); + } + + throw new Error( + 'No pnpm workspace root found. Please ensure you have a pnpm-workspace.yaml file in your workspace root.', + ); +}; diff --git a/packages/build-utils-react/src/rollup.mjs b/packages/build-utils-react/src/rollup.mjs index 2a9b68a74b7..7aee66f5405 100644 --- a/packages/build-utils-react/src/rollup.mjs +++ b/packages/build-utils-react/src/rollup.mjs @@ -1,44 +1,12 @@ -import babel from '@rollup/plugin-babel'; -import commonjs from '@rollup/plugin-commonjs'; -import json from '@rollup/plugin-json'; import resolve from '@rollup/plugin-node-resolve'; import typescript from '@rollup/plugin-typescript'; import filesize from 'rollup-plugin-filesize'; -import nodeExternal from 'rollup-plugin-node-externals'; import peerDepsExternal from 'rollup-plugin-peer-deps-external'; -import postcss from 'rollup-plugin-postcss'; /** * @type {import('rollup').RollupOptions} */ export const createConfig = () => [ - { - input: './src/index.tsx', - output: [ - { - file: './dist/index.cjs', - format: 'cjs', - sourcemap: true, - }, - ], - plugins: [ - peerDepsExternal(), - commonjs(), - nodeExternal(), - resolve({ browser: true }), - json(), - typescript({ tsconfig: './tsconfig.build.json' }), - babel({ - presets: ['@babel/preset-react'], - babelHelpers: 'runtime', - exclude: ['node_modules/**', 'dist/**'], - extensions: ['.ts', '.tsx'], - inputSourceMap: true, - plugins: ['@babel/plugin-transform-runtime'], - }), - filesize(), - ], - }, { input: './src/index.tsx', output: [ @@ -55,37 +23,6 @@ export const createConfig = () => [ filesize(), ], }, - { - input: './src/css.tsx', - output: [ - { - file: './dist/css.cjs', - format: 'cjs', - sourcemap: true, - }, - ], - plugins: [ - peerDepsExternal(), - commonjs(), - nodeExternal(), - resolve({ browser: true }), - json(), - postcss({ - extensions: ['.css', '.scss'], - minimize: true, - }), - typescript({ tsconfig: './tsconfig.build.json' }), - babel({ - presets: ['@babel/preset-react'], - babelHelpers: 'runtime', - exclude: ['node_modules/**', 'dist/**'], - extensions: ['.ts', '.tsx'], - inputSourceMap: true, - plugins: ['@babel/plugin-transform-runtime'], - }), - filesize(), - ], - }, { input: './src/css.tsx', output: [ diff --git a/packages/component-library-pdf/src/Article.test.tsx b/packages/component-library-pdf/src/Article.test.tsx index 89238824c90..a2b019cfeb8 100644 --- a/packages/component-library-pdf/src/Article.test.tsx +++ b/packages/component-library-pdf/src/Article.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Article, Paragraph } from '@utrecht/component-library-react/src/index'; +import { Article, Paragraph } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Blockquote.test.tsx b/packages/component-library-pdf/src/Blockquote.test.tsx index c5bdb0d5a03..d5b3ba6c226 100644 --- a/packages/component-library-pdf/src/Blockquote.test.tsx +++ b/packages/component-library-pdf/src/Blockquote.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Blockquote, Paragraph } from '@utrecht/component-library-react/src/index'; +import { Blockquote, Paragraph } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Checkbox.test.tsx b/packages/component-library-pdf/src/Checkbox.test.tsx index e6ef1b79206..ebaeddf9ba6 100644 --- a/packages/component-library-pdf/src/Checkbox.test.tsx +++ b/packages/component-library-pdf/src/Checkbox.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Checkbox } from '@utrecht/component-library-react/src/index'; +import { Checkbox } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Code.test.tsx b/packages/component-library-pdf/src/Code.test.tsx index aa8102835b1..bab3236b798 100644 --- a/packages/component-library-pdf/src/Code.test.tsx +++ b/packages/component-library-pdf/src/Code.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Code, Paragraph } from '@utrecht/component-library-react/src/index'; +import { Code, Paragraph } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/CodeBlock.test.tsx b/packages/component-library-pdf/src/CodeBlock.test.tsx index ad66053753b..242fffb2d3c 100644 --- a/packages/component-library-pdf/src/CodeBlock.test.tsx +++ b/packages/component-library-pdf/src/CodeBlock.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { CodeBlock } from '@utrecht/component-library-react/src/index'; +import { CodeBlock } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/ColumnLayout.test.tsx b/packages/component-library-pdf/src/ColumnLayout.test.tsx index 2d27933ceec..c9348b6efa7 100644 --- a/packages/component-library-pdf/src/ColumnLayout.test.tsx +++ b/packages/component-library-pdf/src/ColumnLayout.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { beforeAll, describe, expect, it } from '@jest/globals'; -import { ColumnLayout, Paragraph } from '@utrecht/component-library-react/src/index'; +import { ColumnLayout, Paragraph } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/DataList.test.tsx b/packages/component-library-pdf/src/DataList.test.tsx index d426f1132b5..61c63f06ae3 100644 --- a/packages/component-library-pdf/src/DataList.test.tsx +++ b/packages/component-library-pdf/src/DataList.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { beforeAll, describe, expect, it } from '@jest/globals'; -import { DataList, DataListItem, DataListKey, DataListValue } from '@utrecht/component-library-react/src/index'; +import { DataList, DataListItem, DataListKey, DataListValue } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/FormFieldCheckbox.test.tsx b/packages/component-library-pdf/src/FormFieldCheckbox.test.tsx index da90682e67f..7ac76ef0ad4 100644 --- a/packages/component-library-pdf/src/FormFieldCheckbox.test.tsx +++ b/packages/component-library-pdf/src/FormFieldCheckbox.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { beforeAll, describe, expect, it } from '@jest/globals'; -import { FormFieldCheckbox, Link, Paragraph } from '@utrecht/component-library-react/src/index'; +import { FormFieldCheckbox, Link, Paragraph } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/FormFieldTextarea.test.tsx b/packages/component-library-pdf/src/FormFieldTextarea.test.tsx index f9d39cb79a6..bc023089844 100644 --- a/packages/component-library-pdf/src/FormFieldTextarea.test.tsx +++ b/packages/component-library-pdf/src/FormFieldTextarea.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { FormFieldTextarea } from '@utrecht/component-library-react/src/index'; +import { FormFieldTextarea } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/FormFieldTextbox.test.tsx b/packages/component-library-pdf/src/FormFieldTextbox.test.tsx index 45994017dfa..0097de597e7 100644 --- a/packages/component-library-pdf/src/FormFieldTextbox.test.tsx +++ b/packages/component-library-pdf/src/FormFieldTextbox.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { FormFieldTextbox } from '@utrecht/component-library-react/src/index'; +import { FormFieldTextbox } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/FormLabel.test.tsx b/packages/component-library-pdf/src/FormLabel.test.tsx index 168b0b13cf7..6f803261885 100644 --- a/packages/component-library-pdf/src/FormLabel.test.tsx +++ b/packages/component-library-pdf/src/FormLabel.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { FormLabel } from '@utrecht/component-library-react/src/index'; +import { FormLabel } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Heading.test.tsx b/packages/component-library-pdf/src/Heading.test.tsx index 0b7f09cf031..b5fb046f877 100644 --- a/packages/component-library-pdf/src/Heading.test.tsx +++ b/packages/component-library-pdf/src/Heading.test.tsx @@ -9,7 +9,7 @@ import { Heading5, Heading6, Paragraph, -} from '@utrecht/component-library-react/src/index'; +} from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Heading1.test.tsx b/packages/component-library-pdf/src/Heading1.test.tsx index f51a0a3db76..3b4a731691e 100644 --- a/packages/component-library-pdf/src/Heading1.test.tsx +++ b/packages/component-library-pdf/src/Heading1.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Heading1 } from '@utrecht/component-library-react/src/index'; +import { Heading1 } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Heading2.test.tsx b/packages/component-library-pdf/src/Heading2.test.tsx index 67493258af4..14370e25278 100644 --- a/packages/component-library-pdf/src/Heading2.test.tsx +++ b/packages/component-library-pdf/src/Heading2.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Heading1, Heading2 } from '@utrecht/component-library-react/src/index'; +import { Heading1, Heading2 } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Heading3.test.tsx b/packages/component-library-pdf/src/Heading3.test.tsx index aa4961aef9d..bb501a23c75 100644 --- a/packages/component-library-pdf/src/Heading3.test.tsx +++ b/packages/component-library-pdf/src/Heading3.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Heading1, Heading2, Heading3 } from '@utrecht/component-library-react/src/index'; +import { Heading1, Heading2, Heading3 } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Heading4.test.tsx b/packages/component-library-pdf/src/Heading4.test.tsx index 604ecb466ff..ec56fa5ccc9 100644 --- a/packages/component-library-pdf/src/Heading4.test.tsx +++ b/packages/component-library-pdf/src/Heading4.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Heading1, Heading2, Heading3, Heading4 } from '@utrecht/component-library-react/src/index'; +import { Heading1, Heading2, Heading3, Heading4 } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Heading5.test.tsx b/packages/component-library-pdf/src/Heading5.test.tsx index 1ec0c3114c1..e10022b9bf5 100644 --- a/packages/component-library-pdf/src/Heading5.test.tsx +++ b/packages/component-library-pdf/src/Heading5.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Heading1, Heading2, Heading3, Heading4, Heading5 } from '@utrecht/component-library-react/src/index'; +import { Heading1, Heading2, Heading3, Heading4, Heading5 } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Heading6.test.tsx b/packages/component-library-pdf/src/Heading6.test.tsx index dbbe2b146f2..2f4a42e39d6 100644 --- a/packages/component-library-pdf/src/Heading6.test.tsx +++ b/packages/component-library-pdf/src/Heading6.test.tsx @@ -1,7 +1,14 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Heading1, Heading2, Heading3, Heading4, Heading5, Heading6 } from '@utrecht/component-library-react/src/index'; +import { + Heading1, + Heading2, + Heading3, + Heading4, + Heading5, + Heading6, +} from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Image.test.tsx b/packages/component-library-pdf/src/Image.test.tsx index 8907ed55d56..4ad9761349f 100644 --- a/packages/component-library-pdf/src/Image.test.tsx +++ b/packages/component-library-pdf/src/Image.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { beforeAll, describe, expect, it } from '@jest/globals'; -import { Image } from '@utrecht/component-library-react/src/index'; +import { Image } from '@utrecht/component-library-react/dist/index'; import { readFile } from 'fs/promises'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/LangSpan.test.tsx b/packages/component-library-pdf/src/LangSpan.test.tsx index 255dfd24627..2759f98d2cb 100644 --- a/packages/component-library-pdf/src/LangSpan.test.tsx +++ b/packages/component-library-pdf/src/LangSpan.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { beforeAll, describe, expect, it } from '@jest/globals'; -import { Paragraph } from '@utrecht/component-library-react/src/index'; +import { Paragraph } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Link.test.tsx b/packages/component-library-pdf/src/Link.test.tsx index b66144460f8..8187476eb69 100644 --- a/packages/component-library-pdf/src/Link.test.tsx +++ b/packages/component-library-pdf/src/Link.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Link, Paragraph } from '@utrecht/component-library-react/src/index'; +import { Link, Paragraph } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Logo.test.tsx b/packages/component-library-pdf/src/Logo.test.tsx index f14ae6810d1..50d9e0eb130 100644 --- a/packages/component-library-pdf/src/Logo.test.tsx +++ b/packages/component-library-pdf/src/Logo.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Logo, LogoImage } from '@utrecht/component-library-react/src/index'; +import { Logo, LogoImage } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/OrderedList.test.tsx b/packages/component-library-pdf/src/OrderedList.test.tsx index ae6f60e75ae..3e8a976c0ba 100644 --- a/packages/component-library-pdf/src/OrderedList.test.tsx +++ b/packages/component-library-pdf/src/OrderedList.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { beforeAll, describe, expect, it } from '@jest/globals'; -import { OrderedList, OrderedListItem } from '@utrecht/component-library-react/src/index'; +import { OrderedList, OrderedListItem } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Page.test.tsx b/packages/component-library-pdf/src/Page.test.tsx index 379017ffd07..dec13609ec8 100644 --- a/packages/component-library-pdf/src/Page.test.tsx +++ b/packages/component-library-pdf/src/Page.test.tsx @@ -2,7 +2,7 @@ /* eslint-disable react/no-unescaped-entities */ import { describe, expect, it } from '@jest/globals'; -import { Heading1 } from '@utrecht/component-library-react/src/index'; +import { Heading1 } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Paragraph.test.tsx b/packages/component-library-pdf/src/Paragraph.test.tsx index 00ac86a2ed7..e512826c6c8 100644 --- a/packages/component-library-pdf/src/Paragraph.test.tsx +++ b/packages/component-library-pdf/src/Paragraph.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Paragraph } from '@utrecht/component-library-react/src/index'; +import { Paragraph } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Quote.test.tsx b/packages/component-library-pdf/src/Quote.test.tsx index 9cd4b37513a..95154f6ab09 100644 --- a/packages/component-library-pdf/src/Quote.test.tsx +++ b/packages/component-library-pdf/src/Quote.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Paragraph } from '@utrecht/component-library-react/src/index'; +import { Paragraph } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/RadioButton.test.tsx b/packages/component-library-pdf/src/RadioButton.test.tsx index 42f0edc003b..e753f41b04e 100644 --- a/packages/component-library-pdf/src/RadioButton.test.tsx +++ b/packages/component-library-pdf/src/RadioButton.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { RadioButton } from '@utrecht/component-library-react/src/index'; +import { RadioButton } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Section.test.tsx b/packages/component-library-pdf/src/Section.test.tsx index a9baeb381fa..2c955a0dced 100644 --- a/packages/component-library-pdf/src/Section.test.tsx +++ b/packages/component-library-pdf/src/Section.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Paragraph } from '@utrecht/component-library-react/src/index'; +import { Paragraph } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Table.test.tsx b/packages/component-library-pdf/src/Table.test.tsx index 8f2873165ec..3413023d99f 100644 --- a/packages/component-library-pdf/src/Table.test.tsx +++ b/packages/component-library-pdf/src/Table.test.tsx @@ -10,7 +10,7 @@ import { TableHeader, TableHeaderCell, TableRow, -} from '@utrecht/component-library-react/src/index'; +} from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/TableOfContents.test.tsx b/packages/component-library-pdf/src/TableOfContents.test.tsx index 4a5e5667378..cc1cc43e008 100644 --- a/packages/component-library-pdf/src/TableOfContents.test.tsx +++ b/packages/component-library-pdf/src/TableOfContents.test.tsx @@ -8,7 +8,7 @@ import { TableOfContentsLink, TableOfContentsList, TableOfContentsListItem, -} from '@utrecht/component-library-react/src/index'; +} from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Textarea.test.tsx b/packages/component-library-pdf/src/Textarea.test.tsx index 288298249cd..88942e30b49 100644 --- a/packages/component-library-pdf/src/Textarea.test.tsx +++ b/packages/component-library-pdf/src/Textarea.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Textarea } from '@utrecht/component-library-react/src/index'; +import { Textarea } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/Textbox.test.tsx b/packages/component-library-pdf/src/Textbox.test.tsx index cb35ccdca85..fab69c16ac5 100644 --- a/packages/component-library-pdf/src/Textbox.test.tsx +++ b/packages/component-library-pdf/src/Textbox.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { describe, expect, it } from '@jest/globals'; -import { Textbox } from '@utrecht/component-library-react/src/index'; +import { Textbox } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/UnorderedList.test.tsx b/packages/component-library-pdf/src/UnorderedList.test.tsx index 445dd8313bd..76d195f2a37 100644 --- a/packages/component-library-pdf/src/UnorderedList.test.tsx +++ b/packages/component-library-pdf/src/UnorderedList.test.tsx @@ -1,7 +1,7 @@ /* eslint-env jest */ import { beforeAll, describe, expect, it } from '@jest/globals'; -import { UnorderedList, UnorderedListItem } from '@utrecht/component-library-react/src/index'; +import { UnorderedList, UnorderedListItem } from '@utrecht/component-library-react/dist/index'; import React from 'react'; import { renderPdf } from './lib'; diff --git a/packages/component-library-pdf/src/lib.tsx b/packages/component-library-pdf/src/lib.tsx index ee6afb84c3b..08d7fb3367a 100644 --- a/packages/component-library-pdf/src/lib.tsx +++ b/packages/component-library-pdf/src/lib.tsx @@ -1,5 +1,5 @@ /* eslint-env node */ -import { Document } from '@utrecht/component-library-react/src/index'; +import { Document } from '@utrecht/component-library-react/dist/index'; import { exec, execFile } from 'node:child_process'; import { createHmac } from 'node:crypto'; import { mkdir, readFile, writeFile } from 'node:fs/promises'; diff --git a/packages/component-library-react/package.json b/packages/component-library-react/package.json index f8b0ab3c0ea..fd9868fdbbc 100644 --- a/packages/component-library-react/package.json +++ b/packages/component-library-react/package.json @@ -1,40 +1,108 @@ { + "name": "@utrecht/component-library-react", "version": "7.3.5", - "author": "Community for NL Design System", + "private": false, "description": "React component library bundle for the Municipality of Utrecht based on the NL Design System architecture", - "license": "EUPL-1.2", - "name": "@utrecht/component-library-react", "keywords": [ "nl-design-system" ], - "private": false, - "publishConfig": { - "access": "public" + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/component-library-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" }, "repository": { "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", + "url": "git+https://github.com/nl-design-system/utrecht.git", "directory": "packages/component-library-react" }, + "license": "EUPL-1.2", + "author": "Community for NL Design System", "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/.jest-test-results.json": "./dist/.jest-test-results.json", + "./CONTRIBUTING.md": "./CONTRIBUTING.md", + "./CHANGELOG.md": "./CHANGELOG.md", + "./README.md": "./README.md", + "./README.nl.md": "./README.nl.md", + "./TESTING.md": "./TESTING.md", + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/VegaVisualization": { + "types": "./dist/VegaVisualization.d.ts", + "import": "./dist/VegaVisualization.mjs" + }, + "./dist/VegaVisualization.mjs": { + "types": "./dist/VegaVisualization.d.ts", + "import": "./dist/VegaVisualization.mjs" + }, + "./dist/Calendar": { + "types": "./dist/Calendar.d.ts", + "import": "./dist/Calendar.mjs" + }, + "./dist/Calendar.mjs": { + "types": "./dist/Calendar.d.ts", + "import": "./dist/Calendar.mjs" + }, + "./dist/css-module": { + "types": "./dist/css-module/index.d.ts", + "import": "./dist/css-module/index.mjs" + }, + "./dist/css-module/index": { + "types": "./dist/css-module/index.d.ts", + "import": "./dist/css-module/index.mjs" + }, + "./dist/css-module/index.mjs": { + "types": "./dist/css-module/index.d.ts", + "import": "./dist/css-module/index.mjs" + }, + "./dist/css-module/VegaVisualization": { + "types": "./dist/css-module/VegaVisualization.d.ts", + "import": "./dist/css-module/VegaVisualization.mjs" + }, + "./dist/css-module/VegaVisualization.mjs": { + "types": "./dist/css-module/VegaVisualization.d.ts", + "import": "./dist/css-module/VegaVisualization.mjs" + }, + "./dist/css-module/Calendar": { + "types": "./dist/css-module/Calendar.d.ts", + "import": "./dist/css-module/Calendar.mjs" + }, + "./dist/css-module/Calendar.mjs": { + "types": "./dist/css-module/Calendar.d.ts", + "import": "./dist/css-module/Calendar.mjs" + } + }, + "files": [ + "dist/", + "*.md" + ], "scripts": { "build": "pnpm run '/^build:.*/'", "build:rollup": "rollup --config rollup.config.mjs", "build:rollup-components": "rollup --config rollup-components.config.mjs", "build:test-results": "mkdir -p dist pages && jest --json --outputFile=dist/.jest-test-results.json --silent", "clean": "rimraf dist/ pages/ .rollup.cache/ .swc", + "init": "init-react-package", "lint-build": "tsc --project ./tsconfig.json --noEmit && tsc --project ./tsconfig.test.json", "test": "mkdir -p pages && jest --coverage --verbose", "watch:build": "rollup -c --watch", "watch:test": "jest --verbose --watch" }, - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", - "files": [ - "dist/", - "*.md" - ], "dependencies": { "@utrecht/button-react": "workspace:*", "@utrecht/calendar-react": "workspace:*", @@ -64,6 +132,7 @@ "@rollup/plugin-commonjs": "26.0.1", "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "15.2.3", + "@rollup/plugin-typescript": "12.1.0", "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "5.17.0", "@testing-library/react": "13.4.0", @@ -84,6 +153,7 @@ "@utrecht/badge-status-css": "workspace:*", "@utrecht/blockquote-css": "workspace:*", "@utrecht/breadcrumb-nav-css": "workspace:*", + "@utrecht/build-utils-react": "workspace:*", "@utrecht/button-group-css": "workspace:*", "@utrecht/button-link-css": "workspace:*", "@utrecht/code-block-css": "workspace:*", @@ -162,7 +232,7 @@ "react-dom": "18.3.1", "react-vega": "7.6.0", "rimraf": "5.0.7", - "rollup": "4.18.0", + "rollup": "4.23.0", "rollup-plugin-delete": "2.0.0", "rollup-plugin-filesize": "10.0.0", "rollup-plugin-node-externals": "7.1.2", @@ -171,6 +241,7 @@ "rollup-plugin-postcss": "4.0.2", "rollup-plugin-typescript2": "0.36.0", "sass": "1.69.5", + "sort-package-json": "2.11.0", "tslib": "2.6.2", "typescript": "5.6.2", "vega": "5.26.1", @@ -195,5 +266,8 @@ "vega": { "optional": true } + }, + "publishConfig": { + "access": "public" } } diff --git a/packages/component-library-react/rollup-component-package.mjs b/packages/component-library-react/rollup-component-package.mjs deleted file mode 100644 index fb6fa1e817e..00000000000 --- a/packages/component-library-react/rollup-component-package.mjs +++ /dev/null @@ -1,106 +0,0 @@ -import babel from '@rollup/plugin-babel'; -import commonjs from '@rollup/plugin-commonjs'; -import json from '@rollup/plugin-json'; -import resolve from '@rollup/plugin-node-resolve'; -import { readFileSync } from 'fs'; -import filesize from 'rollup-plugin-filesize'; -import nodeExternal from 'rollup-plugin-node-externals'; -import nodePolyfills from 'rollup-plugin-node-polyfills'; -import peerDepsExternal from 'rollup-plugin-peer-deps-external'; -import postcss from 'rollup-plugin-postcss'; -import typescript from 'rollup-plugin-typescript2'; - -export const createComponentPackageConfig = (path) => { - const packagePath = new URL('./package.json', path).pathname; - const packageJson = JSON.parse(readFileSync(packagePath, 'utf8')); - - const outputGlobals = { - react: 'React', - 'react-dom': 'ReactDOM', - }; - - /** - * @type {import('rollup').RollupOptions} - */ - return [ - { - input: new URL('./src/index.tsx', path).pathname, - output: [ - { - file: packageJson.main, - format: 'cjs', - sourcemap: true, - globals: outputGlobals, - }, - { - file: packageJson.module, - format: 'esm', - sourcemap: true, - globals: outputGlobals, - }, - ], - plugins: [ - peerDepsExternal(), - nodeExternal(), - resolve({ browser: true }), - commonjs({ - include: /node_modules/, - }), - nodePolyfills(), - typescript({ includeDependencies: false }), - json(), - babel({ - presets: ['@babel/preset-react'], - babelHelpers: 'runtime', - exclude: ['node_modules/**', 'dist/**'], - extensions: ['.ts', '.tsx'], - inputSourceMap: true, - plugins: ['@babel/plugin-transform-runtime'], - }), - filesize(), - ], - }, - { - input: new URL('./src/css.tsx', path).pathname, - output: [ - { - file: 'dist/css.js', - format: 'cjs', - sourcemap: true, - globals: outputGlobals, - }, - { - file: 'dist/css.mjs', - format: 'esm', - sourcemap: true, - globals: outputGlobals, - }, - ], - external: [/@babel\/runtime/, 'react-dom', 'react'], - plugins: [ - peerDepsExternal({ includeDependencies: true }), - nodeExternal(), - resolve({ browser: true }), - commonjs({ - include: /node_modules/, - }), - nodePolyfills(), - postcss({ - extensions: ['.css', '.scss'], - minimize: true, - }), - typescript({ includeDependencies: false }), - json(), - babel({ - presets: ['@babel/preset-react'], - babelHelpers: 'runtime', - exclude: ['node_modules/**', 'dist/**'], - extensions: ['.ts', '.tsx'], - inputSourceMap: true, - plugins: ['@babel/plugin-transform-runtime'], - }), - filesize(), - ], - }, - ]; -}; diff --git a/packages/component-library-react/rollup-components.config.mjs b/packages/component-library-react/rollup-components.config.mjs index 6b4b519c348..b0b00e9b5a7 100644 --- a/packages/component-library-react/rollup-components.config.mjs +++ b/packages/component-library-react/rollup-components.config.mjs @@ -10,6 +10,7 @@ import nodePolyfills from 'rollup-plugin-node-polyfills'; import peerDepsExternal from 'rollup-plugin-peer-deps-external'; import postcss from 'rollup-plugin-postcss'; import typescript from 'rollup-plugin-typescript2'; + // `assert` is not yet supported by ESLint // import packageJson from './package.json' assert { type: 'json' }; @@ -29,12 +30,6 @@ let components = ['Calendar', 'VegaVisualization']; const createComponentConfig = (name, { css }) => ({ input: css ? `src/css-module/${name}.tsx` : `src/${name}.tsx`, output: [ - { - file: css ? `dist/css-module/${name}.js` : `dist/${name}.js`, - format: 'cjs', - sourcemap: true, - globals: outputGlobals, - }, { file: css ? `dist/css-module/${name}.mjs` : `dist/${name}.mjs`, format: 'esm', @@ -56,7 +51,9 @@ const createComponentConfig = (name, { css }) => ({ extensions: ['.css', '.scss'], minimize: true, }), - typescript({ includeDependencies: false }), + typescript({ + tsconfig: css ? './tsconfig.build-css-module.json' : './tsconfig.build.json', + }), babel({ presets: ['@babel/preset-react'], babelHelpers: 'runtime', diff --git a/packages/component-library-react/rollup.config.mjs b/packages/component-library-react/rollup.config.mjs index 6ceacd85bd5..91e4752e4d7 100644 --- a/packages/component-library-react/rollup.config.mjs +++ b/packages/component-library-react/rollup.config.mjs @@ -1,21 +1,11 @@ import babel from '@rollup/plugin-babel'; import commonjs from '@rollup/plugin-commonjs'; -import json from '@rollup/plugin-json'; import resolve from '@rollup/plugin-node-resolve'; -// import del from 'rollup-plugin-delete'; -import { readFileSync } from 'fs'; +import typescript from 'rollup-plugin-typescript2'; import filesize from 'rollup-plugin-filesize'; import nodeExternal from 'rollup-plugin-node-externals'; -import nodePolyfills from 'rollup-plugin-node-polyfills'; import peerDepsExternal from 'rollup-plugin-peer-deps-external'; -import postcss from 'rollup-plugin-postcss'; -import typescript from 'rollup-plugin-typescript2'; -// `assert` is not yet supported by ESLint -// import packageJson from './package.json' assert { type: 'json' }; - -const packageJson = JSON.parse(readFileSync('./package.json', 'utf8')); -// rollup.config.js /** * @type {import('rollup').RollupOptions} */ @@ -27,81 +17,68 @@ export const outputGlobals = { export default [ { - input: 'src/index.ts', + input: './src/index.ts', output: [ { - file: packageJson.main, - format: 'cjs', - sourcemap: true, - globals: outputGlobals, - }, - { - file: packageJson.module, - format: 'esm', + file: './dist/index.mjs', + format: 'es', sourcemap: true, globals: outputGlobals, }, ], plugins: [ peerDepsExternal(), - nodeExternal(), - resolve({ browser: true }), + + // Convert CommonJS modules to ES Modules commonjs({ include: /node_modules/, }), - nodePolyfills(), - // del({ targets: ['dist/*', 'pages/*'] }), - typescript({ includeDependencies: false }), - json(), + // Inline imports from `devDependencies` + // Leave `dependencies` and `devDependencies` imports as is. + // See: https://www.npmjs.com/package/rollup-plugin-node-externals + nodeExternal(), + resolve(), + typescript({ tsconfig: './tsconfig.build.json' }), babel({ presets: ['@babel/preset-react'], babelHelpers: 'runtime', exclude: ['node_modules/**', 'dist/**'], extensions: ['.ts', '.tsx'], - inputSourceMap: true, + // inputSourceMap: true, plugins: ['@babel/plugin-transform-runtime'], }), filesize(), ], }, { - input: 'src/css-module/index.ts', + input: './src/css-module/index.ts', output: [ { - file: 'dist/css-module/index.cjs', - format: 'cjs', - sourcemap: true, - globals: outputGlobals, - }, - { - file: 'dist/css-module/index.mjs', - format: 'esm', + file: './dist/css-module/index.mjs', + format: 'es', sourcemap: true, globals: outputGlobals, }, ], - external: [/@babel\/runtime/, 'react-dom', 'react'], plugins: [ - peerDepsExternal({ includeDependencies: true }), - nodeExternal(), - resolve({ browser: true }), + peerDepsExternal(), + + // Convert CommonJS modules to ES Modules commonjs({ include: /node_modules/, }), - nodePolyfills(), - // del({ targets: ['dist/*', 'pages/*'] }), - postcss({ - extensions: ['.css', '.scss'], - minimize: true, - }), - typescript({ includeDependencies: false }), - json(), + // Inline imports from `devDependencies` + // Leave `dependencies` and `devDependencies` imports as is. + // See: https://www.npmjs.com/package/rollup-plugin-node-externals + nodeExternal(), + resolve(), + typescript({ tsconfig: './tsconfig.build-css-module.json' }), babel({ presets: ['@babel/preset-react'], babelHelpers: 'runtime', exclude: ['node_modules/**', 'dist/**'], extensions: ['.ts', '.tsx'], - inputSourceMap: true, + // inputSourceMap: true, plugins: ['@babel/plugin-transform-runtime'], }), filesize(), diff --git a/packages/component-library-react/tsconfig.build-css-module.json b/packages/component-library-react/tsconfig.build-css-module.json new file mode 100644 index 00000000000..59059681951 --- /dev/null +++ b/packages/component-library-react/tsconfig.build-css-module.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": true, + "outDir": "./dist/css-module/", + "rootDir": "./src/" + } +} diff --git a/packages/component-library-react/tsconfig.json b/packages/component-library-react/tsconfig.json index ea004041acd..bdbe83e3f1a 100644 --- a/packages/component-library-react/tsconfig.json +++ b/packages/component-library-react/tsconfig.json @@ -9,7 +9,7 @@ { "path": "../components-react/calendar-react/tsconfig.build.json" } ], "compilerOptions": { - "outDir": "dist", - "rootDir": "src" + "outDir": "./dist/", + "rootDir": "./src/" } } diff --git a/packages/components-react/body-react/package.json b/packages/components-react/body-react/package.json index 825fd82398d..ab1bd7053b6 100644 --- a/packages/components-react/body-react/package.json +++ b/packages/components-react/body-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/body-react", "version": "0.0.1", - "author": "Community for NL Design System", "description": "Body component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/body-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/body-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs.js", - "module": "./dist/index.esm.js", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -26,31 +70,20 @@ "@types/jest": "29.5.13", "@types/react": "18.3.3", "@types/testing-library__jest-dom": "5.14.9", - "@utrecht/build-utils-react": "workspace:*", "@utrecht/body-css": "workspace:*", + "@utrecht/build-utils-react": "workspace:*", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "react": "18.3.1", "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/body-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/button-react/package.json b/packages/components-react/button-react/package.json index a2d732bce21..823c6cc779f 100644 --- a/packages/components-react/button-react/package.json +++ b/packages/components-react/button-react/package.json @@ -1,23 +1,58 @@ { "name": "@utrecht/button-react", "version": "2.0.2", - "author": "Community for NL Design System", "description": "Button component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/button-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/button-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": "./dist/index.mjs", + "./dist/index": "./dist/index.mjs", + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", + "init2": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +69,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/button-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/calendar-react/package.json b/packages/components-react/calendar-react/package.json index 4359568297a..4e74b0927cf 100644 --- a/packages/components-react/calendar-react/package.json +++ b/packages/components-react/calendar-react/package.json @@ -1,23 +1,71 @@ { "name": "@utrecht/calendar-react", "version": "1.0.5", - "author": "Community for NL Design System", "description": "Calendar component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/calendar-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/calendar-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup -c ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "disabled-test": "mkdir -p pages && jest --coverage --verbose", + "init": "init-react-package", "typecheck": "tsc --noEmit" }, + "dependencies": { + "@utrecht/button-react": "workspace:*", + "@utrecht/calendar-css": "workspace:*", + "clsx": "2.1.1", + "date-fns": "2.30.0", + "lodash-es": "4.17.21" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,27 +82,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/calendar-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "@utrecht/button-react": "workspace:*", - "@utrecht/calendar-css": "workspace:*", - "clsx": "2.1.1", - "date-fns": "2.30.0", - "lodash-es": "4.17.21" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/checkbox-group-react/package.json b/packages/components-react/checkbox-group-react/package.json index 5e2433f8cdb..d5eda5c8771 100644 --- a/packages/components-react/checkbox-group-react/package.json +++ b/packages/components-react/checkbox-group-react/package.json @@ -1,23 +1,73 @@ { "name": "@utrecht/checkbox-group-react", "version": "1.0.4", - "author": "Community for NL Design System", "description": "Checkbox Group component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/checkbox-group-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/checkbox-group-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "@utrecht/checkbox-react": "workspace:*", + "@utrecht/fieldset-react": "workspace:*", + "@utrecht/form-field-checkbox-react": "workspace:*", + "@utrecht/form-field-description-react": "workspace:*", + "@utrecht/form-field-error-message-react": "workspace:*", + "@utrecht/form-field-react": "workspace:*", + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,29 +84,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/form-field-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "@utrecht/checkbox-react": "workspace:*", - "@utrecht/fieldset-react": "workspace:*", - "@utrecht/form-field-checkbox-react": "workspace:*", - "@utrecht/form-field-description-react": "workspace:*", - "@utrecht/form-field-error-message-react": "workspace:*", - "@utrecht/form-field-react": "workspace:*", - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/checkbox-react/package.json b/packages/components-react/checkbox-react/package.json index ddb3c765fdf..d453338117d 100644 --- a/packages/components-react/checkbox-react/package.json +++ b/packages/components-react/checkbox-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/checkbox-react", "version": "1.0.2", - "author": "Community for NL Design System", "description": "Checkbox component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/checkbox-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/checkbox-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -35,23 +79,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/form-field-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/combobox-react/package.json b/packages/components-react/combobox-react/package.json index 5828e5cc850..a42cd10e5d3 100644 --- a/packages/components-react/combobox-react/package.json +++ b/packages/components-react/combobox-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/combobox-react", "version": "0.0.3", - "author": "Community for NL Design System", "description": "Combobox component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/combobox-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/combobox-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/component-library-react/packages/combobox-react" - }, "peerDependencies": { "@babel/runtime": "^7.23.6", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/fieldset-react/package.json b/packages/components-react/fieldset-react/package.json index ae17dccab87..8f19284b5f2 100644 --- a/packages/components-react/fieldset-react/package.json +++ b/packages/components-react/fieldset-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/fieldset-react", "version": "1.0.2", - "author": "Community for NL Design System", "description": "Fieldset component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/fieldset-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/fieldset-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/form-field-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/form-field-checkbox-react/package.json b/packages/components-react/form-field-checkbox-react/package.json index e00c9223d4b..69f4935a131 100644 --- a/packages/components-react/form-field-checkbox-react/package.json +++ b/packages/components-react/form-field-checkbox-react/package.json @@ -1,23 +1,72 @@ { "name": "@utrecht/form-field-checkbox-react", "version": "1.0.4", - "author": "Community for NL Design System", "description": "Form Field Checkbox component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/form-field-checkbox-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/form-field-checkbox-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "@utrecht/checkbox-react": "workspace:*", + "@utrecht/form-field-description-react": "workspace:*", + "@utrecht/form-field-error-message-react": "workspace:*", + "@utrecht/form-field-react": "workspace:*", + "@utrecht/form-label-react": "workspace:*", + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -33,28 +82,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/form-field-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "@utrecht/checkbox-react": "workspace:*", - "@utrecht/form-field-description-react": "workspace:*", - "@utrecht/form-field-error-message-react": "workspace:*", - "@utrecht/form-field-react": "workspace:*", - "@utrecht/form-label-react": "workspace:*", - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/form-field-checkbox-react/src/index.test.tsx b/packages/components-react/form-field-checkbox-react/src/index.test.tsx index d5dc3fe0eb7..55a6194e6fa 100644 --- a/packages/components-react/form-field-checkbox-react/src/index.test.tsx +++ b/packages/components-react/form-field-checkbox-react/src/index.test.tsx @@ -324,7 +324,7 @@ describe('Form field with a checkbox', () => { expect(handleChange).toHaveBeenCalled(); }); - it.only('has an HTMLInputElement event target', () => { + it('has an HTMLInputElement event target', () => { const handleChange = (evt: ChangeEvent) => {}; const handleChangeSpy = jest.fn(handleChange); diff --git a/packages/components-react/form-field-checkbox-react/src/index.tsx b/packages/components-react/form-field-checkbox-react/src/index.tsx index 98e1a9df29c..a54768ba98b 100644 --- a/packages/components-react/form-field-checkbox-react/src/index.tsx +++ b/packages/components-react/form-field-checkbox-react/src/index.tsx @@ -10,29 +10,26 @@ import type { ForwardedRef, PropsWithChildren, ReactNode, Ref } from 'react'; import { forwardRef, useId } from 'react'; export interface FormFieldCheckboxProps - extends Omit, - Pick< - CheckboxProps, - | 'checked' - | 'defaultChecked' - | 'defaultValue' - | 'disabled' - | 'indeterminate' - | 'inputRequired' - | 'invalid' - | 'name' - | 'onBlur' - | 'onChange' - | 'onFocus' - | 'onInput' - | 'required' - | 'value' - > { + extends Omit { + checked?: CheckboxProps['checked']; + defaultChecked?: CheckboxProps['defaultChecked']; + defaultValue?: CheckboxProps['defaultValue']; description?: ReactNode; + disabled?: CheckboxProps['disabled']; errorMessage?: ReactNode; + indeterminate?: CheckboxProps['indeterminate']; inputRef?: Ref; + inputRequired?: CheckboxProps['inputRequired']; + invalid?: CheckboxProps['invalid']; label: ReactNode; + name?: CheckboxProps['name']; + onBlur?: CheckboxProps['onBlur']; + onChange?: CheckboxProps['onChange']; + onFocus?: CheckboxProps['onFocus']; + onInput?: CheckboxProps['onInput']; + required?: CheckboxProps['required']; status?: ReactNode; + value?: CheckboxProps['value']; } export const FormFieldCheckbox = forwardRef( diff --git a/packages/components-react/form-field-description-react/package.json b/packages/components-react/form-field-description-react/package.json index 37add15adb3..abec32b0597 100644 --- a/packages/components-react/form-field-description-react/package.json +++ b/packages/components-react/form-field-description-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/form-field-description-react", "version": "1.0.2", - "author": "Community for NL Design System", "description": "Form Field Description component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/form-field-description-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/form-field-description-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/form-field-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/form-field-error-message-react/package.json b/packages/components-react/form-field-error-message-react/package.json index 9636b1f8432..2f090b88c0a 100644 --- a/packages/components-react/form-field-error-message-react/package.json +++ b/packages/components-react/form-field-error-message-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/form-field-error-message-react", "version": "1.0.2", - "author": "Community for NL Design System", "description": "Form Field Error Message component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/form-field-error-message-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/form-field-error-message-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/form-field-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/form-field-react/package.json b/packages/components-react/form-field-react/package.json index ca4490a7a3d..30b91e7e46d 100644 --- a/packages/components-react/form-field-react/package.json +++ b/packages/components-react/form-field-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/form-field-react", "version": "1.0.2", - "author": "Community for NL Design System", "description": "Form Field component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/form-field-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/form-field-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/form-field-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/form-label-react/package.json b/packages/components-react/form-label-react/package.json index 2a69dc632f3..9f1a8d92835 100644 --- a/packages/components-react/form-label-react/package.json +++ b/packages/components-react/form-label-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/form-label-react", "version": "1.0.2", - "author": "Community for NL Design System", "description": "Form Label component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/form-label-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/form-label-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/form-label-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/link-react/package.json b/packages/components-react/link-react/package.json index a9a0b53bb25..3edaa76d71d 100644 --- a/packages/components-react/link-react/package.json +++ b/packages/components-react/link-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/link-react", "version": "1.0.2", - "author": "Community for NL Design System", "description": "Link component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/link-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/link-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/link-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/listbox-react/package.json b/packages/components-react/listbox-react/package.json index 4cde8e0323e..e18ab39b4ab 100644 --- a/packages/components-react/listbox-react/package.json +++ b/packages/components-react/listbox-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/listbox-react", "version": "1.0.3", - "author": "Community for NL Design System", "description": "Listbox component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/listbox-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/listbox-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/listbox-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/nav-bar-react/package.json b/packages/components-react/nav-bar-react/package.json index 1092f32eecb..241a72c22e2 100644 --- a/packages/components-react/nav-bar-react/package.json +++ b/packages/components-react/nav-bar-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/nav-bar-react", "version": "1.0.1", - "author": "Community for NL Design System", "description": "Navigation Bar component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/nav-bar-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/nav-bar-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs.js", - "module": "./dist/index.esm.js", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/nav-bar-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/page-body-react/package.json b/packages/components-react/page-body-react/package.json index 08e3d17bc81..322eefaf83d 100644 --- a/packages/components-react/page-body-react/package.json +++ b/packages/components-react/page-body-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/page-body-react", "version": "1.0.1", - "author": "Community for NL Design System", "description": "Page Body component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/page-body-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/page-body-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs.js", - "module": "./dist/index.esm.js", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/page-body-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/page-footer-react/package.json b/packages/components-react/page-footer-react/package.json index 6fb34bcce4a..90369db234b 100644 --- a/packages/components-react/page-footer-react/package.json +++ b/packages/components-react/page-footer-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/page-footer-react", "version": "1.0.1", - "author": "Community for NL Design System", "description": "Page Footer component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/page-footer-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/page-footer-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs.js", - "module": "./dist/index.esm.js", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/page-footer-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/page-header-react/package.json b/packages/components-react/page-header-react/package.json index e9a88c64332..df262f50bac 100644 --- a/packages/components-react/page-header-react/package.json +++ b/packages/components-react/page-header-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/page-header-react", "version": "1.0.1", - "author": "Community for NL Design System", "description": "Page Header component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/page-header-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/page-header-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs.js", - "module": "./dist/index.esm.js", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/page-header-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/page-layout-react/package.json b/packages/components-react/page-layout-react/package.json index 103429d324b..113da3f7be5 100644 --- a/packages/components-react/page-layout-react/package.json +++ b/packages/components-react/page-layout-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/page-layout-react", "version": "1.0.1", - "author": "Community for NL Design System", "description": "Page Layout component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/page-layout-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/page-layout-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs.js", - "module": "./dist/index.esm.js", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/page-layout-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/radio-button-react/package.json b/packages/components-react/radio-button-react/package.json index 2ee168c94bf..1c18e633f00 100644 --- a/packages/components-react/radio-button-react/package.json +++ b/packages/components-react/radio-button-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/radio-button-react", "version": "1.0.2", - "author": "Community for NL Design System", "description": "Radio Button component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/radio-button-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/radio-button-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/form-field-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/radio-group-react/package.json b/packages/components-react/radio-group-react/package.json index 741b30cb4d0..f3ff2efaebf 100644 --- a/packages/components-react/radio-group-react/package.json +++ b/packages/components-react/radio-group-react/package.json @@ -1,23 +1,73 @@ { "name": "@utrecht/radio-group-react", "version": "1.0.4", - "author": "Community for NL Design System", "description": "Radio Group component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/radio-group-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/radio-group-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "@utrecht/fieldset-react": "workspace:*", + "@utrecht/form-field-description-react": "workspace:*", + "@utrecht/form-field-error-message-react": "workspace:*", + "@utrecht/form-field-react": "workspace:*", + "@utrecht/form-label-react": "workspace:*", + "@utrecht/radio-button-react": "workspace:*", + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,29 +84,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/form-field-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "@utrecht/fieldset-react": "workspace:*", - "@utrecht/form-field-react": "workspace:*", - "@utrecht/form-label-react": "workspace:*", - "@utrecht/form-field-description-react": "workspace:*", - "@utrecht/form-field-error-message-react": "workspace:*", - "@utrecht/radio-button-react": "workspace:*", - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/radio-group-react/src/css.tsx b/packages/components-react/radio-group-react/src/css.tsx index 7209f8cbf91..542f95408b9 100644 --- a/packages/components-react/radio-group-react/src/css.tsx +++ b/packages/components-react/radio-group-react/src/css.tsx @@ -7,7 +7,7 @@ // Inject CSS from components used in this component import '@utrecht/radio-button-react/dist/css'; import '@utrecht/form-field-react/dist/css'; -import '@utrecht/form-label/dist/css'; +import '@utrecht/form-label-react/dist/css'; import '@utrecht/form-field-description-react/dist/css'; import '@utrecht/form-field-error-message-react/dist/css'; import '@utrecht/fieldset-react/css'; diff --git a/packages/components-react/root-react/package.json b/packages/components-react/root-react/package.json index 880518f19f8..6f7b335bdce 100644 --- a/packages/components-react/root-react/package.json +++ b/packages/components-react/root-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/root-react", "version": "1.0.1", - "author": "Community for NL Design System", "description": "Root component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/root-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/root-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs.js", - "module": "./dist/index.esm.js", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/components-react/root-react" - }, "peerDependencies": { "@babel/runtime": "*", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/select-combobox-react/package.json b/packages/components-react/select-combobox-react/package.json index 10297e7fb15..51b188b6406 100644 --- a/packages/components-react/select-combobox-react/package.json +++ b/packages/components-react/select-combobox-react/package.json @@ -1,23 +1,72 @@ { "name": "@utrecht/select-combobox-react", "version": "1.0.2", - "author": "Community for NL Design System", "description": "Select Combobox component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/select-combobox-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/select-combobox-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./README.md": "./README.md" + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "@utrecht/button-react": "workspace:*", + "@utrecht/combobox-react": "workspace:*", + "@utrecht/listbox-react": "workspace:*", + "@utrecht/textbox-react": "workspace:*", + "clsx": "2.1.1" + }, "devDependencies": { "@babel/plugin-transform-runtime": "7.24.7", "@babel/preset-env": "7.24.7", @@ -35,6 +84,7 @@ "@types/jest": "29.5.13", "@types/react": "18.3.3", "@types/testing-library__jest-dom": "5.14.9", + "@utrecht/build-utils-react": "workspace:*", "downshift": "9.0.8", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", @@ -46,27 +96,11 @@ "rollup-plugin-postcss": "4.0.2", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/component-library-react/packages/select-combobox-react" - }, "peerDependencies": { - "@babel/runtime": "^7.23.6", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1", - "@utrecht/button-react": "workspace:*", - "@utrecht/combobox-react": "workspace:*", - "@utrecht/listbox-react": "workspace:*", - "@utrecht/textbox-react": "workspace:*" + "publishConfig": { + "access": "public" } } diff --git a/packages/components-react/select-combobox-react/rollup.config.mjs b/packages/components-react/select-combobox-react/rollup.config.mjs index 6cc9b8c1b8a..5832391f8e8 100644 --- a/packages/components-react/select-combobox-react/rollup.config.mjs +++ b/packages/components-react/select-combobox-react/rollup.config.mjs @@ -1,16 +1,8 @@ -import babel from '@rollup/plugin-babel'; import commonjs from '@rollup/plugin-commonjs'; -import json from '@rollup/plugin-json'; import resolve from '@rollup/plugin-node-resolve'; import typescript from '@rollup/plugin-typescript'; -import { readFileSync } from 'fs'; import filesize from 'rollup-plugin-filesize'; import nodeExternal from 'rollup-plugin-node-externals'; -import peerDepsExternal from 'rollup-plugin-peer-deps-external'; -import postcss from 'rollup-plugin-postcss'; - -const packagePath = new URL('./package.json', import.meta.url).pathname; -const packageJson = JSON.parse(readFileSync(packagePath, 'utf8')); /** * @type {import('rollup').RollupOptions} @@ -20,67 +12,43 @@ export default [ input: './src/index.tsx', output: [ { - file: packageJson.main, - format: 'cjs', - sourcemap: true, - }, - { - file: packageJson.module, + file: './dist/index.mjs', format: 'es', - sourcemap: true, + // sourcemap: true, }, ], plugins: [ - peerDepsExternal(), + // Convert CommonJS modules to ES Modules commonjs(), + + // Inline imports from `devDependencies` + // Leave `dependencies` and `devDependencies` imports as is. + // See: https://www.npmjs.com/package/rollup-plugin-node-externals nodeExternal(), - resolve({ browser: true }), - json(), + resolve(), typescript({ tsconfig: './tsconfig.build.json' }), - babel({ - presets: ['@babel/preset-react'], - babelHelpers: 'runtime', - exclude: ['node_modules/**', 'dist/**'], - extensions: ['.ts', '.tsx'], - inputSourceMap: true, - plugins: ['@babel/plugin-transform-runtime'], - }), filesize(), ], }, { input: './src/css.tsx', output: [ - { - file: './dist/css.cjs', - format: 'cjs', - sourcemap: true, - }, { file: './dist/css.mjs', format: 'es', - sourcemap: true, + // sourcemap: true, }, ], plugins: [ - peerDepsExternal(), + // Convert CommonJS modules to ES Modules commonjs(), + + // Inline imports from `devDependencies` + // Leave `dependencies` and `devDependencies` imports as is. + // See: https://www.npmjs.com/package/rollup-plugin-node-externals nodeExternal(), - resolve({ browser: true }), - json(), - postcss({ - extensions: ['.css', '.scss'], - minimize: true, - }), + resolve(), typescript({ tsconfig: './tsconfig.build.json' }), - babel({ - presets: ['@babel/preset-react'], - babelHelpers: 'runtime', - exclude: ['node_modules/**', 'dist/**'], - extensions: ['.ts', '.tsx'], - inputSourceMap: true, - plugins: ['@babel/plugin-transform-runtime'], - }), filesize(), ], }, diff --git a/packages/components-react/textbox-react/package.json b/packages/components-react/textbox-react/package.json index c00349b31fc..2d67810e57c 100644 --- a/packages/components-react/textbox-react/package.json +++ b/packages/components-react/textbox-react/package.json @@ -1,23 +1,67 @@ { "name": "@utrecht/textbox-react", "version": "1.0.2", - "author": "Community for NL Design System", "description": "Textbox component for the Municipality of Utrecht based on the NL Design System architecture", + "keywords": [ + "nl-design-system" + ], + "homepage": "https://github.com/nl-design-system/utrecht/tree/main/packages/components-react/textbox-react#readme", + "bugs": { + "url": "https://github.com/nl-design-system/utrecht/issues" + }, + "repository": { + "type": "git+ssh", + "url": "git+https://github.com/nl-design-system/utrecht.git", + "directory": "packages/components-react/textbox-react" + }, "license": "EUPL-1.2", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "Community for NL Design System", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/index.mjs": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./dist/css": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + }, + "./dist/css.mjs": { + "types": "./dist/css.d.ts", + "import": "./dist/css.mjs" + } + }, "files": [ "dist/", "src/" ], - "sideEffects": false, "scripts": { - "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", "build": "rollup --config ./rollup.config.mjs", + "clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage", + "init": "init-react-package", "test": "mkdir -p pages && jest --coverage --verbose", "typecheck": "tsc --noEmit" }, + "dependencies": { + "clsx": "2.1.1" + }, "devDependencies": { "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "6.5.0", @@ -34,23 +78,12 @@ "rollup": "4.23.0", "typescript": "5.6.2" }, - "keywords": [ - "nl-design-system" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git+ssh", - "url": "git@github.com:nl-design-system/utrecht.git", - "directory": "packages/component-library-react/packages/textbox-react" - }, "peerDependencies": { "@babel/runtime": "^7.23.6", "react": "18", "react-dom": "18" }, - "dependencies": { - "clsx": "2.1.1" + "publishConfig": { + "access": "public" } } diff --git a/packages/storybook-css/config/FigmaBlock.tsx b/packages/storybook-css/config/FigmaBlock.tsx index 245fdc51876..77c76013629 100644 --- a/packages/storybook-css/config/FigmaBlock.tsx +++ b/packages/storybook-css/config/FigmaBlock.tsx @@ -1,6 +1,6 @@ import { useOf } from '@storybook/blocks'; import { StoryObj } from '@storybook/react'; -import { Icon } from '@utrecht/component-library-react/src/css-module'; +import { Icon } from '@utrecht/component-library-react/dist/css-module'; import { PropsWithChildren } from 'react'; import React from 'react'; diff --git a/packages/storybook-css/config/GitHubBlock.tsx b/packages/storybook-css/config/GitHubBlock.tsx index d9cd1ab8df9..b2cba4dafb7 100644 --- a/packages/storybook-css/config/GitHubBlock.tsx +++ b/packages/storybook-css/config/GitHubBlock.tsx @@ -5,7 +5,7 @@ import { useOf } from '@storybook/blocks'; import { StoryObj } from '@storybook/react'; -import { Icon } from '@utrecht/component-library-react/src/css-module'; +import { Icon } from '@utrecht/component-library-react/dist/css-module'; import { PropsWithChildren } from 'react'; import React from 'react'; diff --git a/packages/storybook-css/config/NlDesignSystemBlock.tsx b/packages/storybook-css/config/NlDesignSystemBlock.tsx index dceb4b7db7e..6ae53566b15 100644 --- a/packages/storybook-css/config/NlDesignSystemBlock.tsx +++ b/packages/storybook-css/config/NlDesignSystemBlock.tsx @@ -5,7 +5,7 @@ import { useOf } from '@storybook/blocks'; import { StoryObj } from '@storybook/react'; -import { Icon } from '@utrecht/component-library-react/src/css-module'; +import { Icon } from '@utrecht/component-library-react/dist/css-module'; import { PropsWithChildren } from 'react'; import React from 'react'; diff --git a/packages/storybook-css/config/preview.tsx b/packages/storybook-css/config/preview.tsx index c27ee4d78f2..731aa2f24f4 100644 --- a/packages/storybook-css/config/preview.tsx +++ b/packages/storybook-css/config/preview.tsx @@ -2,7 +2,7 @@ import { Controls, Description, Primary, Stories } from '@storybook/blocks'; import type { Preview } from '@storybook/react'; import type { StoryContext } from '@storybook/types'; -import { ButtonGroup } from '@utrecht/component-library-react/src/css-module'; +import { ButtonGroup } from '@utrecht/component-library-react/dist/css-module'; import { addonStatus } from '@utrecht/storybook-helpers/dist/addon-status'; import { addonThemes } from '@utrecht/storybook-helpers/dist/addon-themes'; import { addonViewport } from '@utrecht/storybook-helpers/dist/addon-viewport'; diff --git a/packages/storybook-css/src/Listbox.tsx b/packages/storybook-css/src/Listbox.tsx index 718f55c6651..02b26950a1a 100644 --- a/packages/storybook-css/src/Listbox.tsx +++ b/packages/storybook-css/src/Listbox.tsx @@ -1,6 +1,6 @@ /* @license CC0-1.0 */ -import { Listbox, ListboxOption } from '@utrecht/component-library-react/src/Listbox'; +import { Listbox, ListboxOption } from '@utrecht/component-library-react/dist/index'; import clsx from 'clsx'; import React, { ReactNode } from 'react'; diff --git a/packages/storybook-pdf/config/FigmaBlock.tsx b/packages/storybook-pdf/config/FigmaBlock.tsx index 245fdc51876..77c76013629 100644 --- a/packages/storybook-pdf/config/FigmaBlock.tsx +++ b/packages/storybook-pdf/config/FigmaBlock.tsx @@ -1,6 +1,6 @@ import { useOf } from '@storybook/blocks'; import { StoryObj } from '@storybook/react'; -import { Icon } from '@utrecht/component-library-react/src/css-module'; +import { Icon } from '@utrecht/component-library-react/dist/css-module'; import { PropsWithChildren } from 'react'; import React from 'react'; diff --git a/packages/storybook-pdf/config/GitHubBlock.tsx b/packages/storybook-pdf/config/GitHubBlock.tsx index d9cd1ab8df9..b2cba4dafb7 100644 --- a/packages/storybook-pdf/config/GitHubBlock.tsx +++ b/packages/storybook-pdf/config/GitHubBlock.tsx @@ -5,7 +5,7 @@ import { useOf } from '@storybook/blocks'; import { StoryObj } from '@storybook/react'; -import { Icon } from '@utrecht/component-library-react/src/css-module'; +import { Icon } from '@utrecht/component-library-react/dist/css-module'; import { PropsWithChildren } from 'react'; import React from 'react'; diff --git a/packages/storybook-pdf/config/NlDesignSystemBlock.tsx b/packages/storybook-pdf/config/NlDesignSystemBlock.tsx index dceb4b7db7e..6ae53566b15 100644 --- a/packages/storybook-pdf/config/NlDesignSystemBlock.tsx +++ b/packages/storybook-pdf/config/NlDesignSystemBlock.tsx @@ -5,7 +5,7 @@ import { useOf } from '@storybook/blocks'; import { StoryObj } from '@storybook/react'; -import { Icon } from '@utrecht/component-library-react/src/css-module'; +import { Icon } from '@utrecht/component-library-react/dist/css-module'; import { PropsWithChildren } from 'react'; import React from 'react'; diff --git a/packages/storybook-pdf/src/Image.stories.tsx b/packages/storybook-pdf/src/Image.stories.tsx index d1a310699da..c22489a16ee 100644 --- a/packages/storybook-pdf/src/Image.stories.tsx +++ b/packages/storybook-pdf/src/Image.stories.tsx @@ -1,7 +1,7 @@ /* @license CC0-1.0 */ import { Meta, StoryObj } from '@storybook/react'; -import { Image } from '@utrecht/component-library-react/src/Image'; +import { Image } from '@utrecht/component-library-react/dist/css-module'; import readme from '@utrecht/img-css/README.md?raw'; import pdfDocs from '@utrecht/img-css/docs/technology-pdf.nl.md?raw'; import { mergeMarkdown } from '@utrecht/storybook-helpers/src/markdown'; diff --git a/packages/storybook-pdf/src/Logo.stories.tsx b/packages/storybook-pdf/src/Logo.stories.tsx index 24253c043bd..70033a11bcf 100644 --- a/packages/storybook-pdf/src/Logo.stories.tsx +++ b/packages/storybook-pdf/src/Logo.stories.tsx @@ -1,7 +1,7 @@ /* @license CC0-1.0 */ import { Meta, StoryObj } from '@storybook/react'; -import { Logo } from '@utrecht/component-library-react/src/Logo'; +import { Logo } from '@utrecht/component-library-react/dist/css-module'; import readme from '@utrecht/logo-css/README.md?raw'; import pdfDocs from '@utrecht/logo-css/docs/technology-pdf.nl.md?raw'; import { mergeMarkdown } from '@utrecht/storybook-helpers/src/markdown'; diff --git a/packages/storybook-pdf/src/TableOfContents.stories.tsx b/packages/storybook-pdf/src/TableOfContents.stories.tsx index a339be245b0..0fc3d48c5b8 100644 --- a/packages/storybook-pdf/src/TableOfContents.stories.tsx +++ b/packages/storybook-pdf/src/TableOfContents.stories.tsx @@ -1,7 +1,7 @@ /* @license CC0-1.0 */ import { Meta, StoryObj } from '@storybook/react'; -import { TableOfContents } from '@utrecht/component-library-react/src/TableOfContents'; +import { TableOfContents } from '@utrecht/component-library-react/dist/css-module'; import { mergeMarkdown } from '@utrecht/storybook-helpers/src/markdown'; import readme from '@utrecht/table-of-contents-css/README.md?raw'; import pdfDocs from '@utrecht/table-of-contents-css/docs/technology-pdf.nl.md?raw'; diff --git a/packages/storybook-pdf/src/UnorderedList.stories.tsx b/packages/storybook-pdf/src/UnorderedList.stories.tsx index 3cbbcc90ca7..26b9d95fbb1 100644 --- a/packages/storybook-pdf/src/UnorderedList.stories.tsx +++ b/packages/storybook-pdf/src/UnorderedList.stories.tsx @@ -1,7 +1,7 @@ /* @license CC0-1.0 */ import { Meta, StoryObj } from '@storybook/react'; -import { UnorderedList } from '@utrecht/component-library-react/src/UnorderedList'; +import { UnorderedList } from '@utrecht/component-library-react/dist/css-module'; import { mergeMarkdown } from '@utrecht/storybook-helpers/src/markdown'; import readme from '@utrecht/unordered-list-css/README.md?raw'; import pdfDocs from '@utrecht/unordered-list-css/docs/technology-pdf.nl.md?raw'; diff --git a/packages/storybook-react/src/stories/Button.stories.tsx b/packages/storybook-react/src/stories/Button.stories.tsx index a0f19aebe55..a88d7862357 100644 --- a/packages/storybook-react/src/stories/Button.stories.tsx +++ b/packages/storybook-react/src/stories/Button.stories.tsx @@ -1,7 +1,7 @@ import { Meta, StoryObj } from '@storybook/react'; import readme from '@utrecht/button-css/README.md?raw'; import tokensDefinition from '@utrecht/button-css/src/tokens.json'; -import { Button, ButtonProps } from '@utrecht/button-react/src/css'; +import { Button, ButtonProps } from '@utrecht/button-react/dist/css'; import tokens from '@utrecht/design-tokens/dist/index.json'; import iconSet from '@utrecht/icon/dist/index.json'; import React from 'react'; diff --git a/packages/storybook-react/src/stories/ScrollLink.stories.tsx b/packages/storybook-react/src/stories/ScrollLink.stories.tsx index e0b2f39bc89..b1f3da959e5 100644 --- a/packages/storybook-react/src/stories/ScrollLink.stories.tsx +++ b/packages/storybook-react/src/stories/ScrollLink.stories.tsx @@ -7,7 +7,7 @@ import { PageContent, Paragraph, ScrollLink, -} from '@utrecht/component-library-react/src/css-module/index'; +} from '@utrecht/component-library-react/dist/css-module/index'; import tokens from '@utrecht/design-tokens/dist/index.json'; import { UtrechtIconChevronUp } from '@utrecht/web-component-library-react'; import React from 'react'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d52bbae3705..02ed118d1bd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1012,45 +1012,30 @@ importers: packages/build-utils-react: devDependencies: - '@babel/plugin-transform-runtime': - specifier: 7.24.7 - version: 7.24.7(@babel/core@7.24.7) - '@babel/preset-react': - specifier: 7.24.7 - version: 7.24.7(@babel/core@7.24.7) - '@rollup/plugin-babel': - specifier: 6.0.4 - version: 6.0.4(@babel/core@7.24.7)(@types/babel__core@7.20.5)(rollup@4.23.0) - '@rollup/plugin-commonjs': - specifier: 26.0.1 - version: 26.0.1(rollup@4.23.0) - '@rollup/plugin-json': - specifier: 6.1.0 - version: 6.1.0(rollup@4.23.0) '@rollup/plugin-node-resolve': specifier: 15.2.3 version: 15.2.3(rollup@4.23.0) '@rollup/plugin-typescript': specifier: 12.1.0 version: 12.1.0(rollup@4.23.0)(tslib@2.6.2)(typescript@5.6.2) + glob: + specifier: 10.4.2 + version: 10.4.2 rollup: specifier: 4.23.0 version: 4.23.0 rollup-plugin-filesize: specifier: 10.0.0 version: 10.0.0 - rollup-plugin-node-externals: - specifier: 7.1.2 - version: 7.1.2(rollup@4.23.0) rollup-plugin-peer-deps-external: specifier: 2.2.4 version: 2.2.4(rollup@4.23.0) - rollup-plugin-postcss: - specifier: 4.0.2 - version: 4.0.2(postcss@8.4.38)(ts-node@10.9.1(@swc/core@1.3.100(@swc/helpers@0.5.5))(@types/node@22.7.4)(typescript@5.6.2)) rollup-plugin-typescript2: specifier: 0.36.0 version: 0.36.0(rollup@4.23.0)(typescript@5.6.2) + sort-package-json: + specifier: 2.11.0 + version: 2.11.0 typescript: specifier: 5.6.2 version: 5.6.2 @@ -1691,16 +1676,19 @@ importers: version: 7.24.7 '@rollup/plugin-babel': specifier: 6.0.4 - version: 6.0.4(@babel/core@7.24.7)(@types/babel__core@7.20.5)(rollup@4.18.0) + version: 6.0.4(@babel/core@7.24.7)(@types/babel__core@7.20.5)(rollup@4.23.0) '@rollup/plugin-commonjs': specifier: 26.0.1 - version: 26.0.1(rollup@4.18.0) + version: 26.0.1(rollup@4.23.0) '@rollup/plugin-json': specifier: 6.1.0 - version: 6.1.0(rollup@4.18.0) + version: 6.1.0(rollup@4.23.0) '@rollup/plugin-node-resolve': specifier: 15.2.3 - version: 15.2.3(rollup@4.18.0) + version: 15.2.3(rollup@4.23.0) + '@rollup/plugin-typescript': + specifier: 12.1.0 + version: 12.1.0(rollup@4.23.0)(tslib@2.6.2)(typescript@5.6.2) '@testing-library/dom': specifier: 8.20.1 version: 8.20.1 @@ -1761,6 +1749,9 @@ importers: '@utrecht/breadcrumb-nav-css': specifier: workspace:* version: link:../../components/breadcrumb-nav + '@utrecht/build-utils-react': + specifier: workspace:* + version: link:../build-utils-react '@utrecht/button-group-css': specifier: workspace:* version: link:../../components/button-group @@ -1996,8 +1987,8 @@ importers: specifier: 5.0.7 version: 5.0.7 rollup: - specifier: 4.18.0 - version: 4.18.0 + specifier: 4.23.0 + version: 4.23.0 rollup-plugin-delete: specifier: 2.0.0 version: 2.0.0 @@ -2006,22 +1997,25 @@ importers: version: 10.0.0 rollup-plugin-node-externals: specifier: 7.1.2 - version: 7.1.2(rollup@4.18.0) + version: 7.1.2(rollup@4.23.0) rollup-plugin-node-polyfills: specifier: 0.2.1 version: 0.2.1 rollup-plugin-peer-deps-external: specifier: 2.2.4 - version: 2.2.4(rollup@4.18.0) + version: 2.2.4(rollup@4.23.0) rollup-plugin-postcss: specifier: 4.0.2 version: 4.0.2(postcss@8.4.38)(ts-node@10.9.1(@swc/core@1.3.100(@swc/helpers@0.5.5))(@types/node@22.7.4)(typescript@5.6.2)) rollup-plugin-typescript2: specifier: 0.36.0 - version: 0.36.0(rollup@4.18.0)(typescript@5.6.2) + version: 0.36.0(rollup@4.23.0)(typescript@5.6.2) sass: specifier: 1.69.5 version: 1.69.5 + sort-package-json: + specifier: 2.11.0 + version: 2.11.0 tslib: specifier: 2.6.2 version: 2.6.2 @@ -3532,9 +3526,6 @@ importers: packages/components-react/select-combobox-react: dependencies: - '@babel/runtime': - specifier: ^7.23.6 - version: 7.24.7 '@utrecht/button-react': specifier: workspace:* version: link:../button-react @@ -3602,6 +3593,9 @@ importers: '@types/testing-library__jest-dom': specifier: 5.14.9 version: 5.14.9 + '@utrecht/build-utils-react': + specifier: workspace:* + version: link:../../build-utils-react downshift: specifier: 9.0.8 version: 9.0.8(react@18.3.1) @@ -14886,6 +14880,10 @@ packages: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} + detect-newline@4.0.1: + resolution: {integrity: sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} @@ -15848,6 +15846,14 @@ packages: fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + fdir@6.4.2: + resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + feed@4.2.2: resolution: {integrity: sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==} engines: {node: '>=0.4.0'} @@ -16368,6 +16374,9 @@ packages: resolution: {integrity: sha512-zHuCeqtfgqgDwvXlR84UNgnJDuUHQcNI5OqWqFxxuk2BshuKbYhJWdxBsEo4PvKqoGh23lUAIvBNpChMLv7/9Q==} hasBin: true + git-hooks-list@3.1.0: + resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==} + git-raw-commits@4.0.0: resolution: {integrity: sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==} engines: {node: '>=16'} @@ -20001,6 +20010,10 @@ packages: resolution: {integrity: sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==} engines: {node: '>=10'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pidtree@0.6.0: resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} engines: {node: '>=0.10'} @@ -22087,6 +22100,13 @@ packages: resolution: {integrity: sha512-Pdz01AvCAottHTPQGzndktFNdbRA75BgOfeT1hH+AMnJFv8lynkPi42rfeEhpx1saTEI3YNMWxfqu0sFD1G8pw==} engines: {node: '>=12'} + sort-object-keys@1.1.3: + resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} + + sort-package-json@2.11.0: + resolution: {integrity: sha512-pBs3n/wcsbnMSiO5EYV4AVnZVtyQslfZ/0v6VbrRRVApqyNf0Uqo4MOXJsBmIplGY1hYZ4bq5qjO9xTgY+K8xw==} + hasBin: true + source-list-map@2.0.1: resolution: {integrity: sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==} @@ -22811,6 +22831,10 @@ packages: tinycolor2@1.6.0: resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} + tinyglobby@0.2.10: + resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + engines: {node: '>=12.0.0'} + title-case@2.1.1: resolution: {integrity: sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==} @@ -31447,12 +31471,6 @@ snapshots: optionalDependencies: rollup: 3.29.4 - '@rollup/plugin-json@6.1.0(rollup@4.18.0)': - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) - optionalDependencies: - rollup: 4.18.0 - '@rollup/plugin-json@6.1.0(rollup@4.23.0)': dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.23.0) @@ -37880,6 +37898,8 @@ snapshots: detect-newline@3.1.0: {} + detect-newline@4.0.1: {} + detect-node-es@1.1.0: {} detect-node@2.1.0: {} @@ -39386,6 +39406,10 @@ snapshots: dependencies: pend: 1.2.0 + fdir@6.4.2(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + feed@4.2.2: dependencies: xml-js: 1.6.11 @@ -40352,6 +40376,8 @@ snapshots: transitivePeerDependencies: - supports-color + git-hooks-list@3.1.0: {} + git-raw-commits@4.0.0: dependencies: dargs: 8.1.0 @@ -45552,6 +45578,8 @@ snapshots: picomatch@3.0.1: {} + picomatch@4.0.2: {} + pidtree@0.6.0: {} pify@4.0.1: {} @@ -47485,16 +47513,6 @@ snapshots: tslib: 2.6.2 typescript: 4.9.5 - rollup-plugin-typescript2@0.36.0(rollup@4.18.0)(typescript@5.6.2): - dependencies: - '@rollup/pluginutils': 4.2.1 - find-cache-dir: 3.3.2 - fs-extra: 10.1.0 - rollup: 4.18.0 - semver: 7.6.2 - tslib: 2.6.2 - typescript: 5.6.2 - rollup-plugin-typescript2@0.36.0(rollup@4.23.0)(typescript@5.6.2): dependencies: '@rollup/pluginutils': 4.2.1 @@ -48176,6 +48194,19 @@ snapshots: dependencies: is-plain-obj: 4.1.0 + sort-object-keys@1.1.3: {} + + sort-package-json@2.11.0: + dependencies: + detect-indent: 7.0.1 + detect-newline: 4.0.1 + get-stdin: 9.0.0 + git-hooks-list: 3.1.0 + is-plain-obj: 4.1.0 + semver: 7.6.2 + sort-object-keys: 1.1.3 + tinyglobby: 0.2.10 + source-list-map@2.0.1: {} source-map-js@1.0.2: {} @@ -49084,6 +49115,11 @@ snapshots: tinycolor2@1.6.0: {} + tinyglobby@0.2.10: + dependencies: + fdir: 6.4.2(picomatch@4.0.2) + picomatch: 4.0.2 + title-case@2.1.1: dependencies: no-case: 2.3.2