Rename twenty-ui to twenty-ui-deprecated and twenty-new-ui to twenty-ui to prepare package release (#21315)

## Description

Promotes the next-gen UI library (formerly `twenty-new-ui`) to the name
**`twenty-ui`** (v0.1.0, publishable) and renames the old package to
**`twenty-ui-deprecated`**. Rewrites ~1,730 `twenty-ui` imports →
`twenty-ui-deprecated`, updates all configs/CI/Docker/deps, and migrates
twenty-front's `Toggle` to the new package (first consumer) as a
drop-in.

## Next steps
- Wire the `ui/v*` publish dispatch (`cd-deploy-tag.yaml` +
`.yarnrc.yml`), then tag `ui/v0.1.0` to publish.
- Continue migrating components from `twenty-ui-deprecated` →
`twenty-ui`.
This commit is contained in:
Raphaël Bosi
2026-06-08 18:12:28 +02:00
committed by GitHub
parent a91e737e69
commit c596a5e342
2320 changed files with 6313 additions and 4856 deletions
@@ -3,14 +3,14 @@ import { styled } from '@linaria/react';
import { isNonEmptyString } from '@sniptt/guards';
import { type ChangeEvent, useRef } from 'react';
import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';
import { themeCssVariables } from 'twenty-ui/theme-constants';
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
import { type AttachmentFileCategory } from '@/activities/files/types/AttachmentFileCategory';
import { getFileType } from '@/activities/files/utils/getFileType';
import { FileIcon } from '@/file/components/FileIcon';
import { t } from '@lingui/core/macro';
import { getSafeUrl, isDefined } from 'twenty-shared/utils';
import { Button } from 'twenty-ui/input';
import { Button } from 'twenty-ui-deprecated/input';
const StyledFileInput = styled.input`
display: none;
@@ -7,8 +7,8 @@ import { styled } from '@linaria/react';
import { t } from '@lingui/core/macro';
import { isNonEmptyString } from '@sniptt/guards';
import { isDefined } from 'twenty-shared/utils';
import { Chip, ChipVariant } from 'twenty-ui/components';
import { themeCssVariables } from 'twenty-ui/theme-constants';
import { Chip, ChipVariant } from 'twenty-ui-deprecated/components';
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
const StyledRecordChipContainer = styled.div`
@@ -16,8 +16,11 @@ import {
type SuggestionItem,
} from '@/blocknote-editor/components/CustomSlashMenu';
import { useMentionMenu } from '@/mention/hooks/useMentionMenu';
import { IconX } from 'twenty-ui/display';
import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';
import { IconX } from 'twenty-ui-deprecated/display';
import {
ThemeContext,
themeCssVariables,
} from 'twenty-ui-deprecated/theme-constants';
interface BlockEditorProps {
editor: typeof BLOCK_SCHEMA.BlockNoteEditor;
@@ -11,8 +11,12 @@ import {
} from '@blocknote/react';
import { styled } from '@linaria/react';
import { useLingui } from '@lingui/react/macro';
import { IconColorSwatch, IconPlus, IconTrash } from 'twenty-ui/display';
import { themeCssVariables } from 'twenty-ui/theme-constants';
import {
IconColorSwatch,
IconPlus,
IconTrash,
} from 'twenty-ui-deprecated/display';
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
type CustomSideMenuProps = {
editor: typeof BLOCK_SCHEMA.BlockNoteEditor;
@@ -1,7 +1,10 @@
import { styled } from '@linaria/react';
import { useContext } from 'react';
import { type IconComponent } from 'twenty-ui/display';
import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';
import { type IconComponent } from 'twenty-ui-deprecated/display';
import {
ThemeContext,
themeCssVariables,
} from 'twenty-ui-deprecated/theme-constants';
const StyledContainer = styled.div<{ Variant: Variants }>`
align-items: center;
@@ -4,7 +4,7 @@ import { SelectableListItem } from '@/ui/layout/selectable-list/components/Selec
import { useSelectableList } from '@/ui/layout/selectable-list/hooks/useSelectableList';
import { isSelectedItemIdComponentFamilyState } from '@/ui/layout/selectable-list/states/isSelectedItemIdComponentFamilyState';
import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';
import { MenuItemSuggestion } from 'twenty-ui/navigation';
import { MenuItemSuggestion } from 'twenty-ui-deprecated/navigation';
export type CustomSlashMenuListItemProps = {
item: SuggestionItem;
@@ -2,7 +2,7 @@ import type {
DefaultReactSuggestionItem,
SuggestionMenuProps,
} from '@blocknote/react';
import { type IconComponent } from 'twenty-ui/display';
import { type IconComponent } from 'twenty-ui-deprecated/display';
export type SuggestionItem = DefaultReactSuggestionItem & {
aliases?: string[];
@@ -25,7 +25,7 @@ import {
IconPilcrow,
IconTable,
IconVideo,
} from 'twenty-ui/display';
} from 'twenty-ui-deprecated/display';
const Icons: Record<string, IconComponent> = {
'Heading 1': IconH1,