@1001-digital/components 1.1.8 → 1.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1001-digital/components",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -21,7 +21,7 @@
21
21
  </ComboboxTrigger>
22
22
  </ComboboxAnchor>
23
23
 
24
- <ComboboxPortal>
24
+ <ComboboxPortal v-bind="teleportTarget ? { to: teleportTarget } : {}">
25
25
  <ComboboxContent
26
26
  position="popper"
27
27
  :side-offset="4"
@@ -49,6 +49,7 @@
49
49
  </template>
50
50
 
51
51
  <script setup lang="ts">
52
+ import { inject } from 'vue'
52
53
  import {
53
54
  ComboboxAnchor,
54
55
  ComboboxContent,
@@ -63,6 +64,8 @@ import {
63
64
  } from 'reka-ui'
64
65
  import Icon from './Icon.vue'
65
66
 
67
+ const teleportTarget = inject<HTMLElement | null>('teleport-target', null)
68
+
66
69
  const model = defineModel<string | string[]>()
67
70
  const open = defineModel<boolean>('open', { default: false })
68
71
 
@@ -8,7 +8,7 @@
8
8
  <slot name="trigger" />
9
9
  </DropdownMenuTrigger>
10
10
 
11
- <DropdownMenuPortal>
11
+ <DropdownMenuPortal v-bind="teleportTarget ? { to: teleportTarget } : {}">
12
12
  <DropdownMenuContent
13
13
  class="dropdown"
14
14
  :class="props.class"
@@ -33,6 +33,7 @@
33
33
  </template>
34
34
 
35
35
  <script setup lang="ts">
36
+ import { inject } from 'vue'
36
37
  import {
37
38
  DropdownMenuArrow,
38
39
  DropdownMenuContent,
@@ -41,6 +42,8 @@ import {
41
42
  DropdownMenuTrigger,
42
43
  } from 'reka-ui'
43
44
 
45
+ const teleportTarget = inject<HTMLElement | null>('teleport-target', null)
46
+
44
47
  const props = withDefaults(
45
48
  defineProps<{
46
49
  class?: string | string[] | Record<string, boolean>
@@ -11,7 +11,7 @@
11
11
  />
12
12
  </DropdownMenuSubTrigger>
13
13
 
14
- <DropdownMenuPortal>
14
+ <DropdownMenuPortal v-bind="teleportTarget ? { to: teleportTarget } : {}">
15
15
  <DropdownMenuSubContent
16
16
  class="dropdown"
17
17
  :class="props.class"
@@ -28,6 +28,7 @@
28
28
  </template>
29
29
 
30
30
  <script setup lang="ts">
31
+ import { inject } from 'vue'
31
32
  import {
32
33
  DropdownMenuPortal,
33
34
  DropdownMenuSub,
@@ -36,6 +37,8 @@ import {
36
37
  } from 'reka-ui'
37
38
  import Icon from './Icon.vue'
38
39
 
40
+ const teleportTarget = inject<HTMLElement | null>('teleport-target', null)
41
+
39
42
  const props = withDefaults(
40
43
  defineProps<{
41
44
  class?: string | string[] | Record<string, boolean>
@@ -12,7 +12,7 @@
12
12
  </SelectIcon>
13
13
  </SelectTrigger>
14
14
 
15
- <SelectPortal>
15
+ <SelectPortal v-bind="teleportTarget ? { to: teleportTarget } : {}">
16
16
  <SelectContent
17
17
  position="popper"
18
18
  :side-offset="4"
@@ -37,6 +37,7 @@
37
37
  </template>
38
38
 
39
39
  <script setup lang="ts">
40
+ import { inject } from 'vue'
40
41
  import {
41
42
  SelectContent,
42
43
  SelectIcon,
@@ -51,6 +52,8 @@ import {
51
52
  } from 'reka-ui'
52
53
  import Icon from './Icon.vue'
53
54
 
55
+ const teleportTarget = inject<HTMLElement | null>('teleport-target', null)
56
+
54
57
  const model = defineModel<string | string[]>()
55
58
 
56
59
  defineProps({
@@ -7,7 +7,7 @@
7
7
  <slot name="trigger" />
8
8
  </PopoverTrigger>
9
9
 
10
- <PopoverPortal>
10
+ <PopoverPortal v-bind="teleportTarget ? { to: teleportTarget } : {}">
11
11
  <PopoverContent
12
12
  class="popover"
13
13
  :class="props.class"
@@ -46,6 +46,7 @@
46
46
  </template>
47
47
 
48
48
  <script setup lang="ts">
49
+ import { inject } from 'vue'
49
50
  import Button from './Button.vue'
50
51
  import Icon from './Icon.vue'
51
52
  import {
@@ -57,6 +58,8 @@ import {
57
58
  PopoverTrigger,
58
59
  } from 'reka-ui'
59
60
 
61
+ const teleportTarget = inject<HTMLElement | null>('teleport-target', null)
62
+
60
63
  const props = withDefaults(
61
64
  defineProps<{
62
65
  class?: string | string[] | Record<string, boolean>
@@ -5,7 +5,7 @@
5
5
  <slot name="trigger" />
6
6
  </TooltipTrigger>
7
7
 
8
- <TooltipPortal>
8
+ <TooltipPortal v-bind="teleportTarget ? { to: teleportTarget } : {}">
9
9
  <TooltipContent
10
10
  class="tooltip"
11
11
  :class="props.class"
@@ -28,6 +28,7 @@
28
28
  </template>
29
29
 
30
30
  <script setup lang="ts">
31
+ import { inject } from 'vue'
31
32
  import {
32
33
  TooltipArrow,
33
34
  TooltipContent,
@@ -37,6 +38,8 @@ import {
37
38
  TooltipTrigger,
38
39
  } from 'reka-ui'
39
40
 
41
+ const teleportTarget = inject<HTMLElement | null>('teleport-target', null)
42
+
40
43
  const props = withDefaults(
41
44
  defineProps<{
42
45
  class?: string | string[] | Record<string, boolean>