Skip to content

Commit 2bd8022

Browse files
fix(design): change spacing variant to avoid conflict with existing classes (#1032)
1 parent e525e63 commit 2bd8022

13 files changed

Lines changed: 55 additions & 53 deletions

File tree

packages/app-builder/src/components/CaseManager/Drawer/Drawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function CaseManagerDrawerButtons({ expandable = false }: { expandable?:
7171

7272
return (
7373
<div className="p-4">
74-
<div className="border-grey-90 bg-grey-100 z-10 flex gap-sm p-sm rounded-md border">
74+
<div className="border-grey-90 bg-grey-100 z-10 flex gap-v2-sm p-v2-sm rounded-md border">
7575
<button
7676
type="button"
7777
onClick={expandable ? () => context.setExpanded(false) : undefined}

packages/app-builder/src/components/CaseManager/PivotsPanel/PivotAnnotations.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ export function PivotAnnotations({
3131
const tagsAnnotations = annotations?.tags ?? [];
3232

3333
return (
34-
<div className="flex flex-col gap-md">
34+
<div className="flex flex-col gap-v2-md">
3535
<div className="text-h2 font-semibold">{t('cases:case_detail.pivot_panel.annotations')}</div>
36-
<div className="border-grey-90 flex flex-col gap-md border p-md bg-grey-background-light rounded-v2-lg">
36+
<div className="border-grey-90 flex flex-col gap-v2-md border p-v2-md bg-grey-background-light rounded-v2-lg">
3737
<div className="grid grid-cols-[116px_1fr] gap-x-3 gap-y-2">
3838
<div>{t('cases:annotations.tags.title')}</div>
3939
<div className="flex items-start justify-between">

packages/app-builder/src/components/CaseManager/PivotsPanel/PivotsPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function PivotsPanel(props: PivotsPanelProps) {
6363
{drawerContext.isExpanded ? (
6464
<DataModelExplorer caseId={props.case.id} dataModel={props.dataModel} />
6565
) : (
66-
<div className="w-[519px] p-l pt-0">
66+
<div className="w-[519px] p-v2-lg pt-0">
6767
<PivotsPanelContent
6868
currentUser={props.currentUser}
6969
case={props.case}

packages/app-builder/src/components/CaseManager/PivotsPanel/PivotsPanelContent.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ export function PivotsPanelContent({
100100
{t('cases:ai_review.proof.title')}
101101
</button>
102102
) : null}
103-
<div className="border-grey-90 flex gap-2 self-start rounded-v2-lg border p-xs">
103+
<div className="border-grey-90 flex gap-2 self-start rounded-v2-lg border p-v2-xs">
104104
{pivotObjects.map((pivotObject, idx) => {
105105
const uniqKey = pivotUniqKey(pivotObject);
106106
return (
107107
<button
108108
key={uniqKey}
109-
className="text-grey-50 aria-current:bg-purple-96 aria-current:text-purple-65 rounded-v2-md p-xs px-sm cursor-pointer"
109+
className="text-grey-50 aria-current:bg-purple-96 aria-current:text-purple-65 rounded-v2-md p-v2-xs px-v2-sm cursor-pointer"
110110
aria-current={uniqKey === pivotUniqKey(currentPivotObject)}
111111
onClick={() => {
112112
setCurrentPivotObjectUniqKey(pivotUniqKey(pivotObject));
@@ -122,11 +122,11 @@ export function PivotsPanelContent({
122122
{!isDisplayingProofs ? (
123123
<>
124124
{currentTable && currentPivotObject ? (
125-
<div className="flex flex-col gap-md">
125+
<div className="flex flex-col gap-v2-md">
126126
<div className="text-h2 font-semibold">
127127
{t('cases:case_detail.pivot_panel.informations')}
128128
</div>
129-
<div className="border-grey-90 flex flex-col gap-md border p-md bg-grey-background-light rounded-v2-lg">
129+
<div className="border-grey-90 flex flex-col gap-v2-md border p-v2-md bg-grey-background-light rounded-v2-lg">
130130
<div className="capitalize font-semibold">{currentTable.name}</div>
131131
<PivotObjectDetails
132132
tableModel={currentTable}
@@ -173,7 +173,7 @@ export function PivotsPanelContent({
173173
<div className="bg-grey-100 px-4 py-2 rounded-t-xl border-b border-grey-90">
174174
{t('cases:ai_review.proof.tab_title', { number: idx + 1 })}
175175
</div>
176-
<div className="p-4 flex flex-col gap-md">
176+
<div className="p-4 flex flex-col gap-v2-md">
177177
<ClientObjectDataList tableModel={tableModel} data={proof.object.data} />
178178
{navigationOptions ? (
179179
<>
@@ -273,7 +273,7 @@ function RelatedCases({
273273
}
274274

275275
return (
276-
<div className="flex flex-col gap-md">
276+
<div className="flex flex-col gap-v2-md">
277277
<div className="text-h2 font-semibold">
278278
{t('cases:case_detail.pivot_panel.case_history')}
279279
</div>

packages/app-builder/src/components/Cases/CaseAlerts.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ export const CaseAlerts = ({
4040
decisions ? (
4141
<div className="text-small border-grey-90 bg-grey-100 rounded-lg border">
4242
<div className="text-default text-grey-50 grid grid-cols-[82px_2fr_1.3fr_1fr] font-normal">
43-
<span className="p-sm">{t('cases:decisions.date')}</span>
44-
<span className="p-sm">{t('cases:decisions.alert')}</span>
45-
<span className="p-sm">{t('cases:decisions.trigger_object')}</span>
46-
<span className="p-sm">{t('cases:decisions.rule_hits')}</span>
43+
<span className="p-v2-sm">{t('cases:decisions.date')}</span>
44+
<span className="p-v2-sm">{t('cases:decisions.alert')}</span>
45+
<span className="p-v2-sm">{t('cases:decisions.trigger_object')}</span>
46+
<span className="p-v2-sm">{t('cases:decisions.rule_hits')}</span>
4747
</div>
4848
{decisions.map((decision) => {
4949
const triggerObjectOptions = dataModelWithTableOptions.find(

packages/app-builder/src/components/Cases/CaseDetails.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ export const CaseDetails = ({
7979
return (
8080
<div
8181
ref={containerRef}
82-
className="relative flex w-full min-w-0 flex-col gap-l overflow-y-scroll bg-white pb-l"
82+
className="relative flex w-full min-w-0 flex-col gap-v2-lg overflow-y-scroll bg-white pb-v2-lg"
8383
>
8484
<div ref={sentinelRef} className="absolute left-0 top-0" />
8585
<div
86-
className={cn('bg-inherit sticky top-0 z-10 flex flex-col gap-4 px-l pt-l', {
86+
className={cn('bg-inherit sticky top-0 z-10 flex flex-col gap-4 px-v2-lg pt-v2-lg', {
8787
'border-b-grey-90 border-b': !intersection?.isIntersecting,
8888
})}
8989
>
90-
<div className="flex shrink-0 justify-between gap-xs">
90+
<div className="flex shrink-0 justify-between gap-v2-xs">
9191
<EditCaseName name={detail.name} id={detail.id} />
9292
<div className="flex shrink-0 items-center gap-2">
9393
{detail.status !== 'closed' ? (
@@ -131,11 +131,11 @@ export const CaseDetails = ({
131131
) : null}
132132
</div>
133133

134-
<div className="px-l flex flex-col gap-l">
134+
<div className="px-v2-lg flex flex-col gap-v2-lg">
135135
{selectedTab === 'caseDetails' ? (
136136
<>
137137
{/* Case details */}
138-
<div className="border-grey-90 text-small flex flex-col gap-2 border p-md bg-grey-background-light rounded-v2-lg">
138+
<div className="border-grey-90 text-small flex flex-col gap-2 border p-v2-md bg-grey-background-light rounded-v2-lg">
139139
<div className="grid grid-cols-[170px_1fr] items-center">
140140
<span className="text-grey-50 font-normal">{t('cases:case.status')}</span>
141141
<CaseStatusBadge status={detail.status} outcome={detail.outcome} />
@@ -212,7 +212,7 @@ export const CaseDetails = ({
212212
</UploadFile> */}
213213
</div>
214214

215-
<div className="border-grey-90 bg-grey-100 flex flex-wrap gap-sm rounded-v2-lg border p-md">
215+
<div className="border-grey-90 bg-grey-100 flex flex-wrap gap-v2-sm rounded-v2-lg border p-v2-md">
216216
{detail.files.map((file) => (
217217
<CaseFile key={file.id} file={file} />
218218
))}

packages/app-builder/src/components/DataModelExplorer/DataModelExplorer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function DataModelExplorerTab(props: {
183183
<button
184184
aria-current={props.current}
185185
type="button"
186-
className="group/tab text-default text-grey-50 aria-current:bg-purple-96 aria-current:text-purple-65 relative inline-flex items-center gap-2 rounded-v2-md px-sm py-xs"
186+
className="group/tab text-default text-grey-50 aria-current:bg-purple-96 aria-current:text-purple-65 relative inline-flex items-center gap-2 rounded-v2-md px-v2-sm py-v2-xs"
187187
onClick={props.onClick}
188188
>
189189
{props.label}

packages/app-builder/src/components/DataModelExplorer/DataTableRender.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ export function DataTableRender({ caseId, dataModel, item, navigateTo }: DataTab
7272
{sourceTableModel ? (
7373
<div className="flex flex-col gap-2">
7474
<span className="text-s font-semibold">{item.sourceTableName}</span>
75-
<div className="bg-grey-background-light border border-grey-border rounded-v2-md p-sm">
75+
<div className="bg-grey-background-light border border-grey-border rounded-v2-md p-v2-sm">
7676
<ClientObjectDataList tableModel={sourceTableModel} data={item.sourceObject} />
7777
</div>
7878
</div>
7979
) : null}
8080
{filterFieldValue !== item.pivotObject.pivotValue && pivotTableModel ? (
8181
<div className="col-start-2 flex flex-col gap-2">
8282
<span className="text-s font-semibold">{item.pivotObject.pivotObjectName}</span>
83-
<div className="bg-grey-background-light border border-grey-border rounded-v2-md p-sm">
83+
<div className="bg-grey-background-light border border-grey-border rounded-v2-md p-v2-sm">
8484
<ClientObjectDataList
8585
tableModel={pivotTableModel}
8686
data={item.sourceObject}

packages/app-builder/src/components/Page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function PageHeader({ className, children, ...props }: React.ComponentProps<'div
3232
return (
3333
<div
3434
className={cn(
35-
'border-b-grey-90 bg-grey-100 text-l text-grey-00 relative flex shrink-0 flex-row items-center border-b font-bold px-md',
35+
'border-b-grey-90 bg-grey-100 text-l text-grey-00 relative flex shrink-0 flex-row items-center border-b font-bold px-v2-md',
3636
headerHeight({ type: 'height' }),
3737
className,
3838
)}
@@ -88,7 +88,7 @@ function PageContent({ className, ...props }: React.ComponentProps<'div'>) {
8888
);
8989
}
9090

91-
const PageContentV2ClassName = cva('flex flex-1 flex-col p-l text-default', {
91+
const PageContentV2ClassName = cva('flex flex-1 flex-col p-v2-lg text-default', {
9292
variants: {
9393
centered: {
9494
true: 'mx-auto',

packages/app-builder/src/components/Scenario/TriggerObjectTag.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface TriggerObjectTagProps {
99
export function TriggerObjectTag({ children }: TriggerObjectTagProps) {
1010
const { t } = useTranslation(['scenarios']);
1111
return (
12-
<div className="text-s bg-purple-98 text-purple-65 flex items-center gap-2 rounded-v2-md py-xs px-sm font-normal">
12+
<div className="text-s bg-purple-98 text-purple-65 flex items-center gap-2 rounded-v2-md py-v2-xs px-v2-sm font-normal">
1313
{children}
1414

1515
<Ariakit.HovercardProvider showTimeout={0} hideTimeout={0} placement="bottom">

0 commit comments

Comments
 (0)