polaris_view_helpers 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/polaris_view_helpers/version.rb +1 -1
  3. data/vendor/assets/stylesheets/shopify-polaris-1.0.3.css +3414 -0
  4. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles.scss +4 -0
  5. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components.scss +51 -0
  6. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/AccountConnection.scss +9 -0
  7. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ActionList.scss +75 -0
  8. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Avatar.scss +70 -0
  9. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Badge.scss +68 -0
  10. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Banner.scss +140 -0
  11. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Breadcrumbs.scss +45 -0
  12. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Button.scss +228 -0
  13. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ButtonGroup.scss +67 -0
  14. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/CalloutCard.scss +27 -0
  15. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Caption.scss +4 -0
  16. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Card.scss +43 -0
  17. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Checkbox.scss +78 -0
  18. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Choice.scss +62 -0
  19. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ChoiceList.scss +22 -0
  20. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Collapsible.scss +18 -0
  21. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ColorPicker.scss +133 -0
  22. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Connected.scss +67 -0
  23. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/DatePicker.scss +147 -0
  24. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/DescriptionList.scss +44 -0
  25. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/DisplayText.scss +19 -0
  26. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/EmptyState.scss +63 -0
  27. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/FooterHelp.scss +26 -0
  28. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/FormLayout.scss +35 -0
  29. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Heading.scss +4 -0
  30. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Icon.scss +226 -0
  31. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/KeyboardKey.scss +22 -0
  32. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Label.scss +18 -0
  33. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Labelled.scss +24 -0
  34. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Layout.scss +69 -0
  35. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Link.scss +18 -0
  36. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/List.scss +52 -0
  37. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Page.scss +125 -0
  38. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/PageActions.scss +9 -0
  39. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Pagination.scss +139 -0
  40. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Popover.scss +98 -0
  41. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/PositionedOverlay.scss +8 -0
  42. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/RadioButton.scss +68 -0
  43. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ResourceList.scss +272 -0
  44. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Scrollable.scss +28 -0
  45. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Select.scss +103 -0
  46. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/SettingAction.scss +22 -0
  47. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Stack.scss +98 -0
  48. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Subheading.scss +4 -0
  49. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Tabs.scss +150 -0
  50. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Tag.scss +37 -0
  51. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/TextContainer.scss +12 -0
  52. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/TextField.scss +219 -0
  53. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/TextStyle.scss +15 -0
  54. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Thumbnail.scss +49 -0
  55. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Tooltip.scss +70 -0
  56. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/VisuallyHidden.scss +3 -0
  57. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation.scss +11 -0
  58. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/border-radius.scss +12 -0
  59. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/borders.scss +19 -0
  60. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/colors.scss +142 -0
  61. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/duration.scss +24 -0
  62. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/easing.scss +23 -0
  63. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/layout.scss +46 -0
  64. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/shadows.scss +25 -0
  65. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/spacing.scss +25 -0
  66. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/typography.scss +127 -0
  67. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/utilities.scss +90 -0
  68. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/z-index.scss +19 -0
  69. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/global.scss +55 -0
  70. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared.scss +8 -0
  71. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/accessibility.scss +16 -0
  72. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/breakpoints.scss +127 -0
  73. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/buttons.scss +87 -0
  74. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss +59 -0
  75. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/icons.scss +11 -0
  76. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/layout.scss +8 -0
  77. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/links.scss +8 -0
  78. data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/typography.scss +128 -0
  79. metadata +79 -3
@@ -0,0 +1,18 @@
1
+ .Polaris-Label {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ align-items: baseline;
5
+ -webkit-tap-highlight-color: transparent;
6
+ }
7
+
8
+ .Polaris-Label--hidden {
9
+ @include visually-hidden;
10
+ }
11
+
12
+ .Polaris-Label__Text {
13
+ @include text-style-body;
14
+ display: block;
15
+ flex: 1 1 auto;
16
+ color: currentColor;
17
+ -webkit-tap-highlight-color: transparent;
18
+ }
@@ -0,0 +1,24 @@
1
+ .Polaris-Labelled--hidden > .Polaris-Labelled__LabelWrapper {
2
+ @include visually-hidden;
3
+ }
4
+
5
+ .Polaris-Labelled__LabelWrapper {
6
+ margin-bottom: spacing(extra-tight);
7
+ }
8
+
9
+ .Polaris-Labelled__HelpText {
10
+ @include text-style-body;
11
+ @include text-emphasis-subdued;
12
+ margin-top: spacing(extra-tight);
13
+ }
14
+
15
+ .Polaris-Labelled__Error {
16
+ display: flex;
17
+ margin-top: spacing(extra-tight);
18
+ color: color(red, dark);
19
+ }
20
+
21
+ .Polaris-Labelled__ErrorIcon {
22
+ @include recolor-icon(color(red));
23
+ margin: 0 spacing(extra-tight) 0 -2px;
24
+ }
@@ -0,0 +1,69 @@
1
+ $secondary-basis: layout-width(secondary, min);
2
+ $primary-basis: layout-width(primary, min);
3
+ $relative-size: $primary-basis / $secondary-basis;
4
+
5
+ .Polaris-Layout {
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ justify-content: center;
9
+ align-items: flex-start;
10
+ margin-top: -1 * spacing(loose);
11
+ margin-left: -1 * spacing(loose);
12
+ }
13
+
14
+ .Polaris-Layout__Section {
15
+ @include layout-flex-fix;
16
+ flex: $relative-size $relative-size $primary-basis;
17
+ margin-top: spacing(loose);
18
+ margin-left: spacing(loose);
19
+ min-width: 51%;
20
+ }
21
+
22
+ .Polaris-Layout__Section--secondary {
23
+ flex: 1 1 $secondary-basis;
24
+ min-width: 0;
25
+ }
26
+
27
+ .Polaris-Layout__Item {
28
+ flex: 1 1 100%;
29
+ }
30
+
31
+ .Polaris-Layout__AnnotatedSection {
32
+ flex: 1 1 100%;
33
+ margin-top: spacing(loose);
34
+ margin-left: spacing(loose);
35
+ }
36
+
37
+ .Polaris-Layout__Section,
38
+ .Polaris-Layout__AnnotatedSection {
39
+ + .Polaris-Layout__AnnotatedSection {
40
+ @include page-content-when-not-fully-condensed {
41
+ padding-top: spacing(loose);
42
+ border-top: border();
43
+ }
44
+ }
45
+ }
46
+
47
+ .Polaris-Layout__AnnotationWrapper {
48
+ display: flex;
49
+ flex-wrap: wrap;
50
+ margin-top: -1 * spacing(loose);
51
+ margin-left: -1 * spacing(loose);
52
+ }
53
+
54
+ .Polaris-Layout__AnnotationContent {
55
+ flex: $relative-size $relative-size $primary-basis;
56
+ margin-top: spacing(loose);
57
+ margin-left: spacing(loose);
58
+ }
59
+
60
+ .Polaris-Layout__Annotation {
61
+ flex: 1 1 $secondary-basis;
62
+ margin-top: spacing(loose);
63
+ margin-left: spacing(loose);
64
+ padding: spacing(loose) spacing(loose) 0;
65
+
66
+ @include page-content-when-layout-not-stacked {
67
+ padding: spacing(loose) spacing(loose) spacing(loose) 0;
68
+ }
69
+ }
@@ -0,0 +1,18 @@
1
+ .Polaris-Link {
2
+ appearance: none;
3
+ display: inline;
4
+ padding: 0;
5
+ background: none;
6
+ border: none;
7
+ font-size: inherit;
8
+ color: color(blue);
9
+ text-decoration: none;
10
+ cursor: pointer;
11
+
12
+ &:hover,
13
+ &:focus,
14
+ &:active {
15
+ outline: none;
16
+ color: color(blue, dark);
17
+ }
18
+ }
@@ -0,0 +1,52 @@
1
+ $number-size: rem(12px);
2
+ $bullet-size: rem(18px);
3
+
4
+ .Polaris-List {
5
+ list-style: none;
6
+ margin-top: 0;
7
+ padding-left: 0;
8
+
9
+ + .Polaris-List {
10
+ margin-top: spacing();
11
+ }
12
+ }
13
+
14
+ .Polaris-List--typeBullet {
15
+ > .Polaris-List__Item::before {
16
+ content: '\2022'; // bullet
17
+ font-size: $bullet-size;
18
+ }
19
+ }
20
+
21
+ .Polaris-List--typeNumber {
22
+ counter-reset: ordered-counter;
23
+
24
+ > .Polaris-List__Item::before {
25
+ @include text-emphasis-strong;
26
+ content: counter(ordered-counter, decimal) '.';
27
+ counter-increment: ordered-counter;
28
+ font-size: $number-size;
29
+ vertical-align: top;
30
+ }
31
+ }
32
+
33
+ .Polaris-List__Item {
34
+ position: relative;
35
+ margin-bottom: spacing(tight);
36
+ padding-left: spacing();
37
+
38
+ &:last-child {
39
+ margin-bottom: 0;
40
+ }
41
+
42
+ &::before {
43
+ position: absolute;
44
+ top: 0;
45
+ left: 0;
46
+ display: block;
47
+ }
48
+
49
+ .Polaris-List:first-child {
50
+ margin-top: spacing(tight);
51
+ }
52
+ }
@@ -0,0 +1,125 @@
1
+ $navigation-elements-height: rem(36px);
2
+ $title-height: line-height(display-large, large-screen);
3
+ $actions-vertical-spacing: rem(4px);
4
+ $action-horizontal-padding: 1.5 * spacing(tight);
5
+
6
+ $stacking-order: (
7
+ title: 10,
8
+ breadcrumbs: 20,
9
+ );
10
+
11
+ .Polaris-Page {
12
+ margin: 0 auto;
13
+ padding: 0;
14
+ max-width: layout-width(primary, max) + layout-width(secondary, max) + layout-width(inner-spacing);
15
+
16
+ @include page-content-when-not-fully-condensed {
17
+ padding: 0 spacing(loose);
18
+ }
19
+
20
+ @include page-content-when-not-partially-condensed {
21
+ padding: 0 spacing(extra-loose);
22
+ }
23
+ }
24
+
25
+ .Polaris-Page--fullWidth {
26
+ max-width: none;
27
+ }
28
+
29
+ .Polaris-Page__Content {
30
+ margin: spacing(loose) 0;
31
+ }
32
+
33
+ .Polaris-Page__Header {
34
+ margin: spacing(loose) 0;
35
+ padding: 0 spacing(loose);
36
+
37
+ @include page-content-when-not-fully-condensed {
38
+ padding: 0;
39
+ }
40
+ }
41
+
42
+ @include page-content-when-not-partially-condensed {
43
+ .Polaris-Page__Header--hasBreadcrumbs .Polaris-Page__PrimaryAction {
44
+ margin-top: -1 * ($navigation-elements-height + $title-height + $actions-vertical-spacing);
45
+ }
46
+
47
+ .Polaris-Page__Header--hasPagination .Polaris-Page__PrimaryAction {
48
+ margin-top: -1 * ($title-height + $actions-vertical-spacing);
49
+ }
50
+ }
51
+
52
+ .Polaris-Page__Navigation {
53
+ display: flex;
54
+ justify-content: space-between;
55
+ }
56
+
57
+ .Polaris-Page__Pagination {
58
+ margin-left: auto;
59
+ }
60
+
61
+ .Polaris-Page__Actions {
62
+ display: flex;
63
+ flex-direction: row-reverse;
64
+ margin-top: 2 * $actions-vertical-spacing;
65
+
66
+ @include page-content-when-not-fully-condensed {
67
+ margin-top: $actions-vertical-spacing;
68
+ }
69
+ }
70
+
71
+ .Polaris-Page__SecondaryActions {
72
+ margin-right: auto;
73
+ }
74
+
75
+ .Polaris-Page__PrimaryAction {
76
+ display: flex;
77
+ align-items: center;
78
+ margin-left: auto;
79
+ }
80
+
81
+ .Polaris-Page__Action {
82
+ @include unstyled-button;
83
+ @include text-style-body;
84
+ min-height: control-height();
85
+ padding: 0 $action-horizontal-padding;
86
+ border-radius: border-radius();
87
+ color: color(ink, lighter);
88
+ will-change: background, color;
89
+ transition-property: background;
90
+ transition-duration: duration();
91
+ transition-timing-function: easing();
92
+
93
+ &:hover,
94
+ &:active {
95
+ color: color(ink);
96
+
97
+ .Polaris-Page__ActionIcon {
98
+ @include recolor-icon(color(ink));
99
+ }
100
+ }
101
+
102
+ &:focus,
103
+ &:active {
104
+ background: plain-button-background();
105
+ }
106
+
107
+ &:first-child {
108
+ margin-left: -1 * $action-horizontal-padding;
109
+ }
110
+
111
+ &:last-child {
112
+ margin-right: -1 * $action-horizontal-padding;
113
+ }
114
+ }
115
+
116
+ .Polaris-Page__ActionContent {
117
+ display: flex;
118
+ align-items: center;
119
+ min-height: control-height();
120
+ }
121
+
122
+ .Polaris-Page__ActionIcon {
123
+ @include recolor-icon(color(ink, lighter));
124
+ margin-right: spacing(extra-tight);
125
+ }
@@ -0,0 +1,9 @@
1
+ .Polaris-PageActions {
2
+ margin: 0 auto;
3
+ padding: spacing(loose);
4
+ border-top: border();
5
+
6
+ @include page-content-when-not-fully-condensed {
7
+ padding: spacing(loose) 0;
8
+ }
9
+ }
@@ -0,0 +1,139 @@
1
+ $min-height: control-height();
2
+ $vertical-padding: ($min-height - line-height(body) - rem(2px)) / 2;
3
+
4
+ // This is the adjustment needed to get the icon to appear flush with other
5
+ // content around it.
6
+ $plain-horizontal-adjustment: rem(10px);
7
+
8
+ $stacking-order: (
9
+ item: 10,
10
+ focused: 20,
11
+ );
12
+
13
+ .Polaris-Pagination {
14
+ display: inline-flex;
15
+
16
+ &:not(.Polaris-Pagination--plain) {
17
+ @include page-content-when-fully-condensed {
18
+ display: flex;
19
+ width: 100%;
20
+
21
+ .Polaris-Pagination__Button {
22
+ flex: 1 0 auto;
23
+ }
24
+ }
25
+ }
26
+ }
27
+
28
+ .Polaris-Pagination--plain {
29
+ .Polaris-Pagination__Button {
30
+ background: transparent;
31
+ border: none;
32
+ cursor: pointer;
33
+ appearance: none;
34
+ box-shadow: none;
35
+
36
+ // We always want this to have a border-radius, so it needs to override
37
+ // the :first/:last-child selectors below
38
+ // stylelint-disable-next-line declaration-no-important
39
+ border-radius: border-radius() !important;
40
+
41
+ &:hover,
42
+ &:active {
43
+ @include recolor-icon(color(ink));
44
+ background: transparent;
45
+ border: none;
46
+ box-shadow: none;
47
+ }
48
+
49
+ &:focus {
50
+ background: plain-button-background();
51
+ border: none;
52
+ box-shadow: none;
53
+ }
54
+
55
+ &:disabled {
56
+ @include recolor-icon(color(sky, dark));
57
+ background: transparent;
58
+ border: none;
59
+ box-shadow: none;
60
+ }
61
+
62
+ &:not(:first-child) {
63
+ margin-left: 0;
64
+ }
65
+
66
+ &:first-child {
67
+ margin-left: -1 * $plain-horizontal-adjustment;
68
+ }
69
+
70
+ &:last-child {
71
+ margin-right: -1 * $plain-horizontal-adjustment;
72
+ }
73
+ }
74
+ }
75
+
76
+ .Polaris-Pagination__Button {
77
+ @include recolor-icon(color(ink, lighter));
78
+ position: relative;
79
+ z-index: z-index(item, $stacking-order);
80
+ display: inline-block;
81
+ min-width: $min-height;
82
+ margin: 0;
83
+ padding: $vertical-padding spacing(tight);
84
+ background: linear-gradient(to bottom, color(white), color(sky, lighter));
85
+ border: border(dark);
86
+ border-radius: border-radius();
87
+ line-height: 1;
88
+ color: color(ink);
89
+ text-align: center;
90
+ cursor: pointer;
91
+ user-select: none;
92
+ text-decoration: none;
93
+ transition-property: color, background, border, box-shadow;
94
+ transition-duration: duration();
95
+ transition-timing-function: easing();
96
+
97
+ &:hover {
98
+ background: linear-gradient(to bottom, color(sky, lighter), color(sky, light));
99
+ border-color: color(sky, dark);
100
+ }
101
+
102
+ &:focus {
103
+ z-index: z-index(focused, $stacking-order);
104
+ border-color: color(indigo);
105
+ outline: 0;
106
+ box-shadow: 0 0 0 1px color(indigo);
107
+ }
108
+
109
+ &:active {
110
+ // Same color gradient is necessary for background transitions
111
+ background: linear-gradient(to bottom, color(sky, light), color(sky, light));
112
+ border-color: color(sky, dark);
113
+ box-shadow:
114
+ 0 0 0 0 transparent,
115
+ inset 0 1px 1px 0 rgba(color(ink, lighter), 0.1),
116
+ inset 0 1px 4px 0 rgba(color(ink, lighter), 0.2);
117
+ }
118
+
119
+ &:disabled {
120
+ @include recolor-icon(color(ink, lightest));
121
+ background: color(sky, light);
122
+ color: color(ink, lightest);
123
+ cursor: default;
124
+ }
125
+
126
+ &:not(:first-child) {
127
+ margin-left: -1px;
128
+ }
129
+
130
+ &:first-child {
131
+ border-top-right-radius: 0;
132
+ border-bottom-right-radius: 0;
133
+ }
134
+
135
+ &:last-child {
136
+ border-top-left-radius: 0;
137
+ border-bottom-left-radius: 0;
138
+ }
139
+ }