diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index a718c90..0694053 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -1,15 +1,15 @@
/* eslint-env node */
-require("@rushstack/eslint-patch/modern-module-resolution");
+require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
- "root": true,
- "extends": [
- "plugin:vue/vue3-essential",
- "eslint:recommended",
- "@vue/eslint-config-typescript/recommended",
- "@vue/eslint-config-prettier"
+ root: true,
+ extends: [
+ 'plugin:vue/vue3-essential',
+ 'eslint:recommended',
+ '@vue/eslint-config-typescript/recommended',
+ '@vue/eslint-config-prettier',
],
- "env": {
- "vue/setup-compiler-macros": true
- }
+ env: {
+ 'vue/setup-compiler-macros': true,
+ },
}
diff --git a/docs/app.vue b/docs/app.vue
index 920c29f..c9bbf05 100644
--- a/docs/app.vue
+++ b/docs/app.vue
@@ -1,19 +1,17 @@
diff --git a/docs/components/ApplicationHeader.vue b/docs/components/ApplicationHeader.vue
index e104542..ca1a6fb 100644
--- a/docs/components/ApplicationHeader.vue
+++ b/docs/components/ApplicationHeader.vue
@@ -1,11 +1,11 @@
diff --git a/docs/components/Button.vue b/docs/components/Button.vue
index 1ea3fb6..1f0cf08 100644
--- a/docs/components/Button.vue
+++ b/docs/components/Button.vue
@@ -1,29 +1,29 @@
diff --git a/docs/components/Hero.vue b/docs/components/Hero.vue
index db5ed3e..0cfd4c3 100644
--- a/docs/components/Hero.vue
+++ b/docs/components/Hero.vue
@@ -1,6 +1,6 @@
diff --git a/docs/components/PageContent.vue b/docs/components/PageContent.vue
index ecb0f68..b1d5bb5 100644
--- a/docs/components/PageContent.vue
+++ b/docs/components/PageContent.vue
@@ -1,7 +1,7 @@
diff --git a/docs/components/PageContentHeader.vue b/docs/components/PageContentHeader.vue
index b75e5d9..ada1dd5 100644
--- a/docs/components/PageContentHeader.vue
+++ b/docs/components/PageContentHeader.vue
@@ -1,7 +1,7 @@
diff --git a/docs/components/PageTableOfContents.vue b/docs/components/PageTableOfContents.vue
index 404ced1..b657937 100644
--- a/docs/components/PageTableOfContents.vue
+++ b/docs/components/PageTableOfContents.vue
@@ -1,8 +1,8 @@
diff --git a/docs/components/SidebarNavigation.vue b/docs/components/SidebarNavigation.vue
index 79cb2e4..3b8a28b 100644
--- a/docs/components/SidebarNavigation.vue
+++ b/docs/components/SidebarNavigation.vue
@@ -1,67 +1,67 @@
diff --git a/docs/components/ThemeSwitcher.vue b/docs/components/ThemeSwitcher.vue
index f005349..1081f45 100644
--- a/docs/components/ThemeSwitcher.vue
+++ b/docs/components/ThemeSwitcher.vue
@@ -5,18 +5,18 @@ import {
ListboxLabel,
ListboxOption,
ListboxOptions,
-} from "@headlessui/vue";
-import LightIcon from "~/components/icons/LightIcon.vue";
-import DarkIcon from "~/components/icons/DarkIcon.vue";
-import SystemIcon from "~/components/icons/SystemIcon.vue";
+} from '@headlessui/vue'
+import LightIcon from '~/components/icons/LightIcon.vue'
+import DarkIcon from '~/components/icons/DarkIcon.vue'
+import SystemIcon from '~/components/icons/SystemIcon.vue'
const themes = [
- { name: "Light", value: "light", icon: LightIcon },
- { name: "Dark", value: "dark", icon: DarkIcon },
- { name: "System", value: "system", icon: SystemIcon },
-];
+ { name: 'Light', value: 'light', icon: LightIcon },
+ { name: 'Dark', value: 'dark', icon: DarkIcon },
+ { name: 'System', value: 'system', icon: SystemIcon },
+]
-const colorMode = useColorMode();
+const colorMode = useColorMode()
diff --git a/docs/components/TimelineSvg.vue b/docs/components/TimelineSvg.vue
index bd315ca..251982f 100644
--- a/docs/components/TimelineSvg.vue
+++ b/docs/components/TimelineSvg.vue
@@ -181,6 +181,6 @@
diff --git a/docs/components/content/Callout.vue b/docs/components/content/Callout.vue
index cf9e648..22d239e 100644
--- a/docs/components/content/Callout.vue
+++ b/docs/components/content/Callout.vue
@@ -1,32 +1,32 @@
diff --git a/docs/components/content/ProseH2.vue b/docs/components/content/ProseH2.vue
index faae5c2..712cf61 100644
--- a/docs/components/content/ProseH2.vue
+++ b/docs/components/content/ProseH2.vue
@@ -3,5 +3,5 @@
diff --git a/docs/components/content/ProseH3.vue b/docs/components/content/ProseH3.vue
index 4df572d..3070574 100644
--- a/docs/components/content/ProseH3.vue
+++ b/docs/components/content/ProseH3.vue
@@ -3,5 +3,5 @@
diff --git a/docs/components/content/ProseH4.vue b/docs/components/content/ProseH4.vue
index 8271d58..67330e5 100644
--- a/docs/components/content/ProseH4.vue
+++ b/docs/components/content/ProseH4.vue
@@ -3,5 +3,5 @@
diff --git a/docs/components/content/ProseH5.vue b/docs/components/content/ProseH5.vue
index 92f03e7..18d8e0d 100644
--- a/docs/components/content/ProseH5.vue
+++ b/docs/components/content/ProseH5.vue
@@ -3,5 +3,5 @@
diff --git a/docs/components/content/ProseH6.vue b/docs/components/content/ProseH6.vue
index cdc631b..e1b4804 100644
--- a/docs/components/content/ProseH6.vue
+++ b/docs/components/content/ProseH6.vue
@@ -3,5 +3,5 @@
diff --git a/docs/components/content/QuickLink.vue b/docs/components/content/QuickLink.vue
index 3c96cd2..4159ec6 100644
--- a/docs/components/content/QuickLink.vue
+++ b/docs/components/content/QuickLink.vue
@@ -1,9 +1,9 @@
diff --git a/docs/nuxt.config.ts b/docs/nuxt.config.ts
index 50fdf18..2be5418 100644
--- a/docs/nuxt.config.ts
+++ b/docs/nuxt.config.ts
@@ -1,13 +1,14 @@
-import { defineNuxtConfig } from "nuxt";
+import { defineNuxtConfig } from 'nuxt'
+import { fileURLToPath, URL } from 'url'
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
- css: ["~/assets/styles/fonts.css"],
+ css: ['~/assets/styles/fonts.css'],
- modules: ["@nuxtjs/tailwindcss", "@nuxtjs/color-mode", "@nuxt/content"],
+ modules: ['@nuxtjs/tailwindcss', '@nuxtjs/color-mode', '@nuxt/content'],
// https://color-mode.nuxtjs.org/
- colorMode: { classSuffix: "" },
+ colorMode: { classSuffix: '' },
// https://content.nuxtjs.org/api/configuration
content: {
@@ -16,8 +17,8 @@ export default defineNuxtConfig({
// https://content.nuxtjs.org/api/configuration/#highlighttheme
highlight: {
theme: {
- default: "one-dark-pro",
- dark: "github-dark",
+ default: 'one-dark-pro',
+ dark: 'github-dark',
// sepia: "monokai",
},
},
@@ -25,13 +26,23 @@ export default defineNuxtConfig({
markdown: {
remarkPlugins: {},
rehypePlugins: {
- "rehype-autolink-headings": false,
+ 'rehype-autolink-headings': false,
+ },
+ },
+ },
+
+ vite: {
+ resolve: {
+ alias: {
+ 'vue-select': fileURLToPath(
+ new URL('../src/index.js', import.meta.url)
+ ),
},
},
},
build: {
- extractCSS: true,
- transpile: ["@headlessui/vue"],
+ // @see https://github.com/tailwindlabs/headlessui/discussions/1545#discussioncomment-2871517
+ transpile: ['@headlessui/vue'],
},
-});
+})
diff --git a/docs/tailwind.config.js b/docs/tailwind.config.js
index dfc4cc0..25e95c6 100644
--- a/docs/tailwind.config.js
+++ b/docs/tailwind.config.js
@@ -1,34 +1,34 @@
-const defaultTheme = require("tailwindcss/defaultTheme");
+const defaultTheme = require('tailwindcss/defaultTheme')
/** @type {import('tailwindcss').Config} */
module.exports = {
- content: ["./pages/**/*.{js,vue}", "app.vue"],
- darkMode: "class",
+ content: ['./pages/**/*.{js,vue}', 'app.vue'],
+ darkMode: 'class',
theme: {
fontSize: {
- xs: ["0.75rem", { lineHeight: "1rem" }],
- sm: ["0.875rem", { lineHeight: "1.5rem" }],
- base: ["1rem", { lineHeight: "2rem" }],
- lg: ["1.125rem", { lineHeight: "1.75rem" }],
- xl: ["1.25rem", { lineHeight: "2rem" }],
- "2xl": ["1.5rem", { lineHeight: "2.5rem" }],
- "3xl": ["2rem", { lineHeight: "2.5rem" }],
- "4xl": ["2.5rem", { lineHeight: "3rem" }],
- "5xl": ["3rem", { lineHeight: "3.5rem" }],
- "6xl": ["3.75rem", { lineHeight: "1" }],
- "7xl": ["4.5rem", { lineHeight: "1" }],
- "8xl": ["6rem", { lineHeight: "1" }],
- "9xl": ["8rem", { lineHeight: "1" }],
+ xs: ['0.75rem', { lineHeight: '1rem' }],
+ sm: ['0.875rem', { lineHeight: '1.5rem' }],
+ base: ['1rem', { lineHeight: '2rem' }],
+ lg: ['1.125rem', { lineHeight: '1.75rem' }],
+ xl: ['1.25rem', { lineHeight: '2rem' }],
+ '2xl': ['1.5rem', { lineHeight: '2.5rem' }],
+ '3xl': ['2rem', { lineHeight: '2.5rem' }],
+ '4xl': ['2.5rem', { lineHeight: '3rem' }],
+ '5xl': ['3rem', { lineHeight: '3.5rem' }],
+ '6xl': ['3.75rem', { lineHeight: '1' }],
+ '7xl': ['4.5rem', { lineHeight: '1' }],
+ '8xl': ['6rem', { lineHeight: '1' }],
+ '9xl': ['8rem', { lineHeight: '1' }],
},
extend: {
fontFamily: {
- sans: ["Inter", ...defaultTheme.fontFamily.sans],
- display: ["Lexend", ...defaultTheme.fontFamily.sans],
+ sans: ['Inter', ...defaultTheme.fontFamily.sans],
+ display: ['Lexend', ...defaultTheme.fontFamily.sans],
},
maxWidth: {
- "8xl": "88rem",
+ '8xl': '88rem',
},
},
},
- plugins: [require("@tailwindcss/typography")],
-};
+ plugins: [require('@tailwindcss/typography')],
+}
diff --git a/package.json b/package.json
index 27de937..c6d23d8 100644
--- a/package.json
+++ b/package.json
@@ -23,8 +23,8 @@
"license": "MIT",
"prepare": "npm run build",
"scripts": {
- "dev:docs": "cd docs && yarn serve",
- "build:docs": "cd docs && yarn build",
+ "dev:docs": "cd docs && yarn dev",
+ "build:docs": "cd docs && yarn generate",
"semantic-release": "semantic-release",
"commit": "git-cz",
"dev": "vite",
diff --git a/src/directives/appendToBody.js b/src/directives/appendToBody.js
index 514e144..c6c3752 100644
--- a/src/directives/appendToBody.js
+++ b/src/directives/appendToBody.js
@@ -1,14 +1,10 @@
export default {
mounted(el, { instance }) {
if (instance.appendToBody) {
- const {
- height,
- top,
- left,
- width,
- } = instance.$refs.toggle.getBoundingClientRect()
- let scrollX = window.scrollX || window.pageXOffset
- let scrollY = window.scrollY || window.pageYOffset
+ const { height, top, left, width } =
+ instance.$refs.toggle.getBoundingClientRect()
+ const scrollX = window.scrollX || window.pageXOffset
+ const scrollY = window.scrollY || window.pageYOffset
el.unbindPosition = instance.calculatePosition(el, instance, {
width: width + 'px',
left: scrollX + left + 'px',
diff --git a/vite.config.ts b/vite.config.ts
index 38821d4..68db98d 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -6,37 +6,37 @@ import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
- plugins: [vue()],
- publicDir: false,
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url)),
- '@tests': fileURLToPath(new URL('./tests', import.meta.url)),
- },
+ plugins: [vue()],
+ publicDir: false,
+ resolve: {
+ alias: {
+ '@': fileURLToPath(new URL('./src', import.meta.url)),
+ '@tests': fileURLToPath(new URL('./tests', import.meta.url)),
},
- build: {
- target: 'es2015',
- lib: {
- entry: resolve(__dirname, 'src/index.js'),
- name: 'vue-select',
- fileName: (format) => `vue-select.${format}.js`,
- },
- rollupOptions: {
- external: ['vue'],
- output: {
- globals: { vue: 'Vue' },
- assetFileNames(chunk): string {
- if (chunk.name === 'style.css') {
- return 'vue-select.css'
- }
- return chunk.name || ''
- },
- },
- },
+ },
+ build: {
+ target: 'es2015',
+ lib: {
+ entry: resolve(__dirname, 'src/index.js'),
+ name: 'vue-select',
+ fileName: (format) => `vue-select.${format}.js`,
},
- test: {
- coverage: {
- reporter: ['lcov'],
+ rollupOptions: {
+ external: ['vue'],
+ output: {
+ globals: { vue: 'Vue' },
+ assetFileNames(chunk): string {
+ if (chunk.name === 'style.css') {
+ return 'vue-select.css'
+ }
+ return chunk.name || ''
},
+ },
},
+ },
+ test: {
+ coverage: {
+ reporter: ['lcov'],
+ },
+ },
})