@nswds/app 1.29.0 → 1.31.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/globals.css +229 -0
- package/dist/index.cjs +155 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +152 -28
- package/dist/index.js.map +1 -1
- package/dist/styles.css +230 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -286,6 +286,7 @@ type NavigationLink = {
|
|
|
286
286
|
};
|
|
287
287
|
type NavigationSection = {
|
|
288
288
|
title: string;
|
|
289
|
+
href?: string;
|
|
289
290
|
links: NavigationLink[];
|
|
290
291
|
};
|
|
291
292
|
interface PrevNextLinksProps {
|
|
@@ -821,6 +822,13 @@ declare function MenubarSubTrigger({ className, inset, children, ...props }: Rea
|
|
|
821
822
|
}): react_jsx_runtime.JSX.Element;
|
|
822
823
|
declare function MenubarSubContent({ className, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
823
824
|
|
|
825
|
+
interface NavigationProps {
|
|
826
|
+
navigation: NavigationSection[];
|
|
827
|
+
}
|
|
828
|
+
declare function MainNavigation({ navigation }: NavigationProps): react_jsx_runtime.JSX.Element;
|
|
829
|
+
declare function TopLevel({ title, href }: Link$1): react_jsx_runtime.JSX.Element;
|
|
830
|
+
declare function MegaMenu({ title, href, links }: Link$1): react_jsx_runtime.JSX.Element;
|
|
831
|
+
|
|
824
832
|
declare function Navigation({ className, onLinkClick, navigation, }: {
|
|
825
833
|
className?: string;
|
|
826
834
|
onLinkClick?: React__default.MouseEventHandler<HTMLAnchorElement>;
|
|
@@ -1062,6 +1070,10 @@ declare function TooltipContent({ className, sideOffset, children, ...props }: R
|
|
|
1062
1070
|
|
|
1063
1071
|
declare function ViewToggle({ viewMode, setViewMode }: ViewToggleProps): react_jsx_runtime.JSX.Element;
|
|
1064
1072
|
|
|
1073
|
+
declare function useIsMobile(): boolean;
|
|
1074
|
+
|
|
1075
|
+
declare function useDisableToc(): void;
|
|
1076
|
+
|
|
1065
1077
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1066
1078
|
declare function truncate(text: string, maxLength: number): string;
|
|
1067
1079
|
declare function kebabCase(str: string): string;
|
|
@@ -1113,4 +1125,4 @@ declare const allPalettes: Palette[];
|
|
|
1113
1125
|
declare const colors: ColorThemes;
|
|
1114
1126
|
declare const colorThemes: ColorThemes;
|
|
1115
1127
|
|
|
1116
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, type BaseCodeData, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, type CodeData, CodeDemo, type CodeDemoProps, CodeHighlight, type CodeHighlightProps, type CodeItem, type CodeVariant, Collapsible, CollapsibleContent, CollapsibleTrigger, type Color, ColorCard, type ColorCardProps, type ColorData, type ColorProperty, ColorSwatches, type ColorSwatchesProps, type ColorTheme, type ColorThemes, type ColorsDisplayProps, type ColourOutputProps, ColourScale, type ColourScaleProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataType, type DataTypeSelectProps, type DesignTokensShades, type DesignTokensTheme, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormStatus$1 as FormStatus, type FormStatusHook, type FormStore, type Format, FormatToggle, type FormatToggleProps, GenerateInterpolatedColors, Header, Heading, type HeadingNode, type HeadingTypeProps, type IFrameData, type IFrameMap, type IFrameOptions, type IFrameProps, type IconProps, Icons, Input, Label, type Language, type LayoutProps, Link, _List as List, Logo, Masthead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, type NavigationLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NavigationSection, type Output, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, type PrevNextLinksProps, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, type SidebarLinkProps, SidebarNavigation, type SimpleNode, type SingleCodeData, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, type StructuredColor, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, type TableOfContentsItem, type TableOfContentsProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, type TextTypeProps, Textarea, type ThemeCategory, ThemeColorPalette, type ThemeMessage, type ThemeOption, ThemeProvider, ThemeSelector, type ThemeSelectorDropDownProps, type ThemeSelectorProps, ThemeSwitcher, Toaster, TocContext, type TocContextType, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TouchTarget, type TypeExampleProps, type TypeSpecs, type Variant, type VariantCodeData, type Variants, type View, type ViewMode, ViewToggle, type ViewToggleProps, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, type colorCategories, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useFormField, useToc };
|
|
1128
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, type BaseCodeData, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, type CodeData, CodeDemo, type CodeDemoProps, CodeHighlight, type CodeHighlightProps, type CodeItem, type CodeVariant, Collapsible, CollapsibleContent, CollapsibleTrigger, type Color, ColorCard, type ColorCardProps, type ColorData, type ColorProperty, ColorSwatches, type ColorSwatchesProps, type ColorTheme, type ColorThemes, type ColorsDisplayProps, type ColourOutputProps, ColourScale, type ColourScaleProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataType, type DataTypeSelectProps, type DesignTokensShades, type DesignTokensTheme, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormStatus$1 as FormStatus, type FormStatusHook, type FormStore, type Format, FormatToggle, type FormatToggleProps, GenerateInterpolatedColors, Header, Heading, type HeadingNode, type HeadingTypeProps, type IFrameData, type IFrameMap, type IFrameOptions, type IFrameProps, type IconProps, Icons, Input, Label, type Language, type LayoutProps, Link, _List as List, Logo, MainNavigation, Masthead, MegaMenu, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, type NavigationLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NavigationSection, type Output, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, type PrevNextLinksProps, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, type SidebarLinkProps, SidebarNavigation, type SimpleNode, type SingleCodeData, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, type StructuredColor, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, type TableOfContentsItem, type TableOfContentsProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, type TextTypeProps, Textarea, type ThemeCategory, ThemeColorPalette, type ThemeMessage, type ThemeOption, ThemeProvider, ThemeSelector, type ThemeSelectorDropDownProps, type ThemeSelectorProps, ThemeSwitcher, Toaster, TocContext, type TocContextType, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopLevel, TouchTarget, type TypeExampleProps, type TypeSpecs, type Variant, type VariantCodeData, type Variants, type View, type ViewMode, ViewToggle, type ViewToggleProps, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, type colorCategories, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useDisableToc, useFormField, useIsMobile, useToc };
|
package/dist/index.d.ts
CHANGED
|
@@ -286,6 +286,7 @@ type NavigationLink = {
|
|
|
286
286
|
};
|
|
287
287
|
type NavigationSection = {
|
|
288
288
|
title: string;
|
|
289
|
+
href?: string;
|
|
289
290
|
links: NavigationLink[];
|
|
290
291
|
};
|
|
291
292
|
interface PrevNextLinksProps {
|
|
@@ -821,6 +822,13 @@ declare function MenubarSubTrigger({ className, inset, children, ...props }: Rea
|
|
|
821
822
|
}): react_jsx_runtime.JSX.Element;
|
|
822
823
|
declare function MenubarSubContent({ className, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
823
824
|
|
|
825
|
+
interface NavigationProps {
|
|
826
|
+
navigation: NavigationSection[];
|
|
827
|
+
}
|
|
828
|
+
declare function MainNavigation({ navigation }: NavigationProps): react_jsx_runtime.JSX.Element;
|
|
829
|
+
declare function TopLevel({ title, href }: Link$1): react_jsx_runtime.JSX.Element;
|
|
830
|
+
declare function MegaMenu({ title, href, links }: Link$1): react_jsx_runtime.JSX.Element;
|
|
831
|
+
|
|
824
832
|
declare function Navigation({ className, onLinkClick, navigation, }: {
|
|
825
833
|
className?: string;
|
|
826
834
|
onLinkClick?: React__default.MouseEventHandler<HTMLAnchorElement>;
|
|
@@ -1062,6 +1070,10 @@ declare function TooltipContent({ className, sideOffset, children, ...props }: R
|
|
|
1062
1070
|
|
|
1063
1071
|
declare function ViewToggle({ viewMode, setViewMode }: ViewToggleProps): react_jsx_runtime.JSX.Element;
|
|
1064
1072
|
|
|
1073
|
+
declare function useIsMobile(): boolean;
|
|
1074
|
+
|
|
1075
|
+
declare function useDisableToc(): void;
|
|
1076
|
+
|
|
1065
1077
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1066
1078
|
declare function truncate(text: string, maxLength: number): string;
|
|
1067
1079
|
declare function kebabCase(str: string): string;
|
|
@@ -1113,4 +1125,4 @@ declare const allPalettes: Palette[];
|
|
|
1113
1125
|
declare const colors: ColorThemes;
|
|
1114
1126
|
declare const colorThemes: ColorThemes;
|
|
1115
1127
|
|
|
1116
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, type BaseCodeData, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, type CodeData, CodeDemo, type CodeDemoProps, CodeHighlight, type CodeHighlightProps, type CodeItem, type CodeVariant, Collapsible, CollapsibleContent, CollapsibleTrigger, type Color, ColorCard, type ColorCardProps, type ColorData, type ColorProperty, ColorSwatches, type ColorSwatchesProps, type ColorTheme, type ColorThemes, type ColorsDisplayProps, type ColourOutputProps, ColourScale, type ColourScaleProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataType, type DataTypeSelectProps, type DesignTokensShades, type DesignTokensTheme, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormStatus$1 as FormStatus, type FormStatusHook, type FormStore, type Format, FormatToggle, type FormatToggleProps, GenerateInterpolatedColors, Header, Heading, type HeadingNode, type HeadingTypeProps, type IFrameData, type IFrameMap, type IFrameOptions, type IFrameProps, type IconProps, Icons, Input, Label, type Language, type LayoutProps, Link, _List as List, Logo, Masthead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, type NavigationLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NavigationSection, type Output, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, type PrevNextLinksProps, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, type SidebarLinkProps, SidebarNavigation, type SimpleNode, type SingleCodeData, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, type StructuredColor, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, type TableOfContentsItem, type TableOfContentsProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, type TextTypeProps, Textarea, type ThemeCategory, ThemeColorPalette, type ThemeMessage, type ThemeOption, ThemeProvider, ThemeSelector, type ThemeSelectorDropDownProps, type ThemeSelectorProps, ThemeSwitcher, Toaster, TocContext, type TocContextType, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TouchTarget, type TypeExampleProps, type TypeSpecs, type Variant, type VariantCodeData, type Variants, type View, type ViewMode, ViewToggle, type ViewToggleProps, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, type colorCategories, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useFormField, useToc };
|
|
1128
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, type BaseCodeData, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, type CodeData, CodeDemo, type CodeDemoProps, CodeHighlight, type CodeHighlightProps, type CodeItem, type CodeVariant, Collapsible, CollapsibleContent, CollapsibleTrigger, type Color, ColorCard, type ColorCardProps, type ColorData, type ColorProperty, ColorSwatches, type ColorSwatchesProps, type ColorTheme, type ColorThemes, type ColorsDisplayProps, type ColourOutputProps, ColourScale, type ColourScaleProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataType, type DataTypeSelectProps, type DesignTokensShades, type DesignTokensTheme, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormStatus$1 as FormStatus, type FormStatusHook, type FormStore, type Format, FormatToggle, type FormatToggleProps, GenerateInterpolatedColors, Header, Heading, type HeadingNode, type HeadingTypeProps, type IFrameData, type IFrameMap, type IFrameOptions, type IFrameProps, type IconProps, Icons, Input, Label, type Language, type LayoutProps, Link, _List as List, Logo, MainNavigation, Masthead, MegaMenu, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, type NavigationLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NavigationSection, type Output, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, type PrevNextLinksProps, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, type SidebarLinkProps, SidebarNavigation, type SimpleNode, type SingleCodeData, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, type StructuredColor, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, type TableOfContentsItem, type TableOfContentsProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, type TextTypeProps, Textarea, type ThemeCategory, ThemeColorPalette, type ThemeMessage, type ThemeOption, ThemeProvider, ThemeSelector, type ThemeSelectorDropDownProps, type ThemeSelectorProps, ThemeSwitcher, Toaster, TocContext, type TocContextType, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopLevel, TouchTarget, type TypeExampleProps, type TypeSpecs, type Variant, type VariantCodeData, type Variants, type View, type ViewMode, ViewToggle, type ViewToggleProps, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, type colorCategories, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useDisableToc, useFormField, useIsMobile, useToc };
|
package/dist/index.js
CHANGED
|
@@ -6,9 +6,10 @@ import { cva } from 'class-variance-authority';
|
|
|
6
6
|
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
7
7
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
8
8
|
import * as Headless from '@headlessui/react';
|
|
9
|
+
import { PopoverGroup, Popover as Popover$1, PopoverButton, PopoverPanel } from '@headlessui/react';
|
|
9
10
|
import * as React6 from 'react';
|
|
10
|
-
import React6__default, { forwardRef, useEffect, createContext, useRef, useState, useMemo, useCallback, useContext } from 'react';
|
|
11
|
-
import
|
|
11
|
+
import React6__default, { forwardRef, useEffect, createContext, useRef, useState, useMemo, useCallback, useContext, useLayoutEffect } from 'react';
|
|
12
|
+
import Link10 from 'next/link';
|
|
12
13
|
import * as culori from 'culori';
|
|
13
14
|
import { Slot } from '@radix-ui/react-slot';
|
|
14
15
|
import { usePathname, useRouter } from 'next/navigation';
|
|
@@ -322,7 +323,7 @@ function AvatarFallback({
|
|
|
322
323
|
);
|
|
323
324
|
}
|
|
324
325
|
var Link = forwardRef(function Link2(props, ref) {
|
|
325
|
-
return /* @__PURE__ */ jsx(Headless.DataInteractive, { children: /* @__PURE__ */ jsx(
|
|
326
|
+
return /* @__PURE__ */ jsx(Headless.DataInteractive, { children: /* @__PURE__ */ jsx(Link10, { ...props, ref }) });
|
|
326
327
|
});
|
|
327
328
|
var styles = {
|
|
328
329
|
base: [
|
|
@@ -1816,7 +1817,7 @@ function Breadcrumbs({
|
|
|
1816
1817
|
const shouldCollapse = breadcrumbItems.length > maxItems;
|
|
1817
1818
|
if (!shouldCollapse) {
|
|
1818
1819
|
return /* @__PURE__ */ jsx(Breadcrumb, { className: "-ml-1", children: /* @__PURE__ */ jsx(BreadcrumbList, { children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
1819
|
-
/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1820
|
+
/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Link10, { href: item.path, children: item.label }) }) }),
|
|
1820
1821
|
index < breadcrumbItems.length - 1 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {})
|
|
1821
1822
|
] }, item.path)) }) });
|
|
1822
1823
|
}
|
|
@@ -1827,7 +1828,7 @@ function Breadcrumbs({
|
|
|
1827
1828
|
const collapsedItems = breadcrumbItems.slice(startItems, breadcrumbItems.length - endItems);
|
|
1828
1829
|
return /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, { children: [
|
|
1829
1830
|
itemsAtStart.map((item, index) => /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
1830
|
-
/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1831
|
+
/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Link10, { href: item.path, children: item.label }) }) }),
|
|
1831
1832
|
index < itemsAtStart.length - 1 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {})
|
|
1832
1833
|
] }, item.path)),
|
|
1833
1834
|
itemsAtStart.length > 0 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
|
|
@@ -1836,11 +1837,11 @@ function Breadcrumbs({
|
|
|
1836
1837
|
/* @__PURE__ */ jsx(BreadcrumbEllipsis, { className: "h-4 w-4" }),
|
|
1837
1838
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle menu" })
|
|
1838
1839
|
] }),
|
|
1839
|
-
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "start", children: collapsedItems.map((item) => /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1840
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "start", children: collapsedItems.map((item) => /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx(Link10, { href: item.path, children: item.label }) }, item.path)) })
|
|
1840
1841
|
] }) }),
|
|
1841
1842
|
itemsAtEnd.length > 0 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
|
|
1842
1843
|
itemsAtEnd.map((item, index) => /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
1843
|
-
/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1844
|
+
/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Link10, { href: item.path, children: item.label }) }) }),
|
|
1844
1845
|
index < itemsAtEnd.length - 1 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {})
|
|
1845
1846
|
] }, item.path))
|
|
1846
1847
|
] }) });
|
|
@@ -7092,7 +7093,7 @@ function FooterLegalLinks({ legalLinks }) {
|
|
|
7092
7093
|
"aria-label": "Footer",
|
|
7093
7094
|
className: "flex flex-wrap justify-center gap-x-4 gap-y-3 py-4 text-sm lg:justify-start",
|
|
7094
7095
|
children: legalLinks?.map((item) => /* @__PURE__ */ jsx(
|
|
7095
|
-
|
|
7096
|
+
Link10,
|
|
7096
7097
|
{
|
|
7097
7098
|
href: item.href,
|
|
7098
7099
|
className: "text-nsw-grey-600 hover:text-nsw-grey-600 hover:bg-primary-800/10 -m-1 rounded p-1 underline underline-offset-4 hover:decoration-2",
|
|
@@ -7402,7 +7403,7 @@ function Heading({
|
|
|
7402
7403
|
|
|
7403
7404
|
// package.json
|
|
7404
7405
|
var package_default = {
|
|
7405
|
-
version: "1.
|
|
7406
|
+
version: "1.30.0"};
|
|
7406
7407
|
function Logo(props) {
|
|
7407
7408
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7408
7409
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "NSW Government" }),
|
|
@@ -7540,13 +7541,13 @@ function Header2({
|
|
|
7540
7541
|
"header",
|
|
7541
7542
|
{
|
|
7542
7543
|
className: clsx12(
|
|
7543
|
-
"sticky top-0 z-50 flex flex-none flex-wrap items-center justify-between bg-white px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 sm:px-6 lg:px-
|
|
7544
|
+
"sticky top-0 z-50 flex flex-none flex-wrap items-center justify-between bg-white px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 sm:px-6 lg:px-12 dark:shadow-none",
|
|
7544
7545
|
isScrolled ? "dark:bg-slate-900/95 dark:backdrop-blur-sm dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75" : "dark:bg-transparent"
|
|
7545
7546
|
),
|
|
7546
7547
|
children: [
|
|
7547
7548
|
/* @__PURE__ */ jsx("div", { className: "mr-6 flex lg:hidden" }),
|
|
7548
7549
|
/* @__PURE__ */ jsxs("div", { className: "relative flex grow basis-0 items-center", children: [
|
|
7549
|
-
/* @__PURE__ */ jsxs(
|
|
7550
|
+
/* @__PURE__ */ jsxs(Link10, { href: "/", "aria-label": "Home page", className: "flex items-center justify-between", children: [
|
|
7550
7551
|
/* @__PURE__ */ jsx(Logo, { className: "h-12 w-auto lg:h-14" }),
|
|
7551
7552
|
/* @__PURE__ */ jsx(Heading, { level: 2, size: 6, className: "ml-6", children: sitename })
|
|
7552
7553
|
] }),
|
|
@@ -7656,7 +7657,7 @@ ListItem.displayName = "List.Item";
|
|
|
7656
7657
|
var _List = List2;
|
|
7657
7658
|
_List.Item = ListItem;
|
|
7658
7659
|
function Masthead() {
|
|
7659
|
-
return /* @__PURE__ */ jsx("div", { className: "bg-primary-800 h-[var(--masthead-height)] w-full", children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex w-full items-center justify-between px-4 py-2 sm:px-6 lg:px-
|
|
7660
|
+
return /* @__PURE__ */ jsx("div", { className: "bg-primary-800 h-[var(--masthead-height)] w-full", children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex w-full items-center justify-between px-4 py-2 sm:px-6 lg:px-12", children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-x-12", children: /* @__PURE__ */ jsx("p", { className: "text-xs text-white", children: "A NSW Government website" }) }) }) });
|
|
7660
7661
|
}
|
|
7661
7662
|
function Menubar({ className, ...props }) {
|
|
7662
7663
|
return /* @__PURE__ */ jsx(
|
|
@@ -7865,6 +7866,89 @@ function MenubarSubContent({
|
|
|
7865
7866
|
}
|
|
7866
7867
|
);
|
|
7867
7868
|
}
|
|
7869
|
+
function MainNavigation({ navigation }) {
|
|
7870
|
+
return /* @__PURE__ */ jsx("nav", { className: "hidden bg-gray-100 sm:px-6 lg:block lg:px-4", children: /* @__PURE__ */ jsx("div", { className: "relative z-50 mx-auto flex items-center justify-between", children: /* @__PURE__ */ jsx(PopoverGroup, { className: "flex justify-start", children: navigation.map(
|
|
7871
|
+
(item) => item.links ? /* @__PURE__ */ jsx(
|
|
7872
|
+
MegaMenu,
|
|
7873
|
+
{
|
|
7874
|
+
title: item.title,
|
|
7875
|
+
href: item.href !== void 0 ? item.href : "#",
|
|
7876
|
+
links: item.links
|
|
7877
|
+
},
|
|
7878
|
+
item.title
|
|
7879
|
+
) : /* @__PURE__ */ jsx(
|
|
7880
|
+
TopLevel,
|
|
7881
|
+
{
|
|
7882
|
+
title: item.title,
|
|
7883
|
+
href: item.href !== void 0 ? item.href : "#"
|
|
7884
|
+
},
|
|
7885
|
+
item.title
|
|
7886
|
+
)
|
|
7887
|
+
) }) }) });
|
|
7888
|
+
}
|
|
7889
|
+
function TopLevel({ title, href }) {
|
|
7890
|
+
return /* @__PURE__ */ jsx(
|
|
7891
|
+
Link10,
|
|
7892
|
+
{
|
|
7893
|
+
href,
|
|
7894
|
+
className: "text-nsw-grey-900 hover:bg-nsw-grey-900/10 inline-flex items-center gap-x-1 p-4 text-base leading-6 font-bold transition lg:px-8",
|
|
7895
|
+
children: title
|
|
7896
|
+
},
|
|
7897
|
+
title
|
|
7898
|
+
);
|
|
7899
|
+
}
|
|
7900
|
+
function MegaMenu({ title, href, links }) {
|
|
7901
|
+
return /* @__PURE__ */ jsx(Popover$1, { className: "group", children: ({ open }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7902
|
+
/* @__PURE__ */ jsx("div", { className: "m-0 mx-auto", children: /* @__PURE__ */ jsxs(
|
|
7903
|
+
PopoverButton,
|
|
7904
|
+
{
|
|
7905
|
+
className: cn(
|
|
7906
|
+
"text-nsw-grey-900 hover:bg-nsw-grey-900/10 inline-flex items-center gap-x-1 p-4 text-base leading-6 font-bold transition focus:ring-0 focus:ring-offset-0 focus:outline-none lg:px-8",
|
|
7907
|
+
"border-b-2",
|
|
7908
|
+
open ? "border-primary" : "border-transparent"
|
|
7909
|
+
),
|
|
7910
|
+
children: [
|
|
7911
|
+
title,
|
|
7912
|
+
/* @__PURE__ */ jsx(Icons.chevron_down, { className: cn("h-6 w-6 transition", open ? "rotate-180" : "") })
|
|
7913
|
+
]
|
|
7914
|
+
}
|
|
7915
|
+
) }),
|
|
7916
|
+
/* @__PURE__ */ jsx(
|
|
7917
|
+
PopoverPanel,
|
|
7918
|
+
{
|
|
7919
|
+
transition: true,
|
|
7920
|
+
className: "absolute inset-x-0 top-0 -z-10 pt-14 shadow transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[enter]:ease-out data-[leave]:duration-150 data-[leave]:ease-in",
|
|
7921
|
+
children: /* @__PURE__ */ jsxs("div", { className: "mx-auto grid bg-white", children: [
|
|
7922
|
+
/* @__PURE__ */ jsxs(
|
|
7923
|
+
Link10,
|
|
7924
|
+
{
|
|
7925
|
+
href,
|
|
7926
|
+
className: "text-primary flex items-center px-8 py-8 text-xl font-bold hover:bg-gray-50",
|
|
7927
|
+
children: [
|
|
7928
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "absolute inset-0" }),
|
|
7929
|
+
title,
|
|
7930
|
+
/* @__PURE__ */ jsx(Icons.east, { className: "ml-4 h-6 w-6" })
|
|
7931
|
+
]
|
|
7932
|
+
}
|
|
7933
|
+
),
|
|
7934
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 overflow-hidden px-4 pb-12 sm:grid-cols-2 lg:grid-cols-3", children: links?.map((item) => /* @__PURE__ */ jsx(
|
|
7935
|
+
"div",
|
|
7936
|
+
{
|
|
7937
|
+
className: cn(
|
|
7938
|
+
"relative mx-2 border-t bg-white p-4 focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-inset hover:bg-gray-50 [&:nth-last-child(-n+3)]:border-b"
|
|
7939
|
+
),
|
|
7940
|
+
children: /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-gray-900", children: /* @__PURE__ */ jsxs("a", { href: item.href, className: "focus:outline-none", children: [
|
|
7941
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "absolute inset-0" }),
|
|
7942
|
+
item.title
|
|
7943
|
+
] }) })
|
|
7944
|
+
},
|
|
7945
|
+
item.href
|
|
7946
|
+
)) })
|
|
7947
|
+
] })
|
|
7948
|
+
}
|
|
7949
|
+
)
|
|
7950
|
+
] }) });
|
|
7951
|
+
}
|
|
7868
7952
|
function Navigation({
|
|
7869
7953
|
className,
|
|
7870
7954
|
onLinkClick,
|
|
@@ -7879,7 +7963,7 @@ function Navigation({
|
|
|
7879
7963
|
role: "list",
|
|
7880
7964
|
className: "border-nsw-grey-400 dark:border-nsw-grey-200/15 mt-2 flex flex-col gap-2 border-l lg:mt-4",
|
|
7881
7965
|
children: section.links.map((link) => /* @__PURE__ */ jsx("li", { className: "-ml-px flex flex-col items-start gap-2", children: /* @__PURE__ */ jsx(
|
|
7882
|
-
|
|
7966
|
+
Link10,
|
|
7883
7967
|
{
|
|
7884
7968
|
href: link.href,
|
|
7885
7969
|
onClick: onLinkClick,
|
|
@@ -8137,7 +8221,7 @@ function PrevNextLinksPageLink({
|
|
|
8137
8221
|
return /* @__PURE__ */ jsxs("div", { ...props, children: [
|
|
8138
8222
|
/* @__PURE__ */ jsx("dt", { className: "font-display text-sm font-medium text-slate-900 dark:text-white", children: dir === "next" ? "Next" : "Previous" }),
|
|
8139
8223
|
/* @__PURE__ */ jsx("dd", { className: "mt-1", children: /* @__PURE__ */ jsxs(
|
|
8140
|
-
|
|
8224
|
+
Link10,
|
|
8141
8225
|
{
|
|
8142
8226
|
href,
|
|
8143
8227
|
className: clsx12(
|
|
@@ -8460,7 +8544,7 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
|
|
|
8460
8544
|
))
|
|
8461
8545
|
}
|
|
8462
8546
|
) })
|
|
8463
|
-
] }) : /* @__PURE__ */ jsx(
|
|
8547
|
+
] }) : /* @__PURE__ */ jsx(Link10, { href: link.href, onClick: onLinkClick, className: baseLinkClasses, children: link.title }) });
|
|
8464
8548
|
}
|
|
8465
8549
|
var StepIndicator = React6.forwardRef(
|
|
8466
8550
|
({ className, array, onLinkClick, ...props }, ref) => {
|
|
@@ -8478,7 +8562,7 @@ var StepIndicator = React6.forwardRef(
|
|
|
8478
8562
|
}
|
|
8479
8563
|
) : null,
|
|
8480
8564
|
/* @__PURE__ */ jsxs(
|
|
8481
|
-
|
|
8565
|
+
Link10,
|
|
8482
8566
|
{
|
|
8483
8567
|
href: step.href,
|
|
8484
8568
|
className: "group relative flex items-center",
|
|
@@ -8507,7 +8591,7 @@ var StepIndicator = React6.forwardRef(
|
|
|
8507
8591
|
}
|
|
8508
8592
|
) : null,
|
|
8509
8593
|
/* @__PURE__ */ jsxs(
|
|
8510
|
-
|
|
8594
|
+
Link10,
|
|
8511
8595
|
{
|
|
8512
8596
|
href: step.href,
|
|
8513
8597
|
"aria-current": "step",
|
|
@@ -8531,7 +8615,7 @@ var StepIndicator = React6.forwardRef(
|
|
|
8531
8615
|
}
|
|
8532
8616
|
) : null,
|
|
8533
8617
|
/* @__PURE__ */ jsxs(
|
|
8534
|
-
|
|
8618
|
+
Link10,
|
|
8535
8619
|
{
|
|
8536
8620
|
href: step.href,
|
|
8537
8621
|
className: "group relative flex items-center",
|
|
@@ -8554,7 +8638,7 @@ var StepIndicator = React6.forwardRef(
|
|
|
8554
8638
|
}
|
|
8555
8639
|
) : null,
|
|
8556
8640
|
/* @__PURE__ */ jsxs(
|
|
8557
|
-
|
|
8641
|
+
Link10,
|
|
8558
8642
|
{
|
|
8559
8643
|
href: step.href,
|
|
8560
8644
|
className: "group relative flex items-center",
|
|
@@ -8577,7 +8661,7 @@ var StepIndicator = React6.forwardRef(
|
|
|
8577
8661
|
}
|
|
8578
8662
|
) : null,
|
|
8579
8663
|
/* @__PURE__ */ jsxs(
|
|
8580
|
-
|
|
8664
|
+
Link10,
|
|
8581
8665
|
{
|
|
8582
8666
|
href: step.href,
|
|
8583
8667
|
className: "group relative flex items-center",
|
|
@@ -8600,7 +8684,7 @@ var StepIndicator = React6.forwardRef(
|
|
|
8600
8684
|
}
|
|
8601
8685
|
) : null,
|
|
8602
8686
|
/* @__PURE__ */ jsxs(
|
|
8603
|
-
|
|
8687
|
+
Link10,
|
|
8604
8688
|
{
|
|
8605
8689
|
href: step.href,
|
|
8606
8690
|
className: "group relative flex items-center",
|
|
@@ -8623,7 +8707,7 @@ var StepIndicator = React6.forwardRef(
|
|
|
8623
8707
|
}
|
|
8624
8708
|
) : null,
|
|
8625
8709
|
/* @__PURE__ */ jsxs(
|
|
8626
|
-
|
|
8710
|
+
Link10,
|
|
8627
8711
|
{
|
|
8628
8712
|
href: step.href,
|
|
8629
8713
|
className: "group relative flex items-center",
|
|
@@ -8646,7 +8730,7 @@ var StepIndicator = React6.forwardRef(
|
|
|
8646
8730
|
}
|
|
8647
8731
|
) : null,
|
|
8648
8732
|
/* @__PURE__ */ jsxs(
|
|
8649
|
-
|
|
8733
|
+
Link10,
|
|
8650
8734
|
{
|
|
8651
8735
|
href: step.href,
|
|
8652
8736
|
className: "group relative flex items-center",
|
|
@@ -8669,7 +8753,7 @@ var StepIndicator = React6.forwardRef(
|
|
|
8669
8753
|
}
|
|
8670
8754
|
) : null,
|
|
8671
8755
|
/* @__PURE__ */ jsxs(
|
|
8672
|
-
|
|
8756
|
+
Link10,
|
|
8673
8757
|
{
|
|
8674
8758
|
href: step.href,
|
|
8675
8759
|
className: "group relative flex items-center",
|
|
@@ -9004,7 +9088,7 @@ function TableOfContents({ tableOfContents }) {
|
|
|
9004
9088
|
),
|
|
9005
9089
|
/* @__PURE__ */ jsx("ol", { role: "list", className: "mt-4 space-y-3 text-sm", children: tableOfContents.map((section) => /* @__PURE__ */ jsxs("li", { children: [
|
|
9006
9090
|
/* @__PURE__ */ jsx("h3", { children: /* @__PURE__ */ jsx(
|
|
9007
|
-
|
|
9091
|
+
Link10,
|
|
9008
9092
|
{
|
|
9009
9093
|
href: `#${section.id}`,
|
|
9010
9094
|
className: clsx12(
|
|
@@ -9019,7 +9103,7 @@ function TableOfContents({ tableOfContents }) {
|
|
|
9019
9103
|
role: "list",
|
|
9020
9104
|
className: "mt-2 space-y-3 pl-5 text-slate-500 dark:text-slate-400",
|
|
9021
9105
|
children: section.children.map((subSection) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
9022
|
-
|
|
9106
|
+
Link10,
|
|
9023
9107
|
{
|
|
9024
9108
|
href: `#${subSection.id}`,
|
|
9025
9109
|
className: isActive(subSection) ? "text-primary-750 font-semibold" : "hover:text-slate-600 dark:hover:text-slate-300",
|
|
@@ -9341,14 +9425,54 @@ var TocContext = createContext({
|
|
|
9341
9425
|
function TocProvider({ children }) {
|
|
9342
9426
|
const [toc, setToc] = useState(true);
|
|
9343
9427
|
const pathname = usePathname();
|
|
9428
|
+
const isInitialMount = useRef(true);
|
|
9429
|
+
const tocExplicitlySet = useRef(false);
|
|
9344
9430
|
useEffect(() => {
|
|
9431
|
+
if (isInitialMount.current) {
|
|
9432
|
+
isInitialMount.current = false;
|
|
9433
|
+
return;
|
|
9434
|
+
}
|
|
9435
|
+
tocExplicitlySet.current = false;
|
|
9345
9436
|
setToc(true);
|
|
9346
9437
|
}, [pathname]);
|
|
9347
|
-
|
|
9438
|
+
const handleSetToc = (value) => {
|
|
9439
|
+
tocExplicitlySet.current = true;
|
|
9440
|
+
setToc(value);
|
|
9441
|
+
};
|
|
9442
|
+
return /* @__PURE__ */ jsx(TocContext.Provider, { value: { toc, setToc: handleSetToc }, children });
|
|
9348
9443
|
}
|
|
9349
9444
|
function useToc() {
|
|
9350
9445
|
return useContext(TocContext);
|
|
9351
9446
|
}
|
|
9447
|
+
var MOBILE_BREAKPOINT = 768;
|
|
9448
|
+
function useIsMobile() {
|
|
9449
|
+
const [isMobile, setIsMobile] = React6.useState(void 0);
|
|
9450
|
+
React6.useEffect(() => {
|
|
9451
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
9452
|
+
const onChange = () => {
|
|
9453
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
9454
|
+
};
|
|
9455
|
+
mql.addEventListener("change", onChange);
|
|
9456
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
9457
|
+
return () => mql.removeEventListener("change", onChange);
|
|
9458
|
+
}, []);
|
|
9459
|
+
return !!isMobile;
|
|
9460
|
+
}
|
|
9461
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
9462
|
+
function useDisableToc() {
|
|
9463
|
+
const { setToc } = useToc();
|
|
9464
|
+
useIsomorphicLayoutEffect(() => {
|
|
9465
|
+
setToc(false);
|
|
9466
|
+
}, [setToc]);
|
|
9467
|
+
useEffect(() => {
|
|
9468
|
+
const raf = requestAnimationFrame(() => {
|
|
9469
|
+
setToc(false);
|
|
9470
|
+
});
|
|
9471
|
+
return () => {
|
|
9472
|
+
cancelAnimationFrame(raf);
|
|
9473
|
+
};
|
|
9474
|
+
}, [setToc]);
|
|
9475
|
+
}
|
|
9352
9476
|
function getNodeText(node) {
|
|
9353
9477
|
let text = "";
|
|
9354
9478
|
for (const child of node.children ?? []) {
|
|
@@ -9461,6 +9585,6 @@ var languages = [
|
|
|
9461
9585
|
"html"
|
|
9462
9586
|
];
|
|
9463
9587
|
|
|
9464
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button2 as Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, CodeDemo, CodeHighlight, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorCard, ColorSwatches, ColourScale, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatToggle, GenerateInterpolatedColors, Header2 as Header, Heading, Icons, Input, Label3 as Label, Link, _List as List, Logo, Masthead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator4 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, SidebarNavigation, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, Tabs2 as Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, Textarea, ThemeColorPalette, ThemeProvider, ThemeSelector, ThemeSwitcher, Toaster, TocContext, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TouchTarget, ViewToggle, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useFormField, useToc };
|
|
9588
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button2 as Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, CodeDemo, CodeHighlight, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorCard, ColorSwatches, ColourScale, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatToggle, GenerateInterpolatedColors, Header2 as Header, Heading, Icons, Input, Label3 as Label, Link, _List as List, Logo, MainNavigation, Masthead, MegaMenu, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator4 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, SidebarNavigation, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, Tabs2 as Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, Textarea, ThemeColorPalette, ThemeProvider, ThemeSelector, ThemeSwitcher, Toaster, TocContext, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopLevel, TouchTarget, ViewToggle, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useDisableToc, useFormField, useIsMobile, useToc };
|
|
9465
9589
|
//# sourceMappingURL=index.js.map
|
|
9466
9590
|
//# sourceMappingURL=index.js.map
|