@butternutbox/pawprint-native 0.13.0 → 0.14.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +17 -0
- package/dist/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/atoms/Illustration/Illustration.tsx +2 -2
- package/src/components/atoms/TextArea/TextAreaField.tsx +15 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@butternutbox/pawprint-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ButternutBox Pawprint Design System - React Native Components",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test": "vitest run"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@butternutbox/pawprint-tokens": "^0.
|
|
25
|
+
"@butternutbox/pawprint-tokens": "^0.3.0",
|
|
26
26
|
"@emotion/native": "^11.11.0",
|
|
27
27
|
"@emotion/react": "^11.14.0",
|
|
28
28
|
"@rn-primitives/avatar": "^1.4.0",
|
|
@@ -3,7 +3,7 @@ import { View, ViewProps } from "react-native"
|
|
|
3
3
|
import styled from "@emotion/native"
|
|
4
4
|
import { useTheme } from "@emotion/react"
|
|
5
5
|
|
|
6
|
-
type IllustrationSize = "sm" | "lg" | "xl"
|
|
6
|
+
type IllustrationSize = "sm" | "lg" | "xl" | "xxl" | "xxxl"
|
|
7
7
|
|
|
8
8
|
type PawprintIllustration = React.ComponentType<{
|
|
9
9
|
width?: number
|
|
@@ -42,7 +42,7 @@ const StyledRoot = styled(View)<{
|
|
|
42
42
|
* ```
|
|
43
43
|
*
|
|
44
44
|
* @param illustration - **(required)** Illustration component
|
|
45
|
-
* @param size - *(optional)* Size variant: sm (default), lg, xl
|
|
45
|
+
* @param size - *(optional)* Size variant: sm (default), lg, xl, xxl, xxxl
|
|
46
46
|
* @param aria-label - *(optional)* Accessible label
|
|
47
47
|
*/
|
|
48
48
|
const Illustration = React.forwardRef<View, IllustrationProps>(
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
Error as ErrorIcon,
|
|
14
14
|
CheckCircle as SuccessIcon
|
|
15
15
|
} from "@butternutbox/pawprint-icons/core"
|
|
16
|
+
import { resolveFont } from "../../../fonts"
|
|
16
17
|
import { Icon } from "../Icon"
|
|
17
18
|
import type { InputState } from "../Input/InputField"
|
|
18
19
|
|
|
@@ -50,13 +51,26 @@ const StyledTextAreaWrapper = styled(Animated.View)<{
|
|
|
50
51
|
})
|
|
51
52
|
|
|
52
53
|
const StyledTextArea = styled(TextInput)(({ theme }) => {
|
|
53
|
-
const { colour } = theme.tokens.components.inputs
|
|
54
|
+
const { colour, field } = theme.tokens.components.inputs
|
|
55
|
+
const typography = field.placeholder.default
|
|
56
|
+
const { fontFamily } = resolveFont(
|
|
57
|
+
typography.fontFamily,
|
|
58
|
+
typography.fontWeight
|
|
59
|
+
)
|
|
60
|
+
const fontSize = parseTokenValue(typography.fontSize)
|
|
61
|
+
const letterSpacing = typography.letterSpacing?.endsWith("%")
|
|
62
|
+
? (parseFloat(typography.letterSpacing) / 100) * fontSize
|
|
63
|
+
: parseFloat(typography.letterSpacing ?? "0")
|
|
64
|
+
|
|
54
65
|
return {
|
|
55
66
|
flex: 1,
|
|
56
67
|
minWidth: 0,
|
|
57
68
|
minHeight: 0,
|
|
58
69
|
padding: 0,
|
|
59
70
|
color: colour.field.text.default,
|
|
71
|
+
fontFamily,
|
|
72
|
+
fontSize,
|
|
73
|
+
letterSpacing,
|
|
60
74
|
textAlignVertical: "top",
|
|
61
75
|
// Suppress the browser default focus outline on React Native Web —
|
|
62
76
|
// the focus indicator is rendered on the wrapper instead.
|