ingred-ui 19.2.2 → 19.3.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.
- package/README.md +2 -0
- package/dist/components/ContextMenu2/ContextMenu2.d.ts +45 -0
- package/dist/components/ContextMenu2/ContextMenu2.stories.d.ts +32 -0
- package/dist/components/ContextMenu2/ContextMenu2ButtonControlsItem.d.ts +10 -0
- package/dist/components/ContextMenu2/ContextMenu2ButtonItem.d.ts +9 -0
- package/dist/components/ContextMenu2/ContextMenu2CheckItem.d.ts +12 -0
- package/dist/components/ContextMenu2/ContextMenu2HeadingItem.d.ts +2 -0
- package/dist/components/ContextMenu2/ContextMenu2HelpTextItem.d.ts +8 -0
- package/dist/components/ContextMenu2/ContextMenu2SeparatorItem.d.ts +2 -0
- package/dist/components/ContextMenu2/ContextMenu2SwitchItem.d.ts +11 -0
- package/dist/components/ContextMenu2/ContextMenu2TextInputItem.d.ts +2 -0
- package/dist/components/ContextMenu2/ContextMenu2TriggerItem.d.ts +7 -0
- package/dist/components/ContextMenu2/__tests__/ContextMenu2.test.d.ts +1 -0
- package/dist/components/ContextMenu2/index.d.ts +10 -0
- package/dist/components/Icon/Icon.d.ts +9 -1
- package/dist/components/Icon/internal/ArrowDownIcon/index.d.ts +4 -0
- package/dist/components/Icon/internal/ArrowUpIcon/index.d.ts +4 -0
- package/dist/index.es.js +5 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/components/Icon/internal/ArrowBottomIcon/index.d.ts +0 -4
package/README.md
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { type ReactNode, type ReactElement, type ButtonHTMLAttributes, type Dispatch, type SetStateAction } from "react";
|
|
2
|
+
export type ContextMenu2Anchor = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const useContextMenu2Anchor: () => {
|
|
7
|
+
position: ContextMenu2Anchor;
|
|
8
|
+
setPosition: Dispatch<SetStateAction<{
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}>>;
|
|
12
|
+
};
|
|
13
|
+
type ContextMenu2Props = {
|
|
14
|
+
/**
|
|
15
|
+
* コンテキストメニューを開くかどうか。省略時は内部で開閉状態を管理される
|
|
16
|
+
*/
|
|
17
|
+
open?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 開閉トリガーとなるボタン要素
|
|
20
|
+
*/
|
|
21
|
+
trigger: ReactElement<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
22
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
23
|
+
}, "button"> | ContextMenu2Anchor;
|
|
24
|
+
/**
|
|
25
|
+
* コンテキストメニューの幅(省略時は幅が内容にフィットする)
|
|
26
|
+
*/
|
|
27
|
+
width?: number;
|
|
28
|
+
/**
|
|
29
|
+
* メニュー内の項目。ContextMenu2*** のコンポーネントのみで構成する前提
|
|
30
|
+
*/
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* 開閉状態が変更されたときのコールバック
|
|
34
|
+
*/
|
|
35
|
+
onOpenChange?: (open: boolean) => void;
|
|
36
|
+
};
|
|
37
|
+
export declare const ContextMenu2: React.ForwardRefExoticComponent<ContextMenu2Props & React.RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
type ContextMenu2ContainerProps = {
|
|
39
|
+
/**
|
|
40
|
+
* ContextMenu2 を 1 つだけ含める
|
|
41
|
+
*/
|
|
42
|
+
children: ReactElement;
|
|
43
|
+
};
|
|
44
|
+
export declare const ContextMenu2Container: ({ children, }: ContextMenu2ContainerProps) => JSX.Element;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
import { ContextMenu2 } from "./index";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<{
|
|
7
|
+
open?: boolean | undefined;
|
|
8
|
+
trigger: import("./ContextMenu2").ContextMenu2Anchor | React.ReactElement<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
9
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
10
|
+
}, "button">;
|
|
11
|
+
width?: number | undefined;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
14
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
parameters: {
|
|
16
|
+
docs: {
|
|
17
|
+
source: {
|
|
18
|
+
language: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
24
|
+
export declare const Overview: StoryObj<typeof ContextMenu2>;
|
|
25
|
+
export declare const Triggers: StoryObj<typeof ContextMenu2>;
|
|
26
|
+
export declare const WithButton: StoryObj<typeof ContextMenu2>;
|
|
27
|
+
export declare const WithCheck: StoryObj<typeof ContextMenu2>;
|
|
28
|
+
export declare const WithCheckAsRadio: StoryObj<typeof ContextMenu2>;
|
|
29
|
+
export declare const WithSwitch: StoryObj<typeof ContextMenu2>;
|
|
30
|
+
export declare const WithTextInput: StoryObj<typeof ContextMenu2>;
|
|
31
|
+
export declare const Nest: StoryObj<typeof ContextMenu2>;
|
|
32
|
+
export declare const Anchor: StoryObj<typeof ContextMenu2>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
type ContextMenu2ButtonControlsItemProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
/**
|
|
5
|
+
* ボタン要素
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare const ContextMenu2ButtonControlsItem: import("styled-components").StyledComponent<({ className, children }: ContextMenu2ButtonControlsItemProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
type Theme = {
|
|
3
|
+
colors?: "danger" | undefined;
|
|
4
|
+
};
|
|
5
|
+
export declare const ContextMenu2ButtonItem: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<{
|
|
6
|
+
prepend?: ReactNode;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, Theme, never>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
type Theme = {
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
colors?: "danger" | undefined;
|
|
5
|
+
};
|
|
6
|
+
export declare const ContextMenu2CheckItem: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<{
|
|
7
|
+
checked?: boolean | undefined;
|
|
8
|
+
prepend?: ReactNode;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
onChange?: ((checked: boolean) => void) | undefined;
|
|
11
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, Theme, never>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
type Props = {
|
|
3
|
+
className?: string;
|
|
4
|
+
prepend?: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare const ContextMenu2HelpTextItem: import("styled-components").StyledComponent<({ className, prepend, children }: Props) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
type Theme = {
|
|
3
|
+
checked?: boolean | undefined;
|
|
4
|
+
};
|
|
5
|
+
export declare const ContextMenu2SwitchItem: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<{
|
|
6
|
+
checked?: boolean | undefined;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
onChange: (checked: boolean) => void;
|
|
10
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, Theme, never>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const ContextMenu2TextInputItem: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
type ContextMenu2TriggerItemProps = {
|
|
3
|
+
append?: ReactNode;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare const ContextMenu2TriggerItem: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<ContextMenu2TriggerItemProps & React.RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { ContextMenu2, ContextMenu2Container, useContextMenu2Anchor, } from "./ContextMenu2";
|
|
2
|
+
export { ContextMenu2HeadingItem } from "./ContextMenu2HeadingItem";
|
|
3
|
+
export { ContextMenu2HelpTextItem } from "./ContextMenu2HelpTextItem";
|
|
4
|
+
export { ContextMenu2TriggerItem } from "./ContextMenu2TriggerItem";
|
|
5
|
+
export { ContextMenu2ButtonItem } from "./ContextMenu2ButtonItem";
|
|
6
|
+
export { ContextMenu2CheckItem } from "./ContextMenu2CheckItem";
|
|
7
|
+
export { ContextMenu2SwitchItem } from "./ContextMenu2SwitchItem";
|
|
8
|
+
export { ContextMenu2TextInputItem } from "./ContextMenu2TextInputItem";
|
|
9
|
+
export { ContextMenu2SeparatorItem } from "./ContextMenu2SeparatorItem";
|
|
10
|
+
export { ContextMenu2ButtonControlsItem } from "./ContextMenu2ButtonControlsItem";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
/** @deprecated "arrow_bottom" は "arrow_down" に置き換わりました */
|
|
3
|
+
type DeprecatedArrowBottom = "arrow_bottom";
|
|
4
|
+
export type IconName = "dashboard" | "bar_chart" | "bar_chart_framed" | "line_chart_framed" | "multi_line_chart_framed" | "logout" | "setting" | "arrow_up" | "arrow_down" | "arrow_left" | "arrow_right" | "pencil" | "delete_bin" | "close" | "forbid" | "check" | "eye" | "eye_off" | "exclamation" | "arrow_double_left" | "arrow_double_right" | "question" | "zoom_in" | "sort_up" | "sort_down" | "sort_inactive" | "folder" | "folder_open" | "refresh_line" | "return_line" | "link" | "unlink" | "no_link" | "search" | "import" | "export" | "add_line" | "more" | "more_vert" | "date_range" | "external_link" | "desktop" | "mobile" | "desktop_mobile" | "copy" | "truck" | "camera_movie" | "code_file" | "cart_secure" | "profile" | "auction" | "mail" | "mail_open" | "filter" | "notification" | "user_settings" | "company_settings" | "heart_pulse" | "checkbox_circle" | "alart" | "base_station" | "braille" | "label" | "download_cloud" | "save" | "close_circle" | "bid_strap" | "fluct" | "data_strap" | "company" | "document" | "user" | "information" | "analytics" | "support" | "apps" | "ad_block" | "building" | "image" | "calendar" | "menu" | "file_list" | "draft" | "time" | "stop_circle" | "play_circle" | "sort_asc" | "sort_desc" | "bar_chart_search" | "check_thin" | "image_check" | "group2" | "key";
|
|
3
5
|
type IconType = "fill" | "line";
|
|
4
6
|
type IconColor = IconType | "active" | string;
|
|
5
7
|
type IconSize = "sm" | "md" | "lg";
|
|
@@ -18,6 +20,12 @@ export type Props = {
|
|
|
18
20
|
type?: IconType;
|
|
19
21
|
size?: IconSize;
|
|
20
22
|
color?: IconColor;
|
|
23
|
+
} | {
|
|
24
|
+
/** @deprecated "arrow_bottom" は "arrow_down" に置き換わりました */
|
|
25
|
+
name: DeprecatedArrowBottom;
|
|
26
|
+
type?: IconType;
|
|
27
|
+
size?: IconSize;
|
|
28
|
+
color?: IconColor;
|
|
21
29
|
};
|
|
22
30
|
declare const Icon: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLSpanElement>>;
|
|
23
31
|
export default Icon;
|