Repository: bharget/heroicon Branch: main Commit: 12bea4613706 Files: 91 Total size: 97.7 KB Directory structure: gitextract_2wh89huo/ ├── .github/ │ ├── stale.yml │ └── workflows/ │ └── ci.yml ├── .gitignore ├── .standard.yml ├── Appraisals ├── CHANGELOG.md ├── Gemfile ├── MIT-LICENSE ├── README.md ├── Rakefile ├── app/ │ └── helpers/ │ └── heroicon/ │ └── application_helper.rb ├── bin/ │ ├── appraisal │ ├── publish │ ├── rails │ ├── rake │ ├── refresh_changelog │ ├── standardrb │ └── test ├── gemfiles/ │ ├── rails_5_2.gemfile │ ├── rails_6_0.gemfile │ └── rails_main.gemfile ├── heroicon.gemspec ├── lib/ │ ├── generators/ │ │ └── heroicon/ │ │ ├── install_generator.rb │ │ └── templates/ │ │ ├── heroicon.rb.tt │ │ └── heroicon_helper.rb.tt │ ├── heroicon/ │ │ ├── configuration.rb │ │ ├── engine.rb │ │ ├── icon.rb │ │ └── version.rb │ └── heroicon.rb └── test/ ├── dummy/ │ ├── .ruby-version │ ├── Rakefile │ ├── app/ │ │ ├── assets/ │ │ │ ├── config/ │ │ │ │ └── manifest.js │ │ │ ├── images/ │ │ │ │ └── .keep │ │ │ └── stylesheets/ │ │ │ └── application.css │ │ ├── channels/ │ │ │ └── application_cable/ │ │ │ ├── channel.rb │ │ │ └── connection.rb │ │ ├── controllers/ │ │ │ ├── application_controller.rb │ │ │ ├── concerns/ │ │ │ │ └── .keep │ │ │ └── pages_controller.rb │ │ ├── helpers/ │ │ │ ├── application_helper.rb │ │ │ └── heroicon_helper.rb │ │ ├── javascript/ │ │ │ └── packs/ │ │ │ └── application.js │ │ ├── jobs/ │ │ │ └── application_job.rb │ │ ├── mailers/ │ │ │ └── application_mailer.rb │ │ ├── models/ │ │ │ ├── application_record.rb │ │ │ └── concerns/ │ │ │ └── .keep │ │ └── views/ │ │ ├── layouts/ │ │ │ ├── application.html.erb │ │ │ ├── mailer.html.erb │ │ │ └── mailer.text.erb │ │ └── pages/ │ │ ├── _edge_cases.html.erb │ │ ├── _mini.html.erb │ │ ├── _outline.html.erb │ │ ├── _solid.html.erb │ │ └── home.html.erb │ ├── bin/ │ │ ├── rails │ │ ├── rake │ │ └── setup │ ├── config/ │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── cable.yml │ │ ├── database.yml │ │ ├── environment.rb │ │ ├── environments/ │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers/ │ │ │ ├── application_controller_renderer.rb │ │ │ ├── assets.rb │ │ │ ├── backtrace_silencers.rb │ │ │ ├── content_security_policy.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── heroicon.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales/ │ │ │ └── en.yml │ │ ├── puma.rb │ │ ├── routes.rb │ │ ├── spring.rb │ │ └── storage.yml │ ├── config.ru │ ├── lib/ │ │ └── assets/ │ │ └── .keep │ ├── log/ │ │ └── .keep │ └── public/ │ ├── 404.html │ ├── 422.html │ └── 500.html ├── heroicon/ │ ├── configuration_test.rb │ └── icon_test.rb ├── heroicon_test.rb └── test_helper.rb ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/stale.yml ================================================ # Number of days of inactivity before an issue becomes stale daysUntilStale: 30 # Number of days of inactivity before a stale issue is closed daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - pinned - security # Label to use when marking an issue as stale staleLabel: wontfix # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false ================================================ FILE: .github/workflows/ci.yml ================================================ name: CI on: [push] jobs: test: runs-on: ubuntu-latest strategy: matrix: ruby: [2.5, 2.6, 2.7] steps: - name: Checkout uses: actions/checkout@master - name: Setup Ruby uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Install Dependencies run: | sudo apt-get update sudo apt-get install libsqlite3-dev gem update --system gem install bundler bundle install --jobs 4 --retry 3 - name: Test against rails main if: ${{ matrix.ruby == 2.7 }} run: | bundle exec appraisal rails-main bundle install bundle exec appraisal rails-main rake test - name: Test against rails 6.0 run: | bundle exec appraisal rails-6-0 bundle install bundle exec appraisal rails-6-0 rake test - name: Test against rails 5.2 run: | bundle exec appraisal rails-5-2 bundle install bundle exec appraisal rails-5-2 rake test lint: runs-on: ubuntu-latest strategy: matrix: ruby: [2.6] steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - run: bundle exec rake lint ================================================ FILE: .gitignore ================================================ .bundle/ log/*.log pkg/ test/dummy/db/*.sqlite3 test/dummy/db/*.sqlite3-journal test/dummy/db/*.sqlite3-* test/dummy/log/*.log test/dummy/storage/ test/dummy/tmp/ gemfiles/*.gemfile.lock Gemfile.lock ================================================ FILE: .standard.yml ================================================ fix: true format: progress parallel: true ================================================ FILE: Appraisals ================================================ appraise "rails-5-2" do gem "rails", "~> 5.2" end appraise "rails-6-0" do gem "rails", "~> 6.0" end appraise "rails-main" do gem "rails", git: "https://github.com/rails/rails.git", ref: "main" end ================================================ FILE: CHANGELOG.md ================================================ # Changelog All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org). This file is auto-generated so please do not edit it. ---- ## [1.0.0] - Sep 2, 2022 758969c ### Changes - Heroicons v2.0.10 (#19) ---- ## [0.4.0] - Aug 19, 2021 257a1a3 ### Changes - Update icons based on heroicons v1.0.1 (#5) ### Features - Add Default Class Option (#10) ---- ## [0.3.0] - Apr 1, 2021 109e472 ### Features - Allow HTML attributes in options (#3) ---- ## [0.2.3] - Feb 3, 2021 b30c44e ### Bug Fixes - Adjust keyword argument delegation to support Ruby 3.0 (#2) ### Changes - Update Tests to use Rails main ---- ## [0.2.2] - Jan 21, 2021 f8f5628 ### Changes - Reads icons directly from file rather than using asset pipeline - Update README to match Official Heroicon Package Version ---- ## [0.2.1] - Jan 15, 2021 7550bc5 ---- ## [0.2.0] - Dec 19, 2020 c357e2d ---- ================================================ FILE: Gemfile ================================================ # frozen_string_literal: true source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } # Declare your gem's dependencies in heroicon.gemspec. # Bundler will treat runtime dependencies like base dependencies, and # development dependencies will be added by default to the :development group. gemspec # Declare any dependencies that are still in development here instead of in # your gemspec. These might include edge Rails or gems from your path or # Git. Remember to move these dependencies to your gemspec before releasing # your gem to rubygems.org. # To use a debugger # gem 'byebug', group: [:development, :test] ================================================ FILE: MIT-LICENSE ================================================ Copyright 2020 Benjamin Hargett Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # Heroicon [![Build Status](https://github.com/bharget/heroicon/workflows/CI/badge.svg)](https://github.com/bharget/heroicon/actions) [![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard) Ruby on Rails view helpers for the beautiful hand-crafted SVG icons, Heroicons. Used in production at [beehiiv 🐝](https://www.beehiiv.com/?utm_source=bharget_github) This gem has no official affiliation with Tailwind CSS or the Heroicon team (yet!). Check out their sites: - [Tailwind CSS](https://tailwindcss.com/?utm_source=bharget_github) - [Tailwind UI](https://tailwindui.com/?utm_source=bharget_github) - [Heroicons](https://heroicons.com/?utm_source=bharget_github) ## Installation Add this line to your application's Gemfile: ```ruby gem "heroicon" ``` And then execute: ```bash $ bundle ``` Run the installer ```bash $ rails g heroicon:install ``` ## Usage To use a icon in your views, simply use the provided view helper with the name of an icon. ```rb <%= heroicon "magnifying-glass" %> ``` Heroicon comes with 3 variants, `:outline`, `:solid` and `:mini`. The default variant is `:solid`. This can be changed in `config/initializers/heroicon.rb`, which is generated during installation (See [Configuration](#configuration)). To overwrite this in the view, use ```rb <%= heroicon "magnifying-glass", variant: :outline %> ``` You can also pass HTML options directly to the icon. ```rb <%= heroicon "magnifying-glass", options: { class: "text-primary-500" } %> ``` Heroicon currently supports icons matching [`Version 2.0.10`](https://github.com/tailwindlabs/heroicons/releases/tag/v2.0.10). If there is an icon that is missing or a new version released, feel free to contribute by following our contributing guide below. # Configuration After running `rails g heroicon:install` in the installation step, a configuration file will be created at `config/initializers/heroicon.rb`. Currently there are two configuration options: - `variant`: The default variant to use if no variant is specified in the view. - You can set this to either `:outline` or `:solid`. Defaults to `:solid`. - `default_class`: A default class that gets applied to every icon. - This accepts either a String to apply to every icon, or a Hash, which applies the class based on the variant of the icon (see the example below). - You can disable this on a per-icon basis by passing `disable_default_class: true` in the options hash within the view. **Note:** If you enable the `default_class` config, make sure to include `config/intializers/heroicon.rb` in the list of purged paths. For TailwindCSS 3.0+, you should have something like this in your `tailwind.config.js`: ```js module.exports = { //... content: [ './app/helpers/**/*.rb', './app/javascript/**/*.js', './app/views/**/*', './config/initializers/heroicon.rb', // 👈 ], //... } ``` An example configuration looks like this: ```ruby Heroicon.configure do |config| config.variant = :solid config.default_class = {solid: "h-6 w-6", outline: "h-6 w-6", mini: "h-5 w-5"} end ``` Disabling the default class in the view: ```rb <%= heroicon "magnifying-glass", options: { class: "custom-class", disable_default_class: true } %> ``` ## Contributing Anyone is encouraged to help improve this project. Here are a few ways you can help: - [Report bugs](https://github.com/bharget/heroicon/issues) - Fix bugs and [submit pull requests](https://github.com/bharget/heroicon/pulls) - Write, clarify, or fix documentation - Suggest or add new features To get started with development: ``` git clone https://github.com/bharget/heroicon.git cd heroicon bundle install bundle exec rake test ``` ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). ================================================ FILE: Rakefile ================================================ # frozen_string_literal: true require "bundler/gem_tasks" task default: %i[lint test] namespace :test do task :refresh do sh "bin/appraisal clean" sh "bin/appraisal generate" end task :all do sh "bin/appraisal install" sh "bin/appraisal bin/rake test" end end task :test do sh "bin/test" end task :lint do sh "bin/standardrb --no-fix" end namespace :changelog do task :refresh do sh "bin/refresh_changelog" end end ================================================ FILE: app/helpers/heroicon/application_helper.rb ================================================ # frozen_string_literal: true module Heroicon module ApplicationHelper def heroicon(name, variant: Heroicon.configuration.variant, options: {}, path_options: {}) raw Heroicon::Icon.render( name: name, variant: variant, options: options, path_options: path_options ) end end end ================================================ FILE: bin/appraisal ================================================ #!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'appraisal' is installed as part of a gem, and # this file is here to facilitate running it. # require "pathname" ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", Pathname.new(__FILE__).realpath) bundle_binstub = File.expand_path("../bundle", __FILE__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("appraisal", "appraisal") ================================================ FILE: bin/publish ================================================ #!/usr/bin/env ruby # frozen_string_literal: true require "bundler/gem_tasks" require "pathname" RELEASE_TYPE = ARGV[0] class BranchCheck attr_reader :allowed_branch_prefix, :current_branch def initialize @current_branch = `git rev-parse --abbrev-ref HEAD`.strip @allowed_branch_prefix = "release-" end def check return true if valid? abort("\nError: Not on a valid release branch. Must begin with '#{allowed_branch_prefix}'.\n") end def valid? current_branch.start_with?(allowed_branch_prefix) end end class GitCheck attr_reader :diff def initialize @diff = `git status -s` end def check return true if valid? abort("\nError: Git working tree is dirty. Please commit or stash your changes.\n") end def valid? diff.empty? end end class ReleaseTypeCheck attr_reader :allowed_release_types, :release_type def initialize @release_type = RELEASE_TYPE @allowed_release_types = %w[major minor patch] end def check return true if valid? abort("\nError: Release type #{release_type} is invalid; must be one of #{allowed_release_types}.\n") end def valid? allowed_release_types.include? release_type end end class RubyGemsCheck def check return true if valid? abort("\nError: You must be logged in to RubyGems. Run 'gem signin'") end def valid? `gem signin`.empty? end end [ReleaseTypeCheck, BranchCheck, GitCheck, RubyGemsCheck].each do |check_class| check_class.new.check end APP_ROOT = Pathname.new File.expand_path("..", __dir__) current_version = Heroicon::VERSION.split(".").map(&:to_i) case RELEASE_TYPE when "major" current_version[0] += 1 current_version[1] = 0 current_version[2] = 0 when "minor" current_version[1] += 1 current_version[2] = 0 when "patch" current_version[2] += 1 end new_version = current_version.join(".") puts "--- Updating version to #{new_version} ---" version_file_contents = <<~FILE # frozen_string_literal: true module Heroicon VERSION = "#{new_version}" end FILE File.write("#{APP_ROOT}/lib/heroicon/version.rb", version_file_contents) puts "--- Updating CHANGELOG ---" `bundle exec rake changelog:refresh` puts "--- Adding Files ---" `git add .` puts "--- Commiting Changes ---" `git commit -m 'Bump version to #{new_version}'` puts "--- Pushing Changes ---" current_branch = `git rev-parse --abbrev-ref HEAD`.strip `git push -u origin #{current_branch}` puts "--- Ready ---" puts "To finish the release, merge the release into master, pull master locally, and run 'bundle exec rake release'." ================================================ FILE: bin/rails ================================================ #!/usr/bin/env ruby # frozen_string_literal: true # This command will automatically be run when you run "rails" with Rails gems # installed from the root of your application. ENGINE_ROOT = File.expand_path("..", __dir__) ENGINE_PATH = File.expand_path("../lib/heroicon/engine", __dir__) APP_PATH = File.expand_path("../test/dummy/config/application", __dir__) # Set up gems listed in the Gemfile. ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) require "rails/all" require "rails/engine/commands" ================================================ FILE: bin/rake ================================================ #!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'rake' is installed as part of a gem, and # this file is here to facilitate running it. # require "pathname" ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", Pathname.new(__FILE__).realpath) bundle_binstub = File.expand_path("../bundle", __FILE__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("rake", "rake") ================================================ FILE: bin/refresh_changelog ================================================ #!/usr/bin/env ruby # frozen_string_literal: true require "heroicon/version" require "active_support/core_ext/module/delegation" require "date" module AutoChangelog class Configuration attr_accessor :app_version attr_accessor :entry_sections attr_accessor :filename def initialize @app_version = nil @entry_sections = [] @filename = "CHANGELOG.md" end end class Log delegate \ :app_version, :entry_sections, :filename, to: "AutoChangelog.configuration" def initialize @log = read_changelog end def refresh add_changelog_entry File.write(filename, @log) end private ## # Generates a new changelog entry for the current version and # adds it to the contents of the file. # # The logic takes into account if this is the first entry being # generated or if there has already been an entry generated for # the current version and overwrites it. def add_changelog_entry if most_recent_entry.empty? @log += "\n#{text_to_replace}" elsif most_recent_entry_for_current_version? @log[most_recent_entry] = text_to_replace end @log[text_to_replace] = entry_text.strip end def current_commit_sha @current_commit_sha ||= `git rev-parse --short HEAD`.strip end def default_header_text <<~HEADER # Changelog All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org). This file is auto-generated so please do not edit it. HEADER end ## # Generate the text for a given entry section # # Example: # ### Section Title # - Git commit message # - Git commit message def entry_section_text(section) git_messages_by_marker(section[:marker]).then do |git_messages| return "" if git_messages.empty? section_header = "### #{section[:title]}\n" section_header + git_messages.map { |message| "- #{message}\n" }.join end end ## # Generate the text for each entry section and join it together def entry_sections_text entry_sections.map { |section| entry_section_text(section) }.join.strip end ## # Example: # ---- # ## [0.1.0] - Sept. 12, 2020 # 5a95ec3 # ### Bug Fixes # - Git commit message # - Git commit message # ### Features # - Git commit message # ---- def entry_text <<~ENTRY ---- ## [#{app_version}] - #{formatted_date} #{current_commit_sha} #{entry_sections_text} ---- ENTRY end def formatted_date Date.today.strftime("%b %e, %Y") end ## # Grabs all the commit messages between the current commit sha # and the last commit sha in the changelog. If this is the first # entry being generated for the changelog then there will be no # previous sha so we want to check all commit messages. def git_commits_between_versions return `git log` if previous_commit_sha.nil? `git log #{current_commit_sha}...#{previous_commit_sha}` end ## # Parses the git log looking for the specified marker for a # given entry section matching the line that contains it. def git_messages_by_marker(marker) git_commits_between_versions .scan(/^(.*)#{marker}(.*)$/) .map { |message| message.map(&:strip).join(" ") } end ## # Each changelong entry is delineated by "----" to allow us to # easily determine where one entry starts and another stops. # This regex will grab the first entry in the list. def most_recent_entry_regex /----(.*?)----/m end def read_changelog return File.read(filename) if File.exist?(filename) default_header_text end def most_recent_entry @log[most_recent_entry_regex] || "" end def most_recent_entry_for_current_version? most_recent_entry.include? "## [#{app_version}]" end def previous_commit_sha @previous_commit_sha ||= most_recent_entry.split("\n")[2] end def text_to_replace "----" end end def self.configuration @configuration ||= Configuration.new end def self.configure yield configuration end def self.refresh Log.new.refresh end end AutoChangelog.configure do |config| config.app_version = Heroicon::VERSION config.entry_sections = [ {title: "Bug Fixes", marker: ";B"}, {title: "Changes", marker: ";C"}, {title: "Deprecations", marker: ";D"}, {title: "Features", marker: ";F"}, {title: "Removed", marker: ";R"}, {title: "Security", marker: ";S"} ] end AutoChangelog.refresh ================================================ FILE: bin/standardrb ================================================ #!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'standardrb' is installed as part of a gem, and # this file is here to facilitate running it. # require "pathname" ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", Pathname.new(__FILE__).realpath) bundle_binstub = File.expand_path("../bundle", __FILE__) if File.file?(bundle_binstub) if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300)) load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("standard", "standardrb") ================================================ FILE: bin/test ================================================ #!/usr/bin/env ruby $: << File.expand_path("../test", __dir__) require "bundler/setup" require "rails/plugin/test" ================================================ FILE: gemfiles/rails_5_2.gemfile ================================================ # This file was generated by Appraisal source "https://rubygems.org" gem "rails", "~> 5.2" gemspec path: "../" ================================================ FILE: gemfiles/rails_6_0.gemfile ================================================ # This file was generated by Appraisal source "https://rubygems.org" gem "rails", "~> 6.0" gemspec path: "../" ================================================ FILE: gemfiles/rails_main.gemfile ================================================ # This file was generated by Appraisal source "https://rubygems.org" gem "rails", git: "https://github.com/rails/rails.git", ref: "main" gemspec path: "../" ================================================ FILE: heroicon.gemspec ================================================ # frozen_string_literal: true $LOAD_PATH.push File.expand_path("lib", __dir__) # Maintain your gem's version: require "heroicon/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |spec| spec.name = "heroicon" spec.version = Heroicon::VERSION spec.authors = ["Benjamin Hargett"] spec.email = ["hargettbenjamin@gmail.com"] spec.homepage = "https://github.com/bharget/heroicon" spec.summary = "Rails View Helpers for Heroicons." spec.description = "Ruby on Rails view helpers for the beautiful hand-crafted SVG icons, Heroicons." spec.license = "MIT" spec.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"] spec.required_ruby_version = ">= 2.5" spec.add_dependency "rails", ">= 5.2" spec.add_development_dependency "appraisal" spec.add_development_dependency "pry" spec.add_development_dependency "pry-rails" spec.add_development_dependency "standard" spec.add_development_dependency "sqlite3" spec.add_development_dependency "mocha" end ================================================ FILE: lib/generators/heroicon/install_generator.rb ================================================ # frozen_string_literal: true module Heroicon module Generators class InstallGenerator < Rails::Generators::Base source_root File.join(__dir__, "templates") def copy_config template "heroicon.rb", "config/initializers/heroicon.rb" end def copy_helper template "heroicon_helper.rb", "app/helpers/heroicon_helper.rb" end end end end ================================================ FILE: lib/generators/heroicon/templates/heroicon.rb.tt ================================================ # frozen_string_literal: true Heroicon.configure do |config| config.variant = :solid # Options are :solid, :outline and :mini ## # You can set a default class, which will get applied to every icon with # the given variant. To do so, un-comment the line below. # config.default_class = {solid: "h-5 w-5", outline: "h-6 w-6", mini: "h-4 w-4"} end ================================================ FILE: lib/generators/heroicon/templates/heroicon_helper.rb.tt ================================================ # frozen_string_literal: true module HeroiconHelper include Heroicon::Engine.helpers end ================================================ FILE: lib/heroicon/configuration.rb ================================================ # frozen_string_literal: true module Heroicon class Configuration DEFAULT_VARIANT = :solid attr_accessor :variant attr_accessor :default_class def initialize @variant = DEFAULT_VARIANT end end def self.configuration @configuration ||= Configuration.new end def self.configuration=(config) @configuration = config end def self.configure yield configuration end end ================================================ FILE: lib/heroicon/engine.rb ================================================ # frozen_string_literal: true module Heroicon class Engine < ::Rails::Engine isolate_namespace Heroicon end end ================================================ FILE: lib/heroicon/icon.rb ================================================ # frozen_string_literal: true module Heroicon class Icon attr_reader :name, :variant, :options, :path_options def initialize(name:, variant:, options:, path_options:) @name = name @variant = safe_variant(variant) @options = options @path_options = path_options end def render return warning unless file.present? doc = Nokogiri::HTML::DocumentFragment.parse(file) svg = doc.at_css "svg" path_options.each do |key, value| attribute = key.to_s.dasherize svg.css("path[#{attribute}]").each do |item| item[attribute] = value.to_s end end prepend_default_class_name options.each do |key, value| svg[key.to_s.dasherize] = value end doc end private ## # Prepends the default CSS class name for an icon. You can provide a String, which will apply # to all icons, or a Hash, which will apply to the specified variant. # # @example # Heroicon.configure do |config| # config.default_class = { solid: "h-5 w-5", outline: "h-6 w-6", mini: "h-4 w-4" } # end # # #=> ... def prepend_default_class_name return if disable_default_class? options[:class] = combine_classes_with_default_class if default_class.present? end def combine_classes_with_default_class default_class_list&.concat(additional_class_list)&.uniq&.join(" ") end def default_class_list default_class&.blank? ? [] : default_class&.strip&.split&.compact end def additional_class_list options[:class].blank? ? [] : options[:class]&.strip&.split&.compact end def default_class if default_class_config.is_a?(String) default_class_config elsif default_class_config.is_a?(Hash) default_class_config[variant] else "" end end def default_class_config @default_class_config ||= Heroicon.configuration.default_class end def disable_default_class? @disable_default_class ||= !!options.delete(:disable_default_class) end def safe_variant(provided_variant) if %i[solid outline mini].include?(provided_variant.to_sym) provided_variant else :solid end end def file @file ||= File.read(file_path).force_encoding("UTF-8") rescue nil end def file_path File.join(Heroicon.root, "app/assets/images/heroicon/#{variant}/#{name}.svg") end def warning return unless Rails.env.development? script = <<-HTML HTML script.strip end class << self def render(**kwargs) new(**kwargs).render end end end end ================================================ FILE: lib/heroicon/version.rb ================================================ # frozen_string_literal: true module Heroicon VERSION = "1.0.0" end ================================================ FILE: lib/heroicon.rb ================================================ # frozen_string_literal: true require "heroicon/engine" require "heroicon/icon" require "heroicon/configuration" module Heroicon def self.root File.dirname(__dir__) end end ================================================ FILE: test/dummy/.ruby-version ================================================ 2.7.5 ================================================ FILE: test/dummy/Rakefile ================================================ # frozen_string_literal: true # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require_relative "config/application" Rails.application.load_tasks ================================================ FILE: test/dummy/app/assets/config/manifest.js ================================================ //= link_tree ../images //= link_directory ../stylesheets .css //= link heroicon_manifest.js ================================================ FILE: test/dummy/app/assets/images/.keep ================================================ ================================================ FILE: test/dummy/app/assets/stylesheets/application.css ================================================ /* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the bottom of the * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS * files in this directory. Styles in this file should be added after the last require_* statement. * It is generally better to create a new file per style scope. * *= require_tree . *= require_self */ .h-4 { height: 1rem; } .w-4 { width: 1rem; } .h-5 { height: 1.25rem; } .w-5 { width: 1.25rem; } .h-6 { height: 1.5rem; } .w-6 { width: 1.5rem; } .h-10 { height: 2rem; } .w-10 { width: 2rem; } .text-red-500 { color: #f44336; } ================================================ FILE: test/dummy/app/channels/application_cable/channel.rb ================================================ # frozen_string_literal: true module ApplicationCable class Channel < ActionCable::Channel::Base end end ================================================ FILE: test/dummy/app/channels/application_cable/connection.rb ================================================ # frozen_string_literal: true module ApplicationCable class Connection < ActionCable::Connection::Base end end ================================================ FILE: test/dummy/app/controllers/application_controller.rb ================================================ # frozen_string_literal: true class ApplicationController < ActionController::Base end ================================================ FILE: test/dummy/app/controllers/concerns/.keep ================================================ ================================================ FILE: test/dummy/app/controllers/pages_controller.rb ================================================ # frozen_string_literal: true class PagesController < ApplicationController def home end end ================================================ FILE: test/dummy/app/helpers/application_helper.rb ================================================ # frozen_string_literal: true module ApplicationHelper include Heroicon::Engine.helpers end ================================================ FILE: test/dummy/app/helpers/heroicon_helper.rb ================================================ # frozen_string_literal: true module HeroiconHelper include Heroicon::Engine.helpers end ================================================ FILE: test/dummy/app/javascript/packs/application.js ================================================ // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // compiled file. JavaScript code in this file should be added after the last require_* statement. // // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details // about supported directives. // //= require rails-ujs //= require activestorage //= require_tree . ================================================ FILE: test/dummy/app/jobs/application_job.rb ================================================ # frozen_string_literal: true class ApplicationJob < ActiveJob::Base # Automatically retry jobs that encountered a deadlock # retry_on ActiveRecord::Deadlocked # Most jobs are safe to ignore if the underlying records are no longer available # discard_on ActiveJob::DeserializationError end ================================================ FILE: test/dummy/app/mailers/application_mailer.rb ================================================ # frozen_string_literal: true class ApplicationMailer < ActionMailer::Base default from: "from@example.com" layout "mailer" end ================================================ FILE: test/dummy/app/models/application_record.rb ================================================ # frozen_string_literal: true class ApplicationRecord < ActiveRecord::Base self.abstract_class = true end ================================================ FILE: test/dummy/app/models/concerns/.keep ================================================ ================================================ FILE: test/dummy/app/views/layouts/application.html.erb ================================================ Dummy <%= csrf_meta_tags %> <%= csp_meta_tag %> <%= stylesheet_link_tag 'application', media: 'all' %> <%= yield %> ================================================ FILE: test/dummy/app/views/layouts/mailer.html.erb ================================================ <%= yield %> ================================================ FILE: test/dummy/app/views/layouts/mailer.text.erb ================================================ <%= yield %> ================================================ FILE: test/dummy/app/views/pages/_edge_cases.html.erb ================================================
<%# Adding a custom class %> <%= heroicon "user", options: {class: "text-red-500"} %> <%# Adding a custom class and disabling default class %> <%= heroicon "user", options: {class: "text-red-500 h-10 w-10", disable_default_class: true} %> <%# Custom classes appear at the end of the class name %> <%= heroicon "user", variant: :outline, options: {class: "h-10 w-10"} %> <%# Stroke width path option %> <%= heroicon "user", variant: :outline, options: {stroke_width: 1} %>
================================================ FILE: test/dummy/app/views/pages/_mini.html.erb ================================================
<%= heroicon "academic-cap", variant: :mini %> <%= heroicon "adjustments-horizontal", variant: :mini %> <%= heroicon "adjustments-vertical", variant: :mini %> <%= heroicon "archive-box-arrow-down", variant: :mini %> <%= heroicon "archive-box-x-mark", variant: :mini %> <%= heroicon "archive-box", variant: :mini %> <%= heroicon "arrow-down-circle", variant: :mini %> <%= heroicon "arrow-down-left", variant: :mini %> <%= heroicon "arrow-down-on-square-stack", variant: :mini %> <%= heroicon "arrow-down-on-square", variant: :mini %> <%= heroicon "arrow-down-right", variant: :mini %> <%= heroicon "arrow-down-tray", variant: :mini %> <%= heroicon "arrow-down", variant: :mini %> <%= heroicon "arrow-left-circle", variant: :mini %> <%= heroicon "arrow-left-on-rectangle", variant: :mini %> <%= heroicon "arrow-left", variant: :mini %> <%= heroicon "arrow-long-down", variant: :mini %> <%= heroicon "arrow-long-left", variant: :mini %> <%= heroicon "arrow-long-right", variant: :mini %> <%= heroicon "arrow-long-up", variant: :mini %> <%= heroicon "arrow-path-rounded-square", variant: :mini %> <%= heroicon "arrow-path", variant: :mini %> <%= heroicon "arrow-right-circle", variant: :mini %> <%= heroicon "arrow-right-on-rectangle", variant: :mini %> <%= heroicon "arrow-right", variant: :mini %> <%= heroicon "arrow-small-down", variant: :mini %> <%= heroicon "arrow-small-left", variant: :mini %> <%= heroicon "arrow-small-right", variant: :mini %> <%= heroicon "arrow-small-up", variant: :mini %> <%= heroicon "arrow-top-right-on-square", variant: :mini %> <%= heroicon "arrow-trending-down", variant: :mini %> <%= heroicon "arrow-trending-up", variant: :mini %> <%= heroicon "arrow-up-circle", variant: :mini %> <%= heroicon "arrow-up-left", variant: :mini %> <%= heroicon "arrow-up-on-square-stack", variant: :mini %> <%= heroicon "arrow-up-on-square", variant: :mini %> <%= heroicon "arrow-up-right", variant: :mini %> <%= heroicon "arrow-up-tray", variant: :mini %> <%= heroicon "arrow-up", variant: :mini %> <%= heroicon "arrow-uturn-down", variant: :mini %> <%= heroicon "arrow-uturn-left", variant: :mini %> <%= heroicon "arrow-uturn-right", variant: :mini %> <%= heroicon "arrow-uturn-up", variant: :mini %> <%= heroicon "arrows-pointing-in", variant: :mini %> <%= heroicon "arrows-pointing-out", variant: :mini %> <%= heroicon "arrows-right-left", variant: :mini %> <%= heroicon "arrows-up-down", variant: :mini %> <%= heroicon "at-symbol", variant: :mini %> <%= heroicon "backspace", variant: :mini %> <%= heroicon "backward", variant: :mini %> <%= heroicon "banknotes", variant: :mini %> <%= heroicon "bars-2", variant: :mini %> <%= heroicon "bars-3-bottom-left", variant: :mini %> <%= heroicon "bars-3-bottom-right", variant: :mini %> <%= heroicon "bars-3-center-left", variant: :mini %> <%= heroicon "bars-3", variant: :mini %> <%= heroicon "bars-4", variant: :mini %> <%= heroicon "bars-arrow-down", variant: :mini %> <%= heroicon "bars-arrow-up", variant: :mini %> <%= heroicon "battery-0", variant: :mini %> <%= heroicon "battery-100", variant: :mini %> <%= heroicon "battery-50", variant: :mini %> <%= heroicon "beaker", variant: :mini %> <%= heroicon "bell-alert", variant: :mini %> <%= heroicon "bell-slash", variant: :mini %> <%= heroicon "bell-snooze", variant: :mini %> <%= heroicon "bell", variant: :mini %> <%= heroicon "bolt-slash", variant: :mini %> <%= heroicon "bolt", variant: :mini %> <%= heroicon "book-open", variant: :mini %> <%= heroicon "bookmark-slash", variant: :mini %> <%= heroicon "bookmark-square", variant: :mini %> <%= heroicon "bookmark", variant: :mini %> <%= heroicon "briefcase", variant: :mini %> <%= heroicon "building-library", variant: :mini %> <%= heroicon "building-office-2", variant: :mini %> <%= heroicon "building-office", variant: :mini %> <%= heroicon "building-storefront", variant: :mini %> <%= heroicon "cake", variant: :mini %> <%= heroicon "calculator", variant: :mini %> <%= heroicon "calendar-days", variant: :mini %> <%= heroicon "calendar", variant: :mini %> <%= heroicon "camera", variant: :mini %> <%= heroicon "chart-bar-square", variant: :mini %> <%= heroicon "chart-bar", variant: :mini %> <%= heroicon "chart-pie", variant: :mini %> <%= heroicon "chat-bubble-bottom-center-text", variant: :mini %> <%= heroicon "chat-bubble-bottom-center", variant: :mini %> <%= heroicon "chat-bubble-left-ellipsis", variant: :mini %> <%= heroicon "chat-bubble-left-right", variant: :mini %> <%= heroicon "chat-bubble-left", variant: :mini %> <%= heroicon "chat-bubble-oval-left-ellipsis", variant: :mini %> <%= heroicon "chat-bubble-oval-left", variant: :mini %> <%= heroicon "check-badge", variant: :mini %> <%= heroicon "check-circle", variant: :mini %> <%= heroicon "check", variant: :mini %> <%= heroicon "chevron-double-down", variant: :mini %> <%= heroicon "chevron-double-left", variant: :mini %> <%= heroicon "chevron-double-right", variant: :mini %> <%= heroicon "chevron-double-up", variant: :mini %> <%= heroicon "chevron-down", variant: :mini %> <%= heroicon "chevron-left", variant: :mini %> <%= heroicon "chevron-right", variant: :mini %> <%= heroicon "chevron-up-down", variant: :mini %> <%= heroicon "chevron-up", variant: :mini %> <%= heroicon "circle-stack", variant: :mini %> <%= heroicon "clipboard-document-check", variant: :mini %> <%= heroicon "clipboard-document-list", variant: :mini %> <%= heroicon "clipboard-document", variant: :mini %> <%= heroicon "clipboard", variant: :mini %> <%= heroicon "clock", variant: :mini %> <%= heroicon "cloud-arrow-down", variant: :mini %> <%= heroicon "cloud-arrow-up", variant: :mini %> <%= heroicon "cloud", variant: :mini %> <%= heroicon "code-bracket-square", variant: :mini %> <%= heroicon "code-bracket", variant: :mini %> <%= heroicon "cog-6-tooth", variant: :mini %> <%= heroicon "cog-8-tooth", variant: :mini %> <%= heroicon "cog", variant: :mini %> <%= heroicon "command-line", variant: :mini %> <%= heroicon "computer-desktop", variant: :mini %> <%= heroicon "cpu-chip", variant: :mini %> <%= heroicon "credit-card", variant: :mini %> <%= heroicon "cube-transparent", variant: :mini %> <%= heroicon "cube", variant: :mini %> <%= heroicon "currency-bangladeshi", variant: :mini %> <%= heroicon "currency-dollar", variant: :mini %> <%= heroicon "currency-euro", variant: :mini %> <%= heroicon "currency-pound", variant: :mini %> <%= heroicon "currency-rupee", variant: :mini %> <%= heroicon "currency-yen", variant: :mini %> <%= heroicon "cursor-arrow-rays", variant: :mini %> <%= heroicon "cursor-arrow-ripple", variant: :mini %> <%= heroicon "device-phone-mobile", variant: :mini %> <%= heroicon "device-tablet", variant: :mini %> <%= heroicon "document-arrow-down", variant: :mini %> <%= heroicon "document-arrow-up", variant: :mini %> <%= heroicon "document-chart-bar", variant: :mini %> <%= heroicon "document-check", variant: :mini %> <%= heroicon "document-duplicate", variant: :mini %> <%= heroicon "document-magnifying-glass", variant: :mini %> <%= heroicon "document-minus", variant: :mini %> <%= heroicon "document-plus", variant: :mini %> <%= heroicon "document-text", variant: :mini %> <%= heroicon "document", variant: :mini %> <%= heroicon "ellipsis-horizontal-circle", variant: :mini %> <%= heroicon "ellipsis-horizontal", variant: :mini %> <%= heroicon "ellipsis-vertical", variant: :mini %> <%= heroicon "envelope-open", variant: :mini %> <%= heroicon "envelope", variant: :mini %> <%= heroicon "exclamation-circle", variant: :mini %> <%= heroicon "exclamation-triangle", variant: :mini %> <%= heroicon "eye-slash", variant: :mini %> <%= heroicon "eye", variant: :mini %> <%= heroicon "face-frown", variant: :mini %> <%= heroicon "face-smile", variant: :mini %> <%= heroicon "film", variant: :mini %> <%= heroicon "finger-print", variant: :mini %> <%= heroicon "fire", variant: :mini %> <%= heroicon "flag", variant: :mini %> <%= heroicon "folder-arrow-down", variant: :mini %> <%= heroicon "folder-minus", variant: :mini %> <%= heroicon "folder-open", variant: :mini %> <%= heroicon "folder-plus", variant: :mini %> <%= heroicon "folder", variant: :mini %> <%= heroicon "forward", variant: :mini %> <%= heroicon "funnel", variant: :mini %> <%= heroicon "gif", variant: :mini %> <%= heroicon "gift-top", variant: :mini %> <%= heroicon "gift", variant: :mini %> <%= heroicon "globe-alt", variant: :mini %> <%= heroicon "globe-americas", variant: :mini %> <%= heroicon "globe-asia-australia", variant: :mini %> <%= heroicon "globe-europe-africa", variant: :mini %> <%= heroicon "hand-raised", variant: :mini %> <%= heroicon "hand-thumb-down", variant: :mini %> <%= heroicon "hand-thumb-up", variant: :mini %> <%= heroicon "hashtag", variant: :mini %> <%= heroicon "heart", variant: :mini %> <%= heroicon "home-modern", variant: :mini %> <%= heroicon "home", variant: :mini %> <%= heroicon "identification", variant: :mini %> <%= heroicon "inbox-arrow-down", variant: :mini %> <%= heroicon "inbox-stack", variant: :mini %> <%= heroicon "inbox", variant: :mini %> <%= heroicon "information-circle", variant: :mini %> <%= heroicon "key", variant: :mini %> <%= heroicon "language", variant: :mini %> <%= heroicon "lifebuoy", variant: :mini %> <%= heroicon "light-bulb", variant: :mini %> <%= heroicon "link", variant: :mini %> <%= heroicon "list-bullet", variant: :mini %> <%= heroicon "lock-closed", variant: :mini %> <%= heroicon "lock-open", variant: :mini %> <%= heroicon "magnifying-glass-circle", variant: :mini %> <%= heroicon "magnifying-glass-minus", variant: :mini %> <%= heroicon "magnifying-glass-plus", variant: :mini %> <%= heroicon "magnifying-glass", variant: :mini %> <%= heroicon "map-pin", variant: :mini %> <%= heroicon "map", variant: :mini %> <%= heroicon "megaphone", variant: :mini %> <%= heroicon "microphone", variant: :mini %> <%= heroicon "minus-circle", variant: :mini %> <%= heroicon "minus-small", variant: :mini %> <%= heroicon "minus", variant: :mini %> <%= heroicon "moon", variant: :mini %> <%= heroicon "musical-note", variant: :mini %> <%= heroicon "newspaper", variant: :mini %> <%= heroicon "no-symbol", variant: :mini %> <%= heroicon "paint-brush", variant: :mini %> <%= heroicon "paper-airplane", variant: :mini %> <%= heroicon "paper-clip", variant: :mini %> <%= heroicon "pause", variant: :mini %> <%= heroicon "pencil-square", variant: :mini %> <%= heroicon "pencil", variant: :mini %> <%= heroicon "phone-arrow-down-left", variant: :mini %> <%= heroicon "phone-arrow-up-right", variant: :mini %> <%= heroicon "phone-x-mark", variant: :mini %> <%= heroicon "phone", variant: :mini %> <%= heroicon "photo", variant: :mini %> <%= heroicon "play-pause", variant: :mini %> <%= heroicon "play", variant: :mini %> <%= heroicon "plus-circle", variant: :mini %> <%= heroicon "plus-small", variant: :mini %> <%= heroicon "plus", variant: :mini %> <%= heroicon "presentation-chart-bar", variant: :mini %> <%= heroicon "presentation-chart-line", variant: :mini %> <%= heroicon "printer", variant: :mini %> <%= heroicon "puzzle-piece", variant: :mini %> <%= heroicon "qr-code", variant: :mini %> <%= heroicon "question-mark-circle", variant: :mini %> <%= heroicon "queue-list", variant: :mini %> <%= heroicon "radio", variant: :mini %> <%= heroicon "receipt-percent", variant: :mini %> <%= heroicon "receipt-refund", variant: :mini %> <%= heroicon "rectangle-group", variant: :mini %> <%= heroicon "rectangle-stack", variant: :mini %> <%= heroicon "rss", variant: :mini %> <%= heroicon "scale", variant: :mini %> <%= heroicon "scissors", variant: :mini %> <%= heroicon "server-stack", variant: :mini %> <%= heroicon "server", variant: :mini %> <%= heroicon "share", variant: :mini %> <%= heroicon "shield-check", variant: :mini %> <%= heroicon "shield-exclamation", variant: :mini %> <%= heroicon "shopping-bag", variant: :mini %> <%= heroicon "shopping-cart", variant: :mini %> <%= heroicon "signal-slash", variant: :mini %> <%= heroicon "signal", variant: :mini %> <%= heroicon "sparkles", variant: :mini %> <%= heroicon "speaker-wave", variant: :mini %> <%= heroicon "speaker-x-mark", variant: :mini %> <%= heroicon "square-2-stack", variant: :mini %> <%= heroicon "squares-2x2", variant: :mini %> <%= heroicon "squares-plus", variant: :mini %> <%= heroicon "star", variant: :mini %> <%= heroicon "stop", variant: :mini %> <%= heroicon "sun", variant: :mini %> <%= heroicon "swatch", variant: :mini %> <%= heroicon "table-cells", variant: :mini %> <%= heroicon "tag", variant: :mini %> <%= heroicon "ticket", variant: :mini %> <%= heroicon "trash", variant: :mini %> <%= heroicon "truck", variant: :mini %> <%= heroicon "user-circle", variant: :mini %> <%= heroicon "user-group", variant: :mini %> <%= heroicon "user-minus", variant: :mini %> <%= heroicon "user-plus", variant: :mini %> <%= heroicon "user", variant: :mini %> <%= heroicon "users", variant: :mini %> <%= heroicon "variable", variant: :mini %> <%= heroicon "video-camera-slash", variant: :mini %> <%= heroicon "video-camera", variant: :mini %> <%= heroicon "view-columns", variant: :mini %> <%= heroicon "wallet", variant: :mini %> <%= heroicon "wifi", variant: :mini %> <%= heroicon "wrench-screwdriver", variant: :mini %> <%= heroicon "wrench", variant: :mini %> <%= heroicon "x-circle", variant: :mini %> <%= heroicon "x-mark", variant: :mini %>
================================================ FILE: test/dummy/app/views/pages/_outline.html.erb ================================================
<%= heroicon "academic-cap", variant: :outline %> <%= heroicon "adjustments-horizontal", variant: :outline %> <%= heroicon "adjustments-vertical", variant: :outline %> <%= heroicon "archive-box-arrow-down", variant: :outline %> <%= heroicon "archive-box-x-mark", variant: :outline %> <%= heroicon "archive-box", variant: :outline %> <%= heroicon "arrow-down-circle", variant: :outline %> <%= heroicon "arrow-down-left", variant: :outline %> <%= heroicon "arrow-down-on-square-stack", variant: :outline %> <%= heroicon "arrow-down-on-square", variant: :outline %> <%= heroicon "arrow-down-right", variant: :outline %> <%= heroicon "arrow-down-tray", variant: :outline %> <%= heroicon "arrow-down", variant: :outline %> <%= heroicon "arrow-left-circle", variant: :outline %> <%= heroicon "arrow-left-on-rectangle", variant: :outline %> <%= heroicon "arrow-left", variant: :outline %> <%= heroicon "arrow-long-down", variant: :outline %> <%= heroicon "arrow-long-left", variant: :outline %> <%= heroicon "arrow-long-right", variant: :outline %> <%= heroicon "arrow-long-up", variant: :outline %> <%= heroicon "arrow-path-rounded-square", variant: :outline %> <%= heroicon "arrow-path", variant: :outline %> <%= heroicon "arrow-right-circle", variant: :outline %> <%= heroicon "arrow-right-on-rectangle", variant: :outline %> <%= heroicon "arrow-right", variant: :outline %> <%= heroicon "arrow-small-down", variant: :outline %> <%= heroicon "arrow-small-left", variant: :outline %> <%= heroicon "arrow-small-right", variant: :outline %> <%= heroicon "arrow-small-up", variant: :outline %> <%= heroicon "arrow-top-right-on-square", variant: :outline %> <%= heroicon "arrow-trending-down", variant: :outline %> <%= heroicon "arrow-trending-up", variant: :outline %> <%= heroicon "arrow-up-circle", variant: :outline %> <%= heroicon "arrow-up-left", variant: :outline %> <%= heroicon "arrow-up-on-square-stack", variant: :outline %> <%= heroicon "arrow-up-on-square", variant: :outline %> <%= heroicon "arrow-up-right", variant: :outline %> <%= heroicon "arrow-up-tray", variant: :outline %> <%= heroicon "arrow-up", variant: :outline %> <%= heroicon "arrow-uturn-down", variant: :outline %> <%= heroicon "arrow-uturn-left", variant: :outline %> <%= heroicon "arrow-uturn-right", variant: :outline %> <%= heroicon "arrow-uturn-up", variant: :outline %> <%= heroicon "arrows-pointing-in", variant: :outline %> <%= heroicon "arrows-pointing-out", variant: :outline %> <%= heroicon "arrows-right-left", variant: :outline %> <%= heroicon "arrows-up-down", variant: :outline %> <%= heroicon "at-symbol", variant: :outline %> <%= heroicon "backspace", variant: :outline %> <%= heroicon "backward", variant: :outline %> <%= heroicon "banknotes", variant: :outline %> <%= heroicon "bars-2", variant: :outline %> <%= heroicon "bars-3-bottom-left", variant: :outline %> <%= heroicon "bars-3-bottom-right", variant: :outline %> <%= heroicon "bars-3-center-left", variant: :outline %> <%= heroicon "bars-3", variant: :outline %> <%= heroicon "bars-4", variant: :outline %> <%= heroicon "bars-arrow-down", variant: :outline %> <%= heroicon "bars-arrow-up", variant: :outline %> <%= heroicon "battery-0", variant: :outline %> <%= heroicon "battery-100", variant: :outline %> <%= heroicon "battery-50", variant: :outline %> <%= heroicon "beaker", variant: :outline %> <%= heroicon "bell-alert", variant: :outline %> <%= heroicon "bell-slash", variant: :outline %> <%= heroicon "bell-snooze", variant: :outline %> <%= heroicon "bell", variant: :outline %> <%= heroicon "bolt-slash", variant: :outline %> <%= heroicon "bolt", variant: :outline %> <%= heroicon "book-open", variant: :outline %> <%= heroicon "bookmark-slash", variant: :outline %> <%= heroicon "bookmark-square", variant: :outline %> <%= heroicon "bookmark", variant: :outline %> <%= heroicon "briefcase", variant: :outline %> <%= heroicon "building-library", variant: :outline %> <%= heroicon "building-office-2", variant: :outline %> <%= heroicon "building-office", variant: :outline %> <%= heroicon "building-storefront", variant: :outline %> <%= heroicon "cake", variant: :outline %> <%= heroicon "calculator", variant: :outline %> <%= heroicon "calendar-days", variant: :outline %> <%= heroicon "calendar", variant: :outline %> <%= heroicon "camera", variant: :outline %> <%= heroicon "chart-bar-square", variant: :outline %> <%= heroicon "chart-bar", variant: :outline %> <%= heroicon "chart-pie", variant: :outline %> <%= heroicon "chat-bubble-bottom-center-text", variant: :outline %> <%= heroicon "chat-bubble-bottom-center", variant: :outline %> <%= heroicon "chat-bubble-left-ellipsis", variant: :outline %> <%= heroicon "chat-bubble-left-right", variant: :outline %> <%= heroicon "chat-bubble-left", variant: :outline %> <%= heroicon "chat-bubble-oval-left-ellipsis", variant: :outline %> <%= heroicon "chat-bubble-oval-left", variant: :outline %> <%= heroicon "check-badge", variant: :outline %> <%= heroicon "check-circle", variant: :outline %> <%= heroicon "check", variant: :outline %> <%= heroicon "chevron-double-down", variant: :outline %> <%= heroicon "chevron-double-left", variant: :outline %> <%= heroicon "chevron-double-right", variant: :outline %> <%= heroicon "chevron-double-up", variant: :outline %> <%= heroicon "chevron-down", variant: :outline %> <%= heroicon "chevron-left", variant: :outline %> <%= heroicon "chevron-right", variant: :outline %> <%= heroicon "chevron-up-down", variant: :outline %> <%= heroicon "chevron-up", variant: :outline %> <%= heroicon "circle-stack", variant: :outline %> <%= heroicon "clipboard-document-check", variant: :outline %> <%= heroicon "clipboard-document-list", variant: :outline %> <%= heroicon "clipboard-document", variant: :outline %> <%= heroicon "clipboard", variant: :outline %> <%= heroicon "clock", variant: :outline %> <%= heroicon "cloud-arrow-down", variant: :outline %> <%= heroicon "cloud-arrow-up", variant: :outline %> <%= heroicon "cloud", variant: :outline %> <%= heroicon "code-bracket-square", variant: :outline %> <%= heroicon "code-bracket", variant: :outline %> <%= heroicon "cog-6-tooth", variant: :outline %> <%= heroicon "cog-8-tooth", variant: :outline %> <%= heroicon "cog", variant: :outline %> <%= heroicon "command-line", variant: :outline %> <%= heroicon "computer-desktop", variant: :outline %> <%= heroicon "cpu-chip", variant: :outline %> <%= heroicon "credit-card", variant: :outline %> <%= heroicon "cube-transparent", variant: :outline %> <%= heroicon "cube", variant: :outline %> <%= heroicon "currency-bangladeshi", variant: :outline %> <%= heroicon "currency-dollar", variant: :outline %> <%= heroicon "currency-euro", variant: :outline %> <%= heroicon "currency-pound", variant: :outline %> <%= heroicon "currency-rupee", variant: :outline %> <%= heroicon "currency-yen", variant: :outline %> <%= heroicon "cursor-arrow-rays", variant: :outline %> <%= heroicon "cursor-arrow-ripple", variant: :outline %> <%= heroicon "device-phone-mobile", variant: :outline %> <%= heroicon "device-tablet", variant: :outline %> <%= heroicon "document-arrow-down", variant: :outline %> <%= heroicon "document-arrow-up", variant: :outline %> <%= heroicon "document-chart-bar", variant: :outline %> <%= heroicon "document-check", variant: :outline %> <%= heroicon "document-duplicate", variant: :outline %> <%= heroicon "document-magnifying-glass", variant: :outline %> <%= heroicon "document-minus", variant: :outline %> <%= heroicon "document-plus", variant: :outline %> <%= heroicon "document-text", variant: :outline %> <%= heroicon "document", variant: :outline %> <%= heroicon "ellipsis-horizontal-circle", variant: :outline %> <%= heroicon "ellipsis-horizontal", variant: :outline %> <%= heroicon "ellipsis-vertical", variant: :outline %> <%= heroicon "envelope-open", variant: :outline %> <%= heroicon "envelope", variant: :outline %> <%= heroicon "exclamation-circle", variant: :outline %> <%= heroicon "exclamation-triangle", variant: :outline %> <%= heroicon "eye-slash", variant: :outline %> <%= heroicon "eye", variant: :outline %> <%= heroicon "face-frown", variant: :outline %> <%= heroicon "face-smile", variant: :outline %> <%= heroicon "film", variant: :outline %> <%= heroicon "finger-print", variant: :outline %> <%= heroicon "fire", variant: :outline %> <%= heroicon "flag", variant: :outline %> <%= heroicon "folder-arrow-down", variant: :outline %> <%= heroicon "folder-minus", variant: :outline %> <%= heroicon "folder-open", variant: :outline %> <%= heroicon "folder-plus", variant: :outline %> <%= heroicon "folder", variant: :outline %> <%= heroicon "forward", variant: :outline %> <%= heroicon "funnel", variant: :outline %> <%= heroicon "gif", variant: :outline %> <%= heroicon "gift-top", variant: :outline %> <%= heroicon "gift", variant: :outline %> <%= heroicon "globe-alt", variant: :outline %> <%= heroicon "globe-americas", variant: :outline %> <%= heroicon "globe-asia-australia", variant: :outline %> <%= heroicon "globe-europe-africa", variant: :outline %> <%= heroicon "hand-raised", variant: :outline %> <%= heroicon "hand-thumb-down", variant: :outline %> <%= heroicon "hand-thumb-up", variant: :outline %> <%= heroicon "hashtag", variant: :outline %> <%= heroicon "heart", variant: :outline %> <%= heroicon "home-modern", variant: :outline %> <%= heroicon "home", variant: :outline %> <%= heroicon "identification", variant: :outline %> <%= heroicon "inbox-arrow-down", variant: :outline %> <%= heroicon "inbox-stack", variant: :outline %> <%= heroicon "inbox", variant: :outline %> <%= heroicon "information-circle", variant: :outline %> <%= heroicon "key", variant: :outline %> <%= heroicon "language", variant: :outline %> <%= heroicon "lifebuoy", variant: :outline %> <%= heroicon "light-bulb", variant: :outline %> <%= heroicon "link", variant: :outline %> <%= heroicon "list-bullet", variant: :outline %> <%= heroicon "lock-closed", variant: :outline %> <%= heroicon "lock-open", variant: :outline %> <%= heroicon "magnifying-glass-circle", variant: :outline %> <%= heroicon "magnifying-glass-minus", variant: :outline %> <%= heroicon "magnifying-glass-plus", variant: :outline %> <%= heroicon "magnifying-glass", variant: :outline %> <%= heroicon "map-pin", variant: :outline %> <%= heroicon "map", variant: :outline %> <%= heroicon "megaphone", variant: :outline %> <%= heroicon "microphone", variant: :outline %> <%= heroicon "minus-circle", variant: :outline %> <%= heroicon "minus-small", variant: :outline %> <%= heroicon "minus", variant: :outline %> <%= heroicon "moon", variant: :outline %> <%= heroicon "musical-note", variant: :outline %> <%= heroicon "newspaper", variant: :outline %> <%= heroicon "no-symbol", variant: :outline %> <%= heroicon "paint-brush", variant: :outline %> <%= heroicon "paper-airplane", variant: :outline %> <%= heroicon "paper-clip", variant: :outline %> <%= heroicon "pause", variant: :outline %> <%= heroicon "pencil-square", variant: :outline %> <%= heroicon "pencil", variant: :outline %> <%= heroicon "phone-arrow-down-left", variant: :outline %> <%= heroicon "phone-arrow-up-right", variant: :outline %> <%= heroicon "phone-x-mark", variant: :outline %> <%= heroicon "phone", variant: :outline %> <%= heroicon "photo", variant: :outline %> <%= heroicon "play-pause", variant: :outline %> <%= heroicon "play", variant: :outline %> <%= heroicon "plus-circle", variant: :outline %> <%= heroicon "plus-small", variant: :outline %> <%= heroicon "plus", variant: :outline %> <%= heroicon "presentation-chart-bar", variant: :outline %> <%= heroicon "presentation-chart-line", variant: :outline %> <%= heroicon "printer", variant: :outline %> <%= heroicon "puzzle-piece", variant: :outline %> <%= heroicon "qr-code", variant: :outline %> <%= heroicon "question-mark-circle", variant: :outline %> <%= heroicon "queue-list", variant: :outline %> <%= heroicon "radio", variant: :outline %> <%= heroicon "receipt-percent", variant: :outline %> <%= heroicon "receipt-refund", variant: :outline %> <%= heroicon "rectangle-group", variant: :outline %> <%= heroicon "rectangle-stack", variant: :outline %> <%= heroicon "rss", variant: :outline %> <%= heroicon "scale", variant: :outline %> <%= heroicon "scissors", variant: :outline %> <%= heroicon "server-stack", variant: :outline %> <%= heroicon "server", variant: :outline %> <%= heroicon "share", variant: :outline %> <%= heroicon "shield-check", variant: :outline %> <%= heroicon "shield-exclamation", variant: :outline %> <%= heroicon "shopping-bag", variant: :outline %> <%= heroicon "shopping-cart", variant: :outline %> <%= heroicon "signal-slash", variant: :outline %> <%= heroicon "signal", variant: :outline %> <%= heroicon "sparkles", variant: :outline %> <%= heroicon "speaker-wave", variant: :outline %> <%= heroicon "speaker-x-mark", variant: :outline %> <%= heroicon "square-2-stack", variant: :outline %> <%= heroicon "squares-2x2", variant: :outline %> <%= heroicon "squares-plus", variant: :outline %> <%= heroicon "star", variant: :outline %> <%= heroicon "stop", variant: :outline %> <%= heroicon "sun", variant: :outline %> <%= heroicon "swatch", variant: :outline %> <%= heroicon "table-cells", variant: :outline %> <%= heroicon "tag", variant: :outline %> <%= heroicon "ticket", variant: :outline %> <%= heroicon "trash", variant: :outline %> <%= heroicon "truck", variant: :outline %> <%= heroicon "user-circle", variant: :outline %> <%= heroicon "user-group", variant: :outline %> <%= heroicon "user-minus", variant: :outline %> <%= heroicon "user-plus", variant: :outline %> <%= heroicon "user", variant: :outline %> <%= heroicon "users", variant: :outline %> <%= heroicon "variable", variant: :outline %> <%= heroicon "video-camera-slash", variant: :outline %> <%= heroicon "video-camera", variant: :outline %> <%= heroicon "view-columns", variant: :outline %> <%= heroicon "wallet", variant: :outline %> <%= heroicon "wifi", variant: :outline %> <%= heroicon "wrench-screwdriver", variant: :outline %> <%= heroicon "wrench", variant: :outline %> <%= heroicon "x-circle", variant: :outline %> <%= heroicon "x-mark", variant: :outline %>
================================================ FILE: test/dummy/app/views/pages/_solid.html.erb ================================================
<%= heroicon "academic-cap" %> <%= heroicon "adjustments-horizontal" %> <%= heroicon "adjustments-vertical" %> <%= heroicon "archive-box-arrow-down" %> <%= heroicon "archive-box-x-mark" %> <%= heroicon "archive-box" %> <%= heroicon "arrow-down-circle" %> <%= heroicon "arrow-down-left" %> <%= heroicon "arrow-down-on-square-stack" %> <%= heroicon "arrow-down-on-square" %> <%= heroicon "arrow-down-right" %> <%= heroicon "arrow-down-tray" %> <%= heroicon "arrow-down" %> <%= heroicon "arrow-left-circle" %> <%= heroicon "arrow-left-on-rectangle" %> <%= heroicon "arrow-left" %> <%= heroicon "arrow-long-down" %> <%= heroicon "arrow-long-left" %> <%= heroicon "arrow-long-right" %> <%= heroicon "arrow-long-up" %> <%= heroicon "arrow-path-rounded-square" %> <%= heroicon "arrow-path" %> <%= heroicon "arrow-right-circle" %> <%= heroicon "arrow-right-on-rectangle" %> <%= heroicon "arrow-right" %> <%= heroicon "arrow-small-down" %> <%= heroicon "arrow-small-left" %> <%= heroicon "arrow-small-right" %> <%= heroicon "arrow-small-up" %> <%= heroicon "arrow-top-right-on-square" %> <%= heroicon "arrow-trending-down" %> <%= heroicon "arrow-trending-up" %> <%= heroicon "arrow-up-circle" %> <%= heroicon "arrow-up-left" %> <%= heroicon "arrow-up-on-square-stack" %> <%= heroicon "arrow-up-on-square" %> <%= heroicon "arrow-up-right" %> <%= heroicon "arrow-up-tray" %> <%= heroicon "arrow-up" %> <%= heroicon "arrow-uturn-down" %> <%= heroicon "arrow-uturn-left" %> <%= heroicon "arrow-uturn-right" %> <%= heroicon "arrow-uturn-up" %> <%= heroicon "arrows-pointing-in" %> <%= heroicon "arrows-pointing-out" %> <%= heroicon "arrows-right-left" %> <%= heroicon "arrows-up-down" %> <%= heroicon "at-symbol" %> <%= heroicon "backspace" %> <%= heroicon "backward" %> <%= heroicon "banknotes" %> <%= heroicon "bars-2" %> <%= heroicon "bars-3-bottom-left" %> <%= heroicon "bars-3-bottom-right" %> <%= heroicon "bars-3-center-left" %> <%= heroicon "bars-3" %> <%= heroicon "bars-4" %> <%= heroicon "bars-arrow-down" %> <%= heroicon "bars-arrow-up" %> <%= heroicon "battery-0" %> <%= heroicon "battery-100" %> <%= heroicon "battery-50" %> <%= heroicon "beaker" %> <%= heroicon "bell-alert" %> <%= heroicon "bell-slash" %> <%= heroicon "bell-snooze" %> <%= heroicon "bell" %> <%= heroicon "bolt-slash" %> <%= heroicon "bolt" %> <%= heroicon "book-open" %> <%= heroicon "bookmark-slash" %> <%= heroicon "bookmark-square" %> <%= heroicon "bookmark" %> <%= heroicon "briefcase" %> <%= heroicon "building-library" %> <%= heroicon "building-office-2" %> <%= heroicon "building-office" %> <%= heroicon "building-storefront" %> <%= heroicon "cake" %> <%= heroicon "calculator" %> <%= heroicon "calendar-days" %> <%= heroicon "calendar" %> <%= heroicon "camera" %> <%= heroicon "chart-bar-square" %> <%= heroicon "chart-bar" %> <%= heroicon "chart-pie" %> <%= heroicon "chat-bubble-bottom-center-text" %> <%= heroicon "chat-bubble-bottom-center" %> <%= heroicon "chat-bubble-left-ellipsis" %> <%= heroicon "chat-bubble-left-right" %> <%= heroicon "chat-bubble-left" %> <%= heroicon "chat-bubble-oval-left-ellipsis" %> <%= heroicon "chat-bubble-oval-left" %> <%= heroicon "check-badge" %> <%= heroicon "check-circle" %> <%= heroicon "check" %> <%= heroicon "chevron-double-down" %> <%= heroicon "chevron-double-left" %> <%= heroicon "chevron-double-right" %> <%= heroicon "chevron-double-up" %> <%= heroicon "chevron-down" %> <%= heroicon "chevron-left" %> <%= heroicon "chevron-right" %> <%= heroicon "chevron-up-down" %> <%= heroicon "chevron-up" %> <%= heroicon "circle-stack" %> <%= heroicon "clipboard-document-check" %> <%= heroicon "clipboard-document-list" %> <%= heroicon "clipboard-document" %> <%= heroicon "clipboard" %> <%= heroicon "clock" %> <%= heroicon "cloud-arrow-down" %> <%= heroicon "cloud-arrow-up" %> <%= heroicon "cloud" %> <%= heroicon "code-bracket-square" %> <%= heroicon "code-bracket" %> <%= heroicon "cog-6-tooth" %> <%= heroicon "cog-8-tooth" %> <%= heroicon "cog" %> <%= heroicon "command-line" %> <%= heroicon "computer-desktop" %> <%= heroicon "cpu-chip" %> <%= heroicon "credit-card" %> <%= heroicon "cube-transparent" %> <%= heroicon "cube" %> <%= heroicon "currency-bangladeshi" %> <%= heroicon "currency-dollar" %> <%= heroicon "currency-euro" %> <%= heroicon "currency-pound" %> <%= heroicon "currency-rupee" %> <%= heroicon "currency-yen" %> <%= heroicon "cursor-arrow-rays" %> <%= heroicon "cursor-arrow-ripple" %> <%= heroicon "device-phone-mobile" %> <%= heroicon "device-tablet" %> <%= heroicon "document-arrow-down" %> <%= heroicon "document-arrow-up" %> <%= heroicon "document-chart-bar" %> <%= heroicon "document-check" %> <%= heroicon "document-duplicate" %> <%= heroicon "document-magnifying-glass" %> <%= heroicon "document-minus" %> <%= heroicon "document-plus" %> <%= heroicon "document-text" %> <%= heroicon "document" %> <%= heroicon "ellipsis-horizontal-circle" %> <%= heroicon "ellipsis-horizontal" %> <%= heroicon "ellipsis-vertical" %> <%= heroicon "envelope-open" %> <%= heroicon "envelope" %> <%= heroicon "exclamation-circle" %> <%= heroicon "exclamation-triangle" %> <%= heroicon "eye-slash" %> <%= heroicon "eye" %> <%= heroicon "face-frown" %> <%= heroicon "face-smile" %> <%= heroicon "film" %> <%= heroicon "finger-print" %> <%= heroicon "fire" %> <%= heroicon "flag" %> <%= heroicon "folder-arrow-down" %> <%= heroicon "folder-minus" %> <%= heroicon "folder-open" %> <%= heroicon "folder-plus" %> <%= heroicon "folder" %> <%= heroicon "forward" %> <%= heroicon "funnel" %> <%= heroicon "gif" %> <%= heroicon "gift-top" %> <%= heroicon "gift" %> <%= heroicon "globe-alt" %> <%= heroicon "globe-americas" %> <%= heroicon "globe-asia-australia" %> <%= heroicon "globe-europe-africa" %> <%= heroicon "hand-raised" %> <%= heroicon "hand-thumb-down" %> <%= heroicon "hand-thumb-up" %> <%= heroicon "hashtag" %> <%= heroicon "heart" %> <%= heroicon "home-modern" %> <%= heroicon "home" %> <%= heroicon "identification" %> <%= heroicon "inbox-arrow-down" %> <%= heroicon "inbox-stack" %> <%= heroicon "inbox" %> <%= heroicon "information-circle" %> <%= heroicon "key" %> <%= heroicon "language" %> <%= heroicon "lifebuoy" %> <%= heroicon "light-bulb" %> <%= heroicon "link" %> <%= heroicon "list-bullet" %> <%= heroicon "lock-closed" %> <%= heroicon "lock-open" %> <%= heroicon "magnifying-glass-circle" %> <%= heroicon "magnifying-glass-minus" %> <%= heroicon "magnifying-glass-plus" %> <%= heroicon "magnifying-glass" %> <%= heroicon "map-pin" %> <%= heroicon "map" %> <%= heroicon "megaphone" %> <%= heroicon "microphone" %> <%= heroicon "minus-circle" %> <%= heroicon "minus-small" %> <%= heroicon "minus" %> <%= heroicon "moon" %> <%= heroicon "musical-note" %> <%= heroicon "newspaper" %> <%= heroicon "no-symbol" %> <%= heroicon "paint-brush" %> <%= heroicon "paper-airplane" %> <%= heroicon "paper-clip" %> <%= heroicon "pause" %> <%= heroicon "pencil-square" %> <%= heroicon "pencil" %> <%= heroicon "phone-arrow-down-left" %> <%= heroicon "phone-arrow-up-right" %> <%= heroicon "phone-x-mark" %> <%= heroicon "phone" %> <%= heroicon "photo" %> <%= heroicon "play-pause" %> <%= heroicon "play" %> <%= heroicon "plus-circle" %> <%= heroicon "plus-small" %> <%= heroicon "plus" %> <%= heroicon "presentation-chart-bar" %> <%= heroicon "presentation-chart-line" %> <%= heroicon "printer" %> <%= heroicon "puzzle-piece" %> <%= heroicon "qr-code" %> <%= heroicon "question-mark-circle" %> <%= heroicon "queue-list" %> <%= heroicon "radio" %> <%= heroicon "receipt-percent" %> <%= heroicon "receipt-refund" %> <%= heroicon "rectangle-group" %> <%= heroicon "rectangle-stack" %> <%= heroicon "rss" %> <%= heroicon "scale" %> <%= heroicon "scissors" %> <%= heroicon "server-stack" %> <%= heroicon "server" %> <%= heroicon "share" %> <%= heroicon "shield-check" %> <%= heroicon "shield-exclamation" %> <%= heroicon "shopping-bag" %> <%= heroicon "shopping-cart" %> <%= heroicon "signal-slash" %> <%= heroicon "signal" %> <%= heroicon "sparkles" %> <%= heroicon "speaker-wave" %> <%= heroicon "speaker-x-mark" %> <%= heroicon "square-2-stack" %> <%= heroicon "squares-2x2" %> <%= heroicon "squares-plus" %> <%= heroicon "star" %> <%= heroicon "stop" %> <%= heroicon "sun" %> <%= heroicon "swatch" %> <%= heroicon "table-cells" %> <%= heroicon "tag" %> <%= heroicon "ticket" %> <%= heroicon "trash" %> <%= heroicon "truck" %> <%= heroicon "user-circle" %> <%= heroicon "user-group" %> <%= heroicon "user-minus" %> <%= heroicon "user-plus" %> <%= heroicon "user" %> <%= heroicon "users" %> <%= heroicon "variable" %> <%= heroicon "video-camera-slash" %> <%= heroicon "video-camera" %> <%= heroicon "view-columns" %> <%= heroicon "wallet" %> <%= heroicon "wifi" %> <%= heroicon "wrench-screwdriver" %> <%= heroicon "wrench" %> <%= heroicon "x-circle" %> <%= heroicon "x-mark" %>
================================================ FILE: test/dummy/app/views/pages/home.html.erb ================================================ <%= render "pages/solid" %>
<%= render "pages/outline" %>
<%= render "pages/mini" %>
<%= render "pages/edge_cases" %> ================================================ FILE: test/dummy/bin/rails ================================================ #!/usr/bin/env ruby # frozen_string_literal: true APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" ================================================ FILE: test/dummy/bin/rake ================================================ #!/usr/bin/env ruby # frozen_string_literal: true require_relative "../config/boot" require "rake" Rake.application.run ================================================ FILE: test/dummy/bin/setup ================================================ #!/usr/bin/env ruby # frozen_string_literal: true require "fileutils" # path to your application root. APP_ROOT = File.expand_path("..", __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end FileUtils.chdir APP_ROOT do # This script is a way to setup or update your development environment automatically. # This script is idempotent, so that you can run it at anytime and get an expectable outcome. # Add necessary setup steps to this file. puts "== Installing dependencies ==" system! "gem install bundler --conservative" system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' # end puts "\n== Preparing database ==" system! "bin/rails db:prepare" puts "\n== Removing old logs and tempfiles ==" system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" system! "bin/rails restart" end ================================================ FILE: test/dummy/config/application.rb ================================================ # frozen_string_literal: true require_relative "boot" require "rails/all" Bundler.require(*Rails.groups) require "heroicon" module Dummy class Application < Rails::Application config.load_defaults "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}".to_f if Rails::VERSION::MAJOR == 5 config.active_record.sqlite3.represent_boolean_as_integer = true end end end ================================================ FILE: test/dummy/config/boot.rb ================================================ # frozen_string_literal: true # Set up gems listed in the Gemfile. ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__) require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) $LOAD_PATH.unshift File.expand_path("../../../lib", __dir__) ================================================ FILE: test/dummy/config/cable.yml ================================================ development: adapter: async test: adapter: test production: adapter: redis url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> channel_prefix: dummy_production ================================================ FILE: test/dummy/config/database.yml ================================================ # SQLite. Versions 3.8.0 and up are supported. # gem install sqlite3 # # Ensure the SQLite 3 gem is defined in your Gemfile # gem 'sqlite3' # default: &default adapter: sqlite3 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> timeout: 5000 development: <<: *default database: db/development.sqlite3 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: <<: *default database: db/test.sqlite3 production: <<: *default database: db/production.sqlite3 ================================================ FILE: test/dummy/config/environment.rb ================================================ # frozen_string_literal: true # Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize! ================================================ FILE: test/dummy/config/environments/development.rb ================================================ # frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports. config.consider_all_requests_local = true # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. if Rails.root.join("tmp", "caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false config.cache_store = :null_store end # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = :local # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true config.assets.check_precompiled_asset = false # Suppress logger output for asset requests. config.assets.quiet = true # Raises error for missing translations. # config.action_view.raise_on_missing_translations = true # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. # config.file_watcher = ActiveSupport::EventedFileUpdateChecker end ================================================ FILE: test/dummy/config/environments/production.rb ================================================ # frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. config.eager_load = true # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). # config.require_master_key = true # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress CSS using a preprocessor. # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = 'http://assets.example.com' # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = :local # Mount Action Cable outside main process or domain. # config.action_cable.mount_path = nil # config.action_cable.url = 'wss://example.com/cable' # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. config.log_level = :debug # Prepend all log lines with the following tags. config.log_tags = [:request_id] # Use a different cache store in production. # config.cache_store = :mem_cache_store # Use a real queuing backend for Active Job (and separate queues per environment). # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "dummy_production" config.action_mailer.perform_caching = false # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Use a different logger for distributed setups. # require 'syslog/logger' # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new($stdout) logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false # Inserts middleware to perform automatic connection switching. # The `database_selector` hash is used to pass options to the DatabaseSelector # middleware. The `delay` is used to determine how long to wait after a write # to send a subsequent read to the primary. # # The `database_resolver` class is used by the middleware to determine which # database is appropriate to use based on the time delay. # # The `database_resolver_context` class is used by the middleware to set # timestamps for the last write to the primary. The resolver uses the context # class timestamps to determine how long to wait before reading from the # replica. # # By default Rails will store a last write timestamp in the session. The # DatabaseSelector middleware is designed as such you can define your own # strategy for connection switching and pass that into the middleware through # these configuration options. # config.active_record.database_selector = { delay: 2.seconds } # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session end ================================================ FILE: test/dummy/config/environments/test.rb ================================================ # frozen_string_literal: true # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. config.cache_classes = false config.action_view.cache_template_loading = true # Do not eager load code on boot. This avoids loading your whole application # just for the purpose of running a single test. If you are using a tool that # preloads Rails for running tests, you may have to set it to true. config.eager_load = false # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false config.cache_store = :null_store # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false # Store uploaded files on the local file system in a temporary directory. config.active_storage.service = :test config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr # Raises error for missing translations. # config.action_view.raise_on_missing_translations = true end ================================================ FILE: test/dummy/config/initializers/application_controller_renderer.rb ================================================ # frozen_string_literal: true # Be sure to restart your server when you modify this file. # ActiveSupport::Reloader.to_prepare do # ApplicationController.renderer.defaults.merge!( # http_host: 'example.org', # https: false # ) # end ================================================ FILE: test/dummy/config/initializers/assets.rb ================================================ # frozen_string_literal: true # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. # Rails.application.config.assets.version = "1.0" # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. # Rails.application.config.assets.precompile += %w( admin.js admin.css ) ================================================ FILE: test/dummy/config/initializers/backtrace_silencers.rb ================================================ # frozen_string_literal: true # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers! ================================================ FILE: test/dummy/config/initializers/content_security_policy.rb ================================================ # frozen_string_literal: true # Be sure to restart your server when you modify this file. # Define an application-wide content security policy # For further information see the following documentation # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy # Rails.application.config.content_security_policy do |policy| # policy.default_src :self, :https # policy.font_src :self, :https, :data # policy.img_src :self, :https, :data # policy.object_src :none # policy.script_src :self, :https # policy.style_src :self, :https # # Specify URI for violation reports # # policy.report_uri "/csp-violation-report-endpoint" # end # If you are using UJS then enable automatic nonce generation # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } # Set the nonce only to specific directives # Rails.application.config.content_security_policy_nonce_directives = %w(script-src) # Report CSP violations to a specified URI # For further information see the following documentation: # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only # Rails.application.config.content_security_policy_report_only = true ================================================ FILE: test/dummy/config/initializers/cookies_serializer.rb ================================================ # frozen_string_literal: true # Be sure to restart your server when you modify this file. # Specify a serializer for the signed and encrypted cookie jars. # Valid options are :json, :marshal, and :hybrid. Rails.application.config.action_dispatch.cookies_serializer = :json ================================================ FILE: test/dummy/config/initializers/filter_parameter_logging.rb ================================================ # frozen_string_literal: true # Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password] ================================================ FILE: test/dummy/config/initializers/heroicon.rb ================================================ # frozen_string_literal: true Heroicon.configure do |config| config.variant = :solid # Options are :solid, :outline and :mini ## # You can set a default class, which will get applied to every icon with # the given variant. To do so, un-comment the line below. config.default_class = {solid: "h-5 w-5", outline: "h-6 w-6", mini: "h-4 w-4"} end ================================================ FILE: test/dummy/config/initializers/inflections.rb ================================================ # frozen_string_literal: true # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym 'RESTful' # end ================================================ FILE: test/dummy/config/initializers/mime_types.rb ================================================ # frozen_string_literal: true # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf ================================================ FILE: test/dummy/config/initializers/wrap_parameters.rb ================================================ # frozen_string_literal: true # Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end # To enable root element in JSON for ActiveRecord objects. # ActiveSupport.on_load(:active_record) do # self.include_root_in_json = true # end ================================================ FILE: test/dummy/config/locales/en.yml ================================================ # Files in the config/locales directory are used for internationalization # and are automatically loaded by Rails. If you want to use locales other # than English, add the necessary files in this directory. # # To use the locales, use `I18n.t`: # # I18n.t 'hello' # # In views, this is aliased to just `t`: # # <%= t('hello') %> # # To use a different locale, set it with `I18n.locale`: # # I18n.locale = :es # # This would use the information in config/locales/es.yml. # # The following keys must be escaped otherwise they will not be retrieved by # the default I18n backend: # # true, false, on, off, yes, no # # Instead, surround them with single quotes. # # en: # 'true': 'foo' # # To learn more, please read the Rails Internationalization guide # available at https://guides.rubyonrails.org/i18n.html. en: hello: "Hello world" ================================================ FILE: test/dummy/config/puma.rb ================================================ # frozen_string_literal: true # Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches the default thread size of Active Record. # max_threads_count = ENV.fetch("RAILS_MAX_THREADS", 5) min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } threads min_threads_count, max_threads_count # Specifies the `port` that Puma will listen on to receive requests; default is 3000. # port ENV.fetch("PORT", 3000) # Specifies the `environment` that Puma will run in. # environment ENV.fetch("RAILS_ENV", "development") # Specifies the `pidfile` that Puma will use. pidfile ENV.fetch("PIDFILE", "tmp/pids/server.pid") # Specifies the number of `workers` to boot in clustered mode. # Workers are forked web server processes. If using threads and workers together # the concurrency of the application would be max `threads` * `workers`. # Workers do not work on JRuby or Windows (both of which do not support # processes). # # workers ENV.fetch("WEB_CONCURRENCY") { 2 } # Use the `preload_app!` method when specifying a `workers` number. # This directive tells Puma to first boot the application and load code # before forking the application. This takes advantage of Copy On Write # process behavior so workers use less memory. # # preload_app! # Allow puma to be restarted by `rails restart` command. plugin :tmp_restart ================================================ FILE: test/dummy/config/routes.rb ================================================ # frozen_string_literal: true Rails.application.routes.draw do root to: "pages#home" end ================================================ FILE: test/dummy/config/spring.rb ================================================ # frozen_string_literal: true Spring.watch( ".ruby-version", ".rbenv-vars", "tmp/restart.txt", "tmp/caching-dev.txt" ) ================================================ FILE: test/dummy/config/storage.yml ================================================ test: service: Disk root: <%= Rails.root.join("tmp/storage") %> local: service: Disk root: <%= Rails.root.join("storage") %> # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) # amazon: # service: S3 # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> # region: us-east-1 # bucket: your_own_bucket # Remember not to checkin your GCS keyfile to a repository # google: # service: GCS # project: your_project # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> # bucket: your_own_bucket # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) # microsoft: # service: AzureStorage # storage_account_name: your_account_name # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> # container: your_container_name # mirror: # service: Mirror # primary: local # mirrors: [ amazon, google, microsoft ] ================================================ FILE: test/dummy/config.ru ================================================ # frozen_string_literal: true # This file is used by Rack-based servers to start the application. require_relative "config/environment" run Rails.application ================================================ FILE: test/dummy/lib/assets/.keep ================================================ ================================================ FILE: test/dummy/log/.keep ================================================ ================================================ FILE: test/dummy/public/404.html ================================================ The page you were looking for doesn't exist (404)

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

If you are the application owner check the logs for more information.

================================================ FILE: test/dummy/public/422.html ================================================ The change you wanted was rejected (422)

The change you wanted was rejected.

Maybe you tried to change something you didn't have access to.

If you are the application owner check the logs for more information.

================================================ FILE: test/dummy/public/500.html ================================================ We're sorry, but something went wrong (500)

We're sorry, but something went wrong.

If you are the application owner check the logs for more information.

================================================ FILE: test/heroicon/configuration_test.rb ================================================ # frozen_string_literal: true require "test_helper" class Heroicon::ConfigurationTest < ActiveSupport::TestCase it "sets DEFAULT_VARIANT to :solid" do assert_equal :solid, Heroicon::Configuration::DEFAULT_VARIANT end it "sets variant to the DEFAULT_VARIANT" do assert_equal :solid, Heroicon::Configuration.new.variant end end ================================================ FILE: test/heroicon/icon_test.rb ================================================ # frozen_string_literal: true require "test_helper" require "pry" class Heroicon::IconTest < ActiveSupport::TestCase let(:default_args) { {name: "user", variant: :outline, options: {}, path_options: {}} } subject { Heroicon::Icon.new(**default_args) } describe "#initialize" do it "requires name" do default_args.delete(:name) assert_raises(ArgumentError) { Heroicon::Icon.new(**default_args) } end it "sets name" do assert_equal "user", subject.name end it "requires variant" do default_args.delete(:variant) assert_raises(ArgumentError) { Heroicon::Icon.new(**default_args) } end it "sets variant" do assert_equal :outline, subject.variant end it "sets variant to solid when invalid" do default_args[:variant] = :invalid assert_equal :solid, subject.variant end it "requires options" do default_args.delete(:options) assert_raises(ArgumentError) { Heroicon::Icon.new(**default_args) } end it "requires path_options" do default_args.delete(:path_options) assert_raises(ArgumentError) { Heroicon::Icon.new(**default_args) } end end describe "#render" do it "returns a Nokogiri::HTML::DocumentFragment" do assert_kind_of Nokogiri::HTML::DocumentFragment, subject.render end context "default class present" do context "disable_default_class is true" do it "disables prepending the class" do Heroicon.configuration.stubs(:default_class).returns({solid: "foobar"}) subject.options[:disable_default_class] = true subject.options[:class] = "custom_class" assert_equal "custom_class", subject.render.at_css("svg").attributes["class"].value end end context "default class is a hash" do it "prepends the default variant class" do Heroicon.configuration.stubs(:default_class).returns({solid: "foobar"}) subject.stubs(:variant).returns(:solid) assert_equal "foobar", subject.render.at_css("svg").attributes["class"].value end end context "default class is a string" do it "prepends the default variant class" do Heroicon.configuration.stubs(:default_class).returns("foobar") subject.stubs(:variant).returns(:solid) assert_equal "foobar", subject.render.at_css("svg").attributes["class"].value end end it "prepends a default class to the svg" do subject.options[:class] = "foo" assert_equal "h-6 w-6 foo", subject.render.at_css("svg").attributes["class"].value end end it "puts all options on the generated svg" do subject.options[:foo] = "bar" assert_equal "bar", subject.render.at_css("svg").attributes["foo"].value end it "allows setting path stroke width" do subject.path_options[:stroke_linecap] = "foo" assert_equal "foo", subject.render.at_css("path").attributes["stroke-linecap"].value end context "name not found" do context "development" do it "renders a warning" do subject.stubs(name: rand.to_s) Rails.stubs(:env).returns(OpenStruct.new(development?: true)) assert_match(/^