polaris_view_components 0.2.0 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +21 -3
- data/app/{javascript/polaris → assets/javascripts/polaris_view_components}/index.js +0 -0
- data/app/{javascript/polaris → assets/javascripts/polaris_view_components}/resource_item_controller.js +1 -1
- data/app/{javascript/polaris → assets/javascripts/polaris_view_components}/select_controller.js +1 -1
- data/app/{javascript/polaris → assets/javascripts/polaris_view_components}/text_field_controller.js +1 -1
- data/app/assets/javascripts/{polaris.js → polaris_view_components.js} +20 -39
- data/app/assets/stylesheets/polaris_view_components/shopify_navigation.css +136 -0
- data/app/assets/stylesheets/polaris_view_components.css +2029 -21
- data/app/assets/stylesheets/polaris_view_components.postcss.css +2 -0
- data/app/components/polaris/dropzone/controller.js +1 -1
- data/app/components/polaris/stack_component.rb +1 -1
- data/lib/generators/polaris_view_components/install_generator.rb +1 -1
- data/lib/generators/polaris_view_components/templates/stimulus_index.js +5 -6
- data/lib/polaris/view_components/engine.rb +3 -1
- data/lib/polaris/view_components/version.rb +1 -1
- metadata +11 -9
| @@ -21,7 +21,7 @@ module Polaris | |
| 21 21 | 
             
                  :trailing => "Polaris-Stack--distributionTrailing",
         | 
| 22 22 | 
             
                  :center => "Polaris-Stack--distributionCenter",
         | 
| 23 23 | 
             
                  :fill => "Polaris-Stack--distributionFill",
         | 
| 24 | 
            -
                  : | 
| 24 | 
            +
                  :fill_evenly => "Polaris-Stack--distributionFillEvenly",
         | 
| 25 25 | 
             
                }
         | 
| 26 26 | 
             
                DISTRIBUTION_OPTIONS = DISTRIBUTION_MAPPINGS.keys
         | 
| 27 27 |  | 
| @@ -24,7 +24,7 @@ module PolarisViewComponents | |
| 24 24 | 
             
                  end
         | 
| 25 25 |  | 
| 26 26 | 
             
                  append_to_file file_path do
         | 
| 27 | 
            -
                    "import { registerPolarisControllers } from  | 
| 27 | 
            +
                    "import { registerPolarisControllers } from \"polaris-view-components\"\nregisterPolarisControllers(Stimulus)"
         | 
| 28 28 | 
             
                  end
         | 
| 29 29 | 
             
                end
         | 
| 30 30 |  | 
| @@ -1,7 +1,6 @@ | |
| 1 | 
            -
            import { Application } from  | 
| 2 | 
            -
            import { definitionsFromContext } from  | 
| 3 | 
            -
             | 
| 4 | 
            -
            const application = Application.start(document.documentElement)
         | 
| 5 | 
            -
            const context = require.context('.', true, /_controller\.js$/)
         | 
| 6 | 
            -
            application.load(definitionsFromContext(context))
         | 
| 1 | 
            +
            import { Application } from "@hotwired/stimulus"
         | 
| 2 | 
            +
            import { definitionsFromContext } from "@hotwired/stimulus-webpack-helpers"
         | 
| 7 3 |  | 
| 4 | 
            +
            window.Stimulus = Application.start()
         | 
| 5 | 
            +
            const context = require.context("./", true, /\.js$/)
         | 
| 6 | 
            +
            Stimulus.load(definitionsFromContext(context))
         | 
| @@ -13,7 +13,9 @@ module Polaris | |
| 13 13 |  | 
| 14 14 | 
             
                  initializer "polaris_view_components.assets" do |app|
         | 
| 15 15 | 
             
                    if app.config.respond_to?(:assets)
         | 
| 16 | 
            -
                      app.config.assets.precompile += %w[ | 
| 16 | 
            +
                      app.config.assets.precompile += %w[
         | 
| 17 | 
            +
                        polaris_view_components.js polaris_view_components.css
         | 
| 18 | 
            +
                      ]
         | 
| 17 19 | 
             
                    end
         | 
| 18 20 | 
             
                  end
         | 
| 19 21 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: polaris_view_components
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.3.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Dan Gamble
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire:
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2021- | 
| 12 | 
            +
            date: 2021-10-07 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: rails
         | 
| @@ -20,7 +20,7 @@ dependencies: | |
| 20 20 | 
             
                    version: 5.0.0
         | 
| 21 21 | 
             
                - - "<"
         | 
| 22 22 | 
             
                  - !ruby/object:Gem::Version
         | 
| 23 | 
            -
                    version:  | 
| 23 | 
            +
                    version: 8.0.0
         | 
| 24 24 | 
             
              type: :runtime
         | 
| 25 25 | 
             
              prerelease: false
         | 
| 26 26 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| @@ -30,7 +30,7 @@ dependencies: | |
| 30 30 | 
             
                    version: 5.0.0
         | 
| 31 31 | 
             
                - - "<"
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version:  | 
| 33 | 
            +
                    version: 8.0.0
         | 
| 34 34 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 35 35 | 
             
              name: view_component
         | 
| 36 36 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -447,8 +447,14 @@ files: | |
| 447 447 | 
             
            - app/assets/icons/polaris/WearableMajor.svg
         | 
| 448 448 | 
             
            - app/assets/icons/polaris/WholesaleMajor.svg
         | 
| 449 449 | 
             
            - app/assets/icons/polaris/WifiMajor.svg
         | 
| 450 | 
            -
            - app/assets/javascripts/ | 
| 450 | 
            +
            - app/assets/javascripts/polaris_view_components.js
         | 
| 451 | 
            +
            - app/assets/javascripts/polaris_view_components/index.js
         | 
| 452 | 
            +
            - app/assets/javascripts/polaris_view_components/resource_item_controller.js
         | 
| 453 | 
            +
            - app/assets/javascripts/polaris_view_components/select_controller.js
         | 
| 454 | 
            +
            - app/assets/javascripts/polaris_view_components/text_field_controller.js
         | 
| 451 455 | 
             
            - app/assets/stylesheets/polaris_view_components.css
         | 
| 456 | 
            +
            - app/assets/stylesheets/polaris_view_components.postcss.css
         | 
| 457 | 
            +
            - app/assets/stylesheets/polaris_view_components/shopify_navigation.css
         | 
| 452 458 | 
             
            - app/components/polaris/action.rb
         | 
| 453 459 | 
             
            - app/components/polaris/application_component.rb
         | 
| 454 460 | 
             
            - app/components/polaris/avatar_component.html.erb
         | 
| @@ -563,10 +569,6 @@ files: | |
| 563 569 | 
             
            - app/helpers/polaris/option_helper.rb
         | 
| 564 570 | 
             
            - app/helpers/polaris/url_helper.rb
         | 
| 565 571 | 
             
            - app/helpers/polaris/view_helper.rb
         | 
| 566 | 
            -
            - app/javascript/polaris/index.js
         | 
| 567 | 
            -
            - app/javascript/polaris/resource_item_controller.js
         | 
| 568 | 
            -
            - app/javascript/polaris/select_controller.js
         | 
| 569 | 
            -
            - app/javascript/polaris/text_field_controller.js
         | 
| 570 572 | 
             
            - app/validators/type_validator.rb
         | 
| 571 573 | 
             
            - lib/generators/polaris_view_components/USAGE
         | 
| 572 574 | 
             
            - lib/generators/polaris_view_components/install_generator.rb
         |