@trafilea/afrodita-components 5.0.0-beta.2 → 5.0.0-beta.20
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/build/index.d.ts +78 -22
- package/build/index.esm.js +563 -462
- package/build/index.esm.js.map +1 -1
- package/build/index.js +567 -463
- package/build/index.js.map +1 -1
- package/build/theme/shapermint.theme.d.ts +4 -2
- package/build/theme/shapermint.theme.js +4 -2
- package/build/theme/truekind.theme.d.ts +4 -2
- package/build/theme/truekind.theme.js +4 -2
- package/package.json +2 -1
package/build/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ interface IconProps {
|
|
|
33
33
|
height?: number;
|
|
34
34
|
fill?: string;
|
|
35
35
|
title?: string;
|
|
36
|
+
testId?: string;
|
|
36
37
|
}
|
|
37
38
|
declare type ButtonType = 'button' | 'submit' | 'reset';
|
|
38
39
|
interface CTAProps {
|
|
@@ -100,7 +101,10 @@ declare type Filter = {
|
|
|
100
101
|
title: string;
|
|
101
102
|
columns: number;
|
|
102
103
|
isOpenByDefault?: boolean;
|
|
103
|
-
items:
|
|
104
|
+
items: Array<{
|
|
105
|
+
label: string;
|
|
106
|
+
checked?: boolean;
|
|
107
|
+
}>;
|
|
104
108
|
};
|
|
105
109
|
declare type FilterChange = {
|
|
106
110
|
sectionIndex: number;
|
|
@@ -191,9 +195,9 @@ declare namespace Other {
|
|
|
191
195
|
|
|
192
196
|
declare const ChevronDown: ({ height, width, fill }: IconProps) => JSX.Element;
|
|
193
197
|
|
|
194
|
-
declare const ChevronLeft: ({ height, width, fill, opacity }: IconWithOpacityProps) => JSX.Element;
|
|
198
|
+
declare const ChevronLeft: ({ height, width, fill, opacity, testId }: IconWithOpacityProps) => JSX.Element;
|
|
195
199
|
|
|
196
|
-
declare const ChevronRight: ({ height, width, fill, opacity }: IconWithOpacityProps) => JSX.Element;
|
|
200
|
+
declare const ChevronRight: ({ height, width, fill, opacity, testId }: IconWithOpacityProps) => JSX.Element;
|
|
197
201
|
|
|
198
202
|
declare const ChevronRightVariant: ({ height, width, fill }: IconProps) => JSX.Element;
|
|
199
203
|
|
|
@@ -342,7 +346,7 @@ interface IconWrapperProps {
|
|
|
342
346
|
viewBoxX: number;
|
|
343
347
|
viewBoxY: number;
|
|
344
348
|
children: React.ReactNode;
|
|
345
|
-
|
|
349
|
+
testId?: string;
|
|
346
350
|
fill?: string;
|
|
347
351
|
}
|
|
348
352
|
|
|
@@ -416,7 +420,16 @@ declare namespace SlideDots {
|
|
|
416
420
|
};
|
|
417
421
|
}
|
|
418
422
|
|
|
419
|
-
declare
|
|
423
|
+
declare const Thinking: ({ height, width }: IconProps$1) => JSX.Element;
|
|
424
|
+
|
|
425
|
+
declare const Emoji_Thinking: typeof Thinking;
|
|
426
|
+
declare namespace Emoji {
|
|
427
|
+
export {
|
|
428
|
+
Emoji_Thinking as Thinking,
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
declare type IconType = ({ height, width, fill, testId }: IconProps) => JSX.Element;
|
|
420
433
|
declare const Icon: {
|
|
421
434
|
Custom: typeof Custom;
|
|
422
435
|
Arrows: typeof Arrows;
|
|
@@ -429,6 +442,7 @@ declare const Icon: {
|
|
|
429
442
|
Download: typeof Download;
|
|
430
443
|
Payment: typeof Payment;
|
|
431
444
|
SlideDots: typeof SlideDots;
|
|
445
|
+
Emoji: typeof Emoji;
|
|
432
446
|
};
|
|
433
447
|
|
|
434
448
|
interface CardBodyProps {
|
|
@@ -491,16 +505,17 @@ interface SizeSelectorProps {
|
|
|
491
505
|
selectedValue: SizeOption;
|
|
492
506
|
onChange: (size: SizeOption) => void;
|
|
493
507
|
inline?: boolean;
|
|
508
|
+
width?: string;
|
|
494
509
|
}
|
|
495
|
-
declare const SizeSelector: ({ label, sizes, selectedValue, onChange, inline, }: SizeSelectorProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
510
|
+
declare const SizeSelector: ({ label, sizes, selectedValue, onChange, inline, width, }: SizeSelectorProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
496
511
|
|
|
497
512
|
interface SizeFitGuideProps {
|
|
498
513
|
title: string;
|
|
499
|
-
|
|
500
|
-
fitPercentage: number;
|
|
514
|
+
fitPercentage?: number;
|
|
501
515
|
onClick: () => void;
|
|
516
|
+
onClickFitPercentage?: () => void;
|
|
502
517
|
}
|
|
503
|
-
declare const SizeFitGuide: ({ title,
|
|
518
|
+
declare const SizeFitGuide: ({ title, fitPercentage, onClick, onClickFitPercentage, }: SizeFitGuideProps) => JSX.Element;
|
|
504
519
|
|
|
505
520
|
interface BaseButtonProps {
|
|
506
521
|
children: React.ReactNode;
|
|
@@ -511,6 +526,7 @@ interface BaseButtonProps {
|
|
|
511
526
|
onClick: () => void;
|
|
512
527
|
className?: string;
|
|
513
528
|
inline?: boolean;
|
|
529
|
+
uppercase?: boolean;
|
|
514
530
|
testId?: string;
|
|
515
531
|
}
|
|
516
532
|
|
|
@@ -521,8 +537,9 @@ interface TextButtonProps$1 extends BaseProps {
|
|
|
521
537
|
TrailingIcon?: IconType;
|
|
522
538
|
iconColor?: string;
|
|
523
539
|
size?: ComponentSize;
|
|
540
|
+
uppercase?: boolean;
|
|
524
541
|
}
|
|
525
|
-
declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, onClick, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
|
|
542
|
+
declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, uppercase, onClick, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
|
|
526
543
|
|
|
527
544
|
interface DiscountTagProps {
|
|
528
545
|
discount: number;
|
|
@@ -541,8 +558,9 @@ interface PriceLabelProps {
|
|
|
541
558
|
color?: string;
|
|
542
559
|
size?: ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large;
|
|
543
560
|
discount?: DiscountTagProps;
|
|
561
|
+
testId?: string;
|
|
544
562
|
}
|
|
545
|
-
declare const PriceLabel: ({ finalPrice, originalPrice, discount, color, size, }: PriceLabelProps) => JSX.Element;
|
|
563
|
+
declare const PriceLabel: ({ finalPrice, originalPrice, discount, color, testId, size, }: PriceLabelProps) => JSX.Element;
|
|
546
564
|
|
|
547
565
|
interface ColorPickerProps {
|
|
548
566
|
options: ColorPickerOption[];
|
|
@@ -1014,8 +1032,10 @@ declare type ThemeComponent = {
|
|
|
1014
1032
|
packSelector: {
|
|
1015
1033
|
borderRadius: string;
|
|
1016
1034
|
borderColor: string;
|
|
1017
|
-
|
|
1018
|
-
|
|
1035
|
+
highlightColor: string;
|
|
1036
|
+
selectedColor: string;
|
|
1037
|
+
selectedContrast: string;
|
|
1038
|
+
tagColor: string;
|
|
1019
1039
|
};
|
|
1020
1040
|
};
|
|
1021
1041
|
declare type ThemeTypography = {
|
|
@@ -1090,10 +1110,11 @@ interface MinimalisticProps {
|
|
|
1090
1110
|
discount: number;
|
|
1091
1111
|
offText: string;
|
|
1092
1112
|
widthAuto?: boolean;
|
|
1113
|
+
testId?: string;
|
|
1093
1114
|
}
|
|
1094
1115
|
|
|
1095
1116
|
declare const Bundle: {
|
|
1096
|
-
Minimalistic: ({ backgroundColor, borderColor, originalPrice, price, savingPrice, getMorePayLessText, youAreSavingText, getQtyForText, discount, offText, widthAuto, }: MinimalisticProps) => JSX.Element;
|
|
1117
|
+
Minimalistic: ({ backgroundColor, borderColor, originalPrice, price, savingPrice, getMorePayLessText, youAreSavingText, getQtyForText, discount, offText, widthAuto, testId, }: MinimalisticProps) => JSX.Element;
|
|
1097
1118
|
Simple: ({ title, freeShippingText, price, anyQtyForText, backgroundColor, widthAuto, }: SimpleProps) => JSX.Element;
|
|
1098
1119
|
};
|
|
1099
1120
|
|
|
@@ -1166,6 +1187,7 @@ interface BaseCTAProps {
|
|
|
1166
1187
|
size?: ComponentSize;
|
|
1167
1188
|
text: string;
|
|
1168
1189
|
type?: ButtonType;
|
|
1190
|
+
inline?: boolean;
|
|
1169
1191
|
testId?: string;
|
|
1170
1192
|
}
|
|
1171
1193
|
|
|
@@ -1556,6 +1578,7 @@ declare type TextTagProps = {
|
|
|
1556
1578
|
declare type TextProps = AriaAttributes & {
|
|
1557
1579
|
style?: CSSProperties;
|
|
1558
1580
|
className?: string;
|
|
1581
|
+
testId?: string;
|
|
1559
1582
|
} & (TextHeroProps | TextDisplayProps | TextHeadingProps | TextBodyProps | TextLinkProps | TextButtonProps | TextPricingProps | TextLabelProps | TextTagProps);
|
|
1560
1583
|
|
|
1561
1584
|
interface SearchBarProps {
|
|
@@ -1564,8 +1587,9 @@ interface SearchBarProps {
|
|
|
1564
1587
|
onChange: (text: string) => void;
|
|
1565
1588
|
onSearch: (term: string) => void;
|
|
1566
1589
|
resultsPanelDataTestId?: string;
|
|
1590
|
+
allResults?: number;
|
|
1567
1591
|
}
|
|
1568
|
-
declare const SearchBar: ({ suggestions, resultOptions, onChange, onSearch, resultsPanelDataTestId, }: SearchBarProps) => JSX.Element;
|
|
1592
|
+
declare const SearchBar: ({ suggestions, resultOptions, onChange, onSearch, resultsPanelDataTestId, allResults, }: SearchBarProps) => JSX.Element;
|
|
1569
1593
|
|
|
1570
1594
|
interface ProductGalleryMobileProps {
|
|
1571
1595
|
images: ImageType[];
|
|
@@ -1598,16 +1622,24 @@ declare const Portal: FC<PortalProps>;
|
|
|
1598
1622
|
declare type ModalProps = {
|
|
1599
1623
|
id: string;
|
|
1600
1624
|
dismissable?: boolean;
|
|
1625
|
+
maxFullScreen?: boolean;
|
|
1601
1626
|
};
|
|
1627
|
+
interface ContainerProps {
|
|
1628
|
+
maxFullScreen: boolean;
|
|
1629
|
+
opened?: boolean;
|
|
1630
|
+
}
|
|
1602
1631
|
declare const Overlay: _emotion_styled.StyledComponent<{
|
|
1603
1632
|
theme?: _emotion_react.Theme | undefined;
|
|
1604
1633
|
as?: React.ElementType<any> | undefined;
|
|
1605
|
-
} & {
|
|
1606
|
-
opened?: boolean | undefined;
|
|
1607
|
-
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1634
|
+
} & Pick<ContainerProps, "opened">, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1608
1635
|
declare const Modal: FC<ModalProps>;
|
|
1609
1636
|
declare const modalEvent: (id: string, detail: Omit<Events['modal'], 'id'>) => void;
|
|
1610
|
-
declare const useModalEvent: (id: string, cb: (event: CustomEvent<Events['modal']>) => void) => void;
|
|
1637
|
+
declare const useModalEvent: (id: string, cb: (event: CustomEvent<Events['modal']>) => void) => void;
|
|
1638
|
+
declare const useModal: (id: string) => {
|
|
1639
|
+
opened: boolean;
|
|
1640
|
+
open: () => void;
|
|
1641
|
+
close: () => void;
|
|
1642
|
+
};
|
|
1611
1643
|
|
|
1612
1644
|
interface CloseButtonProps {
|
|
1613
1645
|
onClick: () => void;
|
|
@@ -1646,8 +1678,9 @@ declare type QuantityPickerPropsUncontrolled = {
|
|
|
1646
1678
|
declare type QuantityPickerProps = {
|
|
1647
1679
|
initialValue?: number;
|
|
1648
1680
|
maxValue?: number;
|
|
1681
|
+
testId?: string;
|
|
1649
1682
|
} & (QuantityPickerPropsControlled | QuantityPickerPropsUncontrolled);
|
|
1650
|
-
declare const QuantityPicker: ({ initialValue, maxValue, value, onChange, }: QuantityPickerProps) => JSX.Element;
|
|
1683
|
+
declare const QuantityPicker: ({ initialValue, maxValue, value, testId, onChange, }: QuantityPickerProps) => JSX.Element;
|
|
1651
1684
|
|
|
1652
1685
|
declare type SpacingProps = {
|
|
1653
1686
|
size: number;
|
|
@@ -1670,11 +1703,34 @@ interface PackOption {
|
|
|
1670
1703
|
}
|
|
1671
1704
|
interface PackSelectorProps {
|
|
1672
1705
|
packs: PackOption[];
|
|
1673
|
-
selectedValue:
|
|
1706
|
+
selectedValue: PackOption;
|
|
1674
1707
|
onChange: (size: PackOption) => void;
|
|
1675
1708
|
}
|
|
1676
1709
|
declare const PackSelector: FC<PackSelectorProps>;
|
|
1677
1710
|
|
|
1711
|
+
interface FiltersProps {
|
|
1712
|
+
values: Filter[];
|
|
1713
|
+
onChange: (newValues: Filter[], filtersState?: FilterChange) => void;
|
|
1714
|
+
tagsColor?: string;
|
|
1715
|
+
filterByText: string;
|
|
1716
|
+
clearAllText: string;
|
|
1717
|
+
filtersSelectText: string;
|
|
1718
|
+
isMobile: boolean;
|
|
1719
|
+
applyText: string;
|
|
1720
|
+
mobileBackArrowClick: () => void;
|
|
1721
|
+
mobileApplyButtonClick: () => void;
|
|
1722
|
+
onResetValues: () => void;
|
|
1723
|
+
}
|
|
1724
|
+
declare const Filters: ({ values, onChange, tagsColor, filterByText, clearAllText, isMobile, filtersSelectText, applyText, mobileApplyButtonClick, mobileBackArrowClick, onResetValues, }: FiltersProps) => JSX.Element;
|
|
1725
|
+
|
|
1726
|
+
interface SearchNavigationProps {
|
|
1727
|
+
returnText?: string;
|
|
1728
|
+
returnUrl?: string;
|
|
1729
|
+
steps?: string[];
|
|
1730
|
+
returnAction?: () => void;
|
|
1731
|
+
}
|
|
1732
|
+
declare const SearchNavigation: ({ returnText, returnUrl, steps, returnAction, }: SearchNavigationProps) => JSX.Element;
|
|
1733
|
+
|
|
1678
1734
|
declare global {
|
|
1679
1735
|
interface Events {
|
|
1680
1736
|
modal: {
|
|
@@ -1714,4 +1770,4 @@ declare const formatPrice: (value: number, { locale, currency }?: {
|
|
|
1714
1770
|
currency?: string | undefined;
|
|
1715
1771
|
}) => string;
|
|
1716
1772
|
|
|
1717
|
-
export { Accordion, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, CTAProps, _default as Card, CardSectionType, CartProductItem, CategoryTag, Checkbox, Collection, Color, ColorPickerOption, ComponentPosition, ComponentSize, index_d as CrossSell, DeliveryDetails, DiscountTag, Drawer, DropdownListIcons, DropdownListIconsItem, DropdownListIconsSubItem, DropdownOption, Filter, FilterChange, FilteringDropdown, Tags as FilteringTags, FitPredictor, Icon, IconButton, IconProps, IconWithOpacityProps, Image, ImageType, Input, InputValidationType, Modal, MultiColorPicker, OfferBanner, OrderBar, Overlay, PackSelector, Pagination, Pattern, PaymentMethod, PaypalButton, Portal, PriceLabel, ProductGallery, ProductGalleryMobile, ProgressBar, QuantityPicker, RadioGroupInput, RadioGroupOption, RadioInput, Rating, Review, ScrollToTop, SearchBar, SearchBarOptionItem, SeasonOfferTag, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeFitGuide, SizeOption, SizeSelector, SizeTable, SliderNavigation, Spacing, Spinner, StarList, Text, TextButton, Theme, ThemeAssets, ThemeBasicPallete, ThemeBreakpoints, ThemeColorPallete, ThemeColors, ThemeComponent, ThemeFonts, ThemeProvider, ThemeTypography, ThemeVariables, Timer, Tooltip, Totals, WithTestId, decimalFormat, formatPrice, isEmail, isEmpty, isNumber, isPhoneNumber, isValidDate, modalEvent, simulateMouseClick, sliceString, useModalEvent, useOnClickOutside, useTheme, useThemeAssets, useWindowDimensions };
|
|
1773
|
+
export { Accordion, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, CTAProps, _default as Card, CardSectionType, CartProductItem, CategoryTag, Checkbox, Collection, Color, ColorPickerOption, ComponentPosition, ComponentSize, index_d as CrossSell, DeliveryDetails, DiscountTag, Drawer, DropdownListIcons, DropdownListIconsItem, DropdownListIconsSubItem, DropdownOption, Filter, FilterChange, FilteringDropdown, Tags as FilteringTags, Filters, FitPredictor, Icon, IconButton, IconProps, IconWithOpacityProps, Image, ImageType, Input, InputValidationType, Modal, MultiColorPicker, OfferBanner, OrderBar, Overlay, PackSelector, Pagination, Pattern, PaymentMethod, PaypalButton, Portal, PriceLabel, ProductGallery, ProductGalleryMobile, ProgressBar, QuantityPicker, RadioGroupInput, RadioGroupOption, RadioInput, Rating, Review, ScrollToTop, SearchBar, SearchBarOptionItem, SearchNavigation, SeasonOfferTag, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeFitGuide, SizeOption, SizeSelector, SizeTable, SliderNavigation, Spacing, Spinner, StarList, Text, TextButton, Theme, ThemeAssets, ThemeBasicPallete, ThemeBreakpoints, ThemeColorPallete, ThemeColors, ThemeComponent, ThemeFonts, ThemeProvider, ThemeTypography, ThemeVariables, Timer, Tooltip, Totals, WithTestId, decimalFormat, formatPrice, isEmail, isEmpty, isNumber, isPhoneNumber, isValidDate, modalEvent, simulateMouseClick, sliceString, useModal, useModalEvent, useOnClickOutside, useTheme, useThemeAssets, useWindowDimensions };
|