gatsby-core-theme 33.1.0 → 33.1.2
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/CHANGELOG.md +27 -0
- package/package.json +1 -1
- package/src/components/atoms/author-box/template-three/expertion/index.js +2 -2
- package/src/components/atoms/button/button.js +8 -0
- package/src/components/atoms/button/operator-cta.js +0 -3
- package/src/components/molecules/content/index.js +6 -3
- package/src/components/molecules/search/index.js +3 -3
- package/src/components/molecules/spotlights_v2/image-text/template-one/index.js +2 -0
- package/src/components/molecules/spotlights_v2/image-text/template-three/item/index.js +2 -0
- package/src/components/molecules/spotlights_v2/image-text/template-two/index.js +2 -0
- package/src/components/organisms/accordion/variants/template-one/index.js +2 -0
- package/src/components/organisms/anchor/template-one/index.js +2 -0
- package/src/components/organisms/carousel/template-one/index.js +6 -1
- package/src/components/organisms/form/fields/index.js +1 -0
- package/src/components/organisms/form/form.module.scss +0 -30
- package/src/components/organisms/search/index.js +0 -1
- package/src/constants/forms.js +1 -1
- package/src/constants/pick-keys.mjs +3 -0
- package/src/helpers/server-data.js +9 -6
- package/src/images/icons/check.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## [33.1.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v33.1.1...v33.1.2) (2024-06-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* removed unused styling ([9b054cd](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9b054cd636f45d89fcc55965c8918c872c666269))
|
|
7
|
+
* search logic ([7d59fb6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7d59fb63ef167e6273dd704936d3794d351487b4))
|
|
8
|
+
|
|
9
|
+
## [33.1.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v33.1.0...v33.1.1) (2024-06-25)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* fix relation pick keys for email and url ([a3cff32](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a3cff3220c99d07e84de76d27e179113027b6164))
|
|
15
|
+
* search logic ([214d773](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/214d77330cdeb0a09fc7232a1d05903072995611))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Code Refactoring
|
|
19
|
+
|
|
20
|
+
* add games amount to operator relation ([d20e0dc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d20e0dcfaacf439f2717b2cebe4953062c0516ae))
|
|
21
|
+
* change to button titles ([1a430e1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1a430e19b831d1e23b8edacbc67263b7b7464317))
|
|
22
|
+
* changes to aria-labels and buttons ([4d57af5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/4d57af5349b06ae606b58c1a2c015488f98fe605))
|
|
23
|
+
* changes to search button ([f0f0e9f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f0f0e9ffbe25a10c4c1e0584bac696e09b06f480))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
* Merge branch 'tm-4505' into 'master' ([d085a9e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d085a9e467dc3f139e99e05281186022f012dfcd))
|
|
27
|
+
|
|
1
28
|
# [33.1.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v33.0.2...v33.1.0) (2024-06-20)
|
|
2
29
|
|
|
3
30
|
|
package/package.json
CHANGED
|
@@ -9,9 +9,9 @@ export default function Expertion({ expertise }) {
|
|
|
9
9
|
{expertise && (
|
|
10
10
|
<div className={styles.expertion}>
|
|
11
11
|
<p>Expert on:</p>
|
|
12
|
-
{expertise?.map((res) => (
|
|
12
|
+
{expertise?.map((res, index) => (
|
|
13
13
|
<span>
|
|
14
|
-
<Check />
|
|
14
|
+
<Check id={`${res}_${index}`} />
|
|
15
15
|
{res}
|
|
16
16
|
</span>
|
|
17
17
|
))}
|
|
@@ -28,6 +28,13 @@ function Button({
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const linkAttr = to ? { href: to } : { onClick };
|
|
31
|
+
let extraProps;
|
|
32
|
+
|
|
33
|
+
if (onClick) {
|
|
34
|
+
extraProps = {
|
|
35
|
+
role: 'button',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
31
38
|
|
|
32
39
|
return (
|
|
33
40
|
<a
|
|
@@ -37,6 +44,7 @@ function Button({
|
|
|
37
44
|
rel="nofollow noreferrer"
|
|
38
45
|
className={`${classes || ''}`}
|
|
39
46
|
{...linkAttr}
|
|
47
|
+
{...extraProps}
|
|
40
48
|
>
|
|
41
49
|
{btnText}
|
|
42
50
|
{icon && icon}
|
|
@@ -94,9 +94,6 @@ const OperatorCtaButton = ({
|
|
|
94
94
|
title={`${typeof translateBtn === 'string' ? translateBtn : ''} ${
|
|
95
95
|
titleSuffix || ''
|
|
96
96
|
}`.trimEnd()}
|
|
97
|
-
aria-label={`${typeof translateBtn === 'string' ? translateBtn : ''} ${
|
|
98
|
-
titleSuffix || ''
|
|
99
|
-
}`.trimEnd()}
|
|
100
97
|
className={`${classes || ''} ${gtmClass || ''}`}
|
|
101
98
|
>
|
|
102
99
|
{translateBtn}
|
|
@@ -78,10 +78,13 @@ const Content = ({
|
|
|
78
78
|
{mainContent(module.value)}
|
|
79
79
|
<button
|
|
80
80
|
type="button"
|
|
81
|
-
className={`${
|
|
82
|
-
|
|
83
|
-
} ${
|
|
81
|
+
className={`${
|
|
82
|
+
isContentCollapsible ? styles.showMoreTwoButton || '' : styles.showMoreButton || ''
|
|
83
|
+
} ${(!isContentCollapsible && showMore && styles.hide) || ''} ${
|
|
84
|
+
(showMore && isContentCollapsible && styles.showMoreTwoButtonOpen) || ''
|
|
85
|
+
}`}
|
|
84
86
|
onClick={handleChange}
|
|
87
|
+
title="showMoreContentButton"
|
|
85
88
|
>
|
|
86
89
|
{show_more_label}
|
|
87
90
|
{icon && isContentCollapsible && icon}
|
|
@@ -101,12 +101,12 @@ const Search = ({
|
|
|
101
101
|
}
|
|
102
102
|
}}
|
|
103
103
|
/>
|
|
104
|
-
<button type="button" label className={styles.searchButton}>
|
|
104
|
+
<button type="button" aria-label="Search" className={styles.searchButton}>
|
|
105
105
|
<FaSearch title="Search Icon" />
|
|
106
106
|
</button>
|
|
107
107
|
</form>
|
|
108
108
|
|
|
109
|
-
{
|
|
109
|
+
{data.length > 0 ? (
|
|
110
110
|
<div className={styles.results}>
|
|
111
111
|
<Tabs
|
|
112
112
|
activeTabClass="searchActive"
|
|
@@ -128,7 +128,7 @@ const Search = ({
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
return (
|
|
131
|
-
<div results={
|
|
131
|
+
<div results={data.length} label={item} tabId="scas" key={keygen()}>
|
|
132
132
|
{Object.keys(searchData).map((item2) => getItems(item2))}
|
|
133
133
|
</div>
|
|
134
134
|
);
|
|
@@ -39,7 +39,9 @@ export default function TemplateOne({
|
|
|
39
39
|
{res.subtitle && <span>{res.subtitle}</span>}
|
|
40
40
|
{res?.text && (
|
|
41
41
|
<div
|
|
42
|
+
tabIndex={`${scrollableContent ? 0 : -1}`}
|
|
42
43
|
className={`${styles.desc} ${scrollableContent ? styles.scroll : ''}`}
|
|
44
|
+
// eslint-disable-next-line react/no-danger
|
|
43
45
|
dangerouslySetInnerHTML={{ __html: res?.text }}
|
|
44
46
|
/>
|
|
45
47
|
)}
|
|
@@ -38,9 +38,11 @@ export default function TemplateOne({
|
|
|
38
38
|
{item?.label && <TitleTag>{item?.label}</TitleTag>}
|
|
39
39
|
{item?.text && (
|
|
40
40
|
<div
|
|
41
|
+
tabIndex={`${scrollableContent ? 0 : -1}`}
|
|
41
42
|
className={`${styles.desc} ${scrollableContent ? styles.scroll : ''} ${
|
|
42
43
|
readMore && !scrollableContent && !showMore ? styles.readMore : ''
|
|
43
44
|
}`}
|
|
45
|
+
// eslint-disable-next-line react/no-danger
|
|
44
46
|
dangerouslySetInnerHTML={{ __html: item?.text }}
|
|
45
47
|
/>
|
|
46
48
|
)}
|
|
@@ -40,7 +40,9 @@ export default function TemplateOne({
|
|
|
40
40
|
{res.subtitle && <span>{res.subtitle}</span>}
|
|
41
41
|
{res?.text && (
|
|
42
42
|
<div
|
|
43
|
+
tabIndex={`${scrollableContent ? 0 : -1}`}
|
|
43
44
|
className={`${styles.desc} ${scrollableContent ? styles.scroll : ''}`}
|
|
45
|
+
// eslint-disable-next-line react/no-danger
|
|
44
46
|
dangerouslySetInnerHTML={{ __html: res?.text }}
|
|
45
47
|
/>
|
|
46
48
|
)}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react/no-danger */
|
|
1
2
|
import React, { useRef, useEffect } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
|
|
@@ -66,6 +67,7 @@ const TemplateOne = ({ module, openAll = false, openItem, closeOthers = false })
|
|
|
66
67
|
onClick={() => toggle(index)}
|
|
67
68
|
className={`${styles.title || ''} accordion-gtm btn-cta`}
|
|
68
69
|
type="button"
|
|
70
|
+
aria-label={`${keygen()}_accordionButton`}
|
|
69
71
|
ref={(el) => {
|
|
70
72
|
btnRefs.current[index] = btnRefs.current[index] || [];
|
|
71
73
|
btnRefs.current[index].push(el);
|
|
@@ -154,6 +154,7 @@ function Anchor({
|
|
|
154
154
|
className={`${styles.buttLeft} ${scrollX <= 0 ? styles.disabled : ''}`}
|
|
155
155
|
onClick={() => scroll(-buttonScroll)}
|
|
156
156
|
type="button"
|
|
157
|
+
title="anchorButtonLeft"
|
|
157
158
|
>
|
|
158
159
|
{leftButtonIcon}
|
|
159
160
|
</button>
|
|
@@ -166,6 +167,7 @@ function Anchor({
|
|
|
166
167
|
className={`${styles.buttRight} ${!scrollEnd ? '' : styles.disabled}`}
|
|
167
168
|
onClick={() => scroll(buttonScroll)}
|
|
168
169
|
type="button"
|
|
170
|
+
title="anchorButtonRight"
|
|
169
171
|
>
|
|
170
172
|
{rightButtonIcon}
|
|
171
173
|
</button>
|
|
@@ -16,7 +16,12 @@ const Carousel = ({ page = {}, module = {}, gtmClass = '' }) => {
|
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
18
|
<ScrollX refTag={container} scroll={scroll}>
|
|
19
|
-
<div
|
|
19
|
+
<div
|
|
20
|
+
ref={container}
|
|
21
|
+
className={styles.carouselContainer || ''}
|
|
22
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
23
|
+
tabIndex={0}
|
|
24
|
+
>
|
|
20
25
|
{module.items.map((item, index) => (
|
|
21
26
|
<div key={keygen()} className={styles.carouselItem || ''}>
|
|
22
27
|
<Slide
|
|
@@ -134,6 +134,7 @@ const getField = (field, handleChange, elements, state) => {
|
|
|
134
134
|
name={id}
|
|
135
135
|
id={id}
|
|
136
136
|
type={type}
|
|
137
|
+
aria-label={translate(translations, translationKey, label)}
|
|
137
138
|
aria-describedby={id}
|
|
138
139
|
placeholder={translate(translations, placeholder?.translationKey, placeholder?.label)}
|
|
139
140
|
{...props}
|
|
@@ -227,34 +227,4 @@
|
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
button{
|
|
233
|
-
padding: 0.4rem 1.6rem;
|
|
234
|
-
font-weight: 700;
|
|
235
|
-
font-size: 1.4rem;
|
|
236
|
-
line-height: 2rem;
|
|
237
|
-
border-width: 1.5px;
|
|
238
|
-
@include buttonsColor(
|
|
239
|
-
var(--primary-button-color, #6e33e5),
|
|
240
|
-
var(--primary-button-color-hover, #331079),
|
|
241
|
-
var(--primary-button-color-active, #998fcb),
|
|
242
|
-
var(--primary-button-color-text, #ffffff)
|
|
243
|
-
);
|
|
244
|
-
white-space: nowrap;
|
|
245
|
-
border-radius: 100px;
|
|
246
|
-
max-width: 15rem;
|
|
247
|
-
|
|
248
|
-
> svg {
|
|
249
|
-
flex: none;
|
|
250
|
-
height: 1.8rem;
|
|
251
|
-
width: 1.8rem;
|
|
252
|
-
margin-left: 1rem;
|
|
253
|
-
padding: 0.2rem;
|
|
254
|
-
}
|
|
255
|
-
&:disabled{
|
|
256
|
-
border: 1px solid #999999;
|
|
257
|
-
background-color: #cccccc;
|
|
258
|
-
color: #666666;
|
|
259
|
-
}
|
|
260
230
|
}
|
|
@@ -40,7 +40,6 @@ const SearchForm = ({
|
|
|
40
40
|
marketPrefix !== '/'
|
|
41
41
|
? `/${marketPrefix}/s${process.env.TRAILING_SLASH ? '/' : ''}?s=${e.target.value}`
|
|
42
42
|
: `/s${process.env.TRAILING_SLASH ? '/' : ''}?s=${e.target.value}`;
|
|
43
|
-
console.log(searchUrl);
|
|
44
43
|
window.location = `${window.location.origin}${searchUrl}`;
|
|
45
44
|
}
|
|
46
45
|
};
|
package/src/constants/forms.js
CHANGED
|
@@ -5,19 +5,22 @@ import loadSource from '~helpers/search-source';
|
|
|
5
5
|
import { deparam } from '~helpers/strings';
|
|
6
6
|
|
|
7
7
|
export async function getAPIData(page, url) {
|
|
8
|
-
const results = await loadSource(
|
|
8
|
+
const results = await loadSource(page.market);
|
|
9
9
|
if (page.path.endsWith('/s') || page.path === 's') {
|
|
10
10
|
let urlParams = null;
|
|
11
11
|
if (url && url.split('?').length === 2) {
|
|
12
12
|
urlParams = deparam(`${url.split('?')[1]}`);
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
const searchData = urlParams
|
|
16
|
+
? urlParams.hasOwnProperty('s')
|
|
17
|
+
? results.filter((item) => item.title.toLowerCase().includes(urlParams.s.toLowerCase()))
|
|
18
|
+
: null
|
|
19
|
+
: null;
|
|
20
|
+
|
|
14
21
|
return {
|
|
15
22
|
props: {
|
|
16
|
-
data:
|
|
17
|
-
? urlParams.hasOwnProperty('s')
|
|
18
|
-
? results.search(urlParams.s)
|
|
19
|
-
: null
|
|
20
|
-
: null,
|
|
23
|
+
data: searchData,
|
|
21
24
|
searchParam: urlParams ? urlParams.s : null,
|
|
22
25
|
},
|
|
23
26
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
export default function check() {
|
|
3
|
+
export default function check(id = 1) {
|
|
4
4
|
return (
|
|
5
5
|
<svg
|
|
6
6
|
role="img"
|
|
7
|
-
aria-labelledby=
|
|
7
|
+
aria-labelledby={`checkIcon_${id}`}
|
|
8
8
|
width="16"
|
|
9
9
|
height="16"
|
|
10
10
|
viewBox="0 0 16 16"
|
|
11
11
|
fill="none"
|
|
12
12
|
xmlns="http://www.w3.org/2000/svg"
|
|
13
13
|
>
|
|
14
|
-
<title id=
|
|
14
|
+
<title id={`checkIcon_${id}`}>check icon</title>
|
|
15
15
|
<path
|
|
16
16
|
d="M12.4663 4.8C12.1997 4.53333 11.7997 4.53333 11.533 4.8L6.53301 9.8L4.46634 7.73333C4.19967 7.46667 3.79967 7.46667 3.53301 7.73333C3.26634 8 3.26634 8.4 3.53301 8.66667L6.06634 11.2C6.19967 11.3333 6.33301 11.4 6.53301 11.4C6.73301 11.4 6.86634 11.3333 6.99967 11.2L12.4663 5.73333C12.733 5.46667 12.733 5.06667 12.4663 4.8Z"
|
|
17
17
|
fill="#3C3C40"
|