@butternutbox/pawprint-native 0.19.2 → 0.20.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.
@@ -7,12 +7,12 @@
7
7
  CJS Build start
8
8
  ESM Build start
9
9
  DTS Build start
10
- ESM dist/index.js 516.72 KB
11
- ESM dist/index.js.map 1.06 MB
12
- ESM ⚡️ Build success in 7309ms
13
- CJS dist/index.cjs 546.81 KB
10
+ CJS dist/index.cjs 547.43 KB
14
11
  CJS dist/index.cjs.map 1.06 MB
15
- CJS ⚡️ Build success in 7309ms
16
- DTS ⚡️ Build success in 21698ms
17
- DTS dist/index.d.cts 100.86 KB
18
- DTS dist/index.d.ts 100.86 KB
12
+ CJS ⚡️ Build success in 7630ms
13
+ ESM dist/index.js 517.29 KB
14
+ ESM dist/index.js.map 1.06 MB
15
+ ESM ⚡️ Build success in 7630ms
16
+ DTS ⚡️ Build success in 22133ms
17
+ DTS dist/index.d.cts 101.81 KB
18
+ DTS dist/index.d.ts 101.81 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @butternutbox/pawprint-native
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 246e43e: `ProductDisplayCard`: add an optional `quantityBadge` prop.
8
+
9
+ When `quantityBadge` is `true`, a quantity badge (the pawprint `Badge`, `variant="primary" size="large"`) is overlaid on the top-right of the product image and renders the current `quantity`, matching Figma node `10864:736`. It defaults to `false`, so existing usages are unaffected. The badge and the quantity picker are mutually exclusive — when `quantityBadge` is set the picker is never rendered (only one is visible at a time). Intended for the OOB recipe and Extras cards.
10
+
3
11
  ## 0.19.2
4
12
 
5
13
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -12037,6 +12037,17 @@ var StyledImage3 = styled51__default.default(reactNative.View)(({ theme: theme2,
12037
12037
  minHeight: thumbnailWidth,
12038
12038
  position: "relative"
12039
12039
  }));
12040
+ var StyledBadgeOverlay = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
12041
+ const offset = parseTokenValue9(
12042
+ theme2.tokens.semantics.dimensions.spacing["2xs"]
12043
+ );
12044
+ return {
12045
+ position: "absolute",
12046
+ top: offset,
12047
+ right: offset,
12048
+ zIndex: 2
12049
+ };
12050
+ });
12040
12051
  var StyledContentArea = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
12041
12052
  const { spacing } = theme2.tokens.semantics.dimensions;
12042
12053
  const paddingValue = parseTokenValue9(spacing.md);
@@ -12113,6 +12124,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12113
12124
  quantity = 1,
12114
12125
  onQuantityChange,
12115
12126
  showQuantityPicker = false,
12127
+ quantityBadge = false,
12116
12128
  disableQuantityButtons = false,
12117
12129
  hideQuantityButtons = false,
12118
12130
  incrementDisabled = false,
@@ -12133,6 +12145,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12133
12145
  "quantity",
12134
12146
  "onQuantityChange",
12135
12147
  "showQuantityPicker",
12148
+ "quantityBadge",
12136
12149
  "disableQuantityButtons",
12137
12150
  "hideQuantityButtons",
12138
12151
  "incrementDisabled",
@@ -12159,19 +12172,22 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12159
12172
  showBanner: showBanner && !!banner
12160
12173
  }, rest), {
12161
12174
  children: [
12162
- image && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { disabled: !onImagePress, onPress: onImagePress, children: /* @__PURE__ */ jsxRuntime.jsx(
12175
+ image && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { disabled: !onImagePress, onPress: onImagePress, children: /* @__PURE__ */ jsxRuntime.jsxs(
12163
12176
  StyledImage3,
12164
12177
  {
12165
12178
  imageBackgroundColor,
12166
12179
  thumbnailWidth,
12167
- children: typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
12168
- reactNative.Image,
12169
- {
12170
- source: { uri: image },
12171
- resizeMode: "cover",
12172
- style: { flex: 1, width: "100%" }
12173
- }
12174
- ) : image
12180
+ children: [
12181
+ typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
12182
+ reactNative.Image,
12183
+ {
12184
+ source: { uri: image },
12185
+ resizeMode: "cover",
12186
+ style: { flex: 1, width: "100%" }
12187
+ }
12188
+ ) : image,
12189
+ quantityBadge && /* @__PURE__ */ jsxRuntime.jsx(StyledBadgeOverlay, { pointerEvents: "none", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "large", children: String(quantity) }) })
12190
+ ]
12175
12191
  }
12176
12192
  ) }),
12177
12193
  /* @__PURE__ */ jsxRuntime.jsxs(StyledContentArea, { children: [
@@ -12179,7 +12195,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12179
12195
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "heading", size: "2xs", color: "primary", children: title }),
12180
12196
  showSubtext && subtext && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "sm", color: "secondary", children: subtext })
12181
12197
  ] }),
12182
- showQuantityPicker && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(
12198
+ showQuantityPicker && !quantityBadge && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(
12183
12199
  NumberField,
12184
12200
  {
12185
12201
  size: "sm",