@tamagui/text
Advanced tools
Comparing version 1.111.8 to 1.111.9
import { styled } from "@tamagui/web"; | ||
import { Paragraph } from "./Paragraph"; | ||
import { Paragraph } from "./Paragraph.native.js"; | ||
var Heading = styled(Paragraph, { | ||
tag: "span", | ||
name: "Heading", | ||
accessibilityRole: "header", | ||
fontFamily: "$heading", | ||
size: "$8", | ||
margin: 0 | ||
}), H1 = styled(Heading, { | ||
name: "H1", | ||
tag: "h1", | ||
size: "$10" | ||
}), H2 = styled(Heading, { | ||
name: "H2", | ||
tag: "h2", | ||
size: "$9" | ||
}), H3 = styled(Heading, { | ||
name: "H3", | ||
tag: "h3", | ||
size: "$8" | ||
}), H4 = styled(Heading, { | ||
name: "H4", | ||
tag: "h4", | ||
size: "$7" | ||
}), H5 = styled(Heading, { | ||
name: "H5", | ||
tag: "h5", | ||
size: "$6" | ||
}), H6 = styled(Heading, { | ||
name: "H6", | ||
tag: "h6", | ||
size: "$5" | ||
}); | ||
export { | ||
H1, | ||
H2, | ||
H3, | ||
H4, | ||
H5, | ||
H6, | ||
Heading | ||
}; | ||
//# sourceMappingURL=Headings.js.map | ||
tag: "span", | ||
name: "Heading", | ||
accessibilityRole: "header", | ||
fontFamily: "$heading", | ||
size: "$8", | ||
margin: 0 | ||
}), | ||
H1 = styled(Heading, { | ||
name: "H1", | ||
tag: "h1", | ||
size: "$10" | ||
}), | ||
H2 = styled(Heading, { | ||
name: "H2", | ||
tag: "h2", | ||
size: "$9" | ||
}), | ||
H3 = styled(Heading, { | ||
name: "H3", | ||
tag: "h3", | ||
size: "$8" | ||
}), | ||
H4 = styled(Heading, { | ||
name: "H4", | ||
tag: "h4", | ||
size: "$7" | ||
}), | ||
H5 = styled(Heading, { | ||
name: "H5", | ||
tag: "h5", | ||
size: "$6" | ||
}), | ||
H6 = styled(Heading, { | ||
name: "H6", | ||
tag: "h6", | ||
size: "$5" | ||
}); | ||
export { H1, H2, H3, H4, H5, H6, Heading }; | ||
//# sourceMappingURL=Headings.native.js.map |
@@ -1,6 +0,6 @@ | ||
export * from "./SizableText"; | ||
export * from "./Paragraph"; | ||
export * from "./Headings"; | ||
export * from "./wrapChildrenInText"; | ||
export * from "./types"; | ||
//# sourceMappingURL=index.js.map | ||
export * from "./SizableText.native.js"; | ||
export * from "./Paragraph.native.js"; | ||
export * from "./Headings.native.js"; | ||
export * from "./wrapChildrenInText.native.js"; | ||
export * from "./types.native.js"; | ||
//# sourceMappingURL=index.native.js.map |
import { styled } from "@tamagui/web"; | ||
import { SizableText } from "./SizableText"; | ||
import { SizableText } from "./SizableText.native.js"; | ||
var Paragraph = styled(SizableText, { | ||
@@ -11,5 +11,3 @@ name: "Paragraph", | ||
}); | ||
export { | ||
Paragraph | ||
}; | ||
//# sourceMappingURL=Paragraph.js.map | ||
export { Paragraph }; | ||
//# sourceMappingURL=Paragraph.native.js.map |
@@ -20,10 +20,10 @@ import { getFontSized } from "@tamagui/get-font-sized"; | ||
SizableText.staticConfig.variants.fontFamily = { | ||
"...": function(_val, extras) { | ||
var sizeProp = extras.props.size, fontSizeProp = extras.props.fontSize, size = sizeProp === "$true" && fontSizeProp ? fontSizeProp : extras.props.size || "$true"; | ||
"...": function (_val, extras) { | ||
var sizeProp = extras.props.size, | ||
fontSizeProp = extras.props.fontSize, | ||
size = sizeProp === "$true" && fontSizeProp ? fontSizeProp : extras.props.size || "$true"; | ||
return getFontSized(size, extras); | ||
} | ||
}; | ||
export { | ||
SizableText | ||
}; | ||
//# sourceMappingURL=SizableText.js.map | ||
export { SizableText }; | ||
//# sourceMappingURL=SizableText.native.js.map |
@@ -1,1 +0,2 @@ | ||
//# sourceMappingURL=types.js.map | ||
//# sourceMappingURL=types.native.js.map |
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import React from "react"; | ||
function wrapChildrenInText(TextComponent, propsIn, extraProps) { | ||
var { children, textProps, size, noTextWrap, color, fontFamily, fontSize, fontWeight, letterSpacing, textAlign, fontStyle, maxFontSizeMultiplier } = propsIn; | ||
if (noTextWrap || !children) | ||
return [ | ||
children | ||
]; | ||
var { | ||
children, | ||
textProps, | ||
size, | ||
noTextWrap, | ||
color, | ||
fontFamily, | ||
fontSize, | ||
fontWeight, | ||
letterSpacing, | ||
textAlign, | ||
fontStyle, | ||
maxFontSizeMultiplier | ||
} = propsIn; | ||
if (noTextWrap || !children) return [children]; | ||
var props = { | ||
...extraProps | ||
}; | ||
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign), size && (props.size = size), fontStyle && (props.fontStyle = fontStyle), maxFontSizeMultiplier && (props.maxFontSizeMultiplier = maxFontSizeMultiplier), React.Children.toArray(children).map(function(child, index) { | ||
return typeof child == "string" ? ( | ||
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why | ||
/* @__PURE__ */ _jsx(TextComponent, { | ||
...props, | ||
...textProps, | ||
children: child | ||
}, index) | ||
) : child; | ||
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign), size && (props.size = size), fontStyle && (props.fontStyle = fontStyle), maxFontSizeMultiplier && (props.maxFontSizeMultiplier = maxFontSizeMultiplier), React.Children.toArray(children).map(function (child, index) { | ||
return typeof child == "string" ? | ||
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why | ||
/* @__PURE__ */ | ||
_jsx(TextComponent, { | ||
...props, | ||
...textProps, | ||
children: child | ||
}, index) : child; | ||
}); | ||
} | ||
export { | ||
wrapChildrenInText | ||
}; | ||
//# sourceMappingURL=wrapChildrenInText.js.map | ||
export { wrapChildrenInText }; | ||
//# sourceMappingURL=wrapChildrenInText.native.js.map |
{ | ||
"name": "@tamagui/text", | ||
"version": "1.111.8", | ||
"version": "1.111.9", | ||
"sideEffects": [ | ||
@@ -28,3 +28,3 @@ "*.css" | ||
".": { | ||
"react-native-import": "./dist/esm/index.native.mjs", | ||
"react-native-import": "./dist/esm/index.native.js", | ||
"react-native": "./dist/cjs/index.native.js", | ||
@@ -37,8 +37,8 @@ "types": "./types/index.d.ts", | ||
"dependencies": { | ||
"@tamagui/get-font-sized": "1.111.8", | ||
"@tamagui/helpers-tamagui": "1.111.8", | ||
"@tamagui/web": "1.111.8" | ||
"@tamagui/get-font-sized": "1.111.9", | ||
"@tamagui/helpers-tamagui": "1.111.9", | ||
"@tamagui/web": "1.111.9" | ||
}, | ||
"devDependencies": { | ||
"@tamagui/build": "1.111.8", | ||
"@tamagui/build": "1.111.9", | ||
"react": "^18.2.0 || ^19.0.0" | ||
@@ -45,0 +45,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9
80496
49161
116
1443
16
65
+ Added@tamagui/compose-refs@1.111.9(transitive)
+ Added@tamagui/constants@1.111.9(transitive)
+ Added@tamagui/core@1.111.9(transitive)
+ Added@tamagui/get-font-sized@1.111.9(transitive)
+ Added@tamagui/helpers@1.111.9(transitive)
+ Added@tamagui/helpers-tamagui@1.111.9(transitive)
+ Added@tamagui/normalize-css-color@1.111.9(transitive)
+ Added@tamagui/react-native-use-pressable@1.111.9(transitive)
+ Added@tamagui/react-native-use-responder-events@1.111.9(transitive)
+ Added@tamagui/simple-hash@1.111.9(transitive)
+ Added@tamagui/timer@1.111.9(transitive)
+ Added@tamagui/types@1.111.9(transitive)
+ Added@tamagui/use-did-finish-ssr@1.111.9(transitive)
+ Added@tamagui/use-event@1.111.9(transitive)
+ Added@tamagui/use-force-update@1.111.9(transitive)
+ Added@tamagui/web@1.111.9(transitive)
- Removed@tamagui/compose-refs@1.111.8(transitive)
- Removed@tamagui/constants@1.111.8(transitive)
- Removed@tamagui/core@1.111.8(transitive)
- Removed@tamagui/get-font-sized@1.111.8(transitive)
- Removed@tamagui/helpers@1.111.8(transitive)
- Removed@tamagui/helpers-tamagui@1.111.8(transitive)
- Removed@tamagui/normalize-css-color@1.111.8(transitive)
- Removed@tamagui/react-native-use-pressable@1.111.8(transitive)
- Removed@tamagui/react-native-use-responder-events@1.111.8(transitive)
- Removed@tamagui/simple-hash@1.111.8(transitive)
- Removed@tamagui/timer@1.111.8(transitive)
- Removed@tamagui/types@1.111.8(transitive)
- Removed@tamagui/use-did-finish-ssr@1.111.8(transitive)
- Removed@tamagui/use-event@1.111.8(transitive)
- Removed@tamagui/use-force-update@1.111.8(transitive)
- Removed@tamagui/web@1.111.8(transitive)
Updated@tamagui/web@1.111.9