@appquality/unguess-design-system 2.12.38 → 2.12.40

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,6 @@
1
+ declare const Legend: ({ colors, data, columns, }: {
2
+ colors: string[];
3
+ data: (string | number)[];
4
+ columns?: number | undefined;
5
+ }) => JSX.Element;
6
+ export default Legend;
@@ -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
- interface PieDatum {
3
- [key: string]: string | number;
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?: PieSvgProps<PieDatum>["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 _default: ComponentMeta<({ theme, colors, width, height, data, centerItem, margin, }: PieChartProps) => JSX.Element>;
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?: SunburstSvgProps<SunburstData>["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
  }
@@ -0,0 +1,3 @@
1
+ import { SunburstData } from "./_types";
2
+ declare const getChildrenValue: (data: SunburstData) => number;
3
+ export { getChildrenValue };
@@ -1,3 +1,3 @@
1
1
  import { SunburstChartProps } from "./_types";
2
- declare const SunburstChart: ({ theme, colors, width, height, data, centerItem, margin, onChange, }: SunburstChartProps) => JSX.Element;
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 _default: ComponentMeta<({ theme, colors, width, height, data, centerItem, margin, onChange, }: SunburstChartProps) => JSX.Element>;
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,17 @@
1
- import { ITabsProps } from "@zendeskgarden/react-tabs";
2
- export interface TabsArgs extends ITabsProps {
3
- /**
4
- * Arranges the tabs vertically
5
- */
6
- isVertical?: boolean;
7
- /**
8
- * Specifies the currently selected tab
9
- */
10
- selectedItem?: string;
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 {
7
+ children: React.ReactNode;
8
+ index: number;
9
+ isSelected?: boolean;
10
+ isDisabled?: boolean;
11
+ setSelectedTab: (index: number) => void;
12
+ }
13
+ export interface TabPanelProps {
14
+ children: React.ReactNode;
15
+ isDisabled?: boolean;
16
+ title: string;
11
17
  }
@@ -1,9 +1,5 @@
1
- /// <reference types="react" />
2
- import { TabList as ZendeskTabList, Tab as ZendeskTab, TabPanel as ZendeskTabPanel } from "@zendeskgarden/react-tabs";
3
- import { TabsArgs } from "./_types";
4
- declare const Tabs: import("react").ForwardRefExoticComponent<TabsArgs & import("react").RefAttributes<HTMLDivElement>> & {
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
- export declare const Horizontal: Story<TabsArgs>;
5
- export declare const Vertical: Story<TabsArgs>;
6
- declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<TabsArgs & import("react").RefAttributes<HTMLDivElement>> & {
7
- List: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
8
- Tab: import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-tabs").ITabProps & import("react").RefAttributes<HTMLDivElement>>;
9
- Panel: import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-tabs").ITabPanelProps & import("react").RefAttributes<HTMLDivElement>>;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.12.38",
3
+ "version": "2.12.40",
4
4
  "dependencies": {
5
5
  "@nivo/bar": "^0.80.0",
6
6
  "@nivo/bullet": "^0.80.0",