@appquality/unguess-design-system 2.12.39 → 2.12.41
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/CHANGELOG.md +33 -0
- package/build/index.js +412 -294
- package/build/stories/charts/Legend.d.ts +6 -0
- package/build/stories/charts/_types.d.ts +2 -1
- package/build/stories/charts/pie/_types.d.ts +13 -4
- package/build/stories/charts/pie/index.d.ts +1 -1
- package/build/stories/charts/pie/index.stories.d.ts +2 -1
- package/build/stories/charts/sunburst/_types.d.ts +7 -1
- package/build/stories/charts/sunburst/getChildrenValue.d.ts +3 -0
- package/build/stories/charts/sunburst/index.d.ts +1 -1
- package/build/stories/charts/sunburst/index.stories.d.ts +2 -1
- package/build/stories/tabs/_types.d.ts +17 -10
- package/build/stories/tabs/index.d.ts +4 -8
- package/build/stories/tabs/index.stories.d.ts +12 -7
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare type ChartTooltipFunction = ({ value, label, }: {
|
|
2
|
+
export declare type ChartTooltipFunction = ({ value, label, data, }: {
|
|
3
3
|
value: number;
|
|
4
4
|
label: string;
|
|
5
|
+
data?: Record<string, string | number | undefined>;
|
|
5
6
|
}) => React.ReactNode;
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import { PieSvgProps } from "@nivo/pie";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { ChartTooltipFunction } from "../_types";
|
|
3
|
+
declare type PieDatum = {
|
|
4
|
+
id: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
value: number;
|
|
7
|
+
} & {
|
|
8
|
+
[key: string]: string | number | undefined;
|
|
9
|
+
};
|
|
5
10
|
export interface PieChartProps {
|
|
6
11
|
data: PieDatum[];
|
|
7
12
|
width?: string;
|
|
8
13
|
height?: string;
|
|
9
14
|
theme?: PieSvgProps<PieDatum>["theme"];
|
|
10
|
-
colors?:
|
|
15
|
+
colors?: string[];
|
|
11
16
|
margin?: PieSvgProps<PieDatum>["margin"];
|
|
12
17
|
centerItem?: {
|
|
13
18
|
label?: string;
|
|
14
19
|
value?: string;
|
|
15
20
|
fontSizeMultiplier?: number;
|
|
16
21
|
};
|
|
22
|
+
tooltip?: ChartTooltipFunction;
|
|
23
|
+
legend?: {
|
|
24
|
+
columns?: number;
|
|
25
|
+
} | true;
|
|
17
26
|
}
|
|
18
27
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PieChartProps } from "./_types";
|
|
2
|
-
declare const PieChart: ({ theme, colors, width, height, data, centerItem, margin, }: PieChartProps) => JSX.Element;
|
|
2
|
+
declare const PieChart: ({ theme, colors, width, height, data, centerItem, margin, tooltip, legend, }: PieChartProps) => JSX.Element;
|
|
3
3
|
export { PieChart };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentMeta, Story } from "@storybook/react";
|
|
2
2
|
import { PieChartProps } from "./_types";
|
|
3
3
|
export declare const Default: Story<PieChartProps>;
|
|
4
|
-
declare const
|
|
4
|
+
export declare const WithCustomTooltip: Story<PieChartProps>;
|
|
5
|
+
declare const _default: ComponentMeta<({ theme, colors, width, height, data, centerItem, margin, tooltip, legend, }: PieChartProps) => JSX.Element>;
|
|
5
6
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { SunburstSvgProps } from "@nivo/sunburst";
|
|
2
|
+
import { ChartTooltipFunction } from "../_types";
|
|
2
3
|
export interface SunburstData {
|
|
3
4
|
name: string;
|
|
5
|
+
label?: string;
|
|
4
6
|
children?: SunburstData[];
|
|
5
7
|
value?: number;
|
|
6
8
|
}
|
|
@@ -10,11 +12,15 @@ export interface SunburstChartProps {
|
|
|
10
12
|
height?: string;
|
|
11
13
|
margin?: SunburstSvgProps<SunburstData>["margin"];
|
|
12
14
|
theme?: SunburstSvgProps<SunburstData>["theme"];
|
|
13
|
-
colors?:
|
|
15
|
+
colors?: string[];
|
|
14
16
|
centerItem?: {
|
|
15
17
|
label?: string;
|
|
16
18
|
value?: string;
|
|
17
19
|
fontSizeMultiplier?: number;
|
|
18
20
|
};
|
|
19
21
|
onChange?: (data: SunburstData) => void;
|
|
22
|
+
tooltip?: ChartTooltipFunction;
|
|
23
|
+
legend?: {
|
|
24
|
+
columns?: number;
|
|
25
|
+
} | true;
|
|
20
26
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SunburstChartProps } from "./_types";
|
|
2
|
-
declare const SunburstChart: ({
|
|
2
|
+
declare const SunburstChart: ({ colors, width, height, data, centerItem, margin, onChange, tooltip, legend, }: SunburstChartProps) => JSX.Element;
|
|
3
3
|
export { SunburstChart };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentMeta, Story } from "@storybook/react";
|
|
2
2
|
import { SunburstChartProps } from "./_types";
|
|
3
3
|
export declare const Default: Story<SunburstChartProps>;
|
|
4
|
-
declare const
|
|
4
|
+
export declare const WithCustomTooltip: Story<SunburstChartProps>;
|
|
5
|
+
declare const _default: ComponentMeta<({ colors, width, height, data, centerItem, margin, onChange, tooltip, legend, }: SunburstChartProps) => JSX.Element>;
|
|
5
6
|
export default _default;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface TabsArgs extends
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
export interface TabsArgs extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
selectedIndex?: number;
|
|
4
|
+
onTabChange?: (index: number) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface TabItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
index: number;
|
|
9
|
+
isSelected?: boolean;
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
setSelectedTab: (index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
title: string;
|
|
17
|
+
hidden?: boolean;
|
|
11
18
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
List: typeof ZendeskTabList;
|
|
6
|
-
Tab: typeof ZendeskTab;
|
|
7
|
-
Panel: typeof ZendeskTabPanel;
|
|
1
|
+
import { TabsArgs, TabPanelProps } from "./_types";
|
|
2
|
+
export declare const Tabs: {
|
|
3
|
+
(props: TabsArgs): JSX.Element;
|
|
4
|
+
Panel: (props: TabPanelProps) => JSX.Element;
|
|
8
5
|
};
|
|
9
|
-
export { Tabs };
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
2
|
import { TabsArgs } from "./_types";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
interface TabStoryArgs extends TabsArgs {
|
|
4
|
+
items: {
|
|
5
|
+
title: string;
|
|
6
|
+
content: string;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
10
|
+
export declare const Default: Story<TabStoryArgs>;
|
|
11
|
+
export declare const Disabled: Story<TabStoryArgs>;
|
|
12
|
+
declare const _default: ComponentMeta<{
|
|
13
|
+
(props: TabsArgs): JSX.Element;
|
|
14
|
+
Panel: (props: import("./_types").TabPanelProps) => JSX.Element;
|
|
10
15
|
}>;
|
|
11
16
|
export default _default;
|