@v1nt1248/3nclient-lib 0.2.74 → 0.2.75

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
@@ -2,7 +2,7 @@
2
2
  "name": "@v1nt1248/3nclient-lib",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "author": "v1nt1248",
5
- "version": "0.2.74",
5
+ "version": "0.2.75",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -1,7 +1,10 @@
1
1
  <script lang="ts" setup>
2
2
  import { onMounted, ref } from 'vue';
3
+ import { Ui3nResize } from '@/directives';
3
4
  import type { Ui3nDropFilesEmits, Ui3nDropFilesProps, Ui3nDropFilesSlots } from './types';
4
5
 
6
+ const vUi3nResize = Ui3nResize;
7
+
5
8
  withDefaults(
6
9
  defineProps<Ui3nDropFilesProps>(),
7
10
  {
@@ -53,7 +56,7 @@
53
56
  isOverDropZone.value = false;
54
57
  }
55
58
 
56
- onMounted(() => {
59
+ function calcElementsSizes() {
57
60
  if (wrapperElement.value) {
58
61
  wrapperElementMinSize.value = Math.min(wrapperElement.value.clientHeight, wrapperElement.value.clientWidth);
59
62
  wrapperElement.value.style.setProperty('--dropzone-height', `${wrapperElementMinSize.value}px`);
@@ -65,6 +68,10 @@
65
68
  }
66
69
  wrapperElement.value.style.setProperty('--dropzone-title-font', `${titleFontSize}px`);
67
70
  }
71
+ }
72
+
73
+ onMounted(() => {
74
+ calcElementsSizes();
68
75
  });
69
76
  </script>
70
77
 
@@ -72,6 +79,7 @@
72
79
  <!-- eslint-disable max-len -->
73
80
  <div
74
81
  ref="wrapperElement"
82
+ v-ui3n-resize="() => calcElementsSizes()"
75
83
  :class="[
76
84
  $style.ui3nDropFiles,
77
85
  permanentDisplay && $style.ui3nDropFilesWithBorder,
@@ -176,5 +184,6 @@
176
184
  .ui3nDropFilesDropzoneAdditional {
177
185
  position: relative;
178
186
  width: max-content;
187
+ max-width: 100%;
179
188
  }
180
189
  </style>