@shopgate/pwa-ui-shared 7.30.0-alpha.10 → 7.30.0-alpha.11

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 (188) hide show
  1. package/AccordionContainer/index.js +17 -11
  2. package/AccordionContainer/spec.js +12 -3
  3. package/ActionButton/index.js +47 -33
  4. package/ActionButton/spec.js +5 -1
  5. package/AddToCartButton/index.js +44 -33
  6. package/AddToCartButton/mock.js +20 -8
  7. package/AddToCartButton/spec.js +4 -3
  8. package/Availability/index.js +5 -3
  9. package/Availability/spec.js +6 -5
  10. package/Button/index.js +73 -58
  11. package/Button/spec.js +16 -10
  12. package/ButtonLink/index.js +20 -12
  13. package/ButtonLink/spec.js +5 -3
  14. package/Card/index.js +5 -3
  15. package/CardList/components/Item/index.js +5 -3
  16. package/CardList/index.js +21 -12
  17. package/CartTotalLine/components/Amount/index.js +10 -8
  18. package/CartTotalLine/components/Hint/index.js +7 -5
  19. package/CartTotalLine/components/Label/index.js +12 -10
  20. package/CartTotalLine/components/Spacer/index.js +5 -3
  21. package/CartTotalLine/index.js +5 -3
  22. package/Checkbox/index.js +6 -5
  23. package/Chip/index.js +28 -22
  24. package/Chip/spec.js +9 -6
  25. package/ContextMenu/ContextMenuProvider.js +5 -3
  26. package/ContextMenu/components/Item/index.js +14 -11
  27. package/ContextMenu/components/Position/index.js +20 -12
  28. package/ContextMenu/index.js +54 -44
  29. package/ContextMenu/spec.js +31 -20
  30. package/Dialog/components/HtmlContentDialog/index.js +9 -7
  31. package/Dialog/components/HtmlContentDialog/spec.js +9 -6
  32. package/Dialog/components/PipelineErrorDialog/index.js +106 -47
  33. package/Dialog/components/PipelineErrorDialog/spec.js +5 -4
  34. package/Dialog/components/TextMessageDialog/index.js +9 -7
  35. package/Dialog/components/TextMessageDialog/spec.js +9 -6
  36. package/Dialog/components/VariantSelectModal/index.js +7 -5
  37. package/Dialog/components/VariantSelectModal/spec.js +6 -3
  38. package/Dialog/index.js +12 -8
  39. package/Dialog/spec.js +7 -6
  40. package/DiscountBadge/index.js +10 -8
  41. package/DiscountBadge/spec.js +3 -2
  42. package/FavoritesButton/index.js +40 -31
  43. package/FavoritesButton/spec.js +7 -3
  44. package/Form/Builder/classes/ActionListener/index.js +400 -401
  45. package/Form/Builder/components/CheckboxElement.js +13 -5
  46. package/Form/Builder/components/CountryElement.js +13 -5
  47. package/Form/Builder/components/ProvinceElement.js +13 -5
  48. package/Form/Builder/components/RadioElement.js +19 -11
  49. package/Form/Builder/components/SelectElement.js +26 -16
  50. package/Form/Builder/components/TextElement.js +13 -5
  51. package/Form/Builder/index.js +70 -60
  52. package/Form/Builder/spec.js +10 -9
  53. package/Form/Checkbox/index.js +31 -21
  54. package/Form/InfoField/index.js +19 -12
  55. package/Form/InfoField/spec.js +4 -1
  56. package/Form/Password/index.js +22 -15
  57. package/Form/Password/spec.js +10 -5
  58. package/Form/RadioGroup/components/Item/index.js +34 -25
  59. package/Form/RadioGroup/index.js +37 -28
  60. package/Form/RadioGroup/spec.js +45 -31
  61. package/Form/Select/index.js +52 -43
  62. package/Form/Select/spec.js +5 -2
  63. package/Form/SelectContextChoices/index.js +26 -22
  64. package/Form/SelectContextChoices/spec.js +4 -1
  65. package/Form/TextField/index.js +40 -27
  66. package/Form/TextField/spec.js +34 -21
  67. package/Form/index.js +23 -15
  68. package/FormElement/components/ErrorText/index.js +7 -5
  69. package/FormElement/components/Label/index.js +6 -4
  70. package/FormElement/components/Placeholder/index.js +7 -5
  71. package/FormElement/components/Underline/index.js +8 -6
  72. package/FormElement/index.js +62 -46
  73. package/FormElement/spec.js +10 -9
  74. package/Glow/index.js +30 -22
  75. package/Glow/spec.js +6 -1
  76. package/IndicatorCircle/index.js +10 -8
  77. package/IndicatorCircle/spec.js +3 -2
  78. package/LoadingIndicator/index.js +8 -6
  79. package/Manufacturer/index.js +9 -7
  80. package/MessageBar/index.js +20 -17
  81. package/MessageBar/spec.js +6 -5
  82. package/NoResults/components/Icon/index.js +134 -110
  83. package/NoResults/index.js +27 -21
  84. package/Placeholder/index.js +13 -5
  85. package/PlaceholderLabel/index.js +2 -1
  86. package/PlaceholderLabel/spec.js +13 -6
  87. package/PlaceholderParagraph/index.js +13 -12
  88. package/PlaceholderParagraph/spec.js +13 -6
  89. package/Price/index.js +46 -28
  90. package/PriceInfo/index.js +2 -1
  91. package/PriceStriked/index.js +41 -29
  92. package/ProductProperties/index.js +13 -10
  93. package/ProgressBar/index.js +28 -19
  94. package/ProgressBar/spec.js +2 -1
  95. package/RadioButton/index.js +6 -5
  96. package/RadioButton/spec.js +3 -2
  97. package/RatingNumber/index.js +2 -1
  98. package/RatingStars/index.js +50 -34
  99. package/RatingStars/spec.js +7 -6
  100. package/Ripple/components/RippleAnimation/index.js +12 -10
  101. package/Ripple/index.js +72 -62
  102. package/RippleButton/index.js +44 -27
  103. package/RippleButton/spec.js +20 -13
  104. package/ScannerOverlay/components/CameraOverlay/index.js +8 -5
  105. package/ScannerOverlay/components/ScannerBar/components/FlashlightButton/index.js +25 -21
  106. package/ScannerOverlay/components/ScannerBar/components/ScannerInstructions/index.js +7 -5
  107. package/ScannerOverlay/components/ScannerBar/index.js +17 -12
  108. package/ScannerOverlay/index.js +24 -15
  109. package/Sheet/components/Header/components/SearchBar/index.js +35 -28
  110. package/Sheet/components/Header/components/SearchBar/spec.js +2 -1
  111. package/Sheet/components/Header/index.js +47 -34
  112. package/Sheet/components/Header/spec.js +2 -1
  113. package/Sheet/index.js +80 -65
  114. package/Sheet/spec.js +27 -14
  115. package/TaxDisclaimer/index.js +13 -10
  116. package/TaxDisclaimer/spec.js +3 -2
  117. package/TextField/components/ErrorText/index.js +7 -5
  118. package/TextField/components/FormElement/index.js +4 -3
  119. package/TextField/components/Hint/index.js +7 -5
  120. package/TextField/components/Label/index.js +6 -4
  121. package/TextField/components/Underline/index.js +8 -6
  122. package/TextField/index.js +102 -85
  123. package/TextField/spec.js +37 -23
  124. package/ToggleIcon/index.js +23 -15
  125. package/ToggleIcon/spec.js +12 -8
  126. package/icons/AccountBoxIcon.js +5 -4
  127. package/icons/AddMoreIcon.js +5 -4
  128. package/icons/ArrowDropIcon.js +5 -4
  129. package/icons/ArrowIcon.js +5 -4
  130. package/icons/BarcodeScannerIcon.js +5 -4
  131. package/icons/BoxIcon.js +5 -4
  132. package/icons/BrowseIcon.js +5 -4
  133. package/icons/BurgerIcon.js +5 -4
  134. package/icons/CalendarIcon.js +5 -5
  135. package/icons/CartCouponIcon.js +5 -4
  136. package/icons/CartIcon.js +5 -4
  137. package/icons/CartPlusIcon.js +5 -4
  138. package/icons/CheckIcon.js +5 -4
  139. package/icons/CheckedIcon.js +5 -4
  140. package/icons/ChevronIcon.js +5 -4
  141. package/icons/CreditCardIcon.js +5 -4
  142. package/icons/CrossIcon.js +5 -4
  143. package/icons/DescriptionIcon.js +5 -4
  144. package/icons/FilterIcon.js +5 -4
  145. package/icons/FlashDisabledIcon.js +5 -4
  146. package/icons/FlashEnabledIcon.js +5 -4
  147. package/icons/GridIcon.js +5 -4
  148. package/icons/HeartIcon.js +5 -4
  149. package/icons/HeartOutlineIcon.js +5 -4
  150. package/icons/HeartPlusIcon.js +5 -4
  151. package/icons/HeartPlusOutlineIcon.js +5 -4
  152. package/icons/HomeIcon.js +5 -4
  153. package/icons/InfoIcon.js +5 -4
  154. package/icons/InfoOutlineIcon.js +5 -4
  155. package/icons/ListIcon.js +5 -4
  156. package/icons/LocalShippingIcon.js +5 -4
  157. package/icons/LocationIcon.js +5 -4
  158. package/icons/LocatorIcon.js +5 -4
  159. package/icons/LockIcon.js +5 -4
  160. package/icons/LogoutIcon.js +5 -4
  161. package/icons/MagnifierIcon.js +5 -4
  162. package/icons/MapMarkerIcon.js +5 -4
  163. package/icons/MoreIcon.js +5 -4
  164. package/icons/MoreVertIcon.js +5 -4
  165. package/icons/NotificationIcon.js +5 -4
  166. package/icons/PersonIcon.js +5 -4
  167. package/icons/PhoneIcon.js +5 -4
  168. package/icons/PlaceholderIcon.js +5 -4
  169. package/icons/RadioCheckedIcon.js +5 -4
  170. package/icons/RadioUncheckedIcon.js +5 -4
  171. package/icons/SecurityIcon.js +5 -4
  172. package/icons/ShippingMethodIcon.js +5 -4
  173. package/icons/ShoppingCartIcon.js +5 -4
  174. package/icons/SortIcon.js +5 -4
  175. package/icons/StarHalfIcon.js +5 -4
  176. package/icons/StarIcon.js +5 -4
  177. package/icons/StarOutlineIcon.js +5 -4
  178. package/icons/StopIcon.js +5 -4
  179. package/icons/TickIcon.js +5 -4
  180. package/icons/TimeIcon.js +5 -4
  181. package/icons/TrashIcon.js +5 -4
  182. package/icons/TrashOutlineIcon.js +5 -4
  183. package/icons/UncheckedIcon.js +5 -4
  184. package/icons/ViewListIcon.js +5 -4
  185. package/icons/VisibilityIcon.js +5 -4
  186. package/icons/VisibilityOffIcon.js +5 -4
  187. package/icons/WarningIcon.js +5 -4
  188. package/package.json +7 -8
@@ -8,124 +8,148 @@ import styles from "./style";
8
8
  * @param {Object} props Props of the component
9
9
  * @returns {JSX}
10
10
  */
11
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
12
  const NoResultIcon = props => {
12
13
  const filterId = useMemo(() => {
13
14
  const prefix = 'no-search-results-shadow';
14
15
  const hash = CryptoJs.MD5(`${prefix}-${Date.now() + Math.random()}`).toString();
15
16
  return `${prefix}-${hash}`;
16
17
  }, []);
17
- return /*#__PURE__*/React.createElement("svg", {
18
+ return /*#__PURE__*/_jsxs("svg", {
18
19
  className: props.className,
19
20
  viewBox: "-2698 6977 216 216",
20
- xmlns: "http://www.w3.org/2000/svg"
21
- }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("filter", {
22
- id: filterId,
23
- height: "130%"
24
- }, /*#__PURE__*/React.createElement("feGaussianBlur", {
25
- in: "SourceAlpha",
26
- stdDeviation: "3"
27
- }), /*#__PURE__*/React.createElement("feOffset", {
28
- dx: "2",
29
- dy: "2",
30
- result: "offsetblur"
31
- }), /*#__PURE__*/React.createElement("feComponentTransfer", null, /*#__PURE__*/React.createElement("feFuncA", {
32
- type: "linear",
33
- slope: "0.1"
34
- })), /*#__PURE__*/React.createElement("feMerge", null, /*#__PURE__*/React.createElement("feMergeNode", null), /*#__PURE__*/React.createElement("feMergeNode", {
35
- in: "SourceGraphic"
36
- })))), /*#__PURE__*/React.createElement("g", {
37
- transform: "translate(-2770 6819)"
38
- }, /*#__PURE__*/React.createElement("g", {
39
- transform: "translate(0 46)"
40
- }, /*#__PURE__*/React.createElement("circle", {
41
- className: styles.background,
42
- cx: "104",
43
- cy: "104",
44
- r: "104",
45
- transform: "translate(76 116)"
46
- })), /*#__PURE__*/React.createElement("g", {
47
- transform: "translate(-4 42)"
48
- }, /*#__PURE__*/React.createElement("circle", {
49
- className: styles.background,
50
- cx: "108",
51
- cy: "108",
52
- r: "108",
53
- transform: "translate(76 116)"
54
- })), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("circle", {
55
- className: styles.circle,
56
- cx: "104",
57
- cy: "104",
58
- r: "104",
59
- transform: "translate(76 162)"
60
- }), /*#__PURE__*/React.createElement("circle", {
61
- className: styles.circle,
62
- cx: "92",
63
- cy: "92",
64
- r: "92",
65
- transform: "translate(88 174)"
66
- }), /*#__PURE__*/React.createElement("circle", {
67
- className: styles.circle,
68
- cx: "80",
69
- cy: "80",
70
- r: "80",
71
- transform: "translate(100 186)"
72
- })), /*#__PURE__*/React.createElement("g", {
73
- name: "cloud",
74
- filter: `url(#${filterId})`,
75
- transform: "translate(83.6 235.124)"
76
- }, /*#__PURE__*/React.createElement("g", {
77
- transform: "matrix(1, 0, 0, 1, 2686.4, -7054.12)"
78
- }, /*#__PURE__*/React.createElement("path", {
79
- className: styles.background,
80
- d: "M90.216,116.652a24.732,24.732,0,0,1-20.61-10.992,13.394,13.394,0,0,1-7.263-1.374,20,20,0,0,1-7.655,1.767,20.473,20.473,0,0,1-18.255-10.6,20.009,20.009,0,0,1-6.478.981A23.584,23.584,0,0,1,6.4,73.076c0-10.6,6.085-19.236,15.507-22.181V50.11A13.07,13.07,0,0,1,34.862,37.155a13.905,13.905,0,0,1,2.748.2A18.6,18.6,0,0,1,52.724,29.7,19.248,19.248,0,0,1,65.876,35,14.4,14.4,0,0,1,75.1,31.659a13.191,13.191,0,0,1,6.281,1.963,24.851,24.851,0,0,1,40.239,1.767,21.962,21.962,0,0,1,20.61,5.3c.393-.2.589-.393.981-.589a16.9,16.9,0,0,1,7.459-1.963,15.491,15.491,0,0,1,15.311,13.937A22.951,22.951,0,0,1,181.49,64.439c2.944,6.478,2.355,13.544-1.57,20.218a21.266,21.266,0,0,1-18.059,10.011h-.2c-4.122,0-7.459-.785-10.207-2.552a13.109,13.109,0,0,1-7.263.393,24.871,24.871,0,0,1-15.311,15.114,24.1,24.1,0,0,1-18.451-.981A25.762,25.762,0,0,1,90.216,116.652Z",
81
- transform: "translate(-2686.4 7054.12)"
82
- }))), /*#__PURE__*/React.createElement("g", {
83
- name: "magnifier",
84
- filter: `url(#${filterId})`
85
- }, /*#__PURE__*/React.createElement("g", {
86
- transform: "matrix(1, 0, 0, 1, 2770, -6819)"
87
- }, /*#__PURE__*/React.createElement("rect", {
88
- className: styles.magnifier,
89
- width: "13.003",
90
- height: "3.855",
91
- transform: "matrix(0.53, 0.85, -0.85, 0.53, -2613.92, 7029.38)"
92
- })), /*#__PURE__*/React.createElement("g", {
93
- transform: "matrix(1, 0, 0, 1, 2770, -6819)"
94
- }, /*#__PURE__*/React.createElement("rect", {
95
- className: styles.magnifier,
96
- width: "3.855",
97
- height: "13.003",
98
- transform: "translate(-2566.07 7029.56) rotate(37.01)"
99
- })), /*#__PURE__*/React.createElement("g", {
100
- transform: "matrix(1, 0, 0, 1, 2770, -6819)"
101
- }, /*#__PURE__*/React.createElement("rect", {
102
- className: styles.magnifier,
103
- width: "3.856",
104
- height: "13.002",
105
- transform: "translate(-2592.67 7023)"
106
- })), /*#__PURE__*/React.createElement("circle", {
107
- className: styles.background,
108
- cx: "34",
109
- cy: "34",
110
- r: "34",
111
- transform: "translate(147 223)"
112
- }), /*#__PURE__*/React.createElement("g", {
113
- transform: "translate(136 -7)"
114
- }, /*#__PURE__*/React.createElement("g", {
115
- transform: "translate(10.699 229.942)"
116
- }, /*#__PURE__*/React.createElement("g", {
117
- transform: "translate(0 0)"
118
- }, /*#__PURE__*/React.createElement("g", {
119
- transform: "matrix(1, 0, 0, 1, 2623.3, -7041.94)"
120
- }, /*#__PURE__*/React.createElement("path", {
121
- className: styles.magnifier,
122
- d: "M83.335,33.853a34.228,34.228,0,1,0-1.494,49.8l4.482,4.482L84.63,89.829a1.926,1.926,0,0,0,0,2.789l17.032,16.932a1.926,1.926,0,0,0,2.789,0l5.677-5.677a1.926,1.926,0,0,0,0-2.789L93.1,84.152a1.926,1.926,0,0,0-2.789,0l-1.1,1.1-4.482-4.482A34.352,34.352,0,0,0,83.335,33.853Zm22.51,68.625-2.789,2.789L88.912,91.124,91.7,88.335ZM37.718,79.47a30.214,30.214,0,1,1,42.729,0A30.3,30.3,0,0,1,37.718,79.47Z",
123
- transform: "translate(-2648.22 7018.1)"
124
- })), /*#__PURE__*/React.createElement("path", {
125
- className: styles.magnifier,
126
- d: "M111.291,55.583a1.972,1.972,0,1,0,2.789-2.789,28.585,28.585,0,0,0-40.338-.1,1.972,1.972,0,0,0,2.789,2.789A24.557,24.557,0,0,1,111.291,55.583Z",
127
- transform: "translate(-59.748 -38.701)"
128
- })))))));
21
+ xmlns: "http://www.w3.org/2000/svg",
22
+ children: [/*#__PURE__*/_jsx("defs", {
23
+ children: /*#__PURE__*/_jsxs("filter", {
24
+ id: filterId,
25
+ height: "130%",
26
+ children: [/*#__PURE__*/_jsx("feGaussianBlur", {
27
+ in: "SourceAlpha",
28
+ stdDeviation: "3"
29
+ }), /*#__PURE__*/_jsx("feOffset", {
30
+ dx: "2",
31
+ dy: "2",
32
+ result: "offsetblur"
33
+ }), /*#__PURE__*/_jsx("feComponentTransfer", {
34
+ children: /*#__PURE__*/_jsx("feFuncA", {
35
+ type: "linear",
36
+ slope: "0.1"
37
+ })
38
+ }), /*#__PURE__*/_jsxs("feMerge", {
39
+ children: [/*#__PURE__*/_jsx("feMergeNode", {}), /*#__PURE__*/_jsx("feMergeNode", {
40
+ in: "SourceGraphic"
41
+ })]
42
+ })]
43
+ })
44
+ }), /*#__PURE__*/_jsxs("g", {
45
+ transform: "translate(-2770 6819)",
46
+ children: [/*#__PURE__*/_jsx("g", {
47
+ transform: "translate(0 46)",
48
+ children: /*#__PURE__*/_jsx("circle", {
49
+ className: styles.background,
50
+ cx: "104",
51
+ cy: "104",
52
+ r: "104",
53
+ transform: "translate(76 116)"
54
+ })
55
+ }), /*#__PURE__*/_jsx("g", {
56
+ transform: "translate(-4 42)",
57
+ children: /*#__PURE__*/_jsx("circle", {
58
+ className: styles.background,
59
+ cx: "108",
60
+ cy: "108",
61
+ r: "108",
62
+ transform: "translate(76 116)"
63
+ })
64
+ }), /*#__PURE__*/_jsxs("g", {
65
+ children: [/*#__PURE__*/_jsx("circle", {
66
+ className: styles.circle,
67
+ cx: "104",
68
+ cy: "104",
69
+ r: "104",
70
+ transform: "translate(76 162)"
71
+ }), /*#__PURE__*/_jsx("circle", {
72
+ className: styles.circle,
73
+ cx: "92",
74
+ cy: "92",
75
+ r: "92",
76
+ transform: "translate(88 174)"
77
+ }), /*#__PURE__*/_jsx("circle", {
78
+ className: styles.circle,
79
+ cx: "80",
80
+ cy: "80",
81
+ r: "80",
82
+ transform: "translate(100 186)"
83
+ })]
84
+ }), /*#__PURE__*/_jsx("g", {
85
+ name: "cloud",
86
+ filter: `url(#${filterId})`,
87
+ transform: "translate(83.6 235.124)",
88
+ children: /*#__PURE__*/_jsx("g", {
89
+ transform: "matrix(1, 0, 0, 1, 2686.4, -7054.12)",
90
+ children: /*#__PURE__*/_jsx("path", {
91
+ className: styles.background,
92
+ d: "M90.216,116.652a24.732,24.732,0,0,1-20.61-10.992,13.394,13.394,0,0,1-7.263-1.374,20,20,0,0,1-7.655,1.767,20.473,20.473,0,0,1-18.255-10.6,20.009,20.009,0,0,1-6.478.981A23.584,23.584,0,0,1,6.4,73.076c0-10.6,6.085-19.236,15.507-22.181V50.11A13.07,13.07,0,0,1,34.862,37.155a13.905,13.905,0,0,1,2.748.2A18.6,18.6,0,0,1,52.724,29.7,19.248,19.248,0,0,1,65.876,35,14.4,14.4,0,0,1,75.1,31.659a13.191,13.191,0,0,1,6.281,1.963,24.851,24.851,0,0,1,40.239,1.767,21.962,21.962,0,0,1,20.61,5.3c.393-.2.589-.393.981-.589a16.9,16.9,0,0,1,7.459-1.963,15.491,15.491,0,0,1,15.311,13.937A22.951,22.951,0,0,1,181.49,64.439c2.944,6.478,2.355,13.544-1.57,20.218a21.266,21.266,0,0,1-18.059,10.011h-.2c-4.122,0-7.459-.785-10.207-2.552a13.109,13.109,0,0,1-7.263.393,24.871,24.871,0,0,1-15.311,15.114,24.1,24.1,0,0,1-18.451-.981A25.762,25.762,0,0,1,90.216,116.652Z",
93
+ transform: "translate(-2686.4 7054.12)"
94
+ })
95
+ })
96
+ }), /*#__PURE__*/_jsxs("g", {
97
+ name: "magnifier",
98
+ filter: `url(#${filterId})`,
99
+ children: [/*#__PURE__*/_jsx("g", {
100
+ transform: "matrix(1, 0, 0, 1, 2770, -6819)",
101
+ children: /*#__PURE__*/_jsx("rect", {
102
+ className: styles.magnifier,
103
+ width: "13.003",
104
+ height: "3.855",
105
+ transform: "matrix(0.53, 0.85, -0.85, 0.53, -2613.92, 7029.38)"
106
+ })
107
+ }), /*#__PURE__*/_jsx("g", {
108
+ transform: "matrix(1, 0, 0, 1, 2770, -6819)",
109
+ children: /*#__PURE__*/_jsx("rect", {
110
+ className: styles.magnifier,
111
+ width: "3.855",
112
+ height: "13.003",
113
+ transform: "translate(-2566.07 7029.56) rotate(37.01)"
114
+ })
115
+ }), /*#__PURE__*/_jsx("g", {
116
+ transform: "matrix(1, 0, 0, 1, 2770, -6819)",
117
+ children: /*#__PURE__*/_jsx("rect", {
118
+ className: styles.magnifier,
119
+ width: "3.856",
120
+ height: "13.002",
121
+ transform: "translate(-2592.67 7023)"
122
+ })
123
+ }), /*#__PURE__*/_jsx("circle", {
124
+ className: styles.background,
125
+ cx: "34",
126
+ cy: "34",
127
+ r: "34",
128
+ transform: "translate(147 223)"
129
+ }), /*#__PURE__*/_jsx("g", {
130
+ transform: "translate(136 -7)",
131
+ children: /*#__PURE__*/_jsx("g", {
132
+ transform: "translate(10.699 229.942)",
133
+ children: /*#__PURE__*/_jsxs("g", {
134
+ transform: "translate(0 0)",
135
+ children: [/*#__PURE__*/_jsx("g", {
136
+ transform: "matrix(1, 0, 0, 1, 2623.3, -7041.94)",
137
+ children: /*#__PURE__*/_jsx("path", {
138
+ className: styles.magnifier,
139
+ d: "M83.335,33.853a34.228,34.228,0,1,0-1.494,49.8l4.482,4.482L84.63,89.829a1.926,1.926,0,0,0,0,2.789l17.032,16.932a1.926,1.926,0,0,0,2.789,0l5.677-5.677a1.926,1.926,0,0,0,0-2.789L93.1,84.152a1.926,1.926,0,0,0-2.789,0l-1.1,1.1-4.482-4.482A34.352,34.352,0,0,0,83.335,33.853Zm22.51,68.625-2.789,2.789L88.912,91.124,91.7,88.335ZM37.718,79.47a30.214,30.214,0,1,1,42.729,0A30.3,30.3,0,0,1,37.718,79.47Z",
140
+ transform: "translate(-2648.22 7018.1)"
141
+ })
142
+ }), /*#__PURE__*/_jsx("path", {
143
+ className: styles.magnifier,
144
+ d: "M111.291,55.583a1.972,1.972,0,1,0,2.789-2.789,28.585,28.585,0,0,0-40.338-.1,1.972,1.972,0,0,0,2.789,2.789A24.557,24.557,0,0,1,111.291,55.583Z",
145
+ transform: "translate(-59.748 -38.701)"
146
+ })]
147
+ })
148
+ })
149
+ })]
150
+ })]
151
+ })]
152
+ });
129
153
  };
130
154
  NoResultIcon.defaultProps = {
131
155
  className: ''
@@ -6,6 +6,7 @@ import { themeConfig } from '@shopgate/pwa-common/helpers/config';
6
6
  import { svgToDataUrl } from '@shopgate/engage/core';
7
7
  import Icon from "./components/Icon";
8
8
  import styles from "./style";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
10
  const {
10
11
  svgImages = {}
11
12
  } = themeConfig || {};
@@ -20,28 +21,33 @@ const {
20
21
  */
21
22
  const NoResults = props => {
22
23
  const imageSRC = useMemo(() => svgToDataUrl(noResultsImage), []);
23
- return /*#__PURE__*/React.createElement("div", {
24
+ return /*#__PURE__*/_jsxs("div", {
24
25
  className: classNames(styles.wrapper, props.className, ' ui-shared__no-results'),
25
- "data-test-id": "noResults"
26
- }, /*#__PURE__*/React.createElement("div", {
27
- className: classNames(styles.icon, 'no-results__image')
28
- }, noResultsImage ? /*#__PURE__*/React.createElement("img", {
29
- src: imageSRC,
30
- alt: ""
31
- }) : /*#__PURE__*/React.createElement(Icon, null)), /*#__PURE__*/React.createElement("div", {
32
- role: "alert",
33
- "aria-atomic": "true"
34
- }, /*#__PURE__*/React.createElement("div", {
35
- className: styles.headline
36
- }, /*#__PURE__*/React.createElement(I18n.Text, {
37
- string: props.headlineText,
38
- params: props
39
- })), /*#__PURE__*/React.createElement("div", {
40
- className: styles.text
41
- }, /*#__PURE__*/React.createElement(I18n.Text, {
42
- string: props.bodyText,
43
- params: props
44
- }))));
26
+ "data-test-id": "noResults",
27
+ children: [/*#__PURE__*/_jsx("div", {
28
+ className: classNames(styles.icon, 'no-results__image'),
29
+ children: noResultsImage ? /*#__PURE__*/_jsx("img", {
30
+ src: imageSRC,
31
+ alt: ""
32
+ }) : /*#__PURE__*/_jsx(Icon, {})
33
+ }), /*#__PURE__*/_jsxs("div", {
34
+ role: "alert",
35
+ "aria-atomic": "true",
36
+ children: [/*#__PURE__*/_jsx("div", {
37
+ className: styles.headline,
38
+ children: /*#__PURE__*/_jsx(I18n.Text, {
39
+ string: props.headlineText,
40
+ params: props
41
+ })
42
+ }), /*#__PURE__*/_jsx("div", {
43
+ className: styles.text,
44
+ children: /*#__PURE__*/_jsx(I18n.Text, {
45
+ string: props.bodyText,
46
+ params: props
47
+ })
48
+ })]
49
+ })]
50
+ });
45
51
  };
46
52
  NoResults.defaultProps = {
47
53
  className: null
@@ -1,3 +1,4 @@
1
+ import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
1
2
  import React, { PureComponent } from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import styles from "./style";
@@ -5,17 +6,24 @@ import styles from "./style";
5
6
  /**
6
7
  * The placeholder component.
7
8
  */
8
- class Placeholder extends PureComponent {
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ let Placeholder = /*#__PURE__*/function (_PureComponent) {
11
+ function Placeholder() {
12
+ return _PureComponent.apply(this, arguments) || this;
13
+ }
14
+ _inheritsLoose(Placeholder, _PureComponent);
15
+ var _proto = Placeholder.prototype;
9
16
  /**
10
17
  * @returns {JSX}
11
18
  */
12
- render() {
13
- return /*#__PURE__*/React.createElement("div", {
19
+ _proto.render = function render() {
20
+ return /*#__PURE__*/_jsx("div", {
14
21
  className: `${styles} ui-shared__placeholder`,
15
22
  style: this.props
16
23
  });
17
- }
18
- }
24
+ };
25
+ return Placeholder;
26
+ }(PureComponent);
19
27
  /* eslint-disable react/no-unused-prop-types */
20
28
  /* eslint-enable react/no-unused-prop-types */
21
29
  Placeholder.defaultProps = {
@@ -7,6 +7,7 @@ import styles from "./style";
7
7
  * @param {Object} props The component props.
8
8
  * @return {JSX}
9
9
  */
10
+ import { jsx as _jsx } from "react/jsx-runtime";
10
11
  const PlaceholderLabel = ({
11
12
  children,
12
13
  className,
@@ -14,7 +15,7 @@ const PlaceholderLabel = ({
14
15
  style
15
16
  }) => {
16
17
  if (!ready) {
17
- return /*#__PURE__*/React.createElement("div", {
18
+ return /*#__PURE__*/_jsx("div", {
18
19
  style: style,
19
20
  className: `${styles.label} ${className} ui-shared__placeholder-label`
20
21
  });
@@ -1,18 +1,25 @@
1
1
  import React from 'react';
2
2
  import { mount } from 'enzyme';
3
3
  import PlaceholderLabel from "./index";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
4
5
  describe('<PlaceholderLabel />', () => {
5
6
  it('should render placeholder ', () => {
6
- const wrapper = mount(/*#__PURE__*/React.createElement(PlaceholderLabel, {
7
- ready: false
8
- }, /*#__PURE__*/React.createElement("h1", null, "foo")));
7
+ const wrapper = mount(/*#__PURE__*/_jsx(PlaceholderLabel, {
8
+ ready: false,
9
+ children: /*#__PURE__*/_jsx("h1", {
10
+ children: "foo"
11
+ })
12
+ }));
9
13
  expect(wrapper).toMatchSnapshot();
10
14
  expect(wrapper.find('h1').length).toEqual(0);
11
15
  });
12
16
  it('should render children', () => {
13
- const wrapper = mount(/*#__PURE__*/React.createElement(PlaceholderLabel, {
14
- ready: true
15
- }, /*#__PURE__*/React.createElement("h1", null, "foo")));
17
+ const wrapper = mount(/*#__PURE__*/_jsx(PlaceholderLabel, {
18
+ ready: true,
19
+ children: /*#__PURE__*/_jsx("h1", {
20
+ children: "foo"
21
+ })
22
+ }));
16
23
  expect(wrapper).toMatchSnapshot();
17
24
  expect(wrapper.find('h1').length).toEqual(1);
18
25
  });
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import range from 'lodash/range';
4
4
  import PlaceholderLabel from "../PlaceholderLabel";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
5
6
  const widths = [95, 100, 92, 88, 96, 93, 96, 48];
6
7
 
7
8
  /**
@@ -19,18 +20,18 @@ const PlaceholderParagraph = ({
19
20
  if (ready) {
20
21
  return children;
21
22
  }
22
- return /*#__PURE__*/React.createElement("div", {
23
- className: "ui-shared__placeholder-paragraph"
24
- }, range(lines).map(num => {
25
- const width = num % 2 === 0 ? `${widths[(num / 2 + widths.length) % widths.length]}%` : null;
26
- return /*#__PURE__*/React.createElement(PlaceholderLabel, {
27
- key: num,
28
- style: width ? {
29
- width
30
- } : null,
31
- className: className
32
- });
33
- }));
23
+ return /*#__PURE__*/_jsx("div", {
24
+ className: "ui-shared__placeholder-paragraph",
25
+ children: range(lines).map(num => {
26
+ const width = num % 2 === 0 ? `${widths[(num / 2 + widths.length) % widths.length]}%` : null;
27
+ return /*#__PURE__*/_jsx(PlaceholderLabel, {
28
+ style: width ? {
29
+ width
30
+ } : null,
31
+ className: className
32
+ }, num);
33
+ })
34
+ });
34
35
  };
35
36
  PlaceholderParagraph.defaultProps = {
36
37
  className: '',
@@ -1,18 +1,25 @@
1
1
  import React from 'react';
2
2
  import { mount } from 'enzyme';
3
3
  import PlaceholderParagraph from "./index";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
4
5
  describe('<PlaceholderParagraph />', () => {
5
6
  it('should render placeholder ', () => {
6
- const wrapper = mount(/*#__PURE__*/React.createElement(PlaceholderParagraph, {
7
- ready: false
8
- }, /*#__PURE__*/React.createElement("h1", null, "foo")));
7
+ const wrapper = mount(/*#__PURE__*/_jsx(PlaceholderParagraph, {
8
+ ready: false,
9
+ children: /*#__PURE__*/_jsx("h1", {
10
+ children: "foo"
11
+ })
12
+ }));
9
13
  expect(wrapper).toMatchSnapshot();
10
14
  expect(wrapper.find('h1').length).toEqual(0);
11
15
  });
12
16
  it('should render children', () => {
13
- const wrapper = mount(/*#__PURE__*/React.createElement(PlaceholderParagraph, {
14
- ready: true
15
- }, /*#__PURE__*/React.createElement("h1", null, "foo")));
17
+ const wrapper = mount(/*#__PURE__*/_jsx(PlaceholderParagraph, {
18
+ ready: true,
19
+ children: /*#__PURE__*/_jsx("h1", {
20
+ children: "foo"
21
+ })
22
+ }));
16
23
  expect(wrapper).toMatchSnapshot();
17
24
  expect(wrapper.find('h1').length).toEqual(1);
18
25
  });
package/Price/index.js CHANGED
@@ -18,6 +18,7 @@ import styles from "./style";
18
18
  * @param {Object} context The component context.
19
19
  * @return {JSX.Element}
20
20
  */
21
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
22
  const Price = (props, context) => {
22
23
  // Added with PWA 6 - CCP-2372
23
24
  const {
@@ -55,35 +56,52 @@ const Price = (props, context) => {
55
56
  * The unitPriceMin contains the lowest of these prices and will be
56
57
  * displayed with a 'From' prefix.
57
58
  */
58
- return /*#__PURE__*/React.createElement("div", {
59
+ const priceContent = useMemo(() => {
60
+ let result = null;
61
+ if (showFromPrice) {
62
+ result = /*#__PURE__*/_jsx(I18n.Text, {
63
+ "aria-hidden": true,
64
+ string: "price.from",
65
+ children: /*#__PURE__*/_jsx(I18n.Price, {
66
+ currency: props.currency,
67
+ fractions: props.fractions,
68
+ forKey: "price",
69
+ price: props.unitPriceMin
70
+ })
71
+ });
72
+ } else if (props.allowFree && props.unitPrice === 0) {
73
+ result = /*#__PURE__*/_jsx(I18n.Text, {
74
+ string: "price.free"
75
+ });
76
+ } else {
77
+ result = /*#__PURE__*/_jsx(I18n.Price, {
78
+ currency: props.currency,
79
+ fractions: props.fractions,
80
+ price: props.unitPrice
81
+ });
82
+ }
83
+ return result;
84
+ }, [props.allowFree, props.currency, props.fractions, props.unitPrice, props.unitPriceMin, showFromPrice]);
85
+ return /*#__PURE__*/_jsxs("div", {
59
86
  className: containerClasses,
60
- "data-test-id": `minPrice: ${props.unitPriceMin} price: ${props.unitPrice} currency: ${props.currency}`
61
- }, /*#__PURE__*/React.createElement("span", {
62
- "aria-label": __('price.label', {
63
- price: ariaPrice
64
- })
65
- }, showFromPrice ? /*#__PURE__*/React.createElement(I18n.Text, {
66
- "aria-hidden": true,
67
- string: "price.from"
68
- }, /*#__PURE__*/React.createElement(I18n.Price, {
69
- currency: props.currency,
70
- fractions: props.fractions,
71
- forKey: "price",
72
- price: props.unitPriceMin
73
- })) : /*#__PURE__*/React.createElement(React.Fragment, null, props.allowFree && props.unitPrice === 0 ? /*#__PURE__*/React.createElement(I18n.Text, {
74
- string: "price.free"
75
- }) : /*#__PURE__*/React.createElement(I18n.Price, {
76
- currency: props.currency,
77
- fractions: props.fractions,
78
- price: props.unitPrice
79
- }))), props.taxDisclaimer && showDisclaimer ? /*#__PURE__*/React.createElement("div", {
80
- className: styles.disclaimer
81
- }, /*#__PURE__*/React.createElement("span", {
82
- "aria-hidden": true
83
- }, hint || '*'), /*#__PURE__*/React.createElement("span", {
84
- className: "sr-only",
85
- "aria-label": hint || __('product.tax_disclaimer_aria')
86
- }, __('product.tax_disclaimer_aria'))) : null);
87
+ "data-test-id": `minPrice: ${props.unitPriceMin} price: ${props.unitPrice} currency: ${props.currency}`,
88
+ children: [/*#__PURE__*/_jsx("span", {
89
+ "aria-label": __('price.label', {
90
+ price: ariaPrice
91
+ }),
92
+ children: priceContent
93
+ }), props.taxDisclaimer && showDisclaimer ? /*#__PURE__*/_jsxs("div", {
94
+ className: styles.disclaimer,
95
+ children: [/*#__PURE__*/_jsx("span", {
96
+ "aria-hidden": true,
97
+ children: hint || '*'
98
+ }), /*#__PURE__*/_jsx("span", {
99
+ className: "sr-only",
100
+ "aria-label": hint || __('product.tax_disclaimer_aria'),
101
+ children: __('product.tax_disclaimer_aria')
102
+ })]
103
+ }) : null]
104
+ });
87
105
  };
88
106
  Price.defaultProps = {
89
107
  className: '',
@@ -9,10 +9,11 @@ import styles from "./style";
9
9
  * @param {string} [props.className] CSS classes
10
10
  * @return {JSX}
11
11
  */
12
+ import { jsx as _jsx } from "react/jsx-runtime";
12
13
  const PriceInfo = ({
13
14
  className,
14
15
  text
15
- }) => /*#__PURE__*/React.createElement("div", {
16
+ }) => /*#__PURE__*/_jsx("div", {
16
17
  className: `${styles} ${className} ui-shared__price-info`,
17
18
  dangerouslySetInnerHTML: {
18
19
  __html: text