react-asc 23.7.2 → 25.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/components/Button/Button.d.ts +2 -2
- package/components/FloatingActionButton/FloatingActionButton.d.ts +1 -1
- package/components/Icon/Icon.d.ts +2 -1
- package/components/IconButton/IconButton.d.ts +1 -1
- package/components/List/ListItemAvatar.d.ts +1 -1
- package/components/List/ListItemIcon.d.ts +1 -1
- package/components/Menu/Menu.d.ts +2 -2
- package/components/Menu/MenuBody.d.ts +2 -2
- package/components/Menu/MenuItem.d.ts +3 -8
- package/components/Modal/GlobalModal.d.ts +3 -2
- package/components/Modal/modal.service.d.ts +5 -4
- package/components/Snackbar/snackbar.service.d.ts +3 -2
- package/components/SpeedDial/SpeedDialAction.d.ts +1 -1
- package/components/Tabs/Tab.d.ts +0 -2
- package/components/Tabs/TabContext.d.ts +8 -0
- package/components/Tabs/Tabs.d.ts +2 -6
- package/hooks/useWindowSize.d.ts +3 -2
- package/index.es.js +308 -253
- package/index.js +308 -252
- package/package.json +5 -5
- package/react-asc.scss +2 -0
|
@@ -5,8 +5,8 @@ export interface IButtonProps extends React.ComponentProps<'button'> {
|
|
|
5
5
|
isActive?: boolean;
|
|
6
6
|
isRounded?: boolean;
|
|
7
7
|
variant?: VARIANT;
|
|
8
|
-
startIcon?: React.
|
|
9
|
-
endIcon?: React.
|
|
8
|
+
startIcon?: React.ReactNode;
|
|
9
|
+
endIcon?: React.ReactNode;
|
|
10
10
|
shadow?: boolean;
|
|
11
11
|
block?: boolean;
|
|
12
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { COLOR, SIZE } from '../component.enums';
|
|
3
3
|
export interface IFloatingActionButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
4
|
-
icon?: React.
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
5
|
color?: COLOR;
|
|
6
6
|
size?: SIZE;
|
|
7
7
|
fixed?: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
2
|
import { COLOR } from '../component.enums';
|
|
3
3
|
export interface IIconProps extends ComponentProps<'div'> {
|
|
4
4
|
iconColor?: COLOR;
|
|
5
|
+
children?: React.ReactNode;
|
|
5
6
|
}
|
|
6
7
|
export declare const Icon: (props: IIconProps) => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { COLOR, SIZE, VARIANT } from '../component.enums';
|
|
3
3
|
export interface IIconButtonProps extends React.ComponentProps<'button'> {
|
|
4
|
-
icon?: React.
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
5
|
color?: COLOR;
|
|
6
6
|
size?: SIZE;
|
|
7
7
|
isActive?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface IListItemAvatarProps extends React.ComponentProps<'div'> {
|
|
3
|
-
avatar: React.
|
|
3
|
+
avatar: React.ReactNode;
|
|
4
4
|
}
|
|
5
5
|
export declare const ListItemAvatar: ({ avatar, ...rest }: IListItemAvatarProps) => JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface IListItemIconProps extends React.ComponentProps<'div'> {
|
|
3
|
-
icon: React.
|
|
3
|
+
icon: React.ReactNode;
|
|
4
4
|
}
|
|
5
5
|
export declare const ListItemIcon: ({ icon, ...rest }: IListItemIconProps) => JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
2
|
import { MenuPosition } from './menu.types';
|
|
3
|
-
import {
|
|
3
|
+
import { IListItemProps } from '../List';
|
|
4
4
|
export interface IMenuProps extends React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
5
5
|
toggle?: ReactElement;
|
|
6
6
|
open?: boolean;
|
|
7
|
-
children?: ReactElement<
|
|
7
|
+
children?: ReactElement<IListItemProps> | Array<ReactElement<IListItemProps>>;
|
|
8
8
|
menuPosition?: MenuPosition;
|
|
9
9
|
onClickBackdrop?: () => void;
|
|
10
10
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
2
|
import { MenuPosition } from './menu.types';
|
|
3
|
-
import {
|
|
3
|
+
import { IListItemProps } from '../List';
|
|
4
4
|
export interface IMenuBodyProps {
|
|
5
|
-
children?: ReactElement<
|
|
5
|
+
children?: ReactElement<IListItemProps> | Array<ReactElement<IListItemProps>>;
|
|
6
6
|
className?: string;
|
|
7
7
|
menuPosition?: MenuPosition;
|
|
8
8
|
parentRef: React.RefObject<HTMLDivElement>;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
6
|
-
type?: 'item' | 'header';
|
|
7
|
-
}
|
|
8
|
-
export declare const MenuItem: (props: IMenuItemProps) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IListItemProps } from '../List';
|
|
3
|
+
export declare const MenuItem: (props: IListItemProps) => JSX.Element;
|
|
@@ -8,7 +8,8 @@ interface IModalProps {
|
|
|
8
8
|
description?: string | ReactElement;
|
|
9
9
|
formControls?: IControls;
|
|
10
10
|
modalType?: MODALTYPE;
|
|
11
|
-
onOk
|
|
11
|
+
onOk: (values?: IFormValues) => void;
|
|
12
|
+
onChange?: (values?: IFormValues) => void;
|
|
12
13
|
onCancel?: () => void;
|
|
13
14
|
onBackdropClick?: () => void;
|
|
14
15
|
isDismissable?: boolean;
|
|
@@ -16,5 +17,5 @@ interface IModalProps {
|
|
|
16
17
|
fullScreen?: boolean;
|
|
17
18
|
size?: SIZE;
|
|
18
19
|
}
|
|
19
|
-
export declare const GlobalModal: ({ title, description, formControls, onOk, onCancel, onBackdropClick, isDismissable, buttons, size, fullScreen }: IModalProps) => JSX.Element;
|
|
20
|
+
export declare const GlobalModal: ({ title, description, formControls, onOk, onChange, onCancel, onBackdropClick, isDismissable, buttons, size, fullScreen }: IModalProps) => JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { IControls
|
|
1
|
+
import { IControls } from '../Form';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import { IModalButton } from './modal.interfaces';
|
|
4
4
|
import { SIZE } from '../component.enums';
|
|
5
5
|
export interface IModalService {
|
|
6
|
-
show(title: string, description: string | ReactElement, options?: IModalOptions): Promise<void
|
|
6
|
+
show(title: string, description: string | ReactElement, options?: IModalOptions): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
export interface IModalOptions {
|
|
9
|
-
formControls?: IControls;
|
|
10
9
|
isDismissable?: boolean;
|
|
11
10
|
buttons?: Array<IModalButton>;
|
|
12
11
|
fullScreen?: boolean;
|
|
@@ -14,7 +13,9 @@ export interface IModalOptions {
|
|
|
14
13
|
}
|
|
15
14
|
declare class ModalService implements IModalService {
|
|
16
15
|
private container;
|
|
17
|
-
|
|
16
|
+
private root;
|
|
17
|
+
show(title: string, description: string | ReactElement, options?: IModalOptions): Promise<void>;
|
|
18
|
+
showForm<T>(title: string, formControls: IControls, options?: IModalOptions): Promise<T>;
|
|
18
19
|
private hide;
|
|
19
20
|
}
|
|
20
21
|
export declare const modalService: ModalService;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { COLOR } from '../component.enums';
|
|
3
3
|
export interface ISnackbarService {
|
|
4
|
-
show(message: React.
|
|
4
|
+
show(message: React.ReactNode | string, options?: ISnackbarOptions): Promise<void>;
|
|
5
5
|
}
|
|
6
6
|
export interface ISnackbarOptions {
|
|
7
7
|
actionText?: string;
|
|
@@ -12,7 +12,8 @@ export interface ISnackbarOptions {
|
|
|
12
12
|
declare class SnackbarService implements ISnackbarService {
|
|
13
13
|
private container;
|
|
14
14
|
private handler;
|
|
15
|
-
|
|
15
|
+
private root;
|
|
16
|
+
show(message: React.ReactNode | string, options?: ISnackbarOptions): Promise<void>;
|
|
16
17
|
private hide;
|
|
17
18
|
}
|
|
18
19
|
export declare const snackbarService: SnackbarService;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { COLOR } from '../component.enums';
|
|
3
3
|
export interface ISpeedDialActionProps extends React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
4
|
-
icon: React.
|
|
4
|
+
icon: React.ReactNode;
|
|
5
5
|
tooltipTitle?: string;
|
|
6
6
|
color?: COLOR;
|
|
7
7
|
onClick?: (e: React.MouseEvent) => void;
|
package/components/Tabs/Tab.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
export interface ITabsContext {
|
|
3
|
+
fixed: boolean;
|
|
4
|
+
selectedValue: string;
|
|
5
|
+
setSelectedValue: Dispatch<string>;
|
|
6
|
+
}
|
|
7
|
+
export declare const TabContext: import("react").Context<ITabsContext>;
|
|
8
|
+
export declare const useTabContext: () => ITabsContext;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import { COLOR } from '../component.enums';
|
|
3
3
|
import { ITabProps } from './Tab';
|
|
4
|
-
export interface ITabOnChangeEvent {
|
|
5
|
-
event: React.MouseEvent;
|
|
6
|
-
newValue: string;
|
|
7
|
-
}
|
|
8
4
|
export interface ITabsProps {
|
|
9
5
|
color?: COLOR;
|
|
10
6
|
indicatorColor?: COLOR;
|
|
11
7
|
children?: ReactElement<ITabProps> | Array<ReactElement<ITabProps>>;
|
|
12
8
|
className?: string;
|
|
13
9
|
fixed?: boolean;
|
|
14
|
-
onChange?: (
|
|
10
|
+
onChange?: (value: string) => void;
|
|
15
11
|
value?: string;
|
|
16
12
|
}
|
|
17
13
|
export declare const Tabs: (props: ITabsProps) => JSX.Element;
|
package/hooks/useWindowSize.d.ts
CHANGED