@nerds-with-charisma/revit-ui 0.2.0 → 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/README.md +41 -1
- package/dist/index.d.ts +36 -1
- package/dist/index.js +294 -174
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +11 -2
package/README.md
CHANGED
|
@@ -10,6 +10,19 @@ pnpm add @nerds-with-charisma/revit-ui
|
|
|
10
10
|
|
|
11
11
|
Peer: React 19.
|
|
12
12
|
|
|
13
|
+
## Documentation
|
|
14
|
+
|
|
15
|
+
Browse components locally:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pnpm install
|
|
19
|
+
pnpm dev
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Opens **Storybook** at `http://localhost:6006` with live examples, props tables, and usage notes.
|
|
23
|
+
|
|
24
|
+
Build static docs: `pnpm build-storybook` → `storybook-static/`
|
|
25
|
+
|
|
13
26
|
## Use
|
|
14
27
|
|
|
15
28
|
```tsx
|
|
@@ -114,7 +127,34 @@ const myTokens: RevitThemeTokens = {
|
|
|
114
127
|
|
|
115
128
|
Tokens only: `import { revitTokens } from '@nerds-with-charisma/revit-ui/theme/revit'`
|
|
116
129
|
|
|
117
|
-
##
|
|
130
|
+
## Components
|
|
131
|
+
|
|
132
|
+
| Category | Components |
|
|
133
|
+
|----------|------------|
|
|
134
|
+
| **Typography** | `Heading`, `Text`, `Link` |
|
|
135
|
+
| **Actions** | `Button`, `Badge`, `Toggle` |
|
|
136
|
+
| **Forms** | `Field`, `RevitForm`, `Input`, `PasswordInput`, `Textarea`, `Checkbox`, `Switch`, `Select`, `RadioGroup`, `Label` |
|
|
137
|
+
| **Layout** | `Card`, `Separator`, `AspectRatio`, `ScrollArea` |
|
|
138
|
+
| **Feedback** | `Alert`, `Progress`, `Skeleton`, `toast` / `Toaster` |
|
|
139
|
+
| **Overlays** | `Dialog`, `Sheet`, `Popover`, `Tooltip`, `DropdownMenu`, `AlertDialog` |
|
|
140
|
+
| **Navigation** | `Tabs`, `Breadcrumb`, `Pagination`, `NavigationMenu` |
|
|
141
|
+
| **Revit surfaces** | `FrostPanel`, `FrostNav`, `FrostTile`, `SearchBar`, `BrandGradient` |
|
|
142
|
+
|
|
143
|
+
See Storybook for examples. Low-level `Form*` primitives remain available for custom fields.
|
|
144
|
+
|
|
145
|
+
### Single field
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
<Field description="We'll never share your email." label="Email">
|
|
149
|
+
<Input type="email" placeholder="you@example.com" />
|
|
150
|
+
</Field>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Low-level escape hatch
|
|
154
|
+
|
|
155
|
+
`Form`, `FormField`, `FormItem`, `FormLabel`, `FormControl`, `FormMessage`, and `useForm` are still exported for custom fields that don't fit the config shape.
|
|
156
|
+
|
|
157
|
+
## Forms
|
|
118
158
|
|
|
119
159
|
Config-driven forms — pass a `fields` array, `RevitForm` handles react-hook-form + labels, validation messages, and wiring.
|
|
120
160
|
|
package/dist/index.d.ts
CHANGED
|
@@ -419,6 +419,41 @@ declare const FormDescription: ({ className, ...props }: FormDescriptionProps) =
|
|
|
419
419
|
type FormMessageProps = HTMLAttributes<HTMLParagraphElement>;
|
|
420
420
|
declare const FormMessage: ({ className, children, ...props }: FormMessageProps) => react.JSX.Element | null;
|
|
421
421
|
|
|
422
|
+
type FieldProps = {
|
|
423
|
+
children: ReactNode;
|
|
424
|
+
className?: string;
|
|
425
|
+
description?: string;
|
|
426
|
+
error?: string;
|
|
427
|
+
htmlFor?: string;
|
|
428
|
+
label: string;
|
|
429
|
+
required?: boolean;
|
|
430
|
+
};
|
|
431
|
+
declare const Field: ({ children, className, description, error, htmlFor, label, required, }: FieldProps) => react.JSX.Element;
|
|
432
|
+
|
|
433
|
+
declare const headingVariants: (props?: ({
|
|
434
|
+
variant?: "title" | "page" | "section" | "eyebrow" | "subtitle" | null | undefined;
|
|
435
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
436
|
+
type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';
|
|
437
|
+
type HeadingProps = HTMLAttributes<HTMLElement> & VariantProps<typeof headingVariants> & {
|
|
438
|
+
as?: HeadingTag;
|
|
439
|
+
};
|
|
440
|
+
declare const Heading: ({ as, className, variant, ...props }: HeadingProps) => react.JSX.Element;
|
|
441
|
+
|
|
442
|
+
declare const linkVariants: (props?: ({
|
|
443
|
+
variant?: "default" | "muted" | "primary" | null | undefined;
|
|
444
|
+
size?: "default" | "sm" | "base" | null | undefined;
|
|
445
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
446
|
+
type LinkProps = ComponentProps<'a'> & VariantProps<typeof linkVariants> & {
|
|
447
|
+
asChild?: boolean;
|
|
448
|
+
};
|
|
449
|
+
declare const Link: ({ asChild, className, size, variant, ...props }: LinkProps) => react.JSX.Element;
|
|
450
|
+
|
|
451
|
+
declare const textVariants: (props?: ({
|
|
452
|
+
variant?: "sm" | "label" | "body" | "muted" | "lead" | null | undefined;
|
|
453
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
454
|
+
type TextProps = HTMLAttributes<HTMLParagraphElement> & VariantProps<typeof textVariants>;
|
|
455
|
+
declare const Text: ({ className, variant, ...props }: TextProps) => react.JSX.Element;
|
|
456
|
+
|
|
422
457
|
type ToasterProps = ComponentProps<typeof Toaster$1>;
|
|
423
458
|
declare const Toaster: ({ ...props }: ToasterProps) => react.JSX.Element;
|
|
424
459
|
|
|
@@ -701,4 +736,4 @@ declare const tokensToCssVars: (tokens: RevitThemeTokens) => {
|
|
|
701
736
|
};
|
|
702
737
|
declare const tokensToStylesheet: (tokens: RevitThemeTokens) => string;
|
|
703
738
|
|
|
704
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, BrandGradient, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, ConfirmDialog, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuTrigger, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerContent, DrawerDescription, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FrostFab, FrostNav, FrostPanel, FrostTile, HoverCard, HoverCardContent, HoverCardTrigger, ImageScrim, Input, InputOTP, InputOTPGroup, InputOTPSlot, type InputProps, Label, type LabelProps, Menubar, MenubarContent, MenubarItem, MenubarMenu, MenubarSeparator, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, Pagination, PaginationBar, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, type PasswordInputProps, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RevitForm, type RevitFormField, type RevitFormForgotPassword, type RevitFormOption, type RevitFormProps, RevitThemeTokens, RevitUIProvider, ScrollArea, ScrollBar, SearchBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarTrigger, Skeleton, Slider, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, badgeVariants, buttonVariants, cardVariants, cn, inputVariants, labelVariants, selectTriggerVariants, surfaces, textareaVariants, toggleVariants, tokensToCssVars, tokensToStylesheet, useFormField, useSidebar };
|
|
739
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, BrandGradient, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, ConfirmDialog, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuTrigger, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerContent, DrawerDescription, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Field, type FieldProps, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FrostFab, FrostNav, FrostPanel, FrostTile, Heading, type HeadingProps, HoverCard, HoverCardContent, HoverCardTrigger, ImageScrim, Input, InputOTP, InputOTPGroup, InputOTPSlot, type InputProps, Label, type LabelProps, Link, type LinkProps, Menubar, MenubarContent, MenubarItem, MenubarMenu, MenubarSeparator, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, Pagination, PaginationBar, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, type PasswordInputProps, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RevitForm, type RevitFormField, type RevitFormForgotPassword, type RevitFormOption, type RevitFormProps, RevitThemeTokens, RevitUIProvider, ScrollArea, ScrollBar, SearchBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarTrigger, Skeleton, Slider, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, type TextProps, Textarea, type TextareaProps, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, badgeVariants, buttonVariants, cardVariants, cn, headingVariants, inputVariants, labelVariants, linkVariants, selectTriggerVariants, surfaces, textVariants, textareaVariants, toggleVariants, tokensToCssVars, tokensToStylesheet, useFormField, useSidebar };
|