uikit 3.11.2-dev.c08a5b5f0 → 3.11.2-dev.d8c101f07

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 (157) hide show
  1. package/.eslintrc.json +4 -49
  2. package/.prettierignore +14 -0
  3. package/.prettierrc.json +13 -0
  4. package/.webstorm.js +3 -3
  5. package/CHANGELOG.md +5 -15
  6. package/build/.eslintrc.json +1 -3
  7. package/build/build.js +26 -28
  8. package/build/icons.js +7 -11
  9. package/build/less.js +48 -36
  10. package/build/package.json +2 -2
  11. package/build/prefix.js +21 -18
  12. package/build/publishDev.js +6 -8
  13. package/build/release.js +20 -17
  14. package/build/scope.js +21 -11
  15. package/build/scss.js +72 -39
  16. package/build/util.js +71 -62
  17. package/build/wrapper/icons.js +0 -2
  18. package/dist/css/uikit-core-rtl.css +1 -1
  19. package/dist/css/uikit-core-rtl.min.css +1 -1
  20. package/dist/css/uikit-core.css +1 -1
  21. package/dist/css/uikit-core.min.css +1 -1
  22. package/dist/css/uikit-rtl.css +1 -1
  23. package/dist/css/uikit-rtl.min.css +1 -1
  24. package/dist/css/uikit.css +1 -1
  25. package/dist/css/uikit.min.css +1 -1
  26. package/dist/js/components/countdown.js +88 -133
  27. package/dist/js/components/countdown.min.js +1 -1
  28. package/dist/js/components/filter.js +408 -439
  29. package/dist/js/components/filter.min.js +1 -1
  30. package/dist/js/components/lightbox-panel.js +1098 -1316
  31. package/dist/js/components/lightbox-panel.min.js +1 -1
  32. package/dist/js/components/lightbox.js +1144 -1393
  33. package/dist/js/components/lightbox.min.js +1 -1
  34. package/dist/js/components/notification.js +94 -114
  35. package/dist/js/components/notification.min.js +1 -1
  36. package/dist/js/components/parallax.js +294 -345
  37. package/dist/js/components/parallax.min.js +1 -1
  38. package/dist/js/components/slider-parallax.js +292 -344
  39. package/dist/js/components/slider-parallax.min.js +1 -1
  40. package/dist/js/components/slider.js +722 -852
  41. package/dist/js/components/slider.min.js +1 -1
  42. package/dist/js/components/slideshow-parallax.js +292 -344
  43. package/dist/js/components/slideshow-parallax.min.js +1 -1
  44. package/dist/js/components/slideshow.js +609 -834
  45. package/dist/js/components/slideshow.min.js +1 -1
  46. package/dist/js/components/sortable.js +587 -620
  47. package/dist/js/components/sortable.min.js +1 -1
  48. package/dist/js/components/tooltip.js +324 -356
  49. package/dist/js/components/tooltip.min.js +1 -1
  50. package/dist/js/components/upload.js +155 -167
  51. package/dist/js/components/upload.min.js +1 -1
  52. package/dist/js/uikit-core.js +5244 -6600
  53. package/dist/js/uikit-core.min.js +1 -1
  54. package/dist/js/uikit-icons.js +7 -9
  55. package/dist/js/uikit-icons.min.js +1 -1
  56. package/dist/js/uikit.js +8041 -9907
  57. package/dist/js/uikit.min.js +1 -1
  58. package/jsconfig.json +1 -1
  59. package/package.json +64 -60
  60. package/src/js/api/boot.js +25 -32
  61. package/src/js/api/component.js +15 -28
  62. package/src/js/api/global.js +6 -12
  63. package/src/js/api/hooks.js +14 -33
  64. package/src/js/api/instance.js +7 -15
  65. package/src/js/api/state.js +65 -82
  66. package/src/js/components/countdown.js +24 -50
  67. package/src/js/components/filter.js +70 -66
  68. package/src/js/components/index.js +13 -13
  69. package/src/js/components/internal/lightbox-animations.js +14 -25
  70. package/src/js/components/internal/slider-transitioner.js +66 -45
  71. package/src/js/components/internal/slideshow-animations.js +46 -64
  72. package/src/js/components/lightbox-panel.js +107 -105
  73. package/src/js/components/lightbox.js +17 -39
  74. package/src/js/components/notification.js +49 -43
  75. package/src/js/components/parallax.js +16 -30
  76. package/src/js/components/slider-parallax.js +13 -23
  77. package/src/js/components/slider.js +75 -64
  78. package/src/js/components/slideshow-parallax.js +1 -1
  79. package/src/js/components/slideshow.js +8 -44
  80. package/src/js/components/sortable.js +125 -106
  81. package/src/js/components/tooltip.js +41 -31
  82. package/src/js/components/upload.js +52 -63
  83. package/src/js/core/accordion.js +53 -48
  84. package/src/js/core/alert.js +9 -17
  85. package/src/js/core/core.js +74 -53
  86. package/src/js/core/cover.js +11 -15
  87. package/src/js/core/drop.js +106 -92
  88. package/src/js/core/form-custom.js +20 -25
  89. package/src/js/core/gif.js +3 -7
  90. package/src/js/core/grid.js +57 -58
  91. package/src/js/core/height-match.js +16 -29
  92. package/src/js/core/height-viewport.js +28 -35
  93. package/src/js/core/icon.js +38 -50
  94. package/src/js/core/img.js +133 -152
  95. package/src/js/core/index.js +39 -39
  96. package/src/js/core/leader.js +9 -18
  97. package/src/js/core/margin.js +21 -37
  98. package/src/js/core/modal.js +49 -36
  99. package/src/js/core/nav.js +2 -4
  100. package/src/js/core/navbar.js +112 -88
  101. package/src/js/core/offcanvas.js +49 -53
  102. package/src/js/core/overflow-auto.js +13 -17
  103. package/src/js/core/responsive.js +14 -12
  104. package/src/js/core/scroll.js +10 -20
  105. package/src/js/core/scrollspy-nav.js +34 -31
  106. package/src/js/core/scrollspy.js +37 -54
  107. package/src/js/core/sticky.js +130 -91
  108. package/src/js/core/svg.js +60 -79
  109. package/src/js/core/switcher.js +47 -46
  110. package/src/js/core/tab.js +7 -10
  111. package/src/js/core/toggle.js +64 -66
  112. package/src/js/core/video.js +11 -22
  113. package/src/js/mixin/animate.js +19 -20
  114. package/src/js/mixin/class.js +2 -4
  115. package/src/js/mixin/container.js +7 -11
  116. package/src/js/mixin/internal/animate-fade.js +73 -30
  117. package/src/js/mixin/internal/animate-slide.js +58 -41
  118. package/src/js/mixin/internal/slideshow-animations.js +7 -14
  119. package/src/js/mixin/internal/slideshow-transitioner.js +10 -17
  120. package/src/js/mixin/media.js +5 -10
  121. package/src/js/mixin/modal.js +89 -66
  122. package/src/js/mixin/parallax.js +53 -48
  123. package/src/js/mixin/position.js +26 -20
  124. package/src/js/mixin/slider-autoplay.js +12 -21
  125. package/src/js/mixin/slider-drag.js +64 -65
  126. package/src/js/mixin/slider-nav.js +26 -35
  127. package/src/js/mixin/slider-reactive.js +2 -8
  128. package/src/js/mixin/slider.js +48 -55
  129. package/src/js/mixin/slideshow.js +13 -19
  130. package/src/js/mixin/togglable.js +89 -63
  131. package/src/js/uikit-core.js +2 -4
  132. package/src/js/uikit.js +2 -4
  133. package/src/js/util/ajax.js +20 -39
  134. package/src/js/util/animation.js +77 -75
  135. package/src/js/util/attr.js +17 -21
  136. package/src/js/util/class.js +14 -52
  137. package/src/js/util/dimensions.js +56 -43
  138. package/src/js/util/dom.js +40 -73
  139. package/src/js/util/env.js +7 -12
  140. package/src/js/util/event.js +60 -59
  141. package/src/js/util/fastdom.js +1 -6
  142. package/src/js/util/filter.js +17 -34
  143. package/src/js/util/index.js +0 -1
  144. package/src/js/util/lang.js +81 -121
  145. package/src/js/util/mouse.js +19 -17
  146. package/src/js/util/options.js +32 -46
  147. package/src/js/util/player.js +40 -36
  148. package/src/js/util/position.js +54 -46
  149. package/src/js/util/selector.js +34 -49
  150. package/src/js/util/style.js +36 -46
  151. package/src/js/util/viewport.js +75 -64
  152. package/tests/image.html +37 -33
  153. package/tests/js/index.js +114 -85
  154. package/src/js/mixin/flex-bug.js +0 -56
  155. package/src/js/util/promise.js +0 -191
  156. package/tests/images/test.avif +0 -0
  157. package/tests/images/test.webp +0 -0
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.2-dev.c08a5b5f0 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -7,183 +7,138 @@
7
7
  })(this, (function (uikitUtil) { 'use strict';
8
8
 
9
9
  var Class = {
10
-
11
- connected: function() {
12
- !uikitUtil.hasClass(this.$el, this.$name) && uikitUtil.addClass(this.$el, this.$name);
13
- }
14
-
15
- };
10
+ connected() {
11
+ !uikitUtil.hasClass(this.$el, this.$name) && uikitUtil.addClass(this.$el, this.$name);
12
+ } };
16
13
 
17
14
  var Component = {
15
+ mixins: [Class],
18
16
 
19
- mixins: [Class],
20
-
21
- props: {
22
- date: String,
23
- clsWrapper: String
24
- },
25
-
26
- data: {
27
- date: '',
28
- clsWrapper: '.uk-countdown-%unit%'
29
- },
30
-
31
- computed: {
32
-
33
- date: function(ref) {
34
- var date = ref.date;
35
-
36
- return Date.parse(date);
37
- },
38
-
39
- days: function(ref, $el) {
40
- var clsWrapper = ref.clsWrapper;
17
+ props: {
18
+ date: String,
19
+ clsWrapper: String },
41
20
 
42
- return uikitUtil.$(clsWrapper.replace('%unit%', 'days'), $el);
43
- },
44
21
 
45
- hours: function(ref, $el) {
46
- var clsWrapper = ref.clsWrapper;
22
+ data: {
23
+ date: '',
24
+ clsWrapper: '.uk-countdown-%unit%' },
47
25
 
48
- return uikitUtil.$(clsWrapper.replace('%unit%', 'hours'), $el);
49
- },
50
-
51
- minutes: function(ref, $el) {
52
- var clsWrapper = ref.clsWrapper;
53
-
54
- return uikitUtil.$(clsWrapper.replace('%unit%', 'minutes'), $el);
55
- },
56
-
57
- seconds: function(ref, $el) {
58
- var clsWrapper = ref.clsWrapper;
59
-
60
- return uikitUtil.$(clsWrapper.replace('%unit%', 'seconds'), $el);
61
- },
62
-
63
- units: function() {
64
- var this$1$1 = this;
65
-
66
- return ['days', 'hours', 'minutes', 'seconds'].filter(function (unit) { return this$1$1[unit]; });
67
- }
68
26
 
27
+ computed: {
28
+ date(_ref) {let { date } = _ref;
29
+ return Date.parse(date);
69
30
  },
70
31
 
71
- connected: function() {
72
- this.start();
32
+ days(_ref2, $el) {let { clsWrapper } = _ref2;
33
+ return uikitUtil.$(clsWrapper.replace('%unit%', 'days'), $el);
73
34
  },
74
35
 
75
- disconnected: function() {
76
- var this$1$1 = this;
77
-
78
- this.stop();
79
- this.units.forEach(function (unit) { return uikitUtil.empty(this$1$1[unit]); });
36
+ hours(_ref3, $el) {let { clsWrapper } = _ref3;
37
+ return uikitUtil.$(clsWrapper.replace('%unit%', 'hours'), $el);
80
38
  },
81
39
 
82
- events: [
83
-
84
- {
85
-
86
- name: 'visibilitychange',
87
-
88
- el: function() {
89
- return document;
90
- },
40
+ minutes(_ref4, $el) {let { clsWrapper } = _ref4;
41
+ return uikitUtil.$(clsWrapper.replace('%unit%', 'minutes'), $el);
42
+ },
91
43
 
92
- handler: function() {
93
- if (document.hidden) {
94
- this.stop();
95
- } else {
96
- this.start();
97
- }
98
- }
44
+ seconds(_ref5, $el) {let { clsWrapper } = _ref5;
45
+ return uikitUtil.$(clsWrapper.replace('%unit%', 'seconds'), $el);
46
+ },
99
47
 
100
- }
48
+ units() {
49
+ return ['days', 'hours', 'minutes', 'seconds'].filter((unit) => this[unit]);
50
+ } },
101
51
 
102
- ],
103
52
 
104
- update: {
53
+ connected() {
54
+ this.start();
55
+ },
105
56
 
106
- write: function() {
107
- var this$1$1 = this;
57
+ disconnected() {
58
+ this.stop();
59
+ this.units.forEach((unit) => uikitUtil.empty(this[unit]));
60
+ },
108
61
 
62
+ events: [
63
+ {
64
+ name: 'visibilitychange',
109
65
 
110
- var timespan = getTimeSpan(this.date);
66
+ el() {
67
+ return document;
68
+ },
111
69
 
112
- if (timespan.total <= 0) {
70
+ handler() {
71
+ if (document.hidden) {
72
+ this.stop();
73
+ } else {
74
+ this.start();
75
+ }
76
+ } }],
113
77
 
114
- this.stop();
115
78
 
116
- timespan.days
117
- = timespan.hours
118
- = timespan.minutes
119
- = timespan.seconds
120
- = 0;
121
- }
122
79
 
123
- this.units.forEach(function (unit) {
80
+ update: {
81
+ write() {
82
+ const timespan = getTimeSpan(this.date);
124
83
 
125
- var digits = String(Math.floor(timespan[unit]));
84
+ if (timespan.total <= 0) {
85
+ this.stop();
126
86
 
127
- digits = digits.length < 2 ? ("0" + digits) : digits;
87
+ timespan.days = timespan.hours = timespan.minutes = timespan.seconds = 0;
88
+ }
128
89
 
129
- var el = this$1$1[unit];
130
- if (el.textContent !== digits) {
131
- digits = digits.split('');
90
+ for (const unit of this.units) {
91
+ let digits = String(Math.floor(timespan[unit]));
132
92
 
133
- if (digits.length !== el.children.length) {
134
- uikitUtil.html(el, digits.map(function () { return '<span></span>'; }).join(''));
135
- }
93
+ digits = digits.length < 2 ? "0" + digits : digits;
136
94
 
137
- digits.forEach(function (digit, i) { return el.children[i].textContent = digit; });
138
- }
95
+ const el = this[unit];
96
+ if (el.textContent !== digits) {
97
+ digits = digits.split('');
139
98
 
140
- });
99
+ if (digits.length !== el.children.length) {
100
+ uikitUtil.html(el, digits.map(() => '<span></span>').join(''));
101
+ }
141
102
 
103
+ digits.forEach((digit, i) => el.children[i].textContent = digit);
142
104
  }
105
+ }
106
+ } },
143
107
 
144
- },
145
-
146
- methods: {
147
-
148
- start: function() {
149
-
150
- this.stop();
151
108
 
152
- if (this.date && this.units.length) {
153
- this.$update();
154
- this.timer = setInterval(this.$update, 1000);
155
- }
109
+ methods: {
110
+ start() {
111
+ this.stop();
156
112
 
157
- },
158
-
159
- stop: function() {
160
-
161
- if (this.timer) {
162
- clearInterval(this.timer);
163
- this.timer = null;
164
- }
113
+ if (this.date && this.units.length) {
114
+ this.$update();
115
+ this.timer = setInterval(this.$update, 1000);
116
+ }
117
+ },
165
118
 
166
- }
119
+ stop() {
120
+ if (this.timer) {
121
+ clearInterval(this.timer);
122
+ this.timer = null;
123
+ }
124
+ } } };
167
125
 
168
- }
169
126
 
170
- };
171
127
 
172
128
  function getTimeSpan(date) {
129
+ const total = date - Date.now();
173
130
 
174
- var total = date - Date.now();
131
+ return {
132
+ total,
133
+ seconds: total / 1000 % 60,
134
+ minutes: total / 1000 / 60 % 60,
135
+ hours: total / 1000 / 60 / 60 % 24,
136
+ days: total / 1000 / 60 / 60 / 24 };
175
137
 
176
- return {
177
- total: total,
178
- seconds: total / 1000 % 60,
179
- minutes: total / 1000 / 60 % 60,
180
- hours: total / 1000 / 60 / 60 % 24,
181
- days: total / 1000 / 60 / 60 / 24
182
- };
183
138
  }
184
139
 
185
140
  if (typeof window !== 'undefined' && window.UIkit) {
186
- window.UIkit.component('countdown', Component);
141
+ window.UIkit.component('countdown', Component);
187
142
  }
188
143
 
189
144
  return Component;
@@ -1 +1 @@
1
- /*! UIkit 3.11.2-dev.c08a5b5f0 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,r){typeof exports=="object"&&typeof module<"u"?module.exports=r(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],r):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=r(e.UIkit.util))})(this,function(e){"use strict";var r={connected:function(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},a={mixins:[r],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},computed:{date:function(n){var t=n.date;return Date.parse(t)},days:function(n,t){var s=n.clsWrapper;return e.$(s.replace("%unit%","days"),t)},hours:function(n,t){var s=n.clsWrapper;return e.$(s.replace("%unit%","hours"),t)},minutes:function(n,t){var s=n.clsWrapper;return e.$(s.replace("%unit%","minutes"),t)},seconds:function(n,t){var s=n.clsWrapper;return e.$(s.replace("%unit%","seconds"),t)},units:function(){var n=this;return["days","hours","minutes","seconds"].filter(function(t){return n[t]})}},connected:function(){this.start()},disconnected:function(){var n=this;this.stop(),this.units.forEach(function(t){return e.empty(n[t])})},events:[{name:"visibilitychange",el:function(){return document},handler:function(){document.hidden?this.stop():this.start()}}],update:{write:function(){var n=this,t=u(this.date);t.total<=0&&(this.stop(),t.days=t.hours=t.minutes=t.seconds=0),this.units.forEach(function(s){var i=String(Math.floor(t[s]));i=i.length<2?"0"+i:i;var o=n[s];o.textContent!==i&&(i=i.split(""),i.length!==o.children.length&&e.html(o,i.map(function(){return"<span></span>"}).join("")),i.forEach(function(c,d){return o.children[d].textContent=c}))})}},methods:{start:function(){this.stop(),this.date&&this.units.length&&(this.$update(),this.timer=setInterval(this.$update,1e3))},stop:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}}};function u(n){var t=n-Date.now();return{total:t,seconds:t/1e3%60,minutes:t/1e3/60%60,hours:t/1e3/60/60%24,days:t/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",a),a});
1
+ /*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],i):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitCountdown=i(s.UIkit.util))})(this,function(s){"use strict";var i={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},o={mixins:[i],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},computed:{date(t){let{date:e}=t;return Date.parse(e)},days(t,e){let{clsWrapper:n}=t;return s.$(n.replace("%unit%","days"),e)},hours(t,e){let{clsWrapper:n}=t;return s.$(n.replace("%unit%","hours"),e)},minutes(t,e){let{clsWrapper:n}=t;return s.$(n.replace("%unit%","minutes"),e)},seconds(t,e){let{clsWrapper:n}=t;return s.$(n.replace("%unit%","seconds"),e)},units(){return["days","hours","minutes","seconds"].filter(t=>this[t])}},connected(){this.start()},disconnected(){this.stop(),this.units.forEach(t=>s.empty(this[t]))},events:[{name:"visibilitychange",el(){return document},handler(){document.hidden?this.stop():this.start()}}],update:{write(){const t=a(this.date);t.total<=0&&(this.stop(),t.days=t.hours=t.minutes=t.seconds=0);for(const e of this.units){let n=String(Math.floor(t[e]));n=n.length<2?"0"+n:n;const r=this[e];r.textContent!==n&&(n=n.split(""),n.length!==r.children.length&&s.html(r,n.map(()=>"<span></span>").join("")),n.forEach((d,u)=>r.children[u].textContent=d))}}},methods:{start(){this.stop(),this.date&&this.units.length&&(this.$update(),this.timer=setInterval(this.$update,1e3))},stop(){this.timer&&(clearInterval(this.timer),this.timer=null)}}};function a(t){const e=t-Date.now();return{total:e,seconds:e/1e3%60,minutes:e/1e3/60%60,hours:e/1e3/60/60%24,days:e/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",o),o});