polaris_view_components 0.9.1 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -65
- data/app/assets/javascripts/polaris_view_components/dropzone_controller.js +24 -5
- data/app/assets/javascripts/polaris_view_components/text_field_controller.js +5 -0
- data/app/assets/javascripts/polaris_view_components.js +28 -7
- data/app/assets/stylesheets/polaris_view_components/custom.css +60 -8
- data/app/assets/stylesheets/polaris_view_components.css +48 -9
- data/app/components/polaris/action_list/item_component.rb +2 -1
- data/app/components/polaris/button_component.html.erb +2 -2
- data/app/components/polaris/data_table/column_component.rb +2 -1
- data/app/components/polaris/data_table_component.html.erb +1 -0
- data/app/components/polaris/dropzone_component.html.erb +13 -8
- data/app/components/polaris/empty_search_results_component.html.erb +12 -0
- data/app/components/polaris/empty_search_results_component.rb +19 -0
- data/app/components/polaris/filters_component.rb +3 -1
- data/app/components/polaris/headless_button.html.erb +2 -2
- data/app/components/polaris/headless_button.rb +3 -1
- data/app/components/polaris/index_table/column_component.rb +2 -1
- data/app/components/polaris/index_table_component.html.erb +3 -5
- data/app/components/polaris/index_table_component.rb +10 -0
- data/app/components/polaris/page_component.html.erb +81 -10
- data/app/components/polaris/page_component.rb +91 -29
- data/app/components/polaris/resource_item_component.rb +4 -1
- data/app/components/polaris/resource_list_component.html.erb +11 -0
- data/app/components/polaris/resource_list_component.rb +21 -0
- data/app/components/polaris/text_field_component.html.erb +1 -1
- data/app/components/polaris/text_field_component.rb +1 -1
- data/app/components/polaris/visually_hidden_component.rb +0 -3
- data/app/helpers/polaris/url_helper.rb +37 -0
- data/app/helpers/polaris/view_helper.rb +1 -0
- data/lib/install/install.rb +57 -0
- data/lib/polaris/view_components/version.rb +1 -1
- data/lib/tasks/polaris_view_components_tasks.rake +6 -0
- metadata +91 -7
- data/lib/generators/polaris_view_components/USAGE +0 -5
- data/lib/generators/polaris_view_components/install_generator.rb +0 -35
- data/lib/generators/polaris_view_components/templates/README +0 -14
- data/lib/generators/polaris_view_components/templates/stimulus_index.js +0 -6
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.11.0
|
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: 2022-
|
12
|
+
date: 2022-06-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -39,6 +39,90 @@ dependencies:
|
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 2.0.0
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: capybara
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '3'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '3'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: webdrivers
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '5.0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '5.0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: selenium-webdriver
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '4.1'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '4.1'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: minitest
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '5.0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '5.0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: pry
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: sprockets-rails
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
42
126
|
description:
|
43
127
|
email:
|
44
128
|
- dan@dangamble.co.uk
|
@@ -531,6 +615,8 @@ files:
|
|
531
615
|
- app/components/polaris/display_text_component.rb
|
532
616
|
- app/components/polaris/dropzone_component.html.erb
|
533
617
|
- app/components/polaris/dropzone_component.rb
|
618
|
+
- app/components/polaris/empty_search_results_component.html.erb
|
619
|
+
- app/components/polaris/empty_search_results_component.rb
|
534
620
|
- app/components/polaris/empty_state_component.html.erb
|
535
621
|
- app/components/polaris/empty_state_component.rb
|
536
622
|
- app/components/polaris/exception_list/item_component.html.erb
|
@@ -657,14 +743,12 @@ files:
|
|
657
743
|
- app/helpers/polaris/view_helper.rb
|
658
744
|
- app/validators/type_validator.rb
|
659
745
|
- config/locales/en.yml
|
660
|
-
- lib/
|
661
|
-
- lib/generators/polaris_view_components/install_generator.rb
|
662
|
-
- lib/generators/polaris_view_components/templates/README
|
663
|
-
- lib/generators/polaris_view_components/templates/stimulus_index.js
|
746
|
+
- lib/install/install.rb
|
664
747
|
- lib/polaris/view_components.rb
|
665
748
|
- lib/polaris/view_components/engine.rb
|
666
749
|
- lib/polaris/view_components/version.rb
|
667
750
|
- lib/polaris_view_components.rb
|
751
|
+
- lib/tasks/polaris_view_components_tasks.rake
|
668
752
|
homepage: https://github.com/baoagency/polaris-view-components
|
669
753
|
licenses:
|
670
754
|
- MIT
|
@@ -685,7 +769,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
685
769
|
- !ruby/object:Gem::Version
|
686
770
|
version: '0'
|
687
771
|
requirements: []
|
688
|
-
rubygems_version: 3.
|
772
|
+
rubygems_version: 3.3.15
|
689
773
|
signing_key:
|
690
774
|
specification_version: 4
|
691
775
|
summary: ViewComponents for Polaris Design System
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails/generators/active_record"
|
4
|
-
|
5
|
-
module PolarisViewComponents
|
6
|
-
class InstallGenerator < Rails::Generators::Base
|
7
|
-
source_root File.expand_path("templates", __dir__)
|
8
|
-
|
9
|
-
def add_npm_package
|
10
|
-
say "Adding NPM package", :green
|
11
|
-
run "yarn add polaris-view-components"
|
12
|
-
end
|
13
|
-
|
14
|
-
def add_to_stimulus_controller
|
15
|
-
say "Adding import to to Stimulus controller", :green
|
16
|
-
dir_path = "app/javascript/controllers"
|
17
|
-
empty_directory("app/javascript")
|
18
|
-
empty_directory(dir_path)
|
19
|
-
|
20
|
-
file_path = "#{dir_path}/index.js"
|
21
|
-
|
22
|
-
unless File.exist?(file_path)
|
23
|
-
copy_file "stimulus_index.js", file_path
|
24
|
-
end
|
25
|
-
|
26
|
-
append_to_file file_path do
|
27
|
-
"import { registerPolarisControllers } from \"polaris-view-components\"\nregisterPolarisControllers(Stimulus)"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
def show_readme
|
32
|
-
readme "README"
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
===============================================================================
|
2
|
-
|
3
|
-
Some manual setup is still required:
|
4
|
-
|
5
|
-
1. Setup Polaris styles in your layouts <head> tag:
|
6
|
-
|
7
|
-
<link rel="stylesheet" href="https://unpkg.com/@shopify/polaris@6.6.0/dist/styles.css" />
|
8
|
-
<%= stylesheet_link_tag 'polaris_view_components' %>
|
9
|
-
|
10
|
-
2. Define Polaris style on your <body> tag:
|
11
|
-
|
12
|
-
<body style="<%= polaris_body_styles %>">
|
13
|
-
|
14
|
-
===============================================================================
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { Application } from "@hotwired/stimulus"
|
2
|
-
import { definitionsFromContext } from "@hotwired/stimulus-webpack-helpers"
|
3
|
-
|
4
|
-
window.Stimulus = Application.start()
|
5
|
-
const context = require.context("./", true, /\.js$/)
|
6
|
-
Stimulus.load(definitionsFromContext(context))
|