@trafilea/afrodita-components 5.0.0-beta.3 → 5.0.0-beta.30

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 CHANGED
@@ -2,8 +2,9 @@
2
2
  import { IconProps as IconProps$1 } from 'src/types/types';
3
3
  import React, { FC, ReactNode, ElementType, CSSProperties, AriaAttributes, AnchorHTMLAttributes, LabelHTMLAttributes, RefObject } from 'react';
4
4
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
5
- import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
6
5
  import * as _emotion_styled from '@emotion/styled';
6
+ import { StyledComponent } from '@emotion/styled';
7
+ import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
7
8
  import * as _emotion_react from '@emotion/react';
8
9
 
9
10
  declare enum CardSectionType {
@@ -33,6 +34,7 @@ interface IconProps {
33
34
  height?: number;
34
35
  fill?: string;
35
36
  title?: string;
37
+ testId?: string;
36
38
  }
37
39
  declare type ButtonType = 'button' | 'submit' | 'reset';
38
40
  interface CTAProps {
@@ -100,7 +102,10 @@ declare type Filter = {
100
102
  title: string;
101
103
  columns: number;
102
104
  isOpenByDefault?: boolean;
103
- items: string[];
105
+ items: Array<{
106
+ label: string;
107
+ checked?: boolean;
108
+ }>;
104
109
  };
105
110
  declare type FilterChange = {
106
111
  sectionIndex: number;
@@ -111,6 +116,7 @@ interface SearchBarOptionItem {
111
116
  src: string;
112
117
  price: string;
113
118
  title: string;
119
+ optionUrl: string;
114
120
  }
115
121
 
116
122
  declare const SixtyDaysGuarantee: ({ height, width, fill, title }: IconProps) => JSX.Element;
@@ -191,9 +197,9 @@ declare namespace Other {
191
197
 
192
198
  declare const ChevronDown: ({ height, width, fill }: IconProps) => JSX.Element;
193
199
 
194
- declare const ChevronLeft: ({ height, width, fill, opacity }: IconWithOpacityProps) => JSX.Element;
200
+ declare const ChevronLeft: ({ height, width, fill, opacity, testId }: IconWithOpacityProps) => JSX.Element;
195
201
 
196
- declare const ChevronRight: ({ height, width, fill, opacity }: IconWithOpacityProps) => JSX.Element;
202
+ declare const ChevronRight: ({ height, width, fill, opacity, testId }: IconWithOpacityProps) => JSX.Element;
197
203
 
198
204
  declare const ChevronRightVariant: ({ height, width, fill }: IconProps) => JSX.Element;
199
205
 
@@ -300,11 +306,11 @@ declare namespace SocialMedia {
300
306
  };
301
307
  }
302
308
 
303
- declare const Search: ({ height, width, fill }: IconProps) => JSX.Element;
309
+ declare const Search: ({ height, width, fill, testId }: IconProps) => JSX.Element;
304
310
 
305
311
  declare const User: ({ height, width, fill }: IconProps) => JSX.Element;
306
312
 
307
- declare const ShoppingBag: ({ height, width, fill }: IconProps) => JSX.Element;
313
+ declare const ShoppingBag: ({ height, width, fill, testId }: IconProps) => JSX.Element;
308
314
 
309
315
  declare const ShoppingCart: FC<IconProps>;
310
316
 
@@ -342,7 +348,7 @@ interface IconWrapperProps {
342
348
  viewBoxX: number;
343
349
  viewBoxY: number;
344
350
  children: React.ReactNode;
345
- testid?: string;
351
+ testId?: string;
346
352
  fill?: string;
347
353
  }
348
354
 
@@ -416,7 +422,16 @@ declare namespace SlideDots {
416
422
  };
417
423
  }
418
424
 
419
- declare type IconType = ({ height, width, fill }: IconProps) => JSX.Element;
425
+ declare const Thinking: ({ height, width }: IconProps$1) => JSX.Element;
426
+
427
+ declare const Emoji_Thinking: typeof Thinking;
428
+ declare namespace Emoji {
429
+ export {
430
+ Emoji_Thinking as Thinking,
431
+ };
432
+ }
433
+
434
+ declare type IconType = ({ height, width, fill, testId }: IconProps) => JSX.Element;
420
435
  declare const Icon: {
421
436
  Custom: typeof Custom;
422
437
  Arrows: typeof Arrows;
@@ -429,6 +444,7 @@ declare const Icon: {
429
444
  Download: typeof Download;
430
445
  Payment: typeof Payment;
431
446
  SlideDots: typeof SlideDots;
447
+ Emoji: typeof Emoji;
432
448
  };
433
449
 
434
450
  interface CardBodyProps {
@@ -491,16 +507,17 @@ interface SizeSelectorProps {
491
507
  selectedValue: SizeOption;
492
508
  onChange: (size: SizeOption) => void;
493
509
  inline?: boolean;
510
+ width?: string;
494
511
  }
495
- declare const SizeSelector: ({ label, sizes, selectedValue, onChange, inline, }: SizeSelectorProps) => _emotion_react_jsx_runtime.JSX.Element;
512
+ declare const SizeSelector: ({ label, sizes, selectedValue, onChange, inline, width, }: SizeSelectorProps) => _emotion_react_jsx_runtime.JSX.Element;
496
513
 
497
514
  interface SizeFitGuideProps {
498
515
  title: string;
499
- fitPercentageLabel: string;
500
- fitPercentage: number;
516
+ fitPercentage?: number;
501
517
  onClick: () => void;
518
+ onClickFitPercentage?: () => void;
502
519
  }
503
- declare const SizeFitGuide: ({ title, fitPercentageLabel, fitPercentage, onClick }: SizeFitGuideProps) => JSX.Element;
520
+ declare const SizeFitGuide: ({ title, fitPercentage, onClick, onClickFitPercentage, }: SizeFitGuideProps) => JSX.Element;
504
521
 
505
522
  interface BaseButtonProps {
506
523
  children: React.ReactNode;
@@ -511,6 +528,7 @@ interface BaseButtonProps {
511
528
  onClick: () => void;
512
529
  className?: string;
513
530
  inline?: boolean;
531
+ uppercase?: boolean;
514
532
  testId?: string;
515
533
  }
516
534
 
@@ -521,8 +539,9 @@ interface TextButtonProps$1 extends BaseProps {
521
539
  TrailingIcon?: IconType;
522
540
  iconColor?: string;
523
541
  size?: ComponentSize;
542
+ uppercase?: boolean;
524
543
  }
525
- declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, onClick, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
544
+ declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, uppercase, onClick, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
526
545
 
527
546
  interface DiscountTagProps {
528
547
  discount: number;
@@ -541,8 +560,9 @@ interface PriceLabelProps {
541
560
  color?: string;
542
561
  size?: ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large;
543
562
  discount?: DiscountTagProps;
563
+ testId?: string;
544
564
  }
545
- declare const PriceLabel: ({ finalPrice, originalPrice, discount, color, size, }: PriceLabelProps) => JSX.Element;
565
+ declare const PriceLabel: ({ finalPrice, originalPrice, discount, color, testId, size, }: PriceLabelProps) => JSX.Element;
546
566
 
547
567
  interface ColorPickerProps {
548
568
  options: ColorPickerOption[];
@@ -568,8 +588,9 @@ interface ProductGalleryProps {
568
588
  BestSellerTagElement?: JSX.Element;
569
589
  productImageDataTestId?: string;
570
590
  previewListDataTestId?: string;
591
+ thumbnailPosition?: 'vertical' | 'horizontal';
571
592
  }
572
- declare const ProductGallery: ({ images, selectedValue, DiscountTagElement, BestSellerTagElement, productImageDataTestId, previewListDataTestId, }: ProductGalleryProps) => JSX.Element;
593
+ declare const ProductGallery: ({ images, selectedValue, DiscountTagElement, BestSellerTagElement, productImageDataTestId, previewListDataTestId, thumbnailPosition, }: ProductGalleryProps) => JSX.Element;
573
594
 
574
595
  interface RatingProps {
575
596
  rating: number;
@@ -1014,8 +1035,10 @@ declare type ThemeComponent = {
1014
1035
  packSelector: {
1015
1036
  borderRadius: string;
1016
1037
  borderColor: string;
1017
- highlight: string;
1018
- selected: string;
1038
+ highlightColor: string;
1039
+ selectedColor: string;
1040
+ selectedContrast: string;
1041
+ tagColor: string;
1019
1042
  };
1020
1043
  };
1021
1044
  declare type ThemeTypography = {
@@ -1090,10 +1113,11 @@ interface MinimalisticProps {
1090
1113
  discount: number;
1091
1114
  offText: string;
1092
1115
  widthAuto?: boolean;
1116
+ testId?: string;
1093
1117
  }
1094
1118
 
1095
1119
  declare const Bundle: {
1096
- Minimalistic: ({ backgroundColor, borderColor, originalPrice, price, savingPrice, getMorePayLessText, youAreSavingText, getQtyForText, discount, offText, widthAuto, }: MinimalisticProps) => JSX.Element;
1120
+ Minimalistic: ({ backgroundColor, borderColor, originalPrice, price, savingPrice, getMorePayLessText, youAreSavingText, getQtyForText, discount, offText, widthAuto, testId, }: MinimalisticProps) => JSX.Element;
1097
1121
  Simple: ({ title, freeShippingText, price, anyQtyForText, backgroundColor, widthAuto, }: SimpleProps) => JSX.Element;
1098
1122
  };
1099
1123
 
@@ -1166,6 +1190,7 @@ interface BaseCTAProps {
1166
1190
  size?: ComponentSize;
1167
1191
  text: string;
1168
1192
  type?: ButtonType;
1193
+ inline?: boolean;
1169
1194
  testId?: string;
1170
1195
  }
1171
1196
 
@@ -1314,19 +1339,22 @@ interface ReviewProps {
1314
1339
  declare const Review: ({ reviewerName, date, rating, stars, title, description, image }: ReviewProps) => JSX.Element;
1315
1340
 
1316
1341
  interface SliderNavigationProps {
1317
- children: JSX.Element[];
1342
+ children: JSX.Element | JSX.Element[] | StyledComponent<any>;
1318
1343
  infinite: boolean;
1319
1344
  adaptiveHeight: boolean;
1320
- dotsSize: ComponentSize.Large | ComponentSize.Medium | ComponentSize.Small;
1321
- dotListMarginTop: number;
1345
+ dotsSize?: ComponentSize.Large | ComponentSize.Medium | ComponentSize.Small;
1346
+ dotListMarginTop?: number;
1322
1347
  initialSlide?: number;
1323
1348
  arrows?: {
1324
1349
  arrowWidth: number;
1325
1350
  arrowHeight: number;
1326
1351
  arrowPadding: number;
1327
1352
  };
1353
+ dots?: boolean;
1354
+ slidesToShow?: number;
1355
+ speed?: number;
1328
1356
  }
1329
- declare const SliderNavigation: ({ children, infinite, arrows, adaptiveHeight, dotsSize, dotListMarginTop, initialSlide, }: SliderNavigationProps) => _emotion_react_jsx_runtime.JSX.Element;
1357
+ declare const SliderNavigation: ({ children, infinite, arrows, adaptiveHeight, dotsSize, dotListMarginTop, initialSlide, dots, slidesToShow, speed, }: SliderNavigationProps) => _emotion_react_jsx_runtime.JSX.Element;
1330
1358
 
1331
1359
  interface DropdownListIconsProps {
1332
1360
  items: DropdownListIconsItem[];
@@ -1380,8 +1408,8 @@ interface ProductItemProps {
1380
1408
  price: Pick<PriceLabelProps, 'finalPrice' | 'originalPrice' | 'color'>;
1381
1409
  rating: Pick<RatingProps, 'rating' | 'reviews'>;
1382
1410
  tags?: {
1383
- categoryTagText: string;
1384
- seasonOfferTagText: string;
1411
+ categoryTagText?: string;
1412
+ seasonOfferTagText?: string;
1385
1413
  };
1386
1414
  alignName?: 'left' | 'center';
1387
1415
  url?: string;
@@ -1390,6 +1418,7 @@ interface ProductItemProps {
1390
1418
 
1391
1419
  interface ProductItemSmallMobileProps extends ProductItemProps {
1392
1420
  size: ComponentSize.Medium | ComponentSize.Small | ComponentSize.Large;
1421
+ onClick?: () => void;
1393
1422
  }
1394
1423
 
1395
1424
  declare function withProductGrid<P extends ProductItemProps>(ProductItemComponent: React.FC<P>, data: ProductItemProps[]): {
@@ -1398,7 +1427,7 @@ declare function withProductGrid<P extends ProductItemProps>(ProductItemComponen
1398
1427
  };
1399
1428
 
1400
1429
  declare const Collection: {
1401
- ProductItemMobile: ({ title, image, price, rating, size, tags, alignName, url, className, }: ProductItemSmallMobileProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1430
+ ProductItemMobile: ({ title, image, price, rating, size, tags, alignName, url, className, onClick, }: ProductItemSmallMobileProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1402
1431
  withProductGrid: typeof withProductGrid;
1403
1432
  };
1404
1433
 
@@ -1556,6 +1585,7 @@ declare type TextTagProps = {
1556
1585
  declare type TextProps = AriaAttributes & {
1557
1586
  style?: CSSProperties;
1558
1587
  className?: string;
1588
+ testId?: string;
1559
1589
  } & (TextHeroProps | TextDisplayProps | TextHeadingProps | TextBodyProps | TextLinkProps | TextButtonProps | TextPricingProps | TextLabelProps | TextTagProps);
1560
1590
 
1561
1591
  interface SearchBarProps {
@@ -1563,9 +1593,13 @@ interface SearchBarProps {
1563
1593
  resultOptions: SearchBarOptionItem[];
1564
1594
  onChange: (text: string) => void;
1565
1595
  onSearch: (term: string) => void;
1596
+ onClose: () => void;
1566
1597
  resultsPanelDataTestId?: string;
1598
+ allResults?: number;
1599
+ initialTerm?: string;
1600
+ shouldClear?: boolean;
1567
1601
  }
1568
- declare const SearchBar: ({ suggestions, resultOptions, onChange, onSearch, resultsPanelDataTestId, }: SearchBarProps) => JSX.Element;
1602
+ declare const SearchBar: ({ suggestions, resultOptions, onChange, onSearch, onClose, resultsPanelDataTestId, allResults, initialTerm, shouldClear, }: SearchBarProps) => JSX.Element;
1569
1603
 
1570
1604
  interface ProductGalleryMobileProps {
1571
1605
  images: ImageType[];
@@ -1598,16 +1632,24 @@ declare const Portal: FC<PortalProps>;
1598
1632
  declare type ModalProps = {
1599
1633
  id: string;
1600
1634
  dismissable?: boolean;
1635
+ maxFullScreen?: boolean;
1601
1636
  };
1637
+ interface ContainerProps {
1638
+ maxFullScreen: boolean;
1639
+ opened?: boolean;
1640
+ }
1602
1641
  declare const Overlay: _emotion_styled.StyledComponent<{
1603
1642
  theme?: _emotion_react.Theme | undefined;
1604
1643
  as?: React.ElementType<any> | undefined;
1605
- } & {
1606
- opened?: boolean | undefined;
1607
- }, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1644
+ } & Pick<ContainerProps, "opened">, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1608
1645
  declare const Modal: FC<ModalProps>;
1609
1646
  declare const modalEvent: (id: string, detail: Omit<Events['modal'], 'id'>) => void;
1610
- declare const useModalEvent: (id: string, cb: (event: CustomEvent<Events['modal']>) => void) => void;
1647
+ declare const useModalEvent: (id: string, cb: (event: CustomEvent<Events['modal']>) => void) => void;
1648
+ declare const useModal: (id: string) => {
1649
+ opened: boolean;
1650
+ open: () => void;
1651
+ close: () => void;
1652
+ };
1611
1653
 
1612
1654
  interface CloseButtonProps {
1613
1655
  onClick: () => void;
@@ -1646,8 +1688,9 @@ declare type QuantityPickerPropsUncontrolled = {
1646
1688
  declare type QuantityPickerProps = {
1647
1689
  initialValue?: number;
1648
1690
  maxValue?: number;
1691
+ testId?: string;
1649
1692
  } & (QuantityPickerPropsControlled | QuantityPickerPropsUncontrolled);
1650
- declare const QuantityPicker: ({ initialValue, maxValue, value, onChange, }: QuantityPickerProps) => JSX.Element;
1693
+ declare const QuantityPicker: ({ initialValue, maxValue, value, testId, onChange, }: QuantityPickerProps) => JSX.Element;
1651
1694
 
1652
1695
  declare type SpacingProps = {
1653
1696
  size: number;
@@ -1675,6 +1718,29 @@ interface PackSelectorProps {
1675
1718
  }
1676
1719
  declare const PackSelector: FC<PackSelectorProps>;
1677
1720
 
1721
+ interface FiltersProps {
1722
+ values: Filter[];
1723
+ onChange: (newValues: Filter[], filtersState?: FilterChange) => void;
1724
+ tagsColor?: string;
1725
+ filterByText: string;
1726
+ clearAllText: string;
1727
+ filtersSelectText: string;
1728
+ isMobile: boolean;
1729
+ applyText: string;
1730
+ mobileBackArrowClick: () => void;
1731
+ mobileApplyButtonClick: () => void;
1732
+ onResetValues: () => void;
1733
+ }
1734
+ declare const Filters: ({ values, onChange, tagsColor, filterByText, clearAllText, isMobile, filtersSelectText, applyText, mobileApplyButtonClick, mobileBackArrowClick, onResetValues, }: FiltersProps) => JSX.Element;
1735
+
1736
+ interface SearchNavigationProps {
1737
+ returnText?: string;
1738
+ returnUrl?: string;
1739
+ steps?: string[];
1740
+ returnAction?: () => void;
1741
+ }
1742
+ declare const SearchNavigation: ({ returnText, returnUrl, steps, returnAction, }: SearchNavigationProps) => JSX.Element;
1743
+
1678
1744
  declare global {
1679
1745
  interface Events {
1680
1746
  modal: {
@@ -1714,4 +1780,4 @@ declare const formatPrice: (value: number, { locale, currency }?: {
1714
1780
  currency?: string | undefined;
1715
1781
  }) => string;
1716
1782
 
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 };
1783
+ 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 };