mirror of
				https://github.com/lingble/twenty.git
				synced 2025-10-31 04:37:56 +00:00 
			
		
		
		
	Migrate to twenty-ui - layout/card (#8003)
This PR was created by [GitStart](https://gitstart.com/) to address the requirements from this ticket: [TWNTY-7532](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-7532). --- ### Description Migrate: - Card - CardContent - CardFooter - CardHeader ### Demo Card in Storybook  ###### Fixes twentyhq/private-issues#86 --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
		![57568882+gitstart-app[bot]@users.noreply.github.com](/assets/img/avatar_default.png) gitstart-app[bot]
					gitstart-app[bot]
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							9b5d0e7850
						
					
				
				
					commit
					1dfeba39eb
				
			| @@ -4,7 +4,7 @@ import { differenceInSeconds, endOfDay, format } from 'date-fns'; | |||||||
|  |  | ||||||
| import { CalendarEventRow } from '@/activities/calendar/components/CalendarEventRow'; | import { CalendarEventRow } from '@/activities/calendar/components/CalendarEventRow'; | ||||||
| import { getCalendarEventStartDate } from '@/activities/calendar/utils/getCalendarEventStartDate'; | import { getCalendarEventStartDate } from '@/activities/calendar/utils/getCalendarEventStartDate'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; | import { CardContent } from 'twenty-ui'; | ||||||
| import { TimelineCalendarEvent } from '~/generated/graphql'; | import { TimelineCalendarEvent } from '~/generated/graphql'; | ||||||
|  |  | ||||||
| type CalendarDayCardContentProps = { | type CalendarDayCardContentProps = { | ||||||
|   | |||||||
| @@ -9,6 +9,8 @@ import { | |||||||
|   IconArrowRight, |   IconArrowRight, | ||||||
|   IconLock, |   IconLock, | ||||||
|   isDefined, |   isDefined, | ||||||
|  |   Card, | ||||||
|  |   CardContent, | ||||||
| } from 'twenty-ui'; | } from 'twenty-ui'; | ||||||
|  |  | ||||||
| import { CalendarCurrentEventCursor } from '@/activities/calendar/components/CalendarCurrentEventCursor'; | import { CalendarCurrentEventCursor } from '@/activities/calendar/components/CalendarCurrentEventCursor'; | ||||||
| @@ -18,8 +20,6 @@ import { getCalendarEventEndDate } from '@/activities/calendar/utils/getCalendar | |||||||
| import { getCalendarEventStartDate } from '@/activities/calendar/utils/getCalendarEventStartDate'; | import { getCalendarEventStartDate } from '@/activities/calendar/utils/getCalendarEventStartDate'; | ||||||
| import { hasCalendarEventEnded } from '@/activities/calendar/utils/hasCalendarEventEnded'; | import { hasCalendarEventEnded } from '@/activities/calendar/utils/hasCalendarEventEnded'; | ||||||
| import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState'; | import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; |  | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
| import { | import { | ||||||
|   CalendarChannelVisibility, |   CalendarChannelVisibility, | ||||||
|   TimelineCalendarEvent, |   TimelineCalendarEvent, | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ import { useContext } from 'react'; | |||||||
|  |  | ||||||
| import { CalendarDayCardContent } from '@/activities/calendar/components/CalendarDayCardContent'; | import { CalendarDayCardContent } from '@/activities/calendar/components/CalendarDayCardContent'; | ||||||
| import { CalendarContext } from '@/activities/calendar/contexts/CalendarContext'; | import { CalendarContext } from '@/activities/calendar/contexts/CalendarContext'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; | import { Card } from 'twenty-ui'; | ||||||
|  |  | ||||||
| type CalendarMonthCardProps = { | type CalendarMonthCardProps = { | ||||||
|   dayTimes: number[]; |   dayTimes: number[]; | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| import { Card } from '@/ui/layout/card/components/Card'; |  | ||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
|  | import { Card } from 'twenty-ui'; | ||||||
|  |  | ||||||
| const StyledList = styled(Card)` | const StyledList = styled(Card)` | ||||||
|   & > :not(:last-child) { |   & > :not(:last-child) { | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
|  | import { CardContent } from 'twenty-ui'; | ||||||
| import React from 'react'; | import React from 'react'; | ||||||
|  |  | ||||||
| const StyledRowContent = styled(CardContent)<{ | const StyledRowContent = styled(CardContent)<{ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
|  |  | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; | import { Card } from 'twenty-ui'; | ||||||
|  |  | ||||||
| type EventCardProps = { | type EventCardProps = { | ||||||
|   children: React.ReactNode; |   children: React.ReactNode; | ||||||
|   | |||||||
| @@ -3,10 +3,9 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSi | |||||||
| import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord'; | import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord'; | ||||||
| import { SettingsAccountsEventVisibilitySettingsCard } from '@/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard'; | import { SettingsAccountsEventVisibilitySettingsCard } from '@/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard'; | ||||||
| import { SettingsOptionCardContent } from '@/settings/components/SettingsOptionCardContent'; | import { SettingsOptionCardContent } from '@/settings/components/SettingsOptionCardContent'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; |  | ||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { Section } from '@react-email/components'; | import { Section } from '@react-email/components'; | ||||||
| import { H2Title, Toggle } from 'twenty-ui'; | import { H2Title, Toggle, Card } from 'twenty-ui'; | ||||||
| import { CalendarChannelVisibility } from '~/generated-metadata/graphql'; | import { CalendarChannelVisibility } from '~/generated-metadata/graphql'; | ||||||
|  |  | ||||||
| const StyledDetailsContainer = styled.div` | const StyledDetailsContainer = styled.div` | ||||||
|   | |||||||
| @@ -1,10 +1,7 @@ | |||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { Button, IconGoogle } from 'twenty-ui'; | import { Button, Card, CardContent, CardHeader, IconGoogle } from 'twenty-ui'; | ||||||
|  |  | ||||||
| import { useTriggerGoogleApisOAuth } from '@/settings/accounts/hooks/useTriggerGoogleApisOAuth'; | import { useTriggerGoogleApisOAuth } from '@/settings/accounts/hooks/useTriggerGoogleApisOAuth'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; |  | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
| import { CardHeader } from '@/ui/layout/card/components/CardHeader'; |  | ||||||
|  |  | ||||||
| const StyledHeader = styled(CardHeader)` | const StyledHeader = styled(CardHeader)` | ||||||
|   align-items: center; |   align-items: center; | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { H2Title, Toggle } from 'twenty-ui'; | import { H2Title, Toggle, Card } from 'twenty-ui'; | ||||||
|  |  | ||||||
| import { | import { | ||||||
|   MessageChannel, |   MessageChannel, | ||||||
| @@ -10,7 +10,6 @@ import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord'; | |||||||
| import { SettingsAccountsMessageAutoCreationCard } from '@/settings/accounts/components/SettingsAccountsMessageAutoCreationCard'; | import { SettingsAccountsMessageAutoCreationCard } from '@/settings/accounts/components/SettingsAccountsMessageAutoCreationCard'; | ||||||
| import { SettingsAccountsMessageVisibilityCard } from '@/settings/accounts/components/SettingsAccountsMessageVisibilityCard'; | import { SettingsAccountsMessageVisibilityCard } from '@/settings/accounts/components/SettingsAccountsMessageVisibilityCard'; | ||||||
| import { SettingsOptionCardContent } from '@/settings/components/SettingsOptionCardContent'; | import { SettingsOptionCardContent } from '@/settings/components/SettingsOptionCardContent'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; |  | ||||||
| import { Section } from '@/ui/layout/section/components/Section'; | import { Section } from '@/ui/layout/section/components/Section'; | ||||||
| import { MessageChannelVisibility } from '~/generated-metadata/graphql'; | import { MessageChannelVisibility } from '~/generated-metadata/graphql'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,8 +2,7 @@ import styled from '@emotion/styled'; | |||||||
| import { ReactNode } from 'react'; | import { ReactNode } from 'react'; | ||||||
|  |  | ||||||
| import { Radio } from '@/ui/input/components/Radio'; | import { Radio } from '@/ui/input/components/Radio'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; | import { Card, CardContent } from 'twenty-ui'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
|  |  | ||||||
| type SettingsAccountsRadioSettingsCardProps<Option extends { value: string }> = | type SettingsAccountsRadioSettingsCardProps<Option extends { value: string }> = | ||||||
|   { |   { | ||||||
|   | |||||||
| @@ -1,9 +1,7 @@ | |||||||
| import { useTheme } from '@emotion/react'; | import { useTheme } from '@emotion/react'; | ||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { IconChevronRight, Pill } from 'twenty-ui'; | import { IconChevronRight, Pill, Card, CardContent } from 'twenty-ui'; | ||||||
|  |  | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; |  | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
| import { ReactNode } from 'react'; | import { ReactNode } from 'react'; | ||||||
|  |  | ||||||
| type SettingsCardProps = { | type SettingsCardProps = { | ||||||
|   | |||||||
| @@ -1,11 +1,9 @@ | |||||||
| import { ComponentType } from 'react'; |  | ||||||
| import { useTheme } from '@emotion/react'; | import { useTheme } from '@emotion/react'; | ||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { IconComponent, IconPlus } from 'twenty-ui'; | import { ComponentType } from 'react'; | ||||||
|  | import { IconComponent, IconPlus, Card, CardFooter } from 'twenty-ui'; | ||||||
|  |  | ||||||
| import { SettingsListSkeletonCard } from '@/settings/components/SettingsListSkeletonCard'; | import { SettingsListSkeletonCard } from '@/settings/components/SettingsListSkeletonCard'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; |  | ||||||
| import { CardFooter } from '@/ui/layout/card/components/CardFooter'; |  | ||||||
|  |  | ||||||
| import { SettingsListItemCardContent } from './SettingsListItemCardContent'; | import { SettingsListItemCardContent } from './SettingsListItemCardContent'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,9 +1,7 @@ | |||||||
| import { ReactNode } from 'react'; |  | ||||||
| import { useTheme } from '@emotion/react'; | import { useTheme } from '@emotion/react'; | ||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { IconComponent } from 'twenty-ui'; | import { ReactNode } from 'react'; | ||||||
|  | import { IconComponent, CardContent } from 'twenty-ui'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
|  |  | ||||||
| const StyledRow = styled(CardContent)` | const StyledRow = styled(CardContent)` | ||||||
|   align-items: center; |   align-items: center; | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
|  |  | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; | import { Card } from 'twenty-ui'; | ||||||
|  |  | ||||||
| const StyledCard = styled(Card)` | const StyledCard = styled(Card)` | ||||||
|   background-color: ${({ theme }) => theme.background.secondary}; |   background-color: ${({ theme }) => theme.background.secondary}; | ||||||
|   | |||||||
| @@ -1,8 +1,7 @@ | |||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { useTheme } from '@emotion/react'; | import { useTheme } from '@emotion/react'; | ||||||
|  |  | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; | import { IconComponent, CardContent } from 'twenty-ui'; | ||||||
| import { IconComponent } from 'twenty-ui'; |  | ||||||
| import { ReactNode } from 'react'; | import { ReactNode } from 'react'; | ||||||
|  |  | ||||||
| type SettingsOptionCardContentProps = { | type SettingsOptionCardContentProps = { | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { Radio } from '@/ui/input/components/Radio'; | import { Radio } from '@/ui/input/components/Radio'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; | import { IconComponent, CardContent } from 'twenty-ui'; | ||||||
| import { IconComponent } from 'twenty-ui'; |  | ||||||
| import { useTheme } from '@emotion/react'; | import { useTheme } from '@emotion/react'; | ||||||
|  |  | ||||||
| const StyledRadioCardContent = styled(CardContent)` | const StyledRadioCardContent = styled(CardContent)` | ||||||
|   | |||||||
| @@ -1,8 +1,7 @@ | |||||||
| import { ReactNode } from 'react'; |  | ||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
|  | import { ReactNode } from 'react'; | ||||||
|  |  | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; | import { Card, CardContent } from 'twenty-ui'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
|  |  | ||||||
| type SettingsSummaryCardProps = { | type SettingsSummaryCardProps = { | ||||||
|   title: ReactNode; |   title: ReactNode; | ||||||
|   | |||||||
| @@ -2,8 +2,7 @@ import styled from '@emotion/styled'; | |||||||
| import { ReactNode } from 'react'; | import { ReactNode } from 'react'; | ||||||
|  |  | ||||||
| import { StyledFormCardTitle } from '@/settings/data-model/fields/components/StyledFormCardTitle'; | import { StyledFormCardTitle } from '@/settings/data-model/fields/components/StyledFormCardTitle'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; | import { Card, CardContent } from 'twenty-ui'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
|  |  | ||||||
| type SettingsDataModelPreviewFormCardProps = { | type SettingsDataModelPreviewFormCardProps = { | ||||||
|   className?: string; |   className?: string; | ||||||
|   | |||||||
| @@ -1,12 +1,11 @@ | |||||||
| import { Controller, useFormContext } from 'react-hook-form'; |  | ||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { IconCheck, IconX } from 'twenty-ui'; | import { Controller, useFormContext } from 'react-hook-form'; | ||||||
|  | import { IconCheck, IconX, CardContent } from 'twenty-ui'; | ||||||
| import { z } from 'zod'; | import { z } from 'zod'; | ||||||
|  |  | ||||||
| import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; | import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; | ||||||
| import { useBooleanSettingsFormInitialValues } from '@/settings/data-model/fields/forms/boolean/hooks/useBooleanSettingsFormInitialValues'; | import { useBooleanSettingsFormInitialValues } from '@/settings/data-model/fields/forms/boolean/hooks/useBooleanSettingsFormInitialValues'; | ||||||
| import { Select } from '@/ui/input/components/Select'; | import { Select } from '@/ui/input/components/Select'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
| import { isDefined } from '~/utils/isDefined'; | import { isDefined } from '~/utils/isDefined'; | ||||||
|  |  | ||||||
| export const settingsDataModelFieldBooleanFormSchema = z.object({ | export const settingsDataModelFieldBooleanFormSchema = z.object({ | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ import { currencyFieldDefaultValueSchema } from '@/object-record/record-field/va | |||||||
| import { SETTINGS_FIELD_CURRENCY_CODES } from '@/settings/data-model/constants/SettingsFieldCurrencyCodes'; | import { SETTINGS_FIELD_CURRENCY_CODES } from '@/settings/data-model/constants/SettingsFieldCurrencyCodes'; | ||||||
| import { useCurrencySettingsFormInitialValues } from '@/settings/data-model/fields/forms/currency/hooks/useCurrencySettingsFormInitialValues'; | import { useCurrencySettingsFormInitialValues } from '@/settings/data-model/fields/forms/currency/hooks/useCurrencySettingsFormInitialValues'; | ||||||
| import { Select } from '@/ui/input/components/Select'; | import { Select } from '@/ui/input/components/Select'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; | import { CardContent } from 'twenty-ui'; | ||||||
| import { applySimpleQuotesToString } from '~/utils/string/applySimpleQuotesToString'; | import { applySimpleQuotesToString } from '~/utils/string/applySimpleQuotesToString'; | ||||||
|  |  | ||||||
| export const settingsDataModelFieldCurrencyFormSchema = z.object({ | export const settingsDataModelFieldCurrencyFormSchema = z.object({ | ||||||
|   | |||||||
| @@ -5,8 +5,7 @@ import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; | |||||||
| import { StyledFormCardTitle } from '@/settings/data-model/fields/components/StyledFormCardTitle'; | import { StyledFormCardTitle } from '@/settings/data-model/fields/components/StyledFormCardTitle'; | ||||||
| import { SettingsDataModelFieldToggle } from '@/settings/data-model/fields/forms/components/SettingsDataModelFieldToggle'; | import { SettingsDataModelFieldToggle } from '@/settings/data-model/fields/forms/components/SettingsDataModelFieldToggle'; | ||||||
| import { useDateSettingsFormInitialValues } from '@/settings/data-model/fields/forms/date/hooks/useDateSettingsFormInitialValues'; | import { useDateSettingsFormInitialValues } from '@/settings/data-model/fields/forms/date/hooks/useDateSettingsFormInitialValues'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; | import { IconClockShare, CardContent } from 'twenty-ui'; | ||||||
| import { IconClockShare } from 'twenty-ui'; |  | ||||||
|  |  | ||||||
| export const settingsDataModelFieldDateFormSchema = z.object({ | export const settingsDataModelFieldDateFormSchema = z.object({ | ||||||
|   settings: z |   settings: z | ||||||
|   | |||||||
| @@ -4,7 +4,7 @@ import { z } from 'zod'; | |||||||
| import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; | import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; | ||||||
| import { numberFieldDefaultValueSchema } from '@/object-record/record-field/validation-schemas/numberFieldDefaultValueSchema'; | import { numberFieldDefaultValueSchema } from '@/object-record/record-field/validation-schemas/numberFieldDefaultValueSchema'; | ||||||
| import { SettingsDataModelFieldNumberDecimalsInput } from '@/settings/data-model/fields/forms/number/components/SettingsDataModelFieldNumberDecimalInput'; | import { SettingsDataModelFieldNumberDecimalsInput } from '@/settings/data-model/fields/forms/number/components/SettingsDataModelFieldNumberDecimalInput'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; | import { CardContent } from 'twenty-ui'; | ||||||
| import { DEFAULT_DECIMAL_VALUE } from '~/utils/format/number'; | import { DEFAULT_DECIMAL_VALUE } from '~/utils/format/number'; | ||||||
|  |  | ||||||
| export const settingsDataModelFieldNumberFormSchema = z.object({ | export const settingsDataModelFieldNumberFormSchema = z.object({ | ||||||
|   | |||||||
| @@ -1,7 +1,14 @@ | |||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { DropResult } from '@hello-pangea/dnd'; | import { DropResult } from '@hello-pangea/dnd'; | ||||||
| import { Controller, useFormContext } from 'react-hook-form'; | import { Controller, useFormContext } from 'react-hook-form'; | ||||||
| import { IconPlus, IconTool, LightButton, MAIN_COLORS } from 'twenty-ui'; | import { | ||||||
|  |   CardContent, | ||||||
|  |   CardFooter, | ||||||
|  |   IconPlus, | ||||||
|  |   IconTool, | ||||||
|  |   LightButton, | ||||||
|  |   MAIN_COLORS, | ||||||
|  | } from 'twenty-ui'; | ||||||
| import { z } from 'zod'; | import { z } from 'zod'; | ||||||
|  |  | ||||||
| import { | import { | ||||||
| @@ -14,8 +21,6 @@ import { selectFieldDefaultValueSchema } from '@/object-record/record-field/vali | |||||||
| import { useSelectSettingsFormInitialValues } from '@/settings/data-model/fields/forms/select/hooks/useSelectSettingsFormInitialValues'; | import { useSelectSettingsFormInitialValues } from '@/settings/data-model/fields/forms/select/hooks/useSelectSettingsFormInitialValues'; | ||||||
| import { generateNewSelectOption } from '@/settings/data-model/fields/forms/select/utils/generateNewSelectOption'; | import { generateNewSelectOption } from '@/settings/data-model/fields/forms/select/utils/generateNewSelectOption'; | ||||||
| import { isSelectOptionDefaultValue } from '@/settings/data-model/utils/isSelectOptionDefaultValue'; | import { isSelectOptionDefaultValue } from '@/settings/data-model/utils/isSelectOptionDefaultValue'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
| import { CardFooter } from '@/ui/layout/card/components/CardFooter'; |  | ||||||
| import { DraggableItem } from '@/ui/layout/draggable-list/components/DraggableItem'; | import { DraggableItem } from '@/ui/layout/draggable-list/components/DraggableItem'; | ||||||
| import { DraggableList } from '@/ui/layout/draggable-list/components/DraggableList'; | import { DraggableList } from '@/ui/layout/draggable-list/components/DraggableList'; | ||||||
| import { FieldMetadataType } from '~/generated-metadata/graphql'; | import { FieldMetadataType } from '~/generated-metadata/graphql'; | ||||||
|   | |||||||
| @@ -1,12 +1,12 @@ | |||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
|  |  | ||||||
| import { | import { | ||||||
|   SettingsDataModelFieldPreview, |   // eslint-disable-next-line prettier/prettier | ||||||
|  |     SettingsDataModelFieldPreview, | ||||||
|   SettingsDataModelFieldPreviewProps, |   SettingsDataModelFieldPreviewProps, | ||||||
| } from '@/settings/data-model/fields/preview/components/SettingsDataModelFieldPreview'; | } from '@/settings/data-model/fields/preview/components/SettingsDataModelFieldPreview'; | ||||||
| import { SettingsDataModelObjectSummary } from '@/settings/data-model/objects/components/SettingsDataModelObjectSummary'; | import { SettingsDataModelObjectSummary } from '@/settings/data-model/objects/components/SettingsDataModelObjectSummary'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; | import { Card, CardContent } from 'twenty-ui'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
|  |  | ||||||
| export type SettingsDataModelFieldPreviewCardProps = | export type SettingsDataModelFieldPreviewCardProps = | ||||||
|   SettingsDataModelFieldPreviewProps & { |   SettingsDataModelFieldPreviewProps & { | ||||||
|   | |||||||
| @@ -1,7 +1,5 @@ | |||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { FloatingButton, IconEye } from 'twenty-ui'; | import { Card, FloatingButton, IconEye } from 'twenty-ui'; | ||||||
|  |  | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; |  | ||||||
|  |  | ||||||
| import { SettingsPath } from '@/types/SettingsPath'; | import { SettingsPath } from '@/types/SettingsPath'; | ||||||
| import DarkCoverImage from '../../assets/cover-dark.png'; | import DarkCoverImage from '../../assets/cover-dark.png'; | ||||||
|   | |||||||
| @@ -11,8 +11,7 @@ import { | |||||||
|   SettingsDataModelObjectIdentifiersForm, |   SettingsDataModelObjectIdentifiersForm, | ||||||
|   SettingsDataModelObjectIdentifiersFormValues, |   SettingsDataModelObjectIdentifiersFormValues, | ||||||
| } from '@/settings/data-model/objects/forms/components/SettingsDataModelObjectIdentifiersForm'; | } from '@/settings/data-model/objects/forms/components/SettingsDataModelObjectIdentifiersForm'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; | import { Card, CardContent } from 'twenty-ui'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
|  |  | ||||||
| type SettingsDataModelObjectSettingsFormCardProps = { | type SettingsDataModelObjectSettingsFormCardProps = { | ||||||
|   objectMetadataItem: ObjectMetadataItem; |   objectMetadataItem: ObjectMetadataItem; | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
|  |  | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; | import { Card, CardContent } from 'twenty-ui'; | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
|  |  | ||||||
| import PreviewBackgroundImage from '../assets/preview-background.svg'; | import PreviewBackgroundImage from '../assets/preview-background.svg'; | ||||||
| import SyncImage from '../assets/sync.svg?react'; | import SyncImage from '../assets/sync.svg?react'; | ||||||
|   | |||||||
| @@ -2,11 +2,8 @@ | |||||||
|  |  | ||||||
| import { getSettingsPagePath } from '@/settings/utils/getSettingsPagePath'; | import { getSettingsPagePath } from '@/settings/utils/getSettingsPagePath'; | ||||||
| import { SettingsPath } from '@/types/SettingsPath'; | import { SettingsPath } from '@/types/SettingsPath'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; |  | ||||||
| import { CardContent } from '@/ui/layout/card/components/CardContent'; |  | ||||||
| import { CardHeader } from '@/ui/layout/card/components/CardHeader'; |  | ||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { Button, IconKey } from 'twenty-ui'; | import { Button, Card, CardContent, CardHeader, IconKey } from 'twenty-ui'; | ||||||
|  |  | ||||||
| const StyledHeader = styled(CardHeader)` | const StyledHeader = styled(CardHeader)` | ||||||
|   align-items: center; |   align-items: center; | ||||||
|   | |||||||
| @@ -2,10 +2,9 @@ import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState'; | |||||||
| import { SettingsOptionCardContent } from '@/settings/components/SettingsOptionCardContent'; | import { SettingsOptionCardContent } from '@/settings/components/SettingsOptionCardContent'; | ||||||
| import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar'; | import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar'; | ||||||
| import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; | import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; | ||||||
| import { Card } from '@/ui/layout/card/components/Card'; |  | ||||||
| import styled from '@emotion/styled'; | import styled from '@emotion/styled'; | ||||||
| import { useRecoilState } from 'recoil'; | import { useRecoilState } from 'recoil'; | ||||||
| import { IconLink, Toggle } from 'twenty-ui'; | import { IconLink, Toggle, Card } from 'twenty-ui'; | ||||||
| import { useUpdateWorkspaceMutation } from '~/generated/graphql'; | import { useUpdateWorkspaceMutation } from '~/generated/graphql'; | ||||||
|  |  | ||||||
| const StyledToggle = styled(Toggle)` | const StyledToggle = styled(Toggle)` | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| import { Meta, StoryObj } from '@storybook/react'; | import { Meta, StoryObj } from '@storybook/react'; | ||||||
| import { ComponentDecorator } from 'twenty-ui'; | import { ComponentDecorator } from '@ui/testing'; | ||||||
| 
 | 
 | ||||||
| import { Card } from '../Card'; | import { Card } from '../Card'; | ||||||
| import { CardContent } from '../CardContent'; | import { CardContent } from '../CardContent'; | ||||||
| @@ -5,4 +5,8 @@ export * from './animated-placeholder/constants/Background'; | |||||||
| export * from './animated-placeholder/constants/DarkBackground'; | export * from './animated-placeholder/constants/DarkBackground'; | ||||||
| export * from './animated-placeholder/constants/DarkMovingImage'; | export * from './animated-placeholder/constants/DarkMovingImage'; | ||||||
| export * from './animated-placeholder/constants/MovingImage'; | export * from './animated-placeholder/constants/MovingImage'; | ||||||
|  | export * from './card/components/Card'; | ||||||
|  | export * from './card/components/CardContent'; | ||||||
|  | export * from './card/components/CardFooter'; | ||||||
|  | export * from './card/components/CardHeader'; | ||||||
| export * from './expandableContainer/components/ExpandableContainer'; | export * from './expandableContainer/components/ExpandableContainer'; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user