@momo-kits/foundation 0.169.18-beta.1 → 0.169.18-beta.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.
@@ -81,16 +81,14 @@ describe('getFooterGeometry', () => {
81
81
  const input = { ...duoOuter, insetLeft: 84, insetRight: 0, ...ANCHORED };
82
82
  expect(getFooterGeometry(input)).toMatchObject({
83
83
  barMargin: { left: 84, right: 0 },
84
- contentPadding: { left: 0, right: 0 },
85
84
  });
86
85
  });
87
86
 
88
- it('spans the anchored bar over the window, its content inside the insets', () => {
87
+ it('spans the anchored bar and centers its content on the window', () => {
89
88
  expect(getFooterGeometry({ ...DUO_INNER, ...ANCHORED })).toEqual({
90
89
  kind: 'anchored',
91
90
  width: 758,
92
91
  barMargin: { left: 0, right: 0 },
93
- contentPadding: { left: 84, right: 34 },
94
92
  });
95
93
  });
96
94
 
@@ -99,7 +97,6 @@ describe('getFooterGeometry', () => {
99
97
  kind: 'sheet',
100
98
  width: 758,
101
99
  barMargin: { left: 0, right: 0 },
102
- contentPadding: { left: 0, right: 0 },
103
100
  });
104
101
  });
105
102
  });
@@ -29,10 +29,6 @@ type FooterGeometry = {
29
29
  * iPhone Duo side column, the foldable bar and sheet are laid on the window.
30
30
  */
31
31
  barMargin: HorizontalInsets;
32
- /**
33
- * Padding inside the anchored bar that keeps its content clear of the side column.
34
- */
35
- contentPadding: HorizontalInsets;
36
32
  };
37
33
 
38
34
  type DesignSystemContext = {
@@ -124,7 +120,6 @@ const getFooterGeometry = ({
124
120
  kind: 'phone',
125
121
  width: contentWidth,
126
122
  barMargin: contentInsets,
127
- contentPadding: NO_INSETS,
128
123
  };
129
124
  }
130
125
 
@@ -140,15 +135,10 @@ const getFooterGeometry = ({
140
135
  kind: 'sheet',
141
136
  width: footerWidth,
142
137
  barMargin: NO_INSETS,
143
- contentPadding: NO_INSETS,
144
138
  };
145
139
  }
146
- return {
147
- kind: 'anchored',
148
- width: footerWidth,
149
- barMargin: NO_INSETS,
150
- contentPadding: contentInsets,
151
- };
140
+ // Figma centers the anchored content on the window too, side column included
141
+ return { kind: 'anchored', width: footerWidth, barMargin: NO_INSETS };
152
142
  };
153
143
 
154
144
  /**
@@ -252,7 +242,7 @@ const ScreenFooter = ({
252
242
  bottomSpace = duoTabInset;
253
243
  }
254
244
 
255
- const { kind, barMargin, contentPadding } = layout;
245
+ const { kind, barMargin } = layout;
256
246
  const hasBarMargin = barMargin.left > 0 || barMargin.right > 0;
257
247
 
258
248
  // one view tree for every kind, so folding keeps the footer content's state
@@ -289,8 +279,6 @@ const ScreenFooter = ({
289
279
  style={[
290
280
  surfaceStyle,
291
281
  {
292
- paddingLeft: contentPadding.left,
293
- paddingRight: contentPadding.right,
294
282
  paddingBottom: bottomSpace + Spacing.S,
295
283
  backgroundColor: surfaceColor,
296
284
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.169.18-beta.1",
3
+ "version": "0.169.18-beta.2",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},