gatsby-matrix-theme 2.0.5 → 2.2.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 (96) hide show
  1. package/.storybook/main.js +1 -0
  2. package/CHANGELOG.md +102 -0
  3. package/jest.config.js +1 -0
  4. package/package.json +2 -2
  5. package/src/components/atoms/cards/article-card/index.js +9 -6
  6. package/src/components/atoms/cards/author-card/index.js +6 -1
  7. package/src/components/atoms/cards/base-card/index.js +1 -1
  8. package/src/components/atoms/cards/game-card/index.js +9 -6
  9. package/src/components/atoms/cards/operator-card/index.js +14 -8
  10. package/src/components/atoms/cards/payment-method-card/index.js +11 -9
  11. package/src/components/atoms/cards/popup-card/index.js +5 -5
  12. package/src/components/atoms/cards/popup-card/popup-card.module.scss +6 -7
  13. package/src/components/atoms/cards/popup-card/popup-card.stories.js +0 -10
  14. package/src/components/atoms/cards/software-provider-card/index.js +10 -9
  15. package/src/components/atoms/link-menu/index.js +1 -1
  16. package/src/components/atoms/modal/modal.module.scss +44 -41
  17. package/src/components/atoms/newsletter/success/index.js +18 -13
  18. package/src/components/atoms/operator-bonuses/index.js +10 -7
  19. package/src/components/atoms/search/autocomplete/article.js +1 -1
  20. package/src/components/atoms/search/autocomplete/game.js +1 -1
  21. package/src/components/atoms/search/autocomplete/operator.js +1 -1
  22. package/src/components/atoms/search/autocomplete/payment_methods.js +1 -1
  23. package/src/components/atoms/search/autocomplete/software_provider.js +1 -1
  24. package/src/components/atoms/table/banking/index.js +24 -20
  25. package/src/components/atoms/table/column/index.js +2 -5
  26. package/src/components/atoms/table/staticColumn/index.js +28 -33
  27. package/src/components/molecules/faq/faq.module.scss +14 -10
  28. package/src/components/molecules/faq/index.js +1 -1
  29. package/src/components/molecules/game-iframe/index.js +6 -1
  30. package/src/components/molecules/game-score-gauge/game-score-gauge.stories.js +7 -12
  31. package/src/components/molecules/game-score-gauge/index.js +4 -2
  32. package/src/components/molecules/info-grid/index.js +1 -0
  33. package/src/components/molecules/newsletter/index.js +1 -0
  34. package/src/components/molecules/newsletter/newsletter.stories.js +106 -112
  35. package/src/components/molecules/newsletter-optin/index.js +7 -7
  36. package/src/components/molecules/newsletter-optin/newsletter-optin.stories.js +79 -80
  37. package/src/components/molecules/operator-summary/index.js +8 -2
  38. package/src/components/molecules/small-welcome-bonus/index.js +19 -6
  39. package/src/components/molecules/small-welcome-bonus/small-welcome-bonus.stories.js +49 -53
  40. package/src/components/molecules/toplist/row/variant-one.js +26 -10
  41. package/src/components/organisms/footer-navigation/index.js +9 -1
  42. package/src/components/organisms/popup/index.js +9 -6
  43. package/src/components/organisms/popup/popup.stories.js +0 -10
  44. package/src/components/organisms/toplist/comparison-table/index.js +11 -13
  45. package/src/components/organisms/toplist/index.js +2 -4
  46. package/src/components/organisms/toplist/list/index.js +11 -7
  47. package/src/components/organisms/toplist/list/list.module.scss +7 -0
  48. package/src/gatsby-core-theme/components/atoms/bonus/bonus.module.scss +15 -0
  49. package/src/gatsby-core-theme/components/atoms/bonus/index.js +4 -3
  50. package/src/gatsby-core-theme/components/atoms/module-title/index.js +7 -9
  51. package/src/gatsby-core-theme/components/atoms/not-found/index.js +24 -0
  52. package/src/gatsby-core-theme/components/atoms/not-found/not-found.module.scss +17 -0
  53. package/src/gatsby-core-theme/components/atoms/spotlights/index.js +25 -8
  54. package/src/gatsby-core-theme/components/molecules/content/content.module.scss +73 -16
  55. package/src/gatsby-core-theme/components/molecules/content/index.js +2 -0
  56. package/src/gatsby-core-theme/components/molecules/footer/index.js +5 -1
  57. package/src/gatsby-core-theme/components/molecules/main/index.js +6 -1
  58. package/src/gatsby-core-theme/components/molecules/module/index.js +1 -3
  59. package/src/gatsby-core-theme/components/molecules/search/index.js +28 -4
  60. package/src/gatsby-core-theme/components/organisms/anchor/anchor.module.scss +5 -1
  61. package/src/gatsby-core-theme/components/organisms/anchor/index.js +11 -2
  62. package/src/gatsby-core-theme/components/organisms/carousel/index.js +17 -6
  63. package/src/gatsby-core-theme/components/organisms/navigation/index.js +2 -2
  64. package/src/gatsby-core-theme/components/organisms/search/index.js +2 -1
  65. package/src/gatsby-core-theme/components/pages/body/index.js +14 -9
  66. package/src/gatsby-core-theme/components/pages/search/index.js +79 -74
  67. package/src/hooks/tabs/index.js +6 -4
  68. package/src/hooks/tabs/tab/tab-list.js +4 -1
  69. package/src/hooks/tabs/tab/tab.js +37 -28
  70. package/storybook/public/{0.50c23d5b.iframe.bundle.js → 0.a5c4cf9f.iframe.bundle.js} +1 -1
  71. package/storybook/public/{1.eef04bc1.iframe.bundle.js → 1.b2b72c50.iframe.bundle.js} +1 -1
  72. package/storybook/public/{10.454cae2f.iframe.bundle.js → 10.502b5ac2.iframe.bundle.js} +1 -1
  73. package/storybook/public/{11.6ec11208.iframe.bundle.js → 11.30535586.iframe.bundle.js} +1 -1
  74. package/storybook/public/{5.5635a723.iframe.bundle.js → 5.66b5b921.iframe.bundle.js} +3 -3
  75. package/storybook/public/{5.5635a723.iframe.bundle.js.LICENSE.txt → 5.66b5b921.iframe.bundle.js.LICENSE.txt} +0 -0
  76. package/storybook/public/5.66b5b921.iframe.bundle.js.map +1 -0
  77. package/storybook/public/{6.a0f625e4.iframe.bundle.js → 6.89431426.iframe.bundle.js} +1 -1
  78. package/storybook/public/{7.4b9a5033.iframe.bundle.js → 7.a53e817b.iframe.bundle.js} +1 -1
  79. package/storybook/public/8.e043e6dc.iframe.bundle.js +3 -0
  80. package/storybook/public/{8.4148b63e.iframe.bundle.js.LICENSE.txt → 8.e043e6dc.iframe.bundle.js.LICENSE.txt} +0 -0
  81. package/storybook/public/8.e043e6dc.iframe.bundle.js.map +1 -0
  82. package/storybook/public/{9.08fee7fe.iframe.bundle.js → 9.eba0e7c0.iframe.bundle.js} +1 -1
  83. package/storybook/public/iframe.html +1 -1
  84. package/storybook/public/main.c07025f4.iframe.bundle.js +1 -0
  85. package/storybook/public/{runtime~main.d64660ee.iframe.bundle.js → runtime~main.c4f3a4d6.iframe.bundle.js} +1 -1
  86. package/storybook/public/vendors~main.8050786b.iframe.bundle.js +7 -0
  87. package/storybook/public/{vendors~main.aac219e4.iframe.bundle.js.LICENSE.txt → vendors~main.8050786b.iframe.bundle.js.LICENSE.txt} +0 -0
  88. package/storybook/public/vendors~main.8050786b.iframe.bundle.js.map +1 -0
  89. package/src/components/atoms/newsletter/success/success.module.scss +0 -28
  90. package/src/gatsby-core-theme/pages/404/index.js +0 -66
  91. package/storybook/public/5.5635a723.iframe.bundle.js.map +0 -1
  92. package/storybook/public/8.4148b63e.iframe.bundle.js +0 -3
  93. package/storybook/public/8.4148b63e.iframe.bundle.js.map +0 -1
  94. package/storybook/public/main.e82d53bf.iframe.bundle.js +0 -1
  95. package/storybook/public/vendors~main.aac219e4.iframe.bundle.js +0 -7
  96. package/storybook/public/vendors~main.aac219e4.iframe.bundle.js.map +0 -1
@@ -1,10 +1,11 @@
1
1
  /* eslint-disable react/forbid-prop-types */
2
- import React from 'react';
2
+ import React, { useContext } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import Breadcrumbs from 'gatsby-core-theme/src/components/atoms/breadcrumbs';
5
5
  import Search from 'gatsby-core-theme/src/components/molecules/search';
6
6
  import moduleStyles from 'gatsby-core-theme/src/components/molecules/module/module.module.scss';
7
7
  import { translate } from 'gatsby-core-theme/src/helpers/getters';
8
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
8
9
  import CardArticle from '../../../../components/atoms/cards/article-card';
9
10
  import CardGame from '../../../../components/atoms/cards/game-card';
10
11
  import CardOperator from '../../../../components/atoms/cards/operator-card';
@@ -12,85 +13,89 @@ import PaymentMethods from '../../../../components/atoms/cards/payment-method-ca
12
13
  import SoftwareProvider from '../../../../components/atoms/cards/software-provider-card';
13
14
  import styles from './search.module.scss';
14
15
 
15
- const SearchContent = ({ page }) => (
16
- <div className={`${styles.searchPage} ${moduleStyles.module} module`}>
17
- {page.path && <Breadcrumbs page={page} />}
18
- <Search
19
- page={page}
20
- searchIcon="../../../../../../images/search.svg"
21
- pageSearchOptions={{
22
- searchTitle: translate(page?.translations, 'search_results_for', 'Search Results for:'),
23
- useArchive: true,
24
- archiveOptions: {
25
- titles: [
26
- { type: 'operator', title: translate(page?.translations, 'casino', 'Casino') },
27
- { type: 'game', title: translate(page?.translations, 'slots', 'Slots') },
28
- { type: 'article', title: translate(page?.translations, 'news', 'News') },
16
+ const SearchContent = ({ page }) => {
17
+ const { translations } = useContext(Context) || {};
18
+
19
+ return (
20
+ <div className={`${styles.searchPage} ${moduleStyles.module} module`}>
21
+ {page.path && <Breadcrumbs page={page} />}
22
+ <Search
23
+ page={page}
24
+ searchIcon="../../../../../../images/search.svg"
25
+ pageSearchOptions={{
26
+ searchTitle: translate(translations, 'search_results_for', 'Search Results for:'),
27
+ useArchive: true,
28
+ archiveOptions: {
29
+ titles: [
30
+ { type: 'operator', title: translate(translations, 'casino', 'Casino') },
31
+ { type: 'game', title: translate(translations, 'slots', 'Slots') },
32
+ { type: 'article', title: translate(translations, 'news', 'News') },
33
+ {
34
+ type: 'payment_method',
35
+ title: translate(translations, 'payment_method', 'Payment method'),
36
+ },
37
+ {
38
+ type: 'software_provider',
39
+ title: translate(translations, 'software_provider', 'Software Provider'),
40
+ },
41
+ ],
42
+ includeOptions: {
43
+ desktop_num_of_columns: '3',
44
+ mobile_num_of_columns: '1',
45
+ tablet_num_of_columns: '3',
46
+ },
47
+ },
48
+ tabs: true,
49
+ tabsOptions: { showAll: translate(translations, 'all', 'All'), tabsAlign: 'left' },
50
+ sort: [
51
+ {
52
+ name: translate(translations, 'most_relevant', 'Most Relevant'),
53
+ field: 'id',
54
+ type: 'number',
55
+ },
29
56
  {
30
- type: 'payment_method',
31
- title: translate(page?.translations, 'payment_method', 'Payment method'),
57
+ name: translate(translations, 'latest', 'Latest'),
58
+ field: 'created_at',
59
+ type: 'date',
32
60
  },
33
61
  {
34
- type: 'software_provider',
35
- title: translate(page?.translations, 'software_provider', 'Software Provider'),
62
+ name: translate(translations, 'by_title', 'By Title'),
63
+ field: 'title',
64
+ type: 'string',
36
65
  },
37
66
  ],
38
- includeOptions: {
39
- desktop_num_of_columns: '3',
40
- mobile_num_of_columns: '1',
41
- tablet_num_of_columns: '3',
67
+ loadMore: {
68
+ label: translate(translations, 'show_more', 'Show more'),
69
+ limit: 3,
70
+ increment: 6,
71
+ usePrimaryButton: false,
72
+ useInvertColors: true,
42
73
  },
43
- },
44
- tabs: true,
45
- tabsOptions: { showAll: translate(page?.translations, 'all', 'All'), tabsAlign: 'left' },
46
- sort: [
47
- {
48
- name: translate(page?.translations, 'most_relevant', 'Most Relevant'),
49
- field: 'id',
50
- type: 'number',
51
- },
52
- {
53
- name: translate(page?.translations, 'latest', 'Latest'),
54
- field: 'created_at',
55
- type: 'date',
56
- },
57
- {
58
- name: translate(page?.translations, 'by_title', 'By Title'),
59
- field: 'title',
60
- type: 'string',
61
- },
62
- ],
63
- loadMore: {
64
- label: translate(page?.translations, 'show_more', 'Show more'),
65
- limit: 3,
66
- increment: 6,
67
- usePrimaryButton: false,
68
- useInvertColors: true,
69
- },
70
- }}
71
- >
72
- {(item) => (
73
- <>
74
- <div type="operator">
75
- <CardOperator item={item} />
76
- </div>
77
- <div type="game">
78
- <CardGame item={item} />
79
- </div>
80
- <div type="article">
81
- <CardArticle item={item} />
82
- </div>
83
- <div type="payment_method">
84
- <PaymentMethods item={item} />
85
- </div>
86
- <div type="software_provider">
87
- <SoftwareProvider item={item} />
88
- </div>
89
- </>
90
- )}
91
- </Search>
92
- </div>
93
- );
74
+ }}
75
+ >
76
+ {(item) => (
77
+ <>
78
+ <div type="operator">
79
+ <CardOperator item={item} />
80
+ </div>
81
+ <div type="game">
82
+ <CardGame item={item} />
83
+ </div>
84
+ <div type="article">
85
+ <CardArticle item={item} />
86
+ </div>
87
+ <div type="payment_method">
88
+ <PaymentMethods item={item} />
89
+ </div>
90
+ <div type="software_provider">
91
+ <SoftwareProvider item={item} />
92
+ </div>
93
+ </>
94
+ )}
95
+ </Search>
96
+ </div>
97
+ );
98
+ };
94
99
 
95
100
  SearchContent.propTypes = {
96
101
  page: PropTypes.shape({
@@ -1,6 +1,7 @@
1
- import React, { useState } from 'react';
1
+ import React, { useContext, useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { translate } from 'gatsby-core-theme/src/helpers/getters';
4
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
4
5
  import TabList from './tab/tab-list';
5
6
  import styles from './tabs.module.scss';
6
7
 
@@ -14,7 +15,7 @@ const Tabs = ({
14
15
  activeTabClass = '',
15
16
  HeaderComp,
16
17
  headerClass = '',
17
- translations,
18
+ gtmClass = '',
18
19
  }) => {
19
20
  const showAllTabId = `${showAll}_0`;
20
21
  const showTabs = children.length > 1;
@@ -22,6 +23,7 @@ const Tabs = ({
22
23
  showAll ? showAllTabId : `${children[0].props.label}_0`
23
24
  );
24
25
  const CustomTag = `${module?.module_title_tag}`;
26
+ const { translations } = useContext(Context) || {};
25
27
  const monthNames = [
26
28
  'January',
27
29
  'February',
@@ -104,7 +106,7 @@ const Tabs = ({
104
106
  showAll={showAll}
105
107
  alignRight={tabsAlign === 'right'}
106
108
  module={module}
107
- translations={translations}
109
+ gtmClass={gtmClass}
108
110
  />
109
111
  )}
110
112
  {HeaderComp && <div className={styles.headerComp}>{HeaderComp}</div>}
@@ -139,7 +141,7 @@ Tabs.propTypes = {
139
141
  title: PropTypes.string,
140
142
  module: PropTypes.shape({}),
141
143
  siteName: PropTypes.string,
142
- translations: PropTypes.shape({}),
144
+ gtmClass: PropTypes.string,
143
145
  };
144
146
 
145
147
  export default Tabs;
@@ -14,6 +14,7 @@ const TabList = ({
14
14
  activeTabClass = '',
15
15
  showAll,
16
16
  alignRight = false,
17
+ gtmClass = '',
17
18
  }) => {
18
19
  const [tabItems, setTabItems] = useState(items);
19
20
 
@@ -38,7 +39,7 @@ const TabList = ({
38
39
  <div className={`${styles.tabList} ${alignRight && styles.right}`}>
39
40
  <button
40
41
  ref={filterBtn}
41
- className={styles.select}
42
+ className={`${styles.select} ${gtmClass} btn-cta`}
42
43
  type="button"
43
44
  onClick={showDropdown}
44
45
  data-id="select-button"
@@ -59,6 +60,7 @@ const TabList = ({
59
60
  label={label}
60
61
  onClick={onClick}
61
62
  toggleDropdown={showDropdown}
63
+ gtmClass={gtmClass}
62
64
  />
63
65
  );
64
66
  })}
@@ -74,6 +76,7 @@ TabList.propTypes = {
74
76
  activeTab: PropTypes.string,
75
77
  activeTabClass: PropTypes.string,
76
78
  alignRight: PropTypes.bool,
79
+ gtmClass: PropTypes.string,
77
80
  };
78
81
 
79
82
  export default TabList;
@@ -2,39 +2,48 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styles from './tab.module.scss';
4
4
 
5
- const Tab = ({ label, onClick, activeTab, activeTabClass = '', tabId, toggleDropdown }) => {
6
- let className = '';
5
+ const Tab = ({
6
+ label,
7
+ onClick,
8
+ activeTab,
9
+ activeTabClass = '',
10
+ tabId,
11
+ toggleDropdown,
12
+ gtmClass = '',
13
+ }) => {
14
+ let className = '';
7
15
 
8
- if (activeTab === tabId) {
9
- if (activeTabClass !== '') {
10
- className = ` ${styles[activeTabClass]}`;
11
- } else {
12
- className = ` ${styles.active}`;
13
- }
16
+ if (activeTab === tabId) {
17
+ if (activeTabClass !== '') {
18
+ className = ` ${styles[activeTabClass]}`;
19
+ } else {
20
+ className = ` ${styles.active}`;
14
21
  }
22
+ }
15
23
 
16
- return (
17
- <li className={styles.tabListItem}>
18
- <button
19
- className={className}
20
- type="button"
21
- onClick={() => {
22
- onClick(tabId);
23
- toggleDropdown();
24
- }}
25
- >
26
- {label}
27
- </button>
28
- </li>
29
- );
24
+ return (
25
+ <li className={styles.tabListItem}>
26
+ <button
27
+ className={`${className} ${gtmClass} tabs-menu-gtm btn-cta`}
28
+ type="button"
29
+ onClick={() => {
30
+ onClick(tabId);
31
+ toggleDropdown();
32
+ }}
33
+ >
34
+ {label}
35
+ </button>
36
+ </li>
37
+ );
30
38
  };
31
39
  Tab.propTypes = {
32
- onClick: PropTypes.func,
33
- toggleDropdown: PropTypes.func,
34
- activeTab: PropTypes.string,
35
- activeTabClass: PropTypes.string,
36
- tabId: PropTypes.string,
37
- label: PropTypes.string,
40
+ onClick: PropTypes.func,
41
+ toggleDropdown: PropTypes.func,
42
+ activeTab: PropTypes.string,
43
+ activeTabClass: PropTypes.string,
44
+ tabId: PropTypes.string,
45
+ label: PropTypes.string,
46
+ gtmClass: PropTypes.string,
38
47
  };
39
48
 
40
49
  export default Tab;