uikit 3.12.3-dev.0e7855b18 → 3.12.3-dev.3c9ee4dfd

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/css/uikit-core-rtl.css +1 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -1
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +2 -2
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +13 -2
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +13 -2
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +65 -8
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +30 -13
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +13 -2
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +30 -13
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +13 -2
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +12 -20
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +244 -186
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +255 -195
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/hooks.js +3 -3
  44. package/src/js/api/state.js +14 -39
  45. package/src/js/components/countdown.js +1 -1
  46. package/src/js/components/parallax.js +3 -1
  47. package/src/js/components/slider-parallax.js +6 -4
  48. package/src/js/core/core.js +2 -17
  49. package/src/js/core/cover.js +3 -6
  50. package/src/js/core/drop.js +5 -10
  51. package/src/js/core/gif.js +5 -3
  52. package/src/js/core/grid.js +2 -1
  53. package/src/js/core/height-match.js +21 -1
  54. package/src/js/core/height-viewport.js +10 -7
  55. package/src/js/core/img.js +1 -2
  56. package/src/js/core/leader.js +7 -13
  57. package/src/js/core/margin.js +18 -1
  58. package/src/js/core/overflow-auto.js +8 -7
  59. package/src/js/core/scrollspy-nav.js +3 -0
  60. package/src/js/core/scrollspy.js +3 -0
  61. package/src/js/core/sticky.js +7 -1
  62. package/src/js/core/svg.js +16 -14
  63. package/src/js/core/toggle.js +16 -13
  64. package/src/js/core/video.js +2 -8
  65. package/src/js/mixin/media.js +29 -5
  66. package/src/js/mixin/position.js +10 -18
  67. package/src/js/mixin/resize.js +13 -0
  68. package/src/js/mixin/scroll.js +32 -0
  69. package/src/js/mixin/slider.js +2 -1
  70. package/src/js/util/class.js +1 -6
  71. package/src/js/util/observer.js +57 -20
  72. package/tests/js/index.js +1 -1
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.12.3-dev.0e7855b18 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.12.3-dev.3c9ee4dfd | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -850,12 +850,7 @@
850
850
 
851
851
  function hasClass(element, cls) {
852
852
  [cls] = getClasses(cls);
853
- for (const node of toNodes(element)) {
854
- if (cls && node.classList.contains(cls)) {
855
- return true;
856
- }
857
- }
858
- return false;
853
+ return !!cls && toNodes(element).some((node) => node.classList.contains(cls));
859
854
  }
860
855
 
861
856
  function toggleClass(element, cls, force) {
@@ -1467,34 +1462,69 @@
1467
1462
  return { x: x1 + ua * (x2 - x1), y: y1 + ua * (y2 - y1) };
1468
1463
  }
1469
1464
 
1470
- // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
1471
- const hasIntersectionObserver =
1472
- window.IntersectionObserver && 'isIntersecting' in IntersectionObserverEntry.prototype;
1473
1465
  function observeIntersection(targets, cb, options, intersecting) {if (intersecting === void 0) {intersecting = true;}
1474
- if (!hasIntersectionObserver) {
1475
- return;
1476
- }
1477
-
1478
- const observer = new IntersectionObserver((entries, observer) => {
1479
- if (!intersecting || entries.some((entry) => entry.isIntersecting)) {
1466
+ return observe(
1467
+ IntersectionObserver,
1468
+ targets,
1469
+ intersecting ?
1470
+ (entries, observer) => {
1471
+ if (entries.some((entry) => entry.isIntersecting)) {
1480
1472
  cb(entries, observer);
1481
1473
  }
1482
- }, options);
1483
- for (const el of toNodes(targets)) {
1484
- observer.observe(el);
1485
- }
1486
- return observer;
1474
+ } :
1475
+ cb,
1476
+ options);
1477
+
1487
1478
  }
1488
1479
 
1489
1480
  const hasResizeObserver = window.ResizeObserver;
1490
1481
  function observeResize(targets, cb, options) {if (options === void 0) {options = { box: 'border-box' };}
1491
- if (!hasResizeObserver) {
1482
+ if (hasResizeObserver) {
1483
+ return observe(ResizeObserver, targets, cb, options);
1484
+ }
1485
+
1486
+ // Fallback Safari < 13.1
1487
+ initResizeListener();
1488
+ listeners.add(cb);
1489
+
1490
+ return {
1491
+ disconnect() {
1492
+ listeners.delete(cb);
1493
+ } };
1494
+
1495
+ }
1496
+
1497
+ let listeners;
1498
+ function initResizeListener() {
1499
+ if (listeners) {
1492
1500
  return;
1493
1501
  }
1494
1502
 
1495
- const observer = new ResizeObserver((entries, observer) => {
1496
- cb(entries, observer);
1497
- });
1503
+ listeners = new Set();
1504
+
1505
+ // throttle 'resize'
1506
+ let pendingResize;
1507
+ const handleResize = () => {
1508
+ if (pendingResize) {
1509
+ return;
1510
+ }
1511
+ pendingResize = true;
1512
+ fastdom.read(() => pendingResize = false);
1513
+ for (const listener of listeners) {
1514
+ listener();
1515
+ }
1516
+ };
1517
+
1518
+ on(window, 'load resize', handleResize);
1519
+ on(document, 'loadedmetadata load', handleResize, true);
1520
+ }
1521
+
1522
+ function observeMutation(targets, cb, options) {
1523
+ return observe(MutationObserver, targets, cb, options);
1524
+ }
1525
+
1526
+ function observe(Observer, targets, cb, options) {
1527
+ const observer = new Observer(cb);
1498
1528
  for (const el of toNodes(targets)) {
1499
1529
  observer.observe(el, options);
1500
1530
  }
@@ -2179,9 +2209,9 @@
2179
2209
  memoize: memoize,
2180
2210
  Deferred: Deferred,
2181
2211
  MouseTracker: MouseTracker,
2182
- hasIntersectionObserver: hasIntersectionObserver,
2183
2212
  observeIntersection: observeIntersection,
2184
2213
  observeResize: observeResize,
2214
+ observeMutation: observeMutation,
2185
2215
  mergeOptions: mergeOptions,
2186
2216
  parseOptions: parseOptions,
2187
2217
  play: play,
@@ -2289,7 +2319,7 @@
2289
2319
  }
2290
2320
 
2291
2321
  this._data = {};
2292
- this._computeds = {};
2322
+ this._computed = {};
2293
2323
 
2294
2324
  this._initProps();
2295
2325
 
@@ -2383,8 +2413,8 @@
2383
2413
  const {
2384
2414
  $options: { computed } } =
2385
2415
  this;
2386
- const values = { ...this._computeds };
2387
- this._computeds = {};
2416
+ const values = { ...this._computed };
2417
+ this._computed = {};
2388
2418
 
2389
2419
  for (const key in computed) {
2390
2420
  const { watch, immediate } = computed[key];
@@ -2442,7 +2472,7 @@
2442
2472
  UIkit.prototype._initComputeds = function () {
2443
2473
  const { computed } = this.$options;
2444
2474
 
2445
- this._computeds = {};
2475
+ this._computed = {};
2446
2476
 
2447
2477
  if (computed) {
2448
2478
  for (const key in computed) {
@@ -2481,22 +2511,19 @@
2481
2511
  }
2482
2512
  }
2483
2513
  }
2484
- for (const { events = [] } of this.$options.update || []) {
2485
- if (includes(events, 'scroll')) {
2486
- registerScrollListener(this._uid, () => this.$emit('scroll'));
2487
- break;
2488
- }
2489
- }
2490
2514
  };
2491
2515
 
2492
2516
  UIkit.prototype._unbindEvents = function () {
2493
2517
  this._events.forEach((unbind) => unbind());
2494
2518
  delete this._events;
2495
- unregisterScrollListener(this._uid);
2496
2519
  };
2497
2520
 
2498
2521
  UIkit.prototype._initObservers = function () {
2499
- this._observers = [initChildListObserver(this), initPropsObserver(this)];
2522
+ this._observers = [initPropsObserver(this)];
2523
+
2524
+ if (this.$options.computed) {
2525
+ this.registerObserver(initChildListObserver(this));
2526
+ }
2500
2527
  };
2501
2528
 
2502
2529
  UIkit.prototype.registerObserver = function (observer) {
@@ -2550,22 +2577,22 @@
2550
2577
  enumerable: true,
2551
2578
 
2552
2579
  get() {
2553
- const { _computeds, $props, $el } = component;
2580
+ const { _computed, $props, $el } = component;
2554
2581
 
2555
- if (!hasOwn(_computeds, key)) {
2556
- _computeds[key] = (cb.get || cb).call(component, $props, $el);
2582
+ if (!hasOwn(_computed, key)) {
2583
+ _computed[key] = (cb.get || cb).call(component, $props, $el);
2557
2584
  }
2558
2585
 
2559
- return _computeds[key];
2586
+ return _computed[key];
2560
2587
  },
2561
2588
 
2562
2589
  set(value) {
2563
- const { _computeds } = component;
2590
+ const { _computed } = component;
2564
2591
 
2565
- _computeds[key] = cb.set ? cb.set.call(component, value) : value;
2592
+ _computed[key] = cb.set ? cb.set.call(component, value) : value;
2566
2593
 
2567
- if (isUndefined(_computeds[key])) {
2568
- delete _computeds[key];
2594
+ if (isUndefined(_computed[key])) {
2595
+ delete _computed[key];
2569
2596
  }
2570
2597
  } });
2571
2598
 
@@ -2693,27 +2720,6 @@
2693
2720
  return observer;
2694
2721
  }
2695
2722
 
2696
- const scrollListeners = new Map();
2697
- let unbindScrollListener;
2698
- function registerScrollListener(id, listener) {
2699
- unbindScrollListener =
2700
- unbindScrollListener ||
2701
- on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
2702
- passive: true,
2703
- capture: true });
2704
-
2705
-
2706
- scrollListeners.set(id, listener);
2707
- }
2708
-
2709
- function unregisterScrollListener(id) {
2710
- scrollListeners.delete(id);
2711
- if (unbindScrollListener && !scrollListeners.size) {
2712
- unbindScrollListener();
2713
- unbindScrollListener = null;
2714
- }
2715
- }
2716
-
2717
2723
  function instanceAPI (UIkit) {
2718
2724
  const DATA = UIkit.data;
2719
2725
 
@@ -2887,7 +2893,7 @@
2887
2893
  UIkit.data = '__uikit__';
2888
2894
  UIkit.prefix = 'uk-';
2889
2895
  UIkit.options = {};
2890
- UIkit.version = '3.12.3-dev.0e7855b18';
2896
+ UIkit.version = '3.12.3-dev.3c9ee4dfd';
2891
2897
 
2892
2898
  globalAPI(UIkit);
2893
2899
  hooksAPI(UIkit);
@@ -2895,26 +2901,11 @@
2895
2901
  componentAPI(UIkit);
2896
2902
  instanceAPI(UIkit);
2897
2903
 
2898
- function Core (UIkit) {
2904
+ function Core () {
2899
2905
  if (!inBrowser) {
2900
2906
  return;
2901
2907
  }
2902
2908
 
2903
- // throttle 'resize'
2904
- let pendingResize;
2905
- const handleResize = () => {
2906
- if (pendingResize) {
2907
- return;
2908
- }
2909
- pendingResize = true;
2910
- fastdom.read(() => pendingResize = false);
2911
- UIkit.update(null, 'resize');
2912
- };
2913
-
2914
- on(window, 'load resize', handleResize);
2915
- on(document, 'loadedmetadata load', handleResize, true);
2916
- observeResize(document.documentElement, handleResize);
2917
-
2918
2909
  let started = 0;
2919
2910
  on(
2920
2911
  document,
@@ -3381,13 +3372,9 @@
3381
3372
  autoplay: true },
3382
3373
 
3383
3374
 
3384
- computed: {
3385
- inView(_ref) {let { autoplay } = _ref;
3386
- return autoplay === 'inview';
3387
- } },
3388
-
3389
-
3390
3375
  connected() {
3376
+ this.inView = this.autoplay === 'inview';
3377
+
3391
3378
  if (this.inView && !hasAttr(this.$el, 'preload')) {
3392
3379
  this.$el.preload = 'none';
3393
3380
  }
@@ -3411,18 +3398,27 @@
3411
3398
 
3412
3399
  },
3413
3400
 
3414
- write(_ref2) {let { visible, inView } = _ref2;
3401
+ write(_ref) {let { visible, inView } = _ref;
3415
3402
  if (!visible || this.inView && !inView) {
3416
3403
  pause(this.$el);
3417
3404
  } else if (this.autoplay === true || this.inView && inView) {
3418
3405
  play(this.$el);
3419
3406
  }
3420
- },
3407
+ } } };
3421
3408
 
3422
- events: ['resize', 'scroll'] } };
3409
+ var Resize = {
3410
+ computed: {
3411
+ resizeTargets() {
3412
+ return this.$el;
3413
+ } },
3414
+
3415
+
3416
+ connected() {
3417
+ this.registerObserver(observeResize(this.resizeTargets, () => this.$emit('resize')));
3418
+ } };
3423
3419
 
3424
3420
  var cover = {
3425
- mixins: [Video],
3421
+ mixins: [Resize, Video],
3426
3422
 
3427
3423
  props: {
3428
3424
  width: Number,
@@ -3433,10 +3429,6 @@
3433
3429
  automute: true },
3434
3430
 
3435
3431
 
3436
- connected() {
3437
- this.registerObserver(observeResize(this.$el, () => this.$emit('resize')));
3438
- },
3439
-
3440
3432
  update: {
3441
3433
  read() {
3442
3434
  const el = this.$el;
@@ -3505,19 +3497,11 @@
3505
3497
  clsPos: '' },
3506
3498
 
3507
3499
 
3508
- computed: {
3509
- pos(_ref) {let { pos } = _ref;
3510
- return pos.split('-').concat('center').slice(0, 2);
3511
- },
3512
-
3513
- dir() {
3514
- return this.pos[0];
3515
- },
3516
-
3517
- align() {
3518
- return this.pos[1];
3519
- } },
3520
-
3500
+ connected() {
3501
+ this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
3502
+ this.dir = this.pos[0];
3503
+ this.align = this.pos[1];
3504
+ },
3521
3505
 
3522
3506
  methods: {
3523
3507
  positionAt(element, target, boundary) {
@@ -3525,6 +3509,8 @@
3525
3509
 
3526
3510
  let { offset: offset$1 } = this;
3527
3511
  const axis = this.getAxis();
3512
+ const dir = this.pos[0];
3513
+ const align = this.pos[1];
3528
3514
 
3529
3515
  if (!isNumeric(offset$1)) {
3530
3516
  const node = $(offset$1);
@@ -3537,13 +3523,11 @@
3537
3523
  const { x, y } = positionAt(
3538
3524
  element,
3539
3525
  target,
3540
- axis === 'x' ?
3541
- flipPosition(this.dir) + " " + this.align :
3542
- this.align + " " + flipPosition(this.dir),
3543
- axis === 'x' ? this.dir + " " + this.align : this.align + " " + this.dir,
3526
+ axis === 'x' ? flipPosition(dir) + " " + align : align + " " + flipPosition(dir),
3527
+ axis === 'x' ? dir + " " + align : align + " " + dir,
3544
3528
  axis === 'x' ? "" + (
3545
- this.dir === 'left' ? -offset$1 : offset$1) : " " + (
3546
- this.dir === 'top' ? -offset$1 : offset$1),
3529
+ dir === 'left' ? -offset$1 : offset$1) : " " + (
3530
+ dir === 'top' ? -offset$1 : offset$1),
3547
3531
  null,
3548
3532
  this.flip,
3549
3533
  boundary).
@@ -3755,9 +3739,7 @@
3755
3739
 
3756
3740
  this.tracker.init();
3757
3741
 
3758
- once(
3759
- this.$el,
3760
- 'hide',
3742
+ for (const handler of [
3761
3743
  on(
3762
3744
  document,
3763
3745
  pointerDown,
@@ -3779,19 +3761,16 @@
3779
3761
  true));}),
3780
3762
 
3781
3763
 
3782
- { self: true });
3783
-
3784
3764
 
3785
- once(
3786
- this.$el,
3787
- 'hide',
3788
3765
  on(document, 'keydown', (e) => {
3789
3766
  if (e.keyCode === 27) {
3790
3767
  this.hide(false);
3791
3768
  }
3792
3769
  }),
3793
- { self: true });
3794
-
3770
+ on(window, 'resize', () => this.$emit('resize'))])
3771
+ {
3772
+ once(this.$el, 'hide', handler, { self: true });
3773
+ }
3795
3774
  } },
3796
3775
 
3797
3776
 
@@ -4008,6 +3987,10 @@
4008
3987
 
4009
3988
  // Deprecated
4010
3989
  var gif = {
3990
+ connected() {
3991
+ this.registerObserver(observeIntersection(this.$el, () => this.$emit()));
3992
+ },
3993
+
4011
3994
  update: {
4012
3995
  read(data) {
4013
3996
  const inview = isInView(this.$el);
@@ -4021,9 +4004,7 @@
4021
4004
 
4022
4005
  write() {
4023
4006
  this.$el.src = '' + this.$el.src; // force self-assign
4024
- },
4025
-
4026
- events: ['scroll', 'resize'] } };
4007
+ } } };
4027
4008
 
4028
4009
  var Margin = {
4029
4010
  props: {
@@ -4036,6 +4017,16 @@
4036
4017
  firstColumn: 'uk-first-column' },
4037
4018
 
4038
4019
 
4020
+ connected() {
4021
+ this.registerObserver(
4022
+ observeMutation(this.$el, () => this.$reset(), {
4023
+ childList: true }));
4024
+
4025
+
4026
+
4027
+ this.registerObserver(observeResize(this.$el.children, () => this.$emit('resize')));
4028
+ },
4029
+
4039
4030
  update: {
4040
4031
  read() {
4041
4032
  const rows = getRows(this.$el.children);
@@ -4137,10 +4128,41 @@
4137
4128
 
4138
4129
  }
4139
4130
 
4131
+ var Scroll = {
4132
+ connected() {
4133
+ registerScrollListener(this._uid, () => this.$emit('scroll'));
4134
+ },
4135
+
4136
+ disconnected() {
4137
+ unregisterScrollListener(this._uid);
4138
+ } };
4139
+
4140
+
4141
+ const scrollListeners = new Map();
4142
+ let unbindScrollListener;
4143
+ function registerScrollListener(id, listener) {
4144
+ unbindScrollListener =
4145
+ unbindScrollListener ||
4146
+ on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
4147
+ passive: true,
4148
+ capture: true });
4149
+
4150
+
4151
+ scrollListeners.set(id, listener);
4152
+ }
4153
+
4154
+ function unregisterScrollListener(id) {
4155
+ scrollListeners.delete(id);
4156
+ if (unbindScrollListener && !scrollListeners.size) {
4157
+ unbindScrollListener();
4158
+ unbindScrollListener = null;
4159
+ }
4160
+ }
4161
+
4140
4162
  var grid = {
4141
4163
  extends: Margin,
4142
4164
 
4143
- mixins: [Class],
4165
+ mixins: [Class, Scroll],
4144
4166
 
4145
4167
  name: 'grid',
4146
4168
 
@@ -4300,9 +4322,21 @@
4300
4322
  computed: {
4301
4323
  elements(_ref, $el) {let { target } = _ref;
4302
4324
  return $$(target, $el);
4325
+ },
4326
+
4327
+ resizeTargets() {
4328
+ this.$el.children;
4303
4329
  } },
4304
4330
 
4305
4331
 
4332
+ connected() {
4333
+ this.registerObserver(
4334
+ observeMutation(this.$el, () => this.$reset(), {
4335
+ childList: true }));
4336
+
4337
+
4338
+ },
4339
+
4306
4340
  update: {
4307
4341
  read() {
4308
4342
  return {
@@ -4360,7 +4394,7 @@
4360
4394
  }
4361
4395
 
4362
4396
  var heightViewport = {
4363
- mixins: [Class],
4397
+ mixins: [Class, Resize],
4364
4398
 
4365
4399
  props: {
4366
4400
  expand: Boolean,
@@ -4376,6 +4410,13 @@
4376
4410
  minHeight: 0 },
4377
4411
 
4378
4412
 
4413
+ computed: {
4414
+ resizeTargets() {
4415
+ // check for offsetTop change
4416
+ return [this.$el, document.documentElement];
4417
+ } },
4418
+
4419
+
4379
4420
  update: {
4380
4421
  read(_ref) {let { minHeight: prev } = _ref;
4381
4422
  if (!isVisible(this.$el)) {
@@ -4416,13 +4457,9 @@
4416
4457
  return { minHeight, prev };
4417
4458
  },
4418
4459
 
4419
- write(_ref2) {let { minHeight, prev } = _ref2;
4460
+ write(_ref2) {let { minHeight } = _ref2;
4420
4461
  css(this.$el, { minHeight });
4421
4462
 
4422
- if (minHeight !== prev) {
4423
- trigger(this.$el, 'resize');
4424
- }
4425
-
4426
4463
  if (this.minHeight && toFloat(css(this.$el, 'minHeight')) < this.minHeight) {
4427
4464
  css(this.$el, 'minHeight', this.minHeight);
4428
4465
  }
@@ -4472,10 +4509,24 @@
4472
4509
  }
4473
4510
 
4474
4511
  this.applyAttributes(svg, el);
4475
- this.$emit();
4512
+
4476
4513
  return this.svgEl = svg;
4477
4514
  }
4478
4515
  }, noop);
4516
+
4517
+ if (this.strokeAnimation) {
4518
+ this.svg.then((el) => {
4519
+ if (this._connected) {
4520
+ applyAnimation(el);
4521
+ this.registerObserver(
4522
+ observeIntersection(el, (records, observer) => {
4523
+ applyAnimation(el);
4524
+ observer.disconnect();
4525
+ }));
4526
+
4527
+ }
4528
+ });
4529
+ }
4479
4530
  },
4480
4531
 
4481
4532
  disconnected() {
@@ -4495,18 +4546,6 @@
4495
4546
  this.svg = null;
4496
4547
  },
4497
4548
 
4498
- update: {
4499
- read() {
4500
- return !!(this.strokeAnimation && this.svgEl && isVisible(this.svgEl));
4501
- },
4502
-
4503
- write() {
4504
- applyAnimation(this.svgEl);
4505
- },
4506
-
4507
- type: ['resize'] },
4508
-
4509
-
4510
4549
  methods: {
4511
4550
  async getSvg() {
4512
4551
  if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
@@ -4856,7 +4895,7 @@
4856
4895
 
4857
4896
 
4858
4897
  connected() {
4859
- if (this.loading !== 'lazy' || !hasIntersectionObserver) {
4898
+ if (this.loading !== 'lazy') {
4860
4899
  this.load();
4861
4900
  return;
4862
4901
  }
@@ -5064,16 +5103,31 @@
5064
5103
 
5065
5104
 
5066
5105
  computed: {
5067
- matchMedia() {
5068
- const media = toMedia(this.media);
5069
- return !media || window.matchMedia(media).matches;
5070
- } } };
5106
+ matchMedia() {var _this$mediaObj;
5107
+ return (_this$mediaObj = this.mediaObj) == null ? void 0 : _this$mediaObj.matches;
5108
+ } },
5109
+
5110
+
5111
+ connected() {
5112
+ const media = toMedia(this.media);
5113
+ this.mediaObj = window.matchMedia(media);
5114
+ const handler = () =>
5115
+ trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5116
+ this.offMediaObj = on(this.mediaObj, 'change', () => {
5117
+ handler();
5118
+ this.$emit('resize');
5119
+ });
5120
+ handler();
5121
+ },
5071
5122
 
5123
+ disconnected() {var _this$offMediaObj;
5124
+ (_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
5125
+ } };
5072
5126
 
5073
5127
 
5074
5128
  function toMedia(value) {
5075
5129
  if (isString(value)) {
5076
- if (value[0] === '@') {
5130
+ if (startsWith(value, '@')) {
5077
5131
  const name = "breakpoint-" + value.substr(1);
5078
5132
  value = toFloat(getCssVar(name));
5079
5133
  } else if (isNaN(value)) {
@@ -5081,11 +5135,11 @@
5081
5135
  }
5082
5136
  }
5083
5137
 
5084
- return value && !isNaN(value) ? "(min-width: " + value + "px)" : false;
5138
+ return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
5085
5139
  }
5086
5140
 
5087
5141
  var leader = {
5088
- mixins: [Class, Media],
5142
+ mixins: [Class, Media, Resize],
5089
5143
 
5090
5144
  props: {
5091
5145
  fill: String },
@@ -5113,26 +5167,19 @@
5113
5167
  },
5114
5168
 
5115
5169
  update: {
5116
- read(_ref2) {let { changed, width } = _ref2;
5117
- const prev = width;
5118
-
5119
- width = Math.floor(this.$el.offsetWidth / 2);
5170
+ read() {
5171
+ const width = Math.trunc(this.$el.offsetWidth / 2);
5120
5172
 
5121
5173
  return {
5122
5174
  width,
5123
5175
  fill: this.fill,
5124
- changed: changed || prev !== width,
5125
5176
  hide: !this.matchMedia };
5126
5177
 
5127
5178
  },
5128
5179
 
5129
- write(data) {
5130
- toggleClass(this.wrapper, this.clsHide, data.hide);
5131
-
5132
- if (data.changed) {
5133
- data.changed = false;
5134
- attr(this.wrapper, this.attrFill, new Array(data.width).join(data.fill));
5135
- }
5180
+ write(_ref2) {let { width, fill, hide } = _ref2;
5181
+ toggleClass(this.wrapper, this.clsHide, hide);
5182
+ attr(this.wrapper, this.attrFill, new Array(width).join(fill));
5136
5183
  },
5137
5184
 
5138
5185
  events: ['resize'] } };
@@ -6237,7 +6284,7 @@
6237
6284
  }
6238
6285
 
6239
6286
  var overflowAuto = {
6240
- mixins: [Class],
6287
+ mixins: [Class, Resize],
6241
6288
 
6242
6289
  props: {
6243
6290
  selContainer: String,
@@ -6258,6 +6305,10 @@
6258
6305
 
6259
6306
  content(_ref2, $el) {let { selContent } = _ref2;
6260
6307
  return closest($el, selContent);
6308
+ },
6309
+
6310
+ resizeTargets() {
6311
+ return [this.container, this.content];
6261
6312
  } },
6262
6313
 
6263
6314
 
@@ -6272,7 +6323,6 @@
6272
6323
  }
6273
6324
 
6274
6325
  return {
6275
- current: toFloat(css(this.$el, 'maxHeight')),
6276
6326
  max: Math.max(
6277
6327
  this.minHeight,
6278
6328
  height(this.container) - (dimensions(this.content).height - height(this.$el))) };
@@ -6280,11 +6330,8 @@
6280
6330
 
6281
6331
  },
6282
6332
 
6283
- write(_ref3) {let { current, max } = _ref3;
6333
+ write(_ref3) {let { max } = _ref3;
6284
6334
  css(this.$el, 'maxHeight', max);
6285
- if (Math.round(current) !== Math.round(max)) {
6286
- trigger(this.$el, 'resize');
6287
- }
6288
6335
  },
6289
6336
 
6290
6337
  events: ['resize'] } };
@@ -6356,6 +6403,8 @@
6356
6403
 
6357
6404
  const stateKey = '_ukScrollspy';
6358
6405
  var scrollspy = {
6406
+ mixins: [Scroll],
6407
+
6359
6408
  args: 'cls',
6360
6409
 
6361
6410
  props: {
@@ -6468,6 +6517,8 @@
6468
6517
  } } };
6469
6518
 
6470
6519
  var scrollspyNav = {
6520
+ mixins: [Scroll],
6521
+
6471
6522
  props: {
6472
6523
  cls: String,
6473
6524
  closest: String,
@@ -6559,7 +6610,7 @@
6559
6610
  events: ['scroll', 'resize'] }] };
6560
6611
 
6561
6612
  var sticky = {
6562
- mixins: [Class, Media],
6613
+ mixins: [Class, Media, Resize, Scroll],
6563
6614
 
6564
6615
  props: {
6565
6616
  position: String,
@@ -6602,6 +6653,10 @@
6602
6653
  return query(widthElement, $el) || this.placeholder;
6603
6654
  },
6604
6655
 
6656
+ resizeTargets() {
6657
+ return document.documentElement;
6658
+ },
6659
+
6605
6660
  isActive: {
6606
6661
  get() {
6607
6662
  return hasClass(this.selTarget, this.clsActive);
@@ -7268,23 +7323,26 @@
7268
7323
  if (e.target === this.target[0]) {
7269
7324
  this.updateAria(toggled);
7270
7325
  }
7271
- } }],
7326
+ } },
7272
7327
 
7273
7328
 
7329
+ {
7330
+ name: 'mediachange',
7274
7331
 
7275
- update: {
7276
- read() {
7277
- return includes(this.mode, 'media') && this.media ? { match: this.matchMedia } : false;
7332
+ filter() {
7333
+ return includes(this.mode, 'media');
7278
7334
  },
7279
7335
 
7280
- write(_ref2) {let { match } = _ref2;
7281
- const toggled = this.isToggled(this.target);
7282
- if (match ? !toggled : toggled) {
7336
+ el() {
7337
+ return this.target;
7338
+ },
7339
+
7340
+ handler(e, mediaObj) {
7341
+ if (mediaObj.matches ^ this.isToggled(this.target)) {
7283
7342
  this.toggle();
7284
7343
  }
7285
- },
7344
+ } }],
7286
7345
 
7287
- events: ['resize'] },
7288
7346
 
7289
7347
 
7290
7348
  methods: {