@butternutbox/pawprint-native 0.19.1 → 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
- CJS dist/index.cjs 546.41 KB
10
+ CJS dist/index.cjs 547.43 KB
11
11
  CJS dist/index.cjs.map 1.06 MB
12
- CJS ⚡️ Build success in 7807ms
13
- ESM dist/index.js 516.34 KB
12
+ CJS ⚡️ Build success in 7630ms
13
+ ESM dist/index.js 517.29 KB
14
14
  ESM dist/index.js.map 1.06 MB
15
- ESM ⚡️ Build success in 7808ms
16
- DTS ⚡️ Build success in 22733ms
17
- DTS dist/index.d.cts 100.86 KB
18
- DTS dist/index.d.ts 100.86 KB
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,21 @@
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
+
11
+ ## 0.19.2
12
+
13
+ ### Patch Changes
14
+
15
+ - 68b227a: `NativeSelectPicker`: fix the Android options panel being too short.
16
+
17
+ On Android the options `FlatList` was capped at a tiny fixed height (`spacing["8xl"]`), so only ~1 option was visible with a cramped scrollbar. It now sizes to a fraction of the screen height, filling the bottom-sheet dialog so all options are reachable/scrollable — matching the full-height iOS `ActionSheetIOS` picker. iOS is unaffected.
18
+
3
19
  ## 0.19.1
4
20
 
5
21
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -9357,6 +9357,7 @@ var NativeSelectPicker = React66__default.default.forwardRef(
9357
9357
  var _a2;
9358
9358
  const [isOpen, setIsOpen] = React66.useState(false);
9359
9359
  const { iconAnimationStyles } = useIconAnimation();
9360
+ const { height: windowHeight } = reactNative.useWindowDimensions();
9360
9361
  const hasPlaceholder = placeholder && Object.keys(placeholder).length > 0 && placeholder.label !== void 0;
9361
9362
  const allItems = React66.useMemo(() => {
9362
9363
  var _a3;
@@ -9471,7 +9472,12 @@ var NativeSelectPicker = React66__default.default.forwardRef(
9471
9472
  );
9472
9473
  },
9473
9474
  style: {
9474
- maxHeight: parseSize2(dimensions2.spacing["8xl"])
9475
+ // Fill the bottom-sheet dialog (sized 40-80% of the
9476
+ // screen) rather than a tiny fixed cap, so all options
9477
+ // are reachable/scrollable on Android like the iOS
9478
+ // ActionSheet. Previously capped at spacing["8xl"],
9479
+ // which showed only ~1 row.
9480
+ maxHeight: windowHeight * 0.7
9475
9481
  }
9476
9482
  }
9477
9483
  )
@@ -12031,6 +12037,17 @@ var StyledImage3 = styled51__default.default(reactNative.View)(({ theme: theme2,
12031
12037
  minHeight: thumbnailWidth,
12032
12038
  position: "relative"
12033
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
+ });
12034
12051
  var StyledContentArea = styled51__default.default(reactNative.View)(({ theme: theme2 }) => {
12035
12052
  const { spacing } = theme2.tokens.semantics.dimensions;
12036
12053
  const paddingValue = parseTokenValue9(spacing.md);
@@ -12107,6 +12124,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12107
12124
  quantity = 1,
12108
12125
  onQuantityChange,
12109
12126
  showQuantityPicker = false,
12127
+ quantityBadge = false,
12110
12128
  disableQuantityButtons = false,
12111
12129
  hideQuantityButtons = false,
12112
12130
  incrementDisabled = false,
@@ -12127,6 +12145,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12127
12145
  "quantity",
12128
12146
  "onQuantityChange",
12129
12147
  "showQuantityPicker",
12148
+ "quantityBadge",
12130
12149
  "disableQuantityButtons",
12131
12150
  "hideQuantityButtons",
12132
12151
  "incrementDisabled",
@@ -12153,19 +12172,22 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12153
12172
  showBanner: showBanner && !!banner
12154
12173
  }, rest), {
12155
12174
  children: [
12156
- 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(
12157
12176
  StyledImage3,
12158
12177
  {
12159
12178
  imageBackgroundColor,
12160
12179
  thumbnailWidth,
12161
- children: typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
12162
- reactNative.Image,
12163
- {
12164
- source: { uri: image },
12165
- resizeMode: "cover",
12166
- style: { flex: 1, width: "100%" }
12167
- }
12168
- ) : 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
+ ]
12169
12191
  }
12170
12192
  ) }),
12171
12193
  /* @__PURE__ */ jsxRuntime.jsxs(StyledContentArea, { children: [
@@ -12173,7 +12195,7 @@ var ProductDisplayCard = React66__default.default.forwardRef(
12173
12195
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "heading", size: "2xs", color: "primary", children: title }),
12174
12196
  showSubtext && subtext && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "sm", color: "secondary", children: subtext })
12175
12197
  ] }),
12176
- 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(
12177
12199
  NumberField,
12178
12200
  {
12179
12201
  size: "sm",