@lessly/ui 1.6.0 → 2.0.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 +31 -14
- package/dist/chunk-F5RMHSPS.js +433 -0
- package/dist/index.d.ts +34 -104
- package/dist/index.js +1300 -1896
- package/dist/router.d.ts +101 -0
- package/dist/router.js +254 -0
- package/dist/styles-federated.css +105 -0
- package/dist/styles.css +106 -1
- package/dist/tailwind-preset.js +23 -1
- package/package.json +11 -3
package/dist/index.d.ts
CHANGED
|
@@ -699,11 +699,9 @@ declare const MenubarShortcut: {
|
|
|
699
699
|
* critical, important, and the rung that is only worth knowing. They are the one place colour marks
|
|
700
700
|
* a state rather than an action, and *subtle* is the whole permission: the solid `destructive` and
|
|
701
701
|
* `warning` fills belong to a thing you must act on, and three of those read as three shouting
|
|
702
|
-
* pills.
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
* as one ladder: `bg-bg-sunken` is the strongest plate of the three in light, so a ladder resting on
|
|
706
|
-
* it puts its heaviest mark under its two lightest and reads upside down.
|
|
702
|
+
* pills. The bottom rung shares the `status` pill's plate and is told apart by its text —
|
|
703
|
+
* `text-text-tertiary` against `status`'s `text-text-primary` — and stays its own variant because it
|
|
704
|
+
* is read as part of the ladder rather than as a state pill. See Guidelines/Colour marks actions.
|
|
707
705
|
*/
|
|
708
706
|
declare const badgeVariants: (props?: ({
|
|
709
707
|
variant?: "status" | "default" | "destructive" | "outline" | "secondary" | "danger-subtle" | "warning-subtle" | "neutral-subtle" | "success" | "warning" | null | undefined;
|
|
@@ -983,6 +981,11 @@ declare function useTheme(): {
|
|
|
983
981
|
resolvedTheme: ResolvedTheme;
|
|
984
982
|
};
|
|
985
983
|
|
|
984
|
+
/**
|
|
985
|
+
* `system` remains a stored preference — a console nobody has told defaults to it — and pressing
|
|
986
|
+
* this mark ends it. That is why the name says so while the preference is still `system`: the press
|
|
987
|
+
* costs something a person cannot see, and `ThemePicker` is where it is given back.
|
|
988
|
+
*/
|
|
986
989
|
declare function ThemeToggle(): React$1.JSX.Element;
|
|
987
990
|
|
|
988
991
|
type CalendarProps = React$1.ComponentProps<typeof DayPicker>;
|
|
@@ -1377,31 +1380,6 @@ interface UserMenuProps {
|
|
|
1377
1380
|
}
|
|
1378
1381
|
declare function UserMenu({ user, items, collapsed, align }: UserMenuProps): React$1.JSX.Element;
|
|
1379
1382
|
|
|
1380
|
-
type ExtensionLinkUiMode = 'federation' | 'standalone';
|
|
1381
|
-
interface ExtensionLinkProps extends Omit<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
|
|
1382
|
-
/**
|
|
1383
|
-
* 'federation' → the extension runs inside the workspace shell and navigates
|
|
1384
|
-
* client-side via react-router's <Link>. 'standalone' → the extension is
|
|
1385
|
-
* served full-page, so a plain <a href> triggers a normal document load.
|
|
1386
|
-
*/
|
|
1387
|
-
uiMode: ExtensionLinkUiMode;
|
|
1388
|
-
/** Target route/href. */
|
|
1389
|
-
to: string;
|
|
1390
|
-
}
|
|
1391
|
-
/**
|
|
1392
|
-
* Federation-aware navigation link. Federation extensions are mounted in-shell
|
|
1393
|
-
* and navigate client-side (react-router <Link>); standalone extensions load
|
|
1394
|
-
* full-page (<a href>). Anchor props are forwarded to both variants — in
|
|
1395
|
-
* particular onMouseEnter/onFocus, which hosts use to preload the target route.
|
|
1396
|
-
*
|
|
1397
|
-
* The federation branch renders a react-router <Link>, so it must be used
|
|
1398
|
-
* within a Router context (the workspace shell / MemoryRouter in tests).
|
|
1399
|
-
*/
|
|
1400
|
-
declare function ExtensionLink({ uiMode, to, className, children, ...anchorProps }: ExtensionLinkProps): React$1.JSX.Element;
|
|
1401
|
-
declare namespace ExtensionLink {
|
|
1402
|
-
var displayName: string;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
1383
|
/** True when `name` (kebab-case) maps to a real lucide-react icon. */
|
|
1406
1384
|
declare function isKnownExtensionIcon(name: string): boolean;
|
|
1407
1385
|
interface ExtensionIconProps extends LucideProps {
|
|
@@ -2409,66 +2387,6 @@ interface MenuPopupProps {
|
|
|
2409
2387
|
declare function MenuPopup({ trigger, children, open, defaultOpen, onOpenChange, direction, align, sideOffset, className, }: MenuPopupProps): React$1.JSX.Element;
|
|
2410
2388
|
declare const MenuDivider: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2411
2389
|
|
|
2412
|
-
interface NavItem {
|
|
2413
|
-
label: string;
|
|
2414
|
-
href: string;
|
|
2415
|
-
icon?: LucideIcon;
|
|
2416
|
-
exact?: boolean;
|
|
2417
|
-
}
|
|
2418
|
-
type NavLinkComponent = React$1.ComponentType<{
|
|
2419
|
-
to: string;
|
|
2420
|
-
className?: string;
|
|
2421
|
-
children?: React$1.ReactNode;
|
|
2422
|
-
} & Record<string, unknown>>;
|
|
2423
|
-
interface SidebarNavLinkProps {
|
|
2424
|
-
item: NavItem;
|
|
2425
|
-
collapsed?: boolean;
|
|
2426
|
-
active?: boolean;
|
|
2427
|
-
basePath?: string;
|
|
2428
|
-
LinkComponent?: NavLinkComponent;
|
|
2429
|
-
className?: string;
|
|
2430
|
-
}
|
|
2431
|
-
declare function SidebarNavLink({ item, collapsed, active, basePath, LinkComponent, className, }: SidebarNavLinkProps): React$1.JSX.Element;
|
|
2432
|
-
interface SidebarNavProps {
|
|
2433
|
-
items: NavItem[];
|
|
2434
|
-
collapsed?: boolean;
|
|
2435
|
-
basePath?: string;
|
|
2436
|
-
LinkComponent?: NavLinkComponent;
|
|
2437
|
-
isItemActive?: (item: NavItem, pathname: string) => boolean;
|
|
2438
|
-
className?: string;
|
|
2439
|
-
}
|
|
2440
|
-
declare function SidebarNav({ items, collapsed, basePath, LinkComponent, isItemActive, className, }: SidebarNavProps): React$1.JSX.Element;
|
|
2441
|
-
|
|
2442
|
-
interface AppSidebarProps {
|
|
2443
|
-
items: NavItem[];
|
|
2444
|
-
/** Expanded-slot mark/wordmark, rendered when `header` is absent. Also the collapsed-rail
|
|
2445
|
-
* fallback when `logoCollapsed` isn't given, on a rail that isn't `collapsible` — see
|
|
2446
|
-
* `logoCollapsed`. */
|
|
2447
|
-
logo?: React$1.ReactNode;
|
|
2448
|
-
/** Collapsed-rail identity — a small mark, for a rail that cannot be expanded from inside it.
|
|
2449
|
-
* A `collapsible` rail shows the pin here instead and never reads this: the 52px rail holds
|
|
2450
|
-
* one box, and the way back to expanded is what it holds. */
|
|
2451
|
-
logoCollapsed?: React$1.ReactNode;
|
|
2452
|
-
/** Identity slot above the rail — e.g. an <OrgProductSwitcher/> (#266). Falls back to `logo`.
|
|
2453
|
-
* Expanded-only: rendering it in the 52px collapsed rail would overflow, so the collapsed
|
|
2454
|
-
* branch never reads it. What stands in depends on `collapsible` — the pin when it is set,
|
|
2455
|
-
* `logoCollapsed ?? logo` when it is not. */
|
|
2456
|
-
header?: React$1.ReactNode;
|
|
2457
|
-
/** Account slot below the rail — e.g. a <UserMenu/>. Its divider renders only with it. */
|
|
2458
|
-
footer?: React$1.ReactNode;
|
|
2459
|
-
/** Render the built-in collapse pin. Off by default: the shipped rail has none.
|
|
2460
|
-
* `collapsed` is still honoured without it, for consumers driving collapse themselves. */
|
|
2461
|
-
collapsible?: boolean;
|
|
2462
|
-
collapsed?: boolean;
|
|
2463
|
-
defaultCollapsed?: boolean;
|
|
2464
|
-
onCollapsedChange?: (collapsed: boolean) => void;
|
|
2465
|
-
basePath?: string;
|
|
2466
|
-
LinkComponent?: NavLinkComponent;
|
|
2467
|
-
isItemActive?: (item: NavItem, pathname: string) => boolean;
|
|
2468
|
-
className?: string;
|
|
2469
|
-
}
|
|
2470
|
-
declare function AppSidebar({ items, logo, logoCollapsed, header, footer, collapsible, collapsed: controlled, defaultCollapsed, onCollapsedChange, basePath, LinkComponent, isItemActive, className, }: AppSidebarProps): React$1.JSX.Element;
|
|
2471
|
-
|
|
2472
2390
|
interface SidebarProductHeaderOwnProps {
|
|
2473
2391
|
/** Product name. Rendered at 13/600, truncated. */
|
|
2474
2392
|
name: string;
|
|
@@ -2589,18 +2507,6 @@ declare namespace SidebarBackHeader {
|
|
|
2589
2507
|
var displayName: string;
|
|
2590
2508
|
}
|
|
2591
2509
|
|
|
2592
|
-
interface AppShellProps {
|
|
2593
|
-
/** The sidebar, typically an <AppSidebar/>. Rendered in the desktop rail and,
|
|
2594
|
-
* on mobile, inside a Sheet (force-expanded via cloneElement collapsed=false). */
|
|
2595
|
-
sidebar: React$1.ReactNode;
|
|
2596
|
-
topBar?: React$1.ReactNode;
|
|
2597
|
-
children?: React$1.ReactNode;
|
|
2598
|
-
className?: string;
|
|
2599
|
-
}
|
|
2600
|
-
declare function AppShell({ sidebar, topBar, children, className }: AppShellProps): React$1.JSX.Element;
|
|
2601
|
-
/** Alias of AppShell — reads better in app router files. */
|
|
2602
|
-
declare const AuthenticatedLayout: typeof AppShell;
|
|
2603
|
-
|
|
2604
2510
|
interface TopBarProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2605
2511
|
/** The leading content — the page's trail. */
|
|
2606
2512
|
left?: React$1.ReactNode;
|
|
@@ -2711,6 +2617,30 @@ interface ColProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
2711
2617
|
}
|
|
2712
2618
|
declare const Col: React$1.ForwardRefExoticComponent<ColProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2713
2619
|
|
|
2620
|
+
/**
|
|
2621
|
+
* The page column: the one grid a console page lays its cards on, in one of two widths.
|
|
2622
|
+
*
|
|
2623
|
+
* `reading` (the default) is capped and centred in the well — the width a page of cards, a form, a
|
|
2624
|
+
* settings page, an overview or an entity detail is read at, which is most of the console. `full`
|
|
2625
|
+
* drops the cap and fills the well, for a page whose main content is a table, a matrix, a roster, a
|
|
2626
|
+
* log or a chart: something that gets better with horizontal room.
|
|
2627
|
+
*
|
|
2628
|
+
* It writes no horizontal padding, ever. `AppShell` spells the inset once for `main` and the
|
|
2629
|
+
* top-bar row together, so a column that padded itself again would push the page off the trail
|
|
2630
|
+
* above it.
|
|
2631
|
+
*
|
|
2632
|
+
* The cap and the centring are `.page-column` in `src/styles.css` — a real class rather than an
|
|
2633
|
+
* arbitrary `max-w-[…]` utility, which the content scanner can drop for a newly-used class. `full`
|
|
2634
|
+
* is the absence of that class, never a second copy of the number.
|
|
2635
|
+
*/
|
|
2636
|
+
/** `'reading'` is the capped, centred column; `'full'` fills the well. */
|
|
2637
|
+
type PageColumnWidth = 'reading' | 'full';
|
|
2638
|
+
interface PageColumnProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2639
|
+
/** How wide the column reads. Defaults to `'reading'`. */
|
|
2640
|
+
width?: PageColumnWidth;
|
|
2641
|
+
}
|
|
2642
|
+
declare function PageColumn({ className, width, ...props }: PageColumnProps): React$1.JSX.Element;
|
|
2643
|
+
|
|
2714
2644
|
/**
|
|
2715
2645
|
* Dependency-free syntax highlighter for docs/consumer code snippets. A single
|
|
2716
2646
|
* ordered-alternation regex per language tokenizes the source into typed runs;
|
|
@@ -2989,7 +2919,7 @@ interface NotificationProduct {
|
|
|
2989
2919
|
label: string;
|
|
2990
2920
|
}
|
|
2991
2921
|
declare const severityLabels: Record<NotificationSeverity, string>;
|
|
2992
|
-
declare function severityBadgeVariant(severity: NotificationSeverity): '
|
|
2922
|
+
declare function severityBadgeVariant(severity: NotificationSeverity): 'danger-subtle' | 'warning-subtle' | 'neutral-subtle';
|
|
2993
2923
|
/** Per-severity dwell in seconds. `Infinity` means the toast stays until dismissed. */
|
|
2994
2924
|
type NotificationToastDwell = Record<NotificationSeverity, number>;
|
|
2995
2925
|
/**
|
|
@@ -3440,4 +3370,4 @@ interface SecretRevealProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>,
|
|
|
3440
3370
|
}
|
|
3441
3371
|
declare const SecretReveal: React$1.ForwardRefExoticComponent<SecretRevealProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3442
3372
|
|
|
3443
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AddPicker, type AddPickerItem, type AddPickerProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle,
|
|
3373
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AddPicker, type AddPickerItem, type AddPickerProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, AttachmentChip, type AttachmentChipProps, type AttachmentState, AutoHeight, type AutoHeightProps, Avatar, AvatarFallback, AvatarImage, BackLink, type BackLinkProps, 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, CardNote, type CardNoteProps, type CardProps, CardTitle, type CardTitleProps, Carousel, type CarouselApi, CarouselContent, type CarouselContextProps, CarouselItem, CarouselNext, type CarouselOptions, type CarouselPlugin, CarouselPrevious, type CarouselProps, Checkbox, Code, CodeBlock, type CodeBlockProps, type CodeLang, type CodeProps, type CodeVariant, Col, type ColProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, type CommandItemProps, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogStepUp, ConnectorCard, type ConnectorCardProps, type ConnectorOrigin, type ConnectorStatus, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, DecorativeIcon, type DecorativeIconProps, 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, EntityRow, type EntityRowOpens, type EntityRowOpensProps, type EntityRowProps, EntityTile, type EntityTileProps, ExtensionIcon, type ExtensionIconProps, FeedbackButton, type FeedbackButtonLabels, type FeedbackButtonProps, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GlyphAvatar, type GlyphAvatarProps, type GrantRole, type GrantRoleNotes, GrantRolePicker, type GrantRolePickerProps, GrantRow, type GrantRowProps, Grid, GridOverlay, type GridOverlayProps, type GridProps, HoverCard, HoverCardContent, HoverCardTrigger, IconHint, type IconHintProps, ImageCropDialog, type ImageCropDialogProps, type ImageCropShape, type ImageCropType, ImageCropper, type ImageCropperProps, ImageUpload, type ImageUploadProps, type ImageUploadSize, InlineError, type InlineErrorProps, Input, InputAddon, type InputAddonProps, InputGroup, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, ListCells, type ListCellsProps, type ListColumn, type ListColumnWidth, ListHeader, type ListHeaderProps, MISSING_TONE, Medallion, type MedallionProps, MenuDivider, MenuPopup, type MenuPopupProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, 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, NotificationRow, type NotificationRowProps, NotificationSettings, type NotificationSettingsProps, type NotificationSeverity, type NotificationSubscription, type NotificationThreshold, NotificationToast, type NotificationToastDwell, type NotificationToastProps, NotificationToaster, type NotificationToasterPosition, type NotificationToasterProps, OptionCard, type OptionCardProps, OrgProductSwitcher, type OrgProductSwitcherAction, type OrgProductSwitcherItem, type OrgProductSwitcherProps, type OrganizationOnboardingDefaults, OrganizationOnboardingForm, type OrganizationOnboardingFormProps, type OrganizationOnboardingPayload, PageColumn, type PageColumnProps, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, PersonAvatar, type PersonAvatarProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RemovableChip, type RemovableChipProps, RemoveButton, type RemoveButtonProps, RequestRow, type RequestRowProps, type RequestState, type RequestSurface, type ResolvedTheme, type Responsive, ScrollArea, ScrollBar, SecretReveal, type SecretRevealProps, SectionIntro, type SectionIntroProps, Select, type SelectOption, type SelectProps, Separator, SettingRow, type SettingRowProps, type Severity, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarBackHeader, type SidebarBackHeaderProps, SidebarProductHeader, type SidebarProductHeaderProps, Skeleton, Slider, StatCard, type StatCardProps, StatusDot, type StatusDotProps, StepUpChallenge, type StepUpChallengeProps, type StepUpMethod, type StepUpProof, Switch, type SwitchProps, TOAST_DWELL, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, type Theme, ThemePicker, type ThemePickerProps, ThemeToggle, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, type TopBarProps, TopBarUtilities, type TopBarUtilitiesProps, type TopBarUtility, type UseSidebarOptions, type UseSidebarResult, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, WEIGHT_TONE, alertVariants, attachmentChipVariants, badgeVariants, buttonVariants, cn, formatRelativeAge, grantRemoveLabel, isKnownExtensionIcon, isNotificationSettled, navigationMenuTriggerStyle, severityBadgeVariant, severityLabels, statusDotVariants, toggleVariants, useCarousel, useFormField, useIsMobile, useSidebar, useTheme };
|