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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/fonts/OFL.txt +92 -0
  4. data/app/assets/fonts/ShopifyInterVariable-latin-ext.woff2 +0 -0
  5. data/app/assets/fonts/ShopifyInterVariable-latin.woff2 +0 -0
  6. data/app/assets/icons/polaris/AlertCircleFilledIcon.svg +1 -0
  7. data/app/assets/icons/polaris/CheckCircleFilledIcon.svg +1 -0
  8. data/app/assets/icons/polaris/InfoFilledIcon.svg +1 -0
  9. data/app/assets/javascripts/polaris_view_components/button_controller.js +6 -7
  10. data/app/assets/javascripts/polaris_view_components/dropzone_controller.js +2 -0
  11. data/app/assets/javascripts/polaris_view_components/index.js +2 -0
  12. data/app/assets/javascripts/polaris_view_components/popover_controller.js +33 -6
  13. data/app/assets/javascripts/polaris_view_components/tabs_controller.js +14 -0
  14. data/app/assets/javascripts/polaris_view_components.js +103 -7
  15. data/app/assets/stylesheets/polaris_view_components/action_list.pcss +19 -4
  16. data/app/assets/stylesheets/polaris_view_components/badge.pcss +75 -0
  17. data/app/assets/stylesheets/polaris_view_components/banner.pcss +132 -87
  18. data/app/assets/stylesheets/polaris_view_components/button.pcss +395 -61
  19. data/app/assets/stylesheets/polaris_view_components/callout_card.pcss +63 -2
  20. data/app/assets/stylesheets/polaris_view_components/card.pcss +130 -30
  21. data/app/assets/stylesheets/polaris_view_components/choice.pcss +80 -0
  22. data/app/assets/stylesheets/polaris_view_components/custom.pcss +6 -67
  23. data/app/assets/stylesheets/polaris_view_components/data_table.pcss +58 -2
  24. data/app/assets/stylesheets/polaris_view_components/description_list.pcss +34 -0
  25. data/app/assets/stylesheets/polaris_view_components/drop_zone.pcss +100 -0
  26. data/app/assets/stylesheets/polaris_view_components/fonts.pcss +27 -0
  27. data/app/assets/stylesheets/polaris_view_components/footer_help.pcss +24 -0
  28. data/app/assets/stylesheets/polaris_view_components/index_table.pcss +17 -2
  29. data/app/assets/stylesheets/polaris_view_components/media.pcss +126 -0
  30. data/app/assets/stylesheets/polaris_view_components/modal.pcss +115 -3
  31. data/app/assets/stylesheets/polaris_view_components/navigation.pcss +49 -0
  32. data/app/assets/stylesheets/polaris_view_components/navigation_list_component.pcss +73 -10
  33. data/app/assets/stylesheets/polaris_view_components/page.pcss +120 -10
  34. data/app/assets/stylesheets/polaris_view_components/pagination.pcss +6 -2
  35. data/app/assets/stylesheets/polaris_view_components/popover.pcss +13 -0
  36. data/app/assets/stylesheets/polaris_view_components/resource_list.pcss +100 -0
  37. data/app/assets/stylesheets/polaris_view_components/save_bar.pcss +35 -25
  38. data/app/assets/stylesheets/polaris_view_components/shopify_navigation.pcss +21 -18
  39. data/app/assets/stylesheets/polaris_view_components/tabs.pcss +69 -0
  40. data/app/assets/stylesheets/polaris_view_components/tag.pcss +45 -0
  41. data/app/assets/stylesheets/polaris_view_components/text_fields.pcss +226 -0
  42. data/app/assets/stylesheets/polaris_view_components/theme.pcss +386 -0
  43. data/app/assets/stylesheets/polaris_view_components/tooltip_component.pcss +7 -5
  44. data/app/assets/stylesheets/polaris_view_components/variables.pcss +1 -1
  45. data/app/assets/stylesheets/polaris_view_components.css +1766 -275
  46. data/app/assets/stylesheets/polaris_view_components.pcss +8 -0
  47. data/app/components/polaris/avatar_component.rb +1 -1
  48. data/app/components/polaris/banner_component.html.erb +27 -90
  49. data/app/components/polaris/banner_component.rb +4 -5
  50. data/app/components/polaris/button_component.html.erb +1 -9
  51. data/app/components/polaris/callout_card_component.html.erb +11 -7
  52. data/app/components/polaris/callout_card_component.rb +4 -3
  53. data/app/components/polaris/card/header_component.rb +1 -1
  54. data/app/components/polaris/card/section_component.html.erb +1 -1
  55. data/app/components/polaris/card/section_component.rb +2 -1
  56. data/app/components/polaris/card_component.html.erb +39 -37
  57. data/app/components/polaris/card_component.rb +3 -3
  58. data/app/components/polaris/checkbox_component.html.erb +2 -1
  59. data/app/components/polaris/checkbox_component.rb +0 -4
  60. data/app/components/polaris/dropzone_component.html.erb +12 -36
  61. data/app/components/polaris/headless_button.html.erb +1 -9
  62. data/app/components/polaris/headless_button.rb +13 -0
  63. data/app/components/polaris/modal_component.html.erb +6 -0
  64. data/app/components/polaris/page_component.html.erb +4 -4
  65. data/app/components/polaris/progress_bar_component.rb +4 -4
  66. data/app/components/polaris/resource_item/shortcut_actions_component.html.erb +6 -8
  67. data/app/components/polaris/resource_item/shortcut_actions_component.rb +5 -1
  68. data/app/components/polaris/resource_item_component.html.erb +4 -4
  69. data/app/components/polaris/resource_item_component.rb +4 -1
  70. data/app/components/polaris/spinner_component.html.erb +4 -9
  71. data/app/components/polaris/tabs_component.rb +2 -0
  72. data/lib/polaris/view_components/version.rb +1 -1
  73. metadata +18 -3
@@ -1,117 +1,451 @@
1
1
  /* Polaris no longer uses different button styling depending on the context,
2
2
  so we can override all buttons at once. */
3
3
  html[class~="Polaris-Summer-Editions-2023"] .Polaris-Button {
4
+ --pc-button-bg: var(--p-color-bg-fill-secondary);
5
+ --pc-button-bg-hover: var(--p-color-bg-fill-secondary-hover);
6
+ --pc-button-bg-active: var(--p-color-bg-fill-secondary-active);
7
+ --pc-button-fg: var(--p-color-text);
8
+ --pc-button-fg-hover: var(--pc-button-fg);
9
+ --pc-button-icon: var(--p-color-icon);
10
+ --pc-button-shadow: none;
11
+ --pc-button-shadow-hover: var(--pc-button-shadow);
12
+ --pc-button-shadow-active: var(--pc-button-shadow);
13
+ /* Keep the disclosure icon inside the padding instead of pulling it to the edge. */
14
+ --pc-button-disclosure-icon-offset: 0;
4
15
 
16
+ min-height: 1.75rem;
17
+ min-width: 1.75rem;
18
+ padding: var(--p-space-150) var(--p-space-300);
19
+ border: none;
20
+ border-radius: var(--p-border-radius-full);
21
+ background: var(--pc-button-bg);
22
+ box-shadow: var(--pc-button-shadow);
23
+ color: var(--pc-button-fg);
24
+ transition-property: background-color, box-shadow, transform;
25
+ transition-duration: var(--p-motion-duration-400);
26
+ transition-timing-function: cubic-bezier(0.2, 0.8, 0, 1);
5
27
 
6
- &:not(.Polaris-Button--plain) {
7
- &:hover {
8
- box-shadow: var(--pc-button-shadow-hover);
9
- border: none;
28
+ &::before,
29
+ &::after {
30
+ border-radius: inherit;
31
+ }
32
+
33
+ svg {
34
+ fill: var(--pc-button-icon);
35
+ }
36
+
37
+ & > .Polaris-Button__Content {
38
+ font-size: var(--p-font-size-300);
39
+ font-weight: var(--p-font-weight-medium);
40
+ line-height: var(--p-font-line-height-400);
41
+ letter-spacing: -0.01em;
42
+ }
43
+
44
+ &:hover {
45
+ background: var(--pc-button-bg-hover);
46
+ box-shadow: var(--pc-button-shadow-hover);
47
+ color: var(--pc-button-fg-hover);
48
+ }
49
+
50
+ &:active,
51
+ &.Polaris-Button--pressed {
52
+ background: var(--pc-button-bg-active);
53
+ box-shadow: var(--pc-button-shadow-active);
54
+ color: var(--pc-button-fg-hover);
55
+ }
56
+
57
+ &:active:not(.Polaris-Button--disabled) {
58
+ transform: scale(0.97);
59
+
60
+ & > .Polaris-Button__Content {
61
+ transform: none;
10
62
  }
11
63
  }
12
64
 
13
- /* IconOnly */
14
- &.Polaris-Button--iconOnly {
15
- padding: var(--p-space-150) var(--p-space-100);
65
+ &:focus-visible {
66
+ outline: var(--p-border-width-050) solid var(--p-color-border-focus);
67
+ outline-offset: var(--p-space-025);
68
+ box-shadow: var(--pc-button-shadow);
16
69
  }
17
70
 
18
- /* Dimsiss buttons */
19
- &.Polaris-Button--plain.Polaris-Button--iconOnly {
20
- padding: var(--p-space-100);
71
+ /* The outline above replaces the legacy pseudo-element focus ring. */
72
+ &:focus::after {
73
+ box-shadow: none !important;
74
+ }
21
75
 
22
- &:hover {
23
- background: rgba(0, 0, 0, 0.05) !important;
24
- box-shadow: none !important;
76
+ /* Icons */
77
+ .Polaris-Button__Icon {
78
+ margin-top: calc(var(--p-space-050) * -1);
79
+ margin-bottom: calc(var(--p-space-050) * -1);
80
+ }
81
+
82
+ &:has(> .Polaris-Button__Content > .Polaris-Button__Icon:first-child + .Polaris-Button__Text) {
83
+ padding-block: var(--p-space-100);
84
+ padding-left: var(--p-space-150);
85
+
86
+ & > .Polaris-Button__Content > .Polaris-Button__Icon:first-child {
87
+ margin: 0;
25
88
  }
26
89
 
27
- svg {
28
- fill: var(--p-color-icon);
90
+ & > .Polaris-Button__Content > .Polaris-Button__Text {
91
+ margin-left: var(--p-space-050);
92
+ }
93
+
94
+ &.Polaris-Button--sizeSlim {
95
+ padding-left: var(--p-space-100);
96
+ }
97
+
98
+ &.Polaris-Button--sizeLarge {
99
+ padding-block: var(--p-space-150);
100
+ padding-left: var(--p-space-200);
101
+ }
102
+
103
+ &.Polaris-Button--plain {
104
+ margin: 0;
105
+ }
106
+ }
107
+
108
+ &:has(> .Polaris-Button__Content > .Polaris-Button__Text + .Polaris-Button__Icon:last-child) {
109
+ padding-right: var(--p-space-150);
110
+ }
111
+
112
+ /* Primary */
113
+ &.Polaris-Button--primary {
114
+ --pc-button-bg: var(--p-color-button-gradient-bg-fill), var(--p-color-bg-fill-brand);
115
+ --pc-button-bg-hover: var(--p-color-button-gradient-bg-fill), var(--p-color-bg-fill-brand-hover);
116
+ --pc-button-bg-active: var(--p-color-button-gradient-bg-fill), var(--p-color-bg-fill-brand-active);
117
+ --pc-button-fg: var(--p-color-text-brand-on-bg-fill, #fff);
118
+ --pc-button-fg-hover: #ddd;
119
+ --pc-button-icon: currentColor;
120
+ --pc-button-shadow: var(--p-shadow-button-primary);
121
+ /* Override the legacy primary rule that removes the resting shadow. */
122
+ box-shadow: var(--pc-button-shadow);
123
+
124
+ &::before {
125
+ display: none;
126
+ }
127
+
128
+ &:hover svg,
129
+ &:active svg {
130
+ fill: currentColor;
29
131
  }
30
132
  }
31
133
 
134
+ /* Destructive */
135
+ &.Polaris-Button--destructive {
136
+ --pc-button-bg: var(--p-color-bg-surface-critical);
137
+ --pc-button-bg-hover: var(--p-color-bg-surface-critical-hover);
138
+ --pc-button-bg-active: var(--p-color-bg-surface-critical-active);
139
+ --pc-button-fg: var(--p-color-text-critical-secondary);
140
+ --pc-button-icon: currentColor;
141
+ --pc-button-shadow: none;
142
+
143
+ &:hover svg,
144
+ &:active svg {
145
+ fill: currentColor;
146
+ }
147
+ }
148
+
149
+ &.Polaris-Button--primary.Polaris-Button--destructive {
150
+ --pc-button-bg: var(--p-color-button-gradient-bg-fill), var(--p-color-bg-fill-critical);
151
+ --pc-button-bg-hover: var(--p-color-button-gradient-bg-fill), var(--p-color-bg-fill-critical-hover);
152
+ --pc-button-bg-active: var(--p-color-button-gradient-bg-fill), var(--p-color-bg-fill-critical-active);
153
+ --pc-button-fg: #fff;
154
+ --pc-button-fg-hover: #ffe7e6;
155
+ --pc-button-shadow: var(--p-shadow-button-primary-critical);
156
+ }
157
+
158
+ /* Outline */
159
+ &.Polaris-Button--outline {
160
+ --pc-button-bg: transparent;
161
+ --pc-button-bg-hover: var(--p-color-bg-fill-transparent-hover);
162
+ --pc-button-bg-active: var(--p-color-bg-fill-transparent-active);
163
+ --pc-button-shadow: inset 0 0 0 var(--p-border-width-025) var(--p-color-border);
164
+ border: none;
165
+ }
166
+
32
167
  /* Plain */
33
168
  &.Polaris-Button--plain {
34
- box-shadow: none !important;
169
+ --pc-button-bg: transparent;
170
+ --pc-button-bg-hover: transparent;
171
+ --pc-button-bg-active: transparent;
172
+ --pc-button-fg: var(--p-color-text-link);
173
+ --pc-button-fg-hover: var(--p-color-text-link-hover);
174
+ --pc-button-icon: currentColor;
175
+ --pc-button-shadow: none;
176
+
177
+ &:active {
178
+ transform: none;
179
+ }
180
+
181
+ & > .Polaris-Button__Content {
182
+ font-size: var(--p-font-size-325);
183
+ font-weight: var(--p-font-weight-regular);
184
+ line-height: var(--p-font-line-height-500);
185
+ }
186
+
187
+ &:hover > .Polaris-Button__Content {
188
+ text-decoration: underline;
189
+ }
190
+
191
+ &.Polaris-Button--removeUnderline:hover > .Polaris-Button__Content {
192
+ text-decoration: none;
193
+ }
194
+
195
+ &:hover svg,
196
+ &:active svg {
197
+ fill: currentColor;
198
+ }
199
+ }
200
+
201
+ &.Polaris-Button--plain.Polaris-Button--monochrome {
202
+ --pc-button-fg: currentColor;
203
+ --pc-button-fg-hover: currentColor;
204
+ }
205
+
206
+ &.Polaris-Button--plain.Polaris-Button--destructive {
207
+ --pc-button-fg: var(--p-color-text-critical);
208
+ --pc-button-fg-hover: var(--p-color-text-critical-hover);
35
209
  }
36
210
 
37
211
  /* Tertiary */
38
212
  &.Polaris-Button--monochrome.Polaris-Button--plain.Polaris-Button--removeUnderline {
39
- &>.Polaris-Button__Content {
213
+ --pc-button-bg-hover: var(--p-color-bg-fill-transparent-hover);
214
+ --pc-button-bg-active: var(--p-color-bg-fill-transparent-active);
215
+ --pc-button-fg: var(--p-color-text);
216
+ --pc-button-fg-hover: var(--p-color-text);
217
+ --pc-button-icon: var(--p-color-icon);
218
+ margin: 0;
219
+ padding: var(--p-space-150) var(--p-space-300);
220
+
221
+ &:active {
222
+ transform: scale(0.97);
223
+ }
224
+
225
+ & > .Polaris-Button__Content {
40
226
  font-size: var(--p-font-size-300);
41
227
  font-weight: var(--p-font-weight-medium) !important;
228
+ line-height: var(--p-font-line-height-400);
42
229
  }
43
230
 
44
- &:hover {
45
- background: var(--p-color-bg-fill-tertiary);
231
+ &.Polaris-Button--destructive:not(.Polaris-Button--disabled) {
232
+ --pc-button-bg-hover: var(--p-color-bg-surface-critical);
233
+ --pc-button-bg-active: var(--p-color-bg-surface-critical-hover);
234
+ --pc-button-fg: var(--p-color-text-critical-secondary);
235
+ --pc-button-fg-hover: var(--p-color-text-critical-secondary);
236
+ --pc-button-icon: currentColor;
237
+ color: var(--pc-button-fg);
238
+
239
+ &:hover,
240
+ &:active { color: var(--pc-button-fg-hover); }
241
+
242
+ svg { fill: currentColor; }
46
243
  }
47
244
  }
48
245
 
49
- /* Loading */
50
- &.Polaris-Button--loading {
51
- svg {
52
- fill: var(--p-color-icon-disabled);
53
- }
246
+ /* Icon only */
247
+ &.Polaris-Button--iconOnly {
248
+ padding: var(--p-space-100);
54
249
  }
55
250
 
56
- /* Destructive */
57
- &.Polaris-Button--destructive:is(.Polaris-Button--primary) {
58
- --pc-button-color: var(--p-color-bg-fill-critical);
59
- --pc-button-text: var(--p-color-bg-surface);
60
- --pc-button-color-hover: var(--p-color-bg-fill-critical-hover);
61
- --pc-button-color-active: var(--p-color-bg-fill-critical-active);
62
- --pc-button-color-depressed: var(--p-color-bg-fill-critical-selected);
63
- box-shadow: var(--p-shadow-button-primary-critical);
251
+ &.Polaris-Button--plain.Polaris-Button--iconOnly {
252
+ --pc-button-bg-hover: var(--p-color-bg-fill-transparent-hover);
253
+ --pc-button-bg-active: var(--p-color-bg-fill-transparent-active);
254
+ --pc-button-icon: var(--p-color-icon-secondary);
255
+ min-width: 1.75rem;
256
+ min-height: 1.75rem;
257
+ margin: 0;
258
+ padding: var(--p-space-100);
259
+
260
+ &:hover svg,
261
+ &:active svg {
262
+ fill: var(--p-color-icon);
263
+ }
64
264
 
65
265
  &:active {
66
- background: var(--pc-button-color-active);
266
+ transform: scale(0.97);
67
267
  }
68
268
  }
69
269
 
70
- &.Polaris-Button--destructive:not(.Polaris-Button--primary) {
71
- --pc-button-text: var(--p-color-text-critical);
72
- --pc-button-icon-fill: currentColor;
270
+ /* Pressed */
271
+ &.Polaris-Button--pressed:not(.Polaris-Button--plain, .Polaris-Button--disabled) {
272
+ --pc-button-bg: var(--p-color-bg-fill-inverse);
273
+ --pc-button-bg-hover: var(--p-color-bg-fill-inverse-hover);
274
+ --pc-button-bg-active: var(--p-color-bg-fill-inverse);
275
+ --pc-button-fg: #fff;
276
+ --pc-button-fg-hover: #fff;
277
+ --pc-button-icon: currentColor;
278
+ --pc-button-shadow: none;
279
+
280
+ /* Keep legacy pressed-state rules from restoring a pale fill and inset shadow. */
281
+ background: var(--pc-button-bg);
282
+ box-shadow: var(--pc-button-shadow);
283
+ color: var(--pc-button-fg);
284
+
285
+ &:hover {
286
+ background: var(--pc-button-bg-hover);
287
+ box-shadow: var(--pc-button-shadow-hover);
288
+ color: var(--pc-button-fg-hover);
289
+ }
73
290
 
74
291
  &:active {
75
- --pc-button-text: var(--p-color-text-critical-active);
292
+ background: var(--pc-button-bg-active);
293
+ box-shadow: var(--pc-button-shadow-active);
76
294
  }
295
+ }
77
296
 
78
- &:hover {
79
- --pc-button-text: var(--p-color-text-critical-hover);
297
+ /* Sizes */
298
+ &.Polaris-Button--sizeSlim {
299
+ min-height: 1.5rem;
300
+ padding: var(--p-space-100) var(--p-space-200);
301
+ }
302
+
303
+ &.Polaris-Button--sizeSlim.Polaris-Button--iconOnly {
304
+ min-width: 1.5rem;
305
+ padding: var(--p-space-050);
306
+ }
307
+
308
+ &.Polaris-Button--sizeLarge {
309
+ min-height: 2rem;
310
+ min-width: 2rem;
311
+ padding: var(--p-space-150) var(--p-space-300);
312
+
313
+ & > .Polaris-Button__Content {
314
+ font-size: var(--p-font-size-325);
315
+ line-height: var(--p-font-line-height-500);
80
316
  }
81
317
  }
82
318
 
83
- /* Primary */
84
- &.Polaris-Button--primary {
85
- --pc-button-bg-gradient: var(--p-color-button-gradient-bg-fill);
86
- --pc-button-color: var(--pc-button-bg-gradient), var(--p-color-bg-fill-brand);
87
- --pc-button-text: var(--p-color-bg-surface);
88
- --pc-button-color-hover: var(--pc-button-bg-gradient), var(--p-color-bg-fill-brand-hover);
89
- --pc-button-color-active: var(--pc-button-bg-gradient), var(--p-color-bg-fill-brand-active);
90
- --pc-button-color-depressed: var(--pc-button-bg-gradient), var(--p-color-bg-fill-brand-selected);
319
+ &.Polaris-Button--sizeLarge.Polaris-Button--iconOnly {
320
+ padding: var(--p-space-150);
321
+ }
91
322
 
92
- &:hover {
93
- --pc-button-text: var(--p-color-bg-surface);
323
+ /* Disabled */
324
+ &.Polaris-Button--disabled,
325
+ &.Polaris-Button--disabled:hover,
326
+ &.Polaris-Button--disabled:active {
327
+ --pc-button-bg: var(--p-color-bg-fill-disabled);
328
+ --pc-button-fg: var(--p-color-text-disabled);
329
+ --pc-button-icon: var(--p-color-icon-disabled);
330
+ --pc-button-shadow: none;
331
+ background: var(--p-color-bg-fill-disabled);
332
+ box-shadow: none;
333
+ color: var(--p-color-text-disabled);
334
+ transform: none;
335
+ }
336
+
337
+ &.Polaris-Button--primary.Polaris-Button--disabled {
338
+ background: var(--p-color-bg-fill-brand-disabled);
339
+ color: var(--p-color-text-brand-on-bg-fill, #fff);
340
+
341
+ svg {
342
+ fill: currentColor;
94
343
  }
95
- &:active {
96
- box-shadow: var(--pc-button-box-shadow_active);
344
+ }
345
+
346
+ &.Polaris-Button--plain.Polaris-Button--disabled {
347
+ background: transparent;
348
+ }
349
+
350
+ /* Loading */
351
+ &.Polaris-Button--loading.Polaris-Button--disabled {
352
+ color: transparent;
353
+ opacity: 1;
354
+
355
+ & > .Polaris-Button__Content {
356
+ opacity: 0;
357
+
358
+ .Polaris-Button__Text {
359
+ visibility: visible;
360
+ }
97
361
  }
362
+
363
+ & > .Polaris-Button__Spinner {
364
+ display: flex;
365
+ position: absolute;
366
+ top: 50%;
367
+ left: 50%;
368
+ margin: 0;
369
+ width: 1.25rem;
370
+ height: 1.25rem;
371
+ transform: translate(-50%, -50%);
372
+
373
+ svg {
374
+ width: 100%;
375
+ height: 100%;
376
+ fill: none;
377
+ animation: polaris-button-loading-spin 500ms linear infinite;
378
+ }
379
+
380
+ .Polaris-Button__SpinnerTrack {
381
+ stroke: rgba(0, 0, 0, 0.18);
382
+ }
383
+
384
+ .Polaris-Button__SpinnerIndicator {
385
+ stroke: var(--p-color-bg-fill-inverse);
386
+ stroke-linecap: round;
387
+ stroke-dasharray: 4, 6;
388
+ }
389
+
390
+ @media (prefers-reduced-motion: reduce) {
391
+ svg {
392
+ animation: none;
393
+ }
394
+ }
395
+ }
396
+ }
397
+ }
398
+
399
+ @keyframes polaris-button-loading-spin {
400
+ to {
401
+ transform: rotate(1turn);
98
402
  }
99
403
  }
100
404
 
101
- @media (max-width: 767px) {
405
+ /* Narrow desktop panels keep compact controls; touch devices get larger targets. */
406
+ @media (max-width: 767px) and (pointer: coarse) {
407
+ html[class~="Polaris-Summer-Editions-2023"] .Polaris-Button:not(.Polaris-Button--plain) {
408
+ min-height: 2.25rem;
409
+ padding-top: var(--p-space-200);
410
+ padding-bottom: var(--p-space-200);
102
411
 
103
- html[class~="Polaris-Summer-Editions-2023"] .Polaris-Button:not(.Polaris-Button--monochrome.Polaris-Button--plain),
104
- html[class~="Polaris-Summer-Editions-2023"] .Polaris-Button.Polaris-Button--monochrome.Polaris-Button--plain.Polaris-Button--removeUnderline {
105
- &>.Polaris-Button__Content {
106
- font-size: var(--p-font-size-350) !important;
412
+ & > .Polaris-Button__Content {
413
+ font-size: var(--p-font-size-325) !important;
107
414
  line-height: var(--p-font-line-height-500) !important;
108
415
  }
109
416
  }
110
417
 
111
- html[class~="Polaris-Summer-Editions-2023"] .Polaris-Button:not(.Polaris-Button--monochrome.Polaris-Button--plain):not(.Polaris-Button--disclosure.Polaris-Button--plain),
112
- html[class~="Polaris-Summer-Editions-2023"] .Polaris-Button.Polaris-Button--monochrome.Polaris-Button--plain.Polaris-Button--removeUnderline {
113
- &>.Polaris-Button__Content {
114
- font-weight: var(--p-font-weight-semibold) !important;
115
- }
418
+ html[class~="Polaris-Summer-Editions-2023"] .Polaris-Button--iconOnly:not(.Polaris-Button--plain) {
419
+ min-width: 2.25rem;
420
+ }
421
+ }
422
+
423
+ /* Segmented button group */
424
+ html[class~="Polaris-Summer-Editions-2023"] [data-buttongroup-segmented='true'] {
425
+ & > :first-child .Polaris-Button,
426
+ & > :first-child .Polaris-Button::before,
427
+ & > :first-child .Polaris-Button::after {
428
+ border-top-left-radius: var(--p-border-radius-full);
429
+ border-bottom-left-radius: var(--p-border-radius-full);
430
+ }
431
+
432
+ & > :last-child .Polaris-Button,
433
+ & > :last-child .Polaris-Button::before,
434
+ & > :last-child .Polaris-Button::after {
435
+ border-top-right-radius: var(--p-border-radius-full);
436
+ border-bottom-right-radius: var(--p-border-radius-full);
437
+ }
438
+
439
+ & > :last-child:first-child .Polaris-Button,
440
+ & > :last-child:first-child .Polaris-Button::after {
441
+ border-radius: var(--p-border-radius-full);
442
+ }
443
+
444
+ & > :not(:first-child) .Polaris-Button:not(.Polaris-Button--primary, .Polaris-Button--pressed, .Polaris-Button--plain) {
445
+ --pc-button-shadow: inset var(--p-border-width-025) 0 0 0 rgba(0, 0, 0, 0.11);
446
+ }
447
+
448
+ .Polaris-Button:active {
449
+ transform: none;
116
450
  }
117
451
  }
@@ -1,9 +1,70 @@
1
1
  html[class~="Polaris-Summer-Editions-2023"] .Polaris-CalloutCard__Container {
2
+ container-type: inline-size;
3
+ padding: 0;
4
+
5
+ & > .Polaris-LegacyCard__Section {
6
+ display: grid;
7
+ grid-template-columns: minmax(0, 1fr);
8
+ align-items: start;
9
+ gap: var(--p-space-100);
10
+ }
11
+
12
+ &.Polaris-CalloutCard--hasDismiss > .Polaris-LegacyCard__Section {
13
+ grid-template-columns: minmax(0, 1fr) auto;
14
+ }
15
+
16
+ .Polaris-CalloutCard {
17
+ display: grid;
18
+ grid-template-columns: minmax(0, 1fr);
19
+ align-items: center;
20
+ gap: var(--p-space-400);
21
+ min-width: 0;
22
+
23
+ &:has(.Polaris-CalloutCard__Illustration) { grid-template-columns: auto auto; }
24
+ }
25
+
26
+ .Polaris-CalloutCard__Content {
27
+ display: grid;
28
+ gap: var(--p-space-200);
29
+ min-width: 0;
30
+ }
31
+
32
+ .Polaris-CalloutCard__Title,
33
+ .Polaris-CalloutCard__Buttons { margin: 0; }
34
+
35
+ .Polaris-CalloutCard__Buttons .Polaris-ButtonGroup {
36
+ margin: 0;
37
+ gap: var(--p-space-200);
38
+
39
+ & > .Polaris-ButtonGroup__Item { margin: 0; }
40
+ }
41
+
42
+ .Polaris-CalloutCard__Illustration {
43
+ display: flex;
44
+ justify-content: center;
45
+ min-width: 0;
46
+ }
47
+
48
+ .Polaris-CalloutCard__Image {
49
+ display: block;
50
+ width: 12.5rem;
51
+ max-width: 100%;
52
+ height: 6.25rem;
53
+ object-fit: contain;
54
+ margin: 0;
55
+ border-radius: var(--p-border-radius-200);
56
+ }
57
+
2
58
  .Polaris-CalloutCard__Dismiss {
59
+ position: static;
3
60
  display: flex;
4
61
  width: 1.75rem;
5
62
  height: 1.75rem;
6
- right: var(--p-space-300);
7
- top: var(--p-space-300);
63
+ }
64
+ }
65
+
66
+ @container (max-width: 480px) {
67
+ html[class~="Polaris-Summer-Editions-2023"] .Polaris-CalloutCard__Container .Polaris-CalloutCard:has(.Polaris-CalloutCard__Illustration) {
68
+ grid-template-columns: minmax(0, 1fr);
8
69
  }
9
70
  }