@butternutbox/pawprint-native 0.23.2 → 0.23.3
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 +6 -6
- package/CHANGELOG.md +10 -0
- package/dist/index.cjs +26 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Button/Button.tsx +20 -27
- package/src/components/atoms/Tag/Tag.tsx +14 -6
- package/src/components/atoms/Typography/Typography.tsx +6 -0
- package/src/components/molecules/TabNavigation/TabNavigation.tsx +6 -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
|
-
[
|
|
11
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m1.07 MB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in 7873ms
|
|
13
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m551.89 KB[39m
|
|
10
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m552.50 KB[39m
|
|
14
11
|
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.07 MB[39m
|
|
15
|
-
[32mCJS[39m ⚡️ Build success in
|
|
16
|
-
[
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 8360ms
|
|
13
|
+
[32mESM[39m [1mdist/index.js [22m[32m522.10 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m1.07 MB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 8360ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 23889ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m102.54 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m102.54 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @butternutbox/pawprint-native
|
|
2
2
|
|
|
3
|
+
## 0.23.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1a54efb: Let component labels wrap to multiple lines instead of clipping/overflowing — surfaced by long translated (e.g. German) copy.
|
|
8
|
+
- **Typography**: token-mode text now sets `flexShrink`, so component-owned labels that live in flex rows (buttons, tags, tabs) can shrink and wrap instead of laying out on one line and overflowing.
|
|
9
|
+
- **Button**: the label is now a direct child of the button row (no intermediate wrapper `View`) so it actually re-wraps under the button's `minHeight`; loading state dims the label via a transparent colour instead of a wrapper opacity.
|
|
10
|
+
- **Tag**: the label can shrink so a long tag wraps within its container instead of growing past it (e.g. overflowing a card's padding).
|
|
11
|
+
- **TabNavigation**: tabs use `minHeight` (not a fixed `height`) so a tab whose label wraps to more than one line grows to fit and stays aligned with its neighbours; tab labels are now centre-aligned.
|
|
12
|
+
|
|
3
13
|
## 0.23.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -253,7 +253,14 @@ var Typography = React66__default.default.forwardRef(
|
|
|
253
253
|
"textTransform",
|
|
254
254
|
"textDecoration"
|
|
255
255
|
]);
|
|
256
|
-
const style = __spreadValues(__spreadValues(__spreadValues({
|
|
256
|
+
const style = __spreadValues(__spreadValues(__spreadValues({
|
|
257
|
+
// Token-mode text is component-owned and lives inside flex rows
|
|
258
|
+
// (buttons, tabs, tags). `flexShrink` lets it wrap to multiple lines
|
|
259
|
+
// when the row is narrower than the text, instead of laying out on one
|
|
260
|
+
// line and overflowing/clipping — a `<Text>` nested in a flex `<View>`
|
|
261
|
+
// won't re-wrap on its own after the parent's width is resolved.
|
|
262
|
+
flexShrink: 1
|
|
263
|
+
}, nativeTokenToStyle(token)), color2 ? { color: color2 } : {}), getCommonStyles(align2, textTransform2, textDecoration2));
|
|
257
264
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
258
265
|
StyledText,
|
|
259
266
|
__spreadValues({
|
|
@@ -1227,9 +1234,6 @@ var StyledButton = styled51__default.default(reactNative.Pressable)(
|
|
|
1227
1234
|
opacity: buttonOpacity
|
|
1228
1235
|
}, buttonBorderWidth ? { borderWidth: buttonBorderWidth, borderColor: buttonBorderColor } : {}), buttonFullWidth ? { width: "100%" } : {})
|
|
1229
1236
|
);
|
|
1230
|
-
var StyledTextWrapper = styled51__default.default(reactNative.View)(({ textOpacity, fullWidth }) => __spreadValues({
|
|
1231
|
-
opacity: textOpacity
|
|
1232
|
-
}, fullWidth ? { flexShrink: 1 } : {}));
|
|
1233
1237
|
var StyledSpinnerWrapper = styled51__default.default(reactNative.View)({
|
|
1234
1238
|
position: "absolute",
|
|
1235
1239
|
alignItems: "center",
|
|
@@ -1320,7 +1324,7 @@ var Button = React66__default.default.forwardRef(
|
|
|
1320
1324
|
}, rest), {
|
|
1321
1325
|
children: [
|
|
1322
1326
|
startIcon && /* @__PURE__ */ jsxRuntime.jsx(IconWrapper, { children: startIcon }),
|
|
1323
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1327
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1324
1328
|
Typography,
|
|
1325
1329
|
{
|
|
1326
1330
|
token: {
|
|
@@ -1330,11 +1334,11 @@ var Button = React66__default.default.forwardRef(
|
|
|
1330
1334
|
lineHeight: typography.lineHeight,
|
|
1331
1335
|
letterSpacing: typography.letterSpacing
|
|
1332
1336
|
},
|
|
1333
|
-
color: variantStyles.textColor,
|
|
1337
|
+
color: loading ? "transparent" : variantStyles.textColor,
|
|
1334
1338
|
align: "center",
|
|
1335
1339
|
children
|
|
1336
1340
|
}
|
|
1337
|
-
)
|
|
1341
|
+
),
|
|
1338
1342
|
endIcon && /* @__PURE__ */ jsxRuntime.jsx(IconWrapper, { children: endIcon }),
|
|
1339
1343
|
loading && /* @__PURE__ */ jsxRuntime.jsx(StyledSpinnerWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1340
1344
|
Spinner,
|
|
@@ -4929,6 +4933,9 @@ var StyledTag = styled51__default.default(reactNative.View)(({ theme: theme2, ta
|
|
|
4929
4933
|
backgroundColor: backgroundColorMap[tagVariant]
|
|
4930
4934
|
};
|
|
4931
4935
|
});
|
|
4936
|
+
var StyledLabel = styled51__default.default(reactNative.View)({
|
|
4937
|
+
flexShrink: 1
|
|
4938
|
+
});
|
|
4932
4939
|
var Tag = React66__default.default.forwardRef(
|
|
4933
4940
|
(_a, ref) => {
|
|
4934
4941
|
var _b = _a, { variant = "primary", size = "medium", icon, children } = _b, rest = __objRest(_b, ["variant", "size", "icon", "children"]);
|
|
@@ -4966,14 +4973,14 @@ var Tag = React66__default.default.forwardRef(
|
|
|
4966
4973
|
colour: iconColourMap[variant]
|
|
4967
4974
|
}
|
|
4968
4975
|
),
|
|
4969
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4976
|
+
/* @__PURE__ */ jsxRuntime.jsx(StyledLabel, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4970
4977
|
Typography,
|
|
4971
4978
|
{
|
|
4972
4979
|
token: typography[size].default,
|
|
4973
4980
|
color: textColorMap[variant],
|
|
4974
4981
|
children
|
|
4975
4982
|
}
|
|
4976
|
-
)
|
|
4983
|
+
) })
|
|
4977
4984
|
] }));
|
|
4978
4985
|
}
|
|
4979
4986
|
);
|
|
@@ -5222,7 +5229,7 @@ var StyledLabelWrapper = styled51__default.default(reactNative.View)({
|
|
|
5222
5229
|
justifyContent: "space-between",
|
|
5223
5230
|
width: "100%"
|
|
5224
5231
|
});
|
|
5225
|
-
var
|
|
5232
|
+
var StyledLabel2 = styled51__default.default(reactNative.View)(({ labelGap }) => ({
|
|
5226
5233
|
flexDirection: "row",
|
|
5227
5234
|
alignItems: "center",
|
|
5228
5235
|
gap: labelGap
|
|
@@ -5253,7 +5260,7 @@ var TextAreaLabel = React66__default.default.forwardRef(
|
|
|
5253
5260
|
const showCharacterCount = maxLength !== void 0 && currentLength !== void 0;
|
|
5254
5261
|
const isOverLimit = currentLength !== void 0 && maxLength !== void 0 && currentLength > maxLength;
|
|
5255
5262
|
return /* @__PURE__ */ jsxRuntime.jsxs(StyledLabelWrapper, __spreadProps(__spreadValues({ ref }, rest), { children: [
|
|
5256
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5263
|
+
/* @__PURE__ */ jsxRuntime.jsxs(StyledLabel2, { labelGap: parseTokenValue20(spacing.label.gap), children: [
|
|
5257
5264
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5258
5265
|
Typography,
|
|
5259
5266
|
{
|
|
@@ -8968,7 +8975,7 @@ var StyledContentWrapper = styled51__default.default(reactNative.View)(({ theme:
|
|
|
8968
8975
|
minWidth: 0
|
|
8969
8976
|
};
|
|
8970
8977
|
});
|
|
8971
|
-
var
|
|
8978
|
+
var StyledTextWrapper = styled51__default.default(reactNative.View)({
|
|
8972
8979
|
flex: 1,
|
|
8973
8980
|
minWidth: 0
|
|
8974
8981
|
});
|
|
@@ -9003,7 +9010,7 @@ var SelectFieldItem = React66__default.default.forwardRef(
|
|
|
9003
9010
|
children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { ref, children: /* @__PURE__ */ jsxRuntime.jsxs(StyledItem3, __spreadProps(__spreadValues({ disabled, style: { backgroundColor } }, rest), { children: [
|
|
9004
9011
|
leadingIcon && /* @__PURE__ */ jsxRuntime.jsx(StyledIconWrapper3, { children: leadingIcon }),
|
|
9005
9012
|
/* @__PURE__ */ jsxRuntime.jsxs(StyledContentWrapper, { children: [
|
|
9006
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9013
|
+
/* @__PURE__ */ jsxRuntime.jsx(StyledTextWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(StyledItemText, { style: { color: textColor }, children: itemText }) }),
|
|
9007
9014
|
hintText && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9008
9015
|
StyledHintText,
|
|
9009
9016
|
{
|
|
@@ -12381,7 +12388,11 @@ var StyledTab = styled51__default.default(reactNative.Pressable)(
|
|
|
12381
12388
|
alignItems: "center",
|
|
12382
12389
|
justifyContent: "center",
|
|
12383
12390
|
gap: tabGap,
|
|
12384
|
-
height
|
|
12391
|
+
// `minHeight` (not a fixed `height`) so a tab whose label wraps to more
|
|
12392
|
+
// than one line — e.g. long translated copy in `fixed` layout — grows to
|
|
12393
|
+
// fit instead of clipping/overflowing. The list's `alignItems: "stretch"`
|
|
12394
|
+
// then matches every tab to the tallest, keeping labels vertically aligned.
|
|
12395
|
+
minHeight: tabHeight,
|
|
12385
12396
|
minWidth: tabMinWidth,
|
|
12386
12397
|
paddingTop: tabPaddingTop,
|
|
12387
12398
|
paddingBottom: tabPaddingBottom,
|
|
@@ -12438,7 +12449,7 @@ var TabNavigationTab = React66__default.default.forwardRef(
|
|
|
12438
12449
|
children: [
|
|
12439
12450
|
avatar && /* @__PURE__ */ jsxRuntime.jsx(Avatar, __spreadValues({}, avatar)),
|
|
12440
12451
|
icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon, customColour: textColour, "aria-hidden": true }),
|
|
12441
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { token, color: textColour, children })
|
|
12452
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { token, color: textColour, align: "center", children })
|
|
12442
12453
|
]
|
|
12443
12454
|
})
|
|
12444
12455
|
) });
|