uikit 3.19.5-dev.c6a7fbca6 → 3.19.5-dev.c70b3862f

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 (77) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/dist/css/uikit-core-rtl.css +2 -2
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +2 -2
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +2 -2
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +2 -2
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +87 -87
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +55 -55
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +55 -55
  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 +43 -32
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +44 -33
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +44 -34
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +44 -33
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +44 -33
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +87 -87
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +1 -1
  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 +132 -114
  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 +221 -206
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/boot.js +6 -7
  44. package/src/js/api/component.js +4 -4
  45. package/src/js/api/computed.js +20 -26
  46. package/src/js/api/observer.js +17 -5
  47. package/src/js/components/slider-parallax.js +2 -2
  48. package/src/js/components/slider.js +1 -1
  49. package/src/js/core/drop.js +1 -2
  50. package/src/js/core/height-placeholder.js +4 -1
  51. package/src/js/core/height-viewport.js +1 -1
  52. package/src/js/core/icon.js +2 -3
  53. package/src/js/core/img.js +1 -1
  54. package/src/js/core/inverse.js +13 -6
  55. package/src/js/core/margin.js +5 -0
  56. package/src/js/core/modal.js +5 -6
  57. package/src/js/core/scrollspy.js +0 -3
  58. package/src/js/core/sticky.js +1 -1
  59. package/src/js/core/switcher.js +4 -1
  60. package/src/js/core/toggle.js +6 -3
  61. package/src/js/mixin/internal/animate-fade.js +2 -7
  62. package/src/js/mixin/internal/animate-slide.js +2 -7
  63. package/src/js/mixin/parallax.js +7 -3
  64. package/src/js/mixin/slider.js +0 -3
  65. package/src/js/mixin/slideshow.js +3 -0
  66. package/src/js/util/class.js +1 -1
  67. package/src/js/util/fastdom.js +6 -13
  68. package/src/js/util/filter.js +7 -14
  69. package/src/js/util/lang.js +1 -1
  70. package/src/js/util/selector.js +33 -24
  71. package/src/js/util/style.js +2 -4
  72. package/src/js/util/svg.js +4 -1
  73. package/src/less/components/utility.less +1 -1
  74. package/src/scss/components/utility.scss +1 -1
  75. package/tests/base.html +1 -1
  76. package/tests/js/index.js +12 -10
  77. package/tests/switcher.html +86 -86
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.19.5-dev.c6a7fbca6 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
1
+ /*! UIkit 3.19.5-dev.c70b3862f | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -88,7 +88,7 @@
88
88
  return parseFloat(value) || 0;
89
89
  }
90
90
  function toNode(element) {
91
- return toNodes(element)[0];
91
+ return element && toNodes(element)[0];
92
92
  }
93
93
  function toNodes(element) {
94
94
  return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
@@ -273,7 +273,7 @@
273
273
  }
274
274
  }
275
275
  function toClasses(str) {
276
- return str ? isArray(str) ? str.map(toClasses).flat() : String(str).split(/[ ,]/).filter(Boolean) : [];
276
+ return str ? isArray(str) ? str.map(toClasses).flat() : String(str).split(" ").filter(Boolean) : [];
277
277
  }
278
278
 
279
279
  const voidElements = {
@@ -296,10 +296,11 @@
296
296
  function isVoidElement(element) {
297
297
  return toNodes(element).some((element2) => voidElements[element2.tagName.toLowerCase()]);
298
298
  }
299
+ const isVisibleFn = Element.prototype.checkVisibility || function() {
300
+ return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
301
+ };
299
302
  function isVisible(element) {
300
- return toNodes(element).some(
301
- (element2) => element2.offsetWidth || element2.offsetHeight || element2.getClientRects().length
302
- );
303
+ return toNodes(element).some((element2) => isVisibleFn.call(element2));
303
304
  }
304
305
  const selInput = "input,select,textarea,button";
305
306
  function isInput(element) {
@@ -319,13 +320,6 @@
319
320
  function matches(element, selector) {
320
321
  return toNodes(element).some((element2) => element2.matches(selector));
321
322
  }
322
- function closest(element, selector) {
323
- var _a;
324
- return (_a = toNode(element)) == null ? void 0 : _a.closest(startsWith(selector, ">") ? selector.slice(1) : selector);
325
- }
326
- function within(element, selector) {
327
- return isString(selector) ? !!closest(element, selector) : toNode(selector).contains(toNode(element));
328
- }
329
323
  function parents(element, selector) {
330
324
  const elements = [];
331
325
  while (element = parent(element)) {
@@ -374,15 +368,13 @@
374
368
  const splitSelectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
375
369
  const trailingCommaRe = /\s*,$/;
376
370
  const parseSelector = memoize((selector) => {
371
+ var _a;
377
372
  selector = selector.replace(addStarRe, "$1 *");
378
373
  let isContextSelector = false;
379
374
  const selectors = [];
380
- for (let sel of selector.match(splitSelectorRe)) {
375
+ for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
381
376
  sel = sel.replace(trailingCommaRe, "").trim();
382
- if (sel[0] === ">") {
383
- sel = `:scope ${sel}`;
384
- }
385
- isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
377
+ isContextSelector || (isContextSelector = ["!", "+", "~", "-", ">"].includes(sel[0]));
386
378
  selectors.push(sel);
387
379
  }
388
380
  return {
@@ -391,6 +383,11 @@
391
383
  isContextSelector
392
384
  };
393
385
  });
386
+ const parsePositionSelector = memoize((selector) => {
387
+ selector = selector.substr(1).trim();
388
+ const index2 = selector.indexOf(" ");
389
+ return ~index2 ? [selector.substring(0, index2), selector.substring(index2 + 1)] : [selector, ""];
390
+ });
394
391
  function _query(selector, context = document, queryFn) {
395
392
  if (!selector || !isString(selector)) {
396
393
  return selector;
@@ -402,33 +399,36 @@
402
399
  selector = "";
403
400
  const isSingle = parsed.selectors.length === 1;
404
401
  for (let sel of parsed.selectors) {
402
+ let positionSel;
405
403
  let ctx = context;
406
404
  if (sel[0] === "!") {
407
- const selectors = sel.substr(1).trim().split(" ");
408
- ctx = parent(context).closest(selectors[0]);
409
- sel = selectors.slice(1).join(" ").trim();
410
- if (!sel.length && isSingle) {
405
+ [positionSel, sel] = parsePositionSelector(sel);
406
+ ctx = context.parentElement.closest(positionSel);
407
+ if (!sel && isSingle) {
411
408
  return ctx;
412
409
  }
413
410
  }
414
- if (sel[0] === "-") {
415
- const selectors = sel.substr(1).trim().split(" ");
416
- const prev = (ctx || context).previousElementSibling;
417
- ctx = matches(prev, sel.substr(1)) ? prev : null;
418
- sel = selectors.slice(1).join(" ");
419
- if (!sel.length && isSingle) {
411
+ if (ctx && sel[0] === "-") {
412
+ [positionSel, sel] = parsePositionSelector(sel);
413
+ ctx = ctx.previousElementSibling;
414
+ ctx = matches(ctx, positionSel) ? ctx : null;
415
+ if (!sel && isSingle) {
420
416
  return ctx;
421
417
  }
422
- } else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
423
- return _doQuery(
424
- parent(context),
425
- queryFn,
426
- `:scope :nth-child(${index(context) + 1}) ${sel}`
427
- );
428
418
  }
429
- if (ctx) {
430
- selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
419
+ if (!ctx) {
420
+ continue;
431
421
  }
422
+ if (isSingle) {
423
+ if (sel[0] === "~" || sel[0] === "+") {
424
+ sel = `:scope :nth-child(${index(ctx) + 1}) ${sel}`;
425
+ ctx = ctx.parentElement;
426
+ } else if (sel[0] === ">") {
427
+ sel = `:scope ${sel}`;
428
+ }
429
+ return _doQuery(ctx, queryFn, sel);
430
+ }
431
+ selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
432
432
  }
433
433
  if (!isDocument(context)) {
434
434
  context = context.ownerDocument;
@@ -611,8 +611,7 @@
611
611
  }
612
612
  return elements[0];
613
613
  }
614
- const propName = memoize((name) => vendorPropName(name));
615
- function vendorPropName(name) {
614
+ const propName = memoize((name) => {
616
615
  if (startsWith(name, "--")) {
617
616
  return name;
618
617
  }
@@ -627,7 +626,7 @@
627
626
  return prefixedName;
628
627
  }
629
628
  }
630
- }
629
+ });
631
630
 
632
631
  const clsTransition = "uk-transition";
633
632
  const transitionEnd = "transitionend";
@@ -999,24 +998,18 @@
999
998
  },
1000
999
  flush
1001
1000
  };
1002
- function flush(recursion) {
1001
+ function flush() {
1003
1002
  runTasks(fastdom.reads);
1004
1003
  runTasks(fastdom.writes.splice(0));
1005
1004
  fastdom.scheduled = false;
1006
1005
  if (fastdom.reads.length || fastdom.writes.length) {
1007
- scheduleFlush(recursion + 1);
1006
+ scheduleFlush();
1008
1007
  }
1009
1008
  }
1010
- const RECURSION_LIMIT = 4;
1011
- function scheduleFlush(recursion) {
1012
- if (fastdom.scheduled) {
1013
- return;
1014
- }
1015
- fastdom.scheduled = true;
1016
- if (recursion && recursion < RECURSION_LIMIT) {
1017
- Promise.resolve().then(() => flush(recursion));
1018
- } else {
1019
- requestAnimationFrame(() => flush(1));
1009
+ function scheduleFlush() {
1010
+ if (!fastdom.scheduled) {
1011
+ fastdom.scheduled = true;
1012
+ queueMicrotask(flush);
1020
1013
  }
1021
1014
  }
1022
1015
  function runTasks(tasks) {
@@ -1566,7 +1559,6 @@
1566
1559
  camelize: camelize,
1567
1560
  children: children,
1568
1561
  clamp: clamp,
1569
- closest: closest,
1570
1562
  createEvent: createEvent,
1571
1563
  css: css,
1572
1564
  data: data,
@@ -1687,7 +1679,6 @@
1687
1679
  uniqueBy: uniqueBy,
1688
1680
  unwrap: unwrap,
1689
1681
  width: width,
1690
- within: within,
1691
1682
  wrapAll: wrapAll,
1692
1683
  wrapInner: wrapInner
1693
1684
  });
@@ -1775,6 +1766,7 @@
1775
1766
  }
1776
1767
  }
1777
1768
  }
1769
+ const mutationOptions = { subtree: true, childList: true };
1778
1770
  function registerComputed(instance, key, cb) {
1779
1771
  instance._hasComputed = true;
1780
1772
  Object.defineProperty(instance, key, {
@@ -1783,6 +1775,13 @@
1783
1775
  const { _computed, $props, $el } = instance;
1784
1776
  if (!hasOwn(_computed, key)) {
1785
1777
  _computed[key] = (cb.get || cb).call(instance, $props, $el);
1778
+ if (cb.observe && instance._computedObserver) {
1779
+ const selector = cb.observe.call(instance, $props);
1780
+ instance._computedObserver.observe(
1781
+ ["~", "+", "-"].includes(selector[0]) ? $el.parentElement : $el.getRootNode(),
1782
+ mutationOptions
1783
+ );
1784
+ }
1786
1785
  }
1787
1786
  return _computed[key];
1788
1787
  },
@@ -1803,11 +1802,16 @@
1803
1802
  read: () => runWatches(instance, resetComputed(instance)),
1804
1803
  events: ["resize", "computed"]
1805
1804
  });
1806
- registerComputedObserver();
1807
- instances$1.add(instance);
1805
+ instance._computedObserver = observeMutation(
1806
+ instance.$el,
1807
+ () => callUpdate(instance, "computed"),
1808
+ mutationOptions
1809
+ );
1808
1810
  }
1809
1811
  function disconnectComputedUpdates(instance) {
1810
- instances$1 == null ? void 0 : instances$1.delete(instance);
1812
+ var _a;
1813
+ (_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
1814
+ delete instance._computedObserver;
1811
1815
  resetComputed(instance);
1812
1816
  }
1813
1817
  function resetComputed(instance) {
@@ -1815,23 +1819,6 @@
1815
1819
  instance._computed = {};
1816
1820
  return values;
1817
1821
  }
1818
- let observer;
1819
- let instances$1;
1820
- function registerComputedObserver() {
1821
- if (observer) {
1822
- return;
1823
- }
1824
- instances$1 = /* @__PURE__ */ new Set();
1825
- observer = new MutationObserver(() => {
1826
- for (const instance of instances$1) {
1827
- callUpdate(instance, "computed");
1828
- }
1829
- });
1830
- observer.observe(document, {
1831
- subtree: true,
1832
- childList: true
1833
- });
1834
- }
1835
1822
 
1836
1823
  function initEvents(instance) {
1837
1824
  instance._events = [];
@@ -1901,18 +1888,30 @@
1901
1888
  }
1902
1889
  const targets = hasOwn(instance, key) ? instance[key] : target;
1903
1890
  const observer = observe(targets, handler, options, args);
1904
- if (isFunction(target) && isArray(instance[key]) && observer.unobserve) {
1905
- registerWatch(instance, { handler: updateTargets(observer), immediate: false }, key);
1891
+ if (isFunction(target) && isArray(instance[key])) {
1892
+ registerWatch(
1893
+ instance,
1894
+ { handler: updateTargets(observer, options), immediate: false },
1895
+ key
1896
+ );
1906
1897
  }
1907
1898
  registerObserver(instance, observer);
1908
1899
  }
1909
- function updateTargets(observer) {
1900
+ function updateTargets(observer, options) {
1910
1901
  return (targets, prev) => {
1911
1902
  for (const target of prev) {
1912
- !includes(targets, target) && observer.unobserve(target);
1903
+ if (!includes(targets, target)) {
1904
+ if (observer.unobserve) {
1905
+ observer.unobserve(target);
1906
+ } else if (observer.observe) {
1907
+ observer.disconnect();
1908
+ }
1909
+ }
1913
1910
  }
1914
1911
  for (const target of targets) {
1915
- !includes(prev, target) && observer.observe(target);
1912
+ if (!includes(prev, target) || !observer.unobserve) {
1913
+ observer.observe(target, options);
1914
+ }
1916
1915
  }
1917
1916
  };
1918
1917
  }
@@ -2179,26 +2178,26 @@
2179
2178
  };
2180
2179
  App.util = util;
2181
2180
  App.options = {};
2182
- App.version = "3.19.5-dev.c6a7fbca6";
2181
+ App.version = "3.19.5-dev.c70b3862f";
2183
2182
 
2184
2183
  const PREFIX = "uk-";
2185
2184
  const DATA = "__uikit__";
2186
2185
  const components$1 = {};
2187
2186
  function component(name, options) {
2188
- var _a;
2187
+ var _a, _b;
2189
2188
  const id = PREFIX + hyphenate(name);
2190
2189
  if (!options) {
2191
- if (isPlainObject(components$1[id])) {
2190
+ if (!components$1[id].options) {
2192
2191
  components$1[id] = App.extend(components$1[id]);
2193
2192
  }
2194
2193
  return components$1[id];
2195
2194
  }
2196
2195
  name = camelize(name);
2197
2196
  App[name] = (element, data) => createComponent(name, element, data);
2198
- const opt = isPlainObject(options) ? { ...options } : options.options;
2197
+ const opt = (_a = options.options) != null ? _a : { ...options };
2199
2198
  opt.id = id;
2200
2199
  opt.name = name;
2201
- (_a = opt.install) == null ? void 0 : _a.call(opt, App, opt, name);
2200
+ (_b = opt.install) == null ? void 0 : _b.call(opt, App, opt, name);
2202
2201
  if (App._initialized && !opt.functional) {
2203
2202
  requestAnimationFrame(() => createComponent(name, `[${id}],[data-${id}]`));
2204
2203
  }
@@ -2206,7 +2205,7 @@
2206
2205
  }
2207
2206
  function createComponent(name, element, data, ...args) {
2208
2207
  const Component = component(name);
2209
- return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ? $$(element).map(init)[0] : init();
2208
+ return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ? findAll(element).map(init)[0] : init();
2210
2209
  function init(element2) {
2211
2210
  const instance = getComponent(element2, name);
2212
2211
  if (instance) {
@@ -2282,14 +2281,14 @@
2282
2281
  if (name) {
2283
2282
  if (hasAttr(target, attributeName)) {
2284
2283
  createComponent(name, target);
2285
- return;
2284
+ } else {
2285
+ (_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
2286
2286
  }
2287
- (_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
2288
2287
  }
2289
2288
  }
2290
2289
  function connect(node) {
2291
2290
  const components2 = getComponents(node);
2292
- for (const name in getComponents(node)) {
2291
+ for (const name in components2) {
2293
2292
  callConnected(components2[name]);
2294
2293
  }
2295
2294
  for (const attributeName of node.getAttributeNames()) {
@@ -2299,7 +2298,7 @@
2299
2298
  }
2300
2299
  function disconnect(node) {
2301
2300
  const components2 = getComponents(node);
2302
- for (const name in getComponents(node)) {
2301
+ for (const name in components2) {
2303
2302
  callDisconnected(components2[name]);
2304
2303
  }
2305
2304
  }
@@ -2308,7 +2307,7 @@
2308
2307
  attribute = attribute.slice(5);
2309
2308
  }
2310
2309
  const cmp = components$1[attribute];
2311
- return cmp && (isPlainObject(cmp) ? cmp : cmp.options).name;
2310
+ return cmp && (cmp.options || cmp).name;
2312
2311
  }
2313
2312
 
2314
2313
  function globalApi(App) {
@@ -3569,7 +3568,8 @@
3569
3568
  document,
3570
3569
  `${pointerUp} ${pointerCancel} scroll`,
3571
3570
  ({ defaultPrevented, type, target: newTarget }) => {
3572
- if (!defaultPrevented && type === pointerUp && target === newTarget && !(drop.targetEl && within(target, drop.targetEl))) {
3571
+ var _a;
3572
+ if (!defaultPrevented && type === pointerUp && target === newTarget && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
3573
3573
  drop.hide(false);
3574
3574
  }
3575
3575
  },
@@ -3965,6 +3965,11 @@
3965
3965
  firstColumn: "uk-first-column"
3966
3966
  },
3967
3967
  observe: [
3968
+ mutation({
3969
+ options: {
3970
+ childList: true
3971
+ }
3972
+ }),
3968
3973
  mutation({
3969
3974
  options: {
3970
3975
  attributes: true,
@@ -4276,7 +4281,10 @@
4276
4281
  target: ""
4277
4282
  },
4278
4283
  computed: {
4279
- target: ({ target }, $el) => query(target, $el)
4284
+ target: {
4285
+ get: ({ target }, $el) => query(target, $el),
4286
+ observe: ({ target }) => target
4287
+ }
4280
4288
  },
4281
4289
  observe: resize({ target: ({ target }) => target }),
4282
4290
  update: {
@@ -4332,7 +4340,7 @@
4332
4340
  const top = offsetPosition(offsetTopEl)[0] - offsetPosition(scrollElement)[0];
4333
4341
  minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : "";
4334
4342
  } else {
4335
- minHeight += ` - ${css(scrollElement, "paddingTop")}`;
4343
+ minHeight += ` - ${boxModelAdjust(scrollElement, "height", css(scrollElement, "boxSizing"))}px`;
4336
4344
  }
4337
4345
  }
4338
4346
  if (this.offsetBottom === true) {
@@ -4545,7 +4553,7 @@
4545
4553
  i18n: { toggle: "Open Search", submit: "Submit Search" },
4546
4554
  beforeConnect() {
4547
4555
  const isToggle = hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle");
4548
- this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") && closest(this.$el, ".uk-search-large") ? "search-large" : closest(this.$el, ".uk-search-navbar") ? "search-navbar" : this.$props.icon;
4556
+ this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") && this.$el.closest(".uk-search-large") ? "search-large" : this.$el.closest(".uk-search-navbar") ? "search-navbar" : this.$props.icon;
4549
4557
  if (hasAttr(this.$el, "aria-label")) {
4550
4558
  return;
4551
4559
  }
@@ -4689,13 +4697,13 @@
4689
4697
  delete this.img;
4690
4698
  },
4691
4699
  observe: intersection({
4692
- target: ({ $el, $props }) => [$el, ...queryAll($props.target, $el)],
4693
4700
  handler(entries, observer) {
4694
4701
  this.load();
4695
4702
  observer.disconnect();
4696
4703
  },
4697
4704
  options: ({ margin }) => ({ rootMargin: margin }),
4698
- filter: ({ loading }) => loading === "lazy"
4705
+ filter: ({ loading }) => loading === "lazy",
4706
+ target: ({ $el, $props }) => $props.target ? [$el, ...queryAll($props.target, $el)] : $el
4699
4707
  }),
4700
4708
  methods: {
4701
4709
  load() {
@@ -4785,13 +4793,15 @@
4785
4793
  selActive: false
4786
4794
  },
4787
4795
  computed: {
4788
- target: ({ target }, $el) => target ? $$(target, $el) : [$el]
4796
+ target: ({ target }, $el) => target ? $$(target, $el) : $el
4789
4797
  },
4790
4798
  observe: [
4791
4799
  intersection({
4792
- handler([{ isIntersecting }]) {
4793
- this.isIntersecting = isIntersecting;
4800
+ handler(entries) {
4801
+ this.isIntersecting = entries.some(({ isIntersecting }) => isIntersecting);
4802
+ this.$emit();
4794
4803
  },
4804
+ target: ({ target }) => target,
4795
4805
  args: { intersecting: false }
4796
4806
  }),
4797
4807
  mutation({
@@ -4801,7 +4811,10 @@
4801
4811
  {
4802
4812
  target: ({ target }) => target,
4803
4813
  observe: (target, handler) => {
4804
- const observer = observeResize([...target, document.documentElement], handler);
4814
+ const observer = observeResize(
4815
+ [...toNodes(target), document.documentElement],
4816
+ handler
4817
+ );
4805
4818
  const listener = [
4806
4819
  on(document, "scroll itemshown itemhidden", handler, {
4807
4820
  passive: true,
@@ -4817,6 +4830,8 @@
4817
4830
  })
4818
4831
  ];
4819
4832
  return {
4833
+ observe: observer.observe.bind(observer),
4834
+ unobserve: observer.unobserve.bind(observer),
4820
4835
  disconnect() {
4821
4836
  observer.disconnect();
4822
4837
  listener.map((off) => off());
@@ -4833,7 +4848,7 @@
4833
4848
  if (!this.isIntersecting) {
4834
4849
  return false;
4835
4850
  }
4836
- for (const target of this.target) {
4851
+ for (const target of toNodes(this.target)) {
4837
4852
  replaceClass(
4838
4853
  target,
4839
4854
  "uk-light,uk-dark",
@@ -5200,10 +5215,11 @@
5200
5215
  };
5201
5216
  function install({ modal }) {
5202
5217
  modal.dialog = function(content, options) {
5203
- const dialog = modal(
5204
- `<div class="uk-modal"> <div class="uk-modal-dialog">${content}</div> </div>`,
5205
- { stack: true, role: "alertdialog", ...options }
5206
- );
5218
+ const dialog = modal($(`<div><div class="uk-modal-dialog">${content}</div></div>`), {
5219
+ stack: true,
5220
+ role: "alertdialog",
5221
+ ...options
5222
+ });
5207
5223
  dialog.show();
5208
5224
  on(
5209
5225
  dialog.$el,
@@ -5675,7 +5691,6 @@
5675
5691
  }
5676
5692
  trigger(el, inview ? "inview" : "outview");
5677
5693
  state.inview = inview;
5678
- this.$update(el);
5679
5694
  }
5680
5695
  }
5681
5696
  };
@@ -5822,7 +5837,7 @@
5822
5837
  target: () => document.scrollingElement,
5823
5838
  options: { box: "content-box" }
5824
5839
  }),
5825
- resize({ target: ({ $el }) => $el })
5840
+ resize()
5826
5841
  ],
5827
5842
  events: [
5828
5843
  {
@@ -6115,10 +6130,7 @@
6115
6130
  }
6116
6131
 
6117
6132
  function getMaxPathLength(el) {
6118
- return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => {
6119
- var _a;
6120
- return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
6121
- })));
6133
+ return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
6122
6134
  }
6123
6135
 
6124
6136
  var svg = {
@@ -6242,7 +6254,10 @@
6242
6254
  swiping: true
6243
6255
  },
6244
6256
  computed: {
6245
- connects: ({ connect }, $el) => queryAll(connect, $el),
6257
+ connects: {
6258
+ get: ({ connect }, $el) => queryAll(connect, $el),
6259
+ observe: ({ connect }) => connect
6260
+ },
6246
6261
  connectChildren() {
6247
6262
  return this.connects.map((el) => children(el)).flat();
6248
6263
  },
@@ -6431,9 +6446,12 @@
6431
6446
  queued: true
6432
6447
  },
6433
6448
  computed: {
6434
- target({ target }, $el) {
6435
- target = queryAll(target || $el.hash, $el);
6436
- return target.length ? target : [$el];
6449
+ target: {
6450
+ get: ({ target }, $el) => {
6451
+ target = queryAll(target || $el.hash, $el);
6452
+ return target.length ? target : [$el];
6453
+ },
6454
+ observe: ({ target }) => target
6437
6455
  }
6438
6456
  },
6439
6457
  connected() {