vueless 0.0.256 → 0.0.257

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.
@@ -1,4 +1,4 @@
1
- import { computed, toValue } from "vue";
1
+ import { computed, toValue, ref } from "vue";
2
2
 
3
3
  export const POSITION = {
4
4
  left: "left",
@@ -14,10 +14,8 @@ export function useAutoPosition(anchorElement, targetElement, position, preferre
14
14
  const localPosition = computed(() => toValue(position));
15
15
  const localPreferredPosition = computed(() => toValue(preferredPosition));
16
16
 
17
- const preferredOpenDirectionY = computed(() => {
18
- return localPreferredPosition.value?.y || POSITION.bottomi;
19
- });
20
- const preferredOpenDirectionX = computed(() => localPreferredPosition.value?.x || POSITION.left);
17
+ const preferredOpenDirectionY = ref(localPreferredPosition.value?.y || POSITION.bottom);
18
+ const preferredOpenDirectionX = ref(localPreferredPosition.value?.x || POSITION.left);
21
19
 
22
20
  const isTop = computed(() => {
23
21
  if (localPosition.value.y !== POSITION.auto) {
@@ -45,7 +43,7 @@ export function useAutoPosition(anchorElement, targetElement, position, preferre
45
43
 
46
44
  const isRight = computed(() => {
47
45
  if (localPosition.value.x !== POSITION.auto) {
48
- return localPosition.value.y === POSITION.right;
46
+ return localPosition.value.x === POSITION.right;
49
47
  }
50
48
 
51
49
  return preferredOpenDirectionX.value === POSITION.right;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.256",
3
+ "version": "0.0.257",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -10,8 +10,8 @@ export default /*tw*/ {
10
10
  base: "absolute z-40 my-2",
11
11
  variants: {
12
12
  openDirectionX: {
13
- left: "left-0",
14
- right: "right-0",
13
+ left: "right-0",
14
+ right: "left-0",
15
15
  },
16
16
  openDirectionY: {
17
17
  top: "bottom-full mt-0",
@@ -18,8 +18,8 @@ export default /*tw*/ {
18
18
  base: "absolute z-40 my-2 w-80 overflow-hidden rounded-dynamic border border-brand-300 bg-white p-2 shadow focus:outline-none",
19
19
  variants: {
20
20
  openDirectionX: {
21
- left: "left-0",
22
- right: "right-0",
21
+ left: "right-0",
22
+ right: "left-0",
23
23
  },
24
24
  openDirectionY: {
25
25
  top: "bottom-full mt-0",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.256",
4
+ "version": "0.0.257",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",