Skip to content

The open alternative to Salesforce, designed for AI.

Clean up twenty-ui overrides that render identically (#28006)

Raphaël Bosic482b5f4465f
diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx
index a2d294d74b5..4d485dbb75c 100644
--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx
+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx
@@ -12,16 +12,6 @@ type CalendarDayCardContentProps = {
divider?: boolean;
};
-const StyledCardContentContainer = styled.div`
- > div {
- align-items: flex-start;
- display: flex;
- flex-direction: row;
- gap: ${themeCssVariables.spacing[3]};
- padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[3]};
- }
-`;
-
const StyledDayCardContent = styled(Card.Content)`
@keyframes calendarDayEnded {
to {
@@ -29,8 +19,13 @@ const StyledDayCardContent = styled(Card.Content)`
}
}
+ align-items: flex-start;
animation: calendarDayEnded calc(var(--t-animation-duration-fast) * 1s) ease
forwards;
+ display: flex;
+ flex-direction: row;
+ gap: ${themeCssVariables.spacing[3]};
+ padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[3]};
`;
const StyledDayContainer = styled.div`
@@ -71,23 +66,21 @@ export const CalendarDayCardContent = ({
const monthDayLabel = format(endOfDayDate, 'dd');
return (
- <StyledCardContentContainer>
- <StyledDayCardContent
- divider={divider}
- style={{ animationDelay: `${Math.max(0, dayEndsIn)}s` }}
- >
- <StyledDayContainer>
- <StyledWeekDay>{weekDayLabel}</StyledWeekDay>
- <StyledMonthDay>{monthDayLabel}</StyledMonthDay>
- </StyledDayContainer>
- <StyledEvents>
- {calendarEvents.map((calendarEvent) => (
- <StyledEventRowContainer key={calendarEvent.id}>
- <CalendarEventRow calendarEvent={calendarEvent} />
- </StyledEventRowContainer>
- ))}
- </StyledEvents>
- </StyledDayCardContent>
- </StyledCardContentContainer>
+ <StyledDayCardContent
+ divider={divider}
+ style={{ animationDelay: `${Math.max(0, dayEndsIn)}s` }}
+ >
+ <StyledDayContainer>
+ <StyledWeekDay>{weekDayLabel}</StyledWeekDay>
+ <StyledMonthDay>{monthDayLabel}</StyledMonthDay>
+ </StyledDayContainer>
+ <StyledEvents>
+ {calendarEvents.map((calendarEvent) => (
+ <StyledEventRowContainer key={calendarEvent.id}>
+ <CalendarEventRow calendarEvent={calendarEvent} />
+ </StyledEventRowContainer>
+ ))}
+ </StyledEvents>
+ </StyledDayCardContent>
);
};
diff --git a/packages/twenty-front/src/modules/activities/components/ActivityList.tsx b/packages/twenty-front/src/modules/activities/components/ActivityList.tsx
index 6c76cfa698b..bbb66e673ea 100644
--- a/packages/twenty-front/src/modules/activities/components/ActivityList.tsx
+++ b/packages/twenty-front/src/modules/activities/components/ActivityList.tsx
@@ -1,3 +1,4 @@
+import { css } from '@linaria/core';
import { styled } from '@linaria/react';
import { Card } from 'twenty-ui/primitives/surfaces';
import { themeCssVariables } from 'twenty-ui/theme';
@@ -9,12 +10,6 @@ const StyledListContainer = styled.div`
flex: 1;
height: 100%;
min-height: 0;
-
- > * {
- box-sizing: border-box;
- height: 100%;
- overflow-y: auto;
- }
}
> * {
@@ -25,6 +20,11 @@ const StyledListContainer = styled.div`
}
`;
+const scrollableCardClassName = css`
+ height: 100%;
+ overflow-y: auto;
+`;
+
type ActivityListProps = React.PropsWithChildren<{
isScrollable?: boolean;
}>;
@@ -35,7 +35,9 @@ export const ActivityList = ({
}: ActivityListProps) => {
return (
<StyledListContainer data-scrollable={isScrollable || undefined}>
- <Card.Root>{children}</Card.Root>
+ <Card.Root className={isScrollable ? scrollableCardClassName : undefined}>
+ {children}
+ </Card.Root>
</StyledListContainer>
);
};
diff --git a/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx b/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx
index 44bf5053ae5..456f83f288e 100644
--- a/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx
+++ b/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx
@@ -6,22 +6,21 @@ import { Card } from 'twenty-ui/primitives/surfaces';
import { themeCssVariables } from 'twenty-ui/theme';
const StyledRowContentContainer = styled.div`
- > div {
- align-items: center;
- box-sizing: border-box;
- display: flex;
- gap: ${themeCssVariables.spacing[2]};
- height: ${themeCssVariables.spacing[12]};
- padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[4]};
- position: relative;
- }
-
> div:has(> .${CARD_ACTION_CLASS_NAME}:not(:disabled)):hover {
background: ${themeCssVariables.background.transparent.lighter};
cursor: pointer;
}
`;
+const StyledRowContent = styled(Card.Content)`
+ align-items: center;
+ display: flex;
+ gap: ${themeCssVariables.spacing[2]};
+ height: ${themeCssVariables.spacing[12]};
+ padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[4]};
+ position: relative;
+`;
+
const StyledRowAction = styled.button`
&:disabled {
cursor: default;
@@ -71,7 +70,7 @@ export const ActivityRow = ({
return (
<StyledRowContentContainer>
- <Card.Content onClick={handleContentClick}>
+ <StyledRowContent onClick={handleContentClick}>
{isDefined(onClick) && (
<StyledRowAction
className={CARD_ACTION_CLASS_NAME}
@@ -82,7 +81,7 @@ export const ActivityRow = ({
/>
)}
{children}
- </Card.Content>
+ </StyledRowContent>
</StyledRowContentContainer>
);
};
diff --git a/packages/twenty-front/src/modules/activities/files/components/AttachmentList.tsx b/packages/twenty-front/src/modules/activities/files/components/AttachmentList.tsx
index 88107aa39ee..d4fab7be315 100644
--- a/packages/twenty-front/src/modules/activities/files/components/AttachmentList.tsx
+++ b/packages/twenty-front/src/modules/activities/files/components/AttachmentList.tsx
@@ -72,9 +72,15 @@ const StyledLoadingText = styled.div`
font-weight: ${themeCssVariables.font.weight.medium};
`;
+const StyledPreviewPopup = styled(Dialog.Popup)`
+ gap: ${themeCssVariables.spacing[2]};
+ padding: ${themeCssVariables.spacing[2]};
+`;
+
const StyledHeader = styled.div`
align-items: center;
display: flex;
+ flex-shrink: 0;
justify-content: space-between;
min-height: 40px;
width: 100%;
@@ -90,6 +96,12 @@ const StyledButtonContainer = styled.div`
gap: ${themeCssVariables.spacing[1]};
`;
+const StyledPreviewContent = styled.div`
+ display: flex;
+ flex: 1 1 0%;
+ flex-direction: column;
+`;
+
const PREVIEW_MODAL_ID = 'preview-modal';
export const AttachmentList = ({
@@ -180,58 +192,36 @@ export const AttachmentList = ({
renderInDocumentBody
>
{({ onKeyDown }) => (
- <Dialog.Popup
+ <StyledPreviewPopup
aria-label={previewedAttachment.name}
onKeyDown={onKeyDown}
size="lg"
- style={{
- padding: 'var(--t-spacing-2)',
- gap: 'var(--t-spacing-2)',
- }}
>
- <Dialog.Header
- style={{
- flexDirection: 'row',
- alignItems: 'center',
- height: 'auto',
- padding: 0,
- }}
- >
- <StyledHeader>
- <StyledModalTitle>
- {previewedAttachment.name}
- </StyledModalTitle>
- <StyledButtonContainer>
- {hasDownloadPermission && (
- <IconButton
- aria-label={t`Download attachment`}
- onClick={handleDownload}
- size="sm"
- >
- <IconDownload />
- </IconButton>
- )}
+ <StyledHeader>
+ <StyledModalTitle>{previewedAttachment.name}</StyledModalTitle>
+ <StyledButtonContainer>
+ {hasDownloadPermission && (
<IconButton
- aria-label={t`Close preview`}
- onClick={handleClosePreview}
+ aria-label={t`Download attachment`}
+ onClick={handleDownload}
size="sm"
>
- <IconX />
+ <IconDownload />
</IconButton>
- </StyledButtonContainer>
- </StyledHeader>
- </Dialog.Header>
+ )}
+ <IconButton
+ aria-label={t`Close preview`}
+ onClick={handleClosePreview}
+ size="sm"
+ >
+ <IconX />
+ </IconButton>
+ </StyledButtonContainer>
+ </StyledHeader>
<ScrollWrapper
componentInstanceId={`preview-modal-${previewedAttachment.id}`}
>
- <Dialog.Body
- style={{
- display: 'flex',
- flex: '1 1 0%',
- flexDirection: 'column',
- padding: 0,
- }}
- >
+ <StyledPreviewContent>
<Suspense
fallback={
<StyledLoadingContainer>
@@ -248,9 +238,9 @@ export const AttachmentList = ({
})}
/>
</Suspense>
- </Dialog.Body>
+ </StyledPreviewContent>
</ScrollWrapper>
- </Dialog.Popup>
+ </StyledPreviewPopup>
)}
</DialogInstance>
)}
diff --git a/packages/twenty-front/src/modules/advanced-text-editor/components/BubbleMenuIconButton.tsx b/packages/twenty-front/src/modules/advanced-text-editor/components/BubbleMenuIconButton.tsx
index ba4a21ad74e..b0535c62a9e 100644
--- a/packages/twenty-front/src/modules/advanced-text-editor/components/BubbleMenuIconButton.tsx
+++ b/packages/twenty-front/src/modules/advanced-text-editor/components/BubbleMenuIconButton.tsx
@@ -5,7 +5,6 @@ import { type IconComponent } from 'twenty-ui/icon';
type BubbleMenuIconButtonProps = {
label: string;
- className?: string;
Icon?: IconComponent;
disabled?: boolean;
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
@@ -14,7 +13,6 @@ type BubbleMenuIconButtonProps = {
export const BubbleMenuIconButton = ({
label,
- className,
Icon,
disabled = false,
onClick,
@@ -22,7 +20,6 @@ export const BubbleMenuIconButton = ({
}: BubbleMenuIconButtonProps) => {
return (
<LightIconButton
- className={className}
disabled={disabled}
aria-pressed={isActive}
onClick={onClick}
diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenuItemSwitch.tsx b/packages/twenty-front/src/modules/command-menu/components/CommandMenuItemSwitch.tsx
index 5d21e04eb60..7cbc8c56360 100644
--- a/packages/twenty-front/src/modules/command-menu/components/CommandMenuItemSwitch.tsx
+++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuItemSwitch.tsx
@@ -15,7 +15,6 @@ type CommandMenuItemSwitchProps = {
onCheckedChange?: SwitchProps['onCheckedChange'];
size?: SwitchProps['size'];
disabled?: boolean;
- className?: string;
};
const StyledIconContainer = styled.span`
@@ -40,7 +39,6 @@ export const CommandMenuItemSwitch = ({
onCheckedChange,
size = 'md',
disabled = false,
- className,
}: CommandMenuItemSwitchProps) => {
const isSelectedItemId = useAtomComponentFamilyStateValue(
isSelectedItemIdComponentFamilyState,
@@ -49,7 +47,6 @@ export const CommandMenuItemSwitch = ({
return (
<SettingsRow
- labelRender={<label className={className} />}
focused={isSelectedItemId}
startElement={
isDefined(LeftIcon) && (
diff --git a/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaPermissionModal.tsx b/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaPermissionModal.tsx
index 3a44a7c211a..2798f29002b 100644
--- a/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaPermissionModal.tsx
+++ b/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaPermissionModal.tsx
@@ -91,21 +91,29 @@ export const FrontComponentMediaPermissionModal = ({
>
{({ onKeyDown }) => (
<Dialog.Popup onKeyDown={onKeyDown} size="sm">
- <StyledContent>
+ <Dialog.Header>
<Dialog.Title>{t`Allow media access for ${applicationName}?`}</Dialog.Title>
- {buildApplicationCapabilitySummary(request.capabilities).map(
- ({ Icon, label }) => (
- <StyledPermission key={label}>
- <Icon size={16} />
- {label}
- </StyledPermission>
- ),
- )}
- <div>{t`This grants access to this app for everyone in your workspace.`}</div>
- {!canManageApps && (
- <div>{t`Only members who can manage apps can grant access. Ask your workspace administrator.`}</div>
- )}
- {isDefined(errorMessage) && <div role="alert">{errorMessage}</div>}
+ </Dialog.Header>
+ <Dialog.Body>
+ <StyledContent>
+ {buildApplicationCapabilitySummary(request.capabilities).map(
+ ({ Icon, label }) => (
+ <StyledPermission key={label}>
+ <Icon size={16} />
+ {label}
+ </StyledPermission>
+ ),
+ )}
+ <div>{t`This grants access to this app for everyone in your workspace.`}</div>
+ {!canManageApps && (
+ <div>{t`Only members who can manage apps can grant access. Ask your workspace administrator.`}</div>
+ )}
+ {isDefined(errorMessage) && (
+ <div role="alert">{errorMessage}</div>
+ )}
+ </StyledContent>
+ </Dialog.Body>
+ <Dialog.Footer>
{canManageApps ? (
<AuthorizeActionButtons
onAuthorize={() => void handleAuthorize()}
@@ -118,7 +126,7 @@ export const FrontComponentMediaPermissionModal = ({
fullWidth
>{t`Close`}</MainButton>
)}
- </StyledContent>
+ </Dialog.Footer>
</Dialog.Popup>
)}
</DialogInstance>
diff --git a/packages/twenty-front/src/modules/geo-map/components/PlaceAutocompleteSelect.tsx b/packages/twenty-front/src/modules/geo-map/components/PlaceAutocompleteSelect.tsx
index da5447ec1a9..066ead837e0 100644
--- a/packages/twenty-front/src/modules/geo-map/components/PlaceAutocompleteSelect.tsx
+++ b/packages/twenty-front/src/modules/geo-map/components/PlaceAutocompleteSelect.tsx
@@ -20,9 +20,7 @@ export const PlaceAutocompleteSelect = ({
value={place}
onClick={() => onChange(place.placeId)}
>
- <Tag color="transparent" borderStyle="dashed" variant="soft">
- {place.text}
- </Tag>
+ <Tag color="transparent">{place.text}</Tag>
</Autocomplete.Item>
))}
</Autocomplete.List>
diff --git a/packages/twenty-front/src/modules/log-console/components/LogConsoleDetailPanel.tsx b/packages/twenty-front/src/modules/log-console/components/LogConsoleDetailPanel.tsx
index 8344621345e..1b6d5c5c078 100644
--- a/packages/twenty-front/src/modules/log-console/components/LogConsoleDetailPanel.tsx
+++ b/packages/twenty-front/src/modules/log-console/components/LogConsoleDetailPanel.tsx
@@ -19,7 +19,7 @@ import { themeCssVariables, useTheme } from 'twenty-ui/theme';
import { allowRequestsToTwentyIconsState } from '@/client-config/states/allowRequestsToTwentyIcons';
import { TimeFormat } from '@/localization/constants/TimeFormat';
import { useDateTimeFormat } from '@/localization/hooks/useDateTimeFormat';
-import { StyledLogConsoleFieldsCard } from '@/log-console/components/StyledLogConsoleFieldsCard';
+import { LogConsoleFieldsCard } from '@/log-console/components/LogConsoleFieldsCard';
import { LOG_CONSOLE_NARROW_BODY_MAX_WIDTH } from '@/log-console/constants/LogConsoleNarrowBodyMaxWidth';
import { useLogConsoleTimeZone } from '@/log-console/hooks/useLogConsoleTimeZone';
import { logConsoleSelectedLogState } from '@/log-console/states/logConsoleSelectedLogState';
@@ -283,13 +283,13 @@ export const LogConsoleDetailPanel = () => {
{source.renderDetailContent?.(entry)}
<Section.Root>
<Section.Header title={t`Details`} />
- <StyledLogConsoleFieldsCard>
+ <LogConsoleFieldsCard>
{detailItems.map(({ Icon, label, value }) => (
<BillingFieldRow key={label} Icon={Icon} label={label}>
{value}
</BillingFieldRow>
))}
- </StyledLogConsoleFieldsCard>
+ </LogConsoleFieldsCard>
</Section.Root>
<Section.Root>
<Section.Header
diff --git a/packages/twenty-front/src/modules/log-console/components/LogConsoleFieldsCard.tsx b/packages/twenty-front/src/modules/log-console/components/LogConsoleFieldsCard.tsx
new file mode 100644
index 00000000000..cdea45bc60d
--- /dev/null
+++ b/packages/twenty-front/src/modules/log-console/components/LogConsoleFieldsCard.tsx
@@ -0,0 +1,23 @@
+import { styled } from '@linaria/react';
+import { type ReactNode } from 'react';
+import { Card } from 'twenty-ui/primitives/surfaces';
+import { themeCssVariables } from 'twenty-ui/theme';
+
+const StyledFieldsCard = styled(Card.Root)`
+ display: flex;
+ flex-direction: column;
+ gap: ${themeCssVariables.spacing[1]};
+ padding: ${themeCssVariables.spacing[2]};
+`;
+
+type LogConsoleFieldsCardProps = {
+ children: ReactNode;
+};
+
+export const LogConsoleFieldsCard = ({
+ children,
+}: LogConsoleFieldsCardProps) => (
+ <StyledFieldsCard backgroundColor={themeCssVariables.background.secondary}>
+ {children}
+ </StyledFieldsCard>
+);
diff --git a/packages/twenty-front/src/modules/log-console/components/LogConsoleRecordChangeDetail.tsx b/packages/twenty-front/src/modules/log-console/components/LogConsoleRecordChangeDetail.tsx
index a8bb114e4e4..9abbc672a2e 100644
--- a/packages/twenty-front/src/modules/log-console/components/LogConsoleRecordChangeDetail.tsx
+++ b/packages/twenty-front/src/modules/log-console/components/LogConsoleRecordChangeDetail.tsx
@@ -12,7 +12,7 @@ import { themeCssVariables } from 'twenty-ui/theme';
import { EventFieldDiffValue } from '@/activities/timeline-activities/rows/main-object/components/EventFieldDiffValue';
import { EventFieldDiffValueEffect } from '@/activities/timeline-activities/rows/main-object/components/EventFieldDiffValueEffect';
import { EventRelationFieldDiffValues } from '@/activities/timeline-activities/rows/main-object/components/EventRelationFieldDiffValues';
-import { StyledLogConsoleFieldsCard } from '@/log-console/components/StyledLogConsoleFieldsCard';
+import { LogConsoleFieldsCard } from '@/log-console/components/LogConsoleFieldsCard';
import { LOG_CONSOLE_RECORD_ACTIONS } from '@/log-console/constants/LogConsoleRecordActions';
import { getLogConsoleRecordChangeFieldDiffs } from '@/log-console/utils/getLogConsoleRecordChangeFieldDiffs';
import { isLogConsoleFieldValueEmpty } from '@/log-console/utils/isLogConsoleFieldValueEmpty';
@@ -131,7 +131,7 @@ export const LogConsoleRecordChangeDetail = ({
}
/>
{isNonEmptyArray(fieldDiffs) && (
- <StyledLogConsoleFieldsCard>
+ <LogConsoleFieldsCard>
{fieldDiffs.map((fieldDiff) => (
<BillingFieldRow
key={fieldDiff.key}
@@ -146,7 +146,7 @@ export const LogConsoleRecordChangeDetail = ({
</ErrorBoundary>
</BillingFieldRow>
))}
- </StyledLogConsoleFieldsCard>
+ </LogConsoleFieldsCard>
)}
</Section.Root>
)}
diff --git a/packages/twenty-front/src/modules/log-console/components/StyledLogConsoleFieldsCard.tsx b/packages/twenty-front/src/modules/log-console/components/StyledLogConsoleFieldsCard.tsx
deleted file mode 100644
index 794783855b2..00000000000
--- a/packages/twenty-front/src/modules/log-console/components/StyledLogConsoleFieldsCard.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-import { styled } from '@linaria/react';
-import { Card } from 'twenty-ui/primitives/surfaces';
-import { themeCssVariables } from 'twenty-ui/theme';
-
-export const StyledLogConsoleFieldsCard = styled(Card.Root)`
- --card-background-color: ${themeCssVariables.background.secondary};
-
- display: flex;
- flex-direction: column;
- gap: ${themeCssVariables.spacing[1]};
- padding: ${themeCssVariables.spacing[2]};
-`;
diff --git a/packages/twenty-front/src/modules/marketplace/components/SettingsApplicationInstallPermissionValidationModal.tsx b/packages/twenty-front/src/modules/marketplace/components/SettingsApplicationInstallPermissionValidationModal.tsx
index 1ce8180e658..3777857e332 100644
--- a/packages/twenty-front/src/modules/marketplace/components/SettingsApplicationInstallPermissionValidationModal.tsx
+++ b/packages/twenty-front/src/modules/marketplace/components/SettingsApplicationInstallPermissionValidationModal.tsx
@@ -209,7 +209,6 @@ export const SettingsApplicationInstallPermissionValidationModal = ({
aria-label={t`Install ${appDisplayName} on your workspace`}
onKeyDown={onKeyDown}
size="fullscreen"
- style={{ padding: 0, background: 'transparent', boxShadow: 'none' }}
>
<StyledFullscreenContainer>
<StyledLightButton
diff --git a/packages/twenty-front/src/modules/mention/components/MentionRecordChip.tsx b/packages/twenty-front/src/modules/mention/components/MentionRecordChip.tsx
index 087473fe898..feb2120970e 100644
--- a/packages/twenty-front/src/modules/mention/components/MentionRecordChip.tsx
+++ b/packages/twenty-front/src/modules/mention/components/MentionRecordChip.tsx
@@ -12,7 +12,6 @@ type MentionRecordChipProps = {
objectNameSingular: string;
label: string;
imageUrl: string;
- className?: string;
};
export const MentionRecordChip = ({
@@ -20,7 +19,6 @@ export const MentionRecordChip = ({
objectNameSingular,
label,
imageUrl,
- className,
}: MentionRecordChipProps) => {
if (!isNonEmptyString(objectNameSingular)) {
return (
@@ -50,7 +48,6 @@ export const MentionRecordChip = ({
<LinkChip
to={linkToShowPage}
variant="soft"
- className={className}
startElement={
<AvatarOrIcon
name={label}
diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemObjectColorEditor.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemObjectColorEditor.tsx
index 25bbdd08551..398ca4eaf03 100644
--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemObjectColorEditor.tsx
+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemObjectColorEditor.tsx
@@ -22,12 +22,7 @@ import {
const StyledIconButton = styled.button`
align-items: center;
- background: transparent;
- border: 0;
- color: inherit;
- cursor: pointer;
display: flex;
- padding: 0;
`;
const StyledPopupScope = styled.div`
diff --git a/packages/twenty-front/src/modules/object-record/components/RecordChip.tsx b/packages/twenty-front/src/modules/object-record/components/RecordChip.tsx
index ecf791bcfee..c9e28be4fbc 100644
--- a/packages/twenty-front/src/modules/object-record/components/RecordChip.tsx
+++ b/packages/twenty-front/src/modules/object-record/components/RecordChip.tsx
@@ -16,7 +16,6 @@ import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';
type RecordChipProps = {
objectNameSingular: string;
record: ObjectRecord;
- className?: string;
variant?: 'soft' | 'ghost';
forceDisableClick?: boolean;
isBold?: boolean;
@@ -32,7 +31,6 @@ type RecordChipProps = {
export const RecordChip = ({
objectNameSingular,
record,
- className,
variant,
isBold = false,
maxWidth,
@@ -77,7 +75,6 @@ export const RecordChip = ({
weight={isBold ? 'medium' : 'regular'}
size={size}
maxWidth={maxWidth}
- className={className}
variant="ghost"
startElement={
isIconHidden ? null : (
@@ -112,7 +109,6 @@ export const RecordChip = ({
/>
)
}
- className={className}
variant={variant ?? 'soft'}
clickable={variant !== 'ghost'}
style={variant === 'ghost' ? { paddingInlineStart: 0 } : undefined}
diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownOptionSelect.tsx b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownOptionSelect.tsx
index 32e8bc2c398..77ce455db04 100644
--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownOptionSelect.tsx
+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownOptionSelect.tsx
@@ -179,7 +179,6 @@ export const ObjectFilterDropdownOptionSelect = ({
optionsInDropdown?.map((option) => (
<ListItemButton
key={option.id}
- className=""
focused={option.id === selectedItemId}
role="option"
aria-selected={option.isSelected}
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdown.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdown.tsx
index becc2d31cd4..333fb09d434 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdown.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdown.tsx
@@ -13,7 +13,7 @@ import { FieldMetadataType, RelationType } from '~/generated-metadata/graphql';
type RecordDetailMorphRelationSectionDropdownProps = {
loading: boolean;
- dropdownTriggerClickableComponent?: ReactNode;
+ dropdownTriggerClickableComponent: ReactNode;
};
export const RecordDetailMorphRelationSectionDropdown = ({
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownManyToOne.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownManyToOne.tsx
index 10290e63d04..1251510c10b 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownManyToOne.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownManyToOne.tsx
@@ -1,4 +1,3 @@
-import { t } from '@lingui/core/macro';
import { type ReactNode, useCallback, useContext } from 'react';
import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';
@@ -21,11 +20,10 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/use
import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';
import { FieldMetadataType } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
-import { LightIconButton } from 'twenty-ui/components/input';
-import { IconForbid, IconPencil } from 'twenty-ui/icon';
+import { IconForbid } from 'twenty-ui/icon';
type RecordDetailMorphRelationSectionDropdownManyToOneProps = {
- dropdownTriggerClickableComponent?: ReactNode;
+ dropdownTriggerClickableComponent: ReactNode;
};
export const RecordDetailMorphRelationSectionDropdownManyToOne = ({
@@ -124,17 +122,7 @@ export const RecordDetailMorphRelationSectionDropdownManyToOne = ({
dropdownPlacement="left-start"
onClose={handleCloseRelationPickerDropdown}
onOpen={handleOpenRelationPickerDropdown}
- clickableComponent={
- dropdownTriggerClickableComponent ?? (
- <LightIconButton
- className="displayOnHover"
- emphasis="subtle"
- aria-label={t`Edit relation`}
- >
- <IconPencil />
- </LightIconButton>
- )
- }
+ clickableComponent={dropdownTriggerClickableComponent}
dropdownComponents={
<SingleRecordPicker
focusId={dropdownId}
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownOneToMany.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownOneToMany.tsx
index 297ff3ed8a3..99d9e89617c 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownOneToMany.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownOneToMany.tsx
@@ -1,4 +1,3 @@
-import { t } from '@lingui/core/macro';
import { type ReactNode, useCallback, useContext } from 'react';
import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';
@@ -23,11 +22,9 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/use
import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';
import { FieldMetadataType } from 'twenty-shared/types';
import { CustomError, isDefined } from 'twenty-shared/utils';
-import { LightIconButton } from 'twenty-ui/components/input';
-import { IconPlus } from 'twenty-ui/icon';
type RecordDetailMorphRelationSectionDropdownOneToManyProps = {
- dropdownTriggerClickableComponent?: ReactNode;
+ dropdownTriggerClickableComponent: ReactNode;
};
export const RecordDetailMorphRelationSectionDropdownOneToMany = ({
@@ -159,17 +156,7 @@ export const RecordDetailMorphRelationSectionDropdownOneToMany = ({
dropdownPlacement="left-start"
onClose={handleCloseRelationPickerDropdown}
onOpen={handleOpenRelationPickerDropdown}
- clickableComponent={
- dropdownTriggerClickableComponent ?? (
- <LightIconButton
- className="displayOnHover"
- emphasis="subtle"
- aria-label={t`Add relation`}
- >
- <IconPlus />
- </LightIconButton>
- )
- }
+ clickableComponent={dropdownTriggerClickableComponent}
dropdownComponents={
<MultipleRecordPicker
focusId={dropdownId}
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdown.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdown.tsx
index 21d5111204f..a3f6a09c714 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdown.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdown.tsx
@@ -10,7 +10,7 @@ import { RelationType } from '~/generated-metadata/graphql';
type RecordDetailRelationSectionDropdownProps = {
loading: boolean;
- dropdownTriggerClickableComponent?: ReactNode;
+ dropdownTriggerClickableComponent: ReactNode;
};
export const RecordDetailRelationSectionDropdown = ({
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToMany.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToMany.tsx
index a7aa9fdc1a3..c98860bea05 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToMany.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToMany.tsx
@@ -1,4 +1,3 @@
-import { t } from '@lingui/core/macro';
import { type ReactNode, useCallback, useContext } from 'react';
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
@@ -30,11 +29,9 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/use
import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';
import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';
import { CustomError, isDefined } from 'twenty-shared/utils';
-import { LightIconButton } from 'twenty-ui/components/input';
-import { IconPlus } from 'twenty-ui/icon';
type RecordDetailRelationSectionDropdownToManyProps = {
- dropdownTriggerClickableComponent?: ReactNode;
+ dropdownTriggerClickableComponent: ReactNode;
};
export const RecordDetailRelationSectionDropdownToMany = ({
@@ -242,17 +239,7 @@ export const RecordDetailRelationSectionDropdownToMany = ({
dropdownPlacement="left-start"
onClose={handleCloseRelationPickerDropdown}
onOpen={handleOpenRelationPickerDropdown}
- clickableComponent={
- dropdownTriggerClickableComponent ?? (
- <LightIconButton
- className="displayOnHover"
- emphasis="subtle"
- aria-label={t`Add relation`}
- >
- <IconPlus />
- </LightIconButton>
- )
- }
+ clickableComponent={dropdownTriggerClickableComponent}
dropdownComponents={
<MultipleRecordPicker
focusId={dropdownId}
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToOne.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToOne.tsx
index 7d1ebc50e2c..67e0c99baeb 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToOne.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToOne.tsx
@@ -1,4 +1,3 @@
-import { t } from '@lingui/core/macro';
import { type ReactNode, useCallback, useContext } from 'react';
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
@@ -27,11 +26,10 @@ import { getFieldMetadataItemById } from '@/object-metadata/utils/getFieldMetada
import { assertFieldMetadata } from '@/object-record/record-field/ui/types/guards/assertFieldMetadata';
import { isFieldRelation } from '@/object-record/record-field/ui/types/guards/isFieldRelation';
import { CustomError, isDefined } from 'twenty-shared/utils';
-import { LightIconButton } from 'twenty-ui/components/input';
-import { IconForbid, IconPencil } from 'twenty-ui/icon';
+import { IconForbid } from 'twenty-ui/icon';
type RecordDetailRelationSectionDropdownToOneProps = {
- dropdownTriggerClickableComponent?: ReactNode;
+ dropdownTriggerClickableComponent: ReactNode;
};
export const RecordDetailRelationSectionDropdownToOne = ({
@@ -165,17 +163,7 @@ export const RecordDetailRelationSectionDropdownToOne = ({
dropdownPlacement="left-start"
onClose={handleCloseRelationPickerDropdown}
onOpen={handleOpenRelationPickerDropdown}
- clickableComponent={
- dropdownTriggerClickableComponent ?? (
- <LightIconButton
- className="displayOnHover"
- emphasis="subtle"
- aria-label={t`Edit relation`}
- >
- <IconPencil />
- </LightIconButton>
- )
- }
+ clickableComponent={dropdownTriggerClickableComponent}
dropdownComponents={
<SingleRecordPicker
focusId={dropdownId}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx
index 440ce7ce6f0..f8ebf99837c 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx
@@ -58,11 +58,8 @@ const StyledDisplayModeReadonlyContainer = styled.div`
const StyledDisplayModeContainer = styled.div`
align-items: center;
- background: transparent;
- border: none;
cursor: pointer;
display: flex;
- font-family: inherit;
padding: ${themeCssVariables.spacing[1]} ${themeCssVariables.spacing[2]};
width: 100%;
`;
diff --git a/packages/twenty-front/src/modules/object-record/record-group/components/RecordGroupAggregateDropdownButton.tsx b/packages/twenty-front/src/modules/object-record/record-group/components/RecordGroupAggregateDropdownButton.tsx
index 587ab8b0003..70bd16c3e59 100644
--- a/packages/twenty-front/src/modules/object-record/record-group/components/RecordGroupAggregateDropdownButton.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-group/components/RecordGroupAggregateDropdownButton.tsx
@@ -47,7 +47,7 @@ export const RecordGroupAggregateDropdownButton = ({
render={<StyledHeaderDropdownButton isUnfolded={isDropdownOpen} />}
>
<StyledTagContainer>
- <Tag color="transparent" weight="regular">
+ <Tag color="transparent">
{isDefined(value) ? value.toString() : '-'}
</Tag>
</StyledTagContainer>
diff --git a/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsPill.tsx b/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsPill.tsx
index 5163569fc45..13389be83e6 100644
--- a/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsPill.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsPill.tsx
@@ -37,15 +37,10 @@ const StyledPillAnchor = styled.div`
const StyledTrigger = styled.button`
align-items: center;
- background: none;
- border: none;
border-radius: ${themeCssVariables.border.radius.pill};
color: ${themeCssVariables.font.color.tertiary};
corner-shape: round;
- cursor: pointer;
display: flex;
- font-family: inherit;
- padding: 0;
&:hover > span,
&[data-popup-open] > span {
diff --git a/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsProgressBar.tsx b/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsProgressBar.tsx
index a30973fef5d..8bed0d808ec 100644
--- a/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsProgressBar.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsProgressBar.tsx
@@ -12,7 +12,6 @@ const StyledProgressBar = styled.div`
corner-shape: round;
height: ${themeCssVariables.spacing['1.5']};
overflow: hidden;
- position: relative;
width: 100%;
&[data-grow-in] {
@@ -36,8 +35,6 @@ const StyledProgressBar = styled.div`
const StyledTrack = styled.div`
height: 100%;
- position: relative;
- width: 100%;
`;
const StyledIndicator = styled.div`
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbarColorButton.tsx b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbarColorButton.tsx
index 3be6f6d7913..4555e8d46a5 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbarColorButton.tsx
+++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbarColorButton.tsx
@@ -14,10 +14,7 @@ import { DropdownRoot } from '@/ui/layout/dropdown/components/DropdownRoot';
const StyledColorButton = styled.button`
align-items: center;
- background: transparent;
- border: none;
border-radius: ${themeCssVariables.border.radius.sm};
- cursor: pointer;
display: flex;
height: 24px;
justify-content: center;
@@ -70,7 +67,6 @@ export const DashboardFormattingToolbarColorButton = () => {
/>
<DropdownContent
sideOffset={8}
- className="bn-ui-container"
aria-label={t`Text and background colors`}
finalFocus={() => {
editor.focus();
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/__stories__/DashboardFormattingToolbarColorButton.stories.tsx b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/__stories__/DashboardFormattingToolbarColorButton.stories.tsx
index 24c7bf54276..b43e171fc0e 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/__stories__/DashboardFormattingToolbarColorButton.stories.tsx
+++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/__stories__/DashboardFormattingToolbarColorButton.stories.tsx
@@ -37,7 +37,6 @@ export const ApplyColors: Story = {
const popup = await body.findByRole('dialog', {
name: 'Text and background colors',
});
- await expect(popup).toHaveClass('bn-ui-container');
await expect(within(popup).getByText('Text Colors')).toBeVisible();
await expect(within(popup).getByText('Background Colors')).toBeVisible();
await expect(
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx
index 014b131527d..e26704384c6 100644
--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx
+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx
@@ -141,7 +141,6 @@ export const ConfigVariableDatabaseInput = ({
{selectOptions.map((option) => (
<Dropdown.OptionItem
key={option.value}
- className="config-variable-array-menu-item-multi-select"
selected={isValueSelected(option.value)}
onSelect={() => handleMultiSelectChange(option.value)}
>
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableOptionsDropdownContent.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableOptionsDropdownContent.tsx
index 9bec1faf99c..356a1cb6c20 100644
--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableOptionsDropdownContent.tsx
+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableOptionsDropdownContent.tsx
@@ -41,18 +41,10 @@ export const ConfigVariableOptionsDropdownContent = ({
<Dropdown.Page id="root">
<Dropdown.Section>
<Dropdown.ActionItem page="source" hasSubmenu={false}>
- <Tag
- color={'transparent'}
- borderStyle="dashed"
- variant={'soft'}
- >{t`Source`}</Tag>
+ <Tag color={'transparent'}>{t`Source`}</Tag>
</Dropdown.ActionItem>
<Dropdown.ActionItem page="group" hasSubmenu={false}>
- <Tag
- color={'transparent'}
- borderStyle="dashed"
- variant={'soft'}
- >{t`Group`}</Tag>
+ <Tag color={'transparent'}>{t`Group`}</Tag>
</Dropdown.ActionItem>
</Dropdown.Section>
<Dropdown.Separator />
@@ -81,9 +73,7 @@ export const ConfigVariableOptionsDropdownContent = ({
goBack();
}}
>
- <Tag color={option.color} borderStyle="dashed" variant={'soft'}>
- {option.label}
- </Tag>
+ <Tag color={option.color}>{option.label}</Tag>
</Dropdown.OptionItem>
))}
</Dropdown.Section>
@@ -101,9 +91,7 @@ export const ConfigVariableOptionsDropdownContent = ({
goBack();
}}
>
- <Tag color={'transparent'} borderStyle="dashed" variant={'soft'}>
- {option.label}
- </Tag>
+ <Tag color={'transparent'}>{option.label}</Tag>
</Dropdown.OptionItem>
))}
</Dropdown.Section>
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthAccountSyncCountersTable.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthAccountSyncCountersTable.tsx
index c42dbe94497..b91380b00f7 100644
--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthAccountSyncCountersTable.tsx
+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthAccountSyncCountersTable.tsx
@@ -4,11 +4,9 @@ import { useLingui } from '@lingui/react/macro';
import { Section } from 'twenty-ui/components/layout';
import { themeCssVariables } from 'twenty-ui/theme';
-const StyledSettingsTableCardContainer = styled.div`
- > * {
- padding-left: ${themeCssVariables.spacing[2]};
- padding-right: ${themeCssVariables.spacing[2]};
- }
+const StyledSettingsTableCard = styled(SettingsTableCard)`
+ padding-left: ${themeCssVariables.spacing[2]};
+ padding-right: ${themeCssVariables.spacing[2]};
`;
export const SettingsAdminHealthAccountSyncCountersTable = ({
@@ -48,15 +46,13 @@ export const SettingsAdminHealthAccountSyncCountersTable = ({
return (
<Section.Root>
<Section.Header title={title} description={description} />
- <StyledSettingsTableCardContainer>
- <SettingsTableCard
- items={items}
- rounded
- gridAutoColumns="1fr 1fr"
- labelAlign="left"
- valueAlign="right"
- />
- </StyledSettingsTableCardContainer>
+ <StyledSettingsTableCard
+ items={items}
+ rounded
+ gridAutoColumns="1fr 1fr"
+ labelAlign="left"
+ valueAlign="right"
+ />
</Section.Root>
);
};
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsx
index 2af8803a458..80c6addbe1a 100644
--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsx
+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsx
@@ -31,11 +31,9 @@ const StyledNoDataMessage = styled.div`
justify-content: center;
`;
-const StyledSettingsTableCardContainer = styled.div`
- > * {
- padding-left: ${themeCssVariables.spacing[2]};
- padding-right: ${themeCssVariables.spacing[2]};
- }
+const StyledSettingsTableCard = styled(SettingsTableCard)`
+ padding-left: ${themeCssVariables.spacing[2]};
+ padding-right: ${themeCssVariables.spacing[2]};
`;
type SettingsAdminWorkerMetricsGraphProps = {
@@ -201,25 +199,23 @@ export const SettingsAdminWorkerMetricsGraph = ({
)}
</StyledGraphContainer>
{isDefined(metricsDetails) && (
- <StyledSettingsTableCardContainer>
- <SettingsTableCard
- rounded
- items={Object.entries(metricsDetails)
- .filter(([key]) => key !== '__typename')
- .map(([key, value]) => ({
- label: capitalize(key),
- value:
- typeof value === 'number'
- ? value
- : Array.isArray(value)
- ? value.length
- : String(value),
- }))}
- gridAutoColumns="1fr 1fr"
- labelAlign="left"
- valueAlign="right"
- />
- </StyledSettingsTableCardContainer>
+ <StyledSettingsTableCard
+ rounded
+ items={Object.entries(metricsDetails)
+ .filter(([key]) => key !== '__typename')
+ .map(([key, value]) => ({
+ label: capitalize(key),
+ value:
+ typeof value === 'number'
+ ? value
+ : Array.isArray(value)
+ ? value.length
+ : String(value),
+ }))}
+ gridAutoColumns="1fr 1fr"
+ labelAlign="left"
+ valueAlign="right"
+ />
)}
</>
);
diff --git a/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotLightbox.tsx b/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotLightbox.tsx
index 9d0a11ef804..381b439a014 100644
--- a/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotLightbox.tsx
+++ b/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotLightbox.tsx
@@ -111,7 +111,6 @@ export const SettingsApplicationScreenshotLightbox = ({
aria-label={displayName}
onKeyDown={onKeyDown}
size="fullscreen"
- style={{ padding: 0, background: 'transparent', boxShadow: 'none' }}
>
<StyledContainer>
<StyledCloseButton>
diff --git a/packages/twenty-front/src/modules/settings/components/SettingsCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsCard.tsx
index fab8701bca0..b9118d32b84 100644
--- a/packages/twenty-front/src/modules/settings/components/SettingsCard.tsx
+++ b/packages/twenty-front/src/modules/settings/components/SettingsCard.tsx
@@ -24,27 +24,11 @@ type SettingsCardProps = {
const StyledCardWrapper = styled.div<{
disabled?: boolean;
}>`
- color: ${({ disabled }) =>
- disabled
- ? themeCssVariables.font.color.extraLight
- : themeCssVariables.font.color.tertiary};
cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'default')};
width: 100%;
-
- > div {
- color: inherit;
- }
`;
const StyledCardContentContainer = styled.div`
- > div {
- display: flex;
- flex-direction: column;
- gap: ${themeCssVariables.spacing[2]};
- padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[2]};
- position: relative;
- }
-
a:hover & > div,
> div:has(> button:not(:disabled):hover) {
background-color: ${themeCssVariables.background.quaternary};
@@ -52,6 +36,14 @@ const StyledCardContentContainer = styled.div`
}
`;
+const StyledCardContent = styled(Card.Content)`
+ display: flex;
+ flex-direction: column;
+ gap: ${themeCssVariables.spacing[2]};
+ padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[2]};
+ position: relative;
+`;
+
const StyledCardAction = styled.button`
&:disabled {
cursor: not-allowed;
@@ -82,7 +74,11 @@ const StyledIconChevronRightContainer = styled.span`
display: flex;
`;
-const StyledDescription = styled.div`
+const StyledDescription = styled.div<{ disabled?: boolean }>`
+ color: ${({ disabled }) =>
+ disabled
+ ? themeCssVariables.font.color.extraLight
+ : themeCssVariables.font.color.tertiary};
line-height: ${themeCssVariables.text.lineHeight.lg};
padding-bottom: ${themeCssVariables.spacing[2]};
padding-left: ${themeCssVariables.spacing[7]};
@@ -96,7 +92,7 @@ const StyledIconContainer = styled.div<{
color: ${({ disabled, iconColor }) =>
disabled
? themeCssVariables.font.color.extraLight
- : (iconColor ?? 'inherit')};
+ : (iconColor ?? themeCssVariables.font.color.tertiary)};
display: flex;
height: 24px;
justify-content: center;
@@ -120,7 +116,7 @@ export const SettingsCard = ({
<StyledCardWrapper disabled={disabled} className={className}>
<Card.Root rounded={true} fullWidth>
<StyledCardContentContainer>
- <Card.Content>
+ <StyledCardContent>
{isDefined(onClick) && (
<StyledCardAction
className={CARD_ACTION_CLASS_NAME}
@@ -144,9 +140,11 @@ export const SettingsCard = ({
</StyledIconChevronRightContainer>
</StyledHeader>
{description && (
- <StyledDescription>{description}</StyledDescription>
+ <StyledDescription disabled={disabled}>
+ {description}
+ </StyledDescription>
)}
- </Card.Content>
+ </StyledCardContent>
</StyledCardContentContainer>
</Card.Root>
</StyledCardWrapper>
diff --git a/packages/twenty-front/src/modules/settings/components/SettingsCustomizeVideoModal.tsx b/packages/twenty-front/src/modules/settings/components/SettingsCustomizeVideoModal.tsx
index 55708df6b48..490cd5e5725 100644
--- a/packages/twenty-front/src/modules/settings/components/SettingsCustomizeVideoModal.tsx
+++ b/packages/twenty-front/src/modules/settings/components/SettingsCustomizeVideoModal.tsx
@@ -128,7 +128,6 @@ export const SettingsCustomizeVideoModal = ({
aria-label={activeTab.title}
onKeyDown={onKeyDown}
size="lg"
- style={{ padding: 0 }}
>
<TabListRoot
componentInstanceId={tabsInstanceId}
diff --git a/packages/twenty-front/src/modules/settings/components/SettingsItemTypeTag.tsx b/packages/twenty-front/src/modules/settings/components/SettingsItemTypeTag.tsx
index 71c3493b586..b54a0908ea3 100644
--- a/packages/twenty-front/src/modules/settings/components/SettingsItemTypeTag.tsx
+++ b/packages/twenty-front/src/modules/settings/components/SettingsItemTypeTag.tsx
@@ -9,19 +9,16 @@ type SettingsItemTypeTagProps = {
isRemote?: boolean;
applicationId?: string | null;
};
- className?: string;
};
export const SettingsItemTypeTag = ({
- className,
item: { isRemote, applicationId },
}: SettingsItemTypeTagProps) => {
if (isDefined(applicationId)) {
- return <AppChip applicationId={applicationId} className={className} />;
+ return <AppChip applicationId={applicationId} />;
} else if (isRemote === true) {
return (
<Chip
- className={className}
variant="ghost"
color="primary"
startElement={
diff --git a/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx
index 74ab2f90e64..19ae0dd4c6e 100644
--- a/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx
+++ b/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx
@@ -8,12 +8,10 @@ import { Card } from 'twenty-ui/primitives/surfaces';
import { useTheme, themeCssVariables } from 'twenty-ui/theme';
import { SettingsListItemCardContent } from './SettingsListItemCardContent';
-const StyledFooterContainer = styled.div`
- > div {
- align-items: center;
- display: flex;
- padding: ${themeCssVariables.spacing[1]};
- }
+const StyledFooter = styled(Card.Footer)`
+ align-items: center;
+ display: flex;
+ padding: ${themeCssVariables.spacing[1]};
`;
const StyledButton = styled.button`
@@ -93,14 +91,12 @@ export const SettingsListCard = <
/>
))}
{hasFooter && (
- <StyledFooterContainer>
- <Card.Footer divider={!!items.length}>
- <StyledButton onClick={onFooterButtonClick}>
- <IconPlus size={theme.icon.size.md} />
- {footerButtonLabel}
- </StyledButton>
- </Card.Footer>
- </StyledFooterContainer>
+ <StyledFooter divider={!!items.length}>
+ <StyledButton onClick={onFooterButtonClick}>
+ <IconPlus size={theme.icon.size.md} />
+ {footerButtonLabel}
+ </StyledButton>
+ </StyledFooter>
)}
</Card.Root>
);
diff --git a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewFormCard.tsx b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewFormCard.tsx
index fa505f8f0b6..50d6c9cf12e 100644
--- a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewFormCard.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewFormCard.tsx
@@ -2,52 +2,39 @@ import { styled } from '@linaria/react';
import { type ReactNode } from 'react';
import { StyledFormCardTitle } from '@/settings/data-model/fields/components/StyledFormCardTitle';
+import { SETTINGS_DATA_MODEL_PREVIEW_SECTION_CLASS_NAME } from '@/settings/data-model/styles/SettingsDataModelPreviewSectionClassName';
import { Trans } from '@lingui/react/macro';
import { Card } from 'twenty-ui/primitives/surfaces';
import { isDefined } from 'twenty-shared/utils';
-import { themeCssVariables } from 'twenty-ui/theme';
type SettingsDataModelPreviewFormCardProps = {
- className?: string;
preview: ReactNode;
form?: ReactNode;
disabled?: boolean;
isPreviewTitleVisible?: boolean;
};
-const StyledPreviewContainerWrapper = styled.div`
- > div {
- background-color: ${themeCssVariables.background.transparent.lighter};
- }
-`;
-
-const StyledFormContainerWrapper = styled.div`
- > div {
- padding: 0;
- }
+const StyledFormCardContent = styled(Card.Content)`
+ padding: 0;
`;
export const SettingsDataModelPreviewFormCard = ({
- className,
preview,
form,
isPreviewTitleVisible = true,
}: SettingsDataModelPreviewFormCardProps) => (
- <Card.Root className={className} fullWidth rounded>
- <StyledPreviewContainerWrapper>
- <Card.Content divider={isDefined(form)}>
- {isPreviewTitleVisible && (
- <StyledFormCardTitle>
- <Trans>Preview</Trans>
- </StyledFormCardTitle>
- )}
- {preview}
- </Card.Content>
- </StyledPreviewContainerWrapper>
- {isDefined(form) && (
- <StyledFormContainerWrapper>
- <Card.Content>{form}</Card.Content>
- </StyledFormContainerWrapper>
- )}
+ <Card.Root fullWidth rounded>
+ <Card.Content
+ className={SETTINGS_DATA_MODEL_PREVIEW_SECTION_CLASS_NAME}
+ divider={isDefined(form)}
+ >
+ {isPreviewTitleVisible && (
+ <StyledFormCardTitle>
+ <Trans>Preview</Trans>
+ </StyledFormCardTitle>
+ )}
+ {preview}
+ </Card.Content>
+ {isDefined(form) && <StyledFormCardContent>{form}</StyledFormCardContent>}
</Card.Root>
);
diff --git a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewMiniCard.tsx b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewMiniCard.tsx
new file mode 100644
index 00000000000..4ac2f7363ef
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewMiniCard.tsx
@@ -0,0 +1,24 @@
+import { styled } from '@linaria/react';
+import { type ReactNode } from 'react';
+import { Card } from 'twenty-ui/primitives/surfaces';
+import { themeCssVariables } from 'twenty-ui/theme';
+
+const StyledMiniCardRoot = styled(Card.Root)`
+ color: ${themeCssVariables.font.color.primary};
+`;
+
+const StyledMiniCardContent = styled(Card.Content)`
+ padding: ${themeCssVariables.spacing[2]};
+`;
+
+type SettingsDataModelPreviewMiniCardProps = {
+ children: ReactNode;
+};
+
+export const SettingsDataModelPreviewMiniCard = ({
+ children,
+}: SettingsDataModelPreviewMiniCardProps) => (
+ <StyledMiniCardRoot fullWidth>
+ <StyledMiniCardContent>{children}</StyledMiniCardContent>
+ </StyledMiniCardRoot>
+);
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/address/components/MultiSelectAddressFields.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/address/components/MultiSelectAddressFields.tsx
index 939b834914c..2443022c062 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/address/components/MultiSelectAddressFields.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/address/components/MultiSelectAddressFields.tsx
@@ -21,7 +21,6 @@ type CallToActionButton = {
type MultiSelectAddressFieldsProps<TValue extends SelectValue> = {
dropdownId: string;
- className?: string;
disabled?: boolean;
selectSizeVariant?: SelectSizeVariant;
dropdownWidth?: number;
@@ -33,7 +32,6 @@ type MultiSelectAddressFieldsProps<TValue extends SelectValue> = {
export const MultiSelectAddressFields = <TValue extends SelectValue>({
dropdownId,
- className,
disabled = false,
selectSizeVariant,
dropdownWidth,
@@ -69,7 +67,6 @@ export const MultiSelectAddressFields = <TValue extends SelectValue>({
}}
>
<Dropdown.Trigger
- className={className}
render={<div />}
nativeButton={false}
disabled={disabled}
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx
index 652f38c4d6a..a86e9afd5e9 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx
@@ -126,11 +126,9 @@ const StyledIconPointContainer = styled.span`
margin-right: ${themeCssVariables.spacing['0.5']};
`;
-const StyledFooterContainer = styled.div`
- > div {
- background-color: ${themeCssVariables.background.secondary};
- padding: ${themeCssVariables.spacing[1]};
- }
+const StyledFooter = styled(Card.Footer)`
+ background-color: ${themeCssVariables.background.secondary};
+ padding: ${themeCssVariables.spacing[1]};
`;
const StyledButtonContainer = styled.div`
@@ -519,16 +517,14 @@ export const SettingsDataModelFieldSelectForm = ({
</Card.Content>
</StyledContainerWrapper>
{!disabled && !isBulkInputMode && (
- <StyledFooterContainer>
- <Card.Footer>
- <StyledButtonContainer>
- <LightButton
- startIcon={<IconPlus />}
- onClick={handleAddOption}
- >{t`Add option`}</LightButton>
- </StyledButtonContainer>
- </Card.Footer>
- </StyledFooterContainer>
+ <StyledFooter>
+ <StyledButtonContainer>
+ <LightButton
+ startIcon={<IconPlus />}
+ onClick={handleAddOption}
+ >{t`Add option`}</LightButton>
+ </StyledButtonContainer>
+ </StyledFooter>
)}
</>
)}
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreviewWidget.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreviewWidget.tsx
index cdc71f0893d..122e4d7ce6b 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreviewWidget.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreviewWidget.tsx
@@ -1,11 +1,8 @@
-import { styled } from '@linaria/react';
-
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
+import { SettingsDataModelPreviewMiniCard } from '@/settings/data-model/components/SettingsDataModelPreviewMiniCard';
import { SettingsDataModelFieldPreview } from '@/settings/data-model/fields/preview/components/SettingsDataModelFieldPreview';
import { SettingsDataModelObjectPreview } from '@/settings/data-model/objects/components/SettingsDataModelObjectSummary';
-import { Card } from 'twenty-ui/primitives/surfaces';
-import { themeCssVariables } from 'twenty-ui/theme';
import { computeMetadataNameFromLabel } from '@/object-metadata/utils/computeMetadataNameFromLabel';
type SettingsDataModelFieldPreviewWidgetProps = {
@@ -21,19 +18,6 @@ type SettingsDataModelFieldPreviewWidgetProps = {
fullWidth?: boolean;
};
-const StyledCardContainer = styled.div`
- > div {
- border-radius: ${themeCssVariables.border.radius.md};
- color: ${themeCssVariables.font.color.primary};
- }
-`;
-
-const StyledCardContentContainer = styled.div`
- > div {
- padding: ${themeCssVariables.spacing[2]};
- }
-`;
-
export const SettingsDataModelFieldPreviewWidget = ({
className,
fieldMetadataItem,
@@ -47,31 +31,27 @@ export const SettingsDataModelFieldPreviewWidget = ({
});
return (
- <StyledCardContainer className={className}>
- <Card.Root fullWidth>
- <StyledCardContentContainer>
- <Card.Content>
- <SettingsDataModelObjectPreview
- objectMetadataItems={[objectMetadataItem]}
- pluralizeLabel={pluralizeLabel}
- />
- <SettingsDataModelFieldPreview
- objectNameSingular={objectNameSingular}
- fieldMetadataItem={{
- label: fieldMetadataItem.label,
- icon: fieldMetadataItem.icon,
- defaultValue: fieldMetadataItem.defaultValue,
- options: fieldMetadataItem.options,
- settings: fieldMetadataItem.settings,
- type: fieldMetadataItem.type,
- name: computeMetadataNameFromLabel(fieldMetadataItem.label),
- }}
- shrink={shrink}
- withFieldLabel={withFieldLabel}
- />
- </Card.Content>
- </StyledCardContentContainer>
- </Card.Root>
- </StyledCardContainer>
+ <div className={className}>
+ <SettingsDataModelPreviewMiniCard>
+ <SettingsDataModelObjectPreview
+ objectMetadataItems={[objectMetadataItem]}
+ pluralizeLabel={pluralizeLabel}
+ />
+ <SettingsDataModelFieldPreview
+ objectNameSingular={objectNameSingular}
+ fieldMetadataItem={{
+ label: fieldMetadataItem.label,
+ icon: fieldMetadataItem.icon,
+ defaultValue: fieldMetadataItem.defaultValue,
+ options: fieldMetadataItem.options,
+ settings: fieldMetadataItem.settings,
+ type: fieldMetadataItem.type,
+ name: computeMetadataNameFromLabel(fieldMetadataItem.label),
+ }}
+ shrink={shrink}
+ withFieldLabel={withFieldLabel}
+ />
+ </SettingsDataModelPreviewMiniCard>
+ </div>
);
};
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreviewSubWidget.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreviewSubWidget.tsx
index 2c82c861a87..7d4ea2805ce 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreviewSubWidget.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreviewSubWidget.tsx
@@ -2,11 +2,10 @@ import { styled } from '@linaria/react';
import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';
import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
+import { SettingsDataModelPreviewMiniCard } from '@/settings/data-model/components/SettingsDataModelPreviewMiniCard';
import { SettingsDataModelRelationFieldPreview } from '@/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreview';
import { SettingsDataModelObjectPreview } from '@/settings/data-model/objects/components/SettingsDataModelObjectSummary';
import { isDefined } from 'twenty-shared/utils';
-import { Card } from 'twenty-ui/primitives/surfaces';
-import { themeCssVariables } from 'twenty-ui/theme';
export type SettingsDataModelRelationFieldPreviewSubWidgetProps = {
fieldMetadataItem: Pick<
@@ -25,17 +24,6 @@ const StyledCardContainer = styled.div`
display: flex;
flex: 1 1 0;
min-width: 0;
-
- > div {
- border-radius: ${themeCssVariables.border.radius.md};
- color: ${themeCssVariables.font.color.primary};
- }
-`;
-
-const StyledCardContentContainer = styled.div`
- > div {
- padding: ${themeCssVariables.spacing[2]};
- }
`;
export const SettingsDataModelRelationFieldPreviewSubWidget = ({
@@ -57,24 +45,20 @@ export const SettingsDataModelRelationFieldPreviewSubWidget = ({
return (
<StyledCardContainer className={className}>
- <Card.Root fullWidth>
- <StyledCardContentContainer>
- <Card.Content>
- <SettingsDataModelObjectPreview
- objectMetadataItems={targetObjectMetadataItems}
- pluralizeLabel={pluralizeLabel}
- />
- <SettingsDataModelRelationFieldPreview
- fieldMetadataItem={fieldMetadataItem}
- relationTargetObjectNameSingular={
- fieldPreviewTargetObjectNameSingular
- }
- shrink={shrink}
- withFieldLabel={withFieldLabel}
- />
- </Card.Content>
- </StyledCardContentContainer>
- </Card.Root>
+ <SettingsDataModelPreviewMiniCard>
+ <SettingsDataModelObjectPreview
+ objectMetadataItems={targetObjectMetadataItems}
+ pluralizeLabel={pluralizeLabel}
+ />
+ <SettingsDataModelRelationFieldPreview
+ fieldMetadataItem={fieldMetadataItem}
+ relationTargetObjectNameSingular={
+ fieldPreviewTargetObjectNameSingular
+ }
+ shrink={shrink}
+ withFieldLabel={withFieldLabel}
+ />
+ </SettingsDataModelPreviewMiniCard>
</StyledCardContainer>
);
};
diff --git a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectSettingsFormCard.tsx b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectSettingsFormCard.tsx
index 5d0fac8081f..0777c33d8e5 100644
--- a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectSettingsFormCard.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectSettingsFormCard.tsx
@@ -4,36 +4,20 @@ import { useMemo } from 'react';
import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';
import { getLabelIdentifierFieldMetadataItem } from '@/object-metadata/utils/getLabelIdentifierFieldMetadataItem';
import { SettingsDataModelCardTitle } from '@/settings/data-model/components/SettingsDataModelCardTitle';
+import { SettingsDataModelPreviewMiniCard } from '@/settings/data-model/components/SettingsDataModelPreviewMiniCard';
import { SettingsDataModelFieldPreviewWidget } from '@/settings/data-model/fields/preview/components/SettingsDataModelFieldPreviewWidget';
import { SettingsDataModelObjectPreview } from '@/settings/data-model/objects/components/SettingsDataModelObjectSummary';
import { SettingsDataModelObjectIdentifiersForm } from '@/settings/data-model/objects/forms/components/SettingsDataModelObjectIdentifiersForm';
+import { SETTINGS_DATA_MODEL_PREVIEW_SECTION_CLASS_NAME } from '@/settings/data-model/styles/SettingsDataModelPreviewSectionClassName';
import { Trans } from '@lingui/react/macro';
import { Card } from 'twenty-ui/primitives/surfaces';
-import { themeCssVariables } from 'twenty-ui/theme';
type SettingsDataModelObjectSettingsFormCardProps = {
objectMetadataItem: EnrichedObjectMetadataItem;
};
-const StyledTopCardContentContainer = styled.div`
- > div {
- background-color: ${themeCssVariables.background.transparent.lighter};
- }
-`;
-
const StyledObjectSummaryCardContainer = styled.div`
max-width: 480px;
-
- > div {
- border-radius: ${themeCssVariables.border.radius.md};
- color: ${themeCssVariables.font.color.primary};
- }
-`;
-
-const StyledObjectSummaryCardContentContainer = styled.div`
- > div {
- padding: ${themeCssVariables.spacing[2]};
- }
`;
export const SettingsDataModelObjectSettingsFormCard = ({
@@ -49,32 +33,29 @@ export const SettingsDataModelObjectSettingsFormCard = ({
return (
<Card.Root fullWidth>
- <StyledTopCardContentContainer>
- <Card.Content divider>
- <SettingsDataModelCardTitle>
- <Trans>Preview</Trans>
- </SettingsDataModelCardTitle>
- {labelIdentifierFieldMetadataItem ? (
- <SettingsDataModelFieldPreviewWidget
- objectNameSingular={objectMetadataItem.nameSingular}
- fieldMetadataItem={labelIdentifierFieldMetadataItem}
- withFieldLabel={false}
- />
- ) : (
- <StyledObjectSummaryCardContainer>
- <Card.Root>
- <StyledObjectSummaryCardContentContainer>
- <Card.Content>
- <SettingsDataModelObjectPreview
- objectMetadataItems={[objectMetadataItem]}
- />
- </Card.Content>
- </StyledObjectSummaryCardContentContainer>
- </Card.Root>
- </StyledObjectSummaryCardContainer>
- )}
- </Card.Content>
- </StyledTopCardContentContainer>
+ <Card.Content
+ className={SETTINGS_DATA_MODEL_PREVIEW_SECTION_CLASS_NAME}
+ divider
+ >
+ <SettingsDataModelCardTitle>
+ <Trans>Preview</Trans>
+ </SettingsDataModelCardTitle>
+ {labelIdentifierFieldMetadataItem ? (
+ <SettingsDataModelFieldPreviewWidget
+ objectNameSingular={objectMetadataItem.nameSingular}
+ fieldMetadataItem={labelIdentifierFieldMetadataItem}
+ withFieldLabel={false}
+ />
+ ) : (
+ <StyledObjectSummaryCardContainer>
+ <SettingsDataModelPreviewMiniCard>
+ <SettingsDataModelObjectPreview
+ objectMetadataItems={[objectMetadataItem]}
+ />
+ </SettingsDataModelPreviewMiniCard>
+ </StyledObjectSummaryCardContainer>
+ )}
+ </Card.Content>
<Card.Content>
<SettingsDataModelObjectIdentifiersForm
objectMetadataItem={objectMetadataItem}
diff --git a/packages/twenty-front/src/modules/settings/data-model/styles/SettingsDataModelPreviewSectionClassName.ts b/packages/twenty-front/src/modules/settings/data-model/styles/SettingsDataModelPreviewSectionClassName.ts
new file mode 100644
index 00000000000..8af1b6f7e7c
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/data-model/styles/SettingsDataModelPreviewSectionClassName.ts
@@ -0,0 +1,6 @@
+import { css } from '@linaria/core';
+import { themeCssVariables } from 'twenty-ui/theme';
+
+export const SETTINGS_DATA_MODEL_PREVIEW_SECTION_CLASS_NAME = css`
+ background-color: ${themeCssVariables.background.transparent.lighter};
+`;
diff --git a/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsx b/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsx
index c8bc927e0c4..fc88324dba2 100644
--- a/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsx
+++ b/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsx
@@ -22,6 +22,14 @@ const StyledCheckoutButton = styled(MainButton)`
width: 200px;
`;
+const StyledPricingDialogBody = styled(Dialog.Body)`
+ align-items: center;
+ display: flex;
+ flex: 1 1 0%;
+ flex-direction: column;
+ padding: ${themeCssVariables.spacing[10]};
+`;
+
export const ENTERPRISE_PLAN_MODAL_ID = 'enterprise-plan-modal';
type BillingInterval = 'monthly' | 'yearly';
@@ -159,17 +167,8 @@ export const EnterprisePlanModal = () => {
aria-label={t`Get Organization`}
onKeyDown={onKeyDown}
size="md"
- style={{ padding: 0 }}
>
- <Dialog.Body
- style={{
- display: 'flex',
- flex: '1 1 0%',
- flexDirection: 'column',
- padding: 'var(--t-spacing-10)',
- alignItems: 'center',
- }}
- >
+ <StyledPricingDialogBody>
<Title noMarginTop>{t`Get Organization`}</Title>
<SubTitle>{t`Enjoy a 30-day free trial`}</SubTitle>
@@ -212,7 +211,7 @@ export const EnterprisePlanModal = () => {
startIcon={isLoading && <Loader />}
disabled={isLoading}
>{t`Continue`}</StyledCheckoutButton>
- </Dialog.Body>
+ </StyledPricingDialogBody>
</Dialog.Popup>
)}
</DialogInstance>
diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsx
index 1a1715b740f..8914aa7d014 100644
--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsx
+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsx
@@ -26,13 +26,10 @@ const StyledRecordLevelPermissionPickerContainer = styled.div<{
: themeCssVariables.background.transparent.lighter};
border: ${({ multiline }) =>
multiline ? 'none' : `1px solid ${themeCssVariables.border.color.medium}`};
-
- border-bottom-right-radius: ${({ multiline }) =>
- multiline ? '0' : themeCssVariables.border.radius.sm};
border-radius: ${({ multiline }) =>
- multiline ? themeCssVariables.border.radius.sm : '0'};
- border-top-right-radius: ${({ multiline }) =>
- multiline ? '0' : themeCssVariables.border.radius.sm};
+ multiline
+ ? `${themeCssVariables.border.radius.sm} 0 0 ${themeCssVariables.border.radius.sm}`
+ : `0 ${themeCssVariables.border.radius.sm} ${themeCssVariables.border.radius.sm} 0`};
color: ${({ multiline }) =>
multiline
? themeCssVariables.font.color.primary
diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsx
index d141c475445..89009d443f9 100644
--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsx
+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsx
@@ -135,7 +135,6 @@ export const SettingsSecurityEditableProfileFields = () => {
{profileFieldOptions.map((option) => (
<Dropdown.OptionItem
key={option.value}
- className="settings-security-editable-profile-fields-menu-item"
selected={selectedFields.includes(option.value)}
onSelect={() => toggleField(option.value)}
startIcon={<SelectOptionIcon Icon={option.Icon} />}
diff --git a/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribePreview.tsx b/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribePreview.tsx
index 5a0450d8e89..3ecc154a08b 100644
--- a/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribePreview.tsx
+++ b/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribePreview.tsx
@@ -25,14 +25,11 @@ const StyledViewport = styled.div`
`;
const StyledCard = styled(Card.Root)`
- --card-background-color: ${themeCssVariables.background.primary};
-
display: flex;
flex-direction: column;
gap: ${themeCssVariables.spacing[5]};
max-width: 420px;
padding: ${themeCssVariables.spacing[8]};
- width: 100%;
`;
const StyledHeader = styled.div`
@@ -92,7 +89,11 @@ export const SettingsUnsubscribePreview = () => {
/>
<StyledViewport>
{!loading && (
- <StyledCard rounded>
+ <StyledCard
+ rounded
+ fullWidth
+ backgroundColor={themeCssVariables.background.primary}
+ >
<StyledHeader>
<Section.Header
title={t`Do you want to unsubscribe?`}
diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChip.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChip.tsx
deleted file mode 100644
index 655465daa09..00000000000
--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChip.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-import { styled } from '@linaria/react';
-import { t } from '@lingui/core/macro';
-import { isNonEmptyString } from '@sniptt/guards';
-import { Fragment } from 'react/jsx-runtime';
-import { isDefined } from 'twenty-shared/utils';
-import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';
-import { themeCssVariables } from 'twenty-ui/theme';
-
-import { type SidePanelNavigationStackItem } from '@/side-panel/states/sidePanelNavigationStackState';
-
-const StyledChip = styled.button<{
- withText: boolean;
- maxWidth?: string;
- onClick?: () => void;
-}>`
- align-items: center;
- all: unset;
- background: ${themeCssVariables.background.transparent.light};
- border: 1px solid ${themeCssVariables.border.color.medium};
- border-radius: ${themeCssVariables.border.radius.md};
- box-sizing: border-box;
- color: ${themeCssVariables.font.color.primary};
- cursor: ${({ onClick }) => (isDefined(onClick) ? 'pointer' : 'default')};
- display: flex;
- font-family: inherit;
- font-size: ${themeCssVariables.font.size.sm};
- font-weight: ${themeCssVariables.font.weight.medium};
- gap: ${themeCssVariables.spacing[1]};
- height: ${themeCssVariables.spacing[6]};
- justify-content: center;
- line-height: ${themeCssVariables.text.lineHeight.lg};
- max-width: ${({ maxWidth }) => maxWidth ?? ''};
-
- &:hover {
- background: ${({ onClick }) =>
- isDefined(onClick)
- ? themeCssVariables.background.transparent.medium
- : themeCssVariables.background.transparent.light};
- }
- padding: 0
- ${({ withText }) =>
- withText ? themeCssVariables.spacing[2] : themeCssVariables.spacing[1]};
-`;
-
-const StyledIconsContainer = styled.div`
- align-items: center;
- display: flex;
-`;
-
-const StyledEmptyText = styled.div`
- color: ${themeCssVariables.font.color.tertiary};
-`;
-
-export type SidePanelContextChipProps = {
- Icons: React.ReactNode[];
- text?: string;
- onClick?: () => void;
- testId?: string;
- maxWidth?: string;
- forceEmptyText?: boolean;
- page?: SidePanelNavigationStackItem;
-};
-
-export const SidePanelContextChip = ({
- Icons,
- text,
- onClick,
- testId,
- maxWidth,
- forceEmptyText = false,
-}: SidePanelContextChipProps) => {
- return (
- <StyledChip
- withText={isNonEmptyString(text)}
- onClick={onClick}
- data-testid={testId}
- maxWidth={maxWidth}
- >
- <StyledIconsContainer>
- {Icons.map((Icon, index) => (
- <Fragment key={index}>{Icon}</Fragment>
- ))}
- </StyledIconsContainer>
- {text?.trim?.() ? (
- <OverflowingTextWithTooltip text={text} />
- ) : !forceEmptyText ? (
- <StyledEmptyText>{t`Untitled`}</StyledEmptyText>
- ) : (
- ''
- )}
- </StyledChip>
- );
-};
diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelPageInfo.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelPageInfo.tsx
index 24766cff675..6d6134999c9 100644
--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelPageInfo.tsx
+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelPageInfo.tsx
@@ -7,7 +7,7 @@ import { SidePanelPageLayoutInfo } from '@/side-panel/components/SidePanelPageLa
import { SidePanelWorkflowStepInfo } from '@/side-panel/components/SidePanelWorkflowStepInfo';
import { SidePanelPages } from 'twenty-shared/types';
-import { type SidePanelContextChipProps } from '@/side-panel/components/SidePanelContextChip';
+import { type SidePanelContextChipProps } from '@/side-panel/types/SidePanelContextChipProps';
type SidePanelPageInfoProps = {
pageChip: SidePanelContextChipProps | undefined;
diff --git a/packages/twenty-front/src/modules/side-panel/components/__tests__/SidePanelTopBar.test.tsx b/packages/twenty-front/src/modules/side-panel/components/__tests__/SidePanelTopBar.test.tsx
index 32672ce9d45..68aa1409e59 100644
--- a/packages/twenty-front/src/modules/side-panel/components/__tests__/SidePanelTopBar.test.tsx
+++ b/packages/twenty-front/src/modules/side-panel/components/__tests__/SidePanelTopBar.test.tsx
@@ -7,7 +7,7 @@ import { createStore, Provider as JotaiProvider } from 'jotai';
import { SIDE_PANEL_FOCUS_ID } from '@/side-panel/constants/SidePanelFocusId';
import { SIDE_PANEL_SELECTABLE_LIST_ID } from '@/side-panel/constants/SidePanelSelectableListId';
import { SidePanelList } from '@/side-panel/components/SidePanelList';
-import { type SidePanelContextChipProps } from '@/side-panel/components/SidePanelContextChip';
+import { type SidePanelContextChipProps } from '@/side-panel/types/SidePanelContextChipProps';
import { SidePanelTopBar } from '@/side-panel/components/SidePanelTopBar';
import { isSidePanelOpenedState } from '@/side-panel/states/isSidePanelOpenedState';
import {
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartRatioOptionSelectSelectableListItem.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartRatioOptionSelectSelectableListItem.tsx
index 5fb06ef89eb..f4e03c96718 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartRatioOptionSelectSelectableListItem.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartRatioOptionSelectSelectableListItem.tsx
@@ -73,13 +73,7 @@ export const ChartRatioOptionSelectSelectableListItem = ({
selected={isSelected}
indicator="check"
>
- <Tag
- color={color ?? 'transparent'}
- borderStyle="dashed"
- variant={'soft'}
- >
- {label}
- </Tag>
+ <Tag color={color ?? 'transparent'}>{label}</Tag>
</ListItemButton>
</SelectableListItem>
);
diff --git a/packages/twenty-front/src/modules/side-panel/types/SidePanelContextChipProps.ts b/packages/twenty-front/src/modules/side-panel/types/SidePanelContextChipProps.ts
new file mode 100644
index 00000000000..0b0cdc6f496
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/types/SidePanelContextChipProps.ts
@@ -0,0 +1,13 @@
+import { type ReactNode } from 'react';
+
+import { type SidePanelNavigationStackItem } from '@/side-panel/states/sidePanelNavigationStackState';
+
+export type SidePanelContextChipProps = {
+ Icons: ReactNode[];
+ text?: string;
+ onClick?: () => void;
+ testId?: string;
+ maxWidth?: string;
+ forceEmptyText?: boolean;
+ page?: SidePanelNavigationStackItem;
+};
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadSheetImportModalWrapper.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadSheetImportModalWrapper.tsx
index 4e7d8cf6d85..6ec2e633b77 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadSheetImportModalWrapper.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadSheetImportModalWrapper.tsx
@@ -5,9 +5,13 @@ import { styled } from '@linaria/react';
import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal';
-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';
+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';
import { SpreadSheetImportModalCloseButton } from './SpreadSheetImportModalCloseButton';
+const StyledPopup = styled(Dialog.Popup)`
+ height: ${themeCssVariables.modal.size.xl.height};
+`;
+
const StyledInnerContainer = styled.div`
display: flex;
flex: 1;
@@ -50,11 +54,10 @@ export const SpreadSheetImportModalWrapper = ({
closeOnDismiss={false}
>
{({ onKeyDown }) => (
- <Dialog.Popup
+ <StyledPopup
aria-label={t`Import data`}
onKeyDown={onKeyDown}
size="xl"
- style={{ padding: 0, height: 'var(--t-modal-size-xl-height)' }}
>
<StyledInnerContainer>
<StyledRtlLtr dir={rtl ? 'rtl' : 'ltr'}>
@@ -62,7 +65,7 @@ export const SpreadSheetImportModalWrapper = ({
{children}
</StyledRtlLtr>
</StyledInnerContainer>
- </Dialog.Popup>
+ </StyledPopup>
)}
</DialogInstance>
);
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportStepBody.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportStepBody.tsx
new file mode 100644
index 00000000000..e0d64ef62e7
--- /dev/null
+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportStepBody.tsx
@@ -0,0 +1,62 @@
+import { css, cx } from '@linaria/core';
+import { type ReactNode } from 'react';
+import { Dialog } from 'twenty-ui/primitives/surfaces';
+import { themeCssVariables } from 'twenty-ui/theme';
+
+const stepBodyClassName = css`
+ display: flex;
+ flex: 1 1 0%;
+ flex-direction: column;
+`;
+
+const stepBodyPaddingClassNames = {
+ none: css`
+ padding: 0;
+ `,
+ medium: css`
+ padding: ${themeCssVariables.spacing[6]};
+ `,
+ large: css`
+ padding: ${themeCssVariables.spacing[10]};
+ `,
+};
+
+const horizontallyCenteredStepBodyClassName = css`
+ align-items: center;
+`;
+
+const verticallyCenteredStepBodyClassName = css`
+ justify-content: center;
+`;
+
+const largeGapStepBodyClassName = css`
+ gap: ${themeCssVariables.spacing[8]};
+`;
+
+type SpreadsheetImportStepBodyProps = {
+ children: ReactNode;
+ padding?: keyof typeof stepBodyPaddingClassNames;
+ isCenteredHorizontally?: boolean;
+ isCenteredVertically?: boolean;
+ hasLargeGap?: boolean;
+};
+
+export const SpreadsheetImportStepBody = ({
+ children,
+ padding = 'none',
+ isCenteredHorizontally = false,
+ isCenteredVertically = false,
+ hasLargeGap = false,
+}: SpreadsheetImportStepBodyProps) => (
+ <Dialog.Body
+ className={cx(
+ stepBodyClassName,
+ stepBodyPaddingClassNames[padding],
+ isCenteredHorizontally && horizontallyCenteredStepBodyClassName,
+ isCenteredVertically && verticallyCenteredStepBodyClassName,
+ hasLargeGap && largeGapStepBodyClassName,
+ )}
+ >
+ {children}
+ </Dialog.Body>
+);
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsx
index 711d32f0b89..6918f9675de 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsx
@@ -7,12 +7,11 @@ import { t } from '@lingui/core/macro';
import { Loader } from 'twenty-ui/primitives/feedback';
import { isDefined } from 'twenty-shared/utils';
-const StyledFooterContainer = styled.div`
- > div {
- border-top: 1px solid ${themeCssVariables.border.color.medium};
- box-shadow: ${themeCssVariables.boxShadow.strong};
- justify-content: space-between;
- }
+const StyledFooter = styled(Dialog.Footer)`
+ border-top: 1px solid ${themeCssVariables.border.color.medium};
+ box-shadow: ${themeCssVariables.boxShadow.strong};
+ justify-content: space-between;
+ padding: ${themeCssVariables.spacing[5]};
`;
type StepNavigationButtonProps = {
@@ -33,27 +32,25 @@ export const StepNavigationButton = ({
isContinueDisabled = false,
}: StepNavigationButtonProps) => {
return (
- <StyledFooterContainer>
- <Dialog.Footer style={{ padding: 'var(--t-spacing-5)' }}>
- {isDefined(onBack) && (
- <MainButton
- startIcon={isLoading ? <Loader /> : undefined}
- onClick={!isLoading ? onBack : undefined}
- variant="outline"
- >
- {backTitle}
- </MainButton>
- )}
- {isDefined(onContinue) && (
- <MainButton
- startIcon={isLoading ? <Loader /> : undefined}
- onClick={!isLoading ? onContinue : undefined}
- disabled={isContinueDisabled}
- >
- {continueTitle}
- </MainButton>
- )}
- </Dialog.Footer>
- </StyledFooterContainer>
+ <StyledFooter>
+ {isDefined(onBack) && (
+ <MainButton
+ startIcon={isLoading ? <Loader /> : undefined}
+ onClick={!isLoading ? onBack : undefined}
+ variant="outline"
+ >
+ {backTitle}
+ </MainButton>
+ )}
+ {isDefined(onContinue) && (
+ <MainButton
+ startIcon={isLoading ? <Loader /> : undefined}
+ onClick={!isLoading ? onContinue : undefined}
+ disabled={isContinueDisabled}
+ >
+ {continueTitle}
+ </MainButton>
+ )}
+ </StyledFooter>
);
};
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ImportDataStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ImportDataStep.tsx
index 1ccb5d00bee..afcb9b0c482 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ImportDataStep.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ImportDataStep.tsx
@@ -1,4 +1,4 @@
-import { Dialog } from 'twenty-ui/primitives/surfaces';
+import { SpreadsheetImportStepBody } from '@/spreadsheet-import/components/SpreadsheetImportStepBody';
import { useNumberFormat } from '@/localization/hooks/useNumberFormat';
import { StepNavigationButton } from '@/spreadsheet-import/components/StepNavigationButton';
import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal';
@@ -43,20 +43,11 @@ export const ImportDataStep = ({
return (
<>
- <Dialog.Body
- style={{
- display: 'flex',
- flex: '1 1 0%',
- flexDirection: 'column',
- padding: 0,
- alignItems: 'center',
- justifyContent: 'center',
- }}
- >
+ <SpreadsheetImportStepBody isCenteredHorizontally isCenteredVertically>
<StyledHeader>{t`Importing Data ...`}</StyledHeader>
<StyledDescription>{t`${formattedCreatedRecordsProgress} out of ${formattedRecordsToImportCount} records imported.`}</StyledDescription>
<Loader />
- </Dialog.Body>
+ </SpreadsheetImportStepBody>
<StepNavigationButton onBack={onClose} backTitle={t`Cancel`} />
</>
);
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep.tsx
index 36da25e1f9e..61d0a523ae0 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep.tsx
@@ -1,4 +1,4 @@
-import { Dialog } from 'twenty-ui/primitives/surfaces';
+import { SpreadsheetImportStepBody } from '@/spreadsheet-import/components/SpreadsheetImportStepBody';
import { styled } from '@linaria/react';
import { useCallback, useMemo, useState } from 'react';
@@ -271,15 +271,7 @@ export const MatchColumnsStep = ({
return (
<>
- <Dialog.Body
- style={{
- display: 'flex',
- flex: '1 1 0%',
- flexDirection: 'column',
- padding: 0,
- alignItems: 'center',
- }}
- >
+ <SpreadsheetImportStepBody isCenteredHorizontally>
<ScrollWrapper componentInstanceId="scroll-wrapper-modal-content">
<ColumnGrid
columns={columns}
@@ -307,7 +299,7 @@ export const MatchColumnsStep = ({
)}
/>
</ScrollWrapper>
- </Dialog.Body>
+ </SpreadsheetImportStepBody>
<StepNavigationButton
onContinue={handleOnContinue}
isLoading={isLoading}
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectInput.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectInput.tsx
index 8ef18733cbf..314c7db660b 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectInput.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectInput.tsx
@@ -51,8 +51,6 @@ export const SubMatchingSelectInput = ({
>
<Tag
color={(option.color as TagColor) ?? 'transparent'}
- borderStyle="dashed"
- variant="soft"
startIcon={
isDefined(option.Icon) ? createElement(option.Icon) : undefined
}
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/SelectHeaderStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/SelectHeaderStep.tsx
index c1f3444a564..5c74ab918ad 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/SelectHeaderStep.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/SelectHeaderStep.tsx
@@ -1,4 +1,4 @@
-import { Dialog } from 'twenty-ui/primitives/surfaces';
+import { SpreadsheetImportStepBody } from '@/spreadsheet-import/components/SpreadsheetImportStepBody';
import { styled } from '@linaria/react';
import { themeCssVariables } from 'twenty-ui/theme';
import { useCallback, useState } from 'react';
@@ -100,14 +100,7 @@ export const SelectHeaderStep = ({
return (
<>
- <Dialog.Body
- style={{
- display: 'flex',
- flex: '1 1 0%',
- flexDirection: 'column',
- padding: 'var(--t-spacing-10)',
- }}
- >
+ <SpreadsheetImportStepBody padding="large">
<StyledHeadingContainer>
<Heading title={t`Select header row`} />
</StyledHeadingContainer>
@@ -118,7 +111,7 @@ export const SelectHeaderStep = ({
onSelectedRowChange={setSelectedRowIndex}
/>
</StyledTableContainer>
- </Dialog.Body>
+ </SpreadsheetImportStepBody>
<StepNavigationButton
onContinue={handleOnContinue}
onBack={onBack}
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectSheetStep/SelectSheetStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectSheetStep/SelectSheetStep.tsx
index 55094e80f1d..ac3912fa7c5 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectSheetStep/SelectSheetStep.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectSheetStep/SelectSheetStep.tsx
@@ -1,4 +1,4 @@
-import { Dialog } from 'twenty-ui/primitives/surfaces';
+import { SpreadsheetImportStepBody } from '@/spreadsheet-import/components/SpreadsheetImportStepBody';
import { styled } from '@linaria/react';
import { useCallback, useState } from 'react';
@@ -99,16 +99,11 @@ export const SelectSheetStep = ({
return (
<>
- <Dialog.Body
- style={{
- display: 'flex',
- flex: '1 1 0%',
- flexDirection: 'column',
- padding: 'var(--t-spacing-10)',
- alignItems: 'center',
- justifyContent: 'center',
- gap: 'var(--t-spacing-8)',
- }}
+ <SpreadsheetImportStepBody
+ padding="large"
+ isCenteredHorizontally
+ isCenteredVertically
+ hasLargeGap
>
<Heading title={t`Select the sheet to use`} />
<RadioGroup
@@ -123,7 +118,7 @@ export const SelectSheetStep = ({
</StyledRadioItemContainer>
))}
</RadioGroup>
- </Dialog.Body>
+ </SpreadsheetImportStepBody>
<StepNavigationButton
onContinue={() => handleOnContinue(value)}
onBack={onBack}
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx
index ddc67e10b4f..6588fa38fc4 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx
@@ -5,7 +5,7 @@ import { SpreadsheetImportStepType } from '@/spreadsheet-import/steps/types/Spre
import { useCallback, useState } from 'react';
import { useToast } from 'twenty-ui/components/feedback';
import { Loader } from 'twenty-ui/primitives/feedback';
-import { Dialog } from 'twenty-ui/primitives/surfaces';
+import { SpreadsheetImportStepBody } from '@/spreadsheet-import/components/SpreadsheetImportStepBody';
import { MatchColumnsStep } from './MatchColumnsStep/MatchColumnsStep';
import { SelectHeaderStep } from './SelectHeaderStep/SelectHeaderStep';
import { SelectSheetStep } from './SelectSheetStep/SelectSheetStep';
@@ -123,18 +123,13 @@ export const SpreadsheetImportStepper = ({
case SpreadsheetImportStepType.loading:
default:
return (
- <Dialog.Body
- style={{
- display: 'flex',
- flex: '1 1 0%',
- flexDirection: 'column',
- padding: 'var(--t-spacing-10)',
- alignItems: 'center',
- justifyContent: 'center',
- }}
+ <SpreadsheetImportStepBody
+ padding="large"
+ isCenteredHorizontally
+ isCenteredVertically
>
<Loader />
- </Dialog.Body>
+ </SpreadsheetImportStepBody>
);
}
};
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepperContainer.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepperContainer.tsx
index 0422885f6e8..fded86dcdfd 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepperContainer.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepperContainer.tsx
@@ -1,5 +1,4 @@
import { styled } from '@linaria/react';
-import { Dialog } from 'twenty-ui/primitives/surfaces';
import { useSpreadsheetImportInitialStep } from '@/spreadsheet-import/hooks/useSpreadsheetImportInitialStep';
import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal';
@@ -12,11 +11,12 @@ import { useLingui } from '@lingui/react/macro';
import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';
import { SpreadsheetImportStepper } from './SpreadsheetImportStepper';
-const StyledImportHeader = styled(Dialog.Header)`
+const StyledImportHeader = styled.div`
align-items: center;
background: ${themeCssVariables.background.secondary};
border-bottom: 1px solid ${themeCssVariables.border.color.medium};
- flex-direction: row;
+ display: flex;
+ flex-shrink: 0;
height: 60px;
padding: 0 ${themeCssVariables.spacing[30]};
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/UploadStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/UploadStep.tsx
index 4511ffe0da4..56d523dbbce 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/UploadStep.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/UploadStep.tsx
@@ -1,4 +1,4 @@
-import { Dialog } from 'twenty-ui/primitives/surfaces';
+import { SpreadsheetImportStepBody } from '@/spreadsheet-import/components/SpreadsheetImportStepBody';
import { t } from '@lingui/core/macro';
import { useCallback, useState } from 'react';
import { type WorkBook } from 'xlsx-ugnis';
@@ -110,15 +110,8 @@ export const UploadStep = ({
);
return (
- <Dialog.Body
- style={{
- display: 'flex',
- flex: '1 1 0%',
- flexDirection: 'column',
- padding: 'var(--t-spacing-6)',
- }}
- >
+ <SpreadsheetImportStepBody padding="medium">
<DropZone onContinue={handleOnContinue} isLoading={isLoading} />
- </Dialog.Body>
+ </SpreadsheetImportStepBody>
);
};
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx
index dd24a9a5d4a..e3041cb5ff2 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx
@@ -1,4 +1,4 @@
-import { Dialog } from 'twenty-ui/primitives/surfaces';
+import { SpreadsheetImportStepBody } from '@/spreadsheet-import/components/SpreadsheetImportStepBody';
import { SpreadsheetImportTable } from '@/spreadsheet-import/components/SpreadsheetImportTable';
import { StepNavigationButton } from '@/spreadsheet-import/components/StepNavigationButton';
import { useHideStepBar } from '@/spreadsheet-import/hooks/useHideStepBar';
@@ -288,14 +288,7 @@ export const ValidationStep = ({
return (
<>
- <Dialog.Body
- style={{
- display: 'flex',
- flex: '1 1 0%',
- flexDirection: 'column',
- padding: 0,
- }}
- >
+ <SpreadsheetImportStepBody>
<StyledContentWrapper>
{filterByErrors && tableData.length === 0 ? (
<StyledNoRowsWithErrorsContainer>
@@ -344,7 +337,7 @@ export const ValidationStep = ({
</StyledButtonContainer>
</StyledToolbar>
</StyledContentWrapper>
- </Dialog.Body>
+ </SpreadsheetImportStepBody>
<StepNavigationButton
onContinue={onContinue}
onBack={onBack}
diff --git a/packages/twenty-front/src/modules/ui/field/display/components/GlobalFilePreviewModal.tsx b/packages/twenty-front/src/modules/ui/field/display/components/GlobalFilePreviewModal.tsx
index c7e9358dfaa..d15a3ca16a7 100644
--- a/packages/twenty-front/src/modules/ui/field/display/components/GlobalFilePreviewModal.tsx
+++ b/packages/twenty-front/src/modules/ui/field/display/components/GlobalFilePreviewModal.tsx
@@ -21,6 +21,10 @@ const DocumentViewer = lazy(() =>
const GLOBAL_FILE_PREVIEW_MODAL_ID = 'global-file-preview-modal';
+const StyledPreviewPopup = styled(Dialog.Popup)`
+ padding: ${themeCssVariables.spacing[4]};
+`;
+
const StyledModalHeader = styled.div`
align-items: center;
border-bottom: 1px solid ${themeCssVariables.border.color.medium};
@@ -105,11 +109,10 @@ export const GlobalFilePreviewModal = (): JSX.Element | null => {
renderInDocumentBody
>
{({ onKeyDown }) => (
- <Dialog.Popup
+ <StyledPreviewPopup
aria-label={filePreview.label ?? t`File preview`}
onKeyDown={onKeyDown}
size="lg"
- style={{ padding: 'var(--t-spacing-4)' }}
>
<StyledModalHeader>
<StyledHeader>
@@ -153,7 +156,7 @@ export const GlobalFilePreviewModal = (): JSX.Element | null => {
</Suspense>
</StyledModalContent>
</ScrollWrapper>
- </Dialog.Popup>
+ </StyledPreviewPopup>
)}
</DialogInstance>
);
diff --git a/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx b/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx
index 222d5f560d6..70b33801c55 100644
--- a/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx
+++ b/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx
@@ -29,9 +29,7 @@ const StyledText = styled.div`
`;
const StyledSwitch = styled(Switch)`
- ${StyledContainer} & {
- color: ${themeCssVariables.color.yellow};
- }
+ color: ${themeCssVariables.color.yellow};
`;
type AdvancedSettingsSwitchProps = {
diff --git a/packages/twenty-front/src/modules/ui/input/components/Select.tsx b/packages/twenty-front/src/modules/ui/input/components/Select.tsx
index 5a5fecf3fe2..528d525a3c7 100644
--- a/packages/twenty-front/src/modules/ui/input/components/Select.tsx
+++ b/packages/twenty-front/src/modules/ui/input/components/Select.tsx
@@ -265,13 +265,7 @@ export const Select = <TValue extends SelectValue>({
}
>
{isColoredTag ? (
- <Tag
- color={tagColor}
- borderStyle="dashed"
- variant="soft"
- >
- {option.label}
- </Tag>
+ <Tag color={tagColor}>{option.label}</Tag>
) : (
option.label
)}
diff --git a/packages/twenty-front/src/modules/ui/input/components/SelectInput.tsx b/packages/twenty-front/src/modules/ui/input/components/SelectInput.tsx
index 32d68e9381b..b27a33ee263 100644
--- a/packages/twenty-front/src/modules/ui/input/components/SelectInput.tsx
+++ b/packages/twenty-front/src/modules/ui/input/components/SelectInput.tsx
@@ -81,8 +81,6 @@ export const SelectInput = ({
>
<Tag
color={option.color ?? 'transparent'}
- borderStyle="dashed"
- variant="soft"
startIcon={
isDefined(option.Icon) ? createElement(option.Icon) : undefined
}
diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownContent.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownContent.tsx
index 808cdc4185b..462cdaa19a1 100644
--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownContent.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownContent.tsx
@@ -18,7 +18,6 @@ type DropdownContentProps = Pick<
| 'onClick'
| 'initialFocus'
| 'finalFocus'
- | 'className'
| 'aria-label'
| 'ref'
>;
@@ -36,7 +35,6 @@ export const DropdownContent = ({
onClick,
initialFocus,
finalFocus,
- className,
'aria-label': ariaLabel,
ref,
}: DropdownContentProps) => {
@@ -57,7 +55,6 @@ export const DropdownContent = ({
onClick={onClick}
initialFocus={initialFocus}
finalFocus={finalFocus}
- className={className}
aria-label={ariaLabel}
>
<DropdownClickOutsideListenerExclusion>
diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader.tsx
index a1905c2d2e5..ec38c521011 100644
--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader.tsx
@@ -40,24 +40,11 @@ const StyledChildrenWrapper = styled.span`
white-space: nowrap;
`;
-const StyledEndComponent = styled.div`
- color: ${themeCssVariables.font.color.tertiary};
- display: inline-flex;
- margin-left: auto;
- margin-right: 0;
-
- & > svg {
- height: ${themeCssVariables.icon.size.md}px;
- width: ${themeCssVariables.icon.size.md}px;
- }
-`;
-
type DropdownMenuHeaderProps = ComponentProps<'li'> & {
onClick?: (event: MouseEvent<HTMLLIElement>) => void;
testId?: string;
className?: string;
StartComponent?: React.ReactNode;
- EndComponent?: React.ReactNode;
};
export const DropdownMenuHeader = ({
@@ -66,15 +53,11 @@ export const DropdownMenuHeader = ({
onClick,
testId,
className,
- EndComponent,
}: DropdownMenuHeaderProps) => {
return (
<StyledHeader data-testid={testId} className={className} onClick={onClick}>
{isDefined(StartComponent) && StartComponent}
<StyledChildrenWrapper>{children}</StyledChildrenWrapper>
- {isDefined(EndComponent) && (
- <StyledEndComponent>{EndComponent}</StyledEndComponent>
- )}
</StyledHeader>
);
};
diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/__stories__/DropdownMenuHeader.stories.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/__stories__/DropdownMenuHeader.stories.tsx
index 83228d8773d..709312e0bcf 100644
--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/__stories__/DropdownMenuHeader.stories.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/__stories__/DropdownMenuHeader.stories.tsx
@@ -1,13 +1,9 @@
import { type Meta, type StoryObj } from '@storybook/react-vite';
-import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
-import { LegacyDropdownContent } from '@/ui/layout/dropdown/components/LegacyDropdownContent';
import { DropdownMenuHeader } from '@/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader';
import { DropdownMenuHeaderLeftComponent } from '@/ui/layout/dropdown/components/DropdownMenuHeader/internal/DropdownMenuHeaderLeftComponent';
-import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
import { Avatar } from 'twenty-ui/primitives/data-display';
-import { IconChevronLeft, IconChevronRight, IconPlus } from 'twenty-ui/icon';
-import { ListItem } from 'twenty-ui/primitives/navigation';
+import { IconChevronLeft } from 'twenty-ui/icon';
import { AVATAR_URL_MOCK, ComponentDecorator } from 'twenty-ui/testing';
const meta: Meta<typeof DropdownMenuHeader> = {
@@ -32,36 +28,9 @@ export const StartIcon: Story = {
},
};
-export const StartAndEndIcon: Story = {
- args: {
- StartComponent: <DropdownMenuHeaderLeftComponent Icon={IconChevronLeft} />,
- EndComponent: <IconChevronRight />,
- children: 'Start and End Icon',
- },
-};
-
export const StartAvatar: Story = {
args: {
StartComponent: <Avatar name="placeholder" src={AVATAR_URL_MOCK} />,
children: 'Avatar',
},
};
-
-export const ContextDropdownAndAvatar: Story = {
- args: {
- children: 'Context Dropdown',
- StartComponent: <Avatar name="placeholder" src={AVATAR_URL_MOCK} />,
- EndComponent: (
- <Dropdown
- dropdownId="story-dropdown-id-context-menu"
- dropdownComponents={
- <LegacyDropdownContent>
- <DropdownMenuItemsContainer>
- <ListItem startIcon={<IconPlus />}>{'Create Workspace'}</ListItem>
- </DropdownMenuItemsContainer>
- </LegacyDropdownContent>
- }
- />
- ),
- },
-};
diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabMoreButton.tsx b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabMoreButton.tsx
index a6674573bdc..c1d71e8f639 100644
--- a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabMoreButton.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabMoreButton.tsx
@@ -16,7 +16,6 @@ const StyledTabMoreButtonContainer = styled.div`
type TabMoreButtonProps = {
hiddenTabsCount: number;
active: boolean;
- className?: string;
disableTestId?: boolean;
isDropdownTrigger?: boolean;
};
@@ -24,7 +23,6 @@ type TabMoreButtonProps = {
export const TabMoreButton = ({
hiddenTabsCount,
active,
- className,
disableTestId,
isDropdownTrigger = false,
}: TabMoreButtonProps) => {
@@ -36,7 +34,6 @@ export const TabMoreButton = ({
active={active}
children={`+${hiddenTabsCount} ${t`More`}`}
endIcon={<IconChevronDown />}
- className={className}
/>
);
diff --git a/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/Breadcrumb.tsx b/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/Breadcrumb.tsx
index 2746d728430..5a079e0fd16 100644
--- a/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/Breadcrumb.tsx
+++ b/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/Breadcrumb.tsx
@@ -6,17 +6,16 @@ import { isNonEmptyArray } from 'twenty-shared/utils';
import { Breadcrumb as BreadcrumbPrimitive } from 'twenty-ui/primitives/navigation';
import { useIsMobile } from 'twenty-ui/utilities';
-export const Breadcrumb = ({ className, links }: BreadcrumbProps) => {
+export const Breadcrumb = ({ links }: BreadcrumbProps) => {
const isMobile = useIsMobile();
if (isMobile && isNonEmptyArray(links)) {
- return <MobileBreadcrumb className={className} links={links} />;
+ return <MobileBreadcrumb links={links} />;
}
return (
<BreadcrumbPrimitive
aria-label={t`Breadcrumb`}
- className={className}
links={getBreadcrumbItems(links)}
/>
);
diff --git a/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/MobileBreadcrumb.tsx b/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/MobileBreadcrumb.tsx
index 889908b4324..649bea959c9 100644
--- a/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/MobileBreadcrumb.tsx
+++ b/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/MobileBreadcrumb.tsx
@@ -50,10 +50,7 @@ const StyledText = styled.span`
white-space: nowrap;
`;
-export const MobileBreadcrumb = ({
- className,
- links,
-}: MobileBreadcrumbProps) => {
+export const MobileBreadcrumb = ({ links }: MobileBreadcrumbProps) => {
const theme = useTheme();
const isSettingsPage = useIsSettingsPage();
@@ -67,7 +64,6 @@ export const MobileBreadcrumb = ({
return (
<BreadcrumbPrimitive
aria-label={t`Breadcrumb`}
- className={className}
links={getBreadcrumbItems(links)}
/>
);
@@ -77,7 +73,7 @@ export const MobileBreadcrumb = ({
const title = isNonEmptyString(text) ? text : undefined;
return (
- <StyledWrapper aria-label={t`Breadcrumb`} className={className}>
+ <StyledWrapper aria-label={t`Breadcrumb`}>
{isNonEmptyString(previousLink.href) ? (
<>
<IconChevronLeft size={theme.icon.size.md} aria-hidden />
diff --git a/packages/twenty-front/src/modules/ui/navigation/bread-crumb/types/BreadcrumbProps.ts b/packages/twenty-front/src/modules/ui/navigation/bread-crumb/types/BreadcrumbProps.ts
index 789e2fd8039..7101c6482c8 100644
--- a/packages/twenty-front/src/modules/ui/navigation/bread-crumb/types/BreadcrumbProps.ts
+++ b/packages/twenty-front/src/modules/ui/navigation/bread-crumb/types/BreadcrumbProps.ts
@@ -1,6 +1,5 @@
import { type BreadcrumbItem } from 'twenty-ui/primitives/navigation';
export type BreadcrumbProps = {
- className?: string;
links: Pick<BreadcrumbItem, 'children' | 'href'>[];
};
diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx
index e7ce7d14b19..c63251da706 100644
--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx
+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx
@@ -111,10 +111,6 @@ const StyledItem = styled.button<StyledItemProps>`
: themeCssVariables.font.color.primary};
}
- &:hover .keyboard-shortcuts {
- visibility: visible;
- }
-
@media (max-width: ${MOBILE_VIEWPORT}px) {
height: ${NAVIGATION_DRAWER_COLLAPSED_BUTTON_SIZE}px;
}
@@ -402,11 +398,7 @@ export const NavigationDrawerItem = ({
{isDefined(keyboardKeys) && (
<NavigationDrawerAnimatedCollapseWrapper>
- <Shortcut
- className="keyboard-shortcuts"
- shortcut={keyboardKeys}
- sequenceJoinLabel={t`then`}
- />
+ <Shortcut shortcut={keyboardKeys} sequenceJoinLabel={t`then`} />
</NavigationDrawerAnimatedCollapseWrapper>
)}
diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdown.tsx b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdown.tsx
index 00317cbfa18..341b7d51dfd 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdown.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdown.tsx
@@ -23,7 +23,6 @@ const StyledDropdownVariableButtonContainer = styled.div<{
disabled?: boolean;
}>`
align-items: center;
- background-color: transparent;
border-bottom-right-radius: ${themeCssVariables.border.radius.sm};
border-top-right-radius: ${themeCssVariables.border.radius.sm};
color: ${themeCssVariables.font.color.tertiary};
diff --git a/packages/twenty-oxlint-rules/rules/no-twenty-ui-override.exemptions.ts b/packages/twenty-oxlint-rules/rules/no-twenty-ui-override.exemptions.ts
index 35b8544687d..1e591b376b0 100644
--- a/packages/twenty-oxlint-rules/rules/no-twenty-ui-override.exemptions.ts
+++ b/packages/twenty-oxlint-rules/rules/no-twenty-ui-override.exemptions.ts
@@ -2,7 +2,7 @@ export const TWENTY_UI_OVERRIDE_EXEMPTIONS = [
{
filePath:
'packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx',
- reason: 'Card.Content animation for calendar days that have ended',
+ reason: 'Card.Content day row layout and the animation for ended days',
},
{
filePath:
@@ -19,11 +19,21 @@ export const TWENTY_UI_OVERRIDE_EXEMPTIONS = [
'packages/twenty-front/src/modules/log-console/components/LogConsoleDetailPanel.tsx',
reason: 'Card.Root laid out as a padded error message block',
},
+ {
+ filePath:
+ 'packages/twenty-front/src/modules/log-console/components/LogConsoleFieldsCard.tsx',
+ reason: 'Card.Root laid out as a padded column of log fields',
+ },
{
filePath:
'packages/twenty-front/src/modules/log-console/components/LogConsoleRecordChangeDetail.tsx',
reason: 'Button placement in its parent column',
},
+ {
+ filePath:
+ 'packages/twenty-front/src/modules/marketplace/components/SettingsApplicationInstallPermissionValidationModal.tsx',
+ reason: 'LightButton pinned to the corner of the fullscreen dialog',
+ },
{
filePath:
'packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsPasswordController.tsx',
@@ -34,6 +44,11 @@ export const TWENTY_UI_OVERRIDE_EXEMPTIONS = [
'packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationOverviewCard.tsx',
reason: 'Card.Root media layout with a minimum height',
},
+ {
+ filePath:
+ 'packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx',
+ reason: 'Card.Footer laid out around the add button',
+ },
{
filePath:
'packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSwitch.tsx',
@@ -44,16 +59,41 @@ export const TWENTY_UI_OVERRIDE_EXEMPTIONS = [
'packages/twenty-front/src/modules/settings/components/SettingsTableCard.tsx',
reason: 'Forwards the caller className to Card.Root',
},
+ {
+ filePath:
+ 'packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewFormCard.tsx',
+ reason: 'Tinted preview Card.Content and unpadded form Card.Content',
+ },
+ {
+ filePath:
+ 'packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewMiniCard.tsx',
+ reason: 'Compact Card.Content with primary text for field previews',
+ },
{
filePath:
'packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverview.tsx',
reason: 'React Flow panel classes on ButtonGroup',
},
+ {
+ filePath:
+ 'packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectSettingsFormCard.tsx',
+ reason: 'Tinted preview Card.Content',
+ },
{
filePath:
'packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetupCard.tsx',
reason: 'One-off Card.Content row layout',
},
+ {
+ filePath:
+ 'packages/twenty-front/src/modules/spreadsheet-import/components/SpreadSheetImportModalWrapper.tsx',
+ reason: 'Dialog.Popup keeps the xl height across import steps',
+ },
+ {
+ filePath:
+ 'packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportStepBody.tsx',
+ reason: 'Dialog.Body laid out as a full-height import step',
+ },
{
filePath:
'packages/twenty-front/src/modules/ui/feedback/skeleton/components/SkeletonLine.tsx',
@@ -64,6 +104,11 @@ export const TWENTY_UI_OVERRIDE_EXEMPTIONS = [
'packages/twenty-front/src/modules/ui/feedback/toast/components/AppToaster.tsx',
reason: 'Toaster stacking order above the app layers',
},
+ {
+ filePath:
+ 'packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx',
+ reason: 'Advanced mode color on the Switch',
+ },
{
filePath:
'packages/twenty-front/src/modules/ui/input/components/FormFieldInputContainer.tsx',