@jobber/components-native 0.84.4-match-mobi-55ef4ec.7 → 0.84.4-revert-269-4fbaea5.19

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.
Files changed (29) hide show
  1. package/dist/package.json +3 -3
  2. package/dist/src/StatusLabel/StatusLabel.js +12 -6
  3. package/dist/src/StatusLabel/StatusLabel.style.js +13 -9
  4. package/dist/src/index.js +0 -1
  5. package/dist/src/utils/meta/meta.json +0 -1
  6. package/dist/tsconfig.tsbuildinfo +1 -1
  7. package/dist/types/src/StatusLabel/StatusLabel.d.ts +3 -3
  8. package/dist/types/src/StatusLabel/StatusLabel.style.d.ts +10 -9
  9. package/dist/types/src/index.d.ts +0 -1
  10. package/package.json +3 -3
  11. package/src/StatusLabel/StatusLabel.style.ts +16 -9
  12. package/src/StatusLabel/StatusLabel.tsx +28 -15
  13. package/src/StatusLabel/__snapshots__/StatusLabel.test.tsx.snap +105 -126
  14. package/src/index.ts +0 -1
  15. package/src/utils/meta/meta.json +0 -1
  16. package/dist/src/StatusIndicator/StatusIndicator.js +0 -11
  17. package/dist/src/StatusIndicator/StatusIndicator.style.js +0 -12
  18. package/dist/src/StatusIndicator/StatusIndicator.type.js +0 -1
  19. package/dist/src/StatusIndicator/index.js +0 -1
  20. package/dist/types/src/StatusIndicator/StatusIndicator.d.ts +0 -6
  21. package/dist/types/src/StatusIndicator/StatusIndicator.style.d.ts +0 -8
  22. package/dist/types/src/StatusIndicator/StatusIndicator.type.d.ts +0 -1
  23. package/dist/types/src/StatusIndicator/index.d.ts +0 -2
  24. package/src/StatusIndicator/StatusIndicator.style.ts +0 -14
  25. package/src/StatusIndicator/StatusIndicator.test.tsx +0 -42
  26. package/src/StatusIndicator/StatusIndicator.tsx +0 -23
  27. package/src/StatusIndicator/StatusIndicator.type.ts +0 -6
  28. package/src/StatusIndicator/__snapshots__/StatusIndicator.test.tsx.snap +0 -96
  29. package/src/StatusIndicator/index.ts +0 -2
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.84.4-match-mobi-55ef4ec.7+55ef4ec91",
3
+ "version": "0.84.4-revert-269-4fbaea5.19+4fbaea559",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "compile": "tsc -b",
36
36
  "build:clean": "rm -rf ./dist",
37
37
  "storybook": "storybook dev -p 6008 --disable-telemetry",
38
- "build-storybook": "storybook build --disable-telemetry"
38
+ "storybook:build": "storybook build --disable-telemetry"
39
39
  },
40
40
  "dependencies": {
41
41
  "@react-native-clipboard/clipboard": "^1.11.2",
@@ -85,5 +85,5 @@
85
85
  "react-native-safe-area-context": "^5.4.0",
86
86
  "react-native-svg": ">=12.0.0"
87
87
  },
88
- "gitHead": "55ef4ec916758fd15610ded5298d293958e665fa"
88
+ "gitHead": "4fbaea5594688ec1dcbfc12a090d798aa9676c72"
89
89
  }
@@ -1,17 +1,23 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
3
  import { useStyles } from "./StatusLabel.style";
4
- import { Typography } from "../Typography";
5
- import { StatusIndicator } from "../StatusIndicator";
6
- import { tokens } from "../utils/design";
4
+ import { Text } from "../Text";
5
+ import { useAtlantisTheme } from "../AtlantisThemeContext";
7
6
  export function StatusLabel({ text, alignment = "end", status = "success", }) {
8
7
  const styles = useStyles();
9
8
  return (React.createElement(View, { style: [
10
9
  styles.statusLabelRow,
11
- { backgroundColor: tokens[`color-${status}--surface`] },
12
10
  alignment === "start" && styles.labelTextStartAligned,
13
11
  ] },
14
12
  React.createElement(View, { style: styles.statusLabelText },
15
- React.createElement(Typography, { align: alignment, size: "smaller", fontWeight: "medium", color: `${status}OnSurface` }, text)),
16
- React.createElement(StatusIndicator, { status: status })));
13
+ React.createElement(Text, { align: alignment, level: "textSupporting", variation: "subdued" }, text)),
14
+ React.createElement(View, { style: styles.innerPad }),
15
+ React.createElement(StatusLabelIcon, { status: status, styles: styles })));
16
+ }
17
+ function StatusLabelIcon({ status, styles }) {
18
+ const { tokens } = useAtlantisTheme();
19
+ return (React.createElement(View, { testID: `${status}LabelIcon`, style: [
20
+ styles.statusLabelIcon,
21
+ { backgroundColor: tokens[`color-${status}`] },
22
+ ] }));
17
23
  }
@@ -1,25 +1,29 @@
1
1
  import { buildThemedStyles } from "../AtlantisThemeContext";
2
+ const statusLabelRadius = 3; // Needs to be hardcoded to 3 as this shouldn't change with the tokens
2
3
  export const useStyles = buildThemedStyles(tokens => {
4
+ const statusLabelIconDiameter = tokens["space-base"] - tokens["space-smaller"]; //12px
5
+ const indicatorOffset = tokens["space-smallest"] + tokens["space-minuscule"];
3
6
  return {
4
7
  statusLabelRow: {
5
8
  flexDirection: "row",
6
9
  justifyContent: "flex-end",
7
- alignItems: "center",
8
10
  flexWrap: "nowrap",
9
- flexGrow: 0,
10
- flexShrink: 1,
11
- gap: tokens["space-smaller"],
12
- backgroundColor: tokens["color-success--surface"],
13
- borderRadius: tokens["radius-large"],
14
- paddingVertical: tokens["space-smaller"],
15
- paddingHorizontal: tokens["space-small"],
16
11
  },
17
12
  statusLabelText: {
18
13
  flexShrink: 1,
19
- marginBottom: -1,
14
+ },
15
+ statusLabelIcon: {
16
+ borderRadius: statusLabelRadius,
17
+ backgroundColor: tokens["color-success"],
18
+ width: statusLabelIconDiameter,
19
+ height: statusLabelIconDiameter,
20
+ marginTop: indicatorOffset,
20
21
  },
21
22
  labelTextStartAligned: {
22
23
  flexDirection: "row-reverse",
23
24
  },
25
+ innerPad: {
26
+ width: tokens["space-small"],
27
+ },
24
28
  };
25
29
  });
package/dist/src/index.js CHANGED
@@ -39,7 +39,6 @@ export * from "./Menu";
39
39
  export * from "./ProgressBar";
40
40
  export * from "./Select";
41
41
  export * from "./StatusLabel";
42
- export * from "./StatusIndicator";
43
42
  export * from "./Switch";
44
43
  export * from "./Text";
45
44
  export * from "./TextList";
@@ -57,7 +57,6 @@
57
57
  "Option",
58
58
  "ProgressBar",
59
59
  "Select",
60
- "StatusIndicator",
61
60
  "StatusLabel",
62
61
  "Switch",
63
62
  "Text",