@trafilea/afrodita-components 4.1.0 → 4.3.1-beta.1
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 +42 -9
- package/build/index.esm.js +174 -112
- package/build/index.esm.js.map +1 -1
- package/build/index.js +183 -111
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ interface CTAProps {
|
|
|
42
42
|
text: string;
|
|
43
43
|
type?: ButtonType;
|
|
44
44
|
className?: string;
|
|
45
|
+
testId?: string;
|
|
46
|
+
inline?: boolean;
|
|
45
47
|
}
|
|
46
48
|
declare type DropdownOption<T> = {
|
|
47
49
|
key: string;
|
|
@@ -80,7 +82,7 @@ interface IconWithOpacityProps extends IconProps {
|
|
|
80
82
|
opacity?: number;
|
|
81
83
|
}
|
|
82
84
|
interface WithTestId {
|
|
83
|
-
|
|
85
|
+
testId?: string;
|
|
84
86
|
}
|
|
85
87
|
declare type DropdownListIconsItem = {
|
|
86
88
|
Icon: IconType;
|
|
@@ -397,7 +399,7 @@ declare namespace Payment {
|
|
|
397
399
|
};
|
|
398
400
|
}
|
|
399
401
|
|
|
400
|
-
declare const SlideDot: ({ height, width, fill, opacity,
|
|
402
|
+
declare const SlideDot: ({ height, width, fill, opacity, testId, }: IconWithOpacityProps & WithTestId) => JSX.Element;
|
|
401
403
|
|
|
402
404
|
declare const SlideDots_SlideDot: typeof SlideDot;
|
|
403
405
|
declare namespace SlideDots {
|
|
@@ -446,11 +448,11 @@ declare const _default: (({ children, backgroundColor, widthAuto, border, flex }
|
|
|
446
448
|
Body: ({ children }: CardBodyProps) => JSX.Element;
|
|
447
449
|
};
|
|
448
450
|
|
|
449
|
-
declare const ButtonPrimary: ({
|
|
451
|
+
declare const ButtonPrimary: ({ testId, ...props }: CTAProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
450
452
|
|
|
451
|
-
declare const ButtonSecondary: (
|
|
453
|
+
declare const ButtonSecondary: (props: CTAProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
452
454
|
|
|
453
|
-
declare const ButtonSecondaryOutline: (
|
|
455
|
+
declare const ButtonSecondaryOutline: (props: CTAProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
454
456
|
|
|
455
457
|
declare type Value<T> = DropdownOption<T>;
|
|
456
458
|
declare type OnChange<T> = (option: Value<T>) => void;
|
|
@@ -462,6 +464,7 @@ declare type CommonProps<T> = {
|
|
|
462
464
|
sort?: boolean;
|
|
463
465
|
initialValue?: Value<T>;
|
|
464
466
|
placeHolder: string;
|
|
467
|
+
testId?: string;
|
|
465
468
|
};
|
|
466
469
|
declare type ControlledProps<T> = {
|
|
467
470
|
value: Value<T>;
|
|
@@ -472,7 +475,7 @@ declare type UncontrolledProps<T> = {
|
|
|
472
475
|
onChange?: OnChange<T>;
|
|
473
476
|
} & CommonProps<T>;
|
|
474
477
|
declare type SimpleDropdownProps<T> = UncontrolledProps<T> | ControlledProps<T>;
|
|
475
|
-
declare function SimpleDropdown<T>({ options, disabled, initialValue, placeHolder, label, wide, sort, onChange, value, }: SimpleDropdownProps<T>): JSX.Element;
|
|
478
|
+
declare function SimpleDropdown<T>({ options, disabled, initialValue, placeHolder, label, wide, sort, onChange, value, testId, }: SimpleDropdownProps<T>): JSX.Element;
|
|
476
479
|
|
|
477
480
|
interface SizeSelectorProps {
|
|
478
481
|
label: string;
|
|
@@ -500,6 +503,7 @@ interface BaseButtonProps {
|
|
|
500
503
|
onClick: () => void;
|
|
501
504
|
className?: string;
|
|
502
505
|
inline?: boolean;
|
|
506
|
+
testId?: string;
|
|
503
507
|
}
|
|
504
508
|
|
|
505
509
|
declare type BaseProps = Pick<BaseButtonProps, 'disabled' | 'type' | 'onClick'>;
|
|
@@ -1121,6 +1125,7 @@ interface BaseCTAProps {
|
|
|
1121
1125
|
size?: ComponentSize;
|
|
1122
1126
|
text: string;
|
|
1123
1127
|
type?: ButtonType;
|
|
1128
|
+
testId?: string;
|
|
1124
1129
|
}
|
|
1125
1130
|
|
|
1126
1131
|
declare type ButtonProps = {
|
|
@@ -1338,10 +1343,11 @@ interface ProductItemProps {
|
|
|
1338
1343
|
seasonOfferTagText: string;
|
|
1339
1344
|
};
|
|
1340
1345
|
alignName?: 'left' | 'center';
|
|
1346
|
+
url?: string;
|
|
1341
1347
|
}
|
|
1342
1348
|
|
|
1343
1349
|
interface ProductItemSmallMobileProps extends ProductItemProps {
|
|
1344
|
-
size: ComponentSize.Medium | ComponentSize.Small;
|
|
1350
|
+
size: ComponentSize.Medium | ComponentSize.Small | ComponentSize.Large;
|
|
1345
1351
|
}
|
|
1346
1352
|
|
|
1347
1353
|
declare function withProductGrid<P extends ProductItemProps>(ProductItemComponent: React.FC<P>, data: ProductItemProps[]): {
|
|
@@ -1350,7 +1356,7 @@ declare function withProductGrid<P extends ProductItemProps>(ProductItemComponen
|
|
|
1350
1356
|
};
|
|
1351
1357
|
|
|
1352
1358
|
declare const Collection: {
|
|
1353
|
-
ProductItemMobile: ({ title, image, price, rating, size, tags, alignName, }: ProductItemSmallMobileProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1359
|
+
ProductItemMobile: ({ title, image, price, rating, size, tags, alignName, url, }: ProductItemSmallMobileProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1354
1360
|
withProductGrid: typeof withProductGrid;
|
|
1355
1361
|
};
|
|
1356
1362
|
|
|
@@ -1608,6 +1614,13 @@ declare type QuantityPickerProps = {
|
|
|
1608
1614
|
} & (QuantityPickerPropsControlled | QuantityPickerPropsUncontrolled);
|
|
1609
1615
|
declare const QuantityPicker: ({ initialValue, maxValue, value, onChange, }: QuantityPickerProps) => JSX.Element;
|
|
1610
1616
|
|
|
1617
|
+
declare type SpacingProps = {
|
|
1618
|
+
size: number;
|
|
1619
|
+
type?: 'block' | 'inline';
|
|
1620
|
+
style?: CSSProperties;
|
|
1621
|
+
};
|
|
1622
|
+
declare const Spacing: FC<SpacingProps>;
|
|
1623
|
+
|
|
1611
1624
|
declare const useOnClickOutside: <T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: (event: Event) => void) => void;
|
|
1612
1625
|
|
|
1613
1626
|
declare const useWindowDimensions: (breakpoints: ThemeBreakpoints) => {
|
|
@@ -1618,4 +1631,24 @@ declare const useWindowDimensions: (breakpoints: ThemeBreakpoints) => {
|
|
|
1618
1631
|
};
|
|
1619
1632
|
};
|
|
1620
1633
|
|
|
1621
|
-
|
|
1634
|
+
/**
|
|
1635
|
+
* @returns number formatted with "," and 2 decimals as string
|
|
1636
|
+
*/
|
|
1637
|
+
declare const decimalFormat: (number: number) => string;
|
|
1638
|
+
|
|
1639
|
+
declare const isEmpty: (value: string) => boolean;
|
|
1640
|
+
declare const isEmail: (value: string) => boolean;
|
|
1641
|
+
declare const isNumber: (value: string) => boolean;
|
|
1642
|
+
declare const isPhoneNumber: (value: string) => boolean;
|
|
1643
|
+
declare const isValidDate: (value: string) => boolean;
|
|
1644
|
+
|
|
1645
|
+
declare const simulateMouseClick: (element: HTMLElement) => void;
|
|
1646
|
+
|
|
1647
|
+
declare const sliceString: (str: string, maxLength: number) => string;
|
|
1648
|
+
|
|
1649
|
+
declare const formatPrice: (value: number, { locale, currency }?: {
|
|
1650
|
+
locale?: string | undefined;
|
|
1651
|
+
currency?: string | undefined;
|
|
1652
|
+
}) => string;
|
|
1653
|
+
|
|
1654
|
+
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, 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, useOnClickOutside, useTheme, useThemeAssets, useWindowDimensions };
|