@jobber/components-native 0.100.0 → 0.100.1

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.
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import type { TextAlign, TextColor } from "../Typography";
3
- export type ActionLabelVariation = Extract<TextColor, "interactive" | "destructive" | "learning" | "subtle" | "onPrimary">;
3
+ export type ActionLabelVariation = Extract<TextColor, "interactive" | "destructive" | "learning" | "interactiveSubtle" | "subtle" | "onPrimary">;
4
4
  type ActionLabelType = "default" | "cardTitle";
5
5
  interface ActionLabelProps {
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.100.0",
3
+ "version": "0.100.1",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -32,6 +32,7 @@
32
32
  "build": "npm run build:clean && npm run compile",
33
33
  "bootstrap": "npm run build",
34
34
  "prepack": "npm run build",
35
+ "watch": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
35
36
  "compile": "tsc -p tsconfig.build.json",
36
37
  "build:clean": "rm -rf ./dist",
37
38
  "storybook": "storybook dev -p 6008 --disable-telemetry",
@@ -93,5 +94,5 @@
93
94
  "react-native-safe-area-context": "^5.4.0",
94
95
  "react-native-svg": ">=12.0.0"
95
96
  },
96
- "gitHead": "2ef76c22620e1627eca8cf576b35e78228262574"
97
+ "gitHead": "952a8f59bf74f0fec04b870102aa1b23289b2517"
97
98
  }
@@ -49,7 +49,19 @@ describe("ActionLabel", () => {
49
49
  });
50
50
  });
51
51
 
52
- it("renders a subtle variation", () => {
52
+ it("renders an interactiveSubtle variation", () => {
53
+ const text = "Interactive Subtle Action Label";
54
+ const { getByText } = render(
55
+ <ActionLabel variation="interactiveSubtle">{text}</ActionLabel>,
56
+ );
57
+
58
+ expect(getStyleObject(getByText(text))).toMatchObject({
59
+ ...defaultStyles,
60
+ color: tokens["color-interactive--subtle"],
61
+ });
62
+ });
63
+
64
+ it("still supports the deprecated subtle variation", () => {
53
65
  const text = "Subtle Action Label";
54
66
  const { getByText } = render(
55
67
  <ActionLabel variation="subtle">{text}</ActionLabel>,
@@ -5,7 +5,12 @@ import { Typography } from "../Typography";
5
5
 
6
6
  export type ActionLabelVariation = Extract<
7
7
  TextColor,
8
- "interactive" | "destructive" | "learning" | "subtle" | "onPrimary"
8
+ | "interactive"
9
+ | "destructive"
10
+ | "learning"
11
+ | "interactiveSubtle"
12
+ | "subtle"
13
+ | "onPrimary"
9
14
  >;
10
15
 
11
16
  type ActionLabelType = "default" | "cardTitle";
@@ -211,11 +211,11 @@ function getActionLabelVariation(
211
211
 
212
212
  switch (variation) {
213
213
  case "learning":
214
- return "subtle";
214
+ return "interactiveSubtle";
215
215
  case "destructive":
216
216
  return "destructive";
217
217
  case "cancel":
218
- return "subtle";
218
+ return "interactiveSubtle";
219
219
  default:
220
220
  return "interactive";
221
221
  }