@milaboratories/uikit 2.10.27 → 2.10.28
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/.turbo/turbo-build.log +39 -39
- package/.turbo/turbo-formatter$colon$check.log +2 -2
- package/.turbo/turbo-linter$colon$check.log +2 -2
- package/.turbo/turbo-types$colon$check.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/components/DataTable/TableComponent.vue.js +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue3.js +2 -2
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js +2 -2
- package/dist/components/PlSearchField/PlSearchField.vue.d.ts +28 -4
- package/dist/components/PlSearchField/PlSearchField.vue.d.ts.map +1 -1
- package/dist/components/PlSearchField/PlSearchField.vue2.js +40 -30
- package/dist/components/PlSearchField/PlSearchField.vue2.js.map +1 -1
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +1 -1
- package/dist/components/PlTooltip/PlTooltip.vue2.js +13 -13
- package/dist/components/PlTooltip/PlTooltip.vue2.js.map +1 -1
- package/dist/components/PlTooltip/PlTooltip.vue3.js +11 -11
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/PlSearchField/PlSearchField.vue +22 -17
- package/src/components/PlTooltip/PlTooltip.vue +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/uikit",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"svgo": "^3.3.2",
|
|
42
42
|
"typescript": "~5.6.3",
|
|
43
43
|
"vitest": "^4.0.16",
|
|
44
|
-
"@milaboratories/ts-builder": "1.2.10",
|
|
45
44
|
"@milaboratories/build-configs": "1.4.4",
|
|
45
|
+
"@milaboratories/ts-builder": "1.2.10",
|
|
46
46
|
"@milaboratories/ts-configs": "1.2.1"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
@@ -2,47 +2,52 @@
|
|
|
2
2
|
import { PlIcon16 } from "../PlIcon16";
|
|
3
3
|
import { PlIcon24 } from "../PlIcon24";
|
|
4
4
|
import { computed } from "vue";
|
|
5
|
+
import PlTooltip from "../PlTooltip/PlTooltip.vue";
|
|
5
6
|
|
|
6
|
-
const
|
|
7
|
+
const model = defineModel<string>({ required: true });
|
|
7
8
|
|
|
8
9
|
const props = defineProps<{
|
|
9
10
|
modelValue?: string;
|
|
10
11
|
clearable?: boolean;
|
|
11
12
|
placeholder?: string;
|
|
12
13
|
disabled?: boolean;
|
|
14
|
+
helper?: string;
|
|
15
|
+
}>();
|
|
16
|
+
const slots = defineSlots<{
|
|
17
|
+
helper: () => unknown;
|
|
13
18
|
}>();
|
|
14
19
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
return props.modelValue ?? "";
|
|
18
|
-
},
|
|
19
|
-
set(v) {
|
|
20
|
-
emit("update:modelValue", v);
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const nonEmpty = computed(() => !!props.modelValue);
|
|
20
|
+
const nonEmpty = computed(() => model.value != null && model.value.length > 0);
|
|
21
|
+
const hasHelper = computed(() => props.helper != null || slots.helper != null);
|
|
25
22
|
|
|
26
|
-
const clear = () =>
|
|
23
|
+
const clear = () => (model.value = "");
|
|
27
24
|
</script>
|
|
28
25
|
|
|
29
26
|
<template>
|
|
30
|
-
<div ref="root"
|
|
27
|
+
<div ref="root" :class="$style.component">
|
|
31
28
|
<PlIcon24 name="search" />
|
|
32
29
|
<input
|
|
33
30
|
ref="input"
|
|
34
|
-
v-model="
|
|
35
|
-
:disabled="disabled"
|
|
36
|
-
:placeholder="placeholder || 'Find...'"
|
|
31
|
+
v-model="model"
|
|
32
|
+
:disabled="props.disabled"
|
|
33
|
+
:placeholder="props.placeholder || 'Find...'"
|
|
37
34
|
type="text"
|
|
38
35
|
spellcheck="false"
|
|
39
36
|
/>
|
|
40
37
|
<PlIcon16
|
|
41
|
-
v-if="clearable && nonEmpty"
|
|
38
|
+
v-if="props.clearable && nonEmpty"
|
|
42
39
|
:class="$style.clear"
|
|
43
40
|
name="delete-clear"
|
|
44
41
|
@click.stop="clear"
|
|
45
42
|
/>
|
|
43
|
+
|
|
44
|
+
<PlTooltip v-if="hasHelper" class="info" position="bottom">
|
|
45
|
+
<template #tooltip>
|
|
46
|
+
<slot name="helper">
|
|
47
|
+
{{ props.helper }}
|
|
48
|
+
</slot>
|
|
49
|
+
</template>
|
|
50
|
+
</PlTooltip>
|
|
46
51
|
</div>
|
|
47
52
|
</template>
|
|
48
53
|
|
|
@@ -6,11 +6,11 @@ export default {
|
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<script lang="ts" setup>
|
|
9
|
+
import { uniqueId } from "@milaboratories/helpers";
|
|
9
10
|
import { onUnmounted, reactive, ref, watch } from "vue";
|
|
11
|
+
import { tMap } from "./global";
|
|
10
12
|
import * as utils from "../../helpers/utils";
|
|
11
13
|
import { useClickOutside } from "../../composition/useClickOutside";
|
|
12
|
-
import { tMap } from "./global";
|
|
13
|
-
import { uniqueId } from "@milaboratories/helpers";
|
|
14
14
|
|
|
15
15
|
const emit = defineEmits(["tooltip:close"]);
|
|
16
16
|
|
|
@@ -189,7 +189,7 @@ const anchorName = `--anchor-${uniqueId()}`;
|
|
|
189
189
|
'--anchorName': anchorName,
|
|
190
190
|
'--gap': gap + 'px',
|
|
191
191
|
'--offsetToTheEdge': offsetToTheEdge + 'px',
|
|
192
|
-
'--
|
|
192
|
+
'--plTooltipMaxWidth': maxWidth,
|
|
193
193
|
}"
|
|
194
194
|
>
|
|
195
195
|
<div :class="$style.plTooltipBox" @click.stop>
|
|
@@ -226,7 +226,7 @@ const anchorName = `--anchor-${uniqueId()}`;
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
.plTooltipContainer {
|
|
229
|
-
--
|
|
229
|
+
--plTooltipMaxWidth: 300px;
|
|
230
230
|
--gap: 8px;
|
|
231
231
|
--tailWidth: 8px;
|
|
232
232
|
--tailHeight: calc(var(--gap) + 2px);
|
|
@@ -252,7 +252,7 @@ const anchorName = `--anchor-${uniqueId()}`;
|
|
|
252
252
|
border-radius: 6px;
|
|
253
253
|
width: max-content;
|
|
254
254
|
word-break: normal;
|
|
255
|
-
max-width: var(--
|
|
255
|
+
max-width: var(--plTooltipMaxWidth);
|
|
256
256
|
color: #fff;
|
|
257
257
|
}
|
|
258
258
|
|