@neoptocom/neopto-ui 0.2.1 → 0.4.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/CONSUMER_SETUP.md +15 -15
- package/README.md +29 -23
- package/dist/index.cjs +347 -95
- package/dist/index.d.cts +143 -4
- package/dist/index.d.ts +143 -4
- package/dist/index.js +344 -97
- package/dist/styles.css +19 -15
- package/package.json +3 -4
package/dist/index.d.cts
CHANGED
|
@@ -155,8 +155,10 @@ interface SearchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSele
|
|
|
155
155
|
maxHeight?: number;
|
|
156
156
|
/** Optional id base (for accessibility hooks) */
|
|
157
157
|
id?: string;
|
|
158
|
+
/** Optional filter children to render when filters are expanded */
|
|
159
|
+
children?: React.ReactNode;
|
|
158
160
|
}
|
|
159
|
-
declare function Search({ className, options, onSearch, selectedOption, onSelect, searchDelay, disabled, maxHeight, id, ...props }: SearchProps): react_jsx_runtime.JSX.Element;
|
|
161
|
+
declare function Search({ className, options, onSearch, selectedOption, onSelect, searchDelay, disabled, maxHeight, id, children, ...props }: SearchProps): react_jsx_runtime.JSX.Element;
|
|
160
162
|
|
|
161
163
|
declare const buttonStyles: tailwind_variants.TVReturnType<{
|
|
162
164
|
variant: {
|
|
@@ -267,6 +269,106 @@ declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes
|
|
|
267
269
|
icon?: React.ReactNode;
|
|
268
270
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
269
271
|
|
|
272
|
+
declare const iconButtonStyles: tailwind_variants.TVReturnType<{
|
|
273
|
+
variant: {
|
|
274
|
+
ghost: string;
|
|
275
|
+
primary: string;
|
|
276
|
+
secondary: string;
|
|
277
|
+
};
|
|
278
|
+
size: {
|
|
279
|
+
sm: string;
|
|
280
|
+
md: string;
|
|
281
|
+
lg: string;
|
|
282
|
+
};
|
|
283
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
284
|
+
variant: {
|
|
285
|
+
ghost: string;
|
|
286
|
+
primary: string;
|
|
287
|
+
secondary: string;
|
|
288
|
+
};
|
|
289
|
+
size: {
|
|
290
|
+
sm: string;
|
|
291
|
+
md: string;
|
|
292
|
+
lg: string;
|
|
293
|
+
};
|
|
294
|
+
}, {
|
|
295
|
+
variant: {
|
|
296
|
+
ghost: string;
|
|
297
|
+
primary: string;
|
|
298
|
+
secondary: string;
|
|
299
|
+
};
|
|
300
|
+
size: {
|
|
301
|
+
sm: string;
|
|
302
|
+
md: string;
|
|
303
|
+
lg: string;
|
|
304
|
+
};
|
|
305
|
+
}>, {
|
|
306
|
+
variant: {
|
|
307
|
+
ghost: string;
|
|
308
|
+
primary: string;
|
|
309
|
+
secondary: string;
|
|
310
|
+
};
|
|
311
|
+
size: {
|
|
312
|
+
sm: string;
|
|
313
|
+
md: string;
|
|
314
|
+
lg: string;
|
|
315
|
+
};
|
|
316
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
317
|
+
variant: {
|
|
318
|
+
ghost: string;
|
|
319
|
+
primary: string;
|
|
320
|
+
secondary: string;
|
|
321
|
+
};
|
|
322
|
+
size: {
|
|
323
|
+
sm: string;
|
|
324
|
+
md: string;
|
|
325
|
+
lg: string;
|
|
326
|
+
};
|
|
327
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
328
|
+
variant: {
|
|
329
|
+
ghost: string;
|
|
330
|
+
primary: string;
|
|
331
|
+
secondary: string;
|
|
332
|
+
};
|
|
333
|
+
size: {
|
|
334
|
+
sm: string;
|
|
335
|
+
md: string;
|
|
336
|
+
lg: string;
|
|
337
|
+
};
|
|
338
|
+
}, {
|
|
339
|
+
variant: {
|
|
340
|
+
ghost: string;
|
|
341
|
+
primary: string;
|
|
342
|
+
secondary: string;
|
|
343
|
+
};
|
|
344
|
+
size: {
|
|
345
|
+
sm: string;
|
|
346
|
+
md: string;
|
|
347
|
+
lg: string;
|
|
348
|
+
};
|
|
349
|
+
}>, unknown, unknown, undefined>>;
|
|
350
|
+
type IconButtonVariants = VariantProps<typeof iconButtonStyles>;
|
|
351
|
+
type IconButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & IconButtonVariants & {
|
|
352
|
+
/** Material Symbols icon name */
|
|
353
|
+
icon: string;
|
|
354
|
+
/** Icon size (defaults to button size) */
|
|
355
|
+
iconSize?: "sm" | "md" | "lg";
|
|
356
|
+
/** Icon fill (0 = outlined, 1 = filled) */
|
|
357
|
+
iconFill?: 0 | 1;
|
|
358
|
+
/** Optional custom className for the icon */
|
|
359
|
+
iconClassName?: string;
|
|
360
|
+
};
|
|
361
|
+
declare const IconButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & IconButtonVariants & {
|
|
362
|
+
/** Material Symbols icon name */
|
|
363
|
+
icon: string;
|
|
364
|
+
/** Icon size (defaults to button size) */
|
|
365
|
+
iconSize?: "sm" | "md" | "lg";
|
|
366
|
+
/** Icon fill (0 = outlined, 1 = filled) */
|
|
367
|
+
iconFill?: 0 | 1;
|
|
368
|
+
/** Optional custom className for the icon */
|
|
369
|
+
iconClassName?: string;
|
|
370
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
371
|
+
|
|
270
372
|
type IconProps = {
|
|
271
373
|
/** Material Symbols name (e.g., "search", "close", "more_vert") */
|
|
272
374
|
name: string;
|
|
@@ -279,12 +381,49 @@ type IconProps = {
|
|
|
279
381
|
};
|
|
280
382
|
declare function Icon({ name, className, title, size, fill }: IconProps): react_jsx_runtime.JSX.Element;
|
|
281
383
|
|
|
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
384
|
type ChipProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
284
385
|
variant?: "warning" | "success" | "error" | "light" | "dark";
|
|
285
|
-
icon?:
|
|
386
|
+
icon?: string;
|
|
286
387
|
label?: string;
|
|
287
388
|
};
|
|
288
389
|
declare function Chip({ variant, icon, className, label, ...props }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
289
390
|
|
|
290
|
-
|
|
391
|
+
type CounterProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & {
|
|
392
|
+
value?: number;
|
|
393
|
+
onChange?: (value: number) => void;
|
|
394
|
+
min?: number;
|
|
395
|
+
max?: number;
|
|
396
|
+
step?: number;
|
|
397
|
+
};
|
|
398
|
+
declare function Counter({ value, onChange, min, max, step, className, ...props }: CounterProps): react_jsx_runtime.JSX.Element;
|
|
399
|
+
|
|
400
|
+
interface ChatButtonProps {
|
|
401
|
+
/** Callback when chat button is clicked */
|
|
402
|
+
onOpenChat: () => void;
|
|
403
|
+
/** Whether there's a new notification */
|
|
404
|
+
hasNotification?: boolean;
|
|
405
|
+
/** The notification message to display */
|
|
406
|
+
notificationMessage?: string;
|
|
407
|
+
/** Logo source for the chat agent */
|
|
408
|
+
logoSrc?: string;
|
|
409
|
+
/** Alt text for the logo */
|
|
410
|
+
logoAlt?: string;
|
|
411
|
+
/** Custom animation colors */
|
|
412
|
+
animationColors?: string[];
|
|
413
|
+
}
|
|
414
|
+
declare const ChatButton: ({ onOpenChat, hasNotification, notificationMessage, logoSrc, logoAlt, animationColors, }: ChatButtonProps) => react_jsx_runtime.JSX.Element;
|
|
415
|
+
|
|
416
|
+
interface AnimatedBgCircleProps {
|
|
417
|
+
colors: string[];
|
|
418
|
+
delay?: number;
|
|
419
|
+
stretch?: boolean;
|
|
420
|
+
}
|
|
421
|
+
declare const AnimatedBgCircle: ({ colors, delay }: AnimatedBgCircleProps) => react_jsx_runtime.JSX.Element;
|
|
422
|
+
|
|
423
|
+
interface AnimatedBgRectangleProps {
|
|
424
|
+
colors: string[];
|
|
425
|
+
delay?: number;
|
|
426
|
+
}
|
|
427
|
+
declare const AnimatedBgRectangle: ({ colors, delay }: AnimatedBgRectangleProps) => react_jsx_runtime.JSX.Element;
|
|
428
|
+
|
|
429
|
+
export { AnimatedBgCircle, AnimatedBgRectangle, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, ChatButton, type ChatButtonProps, Chip, type ChipProps, Counter, type CounterProps, Icon, IconButton, type IconButtonProps, 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
CHANGED
|
@@ -155,8 +155,10 @@ interface SearchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSele
|
|
|
155
155
|
maxHeight?: number;
|
|
156
156
|
/** Optional id base (for accessibility hooks) */
|
|
157
157
|
id?: string;
|
|
158
|
+
/** Optional filter children to render when filters are expanded */
|
|
159
|
+
children?: React.ReactNode;
|
|
158
160
|
}
|
|
159
|
-
declare function Search({ className, options, onSearch, selectedOption, onSelect, searchDelay, disabled, maxHeight, id, ...props }: SearchProps): react_jsx_runtime.JSX.Element;
|
|
161
|
+
declare function Search({ className, options, onSearch, selectedOption, onSelect, searchDelay, disabled, maxHeight, id, children, ...props }: SearchProps): react_jsx_runtime.JSX.Element;
|
|
160
162
|
|
|
161
163
|
declare const buttonStyles: tailwind_variants.TVReturnType<{
|
|
162
164
|
variant: {
|
|
@@ -267,6 +269,106 @@ declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes
|
|
|
267
269
|
icon?: React.ReactNode;
|
|
268
270
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
269
271
|
|
|
272
|
+
declare const iconButtonStyles: tailwind_variants.TVReturnType<{
|
|
273
|
+
variant: {
|
|
274
|
+
ghost: string;
|
|
275
|
+
primary: string;
|
|
276
|
+
secondary: string;
|
|
277
|
+
};
|
|
278
|
+
size: {
|
|
279
|
+
sm: string;
|
|
280
|
+
md: string;
|
|
281
|
+
lg: string;
|
|
282
|
+
};
|
|
283
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
284
|
+
variant: {
|
|
285
|
+
ghost: string;
|
|
286
|
+
primary: string;
|
|
287
|
+
secondary: string;
|
|
288
|
+
};
|
|
289
|
+
size: {
|
|
290
|
+
sm: string;
|
|
291
|
+
md: string;
|
|
292
|
+
lg: string;
|
|
293
|
+
};
|
|
294
|
+
}, {
|
|
295
|
+
variant: {
|
|
296
|
+
ghost: string;
|
|
297
|
+
primary: string;
|
|
298
|
+
secondary: string;
|
|
299
|
+
};
|
|
300
|
+
size: {
|
|
301
|
+
sm: string;
|
|
302
|
+
md: string;
|
|
303
|
+
lg: string;
|
|
304
|
+
};
|
|
305
|
+
}>, {
|
|
306
|
+
variant: {
|
|
307
|
+
ghost: string;
|
|
308
|
+
primary: string;
|
|
309
|
+
secondary: string;
|
|
310
|
+
};
|
|
311
|
+
size: {
|
|
312
|
+
sm: string;
|
|
313
|
+
md: string;
|
|
314
|
+
lg: string;
|
|
315
|
+
};
|
|
316
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
317
|
+
variant: {
|
|
318
|
+
ghost: string;
|
|
319
|
+
primary: string;
|
|
320
|
+
secondary: string;
|
|
321
|
+
};
|
|
322
|
+
size: {
|
|
323
|
+
sm: string;
|
|
324
|
+
md: string;
|
|
325
|
+
lg: string;
|
|
326
|
+
};
|
|
327
|
+
}, undefined, string, tailwind_variants_dist_config_js.TVConfig<{
|
|
328
|
+
variant: {
|
|
329
|
+
ghost: string;
|
|
330
|
+
primary: string;
|
|
331
|
+
secondary: string;
|
|
332
|
+
};
|
|
333
|
+
size: {
|
|
334
|
+
sm: string;
|
|
335
|
+
md: string;
|
|
336
|
+
lg: string;
|
|
337
|
+
};
|
|
338
|
+
}, {
|
|
339
|
+
variant: {
|
|
340
|
+
ghost: string;
|
|
341
|
+
primary: string;
|
|
342
|
+
secondary: string;
|
|
343
|
+
};
|
|
344
|
+
size: {
|
|
345
|
+
sm: string;
|
|
346
|
+
md: string;
|
|
347
|
+
lg: string;
|
|
348
|
+
};
|
|
349
|
+
}>, unknown, unknown, undefined>>;
|
|
350
|
+
type IconButtonVariants = VariantProps<typeof iconButtonStyles>;
|
|
351
|
+
type IconButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & IconButtonVariants & {
|
|
352
|
+
/** Material Symbols icon name */
|
|
353
|
+
icon: string;
|
|
354
|
+
/** Icon size (defaults to button size) */
|
|
355
|
+
iconSize?: "sm" | "md" | "lg";
|
|
356
|
+
/** Icon fill (0 = outlined, 1 = filled) */
|
|
357
|
+
iconFill?: 0 | 1;
|
|
358
|
+
/** Optional custom className for the icon */
|
|
359
|
+
iconClassName?: string;
|
|
360
|
+
};
|
|
361
|
+
declare const IconButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & IconButtonVariants & {
|
|
362
|
+
/** Material Symbols icon name */
|
|
363
|
+
icon: string;
|
|
364
|
+
/** Icon size (defaults to button size) */
|
|
365
|
+
iconSize?: "sm" | "md" | "lg";
|
|
366
|
+
/** Icon fill (0 = outlined, 1 = filled) */
|
|
367
|
+
iconFill?: 0 | 1;
|
|
368
|
+
/** Optional custom className for the icon */
|
|
369
|
+
iconClassName?: string;
|
|
370
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
371
|
+
|
|
270
372
|
type IconProps = {
|
|
271
373
|
/** Material Symbols name (e.g., "search", "close", "more_vert") */
|
|
272
374
|
name: string;
|
|
@@ -279,12 +381,49 @@ type IconProps = {
|
|
|
279
381
|
};
|
|
280
382
|
declare function Icon({ name, className, title, size, fill }: IconProps): react_jsx_runtime.JSX.Element;
|
|
281
383
|
|
|
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
384
|
type ChipProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
284
385
|
variant?: "warning" | "success" | "error" | "light" | "dark";
|
|
285
|
-
icon?:
|
|
386
|
+
icon?: string;
|
|
286
387
|
label?: string;
|
|
287
388
|
};
|
|
288
389
|
declare function Chip({ variant, icon, className, label, ...props }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
289
390
|
|
|
290
|
-
|
|
391
|
+
type CounterProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & {
|
|
392
|
+
value?: number;
|
|
393
|
+
onChange?: (value: number) => void;
|
|
394
|
+
min?: number;
|
|
395
|
+
max?: number;
|
|
396
|
+
step?: number;
|
|
397
|
+
};
|
|
398
|
+
declare function Counter({ value, onChange, min, max, step, className, ...props }: CounterProps): react_jsx_runtime.JSX.Element;
|
|
399
|
+
|
|
400
|
+
interface ChatButtonProps {
|
|
401
|
+
/** Callback when chat button is clicked */
|
|
402
|
+
onOpenChat: () => void;
|
|
403
|
+
/** Whether there's a new notification */
|
|
404
|
+
hasNotification?: boolean;
|
|
405
|
+
/** The notification message to display */
|
|
406
|
+
notificationMessage?: string;
|
|
407
|
+
/** Logo source for the chat agent */
|
|
408
|
+
logoSrc?: string;
|
|
409
|
+
/** Alt text for the logo */
|
|
410
|
+
logoAlt?: string;
|
|
411
|
+
/** Custom animation colors */
|
|
412
|
+
animationColors?: string[];
|
|
413
|
+
}
|
|
414
|
+
declare const ChatButton: ({ onOpenChat, hasNotification, notificationMessage, logoSrc, logoAlt, animationColors, }: ChatButtonProps) => react_jsx_runtime.JSX.Element;
|
|
415
|
+
|
|
416
|
+
interface AnimatedBgCircleProps {
|
|
417
|
+
colors: string[];
|
|
418
|
+
delay?: number;
|
|
419
|
+
stretch?: boolean;
|
|
420
|
+
}
|
|
421
|
+
declare const AnimatedBgCircle: ({ colors, delay }: AnimatedBgCircleProps) => react_jsx_runtime.JSX.Element;
|
|
422
|
+
|
|
423
|
+
interface AnimatedBgRectangleProps {
|
|
424
|
+
colors: string[];
|
|
425
|
+
delay?: number;
|
|
426
|
+
}
|
|
427
|
+
declare const AnimatedBgRectangle: ({ colors, delay }: AnimatedBgRectangleProps) => react_jsx_runtime.JSX.Element;
|
|
428
|
+
|
|
429
|
+
export { AnimatedBgCircle, AnimatedBgRectangle, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, ChatButton, type ChatButtonProps, Chip, type ChipProps, Counter, type CounterProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight };
|