astrum-ui 0.1.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.
package/dist/index.css ADDED
@@ -0,0 +1,221 @@
1
+ /* src/InputCode/InputCode.css */
2
+ .astrum-input-code {
3
+ --astrum-input-code-primary: #2653F2;
4
+ --astrum-input-code-border: #D5D5D5;
5
+ --astrum-input-code-text: #575757;
6
+ --astrum-input-code-placeholder: #ABABAB;
7
+ --astrum-input-code-error: #EA3B3D;
8
+ --astrum-input-code-error-bg: #FEE8E8;
9
+ --astrum-input-code-bg: #FFFFFF;
10
+ display: inline-flex;
11
+ flex-direction: column;
12
+ gap: 0;
13
+ min-width: 0;
14
+ }
15
+ .astrum-input-code__wrap {
16
+ box-sizing: border-box;
17
+ position: relative;
18
+ display: flex;
19
+ gap: 8px;
20
+ align-items: center;
21
+ justify-content: center;
22
+ width: 100%;
23
+ min-width: 301px;
24
+ padding: 16px 24px;
25
+ border: 1px solid var(--astrum-input-code-border);
26
+ border-radius: 8px;
27
+ background: var(--astrum-input-code-bg);
28
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
29
+ transition: border-color 0.2s, box-shadow 0.2s;
30
+ }
31
+ .astrum-input-code__wrap:focus-within {
32
+ border-color: var(--astrum-input-code-primary);
33
+ box-shadow: 0 0 0 2px rgba(38, 83, 242, 0.1);
34
+ }
35
+ .astrum-input-code--error .astrum-input-code__wrap {
36
+ border-color: var(--astrum-input-code-error);
37
+ }
38
+ .astrum-input-code__cell {
39
+ width: 18px;
40
+ height: 36px;
41
+ padding: 0;
42
+ margin: 0;
43
+ border: none;
44
+ border-bottom: 2px solid var(--astrum-input-code-placeholder);
45
+ border-radius: 0;
46
+ background: transparent;
47
+ font-family: inherit;
48
+ font-size: 28px;
49
+ font-weight: 700;
50
+ line-height: 1.2;
51
+ color: var(--astrum-input-code-text);
52
+ text-align: center;
53
+ outline: none;
54
+ transition: border-color 0.2s, color 0.2s;
55
+ }
56
+ .astrum-input-code__cell::placeholder {
57
+ color: transparent;
58
+ }
59
+ .astrum-input-code__cell:focus {
60
+ border-bottom-color: var(--astrum-input-code-primary);
61
+ color: var(--astrum-input-code-primary);
62
+ }
63
+ .astrum-input-code__cell--spaced {
64
+ margin-left: 10px;
65
+ }
66
+ .astrum-input-code__cell:disabled {
67
+ cursor: not-allowed;
68
+ opacity: 0.4;
69
+ }
70
+ .astrum-input-code__wrap:has(.astrum-input-code__cell:disabled) {
71
+ background-color: #F4F4F4;
72
+ border-style: dashed;
73
+ cursor: not-allowed;
74
+ }
75
+ .astrum-input-code__footer {
76
+ margin-top: 8px;
77
+ padding: 8px 12px;
78
+ border-radius: 4px;
79
+ background-color: var(--astrum-input-code-error-bg);
80
+ }
81
+ .astrum-input-code__error {
82
+ display: block;
83
+ font-weight: 500;
84
+ font-size: 12px;
85
+ line-height: 1.4;
86
+ color: var(--astrum-input-code-error);
87
+ }
88
+
89
+ /* src/Avatar/Avatar.css */
90
+ .astrum-avatar {
91
+ --astrum-avatar-bg: #f4f4f4;
92
+ --astrum-avatar-icon: #ababab;
93
+ --astrum-avatar-overlay: rgba(0, 0, 0, 0.4);
94
+ --astrum-avatar-edit-icon: #ffffff;
95
+ position: relative;
96
+ cursor: pointer;
97
+ flex-shrink: 0;
98
+ transition: opacity 0.2s ease-out;
99
+ }
100
+ .astrum-avatar__body {
101
+ position: absolute;
102
+ inset: 0;
103
+ border-radius: 50%;
104
+ overflow: hidden;
105
+ }
106
+ .astrum-avatar__input {
107
+ position: absolute;
108
+ opacity: 0;
109
+ width: 0;
110
+ height: 0;
111
+ }
112
+ .astrum-avatar__image {
113
+ position: absolute;
114
+ inset: 0;
115
+ width: 100%;
116
+ height: 100%;
117
+ object-fit: cover;
118
+ display: block;
119
+ }
120
+ .astrum-avatar__placeholder {
121
+ position: absolute;
122
+ inset: 0;
123
+ width: 100%;
124
+ height: 100%;
125
+ background-color: var(--astrum-avatar-bg);
126
+ display: flex;
127
+ align-items: center;
128
+ justify-content: center;
129
+ }
130
+ .astrum-avatar__user-icon {
131
+ display: flex;
132
+ align-items: center;
133
+ justify-content: center;
134
+ color: var(--astrum-avatar-icon);
135
+ }
136
+ .astrum-avatar__user-icon svg {
137
+ width: 32px;
138
+ height: 32px;
139
+ }
140
+ .astrum-avatar__add-icon {
141
+ position: absolute;
142
+ top: 50%;
143
+ left: 50%;
144
+ transform: translate(-50%, -50%);
145
+ width: 32px;
146
+ height: 32px;
147
+ display: flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+ z-index: 1;
151
+ opacity: 0;
152
+ transition: opacity 0.2s ease-out;
153
+ pointer-events: none;
154
+ color: var(--astrum-avatar-edit-icon);
155
+ }
156
+ .astrum-avatar__add-icon svg {
157
+ width: 32px;
158
+ height: 32px;
159
+ }
160
+ .astrum-avatar__overlay {
161
+ position: absolute;
162
+ inset: 0;
163
+ background: var(--astrum-avatar-overlay);
164
+ border-radius: 50%;
165
+ opacity: 0;
166
+ transition: opacity 0.2s ease-out;
167
+ pointer-events: none;
168
+ }
169
+ .astrum-avatar__edit-icon {
170
+ position: absolute;
171
+ top: 50%;
172
+ left: 50%;
173
+ transform: translate(-50%, -50%);
174
+ width: 32px;
175
+ height: 32px;
176
+ display: flex;
177
+ align-items: center;
178
+ justify-content: center;
179
+ z-index: 1;
180
+ opacity: 0;
181
+ transition: opacity 0.2s ease-out;
182
+ pointer-events: none;
183
+ color: var(--astrum-avatar-edit-icon);
184
+ }
185
+ .astrum-avatar__edit-icon svg {
186
+ width: 32px;
187
+ height: 32px;
188
+ }
189
+ .astrum-avatar--hovered .astrum-avatar__overlay {
190
+ opacity: 1;
191
+ }
192
+ .astrum-avatar--hovered .astrum-avatar__add-icon {
193
+ opacity: 1;
194
+ }
195
+ .astrum-avatar--hovered .astrum-avatar__edit-icon {
196
+ opacity: 1;
197
+ }
198
+ .astrum-avatar__remove-button {
199
+ position: absolute;
200
+ top: -2px;
201
+ right: -2px;
202
+ width: 20px;
203
+ height: 20px;
204
+ background: var(--astrum-avatar-edit-icon);
205
+ border-radius: 50%;
206
+ border: none;
207
+ display: flex;
208
+ align-items: center;
209
+ justify-content: center;
210
+ cursor: pointer;
211
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
212
+ z-index: 2;
213
+ padding: 0;
214
+ transition: opacity 0.2s ease-out;
215
+ color: #ea3b3d;
216
+ }
217
+ .astrum-avatar__remove-button svg {
218
+ width: 12px;
219
+ height: 12px;
220
+ }
221
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/InputCode/InputCode.css","../src/Avatar/Avatar.css"],"sourcesContent":[".astrum-input-code {\n --astrum-input-code-primary: #2653F2;\n --astrum-input-code-border: #D5D5D5;\n --astrum-input-code-text: #575757;\n --astrum-input-code-placeholder: #ABABAB;\n --astrum-input-code-error: #EA3B3D;\n --astrum-input-code-error-bg: #FEE8E8;\n --astrum-input-code-bg: #FFFFFF;\n\n display: inline-flex;\n flex-direction: column;\n gap: 0;\n min-width: 0;\n}\n\n.astrum-input-code__wrap {\n box-sizing: border-box;\n position: relative;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n width: 100%;\n min-width: 301px;\n padding: 16px 24px;\n border: 1px solid var(--astrum-input-code-border);\n border-radius: 8px;\n background: var(--astrum-input-code-bg);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n transition: border-color 0.2s, box-shadow 0.2s;\n}\n\n.astrum-input-code__wrap:focus-within {\n border-color: var(--astrum-input-code-primary);\n box-shadow: 0 0 0 2px rgba(38, 83, 242, 0.1);\n}\n\n.astrum-input-code--error .astrum-input-code__wrap {\n border-color: var(--astrum-input-code-error);\n}\n\n.astrum-input-code__cell {\n width: 18px;\n height: 36px;\n padding: 0;\n margin: 0;\n border: none;\n border-bottom: 2px solid var(--astrum-input-code-placeholder);\n border-radius: 0;\n background: transparent;\n font-family: inherit;\n font-size: 28px;\n font-weight: 700;\n line-height: 1.2;\n color: var(--astrum-input-code-text);\n text-align: center;\n outline: none;\n transition: border-color 0.2s, color 0.2s;\n}\n\n.astrum-input-code__cell::placeholder {\n color: transparent;\n}\n\n.astrum-input-code__cell:focus {\n border-bottom-color: var(--astrum-input-code-primary);\n color: var(--astrum-input-code-primary);\n}\n\n.astrum-input-code__cell--spaced {\n margin-left: 10px;\n}\n\n.astrum-input-code__cell:disabled {\n cursor: not-allowed;\n opacity: 0.4;\n}\n\n.astrum-input-code__wrap:has(.astrum-input-code__cell:disabled) {\n background-color: #F4F4F4;\n border-style: dashed;\n cursor: not-allowed;\n}\n\n.astrum-input-code__footer {\n margin-top: 8px;\n padding: 8px 12px;\n border-radius: 4px;\n background-color: var(--astrum-input-code-error-bg);\n}\n\n.astrum-input-code__error {\n display: block;\n font-weight: 500;\n font-size: 12px;\n line-height: 1.4;\n color: var(--astrum-input-code-error);\n}\n",".astrum-avatar {\n --astrum-avatar-bg: #f4f4f4;\n --astrum-avatar-icon: #ababab;\n --astrum-avatar-overlay: rgba(0, 0, 0, 0.4);\n --astrum-avatar-edit-icon: #ffffff;\n\n position: relative;\n cursor: pointer;\n flex-shrink: 0;\n transition: opacity 0.2s ease-out;\n}\n\n.astrum-avatar__body {\n position: absolute;\n inset: 0;\n border-radius: 50%;\n overflow: hidden;\n}\n\n.astrum-avatar__input {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.astrum-avatar__image {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n\n.astrum-avatar__placeholder {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n background-color: var(--astrum-avatar-bg);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.astrum-avatar__user-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--astrum-avatar-icon);\n}\n\n.astrum-avatar__user-icon svg {\n width: 32px;\n height: 32px;\n}\n\n.astrum-avatar__add-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n opacity: 0;\n transition: opacity 0.2s ease-out;\n pointer-events: none;\n color: var(--astrum-avatar-edit-icon);\n}\n\n.astrum-avatar__add-icon svg {\n width: 32px;\n height: 32px;\n}\n\n.astrum-avatar__overlay {\n position: absolute;\n inset: 0;\n background: var(--astrum-avatar-overlay);\n border-radius: 50%;\n opacity: 0;\n transition: opacity 0.2s ease-out;\n pointer-events: none;\n}\n\n.astrum-avatar__edit-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n opacity: 0;\n transition: opacity 0.2s ease-out;\n pointer-events: none;\n color: var(--astrum-avatar-edit-icon);\n}\n\n.astrum-avatar__edit-icon svg {\n width: 32px;\n height: 32px;\n}\n\n.astrum-avatar--hovered .astrum-avatar__overlay {\n opacity: 1;\n}\n\n.astrum-avatar--hovered .astrum-avatar__add-icon {\n opacity: 1;\n}\n\n.astrum-avatar--hovered .astrum-avatar__edit-icon {\n opacity: 1;\n}\n\n.astrum-avatar__remove-button {\n position: absolute;\n top: -2px;\n right: -2px;\n width: 20px;\n height: 20px;\n background: var(--astrum-avatar-edit-icon);\n border-radius: 50%;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n z-index: 2;\n padding: 0;\n transition: opacity 0.2s ease-out;\n color: #ea3b3d;\n}\n\n.astrum-avatar__remove-button svg {\n width: 12px;\n height: 12px;\n}"],"mappings":";AAAA,CAAC;AACC,+BAA6B;AAC7B,8BAA4B;AAC5B,4BAA0B;AAC1B,mCAAiC;AACjC,6BAA2B;AAC3B,gCAA8B;AAC9B,0BAAwB;AAExB,WAAS;AACT,kBAAgB;AAChB,OAAK;AACL,aAAW;AACb;AAEA,CAAC;AACC,cAAY;AACZ,YAAU;AAC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,uBAIuB,CA1DvB;AA2DC,WAAS;AACX;AAEA,CARC,uBAQuB,CA9BvB;AA+BC,WAAS;AACX;AAEA,CAAC;AACC,YAAU;AACV,OAAK;AACL,SAAO;AACP,SAAO;AACP,UAAQ;AACR,cAAY,IAAI;AAChB,iBAAe;AACf,UAAQ;AACR,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,UAAQ;AACR,cAAY,EAAE,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AACrC,WAAS;AACT,WAAS;AACT,cAAY,QAAQ,KAAK;AACzB,SAAO;AACT;AAEA,CApBC,6BAoB6B;AAC5B,SAAO;AACP,UAAQ;AACV;","names":[]}
@@ -0,0 +1,136 @@
1
+ import * as React from 'react';
2
+
3
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ variant?: "primary" | "outlined" | "dashed" | "grey" | "white" | "ghost";
5
+ size?: "s" | "m" | "l";
6
+ icon?: React.ReactNode;
7
+ iconPosition?: "left" | "right";
8
+ shape?: "default" | "square" | "circle";
9
+ children?: React.ReactNode;
10
+ }
11
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
12
+
13
+ interface ColorPickerProps {
14
+ value?: string | null;
15
+ onChange?: (color: string) => void;
16
+ colors?: string[];
17
+ disabled?: boolean;
18
+ className?: string;
19
+ "aria-label"?: string;
20
+ }
21
+ declare const ColorPicker: React.ForwardRefExoticComponent<ColorPickerProps & React.RefAttributes<HTMLDivElement>>;
22
+
23
+ interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
24
+ value: string;
25
+ }
26
+ declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
27
+ interface RadioGroupProps extends Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, "onChange"> {
28
+ name: string;
29
+ value?: string | null;
30
+ onChange?: (value: string) => void;
31
+ children: React.ReactNode;
32
+ }
33
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLFieldSetElement>>;
34
+
35
+ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "onChange"> {
36
+ checked?: boolean;
37
+ indeterminate?: boolean;
38
+ size?: "s" | "m";
39
+ onChange?: (checked: boolean) => void;
40
+ className?: string;
41
+ }
42
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
43
+
44
+ interface TogglerProps {
45
+ checked?: boolean;
46
+ disabled?: boolean;
47
+ onChange?: (checked: boolean) => void;
48
+ className?: string;
49
+ }
50
+ declare const Toggler: React.ForwardRefExoticComponent<TogglerProps & React.RefAttributes<HTMLInputElement>>;
51
+
52
+ type InputType = "text" | "tel" | "email" | "number" | "password" | "search";
53
+ type InputSize = "s" | "m";
54
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
55
+ type?: InputType;
56
+ name?: string;
57
+ required?: boolean;
58
+ label?: string;
59
+ placeholder?: string;
60
+ error?: string;
61
+ value?: string;
62
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
63
+ disabled?: boolean;
64
+ size?: InputSize;
65
+ }
66
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
67
+
68
+ interface InputCodeProps {
69
+ value?: string;
70
+ defaultValue?: string;
71
+ onChange?: (value: string) => void;
72
+ onComplete?: (value: string) => void;
73
+ error?: string;
74
+ required?: boolean;
75
+ disabled?: boolean;
76
+ id?: string;
77
+ className?: string;
78
+ }
79
+ declare const InputCode: React.ForwardRefExoticComponent<InputCodeProps & React.RefAttributes<HTMLDivElement>>;
80
+
81
+ interface SelectOption {
82
+ value: string;
83
+ label: React.ReactNode;
84
+ disabled?: boolean;
85
+ }
86
+ interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "size"> {
87
+ label?: React.ReactNode;
88
+ error?: string;
89
+ required?: boolean;
90
+ options: SelectOption[];
91
+ placeholder?: string;
92
+ size?: "s" | "m" | "l";
93
+ className?: string;
94
+ }
95
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
96
+
97
+ interface ChipsProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> {
98
+ children: React.ReactNode;
99
+ size?: "s" | "m";
100
+ onRemove?: () => void;
101
+ }
102
+ declare const Chips: React.ForwardRefExoticComponent<ChipsProps & React.RefAttributes<HTMLButtonElement>>;
103
+
104
+ interface FileUploadProps {
105
+ accept?: string;
106
+ multiple?: boolean;
107
+ disabled?: boolean;
108
+ size?: "large" | "compact";
109
+ label?: string;
110
+ description?: string;
111
+ buttonText?: string;
112
+ onChange?: (files: FileList | null) => void;
113
+ className?: string;
114
+ }
115
+ declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLInputElement>>;
116
+ interface FileItemProps {
117
+ name: string;
118
+ size?: number | string;
119
+ icon?: React.ReactNode;
120
+ onRemove?: () => void;
121
+ className?: string;
122
+ }
123
+ declare const FileItem: React.ForwardRefExoticComponent<FileItemProps & React.RefAttributes<HTMLDivElement>>;
124
+
125
+ interface AvatarProps {
126
+ src?: string | null;
127
+ alt?: string;
128
+ size?: number;
129
+ onUpload?: (file: File) => void;
130
+ onEdit?: () => void;
131
+ onRemove?: () => void;
132
+ className?: string;
133
+ }
134
+ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
135
+
136
+ export { Avatar, type AvatarProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chips, type ChipsProps, ColorPicker, type ColorPickerProps, FileItem, type FileItemProps, FileUpload, type FileUploadProps, Input, InputCode, type InputCodeProps, type InputProps, type InputSize, type InputType, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Select, type SelectOption, type SelectProps, Toggler, type TogglerProps };
@@ -0,0 +1,136 @@
1
+ import * as React from 'react';
2
+
3
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ variant?: "primary" | "outlined" | "dashed" | "grey" | "white" | "ghost";
5
+ size?: "s" | "m" | "l";
6
+ icon?: React.ReactNode;
7
+ iconPosition?: "left" | "right";
8
+ shape?: "default" | "square" | "circle";
9
+ children?: React.ReactNode;
10
+ }
11
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
12
+
13
+ interface ColorPickerProps {
14
+ value?: string | null;
15
+ onChange?: (color: string) => void;
16
+ colors?: string[];
17
+ disabled?: boolean;
18
+ className?: string;
19
+ "aria-label"?: string;
20
+ }
21
+ declare const ColorPicker: React.ForwardRefExoticComponent<ColorPickerProps & React.RefAttributes<HTMLDivElement>>;
22
+
23
+ interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
24
+ value: string;
25
+ }
26
+ declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
27
+ interface RadioGroupProps extends Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, "onChange"> {
28
+ name: string;
29
+ value?: string | null;
30
+ onChange?: (value: string) => void;
31
+ children: React.ReactNode;
32
+ }
33
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLFieldSetElement>>;
34
+
35
+ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "onChange"> {
36
+ checked?: boolean;
37
+ indeterminate?: boolean;
38
+ size?: "s" | "m";
39
+ onChange?: (checked: boolean) => void;
40
+ className?: string;
41
+ }
42
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
43
+
44
+ interface TogglerProps {
45
+ checked?: boolean;
46
+ disabled?: boolean;
47
+ onChange?: (checked: boolean) => void;
48
+ className?: string;
49
+ }
50
+ declare const Toggler: React.ForwardRefExoticComponent<TogglerProps & React.RefAttributes<HTMLInputElement>>;
51
+
52
+ type InputType = "text" | "tel" | "email" | "number" | "password" | "search";
53
+ type InputSize = "s" | "m";
54
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
55
+ type?: InputType;
56
+ name?: string;
57
+ required?: boolean;
58
+ label?: string;
59
+ placeholder?: string;
60
+ error?: string;
61
+ value?: string;
62
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
63
+ disabled?: boolean;
64
+ size?: InputSize;
65
+ }
66
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
67
+
68
+ interface InputCodeProps {
69
+ value?: string;
70
+ defaultValue?: string;
71
+ onChange?: (value: string) => void;
72
+ onComplete?: (value: string) => void;
73
+ error?: string;
74
+ required?: boolean;
75
+ disabled?: boolean;
76
+ id?: string;
77
+ className?: string;
78
+ }
79
+ declare const InputCode: React.ForwardRefExoticComponent<InputCodeProps & React.RefAttributes<HTMLDivElement>>;
80
+
81
+ interface SelectOption {
82
+ value: string;
83
+ label: React.ReactNode;
84
+ disabled?: boolean;
85
+ }
86
+ interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "size"> {
87
+ label?: React.ReactNode;
88
+ error?: string;
89
+ required?: boolean;
90
+ options: SelectOption[];
91
+ placeholder?: string;
92
+ size?: "s" | "m" | "l";
93
+ className?: string;
94
+ }
95
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
96
+
97
+ interface ChipsProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> {
98
+ children: React.ReactNode;
99
+ size?: "s" | "m";
100
+ onRemove?: () => void;
101
+ }
102
+ declare const Chips: React.ForwardRefExoticComponent<ChipsProps & React.RefAttributes<HTMLButtonElement>>;
103
+
104
+ interface FileUploadProps {
105
+ accept?: string;
106
+ multiple?: boolean;
107
+ disabled?: boolean;
108
+ size?: "large" | "compact";
109
+ label?: string;
110
+ description?: string;
111
+ buttonText?: string;
112
+ onChange?: (files: FileList | null) => void;
113
+ className?: string;
114
+ }
115
+ declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLInputElement>>;
116
+ interface FileItemProps {
117
+ name: string;
118
+ size?: number | string;
119
+ icon?: React.ReactNode;
120
+ onRemove?: () => void;
121
+ className?: string;
122
+ }
123
+ declare const FileItem: React.ForwardRefExoticComponent<FileItemProps & React.RefAttributes<HTMLDivElement>>;
124
+
125
+ interface AvatarProps {
126
+ src?: string | null;
127
+ alt?: string;
128
+ size?: number;
129
+ onUpload?: (file: File) => void;
130
+ onEdit?: () => void;
131
+ onRemove?: () => void;
132
+ className?: string;
133
+ }
134
+ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
135
+
136
+ export { Avatar, type AvatarProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chips, type ChipsProps, ColorPicker, type ColorPickerProps, FileItem, type FileItemProps, FileUpload, type FileUploadProps, Input, InputCode, type InputCodeProps, type InputProps, type InputSize, type InputType, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Select, type SelectOption, type SelectProps, Toggler, type TogglerProps };