polaris_view_components 0.2.0 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ @import "@shopify/polaris/dist/styles.css";
2
+ @import "./polaris_view_components/shopify_navigation.css";
@@ -1,4 +1,4 @@
1
- import { Controller } from 'stimulus'
1
+ import { Controller } from "@hotwired/stimulus"
2
2
 
3
3
  import { fileAccepted, getDataTransferFiles } from './utils'
4
4
 
@@ -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
- :fill_evently => "Polaris-Stack--distributionFillEvenly",
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 'polaris-view-components'\nregisterPolarisControllers(application)"
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 'stimulus'
2
- import { definitionsFromContext } from 'stimulus/webpack-helpers'
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[polaris_view_components.css]
16
+ app.config.assets.precompile += %w[
17
+ polaris_view_components.js polaris_view_components.css
18
+ ]
17
19
  end
18
20
  end
19
21
 
@@ -1,5 +1,5 @@
1
1
  module Polaris
2
2
  module ViewComponents
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
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.2.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-09-08 00:00:00.000000000 Z
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: 7.0.0
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: 7.0.0
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/polaris.js
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