@butternutbox/pawprint-native 0.15.2 → 0.16.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.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +34 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -4
- package/dist/index.d.ts +26 -4
- package/dist/index.js +34 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Illustration/Illustration.tsx +52 -7
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<
|
|
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<
|
|
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
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
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
|