@nusameta/design-system 1.0.0-beta.3 → 1.0.0-beta.4
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/menu/Menu.d.ts +24 -0
- package/dist/components/menu/Menu.stories.d.ts +17 -0
- package/dist/index.cjs.js +26 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +5519 -4525
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Header as AriaHeader, Keyboard as AriaKeyboard, MenuItemProps as AriaMenuItemProps, MenuProps as AriaMenuProps, MenuTrigger as AriaMenuTrigger, MenuTriggerProps as AriaMenuTriggerProps, SeparatorProps as AriaSeparatorProps, PopoverProps } from 'react-aria-components';
|
|
3
|
+
import { buttonVariants } from '../button/Button';
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
declare const MenuTrigger: typeof AriaMenuTrigger;
|
|
6
|
+
declare const MenuSubTrigger: (props: import('react-aria-components').SubmenuTriggerProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
7
|
+
declare const MenuSection: <T extends object>(props: import('react-aria-components').SectionProps<T> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
8
|
+
declare const MenuCollection: typeof import('react-aria-components').Collection;
|
|
9
|
+
declare function MenuPopover({ className, ...props }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const Menu: <T extends object>({ className, ...props }: AriaMenuProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const MenuItem: ({ children, className, ...props }: AriaMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
interface MenuHeaderProps extends React.ComponentProps<typeof AriaHeader> {
|
|
13
|
+
inset?: boolean;
|
|
14
|
+
separator?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const MenuHeader: ({ className, inset, separator, ...props }: MenuHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const MenuSeparator: ({ className, ...props }: AriaSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const MenuKeyboard: ({ className, ...props }: React.ComponentProps<typeof AriaKeyboard>) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
interface MenuWrapperProps<T> extends AriaMenuProps<T>, VariantProps<typeof buttonVariants>, Omit<AriaMenuTriggerProps, "children"> {
|
|
20
|
+
label?: string;
|
|
21
|
+
}
|
|
22
|
+
declare function MenuWrapper<T extends object>({ label, children, variant, size, ...props }: MenuWrapperProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { MenuTrigger, Menu, MenuPopover, MenuItem, MenuHeader, MenuSeparator, MenuKeyboard, MenuSection, MenuSubTrigger, MenuCollection, MenuWrapper, };
|
|
24
|
+
export type { MenuHeaderProps, MenuWrapperProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Menu } from './Menu';
|
|
3
|
+
declare const meta: Meta<typeof Menu>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Menu>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithIcons: Story;
|
|
8
|
+
export declare const WithSections: Story;
|
|
9
|
+
export declare const WithSubmenu: Story;
|
|
10
|
+
export declare const WithSelectionSingle: Story;
|
|
11
|
+
export declare const WithSelectionMultiple: Story;
|
|
12
|
+
export declare const WithDisabledItems: Story;
|
|
13
|
+
export declare const MenuWrapperExample: Story;
|
|
14
|
+
export declare const MenuWrapperVariants: Story;
|
|
15
|
+
export declare const WithCollection: Story;
|
|
16
|
+
export declare const ContextMenu: Story;
|
|
17
|
+
export declare const LongMenu: Story;
|