@veritree/ui 0.19.2-2 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/nuxt.js CHANGED
@@ -1,30 +1,26 @@
1
- import { defineNuxtModule } from '@nuxt/kit';
2
- import { fileURLToPath } from 'node:url';
1
+ import { join } from 'path';
3
2
 
4
3
  const components = [
5
- './src/components/Alert',
6
- './src/components/Avatar',
7
- './src/components/Button',
8
- './src/components/Drawer',
9
- './src/components/Dialog',
10
- './src/components/Disclosure',
11
- './src/components/DropdownMenu',
12
- './src/components/Form',
13
- './src/components/Listbox',
14
- './src/components/Image',
15
- './src/components/Popover',
16
- './src/components/ProgressBar',
17
- './src/components/Tabs',
18
- ];
4
+ 'src/components/Alert',
5
+ 'src/components/Avatar',
6
+ 'src/components/Button',
7
+ 'src/components/Drawer',
8
+ 'src/components/Dialog',
9
+ 'src/components/Disclosure',
10
+ 'src/components/DropdownMenu',
11
+ 'src/components/Form',
12
+ 'src/components/Listbox',
13
+ 'src/components/Image',
14
+ 'src/components/Popover',
15
+ 'src/components/ProgressBar',
16
+ 'src/components/Tabs',
17
+ ]
19
18
 
20
- export default defineNuxtModule({
21
- hooks: {
22
- 'components:dirs'(dirs) {
23
- components.forEach((component) => {
24
- dirs.push({
25
- path: fileURLToPath(new URL(component, import.meta.url)),
26
- });
27
- });
28
- },
29
- },
30
- });
19
+ export default function () {
20
+ this.nuxt.hook('components:dirs', dirs => {
21
+ // Add ./components dir to the list
22
+ components.forEach((component) => {
23
+ dirs.push(join(__dirname, component))
24
+ });
25
+ })
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritree/ui",
3
- "version": "0.19.2-2",
3
+ "version": "0.20.0",
4
4
  "description": "veritree ui library",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -11,9 +11,8 @@
11
11
  "access": "public"
12
12
  },
13
13
  "dependencies": {
14
- "@veritree/icons": "^0.36.1-0"
14
+ "@linusborg/vue-simple-portal": "^0.1.5",
15
+ "@veritree/icons": "^0.19.0"
15
16
  },
16
- "devDependencies": {
17
- "@nuxt/kit": "^3.0.0-rc.12"
18
- }
17
+ "devDependencies": {}
19
18
  }
@@ -37,6 +37,7 @@
37
37
  : 'h-8'
38
38
  : null,
39
39
  ]"
40
+ v-on="$listeners"
40
41
  >
41
42
  <VTSpinner v-if="busy" class="absolute inset-0 m-auto" />
42
43
  <span
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Teleport to="body">
2
+ <Portal>
3
3
  <div
4
4
  v-if="visible"
5
5
  :id="id"
@@ -12,10 +12,11 @@
12
12
  >
13
13
  <slot></slot>
14
14
  </div>
15
- </Teleport>
15
+ </Portal>
16
16
  </template>
17
17
 
18
18
  <script>
19
+ import { Portal } from '@linusborg/vue-simple-portal';
19
20
  import { genId } from '../../utils/ids';
20
21
 
21
22
  export default {
@@ -10,7 +10,7 @@
10
10
  </template>
11
11
 
12
12
  <script>
13
- import { genId } from '@/utils/ids';
13
+ import { genId } from '../../utils/ids';
14
14
 
15
15
  export default {
16
16
  name: 'VTDisclosureDetails',
@@ -1,21 +1,28 @@
1
1
  <template>
2
- <div
3
- v-if="visible"
4
- :id="id"
5
- :class="{ Drawer: headless, 'fixed inset-0 z-50 h-screen': !headless }"
6
- aria-modal="true"
7
- @click="onClick"
8
- >
9
- <slot></slot>
10
- </div>
2
+ <Portal>
3
+ <div
4
+ v-if="visible"
5
+ :id="id"
6
+ :class="{ Drawer: headless, 'fixed inset-0 z-50 h-screen': !headless }"
7
+ aria-modal="true"
8
+ @click="onClick"
9
+ >
10
+ <slot></slot>
11
+ </div>
12
+ </Portal>
11
13
  </template>
12
14
 
13
15
  <script>
16
+ import { Portal } from '@linusborg/vue-simple-portal';
14
17
  import { genId } from '../../utils/ids';
15
18
 
16
19
  export default {
17
20
  name: 'VTDrawer',
18
21
 
22
+ components: {
23
+ Portal,
24
+ },
25
+
19
26
  provide() {
20
27
  return {
21
28
  api: () => {
@@ -12,15 +12,15 @@
12
12
  </template>
13
13
 
14
14
  <script>
15
- import { IconLeft } from "@veritree/icons";
16
- import VTButton from "../Button/VTButton.vue";
15
+ import { IconLeft } from '@veritree/icons';
16
+ import VTButton from '../Button/VTButton.vue';
17
17
 
18
18
  export default {
19
- name: "VTDrawerClose",
19
+ name: 'VTDrawerClose',
20
20
 
21
21
  components: { IconLeft, VTButton },
22
22
 
23
- inject: ["api"],
23
+ inject: ['api'],
24
24
 
25
25
  computed: {
26
26
  dark() {
@@ -37,7 +37,7 @@ export default {
37
37
 
38
38
  // temporary till button theme is implemented
39
39
  theme() {
40
- return this.dark ? "dark" : null;
40
+ return this.dark ? 'dark' : null;
41
41
  },
42
42
  },
43
43