@primer/css 20.4.4-rc.cd7b8942 → 20.4.5-rc.487bdfa6

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.
@@ -15,17 +15,67 @@ $primer-borderRadius-large: 0.75rem;
15
15
 
16
16
  .Overlay {
17
17
  display: flex;
18
+ width: min(var(--overlay-width), 100vw - 2rem);
18
19
  min-width: 192px;
20
+ max-height: min(calc(100vh - 2rem), var(--overlay-height));
19
21
  flex-direction: column;
20
22
  background-color: var(--color-canvas-overlay);
21
23
  border-radius: $primer-borderRadius-large;
22
24
  box-shadow: var(--color-overlay-shadow);
23
25
  opacity: 1;
24
26
 
27
+ &.Overlay--size-auto {
28
+ min-width: 192px;
29
+ max-width: calc(100vw - 2rem);
30
+ max-height: calc(100vh - 2rem);
31
+ }
32
+
33
+ &.Overlay--size-full {
34
+ width: 100vw;
35
+ height: 100vh;
36
+ }
37
+
38
+ &.Overlay--size-xsmall {
39
+ --overlay-width: 192px;
40
+
41
+ max-height: calc(100vh - 2rem);
42
+ }
43
+
44
+ &.Overlay--size-small {
45
+ --overlay-height: 256px;
46
+ --overlay-width: 320px;
47
+ }
48
+
49
+ &.Overlay--size-small-portrait {
50
+ --overlay-height: 432px;
51
+ --overlay-width: 320px;
52
+ }
53
+
54
+ &.Overlay--size-medium {
55
+ --overlay-height: 320px;
56
+ --overlay-width: 480px;
57
+ }
58
+
59
+ &.Overlay--size-medium-portrait {
60
+ --overlay-height: 600px;
61
+ --overlay-width: 480px;
62
+ }
63
+
64
+ &.Overlay--size-large {
65
+ --overlay-height: 432px;
66
+ --overlay-width: 640px;
67
+ }
68
+
69
+ &.Overlay--size-xlarge {
70
+ --overlay-height: 600px;
71
+ --overlay-width: 960px;
72
+ }
73
+
25
74
  &.Overlay--height-auto {
26
75
  height: auto;
27
76
  }
28
77
 
78
+ // start deprecate in favor of Alpha::Dialog
29
79
  &.Overlay--height-xsmall {
30
80
  height: min(192px, 100vh - 2rem);
31
81
  }
@@ -73,6 +123,8 @@ $primer-borderRadius-large: 0.75rem;
73
123
  width: min(960px, 100vw - 2rem);
74
124
  }
75
125
 
126
+ // end deprecate
127
+
76
128
  &.Overlay--motion-scaleFade {
77
129
  @media screen and (prefers-reduced-motion: no-preference) {
78
130
  animation: 200ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-scaleFade;
@@ -172,6 +224,7 @@ $primer-borderRadius-large: 0.75rem;
172
224
  padding-top: 0;
173
225
  overflow-y: auto;
174
226
  scrollbar-width: thin;
227
+ scrollbar-gutter: stable;
175
228
  font-size: $body-font-size;
176
229
  flex-grow: 1;
177
230
 
@@ -293,9 +346,15 @@ $primer-borderRadius-large: 0.75rem;
293
346
  justify-content: left;
294
347
 
295
348
  .Overlay#{$responsiveVariant} {
349
+ height: 100vh;
350
+ max-height: unset;
296
351
  border-radius: $primer-borderRadius-large;
297
352
  border-top-left-radius: 0;
298
353
  border-bottom-left-radius: 0;
354
+
355
+ @media screen and (prefers-reduced-motion: no-preference) {
356
+ animation: 160ms cubic-bezier(0.32, 0, 0.67, 0) 0s 1 normal none running Overlay--motion-slideInRight;
357
+ }
299
358
  }
300
359
  }
301
360
 
@@ -304,9 +363,15 @@ $primer-borderRadius-large: 0.75rem;
304
363
  justify-content: right;
305
364
 
306
365
  .Overlay#{$responsiveVariant} {
366
+ height: 100vh;
367
+ max-height: unset;
307
368
  border-radius: $primer-borderRadius-large;
308
369
  border-top-right-radius: 0;
309
370
  border-bottom-right-radius: 0;
371
+
372
+ @media screen and (prefers-reduced-motion: no-preference) {
373
+ animation: 160ms cubic-bezier(0.32, 0, 0.67, 0) 0s 1 normal none running Overlay--motion-slideInLeft;
374
+ }
310
375
  }
311
376
  }
312
377
 
@@ -315,9 +380,16 @@ $primer-borderRadius-large: 0.75rem;
315
380
  justify-content: center;
316
381
 
317
382
  .Overlay#{$responsiveVariant} {
383
+ width: 100vw;
384
+ height: auto;
385
+ max-height: calc(100vh - 2rem);
318
386
  border-radius: $primer-borderRadius-large;
319
387
  border-bottom-right-radius: 0;
320
388
  border-bottom-left-radius: 0;
389
+
390
+ @media screen and (prefers-reduced-motion: no-preference) {
391
+ animation: 160ms cubic-bezier(0.32, 0, 0.67, 0) 0s 1 normal none running Overlay--motion-slideUp;
392
+ }
321
393
  }
322
394
  }
323
395
 
@@ -342,7 +414,7 @@ $primer-borderRadius-large: 0.75rem;
342
414
  max-width: 100vw;
343
415
  height: 100%;
344
416
  max-height: 100vh;
345
- border-radius: unset;
417
+ border-radius: unset !important;
346
418
  flex-grow: 1;
347
419
  }
348
420
  }
@@ -383,3 +455,21 @@ $primer-borderRadius-large: 0.75rem;
383
455
  @include Overlay-backdrop--full;
384
456
  }
385
457
  }
458
+
459
+ @keyframes Overlay--motion-slideUp {
460
+ from {
461
+ transform: translateY(100%);
462
+ }
463
+ }
464
+
465
+ @keyframes Overlay--motion-slideInRight {
466
+ from {
467
+ transform: translateX(-100%);
468
+ }
469
+ }
470
+
471
+ @keyframes Overlay--motion-slideInLeft {
472
+ from {
473
+ transform: translateX(100%);
474
+ }
475
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/css",
3
- "version": "20.4.4-rc.cd7b8942",
3
+ "version": "20.4.5-rc.487bdfa6",
4
4
  "description": "The CSS implementation of GitHub's Primer Design System",
5
5
  "homepage": "https://primer.style/css",
6
6
  "author": "GitHub, Inc.",
@@ -65,7 +65,7 @@
65
65
  "js-yaml": "4.1.0",
66
66
  "postcss": "8.4.16",
67
67
  "postcss-calc": "8.2.4",
68
- "postcss-import": "14.1.0",
68
+ "postcss-import": "15.0.0",
69
69
  "postcss-load-config": "4.0.1",
70
70
  "postcss-scss": "4.0.4",
71
71
  "postcss-simple-vars": "6.0.3",