@milaboratories/uikit 2.17.0 → 2.17.2
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 +7 -7
- package/.turbo/turbo-formatter$colon$check.log +1 -1
- package/.turbo/turbo-linter$colon$check.log +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/components/PlAlert/PlAlert.js.map +1 -1
- package/dist/components/PlAlert/PlAlert.vue.d.ts.map +1 -1
- package/dist/components/PlAlert/PlAlert.vue2.js +26 -24
- package/dist/components/PlAlert/PlAlert.vue2.js.map +1 -1
- package/dist/components/PlAlert/pl-alert.css +1 -1
- package/package.json +8 -8
- package/src/__tests__/setup.ts +10 -2
- package/src/components/PlAlert/PlAlert.vue +10 -3
- package/src/components/PlAlert/pl-alert.scss +6 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -17,7 +17,7 @@ transforming...
|
|
|
17
17
|
rendering chunks...
|
|
18
18
|
[32m
|
|
19
19
|
[36m[unplugin:dts][32m Start generate declaration files...[39m
|
|
20
|
-
[32m[36m[unplugin:dts][32m Declaration files built in
|
|
20
|
+
[32m[36m[unplugin:dts][32m Declaration files built in 6276ms.
|
|
21
21
|
[39m
|
|
22
22
|
computing gzip size...
|
|
23
23
|
dist/components/PlClipboard/PlClipboard.vue_vue_type_style_index_0_lang.css 0.04 kB │ gzip: 0.06 kB
|
|
@@ -64,7 +64,7 @@ dist/components/contextMenu/Menu.vue_vue_type_style_index_0_scoped_a7698a57_lang
|
|
|
64
64
|
dist/components/PlSearchField/PlSearchField.vue_vue_type_style_index_0_lang.css 1.03 kB │ gzip: 0.39 kB
|
|
65
65
|
dist/components/PlProgressCell/pl-progress-cell.css 1.14 kB │ gzip: 0.48 kB
|
|
66
66
|
dist/layout/PlBlockPage/pl-block-page.css 1.32 kB │ gzip: 0.51 kB
|
|
67
|
-
dist/components/PlAlert/pl-alert.css 1.
|
|
67
|
+
dist/components/PlAlert/pl-alert.css 1.46 kB │ gzip: 0.56 kB
|
|
68
68
|
dist/components/PlChip/pl-chip.css 1.55 kB │ gzip: 0.70 kB
|
|
69
69
|
dist/layout/PlPlaceholder/PlPlaceholder.vue_vue_type_style_index_0_lang.css 1.56 kB │ gzip: 0.68 kB
|
|
70
70
|
dist/components/PlBtnSplit/pl-btn-split.css 1.57 kB │ gzip: 0.45 kB
|
|
@@ -178,7 +178,7 @@ dist/components/DataTable/ThCell.js
|
|
|
178
178
|
dist/components/DataTable/TrBody.js 0.17 kB │ gzip: 0.15 kB │ map: 0.87 kB
|
|
179
179
|
dist/components/DataTable/TrHead.js 0.17 kB │ gzip: 0.15 kB │ map: 0.34 kB
|
|
180
180
|
dist/components/PlFileDialog/Local.js 0.17 kB │ gzip: 0.15 kB │ map: 3.20 kB
|
|
181
|
-
dist/components/PlAlert/PlAlert.js 0.17 kB │ gzip: 0.15 kB │ map: 3.
|
|
181
|
+
dist/components/PlAlert/PlAlert.js 0.17 kB │ gzip: 0.15 kB │ map: 3.50 kB
|
|
182
182
|
dist/layout/PlSpacer/PlSpacer.js 0.17 kB │ gzip: 0.15 kB │ map: 0.49 kB
|
|
183
183
|
dist/components/InputRange.js 0.17 kB │ gzip: 0.15 kB │ map: 2.89 kB
|
|
184
184
|
dist/components/Scrollable.js 0.17 kB │ gzip: 0.15 kB │ map: 2.37 kB
|
|
@@ -739,7 +739,6 @@ dist/components/PlLoaderLogo.vue_vue_type_script_setup_true_lang.js
|
|
|
739
739
|
dist/components/PlAccordion/PlAccordionSection.vue_vue_type_script_setup_true_lang.js 2.14 kB │ gzip: 1.00 kB │ map: 4.28 kB
|
|
740
740
|
dist/assets/icons/icon-assets-min/24_violin-jitter.js 2.15 kB │ gzip: 1.02 kB │ map: 0.10 kB
|
|
741
741
|
dist/assets/icons/icon-assets-min/24_bindot.js 2.16 kB │ gzip: 0.40 kB │ map: 0.09 kB
|
|
742
|
-
dist/components/PlAlert/PlAlert.vue_vue_type_script_setup_true_lang.js 2.16 kB │ gzip: 0.94 kB │ map: 4.61 kB
|
|
743
742
|
dist/helpers/utils.js 2.17 kB │ gzip: 0.88 kB │ map: 6.59 kB
|
|
744
743
|
dist/assets/icons/icon-assets-min/24_violin-binned.js 2.18 kB │ gzip: 1.06 kB │ map: 0.10 kB
|
|
745
744
|
dist/components/Scrollable.vue_vue_type_script_setup_true_lang.js 2.19 kB │ gzip: 0.91 kB │ map: 4.08 kB
|
|
@@ -748,6 +747,7 @@ dist/assets/icons/icon-assets-min/24_annotation.js
|
|
|
748
747
|
dist/components/PlCheckboxGroup/PlCheckboxGroup.vue_vue_type_script_setup_true_lang.js 2.22 kB │ gzip: 1.01 kB │ map: 4.43 kB
|
|
749
748
|
dist/assets/icons/icon-assets-min/24_file-logs.js 2.22 kB │ gzip: 1.17 kB │ map: 0.09 kB
|
|
750
749
|
dist/components/DropdownListItem.vue_vue_type_script_setup_true_lang.js 2.30 kB │ gzip: 0.91 kB │ map: 4.14 kB
|
|
750
|
+
dist/components/PlAlert/PlAlert.vue_vue_type_script_setup_true_lang.js 2.32 kB │ gzip: 0.99 kB │ map: 4.98 kB
|
|
751
751
|
dist/components/PlSearchField/PlSearchField.vue_vue_type_script_setup_true_lang.js 2.34 kB │ gzip: 1.07 kB │ map: 4.95 kB
|
|
752
752
|
dist/components/PlProgressCell/PlProgressCell.vue_vue_type_script_setup_true_lang.js 2.38 kB │ gzip: 1.01 kB │ map: 3.95 kB
|
|
753
753
|
dist/assets/icons/icon-assets-min/24_violin.js 2.38 kB │ gzip: 1.24 kB │ map: 0.09 kB
|
|
@@ -794,10 +794,10 @@ dist/composition/filters/metadata.js
|
|
|
794
794
|
dist/index.js 12.77 kB │ gzip: 3.01 kB │ map: 9.08 kB
|
|
795
795
|
dist/components/PlSvg/PlSvg.vue_vue_type_script_setup_true_lang.js 39.39 kB │ gzip: 3.39 kB │ map: 9.23 kB
|
|
796
796
|
|
|
797
|
-
[32m✓ built in 8.
|
|
798
|
-
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 8.
|
|
797
|
+
[32m✓ built in 8.23s[39m
|
|
798
|
+
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 8.1s of this 8.2s build (98%).
|
|
799
799
|
The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
|
|
800
|
-
- plugin unplugin-dts buildStart (71%,
|
|
800
|
+
- plugin unplugin-dts buildStart (71%, 5.8s, 1 call)
|
|
801
801
|
Additional callback time came from the callbacks below and from callbacks under 1s.
|
|
802
802
|
3 callbacks are listed without a time. Their calls overlapped, so the time inside one call includes work from other calls. To find their cost, profile the build with `node --cpu-prof`:
|
|
803
803
|
- plugin vite:asset load (298 calls)
|
|
@@ -4,5 +4,5 @@ $ ts-builder linter --check
|
|
|
4
4
|
Linting project...
|
|
5
5
|
↳ oxlint --config /home/runner/_work/platforma/platforma/lib/ui/uikit/.oxlintrc.json --deny-warnings
|
|
6
6
|
Found 0 warnings and 0 errors.
|
|
7
|
-
Finished in
|
|
7
|
+
Finished in 29ms on 317 files with 108 rules using 16 threads.
|
|
8
8
|
Linting completed successfully
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @milaboratories/uikit
|
|
2
2
|
|
|
3
|
+
## 2.17.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b278e85: Build on windows, iter 1. Technical release
|
|
8
|
+
- Updated dependencies [b278e85]
|
|
9
|
+
- @milaboratories/helpers@1.14.7
|
|
10
|
+
- @platforma-sdk/model@1.88.8
|
|
11
|
+
|
|
12
|
+
## 2.17.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- ad84d77: PlAlert draws its `icon` with PlIcon24, in the text colour, centred on the first row; the global icon classes it used are gone, so it showed none.
|
|
17
|
+
|
|
3
18
|
## 2.17.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlAlert.js","names":["_sfc_main","PlAlert_vue_vue_type_script_setup_true_lang_default","PlAlert_default"],"sources":["../../../src/components/PlAlert/PlAlert.vue"],"sourcesContent":["<script lang=\"ts\">\nexport default {\n name: \"PlAlert\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-alert.scss\";\n\nimport PlCloseModalBtn from \"../../utils/PlCloseModalBtn.vue\";\n\ndefineEmits<{\n /**\n * Emitted when the model value is updated, typically when the close button is clicked.\n *\n * @param value - The new value of the model, generally `false` when the alert is closed.\n */\n (e: \"update:modelValue\", value: boolean): void;\n}>();\n\ndefineSlots<{\n /** The alert text; the alert is the label alone without it. */\n default?: () => unknown;\n /** Content in place of the `label` text, such as a control that folds the alert. */\n label?: () => unknown;\n}>();\n\nwithDefaults(\n defineProps<{\n /**\n * Controls the visibility of the alert component. If `true`, the alert is visible.\n *\n * @default true\n */\n modelValue?: boolean;\n /**\n * The type of alert, which determines the alert's style and icon.\n * Can be one of `'success' | 'info' | 'warn' | 'error'`.\n */\n type?: \"success\" | \"info\" | \"warn\" | \"error\";\n /**\n * An optional label that appears at the top of the alert.\n */\n label?: string;\n /**\n * If `true`, an icon corresponding to the alert type is displayed.\n */\n icon?: boolean;\n /**\n * If `true`, a close button is displayed in the alert, allowing the user to close it.\n */\n closeable?: boolean;\n /**\n * If `true`, the alert text is displayed in a monospace font.\n */\n monospace?: boolean;\n /**\n * If `true`, the alert content will preserve whitespace and line breaks.\n */\n whiteSpacePre?: boolean;\n\n /**\n * Max height (css value like '120px or 30%')\n */\n maxHeight?: string;\n }>(),\n {\n modelValue: true,\n type: undefined,\n label: undefined,\n icon: undefined,\n closeable: undefined,\n monospace: undefined,\n whiteSpacePre: undefined,\n maxHeight: undefined,\n },\n);\n\nconst iconMap = {\n success: \"success\",\n warn: \"warning\",\n info: \"edit\",\n error: \"error\",\n}
|
|
1
|
+
{"version":3,"file":"PlAlert.js","names":["_sfc_main","PlAlert_vue_vue_type_script_setup_true_lang_default","PlAlert_default"],"sources":["../../../src/components/PlAlert/PlAlert.vue"],"sourcesContent":["<script lang=\"ts\">\nexport default {\n name: \"PlAlert\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-alert.scss\";\n\nimport type { MaskIconName24 } from \"../../types\";\nimport PlCloseModalBtn from \"../../utils/PlCloseModalBtn.vue\";\nimport { PlIcon24 } from \"../PlIcon24\";\n\ndefineEmits<{\n /**\n * Emitted when the model value is updated, typically when the close button is clicked.\n *\n * @param value - The new value of the model, generally `false` when the alert is closed.\n */\n (e: \"update:modelValue\", value: boolean): void;\n}>();\n\ndefineSlots<{\n /** The alert text; the alert is the label alone without it. */\n default?: () => unknown;\n /** Content in place of the `label` text, such as a control that folds the alert. */\n label?: () => unknown;\n}>();\n\nwithDefaults(\n defineProps<{\n /**\n * Controls the visibility of the alert component. If `true`, the alert is visible.\n *\n * @default true\n */\n modelValue?: boolean;\n /**\n * The type of alert, which determines the alert's style and icon.\n * Can be one of `'success' | 'info' | 'warn' | 'error'`.\n */\n type?: \"success\" | \"info\" | \"warn\" | \"error\";\n /**\n * An optional label that appears at the top of the alert.\n */\n label?: string;\n /**\n * If `true`, an icon corresponding to the alert type is displayed.\n */\n icon?: boolean;\n /**\n * If `true`, a close button is displayed in the alert, allowing the user to close it.\n */\n closeable?: boolean;\n /**\n * If `true`, the alert text is displayed in a monospace font.\n */\n monospace?: boolean;\n /**\n * If `true`, the alert content will preserve whitespace and line breaks.\n */\n whiteSpacePre?: boolean;\n\n /**\n * Max height (css value like '120px or 30%')\n */\n maxHeight?: string;\n }>(),\n {\n modelValue: true,\n type: undefined,\n label: undefined,\n icon: undefined,\n closeable: undefined,\n monospace: undefined,\n whiteSpacePre: undefined,\n maxHeight: undefined,\n },\n);\n\nconst iconMap = {\n success: \"success\",\n warn: \"warning\",\n info: \"edit\",\n error: \"error\",\n} satisfies Record<string, MaskIconName24>;\n</script>\n\n<template>\n <div\n v-if=\"modelValue\"\n data-testid=\"pl-alert\"\n class=\"pl-alert\"\n :style=\"{ maxHeight }\"\n :class=\"[{ monospace, whiteSpacePre }, type ? `pl-alert__${type}` : '']\"\n >\n <div\n v-if=\"icon && type\"\n data-testid=\"pl-alert-icon\"\n class=\"pl-alert__icon\"\n :class=\"{ 'pl-alert__icon--text': !label && !$slots.label }\"\n >\n <PlIcon24 :name=\"iconMap[type]\" />\n </div>\n <div class=\"pl-alert__main\">\n <label v-if=\"label || $slots.label\" data-testid=\"pl-alert-label\">\n <slot name=\"label\">{{ label }}</slot>\n </label>\n <div v-if=\"$slots.default\" data-testid=\"pl-alert-message\" class=\"pl-alert__main__text\">\n <slot />\n </div>\n </div>\n <PlCloseModalBtn\n v-if=\"closeable\"\n data-testid=\"pl-alert-close\"\n class=\"pl-alert__close-btn\"\n @click=\"$emit('update:modelValue', false)\"\n />\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlAlert.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlAlert/PlAlert.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlAlert.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlAlert/PlAlert.vue"],"names":[],"mappings":"AA2HA,OAAO,iBAAiB,CAAC;wBAOJ,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAoBd;;;;OAIG;iBACU,OAAO;IACpB;;;OAGG;WACI,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO;IAC5C;;OAEG;YACK,MAAM;IACd;;OAEG;WACI,OAAO;IACd;;OAEG;gBACS,OAAO;IACnB;;OAEG;gBACS,OAAO;IACnB;;OAEG;oBACa,OAAO;IAEvB;;OAEG;gBACS,MAAM;;;;IAnClB;;;;OAIG;iBACU,OAAO;IACpB;;;OAGG;WACI,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO;IAC5C;;OAEG;YACK,MAAM;IACd;;OAEG;WACI,OAAO;IACd;;OAEG;gBACS,OAAO;IACnB;;OAEG;gBACS,OAAO;IACnB;;OAEG;oBACa,OAAO;IAEvB;;OAEG;gBACS,MAAM;;;;WArBV,MAAM;gBATD,OAAO;UAab,OAAO;UARP,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO;eAyBhC,MAAM;eAbN,OAAO;eAIP,OAAO;mBAIH,OAAO;;IAtCzB,+DAA+D;cACrD,MAAM,OAAO;IACvB,oFAAoF;YAC5E,MAAM,OAAO;EAsLnB,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
+
import e from "../PlIcon24/PlIcon24.js";
|
|
2
|
+
import "../PlIcon24/index.js";
|
|
1
3
|
import './pl-alert.css';/* empty css */
|
|
2
|
-
import
|
|
3
|
-
import { createBlock as
|
|
4
|
+
import t from "../../utils/PlCloseModalBtn.js";
|
|
5
|
+
import { createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, openBlock as d, renderSlot as f, toDisplayString as p, unref as m } from "vue";
|
|
4
6
|
// src/components/PlAlert/PlAlert.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
6
|
-
key: 0,
|
|
7
|
-
"data-testid": "pl-alert-icon",
|
|
8
|
-
class: "pl-alert__icon"
|
|
9
|
-
}, p = { class: "pl-alert__main" }, m = {
|
|
7
|
+
var h = { class: "pl-alert__main" }, g = {
|
|
10
8
|
key: 0,
|
|
11
9
|
"data-testid": "pl-alert-label"
|
|
12
|
-
},
|
|
10
|
+
}, _ = {
|
|
13
11
|
key: 1,
|
|
14
12
|
"data-testid": "pl-alert-message",
|
|
15
13
|
class: "pl-alert__main__text"
|
|
16
|
-
},
|
|
14
|
+
}, v = /*@__PURE__*/ c({
|
|
17
15
|
name: "PlAlert",
|
|
18
16
|
props: {
|
|
19
17
|
modelValue: {
|
|
@@ -41,33 +39,37 @@ var f = {
|
|
|
41
39
|
maxHeight: { default: void 0 }
|
|
42
40
|
},
|
|
43
41
|
emits: ["update:modelValue"],
|
|
44
|
-
setup(
|
|
45
|
-
let
|
|
42
|
+
setup(c) {
|
|
43
|
+
let v = {
|
|
46
44
|
success: "success",
|
|
47
45
|
warn: "warning",
|
|
48
46
|
info: "edit",
|
|
49
47
|
error: "error"
|
|
50
48
|
};
|
|
51
|
-
return (
|
|
49
|
+
return (y, b) => c.modelValue ? (d(), i("div", {
|
|
52
50
|
key: 0,
|
|
53
51
|
"data-testid": "pl-alert",
|
|
54
|
-
class:
|
|
55
|
-
monospace:
|
|
56
|
-
whiteSpacePre:
|
|
57
|
-
},
|
|
58
|
-
style:
|
|
52
|
+
class: l(["pl-alert", [{
|
|
53
|
+
monospace: c.monospace,
|
|
54
|
+
whiteSpacePre: c.whiteSpacePre
|
|
55
|
+
}, c.type ? `pl-alert__${c.type}` : ""]]),
|
|
56
|
+
style: u({ maxHeight: c.maxHeight })
|
|
59
57
|
}, [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
c.icon && c.type ? (d(), i("div", {
|
|
59
|
+
key: 0,
|
|
60
|
+
"data-testid": "pl-alert-icon",
|
|
61
|
+
class: l(["pl-alert__icon", { "pl-alert__icon--text": !c.label && !y.$slots.label }])
|
|
62
|
+
}, [s(m(e), { name: v[c.type] }, null, 8, ["name"])], 2)) : r("", !0),
|
|
63
|
+
a("div", h, [c.label || y.$slots.label ? (d(), i("label", g, [f(y.$slots, "label", {}, () => [o(p(c.label), 1)])])) : r("", !0), y.$slots.default ? (d(), i("div", _, [f(y.$slots, "default")])) : r("", !0)]),
|
|
64
|
+
c.closeable ? (d(), n(t, {
|
|
63
65
|
key: 1,
|
|
64
66
|
"data-testid": "pl-alert-close",
|
|
65
67
|
class: "pl-alert__close-btn",
|
|
66
|
-
onClick:
|
|
67
|
-
})) :
|
|
68
|
-
], 6)) :
|
|
68
|
+
onClick: b[0] ||= (e) => y.$emit("update:modelValue", !1)
|
|
69
|
+
})) : r("", !0)
|
|
70
|
+
], 6)) : r("", !0);
|
|
69
71
|
}
|
|
70
72
|
});
|
|
71
|
-
export {
|
|
73
|
+
export { v as default };
|
|
72
74
|
|
|
73
75
|
//# sourceMappingURL=PlAlert.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlAlert.vue_vue_type_script_setup_true_lang.js","names":["$slots","$emit","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","
|
|
1
|
+
{"version":3,"file":"PlAlert.vue_vue_type_script_setup_true_lang.js","names":["$slots","$emit","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createVNode","_unref","PlIcon24","_createCommentVNode","_createElementVNode","_renderSlot","_createTextVNode","_toDisplayString","_createBlock","PlCloseModalBtn","PlIcon24_default","PlCloseModalBtn_default","_hoisted_1","_hoisted_2","_hoisted_3","PlAlert_vue_vue_type_script_setup_true_lang_default","iconMap","__props","openBlock","createElementBlock","normalizeClass","normalizeStyle","_ctx","createVNode","unref","createCommentVNode","createElementVNode","renderSlot","createTextVNode","toDisplayString","createBlock","_cache"],"sources":["../../../src/components/PlAlert/PlAlert.vue"],"sourcesContent":["<script lang=\"ts\">\nexport default {\n name: \"PlAlert\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-alert.scss\";\n\nimport type { MaskIconName24 } from \"../../types\";\nimport PlCloseModalBtn from \"../../utils/PlCloseModalBtn.vue\";\nimport { PlIcon24 } from \"../PlIcon24\";\n\ndefineEmits<{\n /**\n * Emitted when the model value is updated, typically when the close button is clicked.\n *\n * @param value - The new value of the model, generally `false` when the alert is closed.\n */\n (e: \"update:modelValue\", value: boolean): void;\n}>();\n\ndefineSlots<{\n /** The alert text; the alert is the label alone without it. */\n default?: () => unknown;\n /** Content in place of the `label` text, such as a control that folds the alert. */\n label?: () => unknown;\n}>();\n\nwithDefaults(\n defineProps<{\n /**\n * Controls the visibility of the alert component. If `true`, the alert is visible.\n *\n * @default true\n */\n modelValue?: boolean;\n /**\n * The type of alert, which determines the alert's style and icon.\n * Can be one of `'success' | 'info' | 'warn' | 'error'`.\n */\n type?: \"success\" | \"info\" | \"warn\" | \"error\";\n /**\n * An optional label that appears at the top of the alert.\n */\n label?: string;\n /**\n * If `true`, an icon corresponding to the alert type is displayed.\n */\n icon?: boolean;\n /**\n * If `true`, a close button is displayed in the alert, allowing the user to close it.\n */\n closeable?: boolean;\n /**\n * If `true`, the alert text is displayed in a monospace font.\n */\n monospace?: boolean;\n /**\n * If `true`, the alert content will preserve whitespace and line breaks.\n */\n whiteSpacePre?: boolean;\n\n /**\n * Max height (css value like '120px or 30%')\n */\n maxHeight?: string;\n }>(),\n {\n modelValue: true,\n type: undefined,\n label: undefined,\n icon: undefined,\n closeable: undefined,\n monospace: undefined,\n whiteSpacePre: undefined,\n maxHeight: undefined,\n },\n);\n\nconst iconMap = {\n success: \"success\",\n warn: \"warning\",\n info: \"edit\",\n error: \"error\",\n} satisfies Record<string, MaskIconName24>;\n</script>\n\n<template>\n <div\n v-if=\"modelValue\"\n data-testid=\"pl-alert\"\n class=\"pl-alert\"\n :style=\"{ maxHeight }\"\n :class=\"[{ monospace, whiteSpacePre }, type ? `pl-alert__${type}` : '']\"\n >\n <div\n v-if=\"icon && type\"\n data-testid=\"pl-alert-icon\"\n class=\"pl-alert__icon\"\n :class=\"{ 'pl-alert__icon--text': !label && !$slots.label }\"\n >\n <PlIcon24 :name=\"iconMap[type]\" />\n </div>\n <div class=\"pl-alert__main\">\n <label v-if=\"label || $slots.label\" data-testid=\"pl-alert-label\">\n <slot name=\"label\">{{ label }}</slot>\n </label>\n <div v-if=\"$slots.default\" data-testid=\"pl-alert-message\" class=\"pl-alert__main__text\">\n <slot />\n </div>\n </div>\n <PlCloseModalBtn\n v-if=\"closeable\"\n data-testid=\"pl-alert-close\"\n class=\"pl-alert__close-btn\"\n @click=\"$emit('update:modelValue', false)\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;CAEE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8ER,IAAMsB,IAAU;GACd,SAAS;GACT,MAAM;GACN,MAAM;GACN,OAAO;EACT;E,iBAKUC,EAAA,cADRrB,EAAA,GAAAC,EA6BM,OAAA;;GA3BJ,eAAY;GACZ,OAAKC,EAAA,CAAC,YAAU,CAAA;IAAA,WAELmB,EAAA;IAAS,eAAEA,EAAA;GAAa,GAAIA,EAAA,OAAI,aAAgBA,EAAA,SAAI,EAAA,CAAA,CAAA;GAD9D,OAAKlB,EAAA,EAAA,WAAIkB,EAAA,UAAS,CAAA;;GAIXA,EAAA,QAAQA,EAAA,QADhBrB,EAAA,GAAAC,EAOM,OAAA;;IALJ,eAAY;IACZ,OAAKC,EAAA,CAAC,kBAAgB,EAAA,wBAAA,CACamB,EAAA,SAAK,CAAKvB,EAAAA,OAAO,MAAK,CAAA,CAAA;G,IAEzDM,EAAkCC,EAAAC,CAAA,GAAA,EAAvB,MAAMc,EAAQC,EAAA,M;GAE3Bb,EAOM,OAPNQ,GAOM,CANSK,EAAA,SAASvB,EAAAA,OAAO,SAA7BE,EAAA,GAAAC,EAEQ,SAFRgB,GAEQ,CADNR,EAAqCiB,EAAA,QAAA,SAAA,CAAA,SAAA,CAAfhB,EAAAC,EAAAU,EAAA,KAAK,GAAA,CAAA,C,mBAElBvB,EAAAA,OAAO,WAAlBE,EAAA,GAAAC,EAEM,OAFNiB,GAEM,CADJT,EAAQiB,EAAA,QAAA,SAAA,C;GAIJL,EAAA,aADRrB,EAAA,GAAAY,EAKEC,GAAA;;IAHA,eAAY;IACZ,OAAM;IACL,SAAK,AAAAsB,EAAA,QAAA,MAAEpC,EAAAA,MAAK,qBAAA,EAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pl-alert{--text-font-family:var(--font-family-base);--text-white-space:normal;--indent:24px;border:1px solid var(--border-color-default);color:var(--txt-01);border-radius:6px;flex-wrap:nowrap;gap:12px;padding:12px;display:flex;position:relative}.pl-alert.monospace{--text-font-family:var(--font-family-monospace)}.pl-alert.whiteSpacePre{--text-white-space:pre}.pl-alert__error{background:var(--notification-error)}.pl-alert__warn{background:var(--notification-warning)}.pl-alert__success{background:var(--notification-success)}.pl-alert__info{background:var(--notification-neutral)}.pl-alert__icon{width:24px}.pl-alert__main{flex-direction:column;flex:1;gap:6px;width:100%;min-height:24px;display:flex;overflow:hidden}.pl-alert__main label{letter-spacing:-.2px;font-size:20px;font-weight:500;line-height:24px}.pl-alert__main__text{font-size:14px;font-weight:500;line-height:20px;font-family:var(--text-font-family);white-space:var(--text-white-space);--thumb-color:var(--ic-02);flex:1;max-width:100%;overflow-y:auto}.pl-alert__main__text::-webkit-scrollbar{width:var(--scrollbar-width,6px);background-color:#0000;height:5px;display:block}.pl-alert__main__text::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.pl-alert__main__text::-webkit-scrollbar-thumb:hover{--thumb-color:var(--border-color-focus)}.pl-alert__close-btn{position:absolute;top:4px;right:12px}
|
|
1
|
+
.pl-alert{--text-font-family:var(--font-family-base);--text-white-space:normal;--indent:24px;border:1px solid var(--border-color-default);color:var(--txt-01);border-radius:6px;flex-wrap:nowrap;gap:12px;padding:12px;display:flex;position:relative}.pl-alert.monospace{--text-font-family:var(--font-family-monospace)}.pl-alert.whiteSpacePre{--text-white-space:pre}.pl-alert__error{background:var(--notification-error)}.pl-alert__warn{background:var(--notification-warning)}.pl-alert__success{background:var(--notification-success)}.pl-alert__info{background:var(--notification-neutral)}.pl-alert__icon{--icon-color:var(--ic-01);width:24px;height:24px}.pl-alert__icon--text{margin-top:-2px}.pl-alert__main{flex-direction:column;flex:1;gap:6px;width:100%;min-height:24px;display:flex;overflow:hidden}.pl-alert__main label{letter-spacing:-.2px;font-size:20px;font-weight:500;line-height:24px}.pl-alert__main__text{font-size:14px;font-weight:500;line-height:20px;font-family:var(--text-font-family);white-space:var(--text-white-space);--thumb-color:var(--ic-02);flex:1;max-width:100%;overflow-y:auto}.pl-alert__main__text::-webkit-scrollbar{width:var(--scrollbar-width,6px);background-color:#0000;height:5px;display:block}.pl-alert__main__text::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.pl-alert__main__text::-webkit-scrollbar-thumb:hover{--thumb-color:var(--border-color-focus)}.pl-alert__close-btn{position:absolute;top:4px;right:12px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/uikit",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"./svg/images/*": "./src/assets/images/*"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@milaboratories/helpers": "1.14.
|
|
19
|
-
"@platforma-sdk/model": "1.88.
|
|
18
|
+
"@milaboratories/helpers": "1.14.7",
|
|
19
|
+
"@platforma-sdk/model": "1.88.8",
|
|
20
20
|
"@types/d3-array": "^3.2.1",
|
|
21
21
|
"@types/d3-axis": "^3.0.6",
|
|
22
22
|
"@types/d3-scale": "^4.0.9",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"d3-axis": "^3.0.0",
|
|
31
31
|
"d3-scale": "^4.0.2",
|
|
32
32
|
"d3-selection": "^3.0.0",
|
|
33
|
-
"resize-observer-polyfill": "^1.5.1",
|
|
34
33
|
"sortablejs": "^1.15.6",
|
|
35
34
|
"vue": "3.5.44"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
|
-
"@milaboratories/build-configs": "2.0.
|
|
39
|
-
"@milaboratories/ts-builder": "1.7.
|
|
40
|
-
"@milaboratories/ts-configs": "1.4.
|
|
37
|
+
"@milaboratories/build-configs": "2.0.3",
|
|
38
|
+
"@milaboratories/ts-builder": "1.7.4",
|
|
39
|
+
"@milaboratories/ts-configs": "1.4.1",
|
|
41
40
|
"@vitest/coverage-istanbul": "^4.1.12",
|
|
42
41
|
"jsdom": "^27.4.0",
|
|
42
|
+
"shx": "^0.4.0",
|
|
43
43
|
"svgo": "^3.3.5",
|
|
44
44
|
"typescript": "7.0.2",
|
|
45
45
|
"vitest": "^4.1.12"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"formatter:check": "ts-builder formatter --check",
|
|
64
64
|
"linter:check": "ts-builder linter --check",
|
|
65
65
|
"types:check": "ts-builder type-check --target browser-lib",
|
|
66
|
-
"do-pack": "rm -f *.tgz && pnpm pack && mv *.tgz package.tgz",
|
|
66
|
+
"do-pack": "shx rm -f *.tgz && pnpm pack && shx mv *.tgz package.tgz",
|
|
67
67
|
"fmt": "ts-builder format"
|
|
68
68
|
}
|
|
69
69
|
}
|
package/src/__tests__/setup.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* jsdom has no layout, so nothing is ever resized. The polyfill scheduled animation-frame refreshes
|
|
3
|
+
* that could fire after a test file's window was torn down, failing the run on `_location` of null.
|
|
4
|
+
*/
|
|
5
|
+
class InertResizeObserver implements ResizeObserver {
|
|
6
|
+
observe() {}
|
|
7
|
+
unobserve() {}
|
|
8
|
+
disconnect() {}
|
|
9
|
+
}
|
|
10
|
+
globalThis.ResizeObserver = InertResizeObserver;
|
|
@@ -7,7 +7,9 @@ export default {
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import "./pl-alert.scss";
|
|
9
9
|
|
|
10
|
+
import type { MaskIconName24 } from "../../types";
|
|
10
11
|
import PlCloseModalBtn from "../../utils/PlCloseModalBtn.vue";
|
|
12
|
+
import { PlIcon24 } from "../PlIcon24";
|
|
11
13
|
|
|
12
14
|
defineEmits<{
|
|
13
15
|
/**
|
|
@@ -81,7 +83,7 @@ const iconMap = {
|
|
|
81
83
|
warn: "warning",
|
|
82
84
|
info: "edit",
|
|
83
85
|
error: "error",
|
|
84
|
-
}
|
|
86
|
+
} satisfies Record<string, MaskIconName24>;
|
|
85
87
|
</script>
|
|
86
88
|
|
|
87
89
|
<template>
|
|
@@ -92,8 +94,13 @@ const iconMap = {
|
|
|
92
94
|
:style="{ maxHeight }"
|
|
93
95
|
:class="[{ monospace, whiteSpacePre }, type ? `pl-alert__${type}` : '']"
|
|
94
96
|
>
|
|
95
|
-
<div
|
|
96
|
-
|
|
97
|
+
<div
|
|
98
|
+
v-if="icon && type"
|
|
99
|
+
data-testid="pl-alert-icon"
|
|
100
|
+
class="pl-alert__icon"
|
|
101
|
+
:class="{ 'pl-alert__icon--text': !label && !$slots.label }"
|
|
102
|
+
>
|
|
103
|
+
<PlIcon24 :name="iconMap[type]" />
|
|
97
104
|
</div>
|
|
98
105
|
<div class="pl-alert__main">
|
|
99
106
|
<label v-if="label || $slots.label" data-testid="pl-alert-label">
|