@symply.io/basic-components 1.4.0-alpha.7 → 1.4.0-alpha.8

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.
@@ -1,15 +1,3 @@
1
- import { ReactElement, CSSProperties } from "react";
2
- import { HeaderButtonProps } from "./types";
3
- export interface HeaderBarProps {
4
- title: string | ReactElement;
5
- color?: CSSProperties["color"];
6
- subtitle?: string | ReactElement;
7
- bottomEl?: ReactElement;
8
- buttons?: Array<HeaderButtonProps>;
9
- showBackButton?: boolean;
10
- primaryColor?: CSSProperties["color"];
11
- secondaryColor?: CSSProperties["color"];
12
- onBack?: () => void;
13
- }
1
+ import type { HeaderBarProps } from "./types";
14
2
  declare function HeaderBar(props: HeaderBarProps): JSX.Element;
15
3
  export default HeaderBar;
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties } from "react";
2
2
  import { HeaderButtonProps } from "./types";
3
- export interface HeaderButtonsProps {
3
+ interface HeaderButtonsProps {
4
4
  buttons: Array<HeaderButtonProps>;
5
5
  primaryColor?: CSSProperties["color"];
6
6
  secondaryColor?: CSSProperties["color"];
@@ -1,8 +1,3 @@
1
- import { CSSProperties } from "react";
2
- interface HeaderLineProps {
3
- color?: CSSProperties["color"];
4
- primaryColor?: CSSProperties["color"];
5
- secondaryColor?: CSSProperties["color"];
6
- }
1
+ import type { HeaderLineProps } from "./types";
7
2
  declare function HeaderLine(props: HeaderLineProps): JSX.Element;
8
3
  export default HeaderLine;
@@ -1,23 +1,7 @@
1
- import { ReactElement, CSSProperties } from "react";
2
- import { SxProps } from "@mui/material/styles";
3
- import { HeaderBarProps } from "./HeaderBar";
4
- interface HeaderProviderProps {
5
- sx?: SxProps;
6
- children: ReactElement;
7
- primaryColor?: CSSProperties["color"];
8
- secondaryColor?: CSSProperties["color"];
9
- }
10
- interface HeaderContextProps {
11
- onInit: (props: HeaderBarProps) => void;
12
- onShow: () => void;
13
- onHide: () => void;
14
- }
1
+ import type { HeaderContextProps, HeaderProviderProps } from "./types";
15
2
  export declare function HeaderProvider(props: HeaderProviderProps): JSX.Element;
16
- export declare function useHeaderBar(): HeaderContextProps;
17
- export { default } from "./HeaderBar";
3
+ export default function useHeaderBar(): HeaderContextProps;
4
+ export { default as HeaderBar } from "./HeaderBar";
18
5
  export { default as HeaderButtons } from "./HeaderButtons";
19
6
  export { default as HeaderLine } from "./HeaderLine";
20
- export * from "./HeaderBar";
21
- export * from "./HeaderButtons";
22
- export * from "./HeaderLine";
23
7
  export * from "./types";
@@ -45,13 +45,10 @@ export function HeaderProvider(props) {
45
45
  }
46
46
  })] }) })));
47
47
  }
48
- export function useHeaderBar() {
48
+ export default function useHeaderBar() {
49
49
  return useContext(HeaderContext);
50
50
  }
51
- export { default } from "./HeaderBar";
51
+ export { default as HeaderBar } from "./HeaderBar";
52
52
  export { default as HeaderButtons } from "./HeaderButtons";
53
53
  export { default as HeaderLine } from "./HeaderLine";
54
- export * from "./HeaderBar";
55
- export * from "./HeaderButtons";
56
- export * from "./HeaderLine";
57
54
  export * from "./types";
@@ -1,8 +1,9 @@
1
- import { ReactElement } from "react";
2
- import { ButtonProps } from "@mui/material/Button";
3
- import { IconButtonProps } from "@mui/material/IconButton";
4
- import { FabProps } from "@mui/material/Fab";
5
- import { MenuButtonGroupProps } from "../MenuButtonGroup";
1
+ import type { ReactElement, CSSProperties } from "react";
2
+ import type { ButtonProps } from "@mui/material/Button";
3
+ import type { IconButtonProps } from "@mui/material/IconButton";
4
+ import type { FabProps } from "@mui/material/Fab";
5
+ import type { SxProps } from "@mui/material/styles";
6
+ import type { MenuButtonGroupProps } from "../MenuButtonGroup";
6
7
  export declare enum HeaderButtonCategory {
7
8
  IconButton = "icon",
8
9
  TextButton = "text",
@@ -43,4 +44,31 @@ declare type HeaderMenuButtonProps = {
43
44
  type: HeaderButtonCategory.MenuButton;
44
45
  } & MenuButtonGroupProps;
45
46
  export declare type HeaderButtonProps = HeaderFabButtonProps | HeaderTextButtonProps | HeaderIconButtonProps | HeaderMenuButtonProps;
47
+ export interface HeaderLineProps {
48
+ color?: CSSProperties["color"];
49
+ primaryColor?: CSSProperties["color"];
50
+ secondaryColor?: CSSProperties["color"];
51
+ }
52
+ export interface HeaderBarProps {
53
+ title: string | ReactElement;
54
+ color?: CSSProperties["color"];
55
+ subtitle?: string | ReactElement;
56
+ bottomEl?: ReactElement;
57
+ buttons?: Array<HeaderButtonProps>;
58
+ showBackButton?: boolean;
59
+ primaryColor?: CSSProperties["color"];
60
+ secondaryColor?: CSSProperties["color"];
61
+ onBack?: () => void;
62
+ }
63
+ export interface HeaderProviderProps {
64
+ sx?: SxProps;
65
+ children: ReactElement;
66
+ primaryColor?: CSSProperties["color"];
67
+ secondaryColor?: CSSProperties["color"];
68
+ }
69
+ export interface HeaderContextProps {
70
+ onInit: (props: HeaderBarProps) => void;
71
+ onShow: () => void;
72
+ onHide: () => void;
73
+ }
46
74
  export {};
@@ -1,6 +1,6 @@
1
- import { FeinInputProps } from "./types";
1
+ import type { FeinInputProps } from "./types";
2
2
  export declare function FeinInputFormat(str: string): string;
3
3
  export declare function onValidateFein(feinString: string): boolean;
4
4
  declare function FeinInput(props: FeinInputProps): JSX.Element;
5
5
  export default FeinInput;
6
- export * from "./types";
6
+ export type { FeinInputProps };
@@ -72,4 +72,3 @@ function FeinInput(props) {
72
72
  } }, rest)) })));
73
73
  }
74
74
  export default FeinInput;
75
- export * from "./types";
@@ -1,5 +1,5 @@
1
- import { CSSProperties } from "react";
2
- import { TextFieldProps } from "@mui/material/TextField";
1
+ import type { CSSProperties } from "react";
2
+ import type { TextFieldProps } from "@mui/material/TextField";
3
3
  export interface FeinInputProps extends Omit<TextFieldProps, "onChange"> {
4
4
  onChange: (value: string) => void;
5
5
  onValidate?: (value?: string) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symply.io/basic-components",
3
- "version": "1.4.0-alpha.7",
3
+ "version": "1.4.0-alpha.8",
4
4
  "description": "Basic and reusable components for all frontend of Symply apps",
5
5
  "keywords": [
6
6
  "react",