@mahatisystems/mahati-ui-components 1.1.3 → 1.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mahatisystems/mahati-ui-components",
3
- "version": "1.1.3",
3
+ "version": "1.2.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
package/dist/index.d.mts DELETED
@@ -1,109 +0,0 @@
1
- import * as react from 'react';
2
- import react__default from 'react';
3
- import * as styled_components_dist_types from 'styled-components/dist/types';
4
- import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import * as styled_components from 'styled-components';
6
-
7
- interface TooltipProps {
8
- text: string;
9
- position?: 'top' | 'right' | 'bottom' | 'left';
10
- children: react__default.ReactNode;
11
- }
12
- declare const Tooltip: react__default.FC<TooltipProps>;
13
-
14
- interface ButtonProps {
15
- color?: string;
16
- textColor?: string;
17
- size?: "small" | "medium" | "large";
18
- isLoading?: boolean;
19
- danger?: boolean;
20
- variant?: "primary" | "success" | "danger";
21
- type?: "button" | "submit" | "reset";
22
- radius?: string | number;
23
- }
24
- declare const Button: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<styled_components_dist_types.Substitute<styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, ButtonProps>, ButtonProps>> & string;
25
-
26
- interface CardProps {
27
- header?: react__default.ReactNode;
28
- footer?: react__default.ReactNode;
29
- children: react__default.ReactNode;
30
- }
31
- declare const Card: react__default.FC<CardProps>;
32
-
33
- declare const Dropdown: ({ options, onSelect }: {
34
- options: string[];
35
- onSelect: (option: string) => void;
36
- }) => react_jsx_runtime.JSX.Element;
37
-
38
- declare const FormContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never>> & string;
39
-
40
- interface InputProps {
41
- type?: string;
42
- name?: string;
43
- placeholder?: string;
44
- onChange: (e: react__default.ChangeEvent<HTMLInputElement>) => void;
45
- hasError?: boolean;
46
- errorMessage?: string;
47
- value: string;
48
- }
49
- declare const Input: react__default.FC<InputProps>;
50
-
51
- interface KeyValueDisplayProps {
52
- data: {
53
- [key: string]: any;
54
- };
55
- }
56
- declare const KeyValueDisplay: react__default.FC<KeyValueDisplayProps>;
57
-
58
- declare const Label: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
59
-
60
- declare const Main: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
61
-
62
- interface TableProps {
63
- headers: {
64
- label: string;
65
- key: string;
66
- }[];
67
- data: {
68
- [key: string]: unknown;
69
- }[];
70
- page?: number;
71
- setPage?: (page: number) => void;
72
- limit?: number;
73
- setLimit?: (limit: number) => void;
74
- totalCount?: number;
75
- highlightRowColor?: string;
76
- actions?: (row: unknown) => react__default.ReactNode;
77
- }
78
- declare const Table: react__default.FC<TableProps>;
79
-
80
- interface TabbedInterfaceProps {
81
- tabs: Tab[];
82
- activeTabId: string;
83
- onTabClick: (tabId: string) => void;
84
- content: react__default.ReactNode;
85
- }
86
- interface Tab {
87
- id: string;
88
- label: string;
89
- }
90
- declare const Tab: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react__default.DetailedHTMLProps<react__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
91
- $active: boolean;
92
- }>> & string;
93
- declare const TabbedInterface: react__default.FC<TabbedInterfaceProps>;
94
-
95
- declare const Spinner: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
96
-
97
- declare const Section: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
98
-
99
- declare const Row: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
100
-
101
- declare const Paragraph: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
102
-
103
- declare const required: (value: string) => string;
104
- declare const maxLength: (max: number) => (value: string) => string;
105
- declare const minLength: (min: number) => (value: string) => string;
106
- declare const isValidUsername: (value: string) => string;
107
- declare const isValidPassword: (value: string) => string;
108
-
109
- export { Button as MahatiButton, Card as MahatiCard, Dropdown as MahatiDropdown, FormContainer as MahatiFormContainer, Input as MahatiInput, KeyValueDisplay as MahatiKeyValueDisplay, Label as MahatiLabel, Main as MahatiMain, Paragraph as MahatiParagraph, Row as MahatiRow, Section as MahatiSection, Spinner as MahatiSpinner, TabbedInterface as MahatiTabbedInterface, Table as MahatiTable, Tooltip as MahatiTooltip, isValidPassword, isValidUsername, maxLength, minLength, required };
package/dist/index.d.ts DELETED
@@ -1,109 +0,0 @@
1
- import * as react from 'react';
2
- import react__default from 'react';
3
- import * as styled_components_dist_types from 'styled-components/dist/types';
4
- import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import * as styled_components from 'styled-components';
6
-
7
- interface TooltipProps {
8
- text: string;
9
- position?: 'top' | 'right' | 'bottom' | 'left';
10
- children: react__default.ReactNode;
11
- }
12
- declare const Tooltip: react__default.FC<TooltipProps>;
13
-
14
- interface ButtonProps {
15
- color?: string;
16
- textColor?: string;
17
- size?: "small" | "medium" | "large";
18
- isLoading?: boolean;
19
- danger?: boolean;
20
- variant?: "primary" | "success" | "danger";
21
- type?: "button" | "submit" | "reset";
22
- radius?: string | number;
23
- }
24
- declare const Button: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<styled_components_dist_types.Substitute<styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, ButtonProps>, ButtonProps>> & string;
25
-
26
- interface CardProps {
27
- header?: react__default.ReactNode;
28
- footer?: react__default.ReactNode;
29
- children: react__default.ReactNode;
30
- }
31
- declare const Card: react__default.FC<CardProps>;
32
-
33
- declare const Dropdown: ({ options, onSelect }: {
34
- options: string[];
35
- onSelect: (option: string) => void;
36
- }) => react_jsx_runtime.JSX.Element;
37
-
38
- declare const FormContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never>> & string;
39
-
40
- interface InputProps {
41
- type?: string;
42
- name?: string;
43
- placeholder?: string;
44
- onChange: (e: react__default.ChangeEvent<HTMLInputElement>) => void;
45
- hasError?: boolean;
46
- errorMessage?: string;
47
- value: string;
48
- }
49
- declare const Input: react__default.FC<InputProps>;
50
-
51
- interface KeyValueDisplayProps {
52
- data: {
53
- [key: string]: any;
54
- };
55
- }
56
- declare const KeyValueDisplay: react__default.FC<KeyValueDisplayProps>;
57
-
58
- declare const Label: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
59
-
60
- declare const Main: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
61
-
62
- interface TableProps {
63
- headers: {
64
- label: string;
65
- key: string;
66
- }[];
67
- data: {
68
- [key: string]: unknown;
69
- }[];
70
- page?: number;
71
- setPage?: (page: number) => void;
72
- limit?: number;
73
- setLimit?: (limit: number) => void;
74
- totalCount?: number;
75
- highlightRowColor?: string;
76
- actions?: (row: unknown) => react__default.ReactNode;
77
- }
78
- declare const Table: react__default.FC<TableProps>;
79
-
80
- interface TabbedInterfaceProps {
81
- tabs: Tab[];
82
- activeTabId: string;
83
- onTabClick: (tabId: string) => void;
84
- content: react__default.ReactNode;
85
- }
86
- interface Tab {
87
- id: string;
88
- label: string;
89
- }
90
- declare const Tab: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react__default.DetailedHTMLProps<react__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
91
- $active: boolean;
92
- }>> & string;
93
- declare const TabbedInterface: react__default.FC<TabbedInterfaceProps>;
94
-
95
- declare const Spinner: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
96
-
97
- declare const Section: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
98
-
99
- declare const Row: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
100
-
101
- declare const Paragraph: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
102
-
103
- declare const required: (value: string) => string;
104
- declare const maxLength: (max: number) => (value: string) => string;
105
- declare const minLength: (min: number) => (value: string) => string;
106
- declare const isValidUsername: (value: string) => string;
107
- declare const isValidPassword: (value: string) => string;
108
-
109
- export { Button as MahatiButton, Card as MahatiCard, Dropdown as MahatiDropdown, FormContainer as MahatiFormContainer, Input as MahatiInput, KeyValueDisplay as MahatiKeyValueDisplay, Label as MahatiLabel, Main as MahatiMain, Paragraph as MahatiParagraph, Row as MahatiRow, Section as MahatiSection, Spinner as MahatiSpinner, TabbedInterface as MahatiTabbedInterface, Table as MahatiTable, Tooltip as MahatiTooltip, isValidPassword, isValidUsername, maxLength, minLength, required };