fomantic-ui 2.10.0-beta.4 → 2.10.0-beta.41
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/.eslintrc.js +0 -10
- package/CHANGELOG.md +5289 -2325
- package/README.md +4 -5
- package/changelog-setup.js +85 -69
- package/changelog-template.hbs +256 -251
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +103 -142
- 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 +152 -205
- 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 +1 -2
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +308 -346
- 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 +1 -1
- package/dist/components/checkbox.js +85 -127
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +58 -91
- package/dist/components/dimmer.min.css +1 -1
- 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 +7 -5
- package/dist/components/dropdown.js +744 -1071
- 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 +83 -113
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +3809 -7617
- package/dist/components/emoji.min.css +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +225 -314
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +325 -429
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +2 -1
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +40 -40
- 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 +3 -3
- package/dist/components/modal.js +259 -358
- 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 +67 -97
- 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 +1 -1
- package/dist/components/popup.js +190 -264
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +103 -138
- 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 +90 -123
- 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 +1 -1
- package/dist/components/search.js +270 -373
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +157 -223
- 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 +125 -165
- 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 +38 -57
- 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 +242 -325
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +68 -98
- 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 +131 -176
- 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 +168 -233
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +8 -8
- 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 +1 -1
- package/dist/components/toast.js +104 -143
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +86 -141
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +145 -223
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +3916 -7722
- package/dist/semantic.js +4324 -5973
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/assets/show-examples.js +2 -4
- package/examples/attached.html +1 -1
- package/examples/components/menu.html +1 -1
- package/gulpfile.js +5 -7
- package/package.json +1 -3
- package/scripts/nightly-version.js +7 -10
- package/src/definitions/behaviors/api.js +151 -204
- package/src/definitions/behaviors/form.js +324 -428
- package/src/definitions/behaviors/state.js +67 -97
- package/src/definitions/behaviors/visibility.js +144 -222
- package/src/definitions/collections/menu.less +101 -96
- package/src/definitions/collections/table.less +7 -7
- package/src/definitions/elements/button.less +0 -1
- package/src/definitions/elements/label.less +1 -0
- package/src/definitions/globals/site.js +37 -56
- package/src/definitions/modules/accordion.js +102 -141
- package/src/definitions/modules/calendar.js +307 -345
- package/src/definitions/modules/checkbox.js +84 -126
- package/src/definitions/modules/dimmer.js +57 -90
- package/src/definitions/modules/dropdown.js +743 -1070
- package/src/definitions/modules/dropdown.less +11 -5
- package/src/definitions/modules/embed.js +82 -112
- package/src/definitions/modules/flyout.js +224 -313
- package/src/definitions/modules/modal.js +258 -357
- package/src/definitions/modules/modal.less +1 -1
- package/src/definitions/modules/nag.js +66 -96
- package/src/definitions/modules/popup.js +189 -263
- package/src/definitions/modules/progress.js +102 -137
- package/src/definitions/modules/rating.js +89 -122
- package/src/definitions/modules/search.js +269 -372
- package/src/definitions/modules/shape.js +156 -222
- package/src/definitions/modules/sidebar.js +124 -164
- package/src/definitions/modules/slider.js +241 -324
- package/src/definitions/modules/sticky.js +130 -175
- package/src/definitions/modules/tab.js +167 -232
- package/src/definitions/modules/toast.js +103 -142
- package/src/definitions/modules/transition.js +85 -140
- package/src/themes/chubby/collections/menu.variables +1 -1
- package/src/themes/default/collections/menu.variables +23 -23
- package/src/themes/default/globals/variation.variables +3 -2
- package/src/themes/default/modules/dropdown.variables +1 -0
- package/src/themes/default/modules/modal.variables +1 -1
- package/tasks/admin/components/create.js +88 -108
- package/tasks/admin/components/init.js +26 -32
- package/tasks/admin/components/update.js +46 -53
- package/tasks/admin/distributions/create.js +71 -101
- package/tasks/admin/distributions/init.js +27 -33
- package/tasks/admin/distributions/update.js +45 -52
- package/tasks/admin/register.js +11 -15
- package/tasks/build/assets.js +14 -18
- package/tasks/build/css.js +54 -63
- package/tasks/build/javascript.js +45 -53
- package/tasks/build.js +4 -6
- package/tasks/check-install.js +5 -7
- package/tasks/clean.js +2 -4
- package/tasks/collections/admin.js +13 -15
- package/tasks/collections/build.js +6 -8
- package/tasks/collections/docs.js +2 -4
- package/tasks/collections/install.js +2 -4
- package/tasks/collections/rtl.js +2 -4
- package/tasks/collections/various.js +2 -4
- package/tasks/config/admin/github.js +7 -9
- package/tasks/config/admin/templates/css-package.js +1 -3
- package/tasks/config/admin/templates/less-package.js +1 -3
- package/tasks/config/defaults.js +0 -1
- package/tasks/config/npm/gulpfile.js +4 -6
- package/tasks/config/project/config.js +22 -30
- package/tasks/config/project/install.js +61 -78
- package/tasks/config/project/release.js +6 -8
- package/tasks/config/tasks.js +8 -12
- package/tasks/config/user.js +13 -17
- package/tasks/docs/build.js +26 -31
- package/tasks/docs/metadata.js +24 -30
- package/tasks/docs/serve.js +20 -26
- package/tasks/install.js +81 -109
- package/tasks/rtl/build.js +2 -4
- package/tasks/rtl/watch.js +2 -4
- package/tasks/watch.js +9 -11
- package/test/meteor/fonts.js +1 -2
- package/test/modules/module.spec.js +16 -18
- package/types/fomantic-ui-dropdown.d.ts +44 -0
- package/types/fomantic-ui-embed.d.ts +1 -1
- package/types/fomantic-ui-search.d.ts +6 -6
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.10.0-beta.
|
2
|
+
* # Fomantic UI - 2.10.0-beta.41+1ceee9c
|
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,j){"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(j),F=D("body"),P=(D("html"),D("head")),H=Date.now(),M=[],B=T,O="string"==typeof B,E=[].slice.call(arguments,1),L=function(e,i){var n;return 0<=[R,j].indexOf(e)?n=F:0===(n=D(i.document).find(e)).length&&(n=i.frameElement?L(e,i.parent):F),n};return e.each(function(){var t,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,o=a.regExp,c=a.error,d="."+n,u="module-"+n,f=D(this),h=L(a.context,R),g=h[0]===F[0],b=f.children(i.sidebar),m=(h.children(i.fixed),h.children(i.pusher)),v=this,p=f.data(u),y="",S="",x=!1,C={initialize:function(){C.debug("Initializing sidebar",T),C.create.id(),a.delaySetup?requestAnimationFrame(C.setup.layout):C.setup.layout(),requestAnimationFrame(function(){C.setup.cache()}),C.instantiate()},instantiate:function(){C.verbose("Storing instance of module",C),p=C,f.data(u,C)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),r="."+e,C.verbose("Creating unique id for element",e)}},destroy:function(){C.verbose("Destroying previous module for",f),f.off(d).removeData(u),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&&(C.verbose("User clicked on dimmed page"),C.hide()),e&&(C.verbose("User clicked on dimmable context (scaled out page)"),C.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(){C.verbose("Adding clickaway events to context",h),h.on("click"+r,C.event.clickaway).on("touchend"+r,C.event.clickaway)},scrollLock:function(){a.scrollLock&&(C.debug("Disabling page scroll"),(x=C.has.scrollbar())&&(C.save.bodyMargin(),C.set.bodyMargin()),h.addClass(l.locked)),C.verbose("Adding events to contain sidebar scroll"),A.on("touchmove"+r,C.event.touch),f.on("scroll"+d,C.event.containScroll)}},unbind:{clickaway:function(){C.verbose("Removing clickaway events from context",h),h.off(r)},scrollLock:function(){C.verbose("Removing scroll lock from page"),x&&C.restore.bodyMargin(),h.removeClass(l.locked),A.off(r),f.off("scroll"+d)}},add:{inlineCSS:function(){var e=C.cache.width||f.outerWidth(),i=C.cache.height||f.outerHeight(),n=C.is.rtl(),o=C.get.direction(),i={left:e,right:-e,top:i,bottom:-i};n&&(C.verbose("RTL detected, flipping widths"),i.left=-e,i.right=e),n="<style>","left"===o||"right"===o?(C.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+o+".sidebar ~ .fixed, .ui.visible."+o+".sidebar ~ .pusher { transform: translate3d("+i[o]+"px, 0, 0); }"):"top"!==o&&"bottom"!==o||(n+=" .ui.visible."+o+".sidebar ~ .fixed, .ui.visible."+o+".sidebar ~ .pusher { transform: translate3d(0, "+i[o]+"px, 0); }"),t=D(n+="</style>").appendTo(P),C.debug("Adding sizing css to head",t)}},refresh:function(){C.verbose("Refreshing selector cache"),h=L(a.context,R),C.refreshSidebars(),m=h.children(i.pusher),h.children(i.fixed),C.clear.cache()},refreshSidebars:function(){C.verbose("Refreshing other sidebars"),b=h.children(i.sidebar)},repaint:function(){C.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){C.cache={width:f.outerWidth(),height:f.outerHeight()}},layout:function(){0===h.children(i.pusher).length&&(C.debug("Adding wrapper element for sidebar"),C.error(c.pusher),m=D('<div class="pusher" />'),h.children().not(i.omitted).not(b).wrapAll(m),C.refresh()),0!==f.nextAll(i.pusher).length&&f.nextAll(i.pusher)[0]===m[0]||(C.debug("Moved sidebar to correct parent element"),C.error(c.movedSidebar,v),f.detach().prependTo(h),C.refresh()),C.clear.cache(),C.set.pushable(),C.set.direction()}},attachEvents:function(e,i){var n=D(e);i=V(C[i])?C[i]:C.toggle,0<n.length?(C.debug("Attaching sidebar events to element",e,i),n.on("click"+d,i)):C.error(c.notFound,e)},can:{leftBodyScrollbar:function(){return void 0===C.cache.leftBodyScrollbar&&(C.cache.leftBodyScrollbar=C.is.rtl()&&(C.is.iframe&&!C.is.firefox()||C.is.safari())),C.cache.leftBodyScrollbar}},save:{bodyMargin:function(){y=h.css((g?"margin-":"padding-")+(C.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(y.replace(/[^\d.]/g,""),10),i=g?R.innerWidth-j.documentElement.clientWidth:h[0].offsetWidth-h[0].clientWidth;S=e+i}},show:function(e){if(e=V(e)?e:function(){},C.is.hidden())if(!1===a.onShow.call(v))C.verbose("Show callback returned false cancelling show");else{if(a.overlay&&(C.error(c.overlay),a.transition="overlay"),C.refresh(),C.othersActive())if(C.debug("Other sidebars currently visible"),a.exclusive){if("overlay"!==a.transition)return void C.hideOthers(C.show);C.hideOthers()}else a.transition="overlay";C.set.dimmerStyles(),C.pushPage(function(){e.call(v),a.onVisible.call(v)}),a.onChange.call(v)}else C.debug("Sidebar is already visible")},hide:function(e){e=V(e)?e:function(){},(C.is.visible()||C.is.animating())&&!1!==a.onHide.call(v)&&(C.debug("Hiding sidebar",e),C.refreshSidebars(),C.pullPage(function(){e.call(v),a.onHidden.call(v)}),a.onChange.call(v))},othersAnimating:function(){return 0<b.not(f).filter("."+l.animating).length},othersVisible:function(){return 0<b.not(f).filter("."+l.visible).length},othersActive:function(){return C.othersVisible()||C.othersAnimating()},hideOthers:function(e){var i=b.not(f).filter("."+l.visible),n=i.length,o=0;e=e||function(){},i.sidebar("hide",function(){++o===n&&e()})},toggle:function(){C.verbose("Determining toggled direction"),C.is.hidden()?C.show():C.hide()},pushPage:function(i){var e,n,o=C.get.transition(),t="overlay"===o||C.othersActive()?f:m;i=V(i)?i:function(){},a.returnScroll&&(s=(g?w:h).scrollTop()),"scale down"===a.transition&&C.scrollToTop(),C.bind.scrollLock(),C.set.transition(o),C.repaint(),o=function(){C.bind.clickaway(),C.add.inlineCSS(),C.set.animating(),C.set.visible()},e=function(){C.set.dimmed()},n=function(e){e.target===t[0]&&(t.off("transitionend"+r,n),C.remove.animating(),i.call(v))},t.off("transitionend"+r),t.on("transitionend"+r,n),requestAnimationFrame(o),a.dimPage&&!C.othersVisible()&&requestAnimationFrame(e)},pullPage:function(i){var e,n,o=C.get.transition(),t="overlay"===o||C.othersActive()?f:m;i=V(i)?i:function(){},C.verbose("Removing context push state",C.get.direction()),C.unbind.clickaway(),C.unbind.scrollLock(),e=function(){C.set.transition(o),C.set.animating(),a.dimPage&&!C.othersVisible()&&C.set.closing(),C.remove.visible()},n=function(e){e.target===t[0]&&(t.off("transitionend"+r,n),C.remove.animating(),C.remove.closing(),C.remove.transition(),C.remove.inlineCSS(),"scale down"!==o&&!a.returnScroll||C.scrollBack(),a.dimPage&&!C.othersVisible()&&m.removeClass(l.dimmed),i.call(v))},t.off("transitionend"+r),t.on("transitionend"+r,n),requestAnimationFrame(e)},scrollToTop:function(){C.verbose("Scrolling to top of page to avoid animation issues"),f.scrollTop(0),(g?w:h)[0].scrollTo(0,0)},scrollBack:function(){C.verbose("Scrolling back to original page position"),(g?w:h)[0].scrollTo(0,s)},clear:{cache:function(){C.verbose("Clearing cached dimensions"),C.cache={}}},set:{bodyMargin:function(){var n=C.can.leftBodyScrollbar()?"left":"right";h.css((g?"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)},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||C.get.transition(),f.addClass(e)},direction:function(e){e=e||C.get.direction(),f.addClass(l[e])},visible:function(){f.addClass(l.visible)},overlay:function(){f.addClass(l.overlay)}},remove:{inlineCSS:function(){C.debug("Removing inline css styles",t),t&&0<t.length&&t.remove()},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||C.get.transition(),f.removeClass(e)},direction:function(e){e=e||C.get.direction(),f.removeClass(l[e])},visible:function(){f.removeClass(l.visible)},overlay:function(){f.removeClass(l.overlay)}},restore:{bodyMargin:function(){var n=C.can.leftBodyScrollbar()?"left":"right";h.css((g?"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=C.get.direction(),e=C.is.mobile()?"auto"===a.mobileTransition?a.defaultTransition.mobile[e]:a.mobileTransition:"auto"===a.transition?a.defaultTransition.computer[e]:a.transition;return C.verbose("Determined transition",e),e}},has:{scrollbar:function(){return g||"hidden"!==h.css("overflow-y")}},is:{safari:function(){return void 0===C.cache.isSafari&&(C.cache.isSafari=/constructor/i.test(R.HTMLElement)||!!R.ApplePaySession),C.cache.isSafari},firefox:function(){return void 0===C.cache.isFirefox&&(C.cache.isFirefox=!!R.InstallTrigger),C.cache.isFirefox},iframe:function(){return!(self===top)},mobile:function(){var e=navigator.userAgent;return e.match(o.mobile)?(C.verbose("Browser was found to be mobile",e),!0):(C.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!C.is.visible()},visible:function(){return f.hasClass(l.visible)},open:function(){return C.is.visible()},closed:function(){return C.is.hidden()},vertical:function(){return f.hasClass(l.top)},animating:function(){return h.hasClass(l.animating)},rtl:function(){return void 0===C.cache.isRTL&&(C.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")),C.cache.isRTL}},setting:function(e,i){if(C.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,C,e);else{if(void 0===i)return C[e];C[e]=i}},debug:function(){!a.silent&&a.debug&&(a.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,a.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),C.verbose.apply(console,arguments)))},error:function(){a.silent||(C.error=Function.prototype.bind.call(console.error,console,a.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var i,n;a.performance&&(n=(i=Date.now())-(H||i),H=i,M.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(function(){C.performance.display()},500)},display:function(){var e=a.name+":",n=0;H=!1,clearTimeout(C.performance.timer),D.each(M,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",0<M.length&&(console.groupCollapsed(e),console.table?console.table(M):D.each(M,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),M=[]}},invoke:function(o,e,i){var t,r,n,s=p;return e=e||E,i=i||v,"string"==typeof o&&void 0!==s&&(o=o.split(/[ .]/),t=o.length-1,D.each(o,function(e,i){var n=e!==t?i+o[e+1].charAt(0).toUpperCase()+o[e+1].slice(1):o;if(D.isPlainObject(s[n])&&e!==t)s=s[n];else{if(void 0!==s[n])return r=s[n],!1;{if(!D.isPlainObject(s[i])||e===t)return void 0!==s[i]?r=s[i]:C.error(c.method,o),!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}};O?(void 0===p&&C.initialize(),C.invoke(B)):(void 0!==p&&C.invoke("destroy"),C.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",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:{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(j,V,q){"use strict";function z(e){return"function"==typeof e&&"number"!=typeof e.nodeType}V=void 0!==V&&V.Math===Math?V:globalThis,j.fn.sidebar=function(w){let e=j(this),A=j(V),F=j(q),P=j("body");j("html");let H=j("head"),M=Date.now(),B=[],O=w,E="string"==typeof O,L=[].slice.call(arguments,1),D=function(e,i){let n;return 0<=[V,q].indexOf(e)?n=P:0===(n=j(i.document).find(e)).length&&(n=i.frameElement?D(e,i.parent):P),n},R;return e.each(function(){let r=j.isPlainObject(w)?j.extend(!0,{},j.fn.sidebar.settings,w):j.extend({},j.fn.sidebar.settings),i=r.selector,s=r.className;var e=r.namespace;let n=r.regExp,a=r.error,t="."+e,o="module-"+e,l=j(this),c=D(r.context,V),d=c[0]===P[0],u=l.children(i.sidebar),f=void c.children(i.fixed),h=c.children(i.pusher),g,b=this,m=l.data(o),v,p,y,S="",x=0,C=0,T=!1,k;k={initialize:function(){k.debug("Initializing sidebar",w),k.create.id(),r.delaySetup?requestAnimationFrame(k.setup.layout):k.setup.layout(),requestAnimationFrame(function(){k.setup.cache()}),k.instantiate()},instantiate:function(){k.verbose("Storing instance of module",k),m=k,l.data(o,k)},create:{id:function(){p=(Math.random().toString(16)+"000000000").slice(2,10),v="."+p,k.verbose("Creating unique id for element",p)}},destroy:function(){k.verbose("Destroying previous module for",l),l.off(t).removeData(o),c.off(v),A.off(v),F.off(v)},event:{clickaway:function(e){var i;r.closable&&(i=0<h.find(e.target).length||h.is(e.target),e=c.is(e.target),i&&(k.verbose("User clicked on dimmed page"),k.hide()),e&&(k.verbose("User clicked on dimmable context (scaled out page)"),k.hide()))},touch:function(e){},containScroll:function(e){b.scrollTop<=0&&(b.scrollTop=1),b.scrollTop+b.offsetHeight>=b.scrollHeight&&(b.scrollTop=b.scrollHeight-b.offsetHeight-1)},scroll:function(e){0===j(e.target).closest(i.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){k.verbose("Adding clickaway events to context",c),c.on("click"+v,k.event.clickaway).on("touchend"+v,k.event.clickaway)},scrollLock:function(){r.scrollLock&&(k.debug("Disabling page scroll"),(T=k.has.scrollbar())&&(k.save.bodyMargin(),k.set.bodyMargin()),c.addClass(s.locked)),k.verbose("Adding events to contain sidebar scroll"),F.on("touchmove"+v,k.event.touch),l.on("scroll"+t,k.event.containScroll)}},unbind:{clickaway:function(){k.verbose("Removing clickaway events from context",c),c.off(v)},scrollLock:function(){k.verbose("Removing scroll lock from page"),T&&k.restore.bodyMargin(),c.removeClass(s.locked),F.off(v),l.off("scroll"+t)}},add:{inlineCSS:function(){var e=k.cache.width||l.outerWidth(),i=k.cache.height||l.outerHeight(),n=k.is.rtl(),t=k.get.direction();let o={left:e,right:-e,top:i,bottom:-i},r;n&&(k.verbose("RTL detected, flipping widths"),o.left=-e,o.right=e),r="<style>","left"===t||"right"===t?(k.debug("Adding CSS rules for animation distance",e),r+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d("+o[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!==t||(r+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d(0, "+o[t]+"px, 0); }"),r+="</style>",g=j(r).appendTo(H),k.debug("Adding sizing css to head",g)}},refresh:function(){k.verbose("Refreshing selector cache"),c=D(r.context,V),k.refreshSidebars(),h=c.children(i.pusher),f=c.children(i.fixed),k.clear.cache()},refreshSidebars:function(){k.verbose("Refreshing other sidebars"),u=c.children(i.sidebar)},repaint:function(){k.verbose("Forcing repaint event"),b.style.display="none";b.offsetHeight;b.scrollTop=b.scrollTop,b.style.display=""},setup:{cache:function(){k.cache={width:l.outerWidth(),height:l.outerHeight()}},layout:function(){0===c.children(i.pusher).length&&(k.debug("Adding wrapper element for sidebar"),k.error(a.pusher),h=j('<div class="pusher" />'),c.children().not(i.omitted).not(u).wrapAll(h),k.refresh()),0!==l.nextAll(i.pusher).length&&l.nextAll(i.pusher)[0]===h[0]||(k.debug("Moved sidebar to correct parent element"),k.error(a.movedSidebar,b),l.detach().prependTo(c),k.refresh()),k.clear.cache(),k.set.pushable(),k.set.direction()}},attachEvents:function(e,i){let n=j(e);i=z(k[i])?k[i]:k.toggle,0<n.length?(k.debug("Attaching sidebar events to element",e,i),n.on("click"+t,i)):k.error(a.notFound,e)},can:{leftBodyScrollbar:function(){return void 0===k.cache.leftBodyScrollbar&&(k.cache.leftBodyScrollbar=k.is.rtl()&&(k.is.iframe&&!k.is.firefox()||k.is.safari())),k.cache.leftBodyScrollbar}},save:{bodyMargin:function(){S=c.css((d?"margin-":"padding-")+(k.can.leftBodyScrollbar()?"left":"right")),x=parseInt(S.replace(/[^\d.]/g,""),10);var e=d?V.innerWidth-q.documentElement.clientWidth:c[0].offsetWidth-c[0].clientWidth;C=x+e}},show:function(e){if(e=z(e)?e:function(){},k.is.hidden())if(!1===r.onShow.call(b))k.verbose("Show callback returned false cancelling show");else{if(r.overlay&&(k.error(a.overlay),r.transition="overlay"),k.refresh(),k.othersActive())if(k.debug("Other sidebars currently visible"),r.exclusive){if("overlay"!==r.transition)return void k.hideOthers(k.show);k.hideOthers()}else r.transition="overlay";k.set.dimmerStyles(),k.pushPage(function(){e.call(b),r.onVisible.call(b)}),r.onChange.call(b)}else k.debug("Sidebar is already visible")},hide:function(e){e=z(e)?e:function(){},(k.is.visible()||k.is.animating())&&!1!==r.onHide.call(b)&&(k.debug("Hiding sidebar",e),k.refreshSidebars(),k.pullPage(function(){e.call(b),r.onHidden.call(b)}),r.onChange.call(b))},othersAnimating:function(){return 0<u.not(l).filter("."+s.animating).length},othersVisible:function(){return 0<u.not(l).filter("."+s.visible).length},othersActive:function(){return k.othersVisible()||k.othersAnimating()},hideOthers:function(e){let i=u.not(l).filter("."+s.visible),n=i.length,t=0;e=e||function(){},i.sidebar("hide",function(){++t===n&&e()})},toggle:function(){k.verbose("Determining toggled direction"),k.is.hidden()?k.show():k.hide()},pushPage:function(i){var e,n=k.get.transition();let t="overlay"===n||k.othersActive()?l:h,o;i=z(i)?i:function(){},r.returnScroll&&(y=(d?A:c).scrollTop()),"scale down"===r.transition&&k.scrollToTop(),k.bind.scrollLock(),k.set.transition(n),k.repaint(),n=function(){k.bind.clickaway(),k.add.inlineCSS(),k.set.animating(),k.set.visible()},e=function(){k.set.dimmed()},o=function(e){e.target===t[0]&&(t.off("transitionend"+v,o),k.remove.animating(),i.call(b))},t.off("transitionend"+v),t.on("transitionend"+v,o),requestAnimationFrame(n),r.dimPage&&!k.othersVisible()&&requestAnimationFrame(e)},pullPage:function(i){let n=k.get.transition(),t="overlay"===n||k.othersActive()?l:h;var e;let o;i=z(i)?i:function(){},k.verbose("Removing context push state",k.get.direction()),k.unbind.clickaway(),k.unbind.scrollLock(),e=function(){k.set.transition(n),k.set.animating(),r.dimPage&&!k.othersVisible()&&k.set.closing(),k.remove.visible()},o=function(e){e.target===t[0]&&(t.off("transitionend"+v,o),k.remove.animating(),k.remove.closing(),k.remove.transition(),k.remove.inlineCSS(),"scale down"!==n&&!r.returnScroll||k.scrollBack(),r.dimPage&&!k.othersVisible()&&h.removeClass(s.dimmed),i.call(b))},t.off("transitionend"+v),t.on("transitionend"+v,o),requestAnimationFrame(e)},scrollToTop:function(){k.verbose("Scrolling to top of page to avoid animation issues"),l.scrollTop(0),(d?A:c)[0].scrollTo(0,0)},scrollBack:function(){k.verbose("Scrolling back to original page position"),(d?A:c)[0].scrollTo(0,y)},clear:{cache:function(){k.verbose("Clearing cached dimensions"),k.cache={}}},set:{bodyMargin:function(){let n=k.can.leftBodyScrollbar()?"left":"right";c.css((d?"margin-":"padding-")+n,C+"px"),c.find(i.bodyFixed.replace("right",n)).each(function(){let e=j(this);var i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"calc("+e.css(i)+" + "+C+"px)")})},dimmerStyles:function(){r.blurring?h.addClass(s.blurring):h.removeClass(s.blurring)},pushed:function(){c.addClass(s.pushed)},pushable:function(){c.addClass(s.pushable)},dimmed:function(){h.addClass(s.dimmed)},active:function(){l.addClass(s.active)},animating:function(){l.addClass(s.animating)},closing:function(){h.addClass(s.closing)},transition:function(e){e=e||k.get.transition(),l.addClass(e)},direction:function(e){e=e||k.get.direction(),l.addClass(s[e])},visible:function(){l.addClass(s.visible)},overlay:function(){l.addClass(s.overlay)}},remove:{inlineCSS:function(){k.debug("Removing inline css styles",g),g&&0<g.length&&g.remove()},pushed:function(){c.removeClass(s.pushed)},pushable:function(){c.removeClass(s.pushable)},active:function(){l.removeClass(s.active)},animating:function(){l.removeClass(s.animating)},closing:function(){h.removeClass(s.closing)},transition:function(e){e=e||k.get.transition(),l.removeClass(e)},direction:function(e){e=e||k.get.direction(),l.removeClass(s[e])},visible:function(){l.removeClass(s.visible)},overlay:function(){l.removeClass(s.overlay)}},restore:{bodyMargin:function(){let n=k.can.leftBodyScrollbar()?"left":"right";c.css((d?"margin-":"padding-")+n,0===x?"":S),c.find(i.bodyFixed.replace("right",n)).each(function(){let e=j(this);var i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"")})}},get:{direction:function(){return l.hasClass(s.top)?s.top:l.hasClass(s.right)?s.right:l.hasClass(s.bottom)?s.bottom:s.left},transition:function(){var e=k.get.direction(),e=k.is.mobile()?"auto"===r.mobileTransition?r.defaultTransition.mobile[e]:r.mobileTransition:"auto"===r.transition?r.defaultTransition.computer[e]:r.transition;return k.verbose("Determined transition",e),e}},has:{scrollbar:function(){return d||"hidden"!==c.css("overflow-y")}},is:{safari:function(){return void 0===k.cache.isSafari&&(k.cache.isSafari=/constructor/i.test(V.HTMLElement)||!!V.ApplePaySession),k.cache.isSafari},firefox:function(){return void 0===k.cache.isFirefox&&(k.cache.isFirefox=!!V.InstallTrigger),k.cache.isFirefox},iframe:function(){return!(self===top)},mobile:function(){let e=navigator.userAgent;return e.match(n.mobile)?(k.verbose("Browser was found to be mobile",e),!0):(k.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!k.is.visible()},visible:function(){return l.hasClass(s.visible)},open:function(){return k.is.visible()},closed:function(){return k.is.hidden()},vertical:function(){return l.hasClass(s.top)},animating:function(){return c.hasClass(s.animating)},rtl:function(){return void 0===k.cache.isRTL&&(k.cache.isRTL="rtl"===l.attr("dir")||"rtl"===l.css("direction")||"rtl"===P.attr("dir")||"rtl"===P.css("direction")||"rtl"===c.attr("dir")||"rtl"===c.css("direction")),k.cache.isRTL}},setting:function(e,i){if(k.debug("Changing setting",e,i),j.isPlainObject(e))j.extend(!0,r,e);else{if(void 0===i)return r[e];j.isPlainObject(r[e])?j.extend(!0,r[e],i):r[e]=i}},internal:function(e,i){if(j.isPlainObject(e))j.extend(!0,k,e);else{if(void 0===i)return k[e];k[e]=i}},debug:function(){!r.silent&&r.debug&&(r.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,r.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),k.verbose.apply(console,arguments)))},error:function(){r.silent||(k.error=Function.prototype.bind.call(console.error,console,r.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var i,n;r.performance&&(n=(i=Date.now())-(M||i),M=i,B.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(function(){k.performance.display()},500)},display:function(){var e=r.name+":";let n=0;M=!1,clearTimeout(k.performance.timer),j.each(B,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",0<B.length&&(console.groupCollapsed(e),console.table?console.table(B):j.each(B,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),B=[]}},invoke:function(t,e,i){let o=m,r,s,n;return e=e||L,i=i||b,"string"==typeof t&&void 0!==o&&(t=t.split(/[ .]/),r=t.length-1,j.each(t,function(e,i){var n=e!==r?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(j.isPlainObject(o[n])&&e!==r)o=o[n];else{if(void 0!==o[n])return s=o[n],!1;{if(!j.isPlainObject(o[i])||e===r)return void 0!==o[i]?s=o[i]:k.error(a.method,t),!1;o=o[i]}}})),z(s)?n=s.apply(i,e):void 0!==s&&(n=s),Array.isArray(R)?R.push(n):void 0!==R?R=[R,n]:void 0!==n&&(R=n),s}},E?(void 0===m&&k.initialize(),k.invoke(O)):(void 0!==m&&k.invoke("destroy"),k.initialize())}),void 0!==R?R:this},j.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",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:{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.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.41+1ceee9c - Site
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -20,31 +20,29 @@
|
|
20
20
|
: globalThis;
|
21
21
|
|
22
22
|
$.fn.site = function (parameters) {
|
23
|
-
|
24
|
-
|
25
|
-
performance = [],
|
23
|
+
let time = Date.now();
|
24
|
+
let performance = [];
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
let query = arguments[0];
|
27
|
+
let methodInvoked = typeof query === 'string';
|
28
|
+
let queryArguments = [].slice.call(arguments, 1);
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
let settings = $.isPlainObject(parameters)
|
31
|
+
? $.extend(true, {}, $.site.settings, parameters)
|
32
|
+
: $.extend({}, $.site.settings);
|
34
33
|
|
35
|
-
|
36
|
-
|
34
|
+
let namespace = settings.namespace;
|
35
|
+
let error = settings.error;
|
37
36
|
|
38
|
-
|
37
|
+
let moduleNamespace = 'module-' + namespace;
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
let $document = $(document);
|
40
|
+
let $module = $document;
|
41
|
+
let element = this;
|
42
|
+
let instance = $module.data(moduleNamespace);
|
44
43
|
|
45
|
-
|
46
|
-
|
47
|
-
;
|
44
|
+
let module;
|
45
|
+
let returnedValue;
|
48
46
|
module = {
|
49
47
|
|
50
48
|
initialize: function () {
|
@@ -55,8 +53,7 @@
|
|
55
53
|
module.verbose('Storing instance of site', module);
|
56
54
|
instance = module;
|
57
55
|
$module
|
58
|
-
.data(moduleNamespace, module)
|
59
|
-
;
|
56
|
+
.data(moduleNamespace, module);
|
60
57
|
},
|
61
58
|
|
62
59
|
normalize: function () {
|
@@ -78,9 +75,7 @@
|
|
78
75
|
|
79
76
|
enabled: {
|
80
77
|
modules: function (modules) {
|
81
|
-
|
82
|
-
enabledModules = []
|
83
|
-
;
|
78
|
+
let enabledModules = [];
|
84
79
|
modules = modules || settings.modules;
|
85
80
|
$.each(modules, function (index, name) {
|
86
81
|
if (module.moduleExists(name)) {
|
@@ -94,9 +89,7 @@
|
|
94
89
|
|
95
90
|
disabled: {
|
96
91
|
modules: function (modules) {
|
97
|
-
|
98
|
-
disabledModules = []
|
99
|
-
;
|
92
|
+
let disabledModules = [];
|
100
93
|
modules = modules || settings.modules;
|
101
94
|
$.each(modules, function (index, name) {
|
102
95
|
if (!module.moduleExists(name)) {
|
@@ -119,12 +112,10 @@
|
|
119
112
|
? modifyExisting
|
120
113
|
: true;
|
121
114
|
$.each(modules, function (index, name) {
|
122
|
-
|
123
|
-
namespace
|
124
|
-
|
125
|
-
|
126
|
-
$existingModules
|
127
|
-
;
|
115
|
+
let namespace = module.moduleExists(name)
|
116
|
+
? $.fn[name].settings.namespace || false
|
117
|
+
: true;
|
118
|
+
let $existingModules;
|
128
119
|
if (module.moduleExists(name)) {
|
129
120
|
module.verbose('Changing default setting', setting, value, name);
|
130
121
|
$.fn[name].settings[setting] = value;
|
@@ -146,9 +137,7 @@
|
|
146
137
|
? modifyExisting
|
147
138
|
: true;
|
148
139
|
$.each(modules, function (index, name) {
|
149
|
-
|
150
|
-
$existingModules
|
151
|
-
;
|
140
|
+
let $existingModules;
|
152
141
|
if (module.moduleExists(name)) {
|
153
142
|
module.verbose('Changing default setting', newSettings, name);
|
154
143
|
$.extend(true, $.fn[name].settings, newSettings);
|
@@ -224,8 +213,7 @@
|
|
224
213
|
destroy: function () {
|
225
214
|
module.verbose('Destroying previous site for', $module);
|
226
215
|
$module
|
227
|
-
.removeData(moduleNamespace)
|
228
|
-
;
|
216
|
+
.removeData(moduleNamespace);
|
229
217
|
},
|
230
218
|
|
231
219
|
cache: {},
|
@@ -274,11 +262,9 @@
|
|
274
262
|
},
|
275
263
|
performance: {
|
276
264
|
log: function (message) {
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
previousTime
|
281
|
-
;
|
265
|
+
let currentTime;
|
266
|
+
let executionTime;
|
267
|
+
let previousTime;
|
282
268
|
if (settings.performance) {
|
283
269
|
currentTime = Date.now();
|
284
270
|
previousTime = time || currentTime;
|
@@ -297,10 +283,8 @@
|
|
297
283
|
}, 500);
|
298
284
|
},
|
299
285
|
display: function () {
|
300
|
-
|
301
|
-
|
302
|
-
totalTime = 0
|
303
|
-
;
|
286
|
+
let title = settings.name + ':';
|
287
|
+
let totalTime = 0;
|
304
288
|
time = false;
|
305
289
|
clearTimeout(module.performance.timer);
|
306
290
|
$.each(performance, function (index, data) {
|
@@ -322,22 +306,19 @@
|
|
322
306
|
},
|
323
307
|
},
|
324
308
|
invoke: function (query, passedArguments, context) {
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
response
|
330
|
-
;
|
309
|
+
let object = instance;
|
310
|
+
let maxDepth;
|
311
|
+
let found;
|
312
|
+
let response;
|
331
313
|
passedArguments = passedArguments || queryArguments;
|
332
314
|
context = context || element;
|
333
315
|
if (typeof query === 'string' && object !== undefined) {
|
334
316
|
query = query.split(/[ .]/);
|
335
317
|
maxDepth = query.length - 1;
|
336
318
|
$.each(query, function (depth, value) {
|
337
|
-
|
319
|
+
let camelCaseValue = depth !== maxDepth
|
338
320
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
339
|
-
: query
|
340
|
-
;
|
321
|
+
: query;
|
341
322
|
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
342
323
|
object = object[camelCaseValue];
|
343
324
|
} else if (object[camelCaseValue] !== undefined) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.10.0-beta.
|
2
|
+
* # Fomantic UI - 2.10.0-beta.41+1ceee9c
|
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){
|
11
|
+
!function(b,p,v){"use strict";p=void 0!==p&&p.Math===Math?p:globalThis,b.fn.site=function(e){let t=Date.now(),i=[];var n=e,o="string"==typeof n;let l=[].slice.call(arguments,1),r=b.isPlainObject(e)?b.extend(!0,{},b.site.settings,e):b.extend({},b.site.settings),s=r.namespace,a=r.error,c="module-"+s,u=b(v),d=this,f=u.data(c),g,m;return g={initialize:function(){g.instantiate()},instantiate:function(){g.verbose("Storing instance of site",g),f=g,u.data(c,g)},normalize:function(){},fix:{consoleClear:function(){g.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){let o=[];return e=e||r.modules,b.each(e,function(e,n){g.moduleExists(n)&&o.push(n)}),o}},disabled:{modules:function(e){let o=[];return e=e||r.modules,b.each(e,function(e,n){g.moduleExists(n)||o.push(n)}),o}},change:{setting:function(i,s,e,c){e="string"==typeof e?"all"===e?r.modules:[e]:e||r.modules,c=void 0===c||c,b.each(e,function(e,n){var o=!g.moduleExists(n)||(b.fn[n].settings.namespace||!1);let t;g.moduleExists(n)&&(g.verbose("Changing default setting",i,s,n),b.fn[n].settings[i]=s,c&&o&&0<(t=b(":data(module-"+o+")")).length&&(g.verbose("Modifying existing settings",t),t[n]("setting",i,s)))})},settings:function(t,e,i){e="string"==typeof e?[e]:e||r.modules,i=void 0===i||i,b.each(e,function(e,n){let o;g.moduleExists(n)&&(g.verbose("Changing default setting",t,n),b.extend(!0,b.fn[n].settings,t),i&&s&&0<(o=b(":data(module-"+s+")")).length&&(g.verbose("Modifying existing settings",o),o[n]("setting",t)))})}},enable:{console:function(){g.console(!0)},debug:function(e,n){e=e||r.modules,g.debug("Enabling debug for modules",e),g.change.setting("debug",!0,e,n)},verbose:function(e,n){e=e||r.modules,g.debug("Enabling verbose debug for modules",e),g.change.setting("verbose",!0,e,n)}},disable:{console:function(){g.console(!1)},debug:function(e,n){e=e||r.modules,g.debug("Disabling debug for modules",e),g.change.setting("debug",!1,e,n)},verbose:function(e,n){e=e||r.modules,g.debug("Disabling verbose debug for modules",e),g.change.setting("verbose",!1,e,n)}},console:function(e){e?void 0===f.cache.console?g.error(a.console):(g.debug("Restoring console function"),p.console=f.cache.console):(g.debug("Disabling console function"),f.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(){g.verbose("Destroying previous site for",u),u.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,g,e);else{if(void 0===n)return g[e];g[e]=n}},debug:function(){r.debug&&(r.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,r.name+":"),g.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),g.verbose.apply(console,arguments)))},error:function(){g.error=Function.prototype.bind.call(console.error,console,r.name+":"),g.error.apply(console,arguments)},performance:{log:function(e){var n,o;r.performance&&(o=(n=Date.now())-(t||n),t=n,i.push({Element:d,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":o})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(function(){g.performance.display()},500)},display:function(){var e=r.name+":";let o=0;t=!1,clearTimeout(g.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){let i=f,s,c,o;var r;return e=e||l,n=n||d,"string"==typeof t&&void 0!==i&&(t=t.split(/[ .]/),s=t.length-1,b.each(t,function(e,n){var o=e!==s?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(b.isPlainObject(i[o])&&e!==s)i=i[o];else{if(void 0!==i[o])return c=i[o],!1;{if(!b.isPlainObject(i[n])||e===s)return void 0!==i[n]?c=i[n]:g.error(a.method,t),!1;i=i[n]}}})),"function"==typeof(r=c)&&"number"!=typeof r.nodeType?o=c.apply(n,e):void 0!==c&&(o=c),Array.isArray(m)?m.push(o):void 0!==m?m=[m,o]:void 0!==o&&(m=o),c}},o?(void 0===f&&g.initialize(),g.invoke(n)):(void 0!==f&&g.destroy(),g.initialize()),void 0!==m?m: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);
|