@nithish_atum/atum 1.0.0 → 1.0.3

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/index.d.mts CHANGED
@@ -1,11 +1,180 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React from 'react';
2
+ import React, { ReactNode } from 'react';
3
3
 
4
- type Variant = "solid" | "outline" | "ghost";
5
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ type Flex$1 = "row" | "col";
5
+ type Gap$3 = "xs" | "sm" | "md" | "lg";
6
+ type Variant$2 = "default" | "elevated";
7
+ interface ContainerProps$1 extends React.BaseHTMLAttributes<HTMLDivElement> {
8
+ gap?: Gap$3;
9
+ flex?: Flex$1;
10
+ variant?: Variant$2;
11
+ children: React.ReactNode;
12
+ }
13
+ declare const Box: ({ flex, gap, variant, children, ...rest }: ContainerProps$1) => react_jsx_runtime.JSX.Element;
14
+
15
+ type Variant$1 = "primary_solid" | "primary_outline" | "primary_text";
16
+ interface ButtonProps$2 extends React.ButtonHTMLAttributes<HTMLButtonElement> {
17
+ variant?: Variant$1;
18
+ children: React.ReactNode;
19
+ }
20
+ declare const Button: ({ variant, children, ...rest }: ButtonProps$2) => react_jsx_runtime.JSX.Element;
21
+
22
+ type Direction = "row" | "col";
23
+ type Gap$2 = "xs" | "sm" | "md" | "lg";
24
+ type ImageURL = string;
25
+ type ImageAlt = string;
26
+ interface ContainerProps extends React.BaseHTMLAttributes<HTMLDivElement> {
27
+ gap?: Gap$2;
28
+ Imageurl?: ImageURL;
29
+ Imagealt?: ImageAlt;
30
+ direction?: Direction;
31
+ children: React.ReactNode;
32
+ }
33
+ declare const Card: ({ direction, gap, Imagealt, Imageurl, children, ...rest }: ContainerProps) => react_jsx_runtime.JSX.Element;
34
+
35
+ interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
36
+ label?: React.ReactNode;
37
+ indeterminate?: boolean;
38
+ }
39
+ declare const Checkbox: ({ checked, indeterminate, disabled, label, ...rest }: CheckboxProps) => react_jsx_runtime.JSX.Element;
40
+
41
+ interface DatePickerProps {
42
+ value?: Date;
43
+ onChange?: (date: Date) => void;
44
+ placeholder?: string;
45
+ }
46
+ declare const DatePicker: React.FC<DatePickerProps>;
47
+
48
+ type Orientation = "horizontal" | "vertical";
49
+ type Size$1 = "thin" | "medium";
50
+ type Gap$1 = "xs" | "sm" | "md" | "lg";
51
+ interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
52
+ orientation?: Orientation;
53
+ size?: Size$1;
54
+ gap?: Gap$1;
55
+ }
56
+ declare const Divider: ({ orientation, size, gap, ...rest }: DividerProps) => react_jsx_runtime.JSX.Element;
57
+
58
+ type DrawerPlacement = "right" | "left" | "bottom";
59
+ interface DrawerProps {
60
+ open: boolean;
61
+ onClose?: () => void;
62
+ placement?: DrawerPlacement;
63
+ width?: number | string;
64
+ height?: number | string;
65
+ children: React.ReactNode;
66
+ }
67
+ declare const Drawer: React.FC<DrawerProps>;
68
+
69
+ type Gap = "small" | "medium" | "large";
70
+ type FlexDirection = "row" | "col";
71
+ type Justify = "center" | "between" | "around" | "start" | "end" | "even";
72
+ type Align = "center" | "between" | "around" | "start" | "end" | "even";
73
+ interface ButtonProps$1 extends React.ButtonHTMLAttributes<HTMLDivElement> {
74
+ gap?: Gap;
75
+ flexDirection?: FlexDirection;
76
+ justify?: Justify;
77
+ align?: Align;
78
+ children: React.ReactNode;
79
+ }
80
+ declare const Flex: ({ gap, justify, align, flexDirection, children, ...rest }: ButtonProps$1) => react_jsx_runtime.JSX.Element;
81
+
82
+ interface FormProps extends React.FormHTMLAttributes<HTMLFormElement> {
83
+ children: React.ReactNode;
84
+ }
85
+ declare const Form: ({ children, ...rest }: FormProps) => react_jsx_runtime.JSX.Element;
86
+
87
+ interface FormControlProps {
88
+ label?: React.ReactNode;
89
+ error?: React.ReactNode;
90
+ helperText?: React.ReactNode;
91
+ required?: boolean;
92
+ children: React.ReactNode;
93
+ }
94
+ declare const FormControl: ({ label, error, helperText, required, children, }: FormControlProps) => react_jsx_runtime.JSX.Element;
95
+
96
+ type Level = 1 | 2 | 3 | 4 | 5 | 6;
97
+ interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
98
+ level?: Level;
99
+ children: React.ReactNode;
100
+ }
101
+ declare const Heading: React.FC<HeadingProps>;
102
+
103
+ type InputSize = "xs" | "sm" | "md" | "lg";
104
+ type State$1 = "default" | "error";
105
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
106
+ inputSize?: InputSize;
107
+ state?: State$1;
108
+ }
109
+ declare const Input: React.FC<InputProps>;
110
+
111
+ type Variant = "default" | "muted";
112
+ interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
6
113
  variant?: Variant;
114
+ external?: boolean;
115
+ children: React.ReactNode;
116
+ }
117
+ declare const Link: ({ variant, external, children, ...rest }: LinkProps) => react_jsx_runtime.JSX.Element;
118
+
119
+ interface ModalProps {
120
+ open: boolean;
121
+ onClose?: () => void;
122
+ children: React.ReactNode;
123
+ }
124
+ declare const Modal: React.FC<ModalProps>;
125
+
126
+ interface ParagraphProps extends React.HTMLAttributes<HTMLParagraphElement> {
127
+ children: React.ReactNode;
128
+ }
129
+ declare const Paragraph: ({ children, ...rest }: ParagraphProps) => react_jsx_runtime.JSX.Element;
130
+
131
+ interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {
132
+ label?: React.ReactNode;
133
+ }
134
+ declare const Radio: ({ checked, disabled, label, ...rest }: RadioProps) => react_jsx_runtime.JSX.Element;
135
+
136
+ type SelectSize = "sm" | "md" | "lg";
137
+ type SelectState = "default" | "error";
138
+ interface OptionType {
139
+ label: ReactNode;
140
+ value: string;
141
+ }
142
+ interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
143
+ value?: string;
144
+ placeholder?: string;
145
+ options?: OptionType[];
146
+ onChange?: (value: string) => void;
147
+ selectSize?: SelectSize;
148
+ state?: SelectState;
149
+ children?: ReactNode;
150
+ }
151
+ interface SelectOptionProps {
152
+ value: string;
153
+ children: ReactNode;
154
+ }
155
+ interface SelectComponent extends React.FC<SelectProps> {
156
+ Option: React.FC<SelectOptionProps>;
157
+ }
158
+ declare const Select: SelectComponent;
159
+
160
+ interface SwitchProps extends React.InputHTMLAttributes<HTMLInputElement> {
161
+ label?: React.ReactNode;
162
+ }
163
+ declare const Switch: ({ checked, disabled, label, ...rest }: SwitchProps) => react_jsx_runtime.JSX.Element;
164
+
165
+ type FontVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p";
166
+ interface ButtonProps extends React.BaseHTMLAttributes<HTMLElement> {
167
+ fontVariant?: FontVariant;
7
168
  children: React.ReactNode;
8
169
  }
9
- declare const Button: ({ variant, children, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
170
+ declare const Text: ({ fontVariant, children, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
171
+
172
+ type Size = "sm" | "md" | "lg";
173
+ type State = "default" | "error";
174
+ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
175
+ size?: Size;
176
+ state?: State;
177
+ }
178
+ declare const Textarea: ({ size, state, ...rest }: TextareaProps) => react_jsx_runtime.JSX.Element;
10
179
 
11
- export { Button };
180
+ export { Box, Button, Card, Checkbox, DatePicker, Divider, Drawer, Flex, Form, FormControl, Heading, Input, Link, Modal, Paragraph, Radio, Select, Switch, Text, Textarea };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,180 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React from 'react';
2
+ import React, { ReactNode } from 'react';
3
3
 
4
- type Variant = "solid" | "outline" | "ghost";
5
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ type Flex$1 = "row" | "col";
5
+ type Gap$3 = "xs" | "sm" | "md" | "lg";
6
+ type Variant$2 = "default" | "elevated";
7
+ interface ContainerProps$1 extends React.BaseHTMLAttributes<HTMLDivElement> {
8
+ gap?: Gap$3;
9
+ flex?: Flex$1;
10
+ variant?: Variant$2;
11
+ children: React.ReactNode;
12
+ }
13
+ declare const Box: ({ flex, gap, variant, children, ...rest }: ContainerProps$1) => react_jsx_runtime.JSX.Element;
14
+
15
+ type Variant$1 = "primary_solid" | "primary_outline" | "primary_text";
16
+ interface ButtonProps$2 extends React.ButtonHTMLAttributes<HTMLButtonElement> {
17
+ variant?: Variant$1;
18
+ children: React.ReactNode;
19
+ }
20
+ declare const Button: ({ variant, children, ...rest }: ButtonProps$2) => react_jsx_runtime.JSX.Element;
21
+
22
+ type Direction = "row" | "col";
23
+ type Gap$2 = "xs" | "sm" | "md" | "lg";
24
+ type ImageURL = string;
25
+ type ImageAlt = string;
26
+ interface ContainerProps extends React.BaseHTMLAttributes<HTMLDivElement> {
27
+ gap?: Gap$2;
28
+ Imageurl?: ImageURL;
29
+ Imagealt?: ImageAlt;
30
+ direction?: Direction;
31
+ children: React.ReactNode;
32
+ }
33
+ declare const Card: ({ direction, gap, Imagealt, Imageurl, children, ...rest }: ContainerProps) => react_jsx_runtime.JSX.Element;
34
+
35
+ interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
36
+ label?: React.ReactNode;
37
+ indeterminate?: boolean;
38
+ }
39
+ declare const Checkbox: ({ checked, indeterminate, disabled, label, ...rest }: CheckboxProps) => react_jsx_runtime.JSX.Element;
40
+
41
+ interface DatePickerProps {
42
+ value?: Date;
43
+ onChange?: (date: Date) => void;
44
+ placeholder?: string;
45
+ }
46
+ declare const DatePicker: React.FC<DatePickerProps>;
47
+
48
+ type Orientation = "horizontal" | "vertical";
49
+ type Size$1 = "thin" | "medium";
50
+ type Gap$1 = "xs" | "sm" | "md" | "lg";
51
+ interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
52
+ orientation?: Orientation;
53
+ size?: Size$1;
54
+ gap?: Gap$1;
55
+ }
56
+ declare const Divider: ({ orientation, size, gap, ...rest }: DividerProps) => react_jsx_runtime.JSX.Element;
57
+
58
+ type DrawerPlacement = "right" | "left" | "bottom";
59
+ interface DrawerProps {
60
+ open: boolean;
61
+ onClose?: () => void;
62
+ placement?: DrawerPlacement;
63
+ width?: number | string;
64
+ height?: number | string;
65
+ children: React.ReactNode;
66
+ }
67
+ declare const Drawer: React.FC<DrawerProps>;
68
+
69
+ type Gap = "small" | "medium" | "large";
70
+ type FlexDirection = "row" | "col";
71
+ type Justify = "center" | "between" | "around" | "start" | "end" | "even";
72
+ type Align = "center" | "between" | "around" | "start" | "end" | "even";
73
+ interface ButtonProps$1 extends React.ButtonHTMLAttributes<HTMLDivElement> {
74
+ gap?: Gap;
75
+ flexDirection?: FlexDirection;
76
+ justify?: Justify;
77
+ align?: Align;
78
+ children: React.ReactNode;
79
+ }
80
+ declare const Flex: ({ gap, justify, align, flexDirection, children, ...rest }: ButtonProps$1) => react_jsx_runtime.JSX.Element;
81
+
82
+ interface FormProps extends React.FormHTMLAttributes<HTMLFormElement> {
83
+ children: React.ReactNode;
84
+ }
85
+ declare const Form: ({ children, ...rest }: FormProps) => react_jsx_runtime.JSX.Element;
86
+
87
+ interface FormControlProps {
88
+ label?: React.ReactNode;
89
+ error?: React.ReactNode;
90
+ helperText?: React.ReactNode;
91
+ required?: boolean;
92
+ children: React.ReactNode;
93
+ }
94
+ declare const FormControl: ({ label, error, helperText, required, children, }: FormControlProps) => react_jsx_runtime.JSX.Element;
95
+
96
+ type Level = 1 | 2 | 3 | 4 | 5 | 6;
97
+ interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
98
+ level?: Level;
99
+ children: React.ReactNode;
100
+ }
101
+ declare const Heading: React.FC<HeadingProps>;
102
+
103
+ type InputSize = "xs" | "sm" | "md" | "lg";
104
+ type State$1 = "default" | "error";
105
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
106
+ inputSize?: InputSize;
107
+ state?: State$1;
108
+ }
109
+ declare const Input: React.FC<InputProps>;
110
+
111
+ type Variant = "default" | "muted";
112
+ interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
6
113
  variant?: Variant;
114
+ external?: boolean;
115
+ children: React.ReactNode;
116
+ }
117
+ declare const Link: ({ variant, external, children, ...rest }: LinkProps) => react_jsx_runtime.JSX.Element;
118
+
119
+ interface ModalProps {
120
+ open: boolean;
121
+ onClose?: () => void;
122
+ children: React.ReactNode;
123
+ }
124
+ declare const Modal: React.FC<ModalProps>;
125
+
126
+ interface ParagraphProps extends React.HTMLAttributes<HTMLParagraphElement> {
127
+ children: React.ReactNode;
128
+ }
129
+ declare const Paragraph: ({ children, ...rest }: ParagraphProps) => react_jsx_runtime.JSX.Element;
130
+
131
+ interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {
132
+ label?: React.ReactNode;
133
+ }
134
+ declare const Radio: ({ checked, disabled, label, ...rest }: RadioProps) => react_jsx_runtime.JSX.Element;
135
+
136
+ type SelectSize = "sm" | "md" | "lg";
137
+ type SelectState = "default" | "error";
138
+ interface OptionType {
139
+ label: ReactNode;
140
+ value: string;
141
+ }
142
+ interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
143
+ value?: string;
144
+ placeholder?: string;
145
+ options?: OptionType[];
146
+ onChange?: (value: string) => void;
147
+ selectSize?: SelectSize;
148
+ state?: SelectState;
149
+ children?: ReactNode;
150
+ }
151
+ interface SelectOptionProps {
152
+ value: string;
153
+ children: ReactNode;
154
+ }
155
+ interface SelectComponent extends React.FC<SelectProps> {
156
+ Option: React.FC<SelectOptionProps>;
157
+ }
158
+ declare const Select: SelectComponent;
159
+
160
+ interface SwitchProps extends React.InputHTMLAttributes<HTMLInputElement> {
161
+ label?: React.ReactNode;
162
+ }
163
+ declare const Switch: ({ checked, disabled, label, ...rest }: SwitchProps) => react_jsx_runtime.JSX.Element;
164
+
165
+ type FontVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p";
166
+ interface ButtonProps extends React.BaseHTMLAttributes<HTMLElement> {
167
+ fontVariant?: FontVariant;
7
168
  children: React.ReactNode;
8
169
  }
9
- declare const Button: ({ variant, children, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
170
+ declare const Text: ({ fontVariant, children, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
171
+
172
+ type Size = "sm" | "md" | "lg";
173
+ type State = "default" | "error";
174
+ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
175
+ size?: Size;
176
+ state?: State;
177
+ }
178
+ declare const Textarea: ({ size, state, ...rest }: TextareaProps) => react_jsx_runtime.JSX.Element;
10
179
 
11
- export { Button };
180
+ export { Box, Button, Card, Checkbox, DatePicker, Divider, Drawer, Flex, Form, FormControl, Heading, Input, Link, Modal, Paragraph, Radio, Select, Switch, Text, Textarea };