shopify_app 7.2.0 → 8.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +5 -5
  2. data/.babelrc +5 -0
  3. data/.github/CODEOWNERS +1 -0
  4. data/{ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE.md} +0 -0
  5. data/.github/probots.yml +2 -0
  6. data/.gitignore +5 -0
  7. data/.nvmrc +1 -0
  8. data/.rubocop.yml +10 -0
  9. data/.ruby-version +1 -0
  10. data/.travis.yml +24 -12
  11. data/CHANGELOG.md +151 -0
  12. data/Gemfile +2 -0
  13. data/README.md +167 -68
  14. data/app/assets/images/storage_access.svg +2 -0
  15. data/app/assets/javascripts/shopify_app/enable_cookies.js +3 -0
  16. data/app/assets/javascripts/shopify_app/itp_helper.js +40 -0
  17. data/app/assets/javascripts/shopify_app/partition_cookies.js +7 -0
  18. data/app/assets/javascripts/shopify_app/redirect.js +33 -0
  19. data/app/assets/javascripts/shopify_app/request_storage_access.js +3 -0
  20. data/app/assets/javascripts/shopify_app/storage_access.js +121 -0
  21. data/app/assets/javascripts/shopify_app/storage_access_redirect.js +17 -0
  22. data/app/assets/javascripts/shopify_app/top_level.js +2 -0
  23. data/app/assets/javascripts/shopify_app/top_level_interaction.js +11 -0
  24. data/app/controllers/shopify_app/authenticated_controller.rb +5 -2
  25. data/app/controllers/shopify_app/callback_controller.rb +92 -0
  26. data/app/controllers/shopify_app/sessions_controller.rb +120 -2
  27. data/app/controllers/shopify_app/webhooks_controller.rb +11 -3
  28. data/app/views/shopify_app/partials/_button_styles.html.erb +104 -0
  29. data/app/views/shopify_app/partials/_card_styles.html.erb +33 -0
  30. data/app/views/shopify_app/partials/_empty_state_styles.html.erb +129 -0
  31. data/app/views/shopify_app/partials/_layout_styles.html.erb +167 -0
  32. data/app/views/shopify_app/partials/_typography_styles.html.erb +35 -0
  33. data/app/views/shopify_app/sessions/enable_cookies.html.erb +59 -0
  34. data/app/views/shopify_app/sessions/new.html.erb +88 -60
  35. data/app/views/shopify_app/sessions/request_storage_access.html.erb +67 -0
  36. data/app/views/shopify_app/sessions/top_level_interaction.html.erb +63 -0
  37. data/app/views/shopify_app/shared/redirect.html.erb +22 -0
  38. data/config/locales/de.yml +22 -0
  39. data/config/locales/en.yml +12 -1
  40. data/config/locales/es.yml +21 -3
  41. data/config/locales/fr.yml +23 -0
  42. data/config/locales/it.yml +22 -0
  43. data/config/locales/ja.yml +17 -0
  44. data/config/locales/nl.yml +21 -0
  45. data/config/locales/pt-BR.yml +22 -0
  46. data/config/locales/zh-CN.yml +16 -0
  47. data/config/locales/zh-TW.yml +17 -0
  48. data/config/routes.rb +11 -1
  49. data/{QUICKSTART.md → docs/Quickstart.md} +26 -23
  50. data/docs/Releasing.md +18 -0
  51. data/docs/Troubleshooting.md +16 -0
  52. data/karma.conf.js +43 -0
  53. data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +45 -0
  54. data/lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb +10 -0
  55. data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +1 -0
  56. data/lib/generators/shopify_app/home_controller/templates/index.html.erb +14 -0
  57. data/lib/generators/shopify_app/home_controller/templates/shopify_app_ready_script.html.erb +1 -5
  58. data/lib/generators/shopify_app/install/install_generator.rb +10 -16
  59. data/lib/generators/shopify_app/install/templates/_flash_messages.html.erb +13 -9
  60. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +1 -1
  61. data/lib/generators/shopify_app/install/templates/shopify_app.rb +5 -3
  62. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +19 -4
  63. data/lib/generators/shopify_app/rotate_shopify_token_job/rotate_shopify_token_job_generator.rb +16 -0
  64. data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token.rake +17 -0
  65. data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token_job.rb +42 -0
  66. data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +5 -9
  67. data/lib/generators/shopify_app/shop_model/templates/db/migrate/{create_shops.rb → create_shops.erb} +1 -1
  68. data/lib/generators/shopify_app/shop_model/templates/shop.rb +0 -1
  69. data/lib/shopify_app/configuration.rb +27 -8
  70. data/lib/shopify_app/{app_proxy_verification.rb → controller_concerns/app_proxy_verification.rb} +2 -7
  71. data/lib/shopify_app/controller_concerns/embedded_app.rb +19 -0
  72. data/lib/shopify_app/controller_concerns/itp.rb +45 -0
  73. data/lib/shopify_app/controller_concerns/localization.rb +22 -0
  74. data/lib/shopify_app/controller_concerns/login_protection.rb +135 -0
  75. data/lib/shopify_app/{webhook_verification.rb → controller_concerns/webhook_verification.rb} +11 -12
  76. data/lib/shopify_app/engine.rb +10 -0
  77. data/lib/shopify_app/{scripttags_manager_job.rb → jobs/scripttags_manager_job.rb} +2 -2
  78. data/lib/shopify_app/{webhooks_manager_job.rb → jobs/webhooks_manager_job.rb} +0 -0
  79. data/lib/shopify_app/{scripttags_manager.rb → managers/scripttags_manager.rb} +24 -8
  80. data/lib/shopify_app/{webhooks_manager.rb → managers/webhooks_manager.rb} +1 -1
  81. data/lib/shopify_app/session/in_memory_session_store.rb +27 -0
  82. data/lib/shopify_app/{shopify_session_repository.rb → session/session_repository.rb} +0 -0
  83. data/lib/shopify_app/{session_storage.rb → session/session_storage.rb} +9 -0
  84. data/lib/shopify_app/utils.rb +2 -2
  85. data/lib/shopify_app/version.rb +1 -1
  86. data/lib/shopify_app.rb +21 -16
  87. data/package-lock.json +23 -0
  88. data/package.json +28 -0
  89. data/service.yml +7 -0
  90. data/shipit.rubygems.yml +2 -0
  91. data/shopify_app.gemspec +6 -5
  92. data/translation.yml +7 -0
  93. data/webpack.config.js +24 -0
  94. data/yarn.lock +4594 -0
  95. metadata +92 -35
  96. data/Gemfile.rails50 +0 -5
  97. data/Gemfile.ruby22 +0 -6
  98. data/Gemfile.ruby22.rails50 +0 -9
  99. data/RELEASING +0 -13
  100. data/lib/generators/shopify_app/install/templates/shopify_session_repository.rb +0 -23
  101. data/lib/generators/shopify_app/shop_model/templates/shopify_session_repository.rb +0 -7
  102. data/lib/shopify_app/in_memory_session_store.rb +0 -25
  103. data/lib/shopify_app/login_protection.rb +0 -103
  104. data/lib/shopify_app/sessions_concern.rb +0 -101
  105. data/lib/shopify_app/shop.rb +0 -15
@@ -0,0 +1,17 @@
1
+ (function() {
2
+ function redirect() {
3
+ var redirectTargetElement = document.getElementById("redirection-target");
4
+
5
+ var targetInfo = JSON.parse(redirectTargetElement.dataset.target)
6
+
7
+ if (window.top == window.self) {
8
+ // If the current window is the 'parent', change the URL by setting location.href
9
+ window.top.location.href = targetInfo.hasStorageAccessUrl;
10
+ } else {
11
+ var storageAccessHelper = new StorageAccessHelper(targetInfo);
12
+ storageAccessHelper.execute();
13
+ }
14
+ }
15
+
16
+ document.addEventListener("DOMContentLoaded", redirect);
17
+ })();
@@ -0,0 +1,2 @@
1
+ //= require ./itp_helper.js
2
+ //= require ./top_level_interaction.js
@@ -0,0 +1,11 @@
1
+ (function() {
2
+ function setUpTopLevelInteraction() {
3
+ var TopLevelInteraction = new ITPHelper({
4
+ redirectUrl: window.redirectUrl,
5
+ });
6
+
7
+ TopLevelInteraction.execute();
8
+ }
9
+
10
+ document.addEventListener("DOMContentLoaded", setUpTopLevelInteraction);
11
+ })();
@@ -1,8 +1,11 @@
1
1
  module ShopifyApp
2
- class AuthenticatedController < ApplicationController
2
+ class AuthenticatedController < ActionController::Base
3
+ include ShopifyApp::Localization
3
4
  include ShopifyApp::LoginProtection
5
+ include ShopifyApp::EmbeddedApp
6
+
7
+ protect_from_forgery with: :exception
4
8
  before_action :login_again_if_different_shop
5
9
  around_action :shopify_session
6
- layout ShopifyApp.configuration.embedded_app? ? 'embedded_app' : 'application'
7
10
  end
8
11
  end
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ShopifyApp
4
+ # Performs login after OAuth completes
5
+ class CallbackController < ActionController::Base
6
+ include ShopifyApp::LoginProtection
7
+
8
+ def callback
9
+ if auth_hash
10
+ login_shop
11
+ install_webhooks
12
+ install_scripttags
13
+ perform_after_authenticate_job
14
+
15
+ redirect_to return_address
16
+ else
17
+ flash[:error] = I18n.t('could_not_log_in')
18
+ redirect_to login_url
19
+ end
20
+ end
21
+
22
+ private
23
+
24
+ def login_shop
25
+ reset_session_options
26
+ set_shopify_session
27
+ end
28
+
29
+ def auth_hash
30
+ request.env['omniauth.auth']
31
+ end
32
+
33
+ def shop_name
34
+ auth_hash.uid
35
+ end
36
+
37
+ def associated_user
38
+ return unless auth_hash['extra'].present?
39
+
40
+ auth_hash['extra']['associated_user']
41
+ end
42
+
43
+ def token
44
+ auth_hash['credentials']['token']
45
+ end
46
+
47
+ def reset_session_options
48
+ request.session_options[:renew] = true
49
+ session.delete(:_csrf_token)
50
+ end
51
+
52
+ def set_shopify_session
53
+ session_store = ShopifyAPI::Session.new(shop_name, token)
54
+
55
+ session[:shopify] = ShopifyApp::SessionRepository.store(session_store)
56
+ session[:shopify_domain] = shop_name
57
+ session[:shopify_user] = associated_user
58
+ end
59
+
60
+ def install_webhooks
61
+ return unless ShopifyApp.configuration.has_webhooks?
62
+
63
+ WebhooksManager.queue(
64
+ shop_name,
65
+ token,
66
+ ShopifyApp.configuration.webhooks
67
+ )
68
+ end
69
+
70
+ def install_scripttags
71
+ return unless ShopifyApp.configuration.has_scripttags?
72
+
73
+ ScripttagsManager.queue(
74
+ shop_name,
75
+ token,
76
+ ShopifyApp.configuration.scripttags
77
+ )
78
+ end
79
+
80
+ def perform_after_authenticate_job
81
+ config = ShopifyApp.configuration.after_authenticate_job
82
+
83
+ return unless config && config[:job].present?
84
+
85
+ if config[:inline] == true
86
+ config[:job].perform_now(shop_domain: session[:shopify_domain])
87
+ else
88
+ config[:job].perform_later(shop_domain: session[:shopify_domain])
89
+ end
90
+ end
91
+ end
92
+ end
@@ -1,5 +1,123 @@
1
1
  module ShopifyApp
2
- class SessionsController < ApplicationController
3
- include ShopifyApp::SessionsConcern
2
+ class SessionsController < ActionController::Base
3
+ include ShopifyApp::LoginProtection
4
+
5
+ layout false, only: :new
6
+ after_action only: [:new, :create] do |controller|
7
+ controller.response.headers.except!('X-Frame-Options')
8
+ end
9
+
10
+ def new
11
+ authenticate if sanitized_shop_name.present?
12
+ end
13
+
14
+ def create
15
+ authenticate
16
+ end
17
+
18
+ def enable_cookies
19
+ validate_shop
20
+ end
21
+
22
+ def top_level_interaction
23
+ @url = login_url(top_level: true)
24
+ validate_shop
25
+ end
26
+
27
+ def granted_storage_access
28
+ return unless validate_shop
29
+
30
+ session['shopify.granted_storage_access'] = true
31
+
32
+ params = { shop: @shop }
33
+ redirect_to "#{ShopifyApp.configuration.root_url}?#{params.to_query}"
34
+ end
35
+
36
+ def destroy
37
+ reset_session
38
+ flash[:notice] = I18n.t('.logged_out')
39
+ redirect_to login_url
40
+ end
41
+
42
+ private
43
+
44
+ def authenticate
45
+ return render_invalid_shop_error unless sanitized_shop_name.present?
46
+ session['shopify.omniauth_params'] = { shop: sanitized_shop_name }
47
+
48
+ if user_agent_can_partition_cookies
49
+ authenticate_with_partitioning
50
+ else
51
+ authenticate_normally
52
+ end
53
+ end
54
+
55
+ def authenticate_normally
56
+ if request_storage_access?
57
+ redirect_to_request_storage_access
58
+ elsif authenticate_in_context?
59
+ authenticate_in_context
60
+ else
61
+ authenticate_at_top_level
62
+ end
63
+ end
64
+
65
+ def authenticate_with_partitioning
66
+ if session['shopify.cookies_persist']
67
+ clear_top_level_oauth_cookie
68
+ authenticate_in_context
69
+ else
70
+ set_top_level_oauth_cookie
71
+ fullpage_redirect_to enable_cookies_path(shop: sanitized_shop_name)
72
+ end
73
+ end
74
+
75
+ def validate_shop
76
+ @shop = sanitized_shop_name
77
+ unless @shop
78
+ render_invalid_shop_error
79
+ return false
80
+ end
81
+
82
+ true
83
+ end
84
+
85
+ def render_invalid_shop_error
86
+ flash[:error] = I18n.t('invalid_shop_url')
87
+ redirect_to return_address
88
+ end
89
+
90
+ def authenticate_in_context
91
+ redirect_to "#{main_app.root_path}auth/shopify"
92
+ end
93
+
94
+ def authenticate_at_top_level
95
+ fullpage_redirect_to login_url(top_level: true)
96
+ end
97
+
98
+ def authenticate_in_context?
99
+ return true unless ShopifyApp.configuration.embedded_app?
100
+ params[:top_level]
101
+ end
102
+
103
+ def request_storage_access?
104
+ return false unless ShopifyApp.configuration.embedded_app?
105
+ return false if params[:top_level]
106
+ return false if user_agent_is_mobile
107
+ return false if user_agent_is_pos
108
+
109
+ !session['shopify.granted_storage_access']
110
+ end
111
+
112
+ def redirect_to_request_storage_access
113
+ render :request_storage_access, layout: false, locals: {
114
+ does_not_have_storage_access_url: top_level_interaction_path(
115
+ shop: sanitized_shop_name
116
+ ),
117
+ has_storage_access_url: login_url(top_level: true),
118
+ app_home_url: granted_storage_access_path(shop: sanitized_shop_name),
119
+ current_shopify_domain: current_shopify_domain
120
+ }
121
+ end
4
122
  end
5
123
  end
@@ -1,11 +1,11 @@
1
1
  module ShopifyApp
2
- class WebhooksController < ApplicationController
2
+ class WebhooksController < ActionController::Base
3
3
  include ShopifyApp::WebhookVerification
4
4
 
5
5
  class ShopifyApp::MissingWebhookJobError < StandardError; end
6
6
 
7
7
  def receive
8
- params.try(:permit!)
8
+ params.permit!
9
9
  job_args = {shop_domain: shop_domain, webhook: webhook_params.to_h}
10
10
  webhook_job_klass.perform_later(job_args)
11
11
  head :no_content
@@ -18,11 +18,19 @@ module ShopifyApp
18
18
  end
19
19
 
20
20
  def webhook_job_klass
21
- "#{webhook_type.classify}Job".safe_constantize or raise ShopifyApp::MissingWebhookJobError
21
+ webhook_job_klass_name.safe_constantize or raise ShopifyApp::MissingWebhookJobError
22
+ end
23
+
24
+ def webhook_job_klass_name(type = webhook_type)
25
+ [webhook_namespace, "#{type}_job"].compact.join('/').classify
22
26
  end
23
27
 
24
28
  def webhook_type
25
29
  params[:type]
26
30
  end
31
+
32
+ def webhook_namespace
33
+ ShopifyApp.configuration.webhook_jobs_namespace
34
+ end
27
35
  end
28
36
  end
@@ -0,0 +1,104 @@
1
+ <style>
2
+ .Polaris-Button {
3
+ fill:#637381;
4
+ position:relative;
5
+ display:-webkit-inline-box;
6
+ display:-ms-inline-flexbox;
7
+ display:inline-flex;
8
+ -webkit-box-align:center;
9
+ -ms-flex-align:center;
10
+ align-items:center;
11
+ -webkit-box-pack:center;
12
+ -ms-flex-pack:center;
13
+ justify-content:center;
14
+ min-height:3.6rem;
15
+ min-width:3.6rem;
16
+ margin:0;
17
+ padding:0.7rem 1.6rem;
18
+ background:linear-gradient(to bottom, white, #f9fafb);
19
+ border:1px solid #c4cdd5;
20
+ box-shadow:0 1px 0 0 rgba(22, 29, 37, 0.05);
21
+ border-radius:3px;
22
+ line-height:1;
23
+ color:#212b36;
24
+ text-align:center;
25
+ cursor:pointer;
26
+ -webkit-user-select:none;
27
+ -moz-user-select:none;
28
+ -ms-user-select:none;
29
+ user-select:none;
30
+ text-decoration:none;
31
+ transition-property:background, border, box-shadow;
32
+ transition-duration:200ms;
33
+ transition-timing-function:cubic-bezier(0.64, 0, 0.35, 1);
34
+ }
35
+
36
+ .Polaris-Button:hover {
37
+ background:linear-gradient(to bottom, #f9fafb, #f4f6f8);
38
+ border-color:#c4cdd5;
39
+ }
40
+
41
+ .Polaris-Button:focus {
42
+ border-color:#5c6ac4;
43
+ outline:0;
44
+ box-shadow:0 0 0 1px #5c6ac4;
45
+ }
46
+
47
+ .Polaris-Button:active {
48
+ background:linear-gradient(to bottom, #f4f6f8, #f4f6f8);
49
+ border-color:#c4cdd5;
50
+ box-shadow:0 0 0 0 transparent, inset 0 1px 1px 0 rgba(99, 115, 129, 0.1), inset 0 1px 4px 0 rgba(99, 115, 129, 0.2);
51
+ }
52
+
53
+ .Polaris-Button__Content {
54
+ font-size:1.5rem;
55
+ font-weight:400;
56
+ line-height:1.6rem;
57
+ text-transform:initial;
58
+ letter-spacing:initial;
59
+ position:relative;
60
+ display:-webkit-box;
61
+ display:-ms-flexbox;
62
+ display:flex;
63
+ -webkit-box-pack:center;
64
+ -ms-flex-pack:center;
65
+ justify-content:center;
66
+ -webkit-box-align:center;
67
+ -ms-flex-align:center;
68
+ align-items:center;
69
+ min-width:1px;
70
+ min-height:1px;
71
+ }
72
+
73
+ @media (min-width: 40em) {
74
+ .Polaris-Button__Content {
75
+ font-size:1.4rem;
76
+ }
77
+ }
78
+
79
+ .Polaris-Button--primary {
80
+ background:linear-gradient(to bottom, #6371c7, #5563c1);
81
+ border-color:#3f4eae;
82
+ box-shadow:inset 0 1px 0 0 #6774c8, 0 1px 0 0 rgba(22, 29, 37, 0.05), 0 0 0 0 transparent;
83
+ color:white;
84
+ fill:white;
85
+ }
86
+
87
+ .Polaris-Button--primary:hover {
88
+ background:linear-gradient(to bottom, #5c6ac4, #4959bd);
89
+ border-color:#3f4eae;
90
+ color:white;
91
+ text-decoration:none;
92
+ }
93
+
94
+ .Polaris-Button--primary:focus {
95
+ border-color:#202e78;
96
+ box-shadow:inset 0 1px 0 0 #6f7bcb, 0 1px 0 0 rgba(22, 29, 37, 0.05), 0 0 0 1px #202e78;
97
+ }
98
+
99
+ .Polaris-Button--primary:active {
100
+ background:linear-gradient(to bottom, #3f4eae, #3f4eae);
101
+ border-color:#38469b;
102
+ box-shadow:inset 0 0 0 0 transparent, 0 1px 0 0 rgba(22, 29, 37, 0.05), 0 0 1px 0 #38469b;
103
+ }
104
+ </style>
@@ -0,0 +1,33 @@
1
+ <style>
2
+ .Polaris-Card {
3
+ overflow:hidden;
4
+ background-color:white;
5
+ box-shadow:0 0 0 1px rgba(63, 63, 68, 0.05), 0 1px 3px 0 rgba(63, 63, 68, 0.15);
6
+ }
7
+
8
+ .Polaris-Card + .Polaris-Card {
9
+ margin-top:2rem;
10
+ }
11
+
12
+ @media (min-width: 30.625em) {
13
+ .Polaris-Card {
14
+ border-radius:3px;
15
+ }
16
+ }
17
+
18
+ .Polaris-Card__Header {
19
+ padding:2rem 2rem 0;
20
+ }
21
+
22
+ .Polaris-Card__Section {
23
+ padding:2rem;
24
+ }
25
+
26
+ .Polaris-Card__Section + .Polaris-Card__Section {
27
+ border-top:1px solid #dfe3e8;
28
+ }
29
+
30
+ .Polaris-Card__Section--subdued {
31
+ background-color:#f9fafb;
32
+ }
33
+ </style>
@@ -0,0 +1,129 @@
1
+ <style>
2
+ .Polaris-EmptyState {
3
+ display:-webkit-box;
4
+ display:-ms-flexbox;
5
+ display:flex;
6
+ -webkit-box-orient:vertical;
7
+ -webkit-box-direction:normal;
8
+ -ms-flex-direction:column;
9
+ flex-direction:column;
10
+ -webkit-box-align:center;
11
+ -ms-flex-align:center;
12
+ align-items:center;
13
+ width:100%;
14
+ margin:2rem auto 0 auto;
15
+ padding:2rem 0;
16
+ max-width:99.8rem;
17
+ }
18
+
19
+ @media (min-width: 46.5em) {
20
+ .Polaris-EmptyState--imageContained .Polaris-EmptyState__Image {
21
+ position:initial;
22
+ width:100%;
23
+ }
24
+ }
25
+
26
+ .Polaris-EmptyState__Section {
27
+ position:relative;
28
+ display:-webkit-box;
29
+ display:-ms-flexbox;
30
+ display:flex;
31
+ -webkit-box-orient:vertical;
32
+ -webkit-box-direction:normal;
33
+ -ms-flex-direction:column;
34
+ flex-direction:column;
35
+ -webkit-box-flex:1;
36
+ -ms-flex:1 1 auto;
37
+ flex:1 1 auto;
38
+ width:100%;
39
+ }
40
+
41
+ @media (min-width: 46.5em) {
42
+ .Polaris-EmptyState__Section {
43
+ left:2rem;
44
+ -webkit-box-orient:horizontal;
45
+ -webkit-box-direction:normal;
46
+ -ms-flex-direction:row;
47
+ flex-direction:row;
48
+ -webkit-box-align:center;
49
+ -ms-flex-align:center;
50
+ align-items:center;
51
+ }
52
+ }
53
+
54
+ .Polaris-EmptyState__ImageContainer,
55
+ .Polaris-EmptyState__DetailsContainer {
56
+ -webkit-box-flex:1;
57
+ -ms-flex:1 1 auto;
58
+ flex:1 1 auto;
59
+ padding:0;
60
+ margin:0;
61
+ }
62
+
63
+ @media (min-width: 46.5em) {
64
+ .Polaris-EmptyState__ImageContainer,
65
+ .Polaris-EmptyState__DetailsContainer {
66
+ -ms-flex-preferred-size:50%;
67
+ flex-basis:50%;
68
+ }
69
+ }
70
+
71
+ @media (max-width: 30.625em) {
72
+ .Polaris-EmptyState__ImageContainer,
73
+ .Polaris-EmptyState__DetailsContainer {
74
+ overflow-x:hidden;
75
+ }
76
+ }
77
+
78
+ .Polaris-EmptyState__Details {
79
+ position:relative;
80
+ z-index:10;
81
+ padding:0 1.6rem;
82
+ width:33.6rem;
83
+ }
84
+
85
+ @media (min-width: 30.625em) {
86
+ .Polaris-EmptyState__Details {
87
+ padding:0;
88
+ }
89
+ }
90
+
91
+ .Polaris-EmptyState__Content {
92
+ font-size:1.6rem;
93
+ font-weight:400;
94
+ line-height:2.4rem;
95
+ color:#637381;
96
+ }
97
+
98
+ @media (min-width: 40em) {
99
+ .Polaris-EmptyState__Content {
100
+ font-size:2rem;
101
+ line-height:2.8rem;
102
+ }
103
+ }
104
+
105
+ .Polaris-EmptyState__Actions {
106
+ margin-top:1.6rem;
107
+ }
108
+
109
+ .Polaris-EmptyState__Image {
110
+ display: none;
111
+ }
112
+
113
+ @media (min-width: 30.625em) {
114
+ .Polaris-EmptyState__Image {
115
+ display: block;
116
+ margin-left:-60%;
117
+ margin-top:-30%;
118
+ width:200%;
119
+ }
120
+ }
121
+
122
+ @media (min-width: 46.5em) {
123
+ .Polaris-EmptyState__Image {
124
+ margin-top:0;
125
+ margin-left:-90%;
126
+ width:200%;
127
+ }
128
+ }
129
+ </style>