@butternutbox/pawprint-native 1.1.0 → 1.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@butternutbox/pawprint-native",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "description": "ButternutBox Pawprint Design System - React Native Components",
6
6
  "main": "./dist/index.cjs",
@@ -222,7 +222,7 @@ describe("ProductDisplayCard (Native)", () => {
222
222
  expect(screen.queryByText("6")).toBeFalsy()
223
223
  })
224
224
 
225
- it("suppresses the quantity picker when quantityBadge is set (mutually exclusive)", () => {
225
+ it("renders the quantity picker alongside a quantityBadge", () => {
226
226
  renderWithTheme(
227
227
  <ProductDisplayCard
228
228
  title="Test Product"
@@ -239,8 +239,8 @@ describe("ProductDisplayCard (Native)", () => {
239
239
 
240
240
  // The badge shows the quantity...
241
241
  expect(screen.getByText("3")).toBeTruthy()
242
- // ...and the picker input is not rendered.
243
- expect(screen.queryByDisplayValue("3")).toBeFalsy()
242
+ // ...and the picker is rendered independently of it.
243
+ expect(screen.getByDisplayValue("3")).toBeTruthy()
244
244
  })
245
245
 
246
246
  it("renders a thumbnailBadge from BadgeProps", () => {
@@ -259,7 +259,7 @@ describe("ProductDisplayCard (Native)", () => {
259
259
  expect(screen.getByText("New")).toBeTruthy()
260
260
  })
261
261
 
262
- it("suppresses the quantity picker when thumbnailBadge is set", () => {
262
+ it("renders the quantity picker alongside a thumbnailBadge", () => {
263
263
  renderWithTheme(
264
264
  <ProductDisplayCard
265
265
  title="Test Product"
@@ -275,7 +275,7 @@ describe("ProductDisplayCard (Native)", () => {
275
275
  )
276
276
 
277
277
  expect(screen.getByText("New")).toBeTruthy()
278
- expect(screen.queryByDisplayValue("2")).toBeFalsy()
278
+ expect(screen.getByDisplayValue("2")).toBeTruthy()
279
279
  })
280
280
 
281
281
  it("prefers thumbnailBadge over the deprecated quantityBadge when both are set", () => {
@@ -20,16 +20,14 @@ export type ProductDisplayCardProps = ViewProps & {
20
20
  * wins. This prop will be removed in a future major release.
21
21
  *
22
22
  * Show a quantity badge overlaid on the top-right of the image (rendering the
23
- * current `quantity`) instead of the quantity picker. Defaults to `false`.
24
- * The badge and the quantity picker are mutually exclusive — only one shows
25
- * at a time; when `quantityBadge` is true the picker is never rendered.
23
+ * current `quantity`). Defaults to `false`. Independent of the quantity
24
+ * picker — use `showQuantityPicker` to control that separately.
26
25
  */
27
26
  quantityBadge?: boolean
28
27
  /**
29
28
  * Render a `Badge` overlaid on the top-right of the image. Accepts any
30
29
  * `BadgeProps` (variant, size, icon, children, etc.) — pass them as an object.
31
- * Mutually exclusive with the quantity picker: when set, the picker is never
32
- * rendered.
30
+ * Independent of the quantity picker: both can be shown at the same time.
33
31
  *
34
32
  * @example
35
33
  * thumbnailBadge={{ variant: "primary", size: "large", children: "New" }}
@@ -312,7 +310,7 @@ export const ProductDisplayCard = React.forwardRef<
312
310
  )}
313
311
  </StyledTextContainer>
314
312
 
315
- {showQuantityPicker && !resolvedBadgeProps && (
313
+ {showQuantityPicker && (
316
314
  <View style={{ marginLeft: "auto" }}>
317
315
  <NumberField
318
316
  size="sm"