oddsgate-ds 1.0.207 → 1.0.208

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.
@@ -8,6 +8,7 @@ type GlossaryProps = {
8
8
  displayedCategories: string[];
9
9
  placeholder?: string;
10
10
  noResults?: boolean;
11
+ backToTopButton?: boolean;
11
12
  };
12
13
  export declare const Glossary: React.FC<GlossaryProps>;
13
14
  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,7 @@ type GlossaryProps = {
729
729
  displayedCategories: string[];
730
730
  placeholder?: string;
731
731
  noResults?: boolean;
732
+ backToTopButton?: boolean;
732
733
  };
733
734
  declare const Glossary: React__default.FC<GlossaryProps>;
734
735
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.207",
3
+ "version": "1.0.208",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -16,10 +16,9 @@ const CategoryIndex: React.FC<CategoryIndexProps> = ({
16
16
  <StyledGlossaryCategoryIndex>
17
17
  {allCategories.map(category => (
18
18
  <StyledGlossaryCategoryIndexItem
19
- onClick={() => onChange(category === '#' ? null : category)}
19
+ onClick={() => onChange(category)}
20
20
  isSelected={
21
- selectedCategory === category ||
22
- (selectedCategory === null && category === '#')
21
+ selectedCategory === category
23
22
  }
24
23
  key={`category-${category}`}
25
24
  >
@@ -1,9 +1,18 @@
1
1
  import React from 'react'
2
- import { StyledGlossary, StyledGlossaryCategories, StyledNoResultsContainer, StyledNoResultsSubtitle, StyledNoResultsTitle } from './Glossary.themes'
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,7 @@ type GlossaryProps = {
14
23
  displayedCategories: string[]
15
24
  placeholder?: string
16
25
  noResults?: boolean
26
+ backToTopButton?: boolean
17
27
  }
18
28
 
19
29
  export const Glossary: React.FC<GlossaryProps> = ({
@@ -24,7 +34,8 @@ export const Glossary: React.FC<GlossaryProps> = ({
24
34
  categoryData,
25
35
  displayedCategories,
26
36
  placeholder,
27
- noResults
37
+ noResults,
38
+ backToTopButton
28
39
  }) => {
29
40
  const categoryNames = Object.keys(categoryData)
30
41
 
@@ -59,6 +70,17 @@ export const Glossary: React.FC<GlossaryProps> = ({
59
70
  ))}
60
71
  </StyledGlossaryCategories>
61
72
  )}
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>
62
84
  </StyledGlossary>
63
85
  )
64
86
  }
@@ -11,24 +11,126 @@ interface GlossaryCategory {
11
11
  }
12
12
 
13
13
  const categories: GlossaryCategory[] = [
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
- ]
23
- },
24
- {
25
- name: 'B',
26
- items: [
27
- { slug: 'buff', name: 'Buff' },
28
- { slug: 'boss', name: 'Boss' },
29
- { slug: 'build', name: 'Build' }
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
@@ -21,6 +21,7 @@ export const StyledNoResultsContainer = styled.div`
21
21
  align-items: center;
22
22
  justify-content: center;
23
23
  margin-top: 6rem;
24
+ margin-bottom: 6rem;
24
25
  `
25
26
  export const StyledNoResultsTitle = styled.h1`
26
27
  color: ${colors.primary50};
@@ -39,3 +40,19 @@ export const StyledNoResultsSubtitle = styled.h4`
39
40
  font-size: 1.5rem;
40
41
  }
41
42
  `
43
+ export const StyledBackButtonContainer = styled.div`
44
+ width: 100%;
45
+ display: flex;
46
+ justify-content: flex-end;
47
+ margin-top: 4rem;
48
+
49
+ & > button {
50
+ text-transform: none;
51
+ font-size: 1.5rem;
52
+ height: 34px;
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: center;
56
+ font-weight: 700;
57
+ }
58
+ `;