Move useCssVariable into ui package

This commit is contained in:
Gregor Vostrak
2026-03-23 19:02:20 +01:00
parent bd3b8f265f
commit b94a04dca0
9 changed files with 8 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ import {
TooltipComponent,
} from 'echarts/components';
import type { AggregatedTimeEntries, Organization } from '@/packages/api/src';
import { useCssVariable } from '@/utils/useCssVariable';
import { useCssVariable } from '@/packages/ui/src';
use([CanvasRenderer, BarChart, TitleComponent, GridComponent, TooltipComponent, LegendComponent]);

View File

@@ -11,7 +11,7 @@ import {
TooltipComponent,
} from 'echarts/components';
import { formatHumanReadableDuration } from '@/packages/ui/src/utils/time';
import { useCssVariable } from '@/utils/useCssVariable';
import { useCssVariable } from '@/packages/ui/src';
import type { Organization } from '@/packages/api/src';
use([CanvasRenderer, PieChart, TitleComponent, GridComponent, TooltipComponent, LegendComponent]);

View File

@@ -20,7 +20,7 @@ import {
getDayJsInstance,
} from '@/packages/ui/src/utils/time';
import chroma from 'chroma-js';
import { useCssVariable } from '@/utils/useCssVariable';
import { useCssVariable } from '@/packages/ui/src';
import { useQuery } from '@tanstack/vue-query';
import { getCurrentOrganizationId } from '@/utils/useUser';
import { api, type Organization } from '@/packages/api/src';

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import VChart from 'vue-echarts';
import { computed } from 'vue';
import { useCssVariable } from '@/utils/useCssVariable';
import { useCssVariable } from '@/packages/ui/src';
const props = defineProps<{
history: number[];

View File

@@ -11,7 +11,7 @@ import {
TooltipComponent,
} from 'echarts/components';
import { formatHumanReadableDuration } from '@/packages/ui/src/utils/time';
import { useCssVariable } from '@/utils/useCssVariable';
import { useCssVariable } from '@/packages/ui/src';
import type { Organization } from '@/packages/api/src';
use([CanvasRenderer, PieChart, TitleComponent, GridComponent, TooltipComponent, LegendComponent]);

View File

@@ -19,7 +19,7 @@ import ThisWeekReportingTable from '@/Components/Dashboard/ThisWeekReportingTabl
import { formatHumanReadableDuration } from '@/packages/ui/src/utils/time';
import { formatCents } from '@/packages/ui/src/utils/money';
import { getWeekStart } from '@/packages/ui/src/utils/settings';
import { useCssVariable } from '@/utils/useCssVariable';
import { useCssVariable } from '@/packages/ui/src';
import { getOrganizationCurrencyString } from '@/utils/money';
import { useQuery } from '@tanstack/vue-query';
import { getCurrentOrganizationId } from '@/utils/useUser';

View File

@@ -11,7 +11,7 @@ import {
onUnmounted,
} from 'vue';
import { useLocalStorage } from '@vueuse/core';
import { useCssVariable } from '@/utils/useCssVariable';
import { useCssVariable } from '../utils/useCssVariable';
import { getLocalizedDayJs } from '../utils/time';
import { LoadingSpinner, TimeEntryCreateModal, TimeEntryEditModal } from '..';
import FullCalendarDayHeader from './FullCalendarDayHeader.vue';

View File

@@ -20,6 +20,7 @@ export type { FieldVariants } from './field/index';
export type { CalendarSettings } from './FullCalendar/calendarSettings';
export type { ActivityPeriod } from './FullCalendar/activityTypes';
export { cn } from './utils/cn';
export { useCssVariable } from './utils/useCssVariable';
import Badge from './Badge.vue';
import Button from './Buttons/Button.vue';