@woosmap/ui 4.220.10 → 4.220.13

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 (145) hide show
  1. package/.eslintrc +0 -10
  2. package/.storybook/main.js +0 -7
  3. package/package.json +3 -11
  4. package/src/components/Button/Button.js +2 -2
  5. package/src/components/Button/Button.stories.js +5 -5
  6. package/src/components/Button/Button.test.js +1 -1
  7. package/src/components/Button/ButtonSwitch.js +1 -1
  8. package/src/components/Button/ButtonWithDropdown.js +3 -3
  9. package/src/components/Button/ButtonWithDropdown.test.js +1 -1
  10. package/src/components/Card/Card.js +29 -29
  11. package/src/components/Card/Card.stories.js +6 -6
  12. package/src/components/Card/Card.test.js +1 -1
  13. package/src/components/Card/SimpleCard.js +2 -2
  14. package/src/components/Card/SimpleCard.styl +2 -2
  15. package/src/components/Card/SimpleCard.test.js +1 -1
  16. package/src/components/CodeSnippet/CodeSnippet.stories.js +1 -1
  17. package/src/components/CodeSnippet/CodeSnippet.test.js +1 -1
  18. package/src/components/CopyClipboardButton/CopyClipboardButton.js +3 -3
  19. package/src/components/CopyClipboardButton/CopyToClipboard.stories.js +1 -1
  20. package/src/components/CopyClipboardButton/CopyToClipboard.test.js +1 -1
  21. package/src/components/DateTime/DateTime.stories.js +1 -1
  22. package/src/components/DateTime/DateTime.test.js +1 -1
  23. package/src/components/Demo/AddressDemo.js +10 -10
  24. package/src/components/Demo/AddressDemo.stories.js +1 -1
  25. package/src/components/Demo/AutocompleteAddressDemo.js +10 -10
  26. package/src/components/Demo/AutocompleteAddressDemo.stories.js +2 -2
  27. package/src/components/Demo/DistanceDemo.js +12 -12
  28. package/src/components/Demo/DistanceDemo.stories.js +1 -1
  29. package/src/components/Demo/DistanceDemo.test.js +1 -1
  30. package/src/components/Demo/GeolocationDemo.js +7 -7
  31. package/src/components/Demo/GeolocationDemo.stories.js +1 -1
  32. package/src/components/Demo/GeolocationDemo.test.js +1 -1
  33. package/src/components/Demo/LocalitiesAddressDemo.js +8 -8
  34. package/src/components/Demo/LocalitiesAddressDemo.stories.js +1 -1
  35. package/src/components/Demo/LocalitiesAllDemo.js +5 -5
  36. package/src/components/Demo/LocalitiesAllDemo.stories.js +1 -1
  37. package/src/components/Demo/LocalitiesDemo.js +10 -10
  38. package/src/components/Demo/LocalitiesDemo.stories.js +1 -1
  39. package/src/components/Demo/LocalitiesFRAddressDemo.js +239 -261
  40. package/src/components/Demo/LocalitiesFRAddressDemo.stories.js +2 -2
  41. package/src/components/Demo/LocalitiesUKAddressDemo.js +271 -294
  42. package/src/components/Demo/LocalitiesUKAddressDemo.stories.js +1 -1
  43. package/src/components/Demo/MapDemo.js +231 -233
  44. package/src/components/Demo/MapDemo.stories.js +1 -1
  45. package/src/components/Demo/SearchDemo.js +9 -9
  46. package/src/components/Demo/SearchDemo.stories.js +1 -1
  47. package/src/components/Demo/SearchDemo.test.js +1 -1
  48. package/src/components/Demo/Showcase.stories.js +7 -7
  49. package/src/components/Demo/SkeletonDemo.js +8 -8
  50. package/src/components/Demo/SkeletonDemo.stories.js +2 -2
  51. package/src/components/Demo/SkeletonDemo.test.js +2 -2
  52. package/src/components/Demo/W3WDemo.js +9 -9
  53. package/src/components/Demo/W3WDemo.stories.js +2 -2
  54. package/src/components/Dropdown/Dropdown.js +4 -4
  55. package/src/components/Dropdown/Dropdown.stories.js +1 -1
  56. package/src/components/Dropdown/Dropdown.test.js +1 -1
  57. package/src/components/DynamicTag/DynamicTag.js +5 -5
  58. package/src/components/DynamicTag/DynamicTag.stories.js +1 -1
  59. package/src/components/DynamicTag/DynamicTag.test.js +1 -1
  60. package/src/components/Flash/Flash.js +1 -1
  61. package/src/components/Flash/Flash.stories.js +1 -1
  62. package/src/components/Flash/Flash.test.js +1 -1
  63. package/src/components/Icon/Icon.js +409 -409
  64. package/src/components/Icon/Icon.stories.js +1 -1
  65. package/src/components/Icon/Icon.test.js +1 -1
  66. package/src/components/Icon/WebSiteIcon.js +231 -231
  67. package/src/components/InfoMessage/Flash.js +1 -1
  68. package/src/components/InfoMessage/InfoMessage.js +2 -2
  69. package/src/components/InfoMessage/InfoMessage.stories.js +1 -1
  70. package/src/components/InfoMessage/InfoMessage.test.js +1 -1
  71. package/src/components/Input/Input.js +2 -2
  72. package/src/components/Input/Input.password.test.js +1 -1
  73. package/src/components/Input/Input.stories.js +1 -1
  74. package/src/components/Input/Input.test.js +1 -1
  75. package/src/components/Label/Label.js +1 -1
  76. package/src/components/Label/Label.stories.js +1 -1
  77. package/src/components/Label/Label.test.js +1 -1
  78. package/src/components/Map/InfoWindow.test.js +1 -1
  79. package/src/components/Map/Map.stories.js +3 -3
  80. package/src/components/Map/Marker.test.js +1 -1
  81. package/src/components/Map/drawOnMap.test.js +2 -10
  82. package/src/components/Map/marker.styl +2 -2
  83. package/src/components/Modal/ConfirmationModal.js +2 -2
  84. package/src/components/Modal/ConfirmationModal.test.js +1 -1
  85. package/src/components/Modal/Modal.js +6 -6
  86. package/src/components/Modal/Modal.stories.js +3 -3
  87. package/src/components/Modal/Modal.test.js +1 -1
  88. package/src/components/OfflineChatBot/OfflineChatBot.js +4 -4
  89. package/src/components/OfflineChatBot/OfflineChatBot.stories.js +2 -2
  90. package/src/components/Panel/Panel.js +2 -2
  91. package/src/components/Panel/Panel.stories.js +2 -2
  92. package/src/components/Panel/Panel.test.js +1 -1
  93. package/src/components/PasswordStrengthBar/PasswordStrengthBar.stories.js +1 -1
  94. package/src/components/PasswordStrengthBar/PasswordStrengthBar.test.js +1 -1
  95. package/src/components/Popover/ConfirmationPopover.js +3 -3
  96. package/src/components/Popover/ConfirmationPopover.test.js +1 -1
  97. package/src/components/Popover/Popover.js +1 -1
  98. package/src/components/Popover/Popover.stories.js +3 -3
  99. package/src/components/Popover/Popover.test.js +2 -2
  100. package/src/components/PricingSlider/PricingData.js +94 -113
  101. package/src/components/PricingSlider/PricingSimulator.js +132 -90
  102. package/src/components/PricingSlider/PricingSimulator.stories.js +1 -1
  103. package/src/components/PricingSlider/PricingSlider.js +9 -10
  104. package/src/components/ProgressBar/ProgressBar.js +1 -1
  105. package/src/components/ProgressBar/ProgressBar.stories.js +1 -1
  106. package/src/components/ProgressBar/ProgressBar.test.js +1 -1
  107. package/src/components/ScrollBar/ScrollBar.stories.js +1 -1
  108. package/src/components/ScrollBar/ScrollBar.test.js +1 -1
  109. package/src/components/Select/Select.stories.js +4 -4
  110. package/src/components/Select/TagSelect.test.js +1 -1
  111. package/src/components/ServiceMessage/ServiceMessage.js +1 -1
  112. package/src/components/ServiceMessage/ServiceMessage.stories.js +2 -2
  113. package/src/components/SnackBar/SnackBar.js +2 -2
  114. package/src/components/SnackBar/SnackBar.stories.js +3 -3
  115. package/src/components/SnackBar/SnackBar.test.js +3 -3
  116. package/src/components/SnackBar/withSnackBar.js +1 -1
  117. package/src/components/Stepper/Stepper.js +2 -2
  118. package/src/components/Stepper/Stepper.stories.js +1 -1
  119. package/src/components/Switch/Switch.stories.js +1 -1
  120. package/src/components/Switch/Switch.test.js +1 -1
  121. package/src/components/Tab/Tab.js +1 -1
  122. package/src/components/Tab/Tab.stories.js +1 -1
  123. package/src/components/Tooltip/Tooltip.stories.js +1 -1
  124. package/src/components/Tooltip/Tooltip.test.js +1 -1
  125. package/src/components/UseCase/UseCase.js +9 -9
  126. package/src/components/UseCase/UseCase.stories.js +4 -4
  127. package/src/components/UseCase/UseCase.styl +8 -8
  128. package/src/components/Woosmap/AddressAutocomplete.js +3 -3
  129. package/src/components/Woosmap/LocalitiesAutocomplete.js +1 -1
  130. package/src/components/Woosmap/Woosmap.stories.js +3 -3
  131. package/src/components/utils/Script.test.js +1 -1
  132. package/src/components/utils/locale.js +2 -2
  133. package/src/components/withClickOutside/withClickOutside.test.js +1 -1
  134. package/src/components/withFormValidation/withFormValidation.js +2 -2
  135. package/src/components/withFormValidation/withFormValidation.stories.js +2 -2
  136. package/src/components/withFormValidation/withFormValidation.test.js +2 -2
  137. package/src/index.js +61 -61
  138. package/src/locales/en/translation.json +143 -128
  139. package/src/locales/fr/translation.json +143 -128
  140. package/src/styles/commons/flags.styl +1 -1
  141. package/src/styles/console/button.styl +3 -3
  142. package/src/styles/console/{pricing-slider.styl → pricing-slider-back.styl} +48 -21
  143. package/src/styles/style-console.styl +1 -2
  144. package/src/website.js +25 -25
  145. package/craco.config.js +0 -9
@@ -3,9 +3,9 @@ import PropTypes from 'prop-types';
3
3
  import numeral from 'numeral';
4
4
  /* eslint-disable import/no-named-as-default */
5
5
  /* eslint-disable import/no-named-as-default-member */
6
- import PricingSlider from '@/components/PricingSlider/PricingSlider';
7
- import PricingData from '@/components/PricingSlider/PricingData';
8
- import tr from '@/components/utils/locale';
6
+ import PricingSlider from './PricingSlider';
7
+ import PricingData from './PricingData';
8
+ import { tr } from '../utils/locale';
9
9
 
10
10
  export default class PricingSimulator extends Component {
11
11
  constructor(props) {
@@ -79,48 +79,83 @@ export default class PricingSimulator extends Component {
79
79
  ? `${numeral(amount).format('0,0').replace(',', ' ')}${currency}`
80
80
  : `${currency}${numeral(amount).format('0,0')}`;
81
81
 
82
+ formatNumber = (number, currency) => {
83
+ if (currency === '€') {
84
+ // Format européen : espaces comme séparateurs, pas de décimales
85
+ return Math.floor(number).toLocaleString('fr-FR').replace(/\s/g, ' ');
86
+ }
87
+ // Format US/UK : virgules comme séparateurs, pas de décimales
88
+ return Math.floor(number).toLocaleString('en-US');
89
+ };
90
+
82
91
  getAmountByProducts = () => {
83
92
  const { sliders } = this.state;
84
93
  const { currency } = this.props;
94
+ const { total, contactSale } = this.computeTotal();
95
+
96
+ // Vérifier s'il y a au moins deux produits à afficher
97
+ let productCount = 0;
98
+ const productElements = Object.keys(sliders).map((categoryKey) => {
99
+ const category = sliders[categoryKey];
100
+
101
+ return Object.keys(category).map((productKey) => {
102
+ const product = category[productKey];
103
+ if (product.computedQueries > 1 || product.computedQueries === '∞') {
104
+ productCount += 1;
105
+ return (
106
+ <div className="pricing-summary">
107
+ <div className="pricing-summary-info">
108
+ <div className="pricing-summary-product">
109
+ {categoryKey} - {productKey}
110
+ </div>
111
+ <div className="pricing-summary-queries">
112
+ {tr('Estimated usage:')}{' '}
113
+ {product.computedQueries === '∞'
114
+ ? product.aboveLastTier
115
+ : `${this.formatNumber(product.computedQueries, currency)}
116
+ ${tr('/ mo')}`}
117
+ </div>
118
+ </div>
119
+ <div className="pricing-summary-amount">
120
+ {product.computedQueries === '∞' ? (
121
+ <span className="highlight-info">{tr('Contact sales')}</span>
122
+ ) : (
123
+ `${this.displayAmount(product.amount, currency)} ${tr('/ mo')}`
124
+ )}
125
+ </div>
126
+ </div>
127
+ );
128
+ }
129
+ if (product.computedQueries === '∞') {
130
+ productCount += 1;
131
+ return 'contact sales';
132
+ }
133
+ return null;
134
+ });
135
+ });
85
136
 
86
137
  return (
87
138
  <div className="pricing-summary-wrapper">
88
139
  <div className="pricing-summary-header">{tr('Cost estimation per product')}</div>
89
140
  <div className="pricing-summary-content">
90
- {Object.keys(sliders).map((categoryKey) => {
91
- const category = sliders[categoryKey];
92
-
93
- return Object.keys(category).map((productKey) => {
94
- const product = category[productKey];
95
- if (product.computedQueries > 1 || product.computedQueries === '∞') {
96
- return (
97
- <div className="pricing-summary">
98
- <div className="pricing-summary-info">
99
- <div className="pricing-summary-product">
100
- {categoryKey} - {productKey}
101
- </div>
102
- <div className="pricing-summary-queries">
103
- {tr('Estimated usage:')}{' '}
104
- {product.computedQueries === ''
105
- ? product.aboveLastTier
106
- : `${numeral(product.computedQueries).format('0,0').replace(',', ' ')}
107
- ${tr('/ mo')}`}
108
- </div>
109
- </div>
110
- <div className="pricing-summary-amount">
111
- {product.computedQueries === '∞'
112
- ? 'contact sales'
113
- : `${this.displayAmount(product.amount, currency)} ${tr('/ mo')}`}
114
- </div>
115
- </div>
116
- );
117
- }
118
- if (product.computedQueries === '∞') {
119
- return 'contact sales';
120
- }
121
- return null;
122
- });
123
- })}
141
+ {productElements}
142
+ {/* Ligne de total - affichée seulement s'il y a au moins deux produits */}
143
+ {productCount >= 2 && (
144
+ <div className="pricing-summary">
145
+ <div className="pricing-summary-info">
146
+ <div className="pricing-summary-product">
147
+ {tr('Total')}
148
+ {contactSale && <span className="pricing-summary-product-asterisk">*</span>}
149
+ <span className="pricing-summary-product-estimated">{tr('(Estimated)')}</span>
150
+ </div>
151
+ </div>
152
+ <div className="pricing-summary-amount">
153
+ {currency === '€'
154
+ ? `${this.formatNumber(parseInt(total, 10), currency)}€ ${tr('/ month')}`
155
+ : `${currency}${this.formatNumber(parseInt(total, 10), currency)} ${tr('/ month')}`}
156
+ </div>
157
+ </div>
158
+ )}
124
159
  </div>
125
160
  </div>
126
161
  );
@@ -129,13 +164,13 @@ export default class PricingSimulator extends Component {
129
164
  render() {
130
165
  const { sliders } = this.state;
131
166
  const { publicMode, currency } = this.props;
132
- const { total, discount, contactSale, totalBeforeDiscount } = this.computeTotal();
167
+ const { total, contactSale, totalBeforeDiscount } = this.computeTotal();
133
168
  const totalDisplayed = this.displayAmount(parseInt(total, 10), currency);
134
169
  // if (contactSale) {
135
170
  // totalDisplayed = <a href="/contact">Contact Sales</a>;
136
171
  // }
137
172
  return (
138
- <div className="section--light">
173
+ <>
139
174
  <div className="pricing-nav">
140
175
  <ul className="pricing-menu">
141
176
  {Object.keys(PricingData).map((category) => (
@@ -145,68 +180,75 @@ export default class PricingSimulator extends Component {
145
180
  ))}
146
181
  </ul>
147
182
  <div className="pricing-total mobile">
148
- <div className="pricing-total__label">Monthly price</div>
149
- <div className="pricing-total__amount">{this.displayAmount(totalBeforeDiscount, currency)}</div>
150
- <div className="pricing-total__info">
151
- <strong>{totalDisplayed}</strong>
152
- {!contactSale && (
153
- <span className="pricing-total__discount">
154
- {`(-${this.displayAmount(discount, currency)} Monthly Free Usage)`} ={' '}
155
- <strong>{totalDisplayed}</strong>
183
+ <div className="pricing-total__label">
184
+ <span className="pricing-total__label__title">{tr('Monthly price (Estimated)')}</span>
185
+ {contactSale && (
186
+ <span className="pricing-total__label__info">
187
+ {tr('* Some products require contact sales for pricing')}
156
188
  </span>
157
189
  )}
158
190
  </div>
191
+ <div className="pricing-total__amount">
192
+ {this.displayAmount(totalBeforeDiscount, currency)}
193
+ {contactSale && <span className="pricing-total__amount__asterisk">*</span>}
194
+ </div>
159
195
  </div>
160
196
  </div>
161
- <div className="section--light">
162
- <div className="pricing-simulator__wrapper">
163
- <div className="pricing-simulator__wrapper__data">
164
- {Object.keys(PricingData).map((category) => (
165
- <div className="pricing-simulator__item">
166
- <div className="pricing-simulator__header" id={this.getAnchor(category)}>
167
- <div>
168
- <img
169
- className="pricing-simulator__prod-img"
170
- src={PricingData[category].image}
171
- alt={category}
172
- />
173
- </div>
174
- <div className="pricing-simulator__prod-info">
175
- <h2 className="pricing-simulator__prod-name">{category}</h2>
176
- <p className="pricing-simulator__prod-desc">
177
- {PricingData[category].description}
178
- </p>
179
- </div>
180
- <span className="pricing-simulator__prod-price-label">Monthly price</span>
197
+ <div className="pricing-simulator__wrapper">
198
+ <div className="pricing-simulator__wrapper__data">
199
+ {Object.keys(PricingData).map((category) => (
200
+ <div className="pricing-simulator__item">
201
+ <div className="pricing-simulator__header" id={this.getAnchor(category)}>
202
+ <div>
203
+ <img
204
+ className="pricing-simulator__prod-img"
205
+ src={PricingData[category].image}
206
+ alt={category}
207
+ />
208
+ </div>
209
+ <div className="pricing-simulator__prod-info">
210
+ <h2 className="pricing-simulator__prod-name">{category}</h2>
211
+ <p className="pricing-simulator__prod-desc">
212
+ {PricingData[category].description}
213
+ </p>
181
214
  </div>
182
- {Object.keys(PricingData[category].pricings).map((pricingKey) => {
183
- const productPricing = PricingData[category].pricings[pricingKey];
184
- return (
185
- <PricingSlider
186
- id={this.getAnchor(`${category}-${pricingKey}`)}
187
- productPricing={productPricing}
188
- name={pricingKey}
189
- key={`pricing_${pricingKey.replace(' ', '')}`}
190
- publicMode={publicMode}
191
- currency={currency}
192
- values={sliders[category][pricingKey]}
193
- onChange={this.onChange(category, pricingKey)}
194
- />
195
- );
196
- })}
215
+ <span className="pricing-simulator__prod-price-label">{tr('Monthly price')}</span>
197
216
  </div>
198
- ))}
199
- </div>
200
- <div className="pricing-simulator__wrapper__pricebox">
201
- <div className="pricing-total desktop">
202
- <div className="pricing-total__label">Monthly price</div>
203
- <div className="pricing-total__amount">{totalDisplayed}</div>
204
- {this.getAmountByProducts()}
217
+ {Object.keys(PricingData[category].pricings).map((pricingKey) => {
218
+ const productPricing = PricingData[category].pricings[pricingKey];
219
+ return (
220
+ <PricingSlider
221
+ id={this.getAnchor(`${category}-${pricingKey}`)}
222
+ productPricing={productPricing}
223
+ name={pricingKey}
224
+ key={`pricing_${pricingKey.replace(' ', '')}`}
225
+ publicMode={publicMode}
226
+ currency={currency}
227
+ values={sliders[category][pricingKey]}
228
+ onChange={this.onChange(category, pricingKey)}
229
+ />
230
+ );
231
+ })}
232
+ </div>
233
+ ))}
234
+ </div>
235
+ <div className="pricing-simulator__wrapper__pricebox">
236
+ <div className="pricing-total desktop">
237
+ <div className="pricing-total__label">{tr('Monthly price')}</div>
238
+ <div className="pricing-total__amount">
239
+ {totalDisplayed}
240
+ {contactSale && <span className="pricing-total__amount__asterisk">*</span>}
205
241
  </div>
242
+ {contactSale && (
243
+ <div className="pricing-total__amount__info">
244
+ {tr('* Some products require contact sales for pricing')}
245
+ </div>
246
+ )}
247
+ {this.getAmountByProducts()}
206
248
  </div>
207
249
  </div>
208
250
  </div>
209
- </div>
251
+ </>
210
252
  );
211
253
  }
212
254
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import PricingSimulator from '@/components/PricingSlider/PricingSimulator';
2
+ import PricingSimulator from './PricingSimulator';
3
3
 
4
4
  const Story = {
5
5
  title: 'base/PricingSimulator',
@@ -2,11 +2,10 @@ import React, { Component } from 'react';
2
2
  import ReactSlider from 'react-slider';
3
3
  import PropTypes from 'prop-types';
4
4
  import numeral from 'numeral';
5
- import Input from '@/components/Input/Input';
6
- import Button from '@/components/Button/Button';
7
- // eslint-disable-next-line import/no-named-as-default
8
- import tr from '@/components/utils/locale';
9
- import Icon from '@/components/Icon/Icon';
5
+ import Input from '../Input/Input';
6
+ import Button from '../Button/Button';
7
+ import { tr } from '../utils/locale';
8
+ import Icon from '../Icon/Icon';
10
9
 
11
10
  export default class PricingSlider extends Component {
12
11
  constructor(props) {
@@ -83,7 +82,7 @@ export default class PricingSlider extends Component {
83
82
  contactSalesButton = () => (
84
83
  <span className="button-contact">
85
84
  <a href="/contact" data-gaid="entreprise-plan-click" className="btn btn--small btn--primary">
86
- <span className="btn__label">Contact Sales</span>
85
+ <span className="btn__label">{tr('Contact Sales')}</span>
87
86
  </a>
88
87
  </span>
89
88
  );
@@ -170,7 +169,7 @@ export default class PricingSlider extends Component {
170
169
  return (
171
170
  <tr>
172
171
  <td>{`${numeral(lower).format('0.[0]a')}+`}</td>
173
- <td>Contact us for discount</td>
172
+ <td>{tr('Contact us for discount')}</td>
174
173
  </tr>
175
174
  );
176
175
  }
@@ -206,7 +205,7 @@ export default class PricingSlider extends Component {
206
205
  } else if (amount > 0) {
207
206
  displayedAmount = <span className="amount">{this.displayAmount(parseInt(amount, 10))}</span>;
208
207
  } else if (displayedPricing.length === 0) {
209
- displayedAmount = <span className="free-label">FREE</span>;
208
+ displayedAmount = <span className="free-label">{tr('FREE')}</span>;
210
209
  }
211
210
  return (
212
211
  <div className="pricing-slider__wrapper" id={id}>
@@ -267,12 +266,12 @@ export default class PricingSlider extends Component {
267
266
  )}
268
267
  <div className="pricing-slider__documentation">
269
268
  <span>
270
- Read more about <strong>{name}</strong>
269
+ {tr('Read more about')} <strong>{name}</strong>
271
270
  </span>
272
271
  <span>-</span>
273
272
  <a href={`${productPricing.docLink}`} target="_blank" rel="noreferrer">
274
273
  <Icon icon="documentation" />
275
- <span>Documentation</span>
274
+ <span>{tr('Documentation')}</span>
276
275
  </a>
277
276
  </div>
278
277
  </div>
@@ -1,7 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
- import '@/components/ProgressBar/ProgressBar.styl';
4
+ import './ProgressBar.styl';
5
5
 
6
6
  class ProgressBar extends Component {
7
7
  getColor = (percentage) => {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import ProgressBar from '@/components/ProgressBar/ProgressBar';
2
+ import ProgressBar from './ProgressBar';
3
3
 
4
4
  const Story = {
5
5
  title: 'base/ProgressBar',
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { render, screen } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom/extend-expect';
4
- import ProgressBar from '@/components/ProgressBar/ProgressBar';
4
+ import ProgressBar from './ProgressBar';
5
5
 
6
6
  describe('<ProgressBar />', () => {
7
7
  it.each([['description'], ['leftText'], ['rightText']])('renders %s if provided via props', (prop) => {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import ScrollBar from '@/components/ScrollBar/ScrollBar';
2
+ import ScrollBar from './ScrollBar';
3
3
 
4
4
  const Story = {
5
5
  title: 'base/ScrollBar',
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom/extend-expect';
4
4
 
5
- import ScrollBar from '@/components/ScrollBar/ScrollBar';
5
+ import ScrollBar from './ScrollBar';
6
6
 
7
7
  it('renders a ScrollBar component ', () => {
8
8
  const { getByTestId } = render(<ScrollBar>content</ScrollBar>);
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import Select from '@/components/Select/Select';
3
- import AsyncSelect from '@/components/Select/AsyncSelect';
4
- import CountrySelect from '@/components/Select/CountrySelect';
5
- import LanguageSelect from '@/components/Select/LanguageSelect';
2
+ import Select from './Select';
3
+ import AsyncSelect from './AsyncSelect';
4
+ import CountrySelect from './CountrySelect';
5
+ import LanguageSelect from './LanguageSelect';
6
6
 
7
7
  const Story = {
8
8
  title: 'base/Select',
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom/extend-expect';
4
4
 
5
- import TagSelect from '@/components/Select/TagSelect';
5
+ import TagSelect from './TagSelect';
6
6
 
7
7
  it('renders a ConfirmationPopover', () => {
8
8
  const { container } = render(<TagSelect />);
@@ -1,7 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  import cl from 'classnames';
3
3
  import PropTypes from 'prop-types';
4
- import Button from '@/components/Button/Button';
4
+ import Button from '../Button/Button';
5
5
 
6
6
  export default class ServiceMessage extends Component {
7
7
  constructor(props) {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import ServiceMessage from '@/components/ServiceMessage/ServiceMessage';
3
- import Button from '@/components/Button/Button';
2
+ import ServiceMessage from './ServiceMessage';
3
+ import Button from '../Button/Button';
4
4
 
5
5
  const Story = {
6
6
  title: 'base/ServiceMessage',
@@ -1,8 +1,8 @@
1
1
  import React, { Component } from 'react';
2
2
  import cl from 'classnames';
3
3
  import PropTypes from 'prop-types';
4
- import Animate, { AnimatePresence } from '@/components/Animate/Animate';
5
- import Button from '@/components/Button/Button';
4
+ import Animate, { AnimatePresence } from '../Animate/Animate';
5
+ import Button from '../Button/Button';
6
6
 
7
7
  const SnackBarContext = React.createContext();
8
8
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import SnackBar from '@/components/SnackBar/SnackBar';
3
- import withSnackBar from '@/components/SnackBar/withSnackBar';
4
- import Button from '@/components/Button/Button';
2
+ import SnackBar from './SnackBar';
3
+ import withSnackBar from './withSnackBar';
4
+ import Button from '../Button/Button';
5
5
 
6
6
  class SomeChildComponent extends React.Component {
7
7
  render() {
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import { render, screen, waitFor } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom/extend-expect';
4
4
  import fireEvent from '@testing-library/user-event';
5
- import SnackBar from '@/components/SnackBar/SnackBar';
6
- import withSnackBar from '@/components/SnackBar/withSnackBar';
7
- import Button from '@/components/Button/Button';
5
+ import SnackBar from './SnackBar';
6
+ import withSnackBar from './withSnackBar';
7
+ import Button from '../Button/Button';
8
8
 
9
9
  class SomeChildComponent extends React.Component {
10
10
  render() {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { SnackBarContext } from '@/components/SnackBar/SnackBar';
3
+ import { SnackBarContext } from './SnackBar';
4
4
 
5
5
  export default function withSnackbar(WrappedComponent) {
6
6
  class WithSnackBar extends React.Component {
@@ -1,8 +1,8 @@
1
1
  import React, { Component } from 'react';
2
2
  import cl from 'classnames';
3
3
  import PropTypes from 'prop-types';
4
- import { tr } from '@/components/utils/locale';
5
- import Icon from '@/components/Icon/Icon';
4
+ import { tr } from '../utils/locale';
5
+ import Icon from '../Icon/Icon';
6
6
 
7
7
  export default class Stepper extends Component {
8
8
  render() {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import Stepper from '@/components/Stepper/Stepper';
2
+ import Stepper from './Stepper';
3
3
 
4
4
  const Story = {
5
5
  title: 'base/Stepper',
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import Switch from '@/components/Switch/Switch';
2
+ import Switch from './Switch';
3
3
 
4
4
  const Story = {
5
5
  title: 'base/Switch',
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { fireEvent, render, screen } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom/extend-expect';
4
4
 
5
- import Switch from '@/components/Switch/Switch';
5
+ import Switch from './Switch';
6
6
 
7
7
  it('renders a switch component ', () => {
8
8
  const { container } = render(<Switch checked onChange={() => {}} id="myswitch" />);
@@ -1,7 +1,7 @@
1
1
  import React, { Component, Children } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import cl from 'classnames';
4
- import Button from '@/components/Button/Button';
4
+ import Button from '../Button/Button';
5
5
 
6
6
  // eslint-disable-next-line react/prop-types
7
7
  function VisuallyHidden({ active, children }) {
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  import React from "react";
3
- import Tab from "@/components/Tab/Tab";
3
+ import Tab from "../Tab/Tab";
4
4
 
5
5
  const Story = {
6
6
  title: "base/Tab",
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import Tooltip from '@/components/Tooltip/Tooltip';
2
+ import Tooltip from './Tooltip';
3
3
 
4
4
  const Story = {
5
5
  title: 'base/Tooltip',
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom/extend-expect';
4
4
 
5
- import Tooltip from '@/components/Tooltip/Tooltip';
5
+ import Tooltip from './Tooltip';
6
6
 
7
7
  it('renders a Tooltip', () => {
8
8
  const { getByTestId } = render(<Tooltip>my tip</Tooltip>);
@@ -3,15 +3,15 @@ import React, { Component } from 'react';
3
3
  import cl from 'classnames';
4
4
  import PropTypes from 'prop-types';
5
5
 
6
- import localitiesImgSq from '@/images/products/product-localities-sq.png';
7
- import localitiesUkImgSq from '@/images/products/product-localities-uk-sq.png';
8
- import geolocationImgSq from '@/images/products/product-geolocation-sq.png';
9
- import storesImgSq from '@/images/products/product-stores-sq.png';
10
- import distanceImgSq from '@/images/products/product-distance-sq.png';
11
- import addressImgSq from '@/images/products/product-address-sq.png';
12
- import mapImgSq from '@/images/products/product-map-sq.png';
13
- import trafficImgSq from '@/images/products/product-traffic-sq.png';
14
- import indoorImgSq from '@/images/products/product-indoor-sq.png';
6
+ import localitiesImgSq from '../../images/products/product-localities-sq.png';
7
+ import localitiesUkImgSq from '../../images/products/product-localities-uk-sq.png';
8
+ import geolocationImgSq from '../../images/products/product-geolocation-sq.png';
9
+ import storesImgSq from '../../images/products/product-stores-sq.png';
10
+ import distanceImgSq from '../../images/products/product-distance-sq.png';
11
+ import addressImgSq from '../../images/products/product-address-sq.png';
12
+ import mapImgSq from '../../images/products/product-map-sq.png';
13
+ import trafficImgSq from '../../images/products/product-traffic-sq.png';
14
+ import indoorImgSq from '../../images/products/product-indoor-sq.png';
15
15
 
16
16
  const productImg = {
17
17
  LOCALITIES: localitiesImgSq,
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { tr } from '@/components/utils/locale';
3
- import Icon from '@/components/Icon/Icon';
4
- import Button from '@/components/Button/Button';
5
- import UseCase from '@/components/UseCase/UseCase';
2
+ import { tr } from '../utils/locale';
3
+ import Icon from '../Icon/Icon';
4
+ import Button from '../Button/Button';
5
+ import UseCase from './UseCase';
6
6
 
7
7
  const Story = {
8
8
  title: 'base/UseCase',