@jobber/components-native 0.76.1-JOB-116234-4bc5afd.23 → 0.76.1-JOB-116234-63c4467.27

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.76.1-JOB-116234-4bc5afd.23+4bc5afdb",
3
+ "version": "0.76.1-JOB-116234-63c4467.27+63c44675",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -80,5 +80,5 @@
80
80
  "react-native-safe-area-context": "^4.5.2",
81
81
  "react-native-svg": ">=12.0.0"
82
82
  },
83
- "gitHead": "4bc5afdb99786f50a9ae8474ac282eb593dd9867"
83
+ "gitHead": "63c446753585b99a48ea4782613671ca6ff3c8b1"
84
84
  }
@@ -1,8 +1,7 @@
1
1
  import React, { Children } from "react";
2
2
  import { View } from "react-native";
3
3
  import chunk from "lodash/chunk";
4
- import { columnStyles, styles } from "./Flex.styles";
5
- import { useGapStyles } from "./Flex.gap.styles";
4
+ import { columnStyles, gapStyles, styles } from "./Flex.styles";
6
5
  import { Content } from "../Content";
7
6
  export function Flex({ template = [], align = "center", gap = "base", children, }) {
8
7
  if (template.length === 1) {
@@ -27,6 +26,6 @@ export function Flex({ template = [], align = "center", gap = "base", children,
27
26
  function Row({ template = [], align = "center", gap = "base", children, }) {
28
27
  return (React.createElement(View, { testID: "ATL-Flex-Row", style: [styles.row, { alignItems: align }] }, Children.map(children, (child, index) => (React.createElement(View, { style: [
29
28
  columnStyles[template[index]] || columnStyles.grow,
30
- index > 0 && gap && useGapStyles()[gap],
29
+ index > 0 && gap && gapStyles[gap],
31
30
  ] }, child)))));
32
31
  }
@@ -1,4 +1,6 @@
1
1
  import { StyleSheet } from "react-native";
2
+ import { spacing } from "./types";
3
+ import { tokens as staticTokens } from "../utils/design";
2
4
  export const styles = StyleSheet.create({
3
5
  row: { flexDirection: "row" },
4
6
  });
@@ -13,3 +15,10 @@ export const columnStyles = StyleSheet.create({
13
15
  flexBasis: 0,
14
16
  },
15
17
  });
18
+ export const gapStyles = StyleSheet.create(spacing.reduce((gapObj, space) => {
19
+ let paddingLeft = 0;
20
+ if (space !== "none")
21
+ paddingLeft = staticTokens[`space-${space}`];
22
+ gapObj[space] = { paddingLeft };
23
+ return gapObj;
24
+ }, {}));