react-asc 18.9.4 → 19.0.1

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.
Files changed (36) hide show
  1. package/components/Checkbox/Checkbox.d.ts +0 -1
  2. package/components/Drawer/Drawer.d.ts +3 -4
  3. package/components/Form/Form.d.ts +1 -1
  4. package/components/Form/FormInput/FormInput.d.ts +5 -5
  5. package/components/LoadingIndicator/LoadingIndicator.d.ts +2 -2
  6. package/components/Modal/GlobalModal.d.ts +1 -1
  7. package/components/Modal/Modal.d.ts +1 -1
  8. package/components/Modal/modal.service.d.ts +1 -1
  9. package/components/Sidebar/Sidebar.d.ts +2 -2
  10. package/components/Tabs/Tabs.d.ts +6 -2
  11. package/components/Textarea/Textarea.d.ts +1 -3
  12. package/components/Tooltip/Tooltip.d.ts +2 -3
  13. package/components/TreeView/TreeView.d.ts +2 -6
  14. package/components/Typography/Typography.d.ts +3 -6
  15. package/{assets/icons → icons}/CaretDownSolidIcon.d.ts +0 -0
  16. package/{assets/icons → icons}/CheckSolidIcon.d.ts +0 -0
  17. package/{assets/icons → icons}/CheckSquareRegularIcon.d.ts +0 -0
  18. package/{assets/icons → icons}/ChevronDownSolidIcon.d.ts +0 -0
  19. package/{assets/icons → icons}/ChevronLeftSolidIcon.d.ts +0 -0
  20. package/{assets/icons → icons}/ChevronRightSolidIcon.d.ts +0 -0
  21. package/{assets/icons → icons}/ChevronUpSolidIcon.d.ts +0 -0
  22. package/{assets/icons → icons}/CircleSolidIcon.d.ts +0 -0
  23. package/{assets/icons → icons}/HomeSolidIcon.d.ts +0 -0
  24. package/{assets/icons → icons}/PlusSolidIcon.d.ts +0 -0
  25. package/{assets/icons → icons}/SpinnerSolidIcon.d.ts +0 -0
  26. package/{assets/icons → icons}/SquareRegularIcon.d.ts +0 -0
  27. package/{assets/icons → icons}/TimesCircleSolidIcon.d.ts +0 -0
  28. package/{assets/icons → icons}/TimesSolidIcon.d.ts +0 -0
  29. package/{assets/icons → icons}/index.d.ts +0 -0
  30. package/index.d.ts +1 -1
  31. package/index.es.js +352 -348
  32. package/index.js +351 -347
  33. package/package.json +1 -1
  34. package/react-asc.scss +52 -52
  35. package/index.es.js.map +0 -1
  36. package/index.js.map +0 -1
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  export interface ICheckboxProps extends React.ComponentProps<"input"> {
3
3
  label?: string;
4
4
  value?: string;
5
- onChange?: (val: React.FocusEvent<HTMLInputElement>) => void;
6
5
  onKeyDown?: (event: React.KeyboardEvent) => void;
7
6
  }
8
7
  export declare const Checkbox: (props: ICheckboxProps) => JSX.Element;
@@ -1,8 +1,7 @@
1
- import React, { ReactNode } from 'react';
2
- export interface IDrawerProps {
3
- children?: ReactNode;
1
+ import React from 'react';
2
+ export interface IDrawerProps extends React.ComponentProps<"div"> {
4
3
  position?: 'left' | 'right';
5
- className?: string;
4
+ shadow?: boolean;
6
5
  onClickBackdrop?: () => void;
7
6
  permanent?: boolean;
8
7
  target?: HTMLElement;
@@ -31,7 +31,7 @@ export declare class Form extends Component<IFormProps, IFormState> {
31
31
  private renderLabel;
32
32
  handleFormSubmit(): void;
33
33
  handleFormReset(): void;
34
- handleOnKeyDown(e: KeyboardEvent): void;
34
+ handleOnKeyDown(e: React.KeyboardEvent<HTMLInputElement>): void;
35
35
  destroy(): void;
36
36
  getFormGroupCssClass(fieldKey: string): string | undefined;
37
37
  render(): JSX.Element;
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { IFormInputOptions, IFormTextAreaOptions, IFormSelectOptions, IFormAutoCompleteOptions } from '../form.interfaces';
3
3
  import { IFormControlType } from '../form.types';
4
4
  export interface IFormInputEvent {
5
- value?: any;
5
+ value: string | number | readonly string[] | undefined;
6
6
  type?: string;
7
7
  name?: string;
8
8
  }
9
9
  export interface IFormInputProps {
10
- value: any;
10
+ value: string | number | readonly string[] | undefined;
11
11
  name: string;
12
12
  type: IFormControlType;
13
13
  placeholder?: string;
@@ -23,7 +23,7 @@ export interface IFormInputProps {
23
23
  label?: string;
24
24
  onInput?: (e: IFormInputEvent) => void;
25
25
  onChange?: (e: IFormInputEvent) => void;
26
- onBlur?: (event: any) => void;
27
- onKeyDown?: (event: any) => void;
26
+ onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
27
+ onKeyDown?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
28
28
  }
29
29
  export declare const FormInput: (props: IFormInputProps) => JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export interface ILoadingIndicatorProps {
3
3
  }
4
- export declare const LoadingIndicator: () => JSX.Element;
4
+ export declare const LoadingIndicator: ({ ...rest }: React.ComponentProps<"div">) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { SIZE } from '..';
2
+ import { SIZE } from '../component.enums';
3
3
  import { IControls, IFormValues } from '../Form';
4
4
  import { MODALTYPE } from './modal.enum';
5
5
  import { IModalButton } from './modal.interfaces';
@@ -1,5 +1,5 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
- import { SIZE } from '..';
2
+ import { SIZE } from '../component.enums';
3
3
  export interface IModalProps {
4
4
  className?: string;
5
5
  children?: ReactNode;
@@ -1,7 +1,7 @@
1
1
  import { IControls, IFormValues } from '../Form';
2
2
  import { ReactElement } from 'react';
3
3
  import { IModalButton } from './modal.interfaces';
4
- import { SIZE } from '..';
4
+ import { SIZE } from '../component.enums';
5
5
  export interface IModalService {
6
6
  show(title: string, description: string | ReactElement, options?: IModalOptions): Promise<void | IFormValues>;
7
7
  }
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { ISidebarItem } from './sidebar.interfaces';
3
- interface ISidebarProps {
3
+ interface ISidebarProps extends React.ComponentProps<"nav"> {
4
4
  items: Array<ISidebarItem>;
5
5
  currentUrl: string;
6
6
  onItemClicked: (path: string) => void;
@@ -1,13 +1,17 @@
1
- import { ReactElement } from 'react';
1
+ import React, { 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
+ }
4
8
  export interface ITabsProps {
5
9
  color?: COLOR;
6
10
  indicatorColor?: COLOR;
7
11
  children?: ReactElement<ITabProps> | Array<ReactElement<ITabProps>>;
8
12
  className?: string;
9
13
  fixed?: boolean;
10
- onChange?: (event: any, newValue: string) => void;
14
+ onChange?: (e: ITabOnChangeEvent) => void;
11
15
  value?: string;
12
16
  }
13
17
  export declare const Tabs: (props: ITabsProps) => JSX.Element;
@@ -1,4 +1,2 @@
1
1
  import React from 'react';
2
- export interface ITextareaProps extends React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> {
3
- }
4
- export declare const Textarea: (props: ITextareaProps) => JSX.Element;
2
+ export declare const Textarea: (props: React.ComponentProps<"textarea">) => JSX.Element;
@@ -1,7 +1,6 @@
1
- import { ReactElement } from 'react';
2
- export interface ITooltipProps {
1
+ import React from 'react';
2
+ export interface ITooltipProps extends React.ComponentProps<"div"> {
3
3
  placement?: 'top' | 'bottom' | 'right' | 'left';
4
4
  text?: string;
5
- children: ReactElement;
6
5
  }
7
6
  export declare const Tooltip: (props: ITooltipProps) => JSX.Element;
@@ -1,6 +1,2 @@
1
- /// <reference types="react" />
2
- export interface ITreeViewProps {
3
- children?: any;
4
- className?: string;
5
- }
6
- export declare const TreeView: (props: ITreeViewProps) => JSX.Element;
1
+ import React from "react";
2
+ export declare const TreeView: (props: React.ComponentProps<"ul">) => JSX.Element;
@@ -1,13 +1,10 @@
1
- import { ReactElement } from 'react';
1
+ import React from 'react';
2
2
  export interface IWrapperProps {
3
3
  as?: string;
4
- children: ReactElement;
4
+ children: React.ReactNode;
5
5
  className?: string;
6
6
  }
7
- export interface ITypographyProps {
7
+ export interface ITypographyProps extends React.ComponentProps<"span"> {
8
8
  as?: string;
9
- children: any;
10
- className?: string;
11
- style?: any;
12
9
  }
13
10
  export declare const Typography: ({ children, as, ...rest }: ITypographyProps) => JSX.Element;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from './components';
2
2
  export * from './hooks';
3
- export * from './assets/icons';
3
+ export * from './icons';