@thinkpixellab-public/px-vue 4.0.27 → 4.0.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.
@@ -55,7 +55,7 @@
55
55
  <script>
56
56
  import PxBaseVariants from '../bases/PxBaseVariants.vue';
57
57
  import { computePosition, autoUpdate, flip, shift, offset, size } from '@floating-ui/dom';
58
- import { disableBodyScroll, enableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock';
58
+ import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
59
59
 
60
60
  const FOCUS_ELEMENTS = [
61
61
  'button',
@@ -400,7 +400,9 @@ export default {
400
400
 
401
401
  if (nv) {
402
402
  if (this.disablesScroll) {
403
- disableBodyScroll(this.$refs.popup, { reserveScrollBarGap: true });
403
+ if (this.$refs.popup) {
404
+ disableBodyScroll(this.$refs.popup, { reserveScrollBarGap: true });
405
+ }
404
406
 
405
407
  if (!globalClearLayerIndex) {
406
408
  globalClearLayerIndex = globalLayerIndex;
@@ -424,7 +426,10 @@ export default {
424
426
  transitionVisible() {
425
427
  if (!this.transitionVisible) {
426
428
  this.$emit('afterhide');
427
- enableBodyScroll(this.$refs.popup, { reserveScrollBarGap: true });
429
+
430
+ if (this.$refs.popup) {
431
+ enableBodyScroll(this.$refs.popup, { reserveScrollBarGap: true });
432
+ }
428
433
  }
429
434
  },
430
435
  },
@@ -32,7 +32,7 @@ export default {
32
32
  padding: { type: Number, default: 0 },
33
33
  },
34
34
  data() {
35
- return { size: null };
35
+ return { size: 0 };
36
36
  },
37
37
  mounted() {
38
38
  this.size = Math.min(this.$el.clientWidth, this.$el.clientHeight);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkpixellab-public/px-vue",
3
- "version": "4.0.27",
3
+ "version": "4.0.29",
4
4
  "description": "General purpose Vue components and helpers that can be used across projects.",
5
5
  "author": {
6
6
  "name": "Pixel Lab"
@@ -37,7 +37,13 @@ var balanceText = function (element, lineAdjust = ADJUST) {
37
37
  function squeezeContainer(headline, originalHeight, bottomRange, topRange, lineAdjust = ADJUST) {
38
38
  var mid;
39
39
  if (bottomRange >= topRange) {
40
- headline.style.maxWidth = topRange * lineAdjust + 'px';
40
+ // need to handle the case where the headline is not wrapping and is just too wide for it's container
41
+ // this mainly seems to happen when in character based languages
42
+ if (headline.scrollWidth > topRange * lineAdjust) {
43
+ headline.style.maxWidth = headline.scrollWidth + 'px';
44
+ } else {
45
+ headline.style.maxWidth = topRange * lineAdjust + 'px';
46
+ }
41
47
  return;
42
48
  }
43
49
  mid = (bottomRange + topRange) / 2;