uikit 3.14.2-dev.f917389f5 → 3.14.3-dev.68d38eb6d

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 (87) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/css/uikit-core-rtl.css +48 -3
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +48 -3
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +52 -3
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +52 -3
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +101 -17
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +101 -17
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +70 -35
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +55 -35
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +1 -1
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +55 -35
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +1 -1
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +135 -39
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +229 -105
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +298 -139
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/parallax.js +15 -0
  44. package/src/js/core/accordion.js +3 -3
  45. package/src/js/core/alert.js +1 -1
  46. package/src/js/core/drop.js +40 -20
  47. package/src/js/core/height-viewport.js +14 -9
  48. package/src/js/core/navbar.js +19 -18
  49. package/src/js/core/scrollspy.js +4 -0
  50. package/src/js/core/toggle.js +5 -8
  51. package/src/js/mixin/parallax.js +54 -34
  52. package/src/js/mixin/position.js +44 -23
  53. package/src/js/mixin/togglable.js +105 -19
  54. package/src/js/util/animation.js +1 -0
  55. package/src/js/util/dom.js +4 -3
  56. package/src/js/util/viewport.js +1 -1
  57. package/src/less/components/drop.less +17 -4
  58. package/src/less/components/dropdown.less +19 -4
  59. package/src/less/components/margin.less +13 -14
  60. package/src/less/components/nav.less +1 -1
  61. package/src/less/components/navbar.less +32 -11
  62. package/src/less/components/position.less +1 -1
  63. package/src/less/components/sticky.less +7 -0
  64. package/src/less/components/utility.less +1 -2
  65. package/src/less/theme/dropdown.less +11 -0
  66. package/src/less/theme/navbar.less +7 -0
  67. package/src/scss/components/drop.scss +17 -4
  68. package/src/scss/components/dropdown.scss +19 -4
  69. package/src/scss/components/margin.scss +13 -14
  70. package/src/scss/components/nav.scss +1 -1
  71. package/src/scss/components/navbar.scss +21 -0
  72. package/src/scss/components/position.scss +1 -1
  73. package/src/scss/components/sticky.scss +7 -0
  74. package/src/scss/components/utility.scss +1 -2
  75. package/src/scss/mixins-theme.scss +8 -0
  76. package/src/scss/mixins.scss +2 -0
  77. package/src/scss/theme/dropdown.scss +8 -0
  78. package/src/scss/theme/navbar.scss +4 -0
  79. package/src/scss/variables-theme.scss +3 -0
  80. package/src/scss/variables.scss +1 -0
  81. package/tests/drop.html +145 -2
  82. package/tests/dropdown.html +228 -13
  83. package/tests/height-viewport.html +62 -0
  84. package/tests/navbar.html +321 -14
  85. package/tests/sticky-navbar.html +132 -0
  86. package/tests/sticky-parallax.html +2 -1
  87. package/tests/sticky.html +5 -4
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.2-dev.f917389f5 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.3-dev.68d38eb6d | 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')) :
@@ -42,7 +42,7 @@
42
42
 
43
43
  initProps: {
44
44
  overflow: '',
45
- height: '',
45
+ maxHeight: '',
46
46
  paddingTop: '',
47
47
  paddingBottom: '',
48
48
  marginTop: '',
@@ -52,7 +52,7 @@
52
52
 
53
53
  hideProps: {
54
54
  overflow: 'hidden',
55
- height: 0,
55
+ maxHeight: 0,
56
56
  paddingTop: 0,
57
57
  paddingBottom: 0,
58
58
  marginTop: 0,
@@ -67,7 +67,7 @@
67
67
  },
68
68
 
69
69
  hasTransition(_ref2) {let { animation } = _ref2;
70
- return this.hasAnimation && animation[0] === true;
70
+ return uikitUtil.startsWith(animation[0], 'slide');
71
71
  } },
72
72
 
73
73
 
@@ -91,9 +91,9 @@
91
91
  uikitUtil.isFunction(animate) ?
92
92
  animate :
93
93
  animate === false || !this.hasAnimation ?
94
- this._toggle :
94
+ toggleInstant(this) :
95
95
  this.hasTransition ?
96
- toggleHeight(this) :
96
+ toggleTransition(this) :
97
97
  toggleAnimation(this))(
98
98
  el, show);
99
99
 
@@ -157,22 +157,43 @@
157
157
 
158
158
 
159
159
 
160
- function toggleHeight(_ref3)
160
+ function toggleInstant(_ref3) {let { _toggle } = _ref3;
161
+ return (el, show) => {
162
+ uikitUtil.Animation.cancel(el);
163
+ uikitUtil.Transition.cancel(el);
164
+ return _toggle(el, show);
165
+ };
166
+ }
167
+
168
+ function toggleTransition(cmp) {
169
+ switch (cmp.animation[0]) {
170
+ case 'slide-left':
171
+ return slideHorizontal(cmp);
172
+ case 'slide-right':
173
+ return slideHorizontal(cmp, true);}
174
+
175
+ return slide(cmp);
176
+ }
161
177
 
178
+ function slide(_ref4)
162
179
 
163
180
 
164
181
 
165
182
 
166
183
 
167
184
 
168
- {let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref3;
185
+
186
+ {let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
169
187
  return (el, show) => {
170
188
  const inProgress = uikitUtil.Transition.inProgress(el);
171
- const inner = el.hasChildNodes() ?
189
+ const inner =
190
+ !inProgress && el.hasChildNodes() ?
172
191
  uikitUtil.toFloat(uikitUtil.css(el.firstElementChild, 'marginTop')) +
173
192
  uikitUtil.toFloat(uikitUtil.css(el.lastElementChild, 'marginBottom')) :
174
193
  0;
175
- const currentHeight = uikitUtil.isVisible(el) ? uikitUtil.height(el) + (inProgress ? 0 : inner) : 0;
194
+ const currentHeight = uikitUtil.isVisible(el) ? uikitUtil.toFloat(uikitUtil.css(el, 'height')) + inner : 0;
195
+
196
+ const props = inProgress ? uikitUtil.css(el, Object.keys(initProps)) : show ? hideProps : initProps;
176
197
 
177
198
  uikitUtil.Transition.cancel(el);
178
199
 
@@ -180,34 +201,97 @@
180
201
  _toggle(el, true);
181
202
  }
182
203
 
183
- uikitUtil.height(el, '');
204
+ uikitUtil.css(el, 'maxHeight', '');
184
205
 
185
206
  // Update child components first
186
207
  uikitUtil.fastdom.flush();
187
208
 
188
- const endHeight = uikitUtil.height(el) + (inProgress ? 0 : inner);
189
- duration = velocity * el.offsetHeight + duration;
209
+ const endHeight = uikitUtil.toFloat(uikitUtil.css(el, 'height')) + inner;
210
+ duration = velocity * endHeight + duration;
190
211
 
191
- uikitUtil.height(el, currentHeight);
212
+ uikitUtil.css(el, { ...props, maxHeight: currentHeight });
192
213
 
193
214
  return (
194
215
  show ?
195
216
  uikitUtil.Transition.start(
196
217
  el,
197
- { ...initProps, overflow: 'hidden', height: endHeight },
198
- Math.round(duration * (1 - currentHeight / endHeight)),
218
+ { ...initProps, overflow: 'hidden', maxHeight: endHeight },
219
+ duration * (1 - currentHeight / endHeight),
199
220
  transition) :
200
221
 
201
222
  uikitUtil.Transition.start(
202
223
  el,
203
224
  hideProps,
204
- Math.round(duration * (currentHeight / endHeight)),
225
+ duration * (currentHeight / endHeight),
205
226
  transition).
206
227
  then(() => _toggle(el, false))).
207
228
  then(() => uikitUtil.css(el, initProps));
208
229
  };
209
230
  }
210
231
 
232
+ function slideHorizontal(_ref5, right) {let { isToggled, duration, velocity, transition, _toggle } = _ref5;
233
+ return (el, show) => {
234
+ const visible = uikitUtil.isVisible(el);
235
+ const marginLeft = uikitUtil.toFloat(uikitUtil.css(el, 'marginLeft'));
236
+
237
+ uikitUtil.Transition.cancel(el);
238
+
239
+ const [scrollElement] = uikitUtil.scrollParents(el);
240
+ uikitUtil.css(scrollElement, 'overflowX', 'hidden');
241
+
242
+ if (!isToggled(el)) {
243
+ _toggle(el, true);
244
+ }
245
+
246
+ const width = uikitUtil.toFloat(uikitUtil.css(el, 'width'));
247
+ duration = velocity * width + duration;
248
+
249
+ const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
250
+ const offsetEl = uikitUtil.offset(el);
251
+ const useClipPath = right ?
252
+ offsetEl.right < scrollElement.clientWidth :
253
+ Math.round(offsetEl.left) > 0;
254
+
255
+ uikitUtil.css(el, {
256
+ clipPath: useClipPath ?
257
+ right ? "polygon(0 0," +
258
+ percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
259
+ 100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)" :
260
+ '',
261
+ marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
262
+
263
+
264
+ return (
265
+ show ?
266
+ uikitUtil.Transition.start(
267
+ el,
268
+ {
269
+ clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
270
+ marginLeft: 0 },
271
+
272
+ duration * (1 - percent / 100),
273
+ transition) :
274
+
275
+ uikitUtil.Transition.start(
276
+ el,
277
+ {
278
+ clipPath: useClipPath ?
279
+ right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
280
+
281
+
282
+ '',
283
+ marginLeft: (right ? 1 : -1) * width },
284
+
285
+ duration * (percent / 100),
286
+ transition).
287
+ then(() => _toggle(el, false))).
288
+ then(() => {
289
+ uikitUtil.css(scrollElement, 'overflowX', '');
290
+ uikitUtil.css(el, { clipPath: '', marginLeft: '' });
291
+ });
292
+ };
293
+ }
294
+
211
295
  function toggleAnimation(cmp) {
212
296
  return (el, show) => {
213
297
  uikitUtil.Animation.cancel(el);
@@ -240,33 +324,17 @@
240
324
 
241
325
  connected() {
242
326
  this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
243
- this.axis = uikitUtil.includes(['top', 'bottom'], this.pos[0]) ? 'y' : 'x';
327
+ [this.dir, this.align] = this.pos;
328
+ this.axis = uikitUtil.includes(['top', 'bottom'], this.dir) ? 'y' : 'x';
244
329
  },
245
330
 
246
331
  methods: {
247
332
  positionAt(element, target, boundary) {
248
- const [dir, align] = this.pos;
249
-
250
- const mainAxisOffset =
251
- uikitUtil.toPx(
252
- this.offset === false ? uikitUtil.getCssVar('position-offset', element) : this.offset,
253
- this.axis === 'x' ? 'width' : 'height',
254
- element) * (
255
- uikitUtil.includes(['left', 'top'], dir) ? -1 : 1);
256
-
257
- const crossAxisOffset = uikitUtil.includes(['center', 'justify'], align) ?
258
- 0 :
259
- uikitUtil.toPx(
260
- uikitUtil.getCssVar('position-shift-offset', element),
261
- this.axis === 'y' ? 'width' : 'height',
262
- element) * (
263
- uikitUtil.includes(['left', 'top'], align) ? 1 : -1);
264
-
265
- let offset = [mainAxisOffset, crossAxisOffset];
333
+ let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
266
334
 
267
335
  const attach = {
268
- element: [uikitUtil.flipPosition(dir), align],
269
- target: [dir, align] };
336
+ element: [uikitUtil.flipPosition(this.dir), this.align],
337
+ target: [this.dir, this.align] };
270
338
 
271
339
 
272
340
  if (this.axis === 'y') {
@@ -276,13 +344,41 @@
276
344
  offset = offset.reverse();
277
345
  }
278
346
 
347
+ // Ensure none positioned element does not generate scrollbars
348
+ const elDim = uikitUtil.dimensions(element);
349
+ uikitUtil.css(element, { top: -elDim.height, left: -elDim.width });
350
+
279
351
  uikitUtil.positionAt(element, target, {
280
352
  attach,
281
353
  offset,
282
354
  boundary,
283
355
  flip: this.flip,
284
- viewportOffset: uikitUtil.toPx(uikitUtil.getCssVar('position-viewport-offset', element)) });
356
+ viewportOffset: this.getViewportOffset(element) });
357
+
358
+ },
359
+
360
+ getPositionOffset(element) {
361
+ return (
362
+ uikitUtil.toPx(
363
+ this.offset === false ? uikitUtil.getCssVar('position-offset', element) : this.offset,
364
+ this.axis === 'x' ? 'width' : 'height',
365
+ element) * (
366
+ uikitUtil.includes(['left', 'top'], this.dir) ? -1 : 1));
367
+
368
+ },
369
+
370
+ getShiftOffset(element) {
371
+ return uikitUtil.includes(['center', 'justify', 'stretch'], this.align) ?
372
+ 0 :
373
+ uikitUtil.toPx(
374
+ uikitUtil.getCssVar('position-shift-offset', element),
375
+ this.axis === 'y' ? 'width' : 'height',
376
+ element) * (
377
+ uikitUtil.includes(['left', 'top'], this.align) ? 1 : -1);
378
+ },
285
379
 
380
+ getViewportOffset(element) {
381
+ return uikitUtil.toPx(uikitUtil.getCssVar('position-viewport-offset', element));
286
382
  } } };
287
383
 
288
384
  var Component = {
@@ -1 +1 @@
1
- /*! UIkit 3.14.2-dev.f917389f5 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,c){typeof exports=="object"&&typeof module<"u"?module.exports=c(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],c):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitTooltip=c(s.UIkit.util))})(this,function(s){"use strict";var c={props:{container:Boolean},data:{container:!0},computed:{container(o){let{container:t}=o;return t===!0&&this.$container||t&&s.$(t)}}},T={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:"",boxShadow:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0,boxShadow:"none"}},computed:{hasAnimation(o){let{animation:t}=o;return!!t[0]},hasTransition(o){let{animation:t}=o;return this.hasAnimation&&t[0]===!0}},methods:{toggleElement(o,t,r){return new Promise(a=>Promise.all(s.toNodes(o).map(n=>{const i=s.isBoolean(t)?t:!this.isToggled(n);if(!s.trigger(n,"before"+(i?"show":"hide"),[this]))return Promise.reject();r||(s.Animation.cancel(n),s.Transition.cancel(n));const d=(s.isFunction(r)?r:r===!1||!this.hasAnimation?this._toggle:this.hasTransition?u(this):v(this))(n,i),h=i?this.clsEnter:this.clsLeave;s.addClass(n,h),s.trigger(n,i?"show":"hide",[this]);const e=()=>{s.removeClass(n,h),s.trigger(n,i?"shown":"hidden",[this]),this.$update(n)};return d?d.then(e,()=>(s.removeClass(n,h),Promise.reject())):e()})).then(a,s.noop))},isToggled(o){return o===void 0&&(o=this.$el),[o]=s.toNodes(o),s.hasClass(o,this.clsEnter)?!0:s.hasClass(o,this.clsLeave)?!1:this.cls?s.hasClass(o,this.cls.split(" ")[0]):s.isVisible(o)},_toggle(o,t){if(!o)return;t=Boolean(t);let r;this.cls?(r=s.includes(this.cls," ")||t!==s.hasClass(o,this.cls),r&&s.toggleClass(o,this.cls,s.includes(this.cls," ")?void 0:t)):(r=t===o.hidden,r&&(o.hidden=!t)),s.$$("[autofocus]",o).some(a=>s.isVisible(a)?a.focus()||!0:a.blur()),r&&(s.trigger(o,"toggled",[t,this]),this.$update(o))}}};function u(o){let{isToggled:t,duration:r,velocity:a,initProps:n,hideProps:i,transition:d,_toggle:h}=o;return(e,f)=>{const l=s.Transition.inProgress(e),w=e.hasChildNodes()?s.toFloat(s.css(e.firstElementChild,"marginTop"))+s.toFloat(s.css(e.lastElementChild,"marginBottom")):0,p=s.isVisible(e)?s.height(e)+(l?0:w):0;s.Transition.cancel(e),t(e)||h(e,!0),s.height(e,""),s.fastdom.flush();const g=s.height(e)+(l?0:w);return r=a*e.offsetHeight+r,s.height(e,p),(f?s.Transition.start(e,{...n,overflow:"hidden",height:g},Math.round(r*(1-p/g)),d):s.Transition.start(e,i,Math.round(r*(p/g)),d).then(()=>h(e,!1))).then(()=>s.css(e,n))}}function v(o){return(t,r)=>{s.Animation.cancel(t);const{animation:a,duration:n,_toggle:i}=o;return r?(i(t,!0),s.Animation.in(t,a[0],n,o.origin)):s.Animation.out(t,a[1]||a[0],n,o.origin).then(()=>i(t,!1))}}var b={props:{pos:String,offset:null,flip:Boolean},data:{pos:"bottom-"+(s.isRtl?"right":"left"),flip:!0,offset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),this.axis=s.includes(["top","bottom"],this.pos[0])?"y":"x"},methods:{positionAt(o,t,r){const[a,n]=this.pos,i=s.toPx(this.offset===!1?s.getCssVar("position-offset",o):this.offset,this.axis==="x"?"width":"height",o)*(s.includes(["left","top"],a)?-1:1),d=s.includes(["center","justify"],n)?0:s.toPx(s.getCssVar("position-shift-offset",o),this.axis==="y"?"width":"height",o)*(s.includes(["left","top"],n)?1:-1);let h=[i,d];const e={element:[s.flipPosition(a),n],target:[a,n]};if(this.axis==="y"){for(const f in e)e[f]=e[f].reverse();h=h.reverse()}s.positionAt(o,t,{attach:e,offset:h,boundary:r,flip:this.flip,viewportOffset:s.toPx(s.getCssVar("position-viewport-offset",o))})}}},m={mixins:[c,T,b],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},beforeConnect(){this._hasTitle=s.hasAttr(this.$el,"title"),s.attr(this.$el,"title",""),this.updateAria(!1),y(this.$el)},disconnected(){this.hide(),s.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(this._unbind=s.once(document,"show keydown "+s.pointerDown,this.hide,!1,o=>o.type===s.pointerDown&&!s.within(o.target,this.$el)||o.type==="keydown"&&o.keyCode===27||o.type==="show"&&o.detail[0]!==this&&o.detail[0].$name===this.$name),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){s.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&(await this.toggleElement(this.tooltip,!1,!1),s.remove(this.tooltip),this.tooltip=null,this._unbind()))},_show(){this.tooltip=s.append(this.container,'<div class="uk-'+this.$options.name+'"> <div class="uk-'+this.$options.name+'-inner">'+this.title+"</div> </div>"),s.on(this.tooltip,"toggled",(o,t)=>{if(this.updateAria(t),!t)return;this.positionAt(this.tooltip,this.$el);const[r,a]=$(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?s.flipPosition(r)+"-"+a:a+"-"+s.flipPosition(r)}),this.toggleElement(this.tooltip,!0)},updateAria(o){s.attr(this.$el,"aria-expanded",o)}},events:{focus:"show",blur:"hide",[s.pointerEnter+" "+s.pointerLeave](o){s.isTouch(o)||this[o.type===s.pointerEnter?"show":"hide"]()},[s.pointerDown](o){s.isTouch(o)&&this.show()}}};function y(o){s.isFocusable(o)||s.attr(o,"tabindex","0")}function $(o,t,r){let[a,n]=r;const i=s.offset(o),d=s.offset(t),h=[["left","right"],["top","bottom"]];for(const f of h){if(i[f[0]]>=d[f[1]]){a=f[1];break}if(i[f[1]]<=d[f[0]]){a=f[0];break}}const e=s.includes(h[0],a)?h[1]:h[0];return i[e[0]]===d[e[0]]?n=e[0]:i[e[1]]===d[e[1]]?n=e[1]:n="center",[a,n]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",m),m});
1
+ /*! UIkit 3.14.3-dev.68d38eb6d | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],l):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitTooltip=l(s.UIkit.util))})(this,function(s){"use strict";var l={props:{container:Boolean},data:{container:!0},computed:{container(o){let{container:t}=o;return t===!0&&this.$container||t&&s.$(t)}}},b={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",maxHeight:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:"",boxShadow:""},hideProps:{overflow:"hidden",maxHeight:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0,boxShadow:"none"}},computed:{hasAnimation(o){let{animation:t}=o;return!!t[0]},hasTransition(o){let{animation:t}=o;return s.startsWith(t[0],"slide")}},methods:{toggleElement(o,t,e){return new Promise(r=>Promise.all(s.toNodes(o).map(n=>{const i=s.isBoolean(t)?t:!this.isToggled(n);if(!s.trigger(n,"before"+(i?"show":"hide"),[this]))return Promise.reject();e||(s.Animation.cancel(n),s.Transition.cancel(n));const c=(s.isFunction(e)?e:e===!1||!this.hasAnimation?P(this):this.hasTransition?u(this):$(this))(n,i),h=i?this.clsEnter:this.clsLeave;s.addClass(n,h),s.trigger(n,i?"show":"hide",[this]);const a=()=>{s.removeClass(n,h),s.trigger(n,i?"shown":"hidden",[this]),this.$update(n)};return c?c.then(a,()=>(s.removeClass(n,h),Promise.reject())):a()})).then(r,s.noop))},isToggled(o){return o===void 0&&(o=this.$el),[o]=s.toNodes(o),s.hasClass(o,this.clsEnter)?!0:s.hasClass(o,this.clsLeave)?!1:this.cls?s.hasClass(o,this.cls.split(" ")[0]):s.isVisible(o)},_toggle(o,t){if(!o)return;t=Boolean(t);let e;this.cls?(e=s.includes(this.cls," ")||t!==s.hasClass(o,this.cls),e&&s.toggleClass(o,this.cls,s.includes(this.cls," ")?void 0:t)):(e=t===o.hidden,e&&(o.hidden=!t)),s.$$("[autofocus]",o).some(r=>s.isVisible(r)?r.focus()||!0:r.blur()),e&&(s.trigger(o,"toggled",[t,this]),this.$update(o))}}};function P(o){let{_toggle:t}=o;return(e,r)=>(s.Animation.cancel(e),s.Transition.cancel(e),t(e,r))}function u(o){switch(o.animation[0]){case"slide-left":return v(o);case"slide-right":return v(o,!0)}return x(o)}function x(o){let{isToggled:t,duration:e,velocity:r,initProps:n,hideProps:i,transition:c,_toggle:h}=o;return(a,f)=>{const w=s.Transition.inProgress(a),m=!w&&a.hasChildNodes()?s.toFloat(s.css(a.firstElementChild,"marginTop"))+s.toFloat(s.css(a.lastElementChild,"marginBottom")):0,d=s.isVisible(a)?s.toFloat(s.css(a,"height"))+m:0,p=w?s.css(a,Object.keys(n)):f?i:n;s.Transition.cancel(a),t(a)||h(a,!0),s.css(a,"maxHeight",""),s.fastdom.flush();const g=s.toFloat(s.css(a,"height"))+m;return e=r*g+e,s.css(a,{...p,maxHeight:d}),(f?s.Transition.start(a,{...n,overflow:"hidden",maxHeight:g},e*(1-d/g),c):s.Transition.start(a,i,e*(d/g),c).then(()=>h(a,!1))).then(()=>s.css(a,n))}}function v(o,t){let{isToggled:e,duration:r,velocity:n,transition:i,_toggle:c}=o;return(h,a)=>{const f=s.isVisible(h),w=s.toFloat(s.css(h,"marginLeft"));s.Transition.cancel(h);const[m]=s.scrollParents(h);s.css(m,"overflowX","hidden"),e(h)||c(h,!0);const d=s.toFloat(s.css(h,"width"));r=n*d+r;const p=f?(d+w*(t?-1:1))/d*100:0,g=s.offset(h),T=t?g.right<m.clientWidth:Math.round(g.left)>0;return s.css(h,{clipPath:T?t?"polygon(0 0,"+p+"% 0,"+p+"% 100%,0 100%)":"polygon("+(100-p)+"% 0,100% 0,100% 100%,"+(100-p)+"% 100%)":"",marginLeft:(100-p)*(t?1:-1)/100*d}),(a?s.Transition.start(h,{clipPath:T?"polygon(0 0,100% 0,100% 100%,0 100%)":"",marginLeft:0},r*(1-p/100),i):s.Transition.start(h,{clipPath:T?t?"polygon(0 0,0 0,0 100%,0 100%)":"polygon(100% 0,100% 0,100% 100%,100% 100%)":"",marginLeft:(t?1:-1)*d},r*(p/100),i).then(()=>c(h,!1))).then(()=>{s.css(m,"overflowX",""),s.css(h,{clipPath:"",marginLeft:""})})}}function $(o){return(t,e)=>{s.Animation.cancel(t);const{animation:r,duration:n,_toggle:i}=o;return e?(i(t,!0),s.Animation.in(t,r[0],n,o.origin)):s.Animation.out(t,r[1]||r[0],n,o.origin).then(()=>i(t,!1))}}var C={props:{pos:String,offset:null,flip:Boolean},data:{pos:"bottom-"+(s.isRtl?"right":"left"),flip:!0,offset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),[this.dir,this.align]=this.pos,this.axis=s.includes(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(o,t,e){let r=[this.getPositionOffset(o),this.getShiftOffset(o)];const n={element:[s.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const c in n)n[c]=n[c].reverse();r=r.reverse()}const i=s.dimensions(o);s.css(o,{top:-i.height,left:-i.width}),s.positionAt(o,t,{attach:n,offset:r,boundary:e,flip:this.flip,viewportOffset:this.getViewportOffset(o)})},getPositionOffset(o){return s.toPx(this.offset===!1?s.getCssVar("position-offset",o):this.offset,this.axis==="x"?"width":"height",o)*(s.includes(["left","top"],this.dir)?-1:1)},getShiftOffset(o){return s.includes(["center","justify","stretch"],this.align)?0:s.toPx(s.getCssVar("position-shift-offset",o),this.axis==="y"?"width":"height",o)*(s.includes(["left","top"],this.align)?1:-1)},getViewportOffset(o){return s.toPx(s.getCssVar("position-viewport-offset",o))}}},y={mixins:[l,b,C],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},beforeConnect(){this._hasTitle=s.hasAttr(this.$el,"title"),s.attr(this.$el,"title",""),this.updateAria(!1),A(this.$el)},disconnected(){this.hide(),s.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(this._unbind=s.once(document,"show keydown "+s.pointerDown,this.hide,!1,o=>o.type===s.pointerDown&&!s.within(o.target,this.$el)||o.type==="keydown"&&o.keyCode===27||o.type==="show"&&o.detail[0]!==this&&o.detail[0].$name===this.$name),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){s.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&(await this.toggleElement(this.tooltip,!1,!1),s.remove(this.tooltip),this.tooltip=null,this._unbind()))},_show(){this.tooltip=s.append(this.container,'<div class="uk-'+this.$options.name+'"> <div class="uk-'+this.$options.name+'-inner">'+this.title+"</div> </div>"),s.on(this.tooltip,"toggled",(o,t)=>{if(this.updateAria(t),!t)return;this.positionAt(this.tooltip,this.$el);const[e,r]=E(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?s.flipPosition(e)+"-"+r:r+"-"+s.flipPosition(e)}),this.toggleElement(this.tooltip,!0)},updateAria(o){s.attr(this.$el,"aria-expanded",o)}},events:{focus:"show",blur:"hide",[s.pointerEnter+" "+s.pointerLeave](o){s.isTouch(o)||this[o.type===s.pointerEnter?"show":"hide"]()},[s.pointerDown](o){s.isTouch(o)&&this.show()}}};function A(o){s.isFocusable(o)||s.attr(o,"tabindex","0")}function E(o,t,e){let[r,n]=e;const i=s.offset(o),c=s.offset(t),h=[["left","right"],["top","bottom"]];for(const f of h){if(i[f[0]]>=c[f[1]]){r=f[1];break}if(i[f[1]]<=c[f[0]]){r=f[0];break}}const a=s.includes(h[0],r)?h[1]:h[0];return i[a[0]]===c[a[0]]?n=a[0]:i[a[1]]===c[a[1]]?n=a[1]:n="center",[r,n]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",y),y});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.2-dev.f917389f5 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.3-dev.68d38eb6d | 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')) :
@@ -1 +1 @@
1
- /*! UIkit 3.14.2-dev.f917389f5 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(o,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],n):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitUpload=n(o.UIkit.util))})(this,function(o){"use strict";var n={props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,msgInvalidMime:String,msgInvalidName:String,msgInvalidSize:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,msgInvalidMime:"Invalid File Type: %s",msgInvalidName:"Invalid File Name: %s",msgInvalidSize:"Invalid File Size: %s Kilobytes Max",multiple:!1,name:"files[]",params:{},type:"",url:"",abort:o.noop,beforeAll:o.noop,beforeSend:o.noop,complete:o.noop,completeAll:o.noop,error:o.noop,fail:o.noop,load:o.noop,loadEnd:o.noop,loadStart:o.noop,progress:o.noop},events:{change(e){!o.matches(e.target,'input[type="file"]')||(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop(e){i(e);const t=e.dataTransfer;!(t!=null&&t.files)||(o.removeClass(this.$el,this.clsDragover),this.upload(t.files))},dragenter(e){i(e)},dragover(e){i(e),o.addClass(this.$el,this.clsDragover)},dragleave(e){i(e),o.removeClass(this.$el,this.clsDragover)}},methods:{async upload(e){if(e=o.toArray(e),!e.length)return;o.trigger(this.$el,"upload",[e]);for(const a of e){if(this.maxSize&&this.maxSize*1e3<a.size){this.fail(this.msgInvalidSize.replace("%s",this.maxSize));return}if(this.allow&&!d(this.allow,a.name)){this.fail(this.msgInvalidName.replace("%s",this.allow));return}if(this.mime&&!d(this.mime,a.type)){this.fail(this.msgInvalidMime.replace("%s",this.mime));return}}this.multiple||(e=e.slice(0,1)),this.beforeAll(this,e);const t=c(e,this.concurrent),s=async a=>{const l=new FormData;a.forEach(r=>l.append(this.name,r));for(const r in this.params)l.append(r,this.params[r]);try{const r=await o.ajax(this.url,{data:l,method:this.method,responseType:this.type,beforeSend:h=>{const{xhr:p}=h;p.upload&&o.on(p.upload,"progress",this.progress);for(const m of["loadStart","load","loadEnd","abort"])o.on(p,m.toLowerCase(),this[m]);return this.beforeSend(h)}});this.complete(r),t.length?await s(t.shift()):this.completeAll(r)}catch(r){this.error(r)}};await s(t.shift())}}};function d(e,t){return t.match(new RegExp("^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function c(e,t){const s=[];for(let a=0;a<e.length;a+=t)s.push(e.slice(a,a+t));return s}function i(e){e.preventDefault(),e.stopPropagation()}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",n),n});
1
+ /*! UIkit 3.14.3-dev.68d38eb6d | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(o,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],n):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitUpload=n(o.UIkit.util))})(this,function(o){"use strict";var n={props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,msgInvalidMime:String,msgInvalidName:String,msgInvalidSize:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,msgInvalidMime:"Invalid File Type: %s",msgInvalidName:"Invalid File Name: %s",msgInvalidSize:"Invalid File Size: %s Kilobytes Max",multiple:!1,name:"files[]",params:{},type:"",url:"",abort:o.noop,beforeAll:o.noop,beforeSend:o.noop,complete:o.noop,completeAll:o.noop,error:o.noop,fail:o.noop,load:o.noop,loadEnd:o.noop,loadStart:o.noop,progress:o.noop},events:{change(e){!o.matches(e.target,'input[type="file"]')||(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop(e){i(e);const t=e.dataTransfer;!(t!=null&&t.files)||(o.removeClass(this.$el,this.clsDragover),this.upload(t.files))},dragenter(e){i(e)},dragover(e){i(e),o.addClass(this.$el,this.clsDragover)},dragleave(e){i(e),o.removeClass(this.$el,this.clsDragover)}},methods:{async upload(e){if(e=o.toArray(e),!e.length)return;o.trigger(this.$el,"upload",[e]);for(const a of e){if(this.maxSize&&this.maxSize*1e3<a.size){this.fail(this.msgInvalidSize.replace("%s",this.maxSize));return}if(this.allow&&!d(this.allow,a.name)){this.fail(this.msgInvalidName.replace("%s",this.allow));return}if(this.mime&&!d(this.mime,a.type)){this.fail(this.msgInvalidMime.replace("%s",this.mime));return}}this.multiple||(e=e.slice(0,1)),this.beforeAll(this,e);const t=c(e,this.concurrent),s=async a=>{const l=new FormData;a.forEach(r=>l.append(this.name,r));for(const r in this.params)l.append(r,this.params[r]);try{const r=await o.ajax(this.url,{data:l,method:this.method,responseType:this.type,beforeSend:h=>{const{xhr:p}=h;p.upload&&o.on(p.upload,"progress",this.progress);for(const m of["loadStart","load","loadEnd","abort"])o.on(p,m.toLowerCase(),this[m]);return this.beforeSend(h)}});this.complete(r),t.length?await s(t.shift()):this.completeAll(r)}catch(r){this.error(r)}};await s(t.shift())}}};function d(e,t){return t.match(new RegExp("^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function c(e,t){const s=[];for(let a=0;a<e.length;a+=t)s.push(e.slice(a,a+t));return s}function i(e){e.preventDefault(),e.stopPropagation()}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",n),n});