uikit 3.21.7 → 3.21.8

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 (48) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/prefix.js +8 -7
  3. package/build/scope.js +2 -2
  4. package/build/util.js +0 -1
  5. package/dist/css/uikit-core-rtl.css +8 -14
  6. package/dist/css/uikit-core-rtl.min.css +1 -1
  7. package/dist/css/uikit-core.css +8 -14
  8. package/dist/css/uikit-core.min.css +1 -1
  9. package/dist/css/uikit-rtl.css +8 -14
  10. package/dist/css/uikit-rtl.min.css +1 -1
  11. package/dist/css/uikit.css +8 -14
  12. package/dist/css/uikit.min.css +1 -1
  13. package/dist/js/components/countdown.js +1 -1
  14. package/dist/js/components/countdown.min.js +1 -1
  15. package/dist/js/components/filter.js +1 -1
  16. package/dist/js/components/filter.min.js +1 -1
  17. package/dist/js/components/lightbox-panel.js +1 -1
  18. package/dist/js/components/lightbox-panel.min.js +1 -1
  19. package/dist/js/components/lightbox.js +1 -1
  20. package/dist/js/components/lightbox.min.js +1 -1
  21. package/dist/js/components/notification.js +1 -1
  22. package/dist/js/components/notification.min.js +1 -1
  23. package/dist/js/components/parallax.js +1 -1
  24. package/dist/js/components/parallax.min.js +1 -1
  25. package/dist/js/components/slider-parallax.js +1 -1
  26. package/dist/js/components/slider-parallax.min.js +1 -1
  27. package/dist/js/components/slider.js +1 -1
  28. package/dist/js/components/slider.min.js +1 -1
  29. package/dist/js/components/slideshow-parallax.js +1 -1
  30. package/dist/js/components/slideshow-parallax.min.js +1 -1
  31. package/dist/js/components/slideshow.js +1 -1
  32. package/dist/js/components/slideshow.min.js +1 -1
  33. package/dist/js/components/sortable.js +1 -1
  34. package/dist/js/components/sortable.min.js +1 -1
  35. package/dist/js/components/tooltip.js +1 -1
  36. package/dist/js/components/tooltip.min.js +1 -1
  37. package/dist/js/components/upload.js +1 -1
  38. package/dist/js/components/upload.min.js +1 -1
  39. package/dist/js/uikit-core.js +3 -3
  40. package/dist/js/uikit-core.min.js +1 -1
  41. package/dist/js/uikit-icons.js +1 -1
  42. package/dist/js/uikit-icons.min.js +1 -1
  43. package/dist/js/uikit.js +3 -3
  44. package/dist/js/uikit.min.js +1 -1
  45. package/package.json +1 -1
  46. package/src/js/util/viewport.js +11 -2
  47. package/src/less/components/visibility.less +7 -13
  48. package/src/scss/components/visibility.scss +7 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.21.8 (July 25, 2024)
4
+
5
+ ### Fixed
6
+
7
+ - Fix toggled hidden hover class to display elements on hover for touch devices using `tabindex` in Visibility component
8
+ - Fix offsetViewport calculation if window is passed as scrollElement
9
+
3
10
  ## 3.21.7 (July 17, 2024)
4
11
 
5
12
  ### Fixed
package/build/prefix.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { glob } from 'glob';
2
2
  import inquirer from 'inquirer';
3
- import { args, read, replaceInFile, validClassName } from './util.js';
3
+ import { args, read, replaceInFile } from './util.js';
4
4
 
5
5
  if (args.h || args.help) {
6
6
  console.log(`
@@ -29,7 +29,7 @@ await replacePrefix(currentPrefix, prefix);
29
29
 
30
30
  async function findExistingPrefix() {
31
31
  return (await read(`${path}/css/uikit.css`)).match(
32
- new RegExp(`(${validClassName.source})(-[a-z]+)?-grid`),
32
+ /([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(-[a-z]+)?-grid/,
33
33
  )?.[1];
34
34
  }
35
35
 
@@ -43,21 +43,22 @@ async function getPrefix() {
43
43
  await prompt({
44
44
  name: 'prefix',
45
45
  message: 'enter a prefix',
46
- validate: (val, res) =>
47
- val.length && val.match(validClassName)
48
- ? !!(res.prefix = val)
49
- : 'invalid prefix',
46
+ validate: (val) => isValidPrefix(val) || 'invalid prefix',
50
47
  })
51
48
  ).prefix;
52
49
  }
53
50
 
54
- if (validClassName.test(prefixFromInput)) {
51
+ if (isValidPrefix(prefixFromInput)) {
55
52
  return prefixFromInput;
56
53
  } else {
57
54
  throw `Illegal prefix: ${prefixFromInput}`;
58
55
  }
59
56
  }
60
57
 
58
+ function isValidPrefix(prefix) {
59
+ return Boolean(prefix.match(/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/));
60
+ }
61
+
61
62
  async function replacePrefix(from, to) {
62
63
  for (const file of await glob(`${path}/**/*.css`)) {
63
64
  await replaceInFile(file, (data) =>
package/build/scope.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { glob } from 'glob';
2
2
  import stripCssComments from 'strip-css-comments';
3
- import { args, minify, read, renderLess, replaceInFile, validClassName } from './util.js';
3
+ import { args, minify, read, renderLess, replaceInFile } from './util.js';
4
4
 
5
5
  if (args.h || args.help) {
6
6
  console.log(`
@@ -53,7 +53,7 @@ async function getScope(files) {
53
53
  function getNewScope() {
54
54
  const scopeFromInput = args.scope || args.s || 'uk-scope';
55
55
 
56
- if (validClassName.test(scopeFromInput)) {
56
+ if (scopeFromInput.match(/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/)) {
57
57
  return scopeFromInput;
58
58
  } else {
59
59
  throw `Illegal scope-name: ${scopeFromInput}`;
package/build/util.js CHANGED
@@ -15,7 +15,6 @@ import svgo from 'svgo';
15
15
  const limit = pLimit(Number(process.env.cpus || 2));
16
16
 
17
17
  export const banner = `/*! UIkit ${await getVersion()} | https://www.getuikit.com | (c) 2014 - ${new Date().getFullYear()} YOOtheme | MIT License */\n`;
18
- export const validClassName = /[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/;
19
18
 
20
19
  const argv = minimist(process.argv.slice(2));
21
20
 
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.21.7 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
1
+ /*! UIkit 3.21.8 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
2
2
  /* ========================================================================
3
3
  Component: Base
4
4
  ========================================================================== */
@@ -9410,33 +9410,27 @@ iframe[data-uk-cover] {
9410
9410
  /*
9411
9411
  * Remove space when hidden.
9412
9412
  * 1. Remove from document flow.
9413
- * 2. Hide element and shrink its dimension. Can't use zero dimensions together
9414
- * with `overflow: hidden` it would remove it from the accessibility tree.
9415
- * 3. Hide the single rendered pixel.
9416
- * 4. Prevent text wrapping caused by `width: 1px` because it has side effects on vocalisation
9417
- * by screen readers and the visual tracking indicator of other assistive technologies.
9413
+ * 2. Hide element and shrink its dimension. Current browsers and screen readers
9414
+ * keep the element in the accessibility tree even with zero dimensions.
9415
+ * Using `tabindex="-1"` will show the element on touch devices.
9416
+ * Note: `clip-path` doesn't work with `tabindex` on touch devices.
9418
9417
  */
9419
9418
  .uk-hidden-visually:not(:focus):not(:active):not(:focus-within),
9420
9419
  .uk-visible-toggle:not(:hover):not(:focus) .uk-hidden-hover:not(:focus-within) {
9421
9420
  /* 1 */
9422
9421
  position: absolute !important;
9423
9422
  /* 2 */
9424
- width: 1px !important;
9425
- height: 1px !important;
9423
+ width: 0 !important;
9424
+ height: 0 !important;
9426
9425
  padding: 0 !important;
9427
9426
  border: 0 !important;
9428
9427
  margin: 0 !important;
9429
9428
  overflow: hidden !important;
9430
- /* 3 */
9431
- clip-path: inset(50%) !important;
9432
- /* 4 */
9433
- white-space: nowrap !important;
9434
9429
  }
9435
9430
  /*
9436
9431
  * Keep space when hidden.
9437
9432
  * Hide element without shrinking its dimension.
9438
- * Unfortunately, can't use `clip-path: inset(50%)` because hover won't work
9439
- * if the element is positioned outside of the toggle box.
9433
+ * Note: `clip-path` doesn't work with hover for elements outside of the toggle box.
9440
9434
  */
9441
9435
  .uk-visible-toggle:not(:hover):not(:focus) .uk-invisible-hover:not(:focus-within) {
9442
9436
  opacity: 0 !important;