@cambly/syntax-core 7.2.0 → 7.3.0

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/index.d.ts CHANGED
@@ -568,7 +568,7 @@ declare namespace Divider {
568
568
  /**
569
569
  * [Heading](https://cambly-syntax.vercel.app/?path=/docs/components-heading--docs) enforces a consistent style & accessibility best practices for headings.
570
570
  */
571
- declare const Heading: ({ align, as, children, color, size, }: {
571
+ declare const Heading: ({ align, as, children, color, "data-testid": dataTestId, size, }: {
572
572
  /**
573
573
  * Aligns the text to the left, right, or center of the container.
574
574
  * * `start` and `end` will align the text to the left or right of the container depending on the locale.
@@ -593,6 +593,10 @@ declare const Heading: ({ align, as, children, color, size, }: {
593
593
  * @defaultValue "gray900"
594
594
  */
595
595
  color?: "gray200" | "gray900" | "primary" | "secondary" | "tertiary" | "destructive-primary" | "destructive-secondary" | "destructive-tertiary" | "branded" | "success" | "gray700" | "gray800" | "white" | "inherit" | undefined;
596
+ /**
597
+ * Test id for the text.
598
+ */
599
+ "data-testid"?: string | undefined;
596
600
  /**
597
601
  * Size of the text.
598
602
  *
@@ -1034,7 +1038,7 @@ declare function TextField({ autoComplete, "data-testid": dataTestId, disabled,
1034
1038
  /**
1035
1039
  * [Typography](https://cambly-syntax.vercel.app/?path=/docs/components-typography--docs) is a component that renders text.
1036
1040
  */
1037
- declare const Typography: ({ align, as, children, color, inline, lineClamp, size, tooltip, transform, underline, weight, }: {
1041
+ declare const Typography: ({ align, as, children, color, "data-testid": dataTestId, inline, lineClamp, size, tooltip, transform, underline, weight, }: {
1038
1042
  /**
1039
1043
  * Aligns the text to the left, right, or center of the container.
1040
1044
  * * `start` and `end` will align the text to the left or right of the container depending on the locale.
@@ -1059,6 +1063,10 @@ declare const Typography: ({ align, as, children, color, inline, lineClamp, size
1059
1063
  * @defaultValue "gray900"
1060
1064
  */
1061
1065
  color?: "gray200" | "gray900" | "primary" | "secondary" | "tertiary" | "destructive-primary" | "destructive-secondary" | "destructive-tertiary" | "branded" | "success" | "gray700" | "gray800" | "white" | "inherit" | undefined;
1066
+ /**
1067
+ * Test id for the text
1068
+ */
1069
+ "data-testid"?: string | undefined;
1062
1070
  /**
1063
1071
  * Whether the text should flow inline with other elements.
1064
1072
  *
package/dist/index.js CHANGED
@@ -189,6 +189,7 @@ var Typography = ({
189
189
  as = "div",
190
190
  children,
191
191
  color = "gray900",
192
+ "data-testid": dataTestId,
192
193
  inline = false,
193
194
  lineClamp = void 0,
194
195
  size = 200,
@@ -212,6 +213,7 @@ var Typography = ({
212
213
  underline && Typography_module_default.underline,
213
214
  lineClamp != null && Typography_module_default.lineClamp
214
215
  ),
216
+ "data-testid": dataTestId,
215
217
  style: {
216
218
  WebkitLineClamp: lineClamp
217
219
  },
@@ -889,10 +891,22 @@ var Heading = ({
889
891
  as = "h1",
890
892
  children,
891
893
  color = "gray900",
894
+ "data-testid": dataTestId,
892
895
  size = 500
893
896
  }) => {
894
897
  const weight = [700, 800].includes(size) ? "heavy" : "bold";
895
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Typography_default, { align, as, color, size, weight, children });
898
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
899
+ Typography_default,
900
+ {
901
+ align,
902
+ as,
903
+ color,
904
+ "data-testid": dataTestId,
905
+ size,
906
+ weight,
907
+ children
908
+ }
909
+ );
896
910
  };
897
911
  var Heading_default = Heading;
898
912