uikit-react-public 0.42.0 → 0.43.1

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.
@@ -20,6 +20,7 @@ export interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
20
20
  size?: AccordionSize;
21
21
  disabled?: boolean;
22
22
  isOpen?: boolean;
23
+ variant?: 'no-background' | 'on-background';
23
24
  }
24
25
  declare const Accordion: React.FC<AccordionProps> & {
25
26
  Heading: typeof AccordionHeading;
@@ -1,18 +1,37 @@
1
- import { HTMLAttributes } from 'react';
2
- import { default as MenuItem } from './MenuItem';
3
- import { default as MenuSection } from './MenuSection';
1
+ import { HTMLAttributes, NamedExoticComponent, ReactNode } from 'react';
2
+ import { default as MenuNew, MenuBaseItemProps, MenuDividerProps, MenuHeadProps, MenuHeadingProps, MenuProps as MenuNewProps, MenuSectionProps as MenuNewSectionProps, PrimaryMenuItemProps, SecondaryMenuItemProps, ActionMenuButtonProps, MenuAccordionItemProps, MenuAccordionProps } from '../MenuNew';
3
+ import { default as MenuItem, MenuItemProps } from './MenuItem';
4
+ import { default as MenuSection, MenuSectionProps } from './MenuSection';
4
5
  export declare const NAME = "ucl-uikit-menu";
5
- export interface MenuProps extends HTMLAttributes<HTMLDivElement> {
6
+ export interface LegacyMenuProps extends HTMLAttributes<HTMLDivElement> {
6
7
  defaultOpen?: boolean;
7
8
  title?: string;
8
9
  menuId?: string;
9
10
  testId?: string;
10
11
  position?: 'left' | 'right';
11
12
  }
12
- export interface IMenuSubComponents {
13
+ export type MenuProps = Omit<MenuNewProps, 'children'> & Pick<LegacyMenuProps, 'defaultOpen' | 'title' | 'menuId' | 'position'> & {
14
+ children?: ReactNode;
15
+ };
16
+ export type { MenuDividerProps, MenuHeadProps, MenuHeadingProps, MenuNewSectionProps, MenuAccordionProps, MenuAccordionItemProps, MenuBaseItemProps, PrimaryMenuItemProps, SecondaryMenuItemProps, ActionMenuButtonProps, };
17
+ export interface LegacyMenuComponent extends NamedExoticComponent<LegacyMenuProps> {
13
18
  Section: typeof MenuSection;
14
19
  Item: typeof MenuItem;
15
20
  }
16
- declare const MemoMenu: import('react').MemoExoticComponent<({ defaultOpen, title, position, menuId, testId, children, className, ...props }: MenuProps) => import("react").JSX.Element>;
17
- declare const MenuWithSubComponents: typeof MemoMenu & IMenuSubComponents;
21
+ export declare const LegacyMenu: LegacyMenuComponent;
22
+ declare const MenuSectionBridge: (props: MenuSectionProps | MenuNewSectionProps) => import("react").JSX.Element;
23
+ declare const MenuItemBridge: ({ secondary, externalLink, trailingContent, ...props }: MenuItemProps & PrimaryMenuItemProps & SecondaryMenuItemProps) => import("react").JSX.Element;
24
+ interface MenuComponent extends NamedExoticComponent<MenuProps> {
25
+ Section: typeof MenuSectionBridge;
26
+ Item: typeof MenuItemBridge;
27
+ Head: typeof MenuNew.Head;
28
+ Heading: typeof MenuNew.Heading;
29
+ Accordion: typeof MenuNew.Accordion;
30
+ Divider: typeof MenuNew.Divider;
31
+ BaseItem: typeof MenuNew.BaseItem;
32
+ PrimaryItem: typeof MenuNew.PrimaryItem;
33
+ SecondaryItem: typeof MenuNew.SecondaryItem;
34
+ ActionButton: typeof MenuNew.ActionButton;
35
+ }
36
+ declare const MenuWithSubComponents: MenuComponent;
18
37
  export default MenuWithSubComponents;
@@ -1,6 +1,13 @@
1
1
  export { default } from './Menu';
2
+ export { LegacyMenu } from './Menu';
2
3
  export type { MenuProps } from './Menu';
4
+ /** @deprecated Use MenuProps instead. LegacyMenuProps only supports the default theme. */
5
+ export type { LegacyMenuProps } from './Menu';
6
+ /** @deprecated Use Menu.PrimaryItem/Menu.SecondaryItem from the package root instead. */
3
7
  export { default as MenuTrigger } from './MenuTrigger';
8
+ /** @deprecated Use MenuNew component props from the package root instead. */
4
9
  export type { MenuTriggerProps } from './MenuTrigger';
10
+ /** @deprecated Use Menu.Head/Menu.Section from the package root instead. */
5
11
  export { default as MenuContent } from './MenuContent';
12
+ /** @deprecated Use MenuNew component props from the package root instead. */
6
13
  export type { MenuContentProps } from './MenuContent';
@@ -0,0 +1,8 @@
1
+ import { AnchorHTMLAttributes, Ref } from 'react';
2
+ export declare const NAME = "ucl-uikit-skip-to-content";
3
+ export interface SkipToContentProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
4
+ testId?: string;
5
+ ref?: Ref<HTMLAnchorElement>;
6
+ }
7
+ declare const _default: import('react').MemoExoticComponent<({ href, testId, className, children, ref, ...props }: SkipToContentProps) => import("react").JSX.Element>;
8
+ export default _default;
@@ -0,0 +1,36 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').MemoExoticComponent<({ href, testId, className, children, ref, ...props }: import('./SkipToContent').SkipToContentProps) => import("react").JSX.Element>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ argTypes: {
9
+ href: {
10
+ control: {
11
+ type: "text";
12
+ };
13
+ };
14
+ children: {
15
+ control: {
16
+ type: "text";
17
+ };
18
+ };
19
+ testId: {
20
+ control: {
21
+ type: "text";
22
+ };
23
+ };
24
+ className: {
25
+ control: false;
26
+ };
27
+ };
28
+ args: {
29
+ href: string;
30
+ children: string;
31
+ };
32
+ tags: string[];
33
+ };
34
+ export default meta;
35
+ type Story = StoryObj<typeof meta>;
36
+ export declare const Default: Story;
@@ -0,0 +1,2 @@
1
+ export { default } from './SkipToContent';
2
+ export type { SkipToContentProps } from './SkipToContent';
@@ -69,6 +69,9 @@ export { default as AppMenu } from './AppMenu';
69
69
  export type { AppMenuProps } from './AppMenu';
70
70
  export { default as Menu } from './Menu';
71
71
  export type { MenuProps } from './Menu';
72
+ /** @deprecated Use Menu instead. MenuLegacy only supports the default theme. */
73
+ export { LegacyMenu as MenuLegacy } from './Menu';
74
+ export type { LegacyMenuProps as MenuLegacyProps } from './Menu';
72
75
  export { default as MenuNew } from './MenuNew';
73
76
  export type { MenuProps as MenuNewProps } from './MenuNew';
74
77
  export { default as Select } from './Select';
@@ -121,6 +124,8 @@ export { default as CookieNotice } from './CookieNotice';
121
124
  export type { CookieNoticeProps } from './CookieNotice';
122
125
  export { default as Search } from './Search';
123
126
  export type { SearchProps } from './Search';
127
+ export { default as SkipToContent } from './SkipToContent';
128
+ export type { SkipToContentProps } from './SkipToContent';
124
129
  export { default as Dropdown } from './Dropdown';
125
130
  export type { DropdownProps, DropdownTriggerProps, DropdownContentProps, } from './Dropdown';
126
131
  export { default as DropdownMenu } from './DropdownMenu';