@milaboratories/uikit 2.2.4 → 2.2.5
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/CHANGELOG.md +6 -0
- package/dist/pl-uikit.js +2301 -2293
- package/dist/pl-uikit.umd.cjs +10 -10
- package/dist/src/components/PlDialogModal/PlDialogModal.vue.d.ts +8 -0
- package/dist/src/components/PlFileDialog/PlFileDialog.vue.d.ts +3 -0
- package/dist/src/components/PlFileInput/PlFileInput.vue.d.ts +18 -9
- package/dist/src/components/PlSlideModal/PlSlideModal.vue.d.ts +3 -3
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/PlDialogModal/PlDialogModal.vue +5 -1
- package/src/components/PlDropdown/PlDropdown.vue +5 -1
- package/src/components/PlFileDialog/PlFileDialog.vue +3 -0
- package/src/components/PlFileInput/PlFileInput.vue +16 -6
- package/src/components/PlSlideModal/PlSlideModal.vue +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/uikit",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/pl-uikit.umd.js",
|
|
6
6
|
"module": "dist/pl-uikit.js",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"vue-tsc": "^2.1.6",
|
|
33
33
|
"yarpm": "^1.2.0",
|
|
34
34
|
"svgo": "^3.3.2",
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
35
|
+
"@milaboratories/helpers": "^1.6.6",
|
|
36
|
+
"@platforma-sdk/model": "^1.10.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"dev": "vite",
|
|
@@ -52,6 +52,10 @@ const props = withDefaults(
|
|
|
52
52
|
* Actions slot has a top border (default: `true`)
|
|
53
53
|
*/
|
|
54
54
|
actionsHasTopBorder?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* If `true`, the modal window closes when clicking outside the modal area (default: `true`)
|
|
57
|
+
*/
|
|
58
|
+
closeOnOutsideClick?: boolean;
|
|
55
59
|
}>(),
|
|
56
60
|
{
|
|
57
61
|
width: '448px',
|
|
@@ -69,7 +73,7 @@ const modal = ref<HTMLElement>();
|
|
|
69
73
|
const $attrs = useAttrs();
|
|
70
74
|
|
|
71
75
|
function onClickShadow(ev: Event) {
|
|
72
|
-
if (modal.value && document.contains(ev.target as Node) && !modal.value.contains(ev.target as Node)) {
|
|
76
|
+
if (modal.value && props.closeOnOutsideClick && document.contains(ev.target as Node) && !modal.value.contains(ev.target as Node)) {
|
|
73
77
|
emit('update:modelValue', false);
|
|
74
78
|
}
|
|
75
79
|
}
|
|
@@ -321,9 +321,13 @@ watch(list, (el) => {
|
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
|
|
324
|
+
const top = ref(0);
|
|
325
|
+
|
|
324
326
|
useElementPosition(root, (pos) => {
|
|
325
327
|
const focusWidth = 3; // see css
|
|
326
328
|
|
|
329
|
+
top.value = pos.top;
|
|
330
|
+
|
|
327
331
|
const downTopOffset = pos.top + pos.height + focusWidth;
|
|
328
332
|
|
|
329
333
|
if (downTopOffset + data.optionsHeight > pos.clientHeight) {
|
|
@@ -376,7 +380,7 @@ useElementPosition(root, (pos) => {
|
|
|
376
380
|
</div>
|
|
377
381
|
<label v-if="label">
|
|
378
382
|
<i v-if="required" class="required-icon" />
|
|
379
|
-
<span>{{ label }}</span>
|
|
383
|
+
<span>{{ label }}: {{ top }}</span>
|
|
380
384
|
<PlTooltip v-if="slots.tooltip" class="info" position="top">
|
|
381
385
|
<template #tooltip>
|
|
382
386
|
<slot name="tooltip" />
|
|
@@ -32,11 +32,13 @@ const props = withDefaults(
|
|
|
32
32
|
multi?: boolean;
|
|
33
33
|
title?: string;
|
|
34
34
|
autoSelectStorage?: boolean;
|
|
35
|
+
closeOnOutsideClick?: boolean;
|
|
35
36
|
}>(),
|
|
36
37
|
{
|
|
37
38
|
extensions: undefined,
|
|
38
39
|
title: undefined,
|
|
39
40
|
autoSelectStorage: true,
|
|
41
|
+
closeOnOutsideClick: true,
|
|
40
42
|
},
|
|
41
43
|
);
|
|
42
44
|
|
|
@@ -302,6 +304,7 @@ const vTextOverflown = {
|
|
|
302
304
|
<template>
|
|
303
305
|
<PlDialogModal
|
|
304
306
|
:no-content-gutters="true"
|
|
307
|
+
:close-on-outside-click="closeOnOutsideClick"
|
|
305
308
|
class="split"
|
|
306
309
|
:model-value="modelValue"
|
|
307
310
|
width="688px"
|
|
@@ -44,10 +44,6 @@ const props = withDefaults(
|
|
|
44
44
|
* Allowed file extensions (should start with `.`)
|
|
45
45
|
*/
|
|
46
46
|
extensions?: string[];
|
|
47
|
-
/**
|
|
48
|
-
* File dialog title
|
|
49
|
-
*/
|
|
50
|
-
fileDialogTitle?: string;
|
|
51
47
|
/**
|
|
52
48
|
* Placeholder text
|
|
53
49
|
*/
|
|
@@ -68,11 +64,18 @@ const props = withDefaults(
|
|
|
68
64
|
* If `true`, only the file name is displayed, not the full path to it.
|
|
69
65
|
*/
|
|
70
66
|
showFilenameOnly?: boolean;
|
|
71
|
-
|
|
72
67
|
/**
|
|
73
68
|
* Remove rounded border and change styles
|
|
74
69
|
*/
|
|
75
70
|
cellStyle?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* File dialog title
|
|
73
|
+
*/
|
|
74
|
+
fileDialogTitle?: string;
|
|
75
|
+
/**
|
|
76
|
+
* If `true`, the file dialog window closes when clicking outside the modal area (default: `true`)
|
|
77
|
+
*/
|
|
78
|
+
fileDialogCloseOnOutsideClick?: boolean;
|
|
76
79
|
}>(),
|
|
77
80
|
{
|
|
78
81
|
label: undefined,
|
|
@@ -83,6 +86,7 @@ const props = withDefaults(
|
|
|
83
86
|
error: undefined,
|
|
84
87
|
helper: undefined,
|
|
85
88
|
cellStyle: false,
|
|
89
|
+
fileDialogCloseOnOutsideClick: true,
|
|
86
90
|
},
|
|
87
91
|
);
|
|
88
92
|
|
|
@@ -182,5 +186,11 @@ if (!props.cellStyle) {
|
|
|
182
186
|
</div>
|
|
183
187
|
<div v-else-if="helper" class="upl-file-input__helper">{{ helper }}</div>
|
|
184
188
|
</div>
|
|
185
|
-
<PlFileDialog
|
|
189
|
+
<PlFileDialog
|
|
190
|
+
v-model="data.fileDialogOpen"
|
|
191
|
+
:extensions="extensions"
|
|
192
|
+
:title="fileDialogTitle"
|
|
193
|
+
:close-on-outside-click="fileDialogCloseOnOutsideClick"
|
|
194
|
+
@import:files="onImport"
|
|
195
|
+
/>
|
|
186
196
|
</template>
|
|
@@ -32,7 +32,7 @@ const props = withDefaults(
|
|
|
32
32
|
*/
|
|
33
33
|
shadow?: boolean;
|
|
34
34
|
/**
|
|
35
|
-
* If `true`, the modal window closes when clicking outside the modal area
|
|
35
|
+
* If `true`, the modal window closes when clicking outside the modal area (default: `true`)
|
|
36
36
|
*/
|
|
37
37
|
closeOnOutsideClick?: boolean;
|
|
38
38
|
}>(),
|