@tamagui/text 1.0.1-beta.193 → 1.0.1-beta.194

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.
@@ -22,13 +22,14 @@ __export(SizableText_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(SizableText_exports);
24
24
  var import_core = require("@tamagui/core");
25
+ var import_get_font_sized = require("@tamagui/get-font-sized");
25
26
  const SizableText = (0, import_core.styled)(
26
27
  import_core.Text,
27
28
  {
28
29
  name: "SizableText",
29
30
  fontFamily: "$body",
30
31
  variants: {
31
- size: import_core.getFont
32
+ size: import_get_font_sized.getFontSized
32
33
  },
33
34
  defaultVariants: {
34
35
  size: "$4"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SizableText.tsx"],
4
- "sourcesContent": ["import { GetProps, Text, getFont, styled } from '@tamagui/core'\n\nexport const SizableText = styled(\n Text,\n {\n name: 'SizableText',\n fontFamily: '$body',\n\n variants: {\n size: getFont,\n } as const,\n\n defaultVariants: {\n size: '$4',\n },\n },\n {\n inlineWhenUnflattened: new Set(['fontFamily']),\n }\n)\n\nexport type SizableTextProps = GetProps<typeof SizableText>\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAgD;AAEzC,MAAM,kBAAc;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY;AAAA,IAEZ,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IAEA,iBAAiB;AAAA,MACf,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,uBAAuB,oBAAI,IAAI,CAAC,YAAY,CAAC;AAAA,EAC/C;AACF;",
4
+ "sourcesContent": ["import { GetProps, Text, styled } from '@tamagui/core'\nimport { getFontSized } from '@tamagui/get-font-sized'\n\nexport const SizableText = styled(\n Text,\n {\n name: 'SizableText',\n fontFamily: '$body',\n\n variants: {\n size: getFontSized,\n } as const,\n\n defaultVariants: {\n size: '$4',\n },\n },\n {\n inlineWhenUnflattened: new Set(['fontFamily']),\n }\n)\n\nexport type SizableTextProps = GetProps<typeof SizableText>\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AACvC,4BAA6B;AAEtB,MAAM,kBAAc;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY;AAAA,IAEZ,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IAEA,iBAAiB;AAAA,MACf,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,uBAAuB,oBAAI,IAAI,CAAC,YAAY,CAAC;AAAA,EAC/C;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,12 @@
1
- import { Text, getFont, styled } from "@tamagui/core";
1
+ import { Text, styled } from "@tamagui/core";
2
+ import { getFontSized } from "@tamagui/get-font-sized";
2
3
  const SizableText = styled(
3
4
  Text,
4
5
  {
5
6
  name: "SizableText",
6
7
  fontFamily: "$body",
7
8
  variants: {
8
- size: getFont
9
+ size: getFontSized
9
10
  },
10
11
  defaultVariants: {
11
12
  size: "$4"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SizableText.tsx"],
4
- "sourcesContent": ["import { GetProps, Text, getFont, styled } from '@tamagui/core'\n\nexport const SizableText = styled(\n Text,\n {\n name: 'SizableText',\n fontFamily: '$body',\n\n variants: {\n size: getFont,\n } as const,\n\n defaultVariants: {\n size: '$4',\n },\n },\n {\n inlineWhenUnflattened: new Set(['fontFamily']),\n }\n)\n\nexport type SizableTextProps = GetProps<typeof SizableText>\n"],
5
- "mappings": "AAAA,SAAmB,MAAM,SAAS,cAAc;AAEzC,MAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY;AAAA,IAEZ,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IAEA,iBAAiB;AAAA,MACf,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,uBAAuB,oBAAI,IAAI,CAAC,YAAY,CAAC;AAAA,EAC/C;AACF;",
4
+ "sourcesContent": ["import { GetProps, Text, styled } from '@tamagui/core'\nimport { getFontSized } from '@tamagui/get-font-sized'\n\nexport const SizableText = styled(\n Text,\n {\n name: 'SizableText',\n fontFamily: '$body',\n\n variants: {\n size: getFontSized,\n } as const,\n\n defaultVariants: {\n size: '$4',\n },\n },\n {\n inlineWhenUnflattened: new Set(['fontFamily']),\n }\n)\n\nexport type SizableTextProps = GetProps<typeof SizableText>\n"],
5
+ "mappings": "AAAA,SAAmB,MAAM,cAAc;AACvC,SAAS,oBAAoB;AAEtB,MAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY;AAAA,IAEZ,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IAEA,iBAAiB;AAAA,MACf,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,uBAAuB,oBAAI,IAAI,CAAC,YAAY,CAAC;AAAA,EAC/C;AACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,42 @@
1
+ import { styled } from "@tamagui/core";
2
+ import { Paragraph } from "./Paragraph";
3
+ const Heading = styled(Paragraph, {
4
+ tag: "span",
5
+ name: "Heading",
6
+ accessibilityRole: "header",
7
+ fontFamily: "$heading",
8
+ size: "$8",
9
+ margin: 0
10
+ });
11
+ const H1 = styled(Heading, {
12
+ name: "H1",
13
+ tag: "h1",
14
+ size: "$10"
15
+ });
16
+ const H2 = styled(Heading, {
17
+ name: "H2",
18
+ tag: "h2",
19
+ size: "$9"
20
+ });
21
+ const H3 = styled(Heading, {
22
+ name: "H3",
23
+ tag: "h3",
24
+ size: "$8"
25
+ });
26
+ const H4 = styled(Heading, {
27
+ name: "H4",
28
+ tag: "h4",
29
+ size: "$7"
30
+ });
31
+ const H5 = styled(Heading, {
32
+ name: "H5",
33
+ tag: "h5",
34
+ size: "$6"
35
+ });
36
+ const H6 = styled(Heading, {
37
+ name: "H6",
38
+ tag: "h6",
39
+ size: "$5"
40
+ });
41
+ export { H1, H2, H3, H4, H5, H6, Heading };
42
+ //# sourceMappingURL=Headings.js.map
@@ -0,0 +1,10 @@
1
+ import { styled } from "@tamagui/core";
2
+ import { SizableText } from "./SizableText";
3
+ const Paragraph = styled(SizableText, {
4
+ name: "Paragraph",
5
+ tag: "p",
6
+ selectable: true,
7
+ cursor: "text"
8
+ });
9
+ export { Paragraph };
10
+ //# sourceMappingURL=Paragraph.js.map
@@ -0,0 +1,15 @@
1
+ import { Text, getFont, styled } from "@tamagui/core";
2
+ const SizableText = styled(Text, {
3
+ name: "SizableText",
4
+ fontFamily: "$body",
5
+ variants: {
6
+ size: getFont
7
+ },
8
+ defaultVariants: {
9
+ size: "$4"
10
+ }
11
+ }, {
12
+ inlineWhenUnflattened: /* @__PURE__ */new Set(["fontFamily"])
13
+ });
14
+ export { SizableText };
15
+ //# sourceMappingURL=SizableText.js.map
@@ -1,11 +1,12 @@
1
- import { Text, getFont, styled } from "@tamagui/core";
1
+ import { Text, styled } from "@tamagui/core";
2
+ import { getFontSized } from "@tamagui/get-font-sized";
2
3
  const SizableText = styled(
3
4
  Text,
4
5
  {
5
6
  name: "SizableText",
6
7
  fontFamily: "$body",
7
8
  variants: {
8
- size: getFont
9
+ size: getFontSized
9
10
  },
10
11
  defaultVariants: {
11
12
  size: "$4"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SizableText.tsx"],
4
- "sourcesContent": ["import { GetProps, Text, getFont, styled } from '@tamagui/core'\n\nexport const SizableText = styled(\n Text,\n {\n name: 'SizableText',\n fontFamily: '$body',\n\n variants: {\n size: getFont,\n } as const,\n\n defaultVariants: {\n size: '$4',\n },\n },\n {\n inlineWhenUnflattened: new Set(['fontFamily']),\n }\n)\n\nexport type SizableTextProps = GetProps<typeof SizableText>\n"],
5
- "mappings": "AAAA,SAAmB,MAAM,SAAS,cAAc;AAEzC,MAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY;AAAA,IAEZ,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IAEA,iBAAiB;AAAA,MACf,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,uBAAuB,oBAAI,IAAI,CAAC,YAAY,CAAC;AAAA,EAC/C;AACF;",
4
+ "sourcesContent": ["import { GetProps, Text, styled } from '@tamagui/core'\nimport { getFontSized } from '@tamagui/get-font-sized'\n\nexport const SizableText = styled(\n Text,\n {\n name: 'SizableText',\n fontFamily: '$body',\n\n variants: {\n size: getFontSized,\n } as const,\n\n defaultVariants: {\n size: '$4',\n },\n },\n {\n inlineWhenUnflattened: new Set(['fontFamily']),\n }\n)\n\nexport type SizableTextProps = GetProps<typeof SizableText>\n"],
5
+ "mappings": "AAAA,SAAmB,MAAM,cAAc;AACvC,SAAS,oBAAoB;AAEtB,MAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,YAAY;AAAA,IAEZ,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IAEA,iBAAiB;AAAA,MACf,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,uBAAuB,oBAAI,IAAI,CAAC,YAAY,CAAC;AAAA,EAC/C;AACF;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/text",
3
- "version": "1.0.1-beta.193",
3
+ "version": "1.0.1-beta.194",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -24,15 +24,16 @@
24
24
  "test": "vitest --config ../vite-plugin-internal/src/vite.config.ts --run"
25
25
  },
26
26
  "dependencies": {
27
- "@tamagui/core": "^1.0.1-beta.193",
28
- "@tamagui/helpers-tamagui": "^1.0.1-beta.193"
27
+ "@tamagui/core": "^1.0.1-beta.194",
28
+ "@tamagui/get-font-sized": "^1.0.1-beta.194",
29
+ "@tamagui/helpers-tamagui": "^1.0.1-beta.194"
29
30
  },
30
31
  "peerDependencies": {
31
32
  "react": "*",
32
33
  "react-dom": "*"
33
34
  },
34
35
  "devDependencies": {
35
- "@tamagui/build": "^1.0.1-beta.193",
36
+ "@tamagui/build": "^1.0.1-beta.194",
36
37
  "react": "*",
37
38
  "react-dom": "*",
38
39
  "vitest": "^0.20.3"
@@ -1,4 +1,5 @@
1
- import { GetProps, Text, getFont, styled } from '@tamagui/core'
1
+ import { GetProps, Text, styled } from '@tamagui/core'
2
+ import { getFontSized } from '@tamagui/get-font-sized'
2
3
 
3
4
  export const SizableText = styled(
4
5
  Text,
@@ -7,7 +8,7 @@ export const SizableText = styled(
7
8
  fontFamily: '$body',
8
9
 
9
10
  variants: {
10
- size: getFont,
11
+ size: getFontSized,
11
12
  } as const,
12
13
 
13
14
  defaultVariants: {