laif-ds 0.2.91 → 1.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/dist/index.d.ts CHANGED
@@ -146,6 +146,32 @@ declare const alertVariants: (props?: ({
146
146
 
147
147
  declare type Animation_2 = VariantProps<typeof chatBubbleVariants>["animation"];
148
148
 
149
+ export declare function AppBottomNav({ items, showMenu, menuLabel, ariaLabel, menuIconName, linkComponent: LinkComponent, linkProps, className, ...props }: AppBottomNavProps): JSX.Element | null;
150
+
151
+ export declare interface AppBottomNavProps extends Omit<React_2.ComponentProps<"div">, "children"> {
152
+ /** Already filtered, sorted and route-matched by the consuming app. */
153
+ items: BottomNavItem[];
154
+ /**
155
+ * `false` drops the Menu cell and spends the slot it frees on a sixth
156
+ * destination — the bar is six cells wide either way.
157
+ *
158
+ * Only for an app that opens the mobile panel somewhere else, typically a
159
+ * `SidebarTrigger` in its own header: with no Menu cell and no item carrying
160
+ * `subItems`, nothing in the bar reaches `AppSidebar`'s mobile panel any
161
+ * more. Turning it off is a claim that the app provides that way itself, so
162
+ * it is not warned about — the component cannot see the header.
163
+ */
164
+ showMenu?: boolean;
165
+ menuLabel?: string;
166
+ ariaLabel?: string;
167
+ menuIconName?: IconName;
168
+ linkComponent?: React_2.ComponentType<React_2.AnchorHTMLAttributes<HTMLAnchorElement> & {
169
+ href: string;
170
+ }>;
171
+ linkProps?: Record<string, unknown>;
172
+ className?: string;
173
+ }
174
+
149
175
  export declare function AppCard({ header, title, description, body, actions, footer, variant, size, isLoading, showHeaderBorder, showFooterBorder, className, headerClassName, bodyClassName, footerClassName, children, ...props }: Readonly<AppCardProps>): JSX.Element;
150
176
 
151
177
  export declare interface AppCardProps extends Omit<React_2.ComponentProps<"div">, "title"> {
@@ -563,11 +589,19 @@ export declare interface AppSelectOption {
563
589
 
564
590
  export declare type AppSelectProps = SingleSelectProps | MultiSelectProps;
565
591
 
566
- export declare function AppSidebar({ navigation, navigationFooter, headerContent, footerContent, showRail, collapsible, linkComponent: LinkComponent, linkProps, ...props }: AppSidebarProps): JSX.Element;
592
+ export declare function AppSidebar({ navigation, navigationFooter, navigationDisplay, headerContent, footerContent, showRail, collapsible, linkComponent: LinkComponent, linkProps, ...props }: AppSidebarProps): JSX.Element;
593
+
594
+ /**
595
+ * How the `navigation` groups are laid out. `"list"` stacks every group under
596
+ * its own label; `"tab"` turns the groups into a tab bar and shows one at a
597
+ * time. `navigationFooter` is never tabbed.
598
+ */
599
+ export declare type AppSidebarNavigationDisplay = "list" | "tab";
567
600
 
568
601
  declare interface AppSidebarProps extends React_2.ComponentProps<typeof Sidebar> {
569
602
  navigation: NavGroup[];
570
603
  navigationFooter?: NavGroup[];
604
+ navigationDisplay?: AppSidebarNavigationDisplay;
571
605
  versions?: string[];
572
606
  defaultVersion?: string;
573
607
  headerContent?: React_2.ReactNode;
@@ -832,6 +866,33 @@ declare type BaseProps = {
832
866
  "data-testid"?: string;
833
867
  };
834
868
 
869
+ export declare interface BottomNavItem {
870
+ /**
871
+ * Must equal the sidebar `NavItem.title` of the same destination: it is what
872
+ * resolves the drill target when the cell opens the mobile menu. Both lists
873
+ * come from the same app-side source, so this is a naming discipline, not a
874
+ * lookup the app has to maintain.
875
+ */
876
+ title: string;
877
+ /** Ignored when the item has `subItems`: the cell opens the menu instead. */
878
+ url: string;
879
+ /**
880
+ * Required, with no fallback — but not because the glyph carries recognition
881
+ * on its own any more: at 16px it reads level with its label, not above it
882
+ * (the trade is argued on `renderCellInner`). What keeps it mandatory is the
883
+ * row: a cell missing its icon breaks the rhythm of the other five and reads
884
+ * as a failed image, and there is no room here for the initial-letter
885
+ * fallback the desktop sidebar uses in icon mode.
886
+ */
887
+ iconName: IconName;
888
+ /** Leaf-level only — the subtree state is derived from `subItems`. */
889
+ isActive?: boolean;
890
+ /** Presence (not length) is what makes the cell open the menu at this level. */
891
+ subItems?: NavSubItem[];
892
+ /** Only when the spoken name must differ; it must still contain the label. */
893
+ ariaLabel?: string;
894
+ }
895
+
835
896
  export declare function Breadcrumb({ ...props }: React_2.ComponentProps<"nav">): JSX.Element;
836
897
 
837
898
  export declare function BreadcrumbEllipsis({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
@@ -2640,8 +2701,27 @@ export declare interface NavGroup {
2640
2701
  title: string;
2641
2702
  url?: string;
2642
2703
  items: NavItem[];
2704
+ /** Only read in `navigationDisplay="tab"`, where it is the tab's icon. */
2705
+ iconName?: IconName;
2706
+ /**
2707
+ * Only read in `navigationDisplay="tab"`. Escape hatch from lucide, taking
2708
+ * precedence over `iconName`.
2709
+ */
2710
+ icon?: NavIcon;
2643
2711
  }
2644
2712
 
2713
+ /**
2714
+ * A third-party or custom icon: any component accepting `className`. The
2715
+ * sidebar renders the same icon at more than one size (20px in a row, 16px in a
2716
+ * collapsed dropdown, and whatever the tab bar imposes), so it passes a size
2717
+ * *class* instead of a `size` prop — `className` is the one contract every icon
2718
+ * library honours, and a CSS width/height overrides the `width`/`height`
2719
+ * attributes libraries like react-icons put on their `<svg>`.
2720
+ */
2721
+ export declare type NavIcon = React_2.ComponentType<{
2722
+ className?: string;
2723
+ }>;
2724
+
2645
2725
  export declare function NavigationMenu({ className, children, viewport, ...props }: React_2.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
2646
2726
  viewport?: boolean;
2647
2727
  }): JSX.Element;
@@ -2666,6 +2746,8 @@ export declare interface NavItem {
2666
2746
  url: string;
2667
2747
  isActive?: boolean;
2668
2748
  iconName?: IconName;
2749
+ /** Escape hatch from lucide. Takes precedence over `iconName`. */
2750
+ icon?: NavIcon;
2669
2751
  subItems?: NavSubItem[];
2670
2752
  }
2671
2753
 
@@ -2674,6 +2756,8 @@ export declare interface NavSubItem {
2674
2756
  url: string;
2675
2757
  isActive?: boolean;
2676
2758
  iconName?: IconName;
2759
+ /** Escape hatch from lucide. Takes precedence over `iconName`. */
2760
+ icon?: NavIcon;
2677
2761
  }
2678
2762
 
2679
2763
  declare type NoRepeatDataType = {
@@ -2965,6 +3049,13 @@ declare type SidebarContextProps = {
2965
3049
  setOpen: (open: boolean) => void;
2966
3050
  openMobile: boolean;
2967
3051
  setOpenMobile: (open: boolean) => void;
3052
+ /**
3053
+ * `NavItem.title` the mobile panel must open already drilled into — set by
3054
+ * whatever opens the sheet (`AppBottomNav`) right before `setOpenMobile`, and
3055
+ * read once, at mount, by `AppSidebarMobile`. `null` means level 0.
3056
+ */
3057
+ mobileNavTarget: string | null;
3058
+ setMobileNavTarget: (target: string | null) => void;
2968
3059
  isMobile: boolean;
2969
3060
  toggleSidebar: () => void;
2970
3061
  };