panelui-native 0.6.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/README.md +1 -1
- package/lib/module/components/accordion/index.js +7 -5
- package/lib/module/components/accordion/index.js.map +1 -1
- package/lib/module/components/alert/index.js +3 -6
- package/lib/module/components/alert/index.js.map +1 -1
- 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 +82 -4
- package/lib/module/components/bottom-sheet/index.js.map +1 -1
- package/lib/module/components/button/index.js +36 -1
- package/lib/module/components/button/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 +98 -22
- package/lib/module/components/empty-state/index.js.map +1 -1
- package/lib/module/components/inline-select/index.js +171 -46
- package/lib/module/components/inline-select/index.js.map +1 -1
- package/lib/module/components/input/index.js +28 -5
- package/lib/module/components/input/index.js.map +1 -1
- package/lib/module/components/input-group/index.js +0 -1
- package/lib/module/components/input-group/index.js.map +1 -1
- package/lib/module/components/item/index.js +359 -0
- package/lib/module/components/item/index.js.map +1 -0
- package/lib/module/components/label/index.js +5 -3
- package/lib/module/components/label/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 +334 -0
- package/lib/module/components/message/index.js.map +1 -0
- 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/scroll-fade/index.js +119 -71
- package/lib/module/components/scroll-fade/index.js.map +1 -1
- package/lib/module/components/select/index.js +35 -6
- package/lib/module/components/select/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/shimmer/index.js +111 -64
- package/lib/module/components/shimmer/index.js.map +1 -1
- package/lib/module/components/surface/index.js +24 -4
- package/lib/module/components/surface/index.js.map +1 -1
- package/lib/module/components/switch/index.js +20 -1
- package/lib/module/components/switch/index.js.map +1 -1
- package/lib/module/components/toast/index.js +7 -8
- package/lib/module/components/toast/index.js.map +1 -1
- package/lib/module/components/typography/index.js +3 -3
- package/lib/module/hooks/index.js +1 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/use-breakpoint.js +2 -2
- package/lib/module/hooks/use-copy-to-clipboard.js +0 -2
- package/lib/module/hooks/use-copy-to-clipboard.js.map +1 -1
- package/lib/module/hooks/use-keyboard-avoidance.js +120 -0
- package/lib/module/hooks/use-keyboard-avoidance.js.map +1 -0
- package/lib/module/icons/index.js +73 -4
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +13 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/index.js +53 -0
- package/lib/module/native/index.js.map +1 -0
- package/lib/module/primitives/keyboard-avoider.js +40 -0
- package/lib/module/primitives/keyboard-avoider.js.map +1 -0
- package/lib/module/primitives/scrim.js +72 -0
- package/lib/module/primitives/scrim.js.map +1 -0
- package/lib/module/providers/panel-ui-provider.js +24 -4
- package/lib/module/providers/panel-ui-provider.js.map +1 -1
- package/lib/module/theme/use-theme.js +1 -1
- package/lib/typescript/src/components/accordion/index.d.ts +7 -5
- package/lib/typescript/src/components/accordion/index.d.ts.map +1 -1
- package/lib/typescript/src/components/alert/index.d.ts +3 -6
- package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
- 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 +27 -2
- package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +11 -0
- package/lib/typescript/src/components/button/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 +156 -7
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -1
- package/lib/typescript/src/components/inline-select/index.d.ts +29 -6
- package/lib/typescript/src/components/inline-select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input/index.d.ts +13 -0
- package/lib/typescript/src/components/input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input-group/index.d.ts +0 -1
- package/lib/typescript/src/components/input-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/item/index.d.ts +286 -0
- package/lib/typescript/src/components/item/index.d.ts.map +1 -0
- package/lib/typescript/src/components/label/index.d.ts +5 -3
- package/lib/typescript/src/components/label/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 +177 -0
- package/lib/typescript/src/components/message/index.d.ts.map +1 -0
- 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/scroll-fade/index.d.ts +18 -9
- package/lib/typescript/src/components/scroll-fade/index.d.ts.map +1 -1
- package/lib/typescript/src/components/select/index.d.ts +16 -1
- package/lib/typescript/src/components/select/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/shimmer/index.d.ts +38 -20
- package/lib/typescript/src/components/shimmer/index.d.ts.map +1 -1
- 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/components/switch/index.d.ts +10 -0
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/index.d.ts +4 -4
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/index.d.ts +1 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-breakpoint.d.ts +2 -2
- package/lib/typescript/src/hooks/use-copy-to-clipboard.d.ts +0 -2
- package/lib/typescript/src/hooks/use-copy-to-clipboard.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts +20 -0
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts.map +1 -0
- package/lib/typescript/src/icons/index.d.ts +10 -4
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +11 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/index.d.ts +35 -0
- package/lib/typescript/src/native/index.d.ts.map +1 -0
- package/lib/typescript/src/primitives/keyboard-avoider.d.ts +22 -0
- package/lib/typescript/src/primitives/keyboard-avoider.d.ts.map +1 -0
- package/lib/typescript/src/primitives/scrim.d.ts +21 -0
- package/lib/typescript/src/primitives/scrim.d.ts.map +1 -0
- package/lib/typescript/src/providers/panel-ui-provider.d.ts +1 -1
- package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
- package/lib/typescript/src/theme/use-theme.d.ts +1 -1
- package/package.json +16 -3
- package/src/components/accordion/index.tsx +7 -5
- package/src/components/alert/index.tsx +3 -6
- package/src/components/attachment/index.tsx +279 -0
- package/src/components/bottom-sheet/index.tsx +102 -2
- package/src/components/button/index.tsx +52 -0
- package/src/components/dialog/index.tsx +10 -1
- package/src/components/empty-state/index.tsx +64 -19
- package/src/components/inline-select/index.tsx +191 -44
- package/src/components/input/index.tsx +39 -3
- package/src/components/input-group/index.tsx +0 -1
- package/src/components/item/index.tsx +387 -0
- package/src/components/label/index.tsx +5 -3
- package/src/components/line-chart/index.tsx +1224 -0
- package/src/components/marker/index.tsx +194 -0
- package/src/components/message/index.tsx +336 -0
- 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/scroll-fade/index.tsx +163 -51
- package/src/components/select/index.tsx +54 -9
- package/src/components/separator/index.tsx +97 -0
- package/src/components/shimmer/index.tsx +151 -58
- package/src/components/surface/index.tsx +32 -5
- package/src/components/switch/index.tsx +27 -1
- package/src/components/toast/index.tsx +7 -8
- package/src/components/typography/index.tsx +3 -3
- package/src/hooks/index.ts +5 -0
- package/src/hooks/use-breakpoint.ts +2 -2
- package/src/hooks/use-copy-to-clipboard.ts +0 -2
- package/src/hooks/use-keyboard-avoidance.ts +140 -0
- package/src/icons/index.tsx +52 -4
- package/src/index.ts +92 -0
- package/src/native/index.ts +79 -0
- package/src/primitives/keyboard-avoider.tsx +49 -0
- package/src/primitives/scrim.tsx +95 -0
- package/src/providers/panel-ui-provider.tsx +30 -9
- package/src/theme/use-theme.ts +1 -1
- package/theme.css +63 -3
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* InputGroup — an Input with leading and/or trailing decorators.
|
|
3
3
|
*
|
|
4
|
-
* Adapted from: heroui-inc/heroui-native src/components/input-group/
|
|
5
4
|
* Prefix and Suffix are absolutely positioned and their measured widths become
|
|
6
5
|
* padding on the Input, so text never runs underneath a decorator regardless
|
|
7
6
|
* of how wide that decorator turns out to be.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input-group/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input-group/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,IAAI,EAEJ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,mBAAU,CAAC;AA6BlD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwBD,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwCD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC;AA4B9C,eAAO,MAAM,UAAU;;;;CAIrB,CAAC"}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Item — a row of content: media on one side, a title and description in the
|
|
3
|
+
* middle, actions on the other side.
|
|
4
|
+
*
|
|
5
|
+
* It is the shape almost every list in an app already has — a settings row, a
|
|
6
|
+
* file in a picker, a member in a team list, a tool call in a transcript — so
|
|
7
|
+
* it exists as one composable primitive rather than being rebuilt per screen
|
|
8
|
+
* with slightly different padding each time.
|
|
9
|
+
*
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Item variant="outline">
|
|
12
|
+
* <Item.Media variant="icon"><ReceiptIcon /></Item.Media>
|
|
13
|
+
* <Item.Content>
|
|
14
|
+
* <Item.Title>Invoice.pdf</Item.Title>
|
|
15
|
+
* <Item.Description>2.4 MB · Updated yesterday</Item.Description>
|
|
16
|
+
* </Item.Content>
|
|
17
|
+
* <Item.Actions><Button size="sm">Open</Button></Item.Actions>
|
|
18
|
+
* </Item>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Two axes, and they are independent. `orientation` on the item decides
|
|
22
|
+
* whether its own parts sit side by side or stack into a card; `orientation`
|
|
23
|
+
* on `Item.Group` decides whether the items themselves run down the screen or
|
|
24
|
+
* across it. A carousel wants both set to the non-default: a horizontal group
|
|
25
|
+
* of vertical items.
|
|
26
|
+
*/
|
|
27
|
+
import { type ReactNode } from 'react';
|
|
28
|
+
import { View, type ViewProps } from 'react-native';
|
|
29
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
30
|
+
import { type AnimatedPressableProps } from '../../primitives/animated-pressable.js';
|
|
31
|
+
import { type TextProps } from '../../primitives/text.js';
|
|
32
|
+
type ItemSize = 'default' | 'sm' | 'xs';
|
|
33
|
+
type ItemOrientation = 'horizontal' | 'vertical';
|
|
34
|
+
declare const itemVariants: import("tailwind-variants").TVReturnType<{
|
|
35
|
+
variant: {
|
|
36
|
+
default: {};
|
|
37
|
+
outline: {
|
|
38
|
+
root: string;
|
|
39
|
+
};
|
|
40
|
+
muted: {
|
|
41
|
+
root: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
size: {
|
|
45
|
+
default: {
|
|
46
|
+
root: string;
|
|
47
|
+
title: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
sm: {
|
|
51
|
+
root: string;
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
xs: {
|
|
56
|
+
root: string;
|
|
57
|
+
title: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
orientation: {
|
|
62
|
+
/** Media, text and actions side by side — the list-row shape. */
|
|
63
|
+
horizontal: {
|
|
64
|
+
root: string;
|
|
65
|
+
};
|
|
66
|
+
/** Stacked into a card — the shape a horizontal carousel wants. */
|
|
67
|
+
vertical: {
|
|
68
|
+
root: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
disabled: {
|
|
72
|
+
true: {
|
|
73
|
+
root: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
}, {
|
|
77
|
+
root: string;
|
|
78
|
+
title: string;
|
|
79
|
+
description: string;
|
|
80
|
+
}, undefined, {
|
|
81
|
+
variant: {
|
|
82
|
+
default: {};
|
|
83
|
+
outline: {
|
|
84
|
+
root: string;
|
|
85
|
+
};
|
|
86
|
+
muted: {
|
|
87
|
+
root: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
size: {
|
|
91
|
+
default: {
|
|
92
|
+
root: string;
|
|
93
|
+
title: string;
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
sm: {
|
|
97
|
+
root: string;
|
|
98
|
+
title: string;
|
|
99
|
+
description: string;
|
|
100
|
+
};
|
|
101
|
+
xs: {
|
|
102
|
+
root: string;
|
|
103
|
+
title: string;
|
|
104
|
+
description: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
orientation: {
|
|
108
|
+
/** Media, text and actions side by side — the list-row shape. */
|
|
109
|
+
horizontal: {
|
|
110
|
+
root: string;
|
|
111
|
+
};
|
|
112
|
+
/** Stacked into a card — the shape a horizontal carousel wants. */
|
|
113
|
+
vertical: {
|
|
114
|
+
root: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
disabled: {
|
|
118
|
+
true: {
|
|
119
|
+
root: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
}, {
|
|
123
|
+
root: string;
|
|
124
|
+
title: string;
|
|
125
|
+
description: string;
|
|
126
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
127
|
+
variant: {
|
|
128
|
+
default: {};
|
|
129
|
+
outline: {
|
|
130
|
+
root: string;
|
|
131
|
+
};
|
|
132
|
+
muted: {
|
|
133
|
+
root: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
size: {
|
|
137
|
+
default: {
|
|
138
|
+
root: string;
|
|
139
|
+
title: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
sm: {
|
|
143
|
+
root: string;
|
|
144
|
+
title: string;
|
|
145
|
+
description: string;
|
|
146
|
+
};
|
|
147
|
+
xs: {
|
|
148
|
+
root: string;
|
|
149
|
+
title: string;
|
|
150
|
+
description: string;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
orientation: {
|
|
154
|
+
/** Media, text and actions side by side — the list-row shape. */
|
|
155
|
+
horizontal: {
|
|
156
|
+
root: string;
|
|
157
|
+
};
|
|
158
|
+
/** Stacked into a card — the shape a horizontal carousel wants. */
|
|
159
|
+
vertical: {
|
|
160
|
+
root: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
disabled: {
|
|
164
|
+
true: {
|
|
165
|
+
root: string;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}, {
|
|
169
|
+
root: string;
|
|
170
|
+
title: string;
|
|
171
|
+
description: string;
|
|
172
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
173
|
+
declare const mediaVariants: import("tailwind-variants").TVReturnType<{
|
|
174
|
+
variant: {
|
|
175
|
+
/** No box — for an Avatar or anything that styles itself. */
|
|
176
|
+
default: string;
|
|
177
|
+
/** Rounded square tile sized for an icon. */
|
|
178
|
+
icon: string;
|
|
179
|
+
/** Clipped frame for an image or thumbnail. */
|
|
180
|
+
image: string;
|
|
181
|
+
};
|
|
182
|
+
size: {
|
|
183
|
+
default: string;
|
|
184
|
+
sm: string;
|
|
185
|
+
xs: string;
|
|
186
|
+
};
|
|
187
|
+
}, undefined, "shrink-0 items-center justify-center", {
|
|
188
|
+
variant: {
|
|
189
|
+
/** No box — for an Avatar or anything that styles itself. */
|
|
190
|
+
default: string;
|
|
191
|
+
/** Rounded square tile sized for an icon. */
|
|
192
|
+
icon: string;
|
|
193
|
+
/** Clipped frame for an image or thumbnail. */
|
|
194
|
+
image: string;
|
|
195
|
+
};
|
|
196
|
+
size: {
|
|
197
|
+
default: string;
|
|
198
|
+
sm: string;
|
|
199
|
+
xs: string;
|
|
200
|
+
};
|
|
201
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
202
|
+
variant: {
|
|
203
|
+
/** No box — for an Avatar or anything that styles itself. */
|
|
204
|
+
default: string;
|
|
205
|
+
/** Rounded square tile sized for an icon. */
|
|
206
|
+
icon: string;
|
|
207
|
+
/** Clipped frame for an image or thumbnail. */
|
|
208
|
+
image: string;
|
|
209
|
+
};
|
|
210
|
+
size: {
|
|
211
|
+
default: string;
|
|
212
|
+
sm: string;
|
|
213
|
+
xs: string;
|
|
214
|
+
};
|
|
215
|
+
}, undefined, "shrink-0 items-center justify-center", unknown, unknown, undefined>>;
|
|
216
|
+
export interface ItemProps extends Omit<AnimatedPressableProps, 'children' | 'disabled'>, Omit<VariantProps<typeof itemVariants>, 'disabled'> {
|
|
217
|
+
className?: string;
|
|
218
|
+
disabled?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Row density. `Item.Media`, `Item.Title` and `Item.Description` follow it,
|
|
221
|
+
* so it only needs setting here.
|
|
222
|
+
*/
|
|
223
|
+
size?: ItemSize;
|
|
224
|
+
/**
|
|
225
|
+
* `horizontal` is the list row: media, text and actions side by side.
|
|
226
|
+
* `vertical` stacks them into a card, which is what a horizontal carousel
|
|
227
|
+
* wants — and it is also what `Item.Header` and `Item.Footer` need, since
|
|
228
|
+
* both are full-width strips.
|
|
229
|
+
*/
|
|
230
|
+
orientation?: ItemOrientation;
|
|
231
|
+
children?: ReactNode;
|
|
232
|
+
}
|
|
233
|
+
export interface ItemGroupProps extends ViewProps {
|
|
234
|
+
className?: string;
|
|
235
|
+
/**
|
|
236
|
+
* `vertical` stacks the items — the settings-list shape. `horizontal` runs
|
|
237
|
+
* them across instead, for a carousel; pair it with a scrollable and
|
|
238
|
+
* `orientation="vertical"` on each item so every entry reads as a card.
|
|
239
|
+
*/
|
|
240
|
+
orientation?: ItemOrientation;
|
|
241
|
+
children?: ReactNode;
|
|
242
|
+
}
|
|
243
|
+
export interface ItemSeparatorProps extends ViewProps {
|
|
244
|
+
className?: string;
|
|
245
|
+
/** Match the group's axis: a horizontal group needs vertical hairlines. */
|
|
246
|
+
orientation?: ItemOrientation;
|
|
247
|
+
}
|
|
248
|
+
export interface ItemMediaProps extends ViewProps, VariantProps<typeof mediaVariants> {
|
|
249
|
+
className?: string;
|
|
250
|
+
children?: ReactNode;
|
|
251
|
+
}
|
|
252
|
+
export interface ItemContentProps extends ViewProps {
|
|
253
|
+
className?: string;
|
|
254
|
+
children?: ReactNode;
|
|
255
|
+
}
|
|
256
|
+
export interface ItemTitleProps extends TextProps {
|
|
257
|
+
className?: string;
|
|
258
|
+
}
|
|
259
|
+
export interface ItemDescriptionProps extends TextProps {
|
|
260
|
+
className?: string;
|
|
261
|
+
}
|
|
262
|
+
export interface ItemActionsProps extends ViewProps {
|
|
263
|
+
className?: string;
|
|
264
|
+
children?: ReactNode;
|
|
265
|
+
}
|
|
266
|
+
export interface ItemHeaderProps extends ViewProps {
|
|
267
|
+
className?: string;
|
|
268
|
+
children?: ReactNode;
|
|
269
|
+
}
|
|
270
|
+
export interface ItemFooterProps extends ViewProps {
|
|
271
|
+
className?: string;
|
|
272
|
+
children?: ReactNode;
|
|
273
|
+
}
|
|
274
|
+
export declare const Item: import("react").ForwardRefExoticComponent<ItemProps & import("react").RefAttributes<View>> & {
|
|
275
|
+
Group: import("react").ForwardRefExoticComponent<ItemGroupProps & import("react").RefAttributes<View>>;
|
|
276
|
+
Separator: import("react").ForwardRefExoticComponent<ItemSeparatorProps & import("react").RefAttributes<View>>;
|
|
277
|
+
Media: import("react").ForwardRefExoticComponent<ItemMediaProps & import("react").RefAttributes<View>>;
|
|
278
|
+
Content: import("react").ForwardRefExoticComponent<ItemContentProps & import("react").RefAttributes<View>>;
|
|
279
|
+
Title: import("react").ForwardRefExoticComponent<ItemTitleProps & import("react").RefAttributes<import("react-native").Text>>;
|
|
280
|
+
Description: import("react").ForwardRefExoticComponent<ItemDescriptionProps & import("react").RefAttributes<import("react-native").Text>>;
|
|
281
|
+
Actions: import("react").ForwardRefExoticComponent<ItemActionsProps & import("react").RefAttributes<View>>;
|
|
282
|
+
Header: import("react").ForwardRefExoticComponent<ItemHeaderProps & import("react").RefAttributes<View>>;
|
|
283
|
+
Footer: import("react").ForwardRefExoticComponent<ItemFooterProps & import("react").RefAttributes<View>>;
|
|
284
|
+
};
|
|
285
|
+
export {};
|
|
286
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/item/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,wCAAqC,CAAC;AACrG,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAG7D,KAAK,QAAQ,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;AACxC,KAAK,eAAe,GAAG,YAAY,GAAG,UAAU,CAAC;AAEjD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAkBZ,iEAAiE;;;;QAEjE,mEAAmE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAFnE,iEAAiE;;;;QAEjE,mEAAmE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAFnE,iEAAiE;;;;QAEjE,mEAAm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SAAS;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAgBD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAoBD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAgBD,eAAO,MAAM,IAAI;;;;;;;;;;CAUf,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Label — text that names a form field.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* A string child is wrapped in `Label.Text` automatically, so the common case
|
|
5
|
+
* stays one line; pass the parts explicitly when the label needs more than
|
|
6
|
+
* text. `isRequired`, `isInvalid` and `isDisabled` are visual *and* semantic —
|
|
7
|
+
* they recolour and they set the accessibility state, so the two cannot drift
|
|
8
|
+
* apart.
|
|
7
9
|
*/
|
|
8
10
|
import { type ReactNode } from 'react';
|
|
9
11
|
import { View, type Text as RNText, type ViewProps } from 'react-native';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/label/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/label/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAiC7D,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAqCD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AA2BD,eAAO,MAAM,KAAK;;CAEhB,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,KAAK,GAAG,SAAS,CAAC;AAE/B,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC;AAClD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,QAAQ,CAA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