@nicorp/nui 0.1.9 → 0.3.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/dist/index.cjs.js +10 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +142 -9
- package/dist/index.es.js +5342 -7276
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +88 -89
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
|
29
29
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
30
30
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
31
31
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
32
|
+
import { toast } from 'sonner';
|
|
32
33
|
import { Toaster as Toaster_2 } from 'sonner';
|
|
33
34
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
34
35
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
@@ -45,6 +46,15 @@ export declare const AccordionItem: React_2.ForwardRefExoticComponent<Omit<Accor
|
|
|
45
46
|
|
|
46
47
|
export declare const AccordionTrigger: React_2.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
47
48
|
|
|
49
|
+
export declare const AILoading: React_2.ForwardRefExoticComponent<AILoadingProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
50
|
+
|
|
51
|
+
export declare interface AILoadingProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
52
|
+
/** Visual variant @default "dots" */
|
|
53
|
+
variant?: "dots" | "text";
|
|
54
|
+
/** Text shown for the "text" variant @default "Thinking" */
|
|
55
|
+
text?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
48
58
|
export declare const Alert: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
49
59
|
variant?: "default" | "destructive" | null | undefined;
|
|
50
60
|
} & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -208,18 +218,67 @@ export declare const ChartLegend: typeof Legend;
|
|
|
208
218
|
|
|
209
219
|
export declare const ChartTooltip: typeof Tooltip_2;
|
|
210
220
|
|
|
221
|
+
export declare const ChatBubble: React_2.ForwardRefExoticComponent<ChatBubbleProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
222
|
+
|
|
223
|
+
export declare const ChatBubbleAvatar: React_2.ForwardRefExoticComponent<ChatBubbleAvatarProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
224
|
+
|
|
225
|
+
export declare interface ChatBubbleAvatarProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
226
|
+
src?: string;
|
|
227
|
+
fallback?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export declare const ChatBubbleMessage: React_2.ForwardRefExoticComponent<ChatBubbleMessageProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
231
|
+
|
|
232
|
+
export declare interface ChatBubbleMessageProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
233
|
+
variant?: "sent" | "received";
|
|
234
|
+
isLoading?: boolean;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export declare interface ChatBubbleProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
238
|
+
variant?: "sent" | "received";
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export declare const ChatBubbleTimestamp: React_2.ForwardRefExoticComponent<ChatBubbleTimestampProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
242
|
+
|
|
243
|
+
export declare interface ChatBubbleTimestampProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export declare const ChatContainer: React_2.ForwardRefExoticComponent<ChatContainerProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
247
|
+
|
|
248
|
+
export declare interface ChatContainerProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export declare const ChatInput: React_2.ForwardRefExoticComponent<ChatInputProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
252
|
+
|
|
253
|
+
export declare interface ChatInputProps {
|
|
254
|
+
onSend?: (message: string) => void;
|
|
255
|
+
placeholder?: string;
|
|
256
|
+
disabled?: boolean;
|
|
257
|
+
isLoading?: boolean;
|
|
258
|
+
showAttach?: boolean;
|
|
259
|
+
className?: string;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export declare const ChatList: React_2.ForwardRefExoticComponent<ChatListProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
263
|
+
|
|
264
|
+
export declare interface ChatListProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
265
|
+
/** Auto-scroll to bottom when children change @default true */
|
|
266
|
+
autoScroll?: boolean;
|
|
267
|
+
}
|
|
268
|
+
|
|
211
269
|
export declare const Checkbox: React_2.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
212
270
|
|
|
213
271
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
214
272
|
|
|
215
273
|
export declare function Code({ className, ...props }: CodeProps): JSX_2.Element;
|
|
216
274
|
|
|
217
|
-
export declare function CodeBlock({ code, language, showLineNumbers, className, }: CodeBlockProps): JSX_2.Element;
|
|
275
|
+
export declare function CodeBlock({ code, language, showLineNumbers, showCopy, className, }: CodeBlockProps): JSX_2.Element;
|
|
218
276
|
|
|
219
277
|
export declare interface CodeBlockProps {
|
|
220
278
|
code: string;
|
|
221
279
|
language?: string;
|
|
222
280
|
showLineNumbers?: boolean;
|
|
281
|
+
showCopy?: boolean;
|
|
223
282
|
className?: string;
|
|
224
283
|
}
|
|
225
284
|
|
|
@@ -580,6 +639,15 @@ export declare interface LeadProps extends React_2.HTMLAttributes<HTMLParagraphE
|
|
|
580
639
|
|
|
581
640
|
export declare const Main: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLElement> & React_2.RefAttributes<HTMLElement>>;
|
|
582
641
|
|
|
642
|
+
export declare const MarkdownRenderer: React_2.ForwardRefExoticComponent<MarkdownRendererProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
643
|
+
|
|
644
|
+
export declare interface MarkdownRendererProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
645
|
+
/** Raw Markdown string */
|
|
646
|
+
content: string;
|
|
647
|
+
/** Streaming mode — suppresses layout shift by avoiding final trim @default false */
|
|
648
|
+
streaming?: boolean;
|
|
649
|
+
}
|
|
650
|
+
|
|
583
651
|
export declare function MetricCard({ title, value, description, trend, trendLabel, icon, className, ...props }: MetricCardProps): JSX_2.Element;
|
|
584
652
|
|
|
585
653
|
declare interface MetricCardProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
@@ -591,7 +659,32 @@ declare interface MetricCardProps extends React_2.HTMLAttributes<HTMLDivElement>
|
|
|
591
659
|
icon?: React_2.ReactNode;
|
|
592
660
|
}
|
|
593
661
|
|
|
594
|
-
export declare function ModeToggle(
|
|
662
|
+
export declare function ModeToggle({ className }: {
|
|
663
|
+
className?: string;
|
|
664
|
+
}): JSX_2.Element;
|
|
665
|
+
|
|
666
|
+
export declare function ModeToggleGroup({ className }: {
|
|
667
|
+
className?: string;
|
|
668
|
+
}): JSX_2.Element;
|
|
669
|
+
|
|
670
|
+
export declare function MultiSelect({ options, value, onChange, placeholder, searchPlaceholder, emptyText, disabled, className, maxDisplay, }: MultiSelectProps): JSX_2.Element;
|
|
671
|
+
|
|
672
|
+
export declare interface MultiSelectOption {
|
|
673
|
+
value: string;
|
|
674
|
+
label: string;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
export declare interface MultiSelectProps {
|
|
678
|
+
options: MultiSelectOption[];
|
|
679
|
+
value?: string[];
|
|
680
|
+
onChange?: (value: string[]) => void;
|
|
681
|
+
placeholder?: string;
|
|
682
|
+
searchPlaceholder?: string;
|
|
683
|
+
emptyText?: string;
|
|
684
|
+
disabled?: boolean;
|
|
685
|
+
className?: string;
|
|
686
|
+
maxDisplay?: number;
|
|
687
|
+
}
|
|
595
688
|
|
|
596
689
|
export declare function Muted({ className, ...props }: MutedProps): JSX_2.Element;
|
|
597
690
|
|
|
@@ -680,11 +773,30 @@ export declare const PopoverTrigger: React_2.ForwardRefExoticComponent<PopoverPr
|
|
|
680
773
|
|
|
681
774
|
export declare const Progress: React_2.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
682
775
|
|
|
776
|
+
export declare interface PromptSuggestion {
|
|
777
|
+
title: string;
|
|
778
|
+
description?: string;
|
|
779
|
+
prompt: string;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export declare const PromptSuggestions: React_2.ForwardRefExoticComponent<PromptSuggestionsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
783
|
+
|
|
784
|
+
export declare interface PromptSuggestionsProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
785
|
+
suggestions: PromptSuggestion[];
|
|
786
|
+
onSelect?: (prompt: string) => void;
|
|
787
|
+
/** Number of grid columns @default 2 */
|
|
788
|
+
columns?: 1 | 2 | 3 | 4;
|
|
789
|
+
}
|
|
790
|
+
|
|
683
791
|
export declare const RadioGroup: React_2.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
684
792
|
|
|
685
793
|
export declare const RadioGroupItem: React_2.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
686
794
|
|
|
687
|
-
export declare const ScrollArea: React_2.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React_2.RefAttributes<HTMLDivElement>, "ref"> &
|
|
795
|
+
export declare const ScrollArea: React_2.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
796
|
+
orientation?: ScrollAreaOrientation;
|
|
797
|
+
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
798
|
+
|
|
799
|
+
declare type ScrollAreaOrientation = "vertical" | "horizontal" | "both";
|
|
688
800
|
|
|
689
801
|
export declare const ScrollBar: React_2.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
690
802
|
|
|
@@ -851,19 +963,38 @@ export declare const textVariants: (props?: ({
|
|
|
851
963
|
leading?: "normal" | "tight" | "relaxed" | null | undefined;
|
|
852
964
|
} & ClassProp) | undefined) => string;
|
|
853
965
|
|
|
854
|
-
declare type Theme = "dark" | "light" | "system";
|
|
966
|
+
export declare type Theme = "dark" | "light" | "system";
|
|
855
967
|
|
|
856
|
-
export declare function ThemeProvider({ children, defaultTheme, storageKey, }: ThemeProviderProps): JSX_2.Element;
|
|
968
|
+
export declare function ThemeProvider({ children, defaultTheme, storageKey, attribute, enableSystem, disableTransitionOnChange, forcedTheme, nonce, }: ThemeProviderProps): JSX_2.Element;
|
|
857
969
|
|
|
858
|
-
declare type ThemeProviderProps = {
|
|
970
|
+
export declare type ThemeProviderProps = {
|
|
971
|
+
/** Wrap your application */
|
|
859
972
|
children: React.ReactNode;
|
|
973
|
+
/** Initial theme when nothing is stored yet. @default "system" */
|
|
860
974
|
defaultTheme?: Theme;
|
|
975
|
+
/** localStorage key. @default "nui-theme" */
|
|
861
976
|
storageKey?: string;
|
|
977
|
+
/** HTML attribute used to apply the theme. @default "class" */
|
|
978
|
+
attribute?: "class" | "data-theme";
|
|
979
|
+
/** Allow choosing "system" mode. @default true */
|
|
980
|
+
enableSystem?: boolean;
|
|
981
|
+
/** Temporarily disable CSS transitions when the theme changes to prevent intermediate flash. @default false */
|
|
982
|
+
disableTransitionOnChange?: boolean;
|
|
983
|
+
/** Force a specific theme (ignores user choice and localStorage). Useful for per-page overrides. */
|
|
984
|
+
forcedTheme?: Theme;
|
|
985
|
+
/** CSP nonce for injected inline styles. */
|
|
986
|
+
nonce?: string;
|
|
862
987
|
};
|
|
863
988
|
|
|
864
|
-
declare type ThemeProviderState = {
|
|
989
|
+
export declare type ThemeProviderState = {
|
|
990
|
+
/** The stored theme preference ("dark" | "light" | "system"). */
|
|
865
991
|
theme: Theme;
|
|
992
|
+
/** The actual resolved theme that is applied ("dark" | "light"). */
|
|
993
|
+
resolvedTheme: "dark" | "light";
|
|
994
|
+
/** Update the theme. */
|
|
866
995
|
setTheme: (theme: Theme) => void;
|
|
996
|
+
/** All available themes. */
|
|
997
|
+
themes: readonly Theme[];
|
|
867
998
|
};
|
|
868
999
|
|
|
869
1000
|
export declare const Timeline: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -892,7 +1023,9 @@ export declare interface TimePickerProps {
|
|
|
892
1023
|
className?: string;
|
|
893
1024
|
}
|
|
894
1025
|
|
|
895
|
-
export
|
|
1026
|
+
export { toast }
|
|
1027
|
+
|
|
1028
|
+
export declare const Toaster: ({ theme: themeProp, ...props }: ToasterProps) => JSX_2.Element;
|
|
896
1029
|
|
|
897
1030
|
declare type ToasterProps = React.ComponentProps<typeof Toaster_2>;
|
|
898
1031
|
|
|
@@ -926,7 +1059,7 @@ export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPr
|
|
|
926
1059
|
|
|
927
1060
|
declare type UseCarouselParameters = Parameters<typeof default_2>;
|
|
928
1061
|
|
|
929
|
-
export declare
|
|
1062
|
+
export declare function useTheme(): ThemeProviderState;
|
|
930
1063
|
|
|
931
1064
|
export declare const VStack: React_2.ForwardRefExoticComponent<StackProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
932
1065
|
|