@milaboratories/uikit 2.2.86 → 2.2.88
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 +12 -0
- package/dist/pl-uikit.css +1 -1
- package/dist/pl-uikit.js +2069 -2053
- package/dist/pl-uikit.js.map +1 -1
- package/dist/src/components/PlAutocomplete/PlAutocomplete.vue.d.ts.map +1 -1
- package/dist/src/components/PlDropdown/PlDropdown.vue.d.ts.map +1 -1
- package/dist/src/components/PlDropdownLegacy/PlDropdownLegacy.vue.d.ts.map +1 -1
- package/dist/src/components/PlFileInput/PlFileInput.vue.d.ts.map +1 -1
- package/dist/src/components/PlSearchField/PlSearchField.vue.d.ts.map +1 -1
- package/dist/src/components/PlSvg/registry.d.ts +6 -0
- package/dist/src/components/PlSvg/registry.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/assets/variables.scss +4 -0
- package/src/components/PlAutocomplete/PlAutocomplete.vue +1 -1
- package/src/components/PlAutocomplete/pl-autocomplete.scss +4 -4
- package/src/components/PlDropdown/PlDropdown.vue +1 -1
- package/src/components/PlDropdown/pl-dropdown.scss +5 -4
- package/src/components/PlDropdownLegacy/PlDropdownLegacy.vue +1 -1
- package/src/components/PlDropdownLegacy/pl-dropdown-legacy.scss +4 -4
- package/src/components/PlFileInput/PlFileInput.vue +1 -1
- package/src/components/PlFileInput/pl-file-input.scss +4 -0
- package/src/components/PlLogView/useLogHandle.ts +1 -1
- package/src/components/PlSearchField/PlSearchField.vue +1 -0
- package/src/components/PlSvg/registry.ts +24 -16
- package/src/components/PlTextField/pl-text-field.scss +1 -0
- package/src/index.ts +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.88",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/pl-uikit.js",
|
|
6
6
|
"module": "dist/pl-uikit.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@vue/test-utils": "^2.4.6",
|
|
25
|
-
"@vueuse/core": "
|
|
25
|
+
"@vueuse/core": "^13.3.0",
|
|
26
26
|
"jsdom": "^25.0.1",
|
|
27
27
|
"resize-observer-polyfill": "^1.5.1",
|
|
28
28
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"yarpm": "^1.2.0",
|
|
34
34
|
"svgo": "^3.3.2",
|
|
35
35
|
"@types/d3": "^7.4.3",
|
|
36
|
-
"@
|
|
36
|
+
"@platforma-sdk/model": "^1.34.10",
|
|
37
37
|
"@milaboratories/eslint-config": "^1.0.4",
|
|
38
|
-
"@
|
|
38
|
+
"@milaboratories/helpers": "^1.6.14"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"dev": "vite",
|
|
@@ -62,11 +62,14 @@
|
|
|
62
62
|
--gradient-red: linear-gradient(0deg, #ffd5cc 0%, #ff9494 100%);
|
|
63
63
|
--gradient-violet: linear-gradient(180deg, #bca3ff 0%, #e5e5ff 100%);
|
|
64
64
|
--TT-gradient-violet: linear-gradient(180deg, #bca3ff 0%, #e5e5ff 100%);
|
|
65
|
+
--gradient-light-lime: linear-gradient(180deg, #EBFFEB 0%, transparent 100%);
|
|
65
66
|
|
|
66
67
|
// Layout
|
|
67
68
|
--main-spacing: 24px;
|
|
68
69
|
--gap-v: 24px;
|
|
69
70
|
--gap-h: 12px;
|
|
71
|
+
--border-radius: 6px;
|
|
72
|
+
|
|
70
73
|
// @TODO global overlays
|
|
71
74
|
--z-splash: 50;
|
|
72
75
|
--z-slide-shadow: 80;
|
|
@@ -143,4 +146,5 @@
|
|
|
143
146
|
--gradient-rose: linear-gradient(0deg, #478063 0%, #2e4652 45.93%, #24223d 91.63%);
|
|
144
147
|
--gradient-red: linear-gradient(0deg, #478063 0%, #2e4652 45.93%, #24223d 91.63%);
|
|
145
148
|
--gradient-violet: linear-gradient(0deg, #478063 0%, #2e4652 45.93%, #24223d 91.63%);
|
|
149
|
+
|
|
146
150
|
}
|
|
@@ -363,7 +363,7 @@ watch(() => optionsRequest.loading || modelOptionRequest.loading, (loading) => {
|
|
|
363
363
|
|
|
364
364
|
<div class="pl-autocomplete__controls">
|
|
365
365
|
<PlMaskIcon24 v-if="isLoadingOptions" name="loading" />
|
|
366
|
-
<PlIcon16 v-if="clearable && hasValue" name="delete-clear" @click.stop="clear" />
|
|
366
|
+
<PlIcon16 v-if="clearable && hasValue" class="clear" name="delete-clear" @click.stop="clear" />
|
|
367
367
|
<slot name="append" />
|
|
368
368
|
<div class="pl-autocomplete__arrow-wrapper" @click.stop="toggleOpen">
|
|
369
369
|
<div v-if="arrowIconLarge" class="arrow-icon" :class="[`icon-24 ${arrowIconLarge}`]" />
|
|
@@ -185,16 +185,16 @@
|
|
|
185
185
|
|
|
186
186
|
margin-left: auto;
|
|
187
187
|
|
|
188
|
-
.icon-delete-clear {
|
|
189
|
-
cursor: pointer;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
188
|
.mask-16,
|
|
193
189
|
.mask-24 {
|
|
194
190
|
--icon-color: var(--control-mask-fill);
|
|
195
191
|
cursor: pointer;
|
|
196
192
|
}
|
|
197
193
|
|
|
194
|
+
.clear {
|
|
195
|
+
--icon-color: var(--ic-02);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
198
|
.mask-loading {
|
|
199
199
|
--icon-color: var(#07AD3E);
|
|
200
200
|
animation: spin 2.5s linear infinite;
|
|
@@ -334,7 +334,7 @@ watchPostEffect(() => {
|
|
|
334
334
|
|
|
335
335
|
<div class="pl-dropdown__controls">
|
|
336
336
|
<PlMaskIcon24 v-if="isLoadingOptions" name="loading" />
|
|
337
|
-
<PlIcon16 v-if="clearable && hasValue" name="delete-clear" @click.stop="clear" />
|
|
337
|
+
<PlIcon16 v-if="clearable && hasValue" class="clear" name="delete-clear" @click.stop="clear" />
|
|
338
338
|
<slot name="append" />
|
|
339
339
|
<div class="pl-dropdown__arrow-wrapper" @click.stop="toggleOpen">
|
|
340
340
|
<div v-if="arrowIconLarge" class="arrow-icon" :class="[`icon-24 ${arrowIconLarge}`]" />
|
|
@@ -183,16 +183,17 @@
|
|
|
183
183
|
gap: 6px;
|
|
184
184
|
margin-left: auto;
|
|
185
185
|
|
|
186
|
-
|
|
187
|
-
cursor: pointer;
|
|
188
|
-
}
|
|
189
|
-
|
|
186
|
+
|
|
190
187
|
.mask-16,
|
|
191
188
|
.mask-24 {
|
|
192
189
|
--icon-color: var(--control-mask-fill);
|
|
193
190
|
cursor: pointer;
|
|
194
191
|
}
|
|
195
192
|
|
|
193
|
+
.clear {
|
|
194
|
+
--icon-color: var(--ic-02);
|
|
195
|
+
}
|
|
196
|
+
|
|
196
197
|
.mask-loading {
|
|
197
198
|
--icon-color: var(--ic-accent);
|
|
198
199
|
animation: spin 2.5s linear infinite;
|
|
@@ -337,7 +337,7 @@ watchPostEffect(() => {
|
|
|
337
337
|
|
|
338
338
|
<div class="ui-dropdown__controls">
|
|
339
339
|
<PlMaskIcon24 v-if="isLoadingOptions" name="loading" />
|
|
340
|
-
<PlIcon16 v-if="clearable && hasValue" name="delete-clear" @click.stop="clear" />
|
|
340
|
+
<PlIcon16 v-if="clearable && hasValue" class="clear" name="delete-clear" @click.stop="clear" />
|
|
341
341
|
<slot name="append" />
|
|
342
342
|
<div v-if="arrowIconLarge" class="arrow-icon" :class="[`icon-24 ${arrowIconLarge}`]" @click.stop="toggleOpen" />
|
|
343
343
|
<div v-else-if="arrowIcon" class="arrow-icon" :class="[`icon-16 ${arrowIcon}`]" @click.stop="toggleOpen" />
|
|
@@ -181,16 +181,16 @@
|
|
|
181
181
|
gap: 6px;
|
|
182
182
|
margin-left: auto;
|
|
183
183
|
|
|
184
|
-
.icon-delete-clear {
|
|
185
|
-
cursor: pointer;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
184
|
.mask-16,
|
|
189
185
|
.mask-24 {
|
|
190
186
|
--icon-color: var(--control-mask-fill);
|
|
191
187
|
cursor: pointer;
|
|
192
188
|
}
|
|
193
189
|
|
|
190
|
+
.clear {
|
|
191
|
+
--icon-color: var(--ic-02);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
194
|
.mask-loading {
|
|
195
195
|
--icon-color: var(#07AD3E);
|
|
196
196
|
animation: spin 2.5s linear infinite;
|
|
@@ -193,7 +193,7 @@ if (!props.cellStyle) {
|
|
|
193
193
|
{{ fileName }}
|
|
194
194
|
</div>
|
|
195
195
|
<div v-if="uploadStats" class="pl-file-input__stats">{{ uploadStats }}</div>
|
|
196
|
-
<PlMaskIcon24 v-if="modelValue" name="close" @click.stop="clear" />
|
|
196
|
+
<PlMaskIcon24 v-if="modelValue" class="pl-file-input__clear" name="close" @click.stop="clear" />
|
|
197
197
|
<DoubleContour class="pl-file-input__contour" />
|
|
198
198
|
</div>
|
|
199
199
|
<div v-if="hasErrors" class="pl-file-input__error">
|
|
@@ -80,7 +80,7 @@ export function useLogHandle(
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
// Only trigger after last fetch is done
|
|
83
|
-
const timeoutPoll = useTimeoutPoll(fetchAndCatch, 1500, { immediate: false });
|
|
83
|
+
const timeoutPoll = useTimeoutPoll(fetchAndCatch, 1500, { immediate: false, immediateCallback: true });
|
|
84
84
|
|
|
85
85
|
whenever(
|
|
86
86
|
() => logState?.value?.finished,
|
|
@@ -1,28 +1,36 @@
|
|
|
1
1
|
import { uniqueId } from '@milaboratories/helpers';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
SvgRegistryRawSvgMap: Map<string, SvgMeta>;
|
|
6
|
+
SvgRegistryDefsElement: SVGDefsElement;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function createSpriteContainer() {
|
|
11
|
+
const defsElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
12
|
+
defsElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
|
13
|
+
defsElement.style.display = 'none';
|
|
14
|
+
document.body.prepend(defsElement);
|
|
15
|
+
return defsElement;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// prevent multiple definitions of the same SVG registry in different builds
|
|
19
|
+
window.SvgRegistryRawSvgMap = window.SvgRegistryRawSvgMap ?? new Map<string, SvgMeta>();
|
|
20
|
+
window.SvgRegistryDefsElement = window.SvgRegistryDefsElement ?? createSpriteContainer();
|
|
21
|
+
|
|
4
22
|
export type SvgMeta = {
|
|
5
23
|
spriteId: string;
|
|
6
24
|
defaultWidth: number;
|
|
7
25
|
defaultHeight: number;
|
|
8
26
|
};
|
|
9
|
-
const registeredRaw = new Map<string, SvgMeta>();
|
|
10
|
-
|
|
11
|
-
function ensureSpriteContainer() {
|
|
12
|
-
if (defs) return;
|
|
13
27
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
defs.style.display = 'none';
|
|
17
|
-
|
|
18
|
-
document.body.prepend(defs);
|
|
19
|
-
}
|
|
28
|
+
const registeredRaw = window.SvgRegistryRawSvgMap;
|
|
29
|
+
const defsElement = window.SvgRegistryDefsElement;
|
|
20
30
|
|
|
21
31
|
export function registerSvg(raw: string, name?: string): SvgMeta {
|
|
22
32
|
if (!registeredRaw.has(raw)) {
|
|
23
|
-
const id = `svg-${name ? `${name}-` : ''}${uniqueId()}`;
|
|
24
|
-
|
|
25
|
-
ensureSpriteContainer();
|
|
33
|
+
const id = `svg-${name ? `${name}-` : ''}${uniqueId(16)}`;
|
|
26
34
|
|
|
27
35
|
const widthMatch = raw.match(/width="(\d+)(px)?"/)?.[1];
|
|
28
36
|
const heightMatch = raw.match(/height="(\d+)(px)?"/)?.[1];
|
|
@@ -47,8 +55,8 @@ export function registerSvg(raw: string, name?: string): SvgMeta {
|
|
|
47
55
|
template.innerHTML = preparedSvg;
|
|
48
56
|
|
|
49
57
|
const symbol = template.content.firstElementChild;
|
|
50
|
-
if (symbol &&
|
|
51
|
-
|
|
58
|
+
if (symbol && defsElement) {
|
|
59
|
+
defsElement.appendChild(symbol);
|
|
52
60
|
}
|
|
53
61
|
|
|
54
62
|
registeredRaw.set(raw, {
|
package/src/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ import DropdownListItem from './components/DropdownListItem.vue';
|
|
|
9
9
|
// @TODO review
|
|
10
10
|
import ContextProvider from './components/ContextProvider.vue';
|
|
11
11
|
import Slider from './components/Slider.vue';
|
|
12
|
-
import { showContextMenu } from './components/contextMenu
|
|
12
|
+
import { showContextMenu } from './components/contextMenu';
|
|
13
13
|
// for new version
|
|
14
14
|
import LongText from './components/LongText.vue';
|
|
15
15
|
import SliderRangeTriple from './components/SliderRangeTriple.vue';
|