@neoptocom/neopto-ui 0.2.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/CONSUMER_SETUP.md +127 -0
- package/README.md +186 -0
- package/dist/index.cjs +836 -0
- package/dist/index.d.cts +290 -0
- package/dist/index.d.ts +290 -0
- package/dist/index.js +805 -0
- package/dist/styles.css +109 -0
- package/package.json +89 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
4
|
+
import { VariantProps } from 'tailwind-variants';
|
|
5
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
6
|
+
|
|
7
|
+
type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
|
|
8
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
9
|
+
|
|
10
|
+
type ModalProps = {
|
|
11
|
+
open: boolean;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
title?: string;
|
|
15
|
+
/** When true, closes when the overlay is clicked */
|
|
16
|
+
closeOnOverlay?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare function Modal({ open, onClose, title, closeOnOverlay, children }: ModalProps): React.ReactPortal | null;
|
|
19
|
+
|
|
20
|
+
type TypoVariant = "display-lg" | "display-md" | "display-sm" | "headline-lg" | "headline-md" | "headline-sm" | "title-lg" | "title-md" | "title-sm" | "label-lg" | "label-md" | "label-sm" | "body-lg" | "body-md" | "body-sm" | "button";
|
|
21
|
+
type TypoWeight = "normal" | "medium" | "semibold" | "bold";
|
|
22
|
+
type TypoProps<T extends React.ElementType = "span"> = {
|
|
23
|
+
/**
|
|
24
|
+
* Typography scale name (e.g., "title-md", "body-sm", "display-lg").
|
|
25
|
+
* Uses Tailwind utilities with design tokens for consistent theming.
|
|
26
|
+
*/
|
|
27
|
+
variant: TypoVariant;
|
|
28
|
+
/** Optional font weight override */
|
|
29
|
+
bold?: TypoWeight;
|
|
30
|
+
/** Use muted foreground token */
|
|
31
|
+
muted?: boolean;
|
|
32
|
+
/** Render as a different element (e.g., "p", "h3") */
|
|
33
|
+
as?: T;
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, "as" | "children">;
|
|
36
|
+
declare function Typo<T extends React.ElementType = "span">({ variant, bold, muted, as, className, children, ...props }: TypoProps<T>): react_jsx_runtime.JSX.Element;
|
|
37
|
+
|
|
38
|
+
type AvatarProps = {
|
|
39
|
+
/** Person's full name (used for initials and alt text) */
|
|
40
|
+
name: string;
|
|
41
|
+
/** Image URL */
|
|
42
|
+
src?: string;
|
|
43
|
+
/** Optional custom background color (CSS color). If omitted, token bg or a derived pastel is used. */
|
|
44
|
+
color?: string;
|
|
45
|
+
/** Accessible alt text; defaults to the person's name */
|
|
46
|
+
alt?: string;
|
|
47
|
+
} & VariantProps<typeof avatarStyles> & Omit<React.HTMLAttributes<HTMLDivElement>, "children">;
|
|
48
|
+
declare const avatarStyles: tailwind_variants.TVReturnType<{
|
|
49
|
+
size: {
|
|
50
|
+
sm: string;
|
|
51
|
+
md: string;
|
|
52
|
+
};
|
|
53
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
54
|
+
size: {
|
|
55
|
+
sm: string;
|
|
56
|
+
md: string;
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
size: {
|
|
60
|
+
sm: string;
|
|
61
|
+
md: string;
|
|
62
|
+
};
|
|
63
|
+
}>, {
|
|
64
|
+
size: {
|
|
65
|
+
sm: string;
|
|
66
|
+
md: string;
|
|
67
|
+
};
|
|
68
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
69
|
+
size: {
|
|
70
|
+
sm: string;
|
|
71
|
+
md: string;
|
|
72
|
+
};
|
|
73
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
74
|
+
size: {
|
|
75
|
+
sm: string;
|
|
76
|
+
md: string;
|
|
77
|
+
};
|
|
78
|
+
}, {
|
|
79
|
+
size: {
|
|
80
|
+
sm: string;
|
|
81
|
+
md: string;
|
|
82
|
+
};
|
|
83
|
+
}>, unknown, unknown, undefined>>;
|
|
84
|
+
declare function Avatar({ name, src, color, size, alt, className, style, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
85
|
+
|
|
86
|
+
type AvatarGroupProps = {
|
|
87
|
+
children: React.ReactNode;
|
|
88
|
+
className?: string;
|
|
89
|
+
/** Maximum avatars to display before showing a +N counter */
|
|
90
|
+
max?: number;
|
|
91
|
+
/** Overlap offset in pixels (default 8px) */
|
|
92
|
+
overlapPx?: number;
|
|
93
|
+
/** Adds a separating ring around each avatar to improve contrast */
|
|
94
|
+
withRings?: boolean;
|
|
95
|
+
};
|
|
96
|
+
declare function AvatarGroup({ children, className, max, overlapPx, withRings }: AvatarGroupProps): react_jsx_runtime.JSX.Element;
|
|
97
|
+
|
|
98
|
+
type SkeletonProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
99
|
+
rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
100
|
+
};
|
|
101
|
+
declare function Skeleton({ className, rounded, ...props }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
102
|
+
|
|
103
|
+
type AutocompleteOption = {
|
|
104
|
+
label: string;
|
|
105
|
+
value: any;
|
|
106
|
+
image?: string;
|
|
107
|
+
group?: Array<{
|
|
108
|
+
name: string;
|
|
109
|
+
image?: string;
|
|
110
|
+
}>;
|
|
111
|
+
};
|
|
112
|
+
interface AutocompleteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
113
|
+
/** Label text displayed above the input */
|
|
114
|
+
title: string;
|
|
115
|
+
/** Array of options to display */
|
|
116
|
+
options: AutocompleteOption[] | string[];
|
|
117
|
+
/** Currently selected option */
|
|
118
|
+
selectedOption: AutocompleteOption | string | null;
|
|
119
|
+
/** Callback when an option is selected */
|
|
120
|
+
onSelect: (option: AutocompleteOption | string | null) => void;
|
|
121
|
+
/** Placeholder text for the input */
|
|
122
|
+
placeholder?: string;
|
|
123
|
+
/** Whether the component is disabled */
|
|
124
|
+
disabled?: boolean;
|
|
125
|
+
/** Maximum height of the options dropdown */
|
|
126
|
+
maxHeight?: number;
|
|
127
|
+
/** Optional id base (for accessibility hooks) */
|
|
128
|
+
id?: string;
|
|
129
|
+
}
|
|
130
|
+
declare function Autocomplete({ className, title, options, selectedOption, onSelect, placeholder, disabled, maxHeight, id, ...props }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
131
|
+
|
|
132
|
+
type SearchOption = {
|
|
133
|
+
label: string;
|
|
134
|
+
value: any;
|
|
135
|
+
image?: string;
|
|
136
|
+
group?: Array<{
|
|
137
|
+
name: string;
|
|
138
|
+
image?: string;
|
|
139
|
+
}>;
|
|
140
|
+
};
|
|
141
|
+
interface SearchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
142
|
+
/** Array of options to display */
|
|
143
|
+
options: SearchOption[] | string[];
|
|
144
|
+
/** Callback when search is performed (debounced) */
|
|
145
|
+
onSearch: (query: string) => void;
|
|
146
|
+
/** Currently selected option */
|
|
147
|
+
selectedOption: SearchOption | string | null;
|
|
148
|
+
/** Callback when an option is selected */
|
|
149
|
+
onSelect: (option: SearchOption | string | null) => void;
|
|
150
|
+
/** Search delay in milliseconds (default: 300ms) */
|
|
151
|
+
searchDelay?: number;
|
|
152
|
+
/** Whether the component is disabled */
|
|
153
|
+
disabled?: boolean;
|
|
154
|
+
/** Maximum height of the options dropdown */
|
|
155
|
+
maxHeight?: number;
|
|
156
|
+
/** Optional id base (for accessibility hooks) */
|
|
157
|
+
id?: string;
|
|
158
|
+
}
|
|
159
|
+
declare function Search({ className, options, onSearch, selectedOption, onSelect, searchDelay, disabled, maxHeight, id, ...props }: SearchProps): react_jsx_runtime.JSX.Element;
|
|
160
|
+
|
|
161
|
+
declare const buttonStyles: tailwind_variants.TVReturnType<{
|
|
162
|
+
variant: {
|
|
163
|
+
primary: string;
|
|
164
|
+
secondary: string;
|
|
165
|
+
ghost: string;
|
|
166
|
+
};
|
|
167
|
+
size: {
|
|
168
|
+
sm: string;
|
|
169
|
+
md: string;
|
|
170
|
+
lg: string;
|
|
171
|
+
};
|
|
172
|
+
fullWidth: {
|
|
173
|
+
true: string;
|
|
174
|
+
};
|
|
175
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
176
|
+
variant: {
|
|
177
|
+
primary: string;
|
|
178
|
+
secondary: string;
|
|
179
|
+
ghost: string;
|
|
180
|
+
};
|
|
181
|
+
size: {
|
|
182
|
+
sm: string;
|
|
183
|
+
md: string;
|
|
184
|
+
lg: string;
|
|
185
|
+
};
|
|
186
|
+
fullWidth: {
|
|
187
|
+
true: string;
|
|
188
|
+
};
|
|
189
|
+
}, {
|
|
190
|
+
variant: {
|
|
191
|
+
primary: string;
|
|
192
|
+
secondary: string;
|
|
193
|
+
ghost: string;
|
|
194
|
+
};
|
|
195
|
+
size: {
|
|
196
|
+
sm: string;
|
|
197
|
+
md: string;
|
|
198
|
+
lg: string;
|
|
199
|
+
};
|
|
200
|
+
fullWidth: {
|
|
201
|
+
true: string;
|
|
202
|
+
};
|
|
203
|
+
}>, {
|
|
204
|
+
variant: {
|
|
205
|
+
primary: string;
|
|
206
|
+
secondary: string;
|
|
207
|
+
ghost: string;
|
|
208
|
+
};
|
|
209
|
+
size: {
|
|
210
|
+
sm: string;
|
|
211
|
+
md: string;
|
|
212
|
+
lg: string;
|
|
213
|
+
};
|
|
214
|
+
fullWidth: {
|
|
215
|
+
true: string;
|
|
216
|
+
};
|
|
217
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
218
|
+
variant: {
|
|
219
|
+
primary: string;
|
|
220
|
+
secondary: string;
|
|
221
|
+
ghost: string;
|
|
222
|
+
};
|
|
223
|
+
size: {
|
|
224
|
+
sm: string;
|
|
225
|
+
md: string;
|
|
226
|
+
lg: string;
|
|
227
|
+
};
|
|
228
|
+
fullWidth: {
|
|
229
|
+
true: string;
|
|
230
|
+
};
|
|
231
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
232
|
+
variant: {
|
|
233
|
+
primary: string;
|
|
234
|
+
secondary: string;
|
|
235
|
+
ghost: string;
|
|
236
|
+
};
|
|
237
|
+
size: {
|
|
238
|
+
sm: string;
|
|
239
|
+
md: string;
|
|
240
|
+
lg: string;
|
|
241
|
+
};
|
|
242
|
+
fullWidth: {
|
|
243
|
+
true: string;
|
|
244
|
+
};
|
|
245
|
+
}, {
|
|
246
|
+
variant: {
|
|
247
|
+
primary: string;
|
|
248
|
+
secondary: string;
|
|
249
|
+
ghost: string;
|
|
250
|
+
};
|
|
251
|
+
size: {
|
|
252
|
+
sm: string;
|
|
253
|
+
md: string;
|
|
254
|
+
lg: string;
|
|
255
|
+
};
|
|
256
|
+
fullWidth: {
|
|
257
|
+
true: string;
|
|
258
|
+
};
|
|
259
|
+
}>, unknown, unknown, undefined>>;
|
|
260
|
+
type ButtonVariants = VariantProps<typeof buttonStyles>;
|
|
261
|
+
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & ButtonVariants & {
|
|
262
|
+
/** Icon component to display instead of text */
|
|
263
|
+
icon?: React.ReactNode;
|
|
264
|
+
};
|
|
265
|
+
declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & ButtonVariants & {
|
|
266
|
+
/** Icon component to display instead of text */
|
|
267
|
+
icon?: React.ReactNode;
|
|
268
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
269
|
+
|
|
270
|
+
type IconProps = {
|
|
271
|
+
/** Material Symbols name (e.g., "search", "close", "more_vert") */
|
|
272
|
+
name: string;
|
|
273
|
+
className?: string;
|
|
274
|
+
title?: string;
|
|
275
|
+
/** Visual size preset */
|
|
276
|
+
size?: "sm" | "md" | "lg";
|
|
277
|
+
/** Filled (1) vs outlined (0) glyph */
|
|
278
|
+
fill?: 0 | 1;
|
|
279
|
+
};
|
|
280
|
+
declare function Icon({ name, className, title, size, fill }: IconProps): react_jsx_runtime.JSX.Element;
|
|
281
|
+
|
|
282
|
+
type IconOption = "home" | "search" | "person" | "settings" | "close" | "check" | "clear" | "menu" | "more_vert" | "favorite" | "favorite_border" | "star" | "star_outline" | "visibility" | "visibility_off" | "lock" | "lock_open" | "download" | "upload" | "share" | "refresh" | "calendar_today" | "schedule" | "notifications" | "notifications_off" | "error" | "error_outline" | "help" | "help_outline" | "arrow_back" | "arrow_forward" | "chevron_right" | "expand_more" | "play_arrow" | "pause" | "stop" | "skip_next" | "skip_previous" | "volume_up" | "volume_off" | "mic" | "mic_off" | "camera_alt" | "photo" | "image" | "map" | "place" | "location_on" | "phone" | "mail" | "chat" | "send" | "link" | "attachment" | "shopping_cart" | "payment";
|
|
283
|
+
type ChipProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
284
|
+
variant?: "warning" | "success" | "error" | "light" | "dark";
|
|
285
|
+
icon?: IconOption;
|
|
286
|
+
label?: string;
|
|
287
|
+
};
|
|
288
|
+
declare function Chip({ variant, icon, className, label, ...props }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
289
|
+
|
|
290
|
+
export { Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, Chip, type ChipProps, Icon, type IconProps, Input, type InputProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
4
|
+
import { VariantProps } from 'tailwind-variants';
|
|
5
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
6
|
+
|
|
7
|
+
type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
|
|
8
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
9
|
+
|
|
10
|
+
type ModalProps = {
|
|
11
|
+
open: boolean;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
title?: string;
|
|
15
|
+
/** When true, closes when the overlay is clicked */
|
|
16
|
+
closeOnOverlay?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare function Modal({ open, onClose, title, closeOnOverlay, children }: ModalProps): React.ReactPortal | null;
|
|
19
|
+
|
|
20
|
+
type TypoVariant = "display-lg" | "display-md" | "display-sm" | "headline-lg" | "headline-md" | "headline-sm" | "title-lg" | "title-md" | "title-sm" | "label-lg" | "label-md" | "label-sm" | "body-lg" | "body-md" | "body-sm" | "button";
|
|
21
|
+
type TypoWeight = "normal" | "medium" | "semibold" | "bold";
|
|
22
|
+
type TypoProps<T extends React.ElementType = "span"> = {
|
|
23
|
+
/**
|
|
24
|
+
* Typography scale name (e.g., "title-md", "body-sm", "display-lg").
|
|
25
|
+
* Uses Tailwind utilities with design tokens for consistent theming.
|
|
26
|
+
*/
|
|
27
|
+
variant: TypoVariant;
|
|
28
|
+
/** Optional font weight override */
|
|
29
|
+
bold?: TypoWeight;
|
|
30
|
+
/** Use muted foreground token */
|
|
31
|
+
muted?: boolean;
|
|
32
|
+
/** Render as a different element (e.g., "p", "h3") */
|
|
33
|
+
as?: T;
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, "as" | "children">;
|
|
36
|
+
declare function Typo<T extends React.ElementType = "span">({ variant, bold, muted, as, className, children, ...props }: TypoProps<T>): react_jsx_runtime.JSX.Element;
|
|
37
|
+
|
|
38
|
+
type AvatarProps = {
|
|
39
|
+
/** Person's full name (used for initials and alt text) */
|
|
40
|
+
name: string;
|
|
41
|
+
/** Image URL */
|
|
42
|
+
src?: string;
|
|
43
|
+
/** Optional custom background color (CSS color). If omitted, token bg or a derived pastel is used. */
|
|
44
|
+
color?: string;
|
|
45
|
+
/** Accessible alt text; defaults to the person's name */
|
|
46
|
+
alt?: string;
|
|
47
|
+
} & VariantProps<typeof avatarStyles> & Omit<React.HTMLAttributes<HTMLDivElement>, "children">;
|
|
48
|
+
declare const avatarStyles: tailwind_variants.TVReturnType<{
|
|
49
|
+
size: {
|
|
50
|
+
sm: string;
|
|
51
|
+
md: string;
|
|
52
|
+
};
|
|
53
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
54
|
+
size: {
|
|
55
|
+
sm: string;
|
|
56
|
+
md: string;
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
size: {
|
|
60
|
+
sm: string;
|
|
61
|
+
md: string;
|
|
62
|
+
};
|
|
63
|
+
}>, {
|
|
64
|
+
size: {
|
|
65
|
+
sm: string;
|
|
66
|
+
md: string;
|
|
67
|
+
};
|
|
68
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
69
|
+
size: {
|
|
70
|
+
sm: string;
|
|
71
|
+
md: string;
|
|
72
|
+
};
|
|
73
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
74
|
+
size: {
|
|
75
|
+
sm: string;
|
|
76
|
+
md: string;
|
|
77
|
+
};
|
|
78
|
+
}, {
|
|
79
|
+
size: {
|
|
80
|
+
sm: string;
|
|
81
|
+
md: string;
|
|
82
|
+
};
|
|
83
|
+
}>, unknown, unknown, undefined>>;
|
|
84
|
+
declare function Avatar({ name, src, color, size, alt, className, style, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
85
|
+
|
|
86
|
+
type AvatarGroupProps = {
|
|
87
|
+
children: React.ReactNode;
|
|
88
|
+
className?: string;
|
|
89
|
+
/** Maximum avatars to display before showing a +N counter */
|
|
90
|
+
max?: number;
|
|
91
|
+
/** Overlap offset in pixels (default 8px) */
|
|
92
|
+
overlapPx?: number;
|
|
93
|
+
/** Adds a separating ring around each avatar to improve contrast */
|
|
94
|
+
withRings?: boolean;
|
|
95
|
+
};
|
|
96
|
+
declare function AvatarGroup({ children, className, max, overlapPx, withRings }: AvatarGroupProps): react_jsx_runtime.JSX.Element;
|
|
97
|
+
|
|
98
|
+
type SkeletonProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
99
|
+
rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
100
|
+
};
|
|
101
|
+
declare function Skeleton({ className, rounded, ...props }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
102
|
+
|
|
103
|
+
type AutocompleteOption = {
|
|
104
|
+
label: string;
|
|
105
|
+
value: any;
|
|
106
|
+
image?: string;
|
|
107
|
+
group?: Array<{
|
|
108
|
+
name: string;
|
|
109
|
+
image?: string;
|
|
110
|
+
}>;
|
|
111
|
+
};
|
|
112
|
+
interface AutocompleteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
113
|
+
/** Label text displayed above the input */
|
|
114
|
+
title: string;
|
|
115
|
+
/** Array of options to display */
|
|
116
|
+
options: AutocompleteOption[] | string[];
|
|
117
|
+
/** Currently selected option */
|
|
118
|
+
selectedOption: AutocompleteOption | string | null;
|
|
119
|
+
/** Callback when an option is selected */
|
|
120
|
+
onSelect: (option: AutocompleteOption | string | null) => void;
|
|
121
|
+
/** Placeholder text for the input */
|
|
122
|
+
placeholder?: string;
|
|
123
|
+
/** Whether the component is disabled */
|
|
124
|
+
disabled?: boolean;
|
|
125
|
+
/** Maximum height of the options dropdown */
|
|
126
|
+
maxHeight?: number;
|
|
127
|
+
/** Optional id base (for accessibility hooks) */
|
|
128
|
+
id?: string;
|
|
129
|
+
}
|
|
130
|
+
declare function Autocomplete({ className, title, options, selectedOption, onSelect, placeholder, disabled, maxHeight, id, ...props }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
131
|
+
|
|
132
|
+
type SearchOption = {
|
|
133
|
+
label: string;
|
|
134
|
+
value: any;
|
|
135
|
+
image?: string;
|
|
136
|
+
group?: Array<{
|
|
137
|
+
name: string;
|
|
138
|
+
image?: string;
|
|
139
|
+
}>;
|
|
140
|
+
};
|
|
141
|
+
interface SearchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
142
|
+
/** Array of options to display */
|
|
143
|
+
options: SearchOption[] | string[];
|
|
144
|
+
/** Callback when search is performed (debounced) */
|
|
145
|
+
onSearch: (query: string) => void;
|
|
146
|
+
/** Currently selected option */
|
|
147
|
+
selectedOption: SearchOption | string | null;
|
|
148
|
+
/** Callback when an option is selected */
|
|
149
|
+
onSelect: (option: SearchOption | string | null) => void;
|
|
150
|
+
/** Search delay in milliseconds (default: 300ms) */
|
|
151
|
+
searchDelay?: number;
|
|
152
|
+
/** Whether the component is disabled */
|
|
153
|
+
disabled?: boolean;
|
|
154
|
+
/** Maximum height of the options dropdown */
|
|
155
|
+
maxHeight?: number;
|
|
156
|
+
/** Optional id base (for accessibility hooks) */
|
|
157
|
+
id?: string;
|
|
158
|
+
}
|
|
159
|
+
declare function Search({ className, options, onSearch, selectedOption, onSelect, searchDelay, disabled, maxHeight, id, ...props }: SearchProps): react_jsx_runtime.JSX.Element;
|
|
160
|
+
|
|
161
|
+
declare const buttonStyles: tailwind_variants.TVReturnType<{
|
|
162
|
+
variant: {
|
|
163
|
+
primary: string;
|
|
164
|
+
secondary: string;
|
|
165
|
+
ghost: string;
|
|
166
|
+
};
|
|
167
|
+
size: {
|
|
168
|
+
sm: string;
|
|
169
|
+
md: string;
|
|
170
|
+
lg: string;
|
|
171
|
+
};
|
|
172
|
+
fullWidth: {
|
|
173
|
+
true: string;
|
|
174
|
+
};
|
|
175
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
176
|
+
variant: {
|
|
177
|
+
primary: string;
|
|
178
|
+
secondary: string;
|
|
179
|
+
ghost: string;
|
|
180
|
+
};
|
|
181
|
+
size: {
|
|
182
|
+
sm: string;
|
|
183
|
+
md: string;
|
|
184
|
+
lg: string;
|
|
185
|
+
};
|
|
186
|
+
fullWidth: {
|
|
187
|
+
true: string;
|
|
188
|
+
};
|
|
189
|
+
}, {
|
|
190
|
+
variant: {
|
|
191
|
+
primary: string;
|
|
192
|
+
secondary: string;
|
|
193
|
+
ghost: string;
|
|
194
|
+
};
|
|
195
|
+
size: {
|
|
196
|
+
sm: string;
|
|
197
|
+
md: string;
|
|
198
|
+
lg: string;
|
|
199
|
+
};
|
|
200
|
+
fullWidth: {
|
|
201
|
+
true: string;
|
|
202
|
+
};
|
|
203
|
+
}>, {
|
|
204
|
+
variant: {
|
|
205
|
+
primary: string;
|
|
206
|
+
secondary: string;
|
|
207
|
+
ghost: string;
|
|
208
|
+
};
|
|
209
|
+
size: {
|
|
210
|
+
sm: string;
|
|
211
|
+
md: string;
|
|
212
|
+
lg: string;
|
|
213
|
+
};
|
|
214
|
+
fullWidth: {
|
|
215
|
+
true: string;
|
|
216
|
+
};
|
|
217
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
218
|
+
variant: {
|
|
219
|
+
primary: string;
|
|
220
|
+
secondary: string;
|
|
221
|
+
ghost: string;
|
|
222
|
+
};
|
|
223
|
+
size: {
|
|
224
|
+
sm: string;
|
|
225
|
+
md: string;
|
|
226
|
+
lg: string;
|
|
227
|
+
};
|
|
228
|
+
fullWidth: {
|
|
229
|
+
true: string;
|
|
230
|
+
};
|
|
231
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
232
|
+
variant: {
|
|
233
|
+
primary: string;
|
|
234
|
+
secondary: string;
|
|
235
|
+
ghost: string;
|
|
236
|
+
};
|
|
237
|
+
size: {
|
|
238
|
+
sm: string;
|
|
239
|
+
md: string;
|
|
240
|
+
lg: string;
|
|
241
|
+
};
|
|
242
|
+
fullWidth: {
|
|
243
|
+
true: string;
|
|
244
|
+
};
|
|
245
|
+
}, {
|
|
246
|
+
variant: {
|
|
247
|
+
primary: string;
|
|
248
|
+
secondary: string;
|
|
249
|
+
ghost: string;
|
|
250
|
+
};
|
|
251
|
+
size: {
|
|
252
|
+
sm: string;
|
|
253
|
+
md: string;
|
|
254
|
+
lg: string;
|
|
255
|
+
};
|
|
256
|
+
fullWidth: {
|
|
257
|
+
true: string;
|
|
258
|
+
};
|
|
259
|
+
}>, unknown, unknown, undefined>>;
|
|
260
|
+
type ButtonVariants = VariantProps<typeof buttonStyles>;
|
|
261
|
+
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & ButtonVariants & {
|
|
262
|
+
/** Icon component to display instead of text */
|
|
263
|
+
icon?: React.ReactNode;
|
|
264
|
+
};
|
|
265
|
+
declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & ButtonVariants & {
|
|
266
|
+
/** Icon component to display instead of text */
|
|
267
|
+
icon?: React.ReactNode;
|
|
268
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
269
|
+
|
|
270
|
+
type IconProps = {
|
|
271
|
+
/** Material Symbols name (e.g., "search", "close", "more_vert") */
|
|
272
|
+
name: string;
|
|
273
|
+
className?: string;
|
|
274
|
+
title?: string;
|
|
275
|
+
/** Visual size preset */
|
|
276
|
+
size?: "sm" | "md" | "lg";
|
|
277
|
+
/** Filled (1) vs outlined (0) glyph */
|
|
278
|
+
fill?: 0 | 1;
|
|
279
|
+
};
|
|
280
|
+
declare function Icon({ name, className, title, size, fill }: IconProps): react_jsx_runtime.JSX.Element;
|
|
281
|
+
|
|
282
|
+
type IconOption = "home" | "search" | "person" | "settings" | "close" | "check" | "clear" | "menu" | "more_vert" | "favorite" | "favorite_border" | "star" | "star_outline" | "visibility" | "visibility_off" | "lock" | "lock_open" | "download" | "upload" | "share" | "refresh" | "calendar_today" | "schedule" | "notifications" | "notifications_off" | "error" | "error_outline" | "help" | "help_outline" | "arrow_back" | "arrow_forward" | "chevron_right" | "expand_more" | "play_arrow" | "pause" | "stop" | "skip_next" | "skip_previous" | "volume_up" | "volume_off" | "mic" | "mic_off" | "camera_alt" | "photo" | "image" | "map" | "place" | "location_on" | "phone" | "mail" | "chat" | "send" | "link" | "attachment" | "shopping_cart" | "payment";
|
|
283
|
+
type ChipProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
284
|
+
variant?: "warning" | "success" | "error" | "light" | "dark";
|
|
285
|
+
icon?: IconOption;
|
|
286
|
+
label?: string;
|
|
287
|
+
};
|
|
288
|
+
declare function Chip({ variant, icon, className, label, ...props }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
289
|
+
|
|
290
|
+
export { Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, Chip, type ChipProps, Icon, type IconProps, Input, type InputProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight };
|