uikit 3.12.1 → 3.12.3-dev.3c9ee4dfd

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 (97) hide show
  1. package/CHANGELOG.md +30 -2
  2. package/build/scss.js +9 -17
  3. package/dist/css/uikit-core-rtl.css +15 -81
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +15 -81
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +15 -81
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +15 -81
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +3 -3
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +1 -1
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +13 -2
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +15 -4
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +1 -1
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +65 -8
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +30 -13
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +14 -3
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +30 -13
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +13 -2
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +1 -1
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +12 -20
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +1 -1
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +281 -224
  38. package/dist/js/uikit-core.min.js +1 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +296 -237
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +1 -1
  44. package/src/js/api/hooks.js +3 -3
  45. package/src/js/api/state.js +14 -39
  46. package/src/js/components/countdown.js +2 -2
  47. package/src/js/components/lightbox.js +1 -1
  48. package/src/js/components/parallax.js +3 -1
  49. package/src/js/components/slider-parallax.js +6 -4
  50. package/src/js/components/slider.js +1 -1
  51. package/src/js/core/core.js +2 -17
  52. package/src/js/core/cover.js +3 -6
  53. package/src/js/core/drop.js +5 -10
  54. package/src/js/core/form-custom.js +6 -7
  55. package/src/js/core/gif.js +5 -3
  56. package/src/js/core/grid.js +2 -1
  57. package/src/js/core/height-match.js +21 -1
  58. package/src/js/core/height-viewport.js +10 -7
  59. package/src/js/core/img.js +1 -2
  60. package/src/js/core/leader.js +7 -13
  61. package/src/js/core/margin.js +18 -1
  62. package/src/js/core/overflow-auto.js +8 -7
  63. package/src/js/core/scroll.js +6 -2
  64. package/src/js/core/scrollspy-nav.js +19 -16
  65. package/src/js/core/scrollspy.js +12 -15
  66. package/src/js/core/sticky.js +8 -3
  67. package/src/js/core/svg.js +16 -14
  68. package/src/js/core/toggle.js +16 -13
  69. package/src/js/core/video.js +2 -8
  70. package/src/js/mixin/media.js +29 -5
  71. package/src/js/mixin/position.js +10 -18
  72. package/src/js/mixin/resize.js +13 -0
  73. package/src/js/mixin/scroll.js +32 -0
  74. package/src/js/mixin/slider.js +2 -1
  75. package/src/js/util/class.js +1 -6
  76. package/src/js/util/mouse.js +1 -1
  77. package/src/js/util/observer.js +57 -20
  78. package/src/js/util/style.js +1 -1
  79. package/src/less/components/base.less +0 -19
  80. package/src/less/components/form.less +1 -9
  81. package/src/less/components/icon.less +6 -0
  82. package/src/less/components/list.less +1 -0
  83. package/src/less/components/search.less +0 -3
  84. package/src/less/components/slider.less +3 -0
  85. package/src/less/components/slideshow.less +3 -0
  86. package/src/less/components/utility.less +0 -9
  87. package/src/scss/components/base.scss +0 -19
  88. package/src/scss/components/form.scss +1 -7
  89. package/src/scss/components/icon.scss +6 -0
  90. package/src/scss/components/list.scss +1 -0
  91. package/src/scss/components/search.scss +0 -1
  92. package/src/scss/components/slider.scss +3 -0
  93. package/src/scss/components/slideshow.scss +3 -0
  94. package/src/scss/components/utility.scss +0 -9
  95. package/src/scss/mixins-theme.scss +0 -4
  96. package/src/scss/mixins.scss +0 -4
  97. package/tests/js/index.js +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## WIP
4
+
5
+ ### Added
6
+
7
+ - Add support for `<img>` element to icon image class in Icon component
8
+
9
+ ### Changed
10
+
11
+ - Drastically improve performance for large sites
12
+ - Custom components have to listen for `resize` and `scroll` updates manually
13
+
14
+ ### Removed
15
+
16
+ - Remove Edge Legacy (EdgeHTML) support
17
+ - Remove Safari fallback for `focus-visible`
18
+
19
+ ### Fixed
20
+
21
+ - Fix list bullet regression in List component
22
+ - Fix Sticky component notices change in its offset parent's position
23
+ - Fix Scrollspy component does not apply animation classes on hide
24
+
25
+ ## 3.12.2 (March 14, 2022)
26
+
27
+ ### Fixed
28
+
29
+ - Fix regression in Slider/Slideshow touch gestures
30
+
3
31
  ## 3.12.1 (March 14, 2022)
4
32
 
5
33
  ### Fixed
@@ -34,7 +62,7 @@
34
62
 
35
63
  - Deprecate `uk-img` for `<img>` element: Use native `loading="lazy"` attribute instead
36
64
 
37
- ## Removed
65
+ ### Removed
38
66
 
39
67
  - Remove IE11 support
40
68
  - Removed `data-width` and `data-height` for `<img>` element from Image component. Use native attributes instead.
@@ -1117,7 +1145,7 @@
1117
1145
 
1118
1146
  - Image Component uses IntersectionObserver now
1119
1147
 
1120
- ## Removed
1148
+ ### Removed
1121
1149
 
1122
1150
  - Remove `isReady` function
1123
1151
  - Form Custom component no longer sets `uk-hover` and `uk-focus` classes
package/build/scss.js CHANGED
@@ -92,10 +92,7 @@ for (const file of await glob('src/less/**/*.less')) {
92
92
  .replace(/(\$[\w-]*)\s*:(.*);/g, '$1: $2 !default;') // make variables optional
93
93
  .replace(/@mixin ([\w-]*)\s*\((.*)\)\s*{\s*}/g, '// @mixin $1($2){}') // comment empty mixins
94
94
  .replace(/\.(hook[a-zA-Z\-\d]+)(\(\))?;/g, '@if(mixin-exists($1)) {@include $1();}') // hook calls surrounded by a mixin-exists
95
- .replace(
96
- /\$(import|supports|media|font-face|page|-ms-viewport|keyframes|-webkit-keyframes|-moz-document)/g,
97
- '@$1'
98
- ) // replace valid '@' statements
95
+ .replace(/\$(import|supports|media|font-face|page|keyframes|-moz-document)/g, '@$1') // replace valid '@' statements
99
96
  .replace(/tint\((\$[\w-]+),\s([^)]*)\)/g, 'mix(white, $1, $2)') // replace Less function tint with mix
100
97
  .replace(/fade\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2) => {
101
98
  return `rgba(${p1}, ${p2 / 100})`;
@@ -191,19 +188,14 @@ await write('src/scss/variables-theme.scss', Array.from(compactThemeVar).join('\
191
188
  * @return Set with all the dependencies.
192
189
  */
193
190
  function getAllDependencies(allVariables, currentKey, dependencies = new Set()) {
194
- if (!allVariables[currentKey].dependencies.length) {
195
- dependencies.add(`${currentKey}: ${allVariables[currentKey].value}`);
196
- return Array.from(dependencies);
197
- } else {
198
- allVariables[currentKey].dependencies.forEach((dependecy) => {
199
- getAllDependencies(allVariables, dependecy, dependencies).forEach((newDependency) =>
200
- dependencies.add(newDependency)
201
- );
202
- });
203
-
204
- dependencies.add(`${currentKey}: ${allVariables[currentKey].value}`);
205
- return Array.from(dependencies);
206
- }
191
+ allVariables[currentKey].dependencies?.forEach((dependency) =>
192
+ getAllDependencies(allVariables, dependency, dependencies).forEach((newDependency) =>
193
+ dependencies.add(newDependency)
194
+ )
195
+ );
196
+
197
+ dependencies.add(`${currentKey}: ${allVariables[currentKey].value}`);
198
+ return Array.from(dependencies);
207
199
  }
208
200
 
209
201
  /*
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.12.1 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.12.3-dev.3c9ee4dfd | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
  /* ========================================================================
3
3
  Component: Base
4
4
  ========================================================================== */
@@ -380,27 +380,9 @@ pre code {
380
380
  }
381
381
  /* Focus
382
382
  ========================================================================== */
383
- /*
384
- * Safari doesn't support `:focus-visible` yet. It also doesn't set focus if clicking a button or anchor.
385
- * 1. Fallback: Remove `:focus` for a negative tabindexes.
386
- * 2. Fallback: Set `:focus` style but not for negative tabindexes.
387
- * 3. Fallback: Remove `:focus` style for browsers which support `:focus-visible`.
388
- * 4. Set `:focus-visible` style for browsers which support it.
389
- */
390
- /* 1 */
391
383
  :focus {
392
384
  outline: none;
393
385
  }
394
- /* 2 */
395
- :focus:not([tabindex^='-']) {
396
- outline: 2px dotted #333;
397
- outline-offset: 1px;
398
- }
399
- /* 3 */
400
- :focus:not(:focus-visible) {
401
- outline: none;
402
- }
403
- /* 4 */
404
386
  :focus-visible {
405
387
  outline: 2px dotted #333;
406
388
  }
@@ -797,6 +779,7 @@ a.uk-link-reset,
797
779
  }
798
780
  .uk-list-bullet > ::before {
799
781
  content: "";
782
+ display: list-item;
800
783
  position: relative;
801
784
  right: -30px;
802
785
  width: 30px;
@@ -1134,14 +1117,20 @@ button.uk-icon:not(:disabled) {
1134
1117
  ========================================================================== */
1135
1118
  /*
1136
1119
  * Display images in icon dimensions
1120
+ * 1. Required for `span` with background image
1121
+ * 2. Required for `image`
1137
1122
  */
1138
1123
  .uk-icon-image {
1139
1124
  width: 20px;
1140
1125
  height: 20px;
1126
+ /* 1 */
1141
1127
  background-position: 50% 50%;
1142
1128
  background-repeat: no-repeat;
1143
1129
  background-size: contain;
1144
1130
  vertical-align: middle;
1131
+ /* 2 */
1132
+ object-fit: scale-down;
1133
+ max-width: none;
1145
1134
  }
1146
1135
  /* Style modifiers
1147
1136
  ========================================================================== */
@@ -1453,15 +1442,9 @@ button.uk-icon:not(:disabled) {
1453
1442
  /*
1454
1443
  * Placeholder
1455
1444
  */
1456
- .uk-input::-ms-input-placeholder {
1457
- color: #999 !important;
1458
- }
1459
1445
  .uk-input::placeholder {
1460
1446
  color: #999;
1461
1447
  }
1462
- .uk-textarea::-ms-input-placeholder {
1463
- color: #999 !important;
1464
- }
1465
1448
  .uk-textarea::placeholder {
1466
1449
  color: #999;
1467
1450
  }
@@ -1557,8 +1540,7 @@ select.uk-form-width-xsmall {
1557
1540
  /*
1558
1541
  * 1. Remove default style. Also works in Firefox
1559
1542
  * 2. Style
1560
- * 3. Remove default style in IE 10/11
1561
- * 4. Set `color` for options in the select dropdown, because the inherited `color` might be too light.
1543
+ * 3. Set `color` for options in the select dropdown, because the inherited `color` might be too light.
1562
1544
  */
1563
1545
  .uk-select:not([multiple]):not([size]) {
1564
1546
  /* 1 */
@@ -1571,10 +1553,6 @@ select.uk-form-width-xsmall {
1571
1553
  background-position: 0% 50%;
1572
1554
  }
1573
1555
  /* 3 */
1574
- .uk-select:not([multiple]):not([size])::-ms-expand {
1575
- display: none;
1576
- }
1577
- /* 4 */
1578
1556
  .uk-select:not([multiple]):not([size]) option {
1579
1557
  color: #666;
1580
1558
  }
@@ -3064,9 +3042,6 @@ select.uk-form-width-xsmall {
3064
3042
  outline: none;
3065
3043
  }
3066
3044
  /* Placeholder */
3067
- .uk-search-input:-ms-input-placeholder {
3068
- color: #999 !important;
3069
- }
3070
3045
  .uk-search-input::placeholder {
3071
3046
  color: #999;
3072
3047
  }
@@ -3575,6 +3550,7 @@ select.uk-form-width-xsmall {
3575
3550
  * 2. Reset list
3576
3551
  * 3. Clip child elements
3577
3552
  * 4. Prevent displaying the callout information on iOS.
3553
+ * 5. Disable horizontal panning gestures
3578
3554
  */
3579
3555
  .uk-slideshow-items {
3580
3556
  /* 1 */
@@ -3588,6 +3564,8 @@ select.uk-form-width-xsmall {
3588
3564
  overflow: hidden;
3589
3565
  /* 4 */
3590
3566
  -webkit-touch-callout: none;
3567
+ /* 5 */
3568
+ touch-action: pan-y;
3591
3569
  }
3592
3570
  /* Item
3593
3571
  ========================================================================== */
@@ -3646,12 +3624,15 @@ select.uk-form-width-xsmall {
3646
3624
  /*
3647
3625
  * 1. Optimize animation
3648
3626
  * 2. Create a containing block. In Safari it's neither created by `transform` nor `will-change`.
3627
+ * 3. Disable horizontal panning gestures
3649
3628
  */
3650
3629
  .uk-slider-items {
3651
3630
  /* 1 */
3652
3631
  will-change: transform;
3653
3632
  /* 2 */
3654
3633
  position: relative;
3634
+ /* 3 */
3635
+ touch-action: pan-y;
3655
3636
  }
3656
3637
  /*
3657
3638
  * 1. Reset list style without interfering with grid
@@ -7661,8 +7642,6 @@ iframe[data-uk-cover] {
7661
7642
  * https://bugzilla.mozilla.org/show_bug.cgi?id=214004
7662
7643
  * 2. In Firefox, a floating `::first-letter` doesn't have a line box and there for no `line-height`
7663
7644
  * https://bugzilla.mozilla.org/show_bug.cgi?id=317933
7664
- * 3. Caused by 1.: Edge creates two nested `::first-letter` containers, one for each selector
7665
- * This doubles the `font-size` exponential when using the `em` unit.
7666
7645
  */
7667
7646
  .uk-dropcap::first-letter,
7668
7647
  .uk-dropcap > p:first-of-type::first-letter {
@@ -7679,12 +7658,6 @@ iframe[data-uk-cover] {
7679
7658
  margin-top: 1.1%;
7680
7659
  }
7681
7660
  }
7682
- /* 3 */
7683
- @supports (-ms-ime-align: auto) {
7684
- .uk-dropcap > p:first-of-type::first-letter {
7685
- font-size: 1em;
7686
- }
7687
- }
7688
7661
  /* Logo
7689
7662
  ========================================================================== */
7690
7663
  /*
@@ -9791,19 +9764,6 @@ iframe[data-uk-cover] {
9791
9764
  background-color: rgba(255, 255, 255, 0.15);
9792
9765
  color: rgba(255, 255, 255, 0.7);
9793
9766
  }
9794
- .uk-light .uk-input::-ms-input-placeholder,
9795
- .uk-section-primary:not(.uk-preserve-color) .uk-input::-ms-input-placeholder,
9796
- .uk-section-secondary:not(.uk-preserve-color) .uk-input::-ms-input-placeholder,
9797
- .uk-tile-primary:not(.uk-preserve-color) .uk-input::-ms-input-placeholder,
9798
- .uk-tile-secondary:not(.uk-preserve-color) .uk-input::-ms-input-placeholder,
9799
- .uk-card-primary.uk-card-body .uk-input::-ms-input-placeholder,
9800
- .uk-card-primary > :not([class*='uk-card-media']) .uk-input::-ms-input-placeholder,
9801
- .uk-card-secondary.uk-card-body .uk-input::-ms-input-placeholder,
9802
- .uk-card-secondary > :not([class*='uk-card-media']) .uk-input::-ms-input-placeholder,
9803
- .uk-overlay-primary .uk-input::-ms-input-placeholder,
9804
- .uk-offcanvas-bar .uk-input::-ms-input-placeholder {
9805
- color: rgba(255, 255, 255, 0.5) !important;
9806
- }
9807
9767
  .uk-light .uk-input::placeholder,
9808
9768
  .uk-section-primary:not(.uk-preserve-color) .uk-input::placeholder,
9809
9769
  .uk-section-secondary:not(.uk-preserve-color) .uk-input::placeholder,
@@ -9817,19 +9777,6 @@ iframe[data-uk-cover] {
9817
9777
  .uk-offcanvas-bar .uk-input::placeholder {
9818
9778
  color: rgba(255, 255, 255, 0.5);
9819
9779
  }
9820
- .uk-light .uk-textarea::-ms-input-placeholder,
9821
- .uk-section-primary:not(.uk-preserve-color) .uk-textarea::-ms-input-placeholder,
9822
- .uk-section-secondary:not(.uk-preserve-color) .uk-textarea::-ms-input-placeholder,
9823
- .uk-tile-primary:not(.uk-preserve-color) .uk-textarea::-ms-input-placeholder,
9824
- .uk-tile-secondary:not(.uk-preserve-color) .uk-textarea::-ms-input-placeholder,
9825
- .uk-card-primary.uk-card-body .uk-textarea::-ms-input-placeholder,
9826
- .uk-card-primary > :not([class*='uk-card-media']) .uk-textarea::-ms-input-placeholder,
9827
- .uk-card-secondary.uk-card-body .uk-textarea::-ms-input-placeholder,
9828
- .uk-card-secondary > :not([class*='uk-card-media']) .uk-textarea::-ms-input-placeholder,
9829
- .uk-overlay-primary .uk-textarea::-ms-input-placeholder,
9830
- .uk-offcanvas-bar .uk-textarea::-ms-input-placeholder {
9831
- color: rgba(255, 255, 255, 0.5) !important;
9832
- }
9833
9780
  .uk-light .uk-textarea::placeholder,
9834
9781
  .uk-section-primary:not(.uk-preserve-color) .uk-textarea::placeholder,
9835
9782
  .uk-section-secondary:not(.uk-preserve-color) .uk-textarea::placeholder,
@@ -10447,19 +10394,6 @@ iframe[data-uk-cover] {
10447
10394
  .uk-offcanvas-bar .uk-search-input {
10448
10395
  color: rgba(255, 255, 255, 0.7);
10449
10396
  }
10450
- .uk-light .uk-search-input:-ms-input-placeholder,
10451
- .uk-section-primary:not(.uk-preserve-color) .uk-search-input:-ms-input-placeholder,
10452
- .uk-section-secondary:not(.uk-preserve-color) .uk-search-input:-ms-input-placeholder,
10453
- .uk-tile-primary:not(.uk-preserve-color) .uk-search-input:-ms-input-placeholder,
10454
- .uk-tile-secondary:not(.uk-preserve-color) .uk-search-input:-ms-input-placeholder,
10455
- .uk-card-primary.uk-card-body .uk-search-input:-ms-input-placeholder,
10456
- .uk-card-primary > :not([class*='uk-card-media']) .uk-search-input:-ms-input-placeholder,
10457
- .uk-card-secondary.uk-card-body .uk-search-input:-ms-input-placeholder,
10458
- .uk-card-secondary > :not([class*='uk-card-media']) .uk-search-input:-ms-input-placeholder,
10459
- .uk-overlay-primary .uk-search-input:-ms-input-placeholder,
10460
- .uk-offcanvas-bar .uk-search-input:-ms-input-placeholder {
10461
- color: rgba(255, 255, 255, 0.5) !important;
10462
- }
10463
10397
  .uk-light .uk-search-input::placeholder,
10464
10398
  .uk-section-primary:not(.uk-preserve-color) .uk-search-input::placeholder,
10465
10399
  .uk-section-secondary:not(.uk-preserve-color) .uk-search-input::placeholder,