rails-active-ui 0.1.0
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.
- checksums.yaml +7 -0
- data/Rakefile +6 -0
- data/app/assets/stylesheets.css +73555 -0
- data/app/components/accordion_component.rb +34 -0
- data/app/components/ad_component.rb +28 -0
- data/app/components/api_component.rb +24 -0
- data/app/components/breadcrumb_component.rb +26 -0
- data/app/components/button_component.rb +49 -0
- data/app/components/calendar_component.rb +34 -0
- data/app/components/card_component.rb +56 -0
- data/app/components/checkbox_component.rb +41 -0
- data/app/components/column_component.rb +62 -0
- data/app/components/comment_component.rb +45 -0
- data/app/components/concerns/alignable.rb +21 -0
- data/app/components/concerns/attachable.rb +16 -0
- data/app/components/concerns/orientable.rb +21 -0
- data/app/components/concerns/positionable.rb +21 -0
- data/app/components/concerns/sizeable.rb +18 -0
- data/app/components/container_component.rb +23 -0
- data/app/components/dimmer_component.rb +30 -0
- data/app/components/divider_component.rb +30 -0
- data/app/components/dropdown_component.rb +63 -0
- data/app/components/embed_component.rb +32 -0
- data/app/components/emoji_component.rb +15 -0
- data/app/components/feed_component.rb +22 -0
- data/app/components/flag_component.rb +15 -0
- data/app/components/flyout_component.rb +41 -0
- data/app/components/form_component.rb +39 -0
- data/app/components/grid_component.rb +85 -0
- data/app/components/h_stack_component.rb +67 -0
- data/app/components/header_component.rb +60 -0
- data/app/components/icon_component.rb +41 -0
- data/app/components/image_component.rb +46 -0
- data/app/components/input_component.rb +52 -0
- data/app/components/item_component.rb +39 -0
- data/app/components/item_group_component.rb +30 -0
- data/app/components/label_component.rb +49 -0
- data/app/components/link_component.rb +23 -0
- data/app/components/list_component.rb +39 -0
- data/app/components/loader_component.rb +33 -0
- data/app/components/menu_component.rb +64 -0
- data/app/components/menu_item_component.rb +52 -0
- data/app/components/message_component.rb +54 -0
- data/app/components/modal_component.rb +50 -0
- data/app/components/nag_component.rb +25 -0
- data/app/components/overlay_component.rb +16 -0
- data/app/components/placeholder_component.rb +39 -0
- data/app/components/popup_component.rb +31 -0
- data/app/components/progress_component.rb +48 -0
- data/app/components/pusher_component.rb +18 -0
- data/app/components/rail_component.rb +31 -0
- data/app/components/rating_component.rb +41 -0
- data/app/components/reset_component.rb +12 -0
- data/app/components/reveal_component.rb +39 -0
- data/app/components/row_component.rb +39 -0
- data/app/components/search_component.rb +44 -0
- data/app/components/segment_component.rb +57 -0
- data/app/components/segment_group_component.rb +36 -0
- data/app/components/shape_component.rb +25 -0
- data/app/components/sidebar_component.rb +33 -0
- data/app/components/site_component.rb +12 -0
- data/app/components/slider_component.rb +46 -0
- data/app/components/state_component.rb +25 -0
- data/app/components/statistic_component.rb +43 -0
- data/app/components/step_component.rb +56 -0
- data/app/components/step_group_component.rb +38 -0
- data/app/components/sticky_component.rb +22 -0
- data/app/components/sub_header_component.rb +15 -0
- data/app/components/sub_menu_component.rb +24 -0
- data/app/components/tab_component.rb +24 -0
- data/app/components/table_cell_component.rb +60 -0
- data/app/components/table_component.rb +160 -0
- data/app/components/table_row_component.rb +43 -0
- data/app/components/text_component.rb +73 -0
- data/app/components/toast_component.rb +36 -0
- data/app/components/transition_component.rb +32 -0
- data/app/components/v_stack_component.rb +31 -0
- data/app/components/visibility_component.rb +22 -0
- data/app/helpers/component_helper.rb +109 -0
- data/app/helpers/fui_helper.rb +53 -0
- data/app/javascript/accordion.js +547 -0
- data/app/javascript/accordion.min.js +11 -0
- data/app/javascript/api.js +1112 -0
- data/app/javascript/api.min.js +11 -0
- data/app/javascript/calendar.js +1960 -0
- data/app/javascript/calendar.min.js +11 -0
- data/app/javascript/checkbox.js +819 -0
- data/app/javascript/checkbox.min.js +11 -0
- data/app/javascript/dimmer.js +686 -0
- data/app/javascript/dimmer.min.js +11 -0
- data/app/javascript/dropdown.js +4019 -0
- data/app/javascript/dropdown.min.js +11 -0
- data/app/javascript/embed.js +646 -0
- data/app/javascript/embed.min.js +11 -0
- data/app/javascript/flyout.js +1405 -0
- data/app/javascript/flyout.min.js +11 -0
- data/app/javascript/form.js +2070 -0
- data/app/javascript/form.min.js +11 -0
- data/app/javascript/jquery.js +10716 -0
- data/app/javascript/jquery.min.js +2 -0
- data/app/javascript/modal.js +1507 -0
- data/app/javascript/modal.min.js +11 -0
- data/app/javascript/nag.js +522 -0
- data/app/javascript/nag.min.js +11 -0
- data/app/javascript/popup.js +1457 -0
- data/app/javascript/popup.min.js +11 -0
- data/app/javascript/progress.js +922 -0
- data/app/javascript/progress.min.js +11 -0
- data/app/javascript/rating.js +496 -0
- data/app/javascript/rating.min.js +11 -0
- data/app/javascript/search.js +1519 -0
- data/app/javascript/search.min.js +11 -0
- data/app/javascript/shape.js +721 -0
- data/app/javascript/shape.min.js +11 -0
- data/app/javascript/sidebar.js +952 -0
- data/app/javascript/sidebar.min.js +11 -0
- data/app/javascript/site.js +415 -0
- data/app/javascript/site.min.js +11 -0
- data/app/javascript/slider.js +1449 -0
- data/app/javascript/slider.min.js +11 -0
- data/app/javascript/state.js +653 -0
- data/app/javascript/state.min.js +11 -0
- data/app/javascript/sticky.js +852 -0
- data/app/javascript/sticky.min.js +11 -0
- data/app/javascript/tab.js +867 -0
- data/app/javascript/tab.min.js +11 -0
- data/app/javascript/toast.js +916 -0
- data/app/javascript/toast.min.js +11 -0
- data/app/javascript/transition.js +955 -0
- data/app/javascript/transition.min.js +11 -0
- data/app/javascript/ui/controllers/fui_accordion_controller.js +45 -0
- data/app/javascript/ui/controllers/fui_api_controller.js +80 -0
- data/app/javascript/ui/controllers/fui_calendar_controller.js +66 -0
- data/app/javascript/ui/controllers/fui_checkbox_controller.js +48 -0
- data/app/javascript/ui/controllers/fui_dimmer_controller.js +45 -0
- data/app/javascript/ui/controllers/fui_dropdown_controller.js +68 -0
- data/app/javascript/ui/controllers/fui_embed_controller.js +49 -0
- data/app/javascript/ui/controllers/fui_flyout_controller.js +49 -0
- data/app/javascript/ui/controllers/fui_form_controller.js +62 -0
- data/app/javascript/ui/controllers/fui_modal_controller.js +61 -0
- data/app/javascript/ui/controllers/fui_nag_controller.js +52 -0
- data/app/javascript/ui/controllers/fui_popup_controller.js +58 -0
- data/app/javascript/ui/controllers/fui_progress_controller.js +60 -0
- data/app/javascript/ui/controllers/fui_rating_controller.js +49 -0
- data/app/javascript/ui/controllers/fui_search_controller.js +76 -0
- data/app/javascript/ui/controllers/fui_shape_controller.js +45 -0
- data/app/javascript/ui/controllers/fui_sidebar_controller.js +48 -0
- data/app/javascript/ui/controllers/fui_site_controller.js +29 -0
- data/app/javascript/ui/controllers/fui_slider_controller.js +53 -0
- data/app/javascript/ui/controllers/fui_state_controller.js +63 -0
- data/app/javascript/ui/controllers/fui_sticky_controller.js +50 -0
- data/app/javascript/ui/controllers/fui_tab_controller.js +57 -0
- data/app/javascript/ui/controllers/fui_toast_controller.js +60 -0
- data/app/javascript/ui/controllers/fui_transition_controller.js +60 -0
- data/app/javascript/ui/controllers/fui_visibility_controller.js +55 -0
- data/app/javascript/ui/index.js +114 -0
- data/app/javascript/visibility.js +1196 -0
- data/app/javascript/visibility.min.js +11 -0
- data/app/lib/component.rb +63 -0
- data/config/importmap.rb +27 -0
- data/config/initializers/ruby_template_handler.rb +31 -0
- data/config/routes.rb +2 -0
- data/lib/tasks/ui_tasks.rake +4 -0
- data/lib/ui/engine.rb +27 -0
- data/lib/ui/version.rb +3 -0
- data/lib/ui.rb +6 -0
- metadata +220 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* # Fomantic UI - 2.9.4
|
|
3
|
+
* https://github.com/fomantic/Fomantic-UI
|
|
4
|
+
* https://fomantic-ui.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2026 Contributors
|
|
7
|
+
* Released under the MIT license
|
|
8
|
+
* https://opensource.org/licenses/MIT
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
!function(k,z,T){"use strict";z=void 0!==z&&z.Math===Math?z:globalThis,k.fn.sticky=function(...e){const t=k(this);k(T);let p=Date.now(),b=[];const v=e[0],x="string"==typeof v,C=e.slice(1),S=function(e,t){let o;return[z,T].includes(e)?o=k(e):0===(o=k(t.document).find(e)).length&&(o=t.frameElement?S(e,t.parent):z),o};let y;return t.each(function(){const c=k.isPlainObject(v)?k.extend(!0,{},k.fn.sticky.settings,v):k.extend({},k.fn.sticky.settings),t=c.className;var e=c.namespace;const l=c.error,o="."+e,n="module-"+e,i=k(this),s=k(z),a=S(c.scrollContext,z);let r,f,m=i.data(n);const d=this;let u,h;const g={initialize:function(){g.determineContainer(),g.determineContext(),g.verbose("Initializing sticky",c,r),g.save.positions(),g.checkErrors(),g.bind.events(),c.observeChanges&&g.observeChanges(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of module",g),m=g,i.data(n,g)},destroy:function(){g.verbose("Destroying previous instance"),g.reset(),u&&u.disconnect(),h&&h.disconnect(),s.off("load"+o,g.event.load).off("resize"+o,g.event.resize),a.off("scrollchange"+o,g.event.scrollchange),i.removeData(n)},observeChanges:function(){u=new MutationObserver(g.event.documentChanged),h=new MutationObserver(g.event.changed),u.observe(T,{childList:!0,subtree:!0}),h.observe(d,{childList:!0,subtree:!0}),h.observe(f[0],{childList:!0,subtree:!0}),g.debug("Setting up mutation observer",h)},determineContainer:function(){r=c.container?S(c.container,z):i.offsetParent()},determineContext:function(){0===(f=c.context?S(c.context,z):r).length&&g.error(l.invalidContext,c.context,i)},checkErrors:function(){g.is.hidden()&&g.error(l.visible,i),g.cache.element.height>g.cache.context.height&&(g.reset(),g.error(l.elementSize,i))},bind:{events:function(){s.on("load"+o,g.event.load).on("resize"+o,g.event.resize),a.off("scroll"+o).on("scroll"+o,g.event.scroll).on("scrollchange"+o,g.event.scrollchange)}},event:{changed:function(e){clearTimeout(g.timer),g.timer=setTimeout(function(){g.verbose("DOM tree modified, updating sticky menu",e),g.refresh()},100)},documentChanged:function(e){for(const t of e)for(const o of t.removedNodes)(o===d||0<k(o).find(d).length)&&(g.debug("Element removed from DOM, tearing down events"),g.destroy())},load:function(){g.verbose("Page contents finished loading"),requestAnimationFrame(g.refresh)},resize:function(){g.verbose("Window resized"),requestAnimationFrame(g.refresh)},scroll:function(){requestAnimationFrame(function(){a.triggerHandler("scrollchange"+o,a.scrollTop())})},scrollchange:function(e,t){g.stick(t),c.onScroll.call(d)}},refresh:function(e){g.reset(),c.context||g.determineContext(),e&&g.determineContainer(),g.save.positions(),g.stick(),c.onReposition.call(d)},supports:{sticky:function(){const e=k("<div/>");return e.addClass(t.supported),e.css("position").match("sticky")}},save:{lastScroll:function(e){g.lastScroll=e},elementScroll:function(e){g.elementScroll=e},positions:function(){const e={height:a.height()},t={margin:{top:Number.parseInt(i.css("margin-top"),10),bottom:Number.parseInt(i.css("margin-bottom"),10)},offset:i.offset(),width:i.outerWidth(),height:i.outerHeight()},o={offset:f.offset(),height:f.outerHeight()};g.is.standardScroll()||(g.debug("Non-standard scroll. Removing scroll offset from element offset"),e.top=a.scrollTop(),e.left=a.scrollLeft(),t.offset.top+=e.top,o.offset.top+=e.top,t.offset.left+=e.left,o.offset.left+=e.left),g.cache={fits:t.height+c.offset<=e.height,sameHeight:t.height===o.height,scrollContext:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:o.offset.top,height:o.height,bottom:o.offset.top+o.height}},g.set.containerSize(),g.stick(),g.debug("Caching element positions",g.cache)}},get:{direction:function(e=a.scrollTop()){let t="down";return t=g.lastScroll&&g.lastScroll>e?"up":t},scrollChange:function(e=a.scrollTop()){return g.lastScroll?e-g.lastScroll:0},currentElementScroll:function(){return g.elementScroll||(g.is.top()?Math.abs(Number.parseInt(i.css("top"),10))||0:Math.abs(Number.parseInt(i.css("bottom"),10))||0)},elementScroll:function(e=a.scrollTop()){var t=g.cache.element,o=g.cache.scrollContext,e=g.get.scrollChange(e),t=t.height-o.height+c.offset;let n=g.get.currentElementScroll();o=n+e;return n=g.cache.fits||o<0?0:t<o?t:o}},remove:{lastScroll:function(){delete g.lastScroll},elementScroll:function(){delete g.elementScroll},minimumSize:function(){r.css("min-height","")},offset:function(){i.css("margin-top","")}},set:{offset:function(){g.verbose("Setting offset on element",c.offset),i.css("margin-top",c.offset)},containerSize:function(){var e=r[0].tagName;"HTML"===e||"body"===e?g.determineContainer():((e=Math.max(g.cache.context.height,g.cache.element.height))-r.outerHeight()>c.jitter?(g.debug("Context is taller than container. Specifying exact height for container",g.cache.context.height),r.css({height:e})):r.css({height:""}),Math.abs(r.outerHeight()-g.cache.context.height)>c.jitter&&(g.debug("Context has padding, specifying exact height for container",g.cache.context.height),r.css({height:g.cache.context.height})))},minimumSize:function(){var e=g.cache.element;r.css("min-height",e.height)},scroll:function(e){g.debug("Setting scroll on element",e),g.elementScroll!==e&&(g.is.top()&&i.css("bottom","").css("top",-e+"px"),g.is.bottom()&&i.css("top","").css("bottom",e+"px"))},size:function(){0!==g.cache.element.height&&0!==g.cache.element.width&&(d.style.setProperty("width",g.cache.element.width+"px","important"),d.style.setProperty("height",g.cache.element.height+"px","important"))}},is:{standardScroll:function(){return a[0]===z},top:function(){return i.hasClass(t.top)},bottom:function(){return i.hasClass(t.bottom)},initialPosition:function(){return!g.is.fixed()&&!g.is.bound()},hidden:function(){return!i.is(":visible")},bound:function(){return i.hasClass(t.bound)},fixed:function(){return i.hasClass(t.fixed)}},stick:function(e=a.scrollTop()){var t=g.cache,o=t.fits,n=t.sameHeight,i=t.element,s=t.scrollContext,t=t.context,r=g.is.bottom()&&c.pushing?c.bottomOffset:c.offset,e={top:e+r,bottom:e+r+s.height},r=o?0:g.get.elementScroll(e.top),s=!o;0===i.height||n||(g.is.initialPosition()?e.top>=t.bottom?(g.debug("Initial element position is bottom of container"),g.bindBottom()):e.top>i.top&&(i.height+e.top-r>=t.bottom&&i.height<t.height?(g.debug("Initial element position is bottom of container"),g.bindBottom()):(g.debug("Initial element position is fixed"),g.fixTop())):g.is.fixed()?g.is.top()?e.top<=i.top?(g.debug("Fixed element reached top of container"),g.setInitialPosition()):i.height+e.top-r>=t.bottom?(g.debug("Fixed element reached bottom of container"),g.bindBottom()):s&&(g.set.scroll(r),g.save.lastScroll(e.top),g.save.elementScroll(r)):g.is.bottom()&&(e.bottom-i.height<=i.top?(g.debug("Bottom fixed rail has reached top of container"),g.setInitialPosition()):e.bottom>=t.bottom?(g.debug("Bottom fixed rail has reached bottom of container"),g.bindBottom()):s&&(g.set.scroll(r),g.save.lastScroll(e.top),g.save.elementScroll(r))):g.is.bottom()&&(e.top<=i.top?(g.debug("Jumped from bottom fixed to top fixed, most likely used home/end button"),g.setInitialPosition()):c.pushing?g.is.bound()&&e.bottom<=t.bottom&&(g.debug("Fixing bottom attached element to bottom of browser."),g.fixBottom()):g.is.bound()&&e.top<=t.bottom-i.height&&(g.debug("Fixing bottom attached element to top of browser."),g.fixTop())))},bindTop:function(){g.debug("Binding element to top of parent container"),g.remove.offset(),c.setSize&&g.set.size(),i.css({left:"",top:"",marginBottom:""}).removeClass(t.fixed).removeClass(t.bottom).addClass(t.bound).addClass(t.top),c.onTop.call(d),c.onUnstick.call(d)},bindBottom:function(){g.debug("Binding element to bottom of parent container"),g.remove.offset(),c.setSize&&g.set.size(),i.css({left:"",top:""}).removeClass(t.fixed).removeClass(t.top).addClass(t.bound).addClass(t.bottom),c.onBottom.call(d),c.onUnstick.call(d)},setInitialPosition:function(){g.debug("Returning to initial position"),g.unfix(),g.unbind()},fixTop:function(){g.debug("Fixing element to top of page"),c.setSize&&g.set.size(),g.set.minimumSize(),g.set.offset(),i.css({left:g.cache.element.left,bottom:"",marginBottom:""}).removeClass(t.bound).removeClass(t.bottom).addClass(t.fixed).addClass(t.top),c.onStick.call(d)},fixBottom:function(){g.debug("Sticking element to bottom of page"),c.setSize&&g.set.size(),g.set.minimumSize(),g.set.offset(),i.css({left:g.cache.element.left,bottom:"",marginBottom:""}).removeClass(t.bound).removeClass(t.top).addClass(t.fixed).addClass(t.bottom),c.onStick.call(d)},unbind:function(){g.is.bound()&&(g.debug("Removing container bound position on element"),g.remove.offset(),i.removeClass(t.bound).removeClass(t.top).removeClass(t.bottom))},unfix:function(){g.is.fixed()&&(g.debug("Removing fixed position on element"),g.remove.minimumSize(),g.remove.offset(),i.removeClass(t.fixed).removeClass(t.top).removeClass(t.bottom),c.onUnstick.call(d))},reset:function(){g.debug("Resetting elements position"),g.unbind(),g.unfix(),g.resetCSS(),g.remove.offset(),g.remove.lastScroll()},resetCSS:function(){i.css({width:"",height:""}),r.css({height:""})},setting:function(e,t){if(k.isPlainObject(e))k.extend(!0,c,e);else{if(void 0===t)return c[e];c[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,g,e);else{if(void 0===t)return g[e];g[e]=t}},debug:function(...e){!c.silent&&c.debug&&(c.performance?g.performance.log(e):(g.debug=Function.prototype.bind.call(console.info,console,c.name+":"),g.debug.apply(console,e)))},verbose:function(...e){!c.silent&&c.verbose&&c.debug&&(c.performance?g.performance.log(e):(g.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),g.verbose.apply(console,e)))},error:function(...e){c.silent||(g.error=Function.prototype.bind.call(console.error,console,c.name+":"),g.error.apply(console,e))},performance:{log:function(e){var t,o;c.performance&&(o=(t=Date.now())-(p||t),p=t,b.push({Name:e[0],Arguments:e.slice(1),Element:d,"Execution Time":o})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(function(){g.performance.display()},0)},display:function(){var e=c.name+":";let o=0;p=!1,clearTimeout(g.performance.timer),k.each(b,function(e,t){o+=t["Execution Time"]}),e+=" "+o+"ms",0<b.length&&(console.groupCollapsed(e),console.table(b),console.groupEnd()),b=[]}},invoke:function(n,e=C,t=d){let i=m,s,r,o;var c;return"string"==typeof n&&void 0!==i&&(n=n.split(/[ .]/),s=n.length-1,k.each(n,function(e,t){var o=e!==s?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(k.isPlainObject(i[o])&&e!==s)i=i[o];else{if(void 0!==i[o])return r=i[o],!1;{if(!k.isPlainObject(i[t])||e===s)return void 0!==i[t]?r=i[t]:g.error(l.method,n),!1;i=i[t]}}})),"function"==typeof(c=r)&&"number"!=typeof c.nodeType?o=r.apply(t,e):void 0!==r&&(o=r),Array.isArray(y)?y.push(o):void 0!==y?y=[y,o]:void 0!==o&&(y=o),r}};x?(void 0===m&&g.initialize(),g.invoke(v)):(void 0!==m&&m.invoke("destroy"),g.initialize())}),void 0!==y?y:this},k.fn.sticky.settings={name:"Sticky",namespace:"sticky",silent:!1,debug:!1,verbose:!0,performance:!0,pushing:!1,context:!1,container:!1,scrollContext:z,offset:0,bottomOffset:0,jitter:5,setSize:!0,observeChanges:!1,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{visible:"Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}}}(jQuery,window,document);
|