@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/dist/index.d.cts
CHANGED
|
@@ -1829,7 +1829,14 @@ declare const StackedNotifications: React.ForwardRefExoticComponent<StackedNotif
|
|
|
1829
1829
|
type TooltipAlignment = "left" | "middle" | "right";
|
|
1830
1830
|
type TooltipPosition = "top" | "bottom";
|
|
1831
1831
|
type TooltipOwnProps = {
|
|
1832
|
-
|
|
1832
|
+
/**
|
|
1833
|
+
* Tooltip body content. Pass a plain string for simple copy, or a
|
|
1834
|
+
* `ReactNode` (e.g. a `<Trans>` / nested `<Text>`) when part of the text
|
|
1835
|
+
* needs its own styling — bold, colour, underline, etc. A node is rendered
|
|
1836
|
+
* inside the tooltip's own `<Typography>`, so it inherits the base font and
|
|
1837
|
+
* only the emphasised spans override it.
|
|
1838
|
+
*/
|
|
1839
|
+
text: string | React.ReactNode;
|
|
1833
1840
|
alignment?: TooltipAlignment;
|
|
1834
1841
|
position?: TooltipPosition;
|
|
1835
1842
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1829,7 +1829,14 @@ declare const StackedNotifications: React.ForwardRefExoticComponent<StackedNotif
|
|
|
1829
1829
|
type TooltipAlignment = "left" | "middle" | "right";
|
|
1830
1830
|
type TooltipPosition = "top" | "bottom";
|
|
1831
1831
|
type TooltipOwnProps = {
|
|
1832
|
-
|
|
1832
|
+
/**
|
|
1833
|
+
* Tooltip body content. Pass a plain string for simple copy, or a
|
|
1834
|
+
* `ReactNode` (e.g. a `<Trans>` / nested `<Text>`) when part of the text
|
|
1835
|
+
* needs its own styling — bold, colour, underline, etc. A node is rendered
|
|
1836
|
+
* inside the tooltip's own `<Typography>`, so it inherits the base font and
|
|
1837
|
+
* only the emphasised spans override it.
|
|
1838
|
+
*/
|
|
1839
|
+
text: string | React.ReactNode;
|
|
1833
1840
|
alignment?: TooltipAlignment;
|
|
1834
1841
|
position?: TooltipPosition;
|
|
1835
1842
|
/**
|
package/dist/index.js
CHANGED
|
@@ -188,7 +188,10 @@ var VARIANT_DEFAULTS = {
|
|
|
188
188
|
heading: { size: "md" },
|
|
189
189
|
display: { size: "lg" }
|
|
190
190
|
};
|
|
191
|
-
var StyledText = styled51(Text)({
|
|
191
|
+
var StyledText = styled51(Text)({
|
|
192
|
+
includeFontPadding: false,
|
|
193
|
+
textAlignVertical: "center"
|
|
194
|
+
});
|
|
192
195
|
var Typography = React66.forwardRef(
|
|
193
196
|
(props, ref) => {
|
|
194
197
|
const theme2 = useTheme();
|
|
@@ -8873,6 +8876,16 @@ var { dimensions } = semantics;
|
|
|
8873
8876
|
var parseSize = (value) => {
|
|
8874
8877
|
return parseInt(value.replace("px", ""), 10);
|
|
8875
8878
|
};
|
|
8879
|
+
var resolveTypography = (typography) => {
|
|
8880
|
+
var _a, _b;
|
|
8881
|
+
const { fontFamily } = resolveFont(
|
|
8882
|
+
typography.fontFamily,
|
|
8883
|
+
typography.fontWeight
|
|
8884
|
+
);
|
|
8885
|
+
const fontSize = parseSize(typography.fontSize);
|
|
8886
|
+
const letterSpacing = ((_a = typography.letterSpacing) == null ? void 0 : _a.endsWith("%")) ? parseFloat(typography.letterSpacing) / 100 * fontSize : parseFloat((_b = typography.letterSpacing) != null ? _b : "0");
|
|
8887
|
+
return { fontFamily, fontSize, letterSpacing };
|
|
8888
|
+
};
|
|
8876
8889
|
var Wrapper = styled51(View)({
|
|
8877
8890
|
borderWidth: parseSize(inputTokens.borderWidth.field.selected),
|
|
8878
8891
|
borderColor: inputTokens.colour.field.border.selected,
|
|
@@ -8890,18 +8903,16 @@ var SelectIcon = styled51(Animated10.View)({
|
|
|
8890
8903
|
right: 0,
|
|
8891
8904
|
marginRight: 0
|
|
8892
8905
|
});
|
|
8893
|
-
var InputText2 = styled51(Text)({
|
|
8894
|
-
color: inputTokens.colour.field.text.default
|
|
8895
|
-
|
|
8896
|
-
fontWeight: inputTokens.field.placeholder.default.fontWeight,
|
|
8906
|
+
var InputText2 = styled51(Text)(__spreadProps(__spreadValues({
|
|
8907
|
+
color: inputTokens.colour.field.text.default
|
|
8908
|
+
}, resolveTypography(inputTokens.field.placeholder.default)), {
|
|
8897
8909
|
flex: 1
|
|
8898
|
-
});
|
|
8899
|
-
var PlaceholderText = styled51(Text)({
|
|
8900
|
-
color: inputTokens.colour.field.text.placeholder
|
|
8901
|
-
|
|
8902
|
-
fontWeight: inputTokens.field.placeholder.default.fontWeight,
|
|
8910
|
+
}));
|
|
8911
|
+
var PlaceholderText = styled51(Text)(__spreadProps(__spreadValues({
|
|
8912
|
+
color: inputTokens.colour.field.text.placeholder
|
|
8913
|
+
}, resolveTypography(inputTokens.field.placeholder.default)), {
|
|
8903
8914
|
flex: 1
|
|
8904
|
-
});
|
|
8915
|
+
}));
|
|
8905
8916
|
var ModalOverlay = styled51(View)({
|
|
8906
8917
|
flex: 1,
|
|
8907
8918
|
backgroundColor: "rgba(0, 0, 0, 0.32)",
|
|
@@ -8917,13 +8928,11 @@ var AndroidDialog = styled51(View)({
|
|
|
8917
8928
|
paddingBottom: parseSize(dimensions.spacing.xl),
|
|
8918
8929
|
paddingHorizontal: parseSize(dimensions.spacing.md)
|
|
8919
8930
|
});
|
|
8920
|
-
var DialogTitle = styled51(Text)({
|
|
8921
|
-
fontSize: parseSize(inputTokens.field.placeholder.default.fontSize),
|
|
8922
|
-
fontWeight: inputTokens.text.label.fontWeight,
|
|
8931
|
+
var DialogTitle = styled51(Text)(__spreadProps(__spreadValues({}, resolveTypography(inputTokens.text.label)), {
|
|
8923
8932
|
color: inputTokens.colour.field.text.default,
|
|
8924
8933
|
marginBottom: parseSize(dimensions.spacing.md),
|
|
8925
8934
|
marginLeft: parseSize(dimensions.spacing.xs)
|
|
8926
|
-
});
|
|
8935
|
+
}));
|
|
8927
8936
|
var AndroidOptionRow = styled51(View)({
|
|
8928
8937
|
flexDirection: "row",
|
|
8929
8938
|
alignItems: "center",
|
|
@@ -8949,9 +8958,9 @@ var RadioInner = styled51(View)({
|
|
|
8949
8958
|
backgroundColor: inputTokens.colour.field.border.selected
|
|
8950
8959
|
});
|
|
8951
8960
|
var AndroidOptionText = styled51(Text)(
|
|
8952
|
-
({ isSelected }) => ({
|
|
8953
|
-
|
|
8954
|
-
|
|
8961
|
+
({ isSelected }) => __spreadProps(__spreadValues({}, resolveTypography(
|
|
8962
|
+
isSelected ? inputTokens.text.label : inputTokens.field.placeholder.default
|
|
8963
|
+
)), {
|
|
8955
8964
|
color: inputTokens.colour.field.text.default,
|
|
8956
8965
|
flex: 1
|
|
8957
8966
|
})
|
|
@@ -10065,7 +10074,7 @@ var Tooltip = React66.forwardRef(
|
|
|
10065
10074
|
ref,
|
|
10066
10075
|
accessible: true,
|
|
10067
10076
|
accessibilityRole: "none",
|
|
10068
|
-
accessibilityLabel: text,
|
|
10077
|
+
accessibilityLabel: typeof text === "string" ? text : void 0,
|
|
10069
10078
|
accessibilityLiveRegion: "polite"
|
|
10070
10079
|
}, props), {
|
|
10071
10080
|
children: [
|