@milaboratories/uikit 2.2.28 → 2.2.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/uikit",
3
- "version": "2.2.28",
3
+ "version": "2.2.29",
4
4
  "type": "module",
5
5
  "main": "dist/pl-uikit.umd.js",
6
6
  "module": "dist/pl-uikit.js",
@@ -32,9 +32,9 @@
32
32
  "vue-tsc": "^2.1.10",
33
33
  "yarpm": "^1.2.0",
34
34
  "svgo": "^3.3.2",
35
- "@milaboratories/helpers": "^1.6.9",
36
35
  "@milaboratories/eslint-config": "^1.0.0",
37
- "@platforma-sdk/model": "^1.17.0"
36
+ "@platforma-sdk/model": "^1.18.0",
37
+ "@milaboratories/helpers": "^1.6.9"
38
38
  },
39
39
  "scripts": {
40
40
  "dev": "vite",
@@ -14,12 +14,27 @@ const slots = useSlots();
14
14
  defineProps<{
15
15
  noBodyGutters?: boolean;
16
16
  }>();
17
+
18
+ const setTitleIfNeeded = (el: HTMLElement) => {
19
+ el.removeAttribute('title');
20
+ if (el.clientWidth < el.scrollWidth) {
21
+ el.setAttribute('title', el.innerText);
22
+ }
23
+ };
24
+
25
+ const vTextOverflownTitle = {
26
+ mounted: setTitleIfNeeded,
27
+ updated: setTitleIfNeeded,
28
+ };
17
29
  </script>
18
30
 
19
31
  <template>
20
32
  <div class="pl-layout-component pl-block-page" :class="{ noBodyGutters }">
21
33
  <div v-if="slots.title" class="pl-block-page__title">
22
- <div class="pl-block-page__title__default"><slot name="title" /></div>
34
+ <div class="pl-block-page__title__default">
35
+ <span v-text-overflown-title><slot name="title" /></span>
36
+ <slot name="after-title" />
37
+ </div>
23
38
  <div class="pl-block-page__title__append">
24
39
  <slot name="append" />
25
40
  </div>
@@ -20,19 +20,32 @@
20
20
  align-items: center;
21
21
  gap: 12px;
22
22
  padding: 20px 24px;
23
+ min-width: 0;
24
+ max-width: 100%;
23
25
 
24
26
  &__default {
25
27
  flex: 1;
28
+ min-width: 0;
29
+ max-width: 100%;
26
30
  margin: 0;
27
31
  color: var(--txt-01);
28
- font-size: 28px;
29
- font-weight: 500;
30
- line-height: 32px;
31
- letter-spacing: -0.56px;
32
32
  display: flex;
33
33
  flex-direction: row;
34
34
  align-items: center;
35
35
  gap: 12px;
36
+
37
+ > span {
38
+ font-size: 28px;
39
+ font-weight: 500;
40
+ line-height: 36px;
41
+ letter-spacing: -0.56px;
42
+ white-space: nowrap;
43
+ overflow: hidden;
44
+ text-overflow: ellipsis;
45
+ min-width: 0;
46
+ max-width: 100%;
47
+ display: inline-block;
48
+ }
36
49
  }
37
50
 
38
51
  &__append {