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.
- checksums.yaml +4 -4
- data/lib/polaris_view_helpers/version.rb +1 -1
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3.css +3414 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles.scss +4 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components.scss +51 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/AccountConnection.scss +9 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ActionList.scss +75 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Avatar.scss +70 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Badge.scss +68 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Banner.scss +140 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Breadcrumbs.scss +45 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Button.scss +228 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ButtonGroup.scss +67 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/CalloutCard.scss +27 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Caption.scss +4 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Card.scss +43 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Checkbox.scss +78 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Choice.scss +62 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ChoiceList.scss +22 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Collapsible.scss +18 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ColorPicker.scss +133 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Connected.scss +67 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/DatePicker.scss +147 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/DescriptionList.scss +44 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/DisplayText.scss +19 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/EmptyState.scss +63 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/FooterHelp.scss +26 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/FormLayout.scss +35 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Heading.scss +4 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Icon.scss +226 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/KeyboardKey.scss +22 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Label.scss +18 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Labelled.scss +24 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Layout.scss +69 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Link.scss +18 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/List.scss +52 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Page.scss +125 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/PageActions.scss +9 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Pagination.scss +139 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Popover.scss +98 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/PositionedOverlay.scss +8 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/RadioButton.scss +68 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ResourceList.scss +272 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Scrollable.scss +28 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Select.scss +103 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/SettingAction.scss +22 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Stack.scss +98 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Subheading.scss +4 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Tabs.scss +150 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Tag.scss +37 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/TextContainer.scss +12 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/TextField.scss +219 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/TextStyle.scss +15 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Thumbnail.scss +49 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Tooltip.scss +70 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/VisuallyHidden.scss +3 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation.scss +11 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/border-radius.scss +12 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/borders.scss +19 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/colors.scss +142 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/duration.scss +24 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/easing.scss +23 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/layout.scss +46 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/shadows.scss +25 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/spacing.scss +25 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/typography.scss +127 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/utilities.scss +90 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/z-index.scss +19 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/global.scss +55 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared.scss +8 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/accessibility.scss +16 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/breakpoints.scss +127 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/buttons.scss +87 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss +59 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/icons.scss +11 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/layout.scss +8 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/links.scss +8 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/typography.scss +128 -0
- metadata +79 -3
@@ -0,0 +1,228 @@
|
|
1
|
+
$min-height: control-height();
|
2
|
+
$vertical-padding: ($min-height - line-height(body) - rem(2px)) / 2;
|
3
|
+
$slim-min-height: rem(30px);
|
4
|
+
$slim-vertical-padding: ($slim-min-height - line-height(body) - rem(2px)) / 2;
|
5
|
+
$large-min-height: rem(44px);
|
6
|
+
$large-vertical-padding: ($large-min-height - line-height(body) - rem(2px)) / 2;
|
7
|
+
|
8
|
+
.Polaris-Button {
|
9
|
+
@include recolor-icon(color(ink, lighter));
|
10
|
+
position: relative;
|
11
|
+
display: inline-block;
|
12
|
+
min-height: $min-height;
|
13
|
+
min-width: $min-height;
|
14
|
+
margin: 0;
|
15
|
+
padding: $vertical-padding spacing();
|
16
|
+
background: linear-gradient(to bottom, color(white), color(sky, lighter));
|
17
|
+
border: border(dark);
|
18
|
+
box-shadow: shadow(faint);
|
19
|
+
border-radius: border-radius();
|
20
|
+
line-height: 1;
|
21
|
+
color: color(ink);
|
22
|
+
text-align: center;
|
23
|
+
cursor: pointer;
|
24
|
+
user-select: none;
|
25
|
+
text-decoration: none;
|
26
|
+
transition-property: background, border, box-shadow;
|
27
|
+
transition-duration: duration();
|
28
|
+
transition-timing-function: easing();
|
29
|
+
|
30
|
+
&:hover {
|
31
|
+
background: linear-gradient(to bottom, color(sky, lighter), color(sky, light));
|
32
|
+
border-color: color(sky, dark);
|
33
|
+
}
|
34
|
+
|
35
|
+
&:focus {
|
36
|
+
border-color: color(indigo);
|
37
|
+
outline: 0;
|
38
|
+
box-shadow: 0 0 0 1px color(indigo);
|
39
|
+
}
|
40
|
+
|
41
|
+
&:active {
|
42
|
+
// Same color gradient is necessary for background transitions
|
43
|
+
background: linear-gradient(to bottom, color(sky, light), color(sky, light));
|
44
|
+
border-color: color(sky, dark);
|
45
|
+
box-shadow:
|
46
|
+
0 0 0 0 transparent,
|
47
|
+
inset 0 1px 1px 0 rgba(color(ink, lighter), 0.1),
|
48
|
+
inset 0 1px 4px 0 rgba(color(ink, lighter), 0.2);
|
49
|
+
}
|
50
|
+
|
51
|
+
&.Polaris-Button--disabled {
|
52
|
+
@include recolor-icon(color(ink, lightest));
|
53
|
+
background: color(sky, light);
|
54
|
+
color: color(ink, lightest);
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
.Polaris-Button--primary {
|
59
|
+
@include button-filled(color(indigo), color(indigo, dark));
|
60
|
+
@include recolor-icon(color(white));
|
61
|
+
|
62
|
+
&.Polaris-Button--disabled {
|
63
|
+
@include recolor-icon(color(white));
|
64
|
+
background: color(indigo, light);
|
65
|
+
border-color: color(indigo, light);
|
66
|
+
box-shadow: none;
|
67
|
+
color: color(white);
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
.Polaris-Button--destructive {
|
72
|
+
@include button-filled(color(red), color(red, dark));
|
73
|
+
@include recolor-icon(color(white));
|
74
|
+
}
|
75
|
+
|
76
|
+
.Polaris-Button--outline {
|
77
|
+
@include button-outline(color(ink, lighter));
|
78
|
+
|
79
|
+
&.Polaris-Button--disabled {
|
80
|
+
background-color: color(white);
|
81
|
+
border-color: color(sky, dark);
|
82
|
+
color: color(ink, lightest);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
.Polaris-Button--destructive.Polaris-Button--outline {
|
87
|
+
@include button-outline(color(red));
|
88
|
+
@include recolor-icon(color(red, dark));
|
89
|
+
}
|
90
|
+
|
91
|
+
.Polaris-Button--disabled {
|
92
|
+
cursor: default;
|
93
|
+
pointer-events: none;
|
94
|
+
}
|
95
|
+
|
96
|
+
// The way the designs work, we need to do lots of reaching down to
|
97
|
+
// target the content in pseudo-selectors, so we need higher specificity
|
98
|
+
// in this case.
|
99
|
+
// stylelint-disable selector-max-specificity
|
100
|
+
|
101
|
+
.Polaris-Button--plain {
|
102
|
+
@include recolor-icon(color(blue));
|
103
|
+
margin: (-1 * $vertical-padding) (-1 * spacing());
|
104
|
+
background: transparent;
|
105
|
+
border: border(transparent);
|
106
|
+
box-shadow: none;
|
107
|
+
color: color(blue);
|
108
|
+
|
109
|
+
&:hover,
|
110
|
+
&:focus,
|
111
|
+
&:active {
|
112
|
+
@include recolor-icon(color(blue, dark));
|
113
|
+
background: transparent;
|
114
|
+
border: border(transparent);
|
115
|
+
box-shadow: none;
|
116
|
+
color: color(blue, dark);
|
117
|
+
}
|
118
|
+
|
119
|
+
&:focus > .Polaris-Button__Content::after {
|
120
|
+
opacity: 1;
|
121
|
+
}
|
122
|
+
|
123
|
+
&.Polaris-Button--disabled {
|
124
|
+
background: none;
|
125
|
+
}
|
126
|
+
|
127
|
+
&.Polaris-Button--sizeSlim {
|
128
|
+
margin-top: (-1 * $slim-vertical-padding);
|
129
|
+
margin-bottom: (-1 * $slim-vertical-padding);
|
130
|
+
}
|
131
|
+
|
132
|
+
&.Polaris-Button--sizeLarge {
|
133
|
+
margin: (-1 * $large-vertical-padding) (-1 * spacing(loose));
|
134
|
+
}
|
135
|
+
|
136
|
+
> .Polaris-Button__Content::after {
|
137
|
+
@include plain-button-backdrop;
|
138
|
+
content: '';
|
139
|
+
opacity: 0;
|
140
|
+
}
|
141
|
+
|
142
|
+
&.Polaris-Button--iconOnly {
|
143
|
+
@include recolor-icon(color(ink, lighter));
|
144
|
+
margin: -0.5 * ($min-height - icon-size());
|
145
|
+
|
146
|
+
&:focus,
|
147
|
+
&:active {
|
148
|
+
@include recolor-icon(color(ink, lighter));
|
149
|
+
background: plain-button-background();
|
150
|
+
}
|
151
|
+
|
152
|
+
&:hover,
|
153
|
+
&:active {
|
154
|
+
@include recolor-icon(color(ink));
|
155
|
+
}
|
156
|
+
|
157
|
+
> .Polaris-Button__Content::after {
|
158
|
+
display: none;
|
159
|
+
}
|
160
|
+
|
161
|
+
&.Polaris-Button--disabled {
|
162
|
+
@include recolor-icon(color(sky, dark));
|
163
|
+
}
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
// stylelint-enable selector-max-specificity
|
168
|
+
|
169
|
+
.Polaris-Button--iconOnly {
|
170
|
+
padding-left: spacing(tight);
|
171
|
+
padding-right: spacing(tight);
|
172
|
+
}
|
173
|
+
|
174
|
+
.Polaris-Button--sizeSlim {
|
175
|
+
min-height: $slim-min-height;
|
176
|
+
min-width: $slim-min-height;
|
177
|
+
padding: $slim-vertical-padding spacing();
|
178
|
+
|
179
|
+
.Polaris-Button__Content {
|
180
|
+
@include when-typography-condensed {
|
181
|
+
font-size: font-size(body, large-screen);
|
182
|
+
}
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
.Polaris-Button--sizeLarge {
|
187
|
+
min-height: $large-min-height;
|
188
|
+
min-width: $large-min-height;
|
189
|
+
padding: $large-vertical-padding spacing(loose);
|
190
|
+
}
|
191
|
+
|
192
|
+
.Polaris-Button--fullWidth {
|
193
|
+
display: block;
|
194
|
+
width: 100%;
|
195
|
+
}
|
196
|
+
|
197
|
+
.Polaris-Button__Content {
|
198
|
+
@include text-style-body;
|
199
|
+
position: relative;
|
200
|
+
display: flex;
|
201
|
+
justify-content: center;
|
202
|
+
align-items: center;
|
203
|
+
}
|
204
|
+
|
205
|
+
.Polaris-Button__Icon {
|
206
|
+
@include text-style-body;
|
207
|
+
transition: color duration() easing();
|
208
|
+
|
209
|
+
&:first-child {
|
210
|
+
// This compensates for the typical icon used in buttons being
|
211
|
+
// inset within its bounding box.
|
212
|
+
margin-left: -2px;
|
213
|
+
margin-right: spacing(extra-tight);
|
214
|
+
}
|
215
|
+
|
216
|
+
&:last-child {
|
217
|
+
margin-left: spacing(extra-tight);
|
218
|
+
|
219
|
+
// This compensates for the disclosure icon, which is substantially
|
220
|
+
// inset within the viewbox (and makes it look like there is too much
|
221
|
+
// spacing on the right of the button)
|
222
|
+
margin-right: -5px;
|
223
|
+
}
|
224
|
+
|
225
|
+
&:only-child {
|
226
|
+
margin: 0;
|
227
|
+
}
|
228
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
$stacking-order: (
|
2
|
+
item: 10,
|
3
|
+
focused: 20,
|
4
|
+
);
|
5
|
+
|
6
|
+
$plain-horizontal-spacing: spacing(tight);
|
7
|
+
$item-spacing: spacing(tight);
|
8
|
+
|
9
|
+
.Polaris-ButtonGroup {
|
10
|
+
display: flex;
|
11
|
+
flex-wrap: wrap;
|
12
|
+
align-items: center;
|
13
|
+
margin-top: (-1 * $item-spacing);
|
14
|
+
margin-left: (-1 * $item-spacing);
|
15
|
+
}
|
16
|
+
|
17
|
+
.Polaris-ButtonGroup--segmented {
|
18
|
+
display: flex;
|
19
|
+
|
20
|
+
// This is a violation of our component model, but it's the cleanest
|
21
|
+
// way to remove the border radii on connected elements.
|
22
|
+
// stylelint-disable declaration-no-important
|
23
|
+
|
24
|
+
.Polaris-ButtonGroup__Item {
|
25
|
+
position: relative;
|
26
|
+
z-index: z-index(item, $stacking-order);
|
27
|
+
|
28
|
+
&:not(:first-child) {
|
29
|
+
margin-left: -1px;
|
30
|
+
}
|
31
|
+
|
32
|
+
* {
|
33
|
+
border-radius: 0 !important;
|
34
|
+
}
|
35
|
+
|
36
|
+
&:first-child * {
|
37
|
+
border-top-left-radius: border-radius() !important;
|
38
|
+
border-bottom-left-radius: border-radius() !important;
|
39
|
+
}
|
40
|
+
|
41
|
+
&:last-child * {
|
42
|
+
border-top-right-radius: border-radius() !important;
|
43
|
+
border-bottom-right-radius: border-radius() !important;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
// stylelint-enable declaration-no-important
|
48
|
+
|
49
|
+
.Polaris-ButtonGroup__Item--focused {
|
50
|
+
z-index: z-index(focused, $stacking-order);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
.Polaris-ButtonGroup__Item {
|
55
|
+
margin-top: $item-spacing;
|
56
|
+
margin-left: $item-spacing;
|
57
|
+
}
|
58
|
+
|
59
|
+
.Polaris-ButtonGroup__Item--plain {
|
60
|
+
&:not(:first-child) {
|
61
|
+
margin-left: $item-spacing + $plain-horizontal-spacing;
|
62
|
+
}
|
63
|
+
|
64
|
+
&:not(:last-child) {
|
65
|
+
margin-right: $plain-horizontal-spacing;
|
66
|
+
}
|
67
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.Polaris-CalloutCard {
|
2
|
+
display: flex;
|
3
|
+
align-items: center;
|
4
|
+
}
|
5
|
+
|
6
|
+
.Polaris-CalloutCard__Image {
|
7
|
+
display: none;
|
8
|
+
flex: 0 0 auto;
|
9
|
+
width: rem(100px);
|
10
|
+
|
11
|
+
@include page-content-when-not-fully-condensed {
|
12
|
+
display: block;
|
13
|
+
margin-left: spacing(loose);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
.Polaris-CalloutCard__Content {
|
18
|
+
flex: 1 1 auto;
|
19
|
+
}
|
20
|
+
|
21
|
+
.Polaris-CalloutCard__Title {
|
22
|
+
margin-bottom: spacing(loose);
|
23
|
+
}
|
24
|
+
|
25
|
+
.Polaris-CalloutCard__Buttons {
|
26
|
+
margin-top: spacing(loose);
|
27
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
.Polaris-Card {
|
2
|
+
overflow: hidden;
|
3
|
+
background-color: color(white);
|
4
|
+
box-shadow: shadow();
|
5
|
+
|
6
|
+
+ .Polaris-Card {
|
7
|
+
margin-top: spacing(loose);
|
8
|
+
}
|
9
|
+
|
10
|
+
@include page-content-when-not-partially-condensed {
|
11
|
+
border-radius: border-radius();
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
.Polaris-Card--subdued {
|
16
|
+
background-color: color(sky, lighter);
|
17
|
+
}
|
18
|
+
|
19
|
+
.Polaris-Card__Header {
|
20
|
+
padding: spacing(loose) spacing(loose) 0;
|
21
|
+
}
|
22
|
+
|
23
|
+
.Polaris-Card__Section {
|
24
|
+
padding: spacing(loose);
|
25
|
+
|
26
|
+
+ .Polaris-Card__Section {
|
27
|
+
border-top: 1px solid color(sky);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
.Polaris-Card__Section--subdued {
|
32
|
+
background-color: color(sky, lighter);
|
33
|
+
}
|
34
|
+
|
35
|
+
.Polaris-Card__SectionHeader {
|
36
|
+
padding-bottom: spacing(tight);
|
37
|
+
}
|
38
|
+
|
39
|
+
.Polaris-Card__Footer {
|
40
|
+
display: flex;
|
41
|
+
justify-content: flex-end;
|
42
|
+
padding: 0 spacing(loose) spacing(loose);
|
43
|
+
}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
.Polaris-Checkbox {
|
2
|
+
position: relative;
|
3
|
+
}
|
4
|
+
|
5
|
+
.Polaris-Checkbox--error {
|
6
|
+
// The basic checked styles have more specificity than this, so need to
|
7
|
+
// basically duplicate that selector here, too.
|
8
|
+
// stylelint-disable-next-line selector-max-specificity
|
9
|
+
.Polaris-Checkbox__Input:checked + .Polaris-Checkbox__Backdrop,
|
10
|
+
.Polaris-Checkbox__Backdrop {
|
11
|
+
@include control-backdrop(error);
|
12
|
+
}
|
13
|
+
|
14
|
+
// We need to know if the input is focusing to change the border color.
|
15
|
+
// stylelint-disable-next-line selector-max-specificity
|
16
|
+
.Polaris-Checkbox__Input:focus + .Polaris-Checkbox__Backdrop,
|
17
|
+
.Polaris-Checkbox__Input:active + .Polaris-Checkbox__Backdrop {
|
18
|
+
@include control-backdrop(focused-error);
|
19
|
+
}
|
20
|
+
|
21
|
+
.Polaris-Checkbox__Icon {
|
22
|
+
@include recolor-icon(color(red, dark));
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
.Polaris-Checkbox__Input {
|
27
|
+
@include visually-hidden;
|
28
|
+
|
29
|
+
&:focus,
|
30
|
+
&:active,
|
31
|
+
&:checked {
|
32
|
+
+ .Polaris-Checkbox__Backdrop {
|
33
|
+
background: color(indigo);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
&:checked {
|
38
|
+
~ .Polaris-Checkbox__Icon {
|
39
|
+
transform: translate(-50%, -50%) scale(1);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
&:focus,
|
44
|
+
&:active {
|
45
|
+
+ .Polaris-Checkbox__Backdrop {
|
46
|
+
@include control-backdrop(focused);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
&:disabled {
|
51
|
+
+ .Polaris-Checkbox__Backdrop {
|
52
|
+
@include control-backdrop(disabled);
|
53
|
+
}
|
54
|
+
|
55
|
+
~ .Polaris-Checkbox__Icon {
|
56
|
+
@include recolor-icon(color(ink, lightest));
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
.Polaris-Checkbox__Backdrop {
|
62
|
+
@include control-backdrop;
|
63
|
+
position: absolute;
|
64
|
+
top: 0;
|
65
|
+
bottom: 0;
|
66
|
+
left: 0;
|
67
|
+
right: 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
.Polaris-Checkbox__Icon {
|
71
|
+
@include recolor-icon(color(indigo));
|
72
|
+
position: absolute;
|
73
|
+
top: 50%;
|
74
|
+
left: 50%;
|
75
|
+
transform: translate(-50%, -50%) scale(0);
|
76
|
+
transform-origin: 50% 50%;
|
77
|
+
transition: control-icon-transition();
|
78
|
+
}
|