From 99bc4ca7a6a135f9039be12a35c44e6d613cd095 Mon Sep 17 00:00:00 2001 From: RainbowBird Date: Wed, 30 Apr 2025 17:08:56 +0800 Subject: [PATCH] feat(story): new select component with floating-vue (#151) --- .../components/Form/Select/Select.story.vue | 66 +++++++++++ packages/ui/package.json | 1 + .../ui/src/components/Form/Select/Select.vue | 112 +++++++++++------- pnpm-lock.yaml | 36 ++++++ 4 files changed, 172 insertions(+), 43 deletions(-) create mode 100644 packages/stage-ui/src/components/Form/Select/Select.story.vue diff --git a/packages/stage-ui/src/components/Form/Select/Select.story.vue b/packages/stage-ui/src/components/Form/Select/Select.story.vue new file mode 100644 index 000000000..1476e4311 --- /dev/null +++ b/packages/stage-ui/src/components/Form/Select/Select.story.vue @@ -0,0 +1,66 @@ + + + diff --git a/packages/ui/package.json b/packages/ui/package.json index c7e5a7b68..497c28fcd 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -36,6 +36,7 @@ }, "dependencies": { "@vueuse/core": "^13.1.0", + "floating-vue": "^5.2.2", "reka-ui": "^2.2.0", "vue": "^3.5.13" }, diff --git a/packages/ui/src/components/Form/Select/Select.vue b/packages/ui/src/components/Form/Select/Select.vue index 94c30870e..c47a9e3b4 100644 --- a/packages/ui/src/components/Form/Select/Select.vue +++ b/packages/ui/src/components/Form/Select/Select.vue @@ -1,6 +1,6 @@ + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 50a5ddea3..1d30d9426 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1014,6 +1014,9 @@ importers: '@vueuse/core': specifier: ^13.1.0 version: 13.1.0(vue@3.5.13(typescript@5.8.3)) + floating-vue: + specifier: ^5.2.2 + version: 5.2.2(@nuxt/kit@3.14.1592(magicast@0.3.5)(rollup@4.40.0))(vue@3.5.13(typescript@5.8.3)) reka-ui: specifier: ^2.2.0 version: 2.2.0(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3)) @@ -2692,6 +2695,9 @@ packages: '@floating-ui/core@1.6.8': resolution: {integrity: sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==} + '@floating-ui/dom@1.1.1': + resolution: {integrity: sha512-TpIO93+DIujg3g7SykEAGZMDtbJRrmnYRCNYSjJlvIbGhBjRSNTLVbNeDQBrzy9qDgUbiWdc7KA0uZHZ2tJmiw==} + '@floating-ui/dom@1.6.13': resolution: {integrity: sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==} @@ -7173,6 +7179,15 @@ packages: resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==} engines: {node: '>=8'} + floating-vue@5.2.2: + resolution: {integrity: sha512-afW+h2CFafo+7Y9Lvw/xsqjaQlKLdJV7h1fCHfcYQ1C4SVMlu7OAekqWgu5d4SgvkBVU0pVpLlVsrSTBURFRkg==} + peerDependencies: + '@nuxt/kit': ^3.2.0 + vue: ^3.2.0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + fluent-ffmpeg@2.1.3: resolution: {integrity: sha512-Be3narBNt2s6bsaqP6Jzq91heDgOEaDCJAXcE3qcma/EJBSy5FB4cvO31XBInuAuKBx8Kptf8dkhjK0IOru39Q==} engines: {node: '>=18'} @@ -11330,6 +11345,11 @@ packages: peerDependencies: vue: ^3.0.0 + vue-resize@2.0.0-alpha.1: + resolution: {integrity: sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg==} + peerDependencies: + vue: ^3.0.0 + vue-router@4.5.1: resolution: {integrity: sha512-ogAF3P97NPm8fJsE4by9dwSYtDwXIY1nFY9T6DyQnGHd1E2Da94w9JIolpe42LJGIl0DwOHBi8TcRPlPGwbTtw==} peerDependencies: @@ -13279,6 +13299,10 @@ snapshots: dependencies: '@floating-ui/utils': 0.2.9 + '@floating-ui/dom@1.1.1': + dependencies: + '@floating-ui/core': 1.6.8 + '@floating-ui/dom@1.6.13': dependencies: '@floating-ui/core': 1.6.8 @@ -18628,6 +18652,14 @@ snapshots: flattie@1.1.1: {} + floating-vue@5.2.2(@nuxt/kit@3.14.1592(magicast@0.3.5)(rollup@4.40.0))(vue@3.5.13(typescript@5.8.3)): + dependencies: + '@floating-ui/dom': 1.1.1 + vue: 3.5.13(typescript@5.8.3) + vue-resize: 2.0.0-alpha.1(vue@3.5.13(typescript@5.8.3)) + optionalDependencies: + '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.40.0) + fluent-ffmpeg@2.1.3: dependencies: async: 0.2.10 @@ -24102,6 +24134,10 @@ snapshots: '@vue/devtools-api': 6.6.4 vue: 3.5.13(typescript@5.8.3) + vue-resize@2.0.0-alpha.1(vue@3.5.13(typescript@5.8.3)): + dependencies: + vue: 3.5.13(typescript@5.8.3) + vue-router@4.5.1(vue@3.5.13(typescript@5.8.3)): dependencies: '@vue/devtools-api': 6.6.4