panelui-native 0.7.0 → 0.9.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/lib/module/components/attachment/index.js +219 -0
- package/lib/module/components/attachment/index.js.map +1 -0
- package/lib/module/components/bottom-sheet/index.js +15 -1
- package/lib/module/components/bottom-sheet/index.js.map +1 -1
- package/lib/module/components/dialog/index.js +6 -2
- package/lib/module/components/dialog/index.js.map +1 -1
- package/lib/module/components/empty-state/index.js +94 -17
- package/lib/module/components/empty-state/index.js.map +1 -1
- package/lib/module/components/line-chart/index.js +1024 -0
- package/lib/module/components/line-chart/index.js.map +1 -0
- package/lib/module/components/marker/index.js +190 -0
- package/lib/module/components/marker/index.js.map +1 -0
- package/lib/module/components/message/index.js +24 -8
- package/lib/module/components/message/index.js.map +1 -1
- package/lib/module/components/message-scroller/index.js +451 -0
- package/lib/module/components/message-scroller/index.js.map +1 -0
- package/lib/module/components/popover/index.js +500 -0
- package/lib/module/components/popover/index.js.map +1 -0
- package/lib/module/components/radio-group/index.js +104 -16
- package/lib/module/components/radio-group/index.js.map +1 -1
- package/lib/module/components/separator/index.js +91 -0
- package/lib/module/components/separator/index.js.map +1 -0
- package/lib/module/components/surface/index.js +21 -2
- package/lib/module/components/surface/index.js.map +1 -1
- package/lib/module/icons/index.js +69 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +7 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/primitives/scrim.js +72 -0
- package/lib/module/primitives/scrim.js.map +1 -0
- package/lib/typescript/src/components/attachment/index.d.ts +93 -0
- package/lib/typescript/src/components/attachment/index.d.ts.map +1 -0
- package/lib/typescript/src/components/bottom-sheet/index.d.ts +6 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/index.d.ts +7 -1
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/index.d.ts +152 -2
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -1
- package/lib/typescript/src/components/line-chart/index.d.ts +247 -0
- package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/components/marker/index.d.ts +137 -0
- package/lib/typescript/src/components/marker/index.d.ts.map +1 -0
- package/lib/typescript/src/components/message/index.d.ts +8 -1
- package/lib/typescript/src/components/message/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message-scroller/index.d.ts +150 -0
- package/lib/typescript/src/components/message-scroller/index.d.ts.map +1 -0
- package/lib/typescript/src/components/popover/index.d.ts +130 -0
- package/lib/typescript/src/components/popover/index.d.ts.map +1 -0
- package/lib/typescript/src/components/radio-group/index.d.ts +32 -0
- package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/separator/index.d.ts +47 -0
- package/lib/typescript/src/components/separator/index.d.ts.map +1 -0
- package/lib/typescript/src/components/surface/index.d.ts +51 -2
- package/lib/typescript/src/components/surface/index.d.ts.map +1 -1
- package/lib/typescript/src/icons/index.d.ts +6 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +7 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/primitives/scrim.d.ts +21 -0
- package/lib/typescript/src/primitives/scrim.d.ts.map +1 -0
- package/package.json +5 -1
- package/src/components/attachment/index.tsx +279 -0
- package/src/components/bottom-sheet/index.tsx +20 -0
- package/src/components/dialog/index.tsx +10 -1
- package/src/components/empty-state/index.tsx +60 -14
- package/src/components/line-chart/index.tsx +1224 -0
- package/src/components/marker/index.tsx +194 -0
- package/src/components/message/index.tsx +29 -5
- package/src/components/message-scroller/index.tsx +574 -0
- package/src/components/popover/index.tsx +599 -0
- package/src/components/radio-group/index.tsx +108 -17
- package/src/components/separator/index.tsx +97 -0
- package/src/components/surface/index.tsx +29 -3
- package/src/icons/index.tsx +48 -0
- package/src/index.ts +60 -0
- package/src/primitives/scrim.tsx +95 -0
- package/theme.css +58 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attachment — a file, with its upload life.
|
|
3
|
+
*
|
|
4
|
+
* A file in a chat composer or an upload list is the same row shape `Item`
|
|
5
|
+
* already draws — media, a name, a size, a remove button — so this is that row,
|
|
6
|
+
* not a second one. What it adds is the part `Item` has no opinion on: the
|
|
7
|
+
* file's *state*. A file is picked, then uploading, then processing, then done
|
|
8
|
+
* (or failed), and each of those has to look different or the user cannot tell
|
|
9
|
+
* a stuck upload from a finished one.
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Attachment state="uploading">
|
|
13
|
+
* <Attachment.Media><FileIcon /></Attachment.Media>
|
|
14
|
+
* <Attachment.Content>
|
|
15
|
+
* <Attachment.Title>report.pdf</Attachment.Title>
|
|
16
|
+
* <Attachment.Description>PDF · 2.4 MB</Attachment.Description>
|
|
17
|
+
* </Attachment.Content>
|
|
18
|
+
* <Attachment.Actions>
|
|
19
|
+
* <Attachment.Action aria-label="Cancel"><XIcon size={14} /></Attachment.Action>
|
|
20
|
+
* </Attachment.Actions>
|
|
21
|
+
* </Attachment>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* While uploading or processing the title shimmers — the same sweep the rest of
|
|
25
|
+
* the library uses for "in progress" — and an optional bar tracks `progress`.
|
|
26
|
+
* A failed file tints its name and description in the destructive colour, which
|
|
27
|
+
* carries the state without relying on an icon nobody reads.
|
|
28
|
+
*/
|
|
29
|
+
import { type ReactNode } from 'react';
|
|
30
|
+
import { View, type ViewProps } from 'react-native';
|
|
31
|
+
import { type AnimatedPressableProps } from '../../primitives/animated-pressable.js';
|
|
32
|
+
import { type TextProps } from '../../primitives/text.js';
|
|
33
|
+
export type AttachmentState = 'idle' | 'uploading' | 'processing' | 'error' | 'done';
|
|
34
|
+
type AttachmentSize = 'default' | 'sm' | 'xs';
|
|
35
|
+
export interface AttachmentProps extends Omit<AnimatedPressableProps, 'children' | 'disabled'> {
|
|
36
|
+
className?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Where the file is in its life. `uploading`/`processing` shimmer the name;
|
|
39
|
+
* `error` tints the row destructive. Default `done`.
|
|
40
|
+
*/
|
|
41
|
+
state?: AttachmentState;
|
|
42
|
+
/** Row density, passed through to the underlying Item. */
|
|
43
|
+
size?: AttachmentSize;
|
|
44
|
+
/** Stack the row into a card — for a horizontal group of thumbnails. */
|
|
45
|
+
orientation?: 'horizontal' | 'vertical';
|
|
46
|
+
/** Upload progress 0–1. Draws a thin bar along the bottom while busy. */
|
|
47
|
+
progress?: number;
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
}
|
|
51
|
+
export interface AttachmentGroupProps extends ViewProps {
|
|
52
|
+
className?: string;
|
|
53
|
+
orientation?: 'horizontal' | 'vertical';
|
|
54
|
+
children?: ReactNode;
|
|
55
|
+
}
|
|
56
|
+
export interface AttachmentMediaProps extends ViewProps {
|
|
57
|
+
className?: string;
|
|
58
|
+
/** `icon` frames it in a tile; `image` clips it for a thumbnail. */
|
|
59
|
+
variant?: 'default' | 'icon' | 'image';
|
|
60
|
+
children?: ReactNode;
|
|
61
|
+
}
|
|
62
|
+
export interface AttachmentContentProps extends ViewProps {
|
|
63
|
+
className?: string;
|
|
64
|
+
children?: ReactNode;
|
|
65
|
+
}
|
|
66
|
+
export interface AttachmentTitleProps extends TextProps {
|
|
67
|
+
className?: string;
|
|
68
|
+
children?: ReactNode;
|
|
69
|
+
}
|
|
70
|
+
export interface AttachmentDescriptionProps extends TextProps {
|
|
71
|
+
className?: string;
|
|
72
|
+
children?: ReactNode;
|
|
73
|
+
}
|
|
74
|
+
export interface AttachmentActionsProps extends ViewProps {
|
|
75
|
+
className?: string;
|
|
76
|
+
children?: ReactNode;
|
|
77
|
+
}
|
|
78
|
+
export interface AttachmentActionProps extends Omit<AnimatedPressableProps, 'children'> {
|
|
79
|
+
className?: string;
|
|
80
|
+
accessibilityLabel: string;
|
|
81
|
+
children?: ReactNode;
|
|
82
|
+
}
|
|
83
|
+
export declare const Attachment: import("react").ForwardRefExoticComponent<AttachmentProps & import("react").RefAttributes<View>> & {
|
|
84
|
+
Group: import("react").ForwardRefExoticComponent<AttachmentGroupProps & import("react").RefAttributes<View>>;
|
|
85
|
+
Media: import("react").ForwardRefExoticComponent<AttachmentMediaProps & import("react").RefAttributes<View>>;
|
|
86
|
+
Content: import("react").ForwardRefExoticComponent<AttachmentContentProps & import("react").RefAttributes<View>>;
|
|
87
|
+
Title: import("react").ForwardRefExoticComponent<AttachmentTitleProps & import("react").RefAttributes<import("react-native").Text>>;
|
|
88
|
+
Description: import("react").ForwardRefExoticComponent<AttachmentDescriptionProps & import("react").RefAttributes<import("react-native").Text>>;
|
|
89
|
+
Actions: import("react").ForwardRefExoticComponent<AttachmentActionsProps & import("react").RefAttributes<View>>;
|
|
90
|
+
Action: import("react").ForwardRefExoticComponent<AttachmentActionProps & import("react").RefAttributes<View>>;
|
|
91
|
+
};
|
|
92
|
+
export {};
|
|
93
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/attachment/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,wCAAqC,CAAC;AACrG,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAK7D,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,GAAG,OAAO,GAAG,MAAM,CAAC;AACrF,KAAK,cAAc,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAA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AAC,EAAE,SAAS,CAAC;CACtB;AAWD,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAyBD,eAAO,MAAM,UAAU;;;;;;;;CAQrB,CAAC"}
|
|
@@ -39,9 +39,14 @@ export interface BottomSheetContentProps extends ViewProps {
|
|
|
39
39
|
className?: string;
|
|
40
40
|
/** Tap on the backdrop closes the sheet. Default true. */
|
|
41
41
|
dismissible?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Show a close button in the top-right corner. On by default for the styled
|
|
44
|
+
* sheet; ignored by the native sheet, which has its own dismiss affordances.
|
|
45
|
+
*/
|
|
46
|
+
showClose?: boolean;
|
|
42
47
|
children?: ReactNode;
|
|
43
48
|
}
|
|
44
|
-
declare function BottomSheetContent({ className, dismissible, children, ...props }: BottomSheetContentProps): import("react").JSX.Element | null;
|
|
49
|
+
declare function BottomSheetContent({ className, dismissible, showClose, children, ...props }: BottomSheetContentProps): import("react").JSX.Element | null;
|
|
45
50
|
export declare const BottomSheet: typeof BottomSheetRoot & {
|
|
46
51
|
Trigger: typeof BottomSheetTrigger;
|
|
47
52
|
Content: typeof BottomSheetContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/bottom-sheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/bottom-sheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OA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IzB;AAED,eAAO,MAAM,WAAW;;;CAGtB,CAAC"}
|
|
@@ -23,9 +23,15 @@ export interface DialogContentProps extends ViewProps {
|
|
|
23
23
|
className?: string;
|
|
24
24
|
/** Tap on the backdrop closes the dialog. Default true. */
|
|
25
25
|
dismissible?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Frost the screen behind the dialog instead of dimming it. Uses `expo-blur`
|
|
28
|
+
* when installed and falls back to the dim when it is not, so it is safe to
|
|
29
|
+
* pass either way.
|
|
30
|
+
*/
|
|
31
|
+
blur?: boolean;
|
|
26
32
|
children?: ReactNode;
|
|
27
33
|
}
|
|
28
|
-
declare function DialogContent({ className, dismissible, children, ...props }: DialogContentProps): import("react").JSX.Element | null;
|
|
34
|
+
declare function DialogContent({ className, dismissible, blur, children, ...props }: DialogContentProps): import("react").JSX.Element | null;
|
|
29
35
|
declare function DialogFooter({ className, ...props }: ViewProps & {
|
|
30
36
|
className?: string;
|
|
31
37
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/dialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/dialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI/D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAkB7D,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,Y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AAO,EAAE,KAAK,IAAI;wDAchE;AAED,eAAO,MAAM,MAAM;;;;;;;CAOjB,CAAC"}
|
|
@@ -10,6 +10,104 @@ import { type ReactNode } from 'react';
|
|
|
10
10
|
import { View, type Text as RNText, type ViewProps } from 'react-native';
|
|
11
11
|
import { type VariantProps } from 'tailwind-variants';
|
|
12
12
|
import { type TextProps } from '../../primitives/text.js';
|
|
13
|
+
type EmptyStateSize = 'sm' | 'default' | 'lg';
|
|
14
|
+
declare const emptyStateVariants: import("tailwind-variants").TVReturnType<{
|
|
15
|
+
variant: {
|
|
16
|
+
default: {
|
|
17
|
+
root: string;
|
|
18
|
+
};
|
|
19
|
+
card: {
|
|
20
|
+
root: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
size: {
|
|
24
|
+
sm: {
|
|
25
|
+
root: string;
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
default: {
|
|
30
|
+
root: string;
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
lg: {
|
|
35
|
+
root: string;
|
|
36
|
+
title: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}, {
|
|
41
|
+
root: string;
|
|
42
|
+
header: string;
|
|
43
|
+
title: string;
|
|
44
|
+
description: string;
|
|
45
|
+
content: string;
|
|
46
|
+
}, undefined, {
|
|
47
|
+
variant: {
|
|
48
|
+
default: {
|
|
49
|
+
root: string;
|
|
50
|
+
};
|
|
51
|
+
card: {
|
|
52
|
+
root: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
size: {
|
|
56
|
+
sm: {
|
|
57
|
+
root: string;
|
|
58
|
+
title: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
default: {
|
|
62
|
+
root: string;
|
|
63
|
+
title: string;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
lg: {
|
|
67
|
+
root: string;
|
|
68
|
+
title: string;
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}, {
|
|
73
|
+
root: string;
|
|
74
|
+
header: string;
|
|
75
|
+
title: string;
|
|
76
|
+
description: string;
|
|
77
|
+
content: string;
|
|
78
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
79
|
+
variant: {
|
|
80
|
+
default: {
|
|
81
|
+
root: string;
|
|
82
|
+
};
|
|
83
|
+
card: {
|
|
84
|
+
root: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
size: {
|
|
88
|
+
sm: {
|
|
89
|
+
root: string;
|
|
90
|
+
title: string;
|
|
91
|
+
description: string;
|
|
92
|
+
};
|
|
93
|
+
default: {
|
|
94
|
+
root: string;
|
|
95
|
+
title: string;
|
|
96
|
+
description: string;
|
|
97
|
+
};
|
|
98
|
+
lg: {
|
|
99
|
+
root: string;
|
|
100
|
+
title: string;
|
|
101
|
+
description: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
}, {
|
|
105
|
+
root: string;
|
|
106
|
+
header: string;
|
|
107
|
+
title: string;
|
|
108
|
+
description: string;
|
|
109
|
+
content: string;
|
|
110
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
13
111
|
declare const mediaVariants: import("tailwind-variants").TVReturnType<{
|
|
14
112
|
variant: {
|
|
15
113
|
default: {
|
|
@@ -20,6 +118,20 @@ declare const mediaVariants: import("tailwind-variants").TVReturnType<{
|
|
|
20
118
|
card: string;
|
|
21
119
|
};
|
|
22
120
|
};
|
|
121
|
+
size: {
|
|
122
|
+
sm: {
|
|
123
|
+
card: string;
|
|
124
|
+
ghost: string;
|
|
125
|
+
};
|
|
126
|
+
default: {
|
|
127
|
+
card: string;
|
|
128
|
+
ghost: string;
|
|
129
|
+
};
|
|
130
|
+
lg: {
|
|
131
|
+
card: string;
|
|
132
|
+
ghost: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
23
135
|
}, {
|
|
24
136
|
wrapper: string;
|
|
25
137
|
card: string;
|
|
@@ -34,6 +146,20 @@ declare const mediaVariants: import("tailwind-variants").TVReturnType<{
|
|
|
34
146
|
card: string;
|
|
35
147
|
};
|
|
36
148
|
};
|
|
149
|
+
size: {
|
|
150
|
+
sm: {
|
|
151
|
+
card: string;
|
|
152
|
+
ghost: string;
|
|
153
|
+
};
|
|
154
|
+
default: {
|
|
155
|
+
card: string;
|
|
156
|
+
ghost: string;
|
|
157
|
+
};
|
|
158
|
+
lg: {
|
|
159
|
+
card: string;
|
|
160
|
+
ghost: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
37
163
|
}, {
|
|
38
164
|
wrapper: string;
|
|
39
165
|
card: string;
|
|
@@ -48,13 +174,35 @@ declare const mediaVariants: import("tailwind-variants").TVReturnType<{
|
|
|
48
174
|
card: string;
|
|
49
175
|
};
|
|
50
176
|
};
|
|
177
|
+
size: {
|
|
178
|
+
sm: {
|
|
179
|
+
card: string;
|
|
180
|
+
ghost: string;
|
|
181
|
+
};
|
|
182
|
+
default: {
|
|
183
|
+
card: string;
|
|
184
|
+
ghost: string;
|
|
185
|
+
};
|
|
186
|
+
lg: {
|
|
187
|
+
card: string;
|
|
188
|
+
ghost: string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
51
191
|
}, {
|
|
52
192
|
wrapper: string;
|
|
53
193
|
card: string;
|
|
54
194
|
ghost: string;
|
|
55
195
|
}, undefined, unknown, unknown, undefined>>;
|
|
56
|
-
export interface EmptyStateProps extends ViewProps {
|
|
196
|
+
export interface EmptyStateProps extends ViewProps, VariantProps<typeof emptyStateVariants> {
|
|
57
197
|
className?: string;
|
|
198
|
+
/**
|
|
199
|
+
* `default` fills its parent — a whole screen, or a flex slot. `card` is a
|
|
200
|
+
* self-contained bordered block for an empty state that sits inside content
|
|
201
|
+
* rather than owning the screen.
|
|
202
|
+
*/
|
|
203
|
+
variant?: 'default' | 'card';
|
|
204
|
+
/** Scales the padding, media, title and description together. */
|
|
205
|
+
size?: EmptyStateSize;
|
|
58
206
|
children?: ReactNode;
|
|
59
207
|
}
|
|
60
208
|
export interface EmptyStateMediaProps extends ViewProps, VariantProps<typeof mediaVariants> {
|
|
@@ -66,7 +214,9 @@ export declare const EmptyState: import("react").ForwardRefExoticComponent<Empty
|
|
|
66
214
|
Media: import("react").ForwardRefExoticComponent<EmptyStateMediaProps & import("react").RefAttributes<View>>;
|
|
67
215
|
Title: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
68
216
|
Description: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
69
|
-
Content: import("react").ForwardRefExoticComponent<
|
|
217
|
+
Content: import("react").ForwardRefExoticComponent<ViewProps & {
|
|
218
|
+
className?: string;
|
|
219
|
+
} & import("react").RefAttributes<View>>;
|
|
70
220
|
};
|
|
71
221
|
export {};
|
|
72
222
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/empty-state/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/empty-state/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAE7D,KAAK,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;AAK9C,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA0BtB,CAAC;AAEH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA0BjB,CAAC;AAEH,MAAM,WAAW,eACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,iEAAiE;IACjE,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAuBD,MAAM,WAAW,oBACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA2DD,eAAO,MAAM,UAAU;;;;;;oBAR8C,MAAM;;CAczE,CAAC"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LineChart — a time series, drawn and animated on the UI thread.
|
|
3
|
+
*
|
|
4
|
+
* The chart is composed rather than configured: the grid, each series, the
|
|
5
|
+
* axis and the crosshair are separate children, so a chart that wants no grid
|
|
6
|
+
* simply does not have one. A single component with twenty booleans is how
|
|
7
|
+
* charts end up unreadable at the call site.
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <LineChart data={visits} xDataKey="date">
|
|
11
|
+
* <LineChart.Grid />
|
|
12
|
+
* <LineChart.Area dataKey="visits" />
|
|
13
|
+
* <LineChart.Line dataKey="visits" />
|
|
14
|
+
* <LineChart.XAxis />
|
|
15
|
+
* <LineChart.Tooltip />
|
|
16
|
+
* </LineChart>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Internally there are two layers, and the parts sort themselves into the
|
|
20
|
+
* right one: the geometry is SVG, and anything with text or a gesture on it is
|
|
21
|
+
* a React Native view laid over the top. That split is not a detail — SVG text
|
|
22
|
+
* ignores the platform's text scaling and the theme's font, and a gesture
|
|
23
|
+
* handler cannot be attached to an SVG node at all.
|
|
24
|
+
*
|
|
25
|
+
* Three things animate, each for a different reason:
|
|
26
|
+
*
|
|
27
|
+
* - **The reveal.** On mount the plot is uncovered left to right by an animated
|
|
28
|
+
* clip rectangle. Everything inside shares that clip, so the line, its fill
|
|
29
|
+
* and its markers arrive together rather than as three separate effects.
|
|
30
|
+
* - **The y-domain.** When the data changes the *scale* is tweened rather than
|
|
31
|
+
* the path swapped, so a series that grows is redrawn against a moving axis
|
|
32
|
+
* instead of jumping to a new shape. The reveal does not replay — it happened
|
|
33
|
+
* once, and repeating it on every refresh turns a data update into an
|
|
34
|
+
* animation.
|
|
35
|
+
* - **The crosshair.** A drag resolves the nearest index on the UI thread and
|
|
36
|
+
* moves the line and the dots from there. Only the index crosses back into
|
|
37
|
+
* JS, and only when it changes, so a drag costs a handful of re-renders
|
|
38
|
+
* rather than one per frame.
|
|
39
|
+
*
|
|
40
|
+
* Colours come from the `--color-chart-*` tokens, so a chart follows the active
|
|
41
|
+
* theme and is put on brand by overriding those five in the app's own
|
|
42
|
+
* global.css. Nothing here hardcodes a hex.
|
|
43
|
+
*/
|
|
44
|
+
import { type ReactNode } from 'react';
|
|
45
|
+
import { type ViewProps } from 'react-native';
|
|
46
|
+
/**
|
|
47
|
+
* Which layer a part belongs to. Read off the component itself, so composition
|
|
48
|
+
* stays a flat list of children instead of two nested slots the caller has to
|
|
49
|
+
* remember the order of.
|
|
50
|
+
*/
|
|
51
|
+
type Layer = 'svg' | 'overlay';
|
|
52
|
+
export type LineChartStatus = 'loading' | 'ready';
|
|
53
|
+
export type LineChartCurve = 'monotone' | 'linear';
|
|
54
|
+
export type LineChartDatum = Record<string, string | number | null | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* The point under the crosshair, for something rendered *inside* the chart.
|
|
57
|
+
*
|
|
58
|
+
* A readout usually belongs in the card's header, which is outside this
|
|
59
|
+
* provider — use `onActiveIndexChange` for that. A hook cannot reach up out of
|
|
60
|
+
* the subtree it is called in, and pretending otherwise is how a component
|
|
61
|
+
* ends up with a context that has to wrap half the screen.
|
|
62
|
+
*/
|
|
63
|
+
export declare function useLineChart(): {
|
|
64
|
+
activeIndex: number;
|
|
65
|
+
activePoint: LineChartDatum | null;
|
|
66
|
+
xDataKey: string;
|
|
67
|
+
};
|
|
68
|
+
export interface LineChartProps extends ViewProps {
|
|
69
|
+
className?: string;
|
|
70
|
+
/** The rows. Each one is a point along the x-axis. */
|
|
71
|
+
data: LineChartDatum[];
|
|
72
|
+
/** Key holding the x label. Used by the axis and the crosshair readout. */
|
|
73
|
+
xDataKey?: string;
|
|
74
|
+
/**
|
|
75
|
+
* `loading` draws a flat skeleton with a sweep running along it, and morphs
|
|
76
|
+
* into the real series when it turns `ready`. One component throughout,
|
|
77
|
+
* rather than a spinner swapped for a chart — swapping loses the transition.
|
|
78
|
+
*/
|
|
79
|
+
status?: LineChartStatus;
|
|
80
|
+
/** Width ÷ height. `2` is the wide card shape; `1.6` suits a narrow column. */
|
|
81
|
+
aspectRatio?: number;
|
|
82
|
+
/** Milliseconds for the reveal on mount. */
|
|
83
|
+
animationDuration?: number;
|
|
84
|
+
/** Milliseconds for the y-axis to settle after the data changes. */
|
|
85
|
+
domainDuration?: number;
|
|
86
|
+
/** Fix the y-axis instead of deriving it from the data. */
|
|
87
|
+
yDomain?: [number, number];
|
|
88
|
+
/** `monotone` never overshoots between points; `linear` joins them straight. */
|
|
89
|
+
curve?: LineChartCurve;
|
|
90
|
+
/**
|
|
91
|
+
* The point under the crosshair as it moves, and `-1`/`null` when the finger
|
|
92
|
+
* lifts. This is how a readout in the card's header gets its value — that
|
|
93
|
+
* header is outside the chart, so it cannot use `useLineChart`.
|
|
94
|
+
*
|
|
95
|
+
* Fires when the index changes, not per frame.
|
|
96
|
+
*/
|
|
97
|
+
onActiveIndexChange?: (index: number, datum: LineChartDatum | null) => void;
|
|
98
|
+
/**
|
|
99
|
+
* Drop the axis padding so the line reaches the edges — for a sparkline with
|
|
100
|
+
* no grid, axis or crosshair, where the shape is the whole point.
|
|
101
|
+
*/
|
|
102
|
+
compact?: boolean;
|
|
103
|
+
children?: ReactNode;
|
|
104
|
+
}
|
|
105
|
+
/** Imperative handle: re-run the reveal on demand, for a "replay" control. */
|
|
106
|
+
export interface LineChartHandle {
|
|
107
|
+
replay: () => void;
|
|
108
|
+
}
|
|
109
|
+
export interface LineChartGridProps {
|
|
110
|
+
/** Horizontal rules across the plot. */
|
|
111
|
+
rows?: number;
|
|
112
|
+
color?: string;
|
|
113
|
+
/** Dash pattern, e.g. `"4,6"`. Omit for a solid rule. */
|
|
114
|
+
dashArray?: string;
|
|
115
|
+
opacity?: number;
|
|
116
|
+
}
|
|
117
|
+
/** Horizontal reference lines. Drawn under everything, outside the reveal clip. */
|
|
118
|
+
declare function LineChartGrid({ rows, color, dashArray, opacity }: LineChartGridProps): import("react").JSX.Element;
|
|
119
|
+
declare namespace LineChartGrid {
|
|
120
|
+
var displayName: string;
|
|
121
|
+
var layer: Layer;
|
|
122
|
+
}
|
|
123
|
+
export interface LineChartLineProps {
|
|
124
|
+
/** Key holding this series' y values. */
|
|
125
|
+
dataKey: string;
|
|
126
|
+
/**
|
|
127
|
+
* Stroke colour. Defaults to the `--color-chart-*` token at `colorIndex`, so
|
|
128
|
+
* a series follows the theme without the call site naming a colour.
|
|
129
|
+
*/
|
|
130
|
+
color?: string;
|
|
131
|
+
/** Which `--color-chart-*` token to take when `color` is not given. */
|
|
132
|
+
colorIndex?: 1 | 2 | 3 | 4 | 5;
|
|
133
|
+
strokeWidth?: number;
|
|
134
|
+
/** Dash pattern, e.g. `"6,4"` — for a projection or a secondary series. */
|
|
135
|
+
dashArray?: string;
|
|
136
|
+
/** A dot at every point. Best kept for short series. */
|
|
137
|
+
showMarkers?: boolean;
|
|
138
|
+
}
|
|
139
|
+
/** One series. */
|
|
140
|
+
declare function LineChartLine({ dataKey, color, colorIndex, strokeWidth, dashArray, showMarkers, }: LineChartLineProps): import("react").JSX.Element;
|
|
141
|
+
declare namespace LineChartLine {
|
|
142
|
+
var displayName: string;
|
|
143
|
+
var layer: Layer;
|
|
144
|
+
}
|
|
145
|
+
export interface LineChartAreaProps {
|
|
146
|
+
dataKey: string;
|
|
147
|
+
color?: string;
|
|
148
|
+
colorIndex?: 1 | 2 | 3 | 4 | 5;
|
|
149
|
+
/** Opacity at the line. Fades to nothing at the baseline. */
|
|
150
|
+
opacity?: number;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The fill under a series. A separate child from the line, because a chart with
|
|
154
|
+
* two series usually wants the fill on only one of them — two translucent
|
|
155
|
+
* fills over each other make a third colour that means nothing.
|
|
156
|
+
*/
|
|
157
|
+
declare function LineChartArea({ dataKey, color, colorIndex, opacity }: LineChartAreaProps): import("react").JSX.Element;
|
|
158
|
+
declare namespace LineChartArea {
|
|
159
|
+
var displayName: string;
|
|
160
|
+
var layer: Layer;
|
|
161
|
+
}
|
|
162
|
+
export interface LineChartSkeletonProps {
|
|
163
|
+
/** Milliseconds for one pass of the sweep. */
|
|
164
|
+
duration?: number;
|
|
165
|
+
color?: string;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* The loading state: a flat rule where the series will be, with a highlight
|
|
169
|
+
* travelling along it. Drawn inside the same SVG rather than as an overlay, so
|
|
170
|
+
* arriving data is one tree changing rather than one view replacing another —
|
|
171
|
+
* which is what lets the flat line become the series instead of cutting to it.
|
|
172
|
+
*/
|
|
173
|
+
declare function LineChartSkeleton({ duration, color }: LineChartSkeletonProps): import("react").JSX.Element | null;
|
|
174
|
+
declare namespace LineChartSkeleton {
|
|
175
|
+
var displayName: string;
|
|
176
|
+
var layer: Layer;
|
|
177
|
+
}
|
|
178
|
+
export interface LineChartXAxisProps {
|
|
179
|
+
/** How many labels to show. The rest are dropped, evenly. */
|
|
180
|
+
ticks?: number;
|
|
181
|
+
/** Turn a row into its label. Defaults to the value at `xDataKey`. */
|
|
182
|
+
format?: (datum: LineChartDatum, index: number) => string;
|
|
183
|
+
className?: string;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* The x labels. Real text rather than SVG text, so they follow the theme's font
|
|
187
|
+
* and the platform's text scaling — SVG text does neither.
|
|
188
|
+
*/
|
|
189
|
+
declare function LineChartXAxis({ ticks, format, className }: LineChartXAxisProps): import("react").JSX.Element;
|
|
190
|
+
declare namespace LineChartXAxis {
|
|
191
|
+
var displayName: string;
|
|
192
|
+
var layer: Layer;
|
|
193
|
+
}
|
|
194
|
+
export interface LineChartTooltipProps {
|
|
195
|
+
color?: string;
|
|
196
|
+
/**
|
|
197
|
+
* Float a small label at the crosshair showing the x-value and each series'
|
|
198
|
+
* value at that point — the minimal readout a drag wants. On by default.
|
|
199
|
+
*/
|
|
200
|
+
showLabel?: boolean;
|
|
201
|
+
/** Format one series' value for the label. Defaults to a compact number. */
|
|
202
|
+
formatValue?: (value: number, key: string) => string;
|
|
203
|
+
/** Format the label's heading from the row. Defaults to the value at xDataKey. */
|
|
204
|
+
formatX?: (datum: LineChartDatum) => string;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* The crosshair, the gesture that drives it, and the label that rides it.
|
|
208
|
+
*
|
|
209
|
+
* They live in the view layer: a gesture handler cannot be attached to an SVG
|
|
210
|
+
* node, and once the gesture is a view the crosshair may as well be one too —
|
|
211
|
+
* a 1px view moved by `translateX` costs less than re-rendering an SVG line.
|
|
212
|
+
* The label follows on the UI thread the same way; only its *text* crosses back
|
|
213
|
+
* into JS, and only when the active index changes.
|
|
214
|
+
*
|
|
215
|
+
* The hit area is the whole plot. A crosshair you have to land on the line to
|
|
216
|
+
* summon is a crosshair nobody finds.
|
|
217
|
+
*/
|
|
218
|
+
declare function LineChartTooltip({ color, showLabel, formatValue, formatX }: LineChartTooltipProps): import("react").JSX.Element | null;
|
|
219
|
+
declare namespace LineChartTooltip {
|
|
220
|
+
var displayName: string;
|
|
221
|
+
var layer: Layer;
|
|
222
|
+
}
|
|
223
|
+
export interface LineChartLegendProps extends ViewProps {
|
|
224
|
+
className?: string;
|
|
225
|
+
/** Label per series key. A key with no label falls back to the key itself. */
|
|
226
|
+
labels?: Record<string, string>;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* A swatch and a name per registered series. Sits in the top-left of the plot
|
|
230
|
+
* by default — move it with `className`.
|
|
231
|
+
*/
|
|
232
|
+
declare function LineChartLegend({ className, labels, ...props }: LineChartLegendProps): import("react").JSX.Element;
|
|
233
|
+
declare namespace LineChartLegend {
|
|
234
|
+
var displayName: string;
|
|
235
|
+
var layer: Layer;
|
|
236
|
+
}
|
|
237
|
+
export declare const LineChart: import("react").ForwardRefExoticComponent<LineChartProps & import("react").RefAttributes<LineChartHandle>> & {
|
|
238
|
+
Grid: typeof LineChartGrid;
|
|
239
|
+
Area: typeof LineChartArea;
|
|
240
|
+
Line: typeof LineChartLine;
|
|
241
|
+
Skeleton: typeof LineChartSkeleton;
|
|
242
|
+
XAxis: typeof LineChartXAxis;
|
|
243
|
+
Tooltip: typeof LineChartTooltip;
|
|
244
|
+
Legend: typeof LineChartLegend;
|
|
245
|
+
};
|
|
246
|
+
export {};
|
|
247
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/line-chart/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAqCxF;;;;GAIG;AACH,KAAK,KAAK,GAAG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