gatsby-matrix-theme 3.1.2 → 3.2.3

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 (43) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/package.json +2 -2
  3. package/src/components/atoms/cards/comparison-table/comparison-table.module.scss +27 -0
  4. package/src/components/atoms/cards/comparison-table/comparison-table.stories.js +39 -0
  5. package/src/components/atoms/cards/comparison-table/index.js +57 -0
  6. package/src/components/atoms/cards/comparison-table/table/index.js +196 -0
  7. package/src/components/atoms/cards/comparison-table/table/table.module.scss +137 -0
  8. package/src/components/atoms/cards/comparison-table/table/table.test.js +22 -0
  9. package/src/components/atoms/cards/operators-table/index.js +5 -2
  10. package/src/components/organisms/toplist/index.js +2 -11
  11. package/src/gatsby-core-theme/components/molecules/module/index.js +4 -0
  12. package/src/gatsby-core-theme/styles/utils/variables/_main.scss +10 -1
  13. package/storybook/public/{0.1ef33c54.iframe.bundle.js → 0.4c2881f4.iframe.bundle.js} +1 -1
  14. package/storybook/public/{1.d02d8599.iframe.bundle.js → 1.318fc035.iframe.bundle.js} +1 -1
  15. package/storybook/public/{10.ae38b8e6.iframe.bundle.js → 10.ff8f20a0.iframe.bundle.js} +1 -1
  16. package/storybook/public/{11.86382beb.iframe.bundle.js → 11.a965ed36.iframe.bundle.js} +1 -1
  17. package/storybook/public/{12.b6909189.iframe.bundle.js → 12.f31f86bb.iframe.bundle.js} +1 -1
  18. package/storybook/public/{13.9e6703fb.iframe.bundle.js → 13.c72a573a.iframe.bundle.js} +1 -1
  19. package/storybook/public/{14.b0c67bdf.iframe.bundle.js → 14.454a253c.iframe.bundle.js} +1 -1
  20. package/storybook/public/{15.7bb7d301.iframe.bundle.js → 15.baadf857.iframe.bundle.js} +1 -1
  21. package/storybook/public/{16.d64c7fd7.iframe.bundle.js → 16.9d6c22db.iframe.bundle.js} +1 -1
  22. package/storybook/public/{5.91c30f08.iframe.bundle.js → 5.3751341c.iframe.bundle.js} +3 -3
  23. package/storybook/public/{5.91c30f08.iframe.bundle.js.LICENSE.txt → 5.3751341c.iframe.bundle.js.LICENSE.txt} +0 -0
  24. package/storybook/public/5.3751341c.iframe.bundle.js.map +1 -0
  25. package/storybook/public/{6.002e2a71.iframe.bundle.js → 6.78854fa8.iframe.bundle.js} +1 -1
  26. package/storybook/public/{7.d12dd5b3.iframe.bundle.js → 7.7dfb34cd.iframe.bundle.js} +1 -1
  27. package/storybook/public/{8.c5053ebc.iframe.bundle.js → 8.88be3011.iframe.bundle.js} +1 -1
  28. package/storybook/public/{9.05a986eb.iframe.bundle.js → 9.c2b37d15.iframe.bundle.js} +3 -3
  29. package/storybook/public/{9.05a986eb.iframe.bundle.js.LICENSE.txt → 9.c2b37d15.iframe.bundle.js.LICENSE.txt} +0 -0
  30. package/storybook/public/9.c2b37d15.iframe.bundle.js.map +1 -0
  31. package/storybook/public/iframe.html +1 -1
  32. package/storybook/public/main.30a5eba0.iframe.bundle.js +1 -0
  33. package/storybook/public/{runtime~main.5a919f90.iframe.bundle.js → runtime~main.0dbefcaa.iframe.bundle.js} +1 -1
  34. package/storybook/public/vendors~main.c173cb22.iframe.bundle.js +7 -0
  35. package/storybook/public/{vendors~main.145aeafa.iframe.bundle.js.LICENSE.txt → vendors~main.c173cb22.iframe.bundle.js.LICENSE.txt} +0 -0
  36. package/storybook/public/vendors~main.c173cb22.iframe.bundle.js.map +1 -0
  37. package/src/components/organisms/toplist/comparison-table/comparison-table.module.scss +0 -52
  38. package/src/components/organisms/toplist/comparison-table/index.js +0 -165
  39. package/storybook/public/5.91c30f08.iframe.bundle.js.map +0 -1
  40. package/storybook/public/9.05a986eb.iframe.bundle.js.map +0 -1
  41. package/storybook/public/main.c8da7880.iframe.bundle.js +0 -1
  42. package/storybook/public/vendors~main.145aeafa.iframe.bundle.js +0 -7
  43. package/storybook/public/vendors~main.145aeafa.iframe.bundle.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendors~main.c173cb22.iframe.bundle.js","sources":[],"mappings":";;;;;A","sourceRoot":""}
@@ -1,52 +0,0 @@
1
- .compareTable {
2
- table {
3
- display: flex;
4
- margin: 10px auto;
5
- padding: 0;
6
- height: auto;
7
- border-collapse: collapse;
8
- margin-bottom: 0;
9
- // .sliderContent {
10
- // @include min(laptop) {
11
- // width: 33.3333333%;
12
- // }
13
- // }
14
-
15
- tr,
16
- th {
17
- text-align: left;
18
- border-right: 1px solid #dddddd;
19
- border-top: 1px solid #dddddd;
20
- }
21
-
22
- .sliderContent {
23
- display: flex;
24
- }
25
- }
26
- @include max(tablet) {
27
- table {
28
- overflow-x: scroll;
29
- }
30
- }
31
- }
32
-
33
- .loadBtn {
34
- background: var(--color-2);
35
- border: 1px solid #c4c4c4;
36
- box-sizing: border-box;
37
- border-radius: 0px 0px 8px 8px;
38
- width: 100%;
39
- height: 48px;
40
- margin-top: -0.1rem;
41
- font-style: normal;
42
- font-weight: bold;
43
- font-size: 16px;
44
- line-height: 23px;
45
- color: #fff;
46
- div {
47
- @include flex-align(center, center);
48
- svg {
49
- margin-left: 25px;
50
- }
51
- }
52
- }
@@ -1,165 +0,0 @@
1
- /* eslint-disable react/forbid-prop-types */
2
- /* eslint-disable no-unused-expressions */
3
- /* eslint-disable import/no-extraneous-dependencies */
4
- import React, { useEffect, useState, useContext } from 'react';
5
- import Slider from 'gatsby-core-theme/src/components/molecules/slider';
6
- import PropTypes from 'prop-types';
7
- import useWindowSize from 'gatsby-core-theme/src/hooks/useWindowSize';
8
- import keygen from 'gatsby-core-theme/src/helpers/keygen';
9
- import { translate } from 'gatsby-core-theme/src/helpers/getters';
10
- import { isMobileDevice } from 'gatsby-matrix-theme/src/helpers/mobile-detect';
11
- import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
12
- import { TiArrowSortedDown, TiArrowSortedUp } from 'react-icons/ti';
13
- import Column from '../../../atoms/table/column';
14
- import StaticColumn from '../../../atoms/table/staticColumn';
15
- import styles from './comparison-table.module.scss';
16
-
17
- const Index = ({ module }) => {
18
- const [width] = useWindowSize();
19
- const [hideRow, setHideRow] = useState(false);
20
- const [licensesMore, setLicensesMore] = useState(true);
21
- const [details] = useState(122);
22
- const [rating] = useState(56);
23
- const [bonus] = useState(180);
24
- const [topFeatures] = useState(111);
25
- const [banking] = useState(124);
26
- const [licenses, setLicenses] = useState(57);
27
- const { translations } = useContext(Context) || {};
28
-
29
- useEffect(() => {
30
- isMobileDevice() && setHideRow(true);
31
- }, []);
32
-
33
- const chnageHeights = (id, height) => {
34
- if (id === 'licenses') {
35
- setLicenses(height);
36
- setLicensesMore(false);
37
- }
38
- };
39
-
40
- const renderOne = (items) => {
41
- const arr = [];
42
-
43
- for (let i = 0; i < items.length; i += 1) {
44
- arr.push(
45
- <div key={keygen()} className={styles.sliderContent}>
46
- <Column
47
- item={items[i]}
48
- index={i}
49
- details={details}
50
- rating={rating}
51
- bonus={bonus}
52
- topFeatures={topFeatures}
53
- banking={banking}
54
- licenses={licenses}
55
- chnageHeights={chnageHeights}
56
- hideRow={hideRow}
57
- licensesMore={licensesMore}
58
- />
59
- </div>
60
- );
61
- }
62
- return arr;
63
- };
64
-
65
- const renderThree = (items) => {
66
- const arr = [];
67
- for (let i = 0; i < items.length; i += 3) {
68
- arr.push(
69
- <div key={keygen()} className={styles.sliderContent}>
70
- <Column
71
- item={items[i]}
72
- index={i}
73
- details={details}
74
- rating={rating}
75
- bonus={bonus}
76
- topFeatures={topFeatures}
77
- banking={banking}
78
- licenses={licenses}
79
- chnageHeights={chnageHeights}
80
- hideRow={hideRow}
81
- licensesMore={licensesMore}
82
- />
83
- {items[i + 1] && (
84
- <Column
85
- item={items[i + 1]}
86
- index={i + 1}
87
- details={details}
88
- rating={rating}
89
- bonus={bonus}
90
- topFeatures={topFeatures}
91
- banking={banking}
92
- licenses={licenses}
93
- chnageHeights={chnageHeights}
94
- hideRow={hideRow}
95
- licensesMore={licensesMore}
96
- />
97
- )}
98
- {items[i + 2] && (
99
- <Column
100
- item={items[i + 2]}
101
- index={i + 2}
102
- details={details}
103
- rating={rating}
104
- bonus={bonus}
105
- topFeatures={topFeatures}
106
- banking={banking}
107
- licenses={licenses}
108
- chnageHeights={chnageHeights}
109
- hideRow={hideRow}
110
- licensesMore={licensesMore}
111
- />
112
- )}
113
- </div>
114
- );
115
- }
116
- return arr;
117
- };
118
-
119
- return (
120
- <div className={styles.compareTable}>
121
- <table>
122
- <StaticColumn
123
- details={details}
124
- rating={rating}
125
- bonus={bonus}
126
- topFeatures={topFeatures}
127
- banking={banking}
128
- licenses={licenses}
129
- hideRow={hideRow}
130
- />
131
- {width < 991 && width > 0 && <>{renderOne(module.items[0].items)}</>}
132
- {width >= 991 && (
133
- <Slider useArrows={false} gtmClass="comparison-table-carousel-gtm">
134
- {renderThree(module.items[0].items)}
135
- </Slider>
136
- )}
137
- </table>
138
- {width < 991 && (
139
- // eslint-disable-next-line react/button-has-type
140
- <button
141
- className={styles.loadBtn}
142
- onClick={() => {
143
- setHideRow(!hideRow);
144
- }}
145
- >
146
- {hideRow ? (
147
- <div className={styles.showMoreBtn}>
148
- {translate(translations, 'show_more_details', 'Show more details')}{' '}
149
- <TiArrowSortedDown />
150
- </div>
151
- ) : (
152
- <div className={styles.showMoreBtn}>
153
- {translate(translations, 'show_less_details', 'Show less details')}
154
- <TiArrowSortedUp />
155
- </div>
156
- )}
157
- </button>
158
- )}
159
- </div>
160
- );
161
- };
162
- Index.propTypes = {
163
- module: PropTypes.object,
164
- };
165
- export default Index;
@@ -1 +0,0 @@
1
- {"version":3,"file":"5.91c30f08.iframe.bundle.js","sources":[],"mappings":";A","sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"9.05a986eb.iframe.bundle.js","sources":[],"mappings":";A","sourceRoot":""}