ingred-ui 37.4.0 → 37.5.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/dist/components/Chart/internal/ChartAxis.d.ts +4 -0
- package/dist/components/Chart/internal/ChartScrollViewport.d.ts +20 -0
- package/dist/components/Chart/internal/getCategoryLabelPlacement.d.ts +22 -0
- package/dist/components/Chart/internal/getChartLayout.d.ts +1 -0
- package/dist/components/Chart/internal/getChartScrollEdges.d.ts +17 -0
- package/dist/components/Chart/internal/styled.d.ts +19 -0
- package/dist/index.es.js +556 -532
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +624 -600
- package/dist/index.js.map +1 -1
- package/dist/themes/palette.d.ts +6 -1
- package/package.json +1 -1
|
@@ -17,14 +17,18 @@ type ChartValueAxisProps = {
|
|
|
17
17
|
position?: "start" | "end";
|
|
18
18
|
/** グリッド線を描画するか。右軸では通常 false */
|
|
19
19
|
showGrid?: boolean;
|
|
20
|
+
/** 金額ラベルを描画するか。固定軸に出すときはプロット側では false */
|
|
21
|
+
showLabels?: boolean;
|
|
20
22
|
};
|
|
21
23
|
export declare const ChartValueAxis: React.FC<ChartValueAxisProps>;
|
|
22
24
|
type ChartCategoryLabelsProps = {
|
|
23
25
|
orientation: BarChartOrientation;
|
|
24
26
|
labels: string[];
|
|
27
|
+
width: number;
|
|
25
28
|
height: number;
|
|
26
29
|
paddingBottom: number;
|
|
27
30
|
paddingLeft: number;
|
|
31
|
+
paddingRight: number;
|
|
28
32
|
paddingTop: number;
|
|
29
33
|
slotWidth: number;
|
|
30
34
|
labelEvery: number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ChartLayout } from "./getChartLayout";
|
|
3
|
+
export type ChartStickyAxisSpec = {
|
|
4
|
+
position?: "start" | "end";
|
|
5
|
+
ticks: number[];
|
|
6
|
+
maxValue: number;
|
|
7
|
+
valueFormatter: (value: number) => string;
|
|
8
|
+
};
|
|
9
|
+
type ChartScrollViewportProps = {
|
|
10
|
+
ariaLabel: string;
|
|
11
|
+
chartLayout: ChartLayout;
|
|
12
|
+
/**
|
|
13
|
+
* 縦方向チャートの金額ラベル。横にはみ出すときだけ、スクロール領域の外に固定する。
|
|
14
|
+
* horizontal では渡さない(値軸が横方向のため)。
|
|
15
|
+
*/
|
|
16
|
+
stickyAxes?: ChartStickyAxisSpec[];
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export declare const ChartScrollViewport: React.FC<ChartScrollViewportProps>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type CategoryLabelPlacement = {
|
|
2
|
+
x: number;
|
|
3
|
+
textAnchor: "start" | "middle";
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* 文字幅の見積もり。日付のような ASCII は fontSize の 0.62 倍、
|
|
7
|
+
* それ以外は fontSize と同じ幅として扱う。
|
|
8
|
+
*/
|
|
9
|
+
export declare function estimateCategoryLabelWidth(label: string, fontSize: number): number;
|
|
10
|
+
/**
|
|
11
|
+
* 縦グラフのカテゴリラベルを、左右の余白にはみ出さない位置に置く。
|
|
12
|
+
* 収まるときはスロット中央。はみ出す分だけ内側へずらす。
|
|
13
|
+
*/
|
|
14
|
+
export declare function getVerticalCategoryLabelPlacement({ label, index, slotWidth, paddingLeft, paddingRight, width, fontSize, }: {
|
|
15
|
+
label: string;
|
|
16
|
+
index: number;
|
|
17
|
+
slotWidth: number;
|
|
18
|
+
paddingLeft: number;
|
|
19
|
+
paddingRight: number;
|
|
20
|
+
width: number;
|
|
21
|
+
fontSize: number;
|
|
22
|
+
}): CategoryLabelPlacement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type ChartScrollMetrics = {
|
|
2
|
+
overflowsHorizontally: boolean;
|
|
3
|
+
scrollLeft: number;
|
|
4
|
+
clientWidth: number;
|
|
5
|
+
scrollWidth: number;
|
|
6
|
+
};
|
|
7
|
+
export type ChartScrollEdges = {
|
|
8
|
+
/** 左に戻れるとき。左端の影を出す */
|
|
9
|
+
showLeadingEdge: boolean;
|
|
10
|
+
/** 右に続きがあるとき。右端の影を出す */
|
|
11
|
+
showTrailingEdge: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* 横スクロールの端に続きがあるかを返す。
|
|
15
|
+
* 未計測(scrollWidth が 0)で溢れが確定しているときは、初期表示で右端の影を出す。
|
|
16
|
+
*/
|
|
17
|
+
export declare function getChartScrollEdges({ overflowsHorizontally, scrollLeft, clientWidth, scrollWidth, }: ChartScrollMetrics): ChartScrollEdges;
|
|
@@ -6,6 +6,25 @@ export declare const ChartScrollArea: import("styled-components/dist/types").ISt
|
|
|
6
6
|
$overflowX: boolean;
|
|
7
7
|
$overflowY: boolean;
|
|
8
8
|
}, never>>> & string;
|
|
9
|
+
export declare const ChartPlotFrame: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
10
|
+
export declare const ChartScrollEdge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$visible" | "$edge" | "$inset"> & {
|
|
11
|
+
$edge: "leading" | "trailing";
|
|
12
|
+
$visible: boolean;
|
|
13
|
+
$inset: number;
|
|
14
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$visible" | "$edge" | "$inset"> & {
|
|
15
|
+
$edge: "leading" | "trailing";
|
|
16
|
+
$visible: boolean;
|
|
17
|
+
$inset: number;
|
|
18
|
+
}, never>>> & string;
|
|
19
|
+
export declare const ChartStickyAxis: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$width" | "$position" | "$height"> & {
|
|
20
|
+
$position: "start" | "end";
|
|
21
|
+
$width: number;
|
|
22
|
+
$height: number;
|
|
23
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$width" | "$position" | "$height"> & {
|
|
24
|
+
$position: "start" | "end";
|
|
25
|
+
$width: number;
|
|
26
|
+
$height: number;
|
|
27
|
+
}, never>>> & string;
|
|
9
28
|
export declare const ChartSvg: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").SVGProps<SVGSVGElement>, "$minWidth" | "$minHeight"> & {
|
|
10
29
|
$minWidth: number;
|
|
11
30
|
$minHeight: number;
|