nfg_ui 0.9.8.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +431 -0
- data/Rakefile +23 -0
- data/app/assets/config/nfg_ui_manifest.js +3 -0
- data/app/assets/images/nfg_ui/app_icon/android-chrome-192x192.png +0 -0
- data/app/assets/images/nfg_ui/app_icon/android-chrome-384x384.png +0 -0
- data/app/assets/images/nfg_ui/app_icon/apple-touch-icon.png +0 -0
- data/app/assets/images/nfg_ui/app_icon/browserconfig.xml.erb +9 -0
- data/app/assets/images/nfg_ui/app_icon/favicon-16x16.png +0 -0
- data/app/assets/images/nfg_ui/app_icon/favicon-32x32.png +0 -0
- data/app/assets/images/nfg_ui/app_icon/favicon.ico +0 -0
- data/app/assets/images/nfg_ui/app_icon/mstile-150x150.png +0 -0
- data/app/assets/images/nfg_ui/app_icon/safari-pinned-tab.svg +38 -0
- data/app/assets/images/nfg_ui/app_icon/site.webmanifest.erb +19 -0
- data/app/assets/images/nfg_ui/email/icons/fa-caret-right.png +0 -0
- data/app/assets/images/nfg_ui/email/icons/fa-facebook.png +0 -0
- data/app/assets/images/nfg_ui/email/icons/fa-linkedin.png +0 -0
- data/app/assets/images/nfg_ui/email/icons/fa-twitter.png +0 -0
- data/app/assets/images/nfg_ui/email/icons/fa-youtube.png +0 -0
- data/app/assets/images/nfg_ui/email/nfg-logo.png +0 -0
- data/app/assets/javascripts/nfg_ui/application.coffee +16 -0
- data/app/assets/javascripts/nfg_ui/collapsible_toggle.coffee +47 -0
- data/app/assets/javascripts/nfg_ui/prevent_clickable_disabled_element.coffee +47 -0
- data/app/assets/javascripts/nfg_ui/vendor/select2.coffee +26 -0
- data/app/assets/javascripts/nfg_ui/vendor/tooltips.coffee +18 -0
- data/app/assets/stylesheets/nfg_ui/bootstrap/application.scss +2 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/_variables.scss +1123 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/application.scss +23 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_alert.scss +2 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_backgrounds.scss +9 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_button-group.scss +8 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_buttons.scss +17 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_card.scss +20 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_custom.scss +20 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_custom_forms.scss +156 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_dropdown.scss +24 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_forms.scss +85 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_media.scss +2 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_nav.scss +22 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_navbar.scss +132 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_progress.scss +3 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_reboot.scss +31 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_tables.scss +7 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_tooltip.scss +5 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_type.scss +82 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_campaign_card.scss +6 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_campaign_preview.scss +25 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_content_section_buttons.scss +11 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_custom_questions_questionnaire.scss +84 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_custom_receipt_language.scss +15 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_email_preview.scss +24 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_interaction.scss +2 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_mobile.scss +4 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_nav_step.scss +95 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_overlay_blocker.scss +49 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_page_header.scss +9 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_product_icons.scss +45 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_redactor.scss +25 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_share_dropdown.scss +53 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_slat.scss +113 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_social_share.scss +44 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_status_indicator.scss +9 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_ticket.scss +12 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_tile.scss +71 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/email/application.scss +38 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/email/foundation_emails/_alignment.scss +93 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/email/foundation_emails/_button.scss +345 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_backgrounds.scss +15 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_layout.scss +33 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_rainbow_bar.scss +47 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss +60 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_typography.scss +6 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/email/settings/_settings.scss +148 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/_variables.scss +1124 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/application.scss +23 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/application.scss +19 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/_badge.scss +6 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/_buttons.scss +43 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/_custom.scss +3 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/_custom_forms.scss +50 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/_forms.scss +12 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/_functions.scss +29 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/_navbar.scss +18 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/_reboot.scss +6 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/_type.scss +16 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/_utilities.scss +8 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/custom/_everyday_default.scss +6 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/nfg_theme/custom/_nav_step.scss +20 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/entity_branding/plugins/_select2.scss +16 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/_variables.scss +13 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/application.scss +35 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_breadcrumb.scss +4 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_button-group.scss +10 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_card.scss +45 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_carousel.scss +18 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_custom-forms.scss +12 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_custom.scss +4 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_forms.scss +68 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_grid.scss +4 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_input-group.scss +25 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_list-group.scss +9 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_media.scss +5 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_mixins.scss +6 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_modal.scss +28 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_nav.scss +21 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_navbar.scss +54 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_pagination.scss +1 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_progress.scss +6 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/_utilities.scss +2 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/custom/_everyday_giving.scss +8 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/custom/_nav_step.scss +13 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/custom/_slat.scss +66 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/mixins/_breakpoints.scss +123 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/mixins/_grid-framework.scss +30 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/mixins/_grid.scss +10 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/utilities/_display.scss +9 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/nfg_theme/utilities/_flex.scss +49 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/legacy_browser_support/plugins/_sticky_div.scss +9 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_alert.scss +2 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_buttons.scss +17 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_card.scss +6 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_carousel.scss +9 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_custom.scss +12 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_custom_forms.scss +156 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_dropdown.scss +1 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_event.scss +19 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_forms.scss +83 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_list-group.scss +12 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_progress.scss +9 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_reboot.scss +31 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_tooltip.scss +5 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_type.scss +81 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_admin_bar.scss +20 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_background_variations.scss +12 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_everyday_default.scss +43 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_everyday_story.scss +21 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_footer_links.scss +8 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_nav_step.scss +95 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_slat.scss +110 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_social_share.scss +44 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_ticket.scss +12 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_tile.scss +63 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_user_navbar.scss +33 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/plugins/_datepicker.scss +2 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/plugins/_select2.scss +216 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/plugins/_sticky_div.scss +11 -0
- data/app/controllers/nfg_ui/application_controller.rb +5 -0
- data/app/helpers/nfg_ui/application_helper.rb +27 -0
- data/app/helpers/nfg_ui/components/email_helpers.rb +8 -0
- data/app/helpers/nfg_ui/components/resource_themes_helper.rb +8 -0
- data/app/helpers/nfg_ui/components/tooltip_helper.rb +24 -0
- data/app/models/nfg_ui/application_record.rb +5 -0
- data/app/views/nfg_ui/app_icons/_icons.html.haml +10 -0
- data/app/views/nfg_ui/email/README.md +12 -0
- data/app/views/nfg_ui/email/_button.html.haml +12 -0
- data/app/views/nfg_ui/email/_email_signature.html.haml +4 -0
- data/app/views/nfg_ui/email/_footer.html.haml +16 -0
- data/app/views/nfg_ui/email/_header.html.haml +6 -0
- data/app/views/nfg_ui/email/_logo.html.haml +6 -0
- data/app/views/nfg_ui/email/_product_content_image.html.haml +7 -0
- data/app/views/nfg_ui/email/_rainbow_bar.html.haml +10 -0
- data/app/views/nfg_ui/email/_section_header.html.haml +8 -0
- data/app/views/nfg_ui/email/_social_network_link.html.haml +12 -0
- data/app/views/nfg_ui/email/_sub_footer.html.haml +9 -0
- data/app/views/nfg_ui/email/_table_row.html.haml +13 -0
- data/config/initializers/web_app_manifest.rb +3 -0
- data/config/locales/email.yml +34 -0
- data/config/locales/en.yml +63 -0
- data/config/routes.rb +2 -0
- data/config/spring.rb +1 -0
- data/lib/nfg_ui/bootstrap/components/alert.rb +52 -0
- data/lib/nfg_ui/bootstrap/components/badge.rb +39 -0
- data/lib/nfg_ui/bootstrap/components/base.rb +151 -0
- data/lib/nfg_ui/bootstrap/components/breadcrumb.rb +23 -0
- data/lib/nfg_ui/bootstrap/components/breadcrumb_item.rb +28 -0
- data/lib/nfg_ui/bootstrap/components/button.rb +74 -0
- data/lib/nfg_ui/bootstrap/components/button_group.rb +36 -0
- data/lib/nfg_ui/bootstrap/components/button_toolbar.rb +21 -0
- data/lib/nfg_ui/bootstrap/components/card.rb +81 -0
- data/lib/nfg_ui/bootstrap/components/card_body.rb +15 -0
- data/lib/nfg_ui/bootstrap/components/card_footer.rb +15 -0
- data/lib/nfg_ui/bootstrap/components/card_header.rb +35 -0
- data/lib/nfg_ui/bootstrap/components/card_image.rb +33 -0
- data/lib/nfg_ui/bootstrap/components/card_image_overlay.rb +46 -0
- data/lib/nfg_ui/bootstrap/components/carousel.rb +57 -0
- data/lib/nfg_ui/bootstrap/components/carousel_caption.rb +34 -0
- data/lib/nfg_ui/bootstrap/components/carousel_control.rb +73 -0
- data/lib/nfg_ui/bootstrap/components/carousel_indicators.rb +54 -0
- data/lib/nfg_ui/bootstrap/components/carousel_item.rb +49 -0
- data/lib/nfg_ui/bootstrap/components/collapse.rb +32 -0
- data/lib/nfg_ui/bootstrap/components/dropdown.rb +51 -0
- data/lib/nfg_ui/bootstrap/components/dropdown_divider.rb +19 -0
- data/lib/nfg_ui/bootstrap/components/dropdown_header.rb +23 -0
- data/lib/nfg_ui/bootstrap/components/dropdown_item.rb +41 -0
- data/lib/nfg_ui/bootstrap/components/dropdown_menu.rb +32 -0
- data/lib/nfg_ui/bootstrap/components/dropdown_toggle.rb +82 -0
- data/lib/nfg_ui/bootstrap/components/embed.rb +80 -0
- data/lib/nfg_ui/bootstrap/components/form.rb +13 -0
- data/lib/nfg_ui/bootstrap/components/input_group.rb +13 -0
- data/lib/nfg_ui/bootstrap/components/jumbotron.rb +13 -0
- data/lib/nfg_ui/bootstrap/components/list_group.rb +39 -0
- data/lib/nfg_ui/bootstrap/components/list_group_item.rb +69 -0
- data/lib/nfg_ui/bootstrap/components/media.rb +15 -0
- data/lib/nfg_ui/bootstrap/components/media_body.rb +15 -0
- data/lib/nfg_ui/bootstrap/components/media_object.rb +23 -0
- data/lib/nfg_ui/bootstrap/components/modal.rb +66 -0
- data/lib/nfg_ui/bootstrap/components/modal_body.rb +16 -0
- data/lib/nfg_ui/bootstrap/components/modal_footer.rb +16 -0
- data/lib/nfg_ui/bootstrap/components/modal_header.rb +37 -0
- data/lib/nfg_ui/bootstrap/components/nav.rb +71 -0
- data/lib/nfg_ui/bootstrap/components/nav_item.rb +103 -0
- data/lib/nfg_ui/bootstrap/components/nav_link.rb +62 -0
- data/lib/nfg_ui/bootstrap/components/navbar.rb +97 -0
- data/lib/nfg_ui/bootstrap/components/navbar_brand.rb +25 -0
- data/lib/nfg_ui/bootstrap/components/navbar_nav.rb +48 -0
- data/lib/nfg_ui/bootstrap/components/navbar_text.rb +21 -0
- data/lib/nfg_ui/bootstrap/components/navbar_toggler.rb +38 -0
- data/lib/nfg_ui/bootstrap/components/page_item.rb +66 -0
- data/lib/nfg_ui/bootstrap/components/pagination.rb +30 -0
- data/lib/nfg_ui/bootstrap/components/popover.rb +12 -0
- data/lib/nfg_ui/bootstrap/components/progress.rb +44 -0
- data/lib/nfg_ui/bootstrap/components/progress_bar.rb +51 -0
- data/lib/nfg_ui/bootstrap/components/tab_content.rb +15 -0
- data/lib/nfg_ui/bootstrap/components/tab_pane.rb +49 -0
- data/lib/nfg_ui/bootstrap/components/table.rb +17 -0
- data/lib/nfg_ui/bootstrap/readme.md +1 -0
- data/lib/nfg_ui/bootstrap/utilities/activatable.rb +32 -0
- data/lib/nfg_ui/bootstrap/utilities/alignable.rb +33 -0
- data/lib/nfg_ui/bootstrap/utilities/collapse_toggleable.rb +35 -0
- data/lib/nfg_ui/bootstrap/utilities/collapsible.rb +42 -0
- data/lib/nfg_ui/bootstrap/utilities/disableable.rb +49 -0
- data/lib/nfg_ui/bootstrap/utilities/dismissible.rb +24 -0
- data/lib/nfg_ui/bootstrap/utilities/dropdown_directionable.rb +40 -0
- data/lib/nfg_ui/bootstrap/utilities/headable.rb +20 -0
- data/lib/nfg_ui/bootstrap/utilities/modalable.rb +104 -0
- data/lib/nfg_ui/bootstrap/utilities/progressable.rb +42 -0
- data/lib/nfg_ui/bootstrap/utilities/remotable.rb +24 -0
- data/lib/nfg_ui/bootstrap/utilities/sizable.rb +40 -0
- data/lib/nfg_ui/bootstrap/utilities/themeable.rb +51 -0
- data/lib/nfg_ui/bootstrap/utilities/tooltipable.rb +95 -0
- data/lib/nfg_ui/bootstrap/utilities/wrappable.rb +48 -0
- data/lib/nfg_ui/components/base.rb +14 -0
- data/lib/nfg_ui/components/elements/activity.rb +10 -0
- data/lib/nfg_ui/components/elements/alert.rb +63 -0
- data/lib/nfg_ui/components/elements/badge.rb +32 -0
- data/lib/nfg_ui/components/elements/breadcrumb.rb +16 -0
- data/lib/nfg_ui/components/elements/breadcrumb_item.rb +16 -0
- data/lib/nfg_ui/components/elements/button.rb +97 -0
- data/lib/nfg_ui/components/elements/card_body.rb +15 -0
- data/lib/nfg_ui/components/elements/card_footer.rb +14 -0
- data/lib/nfg_ui/components/elements/card_header.rb +14 -0
- data/lib/nfg_ui/components/elements/card_image.rb +14 -0
- data/lib/nfg_ui/components/elements/card_image_overlay.rb +14 -0
- data/lib/nfg_ui/components/elements/carousel_caption.rb +14 -0
- data/lib/nfg_ui/components/elements/carousel_control.rb +14 -0
- data/lib/nfg_ui/components/elements/carousel_indicators.rb +23 -0
- data/lib/nfg_ui/components/elements/carousel_item.rb +16 -0
- data/lib/nfg_ui/components/elements/chart.rb +11 -0
- data/lib/nfg_ui/components/elements/dropdown_divider.rb +14 -0
- data/lib/nfg_ui/components/elements/dropdown_header.rb +14 -0
- data/lib/nfg_ui/components/elements/dropdown_item.rb +78 -0
- data/lib/nfg_ui/components/elements/dropdown_toggle.rb +37 -0
- data/lib/nfg_ui/components/elements/embed.rb +15 -0
- data/lib/nfg_ui/components/elements/form_control.rb +18 -0
- data/lib/nfg_ui/components/elements/input_group.rb +14 -0
- data/lib/nfg_ui/components/elements/key.rb +11 -0
- data/lib/nfg_ui/components/elements/list_group_item.rb +14 -0
- data/lib/nfg_ui/components/elements/loader.rb +11 -0
- data/lib/nfg_ui/components/elements/media_body.rb +14 -0
- data/lib/nfg_ui/components/elements/media_object.rb +12 -0
- data/lib/nfg_ui/components/elements/modal_body.rb +14 -0
- data/lib/nfg_ui/components/elements/modal_footer.rb +14 -0
- data/lib/nfg_ui/components/elements/modal_header.rb +14 -0
- data/lib/nfg_ui/components/elements/nav.rb +19 -0
- data/lib/nfg_ui/components/elements/nav_item.rb +39 -0
- data/lib/nfg_ui/components/elements/nav_link.rb +33 -0
- data/lib/nfg_ui/components/elements/navbar_brand.rb +15 -0
- data/lib/nfg_ui/components/elements/navbar_text.rb +14 -0
- data/lib/nfg_ui/components/elements/navbar_toggler.rb +14 -0
- data/lib/nfg_ui/components/elements/page_item.rb +14 -0
- data/lib/nfg_ui/components/elements/popover.rb +14 -0
- data/lib/nfg_ui/components/elements/progress_bar.rb +62 -0
- data/lib/nfg_ui/components/elements/slat_action.rb +14 -0
- data/lib/nfg_ui/components/elements/slat_body.rb +14 -0
- data/lib/nfg_ui/components/elements/slat_item.rb +62 -0
- data/lib/nfg_ui/components/elements/stat.rb +11 -0
- data/lib/nfg_ui/components/elements/step.rb +55 -0
- data/lib/nfg_ui/components/elements/step_indicator.rb +41 -0
- data/lib/nfg_ui/components/elements/tab_pane.rb +15 -0
- data/lib/nfg_ui/components/elements/table.rb +14 -0
- data/lib/nfg_ui/components/elements/task.rb +11 -0
- data/lib/nfg_ui/components/elements.rb +58 -0
- data/lib/nfg_ui/components/foundations/color.rb +11 -0
- data/lib/nfg_ui/components/foundations/grid.rb +11 -0
- data/lib/nfg_ui/components/foundations/icon.rb +82 -0
- data/lib/nfg_ui/components/foundations/image.rb +14 -0
- data/lib/nfg_ui/components/foundations/input.rb +11 -0
- data/lib/nfg_ui/components/foundations/typeface.rb +122 -0
- data/lib/nfg_ui/components/patterns/activity_feed.rb +11 -0
- data/lib/nfg_ui/components/patterns/button_group.rb +23 -0
- data/lib/nfg_ui/components/patterns/button_toolbar.rb +20 -0
- data/lib/nfg_ui/components/patterns/card.rb +39 -0
- data/lib/nfg_ui/components/patterns/carousel.rb +31 -0
- data/lib/nfg_ui/components/patterns/collapse.rb +31 -0
- data/lib/nfg_ui/components/patterns/dropdown.rb +27 -0
- data/lib/nfg_ui/components/patterns/dropdown_menu.rb +16 -0
- data/lib/nfg_ui/components/patterns/empty_state.rb +11 -0
- data/lib/nfg_ui/components/patterns/filter_bar.rb +11 -0
- data/lib/nfg_ui/components/patterns/form_group.rb +11 -0
- data/lib/nfg_ui/components/patterns/graph.rb +11 -0
- data/lib/nfg_ui/components/patterns/jumbotron.rb +14 -0
- data/lib/nfg_ui/components/patterns/list_group.rb +16 -0
- data/lib/nfg_ui/components/patterns/media.rb +14 -0
- data/lib/nfg_ui/components/patterns/modal.rb +15 -0
- data/lib/nfg_ui/components/patterns/navbar.rb +17 -0
- data/lib/nfg_ui/components/patterns/navbar_nav.rb +17 -0
- data/lib/nfg_ui/components/patterns/page_header.rb +85 -0
- data/lib/nfg_ui/components/patterns/pagination.rb +14 -0
- data/lib/nfg_ui/components/patterns/progress.rb +24 -0
- data/lib/nfg_ui/components/patterns/slat.rb +14 -0
- data/lib/nfg_ui/components/patterns/slat_actions.rb +115 -0
- data/lib/nfg_ui/components/patterns/slat_header.rb +23 -0
- data/lib/nfg_ui/components/patterns/slat_list.rb +18 -0
- data/lib/nfg_ui/components/patterns/slats.rb +14 -0
- data/lib/nfg_ui/components/patterns/steps.rb +27 -0
- data/lib/nfg_ui/components/patterns/tab_content.rb +14 -0
- data/lib/nfg_ui/components/patterns/task_list.rb +11 -0
- data/lib/nfg_ui/components/patterns/tile.rb +58 -0
- data/lib/nfg_ui/components/patterns/tile_body.rb +29 -0
- data/lib/nfg_ui/components/patterns/tile_header.rb +40 -0
- data/lib/nfg_ui/components/patterns/tile_section.rb +29 -0
- data/lib/nfg_ui/components/traits/active.rb +14 -0
- data/lib/nfg_ui/components/traits/alert.rb +36 -0
- data/lib/nfg_ui/components/traits/alignment.rb +26 -0
- data/lib/nfg_ui/components/traits/button.rb +47 -0
- data/lib/nfg_ui/components/traits/button_group.rb +22 -0
- data/lib/nfg_ui/components/traits/card.rb +14 -0
- data/lib/nfg_ui/components/traits/collapse.rb +29 -0
- data/lib/nfg_ui/components/traits/disable.rb +19 -0
- data/lib/nfg_ui/components/traits/disable_with.rb +14 -0
- data/lib/nfg_ui/components/traits/dismiss.rb +16 -0
- data/lib/nfg_ui/components/traits/dropdown_toggle.rb +14 -0
- data/lib/nfg_ui/components/traits/icon.rb +16 -0
- data/lib/nfg_ui/components/traits/list_group.rb +16 -0
- data/lib/nfg_ui/components/traits/muted.rb +16 -0
- data/lib/nfg_ui/components/traits/nav.rb +26 -0
- data/lib/nfg_ui/components/traits/nav_item.rb +16 -0
- data/lib/nfg_ui/components/traits/navbar.rb +18 -0
- data/lib/nfg_ui/components/traits/page_header.rb +16 -0
- data/lib/nfg_ui/components/traits/pill.rb +14 -0
- data/lib/nfg_ui/components/traits/progress_bar.rb +24 -0
- data/lib/nfg_ui/components/traits/remote.rb +14 -0
- data/lib/nfg_ui/components/traits/size.rb +18 -0
- data/lib/nfg_ui/components/traits/slat_item.rb +28 -0
- data/lib/nfg_ui/components/traits/step.rb +14 -0
- data/lib/nfg_ui/components/traits/theme.rb +57 -0
- data/lib/nfg_ui/components/traits/typeface.rb +53 -0
- data/lib/nfg_ui/components/traits/vertical.rb +16 -0
- data/lib/nfg_ui/components/traits.rb +43 -0
- data/lib/nfg_ui/components/utilities/browser_detectable.rb +16 -0
- data/lib/nfg_ui/components/utilities/confirmable.rb +24 -0
- data/lib/nfg_ui/components/utilities/describable.rb +22 -0
- data/lib/nfg_ui/components/utilities/disable_withable.rb +26 -0
- data/lib/nfg_ui/components/utilities/emailable.rb +44 -0
- data/lib/nfg_ui/components/utilities/iconable.rb +20 -0
- data/lib/nfg_ui/components/utilities/left_iconable.rb +22 -0
- data/lib/nfg_ui/components/utilities/methodable.rb +24 -0
- data/lib/nfg_ui/components/utilities/renderable.rb +24 -0
- data/lib/nfg_ui/components/utilities/resource_themeable.rb +49 -0
- data/lib/nfg_ui/components/utilities/titleable.rb +20 -0
- data/lib/nfg_ui/components/utilities/traitable.rb +32 -0
- data/lib/nfg_ui/components/utilities/vertically_alignable.rb +31 -0
- data/lib/nfg_ui/components/utilities.rb +22 -0
- data/lib/nfg_ui/engine.rb +45 -0
- data/lib/nfg_ui/ui/base.rb +35 -0
- data/lib/nfg_ui/ui/bootstrap.rb +44 -0
- data/lib/nfg_ui/ui/network_for_good.rb +54 -0
- data/lib/nfg_ui/ui/utilities/initializer.rb +88 -0
- data/lib/nfg_ui/ui/utilities.rb +10 -0
- data/lib/nfg_ui/version.rb +5 -0
- data/lib/nfg_ui.rb +174 -0
- data/lib/tasks/nfg_ui_tasks.rake +53 -0
- metadata +741 -0
@@ -0,0 +1,216 @@
|
|
1
|
+
//*****************************//
|
2
|
+
// SELECT 2
|
3
|
+
//*****************************//
|
4
|
+
|
5
|
+
.select2-container {
|
6
|
+
display: block !important;
|
7
|
+
width: auto !important;
|
8
|
+
max-width: 100% !important;
|
9
|
+
}
|
10
|
+
.select2.select2-hidden-accessible { width: auto !important; } // Prevents horizontal scrolling on designation select on donation form
|
11
|
+
|
12
|
+
body:not(.modal-open) {
|
13
|
+
.select2-container--default { z-index: $zindex-dropdown; }
|
14
|
+
}
|
15
|
+
|
16
|
+
.select2-container--default {
|
17
|
+
&.select2-container--focus .select2-selection--multiple { border-color: $primary; }
|
18
|
+
&.select2-container--open {
|
19
|
+
.select2-selection--single {
|
20
|
+
border-color: $custom-select-focus-border-color !important;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
//** Single select option
|
25
|
+
.select2-selection--single {
|
26
|
+
display: inline-block;
|
27
|
+
width: 100%;
|
28
|
+
height: $custom-select-height !important;
|
29
|
+
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x !important;
|
30
|
+
font-weight: $btn-font-weight;
|
31
|
+
line-height: $custom-select-line-height;
|
32
|
+
color: $custom-select-color;
|
33
|
+
vertical-align: middle;
|
34
|
+
background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
|
35
|
+
background-size: $custom-select-bg-size;
|
36
|
+
border: $custom-select-border-width solid $custom-select-border-color !important;
|
37
|
+
border-radius: $border-radius;
|
38
|
+
outline: none;
|
39
|
+
cursor: pointer;
|
40
|
+
transition: $transition-base;
|
41
|
+
.select2-selection__rendered {
|
42
|
+
padding: 0 !important;
|
43
|
+
color: $primary !important;
|
44
|
+
line-height: $spacer !important;
|
45
|
+
height: $custom-select-height !important;
|
46
|
+
transition: $transition-base;
|
47
|
+
}
|
48
|
+
.select2-selection__arrow { display: none; }
|
49
|
+
}
|
50
|
+
|
51
|
+
//** Multiple select option
|
52
|
+
.select2-selection--multiple {
|
53
|
+
padding: 8px $input-padding-x 0;
|
54
|
+
min-height: $input-height;
|
55
|
+
font-size: $font-size-base;
|
56
|
+
color: $input-color;
|
57
|
+
border: $border-width solid $input-border-color;
|
58
|
+
border-radius: $input-border-radius;
|
59
|
+
transition: $transition-base;
|
60
|
+
.select2-search--inline {
|
61
|
+
min-height: 18px;
|
62
|
+
font-size: $font-size-base;
|
63
|
+
color: $input-color;
|
64
|
+
line-height: 1;
|
65
|
+
.select2-search__field {
|
66
|
+
margin-top: 0;
|
67
|
+
min-height: 18px;
|
68
|
+
border: $input-border-width solid $input-border-color;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
.select2-selection__rendered {
|
72
|
+
margin: 0;
|
73
|
+
padding: 0 !important;
|
74
|
+
@include clearfix();
|
75
|
+
.select2-selection__choice {
|
76
|
+
margin: 0 3px 3px 0;
|
77
|
+
padding: 3px ($spacer * .25);
|
78
|
+
min-width: 14px;
|
79
|
+
font-weight: $badge-font-weight;
|
80
|
+
font-size: $font-size-sm;
|
81
|
+
line-height: 1;
|
82
|
+
color: $primary;
|
83
|
+
background-color: $white;
|
84
|
+
border: $border-width solid $border-color;
|
85
|
+
border-radius: $border-radius;
|
86
|
+
transition: $transition-base;
|
87
|
+
&:hover, &:active {
|
88
|
+
color: $body-color;
|
89
|
+
background-color: theme-color("light");
|
90
|
+
}
|
91
|
+
+ li { margin-top: 0; }
|
92
|
+
}
|
93
|
+
}
|
94
|
+
.select2-selection__choice__remove {
|
95
|
+
margin-right: ($spacer * .25);
|
96
|
+
color: $primary;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
//** Dropdown styles
|
101
|
+
.select2-dropdown {
|
102
|
+
font-size: $font-size-base;
|
103
|
+
color: $body-color;
|
104
|
+
text-align: left;
|
105
|
+
list-style: none;
|
106
|
+
background-color: $dropdown-bg;
|
107
|
+
background-clip: padding-box;
|
108
|
+
border: $dropdown-border-width solid $dropdown-border-color;
|
109
|
+
@include border-radius($dropdown-border-radius);
|
110
|
+
@include box-shadow($dropdown-box-shadow);
|
111
|
+
}
|
112
|
+
.select2-search--dropdown {
|
113
|
+
padding: ($spacer * .5);
|
114
|
+
.select2-search__field {
|
115
|
+
display: block;
|
116
|
+
width: 100%;
|
117
|
+
padding: $input-padding-y $input-padding-x;
|
118
|
+
font-size: $font-size-base;
|
119
|
+
line-height: $input-line-height;
|
120
|
+
color: $input-color;
|
121
|
+
background-color: $input-bg;
|
122
|
+
background-clip: padding-box;
|
123
|
+
border: $input-border-width solid $input-border-color;
|
124
|
+
outline: 0;
|
125
|
+
transition: $transition-base;
|
126
|
+
&:focus { border-color: $primary; }
|
127
|
+
}
|
128
|
+
}
|
129
|
+
.select2-results__option {
|
130
|
+
position: relative;
|
131
|
+
margin-top: 0;
|
132
|
+
display: block;
|
133
|
+
width: 100%; // For `<button>`s
|
134
|
+
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
135
|
+
clear: both;
|
136
|
+
font-weight: $font-weight-normal;
|
137
|
+
color: $dropdown-link-color;
|
138
|
+
text-align: inherit; // For `<button>`s
|
139
|
+
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
140
|
+
background-color: transparent; // For `<button>`s
|
141
|
+
border: 0; // For `<button>`s
|
142
|
+
border-top: $border-width solid $border-color;
|
143
|
+
z-index: 1;
|
144
|
+
transition: $transition-base;
|
145
|
+
&.select2-results__option--highlighted, &.select2-results__option--highlighted[aria-selected] {
|
146
|
+
color: $body-color;
|
147
|
+
background-color: transparent;
|
148
|
+
&:hover, &:active {
|
149
|
+
color: $body-color;
|
150
|
+
background-color: theme-color("light");
|
151
|
+
}
|
152
|
+
}
|
153
|
+
&[aria-selected='true'] {
|
154
|
+
padding-right: ($spacer * 2);
|
155
|
+
color: $body-color !important;
|
156
|
+
background-color: transparent !important;
|
157
|
+
cursor: default;
|
158
|
+
&:after {
|
159
|
+
position: absolute;
|
160
|
+
top: ($spacer * .5);
|
161
|
+
right: ($spacer * .25);
|
162
|
+
width: 36px;
|
163
|
+
height: 100%;
|
164
|
+
font-family: "FontAwesome";
|
165
|
+
font-size: $font-size-base;
|
166
|
+
line-height: 1.5;
|
167
|
+
color: theme-color("success");
|
168
|
+
text-align: center;
|
169
|
+
content: '\f00c';
|
170
|
+
z-index: 5;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
&[aria-disabled='true'] {
|
174
|
+
color: $text-muted;
|
175
|
+
font-weight: $font-weight-bold;
|
176
|
+
text-transform: uppercase;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
.select2-results__group {
|
180
|
+
padding: ($spacer * .5);
|
181
|
+
font-weight: $headings-font-weight;
|
182
|
+
font-size: $font-size-base;
|
183
|
+
line-height: 1.3;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
|
188
|
+
// Error handling
|
189
|
+
.has-danger {
|
190
|
+
.select2-selection {
|
191
|
+
border-color: theme-color("danger");
|
192
|
+
color: theme-color("danger");
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
|
197
|
+
// Clear selection
|
198
|
+
.select2-selection__rendered .select2-selection__clear {
|
199
|
+
position: relative;
|
200
|
+
width: 60px;
|
201
|
+
color: transparent;
|
202
|
+
&:before {
|
203
|
+
position: absolute;
|
204
|
+
top: 0;
|
205
|
+
right: 0;
|
206
|
+
width: 60px;
|
207
|
+
font-size: 10px;
|
208
|
+
line-height: 34px;
|
209
|
+
font-family: $font-family-sans-serif;
|
210
|
+
color: $link-color;
|
211
|
+
text-transform: uppercase;
|
212
|
+
text-align: right;
|
213
|
+
z-index: 10;
|
214
|
+
content: "Clear X";
|
215
|
+
}
|
216
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// Styles to make sticky div perform correctly
|
2
|
+
|
3
|
+
[data-toggle='sticky-div'] {
|
4
|
+
position: relative; // fallback for IE, etc
|
5
|
+
position: sticky;
|
6
|
+
position: -webkit-sticky;
|
7
|
+
top: 0;
|
8
|
+
z-index: ($zindex-dropdown - 1);
|
9
|
+
transition: $transition-base;
|
10
|
+
&.stuck { z-index: $zindex-sticky; }
|
11
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module NfgUi
|
4
|
+
# Core rendering helper methods
|
5
|
+
module ApplicationHelper
|
6
|
+
# render components from the pertinent suite
|
7
|
+
# Network for Good components: = ui.nfg
|
8
|
+
# Bootstrap core components: = ui.bootstrap
|
9
|
+
include FontAwesome::Rails::IconHelper
|
10
|
+
|
11
|
+
def ui
|
12
|
+
@ui ||= NfgUi::UI::Base.new(get_view_context)
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
# presenter class controller may not be defined
|
18
|
+
def get_view_context
|
19
|
+
if defined?(controller) && controller.present?
|
20
|
+
controller.view_context
|
21
|
+
else
|
22
|
+
ApplicationController.new.view_context
|
23
|
+
end
|
24
|
+
# @ui ||= NfgUi::UI::Base.new(controller.view_context)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module NfgUi
|
2
|
+
module Components
|
3
|
+
module TooltipHelper
|
4
|
+
def tooltip(tooltip_content, placement = :top, data = {})
|
5
|
+
# IMPORTANT NOTE: This must be included as the first argument within your element.
|
6
|
+
# Working Example: # %span{ bootstrap_tooltip(t(".tooltips.group_name"), :top), class: "my-class" }
|
7
|
+
|
8
|
+
acceptable_placement_directions = %i[right top bottom left]
|
9
|
+
|
10
|
+
raise StandardError.new("Acceptable placement options are :right, :top, :bottom or :left, only... and you assigned #{placement}") unless acceptable_placement_directions.include?(placement)
|
11
|
+
|
12
|
+
if browser_is_a_touch_device?
|
13
|
+
{}
|
14
|
+
else
|
15
|
+
{ title: tooltip_content, data: data.merge(placement: placement, toggle: "tooltip", html: 'true') }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def browser_is_a_touch_device?
|
20
|
+
browser.mobile? || browser.tablet?
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
= favicon_link_tag 'nfg_ui/app_icon/apple-touch-icon.png', rel: 'apple-touch-icon', sizes: '180x180', type: nil
|
2
|
+
= favicon_link_tag 'nfg_ui/app_icon/favicon.ico'
|
3
|
+
= favicon_link_tag 'nfg_ui/app_icon/favicon-32x32.png', rel: 'icon', sizes: '32x32', type: 'image/png'
|
4
|
+
= favicon_link_tag 'nfg_ui/app_icon/favicon-16x16.png', rel: 'icon', sizes: '16x16', type: 'image/png'
|
5
|
+
= favicon_link_tag 'nfg_ui/app_icon/site.webmanifest', rel: 'manifest', type: nil
|
6
|
+
= favicon_link_tag 'nfg_ui/app_icon/safari-pinned-tab.svg', color: '#25ACEB', rel: 'mask-icon', type: nil
|
7
|
+
|
8
|
+
%meta{ content: '#ffffff', name: 'msapplication-TileColor' }
|
9
|
+
%meta{ name: 'msapplication-config', content: asset_path('nfg_ui/app_icon/browserconfig.xml') }
|
10
|
+
%meta{ content: '#ffffff', name: 'theme-color' }
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Note:
|
2
|
+
These views are pulled from https://github.com/network-for-good/sso_login_emails
|
3
|
+
These files are being moved here to be centralized so that Evo & DM can use these
|
4
|
+
as needed.
|
5
|
+
|
6
|
+
For now, these views must be manually rendered as partials / templates on your views
|
7
|
+
There are no ui.nfg methods available for emails at this point.
|
8
|
+
|
9
|
+
Example:
|
10
|
+
= render "nfg_ui/email/rainbow_bar"
|
11
|
+
|
12
|
+
- JR: 2/24/2019
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- url = local_assigns[:url]
|
2
|
+
- text = local_assigns[:text]
|
3
|
+
- size = nil if local_assigns[:size].nil?
|
4
|
+
- theme_color = nil if local_assigns[:theme_color].nil?
|
5
|
+
- expanded_class = "expanded" if local_assigns[:expanded_class].nil?
|
6
|
+
- inverse = false if local_assigns[:inverse].nil?
|
7
|
+
|
8
|
+
- button_classes = [size.to_s, "radius", theme_color, expanded_class, ('inverse' if inverse)].join(" ")
|
9
|
+
|
10
|
+
%button{ class: button_classes, href: url }
|
11
|
+
= text
|
12
|
+
%img.display-inline-block.m-l-quarter{ src: image_path(t("nfg_ui.email.images.icons.caret")), alt: t("nfg_ui.email.images.alt.caret"), width: "6", style: "width:6px;" }
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%wrapper.footer
|
2
|
+
%row
|
3
|
+
%columns
|
4
|
+
%center
|
5
|
+
%menu
|
6
|
+
= render partial: "nfg_ui/email/social_network_link", locals: { social_network: :facebook, icon_size: 15 }
|
7
|
+
= render partial: "nfg_ui/email/social_network_link", locals: { social_network: :twitter, icon_size: 16 }
|
8
|
+
= render partial: "nfg_ui/email/social_network_link", locals: { social_network: :linkedin, icon_size: 16 }
|
9
|
+
= render partial: "nfg_ui/email/social_network_link", locals: { social_network: :youtube, icon_size: 18 }
|
10
|
+
%row
|
11
|
+
%columns
|
12
|
+
%center
|
13
|
+
%p
|
14
|
+
%small
|
15
|
+
= t 'nfg_ui.email.company.address'
|
16
|
+
%spacer{ size: spacer(:quadruple) }
|
@@ -0,0 +1,6 @@
|
|
1
|
+
%row
|
2
|
+
%columns
|
3
|
+
%spacer{ size: spacer(:double) }
|
4
|
+
%a{ href: t('nfg_ui.email.links.nfg_website.homepage'), target: "_blank" }
|
5
|
+
%img.display-inline-block{ src: image_path(t("nfg_ui.email.images.logo")), alt: t('nfg_ui.email.images.alt.logo'), width: "220", style: "width:220px;" }/
|
6
|
+
%spacer{ size: spacer(:triple) }
|
@@ -0,0 +1,7 @@
|
|
1
|
+
- image = local_assigns[:image]
|
2
|
+
- theme_color = local_assigns[:theme_color]
|
3
|
+
- image_size = local_assigns[:image_size]
|
4
|
+
|
5
|
+
%columns{ class: "bg-image bg-image-#{theme_color}", large: "4", valign: "middle" }
|
6
|
+
%center.p-y-base
|
7
|
+
%img{ src: image_path(image), width: image_size, style: "width:#{image_size}px;" }
|
@@ -0,0 +1,12 @@
|
|
1
|
+
-# Social network options: :facebook, :twitter, :linkedin, :youtube, :google_plus
|
2
|
+
- social_network = local_assigns[:social_network]
|
3
|
+
- icon_size = local_assigns[:icon_size]
|
4
|
+
|
5
|
+
- root_of_scope = [:nfg_ui, :email]
|
6
|
+
|
7
|
+
- image_scope = [*root_of_scope, :images, :icons, :social]
|
8
|
+
- alt_scope = [*root_of_scope, :images, :alt, :social]
|
9
|
+
- url_scope = [*root_of_scope, :links]
|
10
|
+
|
11
|
+
%item{ href: t("social.#{social_network}", scope: url_scope), target: "_blank" }
|
12
|
+
%img{ src: image_path(t("#{social_network}", scope: image_scope)), alt: t("#{social_network}", scope: alt_scope), width: icon_size, style: "width: #{icon_size}px;" }
|
@@ -0,0 +1,13 @@
|
|
1
|
+
- left_column = local_assigns[:left_column]
|
2
|
+
- right_column = nil if local_assigns[:right_column].nil?
|
3
|
+
- theme_color = nil if local_assigns[:theme_color].nil?
|
4
|
+
|
5
|
+
%row.border-item
|
6
|
+
%columns{ small: "5" }
|
7
|
+
%b= left_column
|
8
|
+
%columns{ small: "7" }
|
9
|
+
.text-right
|
10
|
+
- if right_column
|
11
|
+
%span{ class: ("text-#{theme_color}" if theme_color) }= right_column
|
12
|
+
- else
|
13
|
+
= yield
|
@@ -0,0 +1,34 @@
|
|
1
|
+
en:
|
2
|
+
nfg_ui:
|
3
|
+
email:
|
4
|
+
company:
|
5
|
+
name: "Network for Good"
|
6
|
+
address: "Network for Good | 1140 Connecticut Avenue NW, Suite 700, Washington, District of Columbia 20036"
|
7
|
+
images:
|
8
|
+
logo: "https://identity.networkforgood.org/images/nfg-logo.png"
|
9
|
+
alt:
|
10
|
+
caret: ">"
|
11
|
+
logo: "Network for Good"
|
12
|
+
social:
|
13
|
+
facebook: "Network for Good on Facebook"
|
14
|
+
twitter: "Network for Good on Twitter"
|
15
|
+
linkedin: "Network for Good on LinkedIn"
|
16
|
+
youtube: "Network for Good on YouTube"
|
17
|
+
google_plus: "Network for Good on Google+"
|
18
|
+
icons:
|
19
|
+
social:
|
20
|
+
facebook: "https://identity.networkforgood.org/images/fa-facebook.png"
|
21
|
+
twitter: "https://identity.networkforgood.org/images/fa-twitter.png"
|
22
|
+
linkedin: "https://identity.networkforgood.org/images/fa-linkedin.png"
|
23
|
+
youtube: "https://identity.networkforgood.org/images/fa-youtube.png"
|
24
|
+
google_plus: "https://identity.networkforgood.org/images/fa-google-plus.png"
|
25
|
+
caret: "https://identity.networkforgood.org/images/fa-caret-right.png"
|
26
|
+
links:
|
27
|
+
nfg_website:
|
28
|
+
homepage: "http://www.networkforgood.com"
|
29
|
+
support_page: "http://www.networkforgood.com/support/"
|
30
|
+
social:
|
31
|
+
facebook: "https://www.facebook.com/networkforgood"
|
32
|
+
twitter: "https://twitter.com/Network4Good"
|
33
|
+
linkedin: "https://www.linkedin.com/company/network-for-good"
|
34
|
+
youtube: "https://www.youtube.com/user/NetworkForGood"
|
@@ -0,0 +1,63 @@
|
|
1
|
+
en:
|
2
|
+
nfg_ui:
|
3
|
+
errors:
|
4
|
+
argument_error:
|
5
|
+
# required keys -- :modal, :class_name, :options, :file, :method
|
6
|
+
#
|
7
|
+
# Example keys:
|
8
|
+
#
|
9
|
+
# modal: '#example'
|
10
|
+
# class_name: self.class.name
|
11
|
+
# options: options
|
12
|
+
# file: __FILE__
|
13
|
+
# method: __method__
|
14
|
+
modalable:
|
15
|
+
tooltip: |
|
16
|
+
ArgumentError: :modal & :tooltip may not both be present in :options hash
|
17
|
+
|
18
|
+
Raised from gem file: %{file}
|
19
|
+
Raised from gem method: #%{method}
|
20
|
+
|
21
|
+
To fix this error:
|
22
|
+
Remove `tooltip: [the tooltip]` or `modal: '%{modal}'` from your component's :options hash
|
23
|
+
|
24
|
+
Component Reference:
|
25
|
+
Invalid component: %{class_name}
|
26
|
+
Component options: %{options}
|
27
|
+
|
28
|
+
About:
|
29
|
+
Modal and Tooltip both utilize the data-toggle HTML data attribute. When :modal is present,
|
30
|
+
it will always overwrite the tooltip's data-toggle attribute causing a silent failure
|
31
|
+
in which the tooltip does not render (though the modal HTML does).
|
32
|
+
|
33
|
+
remote: |
|
34
|
+
ArgumentError: :modal & remote: true may not both be present in :options hash
|
35
|
+
|
36
|
+
Raised from gem file: %{file}
|
37
|
+
Raised from gem method: #%{method}
|
38
|
+
|
39
|
+
To fix this error:
|
40
|
+
Remove `remote: true` or `modal: '%{modal}'` from your component's :options hash
|
41
|
+
|
42
|
+
Example incorrect usage:
|
43
|
+
= ui.nfg :button, remote: true, modal: '%{modal}', ...
|
44
|
+
|
45
|
+
Component Reference:
|
46
|
+
Invalid component: %{class_name}
|
47
|
+
Component options: %{options}
|
48
|
+
|
49
|
+
About:
|
50
|
+
Components may not include both `modal: %{modal}` and `remote: true` in their options because modalable components
|
51
|
+
that fire remote actions can result in undesirable modal activation behavior.
|
52
|
+
|
53
|
+
This tends to occur when a modal is injected into the page from a remote action, is subsequently dismissed
|
54
|
+
and then opened again from the same remote link.
|
55
|
+
|
56
|
+
The previously dismissed modal appears (because it's still on the page, and referenced in the component's HTML)
|
57
|
+
and the modal is then, visibly to the user, re-animated (overwritten and re-started) by the newly injected modal from the remote ajax action.
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
data/config/routes.rb
ADDED
data/config/spring.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Spring.application_root = './spec/test_app'
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module NfgUi
|
4
|
+
module Bootstrap
|
5
|
+
module Components
|
6
|
+
# Bootstrap Alert Component
|
7
|
+
# https://getbootstrap.com/docs/4.1/components/alerts/
|
8
|
+
class Alert < NfgUi::Bootstrap::Components::Base
|
9
|
+
include Bootstrap::Utilities::Dismissible
|
10
|
+
include Bootstrap::Utilities::Headable
|
11
|
+
include Bootstrap::Utilities::Themeable
|
12
|
+
|
13
|
+
def render
|
14
|
+
content_tag(:div, html_options) do
|
15
|
+
capture do
|
16
|
+
if dismissible
|
17
|
+
concat(
|
18
|
+
NfgUi::Bootstrap::Components::Button.new({ as: :button, class: 'close', theme: nil, data: { dismiss: 'alert' }, aria: { label: 'Close' } }, view_context).render do
|
19
|
+
content_tag(:span, "×".html_safe, aria: { hidden: 'true' } )
|
20
|
+
end
|
21
|
+
)
|
22
|
+
end
|
23
|
+
if heading
|
24
|
+
concat(content_tag(:h4, heading, class: 'alert-heading'))
|
25
|
+
end
|
26
|
+
concat(block_given? ? yield : body)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def assistive_html_attributes
|
34
|
+
super.merge!(role: 'alert')
|
35
|
+
end
|
36
|
+
|
37
|
+
def css_classes
|
38
|
+
[
|
39
|
+
super,
|
40
|
+
("#{component_css_class}-dismissible" if dismissible),
|
41
|
+
('fade' if dismissible),
|
42
|
+
('show' if dismissible)
|
43
|
+
].join(' ').squish
|
44
|
+
end
|
45
|
+
|
46
|
+
def outlineable?
|
47
|
+
false
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module NfgUi
|
4
|
+
module Bootstrap
|
5
|
+
module Components
|
6
|
+
# Bootstrap Badge Component
|
7
|
+
# https://getbootstrap.com/docs/4.1/components/badge/
|
8
|
+
class Badge < NfgUi::Bootstrap::Components::Base
|
9
|
+
include Bootstrap::Utilities::Themeable
|
10
|
+
include Bootstrap::Utilities::Wrappable
|
11
|
+
|
12
|
+
def pill
|
13
|
+
options.fetch(:pill, false)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def base_element
|
19
|
+
as #comes from the wrappable module
|
20
|
+
end
|
21
|
+
|
22
|
+
def css_classes
|
23
|
+
[
|
24
|
+
super,
|
25
|
+
("#{component_css_class}-pill" if pill)
|
26
|
+
].join(' ').squish
|
27
|
+
end
|
28
|
+
|
29
|
+
def default_html_wrapper_element
|
30
|
+
:span
|
31
|
+
end
|
32
|
+
|
33
|
+
def non_html_attribute_options
|
34
|
+
super.push(:pill)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|