@butternutbox/pawprint-native 0.15.0 → 0.15.2
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 +7 -7
- package/CHANGELOG.md +20 -0
- package/dist/index.cjs +28 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +28 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Typography/Typography.tsx +10 -1
- package/src/components/molecules/NativeSelectPicker/NativeSelectPicker.styled.ts +35 -10
- package/src/components/molecules/Tooltip/Tooltip.stories.tsx +21 -0
- package/src/components/molecules/Tooltip/Tooltip.tsx +9 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
[34mCJS[39m Build start
|
|
8
8
|
[34mESM[39m Build start
|
|
9
9
|
[34mDTS[39m Build start
|
|
10
|
-
[32mESM[39m [1mdist/index.js [22m[32m502.
|
|
10
|
+
[32mESM[39m [1mdist/index.js [22m[32m502.93 KB[39m
|
|
11
11
|
[32mESM[39m [1mdist/index.js.map [22m[32m1.02 MB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m532.
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 7939ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m532.57 KB[39m
|
|
14
14
|
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.02 MB[39m
|
|
15
|
-
[32mCJS[39m ⚡️ Build success in
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[32m98.
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m98.
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 7939ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 22135ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m98.88 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m98.88 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @butternutbox/pawprint-native
|
|
2
2
|
|
|
3
|
+
## 0.15.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9ec51dd: `Tooltip`: widen the `text` prop to accept a `ReactNode` as well as a string.
|
|
8
|
+
Copy that needs part of it emphasised (bold price, coloured span, underline,
|
|
9
|
+
etc.) can now be passed as a node — e.g. a nested `<Typography weight="bold">`
|
|
10
|
+
or a `<Trans>` — which renders inside the tooltip's own `<Typography>`, so it
|
|
11
|
+
inherits the base font and only the emphasised span overrides it. Plain-string
|
|
12
|
+
usage is unchanged, and `accessibilityLabel` is still set when `text` is a
|
|
13
|
+
string.
|
|
14
|
+
|
|
15
|
+
## 0.15.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 55734f4: Fix Android text rendering in the design system:
|
|
20
|
+
- `Typography`: disable `includeFontPadding` and centre text vertically. Android reserves extra ascent/descent padding and top-aligns glyphs, which — with the tall Ida Narrow metrics — squeezed or clipped copy (headings, button labels) that renders fine on one line on iOS. Both props are Android-only, so iOS is unaffected.
|
|
21
|
+
- `NativeSelectPicker`: render the selected value, placeholder, dialog title and option labels in the brand font. They set `fontWeight` but no resolvable `fontFamily`, so they fell back to the system font — now resolved via `resolveFont` (same fix as `TextArea`).
|
|
22
|
+
|
|
3
23
|
## 0.15.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -226,7 +226,10 @@ var VARIANT_DEFAULTS = {
|
|
|
226
226
|
heading: { size: "md" },
|
|
227
227
|
display: { size: "lg" }
|
|
228
228
|
};
|
|
229
|
-
var StyledText = styled51__default.default(reactNative.Text)({
|
|
229
|
+
var StyledText = styled51__default.default(reactNative.Text)({
|
|
230
|
+
includeFontPadding: false,
|
|
231
|
+
textAlignVertical: "center"
|
|
232
|
+
});
|
|
230
233
|
var Typography = React66__default.default.forwardRef(
|
|
231
234
|
(props, ref) => {
|
|
232
235
|
const theme2 = react.useTheme();
|
|
@@ -8911,6 +8914,16 @@ var { dimensions } = semantics;
|
|
|
8911
8914
|
var parseSize = (value) => {
|
|
8912
8915
|
return parseInt(value.replace("px", ""), 10);
|
|
8913
8916
|
};
|
|
8917
|
+
var resolveTypography = (typography) => {
|
|
8918
|
+
var _a, _b;
|
|
8919
|
+
const { fontFamily } = resolveFont(
|
|
8920
|
+
typography.fontFamily,
|
|
8921
|
+
typography.fontWeight
|
|
8922
|
+
);
|
|
8923
|
+
const fontSize = parseSize(typography.fontSize);
|
|
8924
|
+
const letterSpacing = ((_a = typography.letterSpacing) == null ? void 0 : _a.endsWith("%")) ? parseFloat(typography.letterSpacing) / 100 * fontSize : parseFloat((_b = typography.letterSpacing) != null ? _b : "0");
|
|
8925
|
+
return { fontFamily, fontSize, letterSpacing };
|
|
8926
|
+
};
|
|
8914
8927
|
var Wrapper = styled51__default.default(reactNative.View)({
|
|
8915
8928
|
borderWidth: parseSize(inputTokens.borderWidth.field.selected),
|
|
8916
8929
|
borderColor: inputTokens.colour.field.border.selected,
|
|
@@ -8928,18 +8941,16 @@ var SelectIcon = styled51__default.default(Animated10__default.default.View)({
|
|
|
8928
8941
|
right: 0,
|
|
8929
8942
|
marginRight: 0
|
|
8930
8943
|
});
|
|
8931
|
-
var InputText2 = styled51__default.default(reactNative.Text)({
|
|
8932
|
-
color: inputTokens.colour.field.text.default
|
|
8933
|
-
|
|
8934
|
-
fontWeight: inputTokens.field.placeholder.default.fontWeight,
|
|
8944
|
+
var InputText2 = styled51__default.default(reactNative.Text)(__spreadProps(__spreadValues({
|
|
8945
|
+
color: inputTokens.colour.field.text.default
|
|
8946
|
+
}, resolveTypography(inputTokens.field.placeholder.default)), {
|
|
8935
8947
|
flex: 1
|
|
8936
|
-
});
|
|
8937
|
-
var PlaceholderText = styled51__default.default(reactNative.Text)({
|
|
8938
|
-
color: inputTokens.colour.field.text.placeholder
|
|
8939
|
-
|
|
8940
|
-
fontWeight: inputTokens.field.placeholder.default.fontWeight,
|
|
8948
|
+
}));
|
|
8949
|
+
var PlaceholderText = styled51__default.default(reactNative.Text)(__spreadProps(__spreadValues({
|
|
8950
|
+
color: inputTokens.colour.field.text.placeholder
|
|
8951
|
+
}, resolveTypography(inputTokens.field.placeholder.default)), {
|
|
8941
8952
|
flex: 1
|
|
8942
|
-
});
|
|
8953
|
+
}));
|
|
8943
8954
|
var ModalOverlay = styled51__default.default(reactNative.View)({
|
|
8944
8955
|
flex: 1,
|
|
8945
8956
|
backgroundColor: "rgba(0, 0, 0, 0.32)",
|
|
@@ -8955,13 +8966,11 @@ var AndroidDialog = styled51__default.default(reactNative.View)({
|
|
|
8955
8966
|
paddingBottom: parseSize(dimensions.spacing.xl),
|
|
8956
8967
|
paddingHorizontal: parseSize(dimensions.spacing.md)
|
|
8957
8968
|
});
|
|
8958
|
-
var DialogTitle = styled51__default.default(reactNative.Text)({
|
|
8959
|
-
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
8960
|
-
fontWeight: inputTokens.text.label.fontWeight,
|
|
8969
|
+
var DialogTitle = styled51__default.default(reactNative.Text)(__spreadProps(__spreadValues({}, resolveTypography(inputTokens.text.label)), {
|
|
8961
8970
|
color: inputTokens.colour.field.text.default,
|
|
8962
8971
|
marginBottom: parseSize(dimensions.spacing.md),
|
|
8963
8972
|
marginLeft: parseSize(dimensions.spacing.xs)
|
|
8964
|
-
});
|
|
8973
|
+
}));
|
|
8965
8974
|
var AndroidOptionRow = styled51__default.default(reactNative.View)({
|
|
8966
8975
|
flexDirection: "row",
|
|
8967
8976
|
alignItems: "center",
|
|
@@ -8987,9 +8996,9 @@ var RadioInner = styled51__default.default(reactNative.View)({
|
|
|
8987
8996
|
backgroundColor: inputTokens.colour.field.border.selected
|
|
8988
8997
|
});
|
|
8989
8998
|
var AndroidOptionText = styled51__default.default(reactNative.Text)(
|
|
8990
|
-
({ isSelected }) => ({
|
|
8991
|
-
|
|
8992
|
-
|
|
8999
|
+
({ isSelected }) => __spreadProps(__spreadValues({}, resolveTypography(
|
|
9000
|
+
isSelected ? inputTokens.text.label : inputTokens.field.placeholder.default
|
|
9001
|
+
)), {
|
|
8993
9002
|
color: inputTokens.colour.field.text.default,
|
|
8994
9003
|
flex: 1
|
|
8995
9004
|
})
|
|
@@ -10103,7 +10112,7 @@ var Tooltip = React66__default.default.forwardRef(
|
|
|
10103
10112
|
ref,
|
|
10104
10113
|
accessible: true,
|
|
10105
10114
|
accessibilityRole: "none",
|
|
10106
|
-
accessibilityLabel: text,
|
|
10115
|
+
accessibilityLabel: typeof text === "string" ? text : void 0,
|
|
10107
10116
|
accessibilityLiveRegion: "polite"
|
|
10108
10117
|
}, props), {
|
|
10109
10118
|
children: [
|