uikit 3.13.8-dev.6a84a45c4 → 3.13.8-dev.6e328ba86

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 (69) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/css/uikit-core-rtl.css +14 -7
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +14 -7
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +17 -10
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +17 -10
  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 +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +5 -2
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +5 -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 +2 -1
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +2 -1
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +1 -1
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +2 -1
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +1 -1
  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 +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 +69 -68
  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 +73 -69
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/hooks.js +1 -1
  44. package/src/js/components/lightbox-panel.js +4 -1
  45. package/src/js/core/height-match.js +0 -1
  46. package/src/js/core/navbar.js +17 -7
  47. package/src/js/core/scrollspy.js +45 -26
  48. package/src/js/core/toggle.js +1 -1
  49. package/src/js/mixin/media.js +1 -0
  50. package/src/js/uikit-core.js +0 -4
  51. package/src/less/components/icon.less +3 -0
  52. package/src/less/components/navbar.less +11 -7
  53. package/src/less/components/search.less +2 -0
  54. package/src/less/theme/dropdown.less +2 -0
  55. package/src/less/theme/nav.less +2 -0
  56. package/src/less/theme/navbar.less +2 -0
  57. package/src/less/theme/search.less +6 -0
  58. package/src/scss/components/icon.scss +3 -0
  59. package/src/scss/components/navbar.scss +11 -7
  60. package/src/scss/components/search.scss +2 -0
  61. package/src/scss/mixins-theme.scss +1 -0
  62. package/src/scss/mixins.scss +1 -0
  63. package/src/scss/theme/dropdown.scss +2 -0
  64. package/src/scss/theme/nav.scss +2 -0
  65. package/src/scss/theme/navbar.scss +2 -0
  66. package/src/scss/theme/search.scss +6 -0
  67. package/src/scss/variables-theme.scss +3 -3
  68. package/tests/navbar.html +37 -0
  69. package/src/js/core/core.js +0 -25
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.8-dev.6a84a45c4 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.8-dev.6e328ba86 | 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() :
@@ -1740,11 +1740,11 @@
1740
1740
  }
1741
1741
  }
1742
1742
 
1743
- const stateKey$1 = '_ukPlayer';
1743
+ const stateKey = '_ukPlayer';
1744
1744
  let counter = 0;
1745
1745
  function enableApi(el) {
1746
- if (el[stateKey$1]) {
1747
- return el[stateKey$1];
1746
+ if (el[stateKey]) {
1747
+ return el[stateKey];
1748
1748
  }
1749
1749
 
1750
1750
  const youtube = isYoutube(el);
@@ -1753,7 +1753,7 @@
1753
1753
  const id = ++counter;
1754
1754
  let poller;
1755
1755
 
1756
- return el[stateKey$1] = new Promise((resolve) => {
1756
+ return el[stateKey] = new Promise((resolve) => {
1757
1757
  youtube &&
1758
1758
  once(el, 'load', () => {
1759
1759
  const listener = () => post(el, { event: 'listening', id });
@@ -2411,7 +2411,7 @@
2411
2411
  const {
2412
2412
  $options: { computed } } =
2413
2413
  this;
2414
- const values = { ...this._computed };
2414
+ const values = { ...(initial ? {} : this._computed) };
2415
2415
  this._computed = {};
2416
2416
 
2417
2417
  for (const key in computed) {
@@ -2891,7 +2891,7 @@
2891
2891
  UIkit.data = '__uikit__';
2892
2892
  UIkit.prefix = 'uk-';
2893
2893
  UIkit.options = {};
2894
- UIkit.version = '3.13.8-dev.6a84a45c4';
2894
+ UIkit.version = '3.13.8-dev.6e328ba86';
2895
2895
 
2896
2896
  globalAPI(UIkit);
2897
2897
  hooksAPI(UIkit);
@@ -2899,30 +2899,6 @@
2899
2899
  componentAPI(UIkit);
2900
2900
  instanceAPI(UIkit);
2901
2901
 
2902
- function Core () {
2903
- if (!inBrowser) {
2904
- return;
2905
- }
2906
-
2907
- let started = 0;
2908
- on(
2909
- document,
2910
- 'animationstart',
2911
- (_ref) => {let { target } = _ref;
2912
- if ((css(target, 'animationName') || '').match(/^uk-.*(left|right)/)) {
2913
- started++;
2914
- css(document.documentElement, 'overflowX', 'hidden');
2915
- setTimeout(() => {
2916
- if (! --started) {
2917
- css(document.documentElement, 'overflowX', '');
2918
- }
2919
- }, toMs(css(target, 'animationDuration')) + 100);
2920
- }
2921
- },
2922
- true);
2923
-
2924
- }
2925
-
2926
2902
  function boot (UIkit) {
2927
2903
  const { connect, disconnect } = UIkit;
2928
2904
 
@@ -4288,8 +4264,7 @@
4288
4264
 
4289
4265
  data: {
4290
4266
  target: '> *',
4291
- row: true,
4292
- forceHeight: true },
4267
+ row: true },
4293
4268
 
4294
4269
 
4295
4270
  computed: {
@@ -4994,6 +4969,7 @@
4994
4969
 
4995
4970
  connected() {
4996
4971
  const media = toMedia(this.media);
4972
+ this.matchMedia = true;
4997
4973
  if (media) {
4998
4974
  this.mediaObj = window.matchMedia(media);
4999
4975
  const handler = () => {
@@ -5472,8 +5448,6 @@
5472
5448
  toggle: '> a',
5473
5449
  content: '> ul' } };
5474
5450
 
5475
- const navItem = '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle';
5476
-
5477
5451
  var navbar = {
5478
5452
  mixins: [Class, Container],
5479
5453
 
@@ -5493,7 +5467,7 @@
5493
5467
 
5494
5468
 
5495
5469
  data: {
5496
- dropdown: navItem,
5470
+ dropdown: '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle',
5497
5471
  align: isRtl ? 'right' : 'left',
5498
5472
  clsDrop: 'uk-navbar-dropdown',
5499
5473
  mode: undefined,
@@ -5506,8 +5480,6 @@
5506
5480
  dropbar: false,
5507
5481
  dropbarAnchor: false,
5508
5482
  duration: 200,
5509
- forceHeight: true,
5510
- selMinHeight: navItem,
5511
5483
  container: false },
5512
5484
 
5513
5485
 
@@ -5581,9 +5553,23 @@
5581
5553
  immediate: true },
5582
5554
 
5583
5555
 
5584
- toggles(_ref6, $el) {let { dropdown } = _ref6;
5585
- return $$(dropdown, $el);
5586
- } },
5556
+ toggles: {
5557
+ get(_ref6, $el) {let { dropdown } = _ref6;
5558
+ return $$(dropdown, $el);
5559
+ },
5560
+
5561
+ watch() {
5562
+ const justify = hasClass(this.$el, 'uk-navbar-justify');
5563
+ for (const container of $$(
5564
+ '.uk-navbar-nav, .uk-navbar-left, .uk-navbar-right',
5565
+ this.$el))
5566
+ {
5567
+ css(container, 'flexGrow', justify ? $$(this.dropdown, container).length : '');
5568
+ }
5569
+ },
5570
+
5571
+ immediate: true } },
5572
+
5587
5573
 
5588
5574
 
5589
5575
  disconnected() {
@@ -6289,7 +6275,6 @@
6289
6275
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
6290
6276
  }
6291
6277
 
6292
- const stateKey = '_ukScrollspy';
6293
6278
  var scrollspy = {
6294
6279
  mixins: [Scroll],
6295
6280
 
@@ -6322,43 +6307,64 @@
6322
6307
  return target ? $$(target, $el) : [$el];
6323
6308
  },
6324
6309
 
6325
- watch(elements) {
6310
+ watch(elements, prev) {
6326
6311
  if (this.hidden) {
6327
6312
  css(filter$1(elements, ":not(." + this.inViewClass + ")"), 'visibility', 'hidden');
6328
6313
  }
6314
+
6315
+ if (prev) {
6316
+ this.$reset();
6317
+ }
6329
6318
  },
6330
6319
 
6331
6320
  immediate: true } },
6332
6321
 
6333
6322
 
6334
6323
 
6335
- disconnected() {
6336
- for (const el of this.elements) {var _el$stateKey;
6337
- removeClass(el, this.inViewClass, ((_el$stateKey = el[stateKey]) == null ? void 0 : _el$stateKey.cls) || '');
6338
- delete el[stateKey];
6339
- }
6340
- },
6324
+ connected() {
6325
+ this._data.elements = new Map();
6326
+ this.registerObserver(
6327
+ observeIntersection(
6328
+ this.elements,
6329
+ (records) => {
6330
+ const elements = this._data.elements;
6331
+ for (const { target: el, isIntersecting } of records) {
6332
+ if (!elements.has(el)) {
6333
+ elements.set(el, {
6334
+ cls: data(el, 'uk-scrollspy-class') || this.cls });
6341
6335
 
6342
- update: [
6343
- {
6344
- read() {
6345
- for (const el of this.elements) {
6346
- if (!el[stateKey]) {
6347
- el[stateKey] = { cls: data(el, 'uk-scrollspy-class') || this.cls };
6348
6336
  }
6349
6337
 
6350
- if (!this.repeat && el[stateKey].show) {
6338
+ const state = elements.get(el);
6339
+ if (!this.repeat && state.show) {
6351
6340
  continue;
6352
6341
  }
6353
6342
 
6354
- el[stateKey].show = isInView(el, this.offsetTop, this.offsetLeft);
6343
+ state.show = isIntersecting;
6355
6344
  }
6345
+
6346
+ this.$emit();
6356
6347
  },
6348
+ {
6349
+ rootMargin: toPx(this.offsetTop, 'height') - 1 + "px " + (
6350
+ toPx(this.offsetLeft, 'width') - 1) + "px" },
6357
6351
 
6358
- write(data) {
6359
- for (const el of this.elements) {
6360
- const state = el[stateKey];
6361
6352
 
6353
+ false));
6354
+
6355
+
6356
+ },
6357
+
6358
+ disconnected() {
6359
+ for (const [el, state] of this._data.elements.entries()) {
6360
+ removeClass(el, this.inViewClass, (state == null ? void 0 : state.cls) || '');
6361
+ }
6362
+ },
6363
+
6364
+ update: [
6365
+ {
6366
+ write(data) {
6367
+ for (const [el, state] of data.elements.entries()) {
6362
6368
  if (state.show && !state.inview && !state.queued) {
6363
6369
  state.queued = true;
6364
6370
 
@@ -6375,15 +6381,13 @@
6375
6381
  this.toggle(el, false);
6376
6382
  }
6377
6383
  }
6378
- },
6379
-
6380
- events: ['scroll', 'resize'] }],
6384
+ } }],
6381
6385
 
6382
6386
 
6383
6387
 
6384
6388
  methods: {
6385
6389
  toggle(el, inview) {
6386
- const state = el[stateKey];
6390
+ const state = this._data.elements.get(el);
6387
6391
 
6388
6392
  state.off == null ? void 0 : state.off();
6389
6393
 
@@ -7134,7 +7138,7 @@
7134
7138
  }
7135
7139
 
7136
7140
  // Skip if state does not change e.g. hover + focus received
7137
- if (this._showState && show === (expanded !== this._showState)) {
7141
+ if (this._showState && show && expanded !== this._showState) {
7138
7142
  // Ensure reset if state has changed through click
7139
7143
  if (!show) {
7140
7144
  this._showState = null;
@@ -7310,9 +7314,6 @@
7310
7314
  // register components
7311
7315
  each(components$1, (component, name) => UIkit.component(name, component));
7312
7316
 
7313
- // core functionality
7314
- UIkit.use(Core);
7315
-
7316
7317
  boot(UIkit);
7317
7318
 
7318
7319
  const units = ['days', 'hours', 'minutes', 'seconds'];
@@ -8807,7 +8808,10 @@
8807
8808
 
8808
8809
 
8809
8810
  // Image
8810
- if (type === 'image' || src.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i)) {
8811
+ if (
8812
+ type === 'image' ||
8813
+ src.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i))
8814
+ {
8811
8815
  try {
8812
8816
  const { width, height } = await getImage(src, attrs.srcset, attrs.size);
8813
8817
  this.setItem(item, createEl('img', { src, width, height, alt, ...attrs }));