@exakt/ui 0.0.59 → 0.0.61

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.61"
5
5
  }
@@ -1,12 +1,22 @@
1
1
  <template>
2
2
  <div>
3
- <e-focus-sheet :model-value="modelValue" :opaque-on-desktop="true"
4
- @update:model-value="emit('update:modelValue', $event)" v-bind="{ dismissable }" />
3
+ <e-focus-sheet
4
+ :model-value="modelValue"
5
+ :opaque-on-desktop="true"
6
+ v-bind="{ dismissable }"
7
+ @update:model-value="emit('update:modelValue', $event)"
8
+ />
5
9
 
6
10
  <e-tr-scale :multiplier="1.3">
7
- <div v-if="modelValue" class="dialog-wrap flex-center">
11
+ <div
12
+ v-if="modelValue"
13
+ class="dialog-wrap flex-center"
14
+ >
8
15
  <div class="dialog bg-elev rounded px-6 pe-6 pb-2">
9
- <div v-if="!!slots.title" class="my-4">
16
+ <div
17
+ v-if="!!slots.title"
18
+ class="my-4"
19
+ >
10
20
  <h2 class="ma-0 pa-0">
11
21
  <slot name="title" />
12
22
  </h2>
@@ -1,7 +1,10 @@
1
1
  <template>
2
2
  <div class="flex-stretch t-dropdown">
3
3
  <!-- class="flex-stretch fullwidth" -->
4
- <div ref="activator" @click="onActivatorClick">
4
+ <div
5
+ ref="activator"
6
+ @click="onActivatorClick"
7
+ >
5
8
  <slot />
6
9
  </div>
7
10
  <e-focus-sheet v-model="visibleComputed" />
@@ -33,13 +36,20 @@
33
36
  }"
34
37
  @click="select(i)"
35
38
  >
36
- <e-icon v-if="item.icon" :size="20" class="mr-2">
39
+ <e-icon
40
+ v-if="item.icon"
41
+ :size="20"
42
+ class="mr-2"
43
+ >
37
44
  {{ item.icon }}
38
45
  </e-icon>
39
46
  {{ item.name }}
40
47
  </e-btn>
41
48
  </component>
42
- <div class="mx-4 my-2 fullwidth text-secondary" v-if="hint">
49
+ <div
50
+ v-if="hint"
51
+ class="mx-4 my-2 fullwidth text-secondary"
52
+ >
43
53
  {{ hint }}
44
54
  </div>
45
55
  </div>
@@ -112,10 +122,13 @@ const updatePosition = async () => {
112
122
  state.y = Math.round(activatorRect.height);
113
123
  state.x = 0;
114
124
 
115
- // Too far right :(
116
- //if (window.innerWidth > listRect.right) {
117
- //state.x = -1 * activatorRect.width
118
- // }
125
+ //Too far right :(
126
+ console.log(list.value);
127
+ if (list.value) {
128
+ if (window?.innerWidth > list.value?.getBoundingClientRect().right) {
129
+ state.x = -1 * activatorRect.width;
130
+ }
131
+ }
119
132
  } //else{
120
133
  //console.log(activator.value, list.value)
121
134
  //}
@@ -130,6 +143,19 @@ const updatePosition = async () => {
130
143
  } */
131
144
  };
132
145
 
146
+ watch(
147
+ () => list.value,
148
+ (newList) => {
149
+ const activatorRect = activator.value?.getBoundingClientRect();
150
+
151
+ if (newList && activatorRect) {
152
+ if (window?.innerWidth < newList.getBoundingClientRect().right) {
153
+ state.x = -1 * activatorRect.width * 2;
154
+ }
155
+ }
156
+ },
157
+ );
158
+
133
159
  const debouncedUpdatePosition = debounce(updatePosition, 200);
134
160
 
135
161
  watch(visibleComputed, (value) => {
@@ -1,7 +1,12 @@
1
1
  <template>
2
2
  <div>
3
3
  <Transition name="fade">
4
- <div v-if="modelValue" class="focus-sheet" :class="{ 'opaque-on-desktop': opaqueOnDesktop }" @click="dismiss" />
4
+ <div
5
+ v-if="modelValue"
6
+ class="focus-sheet"
7
+ :class="{ 'opaque-on-desktop': opaqueOnDesktop }"
8
+ @click="dismiss"
9
+ />
5
10
  </Transition>
6
11
  </div>
7
12
  </template>
@@ -12,9 +12,9 @@
12
12
  v-model="searchFieldComputed"
13
13
  v-bind="{ label, placeholder, icon }"
14
14
  solid
15
- @input="inputHandler"
16
15
  :disabled="disabled"
17
16
  :class="{ 'e-disabled': props.disabled }"
17
+ @input="inputHandler"
18
18
  >
19
19
  <slot />
20
20
  </e-input-text>
@@ -1,14 +1,20 @@
1
1
  <template>
2
2
  <div>
3
- <div v-if="label" class="pb-2">
4
- <label :for="id" class="text-secondary">{{ label }}</label>
3
+ <div
4
+ v-if="label"
5
+ class="pb-2"
6
+ >
7
+ <label
8
+ :for="id"
9
+ class="text-secondary"
10
+ >{{ label }}</label>
5
11
  </div>
6
12
  <input
7
13
  :id="id"
8
14
  v-model="currentText"
9
15
  v-bind="{ required, disabled, type, name }"
10
16
  class="py-3 px-4"
11
- />
17
+ >
12
18
  </div>
13
19
  </template>
14
20
  <script setup lang="ts">
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <e-undecorated-link :to="to" :class="{ 'grow-on-mobile': responsive }">
2
+ <e-undecorated-link
3
+ :to="to"
4
+ :class="{ 'grow-on-mobile': responsive }"
5
+ >
3
6
  <e-btn
4
7
  :solid="true"
5
8
  background="transparent"
@@ -9,13 +12,26 @@
9
12
  :active="active"
10
13
  :button="false"
11
14
  >
12
- <div class="content" :class="{ responsive }">
13
- <div v-if="icon" class="icon-wrapper flex-center mr-2">
14
- <e-icon class="icon" size="20" :fill="active">
15
+ <div
16
+ class="content"
17
+ :class="{ responsive }"
18
+ >
19
+ <div
20
+ v-if="icon"
21
+ class="icon-wrapper flex-center mr-2"
22
+ >
23
+ <e-icon
24
+ class="icon"
25
+ size="20"
26
+ :fill="active"
27
+ >
15
28
  {{ icon }}
16
29
  </e-icon>
17
30
  <transition name="fade">
18
- <div v-if="alert" class="icon-alert" />
31
+ <div
32
+ v-if="alert"
33
+ class="icon-alert"
34
+ />
19
35
  </transition>
20
36
  </div>
21
37
  <p v-if="label">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exakt/ui",
3
- "version": "0.0.59",
3
+ "version": "0.0.61",
4
4
  "description": "A UI library for Nuxt.js",
5
5
  "license": "MIT",
6
6
  "type": "module",