@make-software/csprclick-ui 2.0.0-beta.6 → 2.0.0
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/lib/assets/icons/ic-click-web-wallet.svg +4 -0
- package/dist/cjs/lib/assets/icons/ic-left-short.svg +3 -0
- package/dist/cjs/lib/index.js +15 -23
- package/dist/cjs/lib/lib/ChangeAccountConfirmation/ChangeAccountConfirmation.d.ts +1 -1
- package/dist/cjs/lib/lib/CrossNavigationMenu/InnerMenu.d.ts +2 -1
- package/dist/cjs/lib/lib/CustomSettingsSelector/components/ItemIcon.d.ts +2 -1
- package/dist/cjs/lib/lib/SwitchCurrency/components/CurrencyItemContainer.d.ts +2 -1
- package/dist/cjs/lib/lib/ThemeMobileSwitch/ThemeMobileSwitch.d.ts +8 -0
- package/dist/cjs/lib/lib/ThemeMobileSwitch/components/ThemeIcon.d.ts +6 -0
- package/dist/cjs/lib/lib/ThemeMobileSwitch/styles.d.ts +4 -0
- package/dist/cjs/lib/lib/ThemeMobileSwitch/utils.d.ts +1 -0
- package/dist/cjs/lib/lib/TopBar/components/mobile-menu/BaseDrawer.d.ts +7 -0
- package/dist/cjs/lib/lib/TopBar/components/mobile-menu/DropdownPopupItem.d.ts +13 -0
- package/dist/cjs/lib/lib/TopBar/components/{MobileDropdownContainer.d.ts → mobile-menu/MobileDropdownContainer.d.ts} +2 -3
- package/dist/cjs/lib/lib/TopBar/components/mobile-menu/constants.d.ts +22 -0
- package/dist/cjs/lib/lib/TopBar/hooks/useClickBadge.d.ts +3 -2
- package/dist/cjs/lib/lib/TransactionReview/TransactionReviewHandler.d.ts +1 -0
- package/dist/cjs/lib/lib/helpers/use-arrows-navigation.d.ts +12 -0
- package/dist/index.d.ts +3 -3
- package/dist/lib/assets/icons/ic-click-web-wallet.svg +4 -0
- package/dist/lib/assets/icons/ic-left-short.svg +3 -0
- package/dist/lib/index.js +15 -23
- package/package.json +3 -3
- package/dist/cjs/lib/lib/TopBar/components/DropdownPopupItem.d.ts +0 -11
|
@@ -2,5 +2,5 @@ import { ThemeModeType } from '../types';
|
|
|
2
2
|
interface ChangeAccountConfirmationProps {
|
|
3
3
|
themeMode?: ThemeModeType;
|
|
4
4
|
}
|
|
5
|
-
export declare const ChangeAccountConfirmation: (props: ChangeAccountConfirmationProps) =>
|
|
5
|
+
export declare const ChangeAccountConfirmation: (props: ChangeAccountConfirmationProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
6
|
export default ChangeAccountConfirmation;
|
|
@@ -5,5 +5,6 @@ export interface InnerMenuProps {
|
|
|
5
5
|
onClickCaption?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
6
|
isOpen: boolean;
|
|
7
7
|
menuItems: CrossAppMenuItemSettings[] | undefined;
|
|
8
|
+
setIsOpen?: (isOpen: boolean) => void;
|
|
8
9
|
}
|
|
9
|
-
export declare const InnerMenu: ({ caption, menuItems, isOpen, onClickCaption }: InnerMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const InnerMenu: ({ caption, menuItems, isOpen, onClickCaption, setIsOpen }: InnerMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
interface ItemIconProps {
|
|
3
3
|
margin?: string;
|
|
4
4
|
icon?: React.ReactNode;
|
|
5
|
+
alt?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function ItemIcon({ margin, icon }: ItemIconProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function ItemIcon({ margin, icon, alt }: ItemIconProps): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CurrencySettings } from '../../types';
|
|
2
2
|
interface CurrencyDisplayOptions {
|
|
3
3
|
columnAmount?: number;
|
|
4
|
+
dropdownId?: string;
|
|
4
5
|
}
|
|
5
6
|
interface CurrencyItemContainerProps extends CurrencySettings, CurrencyDisplayOptions {
|
|
6
7
|
}
|
|
7
|
-
export declare const CurrencyItemContainer: ({ currencies, onChangeCurrency, currentCurrency, columnAmount }: CurrencyItemContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const CurrencyItemContainer: ({ currencies, onChangeCurrency, currentCurrency, columnAmount, dropdownId }: CurrencyItemContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ThemeModeType } from '@make-software/cspr-design';
|
|
2
|
+
export declare const ThemeModeIconPath: Record<ThemeModeType, string>;
|
|
3
|
+
interface ThemeSwitchProps {
|
|
4
|
+
onThemeSwitch: () => void;
|
|
5
|
+
currentTheme?: ThemeModeType;
|
|
6
|
+
}
|
|
7
|
+
declare const ThemeMobileSwitch: ({ onThemeSwitch, currentTheme, }: ThemeSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ThemeMobileSwitch;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledSvgIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@make-software/cspr-design").SvgIconProps & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
3
|
+
screenType?: string | undefined;
|
|
4
|
+
}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const capitalize: (str: string) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactModal, { Props } from 'react-modal';
|
|
3
|
+
export interface ModalProps extends Props {
|
|
4
|
+
children: any;
|
|
5
|
+
}
|
|
6
|
+
export declare const BaseDrawer: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<ReactModal>>;
|
|
7
|
+
export default BaseDrawer;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface DropdownPopupItemProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: (e: any) => void;
|
|
5
|
+
onGoBack?: (e: any) => void;
|
|
6
|
+
popupTitle?: string | React.ReactNode;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
height?: string;
|
|
9
|
+
width?: string;
|
|
10
|
+
currentItem?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const DropdownPopupItem: ({ isOpen, onClose, onGoBack, children, popupTitle, height, width, currentItem }: DropdownPopupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CurrencySettings, CustomTopBarMenuSettings, LanguageSettings, NetworkSettings, ThemeModeType } from '
|
|
2
|
+
import { CurrencySettings, CustomTopBarMenuSettings, LanguageSettings, NetworkSettings, ThemeModeType } from '../../../types';
|
|
3
3
|
export interface MobileDropdownContainerProps {
|
|
4
4
|
currencySettings?: CurrencySettings;
|
|
5
5
|
languageSettings?: LanguageSettings;
|
|
@@ -8,8 +8,7 @@ export interface MobileDropdownContainerProps {
|
|
|
8
8
|
onThemeSwitch?: () => void;
|
|
9
9
|
customTopBarMenuSettings?: CustomTopBarMenuSettings[];
|
|
10
10
|
}
|
|
11
|
-
export declare const NavDropDownItemWrapper: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("@make-software/cspr-design").FlexRowProps & React.RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
12
11
|
export declare const StyledCommonItemIcon: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("@make-software/cspr-design").SvgIconProps & React.RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
13
12
|
export declare const StyledPopupTitle: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("@make-software/cspr-design").BodyTextProps & React.RefAttributes<HTMLSpanElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
-
|
|
13
|
+
declare const MobileDropdownContainer: ({ currencySettings, languageSettings, networkSettings, themeMode, onThemeSwitch, customTopBarMenuSettings }: MobileDropdownContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
export default MobileDropdownContainer;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const DRAWER_TYPES: {
|
|
2
|
+
readonly MAIN: "main";
|
|
3
|
+
readonly LANGUAGE: "language";
|
|
4
|
+
readonly CURRENCY: "currency";
|
|
5
|
+
readonly NETWORK: "network";
|
|
6
|
+
readonly CUSTOM: "custom";
|
|
7
|
+
readonly THEME: "theme";
|
|
8
|
+
};
|
|
9
|
+
export type DrawerState = {
|
|
10
|
+
type: typeof DRAWER_TYPES.MAIN;
|
|
11
|
+
} | {
|
|
12
|
+
type: typeof DRAWER_TYPES.LANGUAGE;
|
|
13
|
+
} | {
|
|
14
|
+
type: typeof DRAWER_TYPES.CURRENCY;
|
|
15
|
+
} | {
|
|
16
|
+
type: typeof DRAWER_TYPES.NETWORK;
|
|
17
|
+
} | {
|
|
18
|
+
type: typeof DRAWER_TYPES.THEME;
|
|
19
|
+
} | {
|
|
20
|
+
type: typeof DRAWER_TYPES.CUSTOM;
|
|
21
|
+
menuIndex: number;
|
|
22
|
+
} | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { BadgeSettings } from '@make-software/csprclick-core-types';
|
|
1
2
|
export declare const useClickBadge: () => {
|
|
2
|
-
setLeftBadge: (config: BadgeSettings) => void;
|
|
3
|
-
setRightBadge: (config: BadgeSettings) => void;
|
|
3
|
+
setLeftBadge: (config: BadgeSettings | null) => void;
|
|
4
|
+
setRightBadge: (config: BadgeSettings | null) => void;
|
|
4
5
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
interface UseArrowNavigationProps {
|
|
3
|
+
items: any[] | undefined;
|
|
4
|
+
dropdownId: string | undefined;
|
|
5
|
+
}
|
|
6
|
+
interface UseArrowNavigationReturnValue {
|
|
7
|
+
activeIndex: number;
|
|
8
|
+
onKeyDown: (e: KeyboardEvent) => void;
|
|
9
|
+
itemRefs: MutableRefObject<any[]>;
|
|
10
|
+
}
|
|
11
|
+
declare const useArrowsNavigation: ({ items, dropdownId }: UseArrowNavigationProps) => UseArrowNavigationReturnValue;
|
|
12
|
+
export default useArrowsNavigation;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { WALLET_KEYS, AccountType, ICSPRClickSDK, CsprClickInitOptions } from '@make-software/csprclick-core-types';
|
|
2
|
+
import { WALLET_KEYS, AccountType, ICSPRClickSDK, CsprClickInitOptions, BadgeSettings } from '@make-software/csprclick-core-types';
|
|
3
3
|
import * as styled_components from 'styled-components';
|
|
4
4
|
import * as _make_software_cspr_design from '@make-software/cspr-design';
|
|
5
5
|
import React from 'react';
|
|
@@ -461,8 +461,8 @@ interface TopBarProps {
|
|
|
461
461
|
declare function TopBar(props: TopBarProps): react_jsx_runtime.JSX.Element;
|
|
462
462
|
|
|
463
463
|
declare const useClickBadge: () => {
|
|
464
|
-
setLeftBadge: (config: BadgeSettings) => void;
|
|
465
|
-
setRightBadge: (config: BadgeSettings) => void;
|
|
464
|
+
setLeftBadge: (config: BadgeSettings | null) => void;
|
|
465
|
+
setRightBadge: (config: BadgeSettings | null) => void;
|
|
466
466
|
};
|
|
467
467
|
|
|
468
468
|
type BadgeBackgroundColor = 'green' | 'violet' | 'blue' | 'gray' | 'fillBlueGradient';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="99" height="98" viewBox="0 0 99 98" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M81.502 26.9697H94.0762C96.2853 26.9697 98.0762 28.7606 98.0762 30.9697V64.415C98.0762 66.6242 96.2853 68.415 94.0762 68.415H81.502V80.2529C81.502 85.7758 77.0248 90.2529 71.502 90.2529H10.3809C4.85801 90.2529 0.380859 85.7758 0.380859 80.2529V15.1318C0.380859 9.60899 4.85801 5.13184 10.3809 5.13184H71.502C77.0248 5.13184 81.502 9.60899 81.502 15.1318V26.9697ZM36.6055 47.6924C36.6055 59.1275 45.8754 68.3975 57.3105 68.3975H81.502V26.9873H57.3105C45.8754 26.9873 36.6055 36.2573 36.6055 47.6924Z" fill="#FF0012"/>
|
|
3
|
+
<circle cx="60.1377" cy="48.5605" r="7.65723" fill="#FF0012"/>
|
|
4
|
+
</svg>
|