uikit 3.12.3-dev.ebebb4f57 → 3.13.0

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 (90) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/css/uikit-core-rtl.css +7 -4
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +7 -4
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +7 -4
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +7 -4
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +3 -3
  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 +11 -2
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +13 -4
  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 +61 -10
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +28 -15
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +12 -3
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +28 -15
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +11 -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 +360 -365
  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 +376 -379
  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 +2 -2
  46. package/src/js/components/lightbox.js +1 -1
  47. package/src/js/components/parallax.js +3 -1
  48. package/src/js/components/slider-parallax.js +6 -4
  49. package/src/js/components/slider.js +1 -1
  50. package/src/js/core/accordion.js +6 -3
  51. package/src/js/core/core.js +2 -17
  52. package/src/js/core/cover.js +3 -6
  53. package/src/js/core/drop.js +15 -33
  54. package/src/js/core/form-custom.js +8 -9
  55. package/src/js/core/grid.js +2 -1
  56. package/src/js/core/height-match.js +12 -2
  57. package/src/js/core/height-viewport.js +8 -7
  58. package/src/js/core/icon.js +9 -16
  59. package/src/js/core/img.js +5 -16
  60. package/src/js/core/index.js +0 -1
  61. package/src/js/core/leader.js +7 -13
  62. package/src/js/core/margin.js +16 -1
  63. package/src/js/core/overflow-auto.js +7 -10
  64. package/src/js/core/responsive.js +7 -0
  65. package/src/js/core/scroll.js +6 -2
  66. package/src/js/core/scrollspy-nav.js +19 -16
  67. package/src/js/core/scrollspy.js +5 -11
  68. package/src/js/core/sticky.js +22 -31
  69. package/src/js/core/svg.js +16 -14
  70. package/src/js/core/switcher.js +4 -0
  71. package/src/js/core/toggle.js +28 -20
  72. package/src/js/core/video.js +2 -8
  73. package/src/js/mixin/media.js +28 -8
  74. package/src/js/mixin/parallax.js +2 -1
  75. package/src/js/mixin/position.js +10 -18
  76. package/src/js/mixin/resize.js +11 -0
  77. package/src/js/mixin/scroll.js +32 -0
  78. package/src/js/mixin/slider.js +2 -1
  79. package/src/js/util/class.js +1 -6
  80. package/src/js/util/mouse.js +1 -1
  81. package/src/js/util/observer.js +57 -20
  82. package/src/js/util/selector.js +24 -23
  83. package/src/less/components/modal.less +6 -3
  84. package/src/scss/components/modal.scss +6 -3
  85. package/tests/grid.html +9 -9
  86. package/tests/js/index.js +1 -1
  87. package/tests/slider.html +1 -1
  88. package/tests/slideshow.html +1 -1
  89. package/tests/sticky.html +0 -6
  90. package/src/js/core/gif.js +0 -22
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.12.3-dev.ebebb4f57 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.0 | 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() :
@@ -456,40 +456,41 @@
456
456
  }
457
457
 
458
458
  const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
459
+ const sanatize = memoize((selector) => selector.replace(contextSanitizeRe, '$1 *'));
459
460
 
460
461
  function _query(selector, context, queryFn) {if (context === void 0) {context = document;}
461
462
  if (!selector || !isString(selector)) {
462
463
  return selector;
463
464
  }
464
465
 
465
- selector = selector.replace(contextSanitizeRe, '$1 *');
466
+ selector = sanatize(selector);
466
467
 
467
468
  if (isContextSelector(selector)) {
468
- selector = splitSelector(selector).
469
- map((selector) => {
469
+ const split = splitSelector(selector);
470
+ selector = '';
471
+ for (let sel of split) {
470
472
  let ctx = context;
471
473
 
472
- if (selector[0] === '!') {
473
- const selectors = selector.substr(1).trim().split(' ');
474
+ if (sel[0] === '!') {
475
+ const selectors = sel.substr(1).trim().split(' ');
474
476
  ctx = closest(parent(context), selectors[0]);
475
- selector = selectors.slice(1).join(' ').trim();
477
+ sel = selectors.slice(1).join(' ').trim();
478
+ if (!sel.length && split.length === 1) {
479
+ return ctx;
480
+ }
476
481
  }
477
482
 
478
- if (selector[0] === '-') {
479
- const selectors = selector.substr(1).trim().split(' ');
483
+ if (sel[0] === '-') {
484
+ const selectors = sel.substr(1).trim().split(' ');
480
485
  const prev = (ctx || context).previousElementSibling;
481
- ctx = matches(prev, selector.substr(1)) ? prev : null;
482
- selector = selectors.slice(1).join(' ');
486
+ ctx = matches(prev, sel.substr(1)) ? prev : null;
487
+ sel = selectors.slice(1).join(' ');
483
488
  }
484
489
 
485
- if (!ctx) {
486
- return null;
490
+ if (ctx) {
491
+ selector += "" + (selector ? ',' : '') + domPath(ctx) + " " + sel;
487
492
  }
488
-
489
- return domPath(ctx) + " " + selector;
490
- }).
491
- filter(Boolean).
492
- join(',');
493
+ }
493
494
 
494
495
  context = document;
495
496
  }
@@ -850,12 +851,7 @@
850
851
 
851
852
  function hasClass(element, cls) {
852
853
  [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;
854
+ return !!cls && toNodes(element).some((node) => node.classList.contains(cls));
859
855
  }
860
856
 
861
857
  function toggleClass(element, cls, force) {
@@ -1409,8 +1405,8 @@
1409
1405
  }, 50);
1410
1406
  },
1411
1407
 
1412
- cancel() {
1413
- this.unbind && this.unbind();
1408
+ cancel() {var _this$unbind;
1409
+ (_this$unbind = this.unbind) == null ? void 0 : _this$unbind.call(this);
1414
1410
  this.interval && clearInterval(this.interval);
1415
1411
  },
1416
1412
 
@@ -1467,34 +1463,69 @@
1467
1463
  return { x: x1 + ua * (x2 - x1), y: y1 + ua * (y2 - y1) };
1468
1464
  }
1469
1465
 
1470
- // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
1471
- const hasIntersectionObserver =
1472
- window.IntersectionObserver && 'isIntersecting' in IntersectionObserverEntry.prototype;
1473
1466
  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)) {
1467
+ return observe(
1468
+ IntersectionObserver,
1469
+ targets,
1470
+ intersecting ?
1471
+ (entries, observer) => {
1472
+ if (entries.some((entry) => entry.isIntersecting)) {
1480
1473
  cb(entries, observer);
1481
1474
  }
1482
- }, options);
1483
- for (const el of toNodes(targets)) {
1484
- observer.observe(el);
1485
- }
1486
- return observer;
1475
+ } :
1476
+ cb,
1477
+ options);
1478
+
1487
1479
  }
1488
1480
 
1489
1481
  const hasResizeObserver = window.ResizeObserver;
1490
1482
  function observeResize(targets, cb, options) {if (options === void 0) {options = { box: 'border-box' };}
1491
- if (!hasResizeObserver) {
1483
+ if (hasResizeObserver) {
1484
+ return observe(ResizeObserver, targets, cb, options);
1485
+ }
1486
+
1487
+ // Fallback Safari < 13.1
1488
+ initResizeListener();
1489
+ listeners.add(cb);
1490
+
1491
+ return {
1492
+ disconnect() {
1493
+ listeners.delete(cb);
1494
+ } };
1495
+
1496
+ }
1497
+
1498
+ let listeners;
1499
+ function initResizeListener() {
1500
+ if (listeners) {
1492
1501
  return;
1493
1502
  }
1494
1503
 
1495
- const observer = new ResizeObserver((entries, observer) => {
1496
- cb(entries, observer);
1497
- });
1504
+ listeners = new Set();
1505
+
1506
+ // throttle 'resize'
1507
+ let pendingResize;
1508
+ const handleResize = () => {
1509
+ if (pendingResize) {
1510
+ return;
1511
+ }
1512
+ pendingResize = true;
1513
+ fastdom.read(() => pendingResize = false);
1514
+ for (const listener of listeners) {
1515
+ listener();
1516
+ }
1517
+ };
1518
+
1519
+ on(window, 'load resize', handleResize);
1520
+ on(document, 'loadedmetadata load', handleResize, true);
1521
+ }
1522
+
1523
+ function observeMutation(targets, cb, options) {
1524
+ return observe(MutationObserver, targets, cb, options);
1525
+ }
1526
+
1527
+ function observe(Observer, targets, cb, options) {
1528
+ const observer = new Observer(cb);
1498
1529
  for (const el of toNodes(targets)) {
1499
1530
  observer.observe(el, options);
1500
1531
  }
@@ -2179,9 +2210,9 @@
2179
2210
  memoize: memoize,
2180
2211
  Deferred: Deferred,
2181
2212
  MouseTracker: MouseTracker,
2182
- hasIntersectionObserver: hasIntersectionObserver,
2183
2213
  observeIntersection: observeIntersection,
2184
2214
  observeResize: observeResize,
2215
+ observeMutation: observeMutation,
2185
2216
  mergeOptions: mergeOptions,
2186
2217
  parseOptions: parseOptions,
2187
2218
  play: play,
@@ -2289,7 +2320,7 @@
2289
2320
  }
2290
2321
 
2291
2322
  this._data = {};
2292
- this._computeds = {};
2323
+ this._computed = {};
2293
2324
 
2294
2325
  this._initProps();
2295
2326
 
@@ -2383,8 +2414,8 @@
2383
2414
  const {
2384
2415
  $options: { computed } } =
2385
2416
  this;
2386
- const values = { ...this._computeds };
2387
- this._computeds = {};
2417
+ const values = { ...this._computed };
2418
+ this._computed = {};
2388
2419
 
2389
2420
  for (const key in computed) {
2390
2421
  const { watch, immediate } = computed[key];
@@ -2442,7 +2473,7 @@
2442
2473
  UIkit.prototype._initComputeds = function () {
2443
2474
  const { computed } = this.$options;
2444
2475
 
2445
- this._computeds = {};
2476
+ this._computed = {};
2446
2477
 
2447
2478
  if (computed) {
2448
2479
  for (const key in computed) {
@@ -2481,22 +2512,19 @@
2481
2512
  }
2482
2513
  }
2483
2514
  }
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
2515
  };
2491
2516
 
2492
2517
  UIkit.prototype._unbindEvents = function () {
2493
2518
  this._events.forEach((unbind) => unbind());
2494
2519
  delete this._events;
2495
- unregisterScrollListener(this._uid);
2496
2520
  };
2497
2521
 
2498
2522
  UIkit.prototype._initObservers = function () {
2499
- this._observers = [initChildListObserver(this), initPropsObserver(this)];
2523
+ this._observers = [initPropsObserver(this)];
2524
+
2525
+ if (this.$options.computed) {
2526
+ this.registerObserver(initChildListObserver(this));
2527
+ }
2500
2528
  };
2501
2529
 
2502
2530
  UIkit.prototype.registerObserver = function (observer) {
@@ -2550,22 +2578,22 @@
2550
2578
  enumerable: true,
2551
2579
 
2552
2580
  get() {
2553
- const { _computeds, $props, $el } = component;
2581
+ const { _computed, $props, $el } = component;
2554
2582
 
2555
- if (!hasOwn(_computeds, key)) {
2556
- _computeds[key] = (cb.get || cb).call(component, $props, $el);
2583
+ if (!hasOwn(_computed, key)) {
2584
+ _computed[key] = (cb.get || cb).call(component, $props, $el);
2557
2585
  }
2558
2586
 
2559
- return _computeds[key];
2587
+ return _computed[key];
2560
2588
  },
2561
2589
 
2562
2590
  set(value) {
2563
- const { _computeds } = component;
2591
+ const { _computed } = component;
2564
2592
 
2565
- _computeds[key] = cb.set ? cb.set.call(component, value) : value;
2593
+ _computed[key] = cb.set ? cb.set.call(component, value) : value;
2566
2594
 
2567
- if (isUndefined(_computeds[key])) {
2568
- delete _computeds[key];
2595
+ if (isUndefined(_computed[key])) {
2596
+ delete _computed[key];
2569
2597
  }
2570
2598
  } });
2571
2599
 
@@ -2693,27 +2721,6 @@
2693
2721
  return observer;
2694
2722
  }
2695
2723
 
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
2724
  function instanceAPI (UIkit) {
2718
2725
  const DATA = UIkit.data;
2719
2726
 
@@ -2887,7 +2894,7 @@
2887
2894
  UIkit.data = '__uikit__';
2888
2895
  UIkit.prefix = 'uk-';
2889
2896
  UIkit.options = {};
2890
- UIkit.version = '3.12.3-dev.ebebb4f57';
2897
+ UIkit.version = '3.13.0';
2891
2898
 
2892
2899
  globalAPI(UIkit);
2893
2900
  hooksAPI(UIkit);
@@ -2895,26 +2902,11 @@
2895
2902
  componentAPI(UIkit);
2896
2903
  instanceAPI(UIkit);
2897
2904
 
2898
- function Core (UIkit) {
2905
+ function Core () {
2899
2906
  if (!inBrowser) {
2900
2907
  return;
2901
2908
  }
2902
2909
 
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
2910
  let started = 0;
2919
2911
  on(
2920
2912
  document,
@@ -3317,9 +3309,11 @@
3317
3309
 
3318
3310
  if (show) {
3319
3311
  const toggle = $(this.$props.toggle, el);
3320
- if (!isInView(toggle)) {
3321
- scrollIntoView(toggle, { offset: this.offset });
3322
- }
3312
+ fastdom.read(() => {
3313
+ if (!isInView(toggle)) {
3314
+ scrollIntoView(toggle, { offset: this.offset });
3315
+ }
3316
+ });
3323
3317
  }
3324
3318
  });
3325
3319
  }
@@ -3381,13 +3375,9 @@
3381
3375
  autoplay: true },
3382
3376
 
3383
3377
 
3384
- computed: {
3385
- inView(_ref) {let { autoplay } = _ref;
3386
- return autoplay === 'inview';
3387
- } },
3388
-
3389
-
3390
3378
  connected() {
3379
+ this.inView = this.autoplay === 'inview';
3380
+
3391
3381
  if (this.inView && !hasAttr(this.$el, 'preload')) {
3392
3382
  this.$el.preload = 'none';
3393
3383
  }
@@ -3411,18 +3401,25 @@
3411
3401
 
3412
3402
  },
3413
3403
 
3414
- write(_ref2) {let { visible, inView } = _ref2;
3404
+ write(_ref) {let { visible, inView } = _ref;
3415
3405
  if (!visible || this.inView && !inView) {
3416
3406
  pause(this.$el);
3417
3407
  } else if (this.autoplay === true || this.inView && inView) {
3418
3408
  play(this.$el);
3419
3409
  }
3420
- },
3410
+ } } };
3421
3411
 
3422
- events: ['resize', 'scroll'] } };
3412
+ var Resize = {
3413
+ connected() {var _this$$options$resize;
3414
+ this.registerObserver(
3415
+ observeResize(((_this$$options$resize = this.$options.resizeTargets) == null ? void 0 : _this$$options$resize.call(this)) || this.$el, () =>
3416
+ this.$emit('resize')));
3417
+
3418
+
3419
+ } };
3423
3420
 
3424
3421
  var cover = {
3425
- mixins: [Video],
3422
+ mixins: [Resize, Video],
3426
3423
 
3427
3424
  props: {
3428
3425
  width: Number,
@@ -3433,10 +3430,6 @@
3433
3430
  automute: true },
3434
3431
 
3435
3432
 
3436
- connected() {
3437
- this.registerObserver(observeResize(this.$el, () => this.$emit('resize')));
3438
- },
3439
-
3440
3433
  update: {
3441
3434
  read() {
3442
3435
  const el = this.$el;
@@ -3505,19 +3498,11 @@
3505
3498
  clsPos: '' },
3506
3499
 
3507
3500
 
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
-
3501
+ connected() {
3502
+ this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
3503
+ this.dir = this.pos[0];
3504
+ this.align = this.pos[1];
3505
+ },
3521
3506
 
3522
3507
  methods: {
3523
3508
  positionAt(element, target, boundary) {
@@ -3525,6 +3510,8 @@
3525
3510
 
3526
3511
  let { offset: offset$1 } = this;
3527
3512
  const axis = this.getAxis();
3513
+ const dir = this.pos[0];
3514
+ const align = this.pos[1];
3528
3515
 
3529
3516
  if (!isNumeric(offset$1)) {
3530
3517
  const node = $(offset$1);
@@ -3537,13 +3524,11 @@
3537
3524
  const { x, y } = positionAt(
3538
3525
  element,
3539
3526
  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,
3527
+ axis === 'x' ? flipPosition(dir) + " " + align : align + " " + flipPosition(dir),
3528
+ axis === 'x' ? dir + " " + align : align + " " + dir,
3544
3529
  axis === 'x' ? "" + (
3545
- this.dir === 'left' ? -offset$1 : offset$1) : " " + (
3546
- this.dir === 'top' ? -offset$1 : offset$1),
3530
+ dir === 'left' ? -offset$1 : offset$1) : " " + (
3531
+ dir === 'top' ? -offset$1 : offset$1),
3547
3532
  null,
3548
3533
  this.flip,
3549
3534
  boundary).
@@ -3589,25 +3574,12 @@
3589
3574
  container: false },
3590
3575
 
3591
3576
 
3592
- computed: {
3593
- boundary(_ref, $el) {let { boundary } = _ref;
3594
- return boundary === true ? window : query(boundary, $el);
3595
- },
3596
-
3597
- clsDrop(_ref2) {let { clsDrop } = _ref2;
3598
- return clsDrop || "uk-" + this.$options.name;
3599
- },
3600
-
3601
- clsPos() {
3602
- return this.clsDrop;
3603
- } },
3604
-
3605
-
3606
3577
  created() {
3607
3578
  this.tracker = new MouseTracker();
3608
3579
  },
3609
3580
 
3610
3581
  connected() {
3582
+ this.clsPos = this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
3611
3583
  addClass(this.$el, this.clsDrop);
3612
3584
 
3613
3585
  if (this.toggle && !this.target) {
@@ -3647,7 +3619,7 @@
3647
3619
  return 'a[href^="#"]';
3648
3620
  },
3649
3621
 
3650
- handler(_ref3) {let { defaultPrevented, current: { hash } } = _ref3;
3622
+ handler(_ref) {let { defaultPrevented, current: { hash } } = _ref;
3651
3623
  if (!defaultPrevented && hash && !within(hash, this.$el)) {
3652
3624
  this.hide(false);
3653
3625
  }
@@ -3755,18 +3727,16 @@
3755
3727
 
3756
3728
  this.tracker.init();
3757
3729
 
3758
- once(
3759
- this.$el,
3760
- 'hide',
3730
+ for (const handler of [
3761
3731
  on(
3762
3732
  document,
3763
3733
  pointerDown,
3764
- (_ref4) => {let { target } = _ref4;return (
3734
+ (_ref2) => {let { target } = _ref2;return (
3765
3735
  !within(target, this.$el) &&
3766
3736
  once(
3767
3737
  document,
3768
3738
  pointerUp + " " + pointerCancel + " scroll",
3769
- (_ref5) => {let { defaultPrevented, type, target: newTarget } = _ref5;
3739
+ (_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
3770
3740
  if (
3771
3741
  !defaultPrevented &&
3772
3742
  type === pointerUp &&
@@ -3779,19 +3749,16 @@
3779
3749
  true));}),
3780
3750
 
3781
3751
 
3782
- { self: true });
3783
-
3784
3752
 
3785
- once(
3786
- this.$el,
3787
- 'hide',
3788
3753
  on(document, 'keydown', (e) => {
3789
3754
  if (e.keyCode === 27) {
3790
3755
  this.hide(false);
3791
3756
  }
3792
3757
  }),
3793
- { self: true });
3794
-
3758
+ on(window, 'resize', () => this.$emit('resize'))])
3759
+ {
3760
+ once(this.$el, 'hide', handler, { self: true });
3761
+ }
3795
3762
  } },
3796
3763
 
3797
3764
 
@@ -3808,7 +3775,7 @@
3808
3775
  {
3809
3776
  name: 'hide',
3810
3777
 
3811
- handler(_ref6) {let { target } = _ref6;
3778
+ handler(_ref4) {let { target } = _ref4;
3812
3779
  if (this.$el !== target) {
3813
3780
  active$1 =
3814
3781
  active$1 === null && within(target, this.$el) && this.isToggled() ?
@@ -3901,28 +3868,28 @@
3901
3868
  },
3902
3869
 
3903
3870
  position() {
3871
+ const boundary = this.boundary === true ? window : query(this.boundary, this.$el);
3904
3872
  removeClass(this.$el, this.clsDrop + "-stack");
3905
3873
  toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
3906
3874
 
3907
- const boundary = offset(this.boundary);
3908
- const alignTo = this.boundaryAlign ? boundary : offset(this.target);
3875
+ const boundaryOffset = offset(boundary);
3876
+ const alignTo = this.boundaryAlign ? boundaryOffset : offset(this.target);
3909
3877
 
3910
3878
  if (this.align === 'justify') {
3911
3879
  const prop = this.getAxis() === 'y' ? 'width' : 'height';
3912
3880
  css(this.$el, prop, alignTo[prop]);
3913
3881
  } else if (
3914
- this.boundary &&
3882
+ boundary &&
3915
3883
  this.$el.offsetWidth >
3916
- Math.max(boundary.right - alignTo.left, alignTo.right - boundary.left))
3884
+ Math.max(
3885
+ boundaryOffset.right - alignTo.left,
3886
+ alignTo.right - boundaryOffset.left))
3887
+
3917
3888
  {
3918
3889
  addClass(this.$el, this.clsDrop + "-stack");
3919
3890
  }
3920
3891
 
3921
- this.positionAt(
3922
- this.$el,
3923
- this.boundaryAlign ? this.boundary : this.target,
3924
- this.boundary);
3925
-
3892
+ this.positionAt(this.$el, this.boundaryAlign ? boundary : this.target, boundary);
3926
3893
  } } };
3927
3894
 
3928
3895
 
@@ -3959,12 +3926,12 @@
3959
3926
  return (
3960
3927
  target && (
3961
3928
  target === true && parent(this.input) === $el && this.input.nextElementSibling ||
3962
- query(target, $el)));
3929
+ $(target, $el)));
3963
3930
 
3964
3931
  } },
3965
3932
 
3966
3933
 
3967
- update() {
3934
+ update() {var _input$files;
3968
3935
  const { target, input } = this;
3969
3936
 
3970
3937
  if (!target) {
@@ -3974,8 +3941,7 @@
3974
3941
  let option;
3975
3942
  const prop = isInput(target) ? 'value' : 'textContent';
3976
3943
  const prev = target[prop];
3977
- const value =
3978
- input.files && input.files[0] ?
3944
+ const value = (_input$files = input.files) != null && _input$files[0] ?
3979
3945
  input.files[0].name :
3980
3946
  matches(input, 'select') && (
3981
3947
  option = $$('option', input).filter((el) => el.selected)[0]) // eslint-disable-line prefer-destructuring
@@ -4007,26 +3973,9 @@
4007
3973
  this.$emit();
4008
3974
  } }] };
4009
3975
 
4010
- // Deprecated
4011
- var gif = {
4012
- update: {
4013
- read(data) {
4014
- const inview = isInView(this.$el);
4015
-
4016
- if (!inview || data.isInView === inview) {
4017
- return false;
4018
- }
4019
-
4020
- data.isInView = inview;
4021
- },
4022
-
4023
- write() {
4024
- this.$el.src = '' + this.$el.src; // force self-assign
4025
- },
4026
-
4027
- events: ['scroll', 'resize'] } };
4028
-
4029
3976
  var Margin = {
3977
+ mixins: [Resize],
3978
+
4030
3979
  props: {
4031
3980
  margin: String,
4032
3981
  firstColumn: Boolean },
@@ -4037,6 +3986,18 @@
4037
3986
  firstColumn: 'uk-first-column' },
4038
3987
 
4039
3988
 
3989
+ resizeTargets() {
3990
+ return this.$el.children;
3991
+ },
3992
+
3993
+ connected() {
3994
+ this.registerObserver(
3995
+ observeMutation(this.$el, () => this.$reset(), {
3996
+ childList: true }));
3997
+
3998
+
3999
+ },
4000
+
4040
4001
  update: {
4041
4002
  read() {
4042
4003
  const rows = getRows(this.$el.children);
@@ -4138,10 +4099,41 @@
4138
4099
 
4139
4100
  }
4140
4101
 
4102
+ var Scroll = {
4103
+ connected() {
4104
+ registerScrollListener(this._uid, () => this.$emit('scroll'));
4105
+ },
4106
+
4107
+ disconnected() {
4108
+ unregisterScrollListener(this._uid);
4109
+ } };
4110
+
4111
+
4112
+ const scrollListeners = new Map();
4113
+ let unbindScrollListener;
4114
+ function registerScrollListener(id, listener) {
4115
+ unbindScrollListener =
4116
+ unbindScrollListener ||
4117
+ on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
4118
+ passive: true,
4119
+ capture: true });
4120
+
4121
+
4122
+ scrollListeners.set(id, listener);
4123
+ }
4124
+
4125
+ function unregisterScrollListener(id) {
4126
+ scrollListeners.delete(id);
4127
+ if (unbindScrollListener && !scrollListeners.size) {
4128
+ unbindScrollListener();
4129
+ unbindScrollListener = null;
4130
+ }
4131
+ }
4132
+
4141
4133
  var grid = {
4142
4134
  extends: Margin,
4143
4135
 
4144
- mixins: [Class],
4136
+ mixins: [Class, Scroll],
4145
4137
 
4146
4138
  name: 'grid',
4147
4139
 
@@ -4299,11 +4291,21 @@
4299
4291
 
4300
4292
 
4301
4293
  computed: {
4302
- elements(_ref, $el) {let { target } = _ref;
4303
- return $$(target, $el);
4304
- } },
4294
+ elements: {
4295
+ get(_ref, $el) {let { target } = _ref;
4296
+ return $$(target, $el);
4297
+ },
4298
+
4299
+ watch() {
4300
+ this.$reset();
4301
+ } } },
4302
+
4305
4303
 
4306
4304
 
4305
+ resizeTargets() {
4306
+ return this.elements;
4307
+ },
4308
+
4307
4309
  update: {
4308
4310
  read() {
4309
4311
  return {
@@ -4361,7 +4363,7 @@
4361
4363
  }
4362
4364
 
4363
4365
  var heightViewport = {
4364
- mixins: [Class],
4366
+ mixins: [Class, Resize],
4365
4367
 
4366
4368
  props: {
4367
4369
  expand: Boolean,
@@ -4377,6 +4379,11 @@
4377
4379
  minHeight: 0 },
4378
4380
 
4379
4381
 
4382
+ resizeTargets() {
4383
+ // check for offsetTop change
4384
+ return [this.$el, document.documentElement];
4385
+ },
4386
+
4380
4387
  update: {
4381
4388
  read(_ref) {let { minHeight: prev } = _ref;
4382
4389
  if (!isVisible(this.$el)) {
@@ -4417,13 +4424,9 @@
4417
4424
  return { minHeight, prev };
4418
4425
  },
4419
4426
 
4420
- write(_ref2) {let { minHeight, prev } = _ref2;
4427
+ write(_ref2) {let { minHeight } = _ref2;
4421
4428
  css(this.$el, { minHeight });
4422
4429
 
4423
- if (minHeight !== prev) {
4424
- trigger(this.$el, 'resize');
4425
- }
4426
-
4427
4430
  if (this.minHeight && toFloat(css(this.$el, 'minHeight')) < this.minHeight) {
4428
4431
  css(this.$el, 'minHeight', this.minHeight);
4429
4432
  }
@@ -4473,10 +4476,24 @@
4473
4476
  }
4474
4477
 
4475
4478
  this.applyAttributes(svg, el);
4476
- this.$emit();
4479
+
4477
4480
  return this.svgEl = svg;
4478
4481
  }
4479
4482
  }, noop);
4483
+
4484
+ if (this.strokeAnimation) {
4485
+ this.svg.then((el) => {
4486
+ if (this._connected) {
4487
+ applyAnimation(el);
4488
+ this.registerObserver(
4489
+ observeIntersection(el, (records, observer) => {
4490
+ applyAnimation(el);
4491
+ observer.disconnect();
4492
+ }));
4493
+
4494
+ }
4495
+ });
4496
+ }
4480
4497
  },
4481
4498
 
4482
4499
  disconnected() {
@@ -4496,18 +4513,6 @@
4496
4513
  this.svg = null;
4497
4514
  },
4498
4515
 
4499
- update: {
4500
- read() {
4501
- return !!(this.strokeAnimation && this.svgEl && isVisible(this.svgEl));
4502
- },
4503
-
4504
- write() {
4505
- applyAnimation(this.svgEl);
4506
- },
4507
-
4508
- type: ['resize'] },
4509
-
4510
-
4511
4516
  methods: {
4512
4517
  async getSvg() {
4513
4518
  if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
@@ -4737,37 +4742,30 @@
4737
4742
 
4738
4743
  beforeConnect() {
4739
4744
  addClass(this.$el, 'uk-slidenav');
4740
- },
4741
-
4742
- computed: {
4743
- icon(_ref, $el) {let { icon } = _ref;
4744
- return hasClass($el, 'uk-slidenav-large') ? icon + "-large" : icon;
4745
- } } };
4746
-
4745
+ const icon = this.$props.icon;
4746
+ this.icon = hasClass(this.$el, 'uk-slidenav-large') ? icon + "-large" : icon;
4747
+ } };
4747
4748
 
4748
4749
 
4749
4750
  const Search = {
4750
4751
  extends: IconComponent,
4751
4752
 
4752
- computed: {
4753
- icon(_ref2, $el) {let { icon } = _ref2;
4754
- return hasClass($el, 'uk-search-icon') && parents($el, '.uk-search-large').length ?
4755
- 'search-large' :
4756
- parents($el, '.uk-search-navbar').length ?
4757
- 'search-navbar' :
4758
- icon;
4759
- } } };
4760
-
4753
+ beforeConnect() {
4754
+ this.icon =
4755
+ hasClass(this.$el, 'uk-search-icon') && parents(this.$el, '.uk-search-large').length ?
4756
+ 'search-large' :
4757
+ parents(this.$el, '.uk-search-navbar').length ?
4758
+ 'search-navbar' :
4759
+ this.$props.icon;
4760
+ } };
4761
4761
 
4762
4762
 
4763
4763
  const Close = {
4764
4764
  extends: IconComponent,
4765
4765
 
4766
- computed: {
4767
- icon() {
4768
- return "close-" + (hasClass(this.$el, 'uk-close-large') ? 'large' : 'icon');
4769
- } } };
4770
-
4766
+ beforeConnect() {
4767
+ this.icon = "close-" + (hasClass(this.$el, 'uk-close-large') ? 'large' : 'icon');
4768
+ } };
4771
4769
 
4772
4770
 
4773
4771
  const Spinner = {
@@ -4844,29 +4842,19 @@
4844
4842
  loading: 'lazy' },
4845
4843
 
4846
4844
 
4847
- computed: {
4848
- target: {
4849
- get(_ref) {let { target } = _ref;
4850
- return [this.$el, ...queryAll(target, this.$el)];
4851
- },
4852
-
4853
- watch() {
4854
- this.$reset();
4855
- } } },
4856
-
4857
-
4858
-
4859
4845
  connected() {
4860
- if (this.loading !== 'lazy' || !hasIntersectionObserver) {
4846
+ if (this.loading !== 'lazy') {
4861
4847
  this.load();
4862
4848
  return;
4863
4849
  }
4864
4850
 
4851
+ const target = [this.$el, ...queryAll(this.$props.target, this.$el)];
4852
+
4865
4853
  if (nativeLazyLoad && isImg(this.$el)) {
4866
4854
  this.$el.loading = 'lazy';
4867
4855
  setSrcAttrs(this.$el);
4868
4856
 
4869
- if (this.target.length === 1) {
4857
+ if (target.length === 1) {
4870
4858
  return;
4871
4859
  }
4872
4860
  }
@@ -4875,7 +4863,7 @@
4875
4863
 
4876
4864
  this.registerObserver(
4877
4865
  observeIntersection(
4878
- this.target,
4866
+ target,
4879
4867
  (entries, observer) => {
4880
4868
  this.load();
4881
4869
  observer.disconnect();
@@ -5064,17 +5052,28 @@
5064
5052
  media: false },
5065
5053
 
5066
5054
 
5067
- computed: {
5068
- matchMedia() {
5069
- const media = toMedia(this.media);
5070
- return !media || window.matchMedia(media).matches;
5071
- } } };
5055
+ connected() {
5056
+ const media = toMedia(this.media);
5057
+ this.mediaObj = window.matchMedia(media);
5058
+ const handler = () => {
5059
+ this.matchMedia = this.mediaObj.matches;
5060
+ trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5061
+ };
5062
+ this.offMediaObj = on(this.mediaObj, 'change', () => {
5063
+ handler();
5064
+ this.$emit('resize');
5065
+ });
5066
+ handler();
5067
+ },
5072
5068
 
5069
+ disconnected() {var _this$offMediaObj;
5070
+ (_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
5071
+ } };
5073
5072
 
5074
5073
 
5075
5074
  function toMedia(value) {
5076
5075
  if (isString(value)) {
5077
- if (value[0] === '@') {
5076
+ if (startsWith(value, '@')) {
5078
5077
  const name = "breakpoint-" + value.substr(1);
5079
5078
  value = toFloat(getCssVar(name));
5080
5079
  } else if (isNaN(value)) {
@@ -5082,11 +5081,11 @@
5082
5081
  }
5083
5082
  }
5084
5083
 
5085
- return value && !isNaN(value) ? "(min-width: " + value + "px)" : false;
5084
+ return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
5086
5085
  }
5087
5086
 
5088
5087
  var leader = {
5089
- mixins: [Class, Media],
5088
+ mixins: [Class, Media, Resize],
5090
5089
 
5091
5090
  props: {
5092
5091
  fill: String },
@@ -5114,26 +5113,19 @@
5114
5113
  },
5115
5114
 
5116
5115
  update: {
5117
- read(_ref2) {let { changed, width } = _ref2;
5118
- const prev = width;
5119
-
5120
- width = Math.floor(this.$el.offsetWidth / 2);
5116
+ read() {
5117
+ const width = Math.trunc(this.$el.offsetWidth / 2);
5121
5118
 
5122
5119
  return {
5123
5120
  width,
5124
5121
  fill: this.fill,
5125
- changed: changed || prev !== width,
5126
5122
  hide: !this.matchMedia };
5127
5123
 
5128
5124
  },
5129
5125
 
5130
- write(data) {
5131
- toggleClass(this.wrapper, this.clsHide, data.hide);
5132
-
5133
- if (data.changed) {
5134
- data.changed = false;
5135
- attr(this.wrapper, this.attrFill, new Array(data.width).join(data.fill));
5136
- }
5126
+ write(_ref2) {let { width, fill, hide } = _ref2;
5127
+ toggleClass(this.wrapper, this.clsHide, hide);
5128
+ attr(this.wrapper, this.attrFill, new Array(width).join(fill));
5137
5129
  },
5138
5130
 
5139
5131
  events: ['resize'] } };
@@ -6238,7 +6230,7 @@
6238
6230
  }
6239
6231
 
6240
6232
  var overflowAuto = {
6241
- mixins: [Class],
6233
+ mixins: [Class, Resize],
6242
6234
 
6243
6235
  props: {
6244
6236
  selContainer: String,
@@ -6262,8 +6254,8 @@
6262
6254
  } },
6263
6255
 
6264
6256
 
6265
- connected() {
6266
- css(this.$el, 'minHeight', this.minHeight);
6257
+ resizeTargets() {
6258
+ return [this.container, this.content];
6267
6259
  },
6268
6260
 
6269
6261
  update: {
@@ -6273,7 +6265,6 @@
6273
6265
  }
6274
6266
 
6275
6267
  return {
6276
- current: toFloat(css(this.$el, 'maxHeight')),
6277
6268
  max: Math.max(
6278
6269
  this.minHeight,
6279
6270
  height(this.container) - (dimensions$1(this.content).height - height(this.$el))) };
@@ -6281,18 +6272,21 @@
6281
6272
 
6282
6273
  },
6283
6274
 
6284
- write(_ref3) {let { current, max } = _ref3;
6285
- css(this.$el, 'maxHeight', max);
6286
- if (Math.round(current) !== Math.round(max)) {
6287
- trigger(this.$el, 'resize');
6288
- }
6275
+ write(_ref3) {let { max } = _ref3;
6276
+ css(this.$el, { minHeight: this.minHeight, maxHeight: max });
6289
6277
  },
6290
6278
 
6291
6279
  events: ['resize'] } };
6292
6280
 
6293
6281
  var responsive = {
6282
+ mixin: [Resize],
6283
+
6294
6284
  props: ['width', 'height'],
6295
6285
 
6286
+ resizeTargets() {
6287
+ return [this.$el, parent(this.$el)];
6288
+ },
6289
+
6296
6290
  connected() {
6297
6291
  addClass(this.$el, 'uk-responsive-width');
6298
6292
  },
@@ -6346,11 +6340,19 @@
6346
6340
  }
6347
6341
 
6348
6342
  e.preventDefault();
6349
- this.scrollTo("#" + escape(decodeURIComponent((this.$el.hash || '').substr(1))));
6343
+ this.scrollTo(getTargetElement(this.$el));
6350
6344
  } } };
6351
6345
 
6346
+
6347
+
6348
+ function getTargetElement(el) {
6349
+ return document.getElementById(decodeURIComponent(el.hash).substring(1));
6350
+ }
6351
+
6352
6352
  const stateKey = '_ukScrollspy';
6353
6353
  var scrollspy = {
6354
+ mixins: [Scroll],
6355
+
6354
6356
  args: 'cls',
6355
6357
 
6356
6358
  props: {
@@ -6391,24 +6393,15 @@
6391
6393
 
6392
6394
 
6393
6395
  disconnected() {
6394
- for (const el of this.elements) {
6395
- removeClass(el, this.inViewClass, el[stateKey] ? el[stateKey].cls : '');
6396
+ for (const el of this.elements) {var _el$stateKey;
6397
+ removeClass(el, this.inViewClass, ((_el$stateKey = el[stateKey]) == null ? void 0 : _el$stateKey.cls) || '');
6396
6398
  delete el[stateKey];
6397
6399
  }
6398
6400
  },
6399
6401
 
6400
6402
  update: [
6401
6403
  {
6402
- read(data$1) {
6403
- // Let child components be applied at least once first
6404
- if (!data$1.update) {
6405
- Promise.resolve().then(() => {
6406
- this.$emit();
6407
- data$1.update = true;
6408
- });
6409
- return false;
6410
- }
6411
-
6404
+ read() {
6412
6405
  for (const el of this.elements) {
6413
6406
  if (!el[stateKey]) {
6414
6407
  el[stateKey] = { cls: data(el, 'uk-scrollspy-class') || this.cls };
@@ -6472,6 +6465,8 @@
6472
6465
  } } };
6473
6466
 
6474
6467
  var scrollspyNav = {
6468
+ mixins: [Scroll],
6469
+
6475
6470
  props: {
6476
6471
  cls: String,
6477
6472
  closest: String,
@@ -6503,10 +6498,6 @@
6503
6498
  immediate: true },
6504
6499
 
6505
6500
 
6506
- targets() {
6507
- return $$(this.links.map((el) => escape(el.hash).substr(1)).join(','));
6508
- },
6509
-
6510
6501
  elements(_ref) {let { closest: selector } = _ref;
6511
6502
  return closest(this.links, selector || '*');
6512
6503
  } },
@@ -6515,13 +6506,15 @@
6515
6506
  update: [
6516
6507
  {
6517
6508
  read() {
6518
- const { length } = this.targets;
6509
+ const targets = this.links.map(getTargetElement).filter(Boolean);
6510
+
6511
+ const { length } = targets;
6519
6512
 
6520
6513
  if (!length || !isVisible(this.$el)) {
6521
6514
  return false;
6522
6515
  }
6523
6516
 
6524
- const [scrollElement] = scrollParents(this.targets, /auto|scroll/, true);
6517
+ const [scrollElement] = scrollParents(targets, /auto|scroll/, true);
6525
6518
  const { scrollTop, scrollHeight } = scrollElement;
6526
6519
  const max = scrollHeight - getViewportClientHeight(scrollElement);
6527
6520
  let active = false;
@@ -6529,15 +6522,17 @@
6529
6522
  if (scrollTop === max) {
6530
6523
  active = length - 1;
6531
6524
  } else {
6532
- this.targets.every((el, i) => {
6525
+ for (const i in targets) {
6533
6526
  if (
6534
- offset(el).top - offset(getViewport$1(scrollElement)).top - this.offset <=
6527
+ offset(targets[i]).top -
6528
+ offset(getViewport$1(scrollElement)).top -
6529
+ this.offset >
6535
6530
  0)
6536
6531
  {
6537
- active = i;
6538
- return true;
6532
+ break;
6539
6533
  }
6540
- });
6534
+ active = +i;
6535
+ }
6541
6536
 
6542
6537
  if (active === false && this.overflow) {
6543
6538
  active = 0;
@@ -6551,8 +6546,9 @@
6551
6546
  const changed = active !== false && !hasClass(this.elements[active], this.cls);
6552
6547
 
6553
6548
  this.links.forEach((el) => el.blur());
6554
- removeClass(this.elements, this.cls);
6555
- addClass(this.elements[active], this.cls);
6549
+ for (const i in this.elements) {
6550
+ toggleClass(this.elements[i], this.cls, +i === active);
6551
+ }
6556
6552
 
6557
6553
  if (changed) {
6558
6554
  trigger(this.$el, 'active', [active, this.elements[active]]);
@@ -6562,7 +6558,7 @@
6562
6558
  events: ['scroll', 'resize'] }] };
6563
6559
 
6564
6560
  var sticky = {
6565
- mixins: [Class, Media],
6561
+ mixins: [Class, Media, Resize, Scroll],
6566
6562
 
6567
6563
  props: {
6568
6564
  position: String,
@@ -6575,7 +6571,6 @@
6575
6571
  clsFixed: String,
6576
6572
  clsBelow: String,
6577
6573
  selTarget: String,
6578
- widthElement: Boolean,
6579
6574
  showOnUp: Boolean,
6580
6575
  targetOffset: Number },
6581
6576
 
@@ -6591,7 +6586,6 @@
6591
6586
  clsFixed: 'uk-sticky-fixed',
6592
6587
  clsBelow: 'uk-sticky-below',
6593
6588
  selTarget: '',
6594
- widthElement: false,
6595
6589
  showOnUp: false,
6596
6590
  targetOffset: false },
6597
6591
 
@@ -6599,35 +6593,19 @@
6599
6593
  computed: {
6600
6594
  selTarget(_ref, $el) {let { selTarget } = _ref;
6601
6595
  return selTarget && $(selTarget, $el) || $el;
6602
- },
6603
-
6604
- widthElement(_ref2, $el) {let { widthElement } = _ref2;
6605
- return query(widthElement, $el) || this.placeholder;
6606
- },
6607
-
6608
- isActive: {
6609
- get() {
6610
- return hasClass(this.selTarget, this.clsActive);
6611
- },
6612
-
6613
- set(value) {
6614
- if (value && !this.isActive) {
6615
- replaceClass(this.selTarget, this.clsInactive, this.clsActive);
6616
- trigger(this.$el, 'active');
6617
- } else if (!value && !hasClass(this.selTarget, this.clsInactive)) {
6618
- replaceClass(this.selTarget, this.clsActive, this.clsInactive);
6619
- trigger(this.$el, 'inactive');
6620
- }
6621
- } } },
6596
+ } },
6622
6597
 
6623
6598
 
6599
+ resizeTargets() {
6600
+ return document.documentElement;
6601
+ },
6624
6602
 
6625
6603
  connected() {
6626
6604
  this.placeholder =
6627
6605
  $('+ .uk-sticky-placeholder', this.$el) ||
6628
6606
  $('<div class="uk-sticky-placeholder"></div>');
6629
6607
  this.isFixed = false;
6630
- this.isActive = false;
6608
+ this.setActive(false);
6631
6609
  },
6632
6610
 
6633
6611
  disconnected() {
@@ -6638,7 +6616,6 @@
6638
6616
 
6639
6617
  remove$1(this.placeholder);
6640
6618
  this.placeholder = null;
6641
- this.widthElement = null;
6642
6619
  },
6643
6620
 
6644
6621
  events: [
@@ -6678,7 +6655,7 @@
6678
6655
 
6679
6656
  update: [
6680
6657
  {
6681
- read(_ref3, types) {let { height: height$1, margin } = _ref3;
6658
+ read(_ref2, types) {let { height: height$1, margin } = _ref2;
6682
6659
  this.inactive = !this.matchMedia || !isVisible(this.$el);
6683
6660
 
6684
6661
  if (this.inactive) {
@@ -6733,13 +6710,12 @@
6733
6710
  topOffset,
6734
6711
  height: height$1,
6735
6712
  margin,
6736
- width: dimensions$1(isVisible(this.widthElement) ? this.widthElement : this.$el).
6737
- width,
6713
+ width: dimensions$1(referenceElement).width,
6738
6714
  top: offsetPosition(referenceElement)[0] };
6739
6715
 
6740
6716
  },
6741
6717
 
6742
- write(_ref4) {let { height, margin } = _ref4;
6718
+ write(_ref3) {let { height, margin } = _ref3;
6743
6719
  const { placeholder } = this;
6744
6720
 
6745
6721
  css(placeholder, { height, margin });
@@ -6748,22 +6724,20 @@
6748
6724
  after(this.$el, placeholder);
6749
6725
  placeholder.hidden = true;
6750
6726
  }
6751
-
6752
- this.isActive = !!this.isActive; // force self-assign
6753
6727
  },
6754
6728
 
6755
6729
  events: ['resize'] },
6756
6730
 
6757
6731
 
6758
6732
  {
6759
- read(_ref5)
6733
+ read(_ref4)
6760
6734
 
6761
6735
 
6762
6736
 
6763
6737
 
6764
6738
 
6765
6739
 
6766
- {let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref5;
6740
+ {let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
6767
6741
  const scroll = scrollTop(window);
6768
6742
  const dir = prevScroll <= scroll ? 'down' : 'up';
6769
6743
 
@@ -6866,7 +6840,7 @@
6866
6840
  },
6867
6841
 
6868
6842
  hide() {
6869
- this.isActive = false;
6843
+ this.setActive(false);
6870
6844
  removeClass(this.$el, this.clsFixed, this.clsBelow);
6871
6845
  css(this.$el, { position: '', top: '', width: '' });
6872
6846
  this.placeholder.hidden = true;
@@ -6903,9 +6877,21 @@
6903
6877
  width });
6904
6878
 
6905
6879
 
6906
- this.isActive = active;
6880
+ this.setActive(active);
6907
6881
  toggleClass(this.$el, this.clsBelow, scroll > topOffset + height);
6908
6882
  addClass(this.$el, this.clsFixed);
6883
+ },
6884
+
6885
+ setActive(active) {
6886
+ const prev = this.active;
6887
+ this.active = active;
6888
+ if (active) {
6889
+ replaceClass(this.selTarget, this.clsInactive, this.clsActive);
6890
+ prev !== active && trigger(this.$el, 'active');
6891
+ } else {
6892
+ replaceClass(this.selTarget, this.clsActive, this.clsInactive);
6893
+ prev !== active && trigger(this.$el, 'inactive');
6894
+ }
6909
6895
  } } };
6910
6896
 
6911
6897
 
@@ -6997,6 +6983,9 @@
6997
6983
 
6998
6984
  connected() {
6999
6985
  this.lazyload(this.$el, this.connects);
6986
+
6987
+ // check for connects
6988
+ ready(() => this.$emit());
7000
6989
  },
7001
6990
 
7002
6991
  events: [
@@ -7125,13 +7114,6 @@
7125
7114
  queued: true },
7126
7115
 
7127
7116
 
7128
- connected() {
7129
- if (!includes(this.mode, 'media') && !isFocusable(this.$el)) {
7130
- attr(this.$el, 'tabindex', '0');
7131
- }
7132
- this.lazyload(this.$el, this.target);
7133
- },
7134
-
7135
7117
  computed: {
7136
7118
  target: {
7137
7119
  get(_ref, $el) {let { href, target } = _ref;
@@ -7147,6 +7129,17 @@
7147
7129
 
7148
7130
 
7149
7131
 
7132
+ connected() {
7133
+ if (!includes(this.mode, 'media') && !isFocusable(this.$el)) {
7134
+ attr(this.$el, 'tabindex', '0');
7135
+ }
7136
+
7137
+ this.lazyload(this.$el, this.target);
7138
+
7139
+ // check for target
7140
+ ready(() => this.$emit());
7141
+ },
7142
+
7150
7143
  events: [
7151
7144
  {
7152
7145
  name: pointerDown,
@@ -7271,23 +7264,26 @@
7271
7264
  if (e.target === this.target[0]) {
7272
7265
  this.updateAria(toggled);
7273
7266
  }
7274
- } }],
7267
+ } },
7275
7268
 
7276
7269
 
7270
+ {
7271
+ name: 'mediachange',
7277
7272
 
7278
- update: {
7279
- read() {
7280
- return includes(this.mode, 'media') && this.media ? { match: this.matchMedia } : false;
7273
+ filter() {
7274
+ return includes(this.mode, 'media');
7281
7275
  },
7282
7276
 
7283
- write(_ref2) {let { match } = _ref2;
7284
- const toggled = this.isToggled(this.target);
7285
- if (match ? !toggled : toggled) {
7277
+ el() {
7278
+ return this.target;
7279
+ },
7280
+
7281
+ handler(e, mediaObj) {
7282
+ if (mediaObj.matches ^ this.isToggled(this.target)) {
7286
7283
  this.toggle();
7287
7284
  }
7288
- },
7285
+ } }],
7289
7286
 
7290
- events: ['resize'] },
7291
7287
 
7292
7288
 
7293
7289
  methods: {
@@ -7338,7 +7334,6 @@
7338
7334
  Drop: drop,
7339
7335
  Dropdown: drop,
7340
7336
  FormCustom: formCustom,
7341
- Gif: gif,
7342
7337
  Grid: grid,
7343
7338
  HeightMatch: heightMatch,
7344
7339
  HeightViewport: heightViewport,
@@ -7398,7 +7393,7 @@
7398
7393
 
7399
7394
 
7400
7395
  connected() {
7401
- this.date = Date.parse(this.date);
7396
+ this.date = Date.parse(this.$props.date);
7402
7397
  this.start();
7403
7398
  },
7404
7399
 
@@ -7451,7 +7446,7 @@
7451
7446
  continue;
7452
7447
  }
7453
7448
 
7454
- let digits = String(Math.floor(timespan[unit]));
7449
+ let digits = String(Math.trunc(timespan[unit]));
7455
7450
 
7456
7451
  digits = digits.length < 2 ? "0" + digits : digits;
7457
7452
 
@@ -8439,7 +8434,7 @@
8439
8434
  } } };
8440
8435
 
8441
8436
  var Slider = {
8442
- mixins: [SliderAutoplay, SliderDrag, SliderNav],
8437
+ mixins: [SliderAutoplay, SliderDrag, SliderNav, Resize],
8443
8438
 
8444
8439
  props: {
8445
8440
  clsActivated: Boolean,
@@ -9063,8 +9058,8 @@
9063
9058
  return this.panel.show(index);
9064
9059
  },
9065
9060
 
9066
- hide() {
9067
- return this.panel && this.panel.hide();
9061
+ hide() {var _this$panel;
9062
+ return (_this$panel = this.panel) == null ? void 0 : _this$panel.hide();
9068
9063
  } } };
9069
9064
 
9070
9065
 
@@ -9448,7 +9443,7 @@
9448
9443
  if (!image.naturalWidth) {
9449
9444
  image.onload = () => {
9450
9445
  dimensions[src] = toDimensions(image);
9451
- trigger(el, 'load');
9446
+ trigger(el, createEvent('load', false));
9452
9447
  };
9453
9448
  return toDimensions(image);
9454
9449
  }
@@ -9546,7 +9541,7 @@
9546
9541
  }
9547
9542
 
9548
9543
  var parallax = {
9549
- mixins: [Parallax],
9544
+ mixins: [Parallax, Resize, Scroll],
9550
9545
 
9551
9546
  props: {
9552
9547
  target: String,
@@ -9839,7 +9834,7 @@
9839
9834
  return (
9840
9835
  finite ||
9841
9836
  Math.ceil(getWidth(this.list)) <
9842
- Math.floor(dimensions$1(this.list).width + getMaxElWidth(this.list) + this.center));
9837
+ Math.trunc(dimensions$1(this.list).width + getMaxElWidth(this.list) + this.center));
9843
9838
 
9844
9839
  },
9845
9840
 
@@ -10083,11 +10078,13 @@
10083
10078
  selItem: '!li' },
10084
10079
 
10085
10080
 
10086
- computed: {
10087
- item(_ref, $el) {let { selItem } = _ref;
10088
- return query(selItem, $el);
10089
- } },
10081
+ connected() {
10082
+ this.item = query(this.selItem, this.$el);
10083
+ },
10090
10084
 
10085
+ disconnected() {
10086
+ this.item = null;
10087
+ },
10091
10088
 
10092
10089
  events: [
10093
10090
  {
@@ -10099,7 +10096,7 @@
10099
10096
  return this.item;
10100
10097
  },
10101
10098
 
10102
- handler(_ref2) {let { type, detail: { percent, duration, timing, dir } } = _ref2;
10099
+ handler(_ref) {let { type, detail: { percent, duration, timing, dir } } = _ref;
10103
10100
  fastdom.read(() => {
10104
10101
  const propsFrom = this.getCss(getCurrentPercent(type, dir, percent));
10105
10102
  const propsTo = this.getCss(isIn(type) ? 0.5 : dir > 0 ? 1 : 0);
@@ -10134,7 +10131,7 @@
10134
10131
  return this.item;
10135
10132
  },
10136
10133
 
10137
- handler(_ref3) {let { type, detail: { percent, dir } } = _ref3;
10134
+ handler(_ref2) {let { type, detail: { percent, dir } } = _ref2;
10138
10135
  fastdom.read(() => {
10139
10136
  const props = this.getCss(getCurrentPercent(type, dir, percent));
10140
10137
  fastdom.write(() => css(this.$el, props));