oddsgate-ds 1.0.216 → 1.0.218
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/molecules/SearchBar/SearchBar.interface.d.ts +3 -1
- package/dist/cjs/types/components/organisms/Glossary/Glossary.component.d.ts +1 -14
- package/dist/cjs/types/components/organisms/Glossary/Glossary.interface.d.ts +13 -17
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/molecules/SearchBar/SearchBar.interface.d.ts +3 -1
- package/dist/esm/types/components/organisms/Glossary/Glossary.component.d.ts +1 -14
- package/dist/esm/types/components/organisms/Glossary/Glossary.interface.d.ts +13 -17
- package/dist/types.d.ts +13 -6
- package/package.json +1 -1
- package/src/components/molecules/SearchBar/SearchBar.component.tsx +5 -1
- package/src/components/molecules/SearchBar/SearchBar.interface.ts +3 -1
- package/src/components/organisms/Glossary/Glossary.component.tsx +2 -14
- package/src/components/organisms/Glossary/Glossary.interface.ts +14 -4
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface SearchBarProps {
|
|
3
3
|
value: string;
|
|
4
|
-
onChange
|
|
4
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
5
|
placeholder?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
6
8
|
}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
searchTerm: string;
|
|
4
|
-
setSearchTerm: (term: string) => void;
|
|
5
|
-
selectedCategory: string | null;
|
|
6
|
-
setSelectedCategory: (cat: string | null) => void;
|
|
7
|
-
categoryData: Record<string, {
|
|
8
|
-
title: string;
|
|
9
|
-
slug: string;
|
|
10
|
-
}[]>;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
backToTopButton?: boolean;
|
|
13
|
-
noResultsText?: string;
|
|
14
|
-
tryAnotherLetterText?: string;
|
|
15
|
-
};
|
|
2
|
+
import { GlossaryProps } from './Glossary.interface';
|
|
16
3
|
export declare const Glossary: React.FC<GlossaryProps>;
|
|
17
4
|
export default Glossary;
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
type GlossaryItem = {
|
|
1
|
+
export type GlossaryItem = {
|
|
2
2
|
title: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
name: string;
|
|
8
|
-
}[];
|
|
9
|
-
}[];
|
|
3
|
+
slug: string;
|
|
4
|
+
};
|
|
5
|
+
export type GlossaryCategoryData = {
|
|
6
|
+
[category: string]: GlossaryItem[];
|
|
10
7
|
};
|
|
11
8
|
export type GlossaryProps = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
name: string;
|
|
18
|
-
}[];
|
|
19
|
-
}[];
|
|
9
|
+
searchTerm: string;
|
|
10
|
+
setSearchTerm: (term: string) => void;
|
|
11
|
+
selectedCategory: string | null;
|
|
12
|
+
setSelectedCategory: (cat: string | null) => void;
|
|
13
|
+
categoryData: GlossaryCategoryData;
|
|
20
14
|
placeholder?: string;
|
|
15
|
+
backToTopButton?: string;
|
|
16
|
+
noResultsText?: string;
|
|
17
|
+
tryAnotherLetterText?: string;
|
|
21
18
|
};
|
|
22
|
-
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -434,8 +434,10 @@ declare const AwardBadge: ({ label, variant, }: IAwardBadge) => React__default.J
|
|
|
434
434
|
|
|
435
435
|
interface SearchBarProps {
|
|
436
436
|
value: string;
|
|
437
|
-
onChange
|
|
437
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
438
438
|
placeholder?: string;
|
|
439
|
+
onClick?: () => void;
|
|
440
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
439
441
|
}
|
|
440
442
|
|
|
441
443
|
declare const SearchBar: React__default.FC<SearchBarProps>;
|
|
@@ -746,20 +748,25 @@ type IProductsSlider = {
|
|
|
746
748
|
|
|
747
749
|
declare const ProductsSlider: ({ content, style, className, }: IProductsSlider) => React__default.JSX.Element;
|
|
748
750
|
|
|
751
|
+
type GlossaryItem = {
|
|
752
|
+
title: string;
|
|
753
|
+
slug: string;
|
|
754
|
+
};
|
|
755
|
+
type GlossaryCategoryData = {
|
|
756
|
+
[category: string]: GlossaryItem[];
|
|
757
|
+
};
|
|
749
758
|
type GlossaryProps = {
|
|
750
759
|
searchTerm: string;
|
|
751
760
|
setSearchTerm: (term: string) => void;
|
|
752
761
|
selectedCategory: string | null;
|
|
753
762
|
setSelectedCategory: (cat: string | null) => void;
|
|
754
|
-
categoryData:
|
|
755
|
-
title: string;
|
|
756
|
-
slug: string;
|
|
757
|
-
}[]>;
|
|
763
|
+
categoryData: GlossaryCategoryData;
|
|
758
764
|
placeholder?: string;
|
|
759
|
-
backToTopButton?:
|
|
765
|
+
backToTopButton?: string;
|
|
760
766
|
noResultsText?: string;
|
|
761
767
|
tryAnotherLetterText?: string;
|
|
762
768
|
};
|
|
769
|
+
|
|
763
770
|
declare const Glossary: React__default.FC<GlossaryProps>;
|
|
764
771
|
|
|
765
772
|
declare const iconsList: string[];
|
package/package.json
CHANGED
|
@@ -10,7 +10,9 @@ import { SearchBarProps } from './SearchBar.interface'
|
|
|
10
10
|
const SearchBar: React.FC<SearchBarProps> = ({
|
|
11
11
|
value,
|
|
12
12
|
onChange,
|
|
13
|
-
placeholder
|
|
13
|
+
placeholder,
|
|
14
|
+
onClick,
|
|
15
|
+
onKeyDown
|
|
14
16
|
}) => {
|
|
15
17
|
return (
|
|
16
18
|
<StyledGlossarySearch>
|
|
@@ -19,6 +21,8 @@ const SearchBar: React.FC<SearchBarProps> = ({
|
|
|
19
21
|
placeholder={placeholder}
|
|
20
22
|
value={value}
|
|
21
23
|
onChange={onChange}
|
|
24
|
+
onClick={onClick}
|
|
25
|
+
onKeyDown={onKeyDown}
|
|
22
26
|
/>
|
|
23
27
|
<SearchButton>
|
|
24
28
|
<Icon icon="icon-search" />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export interface SearchBarProps {
|
|
2
2
|
value: string
|
|
3
|
-
onChange
|
|
3
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void
|
|
4
4
|
placeholder?: string
|
|
5
|
+
onClick?: () => void
|
|
6
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void
|
|
5
7
|
}
|
|
@@ -7,24 +7,12 @@ import {
|
|
|
7
7
|
StyledNoResultsSubtitle,
|
|
8
8
|
StyledNoResultsTitle
|
|
9
9
|
} from './Glossary.themes'
|
|
10
|
-
|
|
11
10
|
import SearchBar from '@/components/molecules/SearchBar/SearchBar.component'
|
|
12
11
|
import GlossaryCategoryIndex from '@/components/molecules/CategoryIndex/CategoryIndex.component'
|
|
13
12
|
import CategoriesWrapper from '@/components/molecules/CategoriesWrapper/CategoriesWrapper.component'
|
|
14
13
|
import Button from '@/components/atoms/Button'
|
|
15
14
|
import Icon from '@/components/atoms/Icon'
|
|
16
|
-
|
|
17
|
-
type GlossaryProps = {
|
|
18
|
-
searchTerm: string
|
|
19
|
-
setSearchTerm: (term: string) => void
|
|
20
|
-
selectedCategory: string | null
|
|
21
|
-
setSelectedCategory: (cat: string | null) => void
|
|
22
|
-
categoryData: Record<string, { title: string; slug: string }[]>
|
|
23
|
-
placeholder?: string
|
|
24
|
-
backToTopButton?: boolean
|
|
25
|
-
noResultsText?: string
|
|
26
|
-
tryAnotherLetterText?: string
|
|
27
|
-
}
|
|
15
|
+
import { GlossaryProps } from './Glossary.interface'
|
|
28
16
|
|
|
29
17
|
export const Glossary: React.FC<GlossaryProps> = ({
|
|
30
18
|
searchTerm,
|
|
@@ -37,7 +25,7 @@ export const Glossary: React.FC<GlossaryProps> = ({
|
|
|
37
25
|
noResultsText,
|
|
38
26
|
tryAnotherLetterText
|
|
39
27
|
}) => {
|
|
40
|
-
|
|
28
|
+
|
|
41
29
|
const categoryNames = Object.keys(categoryData)
|
|
42
30
|
|
|
43
31
|
const noResults = categoryNames.every(
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
type GlossaryItem = {
|
|
1
|
+
export type GlossaryItem = {
|
|
2
2
|
title: string
|
|
3
|
-
|
|
3
|
+
slug: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export type GlossaryCategoryData = {
|
|
7
|
+
[category: string]: GlossaryItem[]
|
|
4
8
|
}
|
|
5
9
|
|
|
6
10
|
export type GlossaryProps = {
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
searchTerm: string
|
|
12
|
+
setSearchTerm: (term: string) => void
|
|
13
|
+
selectedCategory: string | null
|
|
14
|
+
setSelectedCategory: (cat: string | null) => void
|
|
15
|
+
categoryData: GlossaryCategoryData
|
|
9
16
|
placeholder?: string
|
|
17
|
+
backToTopButton?: string
|
|
18
|
+
noResultsText?: string
|
|
19
|
+
tryAnotherLetterText?: string
|
|
10
20
|
}
|