@butternutbox/pawprint-native 0.23.2 → 0.24.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/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +22 -0
- package/dist/index.cjs +91 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +92 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Button/Button.tsx +20 -27
- package/src/components/atoms/Tag/Tag.tsx +14 -6
- package/src/components/atoms/Typography/Typography.tsx +6 -0
- package/src/components/molecules/Progress/Progress.stories.tsx +37 -0
- package/src/components/molecules/Progress/Progress.tsx +37 -2
- package/src/components/molecules/Progress/index.ts +1 -1
- package/src/components/molecules/StackedNotifications/StackedNotifications.test.tsx +58 -1
- package/src/components/molecules/StackedNotifications/StackedNotifications.tsx +83 -17
- package/src/components/molecules/TabNavigation/TabNavigation.tsx +6 -2
package/dist/index.d.cts
CHANGED
|
@@ -1413,8 +1413,18 @@ type ProgressOwnProps = {
|
|
|
1413
1413
|
label?: React.ReactNode;
|
|
1414
1414
|
description?: React.ReactNode;
|
|
1415
1415
|
getValueLabel?: (value: number, max: number) => string;
|
|
1416
|
+
animate?: boolean;
|
|
1416
1417
|
};
|
|
1417
1418
|
type ProgressProps = ProgressOwnProps & Omit<ViewProps, keyof ProgressOwnProps>;
|
|
1419
|
+
/**
|
|
1420
|
+
* Timing the indicator eases with. Exported so a consumer overlaying something
|
|
1421
|
+
* on the track (a marker, a mascot) can run its own animation off the same
|
|
1422
|
+
* config and stay pinned to the leading edge of the fill.
|
|
1423
|
+
*/
|
|
1424
|
+
declare const PROGRESS_ANIMATION: {
|
|
1425
|
+
readonly duration: 450;
|
|
1426
|
+
readonly easing: react_native_reanimated.EasingFunction;
|
|
1427
|
+
};
|
|
1418
1428
|
/**
|
|
1419
1429
|
* A horizontal progress bar that visualises the completion of a determinate
|
|
1420
1430
|
* task. Supports an optional label (top-left) and description (top-right),
|
|
@@ -1429,6 +1439,8 @@ type ProgressProps = ProgressOwnProps & Omit<ViewProps, keyof ProgressOwnProps>;
|
|
|
1429
1439
|
* @param {React.ReactNode} [label] - Label rendered in the top-left above the track.
|
|
1430
1440
|
* @param {React.ReactNode} [description] - Helper text rendered in the top-right above the track.
|
|
1431
1441
|
* @param {(value: number, max: number) => string} [getValueLabel] - Accessible value label.
|
|
1442
|
+
* @param {boolean} [animate=true] - Ease the indicator to its new width instead of
|
|
1443
|
+
* snapping. Ignored when the OS has reduced motion enabled.
|
|
1432
1444
|
*
|
|
1433
1445
|
* @example
|
|
1434
1446
|
* ```tsx
|
|
@@ -2494,4 +2506,4 @@ declare const useDrawerKeyboardAvoidance: (minPadding?: number) => {
|
|
|
2494
2506
|
contentContainerStyle: StyleProp<ViewStyle>;
|
|
2495
2507
|
};
|
|
2496
2508
|
|
|
2497
|
-
export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, BRAND_FONTS, Badge$1 as Badge, type BadgeProps, Button, type ButtonColour, ButtonDock, type ButtonDockProps, type ButtonDockVariant, ButtonGroup, type ButtonGroupLayout, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, CarouselControls, type CarouselControlsProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxVariant, CopyField, CopyFieldInput, type CopyFieldProps, Countdown, type CountdownLabels, type CountdownProps, type CountdownUnitLabel, type DateItemState, DatePicker, type DatePickerProps, Divider, type DividerColour, type DividerProps, type DividerSize, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, type DrawerOverlayProviderProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, FilterTab, type FilterTabItemProps, type FilterTabProps, Hint, type HintProps, Icon, IconButton, type IconButtonColour, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconCategory, type IconColour, type IconProps, type IconSize, Illustration, type IllustrationProps, type IllustrationSize, Input, InputDescription, type InputDescriptionProps, InputError, type InputErrorProps, InputField, type InputFieldProps, InputLabel, type InputLabelProps, type InputProps, InputText, Link, type LinkProps, type LinkSize, type LinkWeight, Logo, type LogoBrand, type LogoProps, type LogoSvgComponent, type LogoVariant, Menu, type MenuAlign, MenuItem, type MenuItemProps, type MenuItemVariant, type MenuProps, MessageCard, MessageCardBanner, type MessageCardBannerMedia, type MessageCardBannerProps, MessageCardInsight, type MessageCardInsightProps, NativeSelectPicker, type NativeSelectPickerItem, type NativeSelectPickerProps, Notification, type NotificationProps, NumberField, type NumberFieldProps, NumberInput, NumberInputField, type NumberInputFieldProps, type NumberInputProps, PasswordField, PasswordFieldInput, type PasswordFieldProps, PasswordFieldRequirements, type PasswordFieldRequirementsProps, type PasswordRequirement, type PasswordValidationRule, type PawprintIcon, type PawprintIllustration$2 as PawprintIllustration, PawprintProvider, type PawprintProviderProps, PictureSelector, type PictureSelectorItem, type PictureSelectorProps, ProductDisplayCard, type ProductDisplayCardProps, ProductListingCardWithBadgeAndGrid as ProductListingCard, type ProductListingCardProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOwnProps, type RadioProps, RadioTile, SearchField, SearchFieldInput, type SearchFieldProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectField, SelectFieldContent, SelectFieldItem, type SelectFieldItemProps, type SelectFieldProps, type SelectFieldSearchResult, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, type StackedNotificationItem, type StackedNotificationType, StackedNotifications, type StackedNotificationsProps, Switch, type SwitchProps, TabNavigation, type TabNavigationListProps, type TabNavigationPanelProps, type TabNavigationProps, type TabNavigationTabProps, Tag, type TagProps, TextArea, TextAreaField, type TextAreaFieldProps, TextAreaLabel, type TextAreaLabelProps, type TextAreaProps, ThemeProvider, Tooltip, type TooltipProps, Typography, type TypographyProps, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
|
|
2509
|
+
export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, BRAND_FONTS, Badge$1 as Badge, type BadgeProps, Button, type ButtonColour, ButtonDock, type ButtonDockProps, type ButtonDockVariant, ButtonGroup, type ButtonGroupLayout, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, CarouselControls, type CarouselControlsProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxVariant, CopyField, CopyFieldInput, type CopyFieldProps, Countdown, type CountdownLabels, type CountdownProps, type CountdownUnitLabel, type DateItemState, DatePicker, type DatePickerProps, Divider, type DividerColour, type DividerProps, type DividerSize, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, type DrawerOverlayProviderProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, FilterTab, type FilterTabItemProps, type FilterTabProps, Hint, type HintProps, Icon, IconButton, type IconButtonColour, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconCategory, type IconColour, type IconProps, type IconSize, Illustration, type IllustrationProps, type IllustrationSize, Input, InputDescription, type InputDescriptionProps, InputError, type InputErrorProps, InputField, type InputFieldProps, InputLabel, type InputLabelProps, type InputProps, InputText, Link, type LinkProps, type LinkSize, type LinkWeight, Logo, type LogoBrand, type LogoProps, type LogoSvgComponent, type LogoVariant, Menu, type MenuAlign, MenuItem, type MenuItemProps, type MenuItemVariant, type MenuProps, MessageCard, MessageCardBanner, type MessageCardBannerMedia, type MessageCardBannerProps, MessageCardInsight, type MessageCardInsightProps, NativeSelectPicker, type NativeSelectPickerItem, type NativeSelectPickerProps, Notification, type NotificationProps, NumberField, type NumberFieldProps, NumberInput, NumberInputField, type NumberInputFieldProps, type NumberInputProps, PROGRESS_ANIMATION, PasswordField, PasswordFieldInput, type PasswordFieldProps, PasswordFieldRequirements, type PasswordFieldRequirementsProps, type PasswordRequirement, type PasswordValidationRule, type PawprintIcon, type PawprintIllustration$2 as PawprintIllustration, PawprintProvider, type PawprintProviderProps, PictureSelector, type PictureSelectorItem, type PictureSelectorProps, ProductDisplayCard, type ProductDisplayCardProps, ProductListingCardWithBadgeAndGrid as ProductListingCard, type ProductListingCardProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOwnProps, type RadioProps, RadioTile, SearchField, SearchFieldInput, type SearchFieldProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectField, SelectFieldContent, SelectFieldItem, type SelectFieldItemProps, type SelectFieldProps, type SelectFieldSearchResult, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, type StackedNotificationItem, type StackedNotificationType, StackedNotifications, type StackedNotificationsProps, Switch, type SwitchProps, TabNavigation, type TabNavigationListProps, type TabNavigationPanelProps, type TabNavigationProps, type TabNavigationTabProps, Tag, type TagProps, TextArea, TextAreaField, type TextAreaFieldProps, TextAreaLabel, type TextAreaLabelProps, type TextAreaProps, ThemeProvider, Tooltip, type TooltipProps, Typography, type TypographyProps, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
|
package/dist/index.d.ts
CHANGED
|
@@ -1413,8 +1413,18 @@ type ProgressOwnProps = {
|
|
|
1413
1413
|
label?: React.ReactNode;
|
|
1414
1414
|
description?: React.ReactNode;
|
|
1415
1415
|
getValueLabel?: (value: number, max: number) => string;
|
|
1416
|
+
animate?: boolean;
|
|
1416
1417
|
};
|
|
1417
1418
|
type ProgressProps = ProgressOwnProps & Omit<ViewProps, keyof ProgressOwnProps>;
|
|
1419
|
+
/**
|
|
1420
|
+
* Timing the indicator eases with. Exported so a consumer overlaying something
|
|
1421
|
+
* on the track (a marker, a mascot) can run its own animation off the same
|
|
1422
|
+
* config and stay pinned to the leading edge of the fill.
|
|
1423
|
+
*/
|
|
1424
|
+
declare const PROGRESS_ANIMATION: {
|
|
1425
|
+
readonly duration: 450;
|
|
1426
|
+
readonly easing: react_native_reanimated.EasingFunction;
|
|
1427
|
+
};
|
|
1418
1428
|
/**
|
|
1419
1429
|
* A horizontal progress bar that visualises the completion of a determinate
|
|
1420
1430
|
* task. Supports an optional label (top-left) and description (top-right),
|
|
@@ -1429,6 +1439,8 @@ type ProgressProps = ProgressOwnProps & Omit<ViewProps, keyof ProgressOwnProps>;
|
|
|
1429
1439
|
* @param {React.ReactNode} [label] - Label rendered in the top-left above the track.
|
|
1430
1440
|
* @param {React.ReactNode} [description] - Helper text rendered in the top-right above the track.
|
|
1431
1441
|
* @param {(value: number, max: number) => string} [getValueLabel] - Accessible value label.
|
|
1442
|
+
* @param {boolean} [animate=true] - Ease the indicator to its new width instead of
|
|
1443
|
+
* snapping. Ignored when the OS has reduced motion enabled.
|
|
1432
1444
|
*
|
|
1433
1445
|
* @example
|
|
1434
1446
|
* ```tsx
|
|
@@ -2494,4 +2506,4 @@ declare const useDrawerKeyboardAvoidance: (minPadding?: number) => {
|
|
|
2494
2506
|
contentContainerStyle: StyleProp<ViewStyle>;
|
|
2495
2507
|
};
|
|
2496
2508
|
|
|
2497
|
-
export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, BRAND_FONTS, Badge$1 as Badge, type BadgeProps, Button, type ButtonColour, ButtonDock, type ButtonDockProps, type ButtonDockVariant, ButtonGroup, type ButtonGroupLayout, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, CarouselControls, type CarouselControlsProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxVariant, CopyField, CopyFieldInput, type CopyFieldProps, Countdown, type CountdownLabels, type CountdownProps, type CountdownUnitLabel, type DateItemState, DatePicker, type DatePickerProps, Divider, type DividerColour, type DividerProps, type DividerSize, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, type DrawerOverlayProviderProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, FilterTab, type FilterTabItemProps, type FilterTabProps, Hint, type HintProps, Icon, IconButton, type IconButtonColour, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconCategory, type IconColour, type IconProps, type IconSize, Illustration, type IllustrationProps, type IllustrationSize, Input, InputDescription, type InputDescriptionProps, InputError, type InputErrorProps, InputField, type InputFieldProps, InputLabel, type InputLabelProps, type InputProps, InputText, Link, type LinkProps, type LinkSize, type LinkWeight, Logo, type LogoBrand, type LogoProps, type LogoSvgComponent, type LogoVariant, Menu, type MenuAlign, MenuItem, type MenuItemProps, type MenuItemVariant, type MenuProps, MessageCard, MessageCardBanner, type MessageCardBannerMedia, type MessageCardBannerProps, MessageCardInsight, type MessageCardInsightProps, NativeSelectPicker, type NativeSelectPickerItem, type NativeSelectPickerProps, Notification, type NotificationProps, NumberField, type NumberFieldProps, NumberInput, NumberInputField, type NumberInputFieldProps, type NumberInputProps, PasswordField, PasswordFieldInput, type PasswordFieldProps, PasswordFieldRequirements, type PasswordFieldRequirementsProps, type PasswordRequirement, type PasswordValidationRule, type PawprintIcon, type PawprintIllustration$2 as PawprintIllustration, PawprintProvider, type PawprintProviderProps, PictureSelector, type PictureSelectorItem, type PictureSelectorProps, ProductDisplayCard, type ProductDisplayCardProps, ProductListingCardWithBadgeAndGrid as ProductListingCard, type ProductListingCardProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOwnProps, type RadioProps, RadioTile, SearchField, SearchFieldInput, type SearchFieldProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectField, SelectFieldContent, SelectFieldItem, type SelectFieldItemProps, type SelectFieldProps, type SelectFieldSearchResult, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, type StackedNotificationItem, type StackedNotificationType, StackedNotifications, type StackedNotificationsProps, Switch, type SwitchProps, TabNavigation, type TabNavigationListProps, type TabNavigationPanelProps, type TabNavigationProps, type TabNavigationTabProps, Tag, type TagProps, TextArea, TextAreaField, type TextAreaFieldProps, TextAreaLabel, type TextAreaLabelProps, type TextAreaProps, ThemeProvider, Tooltip, type TooltipProps, Typography, type TypographyProps, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
|
|
2509
|
+
export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, BRAND_FONTS, Badge$1 as Badge, type BadgeProps, Button, type ButtonColour, ButtonDock, type ButtonDockProps, type ButtonDockVariant, ButtonGroup, type ButtonGroupLayout, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, CarouselControls, type CarouselControlsProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxVariant, CopyField, CopyFieldInput, type CopyFieldProps, Countdown, type CountdownLabels, type CountdownProps, type CountdownUnitLabel, type DateItemState, DatePicker, type DatePickerProps, Divider, type DividerColour, type DividerProps, type DividerSize, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, type DrawerOverlayProviderProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, FilterTab, type FilterTabItemProps, type FilterTabProps, Hint, type HintProps, Icon, IconButton, type IconButtonColour, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconCategory, type IconColour, type IconProps, type IconSize, Illustration, type IllustrationProps, type IllustrationSize, Input, InputDescription, type InputDescriptionProps, InputError, type InputErrorProps, InputField, type InputFieldProps, InputLabel, type InputLabelProps, type InputProps, InputText, Link, type LinkProps, type LinkSize, type LinkWeight, Logo, type LogoBrand, type LogoProps, type LogoSvgComponent, type LogoVariant, Menu, type MenuAlign, MenuItem, type MenuItemProps, type MenuItemVariant, type MenuProps, MessageCard, MessageCardBanner, type MessageCardBannerMedia, type MessageCardBannerProps, MessageCardInsight, type MessageCardInsightProps, NativeSelectPicker, type NativeSelectPickerItem, type NativeSelectPickerProps, Notification, type NotificationProps, NumberField, type NumberFieldProps, NumberInput, NumberInputField, type NumberInputFieldProps, type NumberInputProps, PROGRESS_ANIMATION, PasswordField, PasswordFieldInput, type PasswordFieldProps, PasswordFieldRequirements, type PasswordFieldRequirementsProps, type PasswordRequirement, type PasswordValidationRule, type PawprintIcon, type PawprintIllustration$2 as PawprintIllustration, PawprintProvider, type PawprintProviderProps, PictureSelector, type PictureSelectorItem, type PictureSelectorProps, ProductDisplayCard, type ProductDisplayCardProps, ProductListingCardWithBadgeAndGrid as ProductListingCard, type ProductListingCardProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOwnProps, type RadioProps, RadioTile, SearchField, SearchFieldInput, type SearchFieldProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectField, SelectFieldContent, SelectFieldItem, type SelectFieldItemProps, type SelectFieldProps, type SelectFieldSearchResult, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, type StackedNotificationItem, type StackedNotificationType, StackedNotifications, type StackedNotificationsProps, Switch, type SwitchProps, TabNavigation, type TabNavigationListProps, type TabNavigationPanelProps, type TabNavigationProps, type TabNavigationTabProps, Tag, type TagProps, TextArea, TextAreaField, type TextAreaFieldProps, TextAreaLabel, type TextAreaLabelProps, type TextAreaProps, ThemeProvider, Tooltip, type TooltipProps, Typography, type TypographyProps, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import * as AvatarPrimitive from '@rn-primitives/avatar';
|
|
|
15
15
|
import { Text, View, Animated, Pressable, TextInput, Easing, StyleSheet, useWindowDimensions, PanResponder, Image, ScrollView, Keyboard, ActionSheetIOS, TouchableOpacity, Platform, Modal, TouchableWithoutFeedback, FlatList, Linking, Clipboard, Alert } from 'react-native';
|
|
16
16
|
import Svg, { Path, Defs, LinearGradient, Stop, Rect, G, ClipPath } from 'react-native-svg';
|
|
17
17
|
import * as SwitchPrimitive from '@rn-primitives/switch';
|
|
18
|
-
import Animated10, { Keyframe, Easing as Easing$1, FadeInLeft, FadeInRight, FadeInUp, FadeInDown, FadeIn, FadeOutLeft, FadeOutRight, FadeOutUp, FadeOutDown, FadeOut, useSharedValue, useAnimatedStyle, ComplexAnimationBuilder, withSpring } from 'react-native-reanimated';
|
|
18
|
+
import Animated10, { Keyframe, Easing as Easing$1, FadeInLeft, FadeInRight, FadeInUp, FadeInDown, FadeIn, FadeOutLeft, FadeOutRight, FadeOutUp, FadeOutDown, FadeOut, useReducedMotion, useSharedValue, withTiming, useAnimatedStyle, ComplexAnimationBuilder, withSpring } from 'react-native-reanimated';
|
|
19
19
|
import { Slot } from '@rn-primitives/slot';
|
|
20
20
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
21
21
|
import * as ProgressPrimitive from '@rn-primitives/progress';
|
|
@@ -215,7 +215,14 @@ var Typography = React66.forwardRef(
|
|
|
215
215
|
"textTransform",
|
|
216
216
|
"textDecoration"
|
|
217
217
|
]);
|
|
218
|
-
const style = __spreadValues(__spreadValues(__spreadValues({
|
|
218
|
+
const style = __spreadValues(__spreadValues(__spreadValues({
|
|
219
|
+
// Token-mode text is component-owned and lives inside flex rows
|
|
220
|
+
// (buttons, tabs, tags). `flexShrink` lets it wrap to multiple lines
|
|
221
|
+
// when the row is narrower than the text, instead of laying out on one
|
|
222
|
+
// line and overflowing/clipping — a `<Text>` nested in a flex `<View>`
|
|
223
|
+
// won't re-wrap on its own after the parent's width is resolved.
|
|
224
|
+
flexShrink: 1
|
|
225
|
+
}, nativeTokenToStyle(token)), color2 ? { color: color2 } : {}), getCommonStyles(align2, textTransform2, textDecoration2));
|
|
219
226
|
return /* @__PURE__ */ jsx(
|
|
220
227
|
StyledText,
|
|
221
228
|
__spreadValues({
|
|
@@ -1189,9 +1196,6 @@ var StyledButton = styled51(Pressable)(
|
|
|
1189
1196
|
opacity: buttonOpacity
|
|
1190
1197
|
}, buttonBorderWidth ? { borderWidth: buttonBorderWidth, borderColor: buttonBorderColor } : {}), buttonFullWidth ? { width: "100%" } : {})
|
|
1191
1198
|
);
|
|
1192
|
-
var StyledTextWrapper = styled51(View)(({ textOpacity, fullWidth }) => __spreadValues({
|
|
1193
|
-
opacity: textOpacity
|
|
1194
|
-
}, fullWidth ? { flexShrink: 1 } : {}));
|
|
1195
1199
|
var StyledSpinnerWrapper = styled51(View)({
|
|
1196
1200
|
position: "absolute",
|
|
1197
1201
|
alignItems: "center",
|
|
@@ -1282,7 +1286,7 @@ var Button = React66.forwardRef(
|
|
|
1282
1286
|
}, rest), {
|
|
1283
1287
|
children: [
|
|
1284
1288
|
startIcon && /* @__PURE__ */ jsx(IconWrapper, { children: startIcon }),
|
|
1285
|
-
/* @__PURE__ */ jsx(
|
|
1289
|
+
/* @__PURE__ */ jsx(
|
|
1286
1290
|
Typography,
|
|
1287
1291
|
{
|
|
1288
1292
|
token: {
|
|
@@ -1292,11 +1296,11 @@ var Button = React66.forwardRef(
|
|
|
1292
1296
|
lineHeight: typography.lineHeight,
|
|
1293
1297
|
letterSpacing: typography.letterSpacing
|
|
1294
1298
|
},
|
|
1295
|
-
color: variantStyles.textColor,
|
|
1299
|
+
color: loading ? "transparent" : variantStyles.textColor,
|
|
1296
1300
|
align: "center",
|
|
1297
1301
|
children
|
|
1298
1302
|
}
|
|
1299
|
-
)
|
|
1303
|
+
),
|
|
1300
1304
|
endIcon && /* @__PURE__ */ jsx(IconWrapper, { children: endIcon }),
|
|
1301
1305
|
loading && /* @__PURE__ */ jsx(StyledSpinnerWrapper, { children: /* @__PURE__ */ jsx(
|
|
1302
1306
|
Spinner,
|
|
@@ -4891,6 +4895,9 @@ var StyledTag = styled51(View)(({ theme: theme2, tagVariant, tagSize }) => {
|
|
|
4891
4895
|
backgroundColor: backgroundColorMap[tagVariant]
|
|
4892
4896
|
};
|
|
4893
4897
|
});
|
|
4898
|
+
var StyledLabel = styled51(View)({
|
|
4899
|
+
flexShrink: 1
|
|
4900
|
+
});
|
|
4894
4901
|
var Tag = React66.forwardRef(
|
|
4895
4902
|
(_a, ref) => {
|
|
4896
4903
|
var _b = _a, { variant = "primary", size = "medium", icon, children } = _b, rest = __objRest(_b, ["variant", "size", "icon", "children"]);
|
|
@@ -4928,14 +4935,14 @@ var Tag = React66.forwardRef(
|
|
|
4928
4935
|
colour: iconColourMap[variant]
|
|
4929
4936
|
}
|
|
4930
4937
|
),
|
|
4931
|
-
/* @__PURE__ */ jsx(
|
|
4938
|
+
/* @__PURE__ */ jsx(StyledLabel, { children: /* @__PURE__ */ jsx(
|
|
4932
4939
|
Typography,
|
|
4933
4940
|
{
|
|
4934
4941
|
token: typography[size].default,
|
|
4935
4942
|
color: textColorMap[variant],
|
|
4936
4943
|
children
|
|
4937
4944
|
}
|
|
4938
|
-
)
|
|
4945
|
+
) })
|
|
4939
4946
|
] }));
|
|
4940
4947
|
}
|
|
4941
4948
|
);
|
|
@@ -5184,7 +5191,7 @@ var StyledLabelWrapper = styled51(View)({
|
|
|
5184
5191
|
justifyContent: "space-between",
|
|
5185
5192
|
width: "100%"
|
|
5186
5193
|
});
|
|
5187
|
-
var
|
|
5194
|
+
var StyledLabel2 = styled51(View)(({ labelGap }) => ({
|
|
5188
5195
|
flexDirection: "row",
|
|
5189
5196
|
alignItems: "center",
|
|
5190
5197
|
gap: labelGap
|
|
@@ -5215,7 +5222,7 @@ var TextAreaLabel = React66.forwardRef(
|
|
|
5215
5222
|
const showCharacterCount = maxLength !== void 0 && currentLength !== void 0;
|
|
5216
5223
|
const isOverLimit = currentLength !== void 0 && maxLength !== void 0 && currentLength > maxLength;
|
|
5217
5224
|
return /* @__PURE__ */ jsxs(StyledLabelWrapper, __spreadProps(__spreadValues({ ref }, rest), { children: [
|
|
5218
|
-
/* @__PURE__ */ jsxs(
|
|
5225
|
+
/* @__PURE__ */ jsxs(StyledLabel2, { labelGap: parseTokenValue20(spacing.label.gap), children: [
|
|
5219
5226
|
/* @__PURE__ */ jsx(
|
|
5220
5227
|
Typography,
|
|
5221
5228
|
{
|
|
@@ -7856,6 +7863,10 @@ function usePasswordField({
|
|
|
7856
7863
|
showRequirements
|
|
7857
7864
|
});
|
|
7858
7865
|
}
|
|
7866
|
+
var PROGRESS_ANIMATION = {
|
|
7867
|
+
duration: 450,
|
|
7868
|
+
easing: Easing$1.inOut(Easing$1.cubic)
|
|
7869
|
+
};
|
|
7859
7870
|
var parseTokenValue40 = (value) => parseFloat(value);
|
|
7860
7871
|
var StyledRoot12 = styled51(View)(({ rootGap }) => ({
|
|
7861
7872
|
flexDirection: "column",
|
|
@@ -7878,7 +7889,7 @@ var StyledTrack = styled51(View)(({ trackHeight, trackMinWidth, trackBorderRadiu
|
|
|
7878
7889
|
backgroundColor: trackBgColor,
|
|
7879
7890
|
overflow: "hidden"
|
|
7880
7891
|
}));
|
|
7881
|
-
var StyledIndicator = styled51(View)(({ indicatorBorderRadius, indicatorBgColor }) => ({
|
|
7892
|
+
var StyledIndicator = styled51(Animated10.View)(({ indicatorBorderRadius, indicatorBgColor }) => ({
|
|
7882
7893
|
height: "100%",
|
|
7883
7894
|
borderRadius: indicatorBorderRadius,
|
|
7884
7895
|
backgroundColor: indicatorBgColor
|
|
@@ -7893,7 +7904,8 @@ var Progress = React66.forwardRef(
|
|
|
7893
7904
|
colour = "primary",
|
|
7894
7905
|
label,
|
|
7895
7906
|
description,
|
|
7896
|
-
getValueLabel
|
|
7907
|
+
getValueLabel,
|
|
7908
|
+
animate = true
|
|
7897
7909
|
} = _b, rest = __objRest(_b, [
|
|
7898
7910
|
"value",
|
|
7899
7911
|
"max",
|
|
@@ -7901,7 +7913,8 @@ var Progress = React66.forwardRef(
|
|
|
7901
7913
|
"colour",
|
|
7902
7914
|
"label",
|
|
7903
7915
|
"description",
|
|
7904
|
-
"getValueLabel"
|
|
7916
|
+
"getValueLabel",
|
|
7917
|
+
"animate"
|
|
7905
7918
|
]);
|
|
7906
7919
|
const theme2 = useTheme();
|
|
7907
7920
|
const {
|
|
@@ -7917,6 +7930,15 @@ var Progress = React66.forwardRef(
|
|
|
7917
7930
|
const percent = clampedValue / safeMax * 100;
|
|
7918
7931
|
const showHeader = Boolean(label) || Boolean(description);
|
|
7919
7932
|
const typographyForSize = size === "lg" ? typography.large : typography.small;
|
|
7933
|
+
const reducedMotion = useReducedMotion();
|
|
7934
|
+
const shouldAnimate = animate && !reducedMotion;
|
|
7935
|
+
const fill = useSharedValue(percent);
|
|
7936
|
+
React66.useEffect(() => {
|
|
7937
|
+
fill.value = shouldAnimate ? withTiming(percent, PROGRESS_ANIMATION) : percent;
|
|
7938
|
+
}, [fill, percent, shouldAnimate]);
|
|
7939
|
+
const indicatorStyle = useAnimatedStyle(() => ({
|
|
7940
|
+
width: `${fill.value}%`
|
|
7941
|
+
}));
|
|
7920
7942
|
const trackSize = { lg: track.size.large, sm: track.size.small }[size];
|
|
7921
7943
|
const trackHeight = parseTokenValue40(trackSize.height);
|
|
7922
7944
|
const trackMinWidth = parseTokenValue40(trackSize.mindWidth);
|
|
@@ -7963,7 +7985,7 @@ var Progress = React66.forwardRef(
|
|
|
7963
7985
|
{
|
|
7964
7986
|
indicatorBorderRadius,
|
|
7965
7987
|
indicatorBgColor,
|
|
7966
|
-
style:
|
|
7988
|
+
style: indicatorStyle
|
|
7967
7989
|
}
|
|
7968
7990
|
) })
|
|
7969
7991
|
}
|
|
@@ -8930,7 +8952,7 @@ var StyledContentWrapper = styled51(View)(({ theme: theme2 }) => {
|
|
|
8930
8952
|
minWidth: 0
|
|
8931
8953
|
};
|
|
8932
8954
|
});
|
|
8933
|
-
var
|
|
8955
|
+
var StyledTextWrapper = styled51(View)({
|
|
8934
8956
|
flex: 1,
|
|
8935
8957
|
minWidth: 0
|
|
8936
8958
|
});
|
|
@@ -8965,7 +8987,7 @@ var SelectFieldItem = React66.forwardRef(
|
|
|
8965
8987
|
children: /* @__PURE__ */ jsx(Slot, { ref, children: /* @__PURE__ */ jsxs(StyledItem3, __spreadProps(__spreadValues({ disabled, style: { backgroundColor } }, rest), { children: [
|
|
8966
8988
|
leadingIcon && /* @__PURE__ */ jsx(StyledIconWrapper3, { children: leadingIcon }),
|
|
8967
8989
|
/* @__PURE__ */ jsxs(StyledContentWrapper, { children: [
|
|
8968
|
-
/* @__PURE__ */ jsx(
|
|
8990
|
+
/* @__PURE__ */ jsx(StyledTextWrapper, { children: /* @__PURE__ */ jsx(StyledItemText, { style: { color: textColor }, children: itemText }) }),
|
|
8969
8991
|
hintText && /* @__PURE__ */ jsx(
|
|
8970
8992
|
StyledHintText,
|
|
8971
8993
|
{
|
|
@@ -10226,8 +10248,11 @@ var CARD_BASE_STYLE = {
|
|
|
10226
10248
|
position: "absolute",
|
|
10227
10249
|
bottom: 0,
|
|
10228
10250
|
left: 0,
|
|
10229
|
-
right: 0
|
|
10230
|
-
|
|
10251
|
+
right: 0
|
|
10252
|
+
};
|
|
10253
|
+
var DEPTH_LAYER_STYLE = {
|
|
10254
|
+
transformOrigin: "50% 100%",
|
|
10255
|
+
width: "100%"
|
|
10231
10256
|
};
|
|
10232
10257
|
var StyledRoot15 = styled51(View)(({ rootBottom, rootPaddingH }) => ({
|
|
10233
10258
|
position: "absolute",
|
|
@@ -10241,17 +10266,34 @@ var StyledStack = styled51(View)({
|
|
|
10241
10266
|
position: "relative",
|
|
10242
10267
|
width: "100%"
|
|
10243
10268
|
});
|
|
10269
|
+
var computeBackfillIds = (layers, prevActiveIds, prevLayerIds) => {
|
|
10270
|
+
const ids = /* @__PURE__ */ new Set();
|
|
10271
|
+
layers.forEach((item) => {
|
|
10272
|
+
if (prevActiveIds.has(item.id) && !prevLayerIds.has(item.id)) {
|
|
10273
|
+
ids.add(item.id);
|
|
10274
|
+
}
|
|
10275
|
+
});
|
|
10276
|
+
return ids;
|
|
10277
|
+
};
|
|
10244
10278
|
var StackedCard = ({
|
|
10245
10279
|
item,
|
|
10246
10280
|
depth,
|
|
10247
10281
|
revealStep,
|
|
10248
|
-
onDismiss
|
|
10282
|
+
onDismiss,
|
|
10283
|
+
isBackfill
|
|
10249
10284
|
}) => {
|
|
10250
|
-
const
|
|
10285
|
+
const isBackfillRef = React66.useRef(isBackfill);
|
|
10286
|
+
const wasBackfill = isBackfillRef.current;
|
|
10287
|
+
const depthSV = useSharedValue(wasBackfill ? depth + 1 : depth);
|
|
10288
|
+
const opacitySV = useSharedValue(wasBackfill ? 0 : 1);
|
|
10251
10289
|
React66.useEffect(() => {
|
|
10252
10290
|
depthSV.value = withSpring(depth, SPRING_CONFIG);
|
|
10253
10291
|
}, [depth, depthSV]);
|
|
10254
|
-
|
|
10292
|
+
React66.useEffect(() => {
|
|
10293
|
+
if (wasBackfill) opacitySV.value = withSpring(1, SPRING_CONFIG);
|
|
10294
|
+
}, []);
|
|
10295
|
+
const depthStyle = useAnimatedStyle(() => ({
|
|
10296
|
+
opacity: opacitySV.value,
|
|
10255
10297
|
transform: [
|
|
10256
10298
|
{ translateY: depthSV.value * revealStep },
|
|
10257
10299
|
{ scale: 1 - depthSV.value * SCALE_STEP }
|
|
@@ -10261,13 +10303,13 @@ var StackedCard = ({
|
|
|
10261
10303
|
return /* @__PURE__ */ jsx(
|
|
10262
10304
|
Animated10.View,
|
|
10263
10305
|
{
|
|
10264
|
-
entering: CARD_ENTERING,
|
|
10306
|
+
entering: wasBackfill ? void 0 : CARD_ENTERING,
|
|
10265
10307
|
exiting: CARD_EXITING,
|
|
10266
10308
|
pointerEvents: isFront ? "auto" : "none",
|
|
10267
10309
|
accessibilityElementsHidden: !isFront,
|
|
10268
10310
|
importantForAccessibility: isFront ? "auto" : "no-hide-descendants",
|
|
10269
|
-
style: [CARD_BASE_STYLE, { zIndex: -depth }
|
|
10270
|
-
children: /* @__PURE__ */ jsx(
|
|
10311
|
+
style: [CARD_BASE_STYLE, { zIndex: -depth }],
|
|
10312
|
+
children: /* @__PURE__ */ jsx(Animated10.View, { style: [DEPTH_LAYER_STYLE, depthStyle], children: /* @__PURE__ */ jsx(
|
|
10271
10313
|
Notification,
|
|
10272
10314
|
{
|
|
10273
10315
|
variant: "toast",
|
|
@@ -10275,7 +10317,7 @@ var StackedCard = ({
|
|
|
10275
10317
|
onClose: isFront ? () => onDismiss == null ? void 0 : onDismiss(item.id) : void 0,
|
|
10276
10318
|
children: item.message
|
|
10277
10319
|
}
|
|
10278
|
-
)
|
|
10320
|
+
) })
|
|
10279
10321
|
}
|
|
10280
10322
|
);
|
|
10281
10323
|
};
|
|
@@ -10306,6 +10348,20 @@ var StackedNotifications = React66.forwardRef((_a, ref) => {
|
|
|
10306
10348
|
() => activeItems.slice(-3).reverse(),
|
|
10307
10349
|
[activeItems]
|
|
10308
10350
|
);
|
|
10351
|
+
const prevActiveIdsRef = React66.useRef(/* @__PURE__ */ new Set());
|
|
10352
|
+
const prevLayerIdsRef = React66.useRef(/* @__PURE__ */ new Set());
|
|
10353
|
+
const backfillIds = React66.useMemo(
|
|
10354
|
+
() => computeBackfillIds(
|
|
10355
|
+
layers,
|
|
10356
|
+
prevActiveIdsRef.current,
|
|
10357
|
+
prevLayerIdsRef.current
|
|
10358
|
+
),
|
|
10359
|
+
[layers]
|
|
10360
|
+
);
|
|
10361
|
+
React66.useEffect(() => {
|
|
10362
|
+
prevActiveIdsRef.current = new Set(activeItems.map((item) => item.id));
|
|
10363
|
+
prevLayerIdsRef.current = new Set(layers.map((item) => item.id));
|
|
10364
|
+
}, [activeItems, layers]);
|
|
10309
10365
|
const handleDismiss = (id) => {
|
|
10310
10366
|
setDismissed((prev) => {
|
|
10311
10367
|
const next = new Set(prev);
|
|
@@ -10330,7 +10386,8 @@ var StackedNotifications = React66.forwardRef((_a, ref) => {
|
|
|
10330
10386
|
item,
|
|
10331
10387
|
depth,
|
|
10332
10388
|
revealStep: peekStep,
|
|
10333
|
-
onDismiss: handleDismiss
|
|
10389
|
+
onDismiss: handleDismiss,
|
|
10390
|
+
isBackfill: backfillIds.has(item.id)
|
|
10334
10391
|
},
|
|
10335
10392
|
item.id
|
|
10336
10393
|
)) })
|
|
@@ -12343,7 +12400,11 @@ var StyledTab = styled51(Pressable)(
|
|
|
12343
12400
|
alignItems: "center",
|
|
12344
12401
|
justifyContent: "center",
|
|
12345
12402
|
gap: tabGap,
|
|
12346
|
-
height
|
|
12403
|
+
// `minHeight` (not a fixed `height`) so a tab whose label wraps to more
|
|
12404
|
+
// than one line — e.g. long translated copy in `fixed` layout — grows to
|
|
12405
|
+
// fit instead of clipping/overflowing. The list's `alignItems: "stretch"`
|
|
12406
|
+
// then matches every tab to the tallest, keeping labels vertically aligned.
|
|
12407
|
+
minHeight: tabHeight,
|
|
12347
12408
|
minWidth: tabMinWidth,
|
|
12348
12409
|
paddingTop: tabPaddingTop,
|
|
12349
12410
|
paddingBottom: tabPaddingBottom,
|
|
@@ -12400,7 +12461,7 @@ var TabNavigationTab = React66.forwardRef(
|
|
|
12400
12461
|
children: [
|
|
12401
12462
|
avatar && /* @__PURE__ */ jsx(Avatar, __spreadValues({}, avatar)),
|
|
12402
12463
|
icon && /* @__PURE__ */ jsx(Icon, { icon, customColour: textColour, "aria-hidden": true }),
|
|
12403
|
-
/* @__PURE__ */ jsx(Typography, { token, color: textColour, children })
|
|
12464
|
+
/* @__PURE__ */ jsx(Typography, { token, color: textColour, align: "center", children })
|
|
12404
12465
|
]
|
|
12405
12466
|
})
|
|
12406
12467
|
) });
|
|
@@ -12475,6 +12536,6 @@ var TabNavigation = Object.assign(TabNavigationRoot, {
|
|
|
12475
12536
|
Panel: TabNavigationPanel
|
|
12476
12537
|
});
|
|
12477
12538
|
|
|
12478
|
-
export { Accordion, Animated5 as Animated, Avatar, BRAND_FONTS, Badge, Button, ButtonDock, ButtonGroup, CarouselControls, Checkbox, CheckboxGroup, CopyField, CopyFieldInput, Countdown, DatePicker, Divider, Drawer, FilterTab, Hint, Icon, IconButton, Illustration, Input, InputDescription, InputError, InputField, InputLabel, InputText, Link, Logo, Menu2 as Menu, MenuItem, MessageCard, MessageCardBanner, MessageCardInsight, NativeSelectPicker, Notification, NumberField, NumberInput, NumberInputField, PasswordField, PasswordFieldInput, PasswordFieldRequirements, PawprintProvider, PictureSelector, ProductDisplayCard, ProductListingCardWithBadgeAndGrid as ProductListingCard, Progress, Radio, RadioGroup, RadioTile, SearchField, SearchFieldInput, SegmentedControl, SelectField, SelectFieldContent, SelectFieldItem, SelectFieldTrigger, SelectFieldValue, Slider, Spinner, StackedNotifications, Switch, TabNavigation, Tag, TextArea, TextAreaField, TextAreaLabel, ThemeProvider, Tooltip, Typography, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
|
|
12539
|
+
export { Accordion, Animated5 as Animated, Avatar, BRAND_FONTS, Badge, Button, ButtonDock, ButtonGroup, CarouselControls, Checkbox, CheckboxGroup, CopyField, CopyFieldInput, Countdown, DatePicker, Divider, Drawer, FilterTab, Hint, Icon, IconButton, Illustration, Input, InputDescription, InputError, InputField, InputLabel, InputText, Link, Logo, Menu2 as Menu, MenuItem, MessageCard, MessageCardBanner, MessageCardInsight, NativeSelectPicker, Notification, NumberField, NumberInput, NumberInputField, PROGRESS_ANIMATION, PasswordField, PasswordFieldInput, PasswordFieldRequirements, PawprintProvider, PictureSelector, ProductDisplayCard, ProductListingCardWithBadgeAndGrid as ProductListingCard, Progress, Radio, RadioGroup, RadioTile, SearchField, SearchFieldInput, SegmentedControl, SelectField, SelectFieldContent, SelectFieldItem, SelectFieldTrigger, SelectFieldValue, Slider, Spinner, StackedNotifications, Switch, TabNavigation, Tag, TextArea, TextAreaField, TextAreaLabel, ThemeProvider, Tooltip, Typography, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
|
|
12479
12540
|
//# sourceMappingURL=index.js.map
|
|
12480
12541
|
//# sourceMappingURL=index.js.map
|