@eturnity/eturnity_reusable_components 9.34.1 → 9.34.3

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": "@eturnity/eturnity_reusable_components",
3
- "version": "9.34.1",
3
+ "version": "9.34.3",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -244,14 +244,10 @@
244
244
  default: '400px',
245
245
  type: String,
246
246
  },
247
- // Floor for the measured popup width; lower it (e.g. '0') for short
248
- // tooltip-style content.
249
247
  minWidth: {
250
248
  default: '230px',
251
249
  type: String,
252
250
  },
253
- // Padding of the popup box; tighten (e.g. '6px 10px') for
254
- // tooltip-style content.
255
251
  contentPadding: {
256
252
  default: '',
257
253
  type: String,
@@ -579,15 +575,11 @@
579
575
  clone.style.whiteSpace = 'nowrap' // Prevent text wrapping during measurement
580
576
  document.body.appendChild(clone)
581
577
 
582
- // Get fresh content width from clone. offsetWidth rounds to an
583
- // integer, which can under-measure by <1px and wrap an exact-fit
584
- // line — use the subpixel rect width, ceiled.
578
+ // Get fresh content width from clone
585
579
  const contentWidth = Math.ceil(clone.getBoundingClientRect().width)
586
580
  document.body.removeChild(clone)
587
581
 
588
- // Calculate new width. The measured clone is the bare text span, but
589
- // TextOverlay wraps it with 10px horizontal padding each side under
590
- // border-box sizing — compensate or exact-fit content wraps.
582
+ // Calculate new width
591
583
  const TEXT_OVERLAY_HORIZONTAL_PADDING_PX = 20
592
584
  const calculatedWidth = Math.min(
593
585
  Math.max(
@@ -665,9 +657,6 @@
665
657
  }
666
658
  })
667
659
 
668
- // The text can change while the popup is open (e.g. a save button's
669
- // tooltip flipping to "saving in progress" mid-hover) — re-measure so
670
- // the box fits the new content instead of wrapping in the old width.
671
660
  watch(
672
661
  () => props.text,
673
662
  async () => {
@@ -83,9 +83,7 @@ describe('InfoText Component', () => {
83
83
  const showPopup = async (w) => {
84
84
  w.vm.isMobile = false
85
85
  await w.vm.$nextTick()
86
- // the hover listener sits on the component root
87
86
  await w.trigger("mouseenter")
88
- // updatePosition awaits two ticks before measuring
89
87
  await new Promise((resolve) => setTimeout(resolve))
90
88
  await w.vm.$nextTick()
91
89
  }
@@ -96,7 +94,6 @@ describe('InfoText Component', () => {
96
94
  global: { stubs: { teleport: true } },
97
95
  })
98
96
  await showPopup(roomy)
99
- // jsdom measures content at 0px, so the floor is what remains
100
97
  expect(roomy.vm.infoBoxWidth).toBe(230)
101
98
  })
102
99
 
@@ -117,7 +114,6 @@ describe('InfoText Component', () => {
117
114
  global: { stubs: { teleport: true } },
118
115
  })
119
116
  await showPopup(small)
120
- // jsdom content measures 0px; only the padding compensation remains
121
117
  expect(small.vm.infoBoxWidth).toBe(20)
122
118
  })
123
119
  })
@@ -126,8 +122,6 @@ describe('InfoText Component', () => {
126
122
  let rectSpy
127
123
 
128
124
  beforeEach(() => {
129
- // jsdom measures everything at 0; size rects from text length so the
130
- // popup width tracks the measured clone's content.
131
125
  rectSpy = jest
132
126
  .spyOn(Element.prototype, 'getBoundingClientRect')
133
127
  .mockImplementation(function () {
@@ -4,9 +4,11 @@ const TEXT_VARIANTS = {
4
4
  HEADING_SMALL: 'heading-small',
5
5
  HEADING_MEDIUM: 'heading-medium',
6
6
  HEADING_LARGE: 'heading-large',
7
+ BODY_XSMALL: 'body-xsmall',
7
8
  BODY_SMALL: 'body-small',
8
9
  BODY_MEDIUM: 'body-medium',
9
10
  BODY_LARGE: 'body-large',
11
+ SUBHEADING_XSMALL: 'subheading-xsmall',
10
12
  SUBHEADING_SMALL: 'subheading-small',
11
13
  SUBHEADING_MEDIUM: 'subheading-medium',
12
14
  SUBHEADING_LARGE: 'subheading-large',
@@ -31,11 +33,17 @@ const textVariants = {
31
33
  lineHeight: '130%',
32
34
  letterSpacing: '-0.36px',
33
35
  },
36
+ [TEXT_VARIANTS.SUBHEADING_XSMALL]: {
37
+ fontSize: '10px',
38
+ fontWeight: '500',
39
+ lineHeight: '140%',
40
+ letterSpacing: '-1%',
41
+ },
34
42
  [TEXT_VARIANTS.SUBHEADING_SMALL]: {
35
43
  fontSize: '12px',
36
44
  fontWeight: '500',
37
45
  lineHeight: '140%',
38
- letterSpacing: '-0.12px',
46
+ letterSpacing: '-1%',
39
47
  },
40
48
  [TEXT_VARIANTS.SUBHEADING_MEDIUM]: {
41
49
  fontSize: '14px',
@@ -49,6 +57,11 @@ const textVariants = {
49
57
  lineHeight: '140%',
50
58
  letterSpacing: '-0.16px',
51
59
  },
60
+ [TEXT_VARIANTS.BODY_XSMALL]: {
61
+ fontSize: '10px',
62
+ fontWeight: '400',
63
+ lineHeight: '150%',
64
+ },
52
65
  [TEXT_VARIANTS.BODY_SMALL]: {
53
66
  fontSize: '12px',
54
67
  fontWeight: '400',