uikit 3.13.8-dev.06ac04d2b → 3.13.8-dev.4bb05e5fe

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 (68) hide show
  1. package/CHANGELOG.md +4 -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 +53 -37
  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 +57 -38
  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 +0 -2
  47. package/src/js/core/scrollspy.js +45 -26
  48. package/src/js/core/sticky.js +2 -2
  49. package/src/js/core/toggle.js +1 -1
  50. package/src/js/mixin/media.js +1 -0
  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
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.8-dev.06ac04d2b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.8-dev.4bb05e5fe | 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.06ac04d2b';
2894
+ UIkit.version = '3.13.8-dev.4bb05e5fe';
2895
2895
 
2896
2896
  globalAPI(UIkit);
2897
2897
  hooksAPI(UIkit);
@@ -4288,8 +4288,7 @@
4288
4288
 
4289
4289
  data: {
4290
4290
  target: '> *',
4291
- row: true,
4292
- forceHeight: true },
4291
+ row: true },
4293
4292
 
4294
4293
 
4295
4294
  computed: {
@@ -4994,6 +4993,7 @@
4994
4993
 
4995
4994
  connected() {
4996
4995
  const media = toMedia(this.media);
4996
+ this.matchMedia = true;
4997
4997
  if (media) {
4998
4998
  this.mediaObj = window.matchMedia(media);
4999
4999
  const handler = () => {
@@ -5506,8 +5506,6 @@
5506
5506
  dropbar: false,
5507
5507
  dropbarAnchor: false,
5508
5508
  duration: 200,
5509
- forceHeight: true,
5510
- selMinHeight: navItem,
5511
5509
  container: false },
5512
5510
 
5513
5511
 
@@ -6289,7 +6287,6 @@
6289
6287
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
6290
6288
  }
6291
6289
 
6292
- const stateKey = '_ukScrollspy';
6293
6290
  var scrollspy = {
6294
6291
  mixins: [Scroll],
6295
6292
 
@@ -6322,43 +6319,64 @@
6322
6319
  return target ? $$(target, $el) : [$el];
6323
6320
  },
6324
6321
 
6325
- watch(elements) {
6322
+ watch(elements, prev) {
6326
6323
  if (this.hidden) {
6327
6324
  css(filter$1(elements, ":not(." + this.inViewClass + ")"), 'visibility', 'hidden');
6328
6325
  }
6326
+
6327
+ if (prev) {
6328
+ this.$reset();
6329
+ }
6329
6330
  },
6330
6331
 
6331
6332
  immediate: true } },
6332
6333
 
6333
6334
 
6334
6335
 
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
- },
6336
+ connected() {
6337
+ this._data.elements = new Map();
6338
+ this.registerObserver(
6339
+ observeIntersection(
6340
+ this.elements,
6341
+ (records) => {
6342
+ const elements = this._data.elements;
6343
+ for (const { target: el, isIntersecting } of records) {
6344
+ if (!elements.has(el)) {
6345
+ elements.set(el, {
6346
+ cls: data(el, 'uk-scrollspy-class') || this.cls });
6341
6347
 
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
6348
  }
6349
6349
 
6350
- if (!this.repeat && el[stateKey].show) {
6350
+ const state = elements.get(el);
6351
+ if (!this.repeat && state.show) {
6351
6352
  continue;
6352
6353
  }
6353
6354
 
6354
- el[stateKey].show = isInView(el, this.offsetTop, this.offsetLeft);
6355
+ state.show = isIntersecting;
6355
6356
  }
6357
+
6358
+ this.$emit();
6356
6359
  },
6360
+ {
6361
+ rootMargin: toPx(this.offsetTop, 'height') - 1 + "px " + (
6362
+ toPx(this.offsetLeft, 'width') - 1) + "px" },
6357
6363
 
6358
- write(data) {
6359
- for (const el of this.elements) {
6360
- const state = el[stateKey];
6361
6364
 
6365
+ false));
6366
+
6367
+
6368
+ },
6369
+
6370
+ disconnected() {
6371
+ for (const [el, state] of this._data.elements.entries()) {
6372
+ removeClass(el, this.inViewClass, (state == null ? void 0 : state.cls) || '');
6373
+ }
6374
+ },
6375
+
6376
+ update: [
6377
+ {
6378
+ write(data) {
6379
+ for (const [el, state] of data.elements.entries()) {
6362
6380
  if (state.show && !state.inview && !state.queued) {
6363
6381
  state.queued = true;
6364
6382
 
@@ -6375,15 +6393,13 @@
6375
6393
  this.toggle(el, false);
6376
6394
  }
6377
6395
  }
6378
- },
6379
-
6380
- events: ['scroll', 'resize'] }],
6396
+ } }],
6381
6397
 
6382
6398
 
6383
6399
 
6384
6400
  methods: {
6385
6401
  toggle(el, inview) {
6386
- const state = el[stateKey];
6402
+ const state = this._data.elements.get(el);
6387
6403
 
6388
6404
  state.off == null ? void 0 : state.off();
6389
6405
 
@@ -6606,13 +6622,13 @@
6606
6622
  return false;
6607
6623
  }
6608
6624
 
6609
- const hide = this.isActive && types.has('resize');
6625
+ const hide = this.active && types.has('resize');
6610
6626
  if (hide) {
6611
6627
  css(this.selTarget, 'transition', '0s');
6612
6628
  this.hide();
6613
6629
  }
6614
6630
 
6615
- if (!this.isActive) {
6631
+ if (!this.active) {
6616
6632
  height$1 = offset(this.$el).height;
6617
6633
  margin = css(this.$el, 'margin');
6618
6634
  }
@@ -7134,7 +7150,7 @@
7134
7150
  }
7135
7151
 
7136
7152
  // Skip if state does not change e.g. hover + focus received
7137
- if (this._showState && show === (expanded !== this._showState)) {
7153
+ if (this._showState && show && expanded !== this._showState) {
7138
7154
  // Ensure reset if state has changed through click
7139
7155
  if (!show) {
7140
7156
  this._showState = null;
@@ -8807,7 +8823,10 @@
8807
8823
 
8808
8824
 
8809
8825
  // Image
8810
- if (type === 'image' || src.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i)) {
8826
+ if (
8827
+ type === 'image' ||
8828
+ src.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i))
8829
+ {
8811
8830
  try {
8812
8831
  const { width, height } = await getImage(src, attrs.srcset, attrs.size);
8813
8832
  this.setItem(item, createEl('img', { src, width, height, alt, ...attrs }));