dawn-ui-react 1.0.0-alpha.10 → 1.0.0-alpha.12
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/chart-container.d.ts +3 -0
- package/dist/components/chart/chart-legend-content.d.ts +8 -0
- package/dist/components/chart/chart-legend-icon.d.ts +2 -0
- package/dist/components/chart/chart-legend-indicator.d.ts +2 -0
- package/dist/components/chart/chart-legend-label.d.ts +2 -0
- package/dist/components/chart/chart-legend.d.ts +2 -0
- package/dist/components/chart/chart-linear-gradient.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-content.d.ts +3 -0
- package/dist/components/chart/chart-tooltip-icon.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-indicator.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-label.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-name.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-payload.d.ts +4 -0
- package/dist/components/chart/chart-tooltip-value.d.ts +3 -0
- package/dist/components/chart/chart-tooltip.d.ts +2 -0
- package/dist/components/chart/chart.types.d.ts +49 -0
- package/dist/components/chart/chart.utils.d.ts +11 -0
- package/dist/components/chart/index.d.ts +16 -0
- package/dist/components/code-block/code-block-window.d.ts +1 -2
- package/dist/components/code-block/code-block.types.d.ts +1 -1
- package/dist/components/code-block/index.d.ts +9 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/slider/slider.types.d.ts +7 -1
- package/dist/dawn-ui-react.js +17439 -6788
- package/dist/dawn-ui-react.umd.cjs +68 -29
- package/package.json +2 -1
- package/dist/components/code-block/code-block-header-group.d.ts +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ChartContainerContextProps, ChartContainerProps } from './chart.types';
|
|
2
|
+
export declare const ChartContainer: ({ id, initialDimension, config, className, children, ref, ...props }: ChartContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const useChart: () => ChartContainerContextProps;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ChartLegendContentProps } from './chart.types';
|
|
3
|
+
export declare const ChartLegendContent: ({ payload, verticalAlign, className, children, ref, ...props }: ChartLegendContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const useChartLegendPayload: () => {
|
|
5
|
+
label?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
icon?: React.ComponentType;
|
|
8
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ChartTooltipContentProps } from './chart.types';
|
|
2
|
+
export declare const ChartTooltipContent: ({ className, children, ref, ...props }: ChartTooltipContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const useChartTooltipContent: () => ChartTooltipContentProps;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ChartTooltipPayloadProps } from './chart.types';
|
|
2
|
+
import { TooltipPayloadEntry } from 'recharts';
|
|
3
|
+
export declare const ChartTooltipPayload: ({ className, children, ref, ...props }: ChartTooltipPayloadProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const useChartTooltipPayload: () => TooltipPayloadEntry<import('recharts').TooltipValueType, import('recharts/types/component/DefaultTooltipContent').NameType>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as RechartsPrimitive from 'recharts';
|
|
2
|
+
declare const THEMES: {
|
|
3
|
+
readonly light: "";
|
|
4
|
+
readonly dark: ".dark";
|
|
5
|
+
};
|
|
6
|
+
export type ChartConfig = Record<string, {
|
|
7
|
+
label?: string;
|
|
8
|
+
icon?: React.ComponentType;
|
|
9
|
+
} & ({
|
|
10
|
+
colour?: string;
|
|
11
|
+
theme?: never;
|
|
12
|
+
} | {
|
|
13
|
+
colour?: never;
|
|
14
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
15
|
+
})>;
|
|
16
|
+
export type ChartContainerContextProps = {
|
|
17
|
+
config: ChartConfig;
|
|
18
|
+
};
|
|
19
|
+
export type ChartContainerProps = React.ComponentProps<'div'> & {
|
|
20
|
+
config: ChartConfig;
|
|
21
|
+
initialDimension?: {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type ChartTooltipProps = RechartsPrimitive.TooltipProps;
|
|
27
|
+
export type ChartTooltipContentProps = React.ComponentProps<'div'> & Partial<RechartsPrimitive.TooltipContentProps>;
|
|
28
|
+
export type ChartLegendProps = RechartsPrimitive.LegendProps;
|
|
29
|
+
export type ChartLegendContentProps = React.ComponentProps<'div'> & RechartsPrimitive.DefaultLegendContentProps;
|
|
30
|
+
export type ChartTooltipLabelProps = React.ComponentProps<'p'>;
|
|
31
|
+
export type ChartTooltipNameProps = React.ComponentProps<'p'>;
|
|
32
|
+
export type ChartTooltipPayloadProps = React.ComponentProps<'div'>;
|
|
33
|
+
export type ChartLegendPayloadProps = React.ComponentProps<'div'>;
|
|
34
|
+
export type ChartTooltipIndicatorProps = React.ComponentProps<'div'> & {
|
|
35
|
+
shape?: 'circle' | 'square' | 'diamond' | 'triangle' | 'wye' | 'line';
|
|
36
|
+
};
|
|
37
|
+
export type ChartLinearGradientProps = React.ComponentProps<'defs'> & {
|
|
38
|
+
gradients: {
|
|
39
|
+
id: string;
|
|
40
|
+
stopColor: string;
|
|
41
|
+
}[];
|
|
42
|
+
};
|
|
43
|
+
export type ChartTooltipIconProps = React.ComponentProps<'div'>;
|
|
44
|
+
export type ChartLegendIconProps = React.ComponentProps<'div'>;
|
|
45
|
+
export type ChartLegendLabelProps = React.ComponentProps<'p'>;
|
|
46
|
+
export type ChartLegendIndicatorProps = React.ComponentProps<'div'> & {
|
|
47
|
+
shape?: 'circle' | 'square' | 'diamond' | 'triangle' | 'wye' | 'line';
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChartConfig } from './chart.types';
|
|
2
|
+
export declare const getPayloadConfigFromPayload: (config: ChartConfig, payload: unknown, key: string) => ({
|
|
3
|
+
label?: string;
|
|
4
|
+
icon?: React.ComponentType;
|
|
5
|
+
} & ({
|
|
6
|
+
colour?: string;
|
|
7
|
+
theme?: never;
|
|
8
|
+
} | {
|
|
9
|
+
colour?: never;
|
|
10
|
+
theme: Record<"light" | "dark", string>;
|
|
11
|
+
})) | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type { ChartConfig, ChartTooltipContentProps, ChartTooltipLabelProps, ChartLegendContentProps, ChartLinearGradientProps, ChartContainerContextProps, ChartContainerProps, ChartLegendProps, ChartTooltipIndicatorProps, ChartTooltipNameProps, ChartTooltipPayloadProps, ChartTooltipProps, ChartLegendIconProps, ChartLegendLabelProps, ChartLegendIndicatorProps, ChartTooltipIconProps, ChartLegendPayloadProps, } from './chart.types';
|
|
2
|
+
export { ChartContainer } from './chart-container';
|
|
3
|
+
export { ChartTooltip } from './chart-tooltip';
|
|
4
|
+
export { ChartTooltipContent, useChartTooltipContent } from './chart-tooltip-content';
|
|
5
|
+
export { ChartTooltipLabel } from './chart-tooltip-label';
|
|
6
|
+
export { ChartTooltipPayload, useChartTooltipPayload } from './chart-tooltip-payload';
|
|
7
|
+
export { ChartLegend } from './chart-legend';
|
|
8
|
+
export { ChartLegendContent } from './chart-legend-content';
|
|
9
|
+
export { ChartLinearGradient } from './chart-linear-gradient';
|
|
10
|
+
export { ChartTooltipIndicator } from './chart-tooltip-indicator';
|
|
11
|
+
export { ChartTooltipName } from './chart-tooltip-name';
|
|
12
|
+
export { ChartLegendIcon } from './chart-legend-icon';
|
|
13
|
+
export { ChartLegendLabel } from './chart-legend-label';
|
|
14
|
+
export { ChartLegendIndicator } from './chart-legend-indicator';
|
|
15
|
+
export { ChartTooltipIcon } from './chart-tooltip-icon';
|
|
16
|
+
export { getPayloadConfigFromPayload } from './chart.utils';
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { CodeBlockWindowProps } from './code-block.types';
|
|
2
2
|
export declare const CodeBlockWindow: ({ className, children, ref, ...props }: CodeBlockWindowProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export {};
|
|
@@ -21,6 +21,6 @@ export type CodeBlockCopyProps = React.ComponentProps<'button'>;
|
|
|
21
21
|
export type CodeBlockNameProps = React.ComponentProps<'div'>;
|
|
22
22
|
export type CodeBlockSelectProps = React.ComponentProps<typeof SelectTrigger>;
|
|
23
23
|
export type CodeBlockHeaderGroupProps = React.ComponentProps<'div'>;
|
|
24
|
-
export type CodeBlockTitleProps = React.ComponentProps<'div'>;
|
|
25
24
|
export type CodeBlockDownloadProps = React.ComponentProps<'button'>;
|
|
26
25
|
export type CodeBlockActionsProps = React.ComponentProps<'div'>;
|
|
26
|
+
export type CodeBlockWindowProps = React.ComponentProps<'div'>;
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export type { CodeBlockProps } from './code-block.types';
|
|
1
|
+
export type { CodeBlockProps, CodeBlockActionsProps, CodeBlockCopyProps, CodeBlockDownloadProps, CodeBlockHeaderGroupProps, CodeBlockNameProps, CodeBlockProviderState, CodeBlockSelectProps, CodeBlockTabsProps, CodeBlockWindowProps, CodeBlockValue, } from './code-block.types';
|
|
2
2
|
export { CodeBlock } from './code-block';
|
|
3
|
+
export { CodeBlockActions } from './code-block-actions';
|
|
4
|
+
export { CodeBlockCopy } from './code-block-copy';
|
|
5
|
+
export { CodeBlockDownload } from './code-block-download';
|
|
6
|
+
export { CodeBlockHeader } from './code-block-header';
|
|
7
|
+
export { CodeBlockName } from './code-block-name';
|
|
8
|
+
export { CodeBlockSelect } from './code-block-select';
|
|
9
|
+
export { CodeBlockTabs } from './code-block-tabs';
|
|
10
|
+
export { CodeBlockWindow } from './code-block-window';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SliderProps } from './slider.types';
|
|
2
|
-
export declare const Slider: ({ defaultValue, description, label, leadingIcon: LeadingIcon, max, min, showMax, showMin, trailingIcon: TrailingIcon, value, className, ref, ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Slider: ({ size, tone, defaultValue, description, label, leadingIcon: LeadingIcon, max, min, showMax, showMin, trailingIcon: TrailingIcon, showThumbOnHover, value, className, ref, ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
1
2
|
import { Slider as BaseSlider } from '@base-ui/react';
|
|
2
3
|
import { Icon } from '@phosphor-icons/react';
|
|
3
4
|
import { ComponentProps } from 'react';
|
|
4
|
-
export
|
|
5
|
+
export declare const sliderVariants: (props?: ({
|
|
6
|
+
size?: "small" | "large" | "medium" | null | undefined;
|
|
7
|
+
tone?: "brand" | "accent" | "neutral" | "error" | "info" | "success" | "warning" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export type SliderProps = ComponentProps<typeof BaseSlider.Root> & VariantProps<typeof sliderVariants> & {
|
|
5
10
|
label?: string;
|
|
6
11
|
description?: string;
|
|
7
12
|
leadingIcon?: Icon;
|
|
8
13
|
trailingIcon?: Icon;
|
|
9
14
|
showMin?: boolean;
|
|
10
15
|
showMax?: boolean;
|
|
16
|
+
showThumbOnHover?: boolean;
|
|
11
17
|
};
|
|
12
18
|
export type SliderThumbProps = ComponentProps<typeof BaseSlider.Thumb>;
|