uikit 3.16.24 → 3.16.25-dev.931f07bf4

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 (144) hide show
  1. package/.eslintrc.json +0 -9
  2. package/.prettierrc.json +3 -4
  3. package/CHANGELOG.md +6 -0
  4. package/build/build.js +2 -2
  5. package/build/less.js +2 -2
  6. package/build/prefix.js +8 -7
  7. package/build/release.js +7 -7
  8. package/build/scope.js +3 -3
  9. package/build/scss.js +26 -16
  10. package/build/util.js +11 -11
  11. package/dist/css/uikit-core-rtl.css +6 -2
  12. package/dist/css/uikit-core-rtl.min.css +1 -1
  13. package/dist/css/uikit-core.css +6 -2
  14. package/dist/css/uikit-core.min.css +1 -1
  15. package/dist/css/uikit-rtl.css +6 -2
  16. package/dist/css/uikit-rtl.min.css +1 -1
  17. package/dist/css/uikit.css +6 -2
  18. package/dist/css/uikit.min.css +1 -1
  19. package/dist/js/components/countdown.js +2 -2
  20. package/dist/js/components/countdown.min.js +1 -1
  21. package/dist/js/components/filter.js +18 -18
  22. package/dist/js/components/filter.min.js +1 -1
  23. package/dist/js/components/lightbox-panel.js +347 -350
  24. package/dist/js/components/lightbox-panel.min.js +1 -1
  25. package/dist/js/components/lightbox.js +349 -352
  26. package/dist/js/components/lightbox.min.js +1 -1
  27. package/dist/js/components/notification.js +6 -6
  28. package/dist/js/components/notification.min.js +1 -1
  29. package/dist/js/components/parallax.js +76 -72
  30. package/dist/js/components/parallax.min.js +1 -1
  31. package/dist/js/components/slider-parallax.js +37 -37
  32. package/dist/js/components/slider-parallax.min.js +1 -1
  33. package/dist/js/components/slider.js +218 -224
  34. package/dist/js/components/slider.min.js +1 -1
  35. package/dist/js/components/slideshow-parallax.js +37 -37
  36. package/dist/js/components/slideshow-parallax.min.js +1 -1
  37. package/dist/js/components/slideshow.js +265 -271
  38. package/dist/js/components/slideshow.min.js +1 -1
  39. package/dist/js/components/sortable.js +2 -2
  40. package/dist/js/components/sortable.min.js +1 -1
  41. package/dist/js/components/tooltip.js +95 -95
  42. package/dist/js/components/tooltip.min.js +1 -1
  43. package/dist/js/components/upload.js +2 -2
  44. package/dist/js/components/upload.min.js +1 -1
  45. package/dist/js/uikit-core.js +459 -452
  46. package/dist/js/uikit-core.min.js +1 -1
  47. package/dist/js/uikit-icons.js +1 -1
  48. package/dist/js/uikit-icons.min.js +1 -1
  49. package/dist/js/uikit.js +6832 -6831
  50. package/dist/js/uikit.min.js +1 -1
  51. package/package.json +8 -7
  52. package/src/js/api/app.js +1 -1
  53. package/src/js/api/boot.js +2 -2
  54. package/src/js/api/component.js +1 -1
  55. package/src/js/api/computed.js +2 -2
  56. package/src/js/api/events.js +2 -2
  57. package/src/js/api/global.js +3 -3
  58. package/src/js/api/hooks.js +4 -4
  59. package/src/js/api/instance.js +3 -3
  60. package/src/js/api/log.js +1 -1
  61. package/src/js/api/observables.js +12 -6
  62. package/src/js/api/observer.js +2 -2
  63. package/src/js/api/options.js +2 -2
  64. package/src/js/api/props.js +2 -2
  65. package/src/js/api/state.js +2 -2
  66. package/src/js/components/countdown.js +1 -1
  67. package/src/js/components/filter.js +5 -5
  68. package/src/js/components/internal/lightbox-animations.js +1 -1
  69. package/src/js/components/internal/slider-transitioner.js +6 -6
  70. package/src/js/components/internal/slideshow-animations.js +1 -1
  71. package/src/js/components/lightbox-panel.js +10 -10
  72. package/src/js/components/lightbox.js +2 -2
  73. package/src/js/components/notification.js +4 -4
  74. package/src/js/components/parallax.js +5 -5
  75. package/src/js/components/slider-parallax.js +1 -1
  76. package/src/js/components/slider.js +12 -12
  77. package/src/js/components/slideshow.js +3 -3
  78. package/src/js/components/sortable.js +4 -4
  79. package/src/js/components/tooltip.js +6 -6
  80. package/src/js/components/upload.js +4 -4
  81. package/src/js/core/accordion.js +8 -8
  82. package/src/js/core/alert.js +2 -2
  83. package/src/js/core/cover.js +1 -1
  84. package/src/js/core/drop.js +12 -12
  85. package/src/js/core/dropnav.js +7 -7
  86. package/src/js/core/form-custom.js +1 -1
  87. package/src/js/core/grid.js +9 -9
  88. package/src/js/core/height-match.js +2 -2
  89. package/src/js/core/height-viewport.js +1 -1
  90. package/src/js/core/icon.js +23 -23
  91. package/src/js/core/img.js +2 -2
  92. package/src/js/core/index.js +16 -14
  93. package/src/js/core/leader.js +2 -2
  94. package/src/js/core/modal.js +7 -7
  95. package/src/js/core/navbar.js +4 -4
  96. package/src/js/core/offcanvas.js +3 -3
  97. package/src/js/core/overflow-auto.js +3 -3
  98. package/src/js/core/responsive.js +3 -3
  99. package/src/js/core/scrollspy-nav.js +1 -1
  100. package/src/js/core/scrollspy.js +1 -1
  101. package/src/js/core/sticky.js +13 -13
  102. package/src/js/core/svg.js +4 -4
  103. package/src/js/core/switcher.js +7 -7
  104. package/src/js/core/tab.js +2 -2
  105. package/src/js/core/toggle.js +5 -5
  106. package/src/js/core/video.js +1 -1
  107. package/src/js/mixin/animate.js +1 -1
  108. package/src/js/mixin/i18n.js +1 -1
  109. package/src/js/mixin/internal/animate-fade.js +14 -14
  110. package/src/js/mixin/internal/animate-slide.js +1 -1
  111. package/src/js/mixin/internal/scroll.js +1 -1
  112. package/src/js/mixin/modal.js +15 -12
  113. package/src/js/mixin/parallax.js +2 -2
  114. package/src/js/mixin/position.js +2 -2
  115. package/src/js/mixin/slider-drag.js +1 -1
  116. package/src/js/mixin/slider-nav.js +8 -14
  117. package/src/js/mixin/slider.js +9 -9
  118. package/src/js/mixin/slideshow.js +1 -1
  119. package/src/js/mixin/togglable.js +4 -4
  120. package/src/js/uikit-core.js +2 -2
  121. package/src/js/uikit.js +2 -2
  122. package/src/js/util/animation.js +8 -8
  123. package/src/js/util/class.js +1 -1
  124. package/src/js/util/dimensions.js +5 -5
  125. package/src/js/util/dom.js +3 -3
  126. package/src/js/util/event.js +3 -3
  127. package/src/js/util/filter.js +1 -1
  128. package/src/js/util/lang.js +4 -4
  129. package/src/js/util/observer.js +2 -2
  130. package/src/js/util/player.js +1 -1
  131. package/src/js/util/position.js +5 -5
  132. package/src/js/util/selector.js +1 -1
  133. package/src/js/util/style.js +1 -1
  134. package/src/js/util/svg.js +2 -2
  135. package/src/js/util/viewport.js +6 -6
  136. package/src/less/components/slider.less +8 -2
  137. package/src/scss/components/inverse.scss +0 -1
  138. package/src/scss/components/slider.scss +8 -2
  139. package/src/scss/mixins-theme.scss +560 -552
  140. package/src/scss/mixins.scss +456 -448
  141. package/src/scss/variables-theme.scss +2 -2
  142. package/src/scss/variables.scss +2 -2
  143. package/tests/js/index.js +7 -7
  144. package/build/scss/inverse.scss +0 -30
@@ -11,7 +11,7 @@ export function removeClass(element, ...args) {
11
11
 
12
12
  export function removeClasses(element, cls) {
13
13
  attr(element, 'class', (value) =>
14
- (value || '').replace(new RegExp(`\\b${cls}\\b\\s?`, 'g'), '')
14
+ (value || '').replace(new RegExp(`\\b${cls}\\b\\s?`, 'g'), ''),
15
15
  );
16
16
  }
17
17
 
@@ -1,6 +1,5 @@
1
- import { on } from './event';
2
- import { css } from './style';
3
1
  import { $, append, remove } from './dom';
2
+ import { on } from './event';
4
3
  import {
5
4
  isDocument,
6
5
  isElement,
@@ -14,6 +13,7 @@ import {
14
13
  toWindow,
15
14
  ucfirst,
16
15
  } from './lang';
16
+ import { css } from './style';
17
17
 
18
18
  const dirs = {
19
19
  width: ['left', 'right'],
@@ -137,7 +137,7 @@ function dimension(prop) {
137
137
  return css(
138
138
  element,
139
139
  prop,
140
- !value && value !== 0 ? '' : +value + boxModelAdjust(element, prop) + 'px'
140
+ !value && value !== 0 ? '' : +value + boxModelAdjust(element, prop) + 'px',
141
141
  );
142
142
  }
143
143
  };
@@ -149,7 +149,7 @@ export function boxModelAdjust(element, prop, sizing = 'border-box') {
149
149
  dirs[prop].map(ucfirst),
150
150
  (prop) =>
151
151
  toFloat(css(element, `padding${prop}`)) +
152
- toFloat(css(element, `border${prop}Width`))
152
+ toFloat(css(element, `border${prop}Width`)),
153
153
  )
154
154
  : 0;
155
155
  }
@@ -182,7 +182,7 @@ export function toPx(value, property = 'width', element = window, offsetDim = fa
182
182
  : offsetDim
183
183
  ? element[`offset${ucfirst(property)}`]
184
184
  : dimensions(element)[property],
185
- value
185
+ value,
186
186
  )
187
187
  : value;
188
188
  });
@@ -1,7 +1,7 @@
1
1
  import { once } from './event';
2
2
  import { parent } from './filter';
3
- import { find, findAll } from './selector';
4
3
  import { isElement, isString, isUndefined, startsWith, toArray, toNode, toNodes } from './lang';
4
+ import { find, findAll } from './selector';
5
5
 
6
6
  export function ready(fn) {
7
7
  if (document.readyState !== 'loading') {
@@ -60,8 +60,8 @@ export function wrapInner(element, structure) {
60
60
  toNodes(element).map((element) =>
61
61
  element.hasChildNodes()
62
62
  ? wrapAll(toArray(element.childNodes), structure)
63
- : append(element, structure)
64
- )
63
+ : append(element, structure),
64
+ ),
65
65
  );
66
66
  }
67
67
 
@@ -1,6 +1,6 @@
1
- import { findAll } from './selector';
2
1
  import { closest, within } from './filter';
3
2
  import { isArray, isFunction, isString, toNode, toNodes } from './lang';
3
+ import { findAll } from './selector';
4
4
 
5
5
  export function on(...args) {
6
6
  let [targets, types, selector, listener, useCapture = false] = getArgs(args);
@@ -48,7 +48,7 @@ export function once(...args) {
48
48
  listener(e, result);
49
49
  }
50
50
  },
51
- useCapture
51
+ useCapture,
52
52
  );
53
53
 
54
54
  return off;
@@ -56,7 +56,7 @@ export function once(...args) {
56
56
 
57
57
  export function trigger(targets, event, detail) {
58
58
  return toEventTargets(targets).every((target) =>
59
- target.dispatchEvent(createEvent(event, true, true, detail))
59
+ target.dispatchEvent(createEvent(event, true, true, detail)),
60
60
  );
61
61
  }
62
62
 
@@ -23,7 +23,7 @@ export function isVoidElement(element) {
23
23
 
24
24
  export function isVisible(element) {
25
25
  return toNodes(element).some(
26
- (element) => element.offsetWidth || element.offsetHeight || element.getClientRects().length
26
+ (element) => element.offsetWidth || element.offsetHeight || element.getClientRects().length,
27
27
  );
28
28
  }
29
29
 
@@ -11,7 +11,7 @@ export const hyphenate = memoize((str) => str.replace(hyphenateRe, '-$1').toLowe
11
11
  const camelizeRe = /-(\w)/g;
12
12
 
13
13
  export const camelize = memoize((str) =>
14
- (str.charAt(0).toLowerCase() + str.slice(1)).replace(camelizeRe, (_, c) => c.toUpperCase())
14
+ (str.charAt(0).toLowerCase() + str.slice(1)).replace(camelizeRe, (_, c) => c.toUpperCase()),
15
15
  );
16
16
 
17
17
  export const ucfirst = memoize((str) => str.charAt(0).toUpperCase() + str.slice(1));
@@ -160,14 +160,14 @@ export function sortBy(array, prop) {
160
160
  return array
161
161
  .slice()
162
162
  .sort(({ [prop]: propA = 0 }, { [prop]: propB = 0 }) =>
163
- propA > propB ? 1 : propB > propA ? -1 : 0
163
+ propA > propB ? 1 : propB > propA ? -1 : 0,
164
164
  );
165
165
  }
166
166
 
167
167
  export function sumBy(array, iteratee) {
168
168
  return array.reduce(
169
169
  (sum, item) => sum + toFloat(isFunction(iteratee) ? iteratee(item) : item[iteratee]),
170
- 0
170
+ 0,
171
171
  );
172
172
  }
173
173
 
@@ -194,7 +194,7 @@ export function intersectRect(...rects) {
194
194
  ([minProp, maxProp]) =>
195
195
  Math.min(...rects.map(({ [minProp]: min }) => min)) -
196
196
  Math.max(...rects.map(({ [maxProp]: max }) => max)) >
197
- 0
197
+ 0,
198
198
  );
199
199
  }
200
200
 
@@ -1,6 +1,6 @@
1
+ import { inBrowser } from './env';
1
2
  import { on } from './event';
2
3
  import { toNodes } from './lang';
3
- import { inBrowser } from './env';
4
4
 
5
5
  export function observeIntersection(targets, cb, options = {}, { intersecting = true } = {}) {
6
6
  const observer = new IntersectionObserver(
@@ -11,7 +11,7 @@ export function observeIntersection(targets, cb, options = {}, { intersecting =
11
11
  }
12
12
  }
13
13
  : cb,
14
- options
14
+ options,
15
15
  );
16
16
  for (const el of toNodes(targets)) {
17
17
  observer.observe(el);
@@ -50,7 +50,7 @@ function isIFrame(el) {
50
50
 
51
51
  function isYoutube(el) {
52
52
  return !!el.src.match(
53
- /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/
53
+ /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/,
54
54
  );
55
55
  }
56
56
 
@@ -1,7 +1,7 @@
1
- import { css } from './style';
2
- import { within } from './filter';
3
1
  import { offset } from './dimensions';
2
+ import { within } from './filter';
4
3
  import { clamp, isArray, ucfirst } from './lang';
4
+ import { css } from './style';
5
5
  import { offsetViewport, overflowParents } from './viewport';
6
6
 
7
7
  const dirs = [
@@ -82,7 +82,7 @@ function getPosition(element, target, options) {
82
82
  clamp(
83
83
  clamp(position[start], viewport[start], viewport[end] - position[prop]),
84
84
  targetDim[start] - position[prop] + elOffset[i],
85
- targetDim[end] - elOffset[i]
85
+ targetDim[end] - elOffset[i],
86
86
  ) - position[start];
87
87
  }
88
88
 
@@ -116,7 +116,7 @@ function attachTo(element, target, options) {
116
116
  moveBy(attach.target[i], end, targetOffset[prop]) -
117
117
  moveBy(attach.element[i], end, elOffset[prop]) +
118
118
  +offsetBy[i],
119
- i
119
+ i,
120
120
  );
121
121
  }
122
122
  return elOffset;
@@ -145,7 +145,7 @@ function getViewport(element, target, viewportOffset, boundary, i) {
145
145
  if (boundary) {
146
146
  viewport = getIntersectionArea(
147
147
  viewport,
148
- offset(isArray(boundary) ? boundary[i] : boundary)
148
+ offset(isArray(boundary) ? boundary[i] : boundary),
149
149
  );
150
150
  }
151
151
 
@@ -77,7 +77,7 @@ function _query(selector, context = document, queryFn) {
77
77
  const selectorRe = /.*?[^\\](?:,|$)/g;
78
78
 
79
79
  const splitSelector = memoize((selector) =>
80
- selector.match(selectorRe).map((selector) => selector.replace(/,$/, '').trim())
80
+ selector.match(selectorRe).map((selector) => selector.replace(/,$/, '').trim()),
81
81
  );
82
82
 
83
83
  function domPath(element) {
@@ -46,7 +46,7 @@ export function css(element, property, value, priority) {
46
46
  : value || isNumber(value)
47
47
  ? value
48
48
  : '',
49
- priority
49
+ priority,
50
50
  );
51
51
  }
52
52
  } else if (isArray(property)) {
@@ -10,7 +10,7 @@ export function getMaxPathLength(el) {
10
10
  } catch (e) {
11
11
  return 0;
12
12
  }
13
- })
14
- )
13
+ }),
14
+ ),
15
15
  );
16
16
  }
@@ -1,6 +1,5 @@
1
- import { css } from './style';
2
- import { isVisible, parents } from './filter';
3
1
  import { offset, offsetPosition } from './dimensions';
2
+ import { isVisible, parents } from './filter';
4
3
  import {
5
4
  clamp,
6
5
  findIndex,
@@ -11,6 +10,7 @@ import {
11
10
  toWindow,
12
11
  ucfirst,
13
12
  } from './lang';
13
+ import { css } from './style';
14
14
 
15
15
  export function isInView(element, offsetTop = 0, offsetLeft = 0) {
16
16
  if (!isVisible(element)) {
@@ -29,7 +29,7 @@ export function isInView(element, offsetTop = 0, offsetLeft = 0) {
29
29
  right: right + offsetLeft,
30
30
  };
31
31
  })
32
- .concat(offset(element))
32
+ .concat(offset(element)),
33
33
  );
34
34
  }
35
35
 
@@ -62,7 +62,7 @@ export function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
62
62
 
63
63
  return () => scrollTo(scrollElement, top - scrollTop).then(fn);
64
64
  },
65
- () => Promise.resolve()
65
+ () => Promise.resolve(),
66
66
  )();
67
67
 
68
68
  function scrollTo(element, top) {
@@ -130,8 +130,8 @@ export function scrollParents(element, scrollable = false, props = []) {
130
130
  css(parent, 'overflow')
131
131
  .split(' ')
132
132
  .some((prop) => includes(['auto', 'scroll', ...props], prop)) &&
133
- (!scrollable || parent.scrollHeight > offsetViewport(parent).height)
134
- )
133
+ (!scrollable || parent.scrollHeight > offsetViewport(parent).height),
134
+ ),
135
135
  )
136
136
  .reverse();
137
137
  }
@@ -39,10 +39,16 @@
39
39
  ========================================================================== */
40
40
 
41
41
  /*
42
- * Clip child elements
42
+ * 1. Clip child elements
43
+ * 2. Prevent accidental scrolling through elements in slide getting focused
43
44
  */
44
45
 
45
- .uk-slider-container { overflow: hidden; }
46
+ .uk-slider-container {
47
+ /* 1 */
48
+ overflow: hidden;
49
+ /* 2 */
50
+ overflow: clip;
51
+ }
46
52
 
47
53
  /*
48
54
  * Widen container to prevent box-shadows from clipping, `large-box-shadow`
@@ -20,7 +20,6 @@
20
20
  ========================================================================== */
21
21
 
22
22
 
23
-
24
23
  /*
25
24
  * Implemented class depends on the general theme color
26
25
  * `uk-light` is for light colors on dark backgrounds
@@ -35,10 +35,16 @@
35
35
  ========================================================================== */
36
36
 
37
37
  /*
38
- * Clip child elements
38
+ * 1. Clip child elements
39
+ * 2. Prevent accidental scrolling through elements in slide getting focused
39
40
  */
40
41
 
41
- .uk-slider-container { overflow: hidden; }
42
+ .uk-slider-container {
43
+ /* 1 */
44
+ overflow: hidden;
45
+ /* 2 */
46
+ overflow: clip;
47
+ }
42
48
 
43
49
  /*
44
50
  * Widen container to prevent box-shadows from clipping, `large-box-shadow`