@gamecrafters/base-ui 0.0.7 → 0.0.8

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.
Files changed (89) hide show
  1. package/build/components/chart/Chart.d.ts +3 -17
  2. package/build/components/chart/Chart.types.d.ts +107 -51
  3. package/build/components/chart/ChartContext.d.ts +3 -0
  4. package/build/components/chart/ChartGradient.d.ts +7 -0
  5. package/build/components/chart/ChartLegend.d.ts +6 -5
  6. package/build/components/chart/ChartRadialText.d.ts +7 -0
  7. package/build/components/chart/ChartTooltip.d.ts +6 -7
  8. package/build/components/chart/chartPalette.d.ts +13 -0
  9. package/build/components/chart/index.d.ts +14 -30
  10. package/build/components/chart/useChart.d.ts +3 -0
  11. package/build/components/checkbox-card/CheckboxCard.d.ts +14 -0
  12. package/build/components/checkbox-card/CheckboxCard.types.d.ts +26 -0
  13. package/build/components/checkbox-card/CheckboxCardContext.d.ts +2 -0
  14. package/build/components/checkbox-card/CheckboxCardLeadingVisual.d.ts +5 -0
  15. package/build/components/checkbox-card/index.d.ts +27 -0
  16. package/build/components/{upload/Upload.d.ts → file-upload/FileUpload.d.ts} +5 -5
  17. package/build/components/file-upload/FileUpload.types.d.ts +51 -0
  18. package/build/components/file-upload/FileUploadContext.d.ts +2 -0
  19. package/build/components/file-upload/FileUploadDescription.d.ts +5 -0
  20. package/build/components/{upload/UploadItem.d.ts → file-upload/FileUploadItem.d.ts} +1 -1
  21. package/build/components/file-upload/FileUploadLabel.d.ts +5 -0
  22. package/build/components/{upload → file-upload}/files.d.ts +2 -2
  23. package/build/components/{upload → file-upload}/index.d.ts +14 -14
  24. package/build/components/hover-card/HoverCard.d.ts +7 -0
  25. package/build/components/hover-card/HoverCard.types.d.ts +33 -0
  26. package/build/components/hover-card/HoverCardContent.d.ts +5 -0
  27. package/build/components/hover-card/HoverCardContext.d.ts +2 -0
  28. package/build/components/hover-card/HoverCardTrigger.d.ts +15 -0
  29. package/build/components/hover-card/index.d.ts +12 -0
  30. package/build/components/index.d.ts +12 -1
  31. package/build/components/list/List.d.ts +10 -0
  32. package/build/components/list/List.types.d.ts +12 -0
  33. package/build/components/list/ListItem.d.ts +7 -0
  34. package/build/components/list/index.d.ts +16 -0
  35. package/build/components/marquee/Marquee.d.ts +11 -0
  36. package/build/components/marquee/Marquee.types.d.ts +26 -0
  37. package/build/components/marquee/index.d.ts +3 -0
  38. package/build/components/marquee/useMarquee.d.ts +14 -0
  39. package/build/components/number-input/NumberInput.d.ts +14 -0
  40. package/build/components/number-input/NumberInput.types.d.ts +14 -0
  41. package/build/components/number-input/index.d.ts +3 -0
  42. package/build/components/number-input/numberValue.d.ts +7 -0
  43. package/build/components/password-input/PasswordInput.d.ts +11 -0
  44. package/build/components/password-input/PasswordInput.types.d.ts +10 -0
  45. package/build/components/password-input/index.d.ts +2 -0
  46. package/build/components/pin-input/PINInput.d.ts +22 -0
  47. package/build/components/pin-input/PINInput.types.d.ts +21 -0
  48. package/build/components/pin-input/index.d.ts +2 -0
  49. package/build/components/qr-code/QRCode.d.ts +21 -0
  50. package/build/components/qr-code/QRCode.types.d.ts +35 -0
  51. package/build/components/qr-code/index.d.ts +2 -0
  52. package/build/components/radio-card/RadioCard.d.ts +14 -0
  53. package/build/components/radio-card/RadioCard.types.d.ts +26 -0
  54. package/build/components/radio-card/RadioCardContext.d.ts +2 -0
  55. package/build/components/radio-card/RadioCardDescription.d.ts +5 -0
  56. package/build/components/radio-card/RadioCardLabel.d.ts +5 -0
  57. package/build/components/radio-card/RadioCardLeadingVisual.d.ts +5 -0
  58. package/build/components/radio-card/index.d.ts +27 -0
  59. package/build/components/statistic-card/StatisticCard.d.ts +5 -0
  60. package/build/components/statistic-card/StatisticCard.types.d.ts +26 -0
  61. package/build/components/statistic-card/StatisticCardContext.d.ts +2 -0
  62. package/build/components/statistic-card/StatisticCardDescription.d.ts +5 -0
  63. package/build/components/statistic-card/StatisticCardLabel.d.ts +5 -0
  64. package/build/components/statistic-card/StatisticCardTrailingVisual.d.ts +5 -0
  65. package/build/components/statistic-card/StatisticCardTrend.d.ts +8 -0
  66. package/build/components/statistic-card/StatisticCardValue.d.ts +5 -0
  67. package/build/components/statistic-card/index.d.ts +29 -0
  68. package/build/components/steps/Steps.d.ts +10 -0
  69. package/build/components/steps/Steps.types.d.ts +31 -0
  70. package/build/components/steps/StepsBody.d.ts +5 -0
  71. package/build/components/steps/StepsDescription.d.ts +5 -0
  72. package/build/components/steps/StepsIndicator.d.ts +5 -0
  73. package/build/components/steps/StepsItem.d.ts +8 -0
  74. package/build/components/steps/StepsItemContext.d.ts +2 -0
  75. package/build/components/steps/StepsTitle.d.ts +5 -0
  76. package/build/components/steps/index.d.ts +35 -0
  77. package/build/components/steps/useStepsItem.d.ts +2 -0
  78. package/build/main.cjs.js +2 -2
  79. package/build/main.esm.js +2 -2
  80. package/build/styles/main.css +1 -1
  81. package/package.json +2 -6
  82. package/build/components/chart/chartScales.d.ts +0 -36
  83. package/build/components/chart/useChartWidth.d.ts +0 -2
  84. package/build/components/upload/Upload.types.d.ts +0 -51
  85. package/build/components/upload/UploadContext.d.ts +0 -2
  86. /package/build/components/{upload/UploadDescription.d.ts → checkbox-card/CheckboxCardDescription.d.ts} +0 -0
  87. /package/build/components/{upload/UploadLabel.d.ts → checkbox-card/CheckboxCardLabel.d.ts} +0 -0
  88. /package/build/components/{upload/UploadIcon.d.ts → file-upload/FileUploadIcon.d.ts} +0 -0
  89. /package/build/components/{upload/UploadList.d.ts → file-upload/FileUploadList.d.ts} +0 -0
@@ -1,21 +1,7 @@
1
1
  import * as React from "react";
2
- declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "title"> & {
3
- type?: import("./Chart.types").ChartType;
4
- data: import("./Chart.types").ChartDatum[];
5
- xKey: string;
6
- series: import("./Chart.types").ChartSeries[];
7
- title?: React.ReactNode;
8
- description?: React.ReactNode;
9
- stacked?: boolean;
10
- horizontal?: boolean;
11
- height?: number;
12
- valueFormat?: (value: number) => string;
13
- labelFormat?: (label: string) => string;
14
- tickCount?: number;
15
- showGrid?: boolean;
16
- showLegend?: boolean;
17
- smooth?: boolean;
18
- emptyText?: string;
2
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
3
+ chart: import("./Chart.types").ChartInstance;
4
+ children: React.ReactElement;
19
5
  className?: string;
20
6
  } & React.RefAttributes<any>) => React.ReactNode;
21
7
  export default _default;
@@ -1,59 +1,115 @@
1
1
  import type * as React from "react";
2
- export type ChartType = "line" | "area" | "bar";
3
- export type ChartDatum = Record<string, string | number | null | undefined>;
4
- export type ChartSeries = {
5
- key: string;
2
+ import type { LegendPayload, TooltipContentProps } from "recharts";
3
+ import type { ViewBox } from "recharts/types/util/types";
4
+ import type { ChartColorName } from "./chartPalette";
5
+ export type ChartColor = ChartColorName | (string & {});
6
+ export type ChartSeries<T> = {
7
+ name?: keyof T;
8
+ color?: ChartColor;
9
+ icon?: React.ReactNode;
10
+ label?: React.ReactNode;
11
+ stackId?: string;
12
+ yAxisId?: string;
13
+ strokeDasharray?: string;
14
+ id?: string;
15
+ };
16
+ export type ChartResolvedSeries<T> = ChartSeries<T> & {
17
+ color: ChartColor;
18
+ };
19
+ export type ChartSeriesConfig = {
6
20
  name?: string;
7
- color?: string;
8
- };
9
- export type ChartResolvedSeries = ChartSeries & {
10
- name: string;
11
- color: string;
12
- };
13
- export type ChartReading = {
14
- index: number;
15
- label: string;
16
- values: {
17
- series: ChartResolvedSeries;
18
- value: number | null;
19
- }[];
20
- };
21
- export type ChartLayout = {
22
- width: number;
23
- height: number;
24
- left: number;
25
- right: number;
26
- top: number;
27
- bottom: number;
28
- innerWidth: number;
29
- innerHeight: number;
30
- };
31
- export type ChartProps = Omit<React.ComponentPropsWithoutRef<"figure">, "title"> & {
32
- type?: ChartType;
33
- data: ChartDatum[];
34
- xKey: string;
35
- series: ChartSeries[];
36
- title?: React.ReactNode;
37
- description?: React.ReactNode;
38
- stacked?: boolean;
39
- horizontal?: boolean;
40
- height?: number;
41
- valueFormat?: (value: number) => string;
42
- labelFormat?: (label: string) => string;
43
- tickCount?: number;
44
- showGrid?: boolean;
45
- showLegend?: boolean;
46
- smooth?: boolean;
47
- emptyText?: string;
21
+ color?: ChartColor;
22
+ icon?: React.ReactNode;
23
+ label?: React.ReactNode;
24
+ };
25
+ export type ChartValueDomain = [
26
+ number,
27
+ number
28
+ ] | ((props: {
29
+ min: number;
30
+ max: number;
31
+ }) => [number, number]);
32
+ export type ChartSort<T> = {
33
+ by: keyof T;
34
+ direction: "asc" | "desc";
35
+ };
36
+ export type UseChartProps<T> = {
37
+ data: T[];
38
+ series?: ChartSeries<T>[];
39
+ sort?: ChartSort<T>;
40
+ locale?: string;
41
+ };
42
+ export type ChartInstance = {
43
+ id: string;
44
+ getSeries: (item: unknown) => ChartSeriesConfig | undefined;
45
+ color: (value?: ChartColor) => string | undefined;
46
+ formatNumber: (options?: Intl.NumberFormatOptions) => (value: number) => string;
47
+ formatDate: (options?: Intl.DateTimeFormatOptions) => (value: string | number | Date) => string;
48
+ highlightedSeries: string | null;
49
+ setHighlightedSeries: React.Dispatch<React.SetStateAction<string | null>>;
50
+ isHighlightedSeries: (name?: string) => boolean;
51
+ getSeriesOpacity: (name?: string, fallback?: number) => number | undefined;
52
+ getPayloadTotal: (payload?: readonly {
53
+ value?: unknown;
54
+ }[]) => number | undefined;
55
+ };
56
+ export type UseChartReturn<T> = ChartInstance & {
57
+ key: <K extends keyof T>(prop?: K) => K;
58
+ data: T[];
59
+ series: ChartResolvedSeries<T>[];
60
+ groupBy: (key: keyof T) => T[][];
61
+ getTotal: (key: keyof T) => number;
62
+ getMin: (key: keyof T) => number;
63
+ getMax: (key: keyof T) => number;
64
+ getValuePercent: (key: keyof T, value: number, domain?: ChartValueDomain) => number;
65
+ };
66
+ export type ChartProps = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
67
+ chart: ChartInstance;
68
+ children: React.ReactElement;
48
69
  className?: string;
49
70
  };
50
- export type ChartLegendProps = Omit<React.ComponentPropsWithoutRef<"ul">, "children"> & {
51
- series: ChartResolvedSeries[];
71
+ export type ChartLegendAlign = "left" | "center" | "right";
72
+ export type ChartLegendVerticalAlign = "top" | "middle" | "bottom";
73
+ export type ChartLegendLayout = "horizontal" | "vertical" | "auto";
74
+ export type ChartLegendInteraction = "hover" | "click";
75
+ export type ChartLegendProps = {
76
+ payload?: LegendPayload[];
77
+ align?: ChartLegendAlign;
78
+ verticalAlign?: ChartLegendVerticalAlign;
79
+ layout?: ChartLegendLayout;
80
+ title?: React.ReactNode;
81
+ nameKey?: string;
82
+ interaction?: ChartLegendInteraction;
52
83
  className?: string;
53
84
  };
54
- export type ChartTooltipProps = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
55
- reading: ChartReading;
56
- valueFormat: (value: number) => string;
57
- labelFormat: (label: string) => string;
85
+ export type ChartTooltipIndicator = "dot" | "line" | "dashed";
86
+ export type ChartTooltipFormatter = (value: unknown, name: React.ReactNode) => React.ReactNode | [React.ReactNode, React.ReactNode];
87
+ export type ChartTooltipProps = Partial<TooltipContentProps<string | number, string>> & {
88
+ hideLabel?: boolean;
89
+ hideIndicator?: boolean;
90
+ hideSeriesLabel?: boolean;
91
+ showTotal?: boolean;
92
+ fitContent?: boolean;
93
+ nameKey?: string;
94
+ indicator?: ChartTooltipIndicator;
95
+ formatter?: ChartTooltipFormatter;
96
+ render?: (payload: unknown) => React.ReactNode;
58
97
  className?: string;
59
98
  };
99
+ export type ChartGradientStop = {
100
+ color: ChartColor;
101
+ offset: string | number;
102
+ opacity?: number;
103
+ };
104
+ export type ChartGradientProps = {
105
+ id: string;
106
+ fillOpacity?: number;
107
+ stops: ChartGradientStop[];
108
+ };
109
+ export type ChartRadialTextProps = {
110
+ viewBox?: ViewBox;
111
+ title: React.ReactNode;
112
+ description?: React.ReactNode;
113
+ gap?: number;
114
+ fontSize?: string;
115
+ };
@@ -0,0 +1,3 @@
1
+ import type { ChartInstance } from "./Chart.types";
2
+ export declare const ChartContext: import("react").Context<ChartInstance | null>;
3
+ export declare const useChartContext: () => ChartInstance;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import type { ChartGradientProps } from "./Chart.types";
3
+ declare function ChartGradient(props: ChartGradientProps): React.JSX.Element;
4
+ declare namespace ChartGradient {
5
+ var displayName: string;
6
+ }
7
+ export default ChartGradient;
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
- declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref">, "children"> & {
3
- series: import("./Chart.types").ChartResolvedSeries[];
4
- className?: string;
5
- } & React.RefAttributes<any>) => React.ReactNode;
6
- export default _default;
2
+ import type { ChartLegendProps } from "./Chart.types";
3
+ declare function ChartLegend(props: ChartLegendProps): React.JSX.Element | null;
4
+ declare namespace ChartLegend {
5
+ var displayName: string;
6
+ }
7
+ export default ChartLegend;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import type { ChartRadialTextProps } from "./Chart.types";
3
+ declare function ChartRadialText(props: ChartRadialTextProps): React.JSX.Element | null;
4
+ declare namespace ChartRadialText {
5
+ var displayName: string;
6
+ }
7
+ export default ChartRadialText;
@@ -1,8 +1,7 @@
1
1
  import * as React from "react";
2
- declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
3
- reading: import("./Chart.types").ChartReading;
4
- valueFormat: (value: number) => string;
5
- labelFormat: (label: string) => string;
6
- className?: string;
7
- } & React.RefAttributes<any>) => React.ReactNode;
8
- export default _default;
2
+ import type { ChartTooltipProps } from "./Chart.types";
3
+ declare function ChartTooltip(props: ChartTooltipProps): React.JSX.Element | null;
4
+ declare namespace ChartTooltip {
5
+ var displayName: string;
6
+ }
7
+ export default ChartTooltip;
@@ -1,3 +1,16 @@
1
1
  export declare const CHART_SERIES_COLORS: string[];
2
2
  export declare const CHART_OVERFLOW_COLOR = "var(--foreground-color-muted)";
3
+ export declare const CHART_COLORS: {
4
+ blue: string;
5
+ orange: string;
6
+ purple: string;
7
+ green: string;
8
+ pink: string;
9
+ grid: string;
10
+ axis: string;
11
+ surface: string;
12
+ foreground: string;
13
+ muted: string;
14
+ };
15
+ export type ChartColorName = keyof typeof CHART_COLORS;
3
16
  export declare const getSeriesColor: (index: number, color?: string) => string;
@@ -1,36 +1,20 @@
1
+ import ChartGradient from "./ChartGradient";
1
2
  import ChartLegend from "./ChartLegend";
3
+ import ChartRadialText from "./ChartRadialText";
2
4
  import ChartTooltip from "./ChartTooltip";
3
- export declare const Chart: ((props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "title"> & {
4
- type?: import("./Chart.types").ChartType;
5
- data: import("./Chart.types").ChartDatum[];
6
- xKey: string;
7
- series: import("./Chart.types").ChartSeries[];
8
- title?: React.ReactNode;
9
- description?: React.ReactNode;
10
- stacked?: boolean;
11
- horizontal?: boolean;
12
- height?: number;
13
- valueFormat?: (value: number) => string;
14
- labelFormat?: (label: string) => string;
15
- tickCount?: number;
16
- showGrid?: boolean;
17
- showLegend?: boolean;
18
- smooth?: boolean;
19
- emptyText?: string;
5
+ export declare const Chart: ((props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
6
+ chart: import("./Chart.types").ChartInstance;
7
+ children: React.ReactElement;
20
8
  className?: string;
21
9
  } & import("react").RefAttributes<any>) => React.ReactNode) & {
22
- Legend: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref">, "children"> & {
23
- series: import("./Chart.types").ChartResolvedSeries[];
24
- className?: string;
25
- } & import("react").RefAttributes<any>) => React.ReactNode;
26
- Tooltip: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
27
- reading: import("./Chart.types").ChartReading;
28
- valueFormat: (value: number) => string;
29
- labelFormat: (label: string) => string;
30
- className?: string;
31
- } & import("react").RefAttributes<any>) => React.ReactNode;
10
+ Gradient: typeof ChartGradient;
11
+ Legend: typeof ChartLegend;
12
+ RadialText: typeof ChartRadialText;
13
+ Tooltip: typeof ChartTooltip;
32
14
  };
33
- export { ChartLegend, ChartTooltip };
34
- export { CHART_SERIES_COLORS, CHART_OVERFLOW_COLOR, getSeriesColor } from "./chartPalette";
35
- export { BAR_RADIUS, MARK_GAP, MAX_BAR_THICKNESS } from "./chartScales";
15
+ export { ChartGradient, ChartLegend, ChartRadialText, ChartTooltip };
16
+ export { ChartContext, useChartContext } from "./ChartContext";
17
+ export { getProp, useChart } from "./useChart";
18
+ export { CHART_COLORS, CHART_OVERFLOW_COLOR, CHART_SERIES_COLORS, getSeriesColor, } from "./chartPalette";
19
+ export type { ChartColorName } from "./chartPalette";
36
20
  export * from "./Chart.types";
@@ -0,0 +1,3 @@
1
+ import type { UseChartProps, UseChartReturn } from "./Chart.types";
2
+ export declare const getProp: <T = unknown>(item: unknown, key?: string) => T | undefined;
3
+ export declare const useChart: <T>(props: UseChartProps<T>) => UseChartReturn<T>;
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import type { CheckboxCardValidationStatus } from "./CheckboxCard.types";
3
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref">, "onChange"> & {
4
+ value: string;
5
+ checked?: boolean;
6
+ defaultChecked?: boolean;
7
+ indeterminate?: boolean;
8
+ disabled?: boolean;
9
+ required?: boolean;
10
+ validationStatus?: CheckboxCardValidationStatus;
11
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
12
+ className?: string;
13
+ } & React.RefAttributes<any>) => React.ReactNode;
14
+ export default _default;
@@ -0,0 +1,26 @@
1
+ import type * as React from "react";
2
+ export type CheckboxCardValidationStatus = "error" | "success";
3
+ export type CheckboxCardProps = Omit<React.ComponentPropsWithoutRef<"label">, "onChange"> & {
4
+ value: string;
5
+ checked?: boolean;
6
+ defaultChecked?: boolean;
7
+ indeterminate?: boolean;
8
+ disabled?: boolean;
9
+ required?: boolean;
10
+ validationStatus?: CheckboxCardValidationStatus;
11
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
12
+ className?: string;
13
+ };
14
+ export type CheckboxCardLabelProps = React.ComponentPropsWithoutRef<"span"> & {
15
+ className?: string;
16
+ };
17
+ export type CheckboxCardDescriptionProps = React.ComponentPropsWithoutRef<"span"> & {
18
+ className?: string;
19
+ };
20
+ export type CheckboxCardLeadingVisualProps = React.ComponentPropsWithoutRef<"span"> & {
21
+ className?: string;
22
+ };
23
+ export type CheckboxCardContextValue = {
24
+ labelId?: string;
25
+ descriptionId?: string;
26
+ };
@@ -0,0 +1,2 @@
1
+ import type { CheckboxCardContextValue } from "./CheckboxCard.types";
2
+ export declare const CheckboxCardContext: import("react").Context<CheckboxCardContextValue>;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
+ className?: string;
4
+ } & React.RefAttributes<any>) => React.ReactNode;
5
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import CheckboxCardDescription from "./CheckboxCardDescription";
2
+ import CheckboxCardLabel from "./CheckboxCardLabel";
3
+ import CheckboxCardLeadingVisual from "./CheckboxCardLeadingVisual";
4
+ export declare const CheckboxCard: ((props: Omit<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref">, "onChange"> & {
5
+ value: string;
6
+ checked?: boolean;
7
+ defaultChecked?: boolean;
8
+ indeterminate?: boolean;
9
+ disabled?: boolean;
10
+ required?: boolean;
11
+ validationStatus?: import("./CheckboxCard.types").CheckboxCardValidationStatus;
12
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
13
+ className?: string;
14
+ } & import("react").RefAttributes<any>) => React.ReactNode) & {
15
+ LeadingVisual: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
16
+ className?: string;
17
+ } & import("react").RefAttributes<any>) => React.ReactNode;
18
+ Label: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
19
+ className?: string;
20
+ } & import("react").RefAttributes<any>) => React.ReactNode;
21
+ Description: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
22
+ className?: string;
23
+ } & import("react").RefAttributes<any>) => React.ReactNode;
24
+ };
25
+ export { CheckboxCardLeadingVisual, CheckboxCardLabel, CheckboxCardDescription };
26
+ export { CheckboxCardContext } from "./CheckboxCardContext";
27
+ export * from "./CheckboxCard.types";
@@ -1,16 +1,16 @@
1
1
  import * as React from "react";
2
- import type { UploadSize, UploadSource, UploadValidationStatus } from "./Upload.types";
2
+ import type { FileUploadSize, FileUploadSource, FileUploadValidationStatus } from "./FileUpload.types";
3
3
  declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & {
4
- size?: UploadSize;
4
+ size?: FileUploadSize;
5
5
  accept?: string;
6
6
  multiple?: boolean;
7
7
  disabled?: boolean;
8
8
  required?: boolean;
9
9
  name?: string;
10
10
  maxSize?: number;
11
- validationStatus?: UploadValidationStatus;
12
- onSelect?: (files: File[], source: UploadSource) => void;
13
- onReject?: (rejections: import("./Upload.types").UploadRejection[], source: UploadSource) => void;
11
+ validationStatus?: FileUploadValidationStatus;
12
+ onSelect?: (files: File[], source: FileUploadSource) => void;
13
+ onReject?: (rejections: import("./FileUpload.types").FileUploadRejection[], source: FileUploadSource) => void;
14
14
  className?: string;
15
15
  } & React.RefAttributes<any>) => React.ReactNode;
16
16
  export default _default;
@@ -0,0 +1,51 @@
1
+ import type * as React from "react";
2
+ export type FileUploadSize = "small" | "medium" | "large";
3
+ export type FileUploadValidationStatus = "error" | "success";
4
+ export type FileUploadSource = "input" | "drop";
5
+ export type FileUploadRejectionReason = "type" | "size" | "count";
6
+ export type FileUploadRejection = {
7
+ file: File;
8
+ reason: FileUploadRejectionReason;
9
+ };
10
+ export type FileUploadItemStatus = "pending" | "uploading" | "success" | "error";
11
+ export type FileUploadProps = Omit<React.ComponentPropsWithoutRef<"div">, "onSelect"> & {
12
+ size?: FileUploadSize;
13
+ accept?: string;
14
+ multiple?: boolean;
15
+ disabled?: boolean;
16
+ required?: boolean;
17
+ name?: string;
18
+ maxSize?: number;
19
+ validationStatus?: FileUploadValidationStatus;
20
+ onSelect?: (files: File[], source: FileUploadSource) => void;
21
+ onReject?: (rejections: FileUploadRejection[], source: FileUploadSource) => void;
22
+ className?: string;
23
+ };
24
+ export type FileUploadIconProps = React.ComponentPropsWithoutRef<"span"> & {
25
+ icon?: React.ElementType;
26
+ className?: string;
27
+ };
28
+ export type FileUploadLabelProps = React.ComponentPropsWithoutRef<"span"> & {
29
+ className?: string;
30
+ };
31
+ export type FileUploadDescriptionProps = React.ComponentPropsWithoutRef<"span"> & {
32
+ className?: string;
33
+ };
34
+ export type FileUploadListProps = React.ComponentPropsWithoutRef<"ul"> & {
35
+ className?: string;
36
+ };
37
+ export type FileUploadItemProps = React.ComponentPropsWithoutRef<"li"> & {
38
+ name: string;
39
+ fileSize?: number;
40
+ status?: FileUploadItemStatus;
41
+ progress?: number;
42
+ description?: React.ReactNode;
43
+ icon?: React.ElementType;
44
+ onRemove?: (event: React.MouseEvent<HTMLButtonElement>) => void;
45
+ removeLabel?: string;
46
+ className?: string;
47
+ };
48
+ export type FileUploadContextValue = {
49
+ labelId?: string;
50
+ descriptionId?: string;
51
+ };
@@ -0,0 +1,2 @@
1
+ import type { FileUploadContextValue } from "./FileUpload.types";
2
+ export declare const FileUploadContext: import("react").Context<FileUploadContextValue>;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
+ className?: string;
4
+ } & React.RefAttributes<any>) => React.ReactNode;
5
+ export default _default;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  declare const _default: (props: Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
3
3
  name: string;
4
4
  fileSize?: number;
5
- status?: import("./Upload.types").UploadItemStatus;
5
+ status?: import("./FileUpload.types").FileUploadItemStatus;
6
6
  progress?: number;
7
7
  description?: React.ReactNode;
8
8
  icon?: React.ElementType;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
+ className?: string;
4
+ } & React.RefAttributes<any>) => React.ReactNode;
5
+ export default _default;
@@ -1,9 +1,9 @@
1
- import type { UploadRejection } from "./Upload.types";
1
+ import type { FileUploadRejection } from "./FileUpload.types";
2
2
  export declare const formatFileSize: (bytes: number) => string;
3
3
  export declare const isFileAccepted: (file: File, accept?: string) => boolean;
4
4
  export type FileTriage = {
5
5
  accepted: File[];
6
- rejected: UploadRejection[];
6
+ rejected: FileUploadRejection[];
7
7
  };
8
8
  export type FileTriageOptions = {
9
9
  accept?: string;
@@ -1,19 +1,19 @@
1
- import UploadDescription from "./UploadDescription";
2
- import UploadIcon from "./UploadIcon";
3
- import UploadItem from "./UploadItem";
4
- import UploadLabel from "./UploadLabel";
5
- import UploadList from "./UploadList";
6
- export declare const Upload: ((props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & {
7
- size?: import("./Upload.types").UploadSize;
1
+ import FileUploadDescription from "./FileUploadDescription";
2
+ import FileUploadIcon from "./FileUploadIcon";
3
+ import FileUploadItem from "./FileUploadItem";
4
+ import FileUploadLabel from "./FileUploadLabel";
5
+ import FileUploadList from "./FileUploadList";
6
+ export declare const FileUpload: ((props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & {
7
+ size?: import("./FileUpload.types").FileUploadSize;
8
8
  accept?: string;
9
9
  multiple?: boolean;
10
10
  disabled?: boolean;
11
11
  required?: boolean;
12
12
  name?: string;
13
13
  maxSize?: number;
14
- validationStatus?: import("./Upload.types").UploadValidationStatus;
15
- onSelect?: (files: File[], source: import("./Upload.types").UploadSource) => void;
16
- onReject?: (rejections: import("./Upload.types").UploadRejection[], source: import("./Upload.types").UploadSource) => void;
14
+ validationStatus?: import("./FileUpload.types").FileUploadValidationStatus;
15
+ onSelect?: (files: File[], source: import("./FileUpload.types").FileUploadSource) => void;
16
+ onReject?: (rejections: import("./FileUpload.types").FileUploadRejection[], source: import("./FileUpload.types").FileUploadSource) => void;
17
17
  className?: string;
18
18
  } & import("react").RefAttributes<any>) => React.ReactNode) & {
19
19
  Icon: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
@@ -32,7 +32,7 @@ export declare const Upload: ((props: Omit<Omit<import("react").DetailedHTMLProp
32
32
  Item: (props: Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
33
33
  name: string;
34
34
  fileSize?: number;
35
- status?: import("./Upload.types").UploadItemStatus;
35
+ status?: import("./FileUpload.types").FileUploadItemStatus;
36
36
  progress?: number;
37
37
  description?: React.ReactNode;
38
38
  icon?: React.ElementType;
@@ -41,8 +41,8 @@ export declare const Upload: ((props: Omit<Omit<import("react").DetailedHTMLProp
41
41
  className?: string;
42
42
  } & import("react").RefAttributes<any>) => React.ReactNode;
43
43
  };
44
- export { UploadIcon, UploadLabel, UploadDescription, UploadList, UploadItem };
45
- export { UploadContext } from "./UploadContext";
44
+ export { FileUploadIcon, FileUploadLabel, FileUploadDescription, FileUploadList, FileUploadItem };
45
+ export { FileUploadContext } from "./FileUploadContext";
46
46
  export { formatFileSize, isFileAccepted, triageFiles } from "./files";
47
47
  export type { FileTriage, FileTriageOptions } from "./files";
48
- export * from "./Upload.types";
48
+ export * from "./FileUpload.types";
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import type { HoverCardProps } from "./HoverCard.types";
3
+ declare function HoverCard(props: HoverCardProps): React.JSX.Element;
4
+ declare namespace HoverCard {
5
+ var displayName: string;
6
+ }
7
+ export default HoverCard;
@@ -0,0 +1,33 @@
1
+ import type * as React from "react";
2
+ import type { AnchorAlignment, AnchorSide } from "../tooltip/anchoredPosition";
3
+ export type HoverCardProps = {
4
+ side?: AnchorSide;
5
+ align?: AnchorAlignment;
6
+ anchorOffset?: number;
7
+ alignmentOffset?: number;
8
+ openDelay?: number;
9
+ closeDelay?: number;
10
+ open?: boolean;
11
+ onOpenChange?: (open: boolean) => void;
12
+ disabled?: boolean;
13
+ portalContainerName?: string;
14
+ children?: React.ReactNode;
15
+ className?: string;
16
+ };
17
+ export type HoverCardTriggerProps = {
18
+ children?: React.ReactNode;
19
+ };
20
+ export type HoverCardContentProps = React.ComponentPropsWithoutRef<"div"> & {
21
+ className?: string;
22
+ };
23
+ export type HoverCardTriggerHandlers = {
24
+ ref: React.Ref<HTMLElement>;
25
+ "aria-describedby"?: string;
26
+ onPointerEnter: React.PointerEventHandler;
27
+ onPointerLeave: React.PointerEventHandler;
28
+ onFocus: React.FocusEventHandler;
29
+ onBlur: React.FocusEventHandler;
30
+ };
31
+ export type HoverCardContextValue = {
32
+ triggerHandlers?: HoverCardTriggerHandlers;
33
+ };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ className?: string;
4
+ } & React.RefAttributes<any>) => React.ReactNode;
5
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import type { HoverCardContextValue } from "./HoverCard.types";
2
+ export declare const HoverCardContext: import("react").Context<HoverCardContextValue>;