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:
@@ -15,7 +15,7 @@ import { activeDropdownFocusIdState } from '@/ui/layout/dropdown/states/activeDr
|
||||
import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';
|
||||
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';
|
||||
import { MOBILE_VIEWPORT } from 'twenty-ui-deprecated/theme-constants';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import { BooleanDisplay } from '@/ui/field/display/components/BooleanDisplay';
|
||||
import { themeCssVariables } from 'twenty-ui/theme-constants';
|
||||
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
|
||||
|
||||
const StyledEditableBooleanFieldContainer = styled.div<{ readonly?: boolean }>`
|
||||
align-items: center;
|
||||
|
||||
@@ -8,8 +8,11 @@ import { CURRENCIES } from '@/settings/data-model/constants/Currencies';
|
||||
import { CurrencyPickerDropdownButton } from '@/ui/input/components/internal/currency/components/CurrencyPickerDropdownButton';
|
||||
import { type Currency } from '@/ui/input/components/internal/types/Currency';
|
||||
import { IMaskInput } from 'react-imask';
|
||||
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';
|
||||
import { getSeparatorsForNumberFormat } from '~/utils/format/getSeparatorsForNumberFormat';
|
||||
|
||||
export const StyledIMaskInput = styled.div`
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';
|
||||
import { currentFocusIdSelector } from '@/ui/utilities/focus/states/currentFocusIdSelector';
|
||||
import { useStore } from 'jotai';
|
||||
import { type Nullable } from 'twenty-ui/utilities';
|
||||
import { type Nullable } from 'twenty-ui-deprecated/utilities';
|
||||
|
||||
export type DateInputProps = {
|
||||
instanceId: string;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';
|
||||
import { currentFocusIdSelector } from '@/ui/utilities/focus/states/currentFocusIdSelector';
|
||||
import { useStore } from 'jotai';
|
||||
import { type Temporal } from 'temporal-polyfill';
|
||||
import { type Nullable } from 'twenty-ui/utilities';
|
||||
import { type Nullable } from 'twenty-ui-deprecated/utilities';
|
||||
|
||||
export type DateTimeInputProps = {
|
||||
instanceId: string;
|
||||
|
||||
@@ -17,7 +17,7 @@ import { isDefined } from 'twenty-shared/utils';
|
||||
import { splitFullName } from '~/utils/format/spiltFullName';
|
||||
import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';
|
||||
import { StyledTextInput } from './TextInput';
|
||||
import { themeCssVariables } from 'twenty-ui/theme-constants';
|
||||
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
display: flex;
|
||||
|
||||
@@ -17,8 +17,11 @@ import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useLis
|
||||
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { type SelectOption } from 'twenty-ui/input';
|
||||
import { MenuItem, MenuItemMultiSelectTag } from 'twenty-ui/navigation';
|
||||
import { type SelectOption } from 'twenty-ui-deprecated/input';
|
||||
import {
|
||||
MenuItem,
|
||||
MenuItemMultiSelectTag,
|
||||
} from 'twenty-ui-deprecated/navigation';
|
||||
import { normalizeSearchText } from '~/utils/normalizeSearchText';
|
||||
import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';
|
||||
|
||||
|
||||
@@ -5,8 +5,11 @@ import { useContext, useState } from 'react';
|
||||
import { useClearField } from '@/object-record/record-field/ui/hooks/useClearField';
|
||||
import { RATING_VALUES } from 'twenty-shared/constants';
|
||||
import { type FieldRatingValue } from 'twenty-shared/types';
|
||||
import { IconTwentyStarFilled } from 'twenty-ui/display';
|
||||
import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';
|
||||
import { IconTwentyStarFilled } from 'twenty-ui-deprecated/display';
|
||||
import {
|
||||
ThemeContext,
|
||||
themeCssVariables,
|
||||
} from 'twenty-ui-deprecated/theme-constants';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
align-items: center;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SelectInput as SelectBaseInput } from '@/ui/input/components/SelectInput';
|
||||
import { SelectableList } from '@/ui/layout/selectable-list/components/SelectableList';
|
||||
import { type SelectOption } from 'twenty-ui/input';
|
||||
import { type SelectOption } from 'twenty-ui-deprecated/input';
|
||||
|
||||
type SelectInputProps = {
|
||||
selectableListComponentInstanceId: string;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { LightCopyIconButton } from '@/object-record/record-field/ui/components/
|
||||
import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';
|
||||
import { themeCssVariables } from 'twenty-ui/theme-constants';
|
||||
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
|
||||
|
||||
export type TextAreaInputProps = {
|
||||
instanceId: string;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useEffect, useRef, useState, type ChangeEvent } from 'react';
|
||||
|
||||
import { LightCopyIconButton } from '@/object-record/record-field/ui/components/LightCopyIconButton';
|
||||
import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';
|
||||
import { themeCssVariables } from 'twenty-ui/theme-constants';
|
||||
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
|
||||
|
||||
export const StyledTextInput = styled.input`
|
||||
background-color: transparent;
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@ import {
|
||||
IconRocket,
|
||||
IconTag,
|
||||
IconTarget,
|
||||
} from 'twenty-ui/display';
|
||||
import { type SelectOption } from 'twenty-ui/input';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import { type SelectOption } from 'twenty-ui-deprecated/input';
|
||||
import { ComponentDecorator } from 'twenty-ui-deprecated/testing';
|
||||
|
||||
type RenderProps = {
|
||||
values: FieldMultiSelectValue;
|
||||
|
||||
Reference in New Issue
Block a user