Skip to content

Commit

Permalink
chore: Remove unused imports and update tooltip styles
Browse files Browse the repository at this point in the history
  • Loading branch information
maksimzinchuk committed Jun 4, 2024
1 parent a4f820c commit 10eb268
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
3 changes: 1 addition & 2 deletions framework/shared/modules/dynamic/components/fields/Table.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { useTableTemplates } from "./../../composables";
import { Component, ExtractPropTypes, computed, h, inject, isRef, nextTick, toValue, unref } from "vue";
import { Component, ExtractPropTypes, computed, h, inject, toValue, unref } from "vue";
import { Table } from "../factories";
import componentProps from "./props";
import { TableSchema } from "../../types";
import { useI18n } from "vue-i18n";
import { unrefNested } from "../../helpers/unrefNested";
import { setModel } from "../../helpers/setters";
import { safeIn } from "../../helpers/safeIn";
import { IActionBuilderResult, ITableColumns } from "../../../../../core/types";

type TableItemData<T> = {
Expand Down
20 changes: 11 additions & 9 deletions framework/ui/components/atoms/vc-tooltip/vc-tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
v-if="tooltipVisible"
ref="tooltipRef"
:style="floatingStyles"
class="tw-absolute tw-z-[101] tw-bg-white tw-border tw-border-solid tw-border-[color:#eef0f2] tw-shadow-[1px_1px_8px_rgba(126,142,157,0.25)] tw-rounded-[3px] tw-text-[color:#8e9daa] tw-font-normal tw-py-1 tw-px-2 tw-ml-4"
class="tw-absolute tw-z-[101] tw-bg-white tw-border tw-border-solid tw-border-[color:#eef0f2] tw-shadow-[1px_1px_8px_rgba(126,142,157,0.25)] tw-rounded-[3px] tw-text-[color:#8e9daa] tw-font-normal tw-py-1 tw-px-2"
>
<slot name="tooltip"></slot>
</span>
Expand All @@ -23,14 +23,22 @@
</template>

<script lang="ts" setup>
import { useFloating, shift, Placement, offset } from "@floating-ui/vue";
import { useFloating, shift, Placement, offset as floatingOffset } from "@floating-ui/vue";
import { ref } from "vue";
export interface Props {
placement?: Placement;
offset?: {
crossAxis?: number;
mainAxis?: number;
};
}
const props = withDefaults(defineProps<Props>(), {
placement: "bottom-end",
offset: () => ({
crossAxis: 5,
mainAxis: 5,
}),
});
defineSlots<{
Expand All @@ -44,13 +52,7 @@ const tooltipRef = ref<HTMLElement | null>(null);
const { floatingStyles } = useFloating(tooltipCompRef, tooltipRef, {
placement: props.placement,
middleware: [
offset({
crossAxis: 5,
mainAxis: 5,
}),
shift(),
],
middleware: [floatingOffset(props.offset), shift()],
});
</script>

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4754,17 +4754,17 @@ __metadata:
languageName: unknown
linkType: soft

"@vcmp-vendor-portal/api@npm:^1.0.230, @vcmp-vendor-portal/api@workspace:apps/vendor-portal/src/api_client":
"@vcmp-vendor-portal/api@npm:^1.0.231, @vcmp-vendor-portal/api@workspace:apps/vendor-portal/src/api_client":
version: 0.0.0-use.local
resolution: "@vcmp-vendor-portal/api@workspace:apps/vendor-portal/src/api_client"
languageName: unknown
linkType: soft

"@vcmp-vendor-portal/modules@npm:^1.0.230, @vcmp-vendor-portal/modules@workspace:apps/vendor-portal/src/modules":
"@vcmp-vendor-portal/modules@npm:^1.0.231, @vcmp-vendor-portal/modules@workspace:apps/vendor-portal/src/modules":
version: 0.0.0-use.local
resolution: "@vcmp-vendor-portal/modules@workspace:apps/vendor-portal/src/modules"
peerDependencies:
"@vcmp-vendor-portal/api": ^1.0.230
"@vcmp-vendor-portal/api": ^1.0.231
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -5470,8 +5470,8 @@ __metadata:
"@vc-shell/framework": "npm:^1.0.225"
"@vc-shell/release-config": "npm:^1.0.225"
"@vc-shell/ts-config": "npm:^1.0.225"
"@vcmp-vendor-portal/api": "npm:^1.0.230"
"@vcmp-vendor-portal/modules": "npm:^1.0.230"
"@vcmp-vendor-portal/api": "npm:^1.0.231"
"@vcmp-vendor-portal/modules": "npm:^1.0.231"
"@virtocommerce/import-app": "npm:^1.0.158"
"@vitejs/plugin-vue": "npm:^5.0.3"
"@vue/eslint-config-prettier": "npm:^9.0.0"
Expand Down

0 comments on commit 10eb268

Please sign in to comment.