uikit 3.21.14-dev.60ed95dfb → 3.21.14-dev.8b3dfa6cd

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 (140) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/css/uikit-core-rtl.css +233 -85
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +233 -85
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +237 -81
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +237 -81
  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 +2 -11
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +425 -126
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +442 -131
  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 -2
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +2 -2
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +17 -27
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +2 -2
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +22 -33
  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 +9 -13
  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 +212 -212
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +20 -17
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +631 -521
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +2 -2
  43. package/src/images/icons/arrow-down-arrow-up.svg +6 -0
  44. package/src/images/icons/arrow-down.svg +3 -3
  45. package/src/images/icons/arrow-left.svg +3 -3
  46. package/src/images/icons/arrow-right.svg +3 -3
  47. package/src/images/icons/arrow-up-right.svg +3 -3
  48. package/src/images/icons/arrow-up.svg +3 -3
  49. package/src/images/icons/close-circle.svg +5 -0
  50. package/src/images/icons/cloud-download.svg +4 -4
  51. package/src/images/icons/cloud-upload.svg +4 -4
  52. package/src/images/icons/download.svg +4 -4
  53. package/src/images/icons/expand.svg +5 -5
  54. package/src/images/icons/link-external.svg +4 -4
  55. package/src/images/icons/pull.svg +4 -4
  56. package/src/images/icons/push.svg +3 -3
  57. package/src/images/icons/shrink.svg +5 -5
  58. package/src/images/icons/sign-in.svg +4 -3
  59. package/src/images/icons/sign-out.svg +4 -3
  60. package/src/images/icons/sorting.svg +6 -0
  61. package/src/images/icons/upload.svg +4 -4
  62. package/src/js/api/instance.js +1 -1
  63. package/src/js/components/internal/lightbox-animations.js +2 -1
  64. package/src/js/components/internal/slideshow-animations.js +5 -5
  65. package/src/js/components/lightbox-panel.js +180 -45
  66. package/src/js/components/lightbox.js +59 -6
  67. package/src/js/components/slideshow.js +1 -2
  68. package/src/js/components/tooltip.js +1 -1
  69. package/src/js/core/grid.js +1 -1
  70. package/src/js/core/icon.js +2 -2
  71. package/src/js/core/img.js +3 -5
  72. package/src/js/core/navbar.js +6 -2
  73. package/src/js/core/scrollspy-nav.js +1 -1
  74. package/src/js/core/svg.js +8 -10
  75. package/src/js/core/toggle.js +1 -1
  76. package/src/js/core/video.js +4 -3
  77. package/src/js/mixin/internal/slideshow-animations.js +1 -6
  78. package/src/js/mixin/modal.js +1 -4
  79. package/src/js/mixin/slider-drag.js +5 -6
  80. package/src/js/mixin/slider-nav.js +1 -1
  81. package/src/js/mixin/slider.js +11 -13
  82. package/src/js/mixin/slideshow.js +1 -1
  83. package/src/js/mixin/togglable.js +7 -2
  84. package/src/js/util/dom.js +3 -1
  85. package/src/js/util/filter.js +3 -1
  86. package/src/js/util/player.js +0 -4
  87. package/src/less/components/background.less +1 -9
  88. package/src/less/components/breadcrumb.less +6 -2
  89. package/src/less/components/button.less +1 -1
  90. package/src/less/components/form-range.less +52 -0
  91. package/src/less/components/form.less +1 -1
  92. package/src/less/components/lightbox.less +57 -89
  93. package/src/less/components/margin.less +14 -0
  94. package/src/less/components/search.less +49 -23
  95. package/src/less/components/sticky.less +1 -10
  96. package/src/less/components/totop.less +1 -1
  97. package/src/less/components/transition.less +4 -4
  98. package/src/less/components/visibility.less +3 -2
  99. package/src/less/theme/form-range.less +12 -0
  100. package/src/less/theme/lightbox.less +2 -20
  101. package/src/less/theme/search.less +24 -10
  102. package/src/scss/components/background.scss +1 -9
  103. package/src/scss/components/breadcrumb.scss +6 -2
  104. package/src/scss/components/button.scss +1 -1
  105. package/src/scss/components/form-range.scss +12 -0
  106. package/src/scss/components/form.scss +1 -1
  107. package/src/scss/components/lightbox.scss +50 -77
  108. package/src/scss/components/margin.scss +13 -0
  109. package/src/scss/components/search.scss +30 -12
  110. package/src/scss/components/sticky.scss +1 -10
  111. package/src/scss/components/totop.scss +1 -1
  112. package/src/scss/components/transition.scss +4 -4
  113. package/src/scss/components/visibility.scss +3 -2
  114. package/src/scss/mixins-theme.scss +51 -12
  115. package/src/scss/mixins.scss +45 -6
  116. package/src/scss/theme/form-range.scss +10 -0
  117. package/src/scss/theme/lightbox.scss +2 -20
  118. package/src/scss/theme/search.scss +10 -6
  119. package/src/scss/variables-theme.scss +32 -20
  120. package/src/scss/variables.scss +29 -24
  121. package/tests/badge.html +2 -2
  122. package/tests/base.html +1 -1
  123. package/tests/breadcrumb.html +23 -5
  124. package/tests/card.html +24 -24
  125. package/tests/dropbar.html +15 -15
  126. package/tests/dropdown.html +6 -6
  127. package/tests/dropnav.html +100 -100
  128. package/tests/icon.html +8 -0
  129. package/tests/index.html +15 -15
  130. package/tests/lightbox.html +379 -28
  131. package/tests/margin.html +19 -0
  132. package/tests/nav.html +21 -21
  133. package/tests/navbar.html +292 -292
  134. package/tests/offcanvas.html +27 -27
  135. package/tests/placeholder.html +2 -2
  136. package/tests/slider.html +0 -1
  137. package/tests/slideshow.html +1 -1
  138. package/tests/sortable.html +5 -5
  139. package/tests/sticky-navbar.html +114 -114
  140. package/tests/transition.html +2 -1
@@ -1,7 +1,21 @@
1
- import { $$, assign, attr, data, findIndex, isElement, isTag, on, uniqueBy } from 'uikit-util';
1
+ import {
2
+ $,
3
+ $$,
4
+ assign,
5
+ attr,
6
+ findIndex,
7
+ isElement,
8
+ isTag,
9
+ matches,
10
+ on,
11
+ parents,
12
+ uniqueBy,
13
+ } from 'uikit-util';
2
14
  import { parseOptions } from '../api/options';
3
15
  import LightboxPanel from './lightbox-panel';
4
16
 
17
+ const selDisabled = '.uk-disabled *, .uk-disabled, [disabled]';
18
+
5
19
  export default {
6
20
  install,
7
21
 
@@ -31,19 +45,27 @@ export default {
31
45
  events: {
32
46
  name: 'click',
33
47
 
34
- delegate: ({ toggle }) => `${toggle}:not(.uk-disabled)`,
48
+ delegate: ({ toggle }) => toggle,
35
49
 
36
50
  handler(e) {
37
51
  if (!e.defaultPrevented) {
38
52
  e.preventDefault();
39
- this.show(e.current);
53
+ if (!matches(e.current, selDisabled)) {
54
+ this.show(e.current);
55
+ }
40
56
  }
41
57
  },
42
58
  },
43
59
 
44
60
  methods: {
45
61
  show(index) {
46
- const items = uniqueBy(this.toggles.map(toItem), 'source');
62
+ let items = this.toggles.map(toItem);
63
+
64
+ if (this.nav === 'thumbnav') {
65
+ ensureThumb.call(this, this.toggles, items);
66
+ }
67
+
68
+ items = uniqueBy(items, 'source');
47
69
 
48
70
  if (isElement(index)) {
49
71
  const { source } = toItem(index);
@@ -71,11 +93,42 @@ function install(UIkit, Lightbox) {
71
93
  assign(Lightbox.props, UIkit.component('lightboxPanel').options.props);
72
94
  }
73
95
 
96
+ function ensureThumb(toggles, items) {
97
+ for (const [i, toggle] of Object.entries(toggles)) {
98
+ if (items[i].thumb) {
99
+ continue;
100
+ }
101
+
102
+ const parent = parents(toggle)
103
+ .reverse()
104
+ .concat(toggle)
105
+ .find(
106
+ (parent) =>
107
+ this.$el.contains(parent) &&
108
+ (parent === toggle || $$(this.toggle, parent).length === 1),
109
+ );
110
+
111
+ if (!parent) {
112
+ continue;
113
+ }
114
+
115
+ const media = $('img,video', parent);
116
+
117
+ if (media) {
118
+ items[i].thumb = media.currentSrc || media.poster || media.src;
119
+ items[i].thumbRatio =
120
+ (media.naturalWidth || media.videoWidth) /
121
+ (media.naturalHeight || media.videoHeight);
122
+ }
123
+ }
124
+ }
125
+
74
126
  function toItem(el) {
75
127
  const item = {};
76
128
 
77
- for (const attr of ['href', 'caption', 'type', 'poster', 'alt', 'attrs']) {
78
- item[attr === 'href' ? 'source' : attr] = data(el, attr);
129
+ for (const attribute of el.getAttributeNames()) {
130
+ const key = attribute.replace(/^data-/, '');
131
+ item[key === 'href' ? 'source' : key] = el.getAttribute(attribute);
79
132
  }
80
133
 
81
134
  item.attrs = parseOptions(item.attrs);
@@ -31,8 +31,7 @@ export default {
31
31
  aspectRatio: this.ratio ? this.ratio.replace(':', '/') : undefined,
32
32
  minHeight: this.minHeight,
33
33
  maxHeight: this.maxHeight,
34
- minWidth: '100%',
35
- maxWidth: '100%',
34
+ width: '100%',
36
35
  });
37
36
  },
38
37
  },
@@ -136,7 +136,7 @@ export default {
136
136
  // Clicking a button does not give it focus on all browsers and platforms
137
137
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
138
138
  [`focus ${pointerEnter} ${pointerDown}`](e) {
139
- if (!isTouch(e) || e.type === pointerDown) {
139
+ if ((!isTouch(e) || e.type === pointerDown) && document.readyState !== 'loading') {
140
140
  this.show();
141
141
  }
142
142
  },
@@ -165,7 +165,7 @@ function applyMasonry(rows, gutter, next) {
165
165
  let rowHeights = 0;
166
166
  for (let row of rows) {
167
167
  if (isRtl) {
168
- row = row.reverse();
168
+ row.reverse();
169
169
  }
170
170
 
171
171
  let height = 0;
@@ -5,6 +5,7 @@ import {
5
5
  attr,
6
6
  css,
7
7
  each,
8
+ fragment,
8
9
  hasAttr,
9
10
  hasClass,
10
11
  hyphenate,
@@ -35,7 +36,6 @@ import spinner from '../../images/components/spinner.svg';
35
36
  import totop from '../../images/components/totop.svg';
36
37
  import I18n from '../mixin/i18n';
37
38
  import Svg from '../mixin/svg';
38
- import { stringToSvg } from './svg';
39
39
 
40
40
  const icons = {
41
41
  spinner,
@@ -262,7 +262,7 @@ function getIcon(icon) {
262
262
  }
263
263
 
264
264
  if (!parsed[icon]) {
265
- parsed[icon] = stringToSvg(icons[applyRtl(icon)] || icons[icon]);
265
+ parsed[icon] = fragment(icons[applyRtl(icon)] || icons[icon]);
266
266
  }
267
267
 
268
268
  return parsed[icon].cloneNode(true);
@@ -101,7 +101,7 @@ function setSourceProps(sourceEl, targetEl) {
101
101
  for (const prop of srcProps) {
102
102
  const value = data(sourceEl, prop);
103
103
  if (value) {
104
- attr(targetEl, prop.replace(/^(data-)+/, ''), value);
104
+ attr(targetEl, prop.replace(/data-/g, ''), value);
105
105
  }
106
106
  }
107
107
  }
@@ -111,14 +111,12 @@ function getImageFromElement(el, src, sources) {
111
111
 
112
112
  wrapInPicture(img, sources);
113
113
  setSourceProps(el, img);
114
- img.onload = () => {
115
- setSrcAttrs(el, img.currentSrc);
116
- };
114
+ img.onload = () => setSrcAttrs(el, img.currentSrc);
117
115
  attr(img, 'src', src);
118
116
  return img;
119
117
  }
120
118
 
121
- function wrapInPicture(img, sources) {
119
+ export function wrapInPicture(img, sources) {
122
120
  sources = parseSources(sources);
123
121
 
124
122
  if (sources.length) {
@@ -1,4 +1,4 @@
1
- import { $$, addClass, css, hasClass, offset, removeClass } from 'uikit-util';
1
+ import { $$, addClass, css, hasClass, offset, parent, removeClass } from 'uikit-util';
2
2
  import Dropnav from './dropnav';
3
3
 
4
4
  const clsNavbarTransparent = 'uk-navbar-transparent';
@@ -56,7 +56,11 @@ export default {
56
56
 
57
57
  el: ({ dropContainer }) => dropContainer,
58
58
 
59
- async handler() {
59
+ async handler(e) {
60
+ if (parent(e.target) !== this.dropContainer) {
61
+ return;
62
+ }
63
+
60
64
  await awaitMacroTask();
61
65
 
62
66
  if (!this.getActive() && this._transparent) {
@@ -52,7 +52,7 @@ export default {
52
52
  update: [
53
53
  {
54
54
  read() {
55
- const targets = this.links.map((el) => getTargetedElement(el) || el.ownerDocument);
55
+ const targets = this.links.map((el) => getTargetedElement(el)).filter(Boolean);
56
56
 
57
57
  const { length } = targets;
58
58
 
@@ -2,6 +2,7 @@ import {
2
2
  addClass,
3
3
  attr,
4
4
  css,
5
+ fragment,
5
6
  includes,
6
7
  isTag,
7
8
  memoize,
@@ -94,11 +95,14 @@ const loadSVG = memoize(async (src) => {
94
95
  if (startsWith(src, 'data:')) {
95
96
  return decodeURIComponent(src.split(',')[1]);
96
97
  } else {
97
- return (await fetch(src)).text();
98
+ const response = await fetch(src);
99
+ if (response.headers.get('Content-Type') === 'image/svg+xml') {
100
+ return response.text();
101
+ }
98
102
  }
99
- } else {
100
- return Promise.reject();
101
103
  }
104
+
105
+ return Promise.reject();
102
106
  });
103
107
 
104
108
  function parseSVG(svg, icon) {
@@ -106,7 +110,7 @@ function parseSVG(svg, icon) {
106
110
  svg = parseSymbols(svg)[icon] || svg;
107
111
  }
108
112
 
109
- return stringToSvg(svg);
113
+ return fragment(svg);
110
114
  }
111
115
 
112
116
  const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
@@ -131,9 +135,3 @@ function applyAnimation(el) {
131
135
  css(el, '--uk-animation-stroke', length);
132
136
  }
133
137
  }
134
-
135
- export function stringToSvg(string) {
136
- const container = document.createElement('template');
137
- container.innerHTML = string;
138
- return container.content.firstElementChild;
139
- }
@@ -102,7 +102,7 @@ export default {
102
102
  filter: ({ mode }) => includes(mode, 'hover'),
103
103
 
104
104
  handler(e) {
105
- if (isTouch(e) || this.$el.disabled) {
105
+ if (isTouch(e) || this.$el.disabled || document.readyState === 'loading') {
106
106
  return;
107
107
  }
108
108
 
@@ -3,7 +3,6 @@ import {
3
3
  includes,
4
4
  isTag,
5
5
  isTouch,
6
- isVideo,
7
6
  mute,
8
7
  parent,
9
8
  pause,
@@ -78,7 +77,7 @@ export default {
78
77
 
79
78
  observe: [
80
79
  intersection({
81
- filter: ({ $el, autoplay }) => autoplay !== 'hover' && isVideo($el),
80
+ filter: ({ autoplay }) => autoplay !== 'hover',
82
81
  handler([{ isIntersecting }]) {
83
82
  if (!document.fullscreenElement) {
84
83
  if (isIntersecting) {
@@ -91,7 +90,9 @@ export default {
91
90
  }
92
91
  },
93
92
  args: { intersecting: false },
94
- options: ({ $el, autoplay }) => ({ root: autoplay === 'inview' ? null : parent($el) }),
93
+ options: ({ $el, autoplay }) => ({
94
+ root: autoplay === 'inview' ? null : parent($el).closest(':not(a)'),
95
+ }),
95
96
  }),
96
97
  ],
97
98
  };
@@ -24,10 +24,5 @@ export function translated(el) {
24
24
  }
25
25
 
26
26
  export function translate(value = 0, unit = '%') {
27
- value += value ? unit : '';
28
- return `translate3d(${value}, 0, 0)`;
29
- }
30
-
31
- export function scale3d(value) {
32
- return `scale3d(${value}, ${value}, 1)`;
27
+ return value ? `translate3d(${value + unit}, 0, 0)` : '';
33
28
  }
@@ -53,10 +53,6 @@ export default {
53
53
  transitionElement() {
54
54
  return this.panel;
55
55
  },
56
-
57
- bgClose({ bgClose }) {
58
- return bgClose && this.panel;
59
- },
60
56
  },
61
57
 
62
58
  connected() {
@@ -266,6 +262,7 @@ function listenForBackgroundClose(modal) {
266
262
  if (
267
263
  last(active) !== modal ||
268
264
  (modal.overlay && !modal.$el.contains(target)) ||
265
+ !modal.panel ||
269
266
  modal.panel.contains(target)
270
267
  ) {
271
268
  return;
@@ -17,7 +17,7 @@ const pointerUpOptions = { passive: true, capture: true };
17
17
  const pointerDown = 'touchstart mousedown';
18
18
  const pointerMove = 'touchmove mousemove';
19
19
  const pointerUp = 'touchend touchcancel mouseup click input scroll';
20
- const preventClick = (e) => e.preventDefault();
20
+
21
21
  export default {
22
22
  props: {
23
23
  draggable: Boolean,
@@ -120,10 +120,6 @@ export default {
120
120
  return;
121
121
  }
122
122
 
123
- if (!this.dragging) {
124
- on(this.list, 'click', preventClick, pointerOptions);
125
- }
126
-
127
123
  e.cancelable && e.preventDefault();
128
124
 
129
125
  this.dragging = true;
@@ -188,6 +184,8 @@ export default {
188
184
  off(document, pointerUp, this.end, pointerUpOptions);
189
185
 
190
186
  if (this.dragging) {
187
+ setTimeout(on(this.list, 'click', (e) => e.preventDefault(), pointerOptions));
188
+
191
189
  this.dragging = null;
192
190
 
193
191
  if (this.index === this.prevIndex) {
@@ -202,6 +200,8 @@ export default {
202
200
  this.index = dirChange ? this.index : this.prevIndex;
203
201
 
204
202
  if (dirChange) {
203
+ trigger(this.slides[this.prevIndex], 'itemhidden', [this]);
204
+ trigger(this.slides[this.index], 'itemshown', [this]);
205
205
  this.percent = 1 - this.percent;
206
206
  }
207
207
 
@@ -214,7 +214,6 @@ export default {
214
214
  }
215
215
  }
216
216
 
217
- setTimeout(() => off(this.list, 'click', preventClick, pointerOptions));
218
217
  css(this.list, { userSelect: '' });
219
218
 
220
219
  this.drag = this.percent = null;
@@ -211,7 +211,7 @@ export default {
211
211
  const active = item === index;
212
212
 
213
213
  toggleClass(el, this.clsActive, active);
214
- toggleClass(button, 'uk-disabled', this.parallax);
214
+ toggleClass(button, 'uk-disabled', !!this.parallax);
215
215
 
216
216
  attr(button, {
217
217
  'aria-selected': active,
@@ -101,7 +101,7 @@ export default {
101
101
  },
102
102
 
103
103
  methods: {
104
- show(index, force = false) {
104
+ async show(index, force = false) {
105
105
  if (this.dragging || !this.length || this.parallax) {
106
106
  return;
107
107
  }
@@ -149,22 +149,20 @@ export default {
149
149
  return;
150
150
  }
151
151
 
152
- const promise = this._show(prev, next, force).then(() => {
153
- prev && trigger(prev, 'itemhidden', [this]);
154
- trigger(next, 'itemshown', [this]);
152
+ prev && trigger(prev, 'itemhide', [this]);
153
+ trigger(next, 'itemshow', [this]);
155
154
 
156
- stack.shift();
157
- this._transitioner = null;
155
+ await this._show(prev, next, force);
158
156
 
159
- if (stack.length) {
160
- requestAnimationFrame(() => stack.length && this.show(stack.shift(), true));
161
- }
162
- });
157
+ prev && trigger(prev, 'itemhidden', [this]);
158
+ trigger(next, 'itemshown', [this]);
163
159
 
164
- prev && trigger(prev, 'itemhide', [this]);
165
- trigger(next, 'itemshow', [this]);
160
+ stack.shift();
161
+ this._transitioner = null;
166
162
 
167
- return promise;
163
+ if (stack.length) {
164
+ requestAnimationFrame(() => stack.length && this.show(stack.shift(), true));
165
+ }
168
166
  },
169
167
 
170
168
  getIndex(index = this.index, prev = this.index) {
@@ -31,7 +31,7 @@ export default {
31
31
  observe: resize(),
32
32
 
33
33
  events: {
34
- beforeitemshow({ target }) {
34
+ itemshow({ target }) {
35
35
  addClass(target, this.clsActive);
36
36
  },
37
37
 
@@ -20,6 +20,7 @@ import {
20
20
  unwrap,
21
21
  wrapInner,
22
22
  } from 'uikit-util';
23
+ import { storeScrollPosition } from './position';
23
24
 
24
25
  export default {
25
26
  props: {
@@ -79,6 +80,12 @@ export default {
79
80
  const done = () => {
80
81
  removeClass(el, cls);
81
82
  trigger(el, show ? 'shown' : 'hidden', [this]);
83
+
84
+ if (show) {
85
+ const restoreScrollPosition = storeScrollPosition(el);
86
+ $$('[autofocus]', el).find(isVisible)?.focus();
87
+ restoreScrollPosition();
88
+ }
82
89
  };
83
90
 
84
91
  return promise
@@ -125,8 +132,6 @@ export default {
125
132
  if (changed) {
126
133
  trigger(el, 'toggled', [toggled, this]);
127
134
  }
128
-
129
- $$('[autofocus]', el).some((el) => (isVisible(el) ? el.focus() || true : el.blur()));
130
135
  },
131
136
  },
132
137
  };
@@ -18,7 +18,9 @@ export function isTag(element, ...tagNames) {
18
18
 
19
19
  export function empty(element) {
20
20
  element = $(element);
21
- element.innerHTML = '';
21
+ if (element) {
22
+ element.innerHTML = '';
23
+ }
22
24
  return element;
23
25
  }
24
26
 
@@ -84,6 +84,8 @@ export function getTargetedElement(el) {
84
84
  if (isSameSiteAnchor(el)) {
85
85
  const { hash, ownerDocument } = toNode(el);
86
86
  const id = decodeURIComponent(hash).slice(1);
87
- return ownerDocument.getElementById(id) || ownerDocument.getElementsByName(id)[0];
87
+ return id
88
+ ? ownerDocument.getElementById(id) || ownerDocument.getElementsByName(id)[0]
89
+ : ownerDocument;
88
90
  }
89
91
  }
@@ -32,10 +32,6 @@ export function mute(el) {
32
32
  }
33
33
  }
34
34
 
35
- export function isVideo(el) {
36
- return isHTML5(el) || isIFrame(el);
37
- }
38
-
39
35
  function isHTML5(el) {
40
36
  return isTag(el, 'video');
41
37
  }
@@ -69,15 +69,7 @@
69
69
  /* Attachment
70
70
  ========================================================================== */
71
71
 
72
- /*
73
- * 1. Fix bug introduced in Chrome 67: the background image is not visible if any element on the page uses `translate3d`
74
- */
75
-
76
- .uk-background-fixed {
77
- background-attachment: fixed;
78
- /* 1 */
79
- backface-visibility: hidden;
80
- }
72
+ .uk-background-fixed { background-attachment: fixed; }
81
73
 
82
74
  /*
83
75
  * Exclude touch devices because `fixed` doesn't work on iOS and Android
@@ -28,12 +28,16 @@
28
28
  ========================================================================== */
29
29
 
30
30
  /*
31
- * Reset list
31
+ * 1. Reset list
32
+ * 2. Remove space between elements
32
33
  */
33
34
 
34
35
  .uk-breadcrumb {
36
+ /* 1 */
35
37
  padding: 0;
36
38
  list-style: none;
39
+ /* 2 */
40
+ font-size: 0;
37
41
  .hook-breadcrumb();
38
42
  }
39
43
 
@@ -83,7 +87,7 @@
83
87
  content: @breadcrumb-divider;
84
88
  display: inline-block;
85
89
  /* 1 */
86
- margin: 0 @breadcrumb-divider-margin-horizontal 0 ~'calc(@{breadcrumb-divider-margin-horizontal} - 4px)';
90
+ margin: 0 @breadcrumb-divider-margin-horizontal;
87
91
  /* 2 */
88
92
  font-size: @breadcrumb-divider-font-size;
89
93
  color: @breadcrumb-divider-color;
@@ -350,7 +350,7 @@
350
350
  ========================================================================== */
351
351
 
352
352
  /*
353
- * 1. Using `flex` instead of `inline-block` to prevent whitespace betweent child elements
353
+ * 1. Using `flex` instead of `inline-block` to prevent whitespace between child elements
354
354
  * 2. Behave like button
355
355
  * 3. Create position context
356
356
  */
@@ -137,3 +137,55 @@
137
137
  .hook-form-range-track-focus() {}
138
138
  .hook-form-range-thumb() {}
139
139
  .hook-form-range-misc() {}
140
+
141
+
142
+ // Inverse
143
+ // ========================================================================
144
+
145
+ @inverse-form-range-track-background: darken(@inverse-global-muted-background; 5%);
146
+ @inverse-form-range-track-focus-background: fadein(@inverse-form-range-track-background, 5%);
147
+
148
+ @inverse-form-range-thumb-background: fadein(@inverse-global-color, 100%);
149
+
150
+ .hook-inverse() {
151
+
152
+ /* Webkit */
153
+ .uk-range::-webkit-slider-runnable-track {
154
+ background: @inverse-form-range-track-background;
155
+ .hook-inverse-form-range-track();
156
+ }
157
+
158
+ .uk-range:focus::-webkit-slider-runnable-track,
159
+ .uk-range:active::-webkit-slider-runnable-track {
160
+ background: @inverse-form-range-track-focus-background;
161
+ .hook-inverse-form-range-track-focus();
162
+ }
163
+
164
+ /* Firefox */
165
+ .uk-range::-moz-range-track {
166
+ background: @inverse-form-range-track-background;
167
+ .hook-inverse-form-range-track();
168
+ }
169
+
170
+ .uk-range:focus::-moz-range-track {
171
+ background: @inverse-form-range-track-focus-background;
172
+ .hook-inverse-form-range-track-focus();
173
+ }
174
+
175
+ /* Webkit */
176
+ .uk-range::-webkit-slider-thumb {
177
+ background: @inverse-form-range-thumb-background;
178
+ .hook-inverse-form-range-thumb();
179
+ }
180
+
181
+ /* Firefox */
182
+ .uk-range::-moz-range-thumb {
183
+ background: @inverse-form-range-thumb-background;
184
+ .hook-inverse-form-range-thumb();
185
+ }
186
+
187
+ }
188
+
189
+ .hook-inverse-form-range-track() {}
190
+ .hook-inverse-form-range-track-focus() {}
191
+ .hook-inverse-form-range-thumb() {}
@@ -604,7 +604,7 @@ select.uk-form-width-xsmall { width: (@form-width-xsmall + 25px); }
604
604
  * 1. Position and resize the form control to always cover its container
605
605
  * 2. Required for Firefox for positioning to the left
606
606
  * 3. Required for Webkit to make `height` work
607
- * 4. Hide controle and show cursor
607
+ * 4. Hide controls and show cursor
608
608
  * 5. Needed for the cursor
609
609
  * 6. Clip height caused by 5. Needed for Webkit only
610
610
  */