From e28f5946c83904763b222cf9f6c7b56c4720f3e2 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Sat, 15 Jan 2022 00:15:58 +0100 Subject: [PATCH] feat: switch to floating-ui --- packages/demo/src/PageHome.vue | 6 +- packages/demo/src/PageHoverDropdown.vue | 4 +- .../src/.vuepress/components/ArrowPadding.vue | 13 +- .../components/DropdownSimpleExample.vue | 4 +- .../components/MenuSimpleExample.vue | 2 +- .../.vuepress/components/OffsetExample.vue | 8 +- .../src/.vuepress/components/TooltipHtml.vue | 4 +- .../.vuepress/components/TooltipPlacement.vue | 6 +- .../components/theme-editor/Button.vue | 21 +- .../components/theme-editor/ConfigEditor.vue | 223 ++++++-- .../components/theme-editor/ThemeEditor.vue | 2 +- .../components/theme-editor/state.js | 11 +- packages/docs/src/.vuepress/config.js | 8 +- packages/docs/src/api/README.md | 83 ++- packages/docs/src/guide/component.md | 19 - packages/docs/src/guide/config.md | 22 +- packages/docs/src/guide/css.md | 13 +- packages/docs/src/guide/directive.md | 4 +- .../docs/src/migration/migration-from-v2.md | 211 ++++++-- .../docs/src/migration/migration-from-v3.md | 138 +++++ packages/docs/tailwind.config.js | 9 +- packages/floating-vue/package.json | 2 +- .../floating-vue/src/components/Dropdown.vue | 1 - .../floating-vue/src/components/Popper.ts | 481 ++++++++++-------- .../src/components/PopperContent.vue | 35 +- .../src/components/PopperWrapper.vue | 3 +- .../src/components/TooltipDirective.vue | 9 +- packages/floating-vue/src/config.ts | 20 +- .../src/directives/v-tooltip.spec.ts | 6 - .../floating-vue/src/directives/v-tooltip.ts | 4 +- packages/floating-vue/src/index.ts | 2 + packages/floating-vue/src/util/frame.ts | 5 + packages/floating-vue/src/util/popper.ts | 10 + packages/floating-vue/tsconfig.json | 3 +- packages/floating-vue/vite.config.ts | 4 +- yarn.lock | 17 +- 36 files changed, 1002 insertions(+), 411 deletions(-) create mode 100644 packages/docs/src/migration/migration-from-v3.md create mode 100644 packages/floating-vue/src/util/frame.ts diff --git a/packages/demo/src/PageHome.vue b/packages/demo/src/PageHome.vue index 9efce8c6..f8718482 100644 --- a/packages/demo/src/PageHome.vue +++ b/packages/demo/src/PageHome.vue @@ -95,7 +95,7 @@ theme: 'info-tooltip', // Inline override placement, - offset: [0, 100], + distance: 100, ariaId: 'test-id', }" class="tooltip-target b2" @@ -293,7 +293,7 @@