@trafilea/afrodita-components 5.0.0-beta.50 → 5.0.0-beta.51
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 +2 -7
- package/build/index.esm.js +10 -8
- package/build/index.esm.js.map +1 -1
- package/build/index.js +10 -8
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -59,11 +59,6 @@ declare type SizeOption = {
|
|
|
59
59
|
description: string;
|
|
60
60
|
disabled?: boolean;
|
|
61
61
|
};
|
|
62
|
-
declare type Color = {
|
|
63
|
-
primaryColor: string;
|
|
64
|
-
secondaryColor?: string;
|
|
65
|
-
tertiaryColor?: string;
|
|
66
|
-
};
|
|
67
62
|
declare type Pattern = {
|
|
68
63
|
url: string;
|
|
69
64
|
};
|
|
@@ -71,7 +66,7 @@ declare type ColorPickerOption = {
|
|
|
71
66
|
label: string;
|
|
72
67
|
description: string;
|
|
73
68
|
meta: {
|
|
74
|
-
color?:
|
|
69
|
+
color?: string[];
|
|
75
70
|
pattern?: Pattern;
|
|
76
71
|
};
|
|
77
72
|
};
|
|
@@ -1872,4 +1867,4 @@ declare const formatPrice: (value: number, { locale, currency }?: {
|
|
|
1872
1867
|
currency?: string | undefined;
|
|
1873
1868
|
}) => string;
|
|
1874
1869
|
|
|
1875
|
-
export { Accordion, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, CTAProps, _default as Card, CardSectionType, CartProductItem, CategoryTag, Checkbox, Collection,
|
|
1870
|
+
export { Accordion, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, CTAProps, _default as Card, CardSectionType, CartProductItem, CategoryTag, Checkbox, Collection, 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, Tab, Tabs, 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 };
|
package/build/index.esm.js
CHANGED
|
@@ -4504,13 +4504,15 @@ var TwoColorSelector = function (_a) {
|
|
|
4504
4504
|
};
|
|
4505
4505
|
|
|
4506
4506
|
var ColorSelector = function (_a) {
|
|
4507
|
-
var
|
|
4508
|
-
|
|
4507
|
+
var color = _a.color, selected = _a.selected, testId = _a.testId;
|
|
4508
|
+
var primaryColor = color[0], secondaryColor = color[1], tertiaryColor = color[2];
|
|
4509
|
+
if (tertiaryColor) {
|
|
4509
4510
|
return (jsx$1(ThreeColorSelector, { primaryColor: primaryColor, secondaryColor: secondaryColor, tertiaryColor: tertiaryColor, selected: selected, testId: testId }, void 0));
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4511
|
+
}
|
|
4512
|
+
if (secondaryColor) {
|
|
4513
|
+
return (jsx$1(TwoColorSelector, { secondaryColor: secondaryColor, primaryColor: primaryColor, selected: selected, testId: testId }, void 0));
|
|
4514
|
+
}
|
|
4515
|
+
return jsx$1(OneColorSelector, { color: primaryColor, selected: selected, testId: testId }, void 0);
|
|
4514
4516
|
};
|
|
4515
4517
|
|
|
4516
4518
|
var OutOfStock = function (_a) {
|
|
@@ -4563,7 +4565,7 @@ var renderOptions$1 = function (options) {
|
|
|
4563
4565
|
return options.map(function (option) { return (jsx(ColorRadioGroup$1.Option, __assign$1({ value: option }, { children: function (_a) {
|
|
4564
4566
|
var checked = _a.checked;
|
|
4565
4567
|
if (option.meta.color) {
|
|
4566
|
-
return (jsx(ColorSelector,
|
|
4568
|
+
return (jsx(ColorSelector, { color: option.meta.color, selected: checked, testId: "".concat(option.label.split(' ').join('-').toLowerCase(), "-selector") }, void 0));
|
|
4567
4569
|
}
|
|
4568
4570
|
if (option.meta.pattern) {
|
|
4569
4571
|
return jsx(PatternSelector, { url: option.meta.pattern.url, selected: checked }, void 0);
|
|
@@ -4580,7 +4582,7 @@ var renderOptions = function (selectedColor, options) {
|
|
|
4580
4582
|
if (options == null || options.length === 0) {
|
|
4581
4583
|
return jsx$1(OutOfStock, { title: "out of stock color" }, void 0);
|
|
4582
4584
|
}
|
|
4583
|
-
return options.map(function (option) { return (jsx$1(ColorRadioGroup$1.Option, __assign$1({ value: option }, { children: option.meta.color ? (jsx$1(ColorSelector,
|
|
4585
|
+
return options.map(function (option) { return (jsx$1(ColorRadioGroup$1.Option, __assign$1({ value: option }, { children: option.meta.color ? (jsx$1(ColorSelector, { color: option.meta.color, selected: selectedColor.has(option), testId: "".concat(option.label, "-selector") }, void 0)) : option.meta.pattern ? (jsx$1(PatternSelector, { url: option.meta.pattern.url, selected: selectedColor.has(option) }, void 0)) : null }), option.label)); });
|
|
4584
4586
|
};
|
|
4585
4587
|
var getInitialValue = function (options, selectedValue) {
|
|
4586
4588
|
if (selectedValue && options.includes(selectedValue))
|