uikit-react-public 0.43.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.
- package/dist/components/Accordion/Accordion.d.ts +1 -0
- package/dist/components/Menu/Menu.d.ts +26 -7
- package/dist/components/Menu/index.d.ts +7 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/index.js +4704 -4607
- package/lib/components/Accordion/Accordion.Heading.tsx +2 -5
- package/lib/components/Accordion/Accordion.tsx +15 -2
- package/lib/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap +2 -2
- package/lib/components/Menu/Menu.tsx +165 -9
- package/lib/components/Menu/index.ts +7 -0
- package/lib/components/MenuNew/ActionMenuButton.tsx +1 -1
- package/lib/components/index.ts +4 -0
- package/package.json +1 -1
|
@@ -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
|
|
3
|
-
import { default as
|
|
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
|
|
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
|
|
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
|
|
17
|
-
declare const
|
|
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';
|
|
@@ -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';
|