uikit 3.10.1 → 3.11.1-dev.fbcf9eec9

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 (65) hide show
  1. package/CHANGELOG.md +45 -17
  2. package/build/icons.js +4 -4
  3. package/build/scope.js +4 -6
  4. package/build/scss.js +4 -4
  5. package/dist/css/uikit-core-rtl.css +10 -1
  6. package/dist/css/uikit-core-rtl.min.css +1 -1
  7. package/dist/css/uikit-core.css +10 -1
  8. package/dist/css/uikit-core.min.css +1 -1
  9. package/dist/css/uikit-rtl.css +10 -1
  10. package/dist/css/uikit-rtl.min.css +1 -1
  11. package/dist/css/uikit.css +10 -1
  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 +257 -264
  24. package/dist/js/components/parallax.min.js +1 -1
  25. package/dist/js/components/slider-parallax.js +215 -257
  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 +215 -257
  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 +38 -37
  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 +294 -300
  44. package/dist/js/uikit.min.js +1 -1
  45. package/package.json +5 -5
  46. package/src/js/api/hooks.js +6 -10
  47. package/src/js/components/parallax.js +38 -8
  48. package/src/js/core/grid.js +2 -2
  49. package/src/js/core/scrollspy.js +1 -1
  50. package/src/js/core/svg.js +9 -7
  51. package/src/js/mixin/parallax.js +209 -242
  52. package/src/js/util/dimensions.js +4 -2
  53. package/src/js/util/lang.js +4 -0
  54. package/src/js/util/viewport.js +9 -13
  55. package/src/less/components/position.less +2 -0
  56. package/src/less/components/sticky.less +6 -0
  57. package/src/scss/components/position.scss +2 -0
  58. package/src/scss/components/sticky.scss +6 -0
  59. package/tests/index.html +1 -1
  60. package/tests/js/index.js +1 -1
  61. package/tests/notification.html +5 -5
  62. package/tests/parallax.html +66 -50
  63. package/tests/sticky-parallax.html +274 -0
  64. package/tests/sticky.html +2 -2
  65. package/tests/tab.html +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## WIP
4
+
5
+ ### Fixed
6
+
7
+ - Fix scoping css to exclude `:root` selector
8
+
9
+ ## 3.11.0 (February 7, 2022)
10
+
11
+ ### Added
12
+
13
+ - Add `start` and `end` options to Parallax component
14
+ - Add negative z-index utility class to Position component
15
+ - Add Sticky Parallax test
16
+
17
+ ### Deprecated
18
+
19
+ - Deprecate `viewport` option in Parallax component: Use `end` option instead
20
+
21
+ ### Fixed
22
+
23
+ - Use same position context when uk-sticky sticks or not
24
+ - Fix interdependent computed properties being evaluated too often
25
+ - Fix `getIndex()` returns `-1` instead of `NaN` if called with empty elements parameter
26
+ - Fix Scrollspy component no longer sets class `false`
27
+ - Fix Parallax component no longer rounds values to two digits after comma
28
+ - Fix Parallax component running backwards with 'viewport' option set to a value < 1
29
+ - Fix Parallax component easing option for values < -1 || > 1
30
+
3
31
  ## 3.10.1 (January 19, 2022)
4
32
 
5
33
  ### Fixed
@@ -8,7 +36,7 @@
8
36
  - Fix usage of `data-` prefix for Cover and Responsive component
9
37
  - Fix pointer events for iframes in Cover component
10
38
  - Fix Slideshow component no longer throws if items list does not exist
11
- - Fix space key no longer triggers Toggle on <input> elements
39
+ - Fix space key no longer triggers Toggle on `input` elements
12
40
 
13
41
  ## 3.10.0 (January 12, 2022)
14
42
 
@@ -62,7 +90,7 @@
62
90
 
63
91
  ### Changed
64
92
 
65
- - Upgrade LESS to version 4
93
+ - Upgrade Less to version 4
66
94
 
67
95
  ## 3.8.1 (November 5, 2021)
68
96
 
@@ -152,7 +180,7 @@
152
180
  ### Fixed
153
181
 
154
182
  - Fix animation classes only partially being removed in Scrollspy component
155
- - Fix scrollIntoView did not return Promise if element is hidden
183
+ - Fix scrollIntoView did not return Promise if element is hidden
156
184
 
157
185
  ## 3.7.0 (June 29, 2021)
158
186
 
@@ -252,7 +280,7 @@
252
280
 
253
281
  ### Added
254
282
 
255
- - Add background-size modifier for width and height to Background component
283
+ - Add background-size modifier for width and height to Background component
256
284
 
257
285
  ### Fixed
258
286
 
@@ -299,7 +327,7 @@
299
327
 
300
328
  - Fix IE11 compatibility
301
329
  - Fix changing ratio does not correctly apply width and height in SVG component
302
- - Fix issues from hiding an already hidden Modal
330
+ - Fix issues from hiding an already hidden Modal
303
331
 
304
332
  ## 3.6.11 (January 14, 2021)
305
333
 
@@ -533,7 +561,7 @@
533
561
  ### Added
534
562
 
535
563
  - Add list marker utility support for WebKit
536
- - Add `uk-text-default` to Text component
564
+ - Add `uk-text-default` to Text component
537
565
  - Add multiple targets to Filter component
538
566
 
539
567
  ### Fixed
@@ -542,7 +570,7 @@
542
570
  - Fix empty slider throws exception
543
571
  - Fix pointer events ignored on SVGs in Sortable component
544
572
  - Fix Grid component divider rendering
545
- - Fix `<select>` closes Drop component in hover mode in Firefox
573
+ - Fix `<select>` closes Drop component in hover mode in Firefox
546
574
 
547
575
  ## 3.5.4 (June 12, 2020)
548
576
 
@@ -553,7 +581,7 @@
553
581
  ### Fixed
554
582
 
555
583
  - Fix prop observer for dataSrc option in Image component
556
- - Fix ajax function supports responseType 'json' in IE 11
584
+ - Fix ajax function supports responseType 'json' in IE 11
557
585
  - Fix Accordion component with `multiple: true` and `collapsible: false`
558
586
 
559
587
  ## 3.5.3 (May 29, 2020)
@@ -606,7 +634,7 @@
606
634
 
607
635
  ### Added
608
636
 
609
- - Add inBrowser check to enable server-side rendering
637
+ - Add inBrowser check to enable server-side rendering
610
638
 
611
639
  ### Fixed
612
640
 
@@ -666,7 +694,7 @@
666
694
 
667
695
  ### Changed
668
696
 
669
- - Change default dimensions to 1920x1080 for YouTube in Lightbox component
697
+ - Change default dimensions to 1920x1080 for YouTube in Lightbox component
670
698
 
671
699
  ### Fixed
672
700
 
@@ -684,7 +712,7 @@
684
712
 
685
713
  - Fix Height Match component not matching empty elements
686
714
  - Fix Scrollspy Nav component activating wrong elements
687
- - Fix Modal/Drop close on bgClick behaviour
715
+ - Fix Modal/Drop close on bgClick behaviour
688
716
  - Fix `z-index` on Modal stacked dialogs
689
717
 
690
718
  ## 3.3.6 (March 12, 2020)
@@ -810,7 +838,7 @@
810
838
  ### Fixed
811
839
 
812
840
  - Fix scrolling containers while dragging in Sortable component
813
- - Fix show/hide behaviour in Drop component
841
+ - Fix show/hide behaviour in Drop component
814
842
  - Fix Accordion component will scroll title into view if needed
815
843
  - Fix component initialization without element
816
844
 
@@ -910,7 +938,7 @@
910
938
  - Fix swipe gestures in Switcher component (Android)
911
939
  - Ensure at most one Height Viewport component set to `expand` is active
912
940
  - Height Viewport component no longer calculates its height if invisible
913
- - Fix using Sortable in scrolling container
941
+ - Fix using Sortable in scrolling container
914
942
  - Fix lazy loading images if parent element is fully clipped
915
943
  - Fix clicking Slideshow with `draggable: false` no longer pauses autoplay
916
944
  - Fix toggling modal while transition is in progress
@@ -954,7 +982,7 @@
954
982
  - Fix selector engine
955
983
  - Fix CSS selector in Lightbox component
956
984
  - Fix Drop not closing when Toggle component is clicked
957
-
985
+
958
986
  ## 3.1.3 (April 23, 2019)
959
987
 
960
988
  ### Fixed
@@ -1873,7 +1901,7 @@
1873
1901
 
1874
1902
  ### Changed
1875
1903
 
1876
- - IMPORTANT: Move LESS/Sass imports into one file. Use `components/_import.less`
1904
+ - IMPORTANT: Move Less/Sass imports into one file. Use `components/_import.less`
1877
1905
  - IMPORTANT: Renamed `transition` option to `easing` in Scroll component
1878
1906
  - Improve flip behaviour in Drop component
1879
1907
  - Improve `class` handling
@@ -2047,7 +2075,7 @@
2047
2075
 
2048
2076
  ### Fixed
2049
2077
 
2050
- - Fix npm not watching LESS
2078
+ - Fix npm not watching Less files
2051
2079
  - Modal no longer closes immediately when toggled from custom `click` handler
2052
2080
  - Fix Accordion component
2053
2081
  - Fix container for Tooltip component
@@ -2144,7 +2172,7 @@
2144
2172
 
2145
2173
  ### Changed
2146
2174
 
2147
- - LESS no longer uses component attribute selectors
2175
+ - Less no longer uses component attribute selectors
2148
2176
  - Accordion close and open icons using variables
2149
2177
 
2150
2178
  ### Removed
package/build/icons.js CHANGED
@@ -2,16 +2,16 @@ import {args, compile, glob, icons} from './util.js';
2
2
 
3
3
  if (args.h || args.help) {
4
4
  console.log(`
5
-
5
+
6
6
  Builds additional custom uikit icons found in './custom/*/icons'
7
-
7
+
8
8
  usage:
9
9
 
10
10
  icons.js [custom|name]
11
11
 
12
- -c|--custom
12
+ -c|--custom
13
13
  Specify custom folder to look for icons (default: './custom/*/icons')
14
- -n|--name
14
+ -n|--name
15
15
  Specify name regex to match against folder (default: '([a-z]+)/icons$')
16
16
 
17
17
  `);
package/build/scope.js CHANGED
@@ -15,7 +15,7 @@ if (args.h || args.help) {
15
15
  `);
16
16
  process.exit(0);
17
17
  }
18
- const currentScopeRe = /\/\* scoped: ([^*]*) \*\//;
18
+ const currentScopeRe = /\/\* scoped: ([^*]*) \*\/\n/;
19
19
  const currentScopeLegacyRe = /\.(uk-scope)/;
20
20
 
21
21
  const files = await glob('dist/**/!(*.min).css');
@@ -65,9 +65,7 @@ async function scope(files, scope) {
65
65
  await replaceInFile(file, async data => {
66
66
  const output = await renderLess(`.${scope} {\n${stripComments(data)}\n}`);
67
67
  return `/* scoped: ${scope} */\n${
68
- output
69
- .replace(new RegExp(`.${scope} ${/{(.|[\r\n])*?}/.source}`), '')
70
- .replace(new RegExp(`.${scope}${/\s((\.(uk-(drag|modal-page|offcanvas-page|offcanvas-flip)))|html)/.source}`, 'g'), '$1')
68
+ output.replace(new RegExp(`.${scope}\\s((\\.(uk-(drag|modal-page|offcanvas-page|offcanvas-flip)))|html|:root)`, 'g'), '$1') // unescape
71
69
  }`;
72
70
  });
73
71
  await minify(file);
@@ -78,8 +76,8 @@ async function cleanup(files, scope) {
78
76
  const string = scope.split(' ').map(scope => `.${scope}`).join(' ');
79
77
  for (const file of files) {
80
78
  await replaceInFile(file, data => data
81
- .replace(new RegExp(/ */.source + string + / ({[\s\S]*?})?/.source, 'g'), '') // replace classes
82
- .replace(new RegExp(currentScopeRe.source, 'g'), '') // remove scope comment
79
+ .replace(currentScopeRe, '') // remove scope comment
80
+ .replace(new RegExp(` *${string} ({[\\s\\S]*?})?`, 'g'), '') // replace classes
83
81
  );
84
82
  }
85
83
  }
package/build/scss.js CHANGED
@@ -77,7 +77,7 @@ for (const file of await glob('src/less/**/*.less')) {
77
77
 
78
78
  const data = await read(file);
79
79
 
80
- /* replace all LESS stuff with SCSS */
80
+ /* replace all Less stuff with SCSS */
81
81
  let scssData = data.replace(/\/less\//g, '/scss/') // change less/ dir to scss/ on imports
82
82
  .replace(/\.less/g, '.scss') // change .less extensions to .scss on imports
83
83
  .replace(/@/g, '$') // convert variables
@@ -90,9 +90,9 @@ for (const file of await glob('src/less/**/*.less')) {
90
90
  .replace(/@mixin ([\w-]*)\s*\((.*)\)\s*{\s*}/g, '// @mixin $1($2){}') // comment empty mixins
91
91
  .replace(/\.(hook[a-zA-Z\-\d]+)(\(\))?;/g, '@if(mixin-exists($1)) {@include $1();}') // hook calls surrounded by a mixin-exists
92
92
  .replace(/\$(import|supports|media|font-face|page|-ms-viewport|keyframes|-webkit-keyframes|-moz-document)/g, '@$1') // replace valid '@' statements
93
- .replace(/tint\((\$[\w-]+),\s([^)]*)\)/g, 'mix(white, $1, $2)') // replace LESS function tint with mix
94
- .replace(/fade\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2) => { return `rgba(${p1}, ${p2 / 100})`;}) // replace LESS function fade with rgba
95
- .replace(/fadeout\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2) => { return `fade-out(${p1}, ${p2 / 100})`;}) // replace LESS function fadeout with fade-out
93
+ .replace(/tint\((\$[\w-]+),\s([^)]*)\)/g, 'mix(white, $1, $2)') // replace Less function tint with mix
94
+ .replace(/fade\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2) => { return `rgba(${p1}, ${p2 / 100})`;}) // replace Less function fade with rgba
95
+ .replace(/fadeout\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2) => { return `fade-out(${p1}, ${p2 / 100})`;}) // replace Less function fadeout with fade-out
96
96
  .replace(/\.svg-fill/g, '@include svg-fill') // include svg-fill mixin
97
97
  .replace(/(.*):extend\((\.[\w-\\@]*) all\) when \((\$[\w-]*) = ([\w]+)\) {}/g, '@if ( $3 == $4 ) { $1 { @extend $2 !optional;} }') // update conditional extend and add !optional to ignore warnings
98
98
  .replace(/(\.[\w-\\@]+)\s*when\s*\((\$[\w-]*)\s*=\s*(\w+)\)\s*{\s*@if\(mixin-exists\(([\w-]*)\)\) {@include\s([\w-]*)\(\);\s*}\s*}/g, '@if ($2 == $3) { $1 { @if (mixin-exists($4)) {@include $4();}}}') // update conditional hook
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.10.1 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.1-dev.fbcf9eec9 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
  /* ========================================================================
3
3
  Component: Base
4
4
  ========================================================================== */
@@ -3777,6 +3777,12 @@ select.uk-form-width-xsmall {
3777
3777
  /* ========================================================================
3778
3778
  Component: Sticky
3779
3779
  ========================================================================== */
3780
+ /*
3781
+ * Create position context so it's t the same like when fixed.
3782
+ */
3783
+ .uk-sticky {
3784
+ position: relative;
3785
+ }
3780
3786
  /*
3781
3787
  * 1. Force new layer to resolve frame rate issues on devices with lower frame rates
3782
3788
  */
@@ -8612,6 +8618,9 @@ iframe[data-uk-cover] {
8612
8618
  .uk-position-z-index {
8613
8619
  z-index: 1;
8614
8620
  }
8621
+ .uk-position-z-index-negative {
8622
+ z-index: -1;
8623
+ }
8615
8624
  /* ========================================================================
8616
8625
  Component: Transition
8617
8626
  ========================================================================== */