@butternutbox/pawprint-native 0.7.0 → 0.9.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 +7 -7
- package/CHANGELOG.md +31 -0
- package/dist/index.cjs +164 -204
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -10
- package/dist/index.d.ts +8 -10
- package/dist/index.js +164 -204
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Switch/Switch.tsx +3 -1
- package/src/components/molecules/Notification/Notification.stories.tsx +4 -0
- package/src/components/molecules/Notification/Notification.tsx +43 -36
- package/src/components/molecules/ProductDisplayCard/ProductDisplayCard.stories.tsx +2 -84
- package/src/components/molecules/ProductDisplayCard/ProductDisplayCard.test.tsx +1 -7
- package/src/components/molecules/ProductDisplayCard/ProductDisplayCard.tsx +58 -104
- package/src/components/molecules/ProductListingCard/Badge.tsx +2 -2
- package/src/components/molecules/ProductListingCard/ProductListingCard.tsx +22 -46
- package/src/components/molecules/TabNavigation/TabNavigation.stories.tsx +35 -0
- package/src/components/molecules/TabNavigation/TabNavigation.tsx +15 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
[32mCJS[39m [1mdist/ibm-plex-sans-condensed-500-normal-IEQBNVGX.woff2 [22m[32m19.48 KB[39m
|
|
14
14
|
[32mCJS[39m [1mdist/ibm-plex-sans-condensed-600-normal-UX5ZU5T6.woff2 [22m[32m19.35 KB[39m
|
|
15
15
|
[32mCJS[39m [1mdist/ibm-plex-sans-condensed-700-normal-4PFYFTSO.woff2 [22m[32m18.90 KB[39m
|
|
16
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m1.
|
|
17
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[32m2.
|
|
18
|
-
[32mCJS[39m ⚡️ Build success in
|
|
16
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m1.78 MB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m2.67 MB[39m
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 11862ms
|
|
19
19
|
[32mESM[39m [1mdist/ida-narrow-500-normal-C6I2PK4T.woff2 [22m[32m47.41 KB[39m
|
|
20
20
|
[32mESM[39m [1mdist/ida-narrow-700-normal-UPHPRIN6.woff2 [22m[32m49.90 KB[39m
|
|
21
21
|
[32mESM[39m [1mdist/ibm-plex-sans-condensed-400-normal-I2XLJNNB.woff2 [22m[32m19.33 KB[39m
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
[32mESM[39m [1mdist/ibm-plex-sans-condensed-700-normal-4PFYFTSO.woff2 [22m[32m18.90 KB[39m
|
|
25
25
|
[32mESM[39m [1mdist/index.js [22m[32m1.71 MB[39m
|
|
26
26
|
[32mESM[39m [1mdist/index.js.map [22m[32m2.67 MB[39m
|
|
27
|
-
[32mESM[39m ⚡️ Build success in
|
|
28
|
-
[32mDTS[39m ⚡️ Build success in
|
|
29
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[32m90.
|
|
30
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m90.
|
|
27
|
+
[32mESM[39m ⚡️ Build success in 11871ms
|
|
28
|
+
[32mDTS[39m ⚡️ Build success in 22152ms
|
|
29
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m90.17 KB[39m
|
|
30
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m90.17 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @butternutbox/pawprint-native
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6d84559: Add a web `NumberField` molecule (stepper) mirroring the native API, and align `ProductDisplayCard` with Figma across both platforms:
|
|
8
|
+
- Use `NumberField` for the quantity stepper (web previously used the plain `NumberInput` atom).
|
|
9
|
+
- 148×148 image (`thumbnailWidth` defaults to 148) and banner styling: square top / 12px bottom radius, `md` horizontal + 27px top padding, tucked behind the card.
|
|
10
|
+
- Web `device` prop now drives title/subtext typography (desktop 20/16, mobile 16/14).
|
|
11
|
+
- Remove `showImageQuantityBadge`, `borderless`, `thumbnailBackgroundColor`, and the per-button `showIncrementButton`/`showDecrementButton` props (use `hideQuantityButtons` instead). Native is now mobile-only (no `device` prop).
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 6d84559: Make `ProductDisplayCard` height responsive and cap its width (web + native):
|
|
16
|
+
- Replace the fixed `maxHeight: 148` with `minHeight: 148` so the card grows instead of clipping when the title wraps to multiple lines (e.g. translations).
|
|
17
|
+
- Cap the width at the Figma frame sizes — web 520 (desktop) / 358 (mobile), native 358 — while staying fluid below that.
|
|
18
|
+
- The image stretches to fill a taller card (cover crop) instead of leaving a gap, keeping its 148px width and square shape when the content fits.
|
|
19
|
+
|
|
20
|
+
- 6d84559: Align `ProductListingCard` with Figma (web + native): add the 12px image border radius, fix the pinned badge (un-double-wrap so the right radius is 4px, 8px horizontal padding, brand background), and tighten the title bottom spacing to 6px and the size→price spacing to 16px.
|
|
21
|
+
|
|
22
|
+
Web also fixes the responsive `Grid` (columns were stuck at 1 because the media queries lived in an inline `style` prop) and sizes the standalone stories to the Figma widths (232 / 192).
|
|
23
|
+
|
|
24
|
+
## 0.8.0
|
|
25
|
+
|
|
26
|
+
### Minor Changes
|
|
27
|
+
|
|
28
|
+
- 4409f6c: Add optional `icon` and `avatar` props to `TabNavigation.Tab`. The icon colour tracks the tab's label colour and the avatar is forwarded to the `Avatar` atom, matching the Figma design.
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 27ca8b6: Add styling to optional notification link; prevent switch label from overflowing
|
|
33
|
+
|
|
3
34
|
## 0.7.0
|
|
4
35
|
|
|
5
36
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -7880,7 +7880,9 @@ var StyledThumb = styled51__default.default(reactNative.Animated.View)(({ thumbS
|
|
|
7880
7880
|
position: "absolute"
|
|
7881
7881
|
}));
|
|
7882
7882
|
var StyledContent = styled51__default.default(reactNative.View)(({ contentGap }) => ({
|
|
7883
|
-
gap: contentGap
|
|
7883
|
+
gap: contentGap,
|
|
7884
|
+
flex: 1,
|
|
7885
|
+
minWidth: 0
|
|
7884
7886
|
}));
|
|
7885
7887
|
var Switch = React60__default.default.forwardRef(
|
|
7886
7888
|
(_a, ref) => {
|
|
@@ -12692,7 +12694,7 @@ var Notification = React60__default.default.forwardRef(
|
|
|
12692
12694
|
if (variant === "system") {
|
|
12693
12695
|
const isLarge = size === "lg";
|
|
12694
12696
|
const sizeTokens = isLarge ? systemNotifications.notification.spacing.large : systemNotifications.notification.spacing.small;
|
|
12695
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
12697
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12696
12698
|
StyledSystemRoot,
|
|
12697
12699
|
__spreadProps(__spreadValues({
|
|
12698
12700
|
ref,
|
|
@@ -12705,7 +12707,7 @@ var Notification = React60__default.default.forwardRef(
|
|
|
12705
12707
|
rootBgColor: bgMap[type],
|
|
12706
12708
|
rootAlignCenter: isLarge
|
|
12707
12709
|
}, rest), {
|
|
12708
|
-
children: [
|
|
12710
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: { flexDirection: "column", flex: 1 }, children: [
|
|
12709
12711
|
showIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12710
12712
|
Icon,
|
|
12711
12713
|
{
|
|
@@ -12715,27 +12717,31 @@ var Notification = React60__default.default.forwardRef(
|
|
|
12715
12717
|
"aria-label": type
|
|
12716
12718
|
}
|
|
12717
12719
|
),
|
|
12718
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12720
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { flexDirection: "column", gap: 8, flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12721
|
+
Typography,
|
|
12722
|
+
{
|
|
12723
|
+
token: systemNotifications.notifications.typography.default,
|
|
12724
|
+
color: systemNotifications.notification.colour.text.default,
|
|
12725
|
+
children
|
|
12726
|
+
}
|
|
12727
|
+
) }),
|
|
12728
|
+
link && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12729
|
+
StyledLinkWrapper,
|
|
12730
|
+
{
|
|
12731
|
+
linkPaddingLeft: parseTokenValue49(sizeTokens.content.gap),
|
|
12732
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12733
|
+
Link,
|
|
12734
|
+
{
|
|
12735
|
+
href: link.href,
|
|
12736
|
+
onPress: link.onPress,
|
|
12737
|
+
weight: "semiBold",
|
|
12738
|
+
size: "md",
|
|
12739
|
+
children: link.label
|
|
12740
|
+
}
|
|
12741
|
+
)
|
|
12742
|
+
}
|
|
12743
|
+
)
|
|
12744
|
+
] })
|
|
12739
12745
|
})
|
|
12740
12746
|
);
|
|
12741
12747
|
}
|
|
@@ -12828,59 +12834,57 @@ var Notification = React60__default.default.forwardRef(
|
|
|
12828
12834
|
rootBgColor: bgMap[type]
|
|
12829
12835
|
}, rest), {
|
|
12830
12836
|
children: [
|
|
12831
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12832
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12833
|
-
|
|
12834
|
-
Icon,
|
|
12835
|
-
{
|
|
12836
|
-
icon: IconComponent,
|
|
12837
|
-
size: "md",
|
|
12838
|
-
colour: type,
|
|
12839
|
-
"aria-label": type
|
|
12840
|
-
}
|
|
12841
|
-
),
|
|
12842
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12843
|
-
StyledInlineCopy,
|
|
12844
|
-
{
|
|
12845
|
-
copyGap: parseTokenValue49(content.copy.spacing.gap),
|
|
12846
|
-
children: [
|
|
12847
|
-
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12848
|
-
Typography,
|
|
12849
|
-
{
|
|
12850
|
-
token: notifications.typography.title,
|
|
12851
|
-
color: colour.text.title,
|
|
12852
|
-
children: title
|
|
12853
|
-
}
|
|
12854
|
-
),
|
|
12855
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12856
|
-
Typography,
|
|
12857
|
-
{
|
|
12858
|
-
token: notifications.typography.body,
|
|
12859
|
-
color: colour.text.body,
|
|
12860
|
-
children
|
|
12861
|
-
}
|
|
12862
|
-
)
|
|
12863
|
-
]
|
|
12864
|
-
}
|
|
12865
|
-
)
|
|
12866
|
-
] }),
|
|
12867
|
-
link && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12868
|
-
StyledLinkWrapper,
|
|
12837
|
+
/* @__PURE__ */ jsxRuntime.jsx(StyledContents, { contentsGap: parseTokenValue49(content.spacing.gap), children: /* @__PURE__ */ jsxRuntime.jsxs(StyledCopyRow, { copyGap: parseTokenValue49(content.spacing.gap), children: [
|
|
12838
|
+
showIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12839
|
+
Icon,
|
|
12869
12840
|
{
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12841
|
+
icon: IconComponent,
|
|
12842
|
+
size: "md",
|
|
12843
|
+
colour: type,
|
|
12844
|
+
"aria-label": type
|
|
12845
|
+
}
|
|
12846
|
+
),
|
|
12847
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12848
|
+
StyledInlineCopy,
|
|
12849
|
+
{
|
|
12850
|
+
copyGap: parseTokenValue49(content.copy.spacing.gap),
|
|
12851
|
+
children: [
|
|
12852
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12853
|
+
Typography,
|
|
12854
|
+
{
|
|
12855
|
+
token: notifications.typography.title,
|
|
12856
|
+
color: colour.text.title,
|
|
12857
|
+
children: title
|
|
12858
|
+
}
|
|
12859
|
+
),
|
|
12860
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12861
|
+
Typography,
|
|
12862
|
+
{
|
|
12863
|
+
token: notifications.typography.body,
|
|
12864
|
+
color: colour.text.body,
|
|
12865
|
+
children
|
|
12866
|
+
}
|
|
12867
|
+
),
|
|
12868
|
+
link && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12869
|
+
StyledLinkWrapper,
|
|
12870
|
+
{
|
|
12871
|
+
linkPaddingLeft: parseTokenValue49(content.copy.spacing.gap),
|
|
12872
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12873
|
+
Link,
|
|
12874
|
+
{
|
|
12875
|
+
href: link.href,
|
|
12876
|
+
onPress: link.onPress,
|
|
12877
|
+
weight: "semiBold",
|
|
12878
|
+
size: "md",
|
|
12879
|
+
children: link.label
|
|
12880
|
+
}
|
|
12881
|
+
)
|
|
12882
|
+
}
|
|
12883
|
+
)
|
|
12884
|
+
]
|
|
12881
12885
|
}
|
|
12882
12886
|
)
|
|
12883
|
-
] }),
|
|
12887
|
+
] }) }),
|
|
12884
12888
|
onClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12885
12889
|
StyledCloseButton,
|
|
12886
12890
|
{
|
|
@@ -14271,8 +14275,8 @@ var BadgeContainer = styled51__default.default(reactNative.View)(({ theme: theme
|
|
|
14271
14275
|
alignItems: "center",
|
|
14272
14276
|
justifyContent: "center",
|
|
14273
14277
|
height: parseTokenValue55(sizing["2xl"]),
|
|
14274
|
-
paddingRight: parseTokenValue55(spacing.
|
|
14275
|
-
backgroundColor: colour.background.container.
|
|
14278
|
+
paddingRight: parseTokenValue55(spacing.xs),
|
|
14279
|
+
backgroundColor: colour.background.container.brand,
|
|
14276
14280
|
borderTopRightRadius: parseTokenValue55(borderRadius.xs),
|
|
14277
14281
|
borderBottomRightRadius: parseTokenValue55(borderRadius.xs)
|
|
14278
14282
|
};
|
|
@@ -14349,37 +14353,25 @@ var StyledRoot16 = styled51__default.default(reactNative.Pressable)(({ theme: th
|
|
|
14349
14353
|
width: "100%"
|
|
14350
14354
|
};
|
|
14351
14355
|
});
|
|
14352
|
-
var ImageContainer = styled51__default.default(reactNative.View)({
|
|
14356
|
+
var ImageContainer = styled51__default.default(reactNative.View)(({ theme: theme2 }) => ({
|
|
14353
14357
|
position: "relative",
|
|
14354
14358
|
width: "100%",
|
|
14355
14359
|
aspectRatio: 1,
|
|
14356
|
-
overflow: "hidden"
|
|
14357
|
-
|
|
14360
|
+
overflow: "hidden",
|
|
14361
|
+
borderRadius: parseTokenValue56(
|
|
14362
|
+
theme2.tokens.semantics.dimensions.borderRadius.md
|
|
14363
|
+
)
|
|
14364
|
+
}));
|
|
14358
14365
|
var StyledImage2 = styled51__default.default(reactNative.Image)({
|
|
14359
14366
|
width: "100%",
|
|
14360
14367
|
height: "100%",
|
|
14361
14368
|
resizeMode: "cover"
|
|
14362
14369
|
});
|
|
14363
|
-
var BadgeContainer2 = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
14364
|
-
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
position: "absolute",
|
|
14369
|
-
top: parseTokenValue56(spacing.md),
|
|
14370
|
-
left: 0,
|
|
14371
|
-
display: "flex",
|
|
14372
|
-
flexDirection: "row",
|
|
14373
|
-
gap: parseTokenValue56(spacing["2xs"]),
|
|
14374
|
-
alignItems: "center",
|
|
14375
|
-
justifyContent: "center",
|
|
14376
|
-
height: parseTokenValue56(sizing["2xl"]),
|
|
14377
|
-
paddingRight: parseTokenValue56(spacing.sm),
|
|
14378
|
-
backgroundColor: colour.background.container.alt,
|
|
14379
|
-
borderTopRightRadius: parseTokenValue56(borderRadius.sm),
|
|
14380
|
-
borderBottomRightRadius: parseTokenValue56(borderRadius.sm)
|
|
14381
|
-
};
|
|
14382
|
-
});
|
|
14370
|
+
var BadgeContainer2 = styled51__default.default(reactNative.View)(({ theme: theme2 }) => ({
|
|
14371
|
+
position: "absolute",
|
|
14372
|
+
top: parseTokenValue56(theme2.tokens.semantics.dimensions.spacing.md),
|
|
14373
|
+
left: 0
|
|
14374
|
+
}));
|
|
14383
14375
|
var ContentContainer = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
14384
14376
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14385
14377
|
return {
|
|
@@ -14402,20 +14394,12 @@ var CategoryWrapper = styled51__default.default(reactNative.View)(({ theme: them
|
|
|
14402
14394
|
marginBottom: parseTokenValue56(spacing["3xs"])
|
|
14403
14395
|
};
|
|
14404
14396
|
});
|
|
14405
|
-
var TitleContainer = styled51__default.default(reactNative.View)(
|
|
14406
|
-
|
|
14407
|
-
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
marginBottom: parseTokenValue56(spacing.xs)
|
|
14412
|
-
};
|
|
14413
|
-
});
|
|
14414
|
-
var SizeWrapper = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
14415
|
-
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14416
|
-
return {
|
|
14417
|
-
marginBottom: parseTokenValue56(spacing.md)
|
|
14418
|
-
};
|
|
14397
|
+
var TitleContainer = styled51__default.default(reactNative.View)({
|
|
14398
|
+
display: "flex",
|
|
14399
|
+
flexDirection: "row",
|
|
14400
|
+
width: "100%",
|
|
14401
|
+
// 6px below the title to match Figma (4px title bottom padding + 2px gap).
|
|
14402
|
+
marginBottom: 6
|
|
14419
14403
|
});
|
|
14420
14404
|
var PricingContainer = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
14421
14405
|
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
@@ -14476,7 +14460,7 @@ var _ProductListingCard = React60__default.default.forwardRef(
|
|
|
14476
14460
|
/* @__PURE__ */ jsxRuntime.jsxs(DetailsContainer, { children: [
|
|
14477
14461
|
showCategory && category && /* @__PURE__ */ jsxRuntime.jsx(CategoryWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "sm", color: "secondary", children: category }) }),
|
|
14478
14462
|
showTitle && /* @__PURE__ */ jsxRuntime.jsx(TitleContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "heading", size: "xs", children: title }) }),
|
|
14479
|
-
showSize && size && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14463
|
+
showSize && size && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "md", color: "secondary", children: size })
|
|
14480
14464
|
] }),
|
|
14481
14465
|
showPrice && price && /* @__PURE__ */ jsxRuntime.jsxs(PricingContainer, { children: [
|
|
14482
14466
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "md", color: "secondary", children: price }),
|
|
@@ -14500,78 +14484,50 @@ var ProductListingCardWithBadgeAndGrid = Object.assign(_ProductListingCard, {
|
|
|
14500
14484
|
Badge: Badge2,
|
|
14501
14485
|
Grid
|
|
14502
14486
|
});
|
|
14503
|
-
var StyledCardContainer = styled51__default.default(reactNative.View)(({
|
|
14504
|
-
theme: theme2,
|
|
14505
|
-
borderless
|
|
14506
|
-
}) => {
|
|
14487
|
+
var StyledCardContainer = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
14507
14488
|
const { spacing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
14508
14489
|
const { colour } = theme2.tokens.semantics;
|
|
14509
14490
|
const spacingMd = parseTokenValue8(spacing.md);
|
|
14510
14491
|
const spacingXl = parseTokenValue8(spacing.xl);
|
|
14511
|
-
return
|
|
14492
|
+
return {
|
|
14512
14493
|
flexDirection: "row",
|
|
14513
14494
|
width: "100%",
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14495
|
+
// Cap at the Figma mobile card width (can be narrower — responsive).
|
|
14496
|
+
maxWidth: 358,
|
|
14497
|
+
// The 148px image sets the baseline height; the card grows if the content
|
|
14498
|
+
// is taller (e.g. a long or translated title wrapping to multiple lines)
|
|
14499
|
+
// so nothing is clipped.
|
|
14500
|
+
minHeight: 148,
|
|
14501
|
+
backgroundColor: colour.background.surface.default,
|
|
14518
14502
|
borderWidth: 1,
|
|
14519
14503
|
borderColor: colour.border.default,
|
|
14520
14504
|
shadowColor: "#522a10",
|
|
14521
14505
|
shadowOffset: { width: 0, height: spacingMd / 4 },
|
|
14522
14506
|
shadowOpacity: 0.05,
|
|
14523
14507
|
shadowRadius: spacingXl - 4,
|
|
14524
|
-
elevation: 5
|
|
14525
|
-
}), {
|
|
14508
|
+
elevation: 5,
|
|
14526
14509
|
borderRadius: parseTokenValue8(borderRadius.md),
|
|
14527
14510
|
overflow: "hidden",
|
|
14528
14511
|
zIndex: 1
|
|
14529
|
-
});
|
|
14530
|
-
});
|
|
14531
|
-
var StyledImage3 = styled51__default.default(reactNative.View)(
|
|
14532
|
-
({
|
|
14533
|
-
theme: theme2,
|
|
14534
|
-
imageBackgroundColor,
|
|
14535
|
-
thumbnailWidth = 100,
|
|
14536
|
-
thumbnailBackgroundColor
|
|
14537
|
-
}) => ({
|
|
14538
|
-
flexShrink: 0,
|
|
14539
|
-
backgroundColor: thumbnailBackgroundColor || imageBackgroundColor || theme2.tokens.semantics.colour.background.container.secondary,
|
|
14540
|
-
overflow: "hidden",
|
|
14541
|
-
aspectRatio: "1 / 1",
|
|
14542
|
-
width: thumbnailWidth,
|
|
14543
|
-
height: thumbnailWidth,
|
|
14544
|
-
position: "relative"
|
|
14545
|
-
})
|
|
14546
|
-
);
|
|
14547
|
-
var StyledQuantityBadge = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
14548
|
-
const spacing = theme2.tokens.semantics.dimensions.spacing;
|
|
14549
|
-
const borderRadius = theme2.tokens.semantics.dimensions.borderRadius;
|
|
14550
|
-
const { colour } = theme2.tokens.semantics;
|
|
14551
|
-
return {
|
|
14552
|
-
position: "absolute",
|
|
14553
|
-
top: parseTokenValue8(spacing["2xs"]),
|
|
14554
|
-
right: parseTokenValue8(spacing["2xs"]),
|
|
14555
|
-
backgroundColor: colour.background.container.brand,
|
|
14556
|
-
borderRadius: parseTokenValue8(borderRadius.xs),
|
|
14557
|
-
paddingHorizontal: parseTokenValue8(spacing.sm),
|
|
14558
|
-
height: parseTokenValue8(spacing["2xl"]),
|
|
14559
|
-
minWidth: parseTokenValue8(spacing["2xl"]),
|
|
14560
|
-
alignItems: "center",
|
|
14561
|
-
justifyContent: "center",
|
|
14562
|
-
zIndex: 2
|
|
14563
14512
|
};
|
|
14564
14513
|
});
|
|
14565
|
-
var
|
|
14566
|
-
|
|
14567
|
-
|
|
14568
|
-
|
|
14514
|
+
var StyledImage3 = styled51__default.default(reactNative.View)(({ theme: theme2, imageBackgroundColor, thumbnailWidth = 148 }) => ({
|
|
14515
|
+
flexShrink: 0,
|
|
14516
|
+
backgroundColor: imageBackgroundColor || theme2.tokens.semantics.colour.background.container.secondary,
|
|
14517
|
+
overflow: "hidden",
|
|
14518
|
+
width: thumbnailWidth,
|
|
14519
|
+
// Square (148) by default; stretches taller to fill the card when the
|
|
14520
|
+
// content makes it taller than the image.
|
|
14521
|
+
minHeight: thumbnailWidth,
|
|
14522
|
+
position: "relative"
|
|
14523
|
+
}));
|
|
14524
|
+
var StyledContentArea = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
14569
14525
|
const { spacing } = theme2.tokens.semantics.dimensions;
|
|
14570
14526
|
const paddingValue = parseTokenValue8(spacing.md);
|
|
14571
14527
|
return {
|
|
14572
14528
|
flex: 1,
|
|
14573
14529
|
paddingHorizontal: paddingValue,
|
|
14574
|
-
paddingVertical:
|
|
14530
|
+
paddingVertical: paddingValue,
|
|
14575
14531
|
gap: parseTokenValue8(spacing.xs),
|
|
14576
14532
|
justifyContent: "space-between"
|
|
14577
14533
|
};
|
|
@@ -14579,25 +14535,38 @@ var StyledContentArea = styled51__default.default(reactNative.View)(({
|
|
|
14579
14535
|
var StyledTextContainer = styled51__default.default(reactNative.View)(() => ({
|
|
14580
14536
|
gap: 2
|
|
14581
14537
|
}));
|
|
14582
|
-
var StyledBannerWrapper = styled51__default.default(reactNative.View)(() =>
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14538
|
+
var StyledBannerWrapper = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
|
|
14539
|
+
const { spacing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
14540
|
+
return {
|
|
14541
|
+
width: "100%",
|
|
14542
|
+
// Tuck the banner up behind the card by the corner radius so its square top
|
|
14543
|
+
// corners hide under the card's rounded bottom; the rest sits below.
|
|
14544
|
+
marginTop: -parseTokenValue8(borderRadius.md),
|
|
14545
|
+
paddingBottom: parseTokenValue8(spacing.md)
|
|
14546
|
+
};
|
|
14547
|
+
});
|
|
14588
14548
|
var StyledRootWrapper = styled51__default.default(reactNative.View)(() => {
|
|
14589
14549
|
return {
|
|
14590
14550
|
flexDirection: "column",
|
|
14591
14551
|
width: "100%",
|
|
14592
|
-
|
|
14552
|
+
maxWidth: 358
|
|
14593
14553
|
};
|
|
14594
14554
|
});
|
|
14595
14555
|
var StyledNotification = styled51__default.default(Notification)(({ theme: theme2 }) => {
|
|
14596
|
-
const { spacing } = theme2.tokens.semantics.dimensions;
|
|
14556
|
+
const { spacing, borderRadius } = theme2.tokens.semantics.dimensions;
|
|
14557
|
+
const spacingMd = parseTokenValue8(spacing.md);
|
|
14558
|
+
const radiusMd = parseTokenValue8(borderRadius.md);
|
|
14597
14559
|
return {
|
|
14598
|
-
|
|
14599
|
-
|
|
14600
|
-
|
|
14560
|
+
paddingHorizontal: spacingMd,
|
|
14561
|
+
// 27px top padding (Figma) leaves a small cream reveal above the text once
|
|
14562
|
+
// the banner tucks behind the card.
|
|
14563
|
+
paddingTop: 27,
|
|
14564
|
+
paddingBottom: spacingMd,
|
|
14565
|
+
// Square top corners, rounded bottom corners (banner tucks under the card).
|
|
14566
|
+
borderTopLeftRadius: 0,
|
|
14567
|
+
borderTopRightRadius: 0,
|
|
14568
|
+
borderBottomLeftRadius: radiusMd,
|
|
14569
|
+
borderBottomRightRadius: radiusMd
|
|
14601
14570
|
};
|
|
14602
14571
|
});
|
|
14603
14572
|
var ProductDisplayCard = React60__default.default.forwardRef(
|
|
@@ -14611,16 +14580,11 @@ var ProductDisplayCard = React60__default.default.forwardRef(
|
|
|
14611
14580
|
showQuantityPicker = false,
|
|
14612
14581
|
disableQuantityButtons = false,
|
|
14613
14582
|
hideQuantityButtons = false,
|
|
14614
|
-
showIncrementButton,
|
|
14615
|
-
showDecrementButton,
|
|
14616
14583
|
incrementDisabled = false,
|
|
14617
14584
|
decrementDisabled = false,
|
|
14618
14585
|
image,
|
|
14619
14586
|
imageBackgroundColor,
|
|
14620
14587
|
thumbnailWidth,
|
|
14621
|
-
thumbnailBackgroundColor,
|
|
14622
|
-
showImageQuantityBadge = false,
|
|
14623
|
-
borderless = false,
|
|
14624
14588
|
banner,
|
|
14625
14589
|
showBanner = false,
|
|
14626
14590
|
bannerType = "info",
|
|
@@ -14634,16 +14598,11 @@ var ProductDisplayCard = React60__default.default.forwardRef(
|
|
|
14634
14598
|
"showQuantityPicker",
|
|
14635
14599
|
"disableQuantityButtons",
|
|
14636
14600
|
"hideQuantityButtons",
|
|
14637
|
-
"showIncrementButton",
|
|
14638
|
-
"showDecrementButton",
|
|
14639
14601
|
"incrementDisabled",
|
|
14640
14602
|
"decrementDisabled",
|
|
14641
14603
|
"image",
|
|
14642
14604
|
"imageBackgroundColor",
|
|
14643
14605
|
"thumbnailWidth",
|
|
14644
|
-
"thumbnailBackgroundColor",
|
|
14645
|
-
"showImageQuantityBadge",
|
|
14646
|
-
"borderless",
|
|
14647
14606
|
"banner",
|
|
14648
14607
|
"showBanner",
|
|
14649
14608
|
"bannerType",
|
|
@@ -14654,26 +14613,23 @@ var ProductDisplayCard = React60__default.default.forwardRef(
|
|
|
14654
14613
|
onQuantityChange == null ? void 0 : onQuantityChange(newQuantity);
|
|
14655
14614
|
}
|
|
14656
14615
|
};
|
|
14657
|
-
const cardContent = /* @__PURE__ */ jsxRuntime.jsxs(StyledCardContainer, __spreadProps(__spreadValues({ ref
|
|
14658
|
-
image && /* @__PURE__ */ jsxRuntime.
|
|
14616
|
+
const cardContent = /* @__PURE__ */ jsxRuntime.jsxs(StyledCardContainer, __spreadProps(__spreadValues({ ref }, rest), { children: [
|
|
14617
|
+
image && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14659
14618
|
StyledImage3,
|
|
14660
14619
|
{
|
|
14661
14620
|
imageBackgroundColor,
|
|
14662
14621
|
thumbnailWidth,
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
|
|
14669
|
-
|
|
14670
|
-
|
|
14671
|
-
) : image,
|
|
14672
|
-
showImageQuantityBadge && quantity && /* @__PURE__ */ jsxRuntime.jsx(StyledQuantityBadge, { children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "sm", weight: "bold", children: quantity }) })
|
|
14673
|
-
]
|
|
14622
|
+
children: typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
14623
|
+
reactNative.Image,
|
|
14624
|
+
{
|
|
14625
|
+
source: { uri: image },
|
|
14626
|
+
resizeMode: "cover",
|
|
14627
|
+
style: { flex: 1, width: "100%" }
|
|
14628
|
+
}
|
|
14629
|
+
) : image
|
|
14674
14630
|
}
|
|
14675
14631
|
),
|
|
14676
|
-
/* @__PURE__ */ jsxRuntime.jsxs(StyledContentArea, {
|
|
14632
|
+
/* @__PURE__ */ jsxRuntime.jsxs(StyledContentArea, { children: [
|
|
14677
14633
|
/* @__PURE__ */ jsxRuntime.jsxs(StyledTextContainer, { children: [
|
|
14678
14634
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "heading", size: "2xs", color: "primary", children: title }),
|
|
14679
14635
|
showSubtext && subtext && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "sm", color: "secondary", children: subtext })
|
|
@@ -14694,8 +14650,8 @@ var ProductDisplayCard = React60__default.default.forwardRef(
|
|
|
14694
14650
|
min: 1,
|
|
14695
14651
|
accessible: true,
|
|
14696
14652
|
accessibilityLabel: `Quantity: ${quantity}`,
|
|
14697
|
-
showIncrementButton:
|
|
14698
|
-
showDecrementButton:
|
|
14653
|
+
showIncrementButton: !hideQuantityButtons,
|
|
14654
|
+
showDecrementButton: !hideQuantityButtons,
|
|
14699
14655
|
incrementDisabled: incrementDisabled || disableQuantityButtons,
|
|
14700
14656
|
decrementDisabled: decrementDisabled || disableQuantityButtons
|
|
14701
14657
|
}
|
|
@@ -14782,7 +14738,7 @@ var TabNavigationList = React60__default.default.forwardRef(
|
|
|
14782
14738
|
TabNavigationList.displayName = "TabNavigation.List";
|
|
14783
14739
|
var TabNavigationTab = React60__default.default.forwardRef(
|
|
14784
14740
|
(_a, ref) => {
|
|
14785
|
-
var _b = _a, { value, disabled = false, children } = _b, rest = __objRest(_b, ["value", "disabled", "children"]);
|
|
14741
|
+
var _b = _a, { value, disabled = false, icon, avatar, children } = _b, rest = __objRest(_b, ["value", "disabled", "icon", "avatar", "children"]);
|
|
14786
14742
|
const { layout } = useTabNavigationContext();
|
|
14787
14743
|
const { value: selectedValue } = TabsPrimitive__namespace.useRootContext();
|
|
14788
14744
|
const theme2 = react.useTheme();
|
|
@@ -14792,7 +14748,7 @@ var TabNavigationTab = React60__default.default.forwardRef(
|
|
|
14792
14748
|
const token = selected ? typography.selected : typography.default;
|
|
14793
14749
|
const borderColour = selected ? colour.border.default : colour.border.disabled;
|
|
14794
14750
|
const textColour = disabled ? theme2.tokens.primitives.colour.brand.brown["5"] : colour.text.default;
|
|
14795
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Trigger, { value, disabled, asChild: true, children: /* @__PURE__ */ jsxRuntime.
|
|
14751
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Trigger, { value, disabled, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14796
14752
|
StyledTab,
|
|
14797
14753
|
__spreadProps(__spreadValues({
|
|
14798
14754
|
ref,
|
|
@@ -14806,7 +14762,11 @@ var TabNavigationTab = React60__default.default.forwardRef(
|
|
|
14806
14762
|
tabBorderColor: borderColour,
|
|
14807
14763
|
tabFlex: layout === "fixed" ? 1 : void 0
|
|
14808
14764
|
}, rest), {
|
|
14809
|
-
children:
|
|
14765
|
+
children: [
|
|
14766
|
+
avatar && /* @__PURE__ */ jsxRuntime.jsx(Avatar, __spreadValues({}, avatar)),
|
|
14767
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon, customColour: textColour, "aria-hidden": true }),
|
|
14768
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { token, color: textColour, children })
|
|
14769
|
+
]
|
|
14810
14770
|
})
|
|
14811
14771
|
) });
|
|
14812
14772
|
}
|