@nurihaus/web-design-system 1.3.16 → 1.4.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.
@@ -0,0 +1,10 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { DropDownContentProps, DropDownItemProps, DropDownRootProps, DropDownTriggerProps, DropDownValueProps } from './drop-down-type';
3
+ declare const DropDownRoot: {
4
+ (props: PropsWithChildren<DropDownRootProps>): import("react/jsx-runtime").JSX.Element;
5
+ Trigger: (props: PropsWithChildren<DropDownTriggerProps>) => import("react/jsx-runtime").JSX.Element;
6
+ Value: import("react").ForwardRefExoticComponent<DropDownValueProps & import("react").RefAttributes<HTMLSpanElement>>;
7
+ Content: (props: PropsWithChildren<DropDownContentProps>) => import("react/jsx-runtime").JSX.Element;
8
+ Item: (props: PropsWithChildren<DropDownItemProps>) => import("react/jsx-runtime").JSX.Element;
9
+ };
10
+ export default DropDownRoot;
@@ -0,0 +1,14 @@
1
+ export declare const size: readonly ["m", "l"];
2
+ export declare const dropDownSingleProps: {
3
+ size: {
4
+ type: "className";
5
+ className: string;
6
+ values: readonly ["m", "l"];
7
+ default: "m";
8
+ };
9
+ width: {
10
+ type: "css";
11
+ key: "width";
12
+ default: string;
13
+ };
14
+ };
@@ -0,0 +1,35 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export interface DropDownRootProps {
3
+ defaultOpen?: boolean;
4
+ open?: boolean;
5
+ onOpenChange?: (open: boolean) => void;
6
+ defaultValue?: string;
7
+ value?: string;
8
+ onValueChange?: (value: string) => void;
9
+ disabled?: boolean;
10
+ }
11
+ export interface DropDownTriggerProps {
12
+ asChild?: boolean;
13
+ className?: string;
14
+ style?: CSSProperties;
15
+ }
16
+ export interface DropDownValueProps {
17
+ asChild?: boolean;
18
+ defaultValue?: string;
19
+ className?: string;
20
+ placeholder?: string;
21
+ renderedValue?: ReactNode;
22
+ }
23
+ export interface DropDownContentProps {
24
+ asChild?: boolean;
25
+ className?: string;
26
+ direction?: 'top' | 'bottom' | 'left' | 'right';
27
+ style?: CSSProperties;
28
+ }
29
+ export interface DropDownItemProps {
30
+ asChild?: boolean;
31
+ className?: string;
32
+ value: string;
33
+ disabled?: boolean;
34
+ onClick?: () => void;
35
+ }
@@ -0,0 +1,26 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { size } from './drop-down-props';
3
+ export interface DropDownProps {
4
+ size?: typeof size;
5
+ defaultValue?: string;
6
+ value?: string;
7
+ onValueChange?: (value: string) => void;
8
+ renderValue?: (value?: string) => ReactNode;
9
+ options: {
10
+ label: ReactNode;
11
+ value: string;
12
+ disabled?: boolean;
13
+ }[];
14
+ renderOption?: () => ReactNode;
15
+ placeholder?: string;
16
+ disabled?: boolean;
17
+ defaultOpen?: boolean;
18
+ open?: boolean;
19
+ onOpenChange?: (open: boolean) => void;
20
+ icon?: ReactNode;
21
+ width?: string;
22
+ style?: CSSProperties;
23
+ className?: string;
24
+ }
25
+ declare const DropDown: import("react").ForwardRefExoticComponent<DropDownProps & import("react").RefAttributes<HTMLDivElement>>;
26
+ export default DropDown;
@@ -0,0 +1,9 @@
1
+ import { StoryObj } from '@storybook/react/*';
2
+ import DropDown from './drop-down';
3
+ declare const meta: {
4
+ title: string;
5
+ component: import("react").ForwardRefExoticComponent<import("./drop-down").DropDownProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ };
7
+ export default meta;
8
+ type Story = StoryObj<typeof DropDown>;
9
+ export declare const Default: Story;