fomantic-ui 2.9.3-beta.5 → 2.9.3-beta.51
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.
- package/.all-contributorsrc +2 -2
- package/.github/FUNDING.yml +1 -1
- package/.github/auto_assign.yml +1 -1
- package/.github/workflows/ci.yml +2 -2
- package/CONTRIBUTORS.md +1 -1
- package/README.md +5 -2
- package/SECURITY.md +2 -1
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +2 -2
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +3 -3
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +2 -2
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +2 -2
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +50 -6
- package/dist/components/checkbox.js +5 -3
- package/dist/components/checkbox.min.css +2 -2
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +6 -1
- package/dist/components/comment.min.css +2 -2
- package/dist/components/container.css +62 -1
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +3 -3
- package/dist/components/dimmer.js +2 -2
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +24 -3
- package/dist/components/dropdown.js +29 -21
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +2 -2
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +697 -249
- package/dist/components/emoji.min.css +2 -2
- package/dist/components/feed.css +486 -5
- package/dist/components/feed.min.css +2 -2
- package/dist/components/flag.css +3 -2
- package/dist/components/flag.min.css +2 -2
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +5 -3
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +53 -20
- package/dist/components/form.js +73 -32
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +107 -107
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +62 -62
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +3 -27
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +6 -1
- package/dist/components/item.min.css +2 -2
- package/dist/components/label.css +21 -2
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +13 -13
- package/dist/components/list.min.css +2 -2
- package/dist/components/loader.css +282 -282
- package/dist/components/loader.min.css +2 -2
- package/dist/components/menu.css +13 -7
- package/dist/components/menu.min.css +2 -2
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +10 -3
- package/dist/components/modal.js +10 -10
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +3 -3
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +41 -40
- package/dist/components/popup.js +11 -9
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +2 -2
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +2 -2
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +26 -1
- package/dist/components/search.js +5 -4
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +159 -33
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +2 -2
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +2 -2
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +2 -2
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +123 -27
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +2 -2
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +2 -2
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +6 -4
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +65 -1
- package/dist/components/table.min.css +2 -2
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +6 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toast.min.css +2 -2
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +3 -3
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +2 -2
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +2635 -959
- package/dist/semantic.js +303 -149
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +3 -2
- package/src/definitions/behaviors/api.js +2 -2
- package/src/definitions/behaviors/form.js +72 -31
- package/src/definitions/behaviors/state.js +1 -1
- package/src/definitions/behaviors/visibility.js +1 -1
- package/src/definitions/collections/form.less +25 -12
- package/src/definitions/collections/grid.less +106 -106
- package/src/definitions/collections/menu.less +29 -22
- package/src/definitions/collections/table.less +66 -0
- package/src/definitions/elements/button.less +1 -1
- package/src/definitions/elements/container.less +63 -0
- package/src/definitions/elements/icon.less +5 -5
- package/src/definitions/elements/input.less +2 -2
- package/src/definitions/elements/label.less +21 -1
- package/src/definitions/elements/list.less +13 -13
- package/src/definitions/elements/loader.less +71 -71
- package/src/definitions/elements/segment.less +110 -13
- package/src/definitions/globals/site.js +1 -1
- package/src/definitions/modules/accordion.js +1 -1
- package/src/definitions/modules/calendar.js +1 -1
- package/src/definitions/modules/checkbox.js +4 -2
- package/src/definitions/modules/checkbox.less +61 -5
- package/src/definitions/modules/dimmer.js +1 -1
- package/src/definitions/modules/dimmer.less +2 -2
- package/src/definitions/modules/dropdown.js +28 -20
- package/src/definitions/modules/dropdown.less +33 -2
- package/src/definitions/modules/embed.js +1 -1
- package/src/definitions/modules/flyout.js +4 -2
- package/src/definitions/modules/modal.js +9 -9
- package/src/definitions/modules/modal.less +11 -2
- package/src/definitions/modules/nag.js +2 -2
- package/src/definitions/modules/popup.js +10 -8
- package/src/definitions/modules/popup.less +40 -38
- package/src/definitions/modules/progress.js +1 -1
- package/src/definitions/modules/rating.js +1 -1
- package/src/definitions/modules/search.js +4 -3
- package/src/definitions/modules/search.less +31 -0
- package/src/definitions/modules/shape.js +1 -1
- package/src/definitions/modules/sidebar.js +1 -1
- package/src/definitions/modules/slider.js +122 -26
- package/src/definitions/modules/sticky.js +1 -1
- package/src/definitions/modules/tab.js +5 -3
- package/src/definitions/modules/toast.js +1 -1
- package/src/definitions/modules/toast.less +7 -0
- package/src/definitions/modules/transition.js +2 -2
- package/src/definitions/views/comment.less +7 -0
- package/src/definitions/views/feed.less +238 -32
- package/src/definitions/views/item.less +7 -0
- package/src/themes/amazon/elements/button.variables +5 -1
- package/src/themes/bootstrap3/elements/button.variables +5 -1
- package/src/themes/chubby/elements/header.variables +6 -1
- package/src/themes/default/collections/message.variables +3 -9
- package/src/themes/default/collections/table.variables +3 -0
- package/src/themes/default/elements/button.variables +1 -3
- package/src/themes/default/elements/container.variables +3 -0
- package/src/themes/default/elements/emoji.variables +179 -67
- package/src/themes/default/elements/flag.variables +1 -1
- package/src/themes/default/elements/label.variables +5 -0
- package/src/themes/default/elements/segment.variables +8 -0
- package/src/themes/default/globals/site.variables +20 -1
- package/src/themes/default/globals/variation.variables +23 -1
- package/src/themes/default/modules/checkbox.variables +12 -0
- package/src/themes/default/modules/dropdown.variables +3 -0
- package/src/themes/default/modules/modal.variables +4 -0
- package/src/themes/default/modules/popup.variables +3 -1
- package/src/themes/default/modules/search.variables +3 -0
- package/src/themes/default/modules/toast.variables +1 -0
- package/src/themes/default/views/card.variables +4 -12
- package/src/themes/default/views/feed.variables +55 -1
- package/src/themes/github/elements/button.variables +5 -1
- package/src/themes/joypixels/elements/emoji.variables +182 -70
- package/src/themes/twitter/elements/button.variables +5 -1
- package/src/themes/twitter/elements/emoji.variables +178 -66
- package/tasks/admin/distributions/create.js +8 -3
- package/tasks/config/project/install.js +3 -0
- package/tasks/config/tasks.js +1 -8
- package/tasks/install.js +15 -5
- package/types/fomantic-ui-accordion.d.ts +244 -0
- package/types/fomantic-ui-api.d.ts +555 -0
- package/types/fomantic-ui-calendar.d.ts +766 -0
- package/types/fomantic-ui-checkbox.d.ts +332 -0
- package/types/fomantic-ui-dimmer.d.ts +408 -0
- package/types/fomantic-ui-dropdown.d.ts +1183 -0
- package/types/fomantic-ui-embed.d.ts +326 -0
- package/types/fomantic-ui-flyout.d.ts +525 -0
- package/types/fomantic-ui-form.d.ts +651 -0
- package/types/fomantic-ui-modal.d.ts +471 -0
- package/types/fomantic-ui-nag.d.ts +270 -0
- package/types/fomantic-ui-popup.d.ts +523 -0
- package/types/fomantic-ui-progress.d.ts +459 -0
- package/types/fomantic-ui-rating.d.ts +187 -0
- package/types/fomantic-ui-search.d.ts +496 -0
- package/types/fomantic-ui-shape.d.ts +274 -0
- package/types/fomantic-ui-sidebar.d.ts +402 -0
- package/types/fomantic-ui-slider.d.ts +316 -0
- package/types/fomantic-ui-sticky.d.ts +215 -0
- package/types/fomantic-ui-tab.d.ts +361 -0
- package/types/fomantic-ui-tests.ts +25 -0
- package/types/fomantic-ui-toast.d.ts +514 -0
- package/types/fomantic-ui-transition.d.ts +355 -0
- package/types/fomantic-ui-visibility.d.ts +355 -0
- package/types/index.d.ts +63 -0
- package/types/tsconfig.json +23 -0
- package/types/tslint.json +1 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.3-beta.
|
2
|
+
* # Fomantic UI - 2.9.3-beta.51+7371284
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(W,e,Y){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,W.fn.shape=function(m){var v,b=W(this),x=Date.now(),y=[],C=m,S="string"==typeof C,w=[].slice.call(arguments,1);return b.each(function(){var i,n,a=W.isPlainObject(m)?W.extend(!0,{},W.fn.shape.settings,m):W.extend({},W.fn.shape.settings),e=a.namespace,r=a.selector,d=a.error,s=a.className,t="."+e,o="module-"+e,l=W(this),c=l.find(">"+r.sides),u=c.find(">"+r.side),f=!1,g=this,h=l.data(o),p={initialize:function(){p.verbose("Initializing module for",g),p.set.defaultSide(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),h=p,l.data(o,h)},destroy:function(){p.verbose("Destroying previous module for",g),l.removeData(o).off(t)},refresh:function(){p.verbose("Refreshing selector cache for",g),l=W(g),c=W(this).find(r.sides),u=W(this).find(r.side)},repaint:function(){p.verbose("Forcing repaint event");(c[0]||Y.createElement("div")).offsetWidth},animate:function(e,t){p.verbose("Animating box with properties",e),t=t||function(e){p.verbose("Executing animation callback"),void 0!==e&&e.stopPropagation(),p.reset(),p.set.active()},a.onBeforeChange.call(n[0]),p.verbose("Starting CSS animation"),l.addClass(s.animating),c.css(e).one("transitionend",t),p.set.duration(a.duration),requestAnimationFrame(function(){l.addClass(s.animating),i.addClass(s.hidden)})},queue:function(e){p.debug("Queueing animation of",e),c.one("transitionend",function(){p.debug("Executing queued animation"),setTimeout(function(){l.shape(e)},0)})},reset:function(){p.verbose("Animating states reset"),l.removeClass(s.animating).attr("style","").removeAttr("style"),c.attr("style","").removeAttr("style"),u.attr("style","").removeAttr("style").removeClass(s.hidden),n.removeClass(s.animating).attr("style","").removeAttr("style")},is:{complete:function(){return u.filter("."+s.active)[0]===n[0]},animating:function(){return l.hasClass(s.animating)},hidden:function(){return 0<l.closest(":hidden").length}},set:{defaultSide:function(){i=u.filter("."+a.className.active),n=0<i.next(r.side).length?i.next(r.side):u.first(),f=!1,p.verbose("Active side set to",i),p.verbose("Next side set to",n)},duration:function(e){e=e||a.duration,p.verbose("Setting animation duration",e="number"==typeof e?e+"ms":e),!a.duration&&0!==a.duration||c.add(u).css({"transition-duration":e})},currentStageSize:function(){var e=u.filter("."+a.className.active),t=e.outerWidth(!0),e=e.outerHeight(!0);l.css({width:t,height:e})},stageSize:function(){var e=l.clone().addClass(s.loading),t=e.find(">"+r.sides+">"+r.side),i=t.filter("."+a.className.active),t=f?t.eq(f):0<i.next(r.side).length?i.next(r.side):t.first(),n="next"===a.width?t.outerWidth(!0):"initial"===a.width?l.width():a.width,o="next"===a.height?t.outerHeight(!0):"initial"===a.height?l.height():a.height;i.removeClass(s.active),t.addClass(s.active),e.insertAfter(l),e.remove(),"auto"!==a.width&&(l.css("width",n+a.jitter),p.verbose("Specifying width during animation",n)),"auto"!==a.height&&(l.css("height",o+a.jitter),p.verbose("Specifying height during animation",o))},nextSide:function(e){f=e,n=u.filter(e),f=u.index(n),0===n.length&&(p.set.defaultSide(),p.error(d.side)),p.verbose("Next side manually set to",n)},active:function(){p.verbose("Setting new side to active",n),u.removeClass(s.active),n.addClass(s.active),a.onChange.call(n[0]),p.set.defaultSide()}},flip:{to:function(e,t){var i;p.is.hidden()?p.debug("Module not visible",n):!p.is.complete()||p.is.animating()||a.allowRepeats?(i=p.get.transform[e](),p.is.animating()?p.queue("flip "+e):(p.debug("Flipping "+e,n),p.set.stageSize(),p.stage[t](),p.animate(i))):p.debug("Side already visible",n)},up:function(){p.flip.to("up","above")},down:function(){p.flip.to("down","below")},left:function(){p.flip.to("left","left")},right:function(){p.flip.to("right","right")},over:function(){p.flip.to("over","behind")},back:function(){p.flip.to("back","behind")}},get:{transform:{up:function(){var e=i.outerHeight(!0)/2;return{transform:"translateY("+(n.outerHeight(!0)-e)+"px) translateZ(-"+e+"px) rotateX(-90deg)"}},down:function(){var e=i.outerHeight(!0)/2;return{transform:"translateY(-"+e+"px) translateZ(-"+e+"px) rotateX(90deg)"}},left:function(){var e=i.outerWidth(!0)/2;return{transform:"translateX("+(n.outerWidth(!0)-e)+"px) translateZ(-"+e+"px) rotateY(90deg)"}},right:function(){var e=i.outerWidth(!0)/2;return{transform:"translateX(-"+e+"px) translateZ(-"+e+"px) rotateY(-90deg)"}},over:function(){return{transform:"translateX("+-(i.outerWidth(!0)-n.outerWidth(!0))/2+"px) rotateY(180deg)"}},back:function(){return{transform:"translateX("+-(i.outerWidth(!0)-n.outerWidth(!0))/2+"px) rotateY(-180deg)"}}},nextSide:function(){return 0<i.next(r.side).length?i.next(r.side):u.first()}},stage:{above:function(){var e={origin:(i.outerHeight(!0)-n.outerHeight(!0))/2,depth:{active:n.outerHeight(!0)/2,next:i.outerHeight(!0)/2}};p.verbose("Setting the initial animation position as above",n,e),i.css({transform:"rotateX(0deg)"}),n.addClass(s.animating).css({top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px) translateY(-"+e.depth.active+"px)"})},below:function(){var e={origin:(i.outerHeight(!0)-n.outerHeight(!0))/2,depth:{active:n.outerHeight(!0)/2,next:i.outerHeight(!0)/2}};p.verbose("Setting the initial animation position as below",n,e),i.css({transform:"rotateX(0deg)"}),n.addClass(s.animating).css({top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px) translateY("+e.depth.active+"px)"})},left:function(){var e=i.outerWidth(!0),t=n.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};p.verbose("Setting the initial animation position as left",n,t),i.css({transform:"rotateY(0deg)"}),n.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(-90deg) translateZ("+t.depth.next+"px) translateX(-"+t.depth.active+"px)"})},right:function(){var e=i.outerWidth(!0),t=n.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};p.verbose("Setting the initial animation position as right",n,t),i.css({transform:"rotateY(0deg)"}),n.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(90deg) translateZ("+t.depth.next+"px) translateX("+t.depth.active+"px)"})},behind:function(){var e=i.outerWidth(!0),t=n.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};p.verbose("Setting the initial animation position as behind",n,t),i.css({transform:"rotateY(0deg)"}),n.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(e,t){if(p.debug("Changing setting",e,t),W.isPlainObject(e))W.extend(!0,a,e);else{if(void 0===t)return a[e];W.isPlainObject(a[e])?W.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(W.isPlainObject(e))W.extend(!0,p,e);else{if(void 0===t)return p[e];p[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,a.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),p.verbose.apply(console,arguments)))},error:function(){a.silent||(p.error=Function.prototype.bind.call(console.error,console,a.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,i;a.performance&&(i=(t=Date.now())-(x||t),x=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":i})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=a.name+":",i=0;x=!1,clearTimeout(p.performance.timer),W.each(y,function(e,t){i+=t["Execution Time"]}),e+=" "+i+"ms",1<b.length&&(e+=" ("+b.length+")"),0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):W.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(n,e,t){var o,a,i,r,s=h;return e=e||w,t=t||g,"string"==typeof n&&void 0!==s&&(n=n.split(/[ .]/),o=n.length-1,W.each(n,function(e,t){var i=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(W.isPlainObject(s[i])&&e!==o)s=s[i];else{if(void 0!==s[i])return a=s[i],!1;{if(!W.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:p.error(d.method,n),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?i=a.apply(t,e):void 0!==a&&(i=a),Array.isArray(v)?v.push(i):void 0!==v?v=[v,i]:void 0!==i&&(v=i),a}};S?(void 0===h&&p.initialize(),0<(e=l.find("input")).length?(e.trigger("blur"),setTimeout(function(){p.invoke(C)},150)):p.invoke(C)):(void 0!==h&&h.invoke("destroy"),p.initialize())}),void 0!==v?v:this},W.fn.shape.settings={name:"Shape",silent:!1,debug:!1,verbose:!1,jitter:0,performance:!0,namespace:"shape",width:"initial",height:"initial",onBeforeChange:function(){},onChange:function(){},allowRepeats:!1,duration:!1,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document);
|
11
|
+
!function(W,e,Y){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,W.fn.shape=function(m){var v,b=W(this),x=Date.now(),y=[],C=m,S="string"==typeof C,w=[].slice.call(arguments,1);return b.each(function(){var i,n,a=W.isPlainObject(m)?W.extend(!0,{},W.fn.shape.settings,m):W.extend({},W.fn.shape.settings),e=a.namespace,r=a.selector,d=a.error,s=a.className,t="."+e,o="module-"+e,l=W(this),c=l.find(">"+r.sides),u=c.find(">"+r.side),f=!1,g=this,h=l.data(o),p={initialize:function(){p.verbose("Initializing module for",g),p.set.defaultSide(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),h=p,l.data(o,h)},destroy:function(){p.verbose("Destroying previous module for",g),l.removeData(o).off(t)},refresh:function(){p.verbose("Refreshing selector cache for",g),l=W(g),c=W(this).find(r.sides),u=W(this).find(r.side)},repaint:function(){p.verbose("Forcing repaint event");(c[0]||Y.createElement("div")).offsetWidth},animate:function(e,t){p.verbose("Animating box with properties",e),t=t||function(e){p.verbose("Executing animation callback"),void 0!==e&&e.stopPropagation(),p.reset(),p.set.active()},a.onBeforeChange.call(n[0]),p.verbose("Starting CSS animation"),l.addClass(s.animating),c.css(e).one("transitionend",t),p.set.duration(a.duration),requestAnimationFrame(function(){l.addClass(s.animating),i.addClass(s.hidden)})},queue:function(e){p.debug("Queueing animation of",e),c.one("transitionend",function(){p.debug("Executing queued animation"),setTimeout(function(){l.shape(e)},0)})},reset:function(){p.verbose("Animating states reset"),l.removeClass(s.animating).attr("style","").removeAttr("style"),c.attr("style","").removeAttr("style"),u.attr("style","").removeAttr("style").removeClass(s.hidden),n.removeClass(s.animating).attr("style","").removeAttr("style")},is:{complete:function(){return u.filter("."+s.active)[0]===n[0]},animating:function(){return l.hasClass(s.animating)},hidden:function(){return 0<l.closest(":hidden").length}},set:{defaultSide:function(){i=u.filter("."+a.className.active),n=0<i.next(r.side).length?i.next(r.side):u.first(),f=!1,p.verbose("Active side set to",i),p.verbose("Next side set to",n)},duration:function(e){e=e||a.duration,p.verbose("Setting animation duration",e="number"==typeof e?e+"ms":e),!a.duration&&0!==a.duration||c.add(u).css({"transition-duration":e})},currentStageSize:function(){var e=u.filter("."+a.className.active),t=e.outerWidth(!0),e=e.outerHeight(!0);l.css({width:t,height:e})},stageSize:function(){var e=l.clone().addClass(s.loading),t=e.find(">"+r.sides+">"+r.side),i=t.filter("."+a.className.active),t=f?t.eq(f):0<i.next(r.side).length?i.next(r.side):t.first(),n="next"===a.width?t.outerWidth(!0):"initial"===a.width?l.width():a.width,o="next"===a.height?t.outerHeight(!0):"initial"===a.height?l.height():a.height;i.removeClass(s.active),t.addClass(s.active),e.insertAfter(l),e.remove(),"auto"!==a.width&&(l.css("width",n+a.jitter),p.verbose("Specifying width during animation",n)),"auto"!==a.height&&(l.css("height",o+a.jitter),p.verbose("Specifying height during animation",o))},nextSide:function(e){f=e,n=u.filter(e),f=u.index(n),0===n.length&&(p.set.defaultSide(),p.error(d.side)),p.verbose("Next side manually set to",n)},active:function(){p.verbose("Setting new side to active",n),u.removeClass(s.active),n.addClass(s.active),a.onChange.call(n[0]),p.set.defaultSide()}},flip:{to:function(e,t){var i;p.is.hidden()?p.debug("Module not visible",n):!p.is.complete()||p.is.animating()||a.allowRepeats?(i=p.get.transform[e](),p.is.animating()?p.queue("flip "+e):(p.debug("Flipping "+e,n),p.set.stageSize(),p.stage[t](),p.animate(i))):p.debug("Side already visible",n)},up:function(){p.flip.to("up","above")},down:function(){p.flip.to("down","below")},left:function(){p.flip.to("left","left")},right:function(){p.flip.to("right","right")},over:function(){p.flip.to("over","behind")},back:function(){p.flip.to("back","behind")}},get:{transform:{up:function(){var e=i.outerHeight(!0)/2;return{transform:"translateY("+(n.outerHeight(!0)-e)+"px) translateZ(-"+e+"px) rotateX(-90deg)"}},down:function(){var e=i.outerHeight(!0)/2;return{transform:"translateY(-"+e+"px) translateZ(-"+e+"px) rotateX(90deg)"}},left:function(){var e=i.outerWidth(!0)/2;return{transform:"translateX("+(n.outerWidth(!0)-e)+"px) translateZ(-"+e+"px) rotateY(90deg)"}},right:function(){var e=i.outerWidth(!0)/2;return{transform:"translateX(-"+e+"px) translateZ(-"+e+"px) rotateY(-90deg)"}},over:function(){return{transform:"translateX("+-(i.outerWidth(!0)-n.outerWidth(!0))/2+"px) rotateY(180deg)"}},back:function(){return{transform:"translateX("+-(i.outerWidth(!0)-n.outerWidth(!0))/2+"px) rotateY(-180deg)"}}},nextSide:function(){return 0<i.next(r.side).length?i.next(r.side):u.first()}},stage:{above:function(){var e={origin:(i.outerHeight(!0)-n.outerHeight(!0))/2,depth:{active:n.outerHeight(!0)/2,next:i.outerHeight(!0)/2}};p.verbose("Setting the initial animation position as above",n,e),i.css({transform:"rotateX(0deg)"}),n.addClass(s.animating).css({top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px) translateY(-"+e.depth.active+"px)"})},below:function(){var e={origin:(i.outerHeight(!0)-n.outerHeight(!0))/2,depth:{active:n.outerHeight(!0)/2,next:i.outerHeight(!0)/2}};p.verbose("Setting the initial animation position as below",n,e),i.css({transform:"rotateX(0deg)"}),n.addClass(s.animating).css({top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px) translateY("+e.depth.active+"px)"})},left:function(){var e=i.outerWidth(!0),t=n.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};p.verbose("Setting the initial animation position as left",n,t),i.css({transform:"rotateY(0deg)"}),n.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(-90deg) translateZ("+t.depth.next+"px) translateX(-"+t.depth.active+"px)"})},right:function(){var e=i.outerWidth(!0),t=n.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};p.verbose("Setting the initial animation position as right",n,t),i.css({transform:"rotateY(0deg)"}),n.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(90deg) translateZ("+t.depth.next+"px) translateX("+t.depth.active+"px)"})},behind:function(){var e=i.outerWidth(!0),t=n.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};p.verbose("Setting the initial animation position as behind",n,t),i.css({transform:"rotateY(0deg)"}),n.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(e,t){if(p.debug("Changing setting",e,t),W.isPlainObject(e))W.extend(!0,a,e);else{if(void 0===t)return a[e];W.isPlainObject(a[e])?W.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(W.isPlainObject(e))W.extend(!0,p,e);else{if(void 0===t)return p[e];p[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,a.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),p.verbose.apply(console,arguments)))},error:function(){a.silent||(p.error=Function.prototype.bind.call(console.error,console,a.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,i;a.performance&&(i=(t=Date.now())-(x||t),x=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":i})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(function(){p.performance.display()},500)},display:function(){var e=a.name+":",i=0;x=!1,clearTimeout(p.performance.timer),W.each(y,function(e,t){i+=t["Execution Time"]}),e+=" "+i+"ms",1<b.length&&(e+=" ("+b.length+")"),0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):W.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(n,e,t){var o,a,i,r,s=h;return e=e||w,t=t||g,"string"==typeof n&&void 0!==s&&(n=n.split(/[ .]/),o=n.length-1,W.each(n,function(e,t){var i=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(W.isPlainObject(s[i])&&e!==o)s=s[i];else{if(void 0!==s[i])return a=s[i],!1;{if(!W.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:p.error(d.method,n),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?i=a.apply(t,e):void 0!==a&&(i=a),Array.isArray(v)?v.push(i):void 0!==v?v=[v,i]:void 0!==i&&(v=i),a}};S?(void 0===h&&p.initialize(),0<(e=l.find("input")).length?(e.trigger("blur"),setTimeout(function(){p.invoke(C)},150)):p.invoke(C)):(void 0!==h&&h.invoke("destroy"),p.initialize())}),void 0!==v?v:this},W.fn.shape.settings={name:"Shape",silent:!1,debug:!1,verbose:!1,jitter:0,performance:!0,namespace:"shape",width:"initial",height:"initial",onBeforeChange:function(){},onChange:function(){},allowRepeats:!1,duration:!1,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.51+7371284 - Sidebar
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -898,7 +898,7 @@
|
|
898
898
|
});
|
899
899
|
}
|
900
900
|
clearTimeout(module.performance.timer);
|
901
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
901
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
902
902
|
},
|
903
903
|
display: function () {
|
904
904
|
var
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.3-beta.
|
2
|
+
* # Fomantic UI - 2.9.3-beta.51+7371284
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(D,R,I){"use strict";function V(e){return"function"==typeof e&&"number"!=typeof e.nodeType}R=void 0!==R&&R.Math===Math?R:globalThis,D.fn.sidebar=function(T){var k,e=D(this),w=D(R),A=D(I),F=D("body"),P=D("html"),E=D("head"),O=Date.now(),B=[],H=T,M="string"==typeof H,L=[].slice.call(arguments,1),j=function(e,i){var n;return 0<=[R,I].indexOf(e)?n=F:0===(n=D(i.document).find(e)).length&&(n=i.frameElement?j(e,i.parent):F),n};return e.each(function(){var o,r,e,s,a=D.isPlainObject(T)?D.extend(!0,{},D.fn.sidebar.settings,T):D.extend({},D.fn.sidebar.settings),i=a.selector,l=a.className,n=a.namespace,t=a.regExp,c=a.error,d="."+n,u="module-"+n,f=D(this),h=j(a.context,R),b=h[0]===F[0],g=f.children(i.sidebar),m=(h.children(i.fixed),h.children(i.pusher)),v=this,p=f.data(u),y="",S="",C=!1,x={initialize:function(){x.debug("Initializing sidebar",T),x.create.id(),a.delaySetup?requestAnimationFrame(x.setup.layout):x.setup.layout(),requestAnimationFrame(function(){x.setup.cache()}),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),p=x,f.data(u,x)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),r="."+e,x.verbose("Creating unique id for element",e)}},destroy:function(){x.verbose("Destroying previous module for",f),f.off(d).removeData(u),x.is.ios()&&x.remove.ios(),h.off(r),w.off(r),A.off(r)},event:{clickaway:function(e){var i;a.closable&&(i=0<m.find(e.target).length||m.is(e.target),e=h.is(e.target),i&&(x.verbose("User clicked on dimmed page"),x.hide()),e&&(x.verbose("User clicked on dimmable context (scaled out page)"),x.hide()))},touch:function(e){},containScroll:function(e){v.scrollTop<=0&&(v.scrollTop=1),v.scrollTop+v.offsetHeight>=v.scrollHeight&&(v.scrollTop=v.scrollHeight-v.offsetHeight-1)},scroll:function(e){0===D(e.target).closest(i.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){x.verbose("Adding clickaway events to context",h),h.on("click"+r,x.event.clickaway).on("touchend"+r,x.event.clickaway)},scrollLock:function(){a.scrollLock&&(x.debug("Disabling page scroll"),(C=x.has.scrollbar())&&(x.save.bodyMargin(),x.set.bodyMargin()),h.addClass(l.locked)),x.verbose("Adding events to contain sidebar scroll"),A.on("touchmove"+r,x.event.touch),f.on("scroll"+d,x.event.containScroll)}},unbind:{clickaway:function(){x.verbose("Removing clickaway events from context",h),h.off(r)},scrollLock:function(){x.verbose("Removing scroll lock from page"),C&&x.restore.bodyMargin(),h.removeClass(l.locked),A.off(r),f.off("scroll"+d)}},add:{inlineCSS:function(){var e=x.cache.width||f.outerWidth(),i=x.cache.height||f.outerHeight(),n=x.is.rtl(),t=x.get.direction(),i={left:e,right:-e,top:i,bottom:-i};n&&(x.verbose("RTL detected, flipping widths"),i.left=-e,i.right=e),n="<style>","left"===t||"right"===t?(x.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d("+i[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!==t||(n+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d(0, "+i[t]+"px, 0); }"),x.is.ie()&&("left"===t||"right"===t?(x.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+t+".sidebar ~ .pusher::after { transform: translate3d("+i[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!==t||(n+=" body.pushable > .ui.visible."+t+".sidebar ~ .pusher::after { transform: translate3d(0, "+i[t]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher::after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher::after { transform: translate3d(0, 0, 0); }"),o=D(n+="</style>").appendTo(E),x.debug("Adding sizing css to head",o)}},refresh:function(){x.verbose("Refreshing selector cache"),h=j(a.context,R),x.refreshSidebars(),m=h.children(i.pusher),h.children(i.fixed),x.clear.cache()},refreshSidebars:function(){x.verbose("Refreshing other sidebars"),g=h.children(i.sidebar)},repaint:function(){x.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){x.cache={width:f.outerWidth(),height:f.outerHeight()}},layout:function(){0===h.children(i.pusher).length&&(x.debug("Adding wrapper element for sidebar"),x.error(c.pusher),m=D('<div class="pusher" />'),h.children().not(i.omitted).not(g).wrapAll(m),x.refresh()),0!==f.nextAll(i.pusher).length&&f.nextAll(i.pusher)[0]===m[0]||(x.debug("Moved sidebar to correct parent element"),x.error(c.movedSidebar,v),f.detach().prependTo(h),x.refresh()),x.clear.cache(),x.set.pushable(),x.set.direction()}},attachEvents:function(e,i){var n=D(e);i=V(x[i])?x[i]:x.toggle,0<n.length?(x.debug("Attaching sidebar events to element",e,i),n.on("click"+d,i)):x.error(c.notFound,e)},can:{leftBodyScrollbar:function(){return void 0===x.cache.leftBodyScrollbar&&(x.cache.leftBodyScrollbar=x.is.rtl()&&(x.is.iframe&&!x.is.firefox()||x.is.safari()||x.is.edge()||x.is.ie())),x.cache.leftBodyScrollbar}},save:{bodyMargin:function(){y=h.css((b?"margin-":"padding-")+(x.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(y.replace(/[^\d.]/g,""),10),i=b?R.innerWidth-I.documentElement.clientWidth:h[0].offsetWidth-h[0].clientWidth;S=e+i}},show:function(e){if(e=V(e)?e:function(){},x.is.hidden())if(!1===a.onShow.call(v))x.verbose("Show callback returned false cancelling show");else{if(a.overlay&&(x.error(c.overlay),a.transition="overlay"),x.refresh(),x.othersActive())if(x.debug("Other sidebars currently visible"),a.exclusive){if("overlay"!==a.transition)return void x.hideOthers(x.show);x.hideOthers()}else a.transition="overlay";x.set.dimmerStyles(),x.pushPage(function(){e.call(v),a.onVisible.call(v)}),a.onChange.call(v)}else x.debug("Sidebar is already visible")},hide:function(e){e=V(e)?e:function(){},(x.is.visible()||x.is.animating())&&!1!==a.onHide.call(v)&&(x.debug("Hiding sidebar",e),x.refreshSidebars(),x.pullPage(function(){e.call(v),a.onHidden.call(v)}),a.onChange.call(v))},othersAnimating:function(){return 0<g.not(f).filter("."+l.animating).length},othersVisible:function(){return 0<g.not(f).filter("."+l.visible).length},othersActive:function(){return x.othersVisible()||x.othersAnimating()},hideOthers:function(e){var i=g.not(f).filter("."+l.visible),n=i.length,t=0;e=e||function(){},i.sidebar("hide",function(){++t===n&&e()})},toggle:function(){x.verbose("Determining toggled direction"),x.is.hidden()?x.show():x.hide()},pushPage:function(i){var e,n,t=x.get.transition(),o="overlay"===t||x.othersActive()?f:m;i=V(i)?i:function(){},a.returnScroll&&(s=(b?w:h).scrollTop()),"scale down"===a.transition&&x.scrollToTop(),x.bind.scrollLock(),x.set.transition(t),x.repaint(),t=function(){x.bind.clickaway(),x.add.inlineCSS(),x.set.animating(),x.set.visible()},e=function(){x.set.dimmed()},n=function(e){e.target===o[0]&&(o.off("transitionend"+r,n),x.remove.animating(),i.call(v))},o.off("transitionend"+r),o.on("transitionend"+r,n),requestAnimationFrame(t),a.dimPage&&!x.othersVisible()&&requestAnimationFrame(e)},pullPage:function(i){var e,n,t=x.get.transition(),o="overlay"===t||x.othersActive()?f:m;i=V(i)?i:function(){},x.verbose("Removing context push state",x.get.direction()),x.unbind.clickaway(),x.unbind.scrollLock(),e=function(){x.set.transition(t),x.set.animating(),a.dimPage&&!x.othersVisible()&&x.set.closing(),x.remove.visible()},n=function(e){e.target===o[0]&&(o.off("transitionend"+r,n),x.remove.animating(),x.remove.closing(),x.remove.transition(),x.remove.inlineCSS(),"scale down"!==t&&!a.returnScroll||x.scrollBack(),a.dimPage&&!x.othersVisible()&&m.removeClass(l.dimmed),i.call(v))},o.off("transitionend"+r),o.on("transitionend"+r,n),requestAnimationFrame(e)},scrollToTop:function(){x.verbose("Scrolling to top of page to avoid animation issues"),f.scrollTop(0),(b?w:h)[0].scrollTo(0,0)},scrollBack:function(){x.verbose("Scrolling back to original page position"),(b?w:h)[0].scrollTo(0,s)},clear:{cache:function(){x.verbose("Clearing cached dimensions"),x.cache={}}},set:{bodyMargin:function(){var n=x.can.leftBodyScrollbar()?"left":"right";h.css((b?"margin-":"padding-")+n,S+"px"),h.find(i.bodyFixed.replace("right",n)).each(function(){var e=D(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"calc("+e.css(i)+" + "+S+"px)")})},dimmerStyles:function(){a.blurring?m.addClass(l.blurring):m.removeClass(l.blurring)},ios:function(){P.addClass(l.ios)},pushed:function(){h.addClass(l.pushed)},pushable:function(){h.addClass(l.pushable)},dimmed:function(){m.addClass(l.dimmed)},active:function(){f.addClass(l.active)},animating:function(){f.addClass(l.animating)},closing:function(){m.addClass(l.closing)},transition:function(e){e=e||x.get.transition(),f.addClass(e)},direction:function(e){e=e||x.get.direction(),f.addClass(l[e])},visible:function(){f.addClass(l.visible)},overlay:function(){f.addClass(l.overlay)}},remove:{inlineCSS:function(){x.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){P.removeClass(l.ios)},pushed:function(){h.removeClass(l.pushed)},pushable:function(){h.removeClass(l.pushable)},active:function(){f.removeClass(l.active)},animating:function(){f.removeClass(l.animating)},closing:function(){m.removeClass(l.closing)},transition:function(e){e=e||x.get.transition(),f.removeClass(e)},direction:function(e){e=e||x.get.direction(),f.removeClass(l[e])},visible:function(){f.removeClass(l.visible)},overlay:function(){f.removeClass(l.overlay)}},restore:{bodyMargin:function(){var n=x.can.leftBodyScrollbar()?"left":"right";h.css((b?"margin-":"padding-")+n,y),h.find(i.bodyFixed.replace("right",n)).each(function(){var e=D(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"")})}},get:{direction:function(){return f.hasClass(l.top)?l.top:f.hasClass(l.right)?l.right:f.hasClass(l.bottom)?l.bottom:l.left},transition:function(){var e=x.get.direction(),e=x.is.mobile()?"auto"===a.mobileTransition?a.defaultTransition.mobile[e]:a.mobileTransition:"auto"===a.transition?a.defaultTransition.computer[e]:a.transition;return x.verbose("Determined transition",e),e}},has:{scrollbar:function(){return b||"hidden"!==h.css("overflow-y")}},is:{safari:function(){return void 0===x.cache.isSafari&&(x.cache.isSafari=/constructor/i.test(R.HTMLElement)||!!R.ApplePaySession),x.cache.isSafari},edge:function(){return void 0===x.cache.isEdge&&(x.cache.isEdge=!!R.setImmediate&&!x.is.ie()),x.cache.isEdge},firefox:function(){return void 0===x.cache.isFirefox&&(x.cache.isFirefox=!!R.InstallTrigger),x.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,i;return void 0===x.cache.isIE&&(e=!R.ActiveXObject&&"ActiveXObject"in R,i="ActiveXObject"in R,x.cache.isIE=e||i),x.cache.isIE},ios:function(){var e=navigator.userAgent,i=e.match(t.ios),n=e.match(t.mobileChrome);return!(!i||n)&&(x.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(t.mobile)?(x.verbose("Browser was found to be mobile",e),!0):(x.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!x.is.visible()},visible:function(){return f.hasClass(l.visible)},open:function(){return x.is.visible()},closed:function(){return x.is.hidden()},vertical:function(){return f.hasClass(l.top)},animating:function(){return h.hasClass(l.animating)},rtl:function(){return void 0===x.cache.isRTL&&(x.cache.isRTL="rtl"===f.attr("dir")||"rtl"===f.css("direction")||"rtl"===F.attr("dir")||"rtl"===F.css("direction")||"rtl"===h.attr("dir")||"rtl"===h.css("direction")),x.cache.isRTL}},setting:function(e,i){if(x.debug("Changing setting",e,i),D.isPlainObject(e))D.extend(!0,a,e);else{if(void 0===i)return a[e];D.isPlainObject(a[e])?D.extend(!0,a[e],i):a[e]=i}},internal:function(e,i){if(D.isPlainObject(e))D.extend(!0,x,e);else{if(void 0===i)return x[e];x[e]=i}},debug:function(){!a.silent&&a.debug&&(a.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,a.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),x.verbose.apply(console,arguments)))},error:function(){a.silent||(x.error=Function.prototype.bind.call(console.error,console,a.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var i,n;a.performance&&(n=(i=Date.now())-(O||i),O=i,B.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){var e=a.name+":",n=0;O=!1,clearTimeout(x.performance.timer),D.each(B,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",0<B.length&&(console.groupCollapsed(e),console.table?console.table(B):D.each(B,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),B=[]}},invoke:function(t,e,i){var o,r,n,s=p;return e=e||L,i=i||v,"string"==typeof t&&void 0!==s&&(t=t.split(/[ .]/),o=t.length-1,D.each(t,function(e,i){var n=e!==o?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(D.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return r=s[n],!1;{if(!D.isPlainObject(s[i])||e===o)return void 0!==s[i]?r=s[i]:x.error(c.method,t),!1;s=s[i]}}})),V(r)?n=r.apply(i,e):void 0!==r&&(n=r),Array.isArray(k)?k.push(n):void 0!==k?k=[k,n]:void 0!==n&&(k=n),r}};M?(void 0===p&&x.initialize(),x.invoke(H)):(void 0!==p&&x.invoke("destroy"),x.initialize())}),void 0!==k?k:this},D.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document);
|
11
|
+
!function(D,R,I){"use strict";function V(e){return"function"==typeof e&&"number"!=typeof e.nodeType}R=void 0!==R&&R.Math===Math?R:globalThis,D.fn.sidebar=function(T){var k,e=D(this),w=D(R),A=D(I),F=D("body"),P=D("html"),E=D("head"),O=Date.now(),B=[],H=T,M="string"==typeof H,L=[].slice.call(arguments,1),j=function(e,i){var n;return 0<=[R,I].indexOf(e)?n=F:0===(n=D(i.document).find(e)).length&&(n=i.frameElement?j(e,i.parent):F),n};return e.each(function(){var o,r,e,s,a=D.isPlainObject(T)?D.extend(!0,{},D.fn.sidebar.settings,T):D.extend({},D.fn.sidebar.settings),i=a.selector,l=a.className,n=a.namespace,t=a.regExp,c=a.error,d="."+n,u="module-"+n,f=D(this),h=j(a.context,R),b=h[0]===F[0],g=f.children(i.sidebar),m=(h.children(i.fixed),h.children(i.pusher)),v=this,p=f.data(u),y="",S="",C=!1,x={initialize:function(){x.debug("Initializing sidebar",T),x.create.id(),a.delaySetup?requestAnimationFrame(x.setup.layout):x.setup.layout(),requestAnimationFrame(function(){x.setup.cache()}),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),p=x,f.data(u,x)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),r="."+e,x.verbose("Creating unique id for element",e)}},destroy:function(){x.verbose("Destroying previous module for",f),f.off(d).removeData(u),x.is.ios()&&x.remove.ios(),h.off(r),w.off(r),A.off(r)},event:{clickaway:function(e){var i;a.closable&&(i=0<m.find(e.target).length||m.is(e.target),e=h.is(e.target),i&&(x.verbose("User clicked on dimmed page"),x.hide()),e&&(x.verbose("User clicked on dimmable context (scaled out page)"),x.hide()))},touch:function(e){},containScroll:function(e){v.scrollTop<=0&&(v.scrollTop=1),v.scrollTop+v.offsetHeight>=v.scrollHeight&&(v.scrollTop=v.scrollHeight-v.offsetHeight-1)},scroll:function(e){0===D(e.target).closest(i.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){x.verbose("Adding clickaway events to context",h),h.on("click"+r,x.event.clickaway).on("touchend"+r,x.event.clickaway)},scrollLock:function(){a.scrollLock&&(x.debug("Disabling page scroll"),(C=x.has.scrollbar())&&(x.save.bodyMargin(),x.set.bodyMargin()),h.addClass(l.locked)),x.verbose("Adding events to contain sidebar scroll"),A.on("touchmove"+r,x.event.touch),f.on("scroll"+d,x.event.containScroll)}},unbind:{clickaway:function(){x.verbose("Removing clickaway events from context",h),h.off(r)},scrollLock:function(){x.verbose("Removing scroll lock from page"),C&&x.restore.bodyMargin(),h.removeClass(l.locked),A.off(r),f.off("scroll"+d)}},add:{inlineCSS:function(){var e=x.cache.width||f.outerWidth(),i=x.cache.height||f.outerHeight(),n=x.is.rtl(),t=x.get.direction(),i={left:e,right:-e,top:i,bottom:-i};n&&(x.verbose("RTL detected, flipping widths"),i.left=-e,i.right=e),n="<style>","left"===t||"right"===t?(x.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d("+i[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!==t||(n+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d(0, "+i[t]+"px, 0); }"),x.is.ie()&&("left"===t||"right"===t?(x.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+t+".sidebar ~ .pusher::after { transform: translate3d("+i[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!==t||(n+=" body.pushable > .ui.visible."+t+".sidebar ~ .pusher::after { transform: translate3d(0, "+i[t]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher::after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher::after { transform: translate3d(0, 0, 0); }"),o=D(n+="</style>").appendTo(E),x.debug("Adding sizing css to head",o)}},refresh:function(){x.verbose("Refreshing selector cache"),h=j(a.context,R),x.refreshSidebars(),m=h.children(i.pusher),h.children(i.fixed),x.clear.cache()},refreshSidebars:function(){x.verbose("Refreshing other sidebars"),g=h.children(i.sidebar)},repaint:function(){x.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){x.cache={width:f.outerWidth(),height:f.outerHeight()}},layout:function(){0===h.children(i.pusher).length&&(x.debug("Adding wrapper element for sidebar"),x.error(c.pusher),m=D('<div class="pusher" />'),h.children().not(i.omitted).not(g).wrapAll(m),x.refresh()),0!==f.nextAll(i.pusher).length&&f.nextAll(i.pusher)[0]===m[0]||(x.debug("Moved sidebar to correct parent element"),x.error(c.movedSidebar,v),f.detach().prependTo(h),x.refresh()),x.clear.cache(),x.set.pushable(),x.set.direction()}},attachEvents:function(e,i){var n=D(e);i=V(x[i])?x[i]:x.toggle,0<n.length?(x.debug("Attaching sidebar events to element",e,i),n.on("click"+d,i)):x.error(c.notFound,e)},can:{leftBodyScrollbar:function(){return void 0===x.cache.leftBodyScrollbar&&(x.cache.leftBodyScrollbar=x.is.rtl()&&(x.is.iframe&&!x.is.firefox()||x.is.safari()||x.is.edge()||x.is.ie())),x.cache.leftBodyScrollbar}},save:{bodyMargin:function(){y=h.css((b?"margin-":"padding-")+(x.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(y.replace(/[^\d.]/g,""),10),i=b?R.innerWidth-I.documentElement.clientWidth:h[0].offsetWidth-h[0].clientWidth;S=e+i}},show:function(e){if(e=V(e)?e:function(){},x.is.hidden())if(!1===a.onShow.call(v))x.verbose("Show callback returned false cancelling show");else{if(a.overlay&&(x.error(c.overlay),a.transition="overlay"),x.refresh(),x.othersActive())if(x.debug("Other sidebars currently visible"),a.exclusive){if("overlay"!==a.transition)return void x.hideOthers(x.show);x.hideOthers()}else a.transition="overlay";x.set.dimmerStyles(),x.pushPage(function(){e.call(v),a.onVisible.call(v)}),a.onChange.call(v)}else x.debug("Sidebar is already visible")},hide:function(e){e=V(e)?e:function(){},(x.is.visible()||x.is.animating())&&!1!==a.onHide.call(v)&&(x.debug("Hiding sidebar",e),x.refreshSidebars(),x.pullPage(function(){e.call(v),a.onHidden.call(v)}),a.onChange.call(v))},othersAnimating:function(){return 0<g.not(f).filter("."+l.animating).length},othersVisible:function(){return 0<g.not(f).filter("."+l.visible).length},othersActive:function(){return x.othersVisible()||x.othersAnimating()},hideOthers:function(e){var i=g.not(f).filter("."+l.visible),n=i.length,t=0;e=e||function(){},i.sidebar("hide",function(){++t===n&&e()})},toggle:function(){x.verbose("Determining toggled direction"),x.is.hidden()?x.show():x.hide()},pushPage:function(i){var e,n,t=x.get.transition(),o="overlay"===t||x.othersActive()?f:m;i=V(i)?i:function(){},a.returnScroll&&(s=(b?w:h).scrollTop()),"scale down"===a.transition&&x.scrollToTop(),x.bind.scrollLock(),x.set.transition(t),x.repaint(),t=function(){x.bind.clickaway(),x.add.inlineCSS(),x.set.animating(),x.set.visible()},e=function(){x.set.dimmed()},n=function(e){e.target===o[0]&&(o.off("transitionend"+r,n),x.remove.animating(),i.call(v))},o.off("transitionend"+r),o.on("transitionend"+r,n),requestAnimationFrame(t),a.dimPage&&!x.othersVisible()&&requestAnimationFrame(e)},pullPage:function(i){var e,n,t=x.get.transition(),o="overlay"===t||x.othersActive()?f:m;i=V(i)?i:function(){},x.verbose("Removing context push state",x.get.direction()),x.unbind.clickaway(),x.unbind.scrollLock(),e=function(){x.set.transition(t),x.set.animating(),a.dimPage&&!x.othersVisible()&&x.set.closing(),x.remove.visible()},n=function(e){e.target===o[0]&&(o.off("transitionend"+r,n),x.remove.animating(),x.remove.closing(),x.remove.transition(),x.remove.inlineCSS(),"scale down"!==t&&!a.returnScroll||x.scrollBack(),a.dimPage&&!x.othersVisible()&&m.removeClass(l.dimmed),i.call(v))},o.off("transitionend"+r),o.on("transitionend"+r,n),requestAnimationFrame(e)},scrollToTop:function(){x.verbose("Scrolling to top of page to avoid animation issues"),f.scrollTop(0),(b?w:h)[0].scrollTo(0,0)},scrollBack:function(){x.verbose("Scrolling back to original page position"),(b?w:h)[0].scrollTo(0,s)},clear:{cache:function(){x.verbose("Clearing cached dimensions"),x.cache={}}},set:{bodyMargin:function(){var n=x.can.leftBodyScrollbar()?"left":"right";h.css((b?"margin-":"padding-")+n,S+"px"),h.find(i.bodyFixed.replace("right",n)).each(function(){var e=D(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"calc("+e.css(i)+" + "+S+"px)")})},dimmerStyles:function(){a.blurring?m.addClass(l.blurring):m.removeClass(l.blurring)},ios:function(){P.addClass(l.ios)},pushed:function(){h.addClass(l.pushed)},pushable:function(){h.addClass(l.pushable)},dimmed:function(){m.addClass(l.dimmed)},active:function(){f.addClass(l.active)},animating:function(){f.addClass(l.animating)},closing:function(){m.addClass(l.closing)},transition:function(e){e=e||x.get.transition(),f.addClass(e)},direction:function(e){e=e||x.get.direction(),f.addClass(l[e])},visible:function(){f.addClass(l.visible)},overlay:function(){f.addClass(l.overlay)}},remove:{inlineCSS:function(){x.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){P.removeClass(l.ios)},pushed:function(){h.removeClass(l.pushed)},pushable:function(){h.removeClass(l.pushable)},active:function(){f.removeClass(l.active)},animating:function(){f.removeClass(l.animating)},closing:function(){m.removeClass(l.closing)},transition:function(e){e=e||x.get.transition(),f.removeClass(e)},direction:function(e){e=e||x.get.direction(),f.removeClass(l[e])},visible:function(){f.removeClass(l.visible)},overlay:function(){f.removeClass(l.overlay)}},restore:{bodyMargin:function(){var n=x.can.leftBodyScrollbar()?"left":"right";h.css((b?"margin-":"padding-")+n,y),h.find(i.bodyFixed.replace("right",n)).each(function(){var e=D(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"")})}},get:{direction:function(){return f.hasClass(l.top)?l.top:f.hasClass(l.right)?l.right:f.hasClass(l.bottom)?l.bottom:l.left},transition:function(){var e=x.get.direction(),e=x.is.mobile()?"auto"===a.mobileTransition?a.defaultTransition.mobile[e]:a.mobileTransition:"auto"===a.transition?a.defaultTransition.computer[e]:a.transition;return x.verbose("Determined transition",e),e}},has:{scrollbar:function(){return b||"hidden"!==h.css("overflow-y")}},is:{safari:function(){return void 0===x.cache.isSafari&&(x.cache.isSafari=/constructor/i.test(R.HTMLElement)||!!R.ApplePaySession),x.cache.isSafari},edge:function(){return void 0===x.cache.isEdge&&(x.cache.isEdge=!!R.setImmediate&&!x.is.ie()),x.cache.isEdge},firefox:function(){return void 0===x.cache.isFirefox&&(x.cache.isFirefox=!!R.InstallTrigger),x.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,i;return void 0===x.cache.isIE&&(e=!R.ActiveXObject&&"ActiveXObject"in R,i="ActiveXObject"in R,x.cache.isIE=e||i),x.cache.isIE},ios:function(){var e=navigator.userAgent,i=e.match(t.ios),n=e.match(t.mobileChrome);return!(!i||n)&&(x.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(t.mobile)?(x.verbose("Browser was found to be mobile",e),!0):(x.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!x.is.visible()},visible:function(){return f.hasClass(l.visible)},open:function(){return x.is.visible()},closed:function(){return x.is.hidden()},vertical:function(){return f.hasClass(l.top)},animating:function(){return h.hasClass(l.animating)},rtl:function(){return void 0===x.cache.isRTL&&(x.cache.isRTL="rtl"===f.attr("dir")||"rtl"===f.css("direction")||"rtl"===F.attr("dir")||"rtl"===F.css("direction")||"rtl"===h.attr("dir")||"rtl"===h.css("direction")),x.cache.isRTL}},setting:function(e,i){if(x.debug("Changing setting",e,i),D.isPlainObject(e))D.extend(!0,a,e);else{if(void 0===i)return a[e];D.isPlainObject(a[e])?D.extend(!0,a[e],i):a[e]=i}},internal:function(e,i){if(D.isPlainObject(e))D.extend(!0,x,e);else{if(void 0===i)return x[e];x[e]=i}},debug:function(){!a.silent&&a.debug&&(a.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,a.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),x.verbose.apply(console,arguments)))},error:function(){a.silent||(x.error=Function.prototype.bind.call(console.error,console,a.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var i,n;a.performance&&(n=(i=Date.now())-(O||i),O=i,B.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(function(){x.performance.display()},500)},display:function(){var e=a.name+":",n=0;O=!1,clearTimeout(x.performance.timer),D.each(B,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",0<B.length&&(console.groupCollapsed(e),console.table?console.table(B):D.each(B,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),B=[]}},invoke:function(t,e,i){var o,r,n,s=p;return e=e||L,i=i||v,"string"==typeof t&&void 0!==s&&(t=t.split(/[ .]/),o=t.length-1,D.each(t,function(e,i){var n=e!==o?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(D.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return r=s[n],!1;{if(!D.isPlainObject(s[i])||e===o)return void 0!==s[i]?r=s[i]:x.error(c.method,t),!1;s=s[i]}}})),V(r)?n=r.apply(i,e):void 0!==r&&(n=r),Array.isArray(k)?k.push(n):void 0!==k?k=[k,n]:void 0!==n&&(k=n),r}};M?(void 0===p&&x.initialize(),x.invoke(H)):(void 0!==p&&x.invoke("destroy"),x.initialize())}),void 0!==k?k:this},D.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document);
|
package/dist/components/site.css
CHANGED
package/dist/components/site.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.51+7371284 - Site
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -292,7 +292,7 @@
|
|
292
292
|
});
|
293
293
|
}
|
294
294
|
clearTimeout(module.performance.timer);
|
295
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
295
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
296
296
|
},
|
297
297
|
display: function () {
|
298
298
|
var
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.3-beta.
|
2
|
+
* # Fomantic UI - 2.9.3-beta.51+7371284
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(b,p,v){"use strict";p=void 0!==p&&p.Math===Math?p:globalThis,b.fn.site=function(e){var a,t=Date.now(),i=[],n=e,o="string"==typeof n,
|
11
|
+
!function(b,p,v){"use strict";p=void 0!==p&&p.Math===Math?p:globalThis,b.fn.site=function(e){var a,t=Date.now(),i=[],n=e,o="string"==typeof n,u=[].slice.call(arguments,1),r=b.isPlainObject(e)?b.extend(!0,{},b.site.settings,e):b.extend({},b.site.settings),s=r.namespace,l=r.error,c="module-"+s,d=b(v),f=this,g=d.data(c),m={initialize:function(){m.instantiate()},instantiate:function(){m.verbose("Storing instance of site",m),g=m,d.data(c,m)},normalize:function(){},fix:{consoleClear:function(){m.debug("Disabling programmatic console clearing"),p.console.clear=function(){}}},moduleExists:function(e){return void 0!==b.fn[e]&&void 0!==b.fn[e].settings},enabled:{modules:function(e){var o=[];return e=e||r.modules,b.each(e,function(e,n){m.moduleExists(n)&&o.push(n)}),o}},disabled:{modules:function(e){var o=[];return e=e||r.modules,b.each(e,function(e,n){m.moduleExists(n)||o.push(n)}),o}},change:{setting:function(t,i,e,s){e="string"==typeof e?"all"===e?r.modules:[e]:e||r.modules,s=void 0===s||s,b.each(e,function(e,n){var o=!m.moduleExists(n)||(b.fn[n].settings.namespace||!1);m.moduleExists(n)&&(m.verbose("Changing default setting",t,i,n),b.fn[n].settings[t]=i,s&&o&&0<(o=b(":data(module-"+o+")")).length&&(m.verbose("Modifying existing settings",o),o[n]("setting",t,i)))})},settings:function(t,e,i){e="string"==typeof e?[e]:e||r.modules,i=void 0===i||i,b.each(e,function(e,n){var o;m.moduleExists(n)&&(m.verbose("Changing default setting",t,n),b.extend(!0,b.fn[n].settings,t),i&&s&&0<(o=b(":data(module-"+s+")")).length&&(m.verbose("Modifying existing settings",o),o[n]("setting",t)))})}},enable:{console:function(){m.console(!0)},debug:function(e,n){e=e||r.modules,m.debug("Enabling debug for modules",e),m.change.setting("debug",!0,e,n)},verbose:function(e,n){e=e||r.modules,m.debug("Enabling verbose debug for modules",e),m.change.setting("verbose",!0,e,n)}},disable:{console:function(){m.console(!1)},debug:function(e,n){e=e||r.modules,m.debug("Disabling debug for modules",e),m.change.setting("debug",!1,e,n)},verbose:function(e,n){e=e||r.modules,m.debug("Disabling verbose debug for modules",e),m.change.setting("verbose",!1,e,n)}},console:function(e){e?void 0===g.cache.console?m.error(l.console):(m.debug("Restoring console function"),p.console=g.cache.console):(m.debug("Disabling console function"),g.cache.console=p.console,p.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},table:function(){},warn:function(){}})},destroy:function(){m.verbose("Destroying previous site for",d),d.removeData(c)},cache:{},setting:function(e,n){if(b.isPlainObject(e))b.extend(!0,r,e);else{if(void 0===n)return r[e];r[e]=n}},internal:function(e,n){if(b.isPlainObject(e))b.extend(!0,m,e);else{if(void 0===n)return m[e];m[e]=n}},debug:function(){r.debug&&(r.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,r.name+":"),m.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,r.name+":"),m.error.apply(console,arguments)},performance:{log:function(e){var n,o;r.performance&&(o=(n=Date.now())-(t||n),t=n,i.push({Element:f,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":o})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(function(){m.performance.display()},500)},display:function(){var e=r.name+":",o=0;t=!1,clearTimeout(m.performance.timer),b.each(i,function(e,n){o+=n["Execution Time"]}),e+=" "+o+"ms",0<i.length&&(console.groupCollapsed(e),console.table?console.table(i):b.each(i,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(t,e,n){var i,s,o,r,c=g;return e=e||u,n=n||f,"string"==typeof t&&void 0!==c&&(t=t.split(/[ .]/),i=t.length-1,b.each(t,function(e,n){var o=e!==i?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(b.isPlainObject(c[o])&&e!==i)c=c[o];else{if(void 0!==c[o])return s=c[o],!1;{if(!b.isPlainObject(c[n])||e===i)return void 0!==c[n]?s=c[n]:m.error(l.method,t),!1;c=c[n]}}})),"function"==typeof(r=s)&&"number"!=typeof r.nodeType?o=s.apply(n,e):void 0!==s&&(o=s),Array.isArray(a)?a.push(o):void 0!==a?a=[a,o]:void 0!==o&&(a=o),s}};return o?(void 0===g&&m.initialize(),m.invoke(n)):(void 0!==g&&m.destroy(),m.initialize()),void 0!==a?a:this},b.site=b.fn.site,b.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","calendar","checkbox","dimmer","dropdown","embed","flyout","form","modal","nag","popup","progress","rating","search","shape","sidebar","slider","state","sticky","tab","toast","transition","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},b.extend(b.expr.pseudos,{data:b.expr.createPseudo(function(n){return function(e){return!!b.data(e,n)}})})}(jQuery,window,document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.51+7371284 - Slider
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -103,9 +103,7 @@
|
|
103
103
|
module.setup.layout();
|
104
104
|
module.setup.labels();
|
105
105
|
|
106
|
-
|
107
|
-
module.bind.events();
|
108
|
-
}
|
106
|
+
module.bind.events();
|
109
107
|
|
110
108
|
module.read.metadata();
|
111
109
|
module.read.settings();
|
@@ -137,20 +135,32 @@
|
|
137
135
|
$module.attr('tabindex', 0);
|
138
136
|
}
|
139
137
|
if ($module.find('.inner').length === 0) {
|
140
|
-
$module.append(
|
141
|
-
+
|
142
|
-
+
|
143
|
-
+
|
138
|
+
$module.append('<div class="inner">'
|
139
|
+
+ '<div class="track"></div>'
|
140
|
+
+ '<div class="track-fill"></div>'
|
141
|
+
+ '<div class="thumb"></div>'
|
144
142
|
+ '</div>');
|
145
143
|
}
|
146
144
|
precision = module.get.precision();
|
147
145
|
$thumb = $module.find('.thumb:not(.second)');
|
146
|
+
if (settings.showThumbTooltip) {
|
147
|
+
$thumb
|
148
|
+
.attr('data-position', settings.tooltipConfig.position)
|
149
|
+
.attr('data-variation', settings.tooltipConfig.variation)
|
150
|
+
;
|
151
|
+
}
|
148
152
|
$currThumb = $thumb;
|
149
153
|
if (module.is.range()) {
|
150
154
|
if ($module.find('.thumb.second').length === 0) {
|
151
|
-
$module.find('.inner').append(
|
155
|
+
$module.find('.inner').append('<div class="thumb second"></div>');
|
152
156
|
}
|
153
157
|
$secondThumb = $module.find('.thumb.second');
|
158
|
+
if (settings.showThumbTooltip) {
|
159
|
+
$secondThumb
|
160
|
+
.attr('data-position', settings.tooltipConfig.position)
|
161
|
+
.attr('data-variation', settings.tooltipConfig.variation)
|
162
|
+
;
|
163
|
+
}
|
154
164
|
}
|
155
165
|
$track = $module.find('.track');
|
156
166
|
$trackFill = $module.find('.track-fill');
|
@@ -204,9 +214,10 @@
|
|
204
214
|
for (var i = 0, len = module.get.numLabels(); i <= len; i++) {
|
205
215
|
var
|
206
216
|
labelText = module.get.label(i),
|
207
|
-
|
217
|
+
showLabel = settings.restrictedLabels.length === 0 || settings.restrictedLabels.indexOf(labelText) >= 0,
|
218
|
+
$label = labelText !== '' && (showLabel || settings.showLabelTicks === 'always')
|
208
219
|
? (!(i % module.get.gapRatio())
|
209
|
-
? $('<li class="label">' + labelText + '</li>')
|
220
|
+
? $('<li class="label">' + (showLabel ? labelText : '') + '</li>')
|
210
221
|
: $('<li class="halftick label"></li>'))
|
211
222
|
: null,
|
212
223
|
ratio = i / len
|
@@ -350,6 +361,18 @@
|
|
350
361
|
;
|
351
362
|
$currThumb = initialPosition > newPos ? $thumb : $secondThumb;
|
352
363
|
}
|
364
|
+
if (module.is.range() && (settings.minRange || settings.maxRange)) {
|
365
|
+
var currentRangeDiff = module.get.currentRangeDiff(value),
|
366
|
+
isSecondThumb = $currThumb.hasClass('second')
|
367
|
+
;
|
368
|
+
if ((settings.minRange && currentRangeDiff < settings.minRange)
|
369
|
+
|| (settings.maxRange && currentRangeDiff > settings.maxRange)
|
370
|
+
|| (settings.preventCrossover && !isSecondThumb && value > module.secondThumbVal)
|
371
|
+
|| (settings.preventCrossover && isSecondThumb && value < module.thumbVal)
|
372
|
+
) {
|
373
|
+
return;
|
374
|
+
}
|
375
|
+
}
|
353
376
|
if (module.get.step() === 0 || module.is.smooth()) {
|
354
377
|
var
|
355
378
|
thumbVal = module.thumbVal,
|
@@ -385,6 +408,17 @@
|
|
385
408
|
return;
|
386
409
|
}
|
387
410
|
var value = module.determine.valueFromEvent(event);
|
411
|
+
if (module.is.range() && (settings.minRange || settings.maxRange)) {
|
412
|
+
if ($currThumb === undefined) {
|
413
|
+
$currThumb = value <= module.get.currentThumbValue() ? $thumb : $secondThumb;
|
414
|
+
}
|
415
|
+
var currentRangeDiff = module.get.currentRangeDiff(value);
|
416
|
+
if (settings.minRange && currentRangeDiff < settings.minRange) {
|
417
|
+
value = module.get.edgeValue(value, settings.minRange);
|
418
|
+
} else if (settings.maxRange && currentRangeDiff > settings.maxRange) {
|
419
|
+
value = module.get.edgeValue(value, settings.maxRange);
|
420
|
+
}
|
421
|
+
}
|
388
422
|
module.set.value(value);
|
389
423
|
module.unbind.slidingEvents();
|
390
424
|
touchIdentifier = undefined;
|
@@ -401,6 +435,9 @@
|
|
401
435
|
}
|
402
436
|
},
|
403
437
|
keydown: function (event, first) {
|
438
|
+
if (module.is.disabled()) {
|
439
|
+
return;
|
440
|
+
}
|
404
441
|
if (settings.preventCrossover && module.is.range() && module.thumbVal === module.secondThumbVal) {
|
405
442
|
$currThumb = undefined;
|
406
443
|
}
|
@@ -437,7 +474,7 @@
|
|
437
474
|
}
|
438
475
|
},
|
439
476
|
activateFocus: function (event) {
|
440
|
-
if (!module.is.focused() && module.is.hover() && module.determine.keyMovement(event) !== NO_STEP) {
|
477
|
+
if (!module.is.disabled() && !module.is.focused() && module.is.hover() && module.determine.keyMovement(event) !== NO_STEP) {
|
441
478
|
event.preventDefault();
|
442
479
|
module.event.keydown(event, true);
|
443
480
|
$module.trigger('focus');
|
@@ -502,7 +539,13 @@
|
|
502
539
|
|
503
540
|
is: {
|
504
541
|
range: function () {
|
505
|
-
|
542
|
+
var isRange = $module.hasClass(className.range);
|
543
|
+
if (!isRange && (settings.minRange || settings.maxRange)) {
|
544
|
+
$module.addClass(className.range);
|
545
|
+
isRange = true;
|
546
|
+
}
|
547
|
+
|
548
|
+
return isRange;
|
506
549
|
},
|
507
550
|
hover: function () {
|
508
551
|
return isHover;
|
@@ -511,23 +554,56 @@
|
|
511
554
|
return $module.is(':focus');
|
512
555
|
},
|
513
556
|
disabled: function () {
|
514
|
-
return $module.hasClass(
|
557
|
+
return $module.hasClass(className.disabled);
|
515
558
|
},
|
516
559
|
labeled: function () {
|
517
|
-
|
560
|
+
var isLabeled = $module.hasClass(className.labeled);
|
561
|
+
if (!isLabeled && (settings.restrictedLabels.length > 0 || settings.showLabelTicks !== false)) {
|
562
|
+
$module.addClass(className.labeled);
|
563
|
+
isLabeled = true;
|
564
|
+
}
|
565
|
+
|
566
|
+
return isLabeled;
|
518
567
|
},
|
519
568
|
reversed: function () {
|
520
|
-
return $module.hasClass(
|
569
|
+
return $module.hasClass(className.reversed);
|
521
570
|
},
|
522
571
|
vertical: function () {
|
523
|
-
return $module.hasClass(
|
572
|
+
return $module.hasClass(className.vertical);
|
524
573
|
},
|
525
574
|
smooth: function () {
|
526
|
-
return settings.smooth || $module.hasClass(
|
575
|
+
return settings.smooth || $module.hasClass(className.smooth);
|
527
576
|
},
|
528
577
|
},
|
529
578
|
|
530
579
|
get: {
|
580
|
+
currentRangeDiff: function (value) {
|
581
|
+
var currentRangeDiff;
|
582
|
+
if ($currThumb.hasClass('second')) {
|
583
|
+
currentRangeDiff = module.thumbVal < value
|
584
|
+
? value - module.thumbVal
|
585
|
+
: module.thumbVal - value;
|
586
|
+
} else {
|
587
|
+
currentRangeDiff = module.secondThumbVal > value
|
588
|
+
? module.secondThumbVal - value
|
589
|
+
: value - module.secondThumbVal;
|
590
|
+
}
|
591
|
+
|
592
|
+
return currentRangeDiff;
|
593
|
+
},
|
594
|
+
edgeValue: function (value, edgeValue) {
|
595
|
+
if ($currThumb.hasClass('second')) {
|
596
|
+
value = module.thumbVal < value
|
597
|
+
? module.thumbVal + edgeValue
|
598
|
+
: module.thumbVal - edgeValue;
|
599
|
+
} else {
|
600
|
+
value = module.secondThumbVal < value
|
601
|
+
? module.secondThumbVal + edgeValue
|
602
|
+
: module.secondThumbVal - edgeValue;
|
603
|
+
}
|
604
|
+
|
605
|
+
return value;
|
606
|
+
},
|
531
607
|
trackOffset: function () {
|
532
608
|
if (module.is.vertical()) {
|
533
609
|
return $track.offset().top;
|
@@ -731,13 +807,10 @@
|
|
731
807
|
return thumbDelta <= secondThumbDelta ? thumbPos : secondThumbPos;
|
732
808
|
},
|
733
809
|
thumbPos: function ($element) {
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
: (module.is.reversed() ? $element.css('right') : $element.css('left'))
|
810
|
+
return module.is.vertical()
|
811
|
+
? (module.is.reversed() ? $element.css('bottom') : $element.css('top'))
|
812
|
+
: (module.is.reversed() ? $element.css('right') : $element.css('left'))
|
738
813
|
;
|
739
|
-
|
740
|
-
return pos;
|
741
814
|
},
|
742
815
|
positionFromValue: function (val) {
|
743
816
|
var
|
@@ -761,6 +834,7 @@
|
|
761
834
|
position = Math.round(ratio * trackLength),
|
762
835
|
adjustedPos = step === 0 ? position : Math.round(position / step) * step
|
763
836
|
;
|
837
|
+
module.verbose('Determined position: ' + position + ' from ratio: ' + ratio);
|
764
838
|
|
765
839
|
return adjustedPos;
|
766
840
|
},
|
@@ -984,12 +1058,12 @@
|
|
984
1058
|
}
|
985
1059
|
if (!$currThumb.hasClass('second')) {
|
986
1060
|
if (settings.preventCrossover && module.is.range()) {
|
987
|
-
newValue = Math.min(module.secondThumbVal, newValue);
|
1061
|
+
newValue = Math.min(module.secondThumbVal - (settings.minRange || 0), newValue);
|
988
1062
|
}
|
989
1063
|
module.thumbVal = newValue;
|
990
1064
|
} else {
|
991
1065
|
if (settings.preventCrossover && module.is.range()) {
|
992
|
-
newValue = Math.max(module.thumbVal, newValue);
|
1066
|
+
newValue = Math.max(module.thumbVal + (settings.minRange || 0), newValue);
|
993
1067
|
}
|
994
1068
|
module.secondThumbVal = newValue;
|
995
1069
|
}
|
@@ -1008,6 +1082,10 @@
|
|
1008
1082
|
thumbVal = module.thumbVal || module.get.min(),
|
1009
1083
|
secondThumbVal = module.secondThumbVal || module.get.min()
|
1010
1084
|
;
|
1085
|
+
if (settings.showThumbTooltip) {
|
1086
|
+
var precision = module.get.precision();
|
1087
|
+
$targetThumb.attr('data-tooltip', Math.round(newValue * precision) / precision);
|
1088
|
+
}
|
1011
1089
|
if (module.is.range()) {
|
1012
1090
|
if (!$targetThumb.hasClass('second')) {
|
1013
1091
|
position = newPos;
|
@@ -1096,6 +1174,14 @@
|
|
1096
1174
|
settings: function () {
|
1097
1175
|
if (settings.start !== false) {
|
1098
1176
|
if (module.is.range()) {
|
1177
|
+
var rangeDiff = settings.end - settings.start;
|
1178
|
+
if (rangeDiff < 0
|
1179
|
+
|| (settings.minRange && rangeDiff < settings.minRange)
|
1180
|
+
|| (settings.maxRange && rangeDiff > settings.maxRange)
|
1181
|
+
|| (settings.minRange && settings.maxRange && settings.minRange > settings.maxRange)
|
1182
|
+
) {
|
1183
|
+
module.error(error.invalidRanges, settings.start, settings.end, settings.minRange, settings.maxRange);
|
1184
|
+
}
|
1099
1185
|
module.debug('Start position set from settings', settings.start, settings.end);
|
1100
1186
|
module.set.rangeValue(settings.start, settings.end);
|
1101
1187
|
} else {
|
@@ -1176,7 +1262,7 @@
|
|
1176
1262
|
});
|
1177
1263
|
}
|
1178
1264
|
clearTimeout(module.performance.timer);
|
1179
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
1265
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
1180
1266
|
},
|
1181
1267
|
display: function () {
|
1182
1268
|
var
|
@@ -1288,6 +1374,7 @@
|
|
1288
1374
|
error: {
|
1289
1375
|
method: 'The method you called is not defined.',
|
1290
1376
|
notrange: 'This slider is not a range slider',
|
1377
|
+
invalidRanges: 'Invalid range settings (start/end/minRange/maxRange)',
|
1291
1378
|
},
|
1292
1379
|
|
1293
1380
|
metadata: {
|
@@ -1300,6 +1387,8 @@
|
|
1300
1387
|
step: 1,
|
1301
1388
|
start: 0,
|
1302
1389
|
end: 20,
|
1390
|
+
minRange: false,
|
1391
|
+
maxRange: false,
|
1303
1392
|
labelType: 'number',
|
1304
1393
|
showLabelTicks: false,
|
1305
1394
|
smooth: false,
|
@@ -1336,6 +1425,13 @@
|
|
1336
1425
|
downArrow: 40,
|
1337
1426
|
},
|
1338
1427
|
|
1428
|
+
restrictedLabels: [],
|
1429
|
+
showThumbTooltip: false,
|
1430
|
+
tooltipConfig: {
|
1431
|
+
position: 'top center',
|
1432
|
+
variation: 'tiny black',
|
1433
|
+
},
|
1434
|
+
|
1339
1435
|
labelTypes: {
|
1340
1436
|
number: 'number',
|
1341
1437
|
letter: 'letter',
|