@trafilea/afrodita-components 2.0.1 → 2.3.0

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.
Files changed (36) hide show
  1. package/README.md +90 -1
  2. package/build/dts/components/color/selector/PatternSelector.d.ts +8 -0
  3. package/build/dts/components/color/selector/PatternSelector.test.d.ts +1 -0
  4. package/build/dts/components/cross-sell/Checkbox/CrossSellCheckbox.d.ts +13 -0
  5. package/build/dts/components/cross-sell/Checkbox/CrossSellCheckbox.stories.d.ts +9 -0
  6. package/build/dts/components/cross-sell/Checkbox/CrossSellCheckbox.test.d.ts +1 -0
  7. package/build/dts/components/cross-sell/index.d.ts +1 -0
  8. package/build/dts/components/dropdown-list-icons/DropdownListIcons.d.ts +6 -0
  9. package/build/dts/components/dropdown-list-icons/DropdownListIcons.stories.d.ts +9 -0
  10. package/build/dts/components/dropdown-list-icons/DropdownListIcons.test.d.ts +1 -0
  11. package/build/dts/components/dropdown-list-icons/Styled.d.ts +34 -0
  12. package/build/dts/components/icon-button/IconButton.stories.d.ts +1 -1
  13. package/build/dts/components/icon-button/amazonAndPaypal/AmazonPaypalButtons.d.ts +6 -0
  14. package/build/dts/components/icon-button/amazonAndPaypal/AmazonPaypalButtons.stories.d.ts +7 -0
  15. package/build/dts/components/icon-button/amazonAndPaypal/AmazonPaypalButtons.test.d.ts +1 -0
  16. package/build/dts/components/icons/Actions/Question.d.ts +3 -0
  17. package/build/dts/components/icons/Actions/index.d.ts +1 -0
  18. package/build/dts/components/icons/Messaging/Comment.d.ts +3 -0
  19. package/build/dts/components/icons/Messaging/index.d.ts +1 -0
  20. package/build/dts/components/icons/PDP/Shipping.d.ts +3 -0
  21. package/build/dts/components/icons/PDP/index.d.ts +1 -0
  22. package/build/dts/components/icons/Payment/Amazon.d.ts +3 -0
  23. package/build/dts/components/icons/Payment/index.d.ts +1 -0
  24. package/build/dts/components/index.d.ts +5 -1
  25. package/build/dts/components/product/order/item/SimpleOrderItem.d.ts +5 -1
  26. package/build/dts/components/product/order/item/SimpleOrderItem.stories.d.ts +2 -1
  27. package/build/dts/components/shared/image/Image.d.ts +3 -1
  28. package/build/dts/config/breakpoints.d.ts +5 -0
  29. package/build/dts/hooks/WindowDimensions.d.ts +7 -0
  30. package/build/dts/types/types.d.ts +14 -1
  31. package/build/index.d.ts +216 -128
  32. package/build/index.esm.js +353 -218
  33. package/build/index.esm.js.map +1 -1
  34. package/build/index.js +357 -218
  35. package/build/index.js.map +1 -1
  36. package/package.json +1 -1
package/build/index.d.ts CHANGED
@@ -2,129 +2,6 @@
2
2
  import React, { ReactNode, ElementType } from 'react';
3
3
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
4
4
 
5
- declare enum CardSectionType {
6
- Header = 0,
7
- Footer = 1
8
- }
9
- declare enum ComponentSize {
10
- Large = 0,
11
- Medium = 1,
12
- Small = 2,
13
- XSmall = 3
14
- }
15
- declare enum ComponentPosition {
16
- Top = 0,
17
- Bottom = 1,
18
- Left = 2,
19
- Right = 3
20
- }
21
- declare enum InputValidationType {
22
- Error = 0,
23
- Valid = 1,
24
- Empty = 2
25
- }
26
-
27
- interface Theme {
28
- palette: {
29
- primary: {
30
- default: string;
31
- hover: string;
32
- pressed: string;
33
- };
34
- secondary: {
35
- default: string;
36
- hover: string;
37
- pressed: string;
38
- };
39
- };
40
- shades: {
41
- white: string;
42
- gray010: string;
43
- gray050: string;
44
- gray100: string;
45
- gray150: string;
46
- gray200: string;
47
- gray250: string;
48
- gray300: string;
49
- gray350: string;
50
- gray400: string;
51
- gray450: string;
52
- gray500: string;
53
- gray550: string;
54
- gray600: string;
55
- gray650: string;
56
- gray700: string;
57
- gray750: string;
58
- gray800: string;
59
- gray850: string;
60
- gray900: string;
61
- gray950: string;
62
- gray990: string;
63
- };
64
- text: {
65
- weight: {
66
- bold: number;
67
- };
68
- };
69
- }
70
- interface IconProps {
71
- width?: number;
72
- height?: number;
73
- fill?: string;
74
- title?: string;
75
- }
76
- declare type ButtonType = 'button' | 'submit' | 'reset';
77
- interface CTAProps {
78
- onClick: () => void;
79
- disabled?: boolean;
80
- wide?: boolean | false;
81
- size?: ComponentSize;
82
- text: string;
83
- type?: ButtonType;
84
- className?: string;
85
- }
86
- declare type DropdownOption<T> = {
87
- key: string;
88
- label: string;
89
- value: T;
90
- disabled: boolean;
91
- };
92
- declare type SizeOption = {
93
- label: string;
94
- description: string;
95
- disabled?: boolean;
96
- };
97
- declare type Color = {
98
- primaryColor: string;
99
- secondaryColor?: string;
100
- tertiaryColor?: string;
101
- };
102
- declare type ColorPickerOption = {
103
- label: string;
104
- color: Color;
105
- };
106
- declare type RadioGroupOption = {
107
- value: string;
108
- label: string;
109
- };
110
- declare type ImageType = {
111
- key: string;
112
- imageUrl: string;
113
- alt: string;
114
- };
115
- interface IconWithOpacityProps extends IconProps {
116
- opacity?: number;
117
- }
118
- interface WithTestId {
119
- dataTestId?: string;
120
- }
121
-
122
- interface ThemeProviderProps {
123
- theme: Theme;
124
- children: ReactNode;
125
- }
126
- declare const ThemeProvider: ({ theme, children }: ThemeProviderProps) => JSX.Element;
127
-
128
5
  declare const SixtyDaysGuarantee: ({ height, width, fill, title }: IconProps) => JSX.Element;
129
6
 
130
7
  declare const Custom_SixtyDaysGuarantee: typeof SixtyDaysGuarantee;
@@ -145,11 +22,14 @@ interface LightCheckProps extends IconProps {
145
22
  }
146
23
  declare const LightCheck: ({ height, width, fill, strokeWidth }: LightCheckProps) => JSX.Element;
147
24
 
25
+ declare const Question: ({ height, width, fill }: IconProps) => JSX.Element;
26
+
148
27
  declare const Actions_Check: typeof Check;
149
28
  declare const Actions_ClearLight: typeof ClearLight;
150
29
  declare const Actions_LightExclamation: typeof LightExclamation;
151
30
  type Actions_LightCheckProps = LightCheckProps;
152
31
  declare const Actions_LightCheck: typeof LightCheck;
32
+ declare const Actions_Question: typeof Question;
153
33
  declare namespace Actions {
154
34
  export {
155
35
  Actions_Check as Check,
@@ -157,6 +37,7 @@ declare namespace Actions {
157
37
  Actions_LightExclamation as LightExclamation,
158
38
  Actions_LightCheckProps as LightCheckProps,
159
39
  Actions_LightCheck as LightCheck,
40
+ Actions_Question as Question,
160
41
  };
161
42
  }
162
43
 
@@ -228,6 +109,8 @@ declare const StarHalf: ({ height, width, fill }: IconProps) => JSX.Element;
228
109
 
229
110
  declare const Stopwatch: ({ height, width, fill, title }: IconProps) => JSX.Element;
230
111
 
112
+ declare const Shipping: ({ height, width, fill }: IconProps) => JSX.Element;
113
+
231
114
  declare const PDP_Clock: typeof Clock;
232
115
  declare const PDP_FlagUSA: typeof FlagUSA;
233
116
  declare const PDP_Minus: typeof Minus;
@@ -237,6 +120,7 @@ declare const PDP_Star: typeof Star;
237
120
  declare const PDP_StarEmpty: typeof StarEmpty;
238
121
  declare const PDP_StarHalf: typeof StarHalf;
239
122
  declare const PDP_Stopwatch: typeof Stopwatch;
123
+ declare const PDP_Shipping: typeof Shipping;
240
124
  declare namespace PDP {
241
125
  export {
242
126
  PDP_Clock as Clock,
@@ -248,6 +132,7 @@ declare namespace PDP {
248
132
  PDP_StarEmpty as StarEmpty,
249
133
  PDP_StarHalf as StarHalf,
250
134
  PDP_Stopwatch as Stopwatch,
135
+ PDP_Shipping as Shipping,
251
136
  };
252
137
  }
253
138
 
@@ -309,12 +194,16 @@ declare const QuestionCircle: ({ height, width, fill }: IconProps) => JSX.Elemen
309
194
 
310
195
  declare const Messenger: ({ height, width, fill }: IconProps) => JSX.Element;
311
196
 
197
+ declare const Comment: ({ height, width, fill }: IconProps) => JSX.Element;
198
+
312
199
  declare const Messaging_QuestionCircle: typeof QuestionCircle;
313
200
  declare const Messaging_Messenger: typeof Messenger;
201
+ declare const Messaging_Comment: typeof Comment;
314
202
  declare namespace Messaging {
315
203
  export {
316
204
  Messaging_QuestionCircle as QuestionCircle,
317
205
  Messaging_Messenger as Messenger,
206
+ Messaging_Comment as Comment,
318
207
  };
319
208
  }
320
209
 
@@ -343,12 +232,15 @@ declare const Paypal: ({ height, width }: IconProps) => JSX.Element;
343
232
 
344
233
  declare const Klarna: ({ height, width }: IconProps) => JSX.Element;
345
234
 
235
+ declare const Amazon: ({ height, width }: IconProps) => JSX.Element;
236
+
346
237
  declare const Payment_Visa: typeof Visa;
347
238
  declare const Payment_MasterCard: typeof MasterCard;
348
239
  declare const Payment_AMEX: typeof AMEX;
349
240
  declare const Payment_JCB: typeof JCB;
350
241
  declare const Payment_Paypal: typeof Paypal;
351
242
  declare const Payment_Klarna: typeof Klarna;
243
+ declare const Payment_Amazon: typeof Amazon;
352
244
  declare namespace Payment {
353
245
  export {
354
246
  Payment_Visa as Visa,
@@ -357,6 +249,7 @@ declare namespace Payment {
357
249
  Payment_JCB as JCB,
358
250
  Payment_Paypal as Paypal,
359
251
  Payment_Klarna as Klarna,
252
+ Payment_Amazon as Amazon,
360
253
  };
361
254
  }
362
255
 
@@ -384,6 +277,141 @@ declare const Icon: {
384
277
  SlideDots: typeof SlideDots;
385
278
  };
386
279
 
280
+ declare enum CardSectionType {
281
+ Header = 0,
282
+ Footer = 1
283
+ }
284
+ declare enum ComponentSize {
285
+ Large = 0,
286
+ Medium = 1,
287
+ Small = 2,
288
+ XSmall = 3
289
+ }
290
+ declare enum ComponentPosition {
291
+ Top = 0,
292
+ Bottom = 1,
293
+ Left = 2,
294
+ Right = 3
295
+ }
296
+ declare enum InputValidationType {
297
+ Error = 0,
298
+ Valid = 1,
299
+ Empty = 2
300
+ }
301
+
302
+ interface Theme {
303
+ palette: {
304
+ primary: {
305
+ default: string;
306
+ hover: string;
307
+ pressed: string;
308
+ };
309
+ secondary: {
310
+ default: string;
311
+ hover: string;
312
+ pressed: string;
313
+ };
314
+ };
315
+ shades: {
316
+ white: string;
317
+ gray010: string;
318
+ gray050: string;
319
+ gray100: string;
320
+ gray150: string;
321
+ gray200: string;
322
+ gray250: string;
323
+ gray300: string;
324
+ gray350: string;
325
+ gray400: string;
326
+ gray450: string;
327
+ gray500: string;
328
+ gray550: string;
329
+ gray600: string;
330
+ gray650: string;
331
+ gray700: string;
332
+ gray750: string;
333
+ gray800: string;
334
+ gray850: string;
335
+ gray900: string;
336
+ gray950: string;
337
+ gray990: string;
338
+ };
339
+ text: {
340
+ weight: {
341
+ bold: number;
342
+ };
343
+ };
344
+ }
345
+ interface IconProps {
346
+ width?: number;
347
+ height?: number;
348
+ fill?: string;
349
+ title?: string;
350
+ }
351
+ declare type ButtonType = 'button' | 'submit' | 'reset';
352
+ interface CTAProps {
353
+ onClick: () => void;
354
+ disabled?: boolean;
355
+ wide?: boolean | false;
356
+ size?: ComponentSize;
357
+ text: string;
358
+ type?: ButtonType;
359
+ className?: string;
360
+ }
361
+ declare type DropdownOption<T> = {
362
+ key: string;
363
+ label: string;
364
+ value: T;
365
+ disabled: boolean;
366
+ };
367
+ declare type SizeOption = {
368
+ label: string;
369
+ description: string;
370
+ disabled?: boolean;
371
+ };
372
+ declare type Color = {
373
+ primaryColor: string;
374
+ secondaryColor?: string;
375
+ tertiaryColor?: string;
376
+ };
377
+ declare type Pattern = {
378
+ url: string;
379
+ };
380
+ declare type ColorPickerOption = {
381
+ label: string;
382
+ color?: Color;
383
+ pattern?: Pattern;
384
+ };
385
+ declare type RadioGroupOption = {
386
+ value: string;
387
+ label: string;
388
+ };
389
+ declare type ImageType = {
390
+ key: string;
391
+ imageUrl: string;
392
+ alt: string;
393
+ };
394
+ interface IconWithOpacityProps extends IconProps {
395
+ opacity?: number;
396
+ }
397
+ interface WithTestId {
398
+ dataTestId?: string;
399
+ }
400
+ declare type DropdownListIconsItem = {
401
+ Icon: IconType;
402
+ items: DropdownListIconsSubItem[];
403
+ };
404
+ declare type DropdownListIconsSubItem = {
405
+ description: string;
406
+ callback: () => void;
407
+ };
408
+
409
+ interface ThemeProviderProps {
410
+ theme: Theme;
411
+ children: ReactNode;
412
+ }
413
+ declare const ThemeProvider: ({ theme, children }: ThemeProviderProps) => JSX.Element;
414
+
387
415
  interface CardBodyProps {
388
416
  children: ReactNode;
389
417
  }
@@ -727,10 +755,10 @@ declare const Input: {
727
755
  SimplePlusIcon: ({ Icon, ...rest }: BasePlusIconProps) => JSX.Element;
728
756
  };
729
757
 
730
- declare const index_d_Input: typeof Input;
731
- declare namespace index_d {
758
+ declare const index_d$1_Input: typeof Input;
759
+ declare namespace index_d$1 {
732
760
  export {
733
- index_d_Input as Input,
761
+ index_d$1_Input as Input,
734
762
  };
735
763
  }
736
764
 
@@ -836,8 +864,12 @@ interface ProductOrderItemProps {
836
864
  alt: string;
837
865
  };
838
866
  price: Price;
867
+ tag?: {
868
+ text: string;
869
+ backgroundColor: string;
870
+ };
839
871
  }
840
- declare const SimpleOrderItem: ({ title, subtitle, image, price }: ProductOrderItemProps) => JSX.Element;
872
+ declare const SimpleOrderItem: ({ title, subtitle, image, price, tag }: ProductOrderItemProps) => JSX.Element;
841
873
 
842
874
  interface ReviewProps {
843
875
  reviewerName: string;
@@ -871,4 +903,60 @@ interface SliderNavigationProps {
871
903
  }
872
904
  declare const SliderNavigation: ({ children, infinite, arrows, adaptiveHeight, dotsSize, dotListMarginTop, initialSlide, }: SliderNavigationProps) => _emotion_react_jsx_runtime.JSX.Element;
873
905
 
874
- export { _default as Accordion, AccordionBox, AccordionIcon, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, CTAProps, _default$1 as Card, CardSectionType, CategoryTag, Checkbox, Color, ColorPickerOption, ComponentPosition, ComponentSize, DeliveryDetails, DiscountTag, DropdownOption, FitPredictor, Icon, IconButton, IconProps, IconWithOpacityProps, ImageType, index_d as Input, InputValidationType, MultiColorPicker, OfferBanner, OrderBar, PaymentMethod, PriceLabel, ProductGallery, ProgressBar, RadioGroupInput, RadioGroupOption, Rating, Review, ScrollToTop, SeasonOfferTag, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeFitGuide, SizeOption, SizeSelector, SizeTable, SliderNavigation, TextButton, Theme, ThemeProvider, Timer, Tooltip, Totals, WithTestId };
906
+ interface DropdownListIconsProps {
907
+ items: DropdownListIconsItem[];
908
+ }
909
+ declare const DropdownListIcons: ({ items }: DropdownListIconsProps) => JSX.Element;
910
+
911
+ interface ImageStyleProps {
912
+ height?: string;
913
+ width?: string;
914
+ borderRadius?: string;
915
+ objectFit?: string;
916
+ objectPosition?: string;
917
+ }
918
+ interface ImageProps extends ImageStyleProps {
919
+ src: string;
920
+ alt: string;
921
+ }
922
+ declare const Image: ({ src, alt, height, width, borderRadius, objectFit, objectPosition, }: ImageProps) => JSX.Element;
923
+
924
+ interface AmazonPaypalBtnProps {
925
+ onClick: () => void;
926
+ }
927
+ declare const AmazonButton: ({ onClick }: AmazonPaypalBtnProps) => JSX.Element;
928
+ declare const PaypalButton: ({ onClick }: AmazonPaypalBtnProps) => JSX.Element;
929
+
930
+ type AmazonPaypalButtons_d_AmazonPaypalBtnProps = AmazonPaypalBtnProps;
931
+ declare const AmazonPaypalButtons_d_AmazonButton: typeof AmazonButton;
932
+ declare const AmazonPaypalButtons_d_PaypalButton: typeof PaypalButton;
933
+ declare namespace AmazonPaypalButtons_d {
934
+ export {
935
+ AmazonPaypalButtons_d_AmazonPaypalBtnProps as AmazonPaypalBtnProps,
936
+ AmazonPaypalButtons_d_AmazonButton as AmazonButton,
937
+ AmazonPaypalButtons_d_PaypalButton as PaypalButton,
938
+ };
939
+ }
940
+
941
+ interface CrossSellCheckboxProps extends rightToLeftProps {
942
+ imageURL: string;
943
+ title: string;
944
+ description: string;
945
+ freeShippingText: string;
946
+ onChange: (checked: Boolean) => void;
947
+ }
948
+ interface rightToLeftProps {
949
+ rightToLeft: boolean;
950
+ }
951
+ declare const CrossSellCheckbox: ({ imageURL, title, description, freeShippingText, rightToLeft, onChange, }: CrossSellCheckboxProps) => JSX.Element;
952
+
953
+ type index_d_CrossSellCheckboxProps = CrossSellCheckboxProps;
954
+ declare const index_d_CrossSellCheckbox: typeof CrossSellCheckbox;
955
+ declare namespace index_d {
956
+ export {
957
+ index_d_CrossSellCheckboxProps as CrossSellCheckboxProps,
958
+ index_d_CrossSellCheckbox as CrossSellCheckbox,
959
+ };
960
+ }
961
+
962
+ export { _default as Accordion, AccordionBox, AccordionIcon, AmazonPaypalButtons_d as AmazonAndPaypalButtons, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, CTAProps, _default$1 as Card, CardSectionType, CategoryTag, Checkbox, Color, ColorPickerOption, ComponentPosition, ComponentSize, index_d as CrossSell, DeliveryDetails, DiscountTag, DropdownListIcons, DropdownListIconsItem, DropdownListIconsSubItem, DropdownOption, FitPredictor, Icon, IconButton, IconProps, IconWithOpacityProps, Image, ImageType, index_d$1 as Input, InputValidationType, MultiColorPicker, OfferBanner, OrderBar, Pattern, PaymentMethod, PriceLabel, ProductGallery, ProgressBar, RadioGroupInput, RadioGroupOption, Rating, Review, ScrollToTop, SeasonOfferTag, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeFitGuide, SizeOption, SizeSelector, SizeTable, SliderNavigation, TextButton, Theme, ThemeProvider, Timer, Tooltip, Totals, WithTestId };