visits-style 1.2.1 → 1.4.0-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/README.md +14 -7
- package/dist/components/Accordion/index.d.ts +12 -13
- package/dist/components/AppBar/index.d.ts +19 -20
- package/dist/components/Modal/index.d.ts +27 -30
- package/dist/components/Popover/index.d.ts +38 -40
- package/dist/components/Portal/index.d.ts +8 -8
- package/dist/components/Spinner/index.d.ts +12 -12
- package/dist/components/Toast/ToastItem.d.ts +2 -0
- package/dist/components/Toast/index.d.ts +2 -39
- package/dist/components/Toast/types.d.ts +39 -0
- package/dist/components/Tooltip/index.d.ts +30 -27
- package/dist/components/index.d.ts +10 -10
- package/dist/elements/Box/index.d.ts +10 -10
- package/dist/elements/Button/ButtonGroup.d.ts +275 -2
- package/dist/elements/Button/TextButton.d.ts +18 -18
- package/dist/elements/Button/index.d.ts +16 -16
- package/dist/elements/Content/index.d.ts +275 -2
- package/dist/elements/Divider/index.d.ts +275 -2
- package/dist/elements/Grid/Col.d.ts +12 -11
- package/dist/elements/Grid/Container.d.ts +7 -6
- package/dist/elements/Grid/Row.d.ts +3 -3
- package/dist/elements/Icons/Approved.d.ts +2 -2
- package/dist/elements/Icons/ArrowDown.d.ts +2 -2
- package/dist/elements/Icons/ChevronLeftRound.d.ts +2 -2
- package/dist/elements/Icons/ChevronRightRound.d.ts +2 -2
- package/dist/elements/Icons/Close.d.ts +2 -2
- package/dist/elements/Icons/FileRound.d.ts +2 -2
- package/dist/elements/Icons/Pencil.d.ts +2 -2
- package/dist/elements/Icons/PencilSimple.d.ts +2 -2
- package/dist/elements/Icons/Plus.d.ts +2 -2
- package/dist/elements/Icons/Refresh.d.ts +2 -2
- package/dist/elements/Icons/User.d.ts +2 -2
- package/dist/elements/Icons/index.d.ts +11 -11
- package/dist/elements/Placeholder/index.d.ts +275 -2
- package/dist/elements/Progress/index.d.ts +18 -19
- package/dist/elements/Table/index.d.ts +12 -11
- package/dist/elements/Tag/index.d.ts +15 -16
- package/dist/elements/index.d.ts +14 -15
- package/dist/forms/Checkbox/index.d.ts +8 -8
- package/dist/forms/Field/index.d.ts +7 -8
- package/dist/forms/HelpMessage.d.ts +7 -7
- package/dist/forms/Radio/index.d.ts +8 -8
- package/dist/forms/Select/index.d.ts +27 -27
- package/dist/forms/Switch/index.d.ts +21 -21
- package/dist/forms/TextInput/index.d.ts +22 -23
- package/dist/forms/Textarea/index.d.ts +11 -11
- package/dist/forms/index.d.ts +7 -7
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +3 -3
- package/dist/index.cjs.js +1504 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.es.js +1446 -0
- package/dist/styles/normalize.d.ts +3 -3
- package/dist/theme.d.ts +3 -3
- package/dist/types.d.ts +36 -36
- package/dist/utils/arrow.d.ts +1 -1
- package/dist/utils/boxShadow.d.ts +1 -1
- package/dist/utils/disabledColor.d.ts +2 -2
- package/dist/utils/findColorInvert.d.ts +2 -2
- package/dist/utils/hambuger.d.ts +1 -1
- package/dist/utils/index.d.ts +6 -6
- package/dist/utils/isClient.d.ts +2 -2
- package/dist/utils/media.d.ts +6 -10
- package/dist/utils/setAlign.d.ts +3 -3
- package/dist/utils/setSize.d.ts +4 -4
- package/dist/utils/wrapEvent.d.ts +2 -2
- package/package.json +20 -63
- package/dist/components/Card/index.d.ts +0 -18
- package/dist/hooks/useForceUpdate.d.ts +0 -1
- package/dist/hooks/usePopper.d.ts +0 -12
- package/dist/hooks/useScrollFix.d.ts +0 -1
- package/dist/index.js +0 -8
- package/dist/utils/__test__/findColorInvert.test.d.ts +0 -1
- package/dist/visits-style.cjs.development.js +0 -2646
- package/dist/visits-style.cjs.development.js.map +0 -1
- package/dist/visits-style.cjs.production.min.js +0 -2
- package/dist/visits-style.cjs.production.min.js.map +0 -1
- package/dist/visits-style.esm.js +0 -2587
- package/dist/visits-style.esm.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">visits-style</h1>
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
|
|
2
8
|
VISITS Technologiesのreactデザインコンポーネント
|
|
3
9
|
|
|
4
10
|
## Getting Started
|
|
@@ -14,12 +20,12 @@ yarn add react react-dom styled-components visits-style
|
|
|
14
20
|
```
|
|
15
21
|
|
|
16
22
|
## Dependencies
|
|
17
|
-
- React, React-dom(^
|
|
18
|
-
- styled-components(^
|
|
23
|
+
- React, React-dom(^18.0.0)
|
|
24
|
+
- styled-components(^5.0.0)
|
|
19
25
|
|
|
20
26
|
## Example
|
|
21
27
|
|
|
22
|
-
```
|
|
28
|
+
```ts
|
|
23
29
|
// index.tsx
|
|
24
30
|
import * as React from 'react';
|
|
25
31
|
import * as reactDOM from 'react-DOM';
|
|
@@ -34,10 +40,11 @@ function App() {
|
|
|
34
40
|
)
|
|
35
41
|
}
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
const rootElement = document.getElementById('root')!;
|
|
44
|
+
const root = reactDOM.createRoot(rootElement);
|
|
45
|
+
root.render(<App />);
|
|
38
46
|
```
|
|
39
47
|
|
|
40
48
|
## Docs
|
|
41
49
|
|
|
42
|
-
- [ドキュメント](https://visits-works.github.io/visits-style/)
|
|
43
|
-
- [storybook](https://visits-works.github.io/visits-style/storybook)
|
|
50
|
+
- [ドキュメント](https://visits-works.github.io/visits-style/storybook)
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/** ボタンなどの表示するラベル */
|
|
4
|
-
header: any;
|
|
5
|
-
show: boolean;
|
|
6
|
-
/**
|
|
7
|
-
* アニメーションの時間
|
|
8
|
-
* @default 300
|
|
9
|
-
*/
|
|
10
|
-
timeout?: number;
|
|
11
|
-
}
|
|
12
|
-
export default function Accordion({ header, show, children, timeout, ...rest }: Props): JSX.Element;
|
|
13
|
-
export {};
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** ボタンなどの表示するラベル */
|
|
4
|
+
header: any;
|
|
5
|
+
show: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* アニメーションの時間
|
|
8
|
+
* @default 300
|
|
9
|
+
*/
|
|
10
|
+
timeout?: number;
|
|
11
|
+
}
|
|
12
|
+
export default function Accordion({ header, show, children, timeout, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
2
|
-
import { ColorType } from '../../types';
|
|
3
|
-
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
/** background色 */
|
|
5
|
-
color?: ColorType;
|
|
6
|
-
/** ロゴのイメージ、プロジェクト名など */
|
|
7
|
-
brand?: React.ReactElement<any> | string;
|
|
8
|
-
/** 定義された位置を固定にする */
|
|
9
|
-
fixed?: boolean;
|
|
10
|
-
/** (IE11不可)画面がスクロールされても上で貼り付けいるようにする */
|
|
11
|
-
sticky?: boolean;
|
|
12
|
-
/** 中央並びから自動幅で表示します */
|
|
13
|
-
fluid?: boolean;
|
|
14
|
-
/** 背景がblurされます(safari専用、他は透明度) */
|
|
15
|
-
backdrop?: boolean;
|
|
16
|
-
/** childrenに定義するElementの並び順を指定します。未定義は自動並び */
|
|
17
|
-
align?: 'left' | 'right';
|
|
18
|
-
}
|
|
19
|
-
export default function AppBar({ children, align, brand, ...rest }: Props): JSX.Element;
|
|
20
|
-
export {};
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import { ColorType } from '../../types';
|
|
3
|
+
export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** background色 */
|
|
5
|
+
color?: ColorType;
|
|
6
|
+
/** ロゴのイメージ、プロジェクト名など */
|
|
7
|
+
brand?: React.ReactElement<any> | string;
|
|
8
|
+
/** 定義された位置を固定にする */
|
|
9
|
+
fixed?: boolean;
|
|
10
|
+
/** (IE11不可)画面がスクロールされても上で貼り付けいるようにする */
|
|
11
|
+
sticky?: boolean;
|
|
12
|
+
/** 中央並びから自動幅で表示します */
|
|
13
|
+
fluid?: boolean;
|
|
14
|
+
/** 背景がblurされます(safari専用、他は透明度) */
|
|
15
|
+
backdrop?: boolean;
|
|
16
|
+
/** childrenに定義するElementの並び順を指定します。未定義は自動並び */
|
|
17
|
+
align?: 'left' | 'right';
|
|
18
|
+
}
|
|
19
|
+
export default function AppBar({ children, align, brand, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
export default function Modal({ show, children, timeout, color, closeModal, external, className, closeOnOverlay, closeOnEsc, onExited, ...rest }: Props): JSX.Element;
|
|
30
|
-
export {};
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** trueの場合、モーダルを表示します。 */
|
|
4
|
+
show?: boolean;
|
|
5
|
+
/** モーダルのbodyに入れる内容 */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** モーダルを閉じる処理 */
|
|
8
|
+
closeModal: () => void;
|
|
9
|
+
/** オーバーレイのクリックでモーダルクローズ */
|
|
10
|
+
closeOnOverlay?: boolean;
|
|
11
|
+
/** escボタンでクローズ */
|
|
12
|
+
closeOnEsc?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* モーダルの表示・非表示のアニメーション速度
|
|
15
|
+
* @default 200
|
|
16
|
+
*/
|
|
17
|
+
timeout?: number;
|
|
18
|
+
/** モーダルのtransition exitが完了した時に発火されるcallback */
|
|
19
|
+
onExited?: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* モーダルの背景からのpaddingを指定します。
|
|
22
|
+
* @default '0.85rem'
|
|
23
|
+
*/
|
|
24
|
+
padding?: string;
|
|
25
|
+
}
|
|
26
|
+
export default function Modal({ show, children, timeout, padding, closeModal, closeOnOverlay, closeOnEsc, onExited, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const ModalContent: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("../../elements/Box").Props>>;
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
2
|
-
import { Placement } from '@
|
|
3
|
-
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
/** ボタンの内容 */
|
|
5
|
-
label: React.ReactElement;
|
|
6
|
-
/** 内容のリスト */
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* 吹き出しの背景色
|
|
10
|
-
* @default 'background'
|
|
11
|
-
*/
|
|
12
|
-
color?: string;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
declare const Popover: React.ForwardRefExoticComponent<Props & React.RefAttributes<PopoverRef>>;
|
|
40
|
-
export default Popover;
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import type { Placement } from '@floating-ui/core';
|
|
3
|
+
export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** ボタンの内容 */
|
|
5
|
+
label: React.ReactElement;
|
|
6
|
+
/** 内容のリスト */
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* 吹き出しの背景色
|
|
10
|
+
* @default 'background'
|
|
11
|
+
*/
|
|
12
|
+
color?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 表示される場所
|
|
15
|
+
* @default 'bottom-end'
|
|
16
|
+
*/
|
|
17
|
+
position?: Placement;
|
|
18
|
+
/**
|
|
19
|
+
* ツールチップが表示される間隔
|
|
20
|
+
* @default '{ x: 0, y: 6 }'
|
|
21
|
+
*/
|
|
22
|
+
offset?: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
};
|
|
26
|
+
/** 閉じた場合のコールバック */
|
|
27
|
+
onClose?: () => void;
|
|
28
|
+
/** 開けた場合のコールバック */
|
|
29
|
+
onOpen?: () => void;
|
|
30
|
+
/** コンテンツを出さない */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface PopoverRef {
|
|
34
|
+
open: () => void;
|
|
35
|
+
close: () => void;
|
|
36
|
+
}
|
|
37
|
+
declare const Popover: React.ForwardRefExoticComponent<Props & React.RefAttributes<PopoverRef>>;
|
|
38
|
+
export default Popover;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface Props {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
container?: HTMLElement;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const Portal: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
|
8
|
-
export default Portal;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
container?: HTMLElement;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Portal: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
|
8
|
+
export default Portal;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { ColorType } from '../../types';
|
|
3
|
-
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
/** 色の指定 */
|
|
5
|
-
color?: ColorType;
|
|
6
|
-
/** サイズ */
|
|
7
|
-
size?: string;
|
|
8
|
-
/** spinnerの太さ */
|
|
9
|
-
borderSize?: string;
|
|
10
|
-
}
|
|
11
|
-
declare const Spinner: import("styled-components").
|
|
12
|
-
export default Spinner;
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { ColorType } from '../../types';
|
|
3
|
+
export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** 色の指定 */
|
|
5
|
+
color?: ColorType;
|
|
6
|
+
/** サイズ */
|
|
7
|
+
size?: string;
|
|
8
|
+
/** spinnerの太さ */
|
|
9
|
+
borderSize?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Spinner: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Props>>;
|
|
12
|
+
export default Spinner;
|
|
@@ -1,39 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare type PositionType = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right';
|
|
4
|
-
interface ToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
/** 認識ID */
|
|
6
|
-
id: string;
|
|
7
|
-
/** 表示する内容 */
|
|
8
|
-
message?: React.ReactNode;
|
|
9
|
-
/** 背景の色 */
|
|
10
|
-
color?: ColorType;
|
|
11
|
-
/**
|
|
12
|
-
* 表示される時間 nullの場合は自動で閉じられません
|
|
13
|
-
* @default 5000
|
|
14
|
-
*/
|
|
15
|
-
duration?: number | null;
|
|
16
|
-
/** 押したら閉じられる */
|
|
17
|
-
clearOnClick?: boolean;
|
|
18
|
-
}
|
|
19
|
-
interface ContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
20
|
-
/** 表示するToastのリスト */
|
|
21
|
-
toasts: ToastProps[];
|
|
22
|
-
/** toastを消すタイミングのコールバック */
|
|
23
|
-
clear: (id: string) => void;
|
|
24
|
-
/**
|
|
25
|
-
* toastの表示される場所の指定
|
|
26
|
-
* top, top-right, top-left, bottom, bottom-right, bottom-left
|
|
27
|
-
* @default 'top-right'
|
|
28
|
-
*/
|
|
29
|
-
position?: PositionType;
|
|
30
|
-
/**
|
|
31
|
-
* margin
|
|
32
|
-
* @default '1rem'
|
|
33
|
-
*/
|
|
34
|
-
margin?: string;
|
|
35
|
-
/** スクロールしても固定として表示する */
|
|
36
|
-
fixed?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export default function Toast({ toasts, clear, fixed, style, margin, position, ...rest }: ContainerProps): JSX.Element;
|
|
39
|
-
export {};
|
|
1
|
+
import type { ToastContainerProps } from './types';
|
|
2
|
+
export default function Toast({ toasts, clear, fixed, margin, position }: ToastContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ToastType {
|
|
3
|
+
/** 認識ID */
|
|
4
|
+
id: string;
|
|
5
|
+
/** 表示する内容 */
|
|
6
|
+
message?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* 表示される時間 nullの場合は自動で閉じられません
|
|
9
|
+
* @default 5000
|
|
10
|
+
*/
|
|
11
|
+
duration?: number | null;
|
|
12
|
+
className?: string;
|
|
13
|
+
/** 押したら閉じられる */
|
|
14
|
+
clearOnClick?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ToastItemProps extends ToastType {
|
|
17
|
+
clear: (id: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export type ToastContainerPositionType = 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left';
|
|
20
|
+
export interface ToastContainerProps {
|
|
21
|
+
/** 表示するToastのリスト */
|
|
22
|
+
toasts: ToastType[];
|
|
23
|
+
/** toastを消すタイミングのコールバック */
|
|
24
|
+
clear: (id: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* toastの表示される場所の指定
|
|
27
|
+
* \
|
|
28
|
+
* top, top-right, top-left, bottom, bottom-right, bottom-left
|
|
29
|
+
* @default 'top-left'
|
|
30
|
+
*/
|
|
31
|
+
position?: ToastContainerPositionType;
|
|
32
|
+
/**
|
|
33
|
+
* margin 単位はpx
|
|
34
|
+
* @default '16px'
|
|
35
|
+
*/
|
|
36
|
+
margin?: string;
|
|
37
|
+
/** スクロールしても固定として表示する */
|
|
38
|
+
fixed?: boolean;
|
|
39
|
+
}
|
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Placement } from '@
|
|
3
|
-
import { ColorType } from '../../types';
|
|
4
|
-
interface TooltipProps {
|
|
5
|
-
/** 吹き出しとして表示したい内容 */
|
|
6
|
-
label: React.ReactNode;
|
|
7
|
-
/** マウスオーバーの対象になるelement */
|
|
8
|
-
children: React.ReactElement;
|
|
9
|
-
/** 吹き出しの背景色の指定 */
|
|
10
|
-
color?: ColorType;
|
|
11
|
-
/**
|
|
12
|
-
* 表示される場所
|
|
13
|
-
* @default 'bottom'
|
|
14
|
-
*/
|
|
15
|
-
position?: Placement;
|
|
16
|
-
/**
|
|
17
|
-
* ツールチップが表示される間隔, 単位はpx
|
|
18
|
-
* @default '{ x: 0, y: 6 }'
|
|
19
|
-
*/
|
|
20
|
-
offset?: {
|
|
21
|
-
x: number;
|
|
22
|
-
y: number;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Placement } from '@floating-ui/core';
|
|
3
|
+
import { ColorType } from '../../types';
|
|
4
|
+
export interface TooltipProps {
|
|
5
|
+
/** 吹き出しとして表示したい内容 */
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
/** マウスオーバーの対象になるelement */
|
|
8
|
+
children: React.ReactElement;
|
|
9
|
+
/** 吹き出しの背景色の指定 */
|
|
10
|
+
color?: ColorType;
|
|
11
|
+
/**
|
|
12
|
+
* 表示される場所
|
|
13
|
+
* @default 'bottom'
|
|
14
|
+
*/
|
|
15
|
+
position?: Placement;
|
|
16
|
+
/**
|
|
17
|
+
* ツールチップが表示される間隔, 単位はpx
|
|
18
|
+
* @default '{ x: 0, y: 6 }'
|
|
19
|
+
*/
|
|
20
|
+
offset?: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
/** 吹き出し表示座標を対象のElementではなくマウスカーソルにする */
|
|
25
|
+
clientPoint?: boolean;
|
|
26
|
+
/** 吹き出しを出さない */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
export default function Tooltip({ children, position, label, color, className, offset, clientPoint, disabled, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from '../forms';
|
|
2
|
-
export { default as Accordion } from './Accordion';
|
|
3
|
-
export { default as AppBar } from './AppBar';
|
|
4
|
-
export { default as Tooltip } from './Tooltip';
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
10
|
-
export
|
|
1
|
+
export * from '../forms';
|
|
2
|
+
export { default as Accordion, type Props as AccordionProps } from './Accordion';
|
|
3
|
+
export { default as AppBar, type Props as AppBarProps } from './AppBar';
|
|
4
|
+
export { default as Tooltip, type TooltipProps } from './Tooltip';
|
|
5
|
+
export { default as Popover, type Props as PopoverProps, type PopoverRef } from './Popover';
|
|
6
|
+
export { default as Portal, type Props as PortalProps } from './Portal';
|
|
7
|
+
export { default as Modal, type Props as ModalProps } from './Modal';
|
|
8
|
+
export { default as Toast } from './Toast';
|
|
9
|
+
export { default as Spinner, type Props as SinnerProps } from './Spinner';
|
|
10
|
+
export type * from './Toast/types';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { ColorType } from '../../types';
|
|
3
|
-
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
/** 色指定 */
|
|
5
|
-
color?: ColorType;
|
|
6
|
-
/** borderを非表示する */
|
|
7
|
-
borderless?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: import("styled-components").
|
|
10
|
-
export default _default;
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { ColorType } from '../../types';
|
|
3
|
+
export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** 色指定 */
|
|
5
|
+
color?: ColorType;
|
|
6
|
+
/** borderを非表示する */
|
|
7
|
+
borderless?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Props>>;
|
|
10
|
+
export default _default;
|