@butternutbox/pawprint-native 0.4.0 → 0.4.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.
@@ -14,17 +14,17 @@
14
14
  ESM dist/ibm-plex-sans-condensed-600-normal-UX5ZU5T6.woff2 19.35 KB
15
15
  ESM dist/ibm-plex-sans-condensed-700-normal-4PFYFTSO.woff2 18.90 KB
16
16
  ESM dist/index.js 1.70 MB
17
- ESM dist/index.js.map 2.64 MB
18
- ESM ⚡️ Build success in 11381ms
17
+ ESM dist/index.js.map 2.65 MB
18
+ ESM ⚡️ Build success in 11422ms
19
19
  CJS dist/ida-narrow-500-normal-C6I2PK4T.woff2 47.41 KB
20
20
  CJS dist/ida-narrow-700-normal-UPHPRIN6.woff2 49.90 KB
21
21
  CJS dist/ibm-plex-sans-condensed-400-normal-I2XLJNNB.woff2 19.33 KB
22
- CJS dist/ibm-plex-sans-condensed-500-normal-IEQBNVGX.woff2 19.48 KB
23
22
  CJS dist/ibm-plex-sans-condensed-600-normal-UX5ZU5T6.woff2 19.35 KB
24
23
  CJS dist/ibm-plex-sans-condensed-700-normal-4PFYFTSO.woff2 18.90 KB
24
+ CJS dist/ibm-plex-sans-condensed-500-normal-IEQBNVGX.woff2 19.48 KB
25
25
  CJS dist/index.cjs 1.77 MB
26
26
  CJS dist/index.cjs.map 2.65 MB
27
- CJS ⚡️ Build success in 11382ms
28
- DTS ⚡️ Build success in 21549ms
29
- DTS dist/index.d.cts 87.33 KB
30
- DTS dist/index.d.ts 87.33 KB
27
+ CJS ⚡️ Build success in 11424ms
28
+ DTS ⚡️ Build success in 22144ms
29
+ DTS dist/index.d.cts 87.78 KB
30
+ DTS dist/index.d.ts 87.78 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @butternutbox/pawprint-native
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ec6f6b4: Add additional quantity within thumbnail of display card
8
+
3
9
  ## 0.4.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -10190,28 +10190,20 @@ var StyledFieldWrapper = styled60__default.default(reactNative.View)(
10190
10190
  overflow: "hidden"
10191
10191
  })
10192
10192
  );
10193
- var StyledTextInput = styled60__default.default(reactNative.TextInput)(
10194
- ({
10195
- inputColor,
10196
- inputFontFamily,
10197
- inputFontWeight,
10198
- inputFontSize,
10199
- inputLineHeight
10200
- }) => __spreadProps(__spreadValues({
10201
- textAlign: "center",
10202
- outlineStyle: "none",
10203
- padding: 0,
10204
- minWidth: 0,
10205
- minHeight: 0,
10206
- width: "100%",
10207
- height: "100%",
10208
- color: inputColor,
10209
- fontFamily: inputFontFamily
10210
- }, inputFontWeight ? { fontWeight: inputFontWeight } : {}), {
10211
- fontSize: inputFontSize,
10212
- lineHeight: inputLineHeight
10213
- })
10214
- );
10193
+ var StyledTextInput = styled60__default.default(reactNative.TextInput)(({ inputColor, inputFontFamily, inputFontWeight, inputFontSize }) => __spreadProps(__spreadValues({
10194
+ textAlign: "center",
10195
+ outlineStyle: "none",
10196
+ padding: 0,
10197
+ minWidth: 0,
10198
+ minHeight: 0,
10199
+ width: "100%",
10200
+ height: "100%",
10201
+ color: inputColor,
10202
+ fontFamily: inputFontFamily
10203
+ }, inputFontWeight ? { fontWeight: inputFontWeight } : {}), {
10204
+ fontSize: inputFontSize,
10205
+ lineHeight: 0
10206
+ }));
10215
10207
  var StyledRow = styled60__default.default(reactNative.View)(({ rowGap }) => ({
10216
10208
  flexDirection: "row",
10217
10209
  alignItems: "center",
@@ -10345,7 +10337,6 @@ var NumberFieldInput = React60__default.default.forwardRef(
10345
10337
  inputFontFamily: resolvedInputFontFamily,
10346
10338
  inputFontWeight: resolvedInputFontFamily === typographyToken.fontFamily ? typographyToken.fontWeight : void 0,
10347
10339
  inputFontSize: parseTokenValue34(typographyToken.fontSize),
10348
- inputLineHeight: parseTokenValue34(typographyToken.lineHeight),
10349
10340
  keyboardType: "numeric",
10350
10341
  editable: !disabled,
10351
10342
  onFocus: handleFocus,
@@ -14197,13 +14188,34 @@ var StyledCardContainer = styled60__default.default(reactNative.View)(({ theme:
14197
14188
  zIndex: 1
14198
14189
  };
14199
14190
  });
14200
- var StyledImage3 = styled60__default.default(reactNative.View)(() => ({
14201
- flexShrink: 0,
14202
- backgroundColor: "#f5f5f5",
14203
- overflow: "hidden",
14204
- aspectRatio: "1 / 1",
14205
- height: "100%"
14206
- }));
14191
+ var StyledImage3 = styled60__default.default(reactNative.View)(
14192
+ ({ theme: theme2, imageBackgroundColor }) => ({
14193
+ flexShrink: 0,
14194
+ backgroundColor: imageBackgroundColor || theme2.tokens.semantics.colour.background.container.secondary,
14195
+ overflow: "hidden",
14196
+ aspectRatio: "1 / 1",
14197
+ height: "100%",
14198
+ position: "relative"
14199
+ })
14200
+ );
14201
+ var StyledQuantityBadge = styled60__default.default(reactNative.View)(({ theme: theme2 }) => {
14202
+ const spacing = theme2.tokens.semantics.dimensions.spacing;
14203
+ const borderRadius = theme2.tokens.semantics.dimensions.borderRadius;
14204
+ const { colour } = theme2.tokens.semantics;
14205
+ return {
14206
+ position: "absolute",
14207
+ top: parseTokenValue8(spacing["2xs"]),
14208
+ right: parseTokenValue8(spacing["2xs"]),
14209
+ backgroundColor: colour.background.container.brand,
14210
+ borderRadius: parseTokenValue8(borderRadius.xs),
14211
+ paddingHorizontal: parseTokenValue8(spacing.sm),
14212
+ height: parseTokenValue8(spacing["2xl"]),
14213
+ minWidth: parseTokenValue8(spacing["2xl"]),
14214
+ alignItems: "center",
14215
+ justifyContent: "center",
14216
+ zIndex: 2
14217
+ };
14218
+ });
14207
14219
  var StyledContentArea = styled60__default.default(reactNative.View)(({ theme: theme2 }) => {
14208
14220
  const { spacing } = theme2.tokens.semantics.dimensions;
14209
14221
  return {
@@ -14255,6 +14267,8 @@ var ProductDisplayCard = React60__default.default.forwardRef(
14255
14267
  incrementDisabled = false,
14256
14268
  decrementDisabled = false,
14257
14269
  image,
14270
+ imageBackgroundColor,
14271
+ showImageQuantityBadge = false,
14258
14272
  banner,
14259
14273
  showBanner = false,
14260
14274
  bannerType = "info",
@@ -14274,6 +14288,8 @@ var ProductDisplayCard = React60__default.default.forwardRef(
14274
14288
  "incrementDisabled",
14275
14289
  "decrementDisabled",
14276
14290
  "image",
14291
+ "imageBackgroundColor",
14292
+ "showImageQuantityBadge",
14277
14293
  "banner",
14278
14294
  "showBanner",
14279
14295
  "bannerType",
@@ -14285,7 +14301,16 @@ var ProductDisplayCard = React60__default.default.forwardRef(
14285
14301
  }
14286
14302
  };
14287
14303
  const cardContent = /* @__PURE__ */ jsxRuntime.jsxs(StyledCardContainer, __spreadProps(__spreadValues({ ref, cardDevice: device }, rest), { children: [
14288
- image && /* @__PURE__ */ jsxRuntime.jsx(StyledImage3, { children: image }),
14304
+ image && /* @__PURE__ */ jsxRuntime.jsxs(StyledImage3, { imageBackgroundColor, children: [
14305
+ typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
14306
+ reactNative.Image,
14307
+ {
14308
+ source: { uri: image },
14309
+ style: { width: "100%", height: "100%" }
14310
+ }
14311
+ ) : image,
14312
+ showImageQuantityBadge && quantity && /* @__PURE__ */ jsxRuntime.jsx(StyledQuantityBadge, { children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", size: "sm", weight: "bold", children: quantity }) })
14313
+ ] }),
14289
14314
  /* @__PURE__ */ jsxRuntime.jsxs(StyledContentArea, { contentDevice: device, children: [
14290
14315
  /* @__PURE__ */ jsxRuntime.jsxs(StyledTextContainer, { children: [
14291
14316
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "heading", size: "xs", color: "primary", children: title }),