@butternutbox/pawprint-native 0.10.5 → 0.10.7
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 +13 -0
- package/dist/index.cjs +153 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +153 -47
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Illustration/Illustration.stories.tsx +3 -1
- package/src/components/atoms/Input/InputField.tsx +9 -1
- package/src/components/atoms/NumberInput/NumberInput.stories.tsx +22 -0
- package/src/components/atoms/NumberInput/NumberInput.tsx +5 -1
- package/src/components/atoms/NumberInput/NumberInputField.tsx +81 -18
- package/src/components/atoms/Typography/Typography.test.tsx +2 -2
- package/src/components/molecules/Drawer/Drawer.stories.tsx +58 -0
- package/src/components/molecules/Drawer/Drawer.tsx +10 -3
- package/src/components/molecules/Drawer/index.ts +5 -1
- package/src/components/molecules/NumberField/NumberField.stories.tsx +23 -0
- package/src/components/molecules/NumberField/NumberFieldInput.tsx +49 -14
package/dist/index.d.cts
CHANGED
|
@@ -429,6 +429,7 @@ type InputFieldOwnProps = {
|
|
|
429
429
|
hideStateIcons?: boolean;
|
|
430
430
|
containerWidth?: number;
|
|
431
431
|
containerHeight?: number;
|
|
432
|
+
hasInlineHelp?: boolean;
|
|
432
433
|
};
|
|
433
434
|
type InputFieldProps = InputFieldOwnProps & Omit<TextInputProps, keyof InputFieldOwnProps>;
|
|
434
435
|
/**
|
|
@@ -573,6 +574,7 @@ declare function registerLogo(brand: LogoBrand, variant: LogoVariant, component:
|
|
|
573
574
|
|
|
574
575
|
type NumberInputFieldOwnProps = {
|
|
575
576
|
fieldText?: string;
|
|
577
|
+
inlineHelpText?: string;
|
|
576
578
|
};
|
|
577
579
|
type NumberInputFieldProps = NumberInputFieldOwnProps & Omit<InputFieldProps, keyof NumberInputFieldOwnProps>;
|
|
578
580
|
/**
|
|
@@ -580,10 +582,11 @@ type NumberInputFieldProps = NumberInputFieldOwnProps & Omit<InputFieldProps, ke
|
|
|
580
582
|
* Renders a centered number input sized to `numberField.size.large.height`.
|
|
581
583
|
* When fieldText is provided, wraps input + text in a horizontal group.
|
|
582
584
|
*/
|
|
583
|
-
declare const NumberInputField: React.ForwardRefExoticComponent<NumberInputFieldOwnProps & Omit<InputFieldProps,
|
|
585
|
+
declare const NumberInputField: React.ForwardRefExoticComponent<NumberInputFieldOwnProps & Omit<InputFieldProps, keyof NumberInputFieldOwnProps> & React.RefAttributes<TextInput>>;
|
|
584
586
|
|
|
585
587
|
type NumberInputOwnProps = Pick<InputProps, "label" | "description" | "error" | "state" | "optionalText" | "onValueChange"> & {
|
|
586
588
|
fieldText?: string;
|
|
589
|
+
inlineHelpText?: string;
|
|
587
590
|
};
|
|
588
591
|
type NumberInputProps = NumberInputOwnProps & Omit<InputFieldProps, keyof NumberInputOwnProps> & Omit<ViewProps, keyof NumberInputOwnProps>;
|
|
589
592
|
declare const StyledRoot$5: _emotion_native.StyledComponent<ViewProps & {
|
|
@@ -907,12 +910,13 @@ type DrawerTriggerProps = {
|
|
|
907
910
|
};
|
|
908
911
|
type DrawerPortalProps = {
|
|
909
912
|
children: React.ReactNode;
|
|
913
|
+
topContent?: React.ReactNode;
|
|
910
914
|
};
|
|
911
915
|
declare const Drawer: React.ForwardRefExoticComponent<DrawerRootOwnProps & Omit<ViewProps, keyof DrawerRootOwnProps> & React.RefAttributes<View>> & {
|
|
912
916
|
Root: React.ForwardRefExoticComponent<DrawerRootOwnProps & Omit<ViewProps, keyof DrawerRootOwnProps> & React.RefAttributes<View>>;
|
|
913
917
|
Trigger: React.ForwardRefExoticComponent<DrawerTriggerProps & React.RefAttributes<View>>;
|
|
914
918
|
Portal: {
|
|
915
|
-
({ children }: DrawerPortalProps): react_jsx_runtime.JSX.Element | null;
|
|
919
|
+
({ children, topContent }: DrawerPortalProps): react_jsx_runtime.JSX.Element | null;
|
|
916
920
|
displayName: string;
|
|
917
921
|
};
|
|
918
922
|
Overlay: React.ForwardRefExoticComponent<DrawerOverlayProps & React.RefAttributes<View>>;
|
|
@@ -1144,6 +1148,7 @@ type NumberFieldInputOwnProps = {
|
|
|
1144
1148
|
decrementDisabled?: boolean;
|
|
1145
1149
|
min?: number;
|
|
1146
1150
|
max?: number;
|
|
1151
|
+
inlineHelpText?: string;
|
|
1147
1152
|
};
|
|
1148
1153
|
type NumberFieldInputProps = NumberFieldInputOwnProps & Omit<TextInputProps, keyof NumberFieldInputOwnProps>;
|
|
1149
1154
|
|
|
@@ -2225,4 +2230,4 @@ type TabNavigationComponent = React.ForwardRefExoticComponent<TabNavigationProps
|
|
|
2225
2230
|
};
|
|
2226
2231
|
declare const TabNavigation: TabNavigationComponent;
|
|
2227
2232
|
|
|
2228
|
-
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, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, 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, 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, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, 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, usePasswordField, usePawprint, useSearchField, useSelectField };
|
|
2233
|
+
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, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, 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, 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, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, 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, usePasswordField, usePawprint, useSearchField, useSelectField };
|
package/dist/index.d.ts
CHANGED
|
@@ -429,6 +429,7 @@ type InputFieldOwnProps = {
|
|
|
429
429
|
hideStateIcons?: boolean;
|
|
430
430
|
containerWidth?: number;
|
|
431
431
|
containerHeight?: number;
|
|
432
|
+
hasInlineHelp?: boolean;
|
|
432
433
|
};
|
|
433
434
|
type InputFieldProps = InputFieldOwnProps & Omit<TextInputProps, keyof InputFieldOwnProps>;
|
|
434
435
|
/**
|
|
@@ -573,6 +574,7 @@ declare function registerLogo(brand: LogoBrand, variant: LogoVariant, component:
|
|
|
573
574
|
|
|
574
575
|
type NumberInputFieldOwnProps = {
|
|
575
576
|
fieldText?: string;
|
|
577
|
+
inlineHelpText?: string;
|
|
576
578
|
};
|
|
577
579
|
type NumberInputFieldProps = NumberInputFieldOwnProps & Omit<InputFieldProps, keyof NumberInputFieldOwnProps>;
|
|
578
580
|
/**
|
|
@@ -580,10 +582,11 @@ type NumberInputFieldProps = NumberInputFieldOwnProps & Omit<InputFieldProps, ke
|
|
|
580
582
|
* Renders a centered number input sized to `numberField.size.large.height`.
|
|
581
583
|
* When fieldText is provided, wraps input + text in a horizontal group.
|
|
582
584
|
*/
|
|
583
|
-
declare const NumberInputField: React.ForwardRefExoticComponent<NumberInputFieldOwnProps & Omit<InputFieldProps,
|
|
585
|
+
declare const NumberInputField: React.ForwardRefExoticComponent<NumberInputFieldOwnProps & Omit<InputFieldProps, keyof NumberInputFieldOwnProps> & React.RefAttributes<TextInput>>;
|
|
584
586
|
|
|
585
587
|
type NumberInputOwnProps = Pick<InputProps, "label" | "description" | "error" | "state" | "optionalText" | "onValueChange"> & {
|
|
586
588
|
fieldText?: string;
|
|
589
|
+
inlineHelpText?: string;
|
|
587
590
|
};
|
|
588
591
|
type NumberInputProps = NumberInputOwnProps & Omit<InputFieldProps, keyof NumberInputOwnProps> & Omit<ViewProps, keyof NumberInputOwnProps>;
|
|
589
592
|
declare const StyledRoot$5: _emotion_native.StyledComponent<ViewProps & {
|
|
@@ -907,12 +910,13 @@ type DrawerTriggerProps = {
|
|
|
907
910
|
};
|
|
908
911
|
type DrawerPortalProps = {
|
|
909
912
|
children: React.ReactNode;
|
|
913
|
+
topContent?: React.ReactNode;
|
|
910
914
|
};
|
|
911
915
|
declare const Drawer: React.ForwardRefExoticComponent<DrawerRootOwnProps & Omit<ViewProps, keyof DrawerRootOwnProps> & React.RefAttributes<View>> & {
|
|
912
916
|
Root: React.ForwardRefExoticComponent<DrawerRootOwnProps & Omit<ViewProps, keyof DrawerRootOwnProps> & React.RefAttributes<View>>;
|
|
913
917
|
Trigger: React.ForwardRefExoticComponent<DrawerTriggerProps & React.RefAttributes<View>>;
|
|
914
918
|
Portal: {
|
|
915
|
-
({ children }: DrawerPortalProps): react_jsx_runtime.JSX.Element | null;
|
|
919
|
+
({ children, topContent }: DrawerPortalProps): react_jsx_runtime.JSX.Element | null;
|
|
916
920
|
displayName: string;
|
|
917
921
|
};
|
|
918
922
|
Overlay: React.ForwardRefExoticComponent<DrawerOverlayProps & React.RefAttributes<View>>;
|
|
@@ -1144,6 +1148,7 @@ type NumberFieldInputOwnProps = {
|
|
|
1144
1148
|
decrementDisabled?: boolean;
|
|
1145
1149
|
min?: number;
|
|
1146
1150
|
max?: number;
|
|
1151
|
+
inlineHelpText?: string;
|
|
1147
1152
|
};
|
|
1148
1153
|
type NumberFieldInputProps = NumberFieldInputOwnProps & Omit<TextInputProps, keyof NumberFieldInputOwnProps>;
|
|
1149
1154
|
|
|
@@ -2225,4 +2230,4 @@ type TabNavigationComponent = React.ForwardRefExoticComponent<TabNavigationProps
|
|
|
2225
2230
|
};
|
|
2226
2231
|
declare const TabNavigation: TabNavigationComponent;
|
|
2227
2232
|
|
|
2228
|
-
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, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, 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, 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, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, 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, usePasswordField, usePawprint, useSearchField, useSelectField };
|
|
2233
|
+
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, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, 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, 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, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, 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, usePasswordField, usePawprint, useSearchField, useSelectField };
|
package/dist/index.js
CHANGED
|
@@ -4798,7 +4798,10 @@ var StyledInputWrapper = styled50(Animated.View)(({ theme: theme2, isDisabled, c
|
|
|
4798
4798
|
flexShrink: containerWidth !== void 0 ? 0 : void 0
|
|
4799
4799
|
};
|
|
4800
4800
|
});
|
|
4801
|
-
var StyledInput = styled50(TextInput)(({
|
|
4801
|
+
var StyledInput = styled50(TextInput)(({
|
|
4802
|
+
theme: theme2,
|
|
4803
|
+
hasInlineHelp
|
|
4804
|
+
}) => {
|
|
4802
4805
|
var _a, _b;
|
|
4803
4806
|
const { colour, field } = theme2.tokens.components.inputs;
|
|
4804
4807
|
const typography = field.placeholder.default;
|
|
@@ -4808,7 +4811,7 @@ var StyledInput = styled50(TextInput)(({ theme: theme2 }) => {
|
|
|
4808
4811
|
);
|
|
4809
4812
|
const fontSize = parseTokenValue12(typography.fontSize);
|
|
4810
4813
|
const letterSpacing = ((_a = typography.letterSpacing) == null ? void 0 : _a.endsWith("%")) ? parseFloat(typography.letterSpacing) / 100 * fontSize : parseFloat((_b = typography.letterSpacing) != null ? _b : "0");
|
|
4811
|
-
return __spreadValues({
|
|
4814
|
+
return __spreadValues(__spreadValues({
|
|
4812
4815
|
flex: 1,
|
|
4813
4816
|
minWidth: 0,
|
|
4814
4817
|
minHeight: 0,
|
|
@@ -4817,7 +4820,7 @@ var StyledInput = styled50(TextInput)(({ theme: theme2 }) => {
|
|
|
4817
4820
|
fontFamily,
|
|
4818
4821
|
fontSize,
|
|
4819
4822
|
letterSpacing
|
|
4820
|
-
}, {
|
|
4823
|
+
}, hasInlineHelp ? { position: "relative", top: -8 } : {}), {
|
|
4821
4824
|
outlineStyle: "none",
|
|
4822
4825
|
outlineWidth: 0,
|
|
4823
4826
|
outlineColor: "transparent"
|
|
@@ -4842,6 +4845,7 @@ var InputField = React65.forwardRef(
|
|
|
4842
4845
|
hideStateIcons,
|
|
4843
4846
|
containerWidth,
|
|
4844
4847
|
containerHeight,
|
|
4848
|
+
hasInlineHelp,
|
|
4845
4849
|
style,
|
|
4846
4850
|
editable,
|
|
4847
4851
|
onFocus,
|
|
@@ -4854,6 +4858,7 @@ var InputField = React65.forwardRef(
|
|
|
4854
4858
|
"hideStateIcons",
|
|
4855
4859
|
"containerWidth",
|
|
4856
4860
|
"containerHeight",
|
|
4861
|
+
"hasInlineHelp",
|
|
4857
4862
|
"style",
|
|
4858
4863
|
"editable",
|
|
4859
4864
|
"onFocus",
|
|
@@ -4976,7 +4981,8 @@ var InputField = React65.forwardRef(
|
|
|
4976
4981
|
placeholderTextColor: colour.field.text.placeholder,
|
|
4977
4982
|
editable,
|
|
4978
4983
|
onFocus: handleFocus,
|
|
4979
|
-
onBlur: handleBlur
|
|
4984
|
+
onBlur: handleBlur,
|
|
4985
|
+
hasInlineHelp
|
|
4980
4986
|
}, rest)
|
|
4981
4987
|
),
|
|
4982
4988
|
trailingIcon && /* @__PURE__ */ jsx(StyledIconSlot, { children: trailingIcon }),
|
|
@@ -7727,8 +7733,12 @@ var StyledFieldTextWrapper = styled50(View)({
|
|
|
7727
7733
|
flexShrink: 0,
|
|
7728
7734
|
justifyContent: "center"
|
|
7729
7735
|
});
|
|
7736
|
+
var StyledInputContainer = styled50(View)(({ hasInlineHelp }) => ({
|
|
7737
|
+
flexDirection: "column",
|
|
7738
|
+
gap: hasInlineHelp ? 2 : 0
|
|
7739
|
+
}));
|
|
7730
7740
|
var NumberInputField = React65.forwardRef((_a, ref) => {
|
|
7731
|
-
var _b = _a, { fieldText } = _b, props = __objRest(_b, ["fieldText"]);
|
|
7741
|
+
var _b = _a, { fieldText, inlineHelpText } = _b, props = __objRest(_b, ["fieldText", "inlineHelpText"]);
|
|
7732
7742
|
const theme2 = useTheme();
|
|
7733
7743
|
const { colour, description } = theme2.tokens.components.inputs;
|
|
7734
7744
|
const fieldSize = parseTokenValue14(
|
|
@@ -7740,15 +7750,47 @@ var NumberInputField = React65.forwardRef((_a, ref) => {
|
|
|
7740
7750
|
keyboardType: "numeric",
|
|
7741
7751
|
hideStateIcons: true,
|
|
7742
7752
|
containerWidth: fieldSize,
|
|
7743
|
-
containerHeight: fieldSize,
|
|
7753
|
+
containerHeight: inlineHelpText ? void 0 : fieldSize,
|
|
7754
|
+
hasInlineHelp: !!inlineHelpText,
|
|
7744
7755
|
ref,
|
|
7745
7756
|
style: { textAlign: "center" }
|
|
7746
7757
|
}, props)
|
|
7747
7758
|
);
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7759
|
+
const fieldContent = inlineHelpText && fieldText ? /* @__PURE__ */ jsxs(StyledFieldGroup, { children: [
|
|
7760
|
+
/* @__PURE__ */ jsxs(StyledInputContainer, { hasInlineHelp: true, children: [
|
|
7761
|
+
inputElement,
|
|
7762
|
+
/* @__PURE__ */ jsx(
|
|
7763
|
+
View,
|
|
7764
|
+
{
|
|
7765
|
+
style: {
|
|
7766
|
+
position: "absolute",
|
|
7767
|
+
bottom: 4,
|
|
7768
|
+
left: 0,
|
|
7769
|
+
width: fieldSize,
|
|
7770
|
+
display: "flex",
|
|
7771
|
+
justifyContent: "center",
|
|
7772
|
+
alignItems: "center"
|
|
7773
|
+
},
|
|
7774
|
+
children: /* @__PURE__ */ jsx(
|
|
7775
|
+
Typography,
|
|
7776
|
+
{
|
|
7777
|
+
token: description.text.default,
|
|
7778
|
+
color: colour.description.default,
|
|
7779
|
+
children: inlineHelpText
|
|
7780
|
+
}
|
|
7781
|
+
)
|
|
7782
|
+
}
|
|
7783
|
+
)
|
|
7784
|
+
] }),
|
|
7785
|
+
/* @__PURE__ */ jsx(StyledFieldTextWrapper, { children: /* @__PURE__ */ jsx(
|
|
7786
|
+
Typography,
|
|
7787
|
+
{
|
|
7788
|
+
token: description.text.default,
|
|
7789
|
+
color: colour.description.default,
|
|
7790
|
+
children: fieldText
|
|
7791
|
+
}
|
|
7792
|
+
) })
|
|
7793
|
+
] }) : fieldText ? /* @__PURE__ */ jsxs(StyledFieldGroup, { children: [
|
|
7752
7794
|
inputElement,
|
|
7753
7795
|
/* @__PURE__ */ jsx(StyledFieldTextWrapper, { children: /* @__PURE__ */ jsx(
|
|
7754
7796
|
Typography,
|
|
@@ -7758,7 +7800,31 @@ var NumberInputField = React65.forwardRef((_a, ref) => {
|
|
|
7758
7800
|
children: fieldText
|
|
7759
7801
|
}
|
|
7760
7802
|
) })
|
|
7761
|
-
] })
|
|
7803
|
+
] }) : inlineHelpText ? /* @__PURE__ */ jsxs(StyledInputContainer, { hasInlineHelp: true, children: [
|
|
7804
|
+
inputElement,
|
|
7805
|
+
/* @__PURE__ */ jsx(
|
|
7806
|
+
View,
|
|
7807
|
+
{
|
|
7808
|
+
style: {
|
|
7809
|
+
position: "absolute",
|
|
7810
|
+
bottom: 4,
|
|
7811
|
+
width: fieldSize,
|
|
7812
|
+
display: "flex",
|
|
7813
|
+
justifyContent: "center",
|
|
7814
|
+
alignItems: "center"
|
|
7815
|
+
},
|
|
7816
|
+
children: /* @__PURE__ */ jsx(
|
|
7817
|
+
Typography,
|
|
7818
|
+
{
|
|
7819
|
+
token: description.text.default,
|
|
7820
|
+
color: colour.description.default,
|
|
7821
|
+
children: inlineHelpText
|
|
7822
|
+
}
|
|
7823
|
+
)
|
|
7824
|
+
}
|
|
7825
|
+
)
|
|
7826
|
+
] }) : inputElement;
|
|
7827
|
+
return fieldContent;
|
|
7762
7828
|
});
|
|
7763
7829
|
NumberInputField.displayName = "NumberInput.Field";
|
|
7764
7830
|
var parseTokenValue15 = (value) => parseFloat(value);
|
|
@@ -7778,6 +7844,7 @@ var NumberInputRoot = React65.forwardRef(
|
|
|
7778
7844
|
optionalText,
|
|
7779
7845
|
onValueChange,
|
|
7780
7846
|
fieldText,
|
|
7847
|
+
inlineHelpText,
|
|
7781
7848
|
children
|
|
7782
7849
|
} = _b, inputProps = __objRest(_b, [
|
|
7783
7850
|
"label",
|
|
@@ -7787,6 +7854,7 @@ var NumberInputRoot = React65.forwardRef(
|
|
|
7787
7854
|
"optionalText",
|
|
7788
7855
|
"onValueChange",
|
|
7789
7856
|
"fieldText",
|
|
7857
|
+
"inlineHelpText",
|
|
7790
7858
|
"children"
|
|
7791
7859
|
]);
|
|
7792
7860
|
if (children) {
|
|
@@ -7799,7 +7867,8 @@ var NumberInputRoot = React65.forwardRef(
|
|
|
7799
7867
|
__spreadValues({
|
|
7800
7868
|
state,
|
|
7801
7869
|
onChangeText: onValueChange,
|
|
7802
|
-
fieldText
|
|
7870
|
+
fieldText,
|
|
7871
|
+
inlineHelpText
|
|
7803
7872
|
}, inputProps)
|
|
7804
7873
|
),
|
|
7805
7874
|
description && /* @__PURE__ */ jsx(InputDescription, { state, children: description }),
|
|
@@ -9427,7 +9496,7 @@ var DrawerTrigger = React65.forwardRef(
|
|
|
9427
9496
|
}
|
|
9428
9497
|
);
|
|
9429
9498
|
DrawerTrigger.displayName = "Drawer.Trigger";
|
|
9430
|
-
var DrawerPortal = ({ children }) => {
|
|
9499
|
+
var DrawerPortal = ({ children, topContent }) => {
|
|
9431
9500
|
const { modalVisible, closeDrawer } = React65.useContext(DrawerContext);
|
|
9432
9501
|
if (!modalVisible) return null;
|
|
9433
9502
|
return /* @__PURE__ */ jsx(
|
|
@@ -9438,7 +9507,10 @@ var DrawerPortal = ({ children }) => {
|
|
|
9438
9507
|
animationType: "none",
|
|
9439
9508
|
statusBarTranslucent: true,
|
|
9440
9509
|
onRequestClose: closeDrawer,
|
|
9441
|
-
children: /* @__PURE__ */
|
|
9510
|
+
children: /* @__PURE__ */ jsxs(View, { style: styles3.modalContainer, children: [
|
|
9511
|
+
children,
|
|
9512
|
+
topContent
|
|
9513
|
+
] })
|
|
9442
9514
|
}
|
|
9443
9515
|
);
|
|
9444
9516
|
};
|
|
@@ -10181,6 +10253,7 @@ var StyledFieldWrapper = styled50(View)(
|
|
|
10181
10253
|
}) => __spreadValues({
|
|
10182
10254
|
alignItems: "center",
|
|
10183
10255
|
justifyContent: "center",
|
|
10256
|
+
position: "relative",
|
|
10184
10257
|
width: fullWidth ? "100%" : fieldMinWidth,
|
|
10185
10258
|
minWidth: fieldMinWidth,
|
|
10186
10259
|
height: fieldHeight,
|
|
@@ -10192,20 +10265,27 @@ var StyledFieldWrapper = styled50(View)(
|
|
|
10192
10265
|
overflow: "hidden"
|
|
10193
10266
|
}, fullWidth && { flex: 1 })
|
|
10194
10267
|
);
|
|
10195
|
-
var StyledTextInput = styled50(TextInput)(
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10268
|
+
var StyledTextInput = styled50(TextInput)(
|
|
10269
|
+
({
|
|
10270
|
+
inputColor,
|
|
10271
|
+
inputFontFamily,
|
|
10272
|
+
inputFontWeight,
|
|
10273
|
+
inputFontSize,
|
|
10274
|
+
hasInlineHelp
|
|
10275
|
+
}) => __spreadValues(__spreadProps(__spreadValues({
|
|
10276
|
+
textAlign: "center",
|
|
10277
|
+
outlineStyle: "none",
|
|
10278
|
+
padding: 0,
|
|
10279
|
+
minWidth: 0,
|
|
10280
|
+
minHeight: 0,
|
|
10281
|
+
width: "100%",
|
|
10282
|
+
height: "100%",
|
|
10283
|
+
color: inputColor,
|
|
10284
|
+
fontFamily: inputFontFamily
|
|
10285
|
+
}, inputFontWeight ? { fontWeight: inputFontWeight } : {}), {
|
|
10286
|
+
fontSize: inputFontSize
|
|
10287
|
+
}), hasInlineHelp ? { position: "relative", top: -8 } : {})
|
|
10288
|
+
);
|
|
10209
10289
|
var StyledRow = styled50(View)(({ rowGap }) => ({
|
|
10210
10290
|
flexDirection: "row",
|
|
10211
10291
|
alignItems: "center",
|
|
@@ -10226,6 +10306,7 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
10226
10306
|
decrementDisabled = false,
|
|
10227
10307
|
min,
|
|
10228
10308
|
max,
|
|
10309
|
+
inlineHelpText,
|
|
10229
10310
|
style,
|
|
10230
10311
|
onFocus,
|
|
10231
10312
|
onBlur,
|
|
@@ -10245,6 +10326,7 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
10245
10326
|
"decrementDisabled",
|
|
10246
10327
|
"min",
|
|
10247
10328
|
"max",
|
|
10329
|
+
"inlineHelpText",
|
|
10248
10330
|
"style",
|
|
10249
10331
|
"onFocus",
|
|
10250
10332
|
"onBlur",
|
|
@@ -10323,7 +10405,7 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
10323
10405
|
disabled: disabled || decrementDisabled || isAtMin
|
|
10324
10406
|
}
|
|
10325
10407
|
),
|
|
10326
|
-
/* @__PURE__ */
|
|
10408
|
+
/* @__PURE__ */ jsxs(
|
|
10327
10409
|
StyledFieldWrapper,
|
|
10328
10410
|
{
|
|
10329
10411
|
fieldBgColor: tokens3.colour.field.background.default,
|
|
@@ -10333,24 +10415,48 @@ var NumberFieldInput = React65.forwardRef(
|
|
|
10333
10415
|
fieldHeight,
|
|
10334
10416
|
fieldPaddingHorizontal,
|
|
10335
10417
|
fullWidth,
|
|
10336
|
-
children:
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10418
|
+
children: [
|
|
10419
|
+
/* @__PURE__ */ jsx(
|
|
10420
|
+
StyledTextInput,
|
|
10421
|
+
__spreadValues({
|
|
10422
|
+
ref,
|
|
10423
|
+
inputColor: tokens3.colour.field.text.default,
|
|
10424
|
+
inputFontFamily: resolvedInputFontFamily,
|
|
10425
|
+
inputFontWeight: resolvedInputFontFamily === typographyToken.fontFamily ? typographyToken.fontWeight : void 0,
|
|
10426
|
+
inputFontSize: parseTokenValue34(typographyToken.fontSize),
|
|
10427
|
+
hasInlineHelp: !!inlineHelpText,
|
|
10428
|
+
keyboardType: "numeric",
|
|
10429
|
+
editable: !disabled,
|
|
10430
|
+
onFocus: handleFocus,
|
|
10431
|
+
onBlur: handleBlur,
|
|
10432
|
+
onChangeText: handleChangeText,
|
|
10433
|
+
defaultValue,
|
|
10434
|
+
value,
|
|
10435
|
+
style
|
|
10436
|
+
}, rest)
|
|
10437
|
+
),
|
|
10438
|
+
inlineHelpText && /* @__PURE__ */ jsx(
|
|
10439
|
+
View,
|
|
10440
|
+
{
|
|
10441
|
+
style: {
|
|
10442
|
+
position: "absolute",
|
|
10443
|
+
bottom: 4,
|
|
10444
|
+
width: fieldMinWidth,
|
|
10445
|
+
display: "flex",
|
|
10446
|
+
justifyContent: "center",
|
|
10447
|
+
alignItems: "center"
|
|
10448
|
+
},
|
|
10449
|
+
children: /* @__PURE__ */ jsx(
|
|
10450
|
+
Typography,
|
|
10451
|
+
{
|
|
10452
|
+
token: inputTokens3.description.text.default,
|
|
10453
|
+
color: inputTokens3.colour.description.default,
|
|
10454
|
+
children: inlineHelpText
|
|
10455
|
+
}
|
|
10456
|
+
)
|
|
10457
|
+
}
|
|
10458
|
+
)
|
|
10459
|
+
]
|
|
10354
10460
|
}
|
|
10355
10461
|
),
|
|
10356
10462
|
showIncrementButton && /* @__PURE__ */ jsx(
|