@candy.thieves/ui-kit-lumos 0.0.34 → 0.0.36

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.
@@ -0,0 +1,23 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';
3
+ export type ActionMenuItem = {
4
+ disabled?: boolean;
5
+ icon?: ReactNode;
6
+ id: string;
7
+ itemProps?: Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item>, 'children' | 'disabled' | 'onSelect' | 'textValue'>;
8
+ label: ReactNode;
9
+ onSelect?: () => void;
10
+ textValue?: string;
11
+ };
12
+ export type ActionMenuProps = Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>, 'children'> & {
13
+ ariaLabel: string;
14
+ className?: string;
15
+ contentClassName?: string;
16
+ contentProps?: Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>, 'children'>;
17
+ itemClassName?: string;
18
+ items: ActionMenuItem[];
19
+ portalProps?: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>;
20
+ trigger?: ReactNode;
21
+ triggerClassName?: string;
22
+ };
23
+ export declare const ActionMenu: ({ ariaLabel, className, contentClassName, contentProps, itemClassName, items, modal, portalProps, trigger, triggerClassName, ...props }: ActionMenuProps) => import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ActionMenu } from './ActionMenu';
2
+ export type { ActionMenuItem, ActionMenuProps } from './ActionMenu';
@@ -1,5 +1,6 @@
1
1
  import type { ComponentPropsWithoutRef } from 'react';
2
2
  import type { HeaderLanguage, HeaderLanguageOption } from '@/types';
3
+ import { type ActionMenuItem } from '@/components/ActionMenu';
3
4
  export type HeaderProps = {
4
5
  brandName?: string;
5
6
  defaultLanguage?: HeaderLanguage;
@@ -7,6 +8,7 @@ export type HeaderProps = {
7
8
  language?: HeaderLanguage;
8
9
  languageOptions?: HeaderLanguageOption[];
9
10
  logInLabel?: string;
11
+ mobileAuthenticatedMenuItems?: ActionMenuItem[];
10
12
  mobileMenuLabel?: string;
11
13
  notificationCount?: number;
12
14
  notificationLabel?: string;
@@ -16,4 +18,4 @@ export type HeaderProps = {
16
18
  onSignUpClick?: () => void;
17
19
  signUpLabel?: string;
18
20
  } & Omit<ComponentPropsWithoutRef<'header'>, 'children'>;
19
- export declare const Header: ({ brandName, className, defaultLanguage, isAuthenticated, language, languageOptions, logInLabel, mobileMenuLabel, notificationCount, notificationLabel, onLanguageChange, onLogInClick, onNotificationClick, onSignUpClick, signUpLabel, ...props }: HeaderProps) => import("react").JSX.Element;
21
+ export declare const Header: ({ brandName, className, defaultLanguage, isAuthenticated, language, languageOptions, logInLabel, mobileAuthenticatedMenuItems, mobileMenuLabel, notificationCount, notificationLabel, onLanguageChange, onLogInClick, onNotificationClick, onSignUpClick, signUpLabel, ...props }: HeaderProps) => import("react").JSX.Element;
@@ -2,17 +2,18 @@ import type { ReactNode } from 'react';
2
2
  export type SidebarItem = {
3
3
  activeIcon?: ReactNode;
4
4
  disabled?: boolean;
5
- href?: string;
5
+ href?: ((userId: string) => string) | string;
6
6
  icon: ReactNode;
7
7
  id: string;
8
8
  label: string;
9
9
  };
10
10
  type SidebarProps = {
11
+ userId?: string;
11
12
  activeId: string;
12
13
  items: SidebarItem[];
13
14
  logOutIcon: ReactNode;
14
15
  onLogout: () => void;
15
16
  onValueChange?: (id: string) => void;
16
17
  };
17
- export declare const Sidebar: ({ items, activeId, onValueChange, onLogout, logOutIcon }: SidebarProps) => import("react").JSX.Element;
18
+ export declare const Sidebar: ({ items, userId, activeId, onValueChange, onLogout, logOutIcon, }: SidebarProps) => import("react").JSX.Element;
18
19
  export {};
@@ -1,4 +1,5 @@
1
1
  export * from './Alert';
2
+ export * from './ActionMenu';
2
3
  export * from './AudioPlayer';
3
4
  export * from './Avatar';
4
5
  export * from './Button';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@candy.thieves/ui-kit-lumos",
3
3
  "private": false,
4
- "version": "0.0.34",
4
+ "version": "0.0.36",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",