@butternutbox/pawprint-native 0.25.1 → 1.1.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 +20 -0
- package/dist/index.cjs +19 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -10
- package/dist/index.d.ts +36 -10
- package/dist/index.js +9 -37
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/atoms/Button/Button.tsx +1 -1
- package/src/components/atoms/Input/InputField.tsx +1 -1
- package/src/components/atoms/TextArea/TextAreaField.tsx +1 -1
- package/src/components/atoms/Typography/Typography.tsx +1 -1
- package/src/components/molecules/NativeSelectPicker/NativeSelectPicker.styled.ts +1 -1
- package/src/components/molecules/NumberField/NumberFieldInput.tsx +1 -1
- package/src/components/molecules/ProductDisplayCard/ProductDisplayCard.stories.tsx +40 -5
- package/src/components/molecules/ProductDisplayCard/ProductDisplayCard.test.tsx +55 -0
- package/src/components/molecules/ProductDisplayCard/ProductDisplayCard.tsx +35 -9
- package/src/index.ts +1 -1
- package/tsup.config.ts +1 -2
- package/dist/ibm-plex-sans-condensed-400-normal.ttf +0 -0
- package/dist/ibm-plex-sans-condensed-500-normal.ttf +0 -0
- package/dist/ibm-plex-sans-condensed-600-normal.ttf +0 -0
- package/dist/ibm-plex-sans-condensed-700-normal.ttf +0 -0
- package/dist/ida-narrow-500-normal.ttf +0 -0
- package/dist/ida-narrow-700-normal.ttf +0 -0
- package/src/fonts/ibm-plex-sans-condensed-400-normal.ttf +0 -0
- package/src/fonts/ibm-plex-sans-condensed-500-normal.ttf +0 -0
- package/src/fonts/ibm-plex-sans-condensed-600-normal.ttf +0 -0
- package/src/fonts/ibm-plex-sans-condensed-700-normal.ttf +0 -0
- package/src/fonts/ida-narrow-500-normal.ttf +0 -0
- package/src/fonts/ida-narrow-700-normal.ttf +0 -0
- package/src/fonts/index.ts +0 -48
- package/src/types/fonts.d.ts +0 -4
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { TokensCorePrimitives, BrandThemeSemantics, BrandThemeComponents, BrandN
|
|
|
3
3
|
export { tokens } from '@butternutbox/pawprint-tokens';
|
|
4
4
|
import * as _emotion_native from '@emotion/native';
|
|
5
5
|
export { default as styled } from '@emotion/native';
|
|
6
|
-
|
|
6
|
+
export * from '@butternutbox/pawprint-fonts';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import * as _emotion_react from '@emotion/react';
|
|
9
9
|
import { Theme } from '@emotion/react';
|
|
@@ -30,11 +30,6 @@ declare module "@emotion/react" {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
declare const BRAND_FONTS: Partial<Record<BrandName, Record<string, FontSource>>>;
|
|
34
|
-
declare const resolveFont: (fontFamily: string, fontWeight: string) => {
|
|
35
|
-
fontFamily: string;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
33
|
interface PawprintProviderProps {
|
|
39
34
|
brand?: BrandName;
|
|
40
35
|
initialTheme?: ThemeName;
|
|
@@ -2352,12 +2347,25 @@ type ProductDisplayCardProps = ViewProps & {
|
|
|
2352
2347
|
onQuantityChange?: (quantity: number) => void;
|
|
2353
2348
|
showQuantityPicker?: boolean;
|
|
2354
2349
|
/**
|
|
2350
|
+
* @deprecated Use `thumbnailBadge` instead. When both are set, `thumbnailBadge`
|
|
2351
|
+
* wins. This prop will be removed in a future major release.
|
|
2352
|
+
*
|
|
2355
2353
|
* Show a quantity badge overlaid on the top-right of the image (rendering the
|
|
2356
2354
|
* current `quantity`) instead of the quantity picker. Defaults to `false`.
|
|
2357
2355
|
* The badge and the quantity picker are mutually exclusive — only one shows
|
|
2358
2356
|
* at a time; when `quantityBadge` is true the picker is never rendered.
|
|
2359
2357
|
*/
|
|
2360
2358
|
quantityBadge?: boolean;
|
|
2359
|
+
/**
|
|
2360
|
+
* Render a `Badge` overlaid on the top-right of the image. Accepts any
|
|
2361
|
+
* `BadgeProps` (variant, size, icon, children, etc.) — pass them as an object.
|
|
2362
|
+
* Mutually exclusive with the quantity picker: when set, the picker is never
|
|
2363
|
+
* rendered.
|
|
2364
|
+
*
|
|
2365
|
+
* @example
|
|
2366
|
+
* thumbnailBadge={{ variant: "primary", size: "large", children: "New" }}
|
|
2367
|
+
*/
|
|
2368
|
+
thumbnailBadge?: BadgeProps;
|
|
2361
2369
|
disableQuantityButtons?: boolean;
|
|
2362
2370
|
hideQuantityButtons?: boolean;
|
|
2363
2371
|
incrementDisabled?: boolean;
|
|
@@ -2394,9 +2402,14 @@ type ProductDisplayCardProps = ViewProps & {
|
|
|
2394
2402
|
* @param quantity - *(optional)* Current quantity value
|
|
2395
2403
|
* @param onQuantityChange - *(optional)* Callback when quantity changes
|
|
2396
2404
|
* @param showQuantityPicker - *(optional)* Show/hide quantity picker
|
|
2397
|
-
* @param quantityBadge - *(optional)*
|
|
2398
|
-
*
|
|
2399
|
-
*
|
|
2405
|
+
* @param quantityBadge - *(optional)* **@deprecated** — use `thumbnailBadge` instead.
|
|
2406
|
+
* Show a legacy quantity badge over the image (renders the current `quantity`
|
|
2407
|
+
* as a primary/large Badge). Mutually exclusive with the picker; defaults to
|
|
2408
|
+
* `false`. When both `thumbnailBadge` and `quantityBadge` are set, `thumbnailBadge`
|
|
2409
|
+
* wins.
|
|
2410
|
+
* @param thumbnailBadge - *(optional)* Render a `Badge` overlaid on the top-right
|
|
2411
|
+
* of the image. Accepts any `BadgeProps` (`variant`, `size`, `icon`, `children`, …).
|
|
2412
|
+
* Mutually exclusive with the quantity picker.
|
|
2400
2413
|
* @param quantityStep - *(optional)* Increment/decrement amount (default: 1)
|
|
2401
2414
|
* @param image - *(optional)* Image URL string or React element
|
|
2402
2415
|
* @param banner - *(optional)* Banner content string or React element to show below card
|
|
@@ -2412,12 +2425,25 @@ declare const ProductDisplayCard: React.ForwardRefExoticComponent<ViewProps & {
|
|
|
2412
2425
|
onQuantityChange?: (quantity: number) => void;
|
|
2413
2426
|
showQuantityPicker?: boolean;
|
|
2414
2427
|
/**
|
|
2428
|
+
* @deprecated Use `thumbnailBadge` instead. When both are set, `thumbnailBadge`
|
|
2429
|
+
* wins. This prop will be removed in a future major release.
|
|
2430
|
+
*
|
|
2415
2431
|
* Show a quantity badge overlaid on the top-right of the image (rendering the
|
|
2416
2432
|
* current `quantity`) instead of the quantity picker. Defaults to `false`.
|
|
2417
2433
|
* The badge and the quantity picker are mutually exclusive — only one shows
|
|
2418
2434
|
* at a time; when `quantityBadge` is true the picker is never rendered.
|
|
2419
2435
|
*/
|
|
2420
2436
|
quantityBadge?: boolean;
|
|
2437
|
+
/**
|
|
2438
|
+
* Render a `Badge` overlaid on the top-right of the image. Accepts any
|
|
2439
|
+
* `BadgeProps` (variant, size, icon, children, etc.) — pass them as an object.
|
|
2440
|
+
* Mutually exclusive with the quantity picker: when set, the picker is never
|
|
2441
|
+
* rendered.
|
|
2442
|
+
*
|
|
2443
|
+
* @example
|
|
2444
|
+
* thumbnailBadge={{ variant: "primary", size: "large", children: "New" }}
|
|
2445
|
+
*/
|
|
2446
|
+
thumbnailBadge?: BadgeProps;
|
|
2421
2447
|
disableQuantityButtons?: boolean;
|
|
2422
2448
|
hideQuantityButtons?: boolean;
|
|
2423
2449
|
incrementDisabled?: boolean;
|
|
@@ -2511,4 +2537,4 @@ declare const useDrawerKeyboardAvoidance: (minPadding?: number) => {
|
|
|
2511
2537
|
contentContainerStyle: StyleProp<ViewStyle>;
|
|
2512
2538
|
};
|
|
2513
2539
|
|
|
2514
|
-
export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize,
|
|
2540
|
+
export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, 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, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { TokensCorePrimitives, BrandThemeSemantics, BrandThemeComponents, BrandN
|
|
|
3
3
|
export { tokens } from '@butternutbox/pawprint-tokens';
|
|
4
4
|
import * as _emotion_native from '@emotion/native';
|
|
5
5
|
export { default as styled } from '@emotion/native';
|
|
6
|
-
|
|
6
|
+
export * from '@butternutbox/pawprint-fonts';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import * as _emotion_react from '@emotion/react';
|
|
9
9
|
import { Theme } from '@emotion/react';
|
|
@@ -30,11 +30,6 @@ declare module "@emotion/react" {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
declare const BRAND_FONTS: Partial<Record<BrandName, Record<string, FontSource>>>;
|
|
34
|
-
declare const resolveFont: (fontFamily: string, fontWeight: string) => {
|
|
35
|
-
fontFamily: string;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
33
|
interface PawprintProviderProps {
|
|
39
34
|
brand?: BrandName;
|
|
40
35
|
initialTheme?: ThemeName;
|
|
@@ -2352,12 +2347,25 @@ type ProductDisplayCardProps = ViewProps & {
|
|
|
2352
2347
|
onQuantityChange?: (quantity: number) => void;
|
|
2353
2348
|
showQuantityPicker?: boolean;
|
|
2354
2349
|
/**
|
|
2350
|
+
* @deprecated Use `thumbnailBadge` instead. When both are set, `thumbnailBadge`
|
|
2351
|
+
* wins. This prop will be removed in a future major release.
|
|
2352
|
+
*
|
|
2355
2353
|
* Show a quantity badge overlaid on the top-right of the image (rendering the
|
|
2356
2354
|
* current `quantity`) instead of the quantity picker. Defaults to `false`.
|
|
2357
2355
|
* The badge and the quantity picker are mutually exclusive — only one shows
|
|
2358
2356
|
* at a time; when `quantityBadge` is true the picker is never rendered.
|
|
2359
2357
|
*/
|
|
2360
2358
|
quantityBadge?: boolean;
|
|
2359
|
+
/**
|
|
2360
|
+
* Render a `Badge` overlaid on the top-right of the image. Accepts any
|
|
2361
|
+
* `BadgeProps` (variant, size, icon, children, etc.) — pass them as an object.
|
|
2362
|
+
* Mutually exclusive with the quantity picker: when set, the picker is never
|
|
2363
|
+
* rendered.
|
|
2364
|
+
*
|
|
2365
|
+
* @example
|
|
2366
|
+
* thumbnailBadge={{ variant: "primary", size: "large", children: "New" }}
|
|
2367
|
+
*/
|
|
2368
|
+
thumbnailBadge?: BadgeProps;
|
|
2361
2369
|
disableQuantityButtons?: boolean;
|
|
2362
2370
|
hideQuantityButtons?: boolean;
|
|
2363
2371
|
incrementDisabled?: boolean;
|
|
@@ -2394,9 +2402,14 @@ type ProductDisplayCardProps = ViewProps & {
|
|
|
2394
2402
|
* @param quantity - *(optional)* Current quantity value
|
|
2395
2403
|
* @param onQuantityChange - *(optional)* Callback when quantity changes
|
|
2396
2404
|
* @param showQuantityPicker - *(optional)* Show/hide quantity picker
|
|
2397
|
-
* @param quantityBadge - *(optional)*
|
|
2398
|
-
*
|
|
2399
|
-
*
|
|
2405
|
+
* @param quantityBadge - *(optional)* **@deprecated** — use `thumbnailBadge` instead.
|
|
2406
|
+
* Show a legacy quantity badge over the image (renders the current `quantity`
|
|
2407
|
+
* as a primary/large Badge). Mutually exclusive with the picker; defaults to
|
|
2408
|
+
* `false`. When both `thumbnailBadge` and `quantityBadge` are set, `thumbnailBadge`
|
|
2409
|
+
* wins.
|
|
2410
|
+
* @param thumbnailBadge - *(optional)* Render a `Badge` overlaid on the top-right
|
|
2411
|
+
* of the image. Accepts any `BadgeProps` (`variant`, `size`, `icon`, `children`, …).
|
|
2412
|
+
* Mutually exclusive with the quantity picker.
|
|
2400
2413
|
* @param quantityStep - *(optional)* Increment/decrement amount (default: 1)
|
|
2401
2414
|
* @param image - *(optional)* Image URL string or React element
|
|
2402
2415
|
* @param banner - *(optional)* Banner content string or React element to show below card
|
|
@@ -2412,12 +2425,25 @@ declare const ProductDisplayCard: React.ForwardRefExoticComponent<ViewProps & {
|
|
|
2412
2425
|
onQuantityChange?: (quantity: number) => void;
|
|
2413
2426
|
showQuantityPicker?: boolean;
|
|
2414
2427
|
/**
|
|
2428
|
+
* @deprecated Use `thumbnailBadge` instead. When both are set, `thumbnailBadge`
|
|
2429
|
+
* wins. This prop will be removed in a future major release.
|
|
2430
|
+
*
|
|
2415
2431
|
* Show a quantity badge overlaid on the top-right of the image (rendering the
|
|
2416
2432
|
* current `quantity`) instead of the quantity picker. Defaults to `false`.
|
|
2417
2433
|
* The badge and the quantity picker are mutually exclusive — only one shows
|
|
2418
2434
|
* at a time; when `quantityBadge` is true the picker is never rendered.
|
|
2419
2435
|
*/
|
|
2420
2436
|
quantityBadge?: boolean;
|
|
2437
|
+
/**
|
|
2438
|
+
* Render a `Badge` overlaid on the top-right of the image. Accepts any
|
|
2439
|
+
* `BadgeProps` (variant, size, icon, children, etc.) — pass them as an object.
|
|
2440
|
+
* Mutually exclusive with the quantity picker: when set, the picker is never
|
|
2441
|
+
* rendered.
|
|
2442
|
+
*
|
|
2443
|
+
* @example
|
|
2444
|
+
* thumbnailBadge={{ variant: "primary", size: "large", children: "New" }}
|
|
2445
|
+
*/
|
|
2446
|
+
thumbnailBadge?: BadgeProps;
|
|
2421
2447
|
disableQuantityButtons?: boolean;
|
|
2422
2448
|
hideQuantityButtons?: boolean;
|
|
2423
2449
|
incrementDisabled?: boolean;
|
|
@@ -2511,4 +2537,4 @@ declare const useDrawerKeyboardAvoidance: (minPadding?: number) => {
|
|
|
2511
2537
|
contentContainerStyle: StyleProp<ViewStyle>;
|
|
2512
2538
|
};
|
|
2513
2539
|
|
|
2514
|
-
export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize,
|
|
2540
|
+
export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, 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, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { useTheme, ThemeProvider as ThemeProvider$1 } from '@emotion/react';
|
|
2
|
-
import {
|
|
2
|
+
import { Theme, Brand, DEFAULT_THEME_OPTIONS, THEME_OPTIONS_MAP, tokens } from '@butternutbox/pawprint-tokens';
|
|
3
3
|
export { tokens } from '@butternutbox/pawprint-tokens';
|
|
4
4
|
import styled51 from '@emotion/native';
|
|
5
5
|
export { default as styled } from '@emotion/native';
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import ibmPlexSansCondensed400 from './ibm-plex-sans-condensed-400-normal.ttf';
|
|
9
|
-
import ibmPlexSansCondensed500 from './ibm-plex-sans-condensed-500-normal.ttf';
|
|
10
|
-
import ibmPlexSansCondensed600 from './ibm-plex-sans-condensed-600-normal.ttf';
|
|
11
|
-
import ibmPlexSansCondensed700 from './ibm-plex-sans-condensed-700-normal.ttf';
|
|
6
|
+
import { resolveFont } from '@butternutbox/pawprint-fonts';
|
|
7
|
+
export * from '@butternutbox/pawprint-fonts';
|
|
12
8
|
import React66, { createContext, forwardRef, useRef, useEffect, useState, useCallback, useMemo, useContext } from 'react';
|
|
13
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
10
|
import * as AvatarPrimitive from '@rn-primitives/avatar';
|
|
@@ -78,33 +74,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
78
74
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
79
75
|
});
|
|
80
76
|
};
|
|
81
|
-
var BRAND_FONTS = {
|
|
82
|
-
[Brand.Butternutbox]: {
|
|
83
|
-
"IdaWebNarrow-Medium": idaNarrow500,
|
|
84
|
-
"IdaWebNarrow-Bold": idaNarrow700,
|
|
85
|
-
"IBMPlexSansCond-Regular": ibmPlexSansCondensed400,
|
|
86
|
-
"IBMPlexSansCond-Medium": ibmPlexSansCondensed500,
|
|
87
|
-
"IBMPlexSansCond-SemiBold": ibmPlexSansCondensed600,
|
|
88
|
-
"IBMPlexSansCond-Bold": ibmPlexSansCondensed700
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
var FONT_MAP = {
|
|
92
|
-
"IBM Plex Sans Condensed": {
|
|
93
|
-
"400": "IBMPlexSansCond-Regular",
|
|
94
|
-
"500": "IBMPlexSansCond-Medium",
|
|
95
|
-
"600": "IBMPlexSansCond-SemiBold",
|
|
96
|
-
"700": "IBMPlexSansCond-Bold"
|
|
97
|
-
},
|
|
98
|
-
"Ida Narrow": {
|
|
99
|
-
"500": "IdaWebNarrow-Medium",
|
|
100
|
-
"700": "IdaWebNarrow-Bold"
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
var resolveFont = (fontFamily, fontWeight) => {
|
|
104
|
-
var _a;
|
|
105
|
-
const resolved = (_a = FONT_MAP[fontFamily]) == null ? void 0 : _a[fontWeight];
|
|
106
|
-
return { fontFamily: resolved != null ? resolved : fontFamily };
|
|
107
|
-
};
|
|
108
77
|
var createPawprintTheme = (brand = Brand.Butternutbox, theme2 = Theme.Default) => {
|
|
109
78
|
const brandThemes = THEME_OPTIONS_MAP[brand];
|
|
110
79
|
const themeOptions = brandThemes && theme2 in brandThemes ? brandThemes[theme2] : DEFAULT_THEME_OPTIONS;
|
|
@@ -12262,6 +12231,7 @@ var ProductDisplayCard = React66.forwardRef(
|
|
|
12262
12231
|
onQuantityChange,
|
|
12263
12232
|
showQuantityPicker = false,
|
|
12264
12233
|
quantityBadge = false,
|
|
12234
|
+
thumbnailBadge,
|
|
12265
12235
|
disableQuantityButtons = false,
|
|
12266
12236
|
hideQuantityButtons = false,
|
|
12267
12237
|
incrementDisabled = false,
|
|
@@ -12284,6 +12254,7 @@ var ProductDisplayCard = React66.forwardRef(
|
|
|
12284
12254
|
"onQuantityChange",
|
|
12285
12255
|
"showQuantityPicker",
|
|
12286
12256
|
"quantityBadge",
|
|
12257
|
+
"thumbnailBadge",
|
|
12287
12258
|
"disableQuantityButtons",
|
|
12288
12259
|
"hideQuantityButtons",
|
|
12289
12260
|
"incrementDisabled",
|
|
@@ -12304,6 +12275,7 @@ var ProductDisplayCard = React66.forwardRef(
|
|
|
12304
12275
|
onQuantityChange == null ? void 0 : onQuantityChange(newQuantity);
|
|
12305
12276
|
}
|
|
12306
12277
|
};
|
|
12278
|
+
const resolvedBadgeProps = thumbnailBadge != null ? thumbnailBadge : quantityBadge ? { variant: "primary", size: "large", children: String(quantity) } : void 0;
|
|
12307
12279
|
const cardContent = /* @__PURE__ */ jsxs(
|
|
12308
12280
|
StyledCardContainer,
|
|
12309
12281
|
__spreadProps(__spreadValues({
|
|
@@ -12325,7 +12297,7 @@ var ProductDisplayCard = React66.forwardRef(
|
|
|
12325
12297
|
style: { flex: 1, width: "100%" }
|
|
12326
12298
|
}
|
|
12327
12299
|
) : image,
|
|
12328
|
-
|
|
12300
|
+
resolvedBadgeProps && /* @__PURE__ */ jsx(StyledBadgeOverlay, { pointerEvents: "none", children: /* @__PURE__ */ jsx(Badge, __spreadValues({}, resolvedBadgeProps)) })
|
|
12329
12301
|
]
|
|
12330
12302
|
}
|
|
12331
12303
|
) }),
|
|
@@ -12334,7 +12306,7 @@ var ProductDisplayCard = React66.forwardRef(
|
|
|
12334
12306
|
/* @__PURE__ */ jsx(Typography, { variant: "heading", size: "2xs", color: "primary", children: title }),
|
|
12335
12307
|
showSubtext && subtext && /* @__PURE__ */ jsx(Typography, { variant: "body", size: "sm", color: "secondary", children: subtext })
|
|
12336
12308
|
] }),
|
|
12337
|
-
showQuantityPicker && !
|
|
12309
|
+
showQuantityPicker && !resolvedBadgeProps && /* @__PURE__ */ jsx(View, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx(
|
|
12338
12310
|
NumberField,
|
|
12339
12311
|
{
|
|
12340
12312
|
size: "sm",
|
|
@@ -12557,6 +12529,6 @@ var TabNavigation = Object.assign(TabNavigationRoot, {
|
|
|
12557
12529
|
Panel: TabNavigationPanel
|
|
12558
12530
|
});
|
|
12559
12531
|
|
|
12560
|
-
export { Accordion, Animated5 as Animated, Avatar,
|
|
12532
|
+
export { Accordion, Animated5 as Animated, Avatar, 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, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
|
|
12561
12533
|
//# sourceMappingURL=index.js.map
|
|
12562
12534
|
//# sourceMappingURL=index.js.map
|