@exakt/ui 0.0.59 → 0.0.60

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/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "exakt-ui",
3
3
  "configKey": "exakt",
4
- "version": "0.0.59"
4
+ "version": "0.0.60"
5
5
  }
@@ -112,10 +112,13 @@ const updatePosition = async () => {
112
112
  state.y = Math.round(activatorRect.height);
113
113
  state.x = 0;
114
114
 
115
- // Too far right :(
116
- //if (window.innerWidth > listRect.right) {
117
- //state.x = -1 * activatorRect.width
118
- // }
115
+ //Too far right :(
116
+ console.log(list.value);
117
+ if (list.value) {
118
+ if (window?.innerWidth > list.value?.getBoundingClientRect().right) {
119
+ state.x = -1 * activatorRect.width;
120
+ }
121
+ }
119
122
  } //else{
120
123
  //console.log(activator.value, list.value)
121
124
  //}
@@ -130,6 +133,19 @@ const updatePosition = async () => {
130
133
  } */
131
134
  };
132
135
 
136
+ watch(
137
+ () => list.value,
138
+ (newList) => {
139
+ const activatorRect = activator.value?.getBoundingClientRect();
140
+
141
+ if (newList && activatorRect) {
142
+ if (window?.innerWidth < newList.getBoundingClientRect().right) {
143
+ state.x = -1 * activatorRect.width * 2;
144
+ }
145
+ }
146
+ },
147
+ );
148
+
133
149
  const debouncedUpdatePosition = debounce(updatePosition, 200);
134
150
 
135
151
  watch(visibleComputed, (value) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exakt/ui",
3
- "version": "0.0.59",
3
+ "version": "0.0.60",
4
4
  "description": "A UI library for Nuxt.js",
5
5
  "license": "MIT",
6
6
  "type": "module",