@citygross/components 0.7.78 → 0.7.80
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/build/@types/components/Button/Button.d.ts +2 -1
- package/build/@types/components/Button/Button.stories.d.ts +1 -0
- package/build/@types/components/Button/Button.styles.d.ts +10 -0
- package/build/@types/components/IconText/IconText.d.ts +9 -0
- package/build/@types/components/IconText/IconText.stories.d.ts +9 -0
- package/build/@types/components/IconText/IconText.styles.d.ts +5 -0
- package/build/@types/components/Nav/Nav.d.ts +20 -0
- package/build/@types/components/Nav/Nav.stories.d.ts +14 -0
- package/build/@types/components/Nav/Nav.styles.d.ts +19 -0
- package/build/@types/components/NavMainLink/NavMainLink.d.ts +9 -0
- package/build/@types/components/NavMainLink/NavMainLink.stories.d.ts +8 -0
- package/build/@types/components/NavMainLink/NavMainLink.styled.d.ts +6 -0
- package/build/@types/components/Pagination/Pagination.d.ts +2 -1
- package/build/@types/components/SearchBar/SearchBar.d.ts +13 -0
- package/build/@types/components/SearchBar/SearchBar.stories.d.ts +23 -0
- package/build/@types/components/SearchBar/SearchBar.styles.d.ts +19 -0
- package/build/@types/index.d.ts +7 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +7 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/cjs/components/src/components/Button/Button.js +5 -4
- package/build/cjs/components/src/components/Button/Button.js.map +1 -1
- package/build/cjs/components/src/components/Button/Button.styles.js +21 -10
- package/build/cjs/components/src/components/Button/Button.styles.js.map +1 -1
- package/build/cjs/components/src/components/Dropdown/Dropdown.js +24 -0
- package/build/cjs/components/src/components/Dropdown/Dropdown.js.map +1 -0
- package/build/cjs/components/src/components/Dropdown/Dropdown.styles.js +21 -0
- package/build/cjs/components/src/components/Dropdown/Dropdown.styles.js.map +1 -0
- package/build/cjs/components/src/components/IconText/IconText.styles.js +12 -0
- package/build/cjs/components/src/components/IconText/IconText.styles.js.map +1 -0
- package/build/cjs/components/src/components/Nav/Nav.styles.js +22 -0
- package/build/cjs/components/src/components/Nav/Nav.styles.js.map +1 -0
- package/build/cjs/components/src/components/NavMainLink/NavMainLink.styled.js +16 -0
- package/build/cjs/components/src/components/NavMainLink/NavMainLink.styled.js.map +1 -0
- package/build/cjs/components/src/components/Pagination/Pagination.js +5 -2
- package/build/cjs/components/src/components/Pagination/Pagination.js.map +1 -1
- package/build/cjs/components/src/components/SearchBar/SearchBar.styles.js +29 -0
- package/build/cjs/components/src/components/SearchBar/SearchBar.styles.js.map +1 -0
- package/build/cjs/components/src/components/SideModal/SideModal.js +28 -0
- package/build/cjs/components/src/components/SideModal/SideModal.js.map +1 -0
- package/build/cjs/components/src/components/SideModal/SideModal.styles.js +19 -0
- package/build/cjs/components/src/components/SideModal/SideModal.styles.js.map +1 -0
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +7 -0
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/cjs/components/src/index.js +13 -0
- package/build/cjs/components/src/index.js.map +1 -1
- package/build/cjs/design-tokens/build/index.js +9 -0
- package/build/cjs/design-tokens/build/index.js.map +1 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +7 -0
- package/build/es/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/es/components/src/components/Button/Button.js +6 -5
- package/build/es/components/src/components/Button/Button.js.map +1 -1
- package/build/es/components/src/components/Button/Button.styles.js +20 -11
- package/build/es/components/src/components/Button/Button.styles.js.map +1 -1
- package/build/es/components/src/components/Dropdown/Dropdown.js +16 -0
- package/build/es/components/src/components/Dropdown/Dropdown.js.map +1 -0
- package/build/es/components/src/components/Dropdown/Dropdown.styles.js +11 -0
- package/build/es/components/src/components/Dropdown/Dropdown.styles.js.map +1 -0
- package/build/es/components/src/components/IconText/IconText.styles.js +6 -0
- package/build/es/components/src/components/IconText/IconText.styles.js.map +1 -0
- package/build/es/components/src/components/Nav/Nav.styles.js +14 -0
- package/build/es/components/src/components/Nav/Nav.styles.js.map +1 -0
- package/build/es/components/src/components/NavMainLink/NavMainLink.styled.js +10 -0
- package/build/es/components/src/components/NavMainLink/NavMainLink.styled.js.map +1 -0
- package/build/es/components/src/components/Pagination/Pagination.js +5 -2
- package/build/es/components/src/components/Pagination/Pagination.js.map +1 -1
- package/build/es/components/src/components/SearchBar/SearchBar.styles.js +23 -0
- package/build/es/components/src/components/SearchBar/SearchBar.styles.js.map +1 -0
- package/build/es/components/src/components/SideModal/SideModal.js +20 -0
- package/build/es/components/src/components/SideModal/SideModal.js.map +1 -0
- package/build/es/components/src/components/SideModal/SideModal.styles.js +10 -0
- package/build/es/components/src/components/SideModal/SideModal.styles.js.map +1 -0
- package/build/es/components/src/components/WarningLabel/WarningLabel.js +7 -0
- package/build/es/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/es/components/src/index.js +10 -0
- package/build/es/components/src/index.js.map +1 -1
- package/build/es/design-tokens/build/index.js +9 -0
- package/build/es/design-tokens/build/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -18,5 +18,6 @@ export declare type TBaseButton = styles.TButton & {
|
|
|
18
18
|
xsSize?: keyof typeof ButtonSize;
|
|
19
19
|
children: React.ReactNode;
|
|
20
20
|
color?: TButtonColor;
|
|
21
|
+
buttonBadge?: string;
|
|
21
22
|
};
|
|
22
|
-
export declare function Button({ center, color, fullWidth, flexReverse, icon, selected, isDisabled, loading, noWrap, onClick, size, xsSize, children }: TBaseButton): JSX.Element;
|
|
23
|
+
export declare function Button({ center, color, fullWidth, flexReverse, icon, selected, isDisabled, loading, noWrap, onClick, size, xsSize, borderRadius, childGap, buttonBadge, children }: TBaseButton): JSX.Element;
|
|
@@ -47,3 +47,4 @@ export declare const WithIconButton: Story<TBaseButton>;
|
|
|
47
47
|
export declare const paginationButton: Story<TPaginationButton>;
|
|
48
48
|
export declare const iconButton: Story<TIconButton>;
|
|
49
49
|
export declare const SelectButton: Story<TBaseButton>;
|
|
50
|
+
export declare const ButtonWithBadge: Story<TBaseButton>;
|
|
@@ -9,9 +9,16 @@ export declare type TButton = {
|
|
|
9
9
|
isDisabled?: boolean;
|
|
10
10
|
loading?: boolean | null;
|
|
11
11
|
noWrap?: boolean;
|
|
12
|
+
borderRadius?: number;
|
|
13
|
+
childGap?: number;
|
|
12
14
|
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
13
15
|
};
|
|
14
16
|
declare type TButtonSize = keyof typeof ButtonSize;
|
|
17
|
+
declare type TBasePrimaryButton = TButton & {
|
|
18
|
+
color: string;
|
|
19
|
+
size: TButtonSize;
|
|
20
|
+
xsSize?: TButtonSize;
|
|
21
|
+
};
|
|
15
22
|
export declare type TBaseSmallButton = Omit<TButton, 'size' | 'flexReverse' | 'fullWidth' | 'center'> & {
|
|
16
23
|
width?: number;
|
|
17
24
|
height?: number;
|
|
@@ -23,12 +30,14 @@ export declare type TButtonLoadingSpinner = {
|
|
|
23
30
|
size?: TButtonSize;
|
|
24
31
|
xsSize?: TButtonSize;
|
|
25
32
|
};
|
|
33
|
+
export declare type TButtonChildContainer = Pick<TBasePrimaryButton, 'childGap' | 'flexReverse' | 'noWrap' | 'size'>;
|
|
26
34
|
export declare const BaseButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, TButton, never>;
|
|
27
35
|
export declare const BasePrimaryButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, TButton & {
|
|
28
36
|
color: string;
|
|
29
37
|
size: TButtonSize;
|
|
30
38
|
xsSize?: "small" | "medium" | "large" | undefined;
|
|
31
39
|
}, never>;
|
|
40
|
+
export declare const ButtonChildContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TButtonChildContainer, never>;
|
|
32
41
|
export declare const Loading: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
33
42
|
export declare const LoadingContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TButtonLoadingSpinner, never>;
|
|
34
43
|
export declare const LoadingSpinner: import("styled-components").StyledComponent<({ spinnerColor, borderColor, animationSpeedMs, size, ...props }: import("../../components/Spinner/Spinner").TSpinner) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -46,4 +55,5 @@ export declare const BasePaginationButton: import("styled-components").StyledCom
|
|
|
46
55
|
border?: string | undefined;
|
|
47
56
|
shadow?: boolean | undefined;
|
|
48
57
|
}, never>;
|
|
58
|
+
export declare const ButtonBadge: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
49
59
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type TIconText = {
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
showOnlyIcon?: boolean;
|
|
6
|
+
spacing?: number;
|
|
7
|
+
};
|
|
8
|
+
declare const IconText: ({ icon, spacing, children, showOnlyIcon }: TIconText) => JSX.Element;
|
|
9
|
+
export default IconText;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
import { TIconText } from './IconText';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
component: ({ icon, spacing, children, showOnlyIcon }: TIconText) => JSX.Element;
|
|
5
|
+
title: string;
|
|
6
|
+
argTypes: {};
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const Default: Story<TIconText>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { ChangeEventHandler } from 'react';
|
|
2
|
+
import { TNavMainLink } from '../NavMainLink/NavMainLink';
|
|
3
|
+
export declare type TNav = {
|
|
4
|
+
logo: React.ReactNode;
|
|
5
|
+
maxWidth?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
topPosition?: number;
|
|
8
|
+
mainLinks?: TNavMainLink[];
|
|
9
|
+
mainLinksBorderColor?: string;
|
|
10
|
+
rightContent?: React.ReactNode;
|
|
11
|
+
searchResultElement?: React.ReactNode;
|
|
12
|
+
searchPlaceHolder?: string;
|
|
13
|
+
searchCancelLabel?: React.ReactNode;
|
|
14
|
+
searchIcon?: React.ReactNode;
|
|
15
|
+
searchOnChange?: ChangeEventHandler<HTMLInputElement>;
|
|
16
|
+
searchValue?: string;
|
|
17
|
+
onSearchClick?: () => void;
|
|
18
|
+
};
|
|
19
|
+
declare const Nav: ({ logo, maxWidth, height, topPosition, mainLinks, mainLinksBorderColor, rightContent, searchResultElement, searchCancelLabel, searchIcon, searchPlaceHolder, searchOnChange, searchValue, onSearchClick }: TNav) => JSX.Element;
|
|
20
|
+
export default Nav;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
import { TNav } from './Nav';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
component: ({ logo, maxWidth, height, topPosition, mainLinks, mainLinksBorderColor, rightContent, searchResultElement, searchCancelLabel, searchIcon, searchPlaceHolder, searchOnChange, searchValue, onSearchClick }: TNav) => JSX.Element;
|
|
5
|
+
title: string;
|
|
6
|
+
argTypes: {
|
|
7
|
+
onScroll: {
|
|
8
|
+
control: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
export declare const Default: Story<TNav>;
|
|
14
|
+
export declare const mobileNav: Story<TNav>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare type TNav = {
|
|
2
|
+
background?: string;
|
|
3
|
+
topPosition?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
};
|
|
6
|
+
declare type TNavContainer = {
|
|
7
|
+
maxWidth?: number;
|
|
8
|
+
};
|
|
9
|
+
declare type TNavSearchOverlay = {
|
|
10
|
+
show?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const Nav: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TNav, never>;
|
|
13
|
+
export declare const NavContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TNavContainer, never>;
|
|
14
|
+
export declare const NavChildContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
+
export declare const NavMainLinks: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
16
|
+
export declare const NavDummySearchContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
17
|
+
export declare const NavSearchContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
+
export declare const SearchResultOverlay: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TNavSearchOverlay, never>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare type TNavMainLink = {
|
|
2
|
+
text: string;
|
|
3
|
+
href?: string;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
target?: '_blank' | '_self';
|
|
6
|
+
borderColor?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const NavMainLink: ({ text, href, target, active, borderColor }: TNavMainLink) => JSX.Element;
|
|
9
|
+
export default NavMainLink;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
import { TNavMainLink } from './NavMainLink';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
component: ({ text, href, target, active, borderColor }: TNavMainLink) => JSX.Element;
|
|
5
|
+
title: string;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Default: Story<TNavMainLink>;
|
|
@@ -3,5 +3,6 @@ export declare type TPagination = {
|
|
|
3
3
|
fetchItems: (page: number) => void;
|
|
4
4
|
currentPage: number;
|
|
5
5
|
itemsPerPage?: number;
|
|
6
|
+
setPage?: (page: number) => void;
|
|
6
7
|
};
|
|
7
|
-
export declare function Pagination({ totalItems, currentPage, fetchItems, itemsPerPage }: TPagination): JSX.Element;
|
|
8
|
+
export declare function Pagination({ totalItems, currentPage, fetchItems, itemsPerPage, setPage }: TPagination): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as styles from './SearchBar.styles';
|
|
3
|
+
export declare type TSearchBar = styles.SearchInputProps & {
|
|
4
|
+
cancelLabel?: React.ReactNode;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
resultBoxTopPosition?: string;
|
|
7
|
+
inputRef?: React.RefObject<HTMLInputElement>;
|
|
8
|
+
onCancelClick?: () => void;
|
|
9
|
+
isOpen?: boolean;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
declare const SearchBar: ({ flexGrow, isValid, inputSize, activeBorderColor, cancelLabel, icon, value, resultBoxTopPosition, children, inputRef, isOpen, onCancelClick, ...props }: TSearchBar) => JSX.Element;
|
|
13
|
+
export default SearchBar;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
component: ({ flexGrow, isValid, inputSize, activeBorderColor, cancelLabel, icon, value, resultBoxTopPosition, children, inputRef, isOpen, onCancelClick, ...props }: import("./SearchBar").TSearchBar) => JSX.Element;
|
|
4
|
+
title: string;
|
|
5
|
+
args: {
|
|
6
|
+
placeholder: string;
|
|
7
|
+
};
|
|
8
|
+
argTypes: {
|
|
9
|
+
disabled: {
|
|
10
|
+
control: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
placeholder: {
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
22
|
+
export declare const Default: Story;
|
|
23
|
+
export declare const WithRightIcon: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface SearchInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
readonly isValid?: boolean;
|
|
4
|
+
flexGrow?: number;
|
|
5
|
+
inputSize?: 'small' | 'medium';
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
activeBorderColor?: string;
|
|
8
|
+
}
|
|
9
|
+
declare type SearchResultContainerProps = {
|
|
10
|
+
background?: string;
|
|
11
|
+
topPosition?: string;
|
|
12
|
+
isOpen?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const SearchResultContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SearchResultContainerProps, never>;
|
|
15
|
+
export declare const SearchRightLabel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<SearchResultContainerProps, "isOpen">, never>;
|
|
16
|
+
export declare const SearchBarContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SearchInputProps, never>;
|
|
17
|
+
export declare const SearchInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, SearchInputProps, never>;
|
|
18
|
+
export declare const SearchLeftIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
|
+
export {};
|
package/build/@types/index.d.ts
CHANGED
|
@@ -59,3 +59,10 @@ export * from './containers/TwoColumnsContainer/TwoColumnsPageContainer';
|
|
|
59
59
|
export * from './components/UnorderedList';
|
|
60
60
|
export * from './components/WarningLabel/WarningLabel';
|
|
61
61
|
export * from './components/MobileTable';
|
|
62
|
+
export * from './components/Nav/Nav';
|
|
63
|
+
export * from './components/NavMainLink/NavMainLink';
|
|
64
|
+
export * from './components/SearchBar/SearchBar';
|
|
65
|
+
export * from './components/SideModal/SideModal';
|
|
66
|
+
export * from './components/IconText/IconText';
|
|
67
|
+
export * from './components/Logo/Logo';
|
|
68
|
+
export * from './components/Dropdown/Dropdown';
|
|
@@ -73,6 +73,13 @@ require('../../containers/TwoColumnsContainer/TwoColumnsPageContainer.styles.js'
|
|
|
73
73
|
require('../UnorderedList/UnorderedList.styles.js');
|
|
74
74
|
require('../WarningLabel/WarningLabel.styles.js');
|
|
75
75
|
require('../MobileTable/MobileTable.styles.js');
|
|
76
|
+
require('../NavMainLink/NavMainLink.styled.js');
|
|
77
|
+
require('../SearchBar/SearchBar.styles.js');
|
|
78
|
+
require('../Nav/Nav.styles.js');
|
|
79
|
+
require('framer-motion');
|
|
80
|
+
require('../SideModal/SideModal.styles.js');
|
|
81
|
+
require('../IconText/IconText.styles.js');
|
|
82
|
+
require('../Dropdown/Dropdown.styles.js');
|
|
76
83
|
|
|
77
84
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
78
85
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -26,19 +26,20 @@ exports.ButtonColor = void 0;
|
|
|
26
26
|
})(exports.ButtonColor || (exports.ButtonColor = {}));
|
|
27
27
|
function Button(_a) {
|
|
28
28
|
var _b;
|
|
29
|
-
var _c = _a.center, center = _c === void 0 ? true : _c, _d = _a.color, color = _d === void 0 ? 'primary' : _d, fullWidth = _a.fullWidth, flexReverse = _a.flexReverse, icon = _a.icon, selected = _a.selected, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, _e = _a.size, size = _e === void 0 ? 'large' : _e, xsSize = _a.xsSize, children = _a.children;
|
|
29
|
+
var _c = _a.center, center = _c === void 0 ? true : _c, _d = _a.color, color = _d === void 0 ? 'primary' : _d, fullWidth = _a.fullWidth, flexReverse = _a.flexReverse, icon = _a.icon, selected = _a.selected, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, _e = _a.size, size = _e === void 0 ? 'large' : _e, xsSize = _a.xsSize, borderRadius = _a.borderRadius, _f = _a.childGap, childGap = _f === void 0 ? 4 : _f, buttonBadge = _a.buttonBadge, children = _a.children;
|
|
30
30
|
return (React__default["default"].createElement(Button_styles.BasePrimaryButton, { center: center, color: designTokens.theme && designTokens.theme.palette
|
|
31
31
|
? selected
|
|
32
32
|
? (_b = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.white
|
|
33
33
|
: designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color]
|
|
34
|
-
: 'white', fullWidth: fullWidth, flexReverse: flexReverse, icon: icon, selected: selected, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, size: size, xsSize: xsSize, onClick: function (e) { return onClick && onClick(e); } },
|
|
34
|
+
: 'white', fullWidth: fullWidth, flexReverse: flexReverse, icon: icon, selected: selected, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, size: size, xsSize: xsSize, onClick: function (e) { return onClick && onClick(e); }, borderRadius: borderRadius, childGap: childGap },
|
|
35
35
|
loading && (React__default["default"].createElement(Button_styles.Loading, null,
|
|
36
36
|
React__default["default"].createElement(Button_styles.LoadingContainer, { xsSize: xsSize, size: size },
|
|
37
37
|
React__default["default"].createElement(Button_styles.LoadingSpinner, null)))),
|
|
38
|
-
icon ? (React__default["default"].createElement(
|
|
38
|
+
icon ? (React__default["default"].createElement(Button_styles.ButtonChildContainer, { size: size, flexReverse: flexReverse, noWrap: noWrap, childGap: childGap },
|
|
39
39
|
icon,
|
|
40
40
|
children)) : (children),
|
|
41
|
-
React__default["default"].createElement("span", { className: "ripple" })
|
|
41
|
+
React__default["default"].createElement("span", { className: "ripple" }),
|
|
42
|
+
buttonBadge && React__default["default"].createElement(Button_styles.ButtonBadge, null, buttonBadge)));
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
exports.Button = Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -62,15 +62,15 @@ var SpinnerSize = function (size) {
|
|
|
62
62
|
return '26px';
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
var BaseButton = styled__default["default"].button(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n /* reset */\n outline: none;\n border: none;\n\n backface-visibility: hidden;\n cursor: pointer;\n border-radius: ", "px;\n /* overflow: hidden; */\n pointer-events: ", ";\n -webkit-font-smoothing: antialiased;\n user-select: ", ";\n\n position: relative;\n\n /* typography */\n\n font-family: ", ";\n font-weight: ", ";\n text-align: ", ";\n white-space: ", ";\n\n /* colors */\n\n background: ", ";\n color: ", ";\n\n /* Width & Height */\n\n width: ", ";\n\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n /* Hover Effect */\n\n &:hover {\n ::after {\n opacity: 1;\n }\n }\n &:active {\n ::before {\n opacity: 1;\n }\n ::after {\n opacity: 0;\n }\n }\n /* Media Queries */\n\n @media (max-width: ", "px) {\n align-self: ", ";\n }\n"], ["\n /* reset */\n outline: none;\n border: none;\n\n backface-visibility: hidden;\n cursor: pointer;\n border-radius: ", "px;\n /* overflow: hidden; */\n pointer-events: ", ";\n -webkit-font-smoothing: antialiased;\n user-select: ", ";\n\n position: relative;\n\n /* typography */\n\n font-family: ", ";\n font-weight: ", ";\n text-align: ", ";\n white-space: ", ";\n\n /* colors */\n\n background: ", ";\n color: ", ";\n\n /* Width & Height */\n\n width: ", ";\n\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n /* Hover Effect */\n\n &:hover {\n ::after {\n opacity: 1;\n }\n }\n &:active {\n ::before {\n opacity: 1;\n }\n ::after {\n opacity: 0;\n }\n }\n /* Media Queries */\n\n @media (max-width: ", "px) {\n align-self: ", ";\n }\n"])), function (props) { var _a; return (_a = props.theme.attributes) === null ||
|
|
65
|
+
var BaseButton = styled__default["default"].button(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n /* reset */\n outline: none;\n border: none;\n\n backface-visibility: hidden;\n cursor: pointer;\n border-radius: ", "px;\n /* overflow: hidden; */\n pointer-events: ", ";\n -webkit-font-smoothing: antialiased;\n user-select: ", ";\n\n position: relative;\n\n /* typography */\n\n font-family: ", ";\n font-weight: ", ";\n text-align: ", ";\n white-space: ", ";\n\n /* colors */\n\n background: ", ";\n color: ", ";\n\n /* Width & Height */\n\n width: ", ";\n\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n /* Hover Effect */\n\n &:hover {\n ::after {\n opacity: 1;\n }\n }\n &:active {\n ::before {\n opacity: 1;\n }\n ::after {\n opacity: 0;\n }\n }\n /* Media Queries */\n\n @media (max-width: ", "px) {\n align-self: ", ";\n }\n"], ["\n /* reset */\n outline: none;\n border: none;\n\n backface-visibility: hidden;\n cursor: pointer;\n border-radius: ", "px;\n /* overflow: hidden; */\n pointer-events: ", ";\n -webkit-font-smoothing: antialiased;\n user-select: ", ";\n\n position: relative;\n\n /* typography */\n\n font-family: ", ";\n font-weight: ", ";\n text-align: ", ";\n white-space: ", ";\n\n /* colors */\n\n background: ", ";\n color: ", ";\n\n /* Width & Height */\n\n width: ", ";\n\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n /* Hover Effect */\n\n &:hover {\n ::after {\n opacity: 1;\n }\n }\n &:active {\n ::before {\n opacity: 1;\n }\n ::after {\n opacity: 0;\n }\n }\n /* Media Queries */\n\n @media (max-width: ", "px) {\n align-self: ", ";\n }\n"])), function (props) { var _a, _b; return (_a = props.borderRadius) !== null && _a !== void 0 ? _a : (_b = props.theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.extraSmall; }, function (props) { return (props.isDisabled ? 'none' : 'all'); }, function (props) { return props.isDisabled && 'none'; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.typography) === null || _b === void 0 ? void 0 : _b.type.primary; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.typography) === null || _b === void 0 ? void 0 : _b.weight.medium; }, function (props) { return (props.center ? 'center' : 'initial'); }, function (props) { return (props.noWrap ? 'nowrap' : 'normal'); }, function (props) { var _a, _b; return props.isDisabled ? (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.medium : props.color; }, function (props) {
|
|
66
66
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
67
67
|
return props.color === ((_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.secondary) ||
|
|
68
68
|
props.color === ((_d = (_c = props === null || props === void 0 ? void 0 : props.theme) === null || _c === void 0 ? void 0 : _c.palette) === null || _d === void 0 ? void 0 : _d.darkest) ||
|
|
69
69
|
props.isDisabled
|
|
70
70
|
? (_f = (_e = props === null || props === void 0 ? void 0 : props.theme) === null || _e === void 0 ? void 0 : _e.palette) === null || _f === void 0 ? void 0 : _f.white
|
|
71
71
|
: (_h = (_g = props === null || props === void 0 ? void 0 : props.theme) === null || _g === void 0 ? void 0 : _g.palette) === null || _h === void 0 ? void 0 : _h.darkest;
|
|
72
|
-
}, function (props) { return (props.fullWidth ? '100%' : 'auto'); }, function (props) { var _a; return (_a = props.theme.attributes) === null ||
|
|
73
|
-
var BasePrimaryButton = styled__default["default"](BaseButton)(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n /* TypoGraphy */\n\n font-size: ", ";\n line-height: ", ";\n\n /* shadow */\n\n box-shadow: ", ";\n\n /* Padding */\n\n padding: ", ";\n\n @media (min-width: ", "px) {\n font-size: ", ";\n\n padding: ", ";\n\n box-shadow: ", ";\n }\n
|
|
72
|
+
}, function (props) { return (props.fullWidth ? '100%' : 'auto'); }, function (props) { var _a, _b; return (_a = props.borderRadius) !== null && _a !== void 0 ? _a : (_b = props.theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.extraSmall; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow.buttonHover; }, function (props) { var _a; return (_a = props.theme.animations) === null || _a === void 0 ? void 0 : _a.buttonTransition; }, function (props) { var _a; return (_a = props.theme.animations) === null || _a === void 0 ? void 0 : _a.buttonTransition; }, function (props) { var _a, _b; return (_a = props.borderRadius) !== null && _a !== void 0 ? _a : (_b = props.theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.extraSmall; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow.buttonActive; }, function (props) { var _a; return (_a = props.theme.animations) === null || _a === void 0 ? void 0 : _a.buttonTransition; }, function (props) { var _a; return (_a = props.theme.animations) === null || _a === void 0 ? void 0 : _a.buttonTransition; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.breakpoints) === null || _b === void 0 ? void 0 : _b.xs; }, function (props) { return (props.center ? 'center' : 'initial'); });
|
|
73
|
+
var BasePrimaryButton = styled__default["default"](BaseButton)(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n /* TypoGraphy */\n\n font-size: ", ";\n line-height: ", ";\n\n /* shadow */\n\n box-shadow: ", ";\n\n /* Padding */\n\n padding: ", ";\n\n @media (min-width: ", "px) {\n font-size: ", ";\n\n padding: ", ";\n\n box-shadow: ", ";\n }\n"], ["\n /* TypoGraphy */\n\n font-size: ", ";\n line-height: ", ";\n\n /* shadow */\n\n box-shadow: ", ";\n\n /* Padding */\n\n padding: ", ";\n\n @media (min-width: ", "px) {\n font-size: ", ";\n\n padding: ", ";\n\n box-shadow: ", ";\n }\n"])), function (props) { return ButtonFontSize(props.xsSize || props.size); }, function (props) {
|
|
74
74
|
var _a, _b;
|
|
75
75
|
return props.size === 'small'
|
|
76
76
|
? ((_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight.s2) + "px"
|
|
@@ -104,11 +104,19 @@ var BasePrimaryButton = styled__default["default"](BaseButton)(templateObject_2
|
|
|
104
104
|
props.color === ((_k = (_j = props === null || props === void 0 ? void 0 : props.theme) === null || _j === void 0 ? void 0 : _j.palette) === null || _k === void 0 ? void 0 : _k.lightest)
|
|
105
105
|
? "inset 0px 0px 0px 1px " + ((_l = props.theme.palette) === null || _l === void 0 ? void 0 : _l.medium)
|
|
106
106
|
: 'none';
|
|
107
|
-
}
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
});
|
|
108
|
+
var ButtonChildContainer = styled__default["default"].div(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n width: 100%;\n gap: ", "px;\n align-items: center;\n justify-content: center;\n flex-wrap: ", ";\n"], ["\n display: flex;\n flex-direction: ", ";\n width: 100%;\n gap: ", "px;\n align-items: center;\n justify-content: center;\n flex-wrap: ", ";\n"])), function (props) { return (props.flexReverse ? 'row-reverse' : 'row'); }, function (props) {
|
|
109
|
+
var _a, _b;
|
|
110
|
+
return props.childGap
|
|
111
|
+
? props.childGap
|
|
112
|
+
: props.size === 'small'
|
|
113
|
+
? (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonChildSmallGap
|
|
114
|
+
: (_b = props.theme.constants) === null || _b === void 0 ? void 0 : _b.buttonChildGap;
|
|
115
|
+
}, function (props) { return (props.noWrap ? 'nowrap' : 'wrap'); });
|
|
116
|
+
var Loading = styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n position: absolute;\n z-index: 3;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n"], ["\n position: absolute;\n z-index: 3;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n"])));
|
|
117
|
+
var LoadingContainer = styled__default["default"].div(templateObject_5 || (templateObject_5 = _tslib.__makeTemplateObject(["\n width: ", ";\n height: ", ";\n\n @media (min-width: ", "px) {\n width: ", ";\n height: ", ";\n }\n"], ["\n width: ", ";\n height: ", ";\n\n @media (min-width: ", "px) {\n width: ", ";\n height: ", ";\n }\n"])), function (props) { return SpinnerSize(props.xsSize || props.size); }, function (props) { return SpinnerSize(props.xsSize || props.size); }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { return SpinnerSize(props.size); }, function (props) { return SpinnerSize(props.size); });
|
|
118
|
+
var LoadingSpinner = styled__default["default"](Spinner.Spinner)(templateObject_6 || (templateObject_6 = _tslib.__makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
|
|
119
|
+
var BaseIconButton = styled__default["default"](BaseButton)(templateObject_7 || (templateObject_7 = _tslib.__makeTemplateObject(["\n padding: ", "px;\n border-radius: 50%;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin: 0;\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n ", ";\n\n &::after {\n border-radius: 50%;\n box-shadow: ", ";\n }\n &::before {\n border-radius: 50%;\n }\n"], ["\n padding: ", "px;\n border-radius: 50%;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin: 0;\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n ", ";\n\n &::after {\n border-radius: 50%;\n box-shadow: ", ";\n }\n &::before {\n border-radius: 50%;\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; }, function (props) { return props.height || 32; }, function (props) { return props.width || 32; }, function (props) { return props.width || 32; }, function (props) {
|
|
112
120
|
var _a;
|
|
113
121
|
return props.shadow && props.border
|
|
114
122
|
? "box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.15), inset 0px 0px 0px 1px " + ((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium)
|
|
@@ -118,18 +126,21 @@ var BaseIconButton = styled__default["default"](BaseButton)(templateObject_6 ||
|
|
|
118
126
|
? "box-shadow: inset 0px 0px 0px 1px " + props.border
|
|
119
127
|
: '';
|
|
120
128
|
}, function (props) { var _a, _b; return (_b = (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow) === null || _b === void 0 ? void 0 : _b.iconButtonHover; });
|
|
121
|
-
var BasePaginationButton = styled__default["default"](BaseButton)(
|
|
129
|
+
var BasePaginationButton = styled__default["default"](BaseButton)(templateObject_8 || (templateObject_8 = _tslib.__makeTemplateObject(["\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n text-align: center;\n ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n"], ["\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n text-align: center;\n ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n"])), function (props) { return props.height || 36; }, function (props) { return props.width || 36; }, function (props) { return props.width || 36; }, function (props) {
|
|
122
130
|
var _a, _b, _c;
|
|
123
131
|
return props.color !== ((_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.white)
|
|
124
132
|
? 'box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.15)'
|
|
125
133
|
: "box-shadow: inset 0px 0px 0px 1px " + ((_c = props.theme.palette) === null || _c === void 0 ? void 0 : _c.medium);
|
|
126
134
|
});
|
|
127
|
-
var
|
|
135
|
+
var ButtonBadge = styled__default["default"].div(templateObject_9 || (templateObject_9 = _tslib.__makeTemplateObject(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: 0 7px;\n background: black;\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n"], ["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: 0 7px;\n background: black;\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeTopPosition; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeRightPosition; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size) === null || _b === void 0 ? void 0 : _b.xs; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight) === null || _b === void 0 ? void 0 : _b.xs; });
|
|
136
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
128
137
|
|
|
129
138
|
exports.BaseButton = BaseButton;
|
|
130
139
|
exports.BaseIconButton = BaseIconButton;
|
|
131
140
|
exports.BasePaginationButton = BasePaginationButton;
|
|
132
141
|
exports.BasePrimaryButton = BasePrimaryButton;
|
|
142
|
+
exports.ButtonBadge = ButtonBadge;
|
|
143
|
+
exports.ButtonChildContainer = ButtonChildContainer;
|
|
133
144
|
exports.Loading = Loading;
|
|
134
145
|
exports.LoadingContainer = LoadingContainer;
|
|
135
146
|
exports.LoadingSpinner = LoadingSpinner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var framerMotion = require('framer-motion');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var Dropdown_styles = require('./Dropdown.styles.js');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
|
+
|
|
13
|
+
var Dropdown = function (_a) {
|
|
14
|
+
var isOpen = _a.isOpen, onClick = _a.onClick, dropdownHeader = _a.dropdownHeader, children = _a.children;
|
|
15
|
+
return (React__default["default"].createElement(Dropdown_styles.DropdownContainer, null,
|
|
16
|
+
React__default["default"].createElement(Dropdown_styles.DropdownHeader, { onClick: onClick }, dropdownHeader),
|
|
17
|
+
React__default["default"].createElement(framerMotion.AnimatePresence, { initial: false }, isOpen && (React__default["default"].createElement(Dropdown_styles.DropdownChildContainer, { isOpen: isOpen, initial: "collapsed", animate: "open", exit: "collapsed", variants: {
|
|
18
|
+
open: { height: 'auto' },
|
|
19
|
+
collapsed: { height: 0 }
|
|
20
|
+
}, transition: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] } }, children)))));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.Dropdown = Dropdown;
|
|
24
|
+
//# sourceMappingURL=Dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
6
|
+
var styled = require('styled-components');
|
|
7
|
+
var framerMotion = require('framer-motion');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
12
|
+
|
|
13
|
+
var DropdownContainer = styled__default["default"](framerMotion.motion.div)(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject([""], [""])));
|
|
14
|
+
var DropdownHeader = styled__default["default"](framerMotion.motion.div)(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n cursor: pointer;\n"], ["\n cursor: pointer;\n"])));
|
|
15
|
+
var DropdownChildContainer = styled__default["default"](framerMotion.motion.div)(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n overflow: hidden;\n"], ["\n overflow: hidden;\n"])));
|
|
16
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
17
|
+
|
|
18
|
+
exports.DropdownChildContainer = DropdownChildContainer;
|
|
19
|
+
exports.DropdownContainer = DropdownContainer;
|
|
20
|
+
exports.DropdownHeader = DropdownHeader;
|
|
21
|
+
//# sourceMappingURL=Dropdown.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
4
|
+
var styled = require('styled-components');
|
|
5
|
+
|
|
6
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
|
+
|
|
8
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
9
|
+
|
|
10
|
+
styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n display: flex;\n gap: ", "px;\n align-items: center;\n flex-wrap: nowrap;\n white-space: nowrap;\n"], ["\n display: flex;\n gap: ", "px;\n align-items: center;\n flex-wrap: nowrap;\n white-space: nowrap;\n"])), function (props) { var _a, _b; return (_a = props.spacing) !== null && _a !== void 0 ? _a : (_b = props.theme.spacings) === null || _b === void 0 ? void 0 : _b.xs; });
|
|
11
|
+
var templateObject_1;
|
|
12
|
+
//# sourceMappingURL=IconText.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconText.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
6
|
+
var styled = require('styled-components');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
+
|
|
12
|
+
styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n display: flex;\n background: ", ";\n position: fixed;\n top: ", "px;\n left: 0;\n height: ", "px;\n width: 100%;\n align-items: center;\n\n @media (min-width: ", "px) {\n height: ", "px;\n }\n"], ["\n display: flex;\n background: ", ";\n position: fixed;\n top: ", "px;\n left: 0;\n height: ", "px;\n width: 100%;\n align-items: center;\n\n @media (min-width: ", "px) {\n height: ", "px;\n }\n"])), function (props) { var _a, _b; return (_a = props === null || props === void 0 ? void 0 : props.background) !== null && _a !== void 0 ? _a : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.white; }, function (props) { var _a; return (_a = props.topPosition) !== null && _a !== void 0 ? _a : 0; }, function (props) { var _a, _b; return (_a = props === null || props === void 0 ? void 0 : props.height) !== null && _a !== void 0 ? _a : (_b = props.theme.constants) === null || _b === void 0 ? void 0 : _b.navHeaderHeightSmall; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.md; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.navHeaderHeight; });
|
|
13
|
+
styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n margin: 0 auto;\n max-width: ", "px;\n width: 100%;\n display: flex;\n padding: ", "px;\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n"], ["\n margin: 0 auto;\n max-width: ", "px;\n width: 100%;\n display: flex;\n padding: ", "px;\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n"])), function (props) { return props.maxWidth; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; });
|
|
14
|
+
styled__default["default"].div(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n justify-content: flex-end;\n display: flex;\n flex: 1;\n align-items: center;\n z-index: 20;\n"], ["\n justify-content: flex-end;\n display: flex;\n flex: 1;\n align-items: center;\n z-index: 20;\n"])));
|
|
15
|
+
styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n display: none;\n @media (min-width: ", "px) {\n height: 100%;\n display: flex;\n\n gap: ", "px;\n align-items: center;\n width: auto;\n margin-left: ", "px;\n }\n"], ["\n display: none;\n @media (min-width: ", "px) {\n height: 100%;\n display: flex;\n\n gap: ", "px;\n align-items: center;\n width: auto;\n margin-left: ", "px;\n }\n"])), function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; });
|
|
16
|
+
var NavDummySearchContainer = styled__default["default"].div(templateObject_5 || (templateObject_5 = _tslib.__makeTemplateObject(["\n margin-left: ", "px;\n display: flex;\n align-items: center;\n flex: 1;\n"], ["\n margin-left: ", "px;\n display: flex;\n align-items: center;\n flex: 1;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; });
|
|
17
|
+
styled__default["default"](NavDummySearchContainer)(templateObject_6 || (templateObject_6 = _tslib.__makeTemplateObject(["\n display: none;\n @media (min-width: ", "px) {\n display: flex;\n }\n"], ["\n display: none;\n @media (min-width: ", "px) {\n display: flex;\n }\n"])), function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.md; });
|
|
18
|
+
styled__default["default"].div(templateObject_7 || (templateObject_7 = _tslib.__makeTemplateObject(["\n display: ", ";\n background: #333;\n opacity: 0.5;\n width: 100vw;\n height: ", ";\n position: fixed;\n top: ", ";\n left: 0;\n overflow: hidden;\n z-index: 10;\n @media (min-width: ", "px) {\n height: calc(100vh - ", "px);\n top: ", ";\n }\n"], ["\n display: ", ";\n background: #333;\n opacity: 0.5;\n width: 100vw;\n height: ", ";\n position: fixed;\n top: ", ";\n left: 0;\n overflow: hidden;\n z-index: 10;\n @media (min-width: ", "px) {\n height: calc(100vh - ", "px);\n top: ", ";\n }\n"])), function (props) { return (props.show ? 'block' : 'none'); }, function (props) { var _a; return "calc(100vh - " + ((_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.navHeaderHeightSmall) + "px)"; }, function (props) { var _a, _b; return "calc(" + ((_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.navHeaderHeightSmall) + "px - " + ((_b = props.theme.spacings) === null || _b === void 0 ? void 0 : _b.xs) + "px)"; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.md; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.navHeaderHeight; }, function (props) { var _a; return "calc(" + ((_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.navHeaderHeight) + "px - 8px)"; });
|
|
19
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
20
|
+
|
|
21
|
+
exports.NavDummySearchContainer = NavDummySearchContainer;
|
|
22
|
+
//# sourceMappingURL=Nav.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Nav.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
4
|
+
var styled = require('styled-components');
|
|
5
|
+
|
|
6
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
|
+
|
|
8
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
9
|
+
|
|
10
|
+
styled__default["default"].a(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n height: 100%;\n display: inline-flex;\n cursor: pointer;\n align-items: center;\n white-space: nowrap;\n font-weight: ", ";\n ", ";\n &:hover {\n box-shadow: inset 0 -4px 0 ", ";\n }\n"], ["\n height: 100%;\n display: inline-flex;\n cursor: pointer;\n align-items: center;\n white-space: nowrap;\n font-weight: ", ";\n ", ";\n &:hover {\n box-shadow: inset 0 -4px 0 ", ";\n }\n"])), function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.weight.semiBold; }, function (props) {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
return (props === null || props === void 0 ? void 0 : props.active) &&
|
|
13
|
+
"\n box-shadow: inset 0 -4px 0 " + ((_a = props === null || props === void 0 ? void 0 : props.borderColor) !== null && _a !== void 0 ? _a : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.primary) + ";\n ";
|
|
14
|
+
}, function (props) { var _a, _b; return (_a = props === null || props === void 0 ? void 0 : props.borderColor) !== null && _a !== void 0 ? _a : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.primary; });
|
|
15
|
+
var templateObject_1;
|
|
16
|
+
//# sourceMappingURL=NavMainLink.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavMainLink.styled.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -38,12 +38,15 @@ function createPagination(totalItems, itemsPerPage) {
|
|
|
38
38
|
return pagination;
|
|
39
39
|
}
|
|
40
40
|
function Pagination(_a) {
|
|
41
|
-
var totalItems = _a.totalItems, currentPage = _a.currentPage, fetchItems = _a.fetchItems, itemsPerPage = _a.itemsPerPage;
|
|
41
|
+
var totalItems = _a.totalItems, currentPage = _a.currentPage, fetchItems = _a.fetchItems, itemsPerPage = _a.itemsPerPage, setPage = _a.setPage;
|
|
42
42
|
var _b = React.useState(Math.floor((currentPage - 1) / 4)), currentIndex = _b[0], setIndex = _b[1];
|
|
43
43
|
var pagination = createPagination(totalItems, itemsPerPage);
|
|
44
44
|
return (React__default["default"].createElement(Box.Box, null, pagination && pagination.length > 0 && (React__default["default"].createElement(Pagination_styles.Flex, null,
|
|
45
45
|
currentIndex > 0 && (React__default["default"].createElement(Pagination_styles.PaginationButtonWrapper, null,
|
|
46
|
-
React__default["default"].createElement(PaginationButton.PaginationButton, { color: 'white', onClick: function () {
|
|
46
|
+
React__default["default"].createElement(PaginationButton.PaginationButton, { color: 'white', onClick: function () {
|
|
47
|
+
setPage && setPage(currentPage - 1);
|
|
48
|
+
setIndex(currentIndex - 1);
|
|
49
|
+
}, width: 36, height: 36 }, '...'))),
|
|
47
50
|
pagination[currentIndex].map(function (page) { return (React__default["default"].createElement(Pagination_styles.PaginationButtonWrapper, { key: page },
|
|
48
51
|
React__default["default"].createElement(PaginationButton.PaginationButton, { color: currentPage === page + 1 ? 'primary' : 'white', width: 36, height: 36, onClick: function () { return fetchItems(page + 1); } }, page + 1))); }),
|
|
49
52
|
pagination.length > 1 && currentIndex < pagination.length - 1 && (React__default["default"].createElement(Pagination_styles.PaginationButtonWrapper, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Pagination.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|