@lessly/ui 0.20.0 → 0.22.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.d.ts +27 -57
- package/dist/index.js +397 -534
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
8
8
|
import { DialogProps } from '@radix-ui/react-dialog';
|
|
9
9
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
10
10
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
11
|
+
import { LucideIcon, LucideProps } from 'lucide-react';
|
|
11
12
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
12
13
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
13
14
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
@@ -37,7 +38,6 @@ import { DayPicker } from 'react-day-picker';
|
|
|
37
38
|
import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
38
39
|
import * as react_hook_form from 'react-hook-form';
|
|
39
40
|
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
40
|
-
import { LucideIcon, LucideProps } from 'lucide-react';
|
|
41
41
|
|
|
42
42
|
declare function cn(...inputs: ClassValue[]): string;
|
|
43
43
|
|
|
@@ -105,6 +105,31 @@ declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefA
|
|
|
105
105
|
|
|
106
106
|
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
107
107
|
|
|
108
|
+
interface PageHeaderProps {
|
|
109
|
+
/** The page title. Rendered as an `<h2>`. */
|
|
110
|
+
title: React$1.ReactNode;
|
|
111
|
+
/** A subtitle. Earns the section medallion — a subtitle that states a mechanic, count, or
|
|
112
|
+
* constraint the title omits (see Guidelines/Page headers). Omit it and the medallion is dropped. */
|
|
113
|
+
subtitle?: React$1.ReactNode;
|
|
114
|
+
/** A category glyph for the section medallion. Only renders alongside a `subtitle`. */
|
|
115
|
+
icon?: LucideIcon;
|
|
116
|
+
/** An entity glyph (a product logo, a person's avatar) — identity, not decoration. Always
|
|
117
|
+
* renders, subtitle or not, in the medallion's place. Prefer this over `icon` for a named thing. */
|
|
118
|
+
media?: React$1.ReactNode;
|
|
119
|
+
/** A status element (e.g. a `Badge`) shown inline after the title. */
|
|
120
|
+
badge?: React$1.ReactNode;
|
|
121
|
+
/** A trailing slot (e.g. a `+ Add` button), right-aligned. */
|
|
122
|
+
actions?: React$1.ReactNode;
|
|
123
|
+
id?: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The standard page header for Organization and Product screens. Encodes the medallion↔subtitle
|
|
127
|
+
* pair rule (Guidelines/Page headers): a decorative section medallion earns its place only beside a
|
|
128
|
+
* subtitle, so keep both or drop both — you cannot render a lone medallion. An entity glyph (`media`)
|
|
129
|
+
* is identity and always stays.
|
|
130
|
+
*/
|
|
131
|
+
declare function PageHeader({ title, subtitle, icon: Icon, media, badge, actions, id }: PageHeaderProps): React$1.JSX.Element;
|
|
132
|
+
|
|
108
133
|
interface SectionIntroProps {
|
|
109
134
|
what: React.ReactNode;
|
|
110
135
|
when: React.ReactNode;
|
|
@@ -615,61 +640,6 @@ interface EmptyStateProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, '
|
|
|
615
640
|
}
|
|
616
641
|
declare const EmptyState: React$1.ForwardRefExoticComponent<EmptyStateProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
617
642
|
|
|
618
|
-
/**
|
|
619
|
-
* The pre-auth states every internal Google-Workspace-SSO app needs. This is the
|
|
620
|
-
* gate shown BEFORE the app chrome — the post-auth shell is `AppShell`.
|
|
621
|
-
*
|
|
622
|
-
* - `login` — brand, headline, "Continue with Google", domain-restriction note
|
|
623
|
-
* - `forbidden` — signed in, but not in the allowed group (a warning callout)
|
|
624
|
-
* - `error` — load/auth failure with a message + optional retry
|
|
625
|
-
* - `loading` — chromeless brand + spinner
|
|
626
|
-
*/
|
|
627
|
-
type SignInScreenState = 'login' | 'forbidden' | 'error' | 'loading';
|
|
628
|
-
interface SignInScreenProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
629
|
-
/** Which pre-auth state to render. Defaults to `login`. */
|
|
630
|
-
state?: SignInScreenState;
|
|
631
|
-
/** Brand mark shown at the top of the card (and centered in `loading`). Apps pass
|
|
632
|
-
* their own — e.g. a wordmark. */
|
|
633
|
-
brand: React$1.ReactNode;
|
|
634
|
-
/** Small sentence-case eyebrow above the headline. Absent by default; rendered on
|
|
635
|
-
* `login` only, where it orients without cluttering the error/forbidden headers. */
|
|
636
|
-
eyebrow?: React$1.ReactNode;
|
|
637
|
-
/** Headline. Falls back to a per-state default ("Sign in" / "Access restricted" /
|
|
638
|
-
* "Couldn't load"). */
|
|
639
|
-
title?: React$1.ReactNode;
|
|
640
|
-
/** One-line sub under the headline. Falls back to a per-state default. */
|
|
641
|
-
description?: React$1.ReactNode;
|
|
642
|
-
/** Google button label. Default "Continue with Google". */
|
|
643
|
-
googleLabel?: React$1.ReactNode;
|
|
644
|
-
/** Handler for the Google button (`login` state). */
|
|
645
|
-
onGoogle?: () => void;
|
|
646
|
-
/** Busy: disables the Google button and swaps it for a spinner + `signingInLabel`. */
|
|
647
|
-
signingIn?: boolean;
|
|
648
|
-
/** Label shown while `signingIn`. Default "Signing you in…". */
|
|
649
|
-
signingInLabel?: React$1.ReactNode;
|
|
650
|
-
/** Domain-restriction lock note (shown on `login` + `forbidden`). Pass the inner
|
|
651
|
-
* content — the lock icon is supplied. A `<code>` inside is styled as a chip. */
|
|
652
|
-
restriction?: React$1.ReactNode;
|
|
653
|
-
/** Body of the `forbidden` warning callout. */
|
|
654
|
-
forbidden?: React$1.ReactNode;
|
|
655
|
-
/** Body of the `error` danger callout. Falls back to a generic message. */
|
|
656
|
-
error?: React$1.ReactNode;
|
|
657
|
-
/** Retry handler shown as a button on the `error` state. Omit to hide the button. */
|
|
658
|
-
onRetry?: () => void;
|
|
659
|
-
/** Retry button label. Default "Try again". */
|
|
660
|
-
retryLabel?: React$1.ReactNode;
|
|
661
|
-
/** Label for the `loading` state. Default "Loading…". */
|
|
662
|
-
loadingLabel?: React$1.ReactNode;
|
|
663
|
-
/** Muted footer signature. Absent by default; pass a node to render one. */
|
|
664
|
-
footer?: React$1.ReactNode;
|
|
665
|
-
}
|
|
666
|
-
/**
|
|
667
|
-
* Full-screen pre-auth gate for internal Google Workspace SSO apps. Renders no app
|
|
668
|
-
* chrome. Theme-aware via kit tokens (dark leans on a border + glow ground, light on
|
|
669
|
-
* an elevation shadow); the glow/card treatment tokens live in the kit's styles.css.
|
|
670
|
-
*/
|
|
671
|
-
declare const SignInScreen: React$1.ForwardRefExoticComponent<SignInScreenProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
672
|
-
|
|
673
643
|
interface CopyButtonProps extends Omit<ButtonProps, 'value'> {
|
|
674
644
|
value: string;
|
|
675
645
|
label?: string;
|
|
@@ -1652,4 +1622,4 @@ interface ProductCreateScreenProps extends Omit<React$1.HTMLAttributes<HTMLDivEl
|
|
|
1652
1622
|
*/
|
|
1653
1623
|
declare function ProductCreateScreen({ organizationName: _organizationName, organizations, selectedOrganizationId, onOrganizationChange, productsLoading, onSubmit, defaultName, submitting, serverError, existingProducts, onOpenProduct, existingProductsLabel, submitLabel, onCancel, logo, themeToggle, title, description, footer, ...props }: ProductCreateScreenProps): React$1.JSX.Element;
|
|
1654
1624
|
|
|
1655
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, type AppShellProps, AppSidebar, type AppSidebarProps, AspectRatio, AuthenticatedLayout, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BeneficialOwnerPayload, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, COUNTRY_OPTIONS, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, type CarouselContextProps, CarouselItem, CarouselNext, type CarouselOptions, type CarouselPlugin, CarouselPrevious, type CarouselProps, Checkbox, Code, CodeBlock, type CodeBlockProps, type CodeLang, type CodeProps, Col, type ColProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, type ConfirmDialogProps, type ConnectionAuth, ConnectionCard, type ConnectionCardProps, type ConnectionScope, type ConnectionStatus, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, type CreateProductSubmit, CreateProductWindow, type CreateProductWindowOrganization, type CreateProductWindowProduct, type CreateProductWindowProps, DatePicker, type DatePickerProps, type DeltaDirection, type DeltaTone, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DocsLink, type DocsLinkProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ExtensionIcon, type ExtensionIconProps, ExtensionLink, type ExtensionLinkProps, type ExtensionLinkUiMode, FeedbackButton, type FeedbackButtonLabels, type FeedbackButtonProps, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Grid, GridOverlay, type GridOverlayProps, type GridProps, HoverCard, HoverCardContent, HoverCardTrigger, InlineError, type InlineErrorProps, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, MenuDivider, MenuPopup, type MenuPopupProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, type NavItem, type NavLinkComponent, NavRow, type NavRowProps, type NavRowVariant, NavSectionLabel, type NavSectionLabelProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NotifClass, type NotificationAction, NotificationBell, type NotificationBellProps, NotificationCenter, type NotificationCenterProps, type NotificationClass, type NotificationDeepLink, type NotificationItem, type NotificationMute, type NotificationPreferences, type NotificationProduct, NotificationSettings, type NotificationSettingsProps, type NotificationSeverity, type NotificationSubscription, type NotificationThreshold, NotificationToast, type NotificationToastDwell, type NotificationToastProps, NotificationToaster, type NotificationToasterPosition, type NotificationToasterProps, OrgProductSwitcher, type OrgProductSwitcherAction, type OrgProductSwitcherItem, type OrgProductSwitcherProps, OrganizationCreateScreen, type OrganizationCreateScreenProps, type OrganizationOnboardingDefaults, OrganizationOnboardingForm, type OrganizationOnboardingFormProps, type OrganizationOnboardingPayload, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProductCreateScreen, type ProductCreateScreenOrganization, type ProductCreateScreenProduct, type ProductCreateScreenProps, type ProductCreateScreenSubmit, Progress, RadioGroup, RadioGroupItem, RequestRow, type RequestRowProps, type RequestState, type RequestSurface, type ResolvedTheme, type Responsive, ScrollArea, ScrollBar, SectionIntro, type SectionIntroProps, SegmentChip, type SegmentChipProps, Select, type SelectOption, type SelectProps, Separator, type Severity, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarBackHeader, type SidebarBackHeaderProps, SidebarNav, SidebarNavLink, type SidebarNavLinkProps, type SidebarNavProps, SidebarProductHeader, type SidebarProductHeaderProps,
|
|
1625
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, type AppShellProps, AppSidebar, type AppSidebarProps, AspectRatio, AuthenticatedLayout, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BeneficialOwnerPayload, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, COUNTRY_OPTIONS, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, type CarouselContextProps, CarouselItem, CarouselNext, type CarouselOptions, type CarouselPlugin, CarouselPrevious, type CarouselProps, Checkbox, Code, CodeBlock, type CodeBlockProps, type CodeLang, type CodeProps, Col, type ColProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, type ConfirmDialogProps, type ConnectionAuth, ConnectionCard, type ConnectionCardProps, type ConnectionScope, type ConnectionStatus, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, type CreateProductSubmit, CreateProductWindow, type CreateProductWindowOrganization, type CreateProductWindowProduct, type CreateProductWindowProps, DatePicker, type DatePickerProps, type DeltaDirection, type DeltaTone, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DocsLink, type DocsLinkProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ExtensionIcon, type ExtensionIconProps, ExtensionLink, type ExtensionLinkProps, type ExtensionLinkUiMode, FeedbackButton, type FeedbackButtonLabels, type FeedbackButtonProps, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Grid, GridOverlay, type GridOverlayProps, type GridProps, HoverCard, HoverCardContent, HoverCardTrigger, InlineError, type InlineErrorProps, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, MenuDivider, MenuPopup, type MenuPopupProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, type NavItem, type NavLinkComponent, NavRow, type NavRowProps, type NavRowVariant, NavSectionLabel, type NavSectionLabelProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NotifClass, type NotificationAction, NotificationBell, type NotificationBellProps, NotificationCenter, type NotificationCenterProps, type NotificationClass, type NotificationDeepLink, type NotificationItem, type NotificationMute, type NotificationPreferences, type NotificationProduct, NotificationSettings, type NotificationSettingsProps, type NotificationSeverity, type NotificationSubscription, type NotificationThreshold, NotificationToast, type NotificationToastDwell, type NotificationToastProps, NotificationToaster, type NotificationToasterPosition, type NotificationToasterProps, OrgProductSwitcher, type OrgProductSwitcherAction, type OrgProductSwitcherItem, type OrgProductSwitcherProps, OrganizationCreateScreen, type OrganizationCreateScreenProps, type OrganizationOnboardingDefaults, OrganizationOnboardingForm, type OrganizationOnboardingFormProps, type OrganizationOnboardingPayload, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProductCreateScreen, type ProductCreateScreenOrganization, type ProductCreateScreenProduct, type ProductCreateScreenProps, type ProductCreateScreenSubmit, Progress, RadioGroup, RadioGroupItem, RequestRow, type RequestRowProps, type RequestState, type RequestSurface, type ResolvedTheme, type Responsive, ScrollArea, ScrollBar, SectionIntro, type SectionIntroProps, SegmentChip, type SegmentChipProps, Select, type SelectOption, type SelectProps, Separator, type Severity, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarBackHeader, type SidebarBackHeaderProps, SidebarNav, SidebarNavLink, type SidebarNavLinkProps, type SidebarNavProps, SidebarProductHeader, type SidebarProductHeaderProps, Skeleton, Slider, StatCard, type StatCardProps, StatusDot, type StatusDotProps, Switch, type SwitchProps, TOAST_DWELL, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, type Theme, ThemeToggle, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseSidebarOptions, type UseSidebarResult, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, alertVariants, badgeVariants, buttonVariants, cn, formatRelativeAge, isKnownExtensionIcon, isNotificationSettled, navigationMenuTriggerStyle, segmentChipVariants, severityBadgeVariant, severityLabels, statusDotVariants, toggleVariants, useCarousel, useFormField, useIsMobile, useSidebar, useTheme };
|