@trafilea/afrodita-components 5.0.0-beta.61 → 5.0.0-beta.64
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 +12 -2
- package/build/index.esm.js +11 -6
- package/build/index.esm.js.map +1 -1
- package/build/index.js +11 -5
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1296,6 +1296,7 @@ interface BaseInputCommmonProps {
|
|
|
1296
1296
|
hasError?: boolean;
|
|
1297
1297
|
inputType?: 'text' | 'email' | 'password' | 'url';
|
|
1298
1298
|
name?: string;
|
|
1299
|
+
autoFocus?: boolean;
|
|
1299
1300
|
}
|
|
1300
1301
|
interface BaseInputControlled extends BaseInputCommmonProps {
|
|
1301
1302
|
value: string;
|
|
@@ -1344,7 +1345,7 @@ declare type CustomProps = BaseInputProps & {
|
|
|
1344
1345
|
};
|
|
1345
1346
|
|
|
1346
1347
|
declare const Input: {
|
|
1347
|
-
Simple: ({ value, onChange, defaultValue, label, children, required, onValidation, size, placeholder, inlinePlaceholder, hasError, inputType,
|
|
1348
|
+
Simple: ({ value, onChange, defaultValue, label, children, required, onValidation, size, placeholder, inlinePlaceholder, hasError, inputType, ...rest }: BaseInputProps) => JSX.Element;
|
|
1348
1349
|
Custom: ({ onClick, text, variant, ...rest }: CustomProps) => JSX.Element;
|
|
1349
1350
|
SimplePlusButton: ({ onClick, onClickEdit, text, success, editText, successText, ...rest }: BasePlusButtonProps) => JSX.Element;
|
|
1350
1351
|
SimplePlusIcon: ({ Icon, ...rest }: BasePlusIconProps) => JSX.Element;
|
|
@@ -1916,6 +1917,15 @@ interface IconList {
|
|
|
1916
1917
|
}
|
|
1917
1918
|
declare const IconsWithTitle: ({ iconName, iconTitle, backgroundColor, iconColor }: IconList) => JSX.Element | null;
|
|
1918
1919
|
|
|
1920
|
+
interface NoteProps {
|
|
1921
|
+
accentColor: string;
|
|
1922
|
+
color: string;
|
|
1923
|
+
backgroundColor: string;
|
|
1924
|
+
importantNoteText: string;
|
|
1925
|
+
text: string;
|
|
1926
|
+
}
|
|
1927
|
+
declare const Note: ({ accentColor, color, backgroundColor, importantNoteText, text, }: NoteProps) => JSX.Element;
|
|
1928
|
+
|
|
1919
1929
|
declare global {
|
|
1920
1930
|
interface Events {
|
|
1921
1931
|
modal: {
|
|
@@ -1955,4 +1965,4 @@ declare const formatPrice: (value: number, { locale, currency }?: {
|
|
|
1955
1965
|
currency?: string | undefined;
|
|
1956
1966
|
}) => string;
|
|
1957
1967
|
|
|
1958
|
-
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, IconsWithTitle, 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 };
|
|
1968
|
+
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, IconsWithTitle, Image, ImageType, Input, InputValidationType, Modal, MultiColorPicker, Note, 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
|
@@ -11545,7 +11545,7 @@ var templateObject_1$K, templateObject_2$t, templateObject_3$n, templateObject_4
|
|
|
11545
11545
|
|
|
11546
11546
|
var BaseInput = function (_a) {
|
|
11547
11547
|
var _b;
|
|
11548
|
-
var value = _a.value, onChange = _a.onChange, _c = _a.defaultValue, defaultValue = _c === void 0 ? '' : _c, label = _a.label, children = _a.children, required = _a.required, onValidation = _a.onValidation, size = _a.size, placeholder = _a.placeholder, inlinePlaceholder = _a.inlinePlaceholder, hasError = _a.hasError, _d = _a.inputType, inputType = _d === void 0 ? 'text' : _d,
|
|
11548
|
+
var value = _a.value, onChange = _a.onChange, _c = _a.defaultValue, defaultValue = _c === void 0 ? '' : _c, label = _a.label, children = _a.children, required = _a.required, onValidation = _a.onValidation, size = _a.size, placeholder = _a.placeholder, inlinePlaceholder = _a.inlinePlaceholder, hasError = _a.hasError, _d = _a.inputType, inputType = _d === void 0 ? 'text' : _d, rest = __rest(_a, ["value", "onChange", "defaultValue", "label", "children", "required", "onValidation", "size", "placeholder", "inlinePlaceholder", "hasError", "inputType"]);
|
|
11549
11549
|
var theme = useTheme();
|
|
11550
11550
|
var _e = useState((_b = value !== null && value !== void 0 ? value : defaultValue) !== null && _b !== void 0 ? _b : ''), internalValue = _e[0], setInternalValue = _e[1];
|
|
11551
11551
|
var _f = useState(InputValidationType.Empty), status = _f[0], setStatus = _f[1];
|
|
@@ -11606,7 +11606,7 @@ var BaseInput = function (_a) {
|
|
|
11606
11606
|
? theme.colors.shades['700'].color
|
|
11607
11607
|
: status === InputValidationType.Error
|
|
11608
11608
|
? theme.colors.semantic.urgent.color
|
|
11609
|
-
: '', hasError: hasError }, { children: [label && (jsx$1(InputLabel, { label: label, isDisabled: rest.disabled, isRequired: Boolean(required) }, void 0)), jsxs$1(InputWrapper, __assign$1({ className: "inputWrapper", size: size, inlinePlaceholder: inlinePlaceholder }, { children: [jsx$1(StyledInput, __assign$1({ "data-testid": "base-input", type: inputType, onChange: handleChange, onBlur: validate, required: Boolean(required), value: internalValue, placeholder: inlinePlaceholder ? '' : placeholder
|
|
11609
|
+
: '', hasError: hasError }, { children: [label && (jsx$1(InputLabel, { label: label, isDisabled: rest.disabled, isRequired: Boolean(required) }, void 0)), jsxs$1(InputWrapper, __assign$1({ className: "inputWrapper", size: size, inlinePlaceholder: inlinePlaceholder }, { children: [jsx$1(StyledInput, __assign$1({ "data-testid": "base-input", type: inputType, onChange: handleChange, onBlur: validate, required: Boolean(required), value: internalValue, placeholder: inlinePlaceholder ? '' : placeholder }, rest, styling), void 0), inlinePlaceholder && (jsx$1(AnimatedPlaceholder, __assign$1({ "data-testid": "input-placeholder" }, { children: placeholder }), void 0)), children] }), void 0), inlinePlaceholder && internalValue && (jsx$1(ClearInput, __assign$1({ onClick: function () {
|
|
11610
11610
|
if (onChange) {
|
|
11611
11611
|
onChange('');
|
|
11612
11612
|
}
|
|
@@ -11778,7 +11778,7 @@ var Text$3 = newStyled.p(templateObject_3$j || (templateObject_3$j = __makeTempl
|
|
|
11778
11778
|
var Details = newStyled.span(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n color: ", ";\n font-weight: 700;\n"], ["\n color: ", ";\n font-weight: 700;\n"])), function (props) { return props.color; });
|
|
11779
11779
|
var Note = function (_a) {
|
|
11780
11780
|
var accentColor = _a.accentColor, color = _a.color, backgroundColor = _a.backgroundColor, importantNoteText = _a.importantNoteText, text = _a.text;
|
|
11781
|
-
return (jsxs$1(Container$m, __assign$1({ color: backgroundColor, "data-testid": "Container" }, { children: [jsx$1(IconContainer$3, { children: jsx$1(Icon.Actions.LightExclamation, { fill: accentColor }, void 0) }, void 0), jsx$1("div", { children: jsxs$1(Text$3, __assign$1({ color: color }, { children: [jsxs$1(Details, __assign$1({ color: accentColor }, { children: [importantNoteText, ":"] }), void 0), " ", text] }), void 0) }, void 0)] }), void 0));
|
|
11781
|
+
return (jsxs$1(Container$m, __assign$1({ color: backgroundColor, "data-testid": "Container" }, { children: [jsx$1(IconContainer$3, { children: jsx$1(Icon.Actions.LightExclamation, { fill: accentColor }, void 0) }, void 0), jsx$1("div", { children: jsxs$1(Text$3, __assign$1({ color: color }, { children: [importantNoteText && jsxs$1(Details, __assign$1({ color: accentColor }, { children: [importantNoteText, ":"] }), void 0), " ", text] }), void 0) }, void 0)] }), void 0));
|
|
11782
11782
|
};
|
|
11783
11783
|
var templateObject_1$B, templateObject_2$n, templateObject_3$j, templateObject_4$e;
|
|
11784
11784
|
|
|
@@ -17053,7 +17053,7 @@ var Tabs = function (_a) {
|
|
|
17053
17053
|
};
|
|
17054
17054
|
var templateObject_1$1, templateObject_2, templateObject_3, templateObject_4;
|
|
17055
17055
|
|
|
17056
|
-
var Container = newStyled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n
|
|
17056
|
+
var Container = newStyled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: auto;\n text-align: center;\n"], ["\n height: auto;\n text-align: center;\n"])));
|
|
17057
17057
|
var IconWrapper = newStyled.div(function (props) { return ({
|
|
17058
17058
|
borderRadius: '500px',
|
|
17059
17059
|
width: '120px',
|
|
@@ -17063,17 +17063,22 @@ var IconWrapper = newStyled.div(function (props) { return ({
|
|
|
17063
17063
|
alignItems: 'center',
|
|
17064
17064
|
justifyContent: 'center',
|
|
17065
17065
|
backgroundColor: props.backgroundColor,
|
|
17066
|
+
'@media (max-width: 767px)': {
|
|
17067
|
+
width: '80px',
|
|
17068
|
+
height: '80px',
|
|
17069
|
+
},
|
|
17066
17070
|
}); });
|
|
17067
17071
|
var IconsWithTitle = function (_a) {
|
|
17068
17072
|
var _b;
|
|
17069
17073
|
var iconName = _a.iconName, iconTitle = _a.iconTitle, backgroundColor = _a.backgroundColor, iconColor = _a.iconColor;
|
|
17074
|
+
var isMobile = useWindowDimensions({ mobile: 0, desktop: 768 }).isMobile;
|
|
17070
17075
|
// @ts-ignore
|
|
17071
17076
|
var IconComponent = (_b = Icon['MyAccount'][iconName]) !== null && _b !== void 0 ? _b : (function () { return 'Not found'; });
|
|
17072
17077
|
if (IconComponent == null) {
|
|
17073
17078
|
console.error('Icon', iconName, 'not found');
|
|
17074
17079
|
return null;
|
|
17075
17080
|
}
|
|
17076
|
-
return (jsx$1(Fragment$1, { children: jsxs$1(Container, { children: [jsx$1(IconWrapper, __assign$1({ backgroundColor: backgroundColor }, { children: jsx$1(IconComponent, { width: 4, height: 4, fill: iconColor }, void 0) }), void 0), jsx$1(Text$5, __assign$1({ variant: "heading6", style: {
|
|
17081
|
+
return (jsx$1(Fragment$1, { children: jsxs$1(Container, { children: [jsx$1(IconWrapper, __assign$1({ backgroundColor: backgroundColor }, { children: jsx$1(IconComponent, { width: isMobile ? 3 : 4, height: isMobile ? 3 : 4, fill: iconColor }, void 0) }), void 0), jsx$1(Text$5, __assign$1({ variant: "heading6", style: {
|
|
17077
17082
|
fontSize: '14px',
|
|
17078
17083
|
textTransform: 'uppercase',
|
|
17079
17084
|
textAlign: 'center',
|
|
@@ -17082,5 +17087,5 @@ var IconsWithTitle = function (_a) {
|
|
|
17082
17087
|
};
|
|
17083
17088
|
var templateObject_1;
|
|
17084
17089
|
|
|
17085
|
-
export { Accordion$1 as Accordion, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, Card$2 as Card, CardSectionType, CartProductItem, CategoryTag, Checkbox, Collection, ComponentPosition, ComponentSize, index as CrossSell, DeliveryDetails, DiscountTag, Drawer, DropdownListIcons, FilteringDropdown, Tags as FilteringTags, Filters, FitPredictor, Icon, IconButton, IconsWithTitle, Image, Input$1 as Input, InputValidationType, Modal, MultiColorPicker, OfferBanner, OrderBar, Overlay, PackSelector, Pagination, PaymentMethod, PaypalButton, Portal, PriceLabel, ProductGallery, ProductGalleryMobile, ProgressBar, QuantityPicker, RadioGroupInput, RadioInput, Rating, Review, ScrollToTop, SearchBar, SearchNavigation, SeasonOfferTag, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeFitGuide, SizeSelector, SizeTable, SliderNavigation, Spacing, Spinner, StarList, Tab, Tabs, Text$5 as Text, TextButton, ThemeProvider, ThemeVariables, Timer, Tooltip, Totals, decimalFormat, formatPrice, isEmail, isEmpty, isNumber$1 as isNumber, isPhoneNumber, isValidDate, modalEvent, simulateMouseClick, sliceString, useModal, useModalEvent, useOnClickOutside, useTheme, useThemeAssets, useWindowDimensions };
|
|
17090
|
+
export { Accordion$1 as Accordion, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, Card$2 as Card, CardSectionType, CartProductItem, CategoryTag, Checkbox, Collection, ComponentPosition, ComponentSize, index as CrossSell, DeliveryDetails, DiscountTag, Drawer, DropdownListIcons, FilteringDropdown, Tags as FilteringTags, Filters, FitPredictor, Icon, IconButton, IconsWithTitle, Image, Input$1 as Input, InputValidationType, Modal, MultiColorPicker, Note, OfferBanner, OrderBar, Overlay, PackSelector, Pagination, PaymentMethod, PaypalButton, Portal, PriceLabel, ProductGallery, ProductGalleryMobile, ProgressBar, QuantityPicker, RadioGroupInput, RadioInput, Rating, Review, ScrollToTop, SearchBar, SearchNavigation, SeasonOfferTag, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeFitGuide, SizeSelector, SizeTable, SliderNavigation, Spacing, Spinner, StarList, Tab, Tabs, Text$5 as Text, TextButton, ThemeProvider, ThemeVariables, Timer, Tooltip, Totals, decimalFormat, formatPrice, isEmail, isEmpty, isNumber$1 as isNumber, isPhoneNumber, isValidDate, modalEvent, simulateMouseClick, sliceString, useModal, useModalEvent, useOnClickOutside, useTheme, useThemeAssets, useWindowDimensions };
|
|
17086
17091
|
//# sourceMappingURL=index.esm.js.map
|