@terminal-blueprint/react 0.1.0 → 0.1.2

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.cts CHANGED
@@ -49,9 +49,10 @@ interface CardProps extends HTMLAttributes<HTMLElement> {
49
49
  brackets?: boolean;
50
50
  pulse?: boolean;
51
51
  hoverable?: boolean;
52
+ href?: string;
52
53
  ref?: Ref<HTMLElement>;
53
54
  }
54
- declare function CardRoot({ as, brackets, pulse, hoverable, className, children, ref, ...props }: CardProps): react_jsx_runtime.JSX.Element;
55
+ declare function CardRoot({ as, brackets, pulse, hoverable, href, className, children, ref, ...props }: CardProps): react_jsx_runtime.JSX.Element;
55
56
  interface CardSectionProps extends HTMLAttributes<HTMLDivElement> {
56
57
  ref?: Ref<HTMLDivElement>;
57
58
  }
@@ -139,11 +140,12 @@ interface ModalProps {
139
140
  closeOnBackdrop?: boolean;
140
141
  hideCloseButton?: boolean;
141
142
  portalTarget?: Element | null;
143
+ variant?: 'warning' | 'error' | 'success';
142
144
  children: ReactNode;
143
145
  className?: string;
144
146
  ref?: Ref<HTMLDivElement>;
145
147
  }
146
- declare function ModalRoot({ open, onOpenChange, closeOnEscape, closeOnBackdrop, hideCloseButton, portalTarget, children, className, ref, }: ModalProps): react_jsx_runtime.JSX.Element;
148
+ declare function ModalRoot({ open, onOpenChange, closeOnEscape, closeOnBackdrop, hideCloseButton, portalTarget, variant, children, className, ref, }: ModalProps): react_jsx_runtime.JSX.Element;
147
149
  interface ModalSectionProps extends HTMLAttributes<HTMLDivElement> {
148
150
  ref?: Ref<HTMLDivElement>;
149
151
  }
@@ -300,15 +302,31 @@ interface ProgressProps {
300
302
  }
301
303
  declare function Progress({ value, variant, animated, indeterminate, label, showValue, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
302
304
 
305
+ interface SliderProps {
306
+ value: number;
307
+ onChange: (value: number) => void;
308
+ min?: number;
309
+ max?: number;
310
+ step?: number;
311
+ variant?: 'default' | 'success' | 'warning' | 'error';
312
+ label?: string;
313
+ showValue?: boolean;
314
+ disabled?: boolean;
315
+ className?: string;
316
+ ref?: Ref<HTMLInputElement>;
317
+ }
318
+ declare function Slider({ value, onChange, min, max, step, variant, label, showValue, disabled, className, ref, }: SliderProps): react_jsx_runtime.JSX.Element;
319
+
303
320
  interface BatteryProps {
304
321
  value: number;
305
322
  total?: number;
306
323
  variant?: 'default' | 'success' | 'warning' | 'error';
307
324
  animated?: boolean;
308
325
  label?: string;
326
+ showValue?: boolean;
309
327
  className?: string;
310
328
  }
311
- declare function Battery({ value, total, variant, animated, label, className, }: BatteryProps): react_jsx_runtime.JSX.Element;
329
+ declare function Battery({ value, total, variant, animated, label, showValue, className, }: BatteryProps): react_jsx_runtime.JSX.Element;
312
330
 
313
331
  interface BatteryInlineProps {
314
332
  value: number;
@@ -406,6 +424,42 @@ declare const Toolbar: typeof ToolbarRoot & {
406
424
  Divider: typeof ToolbarDivider;
407
425
  };
408
426
 
427
+ interface FileUploadFile {
428
+ file: File;
429
+ preview?: string;
430
+ }
431
+ interface FileUploadProps {
432
+ /** Called when files are added */
433
+ onChange?: (files: File[]) => void;
434
+ /** Controlled file list */
435
+ value?: File[];
436
+ /** Accepted file types (e.g. "image/*,.pdf") */
437
+ accept?: string;
438
+ /** Allow multiple files */
439
+ multiple?: boolean;
440
+ /** Max file size in bytes */
441
+ maxSize?: number;
442
+ /** Compact mode — renders as inline button instead of drop zone */
443
+ compact?: boolean;
444
+ /** Show image thumbnails for image files */
445
+ preview?: boolean;
446
+ /** Label above the drop zone */
447
+ label?: string;
448
+ /** Drop zone prompt text */
449
+ placeholder?: string;
450
+ /** Hint text below drop zone (e.g. "PNG, JPG up to 5MB") */
451
+ hint?: string;
452
+ /** Error message */
453
+ error?: string;
454
+ /** Custom icon in drop zone */
455
+ icon?: ReactNode;
456
+ /** Disabled state */
457
+ disabled?: boolean;
458
+ className?: string;
459
+ ref?: Ref<HTMLInputElement>;
460
+ }
461
+ declare function FileUpload({ onChange, value, accept, multiple, maxSize, compact, preview, label, placeholder, hint, error: errorProp, icon, disabled, className, ref, }: FileUploadProps): react_jsx_runtime.JSX.Element;
462
+
409
463
  interface SidenavProps extends HTMLAttributes<HTMLElement> {
410
464
  iconPosition?: 'left' | 'right';
411
465
  borderSide?: 'left' | 'right';
@@ -506,4 +560,4 @@ interface SafePortalProps {
506
560
  }
507
561
  declare function SafePortal({ children, target }: SafePortalProps): react.ReactPortal | null;
508
562
 
509
- export { Badge, type BadgeProps, Battery, BatteryInline, type BatteryInlineProps, type BatteryProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Card, type CardProps, type CardSectionProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, type Column, type Contrast, CornerBrackets, type CornerBracketsProps, Input, type InputProps, Modal, type ModalProps, NavDropdown, type NavDropdownItem, type NavDropdownProps, Pagination, type PaginationProps, type PolymorphicProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, SafePortal, Select, SelectContent, type SelectContentProps, SelectItem, type SelectItemProps, type SelectProps, SelectTrigger, type SelectTriggerProps, Sidenav, type SidenavGroupProps, type SidenavIconProps, type SidenavItemProps, type SidenavProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, Table, type TableProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Tag, type TagProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, TitleLine, type TitleLineProps, type ToastEntry, type ToastOptions, Toaster, type ToasterProps, Toggle, type ToggleProps, Toolbar, type ToolbarProps, type ToolbarSelectOption, type ToolbarSelectProps, Tooltip, type TooltipProps, cn, createToast as toast, useDisclosure, useFocusTrap, useKeyboardNav, useMergedRef, useReducedMotion, useTheme };
563
+ export { Badge, type BadgeProps, Battery, BatteryInline, type BatteryInlineProps, type BatteryProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Card, type CardProps, type CardSectionProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, type Column, type Contrast, CornerBrackets, type CornerBracketsProps, FileUpload, type FileUploadFile, type FileUploadProps, Input, type InputProps, Modal, type ModalProps, NavDropdown, type NavDropdownItem, type NavDropdownProps, Pagination, type PaginationProps, type PolymorphicProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, SafePortal, Select, SelectContent, type SelectContentProps, SelectItem, type SelectItemProps, type SelectProps, SelectTrigger, type SelectTriggerProps, Sidenav, type SidenavGroupProps, type SidenavIconProps, type SidenavItemProps, type SidenavProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Table, type TableProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Tag, type TagProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, TitleLine, type TitleLineProps, type ToastEntry, type ToastOptions, Toaster, type ToasterProps, Toggle, type ToggleProps, Toolbar, type ToolbarProps, type ToolbarSelectOption, type ToolbarSelectProps, Tooltip, type TooltipProps, cn, createToast as toast, useDisclosure, useFocusTrap, useKeyboardNav, useMergedRef, useReducedMotion, useTheme };
package/dist/index.d.ts CHANGED
@@ -49,9 +49,10 @@ interface CardProps extends HTMLAttributes<HTMLElement> {
49
49
  brackets?: boolean;
50
50
  pulse?: boolean;
51
51
  hoverable?: boolean;
52
+ href?: string;
52
53
  ref?: Ref<HTMLElement>;
53
54
  }
54
- declare function CardRoot({ as, brackets, pulse, hoverable, className, children, ref, ...props }: CardProps): react_jsx_runtime.JSX.Element;
55
+ declare function CardRoot({ as, brackets, pulse, hoverable, href, className, children, ref, ...props }: CardProps): react_jsx_runtime.JSX.Element;
55
56
  interface CardSectionProps extends HTMLAttributes<HTMLDivElement> {
56
57
  ref?: Ref<HTMLDivElement>;
57
58
  }
@@ -139,11 +140,12 @@ interface ModalProps {
139
140
  closeOnBackdrop?: boolean;
140
141
  hideCloseButton?: boolean;
141
142
  portalTarget?: Element | null;
143
+ variant?: 'warning' | 'error' | 'success';
142
144
  children: ReactNode;
143
145
  className?: string;
144
146
  ref?: Ref<HTMLDivElement>;
145
147
  }
146
- declare function ModalRoot({ open, onOpenChange, closeOnEscape, closeOnBackdrop, hideCloseButton, portalTarget, children, className, ref, }: ModalProps): react_jsx_runtime.JSX.Element;
148
+ declare function ModalRoot({ open, onOpenChange, closeOnEscape, closeOnBackdrop, hideCloseButton, portalTarget, variant, children, className, ref, }: ModalProps): react_jsx_runtime.JSX.Element;
147
149
  interface ModalSectionProps extends HTMLAttributes<HTMLDivElement> {
148
150
  ref?: Ref<HTMLDivElement>;
149
151
  }
@@ -300,15 +302,31 @@ interface ProgressProps {
300
302
  }
301
303
  declare function Progress({ value, variant, animated, indeterminate, label, showValue, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
302
304
 
305
+ interface SliderProps {
306
+ value: number;
307
+ onChange: (value: number) => void;
308
+ min?: number;
309
+ max?: number;
310
+ step?: number;
311
+ variant?: 'default' | 'success' | 'warning' | 'error';
312
+ label?: string;
313
+ showValue?: boolean;
314
+ disabled?: boolean;
315
+ className?: string;
316
+ ref?: Ref<HTMLInputElement>;
317
+ }
318
+ declare function Slider({ value, onChange, min, max, step, variant, label, showValue, disabled, className, ref, }: SliderProps): react_jsx_runtime.JSX.Element;
319
+
303
320
  interface BatteryProps {
304
321
  value: number;
305
322
  total?: number;
306
323
  variant?: 'default' | 'success' | 'warning' | 'error';
307
324
  animated?: boolean;
308
325
  label?: string;
326
+ showValue?: boolean;
309
327
  className?: string;
310
328
  }
311
- declare function Battery({ value, total, variant, animated, label, className, }: BatteryProps): react_jsx_runtime.JSX.Element;
329
+ declare function Battery({ value, total, variant, animated, label, showValue, className, }: BatteryProps): react_jsx_runtime.JSX.Element;
312
330
 
313
331
  interface BatteryInlineProps {
314
332
  value: number;
@@ -406,6 +424,42 @@ declare const Toolbar: typeof ToolbarRoot & {
406
424
  Divider: typeof ToolbarDivider;
407
425
  };
408
426
 
427
+ interface FileUploadFile {
428
+ file: File;
429
+ preview?: string;
430
+ }
431
+ interface FileUploadProps {
432
+ /** Called when files are added */
433
+ onChange?: (files: File[]) => void;
434
+ /** Controlled file list */
435
+ value?: File[];
436
+ /** Accepted file types (e.g. "image/*,.pdf") */
437
+ accept?: string;
438
+ /** Allow multiple files */
439
+ multiple?: boolean;
440
+ /** Max file size in bytes */
441
+ maxSize?: number;
442
+ /** Compact mode — renders as inline button instead of drop zone */
443
+ compact?: boolean;
444
+ /** Show image thumbnails for image files */
445
+ preview?: boolean;
446
+ /** Label above the drop zone */
447
+ label?: string;
448
+ /** Drop zone prompt text */
449
+ placeholder?: string;
450
+ /** Hint text below drop zone (e.g. "PNG, JPG up to 5MB") */
451
+ hint?: string;
452
+ /** Error message */
453
+ error?: string;
454
+ /** Custom icon in drop zone */
455
+ icon?: ReactNode;
456
+ /** Disabled state */
457
+ disabled?: boolean;
458
+ className?: string;
459
+ ref?: Ref<HTMLInputElement>;
460
+ }
461
+ declare function FileUpload({ onChange, value, accept, multiple, maxSize, compact, preview, label, placeholder, hint, error: errorProp, icon, disabled, className, ref, }: FileUploadProps): react_jsx_runtime.JSX.Element;
462
+
409
463
  interface SidenavProps extends HTMLAttributes<HTMLElement> {
410
464
  iconPosition?: 'left' | 'right';
411
465
  borderSide?: 'left' | 'right';
@@ -506,4 +560,4 @@ interface SafePortalProps {
506
560
  }
507
561
  declare function SafePortal({ children, target }: SafePortalProps): react.ReactPortal | null;
508
562
 
509
- export { Badge, type BadgeProps, Battery, BatteryInline, type BatteryInlineProps, type BatteryProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Card, type CardProps, type CardSectionProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, type Column, type Contrast, CornerBrackets, type CornerBracketsProps, Input, type InputProps, Modal, type ModalProps, NavDropdown, type NavDropdownItem, type NavDropdownProps, Pagination, type PaginationProps, type PolymorphicProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, SafePortal, Select, SelectContent, type SelectContentProps, SelectItem, type SelectItemProps, type SelectProps, SelectTrigger, type SelectTriggerProps, Sidenav, type SidenavGroupProps, type SidenavIconProps, type SidenavItemProps, type SidenavProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, Table, type TableProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Tag, type TagProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, TitleLine, type TitleLineProps, type ToastEntry, type ToastOptions, Toaster, type ToasterProps, Toggle, type ToggleProps, Toolbar, type ToolbarProps, type ToolbarSelectOption, type ToolbarSelectProps, Tooltip, type TooltipProps, cn, createToast as toast, useDisclosure, useFocusTrap, useKeyboardNav, useMergedRef, useReducedMotion, useTheme };
563
+ export { Badge, type BadgeProps, Battery, BatteryInline, type BatteryInlineProps, type BatteryProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Card, type CardProps, type CardSectionProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, type Column, type Contrast, CornerBrackets, type CornerBracketsProps, FileUpload, type FileUploadFile, type FileUploadProps, Input, type InputProps, Modal, type ModalProps, NavDropdown, type NavDropdownItem, type NavDropdownProps, Pagination, type PaginationProps, type PolymorphicProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, SafePortal, Select, SelectContent, type SelectContentProps, SelectItem, type SelectItemProps, type SelectProps, SelectTrigger, type SelectTriggerProps, Sidenav, type SidenavGroupProps, type SidenavIconProps, type SidenavItemProps, type SidenavProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Table, type TableProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Tag, type TagProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, TitleLine, type TitleLineProps, type ToastEntry, type ToastOptions, Toaster, type ToasterProps, Toggle, type ToggleProps, Toolbar, type ToolbarProps, type ToolbarSelectOption, type ToolbarSelectProps, Tooltip, type TooltipProps, cn, createToast as toast, useDisclosure, useFocusTrap, useKeyboardNav, useMergedRef, useReducedMotion, useTheme };