@snacky/ui 0.10.0 → 0.12.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/CHANGELOG.md +61 -0
- package/README.md +4 -3
- package/dist/index.cjs +138 -111
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +22 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +29 -5
- package/dist/index.d.ts +29 -5
- package/dist/index.js +103 -77
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -230,6 +230,29 @@ interface AlertBannerProps {
|
|
|
230
230
|
/** Snacky Alert Banner - inline info/warning strip, optionally with a countdown. */
|
|
231
231
|
declare function AlertBanner({ message, countdown, className }: AlertBannerProps): react.JSX.Element;
|
|
232
232
|
|
|
233
|
+
interface PageIndicatorProps {
|
|
234
|
+
/** How many pages the carousel has. */
|
|
235
|
+
count: number;
|
|
236
|
+
/** Zero-based index of the page currently shown. */
|
|
237
|
+
activeIndex: number;
|
|
238
|
+
/**
|
|
239
|
+
* Announced to screen readers, defaulting to "Page 2 of 3". Pass your own
|
|
240
|
+
* when the pages are not pages (a step counter, an onboarding sequence).
|
|
241
|
+
*/
|
|
242
|
+
ariaLabel?: string;
|
|
243
|
+
className?: string;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Snacky Page Indicator - the dot row under a carousel. Figma draws the current
|
|
247
|
+
* page as a 28x8 pill and every other page as an 8x8 dot, 4 apart, and the Home
|
|
248
|
+
* hero carousel sits it 10 below the banner, centred.
|
|
249
|
+
*
|
|
250
|
+
* It reports position, it does not change it: the dots are decoration to a
|
|
251
|
+
* screen reader and the row carries the label instead. Make the carousel itself
|
|
252
|
+
* keyboard operable; do not wire clicks onto these.
|
|
253
|
+
*/
|
|
254
|
+
declare function PageIndicator({ count, activeIndex, ariaLabel, className }: PageIndicatorProps): react.JSX.Element;
|
|
255
|
+
|
|
233
256
|
interface NotificationBadgeProps {
|
|
234
257
|
count: number;
|
|
235
258
|
max?: number;
|
|
@@ -562,7 +585,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
562
585
|
}
|
|
563
586
|
|
|
564
587
|
declare const account$1: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
565
|
-
declare const address: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
588
|
+
declare const address$1: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
566
589
|
declare const back: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
567
590
|
declare const balance$1: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
568
591
|
declare const bell$1: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
@@ -604,7 +627,6 @@ declare const trash: ({ width, height, color, ...rest }: IconProps) => react.JSX
|
|
|
604
627
|
declare const truck$1: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
605
628
|
declare const unsent: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
606
629
|
|
|
607
|
-
declare const outline_address: typeof address;
|
|
608
630
|
declare const outline_back: typeof back;
|
|
609
631
|
declare const outline_calendar: typeof calendar;
|
|
610
632
|
declare const outline_camera: typeof camera;
|
|
@@ -638,10 +660,11 @@ declare const outline_smartphone: typeof smartphone;
|
|
|
638
660
|
declare const outline_trash: typeof trash;
|
|
639
661
|
declare const outline_unsent: typeof unsent;
|
|
640
662
|
declare namespace outline {
|
|
641
|
-
export { account$1 as account,
|
|
663
|
+
export { account$1 as account, address$1 as address, outline_back as back, balance$1 as balance, bell$1 as bell, outline_calendar as calendar, outline_camera as camera, cart$1 as cart, outline_cartAdd as cartAdd, category$1 as category, outline_chat as chat, outline_chevronDown as chevronDown, outline_chevronRight as chevronRight, outline_chevronUp as chevronUp, outline_close as close, outline_closeInput as closeInput, outline_creditCard as creditCard, outline_document as document, outline_edit as edit, outline_eye as eye, outline_eyeOff as eyeOff, heart$1 as heart, outline_help as help, history$1 as history, home$1 as home, outline_key as key, outline_lock as lock, outline_logout as logout, outline_map as map, outline_messageSquare as messageSquare, outline_minus as minus, outline_phone as phone, outline_plus as plus, outline_referral as referral, outline_search as search, outline_send as send, outline_sent as sent, outline_share as share, outline_smartphone as smartphone, outline_trash as trash, truck$1 as truck, outline_unsent as unsent };
|
|
642
664
|
}
|
|
643
665
|
|
|
644
666
|
declare const account: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
667
|
+
declare const address: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
645
668
|
declare const angleSmallRight: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
646
669
|
declare const balance: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
647
670
|
declare const bell: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
@@ -655,6 +678,7 @@ declare const star: ({ width, height, color, ...rest }: IconProps) => react.JSX.
|
|
|
655
678
|
declare const truck: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
656
679
|
|
|
657
680
|
declare const solid_account: typeof account;
|
|
681
|
+
declare const solid_address: typeof address;
|
|
658
682
|
declare const solid_angleSmallRight: typeof angleSmallRight;
|
|
659
683
|
declare const solid_balance: typeof balance;
|
|
660
684
|
declare const solid_bell: typeof bell;
|
|
@@ -667,7 +691,7 @@ declare const solid_points: typeof points;
|
|
|
667
691
|
declare const solid_star: typeof star;
|
|
668
692
|
declare const solid_truck: typeof truck;
|
|
669
693
|
declare namespace solid {
|
|
670
|
-
export { solid_account as account, solid_angleSmallRight as angleSmallRight, solid_balance as balance, solid_bell as bell, solid_cart as cart, solid_category as category, solid_heart as heart, solid_history as history, solid_home as home, solid_points as points, solid_star as star, solid_truck as truck };
|
|
694
|
+
export { solid_account as account, solid_address as address, solid_angleSmallRight as angleSmallRight, solid_balance as balance, solid_bell as bell, solid_cart as cart, solid_category as category, solid_heart as heart, solid_history as history, solid_home as home, solid_points as points, solid_star as star, solid_truck as truck };
|
|
671
695
|
}
|
|
672
696
|
|
|
673
697
|
/** Matches the `<SnackyIcons.outline.home />` / `<SnackyIcons.solid.home />` namespace used throughout the design system's documented code samples. */
|
|
@@ -676,4 +700,4 @@ declare const SnackyIcons: {
|
|
|
676
700
|
solid: typeof solid;
|
|
677
701
|
};
|
|
678
702
|
|
|
679
|
-
export { Accordion, type AccordionProps, AddressResult, type AddressResultProps, AlertBanner, type AlertBannerProps, Avatar, type AvatarProps, type AvatarSize, BottomSheet, type BottomSheetProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Callout, type CalloutProps, type CalloutVariant, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, CopyField, type CopyFieldProps, DiscountTag, type DiscountTagProps, FilterChip, type FilterChipProps, FullWidthBanner, Header, type HeaderLeadingIcon, type HeaderProps, HeroBanner, IconButton, type IconButtonProps, type IconButtonVariant, type IconProps, Illustration, type IllustrationProps, type IllustrationVariant, type ImageBannerProps, ImagePlaceholder, type ImagePlaceholderProps, InfoBadge, type InfoBadgeProps, NavBar, type NavBarProps, type NavItem, NotificationBadge, type NotificationBadgeProps, NotificationListItem, type NotificationListItemProps, OrderListItem, type OrderListItemProps, type OrderStatus, OtpField, type OtpFieldProps, PointBalanceBanner, type PointBalanceBannerProps, ProductCard, type ProductCardDetailsProps, type ProductCardListProps, type ProductCardProps, ProductChip, type ProductChipProps, ProductImage, type ProductImageProps, type ProductImageUsage, RadioOption, type RadioOptionProps, SearchField, type SearchFieldProps, Section, type SectionProps, SnackyIcons, SoldOutBadge, type SoldOutBadgeProps, SquareBanner, type Step, type StepState, Stepper, type StepperProps, TabRow, type TabRowProps, TextField, type TextFieldProps, Toggle, type ToggleProps, UploadButton, type UploadButtonProps, VariantBadge, type VariantBadgeProps, typography };
|
|
703
|
+
export { Accordion, type AccordionProps, AddressResult, type AddressResultProps, AlertBanner, type AlertBannerProps, Avatar, type AvatarProps, type AvatarSize, BottomSheet, type BottomSheetProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Callout, type CalloutProps, type CalloutVariant, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, CopyField, type CopyFieldProps, DiscountTag, type DiscountTagProps, FilterChip, type FilterChipProps, FullWidthBanner, Header, type HeaderLeadingIcon, type HeaderProps, HeroBanner, IconButton, type IconButtonProps, type IconButtonVariant, type IconProps, Illustration, type IllustrationProps, type IllustrationVariant, type ImageBannerProps, ImagePlaceholder, type ImagePlaceholderProps, InfoBadge, type InfoBadgeProps, NavBar, type NavBarProps, type NavItem, NotificationBadge, type NotificationBadgeProps, NotificationListItem, type NotificationListItemProps, OrderListItem, type OrderListItemProps, type OrderStatus, OtpField, type OtpFieldProps, PageIndicator, type PageIndicatorProps, PointBalanceBanner, type PointBalanceBannerProps, ProductCard, type ProductCardDetailsProps, type ProductCardListProps, type ProductCardProps, ProductChip, type ProductChipProps, ProductImage, type ProductImageProps, type ProductImageUsage, RadioOption, type RadioOptionProps, SearchField, type SearchFieldProps, Section, type SectionProps, SnackyIcons, SoldOutBadge, type SoldOutBadgeProps, SquareBanner, type Step, type StepState, Stepper, type StepperProps, TabRow, type TabRowProps, TextField, type TextFieldProps, Toggle, type ToggleProps, UploadButton, type UploadButtonProps, VariantBadge, type VariantBadgeProps, typography };
|
package/dist/index.d.ts
CHANGED
|
@@ -230,6 +230,29 @@ interface AlertBannerProps {
|
|
|
230
230
|
/** Snacky Alert Banner - inline info/warning strip, optionally with a countdown. */
|
|
231
231
|
declare function AlertBanner({ message, countdown, className }: AlertBannerProps): react.JSX.Element;
|
|
232
232
|
|
|
233
|
+
interface PageIndicatorProps {
|
|
234
|
+
/** How many pages the carousel has. */
|
|
235
|
+
count: number;
|
|
236
|
+
/** Zero-based index of the page currently shown. */
|
|
237
|
+
activeIndex: number;
|
|
238
|
+
/**
|
|
239
|
+
* Announced to screen readers, defaulting to "Page 2 of 3". Pass your own
|
|
240
|
+
* when the pages are not pages (a step counter, an onboarding sequence).
|
|
241
|
+
*/
|
|
242
|
+
ariaLabel?: string;
|
|
243
|
+
className?: string;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Snacky Page Indicator - the dot row under a carousel. Figma draws the current
|
|
247
|
+
* page as a 28x8 pill and every other page as an 8x8 dot, 4 apart, and the Home
|
|
248
|
+
* hero carousel sits it 10 below the banner, centred.
|
|
249
|
+
*
|
|
250
|
+
* It reports position, it does not change it: the dots are decoration to a
|
|
251
|
+
* screen reader and the row carries the label instead. Make the carousel itself
|
|
252
|
+
* keyboard operable; do not wire clicks onto these.
|
|
253
|
+
*/
|
|
254
|
+
declare function PageIndicator({ count, activeIndex, ariaLabel, className }: PageIndicatorProps): react.JSX.Element;
|
|
255
|
+
|
|
233
256
|
interface NotificationBadgeProps {
|
|
234
257
|
count: number;
|
|
235
258
|
max?: number;
|
|
@@ -562,7 +585,7 @@ interface IconProps extends SVGProps<SVGSVGElement> {
|
|
|
562
585
|
}
|
|
563
586
|
|
|
564
587
|
declare const account$1: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
565
|
-
declare const address: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
588
|
+
declare const address$1: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
566
589
|
declare const back: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
567
590
|
declare const balance$1: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
568
591
|
declare const bell$1: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
@@ -604,7 +627,6 @@ declare const trash: ({ width, height, color, ...rest }: IconProps) => react.JSX
|
|
|
604
627
|
declare const truck$1: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
605
628
|
declare const unsent: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
606
629
|
|
|
607
|
-
declare const outline_address: typeof address;
|
|
608
630
|
declare const outline_back: typeof back;
|
|
609
631
|
declare const outline_calendar: typeof calendar;
|
|
610
632
|
declare const outline_camera: typeof camera;
|
|
@@ -638,10 +660,11 @@ declare const outline_smartphone: typeof smartphone;
|
|
|
638
660
|
declare const outline_trash: typeof trash;
|
|
639
661
|
declare const outline_unsent: typeof unsent;
|
|
640
662
|
declare namespace outline {
|
|
641
|
-
export { account$1 as account,
|
|
663
|
+
export { account$1 as account, address$1 as address, outline_back as back, balance$1 as balance, bell$1 as bell, outline_calendar as calendar, outline_camera as camera, cart$1 as cart, outline_cartAdd as cartAdd, category$1 as category, outline_chat as chat, outline_chevronDown as chevronDown, outline_chevronRight as chevronRight, outline_chevronUp as chevronUp, outline_close as close, outline_closeInput as closeInput, outline_creditCard as creditCard, outline_document as document, outline_edit as edit, outline_eye as eye, outline_eyeOff as eyeOff, heart$1 as heart, outline_help as help, history$1 as history, home$1 as home, outline_key as key, outline_lock as lock, outline_logout as logout, outline_map as map, outline_messageSquare as messageSquare, outline_minus as minus, outline_phone as phone, outline_plus as plus, outline_referral as referral, outline_search as search, outline_send as send, outline_sent as sent, outline_share as share, outline_smartphone as smartphone, outline_trash as trash, truck$1 as truck, outline_unsent as unsent };
|
|
642
664
|
}
|
|
643
665
|
|
|
644
666
|
declare const account: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
667
|
+
declare const address: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
645
668
|
declare const angleSmallRight: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
646
669
|
declare const balance: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
647
670
|
declare const bell: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
@@ -655,6 +678,7 @@ declare const star: ({ width, height, color, ...rest }: IconProps) => react.JSX.
|
|
|
655
678
|
declare const truck: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
656
679
|
|
|
657
680
|
declare const solid_account: typeof account;
|
|
681
|
+
declare const solid_address: typeof address;
|
|
658
682
|
declare const solid_angleSmallRight: typeof angleSmallRight;
|
|
659
683
|
declare const solid_balance: typeof balance;
|
|
660
684
|
declare const solid_bell: typeof bell;
|
|
@@ -667,7 +691,7 @@ declare const solid_points: typeof points;
|
|
|
667
691
|
declare const solid_star: typeof star;
|
|
668
692
|
declare const solid_truck: typeof truck;
|
|
669
693
|
declare namespace solid {
|
|
670
|
-
export { solid_account as account, solid_angleSmallRight as angleSmallRight, solid_balance as balance, solid_bell as bell, solid_cart as cart, solid_category as category, solid_heart as heart, solid_history as history, solid_home as home, solid_points as points, solid_star as star, solid_truck as truck };
|
|
694
|
+
export { solid_account as account, solid_address as address, solid_angleSmallRight as angleSmallRight, solid_balance as balance, solid_bell as bell, solid_cart as cart, solid_category as category, solid_heart as heart, solid_history as history, solid_home as home, solid_points as points, solid_star as star, solid_truck as truck };
|
|
671
695
|
}
|
|
672
696
|
|
|
673
697
|
/** Matches the `<SnackyIcons.outline.home />` / `<SnackyIcons.solid.home />` namespace used throughout the design system's documented code samples. */
|
|
@@ -676,4 +700,4 @@ declare const SnackyIcons: {
|
|
|
676
700
|
solid: typeof solid;
|
|
677
701
|
};
|
|
678
702
|
|
|
679
|
-
export { Accordion, type AccordionProps, AddressResult, type AddressResultProps, AlertBanner, type AlertBannerProps, Avatar, type AvatarProps, type AvatarSize, BottomSheet, type BottomSheetProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Callout, type CalloutProps, type CalloutVariant, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, CopyField, type CopyFieldProps, DiscountTag, type DiscountTagProps, FilterChip, type FilterChipProps, FullWidthBanner, Header, type HeaderLeadingIcon, type HeaderProps, HeroBanner, IconButton, type IconButtonProps, type IconButtonVariant, type IconProps, Illustration, type IllustrationProps, type IllustrationVariant, type ImageBannerProps, ImagePlaceholder, type ImagePlaceholderProps, InfoBadge, type InfoBadgeProps, NavBar, type NavBarProps, type NavItem, NotificationBadge, type NotificationBadgeProps, NotificationListItem, type NotificationListItemProps, OrderListItem, type OrderListItemProps, type OrderStatus, OtpField, type OtpFieldProps, PointBalanceBanner, type PointBalanceBannerProps, ProductCard, type ProductCardDetailsProps, type ProductCardListProps, type ProductCardProps, ProductChip, type ProductChipProps, ProductImage, type ProductImageProps, type ProductImageUsage, RadioOption, type RadioOptionProps, SearchField, type SearchFieldProps, Section, type SectionProps, SnackyIcons, SoldOutBadge, type SoldOutBadgeProps, SquareBanner, type Step, type StepState, Stepper, type StepperProps, TabRow, type TabRowProps, TextField, type TextFieldProps, Toggle, type ToggleProps, UploadButton, type UploadButtonProps, VariantBadge, type VariantBadgeProps, typography };
|
|
703
|
+
export { Accordion, type AccordionProps, AddressResult, type AddressResultProps, AlertBanner, type AlertBannerProps, Avatar, type AvatarProps, type AvatarSize, BottomSheet, type BottomSheetProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Callout, type CalloutProps, type CalloutVariant, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, CopyField, type CopyFieldProps, DiscountTag, type DiscountTagProps, FilterChip, type FilterChipProps, FullWidthBanner, Header, type HeaderLeadingIcon, type HeaderProps, HeroBanner, IconButton, type IconButtonProps, type IconButtonVariant, type IconProps, Illustration, type IllustrationProps, type IllustrationVariant, type ImageBannerProps, ImagePlaceholder, type ImagePlaceholderProps, InfoBadge, type InfoBadgeProps, NavBar, type NavBarProps, type NavItem, NotificationBadge, type NotificationBadgeProps, NotificationListItem, type NotificationListItemProps, OrderListItem, type OrderListItemProps, type OrderStatus, OtpField, type OtpFieldProps, PageIndicator, type PageIndicatorProps, PointBalanceBanner, type PointBalanceBannerProps, ProductCard, type ProductCardDetailsProps, type ProductCardListProps, type ProductCardProps, ProductChip, type ProductChipProps, ProductImage, type ProductImageProps, type ProductImageUsage, RadioOption, type RadioOptionProps, SearchField, type SearchFieldProps, Section, type SectionProps, SnackyIcons, SoldOutBadge, type SoldOutBadgeProps, SquareBanner, type Step, type StepState, Stepper, type StepperProps, TabRow, type TabRowProps, TextField, type TextFieldProps, Toggle, type ToggleProps, UploadButton, type UploadButtonProps, VariantBadge, type VariantBadgeProps, typography };
|