polaris_view_components 3.2.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/fonts/OFL.txt +92 -0
- data/app/assets/fonts/ShopifyInterVariable-latin-ext.woff2 +0 -0
- data/app/assets/fonts/ShopifyInterVariable-latin.woff2 +0 -0
- data/app/assets/icons/polaris/AlertCircleFilledIcon.svg +1 -0
- data/app/assets/icons/polaris/CheckCircleFilledIcon.svg +1 -0
- data/app/assets/icons/polaris/InfoFilledIcon.svg +1 -0
- data/app/assets/javascripts/polaris_view_components/button_controller.js +6 -7
- data/app/assets/javascripts/polaris_view_components/dropzone_controller.js +2 -0
- data/app/assets/javascripts/polaris_view_components/index.js +2 -0
- data/app/assets/javascripts/polaris_view_components/popover_controller.js +33 -6
- data/app/assets/javascripts/polaris_view_components/tabs_controller.js +14 -0
- data/app/assets/javascripts/polaris_view_components.js +103 -7
- data/app/assets/stylesheets/polaris_view_components/action_list.pcss +19 -4
- data/app/assets/stylesheets/polaris_view_components/badge.pcss +75 -0
- data/app/assets/stylesheets/polaris_view_components/banner.pcss +132 -87
- data/app/assets/stylesheets/polaris_view_components/button.pcss +395 -61
- data/app/assets/stylesheets/polaris_view_components/callout_card.pcss +63 -2
- data/app/assets/stylesheets/polaris_view_components/card.pcss +130 -30
- data/app/assets/stylesheets/polaris_view_components/choice.pcss +80 -0
- data/app/assets/stylesheets/polaris_view_components/custom.pcss +6 -67
- data/app/assets/stylesheets/polaris_view_components/data_table.pcss +58 -2
- data/app/assets/stylesheets/polaris_view_components/description_list.pcss +34 -0
- data/app/assets/stylesheets/polaris_view_components/drop_zone.pcss +100 -0
- data/app/assets/stylesheets/polaris_view_components/fonts.pcss +27 -0
- data/app/assets/stylesheets/polaris_view_components/footer_help.pcss +24 -0
- data/app/assets/stylesheets/polaris_view_components/index_table.pcss +17 -2
- data/app/assets/stylesheets/polaris_view_components/media.pcss +126 -0
- data/app/assets/stylesheets/polaris_view_components/modal.pcss +115 -3
- data/app/assets/stylesheets/polaris_view_components/navigation.pcss +49 -0
- data/app/assets/stylesheets/polaris_view_components/navigation_list_component.pcss +73 -10
- data/app/assets/stylesheets/polaris_view_components/page.pcss +120 -10
- data/app/assets/stylesheets/polaris_view_components/pagination.pcss +6 -2
- data/app/assets/stylesheets/polaris_view_components/popover.pcss +13 -0
- data/app/assets/stylesheets/polaris_view_components/resource_list.pcss +100 -0
- data/app/assets/stylesheets/polaris_view_components/save_bar.pcss +35 -25
- data/app/assets/stylesheets/polaris_view_components/shopify_navigation.pcss +21 -18
- data/app/assets/stylesheets/polaris_view_components/tabs.pcss +69 -0
- data/app/assets/stylesheets/polaris_view_components/tag.pcss +45 -0
- data/app/assets/stylesheets/polaris_view_components/text_fields.pcss +226 -0
- data/app/assets/stylesheets/polaris_view_components/theme.pcss +386 -0
- data/app/assets/stylesheets/polaris_view_components/tooltip_component.pcss +7 -5
- data/app/assets/stylesheets/polaris_view_components/variables.pcss +1 -1
- data/app/assets/stylesheets/polaris_view_components.css +1766 -275
- data/app/assets/stylesheets/polaris_view_components.pcss +8 -0
- data/app/components/polaris/avatar_component.rb +1 -1
- data/app/components/polaris/banner_component.html.erb +27 -90
- data/app/components/polaris/banner_component.rb +4 -5
- data/app/components/polaris/button_component.html.erb +1 -9
- data/app/components/polaris/callout_card_component.html.erb +11 -7
- data/app/components/polaris/callout_card_component.rb +4 -3
- data/app/components/polaris/card/header_component.rb +1 -1
- data/app/components/polaris/card/section_component.html.erb +1 -1
- data/app/components/polaris/card/section_component.rb +2 -1
- data/app/components/polaris/card_component.html.erb +39 -37
- data/app/components/polaris/card_component.rb +3 -3
- data/app/components/polaris/checkbox_component.html.erb +2 -1
- data/app/components/polaris/checkbox_component.rb +0 -4
- data/app/components/polaris/dropzone_component.html.erb +12 -36
- data/app/components/polaris/headless_button.html.erb +1 -9
- data/app/components/polaris/headless_button.rb +13 -0
- data/app/components/polaris/modal_component.html.erb +6 -0
- data/app/components/polaris/page_component.html.erb +4 -4
- data/app/components/polaris/progress_bar_component.rb +4 -4
- data/app/components/polaris/resource_item/shortcut_actions_component.html.erb +6 -8
- data/app/components/polaris/resource_item/shortcut_actions_component.rb +5 -1
- data/app/components/polaris/resource_item_component.html.erb +4 -4
- data/app/components/polaris/resource_item_component.rb +4 -1
- data/app/components/polaris/spinner_component.html.erb +4 -9
- data/app/components/polaris/tabs_component.rb +2 -0
- data/lib/polaris/view_components/version.rb +1 -1
- metadata +18 -3
|
@@ -1,108 +1,153 @@
|
|
|
1
1
|
html[class~="Polaris-Summer-Editions-2023"] .Polaris-Banner {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
--pc-banner-bg: var(--p-color-bg-surface-info);
|
|
3
|
+
--pc-banner-title: var(--p-color-text-info);
|
|
4
|
+
--pc-banner-text: #01596f;
|
|
5
|
+
--pc-banner-icon: var(--p-color-icon-info);
|
|
6
|
+
--pc-banner-action: var(--p-color-bg-surface-info-hover);
|
|
7
|
+
--pc-banner-action-hover: var(--p-color-bg-surface-info-active);
|
|
8
|
+
|
|
9
|
+
position: relative;
|
|
10
|
+
padding: 0;
|
|
11
|
+
border: none;
|
|
12
|
+
border-radius: var(--p-border-radius-container);
|
|
13
|
+
background: var(--pc-banner-bg);
|
|
14
|
+
box-shadow: none;
|
|
15
|
+
color: var(--pc-banner-text);
|
|
16
|
+
|
|
17
|
+
&::before { content: none; }
|
|
18
|
+
|
|
19
|
+
&.Polaris-Banner--statusSuccess {
|
|
20
|
+
--pc-banner-bg: var(--p-color-bg-surface-success);
|
|
21
|
+
--pc-banner-title: var(--p-color-text-success);
|
|
22
|
+
--pc-banner-text: #214b03;
|
|
23
|
+
--pc-banner-icon: var(--p-color-icon-success);
|
|
24
|
+
--pc-banner-action: var(--p-color-bg-surface-success-hover);
|
|
25
|
+
--pc-banner-action-hover: var(--p-color-bg-surface-success-active);
|
|
7
26
|
}
|
|
8
27
|
|
|
9
|
-
.
|
|
28
|
+
/* Web Components 2.0 maps warning banners to the amber caution palette. */
|
|
29
|
+
&.Polaris-Banner--statusWarning {
|
|
30
|
+
--pc-banner-bg: var(--p-color-bg-surface-caution);
|
|
31
|
+
--pc-banner-title: var(--p-color-text-caution);
|
|
32
|
+
--pc-banner-text: #574100;
|
|
33
|
+
--pc-banner-icon: var(--p-color-icon-caution);
|
|
34
|
+
--pc-banner-action: var(--p-color-bg-surface-caution-hover);
|
|
35
|
+
--pc-banner-action-hover: var(--p-color-bg-surface-caution-active);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.Polaris-Banner--statusCritical {
|
|
39
|
+
--pc-banner-bg: var(--p-color-bg-surface-critical);
|
|
40
|
+
--pc-banner-title: var(--p-color-text-critical-active);
|
|
41
|
+
--pc-banner-text: #7e100c;
|
|
42
|
+
--pc-banner-icon: var(--p-color-icon-critical);
|
|
43
|
+
--pc-banner-action: var(--p-color-bg-surface-critical-hover);
|
|
44
|
+
--pc-banner-action-hover: var(--p-color-bg-surface-critical-active);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.Polaris-Banner__Body {
|
|
10
48
|
display: flex;
|
|
11
|
-
|
|
12
|
-
|
|
49
|
+
flex-wrap: wrap;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: var(--p-space-300) var(--p-space-400);
|
|
52
|
+
padding: var(--p-space-400);
|
|
13
53
|
}
|
|
14
54
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
55
|
+
.Polaris-Banner__ContentWrapper {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
align-items: stretch;
|
|
59
|
+
column-gap: var(--p-space-150);
|
|
60
|
+
flex: 1 1 20rem;
|
|
61
|
+
min-width: 0;
|
|
62
|
+
overflow-wrap: anywhere;
|
|
63
|
+
}
|
|
18
64
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
&.Polaris-Banner--statusInfo {
|
|
25
|
-
.Polaris-Banner__TopBar, .Polaris-Banner__InlineIcon {
|
|
26
|
-
color: var(--p-color-text-info-on-bg-fill);
|
|
27
|
-
background-color: var(--p-color-bg-fill-info);
|
|
28
|
-
|
|
29
|
-
svg {
|
|
30
|
-
fill: var(--p-color-text-info-on-bg-fill) !important;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
&.Polaris-Banner--statusSuccess {
|
|
35
|
-
.Polaris-Banner__TopBar, .Polaris-Banner__InlineIcon {
|
|
36
|
-
color: var(--p-color-text-success-on-bg-fill);
|
|
37
|
-
background-color: var(--p-color-bg-fill-success);
|
|
38
|
-
|
|
39
|
-
svg {
|
|
40
|
-
fill: var(--p-color-text-success-on-bg-fill) !important;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
&.Polaris-Banner--statusWarning {
|
|
45
|
-
.Polaris-Banner__TopBar, .Polaris-Banner__InlineIcon {
|
|
46
|
-
color: var(--p-color-text-warning-on-bg-fill);
|
|
47
|
-
background-color: var(--p-color-bg-fill-warning);
|
|
48
|
-
|
|
49
|
-
svg {
|
|
50
|
-
fill: var(--p-color-text-warning-on-bg-fill) !important;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
&.Polaris-Banner--statusCritical {
|
|
55
|
-
.Polaris-Banner__TopBar, .Polaris-Banner__InlineIcon {
|
|
56
|
-
color: var(--p-color-text-critical-on-bg-fill);
|
|
57
|
-
background-color: var(--p-color-bg-fill-critical);
|
|
58
|
-
|
|
59
|
-
svg {
|
|
60
|
-
fill: var(--p-color-text-critical-on-bg-fill) !important;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
65
|
+
.Polaris-Banner__ContentWrapper:not(:has(h2)) {
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
align-items: flex-start;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
.Polaris-Banner__Message { min-width: 0; }
|
|
71
|
+
|
|
72
|
+
.Polaris-Banner__Heading {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: baseline;
|
|
75
|
+
gap: var(--p-space-150);
|
|
76
|
+
max-width: 100%;
|
|
77
|
+
margin: 0;
|
|
78
|
+
vertical-align: baseline;
|
|
79
|
+
color: var(--pc-banner-title);
|
|
72
80
|
}
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
82
|
+
.Polaris-Banner__InlineIcon {
|
|
83
|
+
flex: 0 0 1.25rem;
|
|
84
|
+
align-self: flex-start;
|
|
85
|
+
padding: 0;
|
|
86
|
+
background: none;
|
|
80
87
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
margin-top: calc(var(--p-space-100) * -1);
|
|
84
|
-
margin-right: calc(var(--p-space-100) * -1);
|
|
85
|
-
margin-bottom: calc(var(--p-space-100) * -1);
|
|
86
|
-
}
|
|
88
|
+
svg { fill: var(--pc-banner-icon); }
|
|
89
|
+
}
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
+
.Polaris-Banner__Message,
|
|
92
|
+
.Polaris-Banner__Message > p:only-child { display: block; }
|
|
91
93
|
|
|
92
|
-
|
|
93
|
-
background-color: var(--p-color-bg-surface-info);
|
|
94
|
-
}
|
|
94
|
+
.Polaris-Banner__Message > p + p { margin-top: var(--p-space-200); }
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
background-color: var(--p-color-bg-surface-success);
|
|
98
|
-
}
|
|
96
|
+
a:not(.Polaris-Button), .Polaris-Link { color: inherit; }
|
|
99
97
|
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
.Polaris-Banner__Actions {
|
|
99
|
+
flex: 0 0 100%;
|
|
100
|
+
max-width: 100%;
|
|
101
|
+
|
|
102
|
+
.Polaris-ButtonGroup {
|
|
103
|
+
margin: 0;
|
|
104
|
+
gap: var(--p-space-250, 0.625rem);
|
|
102
105
|
}
|
|
103
106
|
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
.Polaris-ButtonGroup__Item { margin: 0; }
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.Polaris-Button:not(.Polaris-Button--plain, .Polaris-Button--primary, .Polaris-Button--disabled) {
|
|
111
|
+
--pc-button-bg: var(--pc-banner-action);
|
|
112
|
+
--pc-button-bg-hover: var(--pc-banner-action-hover);
|
|
113
|
+
--pc-button-bg-active: var(--pc-banner-action-hover);
|
|
114
|
+
--pc-button-fg: var(--pc-banner-title);
|
|
115
|
+
--pc-button-icon: currentColor;
|
|
116
|
+
--pc-button-shadow: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.Polaris-Button--plain:not(.Polaris-Button--disabled) {
|
|
120
|
+
--pc-button-fg: var(--pc-banner-title);
|
|
121
|
+
--pc-button-fg-hover: var(--pc-banner-title);
|
|
122
|
+
--pc-button-icon: currentColor;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.Polaris-Banner__DismissButton {
|
|
126
|
+
position: absolute;
|
|
127
|
+
top: -0.375rem;
|
|
128
|
+
right: -0.3125rem;
|
|
129
|
+
border: 2px solid var(--p-color-bg-surface);
|
|
130
|
+
border-radius: var(--p-border-radius-full);
|
|
131
|
+
background: var(--pc-banner-bg);
|
|
132
|
+
opacity: 0;
|
|
133
|
+
|
|
134
|
+
.Polaris-Button--iconOnly {
|
|
135
|
+
min-width: 1.5rem;
|
|
136
|
+
min-height: 1.5rem;
|
|
137
|
+
padding: var(--p-space-050);
|
|
138
|
+
|
|
139
|
+
svg { fill: var(--pc-banner-title); }
|
|
106
140
|
}
|
|
107
141
|
}
|
|
142
|
+
|
|
143
|
+
&:is(:hover, :focus-within) .Polaris-Banner__DismissButton { opacity: 1; }
|
|
144
|
+
|
|
145
|
+
/* Edge-to-edge pages must not gain horizontal scroll from the dismiss control. */
|
|
146
|
+
@media (max-width: 30.6225em) {
|
|
147
|
+
.Polaris-Banner__DismissButton { right: 0; }
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@media (pointer: coarse) {
|
|
151
|
+
.Polaris-Banner__DismissButton { opacity: 1; }
|
|
152
|
+
}
|
|
108
153
|
}
|