@butternutbox/pawprint-native 0.15.2 → 0.16.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/dist/index.d.cts CHANGED
@@ -8,7 +8,7 @@ import React from 'react';
8
8
  import * as _emotion_react from '@emotion/react';
9
9
  import { Theme } from '@emotion/react';
10
10
  import * as react_native from 'react-native';
11
- import { View, ViewProps, TextProps, Text, PressableProps, TextInputProps, TextInput, ImageSourcePropType, ScrollViewProps } from 'react-native';
11
+ import { View, ViewProps, TextProps, Text, PressableProps, FlexStyle, TextInputProps, TextInput, ImageSourcePropType, ScrollViewProps } from 'react-native';
12
12
  import * as react_native_reanimated from 'react-native-reanimated';
13
13
  import { FadeIn, FadeOut, FadeInUp, FadeOutUp, FadeInDown, FadeOutDown, ComplexAnimationBuilder, BaseAnimationBuilder, EntryExitAnimationFunction, FadeInRight, FadeOutRight, FadeInLeft, FadeOutLeft } from 'react-native-reanimated';
14
14
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -422,14 +422,22 @@ type PawprintIllustration$2 = React.ComponentType<{
422
422
  width?: number;
423
423
  height?: number;
424
424
  }>;
425
+ type FlexboxProps = {
426
+ align?: FlexStyle["alignItems"];
427
+ justify?: FlexStyle["justifyContent"];
428
+ flexDirection?: FlexStyle["flexDirection"];
429
+ flexWrap?: FlexStyle["flexWrap"];
430
+ alignContent?: FlexStyle["alignContent"];
431
+ alignSelf?: FlexStyle["alignSelf"];
432
+ };
425
433
  type IllustrationOwnProps = {
426
434
  illustration: PawprintIllustration$2;
427
435
  size?: IllustrationSize;
428
436
  "aria-label"?: string;
429
- };
437
+ } & FlexboxProps;
430
438
  type IllustrationProps = IllustrationOwnProps & Omit<ViewProps, keyof IllustrationOwnProps>;
431
439
  /**
432
- * Renders a multi-colour SVG illustration with token-based sizing.
440
+ * Renders a multi-colour SVG illustration with token-based sizing and flexbox alignment.
433
441
  *
434
442
  * @example
435
443
  * ```tsx
@@ -440,10 +448,24 @@ type IllustrationProps = IllustrationOwnProps & Omit<ViewProps, keyof Illustrati
440
448
  * ```
441
449
  *
442
450
  * @param illustration - **(required)** Illustration component
451
+ <<<<<<< Updated upstream
443
452
  * @param size - *(optional)* Size variant: sm (default), lg, xl, xxl, xxxl
453
+ =======
454
+ * @param size - *(optional)* Size variant: sm (default), lg, xl
455
+ * @param align - *(optional)* Flexbox alignItems (default: center)
456
+ * @param justify - *(optional)* Flexbox justifyContent (default: center)
457
+ * @param flexDirection - *(optional)* Flexbox flex direction
458
+ * @param flexWrap - *(optional)* Flexbox wrap
459
+ * @param alignContent - *(optional)* Flexbox alignContent
460
+ * @param alignSelf - *(optional)* Flexbox alignSelf
461
+ >>>>>>> Stashed changes
444
462
  * @param aria-label - *(optional)* Accessible label
445
463
  */
446
- declare const Illustration: React.ForwardRefExoticComponent<IllustrationOwnProps & Omit<ViewProps, keyof IllustrationOwnProps> & React.RefAttributes<View>>;
464
+ declare const Illustration: React.ForwardRefExoticComponent<{
465
+ illustration: PawprintIllustration$2;
466
+ size?: IllustrationSize;
467
+ "aria-label"?: string;
468
+ } & FlexboxProps & Omit<ViewProps, "aria-label" | "size" | "illustration" | keyof FlexboxProps> & React.RefAttributes<View>>;
447
469
 
448
470
  type InputState = "default" | "error" | "success";
449
471
  type InputFieldOwnProps = {
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import React from 'react';
8
8
  import * as _emotion_react from '@emotion/react';
9
9
  import { Theme } from '@emotion/react';
10
10
  import * as react_native from 'react-native';
11
- import { View, ViewProps, TextProps, Text, PressableProps, TextInputProps, TextInput, ImageSourcePropType, ScrollViewProps } from 'react-native';
11
+ import { View, ViewProps, TextProps, Text, PressableProps, FlexStyle, TextInputProps, TextInput, ImageSourcePropType, ScrollViewProps } from 'react-native';
12
12
  import * as react_native_reanimated from 'react-native-reanimated';
13
13
  import { FadeIn, FadeOut, FadeInUp, FadeOutUp, FadeInDown, FadeOutDown, ComplexAnimationBuilder, BaseAnimationBuilder, EntryExitAnimationFunction, FadeInRight, FadeOutRight, FadeInLeft, FadeOutLeft } from 'react-native-reanimated';
14
14
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -422,14 +422,22 @@ type PawprintIllustration$2 = React.ComponentType<{
422
422
  width?: number;
423
423
  height?: number;
424
424
  }>;
425
+ type FlexboxProps = {
426
+ align?: FlexStyle["alignItems"];
427
+ justify?: FlexStyle["justifyContent"];
428
+ flexDirection?: FlexStyle["flexDirection"];
429
+ flexWrap?: FlexStyle["flexWrap"];
430
+ alignContent?: FlexStyle["alignContent"];
431
+ alignSelf?: FlexStyle["alignSelf"];
432
+ };
425
433
  type IllustrationOwnProps = {
426
434
  illustration: PawprintIllustration$2;
427
435
  size?: IllustrationSize;
428
436
  "aria-label"?: string;
429
- };
437
+ } & FlexboxProps;
430
438
  type IllustrationProps = IllustrationOwnProps & Omit<ViewProps, keyof IllustrationOwnProps>;
431
439
  /**
432
- * Renders a multi-colour SVG illustration with token-based sizing.
440
+ * Renders a multi-colour SVG illustration with token-based sizing and flexbox alignment.
433
441
  *
434
442
  * @example
435
443
  * ```tsx
@@ -440,10 +448,24 @@ type IllustrationProps = IllustrationOwnProps & Omit<ViewProps, keyof Illustrati
440
448
  * ```
441
449
  *
442
450
  * @param illustration - **(required)** Illustration component
451
+ <<<<<<< Updated upstream
443
452
  * @param size - *(optional)* Size variant: sm (default), lg, xl, xxl, xxxl
453
+ =======
454
+ * @param size - *(optional)* Size variant: sm (default), lg, xl
455
+ * @param align - *(optional)* Flexbox alignItems (default: center)
456
+ * @param justify - *(optional)* Flexbox justifyContent (default: center)
457
+ * @param flexDirection - *(optional)* Flexbox flex direction
458
+ * @param flexWrap - *(optional)* Flexbox wrap
459
+ * @param alignContent - *(optional)* Flexbox alignContent
460
+ * @param alignSelf - *(optional)* Flexbox alignSelf
461
+ >>>>>>> Stashed changes
444
462
  * @param aria-label - *(optional)* Accessible label
445
463
  */
446
- declare const Illustration: React.ForwardRefExoticComponent<IllustrationOwnProps & Omit<ViewProps, keyof IllustrationOwnProps> & React.RefAttributes<View>>;
464
+ declare const Illustration: React.ForwardRefExoticComponent<{
465
+ illustration: PawprintIllustration$2;
466
+ size?: IllustrationSize;
467
+ "aria-label"?: string;
468
+ } & FlexboxProps & Omit<ViewProps, "aria-label" | "size" | "illustration" | keyof FlexboxProps> & React.RefAttributes<View>>;
447
469
 
448
470
  type InputState = "default" | "error" | "success";
449
471
  type InputFieldOwnProps = {
package/dist/index.js CHANGED
@@ -1287,32 +1287,60 @@ var IconButton = React66.forwardRef(
1287
1287
  );
1288
1288
  IconButton.displayName = "IconButton";
1289
1289
  var parseTokenValue11 = (value) => parseFloat(value);
1290
- var StyledRoot2 = styled51(View)(({ illustrationHeight }) => ({
1291
- alignItems: "center",
1292
- justifyContent: "center",
1293
- flexShrink: 0,
1294
- height: illustrationHeight
1295
- }));
1290
+ var StyledRoot2 = styled51(View)(({ illustrationHeight, flexboxProps }) => {
1291
+ var _a, _b;
1292
+ return {
1293
+ alignItems: (_a = flexboxProps.align) != null ? _a : "center",
1294
+ justifyContent: (_b = flexboxProps.justify) != null ? _b : "center",
1295
+ flexDirection: flexboxProps.flexDirection,
1296
+ flexWrap: flexboxProps.flexWrap,
1297
+ alignContent: flexboxProps.alignContent,
1298
+ alignSelf: flexboxProps.alignSelf,
1299
+ flexShrink: 0,
1300
+ height: illustrationHeight
1301
+ };
1302
+ });
1296
1303
  var Illustration = React66.forwardRef(
1297
1304
  (_a, ref) => {
1298
1305
  var _b = _a, {
1299
1306
  illustration: IllustrationComponent,
1300
1307
  size = "sm",
1308
+ align,
1309
+ justify,
1310
+ flexDirection,
1311
+ flexWrap,
1312
+ alignContent,
1313
+ alignSelf,
1301
1314
  "aria-label": ariaLabel
1302
1315
  } = _b, rest = __objRest(_b, [
1303
1316
  "illustration",
1304
1317
  "size",
1318
+ "align",
1319
+ "justify",
1320
+ "flexDirection",
1321
+ "flexWrap",
1322
+ "alignContent",
1323
+ "alignSelf",
1305
1324
  "aria-label"
1306
1325
  ]);
1307
1326
  const theme2 = useTheme();
1308
1327
  const dimension = parseTokenValue11(
1309
1328
  theme2.tokens.components.illustrations.sizing.illustrations[size]
1310
1329
  );
1330
+ const flexboxProps = {
1331
+ align,
1332
+ justify,
1333
+ flexDirection,
1334
+ flexWrap,
1335
+ alignContent,
1336
+ alignSelf
1337
+ };
1311
1338
  return /* @__PURE__ */ jsx(
1312
1339
  StyledRoot2,
1313
1340
  __spreadProps(__spreadValues({
1314
1341
  ref,
1315
1342
  illustrationHeight: dimension,
1343
+ flexboxProps,
1316
1344
  accessibilityRole: ariaLabel ? "image" : void 0,
1317
1345
  accessibilityLabel: ariaLabel,
1318
1346
  accessible: !!ariaLabel
@@ -7091,7 +7119,11 @@ var NumberFieldInput = React66.forwardRef(
7091
7119
  style: {
7092
7120
  position: "absolute",
7093
7121
  bottom: 4,
7094
- width: fieldMinWidth,
7122
+ // Span the full field (not the min-width) so the help text
7123
+ // centres and never wraps into the value when the field is
7124
+ // wider than its min-width (e.g. fullWidth) or the copy is long.
7125
+ left: 0,
7126
+ right: 0,
7095
7127
  display: "flex",
7096
7128
  justifyContent: "center",
7097
7129
  alignItems: "center"
@@ -7099,7 +7131,7 @@ var NumberFieldInput = React66.forwardRef(
7099
7131
  children: /* @__PURE__ */ jsx(
7100
7132
  Typography,
7101
7133
  {
7102
- token: inputTokens3.description.text.default,
7134
+ token: isLarge ? tokens3.typography.large.secondaryContent : tokens3.typography.small.smallLabel,
7103
7135
  color: inputTokens3.colour.description.default,
7104
7136
  children: inlineHelpText
7105
7137
  }