Files
twenty/packages/twenty-shared/project.json
T
Charles BochetandGitHub 3b2bf39565 Refactor modal (#18377)
## Summary

- Move Modal UI components (`Modal`, `ModalContent`, `ModalHeader`,
`ModalFooter`, `ModalBackdrop`) from `twenty-front` to `twenty-ui` as
stateless, reusable components
- Create `ModalStatefulWrapper` in `twenty-front` that connects Jotai
state (`isModalOpenedComponentState`) to the stateless `Modal` via an
`isOpen` prop
- Rename `modalVariant` prop to `overlay` with clearer values: `'dark'`
(default), `'light'` (in-container), `'transparent'` (invisible panel).
Remove unused `'medium'` overlay
- Rename `modalId` to `modalInstanceId` across the entire modal zone
(~30 consumer files)
- Extract `ModalProps` to its own file in
`twenty-ui/types/ModalProps.ts`; extract `ModalStatefulWrapperProps` to
its own file using `Pick<ModalProps, ...>` for shared props
- Extract `ModalBackdrop` to its own file and export from `twenty-ui`;
use it in `UserOrMetadataLoader` instead of a local styled component
- Use `ModalFooter` in `StepNavigationButton` and `ModalHeader` in
`SpreadsheetImportStepperContainer` instead of duplicated `styled.div`
definitions
- Remove unused `onClose` prop from stateless `Modal`; fix `typeof
document` guard in `ModalStatefulWrapper`
- Split shared types into individual files: `ModalSize.ts`,
`ModalPadding.ts`, `ModalOverlay.ts`
- Extract wyw profiling instrumentation from `vite.config.ts` into
reusable `createWywProfilingPlugin` with parametrized threshold and
improved logging
- Delete old `Modal.tsx`, `Modal.styles.ts`, `ModalContent.tsx`,
`ModalHeader.tsx`, `ModalFooter.tsx` from `twenty-front`
- Add comprehensive Storybook stories in `twenty-ui` covering Default,
Confirmation, Small, ExtraLarge, Closed, and Interactive variants
2026-03-04 13:22:31 +01:00

111 lines
3.0 KiB
JSON

{
"name": "twenty-shared",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/twenty-shared/src",
"projectType": "library",
"tags": [
"scope:shared"
],
"targets": {
"build": {
"executor": "nx:run-commands",
"cache": true,
"inputs": [
"production",
"^production"
],
"dependsOn": [
"generateBarrels",
"^build"
],
"outputs": [
"{projectRoot}/dist",
"{projectRoot}/ai/package.json",
"{projectRoot}/ai/dist",
"{projectRoot}/application/package.json",
"{projectRoot}/application/dist",
"{projectRoot}/constants/package.json",
"{projectRoot}/constants/dist",
"{projectRoot}/database-events/package.json",
"{projectRoot}/database-events/dist",
"{projectRoot}/logic-function/package.json",
"{projectRoot}/logic-function/dist",
"{projectRoot}/metadata/package.json",
"{projectRoot}/metadata/dist",
"{projectRoot}/testing/package.json",
"{projectRoot}/testing/dist",
"{projectRoot}/translations/package.json",
"{projectRoot}/translations/dist",
"{projectRoot}/types/package.json",
"{projectRoot}/types/dist",
"{projectRoot}/utils/package.json",
"{projectRoot}/utils/dist",
"{projectRoot}/vite/package.json",
"{projectRoot}/vite/dist",
"{projectRoot}/workflow/package.json",
"{projectRoot}/workflow/dist",
"{projectRoot}/workspace/package.json",
"{projectRoot}/workspace/dist"
],
"options": {
"cwd": "{projectRoot}",
"commands": [
"npx vite build",
"tsgo -p tsconfig.lib.json --declaration --emitDeclarationOnly --noEmit false --outDir dist --rootDir src && npx tsc-alias -p tsconfig.lib.json --outDir dist"
],
"parallel": false
}
},
"build:individual": {
"executor": "nx:run-commands",
"cache": true,
"dependsOn": [
"build"
],
"inputs": [
"production",
"^production"
],
"outputs": [
"{projectRoot}/dist/individual"
],
"options": {
"cwd": "{projectRoot}",
"command": "npx vite build -c vite.config.individual.ts"
}
},
"generateBarrels": {
"executor": "nx:run-commands",
"cache": true,
"inputs": [
"production",
"{projectRoot}/scripts/generateBarrels.ts"
],
"outputs": [
"{projectRoot}/src/index.ts",
"{projectRoot}/src/*/index.ts",
"{projectRoot}/package.json"
],
"options": {
"command": "tsx {projectRoot}/scripts/generateBarrels.ts"
}
},
"typecheck": {},
"test": {},
"lint": {
"options": {},
"configurations": {
"fix": {}
}
},
"fmt": {
"options": {
"files": "src"
},
"configurations": {
"fix": {}
}
}
}
}