@digitransit-component/digitransit-component-favourite-bar 6.0.4 → 7.0.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.
package/lib/index.js CHANGED
@@ -1,14 +1,12 @@
1
1
  import PropTypes from 'prop-types';
2
- import React from 'react';
3
- import { withTranslation, useTranslation, I18nextProvider } from 'react-i18next';
2
+ import React, { useState, useRef, useEffect } from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
4
  import cx from 'classnames';
5
- import differenceWith from 'lodash/differenceWith';
6
- import isEqual from 'lodash/isEqual';
7
- import isEmpty from 'lodash/isEmpty';
8
5
  import Shimmer from '@hsl-fi/shimmer';
9
6
  import SuggestionItem from '@digitransit-component/digitransit-component-suggestion-item';
10
7
  import Icon, { defaultColors } from '@digitransit-component/digitransit-component-icon';
11
8
  import 'lodash/uniqWith';
9
+ import 'lodash/isEqual';
12
10
  import memoize from 'lodash/memoize';
13
11
  import escapeRegExp from 'lodash/escapeRegExp';
14
12
  import cloneDeep from 'lodash/cloneDeep';
@@ -247,6 +245,23 @@ i18n.init();
247
245
 
248
246
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
249
247
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
248
+ const DEFAULT_FONT_WEIGHTS = {
249
+ medium: 500
250
+ };
251
+ const TOGGLE_DEBOUNCE_MS = 200;
252
+ const LIST_BOTTOM_MARGIN = 16;
253
+ const MIN_LIST_HEIGHT = 120;
254
+ const FAVOURITE_ICON_ID_TO_NAME = {
255
+ 'icon-icon_place': 'place',
256
+ 'icon-icon_home': 'home',
257
+ 'icon-icon_work': 'work',
258
+ 'icon-icon_sport': 'sport',
259
+ 'icon-icon_school': 'school',
260
+ 'icon-icon_shopping': 'shopping',
261
+ // Map two buggy ids temporarily. This code can be removed at some point.
262
+ icon_home: 'home',
263
+ icon_work: 'work'
264
+ };
250
265
  const isKeyboardSelectionEvent = event => {
251
266
  const space = [13, ' ', 'Spacebar'];
252
267
  const enter = [32, 'Enter'];
@@ -273,7 +288,9 @@ const FavouriteLocation = ({
273
288
  color,
274
289
  lang
275
290
  }) => {
276
- const [t] = useTranslation();
291
+ const [t] = useTranslation('translation', {
292
+ i18n
293
+ });
277
294
  const ariaLabel = label === '' ? text : `${text} ${label} ${t('add-destination', {
278
295
  lng: lang
279
296
  })}`;
@@ -316,242 +333,215 @@ process.env.NODE_ENV !== "production" ? FavouriteLocation.propTypes = {
316
333
  * <FavouriteBar
317
334
  * favourites={favourites}
318
335
  * onClickFavourite={onClickFavourite}
319
- * onAddPlace={this.addPlace}
320
- * onAddHome={this.addHome}
321
- * onAddWork={this.addWork}
322
- * lang={this.props.lang}
323
- * isLoading={this.props.isLoading}
336
+ * onAddPlace={onAddPlace}
337
+ * onEdit={onEdit}
338
+ * onAddHome={onAddHome}
339
+ * onAddWork={onAddWork}
340
+ * lang={lang}
341
+ * isLoading={isLoading}
324
342
  * />
325
343
  */
326
- class FavouriteBar extends React.Component {
327
- constructor(props) {
328
- super(props);
329
- _defineProperty(this, "toggleList", () => {
330
- const eventDiff = new Date().getTime() - this.state.timestamp;
331
- if (eventDiff > 200) {
332
- this.setState(prevState => ({
333
- listOpen: !prevState.listOpen,
334
- timestamp: new Date().getTime()
335
- }), () => {
336
- if (this.state.listOpen) {
337
- this.firstItemRef.current?.focus();
338
- } else {
339
- this.expandListRef.current?.focus();
340
- }
341
- });
344
+ function FavouriteBar({
345
+ favourites,
346
+ onClickFavourite,
347
+ onAddPlace,
348
+ onEdit,
349
+ onAddHome,
350
+ onAddWork,
351
+ lang = 'fi',
352
+ isLoading = false,
353
+ colors = defaultColors,
354
+ fontWeights = DEFAULT_FONT_WEIGHTS
355
+ }) {
356
+ const [t] = useTranslation('translation', {
357
+ i18n
358
+ });
359
+ const [listOpen, setListOpen] = useState(false);
360
+ const [listMaxHeight, setListMaxHeight] = useState(null);
361
+ const expandListRef = useRef(null);
362
+ const suggestionListRef = useRef(null);
363
+ const firstItemRef = useRef(null);
364
+ const lastToggleRef = useRef(0);
365
+ const focusAfterToggleRef = useRef(false);
366
+ const firstFavourite = favourites[0] || null;
367
+ const secondFavourite = favourites[1] || null;
368
+ const listFavourites = favourites.slice(2);
369
+ const translate = id => t(id, {
370
+ lng: lang
371
+ });
372
+ useEffect(() => {
373
+ const handleClickOutside = event => {
374
+ if (suggestionListRef.current && expandListRef.current && !suggestionListRef.current.contains(event.target) && !expandListRef.current.contains(event.target)) {
375
+ setListOpen(false);
342
376
  }
343
- });
344
- _defineProperty(this, "translate", id => {
345
- return this.props.t(id, {
346
- lng: this.props.lang
347
- });
348
- });
349
- _defineProperty(this, "handleClickOutside", event => {
350
- if (this.suggestionListRef.current && this.expandListRef.current && !this.suggestionListRef.current.contains(event.target) && !this.expandListRef.current.contains(event.target)) {
351
- this.setState({
352
- listOpen: false
353
- });
377
+ };
378
+ document.addEventListener('mousedown', handleClickOutside);
379
+ return () => document.removeEventListener('mousedown', handleClickOutside);
380
+ }, []);
381
+
382
+ // Let the list grow down to the bottom edge of the viewport
383
+ useEffect(() => {
384
+ if (!listOpen) {
385
+ return undefined;
386
+ }
387
+ const updateListMaxHeight = () => {
388
+ const list = suggestionListRef.current;
389
+ if (list) {
390
+ const {
391
+ top
392
+ } = list.getBoundingClientRect();
393
+ setListMaxHeight(Math.max(window.innerHeight - top - LIST_BOTTOM_MARGIN, MIN_LIST_HEIGHT));
354
394
  }
355
- });
356
- _defineProperty(this, "suggestionSelected", index => {
357
- const {
358
- favourites
359
- } = this.state;
360
- if (index < favourites.length) {
361
- this.props.onClickFavourite(favourites[index]);
362
- } else if (index === favourites.length) {
363
- this.props.onAddPlace();
364
- } else if (index === favourites.length + 1) {
365
- this.props.onEdit();
395
+ };
396
+ updateListMaxHeight();
397
+ window.addEventListener('resize', updateListMaxHeight);
398
+ return () => window.removeEventListener('resize', updateListMaxHeight);
399
+ }, [listOpen]);
400
+
401
+ // Move focus only after a toggle, not when the list is closed by other means
402
+ useEffect(() => {
403
+ if (focusAfterToggleRef.current) {
404
+ focusAfterToggleRef.current = false;
405
+ if (listOpen) {
406
+ firstItemRef.current?.focus();
407
+ } else {
408
+ expandListRef.current?.focus();
366
409
  }
367
- this.toggleList();
368
- });
369
- _defineProperty(this, "handleKeyDown", (event, index) => {
370
- const {
371
- listOpen,
372
- favourites
373
- } = this.state;
374
- const key = event && (event.key || event.which || event.keyCode) || '';
375
- if (isKeyboardSelectionEvent(event)) {
376
- if (!listOpen) {
377
- this.toggleList();
378
- } else {
379
- this.suggestionSelected(index);
380
- }
381
- } else if (key === 'Escape' || key === 27) {
382
- if (listOpen) {
383
- this.toggleList();
384
- }
385
- } else if (key === 'Tab' && !event.shiftKey && index === favourites.length + this.getCustomSuggestions().length - 1) {
386
- this.setState({
387
- listOpen: false
388
- });
410
+ }
411
+ }, [listOpen]);
412
+ const toggleList = () => {
413
+ const now = Date.now();
414
+ if (now - lastToggleRef.current > TOGGLE_DEBOUNCE_MS) {
415
+ lastToggleRef.current = now;
416
+ focusAfterToggleRef.current = true;
417
+ setListOpen(open => !open);
418
+ }
419
+ };
420
+ const getCustomSuggestions = () => {
421
+ const customSuggestions = [{
422
+ name: translate('add-place'),
423
+ selectedIconId: 'favourite'
424
+ }];
425
+ if (favourites.length === 0) {
426
+ return customSuggestions;
427
+ }
428
+ return [...customSuggestions, {
429
+ name: translate('edit'),
430
+ selectedIconId: 'edit'
431
+ }];
432
+ };
433
+ const suggestionSelected = index => {
434
+ if (index < listFavourites.length) {
435
+ onClickFavourite(listFavourites[index]);
436
+ } else if (index === listFavourites.length) {
437
+ onAddPlace();
438
+ } else if (index === listFavourites.length + 1) {
439
+ onEdit();
440
+ }
441
+ toggleList();
442
+ };
443
+ const handleKeyDown = (event, index) => {
444
+ const key = event && (event.key || event.which || event.keyCode) || '';
445
+ if (isKeyboardSelectionEvent(event)) {
446
+ if (!listOpen) {
447
+ toggleList();
448
+ } else {
449
+ suggestionSelected(index);
389
450
  }
390
- });
391
- _defineProperty(this, "renderSuggestion", (item, index, ariaLabelSuffix = '') => {
392
- const id = `favourite-suggestion-list--item-${index}`;
393
- return /*#__PURE__*/React.createElement("li", {
394
- key: `favourite-suggestion-item-${index}`
395
- }, /*#__PURE__*/React.createElement("div", {
396
- role: "button",
397
- type: "button",
398
- tabIndex: "0",
399
- id: id,
400
- className: cx(styles['favourite-suggestion-item']),
401
- onClick: () => this.suggestionSelected(index),
402
- onKeyDown: e => this.handleKeyDown(e, index),
403
- ref: index === 0 ? this.firstItemRef : ''
404
- // eslint-disable-next-line jsx-a11y/no-autofocus
405
- ,
406
- autoFocus: index === 0,
407
- "aria-label": `${item?.name || ''} ${item?.address || ''} ${ariaLabelSuffix}`
408
- }, /*#__PURE__*/React.createElement(SuggestionItem, {
409
- item: item,
410
- colors: this.props.colors,
411
- fontWeights: this.props.fontWeights
412
- })));
413
- });
414
- _defineProperty(this, "getCustomSuggestions", () => {
415
- const customSuggestions = [{
416
- name: this.translate('add-place'),
417
- selectedIconId: 'favourite'
418
- }];
419
- if (this.props.favourites.length === 0) {
420
- return customSuggestions;
451
+ } else if (key === 'Escape' || key === 27) {
452
+ if (listOpen) {
453
+ toggleList();
421
454
  }
422
- return [...customSuggestions, {
423
- name: this.translate('edit'),
424
- selectedIconId: 'edit'
425
- }];
426
- });
427
- this.state = {
428
- listOpen: false,
429
- firstFavourite: props.favourites[0] || null,
430
- secondFavourite: props.favourites[1] || null,
431
- favourites: props.favourites.slice(2, props.favourites.length),
432
- timestamp: 0
433
- };
434
- this.expandListRef = /*#__PURE__*/React.createRef();
435
- this.suggestionListRef = /*#__PURE__*/React.createRef();
436
- this.firstItemRef = /*#__PURE__*/React.createRef();
437
- }
438
- componentDidMount() {
439
- document.addEventListener('mousedown', this.handleClickOutside);
440
- }
441
- static getDerivedStateFromProps(nextProps, prevState) {
442
- const {
443
- favourites
444
- } = prevState;
445
- const nextFavourites = nextProps.favourites;
446
- if (!isEmpty(differenceWith(nextFavourites, favourites, isEqual)) || !isEmpty(differenceWith(favourites, nextFavourites, isEqual)) || !isEqual(nextFavourites, favourites) || isEmpty(nextFavourites)) {
447
- return {
448
- firstFavourite: nextFavourites[0] || null,
449
- secondFavourite: nextFavourites[1] || null,
450
- favourites: nextFavourites.slice(2, nextFavourites.length)
451
- };
455
+ } else if (key === 'Tab' && !event.shiftKey && index === listFavourites.length + getCustomSuggestions().length - 1) {
456
+ setListOpen(false);
452
457
  }
453
- return null;
454
- }
455
- componentWillUnmount() {
456
- document.removeEventListener('mousedown', this.handleClickOutside);
457
- }
458
- render() {
459
- const {
460
- onClickFavourite,
461
- isLoading,
462
- fontWeights
463
- } = this.props;
464
- const {
465
- primary
466
- } = this.props.colors;
467
- const {
468
- listOpen,
469
- favourites,
470
- firstFavourite,
471
- secondFavourite
472
- } = this.state;
473
- const expandIcon = this.props.favourites.length === 0 ? 'plus' : 'arrow';
474
- const [name1, address1] = formatFavourite(firstFavourite);
475
- const [name2, address2] = formatFavourite(secondFavourite);
476
- return /*#__PURE__*/React.createElement("div", {
477
- style: {
478
- '--font-weight-medium': fontWeights.medium
479
- }
458
+ };
459
+ const renderSuggestion = (item, index, ariaLabelSuffix = '') => {
460
+ const id = `favourite-suggestion-list--item-${index}`;
461
+ return /*#__PURE__*/React.createElement("li", {
462
+ key: `favourite-suggestion-item-${index}`
480
463
  }, /*#__PURE__*/React.createElement("div", {
481
- className: styles['favourite-container']
482
- }, /*#__PURE__*/React.createElement(FavouriteLocation, {
483
- text: name1 || this.translate('add-home'),
484
- label: address1 || '',
485
- clickItem: () => firstFavourite ? onClickFavourite(firstFavourite) : this.props.onAddHome(),
486
- iconId: firstFavourite && firstFavourite.selectedIconId ? FavouriteBar.FavouriteIconIdToNameMap[firstFavourite.selectedIconId] : 'home',
487
- isLoading: isLoading,
488
- color: primary,
489
- lang: this.props.lang
490
- }), /*#__PURE__*/React.createElement(FavouriteLocation, {
491
- text: name2 || this.translate('add-work'),
492
- label: address2 || '',
493
- clickItem: () => secondFavourite ? onClickFavourite(secondFavourite) : this.props.onAddWork(),
494
- iconId: secondFavourite && secondFavourite.selectedIconId ? FavouriteBar.FavouriteIconIdToNameMap[secondFavourite.selectedIconId] : 'work',
495
- isLoading: isLoading,
496
- color: primary,
497
- lang: this.props.lang
498
- }), /*#__PURE__*/React.createElement("button", {
464
+ role: "button",
499
465
  type: "button",
500
- className: cx(styles.expandButton, styles[expandIcon], listOpen && styles.rotate),
501
- ref: this.expandListRef,
502
- id: "favourite-expand-button",
503
- onKeyDown: e => this.handleKeyDown(e),
504
- onClick: () => this.toggleList(),
505
- "aria-expanded": this.state.listOpen,
506
- "aria-label": this.translate('open-favourites')
507
- }, /*#__PURE__*/React.createElement(Shimmer, {
508
- active: isLoading
509
- }, /*#__PURE__*/React.createElement(Icon, {
510
- img: expandIcon,
511
- color: primary
512
- })))), /*#__PURE__*/React.createElement("div", {
513
- className: styles['favourite-suggestion-container']
514
- }, listOpen && /*#__PURE__*/React.createElement("ul", {
515
- className: styles['favourite-suggestion-list'],
516
- id: "favourite-suggestion-list",
517
- ref: this.suggestionListRef,
518
- "aria-label": this.translate('favourites-list')
519
- }, favourites.map((item, index) => {
520
- const favouriteLabel = formatFavouritePlaceLabel(item.name, item.address);
521
- const address = favouriteLabel[1];
522
- return this.renderSuggestion(_objectSpread(_objectSpread({}, item), {}, {
523
- address
524
- }), index, `, ${this.translate('add-destination')}`);
525
- }), favourites.length > 0 && /*#__PURE__*/React.createElement("div", {
526
- "aria-hidden": true,
527
- className: styles.divider
528
- }), this.getCustomSuggestions().map((item, index) => this.renderSuggestion(item, favourites.length + index, undefined)))));
529
- }
466
+ tabIndex: "0",
467
+ id: id,
468
+ className: cx(styles['favourite-suggestion-item']),
469
+ onClick: () => suggestionSelected(index),
470
+ onKeyDown: e => handleKeyDown(e, index),
471
+ ref: index === 0 ? firstItemRef : undefined
472
+ // eslint-disable-next-line jsx-a11y/no-autofocus
473
+ ,
474
+ autoFocus: index === 0,
475
+ "aria-label": `${item?.name || ''} ${item?.address || ''} ${ariaLabelSuffix}`
476
+ }, /*#__PURE__*/React.createElement(SuggestionItem, {
477
+ item: item,
478
+ colors: colors,
479
+ fontWeights: fontWeights
480
+ })));
481
+ };
482
+ const {
483
+ primary
484
+ } = colors;
485
+ const expandIcon = favourites.length === 0 ? 'plus' : 'arrow';
486
+ const [name1, address1] = formatFavourite(firstFavourite);
487
+ const [name2, address2] = formatFavourite(secondFavourite);
488
+ return /*#__PURE__*/React.createElement("div", {
489
+ style: {
490
+ '--font-weight-medium': fontWeights.medium
491
+ }
492
+ }, /*#__PURE__*/React.createElement("div", {
493
+ className: styles['favourite-container']
494
+ }, /*#__PURE__*/React.createElement(FavouriteLocation, {
495
+ text: name1 || translate('add-home'),
496
+ label: address1 || '',
497
+ clickItem: () => firstFavourite ? onClickFavourite(firstFavourite) : onAddHome(),
498
+ iconId: firstFavourite && firstFavourite.selectedIconId ? FAVOURITE_ICON_ID_TO_NAME[firstFavourite.selectedIconId] : 'home',
499
+ isLoading: isLoading,
500
+ color: primary,
501
+ lang: lang
502
+ }), /*#__PURE__*/React.createElement(FavouriteLocation, {
503
+ text: name2 || translate('add-work'),
504
+ label: address2 || '',
505
+ clickItem: () => secondFavourite ? onClickFavourite(secondFavourite) : onAddWork(),
506
+ iconId: secondFavourite && secondFavourite.selectedIconId ? FAVOURITE_ICON_ID_TO_NAME[secondFavourite.selectedIconId] : 'work',
507
+ isLoading: isLoading,
508
+ color: primary,
509
+ lang: lang
510
+ }), /*#__PURE__*/React.createElement("button", {
511
+ type: "button",
512
+ className: cx(styles.expandButton, styles[expandIcon], listOpen && styles.rotate),
513
+ ref: expandListRef,
514
+ id: "favourite-expand-button",
515
+ onKeyDown: e => handleKeyDown(e),
516
+ onClick: toggleList,
517
+ "aria-expanded": listOpen,
518
+ "aria-label": translate('open-favourites')
519
+ }, /*#__PURE__*/React.createElement(Shimmer, {
520
+ active: isLoading
521
+ }, /*#__PURE__*/React.createElement(Icon, {
522
+ img: expandIcon,
523
+ color: primary
524
+ })))), /*#__PURE__*/React.createElement("div", {
525
+ className: styles['favourite-suggestion-container']
526
+ }, listOpen && /*#__PURE__*/React.createElement("ul", {
527
+ className: styles['favourite-suggestion-list'],
528
+ id: "favourite-suggestion-list",
529
+ style: listMaxHeight ? {
530
+ maxHeight: listMaxHeight
531
+ } : undefined,
532
+ ref: suggestionListRef,
533
+ "aria-label": translate('favourites-list')
534
+ }, listFavourites.map((item, index) => {
535
+ const favouriteLabel = formatFavouritePlaceLabel(item.name, item.address);
536
+ const address = favouriteLabel[1];
537
+ return renderSuggestion(_objectSpread(_objectSpread({}, item), {}, {
538
+ address
539
+ }), index, `, ${translate('add-destination')}`);
540
+ }), listFavourites.length > 0 && /*#__PURE__*/React.createElement("div", {
541
+ "aria-hidden": true,
542
+ className: styles.divider
543
+ }), getCustomSuggestions().map((item, index) => renderSuggestion(item, listFavourites.length + index, undefined)))));
530
544
  }
531
- _defineProperty(FavouriteBar, "defaultProps", {
532
- onClickFavourite: () => ({}),
533
- onAddPlace: () => ({}),
534
- onEdit: () => ({}),
535
- onAddHome: () => ({}),
536
- onAddWork: () => ({}),
537
- lang: 'fi',
538
- isLoading: false,
539
- colors: defaultColors,
540
- fontWeights: {
541
- medium: 500
542
- }
543
- });
544
- _defineProperty(FavouriteBar, "FavouriteIconIdToNameMap", {
545
- 'icon-icon_place': 'place',
546
- 'icon-icon_home': 'home',
547
- 'icon-icon_work': 'work',
548
- 'icon-icon_sport': 'sport',
549
- 'icon-icon_school': 'school',
550
- 'icon-icon_shopping': 'shopping',
551
- // Map two buggy ids temporarily. This code can be removed at some point.
552
- icon_home: 'home',
553
- icon_work: 'work'
554
- });
555
545
  process.env.NODE_ENV !== "production" ? FavouriteBar.propTypes = {
556
546
  /** Required. Array of favourites, favourite object contains following properties.
557
547
  * @type {Array<object>}
@@ -574,16 +564,16 @@ process.env.NODE_ENV !== "production" ? FavouriteBar.propTypes = {
574
564
  selectedIconId: PropTypes.string,
575
565
  favouriteId: PropTypes.string
576
566
  })).isRequired,
577
- /** Optional. Function for clicking favourites. */
578
- onClickFavourite: PropTypes.func,
579
- /** Optional. Function for selecting "Add place" from suggestions. */
580
- onAddPlace: PropTypes.func,
581
- /** Optional. Function for selected "Edit" from suggestions. */
582
- onEdit: PropTypes.func,
583
- /** Optional. Function for "Add home" button. */
584
- onAddHome: PropTypes.func,
585
- /** Optional. Function for "Add work" button. */
586
- onAddWork: PropTypes.func,
567
+ /** Required. Function for clicking favourites. */
568
+ onClickFavourite: PropTypes.func.isRequired,
569
+ /** Required. Function for selecting "Add place" from suggestions. */
570
+ onAddPlace: PropTypes.func.isRequired,
571
+ /** Required. Function for selected "Edit" from suggestions. */
572
+ onEdit: PropTypes.func.isRequired,
573
+ /** Required. Function for "Add home" button. */
574
+ onAddHome: PropTypes.func.isRequired,
575
+ /** Required. Function for "Add work" button. */
576
+ onAddWork: PropTypes.func.isRequired,
587
577
  /** Optional. Language, fi, en or sv. */
588
578
  lang: PropTypes.string,
589
579
  /** Optional. Whether to show loading animation, true or false. */
@@ -594,14 +584,8 @@ process.env.NODE_ENV !== "production" ? FavouriteBar.propTypes = {
594
584
  fontWeights: PropTypes.shape({
595
585
  /** Default value is 500. */
596
586
  medium: PropTypes.number
597
- }),
598
- /** Translation function */
599
- t: PropTypes.func.isRequired
587
+ })
600
588
  } : void 0;
601
- const FavouriteBarWithTranslation = withTranslation()(FavouriteBar);
602
- var index = props => /*#__PURE__*/React.createElement(I18nextProvider, {
603
- i18n: i18n
604
- }, /*#__PURE__*/React.createElement(FavouriteBarWithTranslation, props));
605
589
 
606
- export { index as default };
590
+ export { FavouriteBar as default };
607
591
  //# sourceMappingURL=index.js.map