oddsgate-ds 1.0.208 → 1.0.209
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/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/organisms/Glossary/Glossary.component.d.ts +2 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/organisms/Glossary/Glossary.component.d.ts +2 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/molecules/CategoriesWrapper/CategoriesWrapper.theme.ts +14 -5
- package/src/components/molecules/CategoryIndex/CategoryIndex.component.tsx +1 -2
- package/src/components/molecules/CategoryIndex/CategoryIndex.theme.ts +5 -2
- package/src/components/molecules/SearchBar/SearchBar.theme.ts +1 -1
- package/src/components/organisms/Glossary/Glossary.component.tsx +35 -23
- package/src/components/organisms/Glossary/Glossary.themes.ts +10 -6
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { colors } from '@/styles/variables'
|
|
1
|
+
import { colors, responsiveMedia } from '@/styles/variables'
|
|
2
2
|
import styled from 'styled-components'
|
|
3
3
|
|
|
4
4
|
export const StyledCategoryWrapper = styled.div`
|
|
@@ -12,8 +12,11 @@ export const StyledCategorySeparator = styled.div`
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
width: 100%;
|
|
14
14
|
gap: 0.75rem;
|
|
15
|
-
font-size:
|
|
15
|
+
font-size: 48px;
|
|
16
16
|
font-weight: 700;
|
|
17
|
+
@media (max-width: ${responsiveMedia}) {
|
|
18
|
+
font-size: 32px;
|
|
19
|
+
}
|
|
17
20
|
`
|
|
18
21
|
export const StyledCategorySeparatorLine = styled.div`
|
|
19
22
|
flex-grow: 1;
|
|
@@ -30,10 +33,16 @@ export const StyledCategoryContent = styled.div`
|
|
|
30
33
|
`
|
|
31
34
|
export const StyledCategoryItem = styled.div`
|
|
32
35
|
& > button {
|
|
33
|
-
height:
|
|
34
|
-
padding:
|
|
35
|
-
font-size:
|
|
36
|
+
height: 34px;
|
|
37
|
+
padding: 10px 40px;
|
|
38
|
+
font-size: 24px;
|
|
36
39
|
font-weight: 700;
|
|
37
40
|
text-transform: none;
|
|
41
|
+
|
|
42
|
+
@media (max-width: ${responsiveMedia}) {
|
|
43
|
+
height: 28px;
|
|
44
|
+
font-size: 20px;
|
|
45
|
+
padding: 5px 20px;
|
|
46
|
+
}
|
|
38
47
|
}
|
|
39
48
|
`
|
|
@@ -10,11 +10,10 @@ const CategoryIndex: React.FC<CategoryIndexProps> = ({
|
|
|
10
10
|
onChange,
|
|
11
11
|
selectedCategory
|
|
12
12
|
}) => {
|
|
13
|
-
const allCategories = ['#', ...categories]
|
|
14
13
|
|
|
15
14
|
return (
|
|
16
15
|
<StyledGlossaryCategoryIndex>
|
|
17
|
-
{
|
|
16
|
+
{categories.map(category => (
|
|
18
17
|
<StyledGlossaryCategoryIndexItem
|
|
19
18
|
onClick={() => onChange(category)}
|
|
20
19
|
isSelected={
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { colors } from '@/styles/variables'
|
|
1
|
+
import { colors, responsiveMedia } from '@/styles/variables'
|
|
2
2
|
import styled from 'styled-components'
|
|
3
3
|
|
|
4
4
|
type ItemProps = {
|
|
@@ -23,5 +23,8 @@ export const StyledGlossaryCategoryIndexItem = styled.div<ItemProps>`
|
|
|
23
23
|
box-sizing: border-box;
|
|
24
24
|
color: ${colors.gray20};
|
|
25
25
|
font-weight: 700;
|
|
26
|
-
font-size:
|
|
26
|
+
font-size: 24px;
|
|
27
|
+
@media (max-width: ${responsiveMedia}) {
|
|
28
|
+
font-size: 20px;
|
|
29
|
+
}
|
|
27
30
|
`
|
|
@@ -24,6 +24,8 @@ type GlossaryProps = {
|
|
|
24
24
|
placeholder?: string
|
|
25
25
|
noResults?: boolean
|
|
26
26
|
backToTopButton?: boolean
|
|
27
|
+
noResultsText?: string
|
|
28
|
+
tryAnotherLetterText?: string
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
export const Glossary: React.FC<GlossaryProps> = ({
|
|
@@ -35,7 +37,9 @@ export const Glossary: React.FC<GlossaryProps> = ({
|
|
|
35
37
|
displayedCategories,
|
|
36
38
|
placeholder,
|
|
37
39
|
noResults,
|
|
38
|
-
backToTopButton
|
|
40
|
+
backToTopButton,
|
|
41
|
+
noResultsText,
|
|
42
|
+
tryAnotherLetterText
|
|
39
43
|
}) => {
|
|
40
44
|
const categoryNames = Object.keys(categoryData)
|
|
41
45
|
|
|
@@ -56,31 +60,39 @@ export const Glossary: React.FC<GlossaryProps> = ({
|
|
|
56
60
|
/>
|
|
57
61
|
{noResults ? (
|
|
58
62
|
<StyledNoResultsContainer>
|
|
59
|
-
<StyledNoResultsTitle>
|
|
60
|
-
<StyledNoResultsSubtitle>
|
|
63
|
+
<StyledNoResultsTitle>{noResultsText}</StyledNoResultsTitle>
|
|
64
|
+
<StyledNoResultsSubtitle>{tryAnotherLetterText}</StyledNoResultsSubtitle>
|
|
61
65
|
</StyledNoResultsContainer>
|
|
62
66
|
) : (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
<>
|
|
68
|
+
<StyledGlossaryCategories>
|
|
69
|
+
{displayedCategories.map(category => (
|
|
70
|
+
<CategoriesWrapper
|
|
71
|
+
key={category}
|
|
72
|
+
category={category}
|
|
73
|
+
categoryItems={categoryData[category]}
|
|
74
|
+
/>
|
|
75
|
+
))}
|
|
76
|
+
</StyledGlossaryCategories>
|
|
77
|
+
<StyledBackButtonContainer>
|
|
78
|
+
<Button
|
|
79
|
+
variant="text"
|
|
80
|
+
onClick={() => {
|
|
81
|
+
window.scrollTo({ top: 0, behavior: 'smooth' })
|
|
82
|
+
}}
|
|
83
|
+
rightIcon={
|
|
84
|
+
<Icon
|
|
85
|
+
icon="icon-arrowDown"
|
|
86
|
+
className="ml-12"
|
|
87
|
+
style={{ width: '14px' }}
|
|
88
|
+
/>
|
|
89
|
+
}
|
|
90
|
+
>
|
|
91
|
+
{backToTopButton}
|
|
92
|
+
</Button>
|
|
93
|
+
</StyledBackButtonContainer>
|
|
94
|
+
</>
|
|
72
95
|
)}
|
|
73
|
-
<StyledBackButtonContainer>
|
|
74
|
-
<Button
|
|
75
|
-
variant="text"
|
|
76
|
-
onClick={() => {
|
|
77
|
-
window.scrollTo({ top: 0, behavior: 'smooth' })
|
|
78
|
-
}}
|
|
79
|
-
rightIcon={<Icon icon="icon-arrowDown" className='ml-12' style={{width: '14px' }}/>}
|
|
80
|
-
>
|
|
81
|
-
{backToTopButton}
|
|
82
|
-
</Button>
|
|
83
|
-
</StyledBackButtonContainer>
|
|
84
96
|
</StyledGlossary>
|
|
85
97
|
)
|
|
86
98
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { colors, typography } from '@/styles/variables'
|
|
1
|
+
import { colors, responsiveMedia, typography } from '@/styles/variables'
|
|
2
2
|
import styled from 'styled-components'
|
|
3
3
|
|
|
4
4
|
export const StyledGlossary = styled.div`
|
|
@@ -20,8 +20,12 @@ export const StyledNoResultsContainer = styled.div`
|
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
align-items: center;
|
|
22
22
|
justify-content: center;
|
|
23
|
-
margin-top:
|
|
24
|
-
margin-bottom:
|
|
23
|
+
margin-top: 96px;
|
|
24
|
+
margin-bottom: 120px;
|
|
25
|
+
@media (max-width: ${responsiveMedia}) {
|
|
26
|
+
margin-top: 64x;
|
|
27
|
+
margin-bottom: 80px;
|
|
28
|
+
}
|
|
25
29
|
`
|
|
26
30
|
export const StyledNoResultsTitle = styled.h1`
|
|
27
31
|
color: ${colors.primary50};
|
|
@@ -34,10 +38,10 @@ export const StyledNoResultsTitle = styled.h1`
|
|
|
34
38
|
`
|
|
35
39
|
export const StyledNoResultsSubtitle = styled.h4`
|
|
36
40
|
color: ${colors.gray20};
|
|
37
|
-
font-size:
|
|
41
|
+
font-size: 36px;
|
|
38
42
|
font-weight: 700;
|
|
39
|
-
@media (max-width:
|
|
40
|
-
font-size:
|
|
43
|
+
@media (max-width: ${responsiveMedia}) {
|
|
44
|
+
font-size: 24px;
|
|
41
45
|
}
|
|
42
46
|
`
|
|
43
47
|
export const StyledBackButtonContainer = styled.div`
|