@simplybusiness/mobius 5.1.1 → 5.1.2

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,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 3af939c: Improve Modal formatting on mobile displays
8
+
3
9
  ## 5.1.1
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@simplybusiness/mobius",
3
3
  "license": "UNLICENSED",
4
- "version": "5.1.1",
4
+ "version": "5.1.2",
5
5
  "description": "Core library of Mobius react components",
6
6
  "repository": {
7
7
  "type": "git",
@@ -19,8 +19,8 @@
19
19
  position: fixed;
20
20
  display: flex;
21
21
  flex-direction: column;
22
- width: 50%;
23
- max-height: 80%;
22
+ width: min(90%, 600px);
23
+ max-height: 90%;
24
24
  padding: 0;
25
25
  margin: auto;
26
26
  background-color: var(--color-background);
@@ -28,6 +28,10 @@
28
28
  border-radius: var(--radius-1);
29
29
  overflow: hidden;
30
30
 
31
+ @media (min-width: 768px) {
32
+ max-height: 80%;
33
+ }
34
+
31
35
  &:not([open]) {
32
36
  display: none;
33
37
  }
@@ -127,13 +131,27 @@
127
131
  display: grid;
128
132
  grid-template-columns: 1fr auto;
129
133
  justify-content: space-between;
130
- gap: var(--size-sm);
131
- align-items: center;
134
+ gap: var(--size-md);
135
+ align-items: start;
132
136
  padding: var(--size-xs);
133
- padding-left: var(--size-sm);
137
+ padding-inline: var(--size-sm);
134
138
  font-family: var(--font-family);
135
- font-size: var(--font-size-small-title);
139
+ font-size: var(--font-size-4);
136
140
  margin: 0;
141
+
142
+ @media (min-width: 768px) {
143
+ padding: var(--size-sm);
144
+ padding-inline: var(--size-md);
145
+ font-size: var(--font-size-5);
146
+ }
147
+ }
148
+
149
+ .mobius-modal__close {
150
+ /* negative padding to match the padding of the header, so it aligns
151
+ horizontally */
152
+ padding: calc(var(--size-sm) * -1);
153
+ font-size: var(--font-size-4);
154
+ flex-shrink: 0;
137
155
  }
138
156
 
139
157
  .mobius-modal__content {
@@ -142,4 +160,9 @@
142
160
  margin: var(--size-sm) 0;
143
161
  font-family: var(--font-family);
144
162
  overflow-y: auto;
163
+
164
+ @media (min-width: 768px) {
165
+ padding: 0 var(--size-md);
166
+ margin: var(--size-md) 0;
167
+ }
145
168
  }