[REFACTOR] Twenty UI multi barrel (#11301)

# Introduction
closes https://github.com/twentyhq/core-team-issues/issues/591
Same than for `twenty-shared` made in
https://github.com/twentyhq/twenty/pull/11083.

## TODO
- [x] Manual migrate twenty-website twenty-ui imports

## What's next:
- Generate barrel and migration script factorization within own package
+ tests
- Refactoring using preconstruct ? TimeBox
- Lint circular dependencies
- Lint import from barrel and forbid them

### Preconstruct
We need custom rollup plugins addition, but preconstruct does not expose
its rollup configuration. It might be possible to handle this using the
babel overrides. But was a big tunnel.
We could give it a try afterwards ! ( allowing cjs interop and stuff
like that )
Stuck to vite lib app

Closed related PRs:
- https://github.com/twentyhq/twenty/pull/11294
- https://github.com/twentyhq/twenty/pull/11203
This commit is contained in:
Paul Rastoin
2025-04-03 11:47:55 +02:00
committed by GitHub
parent 8c9fcfe5a4
commit 4a4e65fe4a
1009 changed files with 5757 additions and 2828 deletions

View File

@ -9,7 +9,7 @@ Used when a user needs to select multiple values from several options.
<ArticleTabs label1="Usage" label2="Props">
<ArticleTab>
<SandpackEditor content={`import { Checkbox } from "twenty-ui";
<SandpackEditor content={`import { Checkbox } from "twenty-ui/display";
export const MyComponent = () => {
return (

View File

@ -11,7 +11,7 @@ Represents different color schemes and is specially tailored for light and dark
<ArticleTabs label1="Usage" label2="Props">
<ArticleTab>
<SandpackEditor content={`import { ColorSchemeCard } from "twenty-ui";
<SandpackEditor content={`import { ColorSchemeCard } from "twenty-ui/display";
export const MyComponent = () => {
return (
@ -43,7 +43,7 @@ Allows users to choose between different color schemes.
<ArticleTabs label1="Usage" label2="Props">
<ArticleTab>
<SandpackEditor content={`import { ColorSchemePicker } from "twenty-ui";
<SandpackEditor content={`import { ColorSchemePicker } from "twenty-ui/display";
export const MyComponent = () => {
return <ColorSchemePicker

View File

@ -9,7 +9,7 @@ Used when users may only choose one option from a series of options.
<ArticleTabs label1="Usage" label2="Props">
<ArticleTab>
<SandpackEditor content={`import { Radio } from "twenty-ui";
<SandpackEditor content={`import { Radio } from "twenty-ui/display";
export const MyComponent = () => {
@ -65,7 +65,7 @@ Groups together related radio buttons.
<ArticleTab>
<SandpackEditor content={`import React, { useState } from "react";
import { Radio, RadioGroup } from "twenty-ui";
import { Radio, RadioGroup } from "twenty-ui/display";
export const MyComponent = () => {

View File

@ -10,7 +10,7 @@ Allows users to pick a value from a list of predefined options.
<ArticleTab>
<SandpackEditor content={`import { RecoilRoot } from 'recoil';
import { IconTwentyStar } from 'twenty-ui';
import { IconTwentyStar } from 'twenty-ui/display';
import { Select } from '@/ui/input/components/Select';

View File

@ -7,7 +7,7 @@ image: /images/user-guide/table-views/table.png
<ArticleTabs label1="Usage" label2="Props">
<ArticleTab>
<SandpackEditor content={`import { Toggle } from "twenty-ui";
<SandpackEditor content={`import { Toggle } from "twenty-ui/input";
export const MyComponent = () => {
return (