polaris_view_components 0.3.1 → 0.5.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 +1 -1
- data/app/{javascript → assets/javascripts}/polaris_view_components/index.js +0 -0
- data/app/{javascript → assets/javascripts}/polaris_view_components/resource_item_controller.js +0 -0
- data/app/assets/javascripts/polaris_view_components/select_controller.js +14 -0
- data/app/{javascript → assets/javascripts}/polaris_view_components/text_field_controller.js +0 -0
- data/app/assets/javascripts/polaris_view_components.js +6 -4
- data/app/assets/stylesheets/polaris_view_components/custom.css +43 -0
- data/app/assets/stylesheets/{shopify_navigation.css → polaris_view_components/shopify_navigation.css} +0 -4
- data/app/assets/stylesheets/polaris_view_components/spacer_component.css +39 -0
- data/app/assets/stylesheets/polaris_view_components.css +2214 -3
- data/app/assets/stylesheets/polaris_view_components.postcss.css +4 -0
- data/app/components/polaris/card/header_component.rb +0 -2
- data/app/components/polaris/card/section_component.rb +5 -1
- data/app/components/polaris/card_component.rb +0 -2
- data/app/components/polaris/data_table/cell_component.html.erb +18 -0
- data/app/components/polaris/data_table/cell_component.rb +49 -0
- data/app/components/polaris/data_table/column_component.rb +19 -0
- data/app/components/polaris/data_table_component.html.erb +77 -0
- data/app/components/polaris/data_table_component.rb +42 -0
- data/app/components/polaris/dropzone/component.rb +0 -2
- data/app/components/polaris/empty_state_component.html.erb +16 -11
- data/app/components/polaris/empty_state_component.rb +1 -0
- data/app/components/polaris/filters_component.html.erb +13 -0
- data/app/components/polaris/filters_component.rb +38 -0
- data/app/components/polaris/index_table/cell_component.rb +22 -0
- data/app/components/polaris/index_table/column_component.rb +13 -0
- data/app/components/polaris/index_table_component.html.erb +28 -0
- data/app/components/polaris/index_table_component.rb +25 -0
- data/app/components/polaris/inline_error_component.html.erb +2 -2
- data/app/components/polaris/inline_error_component.rb +7 -1
- data/app/components/polaris/layout/section.rb +2 -0
- data/app/components/polaris/link_component.rb +3 -1
- data/app/components/polaris/page_actions_component.rb +15 -1
- data/app/components/polaris/resource_list_component.html.erb +10 -0
- data/app/components/polaris/resource_list_component.rb +2 -8
- data/app/components/polaris/select_component.rb +7 -2
- data/app/components/polaris/spacer_component.rb +50 -0
- data/app/components/polaris/stack_component.rb +1 -1
- data/app/components/polaris/tag_component.rb +2 -2
- data/app/components/polaris/text_style_component.rb +9 -0
- data/app/helpers/polaris/form_builder.rb +27 -2
- data/app/helpers/polaris/view_helper.rb +15 -3
- data/lib/polaris/view_components/engine.rb +0 -1
- data/lib/polaris/view_components/version.rb +1 -1
- metadata +23 -11
- data/app/assets/stylesheets/polaris@6.6.0.css +0 -4104
- data/app/components/polaris/choice_list/component.html.erb +0 -34
- data/app/components/polaris/choice_list/component.rb +0 -65
- data/app/helpers/polaris/action_helper.rb +0 -14
- data/app/javascript/polaris_view_components/select_controller.js +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4ecf6c373c0c3a1188d677df7da49034a9094392ce74b0bac9e72780b1a851a
|
4
|
+
data.tar.gz: 836ebef4a9e97c359d4bf36e4ae497d673a6579de232c0a82f6cf12d4f33e3d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: add02e909f36a997d49d261b3960ad41636001dbb4a6beea5f1652a7bfadab94d9bb2e07cefc5618f652bbdd431934ceb11da59388d0523d75686bbdddc7723e
|
7
|
+
data.tar.gz: cdd86e17c2a970aae8e5fec22cb296eae4cd1df572dee371978d0b02450cf6185c30c5a891db0943b62f1f114b593a2a3e890840362c1c1efc9da6087c663dd7
|
data/README.md
CHANGED
@@ -85,7 +85,7 @@ In addition to the dependencies declared in the `gemspec`, Polaris ViewComponent
|
|
85
85
|
To get started:
|
86
86
|
|
87
87
|
1. Run: `bundle install`
|
88
|
-
2. Run: `
|
88
|
+
2. Run: `bin/dev`
|
89
89
|
|
90
90
|
It will open demo app with component previews on `localhost:4000`. You can change components and they will be updated on page reload. Component previews located in `demo/test/components/previews`.
|
91
91
|
|
File without changes
|
data/app/{javascript → assets/javascripts}/polaris_view_components/resource_item_controller.js
RENAMED
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus"
|
2
|
+
|
3
|
+
export default class extends Controller {
|
4
|
+
static targets = ["select", "selectedOption"]
|
5
|
+
|
6
|
+
connect() {
|
7
|
+
this.update()
|
8
|
+
}
|
9
|
+
|
10
|
+
update() {
|
11
|
+
const option = this.selectTarget.options[this.selectTarget.selectedIndex]
|
12
|
+
this.selectedOptionTarget.innerText = option.text
|
13
|
+
}
|
14
|
+
}
|
File without changes
|
@@ -13,10 +13,12 @@ class ResourceItem extends Controller {
|
|
13
13
|
}
|
14
14
|
|
15
15
|
class Select extends Controller {
|
16
|
-
static targets=[ "selectedOption" ];
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
static targets=[ "select", "selectedOption" ];
|
17
|
+
connect() {
|
18
|
+
this.update();
|
19
|
+
}
|
20
|
+
update() {
|
21
|
+
const option = this.selectTarget.options[this.selectTarget.selectedIndex];
|
20
22
|
this.selectedOptionTarget.innerText = option.text;
|
21
23
|
}
|
22
24
|
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/* Add missing 1/4 section for layout */
|
2
|
+
@media (min-width: 30.625em) {
|
3
|
+
.Polaris-Layout__Section--oneFourth {
|
4
|
+
flex: 1 1 20rem;
|
5
|
+
min-width: 0;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
/* Fix Tag removal link */
|
10
|
+
a.Polaris-Tag__Button {
|
11
|
+
height: auto;
|
12
|
+
}
|
13
|
+
|
14
|
+
/* Remove underline for sort link */
|
15
|
+
|
16
|
+
.Polaris-DataTable__Cell--sortable a {
|
17
|
+
text-decoration: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
/* CardSection borders */
|
21
|
+
.Polaris-Card__Section--borderTop {
|
22
|
+
border-top: 0.1rem solid var(--p-divider);
|
23
|
+
}
|
24
|
+
.Polaris-Card__Section--borderBottom {
|
25
|
+
border-bottom: 0.1rem solid var(--p-divider);
|
26
|
+
}
|
27
|
+
|
28
|
+
/* IndexTable */
|
29
|
+
|
30
|
+
/* TODO: Remove after upgrade to Polaris 7.0.0 */
|
31
|
+
.Polaris-IndexTable__TableRow.Polaris-IndexTable__TableRow--unclickable {
|
32
|
+
cursor: auto;
|
33
|
+
}
|
34
|
+
|
35
|
+
/* TestStyle sizes */
|
36
|
+
.Polaris-TextStyle--sizeSmall {
|
37
|
+
font-size: 1.25rem;
|
38
|
+
}
|
39
|
+
|
40
|
+
/* Remove box-shadow from buttons and links */
|
41
|
+
.Polaris-Button::after, .Polaris-Button:focus::after, .Polaris-Breadcrumbs__Breadcrumb::after {
|
42
|
+
box-shadow: none !important;
|
43
|
+
}
|
@@ -106,10 +106,6 @@
|
|
106
106
|
border-bottom: .3rem solid var(--p-action-primary)
|
107
107
|
}
|
108
108
|
|
109
|
-
.shp-Navigation_Link:focus {
|
110
|
-
box-shadow: inset 0 0 2px 0 rgba(92, 106, 196, .8), 0 0 2px 0 rgba(92, 106, 196, .8)
|
111
|
-
}
|
112
|
-
|
113
109
|
.shp-Navigation_Link:focus .shp-Navigation_LinkText {
|
114
110
|
font-weight: 400;
|
115
111
|
color: var(--p-text)
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/* Vertical */
|
2
|
+
.Polaris-Spacer--verticalSpacingExtraTight {
|
3
|
+
height: 4px;
|
4
|
+
}
|
5
|
+
.Polaris-Spacer--verticalSpacingTight {
|
6
|
+
height: 8px;
|
7
|
+
}
|
8
|
+
.Polaris-Spacer--verticalSpacingBaseTight {
|
9
|
+
height: 12px;
|
10
|
+
}
|
11
|
+
.Polaris-Spacer--verticalSpacingBase {
|
12
|
+
height: 16px;
|
13
|
+
}
|
14
|
+
.Polaris-Spacer--verticalSpacingLoose {
|
15
|
+
height: 20px;
|
16
|
+
}
|
17
|
+
.Polaris-Spacer--verticalSpacingExtraLoose {
|
18
|
+
height: 32px;
|
19
|
+
}
|
20
|
+
|
21
|
+
/* Horizontal */
|
22
|
+
.Polaris-Spacer--horizontalSpacingExtraTight {
|
23
|
+
width: 4px;
|
24
|
+
}
|
25
|
+
.Polaris-Spacer--horizontalSpacingTight {
|
26
|
+
width: 8px;
|
27
|
+
}
|
28
|
+
.Polaris-Spacer--horizontalSpacingBaseTight {
|
29
|
+
width: 12px;
|
30
|
+
}
|
31
|
+
.Polaris-Spacer--horizontalSpacingBase {
|
32
|
+
width: 16px;
|
33
|
+
}
|
34
|
+
.Polaris-Spacer--horizontalSpacingLoose {
|
35
|
+
width: 20px;
|
36
|
+
}
|
37
|
+
.Polaris-Spacer--horizontalSpacingExtraLoose {
|
38
|
+
width: 32px;
|
39
|
+
}
|