Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix(nc-gui): update nc table

Ramesh Mane1d4f72a97d8f
diff --git a/packages/nc-gui/assets/css/variables.css b/packages/nc-gui/assets/css/variables.css
index 79a55b0a32..c974b6ef55 100644
--- a/packages/nc-gui/assets/css/variables.css
+++ b/packages/nc-gui/assets/css/variables.css
@@ -166,7 +166,7 @@
--color-brand-800: #d9e5ff;
--color-brand-900: #eef4ff;
- --color-grey-50: #eef4ff;
+ --color-grey-50: #1d1d1f;
--color-grey-100: #2a2c2e;
--color-grey-200: #3b3d40;
--color-grey-300: #505257;
diff --git a/packages/nc-gui/components/nc/Menu/ItemCopyId.vue b/packages/nc-gui/components/nc/Menu/ItemCopyId.vue
index aac11748b1..a38cbeb663 100644
--- a/packages/nc-gui/components/nc/Menu/ItemCopyId.vue
+++ b/packages/nc-gui/components/nc/Menu/ItemCopyId.vue
@@ -54,11 +54,11 @@ const onClickCopy = async () => {
</template>
<div
- class="flex flex-row justify-between items-center w-[calc(100%_-_8px)] pl-2 pr-1 py-1 mx-1 rounded-md hover:bg-gray-100 cursor-pointer group transition-colors duration-300"
+ class="flex flex-row justify-between items-center w-[calc(100%_-_8px)] pl-2 pr-1 py-1 mx-1 rounded-md hover:bg-nc-bg-gray-light cursor-pointer group transition-colors duration-300"
@click.stop="onClickCopy"
>
<div class="w-full flex flex-row justify-between items-center gap-x-2 font-bold text-xs">
- <div class="flex flex-row text-gray-600 text-xs items-baseline gap-x-1 font-bold whitespace-nowrap">
+ <div class="flex flex-row text-nc-content-gray-subtle2 text-xs items-baseline gap-x-1 font-bold whitespace-nowrap">
<slot v-if="$slots.label" name="label"></slot>
<template v-else-if="label">
{{ label }}
@@ -67,7 +67,7 @@ const onClickCopy = async () => {
{{ id }}
</template>
</div>
- <NcButton size="xsmall" type="secondary" class="!group-hover:bg-gray-100">
+ <NcButton size="xsmall" type="secondary" class="!group-hover:bg-nc-bg-gray-light">
<div class="flex children:flex-none relative h-4 w-4">
<Transition name="icon-fade" :duration="200">
<GeneralIcon v-if="isCopied" icon="check" class="h-4 w-4 opacity-80" />
diff --git a/packages/nc-gui/components/nc/Table.vue b/packages/nc-gui/components/nc/Table.vue
index 658b02fedf..8e3eddf9ae 100644
--- a/packages/nc-gui/components/nc/Table.vue
+++ b/packages/nc-gui/components/nc/Table.vue
@@ -272,9 +272,9 @@ watch(
`${headerCellClassName}`,
`nc-table-header-cell-${index}`,
{
- '!hover:bg-gray-100 select-none cursor-pointer': col.showOrderBy,
+ '!hover:bg-nc-bg-gray-light select-none cursor-pointer': col.showOrderBy,
'cursor-not-allowed': col.showOrderBy && !data?.length,
- '!text-gray-700': col.showOrderBy && col?.dataIndex && orderBy[col.dataIndex],
+ '!text-nc-content-gray-subtle': col.showOrderBy && col?.dataIndex && orderBy[col.dataIndex],
'flex-1': !col.width && !col.basis,
},
]"
@@ -402,7 +402,7 @@ watch(
<template v-if="slots.tableFooter || showPagination">
<div ref="tableFooterRef">
<slot name="tableFooter">
- <div v-if="showPagination" class="flex flex-row justify-center items-center bg-gray-50 min-h-10">
+ <div v-if="showPagination" class="flex flex-row justify-center items-center bg-nc-bg-gray-extralight min-h-10">
<div class="flex justify-between items-center w-full px-6">
<div>&nbsp;</div>
<NcPagination
@@ -412,7 +412,7 @@ watch(
show-size-changer
:use-stored-page-size="false"
/>
- <div class="text-gray-500 text-xs">
+ <div class="text-nc-content-gray-muted text-xs">
{{ paginationData.totalRows }} {{ paginationData.totalRows === 1 ? 'row' : 'rows' }}
</div>
</div>
@@ -426,7 +426,7 @@ watch(
<style lang="scss" scoped>
.nc-table-container {
&.bordered {
- @apply border-1 border-gray-200 rounded-lg overflow-hidden w-full;
+ @apply border-1 border-nc-border-gray-medium rounded-lg overflow-hidden w-full;
}
&:not(.bordered):not(.nc-disable-table-scroll) {
@@ -439,12 +439,12 @@ watch(
&.sticky-first-column {
th {
&:first-of-type {
- @apply bg-gray-50;
+ @apply bg-nc-bg-gray-extralight;
}
}
td {
&:first-of-type {
- @apply bg-white;
+ @apply bg-nc-bg-default;
}
}
@@ -459,7 +459,7 @@ watch(
th,
td {
&:first-of-type {
- @apply !border-gray-200;
+ @apply !border-nc-border-gray-medium;
}
}
}
@@ -468,9 +468,9 @@ watch(
thead {
@apply w-full max-w-full;
th {
- @apply bg-gray-50 text-sm text-gray-500 font-weight-500;
+ @apply bg-nc-bg-gray-extralight text-sm text-nc-content-gray-muted font-weight-500;
&.cell-title {
- @apply sticky left-0 z-4 bg-gray-50;
+ @apply sticky left-0 z-4 bg-nc-bg-gray-extralight;
}
}
}
@@ -483,7 +483,7 @@ watch(
}
td {
- @apply text-sm text-gray-600;
+ @apply text-sm text-nc-content-gray-subtle2;
}
}
}
@@ -491,7 +491,7 @@ watch(
@apply flex w-full max-w-full;
&:not(.nc-table-extra-row) {
- @apply border-b-1 border-gray-200;
+ @apply border-b-1 border-nc-border-gray-medium;
}
&.no-border-last:not(.nc-table-extra-row):last-child {
@@ -499,11 +499,11 @@ watch(
}
&.selected td {
- @apply !bg-[#F0F3FF];
+ @apply !bg-nc-bg-brand;
}
&:not(.selected):hover td {
- @apply !bg-gray-50;
+ @apply !bg-nc-bg-gray-extralight;
}
th,