@butternutbox/pawprint-native 1.0.0 → 1.1.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 523.46 KB
11
- ESM dist/index.js.map 1.08 MB
12
- ESM ⚡️ Build success in 8053ms
13
- CJS dist/index.cjs 553.74 KB
10
+ CJS dist/index.cjs 553.93 KB
14
11
  CJS dist/index.cjs.map 1.08 MB
15
- CJS ⚡️ Build success in 8056ms
16
- DTS ⚡️ Build success in 24238ms
17
- DTS dist/index.d.cts 103.09 KB
18
- DTS dist/index.d.ts 103.09 KB
12
+ CJS ⚡️ Build success in 7609ms
13
+ ESM dist/index.js 523.65 KB
14
+ ESM dist/index.js.map 1.08 MB
15
+ ESM ⚡️ Build success in 7611ms
16
+ DTS ⚡️ Build success in 20912ms
17
+ DTS dist/index.d.cts 104.52 KB
18
+ DTS dist/index.d.ts 104.52 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @butternutbox/pawprint-native
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 99afbc0: `ProductDisplayCard`: add a new `thumbnailBadge` prop for overlaying a `Badge` on the thumbnail image.
8
+ - `thumbnailBadge` accepts any `BadgeProps` (`variant`, `size`, `icon`, `children`, …) as an object, so consumers can render any badge content (e.g. `"New"`, `"Popular"`, a quantity number) with any Badge variant/size.
9
+ - Mutually exclusive with the quantity picker: when `thumbnailBadge` is set, the picker is never rendered.
10
+ - **Native** — `quantityBadge` (boolean) is now marked `@deprecated`. It still works during the deprecation window and behaves the same as before (renders a hardcoded primary/large Badge containing `quantity`). When both `thumbnailBadge` and `quantityBadge` are set, `thumbnailBadge` wins. Migrate with `thumbnailBadge={{ variant: "primary", size: "large", children: String(quantity) }}`. `quantityBadge` will be removed in a future major release.
11
+ - **Web** — `thumbnailBadge` is a new prop; there was no equivalent before.
12
+
3
13
  ## 1.0.0
4
14
 
5
15
  ### Major Changes
package/dist/index.cjs CHANGED
@@ -12262,6 +12262,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12262
12262
  onQuantityChange,
12263
12263
  showQuantityPicker = false,
12264
12264
  quantityBadge = false,
12265
+ thumbnailBadge,
12265
12266
  disableQuantityButtons = false,
12266
12267
  hideQuantityButtons = false,
12267
12268
  incrementDisabled = false,
@@ -12284,6 +12285,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12284
12285
  "onQuantityChange",
12285
12286
  "showQuantityPicker",
12286
12287
  "quantityBadge",
12288
+ "thumbnailBadge",
12287
12289
  "disableQuantityButtons",
12288
12290
  "hideQuantityButtons",
12289
12291
  "incrementDisabled",
@@ -12304,6 +12306,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12304
12306
  onQuantityChange == null ? void 0 : onQuantityChange(newQuantity);
12305
12307
  }
12306
12308
  };
12309
+ const resolvedBadgeProps = thumbnailBadge != null ? thumbnailBadge : quantityBadge ? { variant: "primary", size: "large", children: String(quantity) } : void 0;
12307
12310
  const cardContent = /* @__PURE__ */ jsxRuntime.jsxs(
12308
12311
  StyledCardContainer,
12309
12312
  __spreadProps(__spreadValues({
@@ -12325,7 +12328,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12325
12328
  style: { flex: 1, width: "100%" }
12326
12329
  }
12327
12330
  ) : image,
12328
- quantityBadge && /* @__PURE__ */ jsxRuntime.jsx(StyledBadgeOverlay, { pointerEvents: "none", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", size: "large", children: String(quantity) }) })
12331
+ resolvedBadgeProps && /* @__PURE__ */ jsxRuntime.jsx(StyledBadgeOverlay, { pointerEvents: "none", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, __spreadValues({}, resolvedBadgeProps)) })
12329
12332
  ]
12330
12333
  }
12331
12334
  ) }),
@@ -12334,7 +12337,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12334
12337
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "heading", size: "2xs", color: "primary", children: title }),
12335
12338
  showSubtext && subtext && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "sm", color: "secondary", children: subtext })
12336
12339
  ] }),
12337
- showQuantityPicker && !quantityBadge && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(
12340
+ showQuantityPicker && !resolvedBadgeProps && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(
12338
12341
  NumberField,
12339
12342
  {
12340
12343
  size: "sm",