@butternutbox/pawprint-native 0.5.0 → 0.6.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.
@@ -15,16 +15,16 @@
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
17
  ESM dist/index.js.map 2.65 MB
18
- ESM ⚡️ Build success in 11263ms
18
+ ESM ⚡️ Build success in 11379ms
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
22
  CJS dist/ibm-plex-sans-condensed-500-normal-IEQBNVGX.woff2 19.48 KB
23
23
  CJS dist/ibm-plex-sans-condensed-600-normal-UX5ZU5T6.woff2 19.35 KB
24
24
  CJS dist/ibm-plex-sans-condensed-700-normal-4PFYFTSO.woff2 18.90 KB
25
- CJS dist/index.cjs 1.77 MB
25
+ CJS dist/index.cjs 1.78 MB
26
26
  CJS dist/index.cjs.map 2.65 MB
27
- CJS ⚡️ Build success in 11267ms
28
- DTS ⚡️ Build success in 22041ms
29
- DTS dist/index.d.cts 88.44 KB
30
- DTS dist/index.d.ts 88.44 KB
27
+ CJS ⚡️ Build success in 11384ms
28
+ DTS ⚡️ Build success in 21658ms
29
+ DTS dist/index.d.cts 88.74 KB
30
+ DTS dist/index.d.ts 88.74 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @butternutbox/pawprint-native
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9ea6d92: Add optional `tag` prop to Radio (web + native). Renders a Tag below the label/subtext using the `radio.spacing.content.tag.topPadding` token, and passes through the full Tag API (variant, icon, size). The tag is hidden when the prop is omitted.
8
+
9
+ ### Patch Changes
10
+
11
+ - 924acde: Apply ButtonDock horizontal padding tokens and fix inline variant alignment to space-between
12
+ - a164330: allow all notification variants to accept link prop
13
+
14
+ ## 0.5.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 4e3a96a: fix drawer layour for mobile devices'
19
+
3
20
  ## 0.5.0
4
21
 
5
22
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -8789,6 +8789,7 @@ DrawerOverlay.displayName = "Drawer.Overlay";
8789
8789
  var DrawerDragContext = React60__default.default.createContext(null);
8790
8790
  var useDrawerDragContext = () => React60__default.default.useContext(DrawerDragContext);
8791
8791
  var DrawerFooterContext = React60__default.default.createContext(false);
8792
+ var useDrawerFooterContext = () => React60__default.default.useContext(DrawerFooterContext);
8792
8793
  var DrawerHeaderContext = React60__default.default.createContext(null);
8793
8794
  var useDrawerHeaderContext = () => React60__default.default.useContext(DrawerHeaderContext);
8794
8795
  var OPEN_DURATION = 320;
@@ -9315,12 +9316,22 @@ var DrawerDescription = React60__default.default.forwardRef(
9315
9316
  );
9316
9317
  DrawerDescription.displayName = "Drawer.Description";
9317
9318
  var parseTokenValue26 = (value) => parseFloat(value);
9318
- var StyledScrollView = styled60__default.default(reactNative.ScrollView)(({ bodyPaddingHorizontal, bodyPaddingRight, bodyGap }) => ({
9319
- flex: 1,
9320
- paddingLeft: bodyPaddingHorizontal,
9321
- paddingRight: bodyPaddingRight,
9322
- gap: bodyGap
9323
- }));
9319
+ var StyledScrollView = styled60__default.default(reactNative.ScrollView)(
9320
+ ({
9321
+ bodyPaddingHorizontal,
9322
+ bodyPaddingRight,
9323
+ bodyGap,
9324
+ bodyMaxHeight,
9325
+ bodyPaddingBottom
9326
+ }) => ({
9327
+ flex: 1,
9328
+ paddingLeft: bodyPaddingHorizontal,
9329
+ paddingRight: bodyPaddingRight,
9330
+ gap: bodyGap,
9331
+ maxHeight: bodyMaxHeight,
9332
+ paddingBottom: bodyPaddingBottom
9333
+ })
9334
+ );
9324
9335
  var DrawerBody = React60__default.default.forwardRef(
9325
9336
  (_a, ref) => {
9326
9337
  var _b = _a, { children, contentContainerStyle } = _b, props = __objRest(_b, ["children", "contentContainerStyle"]);
@@ -9329,10 +9340,14 @@ var DrawerBody = React60__default.default.forwardRef(
9329
9340
  const { buttons } = theme2.tokens.components;
9330
9341
  const { content } = spacing;
9331
9342
  const headerContext = useDrawerHeaderContext();
9343
+ const footerContext = useDrawerFooterContext();
9344
+ const { height: windowHeight } = reactNative.useWindowDimensions();
9332
9345
  const gap = parseTokenValue26(content.slot.gap);
9333
9346
  const horizontalPadding = parseTokenValue26(content.slot.horizontalPadding);
9334
9347
  const topPadding = parseTokenValue26(content.slot.verticalPadding);
9348
+ const bodyMaxHeight = windowHeight - 300;
9335
9349
  const paddingRight = headerContext === null ? parseTokenValue26(spacing.close.right.md) + parseTokenValue26(buttons.size.sm.height) : horizontalPadding;
9350
+ const bodyPaddingBottom = !footerContext ? parseTokenValue26(theme2.tokens.semantics.dimensions.spacing["2xl"]) : 0;
9336
9351
  return /* @__PURE__ */ jsxRuntime.jsx(
9337
9352
  StyledScrollView,
9338
9353
  __spreadProps(__spreadValues({
@@ -9340,6 +9355,8 @@ var DrawerBody = React60__default.default.forwardRef(
9340
9355
  bodyPaddingHorizontal: horizontalPadding,
9341
9356
  bodyPaddingRight: paddingRight,
9342
9357
  bodyGap: gap,
9358
+ bodyMaxHeight,
9359
+ bodyPaddingBottom,
9343
9360
  contentContainerStyle: [
9344
9361
  {
9345
9362
  gap,
@@ -9473,7 +9490,8 @@ var StyledDockRoot = styled60__default.default(reactNative.View)(
9473
9490
  dockBgColor,
9474
9491
  dockBorderTopWidth,
9475
9492
  dockBorderTopColor,
9476
- dockPaddingVertical
9493
+ dockPaddingVertical,
9494
+ dockPaddingHorizontal
9477
9495
  }) => ({
9478
9496
  alignItems: "center",
9479
9497
  justifyContent: "center",
@@ -9481,7 +9499,8 @@ var StyledDockRoot = styled60__default.default(reactNative.View)(
9481
9499
  backgroundColor: dockBgColor,
9482
9500
  borderTopWidth: dockBorderTopWidth,
9483
9501
  borderTopColor: dockBorderTopColor,
9484
- paddingVertical: dockPaddingVertical
9502
+ paddingVertical: dockPaddingVertical,
9503
+ paddingHorizontal: dockPaddingHorizontal
9485
9504
  })
9486
9505
  );
9487
9506
  var StyledStackedInner = styled60__default.default(reactNative.View)(
@@ -9518,6 +9537,9 @@ var ButtonDock = React60__default.default.forwardRef(
9518
9537
  dockBorderTopColor: buttonDock.colour.border,
9519
9538
  dockPaddingVertical: parseTokenValue28(
9520
9539
  buttonDock.spacing[variant].mobile.topPadding
9540
+ ),
9541
+ dockPaddingHorizontal: parseTokenValue28(
9542
+ buttonDock.spacing[variant].mobile.horizontalPadding
9521
9543
  )
9522
9544
  }, rest), {
9523
9545
  children: isStacked ? /* @__PURE__ */ jsxRuntime.jsxs(
@@ -9552,7 +9574,7 @@ var ButtonDock = React60__default.default.forwardRef(
9552
9574
  {
9553
9575
  groupDirection: "row",
9554
9576
  groupAlign: "center",
9555
- groupJustify: "space-around",
9577
+ groupJustify: "space-between",
9556
9578
  groupGap,
9557
9579
  children
9558
9580
  }
@@ -10888,6 +10910,12 @@ var StyledTextContent = styled60__default.default(reactNative.View)(({ textConte
10888
10910
  var StyledAssetWrapper = styled60__default.default(reactNative.View)({
10889
10911
  alignSelf: "center"
10890
10912
  });
10913
+ var StyledTagWrapper = styled60__default.default(reactNative.View)(
10914
+ ({ tagTopPadding }) => ({
10915
+ alignItems: "flex-start",
10916
+ paddingTop: tagTopPadding
10917
+ })
10918
+ );
10891
10919
  var Radio = React60__default.default.forwardRef(
10892
10920
  (_a, ref) => {
10893
10921
  var _b = _a, {
@@ -10895,6 +10923,7 @@ var Radio = React60__default.default.forwardRef(
10895
10923
  label,
10896
10924
  subText,
10897
10925
  asset,
10926
+ tag,
10898
10927
  disabled = false,
10899
10928
  value,
10900
10929
  selected = false,
@@ -10905,6 +10934,7 @@ var Radio = React60__default.default.forwardRef(
10905
10934
  "label",
10906
10935
  "subText",
10907
10936
  "asset",
10937
+ "tag",
10908
10938
  "disabled",
10909
10939
  "value",
10910
10940
  "selected",
@@ -10959,7 +10989,7 @@ var Radio = React60__default.default.forwardRef(
10959
10989
  )
10960
10990
  }
10961
10991
  ),
10962
- (label || subText) && /* @__PURE__ */ jsxRuntime.jsxs(
10992
+ (label || subText || tag) && /* @__PURE__ */ jsxRuntime.jsxs(
10963
10993
  StyledTextContent,
10964
10994
  {
10965
10995
  textContentGap: parseTokenValue40(spacing.content.gap),
@@ -10972,6 +11002,13 @@ var Radio = React60__default.default.forwardRef(
10972
11002
  color: colour.text.subtext,
10973
11003
  children: subText
10974
11004
  }
11005
+ ),
11006
+ tag && /* @__PURE__ */ jsxRuntime.jsx(
11007
+ StyledTagWrapper,
11008
+ {
11009
+ tagTopPadding: parseTokenValue40(spacing.content.tag.topPadding),
11010
+ children: /* @__PURE__ */ jsxRuntime.jsx(Tag, __spreadValues({}, tag))
11011
+ }
10975
11012
  )
10976
11013
  ]
10977
11014
  }
@@ -12422,14 +12459,26 @@ var Notification = React60__default.default.forwardRef(
12422
12459
  "aria-label": type
12423
12460
  }
12424
12461
  ),
12425
- /* @__PURE__ */ jsxRuntime.jsx(
12426
- Typography,
12427
- {
12428
- token: systemNotifications.notifications.typography.default,
12429
- color: systemNotifications.notification.colour.text.default,
12430
- children
12431
- }
12432
- )
12462
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: { flexDirection: "column", gap: 8, flex: 1 }, children: [
12463
+ /* @__PURE__ */ jsxRuntime.jsx(
12464
+ Typography,
12465
+ {
12466
+ token: systemNotifications.notifications.typography.default,
12467
+ color: systemNotifications.notification.colour.text.default,
12468
+ children
12469
+ }
12470
+ ),
12471
+ link && /* @__PURE__ */ jsxRuntime.jsx(
12472
+ Link,
12473
+ {
12474
+ href: link.href,
12475
+ onPress: link.onPress,
12476
+ weight: "semiBold",
12477
+ size: "md",
12478
+ children: link.label
12479
+ }
12480
+ )
12481
+ ] })
12433
12482
  ]
12434
12483
  })
12435
12484
  );
@@ -12523,41 +12572,59 @@ var Notification = React60__default.default.forwardRef(
12523
12572
  rootBgColor: bgMap[type]
12524
12573
  }, rest), {
12525
12574
  children: [
12526
- /* @__PURE__ */ jsxRuntime.jsx(StyledContents, { contentsGap: parseTokenValue49(content.spacing.gap), children: /* @__PURE__ */ jsxRuntime.jsxs(StyledCopyRow, { copyGap: parseTokenValue49(content.spacing.gap), children: [
12527
- showIcon && /* @__PURE__ */ jsxRuntime.jsx(
12528
- Icon,
12529
- {
12530
- icon: IconComponent,
12531
- size: "md",
12532
- colour: type,
12533
- "aria-label": type
12534
- }
12535
- ),
12536
- /* @__PURE__ */ jsxRuntime.jsxs(
12537
- StyledInlineCopy,
12575
+ /* @__PURE__ */ jsxRuntime.jsxs(StyledContents, { contentsGap: parseTokenValue49(content.spacing.gap), children: [
12576
+ /* @__PURE__ */ jsxRuntime.jsxs(StyledCopyRow, { copyGap: parseTokenValue49(content.spacing.gap), children: [
12577
+ showIcon && /* @__PURE__ */ jsxRuntime.jsx(
12578
+ Icon,
12579
+ {
12580
+ icon: IconComponent,
12581
+ size: "md",
12582
+ colour: type,
12583
+ "aria-label": type
12584
+ }
12585
+ ),
12586
+ /* @__PURE__ */ jsxRuntime.jsxs(
12587
+ StyledInlineCopy,
12588
+ {
12589
+ copyGap: parseTokenValue49(content.copy.spacing.gap),
12590
+ children: [
12591
+ title && /* @__PURE__ */ jsxRuntime.jsx(
12592
+ Typography,
12593
+ {
12594
+ token: notifications.typography.title,
12595
+ color: colour.text.title,
12596
+ children: title
12597
+ }
12598
+ ),
12599
+ /* @__PURE__ */ jsxRuntime.jsx(
12600
+ Typography,
12601
+ {
12602
+ token: notifications.typography.body,
12603
+ color: colour.text.body,
12604
+ children
12605
+ }
12606
+ )
12607
+ ]
12608
+ }
12609
+ )
12610
+ ] }),
12611
+ link && /* @__PURE__ */ jsxRuntime.jsx(
12612
+ StyledLinkWrapper,
12538
12613
  {
12539
- copyGap: parseTokenValue49(content.copy.spacing.gap),
12540
- children: [
12541
- title && /* @__PURE__ */ jsxRuntime.jsx(
12542
- Typography,
12543
- {
12544
- token: notifications.typography.title,
12545
- color: colour.text.title,
12546
- children: title
12547
- }
12548
- ),
12549
- /* @__PURE__ */ jsxRuntime.jsx(
12550
- Typography,
12551
- {
12552
- token: notifications.typography.body,
12553
- color: colour.text.body,
12554
- children
12555
- }
12556
- )
12557
- ]
12614
+ linkPaddingLeft: parseTokenValue49(content.copy.spacing.gap),
12615
+ children: /* @__PURE__ */ jsxRuntime.jsx(
12616
+ Link,
12617
+ {
12618
+ href: link.href,
12619
+ onPress: link.onPress,
12620
+ weight: "semiBold",
12621
+ size: "md",
12622
+ children: link.label
12623
+ }
12624
+ )
12558
12625
  }
12559
12626
  )
12560
- ] }) }),
12627
+ ] }),
12561
12628
  onClose && /* @__PURE__ */ jsxRuntime.jsx(
12562
12629
  StyledCloseButton,
12563
12630
  {