Skip to content

Commit

Permalink
move tooltip placement in a shared package
Browse files Browse the repository at this point in the history
  • Loading branch information
elevatebart committed Jun 23, 2023
1 parent 40ab7c8 commit e2a5148
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 117 deletions.
2 changes: 1 addition & 1 deletion components/Tooltip/vue/Tooltip.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import type { Placement } from '@floating-ui/dom'
import useTooltips from './useTooltip'
import useTooltips from '@cypress-design/place-floating-vue'
import type { Ref } from 'vue'
import { watch, computed, ref, onBeforeMount, onMounted } from 'vue'
Expand Down
2 changes: 1 addition & 1 deletion components/Tooltip/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build:types": "yarn vue-tsc --project ./tsconfig.build.json"
},
"dependencies": {
"@floating-ui/dom": "^1.4.2"
"@cypress-design/place-floating-vue": "*"
},
"devDependencies": {
"@cypress-design/rollup-plugin-tailwind-keep": "*"
Expand Down
107 changes: 0 additions & 107 deletions components/Tooltip/vue/useTooltip.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/place-floating-vue/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Ref, computed, ref } from 'vue'
import { Ref, computed, ref } from 'vue'
import type { Placement, Side } from '@floating-ui/dom'
import { computePosition, flip, offset, arrow } from '@floating-ui/dom'

Expand Down
1 change: 1 addition & 0 deletions packages/place-floating-vue/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ export default {
sourceMap: true,
}),
],
external: ['@floating-ui/dom', 'vue'],
}
7 changes: 0 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1002,13 +1002,6 @@
dependencies:
"@floating-ui/core" "^1.3.1"

"@floating-ui/dom@^1.4.2":
version "1.4.2"
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.4.2.tgz#eb3a37f7506c4f95ef735967dc3496b5012e11cb"
integrity sha512-VKmvHVatWnewmGGy+7Mdy4cTJX71Pli6v/Wjb5RQBuq5wjUYx+Ef+kRThi8qggZqDgD8CogCpqhRoVp3+yQk+g==
dependencies:
"@floating-ui/core" "^1.3.1"

"@floating-ui/react-dom-interactions@^0.6.1":
version "0.6.6"
resolved "https://registry.yarnpkg.com/@floating-ui/react-dom-interactions/-/react-dom-interactions-0.6.6.tgz#8542e8c4bcbee2cd0d512de676c6a493e0a2d168"
Expand Down

0 comments on commit e2a5148

Please sign in to comment.