@milaboratories/uikit 2.2.48 → 2.2.49
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 +1826 -1784
- package/dist/pl-uikit.js.map +1 -1
- package/dist/pl-uikit.umd.cjs +5 -5
- package/dist/pl-uikit.umd.cjs.map +1 -1
- package/dist/src/components/PlCheckboxGroup/PlCheckboxGroup.vue.d.ts +3 -1
- package/dist/src/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.d.ts +16 -1
- package/dist/src/components/PlDropdownRef/PlDropdownRef.vue.d.ts +9 -2
- package/dist/src/components/PlLogView/PlLogView.vue.d.ts +9 -2
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/PlCheckboxGroup/PlCheckboxGroup.vue +13 -2
- package/src/components/PlCheckboxGroup/pl-checkbox-group.scss +5 -4
- package/src/components/PlDropdownMultiRef/PlDropdownMultiRef.vue +9 -2
- package/src/components/PlDropdownRef/PlDropdownRef.vue +9 -2
- package/src/components/PlLogView/PlLogView.vue +11 -2
package/package.json
CHANGED
|
@@ -11,6 +11,10 @@ export default {
|
|
|
11
11
|
import './pl-checkbox-group.scss';
|
|
12
12
|
import type { SimpleOption } from '@/types';
|
|
13
13
|
import PlCheckboxBase from '@/components/PlCheckbox/PlCheckboxBase.vue';
|
|
14
|
+
import { PlTooltip } from '../PlTooltip';
|
|
15
|
+
import { useSlots } from 'vue';
|
|
16
|
+
|
|
17
|
+
const slots = useSlots();
|
|
14
18
|
|
|
15
19
|
const emit = defineEmits<{
|
|
16
20
|
(e: 'update:modelValue', v: M[]): void;
|
|
@@ -46,8 +50,15 @@ const updateModel = (value: M) => {
|
|
|
46
50
|
</script>
|
|
47
51
|
|
|
48
52
|
<template>
|
|
49
|
-
<div class="
|
|
50
|
-
<label v-if="label">
|
|
53
|
+
<div class="pl-checkbox-group" :class="{ disabled }">
|
|
54
|
+
<label v-if="label">
|
|
55
|
+
<span>{{ label }}</span>
|
|
56
|
+
<PlTooltip v-if="slots.tooltip" class="info" position="top">
|
|
57
|
+
<template #tooltip>
|
|
58
|
+
<slot name="tooltip" />
|
|
59
|
+
</template>
|
|
60
|
+
</PlTooltip>
|
|
61
|
+
</label>
|
|
51
62
|
<div v-for="(opt, i) in options.map((it) => ({ label: 'label' in it ? it.label : it.text, value: it.value }))" :key="i">
|
|
52
63
|
<PlCheckboxBase :disabled="disabled" :label="opt.label" :model-value="hasValue(opt.value)" @update:model-value="() => updateModel(opt.value)" />
|
|
53
64
|
<label @click.stop="() => updateModel(opt.value)">{{ opt.label }}</label>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.pl-checkbox-group {
|
|
2
2
|
--color-label: var(--color-text);
|
|
3
3
|
--cursor-label: pointer;
|
|
4
4
|
display: flex;
|
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
--cursor-label: default;
|
|
10
10
|
pointer-events: none;
|
|
11
11
|
}
|
|
12
|
-
label {
|
|
12
|
+
> label {
|
|
13
13
|
color: var(--color-label);
|
|
14
14
|
cursor: var(--cursor-label);
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 4px;
|
|
17
18
|
margin-bottom: 6px;
|
|
18
19
|
font-size: 14px;
|
|
19
20
|
font-weight: 600;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { ModelRef, RefOption } from '@/types';
|
|
3
3
|
import PlDropdownMulti from '../PlDropdownMulti/PlDropdownMulti.vue';
|
|
4
|
-
import { computed } from 'vue';
|
|
4
|
+
import { computed, useSlots } from 'vue';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
const slots: any = useSlots();
|
|
5
8
|
|
|
6
9
|
defineEmits<{
|
|
7
10
|
/**
|
|
@@ -70,5 +73,9 @@ const options = computed(() =>
|
|
|
70
73
|
v-bind="props"
|
|
71
74
|
:options="options"
|
|
72
75
|
@update:model-value="$emit('update:modelValue', $event)"
|
|
73
|
-
|
|
76
|
+
>
|
|
77
|
+
<template v-if="slots.tooltip" #tooltip>
|
|
78
|
+
<slot name="tooltip" />
|
|
79
|
+
</template>
|
|
80
|
+
</PlDropdownMulti>
|
|
74
81
|
</template>
|
|
@@ -10,7 +10,10 @@ export default {
|
|
|
10
10
|
<script lang="ts" setup>
|
|
11
11
|
import type { ModelRef, RefOption } from '@/types';
|
|
12
12
|
import { PlDropdown } from '../PlDropdown';
|
|
13
|
-
import { computed } from 'vue';
|
|
13
|
+
import { computed, useSlots } from 'vue';
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
const slots: any = useSlots();
|
|
14
17
|
|
|
15
18
|
defineEmits<{
|
|
16
19
|
/**
|
|
@@ -98,5 +101,9 @@ const arrowIcon = computed(() => (props.disabled ? 'icon-link-disabled' : 'icon-
|
|
|
98
101
|
:loading-options-helper="loadingOptionsHelper"
|
|
99
102
|
:arrow-icon-large="arrowIcon"
|
|
100
103
|
@update:model-value="$emit('update:modelValue', $event)"
|
|
101
|
-
|
|
104
|
+
>
|
|
105
|
+
<template v-if="slots.tooltip" #tooltip>
|
|
106
|
+
<slot name="tooltip" />
|
|
107
|
+
</template>
|
|
108
|
+
</PlDropdown>
|
|
102
109
|
</template>
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<script lang="ts" setup>
|
|
11
|
-
import { computed, ref, watch } from 'vue';
|
|
11
|
+
import { computed, ref, useSlots, watch } from 'vue';
|
|
12
12
|
import { PlMaskIcon24 } from '../PlMaskIcon24';
|
|
13
13
|
import './pl-log-view.scss';
|
|
14
14
|
import { okOptional, tapIf } from '@milaboratories/helpers';
|
|
@@ -24,6 +24,8 @@ const getOutputError = <T>(o?: ValueOrErrors<T>) => {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
const slots = useSlots();
|
|
28
|
+
|
|
27
29
|
const props = defineProps<{
|
|
28
30
|
/**
|
|
29
31
|
* String contents
|
|
@@ -114,7 +116,14 @@ const onContentScroll = (ev: Event) => {
|
|
|
114
116
|
|
|
115
117
|
<template>
|
|
116
118
|
<div ref="root" class="pl-log-view" :class="{ 'has-error': computedError }">
|
|
117
|
-
<label v-if="label">
|
|
119
|
+
<label v-if="label">
|
|
120
|
+
<span>{{ label }}</span>
|
|
121
|
+
<PlTooltip v-if="slots.tooltip" class="info" position="top">
|
|
122
|
+
<template #tooltip>
|
|
123
|
+
<slot name="tooltip" />
|
|
124
|
+
</template>
|
|
125
|
+
</PlTooltip>
|
|
126
|
+
</label>
|
|
118
127
|
<DoubleContour class="pl-log-view__contour" />
|
|
119
128
|
<div class="pl-log-view__copy">
|
|
120
129
|
<PlTooltip :close-delay="800" position="top">
|