@primer/css 0.0.0-20220426191113 → 0.0.0-20220426204156

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # @primer/css
2
2
 
3
- ## 0.0.0-20220426191113
3
+ ## 0.0.0-20220426204156
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1998](https://github.com/primer/css/pull/1998) [`a2ac9394`](https://github.com/primer/css/commit/a2ac939475a9b01374b57b251fbd27f7ab71652e) Thanks [@bolonio](https://github.com/bolonio)! - Styles for the new Dialog Component
4
8
 
5
9
  ### Patch Changes
6
10
 
package/core/index.scss CHANGED
@@ -24,6 +24,8 @@
24
24
  @import '../pagination/index.scss';
25
25
  @import '../tooltips/index.scss';
26
26
  @import '../truncate/index.scss';
27
+ @import '../overlay/index.scss';
28
+ @import '../dialog/index.scss';
27
29
 
28
30
  // Utilities always go last so that they can override components
29
31
  @import '../utilities/index.scss';
@@ -0,0 +1,88 @@
1
+ .Dialog-hidden {
2
+ display: none !important;
3
+ }
4
+
5
+ .Dialog-backdrop {
6
+ position: fixed;
7
+ top: 0;
8
+ right: 0;
9
+ bottom: 0;
10
+ left: 0;
11
+ z-index: 999;
12
+ display: flex;
13
+ background-color: var(--color-neutral-muted);
14
+ animation: 200ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running dialog-backdrop-appear;
15
+
16
+ @keyframes dialog-backdrop-appear {
17
+ 0% {
18
+ opacity: 0;
19
+ }
20
+
21
+ 100% {
22
+ opacity: 1;
23
+ }
24
+ }
25
+
26
+ &.Dialog-backdrop--positionCenter {
27
+ align-items: center;
28
+ justify-content: center;
29
+ }
30
+
31
+ &.Dialog-backdrop--positionBottom {
32
+ align-items: end;
33
+ justify-content: center;
34
+
35
+ > * {
36
+ border-bottom-right-radius: 0;
37
+ border-bottom-left-radius: 0;
38
+ }
39
+ }
40
+
41
+ // 767px
42
+ @media (max-width: #{map-get($breakpoints, 'md') - 0.02px}) {
43
+ &.Overlay-backdrop-positionWhenNarrow-fullScreen {
44
+ > * {
45
+ width: 100%;
46
+ max-width: 100vw;
47
+ height: 100%;
48
+ max-height: 100vh;
49
+ // stylelint-disable-next-line primer/borders
50
+ border-radius: unset;
51
+ flex-grow: 1;
52
+ }
53
+ }
54
+
55
+ &.Overlay-backdrop-positionWhenNarrow-bottomSheet {
56
+ align-items: end;
57
+ justify-content: center;
58
+
59
+ > * {
60
+ width: 100%;
61
+ max-width: 100vw;
62
+ height: auto;
63
+ max-height: 100vh;
64
+ // stylelint-disable-next-line primer/spacing
65
+ padding-bottom: env(safe-area-inset-bottom);
66
+ border-bottom-right-radius: 0;
67
+ border-bottom-left-radius: 0;
68
+ }
69
+ }
70
+ }
71
+
72
+ @media only screen and (min-device-width: 320px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape) {
73
+ &.Overlay-backdrop-positionWhenNarrow-bottomSheet {
74
+ align-items: end;
75
+ justify-content: center;
76
+
77
+ > * {
78
+ max-width: 480px;
79
+ height: auto;
80
+ max-height: 100vh;
81
+ // stylelint-disable-next-line primer/spacing
82
+ padding-bottom: env(safe-area-inset-bottom);
83
+ border-bottom-right-radius: 0;
84
+ border-bottom-left-radius: 0;
85
+ }
86
+ }
87
+ }
88
+ }
@@ -0,0 +1,2 @@
1
+ @import '../support/index.scss';
2
+ @import './dialog.scss';