@pocketprep/ui-kit 3.1.5 → 3.1.6

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.
@@ -7,9 +7,9 @@
7
7
  >
8
8
  <slot />
9
9
  </Tooltip>
10
- <template v-if="id">
10
+ <template v-if="uid">
11
11
  <div
12
- :ref="`content_${id}`"
12
+ :ref="`content_${uid}`"
13
13
  class="uikit-overflow-tooltip__content"
14
14
  @mouseenter="showTooltip = true"
15
15
  @mouseleave="showTooltip = false"
@@ -18,7 +18,7 @@
18
18
  </div>
19
19
  <div
20
20
  v-if="!measurementComplete"
21
- :ref="`content_fullwidth_${id}`"
21
+ :ref="`content_fullwidth_${uid}`"
22
22
  class="uikit-overflow-tooltip__content uikit-overflow-tooltip__content--full-width"
23
23
  >
24
24
  <slot />
@@ -40,14 +40,12 @@ export default class OverflowTooltip extends Vue {
40
40
  showTooltip = false
41
41
  textOverflows = false
42
42
  measurementComplete = false
43
- id: string | null = null
44
- created () {
45
- this.id = (this as unknown as { _uid: string })._uid
46
- }
43
+ uid = Math.floor(Math.random() * 1e9)
47
44
 
48
45
  mounted () {
49
- const content = this.$refs[`content_${this.id}`] as HTMLElement
50
- const contentFullWidth = this.$refs[`content_fullwidth_${this.id}`] as HTMLElement
46
+ const content = this.$refs[`content_${this.uid}`] as HTMLElement
47
+ const contentFullWidth = this.$refs[`content_fullwidth_${this.uid}`] as HTMLElement
48
+
51
49
  this.$nextTick(() => {
52
50
  const truncatedWidth = content.getBoundingClientRect().width
53
51
  const fullWidth = contentFullWidth.getBoundingClientRect().width
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/ui-kit",
3
- "version": "3.1.5",
3
+ "version": "3.1.6",
4
4
  "description": "Pocket Prep UI Kit",
5
5
  "author": "pocketprep",
6
6
  "scripts": {