uikit 3.13.8-dev.9cb7293e5 → 3.13.8-dev.eab90fc4f

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 (63) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/css/uikit-core-rtl.css +11 -2
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +11 -2
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +11 -2
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +11 -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 +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +7 -3
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +7 -3
  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 +1 -1
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +1 -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 +1 -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 +64 -50
  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 +64 -50
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/height-match.js +1 -2
  44. package/src/js/core/margin.js +1 -1
  45. package/src/js/core/navbar.js +17 -7
  46. package/src/js/core/toggle.js +1 -1
  47. package/src/js/mixin/modal.js +6 -2
  48. package/src/js/uikit-core.js +0 -4
  49. package/src/js/util/lang.js +0 -4
  50. package/src/js/util/position.js +34 -1
  51. package/src/less/components/drop.less +0 -1
  52. package/src/less/components/navbar.less +11 -0
  53. package/src/less/components/search.less +2 -0
  54. package/src/less/theme/search.less +6 -0
  55. package/src/scss/components/drop.scss +0 -1
  56. package/src/scss/components/navbar.scss +11 -0
  57. package/src/scss/components/search.scss +2 -0
  58. package/src/scss/mixins-theme.scss +1 -0
  59. package/src/scss/mixins.scss +1 -0
  60. package/src/scss/theme/search.scss +6 -0
  61. package/tests/animation.html +216 -214
  62. package/tests/navbar.html +37 -0
  63. package/src/js/core/core.js +0 -25
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "uikit",
3
3
  "title": "UIkit",
4
4
  "description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
5
- "version": "3.13.8-dev.9cb7293e5",
5
+ "version": "3.13.8-dev.eab90fc4f",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -15,7 +15,6 @@ export default {
15
15
  data: {
16
16
  target: '> *',
17
17
  row: true,
18
- forceHeight: true,
19
18
  },
20
19
 
21
20
  computed: {
@@ -31,7 +30,7 @@ export default {
31
30
  },
32
31
 
33
32
  resizeTargets() {
34
- return this.elements;
33
+ return [this.$el, this.elements];
35
34
  },
36
35
 
37
36
  update: {
@@ -15,7 +15,7 @@ export default {
15
15
  },
16
16
 
17
17
  resizeTargets() {
18
- return this.$el.children;
18
+ return [this.$el, this.$el.children];
19
19
  },
20
20
 
21
21
  connected() {
@@ -27,8 +27,6 @@ import {
27
27
  within,
28
28
  } from 'uikit-util';
29
29
 
30
- const navItem = '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle';
31
-
32
30
  export default {
33
31
  mixins: [Class, Container],
34
32
 
@@ -48,7 +46,7 @@ export default {
48
46
  },
49
47
 
50
48
  data: {
51
- dropdown: navItem,
49
+ dropdown: '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle',
52
50
  align: isRtl ? 'right' : 'left',
53
51
  clsDrop: 'uk-navbar-dropdown',
54
52
  mode: undefined,
@@ -61,8 +59,6 @@ export default {
61
59
  dropbar: false,
62
60
  dropbarAnchor: false,
63
61
  duration: 200,
64
- forceHeight: true,
65
- selMinHeight: navItem,
66
62
  container: false,
67
63
  },
68
64
 
@@ -136,8 +132,22 @@ export default {
136
132
  immediate: true,
137
133
  },
138
134
 
139
- toggles({ dropdown }, $el) {
140
- return $$(dropdown, $el);
135
+ toggles: {
136
+ get({ dropdown }, $el) {
137
+ return $$(dropdown, $el);
138
+ },
139
+
140
+ watch() {
141
+ const justify = hasClass(this.$el, 'uk-navbar-justify');
142
+ for (const container of $$(
143
+ '.uk-navbar-nav, .uk-navbar-left, .uk-navbar-right',
144
+ this.$el
145
+ )) {
146
+ css(container, 'flexGrow', justify ? $$(this.dropdown, container).length : '');
147
+ }
148
+ },
149
+
150
+ immediate: true,
141
151
  },
142
152
  },
143
153
 
@@ -124,7 +124,7 @@ export default {
124
124
  }
125
125
 
126
126
  // Skip if state does not change e.g. hover + focus received
127
- if (this._showState && show === (expanded !== this._showState)) {
127
+ if (this._showState && show && expanded !== this._showState) {
128
128
  // Ensure reset if state has changed through click
129
129
  if (!show) {
130
130
  this._showState = null;
@@ -4,6 +4,7 @@ import {
4
4
  append,
5
5
  attr,
6
6
  css,
7
+ endsWith,
7
8
  includes,
8
9
  isFocusable,
9
10
  last,
@@ -15,7 +16,6 @@ import {
15
16
  pointerUp,
16
17
  removeClass,
17
18
  toFloat,
18
- toMs,
19
19
  width,
20
20
  within,
21
21
  } from 'uikit-util';
@@ -245,7 +245,7 @@ function animate({ transitionElement, _toggle }) {
245
245
  return (el, show) =>
246
246
  new Promise((resolve, reject) =>
247
247
  once(el, 'show hide', () => {
248
- el._reject && el._reject();
248
+ el._reject?.();
249
249
  el._reject = reject;
250
250
 
251
251
  _toggle(el, show);
@@ -269,3 +269,7 @@ function animate({ transitionElement, _toggle }) {
269
269
  })
270
270
  ).then(() => delete el._reject);
271
271
  }
272
+
273
+ function toMs(time) {
274
+ return time ? (endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000) : 0;
275
+ }
@@ -1,5 +1,4 @@
1
1
  import UIkit from './api/index';
2
- import Core from './core/core';
3
2
  import boot from './api/boot';
4
3
  import * as components from './core/index';
5
4
  import { each } from 'uikit-util';
@@ -7,9 +6,6 @@ import { each } from 'uikit-util';
7
6
  // register components
8
7
  each(components, (component, name) => UIkit.component(name, component));
9
8
 
10
- // core functionality
11
- UIkit.use(Core);
12
-
13
9
  boot(UIkit);
14
10
 
15
11
  export default UIkit;
@@ -133,10 +133,6 @@ export function toWindow(element) {
133
133
  return document?.defaultView || window;
134
134
  }
135
135
 
136
- export function toMs(time) {
137
- return time ? (endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000) : 0;
138
- }
139
-
140
136
  export function isEqual(value, other) {
141
137
  return (
142
138
  value === other ||
@@ -51,7 +51,7 @@ function attachTo(element, target, options) {
51
51
  }
52
52
 
53
53
  function attachToWithFlip(element, target, options) {
54
- const position = attachTo(element, target, options);
54
+ let position = attachTo(element, target, options);
55
55
  const targetDim = offset(target);
56
56
  const viewports = scrollParents(element).map(getViewport);
57
57
 
@@ -61,6 +61,7 @@ function attachToWithFlip(element, target, options) {
61
61
  offset: elOffset,
62
62
  boundary,
63
63
  viewport,
64
+ recursion = 0,
64
65
  } = options;
65
66
 
66
67
  viewports.push(viewport);
@@ -110,6 +111,29 @@ function attachToWithFlip(element, target, options) {
110
111
  : 0) -
111
112
  elOffset[i] * 2;
112
113
 
114
+ if (
115
+ position[start] + offsetBy < viewport[start] ||
116
+ position[end] + offsetBy > viewport[end]
117
+ ) {
118
+ if (recursion < 1) {
119
+ position =
120
+ attachToWithFlip(element, target, {
121
+ ...options,
122
+ attach: {
123
+ element: elAttach.map(flipDir).reverse(),
124
+ target: targetAttach.map(flipDir).reverse(),
125
+ },
126
+ offset: elOffset.reverse(),
127
+ flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
128
+ recursion: recursion + 1,
129
+ }) || position;
130
+
131
+ continue;
132
+ } else {
133
+ return false;
134
+ }
135
+ }
136
+
113
137
  // Move
114
138
  } else {
115
139
  offsetBy =
@@ -153,3 +177,12 @@ function intersectLine(dimA, dimB, dir) {
153
177
  const [, , start, end] = dirs[dir];
154
178
  return dimA[end] > dimB[start] && dimB[end] > dimA[start];
155
179
  }
180
+
181
+ function flipDir(prop) {
182
+ for (const i in dirs) {
183
+ const index = dirs[i].indexOf(prop);
184
+ if (~index) {
185
+ return dirs[1 - i][(index % 2) + 2];
186
+ }
187
+ }
188
+ }
@@ -45,7 +45,6 @@
45
45
  /* 3 */
46
46
  box-sizing: border-box;
47
47
  width: @drop-width;
48
- max-width: 100vw;
49
48
  }
50
49
 
51
50
  /* Show */
@@ -317,6 +317,17 @@
317
317
  }
318
318
 
319
319
 
320
+ /* Justify modifier
321
+ ========================================================================== */
322
+
323
+ .uk-navbar-justify .uk-navbar-left,
324
+ .uk-navbar-justify .uk-navbar-right,
325
+ .uk-navbar-justify .uk-navbar-nav,
326
+ .uk-navbar-justify .uk-navbar-nav > li, // Nav item
327
+ .uk-navbar-justify .uk-navbar-item, // Content item
328
+ .uk-navbar-justify .uk-navbar-toggle { flex-grow: 1; }
329
+
330
+
320
331
  /* Style modifiers
321
332
  ========================================================================== */
322
333
 
@@ -154,6 +154,7 @@
154
154
  align-items: center;
155
155
  /* 3 */
156
156
  color: @search-icon-color;
157
+ .hook-search-icon();
157
158
  }
158
159
 
159
160
  /*
@@ -294,6 +295,7 @@
294
295
  .hook-search-misc();
295
296
 
296
297
  .hook-search-input() {}
298
+ .hook-search-icon() {}
297
299
  .hook-search-default-input() {}
298
300
  .hook-search-default-input-focus() {}
299
301
  .hook-search-navbar-input() {}
@@ -25,6 +25,12 @@
25
25
  .hook-search-input() {}
26
26
 
27
27
 
28
+ // Icon
29
+ // ========================================================================
30
+
31
+ .hook-search-icon() {}
32
+
33
+
28
34
  // Default modifiers
29
35
  // ========================================================================
30
36
 
@@ -45,7 +45,6 @@ $drop-width: 300px !default;
45
45
  /* 3 */
46
46
  box-sizing: border-box;
47
47
  width: $drop-width;
48
- max-width: 100vw;
49
48
  }
50
49
 
51
50
  /* Show */
@@ -317,6 +317,17 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
317
317
  }
318
318
 
319
319
 
320
+ /* Justify modifier
321
+ ========================================================================== */
322
+
323
+ .uk-navbar-justify .uk-navbar-left,
324
+ .uk-navbar-justify .uk-navbar-right,
325
+ .uk-navbar-justify .uk-navbar-nav,
326
+ .uk-navbar-justify .uk-navbar-nav > li, // Nav item
327
+ .uk-navbar-justify .uk-navbar-item, // Content item
328
+ .uk-navbar-justify .uk-navbar-toggle { flex-grow: 1; }
329
+
330
+
320
331
  /* Style modifiers
321
332
  ========================================================================== */
322
333
 
@@ -154,6 +154,7 @@ $search-toggle-hover-color: $global-color !default;
154
154
  align-items: center;
155
155
  /* 3 */
156
156
  color: $search-icon-color;
157
+ @if(mixin-exists(hook-search-icon)) {@include hook-search-icon();}
157
158
  }
158
159
 
159
160
  /*
@@ -294,6 +295,7 @@ $search-toggle-hover-color: $global-color !default;
294
295
  @if(mixin-exists(hook-search-misc)) {@include hook-search-misc();}
295
296
 
296
297
  // @mixin hook-search-input(){}
298
+ // @mixin hook-search-icon(){}
297
299
  // @mixin hook-search-default-input(){}
298
300
  // @mixin hook-search-default-input-focus(){}
299
301
  // @mixin hook-search-navbar-input(){}
@@ -1843,6 +1843,7 @@
1843
1843
  @mixin hook-progress-bar(){}
1844
1844
  @mixin hook-progress-misc(){}
1845
1845
  @mixin hook-search-input(){}
1846
+ @mixin hook-search-icon(){}
1846
1847
  @mixin hook-search-default-input(){ border: $search-default-border-width solid $search-default-border; }
1847
1848
  @mixin hook-search-default-input-focus(){ border-color: $search-default-focus-border; }
1848
1849
  @mixin hook-search-navbar-input(){}
@@ -1529,6 +1529,7 @@
1529
1529
  @mixin hook-progress-bar(){}
1530
1530
  @mixin hook-progress-misc(){}
1531
1531
  @mixin hook-search-input(){}
1532
+ @mixin hook-search-icon(){}
1532
1533
  @mixin hook-search-default-input(){}
1533
1534
  @mixin hook-search-default-input-focus(){}
1534
1535
  @mixin hook-search-navbar-input(){}
@@ -25,6 +25,12 @@ $search-default-focus-border: $global-primary-background
25
25
  // @mixin hook-search-input(){}
26
26
 
27
27
 
28
+ // Icon
29
+ // ========================================================================
30
+
31
+ // @mixin hook-search-icon(){}
32
+
33
+
28
34
  // Default modifiers
29
35
  // ========================================================================
30
36