oddsgate-ds 1.0.207 → 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 +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/organisms/Glossary/Glossary.component.d.ts +3 -0
- package/dist/cjs/types/components/organisms/Glossary/Glossary.themes.d.ts +1 -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 +3 -0
- package/dist/esm/types/components/organisms/Glossary/Glossary.themes.d.ts +1 -0
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
- package/src/components/molecules/CategoriesWrapper/CategoriesWrapper.theme.ts +14 -5
- package/src/components/molecules/CategoryIndex/CategoryIndex.component.tsx +3 -5
- 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 +47 -13
- package/src/components/organisms/Glossary/Glossary.stories.tsx +120 -18
- package/src/components/organisms/Glossary/Glossary.themes.ts +26 -5
|
@@ -8,6 +8,9 @@ type GlossaryProps = {
|
|
|
8
8
|
displayedCategories: string[];
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
noResults?: boolean;
|
|
11
|
+
backToTopButton?: boolean;
|
|
12
|
+
noResultsText?: string;
|
|
13
|
+
tryAnotherLetterText?: string;
|
|
11
14
|
};
|
|
12
15
|
export declare const Glossary: React.FC<GlossaryProps>;
|
|
13
16
|
export default Glossary;
|
|
@@ -5,3 +5,4 @@ export declare const StyledGlossaryCategories: import("styled-components/dist/ty
|
|
|
5
5
|
export declare const StyledNoResultsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
6
|
export declare const StyledNoResultsTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
|
|
7
7
|
export declare const StyledNoResultsSubtitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
|
|
8
|
+
export declare const StyledBackButtonContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
package/dist/types.d.ts
CHANGED
|
@@ -729,6 +729,9 @@ type GlossaryProps = {
|
|
|
729
729
|
displayedCategories: string[];
|
|
730
730
|
placeholder?: string;
|
|
731
731
|
noResults?: boolean;
|
|
732
|
+
backToTopButton?: boolean;
|
|
733
|
+
noResultsText?: string;
|
|
734
|
+
tryAnotherLetterText?: string;
|
|
732
735
|
};
|
|
733
736
|
declare const Glossary: React__default.FC<GlossaryProps>;
|
|
734
737
|
|
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,16 +10,14 @@ 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
|
-
onClick={() => onChange(category
|
|
18
|
+
onClick={() => onChange(category)}
|
|
20
19
|
isSelected={
|
|
21
|
-
selectedCategory === category
|
|
22
|
-
(selectedCategory === null && category === '#')
|
|
20
|
+
selectedCategory === category
|
|
23
21
|
}
|
|
24
22
|
key={`category-${category}`}
|
|
25
23
|
>
|
|
@@ -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
|
`
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
StyledBackButtonContainer,
|
|
4
|
+
StyledGlossary,
|
|
5
|
+
StyledGlossaryCategories,
|
|
6
|
+
StyledNoResultsContainer,
|
|
7
|
+
StyledNoResultsSubtitle,
|
|
8
|
+
StyledNoResultsTitle
|
|
9
|
+
} from './Glossary.themes'
|
|
3
10
|
|
|
4
11
|
import SearchBar from '@/components/molecules/SearchBar/SearchBar.component'
|
|
5
12
|
import GlossaryCategoryIndex from '@/components/molecules/CategoryIndex/CategoryIndex.component'
|
|
6
13
|
import CategoriesWrapper from '@/components/molecules/CategoriesWrapper/CategoriesWrapper.component'
|
|
14
|
+
import Button from '@/components/atoms/Button'
|
|
15
|
+
import Icon from '@/components/atoms/Icon'
|
|
7
16
|
|
|
8
17
|
type GlossaryProps = {
|
|
9
18
|
searchTerm: string
|
|
@@ -14,6 +23,9 @@ type GlossaryProps = {
|
|
|
14
23
|
displayedCategories: string[]
|
|
15
24
|
placeholder?: string
|
|
16
25
|
noResults?: boolean
|
|
26
|
+
backToTopButton?: boolean
|
|
27
|
+
noResultsText?: string
|
|
28
|
+
tryAnotherLetterText?: string
|
|
17
29
|
}
|
|
18
30
|
|
|
19
31
|
export const Glossary: React.FC<GlossaryProps> = ({
|
|
@@ -24,7 +36,10 @@ export const Glossary: React.FC<GlossaryProps> = ({
|
|
|
24
36
|
categoryData,
|
|
25
37
|
displayedCategories,
|
|
26
38
|
placeholder,
|
|
27
|
-
noResults
|
|
39
|
+
noResults,
|
|
40
|
+
backToTopButton,
|
|
41
|
+
noResultsText,
|
|
42
|
+
tryAnotherLetterText
|
|
28
43
|
}) => {
|
|
29
44
|
const categoryNames = Object.keys(categoryData)
|
|
30
45
|
|
|
@@ -45,19 +60,38 @@ export const Glossary: React.FC<GlossaryProps> = ({
|
|
|
45
60
|
/>
|
|
46
61
|
{noResults ? (
|
|
47
62
|
<StyledNoResultsContainer>
|
|
48
|
-
<StyledNoResultsTitle>
|
|
49
|
-
<StyledNoResultsSubtitle>
|
|
63
|
+
<StyledNoResultsTitle>{noResultsText}</StyledNoResultsTitle>
|
|
64
|
+
<StyledNoResultsSubtitle>{tryAnotherLetterText}</StyledNoResultsSubtitle>
|
|
50
65
|
</StyledNoResultsContainer>
|
|
51
66
|
) : (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
+
</>
|
|
61
95
|
)}
|
|
62
96
|
</StyledGlossary>
|
|
63
97
|
)
|
|
@@ -11,24 +11,126 @@ interface GlossaryCategory {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
const categories: GlossaryCategory[] = [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
{
|
|
15
|
+
name: 'A',
|
|
16
|
+
items: [
|
|
17
|
+
{ slug: 'afk', name: 'AFK' },
|
|
18
|
+
{ slug: 'aimbot', name: 'AIMBOT' },
|
|
19
|
+
{ slug: 'aggro', name: 'Aggro' },
|
|
20
|
+
{ slug: 'aoe', name: 'AOE' },
|
|
21
|
+
{ slug: 'avatar', name: 'Avatar' },
|
|
22
|
+
{ slug: 'accuracy', name: 'Accuracy' },
|
|
23
|
+
{ slug: 'action-bar', name: 'Action Bar' },
|
|
24
|
+
{ slug: 'add-on', name: 'Add-on' },
|
|
25
|
+
{ slug: 'arena', name: 'Arena' },
|
|
26
|
+
{ slug: 'artifact', name: 'Artifact' }
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'B',
|
|
31
|
+
items: [
|
|
32
|
+
{ slug: 'buff', name: 'Buff' },
|
|
33
|
+
{ slug: 'boss', name: 'Boss' },
|
|
34
|
+
{ slug: 'build', name: 'Build' },
|
|
35
|
+
{ slug: 'ban', name: 'Ban' },
|
|
36
|
+
{ slug: 'beta', name: 'Beta' },
|
|
37
|
+
{ slug: 'blind', name: 'Blind' },
|
|
38
|
+
{ slug: 'block', name: 'Block' },
|
|
39
|
+
{ slug: 'bot', name: 'Bot' },
|
|
40
|
+
{ slug: 'bracket', name: 'Bracket' },
|
|
41
|
+
{ slug: 'burst', name: 'Burst' }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'C',
|
|
46
|
+
items: [
|
|
47
|
+
{ slug: 'camp', name: 'Camp' },
|
|
48
|
+
{ slug: 'carry', name: 'Carry' },
|
|
49
|
+
{ slug: 'cc', name: 'Crowd Control' },
|
|
50
|
+
{ slug: 'cd', name: 'Cooldown' },
|
|
51
|
+
{ slug: 'cheese', name: 'Cheese' },
|
|
52
|
+
{ slug: 'clan', name: 'Clan' },
|
|
53
|
+
{ slug: 'combo', name: 'Combo' },
|
|
54
|
+
{ slug: 'crit', name: 'Critical Hit' },
|
|
55
|
+
{ slug: 'crafting', name: 'Crafting' },
|
|
56
|
+
{ slug: 'creep', name: 'Creep' }
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'D',
|
|
61
|
+
items: [
|
|
62
|
+
{ slug: 'debuff', name: 'Debuff' },
|
|
63
|
+
{ slug: 'dps', name: 'DPS' },
|
|
64
|
+
{ slug: 'drop', name: 'Drop' },
|
|
65
|
+
{ slug: 'duo', name: 'Duo' },
|
|
66
|
+
{ slug: 'dungeon', name: 'Dungeon' },
|
|
67
|
+
{ slug: 'draft', name: 'Draft' },
|
|
68
|
+
{ slug: 'dot', name: 'Damage Over Time' },
|
|
69
|
+
{ slug: 'disconnect', name: 'Disconnect' },
|
|
70
|
+
{ slug: 'drain', name: 'Drain' },
|
|
71
|
+
{ slug: 'drop-rate', name: 'Drop Rate' }
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'E',
|
|
76
|
+
items: [
|
|
77
|
+
{ slug: 'emote', name: 'Emote' },
|
|
78
|
+
{ slug: 'endgame', name: 'Endgame' },
|
|
79
|
+
{ slug: 'enemy', name: 'Enemy' },
|
|
80
|
+
{ slug: 'equip', name: 'Equip' },
|
|
81
|
+
{ slug: 'event', name: 'Event' },
|
|
82
|
+
{ slug: 'exploit', name: 'Exploit' },
|
|
83
|
+
{ slug: 'experience', name: 'Experience' },
|
|
84
|
+
{ slug: 'ez', name: 'EZ' },
|
|
85
|
+
{ slug: 'elite', name: 'Elite' },
|
|
86
|
+
{ slug: 'escape', name: 'Escape' }
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'F',
|
|
91
|
+
items: [
|
|
92
|
+
{ slug: 'farm', name: 'Farm' },
|
|
93
|
+
{ slug: 'feed', name: 'Feed' },
|
|
94
|
+
{ slug: 'flank', name: 'Flank' },
|
|
95
|
+
{ slug: 'frag', name: 'Frag' },
|
|
96
|
+
{ slug: 'fps', name: 'FPS' },
|
|
97
|
+
{ slug: 'friendly-fire', name: 'Friendly Fire' },
|
|
98
|
+
{ slug: 'faction', name: 'Faction' },
|
|
99
|
+
{ slug: 'fov', name: 'Field of View' },
|
|
100
|
+
{ slug: 'freeze', name: 'Freeze' },
|
|
101
|
+
{ slug: 'full-party', name: 'Full Party' }
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'G',
|
|
106
|
+
items: [
|
|
107
|
+
{ slug: 'gg', name: 'GG' },
|
|
108
|
+
{ slug: 'gank', name: 'Gank' },
|
|
109
|
+
{ slug: 'gear', name: 'Gear' },
|
|
110
|
+
{ slug: 'grind', name: 'Grind' },
|
|
111
|
+
{ slug: 'guild', name: 'Guild' },
|
|
112
|
+
{ slug: 'glitch', name: 'Glitch' },
|
|
113
|
+
{ slug: 'gold', name: 'Gold' },
|
|
114
|
+
{ slug: 'group', name: 'Group' },
|
|
115
|
+
{ slug: 'grenade', name: 'Grenade' },
|
|
116
|
+
{ slug: 'global', name: 'Global' }
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'H',
|
|
121
|
+
items: [
|
|
122
|
+
{ slug: 'heal', name: 'Heal' },
|
|
123
|
+
{ slug: 'headshot', name: 'Headshot' },
|
|
124
|
+
{ slug: 'hp', name: 'HP' },
|
|
125
|
+
{ slug: 'hud', name: 'HUD' },
|
|
126
|
+
{ slug: 'hardcore', name: 'Hardcore' },
|
|
127
|
+
{ slug: 'hero', name: 'Hero' },
|
|
128
|
+
{ slug: 'hitbox', name: 'Hitbox' },
|
|
129
|
+
{ slug: 'host', name: 'Host' },
|
|
130
|
+
{ slug: 'hotkey', name: 'Hotkey' },
|
|
131
|
+
{ slug: 'hunter', name: 'Hunter' }
|
|
132
|
+
]
|
|
133
|
+
}
|
|
32
134
|
]
|
|
33
135
|
|
|
34
136
|
// Helper to build categoryData from categories and items
|
|
@@ -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,7 +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:
|
|
23
|
+
margin-top: 96px;
|
|
24
|
+
margin-bottom: 120px;
|
|
25
|
+
@media (max-width: ${responsiveMedia}) {
|
|
26
|
+
margin-top: 64x;
|
|
27
|
+
margin-bottom: 80px;
|
|
28
|
+
}
|
|
24
29
|
`
|
|
25
30
|
export const StyledNoResultsTitle = styled.h1`
|
|
26
31
|
color: ${colors.primary50};
|
|
@@ -33,9 +38,25 @@ export const StyledNoResultsTitle = styled.h1`
|
|
|
33
38
|
`
|
|
34
39
|
export const StyledNoResultsSubtitle = styled.h4`
|
|
35
40
|
color: ${colors.gray20};
|
|
36
|
-
font-size:
|
|
41
|
+
font-size: 36px;
|
|
37
42
|
font-weight: 700;
|
|
38
|
-
@media (max-width:
|
|
39
|
-
font-size:
|
|
43
|
+
@media (max-width: ${responsiveMedia}) {
|
|
44
|
+
font-size: 24px;
|
|
40
45
|
}
|
|
41
46
|
`
|
|
47
|
+
export const StyledBackButtonContainer = styled.div`
|
|
48
|
+
width: 100%;
|
|
49
|
+
display: flex;
|
|
50
|
+
justify-content: flex-end;
|
|
51
|
+
margin-top: 4rem;
|
|
52
|
+
|
|
53
|
+
& > button {
|
|
54
|
+
text-transform: none;
|
|
55
|
+
font-size: 1.5rem;
|
|
56
|
+
height: 34px;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
}
|
|
62
|
+
`;
|