[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:
@ -2,7 +2,7 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';
|
||||
import { sortedFieldByTableFamilyState } from '@/ui/layout/table/states/sortedFieldByTableFamilyState';
|
||||
import { TableSortValue } from '@/ui/layout/table/types/TableSortValue';
|
||||
import { useRecoilState } from 'recoil';
|
||||
import { IconArrowDown, IconArrowUp, IconComponent } from 'twenty-ui';
|
||||
import { IconArrowDown, IconArrowUp, IconComponent } from 'twenty-ui/display';
|
||||
|
||||
export const SortableTableHeader = ({
|
||||
tableId,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import isPropValid from '@emotion/is-prop-valid';
|
||||
import styled from '@emotion/styled';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { MOBILE_VIEWPORT } from 'twenty-ui';
|
||||
import { MOBILE_VIEWPORT } from 'twenty-ui/theme';
|
||||
|
||||
const StyledTableRow = styled('div', {
|
||||
shouldForwardProp: (prop) =>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
import { ReactNode, useState } from 'react';
|
||||
import { IconChevronDown, IconChevronUp, Label } from 'twenty-ui';
|
||||
import { TableBody } from './TableBody';
|
||||
import { IconChevronDown, IconChevronUp, Label } from 'twenty-ui/display';
|
||||
|
||||
type TableSectionProps = {
|
||||
children: ReactNode;
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { ComponentDecorator } from 'twenty-ui';
|
||||
|
||||
import { Table } from '../Table';
|
||||
import { TableCell } from '../TableCell';
|
||||
import { TableHeader } from '../TableHeader';
|
||||
import { TableRow } from '../TableRow';
|
||||
import { TableSection } from '../TableSection';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
|
||||
const meta: Meta<typeof Table> = {
|
||||
title: 'UI/Layout/Table/Table',
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { MessageDescriptor } from '@lingui/core';
|
||||
import { IconComponent } from 'twenty-ui';
|
||||
import { IconComponent } from 'twenty-ui/display';
|
||||
|
||||
export type TableFieldMetadata<ItemType> = {
|
||||
fieldLabel: MessageDescriptor;
|
||||
|
||||
Reference in New Issue
Block a user