@milaboratories/uikit 2.17.0 → 2.17.1

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.
@@ -17,7 +17,7 @@ transforming...
17
17
  rendering chunks...
18
18
  
19
19
  [unplugin:dts] Start generate declaration files...
20
- [unplugin:dts] Declaration files built in 6722ms.
20
+ [unplugin:dts] Declaration files built in 5915ms.
21
21
  
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.38 kB │ gzip: 0.54 kB
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.28 kB
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
- ✓ built in 8.83s
798
- [PLUGIN_TIMINGS] JavaScript callbacks ran for 8.6s of this 8.8s build (98%).
797
+ ✓ built in 7.77s
798
+ [PLUGIN_TIMINGS] JavaScript callbacks ran for 7.6s of this 7.7s 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%, 6.2s, 1 call)
800
+ - plugin unplugin-dts buildStart (71%, 5.5s, 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)
@@ -6,5 +6,5 @@ Checking formatting...
6
6
  Checking formatting...
7
7
 
8
8
  All matched files use the correct format.
9
- Finished in 793ms on 390 files using 16 threads.
9
+ Finished in 1239ms on 390 files using 16 threads.
10
10
  Format check completed successfully
@@ -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 30ms on 317 files with 108 rules using 16 threads.
7
+ Finished in 38ms on 317 files with 108 rules using 16 threads.
8
8
  Linting completed successfully
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @milaboratories/uikit
2
2
 
3
+ ## 2.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 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.
8
+
3
9
  ## 2.17.0
4
10
 
5
11
  ### 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};\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 v-if=\"icon && type\" data-testid=\"pl-alert-icon\" class=\"pl-alert__icon\">\n <div :class=\"`icon-24 icon-${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
+ {"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":"AAoHA,OAAO,iBAAiB,CAAC;wBAKJ,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;EA4KnB,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
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 e from "../../utils/PlCloseModalBtn.js";
3
- import { createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, openBlock as l, renderSlot as u, toDisplayString as d } from "vue";
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 f = {
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
- }, h = {
10
+ }, _ = {
13
11
  key: 1,
14
12
  "data-testid": "pl-alert-message",
15
13
  class: "pl-alert__main__text"
16
- }, g = /*@__PURE__*/ o({
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(o) {
45
- let g = {
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 (_, v) => o.modelValue ? (l(), r("div", {
49
+ return (y, b) => c.modelValue ? (d(), i("div", {
52
50
  key: 0,
53
51
  "data-testid": "pl-alert",
54
- class: s(["pl-alert", [{
55
- monospace: o.monospace,
56
- whiteSpacePre: o.whiteSpacePre
57
- }, o.type ? `pl-alert__${o.type}` : ""]]),
58
- style: c({ maxHeight: o.maxHeight })
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
- o.icon && o.type ? (l(), r("div", f, [i("div", { class: s(`icon-24 icon-${g[o.type]}`) }, null, 2)])) : n("", !0),
61
- i("div", p, [o.label || _.$slots.label ? (l(), r("label", m, [u(_.$slots, "label", {}, () => [a(d(o.label), 1)])])) : n("", !0), _.$slots.default ? (l(), r("div", h, [u(_.$slots, "default")])) : n("", !0)]),
62
- o.closeable ? (l(), t(e, {
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: v[0] ||= (e) => _.$emit("update:modelValue", !1)
67
- })) : n("", !0)
68
- ], 6)) : n("", !0);
68
+ onClick: b[0] ||= (e) => y.$emit("update:modelValue", !1)
69
+ })) : r("", !0)
70
+ ], 6)) : r("", !0);
69
71
  }
70
72
  });
71
- export { g as default };
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","_createElementVNode","_createCommentVNode","_renderSlot","_createTextVNode","_toDisplayString","_createBlock","PlCloseModalBtn","PlCloseModalBtn_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","PlAlert_vue_vue_type_script_setup_true_lang_default","iconMap","__props","openBlock","createElementBlock","normalizeClass","normalizeStyle","createElementVNode","createCommentVNode","_ctx","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 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};\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 v-if=\"icon && type\" data-testid=\"pl-alert-icon\" class=\"pl-alert__icon\">\n <div :class=\"`icon-24 icon-${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;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4ER,IAAMmB,IAAU;GACd,SAAS;GACT,MAAM;GACN,MAAM;GACN,OAAO;EACT;E,iBAKUC,EAAA,cADRlB,EAAA,GAAAC,EAwBM,OAAA;;GAtBJ,eAAY;GACZ,OAAKC,EAAA,CAAC,YAAU,CAAA;IAAA,WAELgB,EAAA;IAAS,eAAEA,EAAA;GAAa,GAAIA,EAAA,OAAI,aAAgBA,EAAA,SAAI,EAAA,CAAA,CAAA;GAD9D,OAAKf,EAAA,EAAA,WAAIe,EAAA,UAAS,CAAA;;GAGRA,EAAA,QAAQA,EAAA,QAAnBlB,EAAA,GAAAC,EAEM,OAFNW,GAEM,CADJR,EAAgD,OAAA,EAA1C,OAAKF,EAAA,gBAAkBe,EAAQC,EAAA,OAAI,E;GAE3Cd,EAOM,OAPNS,GAOM,CANSK,EAAA,SAASpB,EAAAA,OAAO,SAA7BE,EAAA,GAAAC,EAEQ,SAFRa,GAEQ,CADNR,EAAqCmB,EAAA,QAAA,SAAA,CAAA,SAAA,CAAflB,EAAAC,EAAAU,EAAA,KAAK,GAAA,CAAA,C,mBAElBpB,EAAAA,OAAO,WAAlBE,EAAA,GAAAC,EAEM,OAFNc,GAEM,CADJT,EAAQmB,EAAA,QAAA,SAAA,C;GAIJP,EAAA,aADRlB,EAAA,GAAAS,EAKEC,GAAA;;IAHA,eAAY;IACZ,OAAM;IACL,SAAK,AAAAoB,EAAA,QAAA,MAAE/B,EAAAA,MAAK,qBAAA,EAAA"}
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.0",
3
+ "version": "2.17.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -30,7 +30,6 @@
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
  },
@@ -1,2 +1,10 @@
1
- import ResizeObserver from "resize-observer-polyfill";
2
- globalThis.ResizeObserver = ResizeObserver;
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 v-if="icon && type" data-testid="pl-alert-icon" class="pl-alert__icon">
96
- <div :class="`icon-24 icon-${iconMap[type]}`" />
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">
@@ -40,6 +40,12 @@
40
40
 
41
41
  &__icon {
42
42
  width: 24px;
43
+ height: 24px;
44
+ --icon-color: var(--ic-01);
45
+
46
+ &--text {
47
+ margin-top: -2px;
48
+ }
43
49
  }
44
50
 
45
51
  &__main {