@butternutbox/pawprint-native 0.12.0 → 0.13.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.
@@ -7,12 +7,12 @@
7
7
  CJS Build start
8
8
  ESM Build start
9
9
  DTS Build start
10
- CJS dist/index.cjs 527.12 KB
11
- CJS dist/index.cjs.map 1.00 MB
12
- CJS ⚡️ Build success in 7832ms
13
- ESM dist/index.js 497.76 KB
14
- ESM dist/index.js.map 1.00 MB
15
- ESM ⚡️ Build success in 7831ms
16
- DTS ⚡️ Build success in 23575ms
17
- DTS dist/index.d.cts 94.46 KB
18
- DTS dist/index.d.ts 94.46 KB
10
+ ESM dist/index.js 498.99 KB
11
+ ESM dist/index.js.map 1.01 MB
12
+ ESM ⚡️ Build success in 6117ms
13
+ CJS dist/index.cjs 528.39 KB
14
+ CJS dist/index.cjs.map 1.01 MB
15
+ CJS ⚡️ Build success in 6119ms
16
+ DTS ⚡️ Build success in 18337ms
17
+ DTS dist/index.d.cts 94.97 KB
18
+ DTS dist/index.d.ts 94.97 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @butternutbox/pawprint-native
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - e925ae4: Fix `TextArea` rendering entered text in the OS system font instead of the brand font. `StyledTextArea` now resolves `fontFamily`/`fontSize`/`letterSpacing` from the input placeholder typography tokens (matching `Input`'s `StyledInput`), so text areas render in IBM Plex Sans Condensed.
8
+
9
+ ## 0.13.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 3637663: `CheckboxGroup` with `orientation="horizontal"` now wraps its tiles onto multiple rows and makes them hug their content, so checkbox tiles can sit side by side. Adds a `fitContent` prop to `Checkbox` (tile only) to opt into content-hugging width — the horizontal group sets it automatically. Vertical groups and standalone checkboxes are unchanged.
14
+
3
15
  ## 0.12.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -4728,13 +4728,24 @@ var StyledTextAreaWrapper = styled51__default.default(reactNative.Animated.View)
4728
4728
  };
4729
4729
  });
4730
4730
  var StyledTextArea = styled51__default.default(reactNative.TextInput)(({ theme: theme2 }) => {
4731
- const { colour } = theme2.tokens.components.inputs;
4731
+ var _a, _b;
4732
+ const { colour, field } = theme2.tokens.components.inputs;
4733
+ const typography = field.placeholder.default;
4734
+ const { fontFamily } = resolveFont(
4735
+ typography.fontFamily,
4736
+ typography.fontWeight
4737
+ );
4738
+ const fontSize = parseTokenValue19(typography.fontSize);
4739
+ const letterSpacing = ((_a = typography.letterSpacing) == null ? void 0 : _a.endsWith("%")) ? parseFloat(typography.letterSpacing) / 100 * fontSize : parseFloat((_b = typography.letterSpacing) != null ? _b : "0");
4732
4740
  return __spreadValues({
4733
4741
  flex: 1,
4734
4742
  minWidth: 0,
4735
4743
  minHeight: 0,
4736
4744
  padding: 0,
4737
4745
  color: colour.field.text.default,
4746
+ fontFamily,
4747
+ fontSize,
4748
+ letterSpacing,
4738
4749
  textAlignVertical: "top"
4739
4750
  }, {
4740
4751
  outlineStyle: "none",
@@ -6367,6 +6378,7 @@ var StyledRootPressable = styled51__default.default(reactNative.Pressable)(
6367
6378
  rootPaddingVertical,
6368
6379
  rootPaddingHorizontal,
6369
6380
  rootMaxWidth,
6381
+ rootFitContent,
6370
6382
  rootBgColor,
6371
6383
  rootBorderWidth,
6372
6384
  rootBorderColor,
@@ -6376,7 +6388,7 @@ var StyledRootPressable = styled51__default.default(reactNative.Pressable)(
6376
6388
  alignItems: rootFlexAlign,
6377
6389
  gap: rootGap,
6378
6390
  opacity: rootOpacity
6379
- }, rootPaddingVertical !== void 0 ? { paddingVertical: rootPaddingVertical } : {}), rootPaddingHorizontal !== void 0 ? { paddingHorizontal: rootPaddingHorizontal } : {}), rootMaxWidth !== void 0 ? { maxWidth: rootMaxWidth, width: "100%" } : {}), rootBgColor ? { backgroundColor: rootBgColor } : {}), rootBorderWidth !== void 0 ? { borderWidth: rootBorderWidth, borderColor: rootBorderColor } : {}), rootBorderRadius !== void 0 ? { borderRadius: rootBorderRadius } : {})
6391
+ }, rootPaddingVertical !== void 0 ? { paddingVertical: rootPaddingVertical } : {}), rootPaddingHorizontal !== void 0 ? { paddingHorizontal: rootPaddingHorizontal } : {}), rootMaxWidth !== void 0 ? rootFitContent ? { maxWidth: rootMaxWidth, alignSelf: "flex-start" } : { maxWidth: rootMaxWidth, width: "100%" } : {}), rootBgColor ? { backgroundColor: rootBgColor } : {}), rootBorderWidth !== void 0 ? { borderWidth: rootBorderWidth, borderColor: rootBorderColor } : {}), rootBorderRadius !== void 0 ? { borderRadius: rootBorderRadius } : {})
6380
6392
  );
6381
6393
  var StyledControl = styled51__default.default(reactNative.View)(
6382
6394
  ({
@@ -6397,10 +6409,10 @@ var StyledControl = styled51__default.default(reactNative.View)(
6397
6409
  justifyContent: "center"
6398
6410
  })
6399
6411
  );
6400
- var StyledContent2 = styled51__default.default(reactNative.View)(({ contentGap }) => ({
6412
+ var StyledContent2 = styled51__default.default(reactNative.View)(({ contentGap, contentFlex }) => ({
6401
6413
  flexDirection: "column",
6402
6414
  gap: contentGap,
6403
- flex: 1,
6415
+ flex: contentFlex,
6404
6416
  minWidth: 0
6405
6417
  }));
6406
6418
  var StyledIllustration = styled51__default.default(reactNative.View)(({ illustrationSize }) => ({
@@ -6420,6 +6432,7 @@ var Checkbox = React66__default.default.forwardRef(
6420
6432
  defaultChecked = false,
6421
6433
  onCheckedChange,
6422
6434
  disabled = false,
6435
+ fitContent = false,
6423
6436
  style
6424
6437
  } = _b, rest = __objRest(_b, [
6425
6438
  "variant",
@@ -6430,6 +6443,7 @@ var Checkbox = React66__default.default.forwardRef(
6430
6443
  "defaultChecked",
6431
6444
  "onCheckedChange",
6432
6445
  "disabled",
6446
+ "fitContent",
6433
6447
  "style"
6434
6448
  ]);
6435
6449
  const theme2 = react.useTheme();
@@ -6464,6 +6478,7 @@ var Checkbox = React66__default.default.forwardRef(
6464
6478
  rootPaddingVertical: isTile ? parseTokenValue31(checkbox.checkboxTile.spacing.verticalPadding) : void 0,
6465
6479
  rootPaddingHorizontal: isTile ? parseTokenValue31(checkbox.checkboxTile.spacing.horizontalPadding) : void 0,
6466
6480
  rootMaxWidth: isTile ? parseTokenValue31(checkbox.checkboxTile.size.maxWidth) : void 0,
6481
+ rootFitContent: isTile && fitContent,
6467
6482
  rootBgColor: isTile ? isChecked ? checkbox.checkboxTile.colour.background.selected : checkbox.checkboxTile.colour.background.default : void 0,
6468
6483
  rootBorderWidth: isTile ? parseTokenValue31(checkbox.checkboxTile.borderWidth.default) : void 0,
6469
6484
  rootBorderColor: isTile ? isChecked ? checkbox.checkboxTile.colour.border.selected : checkbox.checkboxTile.colour.border.default : void 0,
@@ -6486,6 +6501,7 @@ var Checkbox = React66__default.default.forwardRef(
6486
6501
  StyledContent2,
6487
6502
  {
6488
6503
  contentGap: parseTokenValue31(checkbox.spacing.content.gap),
6504
+ contentFlex: isTile && fitContent ? 0 : 1,
6489
6505
  children: [
6490
6506
  label && /* @__PURE__ */ jsxRuntime.jsx(
6491
6507
  Typography,
@@ -6522,23 +6538,35 @@ var Checkbox = React66__default.default.forwardRef(
6522
6538
  );
6523
6539
  Checkbox.displayName = "Checkbox";
6524
6540
  var parseTokenValue32 = (value) => parseFloat(value);
6525
- var StyledGroup = styled51__default.default(reactNative.View)(({ groupDirection, groupGap }) => ({
6541
+ var StyledGroup = styled51__default.default(reactNative.View)(({ groupDirection, groupGap, groupWrap }) => ({
6526
6542
  flexDirection: groupDirection,
6527
- gap: groupGap
6543
+ gap: groupGap,
6544
+ flexWrap: groupWrap ? "wrap" : "nowrap"
6528
6545
  }));
6529
6546
  var CheckboxGroup = React66__default.default.forwardRef(
6530
6547
  (_a, ref) => {
6531
6548
  var _b = _a, { orientation = "vertical", children } = _b, rest = __objRest(_b, ["orientation", "children"]);
6532
6549
  const theme2 = react.useTheme();
6533
6550
  const { checkbox } = theme2.tokens.components;
6551
+ const isHorizontal = orientation === "horizontal";
6552
+ const renderChildren = () => isHorizontal ? React66__default.default.Children.map(children, (child) => {
6553
+ var _a2;
6554
+ if (!React66__default.default.isValidElement(child)) return child;
6555
+ const childProps = child.props;
6556
+ return React66__default.default.cloneElement(
6557
+ child,
6558
+ { fitContent: (_a2 = childProps.fitContent) != null ? _a2 : true }
6559
+ );
6560
+ }) : children;
6534
6561
  return /* @__PURE__ */ jsxRuntime.jsx(
6535
6562
  StyledGroup,
6536
6563
  __spreadProps(__spreadValues({
6537
6564
  ref,
6538
- groupDirection: orientation === "horizontal" ? "row" : "column",
6539
- groupGap: parseTokenValue32(checkbox.spacing.gap)
6565
+ groupDirection: isHorizontal ? "row" : "column",
6566
+ groupGap: parseTokenValue32(checkbox.spacing.gap),
6567
+ groupWrap: isHorizontal
6540
6568
  }, rest), {
6541
- children
6569
+ children: renderChildren()
6542
6570
  })
6543
6571
  );
6544
6572
  }