@overdoser/react-toolkit 0.0.16 → 0.5.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/AGENTS.md +53 -0
- package/CHANGELOG.md +226 -0
- package/README.md +102 -3
- package/components/Alert/Alert.d.ts +34 -0
- package/components/Alert/index.d.ts +2 -0
- package/components/Avatar/Avatar.d.ts +36 -0
- package/components/Avatar/index.d.ts +2 -0
- package/components/Badge/Badge.d.ts +25 -0
- package/components/Badge/index.d.ts +2 -0
- package/components/Breadcrumbs/Breadcrumbs.d.ts +44 -0
- package/components/Breadcrumbs/index.d.ts +2 -0
- package/components/Divider/Divider.d.ts +28 -0
- package/components/Divider/index.d.ts +2 -0
- package/components/Draggable/Draggable.d.ts +50 -0
- package/components/Draggable/index.d.ts +2 -0
- package/components/Drawer/Drawer.d.ts +65 -0
- package/components/Drawer/index.d.ts +2 -0
- package/components/Dropzone/Dropzone.d.ts +50 -0
- package/components/Dropzone/index.d.ts +2 -0
- package/components/Form/Form.d.ts +16 -1
- package/components/Form/FormField.d.ts +17 -2
- package/components/Form/formFieldDefaults.d.ts +9 -0
- package/components/Link/Link.d.ts +10 -0
- package/components/Pagination/Pagination.d.ts +48 -0
- package/components/Pagination/index.d.ts +4 -0
- package/components/Pagination/paginationRange.d.ts +8 -0
- package/components/Popover/Popover.d.ts +7 -0
- package/components/Skeleton/Skeleton.d.ts +28 -0
- package/components/Skeleton/index.d.ts +2 -0
- package/components/Spinner/Spinner.d.ts +29 -0
- package/components/Spinner/index.d.ts +2 -0
- package/components/Tabs/Tabs.d.ts +66 -0
- package/components/Tabs/index.d.ts +2 -0
- package/components/Timer/Timer.d.ts +103 -0
- package/components/Timer/index.d.ts +2 -0
- package/components/Toast/Toast.d.ts +82 -0
- package/components/Toast/index.d.ts +2 -0
- package/components/Toast/toastStore.d.ts +28 -0
- package/components/Tooltip/Tooltip.d.ts +38 -0
- package/components/Tooltip/index.d.ts +2 -0
- package/components/inputs/Checkbox/Checkbox.d.ts +11 -1
- package/components/inputs/Checkbox/CheckboxGroup.d.ts +83 -0
- package/components/inputs/Checkbox/index.d.ts +2 -0
- package/components/inputs/DatePicker/DatePicker.d.ts +58 -0
- package/components/inputs/DatePicker/dateUtils.d.ts +16 -0
- package/components/inputs/DatePicker/index.d.ts +2 -0
- package/components/inputs/NumberInput/NumberInput.d.ts +41 -0
- package/components/inputs/NumberInput/index.d.ts +2 -0
- package/components/inputs/Slider/Slider.d.ts +44 -0
- package/components/inputs/Slider/index.d.ts +2 -0
- package/index.css +1 -1
- package/index.d.ts +38 -2
- package/index.js +5047 -2698
- package/index.layered.css +5 -0
- package/llms.txt +331 -5
- package/manifest.json +2057 -289
- package/package.json +3 -2
package/manifest.json
CHANGED
|
@@ -4,9 +4,16 @@
|
|
|
4
4
|
"version": "0.0.2",
|
|
5
5
|
"description": "Machine-readable manifest of components, props, allowed values, and hooks. Generated for tooling and AI assistants.",
|
|
6
6
|
"themeCssImport": "@overdoser/react-toolkit/theme.css",
|
|
7
|
+
"themeCssLayeredImport": "@overdoser/react-toolkit/theme.layered.css",
|
|
8
|
+
"stylingNotes": "className/classes.* overrides are plain CSS classes — they only beat built-in styles if inserted after them. Import theme.layered.css (cascade layer 'crk') instead of theme.css to make any unlayered consumer rule, including classes.*, win deterministically regardless of order. theme.css and theme.layered.css are identical except the layer wrapper — import exactly one (never both); --crk-* token theming works the same in either.",
|
|
7
9
|
"peerDependencies": {
|
|
8
|
-
"required": [
|
|
9
|
-
|
|
10
|
+
"required": [
|
|
11
|
+
"react",
|
|
12
|
+
"react-dom"
|
|
13
|
+
],
|
|
14
|
+
"optional": [
|
|
15
|
+
"react-hook-form"
|
|
16
|
+
]
|
|
10
17
|
},
|
|
11
18
|
"components": {
|
|
12
19
|
"Button": {
|
|
@@ -15,13 +22,59 @@
|
|
|
15
22
|
"extendsNativeProps": "button",
|
|
16
23
|
"forwardsRef": true,
|
|
17
24
|
"props": {
|
|
18
|
-
"variant": {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
"variant": {
|
|
26
|
+
"type": "enum",
|
|
27
|
+
"values": [
|
|
28
|
+
"primary",
|
|
29
|
+
"secondary",
|
|
30
|
+
"danger",
|
|
31
|
+
"ghost"
|
|
32
|
+
],
|
|
33
|
+
"default": "primary"
|
|
34
|
+
},
|
|
35
|
+
"size": {
|
|
36
|
+
"type": "enum",
|
|
37
|
+
"values": [
|
|
38
|
+
"sm",
|
|
39
|
+
"md",
|
|
40
|
+
"lg"
|
|
41
|
+
],
|
|
42
|
+
"default": "md"
|
|
43
|
+
},
|
|
44
|
+
"loading": {
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"default": false,
|
|
47
|
+
"notes": "Disables the button and sets aria-busy."
|
|
48
|
+
},
|
|
49
|
+
"loadingStyle": {
|
|
50
|
+
"type": "enum",
|
|
51
|
+
"values": [
|
|
52
|
+
"dots",
|
|
53
|
+
"shimmer",
|
|
54
|
+
"border"
|
|
55
|
+
],
|
|
56
|
+
"default": "dots",
|
|
57
|
+
"notes": "Only used when loading=true."
|
|
58
|
+
},
|
|
59
|
+
"fullWidth": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"default": false
|
|
62
|
+
},
|
|
63
|
+
"iconOnly": {
|
|
64
|
+
"type": "boolean",
|
|
65
|
+
"default": false,
|
|
66
|
+
"notes": "Squares the button and renders content larger/bolder. For single-glyph buttons (‹, ›, ×, +). Always pair with aria-label."
|
|
67
|
+
},
|
|
68
|
+
"classes": {
|
|
69
|
+
"type": "Partial<ButtonClasses>",
|
|
70
|
+
"shape": [
|
|
71
|
+
"root",
|
|
72
|
+
"content",
|
|
73
|
+
"shimmer",
|
|
74
|
+
"dots",
|
|
75
|
+
"dot"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
25
78
|
}
|
|
26
79
|
},
|
|
27
80
|
"Link": {
|
|
@@ -30,8 +83,25 @@
|
|
|
30
83
|
"extendsNativeProps": "a",
|
|
31
84
|
"forwardsRef": true,
|
|
32
85
|
"props": {
|
|
33
|
-
"variant": {
|
|
34
|
-
|
|
86
|
+
"variant": {
|
|
87
|
+
"type": "enum",
|
|
88
|
+
"values": [
|
|
89
|
+
"default",
|
|
90
|
+
"muted",
|
|
91
|
+
"danger"
|
|
92
|
+
],
|
|
93
|
+
"default": "default"
|
|
94
|
+
},
|
|
95
|
+
"external": {
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"default": false,
|
|
98
|
+
"notes": "Adds target=_blank, rel=noopener noreferrer, an inline ↗ icon, and an sr-only 'opens in a new tab' suffix."
|
|
99
|
+
},
|
|
100
|
+
"hideExternalIcon": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"default": false,
|
|
103
|
+
"notes": "Hide the inline ↗ icon shown by default when the link opens in a new tab (external or manual target=_blank). The sr-only suffix is kept."
|
|
104
|
+
}
|
|
35
105
|
}
|
|
36
106
|
},
|
|
37
107
|
"Typography": {
|
|
@@ -40,11 +110,53 @@
|
|
|
40
110
|
"extendsNativeProps": "p (without color)",
|
|
41
111
|
"forwardsRef": true,
|
|
42
112
|
"props": {
|
|
43
|
-
"variant": {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
113
|
+
"variant": {
|
|
114
|
+
"type": "enum",
|
|
115
|
+
"values": [
|
|
116
|
+
"h1",
|
|
117
|
+
"h2",
|
|
118
|
+
"h3",
|
|
119
|
+
"h4",
|
|
120
|
+
"h5",
|
|
121
|
+
"h6",
|
|
122
|
+
"p",
|
|
123
|
+
"span",
|
|
124
|
+
"label"
|
|
125
|
+
],
|
|
126
|
+
"default": "p"
|
|
127
|
+
},
|
|
128
|
+
"weight": {
|
|
129
|
+
"type": "enum",
|
|
130
|
+
"values": [
|
|
131
|
+
"normal",
|
|
132
|
+
"medium",
|
|
133
|
+
"semibold",
|
|
134
|
+
"bold"
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"color": {
|
|
138
|
+
"type": "enum",
|
|
139
|
+
"values": [
|
|
140
|
+
"default",
|
|
141
|
+
"muted",
|
|
142
|
+
"primary",
|
|
143
|
+
"danger",
|
|
144
|
+
"success"
|
|
145
|
+
],
|
|
146
|
+
"notes": "For arbitrary colors, use style or className."
|
|
147
|
+
},
|
|
148
|
+
"align": {
|
|
149
|
+
"type": "enum",
|
|
150
|
+
"values": [
|
|
151
|
+
"left",
|
|
152
|
+
"center",
|
|
153
|
+
"right"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"truncate": {
|
|
157
|
+
"type": "boolean",
|
|
158
|
+
"default": false
|
|
159
|
+
}
|
|
48
160
|
}
|
|
49
161
|
},
|
|
50
162
|
"List": {
|
|
@@ -53,8 +165,24 @@
|
|
|
53
165
|
"extendsNativeProps": "ul",
|
|
54
166
|
"forwardsRef": true,
|
|
55
167
|
"props": {
|
|
56
|
-
"variant": {
|
|
57
|
-
|
|
168
|
+
"variant": {
|
|
169
|
+
"type": "enum",
|
|
170
|
+
"values": [
|
|
171
|
+
"unordered",
|
|
172
|
+
"ordered",
|
|
173
|
+
"none"
|
|
174
|
+
],
|
|
175
|
+
"default": "unordered"
|
|
176
|
+
},
|
|
177
|
+
"spacing": {
|
|
178
|
+
"type": "enum",
|
|
179
|
+
"values": [
|
|
180
|
+
"sm",
|
|
181
|
+
"md",
|
|
182
|
+
"lg"
|
|
183
|
+
],
|
|
184
|
+
"default": "md"
|
|
185
|
+
}
|
|
58
186
|
}
|
|
59
187
|
},
|
|
60
188
|
"ListItem": {
|
|
@@ -69,40 +197,140 @@
|
|
|
69
197
|
"element": "table (inside wrapper div)",
|
|
70
198
|
"generic": "T extends Record<string, unknown>",
|
|
71
199
|
"props": {
|
|
72
|
-
"data": {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
200
|
+
"data": {
|
|
201
|
+
"type": "T[]",
|
|
202
|
+
"required": true
|
|
203
|
+
},
|
|
204
|
+
"columns": {
|
|
205
|
+
"type": "ColumnDef<T>[]",
|
|
206
|
+
"required": true
|
|
207
|
+
},
|
|
208
|
+
"sortConfig": {
|
|
209
|
+
"type": "SortConfig[]",
|
|
210
|
+
"notes": "Controlled sort. Provide with onSort for server-side mode."
|
|
211
|
+
},
|
|
212
|
+
"onSort": {
|
|
213
|
+
"type": "(config: SortConfig[]) => void",
|
|
214
|
+
"notes": "When set, Table is fully controlled — does not sort or paginate data internally."
|
|
215
|
+
},
|
|
216
|
+
"multiSort": {
|
|
217
|
+
"type": "boolean",
|
|
218
|
+
"default": true,
|
|
219
|
+
"notes": "Ctrl/Cmd+click a sortable header to add a secondary sort."
|
|
220
|
+
},
|
|
221
|
+
"striped": {
|
|
222
|
+
"type": "boolean",
|
|
223
|
+
"default": false
|
|
224
|
+
},
|
|
225
|
+
"hoverable": {
|
|
226
|
+
"type": "boolean",
|
|
227
|
+
"default": false
|
|
228
|
+
},
|
|
229
|
+
"compact": {
|
|
230
|
+
"type": "boolean",
|
|
231
|
+
"default": false
|
|
232
|
+
},
|
|
233
|
+
"rowKey": {
|
|
234
|
+
"type": "keyof T & string"
|
|
235
|
+
},
|
|
236
|
+
"rowClassName": {
|
|
237
|
+
"type": "string | ((row: T, index: number) => string | undefined)",
|
|
238
|
+
"notes": "Per-row class. Use a callback to highlight rows matching a predicate."
|
|
239
|
+
},
|
|
240
|
+
"rowStyle": {
|
|
241
|
+
"type": "CSSProperties | ((row: T, index: number) => CSSProperties | undefined)",
|
|
242
|
+
"notes": "Per-row inline style. Same shape as rowClassName."
|
|
243
|
+
},
|
|
244
|
+
"emptyMessage": {
|
|
245
|
+
"type": "ReactNode",
|
|
246
|
+
"default": "No data"
|
|
247
|
+
},
|
|
248
|
+
"pagination": {
|
|
249
|
+
"type": "PaginationConfig"
|
|
250
|
+
},
|
|
251
|
+
"classes": {
|
|
252
|
+
"type": "Partial<TableClasses>",
|
|
253
|
+
"shape": [
|
|
254
|
+
"wrapper",
|
|
255
|
+
"root",
|
|
256
|
+
"headerCell",
|
|
257
|
+
"row",
|
|
258
|
+
"cell",
|
|
259
|
+
"emptyCell",
|
|
260
|
+
"paginator",
|
|
261
|
+
"pageButton"
|
|
262
|
+
]
|
|
263
|
+
}
|
|
86
264
|
},
|
|
87
265
|
"subTypes": {
|
|
88
266
|
"ColumnDef<T>": {
|
|
89
|
-
"key": {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
267
|
+
"key": {
|
|
268
|
+
"type": "keyof T & string",
|
|
269
|
+
"required": true
|
|
270
|
+
},
|
|
271
|
+
"header": {
|
|
272
|
+
"type": "ReactNode",
|
|
273
|
+
"required": true
|
|
274
|
+
},
|
|
275
|
+
"sortable": {
|
|
276
|
+
"type": "boolean"
|
|
277
|
+
},
|
|
278
|
+
"render": {
|
|
279
|
+
"type": "(value, row, index) => ReactNode"
|
|
280
|
+
},
|
|
281
|
+
"width": {
|
|
282
|
+
"type": "string | number"
|
|
283
|
+
},
|
|
284
|
+
"align": {
|
|
285
|
+
"type": "enum",
|
|
286
|
+
"values": [
|
|
287
|
+
"left",
|
|
288
|
+
"center",
|
|
289
|
+
"right"
|
|
290
|
+
]
|
|
291
|
+
}
|
|
95
292
|
},
|
|
96
293
|
"SortConfig": {
|
|
97
|
-
"key": {
|
|
98
|
-
|
|
294
|
+
"key": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"required": true
|
|
297
|
+
},
|
|
298
|
+
"direction": {
|
|
299
|
+
"type": "enum",
|
|
300
|
+
"values": [
|
|
301
|
+
"asc",
|
|
302
|
+
"desc"
|
|
303
|
+
],
|
|
304
|
+
"required": true
|
|
305
|
+
}
|
|
99
306
|
},
|
|
100
307
|
"PaginationConfig": {
|
|
101
|
-
"page": {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
308
|
+
"page": {
|
|
309
|
+
"type": "number",
|
|
310
|
+
"required": true,
|
|
311
|
+
"notes": "1-based"
|
|
312
|
+
},
|
|
313
|
+
"pageSize": {
|
|
314
|
+
"type": "number",
|
|
315
|
+
"required": true
|
|
316
|
+
},
|
|
317
|
+
"totalRows": {
|
|
318
|
+
"type": "number",
|
|
319
|
+
"notes": "Required for server-side mode; defaults to data.length client-side."
|
|
320
|
+
},
|
|
321
|
+
"pageSizeOptions": {
|
|
322
|
+
"type": "number[]",
|
|
323
|
+
"default": [
|
|
324
|
+
10,
|
|
325
|
+
25,
|
|
326
|
+
50,
|
|
327
|
+
100
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
"onPageChange": {
|
|
331
|
+
"type": "(page: number, pageSize: number) => void",
|
|
332
|
+
"required": true
|
|
333
|
+
}
|
|
106
334
|
}
|
|
107
335
|
},
|
|
108
336
|
"behavior": {
|
|
@@ -118,19 +346,66 @@
|
|
|
118
346
|
"select": "Pass `options` + `value` + `onChange`. Trigger label shows the selected option."
|
|
119
347
|
},
|
|
120
348
|
"props": {
|
|
121
|
-
"trigger": {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"
|
|
133
|
-
|
|
349
|
+
"trigger": {
|
|
350
|
+
"type": "ReactNode",
|
|
351
|
+
"notes": "Required for menu mode; ignored when `options` is provided."
|
|
352
|
+
},
|
|
353
|
+
"options": {
|
|
354
|
+
"type": "{ value: string; label: ReactNode; disabled?: boolean }[]"
|
|
355
|
+
},
|
|
356
|
+
"value": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"notes": "Select-mode controlled value."
|
|
359
|
+
},
|
|
360
|
+
"onChange": {
|
|
361
|
+
"type": "(value: string) => void",
|
|
362
|
+
"notes": "Select-mode callback."
|
|
363
|
+
},
|
|
364
|
+
"placeholder": {
|
|
365
|
+
"type": "ReactNode",
|
|
366
|
+
"default": "Select..."
|
|
367
|
+
},
|
|
368
|
+
"align": {
|
|
369
|
+
"type": "enum",
|
|
370
|
+
"values": [
|
|
371
|
+
"left",
|
|
372
|
+
"right"
|
|
373
|
+
],
|
|
374
|
+
"default": "left"
|
|
375
|
+
},
|
|
376
|
+
"error": {
|
|
377
|
+
"type": "boolean",
|
|
378
|
+
"default": false
|
|
379
|
+
},
|
|
380
|
+
"fullWidth": {
|
|
381
|
+
"type": "boolean",
|
|
382
|
+
"default": true
|
|
383
|
+
},
|
|
384
|
+
"portal": {
|
|
385
|
+
"type": "boolean",
|
|
386
|
+
"default": true,
|
|
387
|
+
"notes": "Renders the open menu in a portal at document.body using --crk-z-floating (1060). Escapes overflow:hidden ancestors and sits above modals. Set false to keep the menu in the trigger's subtree."
|
|
388
|
+
},
|
|
389
|
+
"id": {
|
|
390
|
+
"type": "string"
|
|
391
|
+
},
|
|
392
|
+
"onOpen": {
|
|
393
|
+
"type": "() => void"
|
|
394
|
+
},
|
|
395
|
+
"onClose": {
|
|
396
|
+
"type": "() => void"
|
|
397
|
+
},
|
|
398
|
+
"classes": {
|
|
399
|
+
"type": "Partial<DropdownClasses>",
|
|
400
|
+
"shape": [
|
|
401
|
+
"root",
|
|
402
|
+
"trigger",
|
|
403
|
+
"triggerLabel",
|
|
404
|
+
"chevron",
|
|
405
|
+
"menu",
|
|
406
|
+
"item"
|
|
407
|
+
]
|
|
408
|
+
}
|
|
134
409
|
}
|
|
135
410
|
},
|
|
136
411
|
"DropdownItem": {
|
|
@@ -139,86 +414,800 @@
|
|
|
139
414
|
"extendsNativeProps": "button",
|
|
140
415
|
"forwardsRef": true,
|
|
141
416
|
"props": {
|
|
142
|
-
"disabled": {
|
|
417
|
+
"disabled": {
|
|
418
|
+
"type": "boolean",
|
|
419
|
+
"default": false
|
|
420
|
+
}
|
|
143
421
|
}
|
|
144
422
|
},
|
|
145
423
|
"Popover": {
|
|
146
424
|
"import": "import { Popover } from '@overdoser/react-toolkit'",
|
|
147
425
|
"element": "div",
|
|
148
426
|
"props": {
|
|
149
|
-
"trigger": {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"
|
|
155
|
-
|
|
427
|
+
"trigger": {
|
|
428
|
+
"type": "ReactNode",
|
|
429
|
+
"required": true,
|
|
430
|
+
"notes": "Default mode wraps the value in an internal <button>. Set asChild=true to pass your own interactive element instead."
|
|
431
|
+
},
|
|
432
|
+
"asChild": {
|
|
433
|
+
"type": "boolean",
|
|
434
|
+
"default": false,
|
|
435
|
+
"notes": "When true and trigger is a single React element, the element is rendered as-is with onClick/aria-*/ref cloned onto it (no wrapping <button>). Use to avoid the button-in-button hydration warning when passing <Button> as the trigger."
|
|
436
|
+
},
|
|
437
|
+
"content": {
|
|
438
|
+
"type": "ReactNode",
|
|
439
|
+
"required": true
|
|
440
|
+
},
|
|
441
|
+
"position": {
|
|
442
|
+
"type": "enum",
|
|
443
|
+
"values": [
|
|
444
|
+
"top",
|
|
445
|
+
"bottom",
|
|
446
|
+
"left",
|
|
447
|
+
"right"
|
|
448
|
+
],
|
|
449
|
+
"default": "bottom",
|
|
450
|
+
"notes": "The requested side; honored whenever it fits."
|
|
451
|
+
},
|
|
452
|
+
"autoPosition": {
|
|
453
|
+
"type": "boolean",
|
|
454
|
+
"default": true,
|
|
455
|
+
"notes": "Flip to the opposite side when the requested one overflows the viewport, and shift along the cross-axis near a screen edge. Set false to pin strictly to position."
|
|
456
|
+
},
|
|
457
|
+
"open": {
|
|
458
|
+
"type": "boolean",
|
|
459
|
+
"notes": "Controlled mode."
|
|
460
|
+
},
|
|
461
|
+
"onOpenChange": {
|
|
462
|
+
"type": "(open: boolean) => void"
|
|
463
|
+
},
|
|
464
|
+
"classes": {
|
|
465
|
+
"type": "Partial<PopoverClasses>",
|
|
466
|
+
"shape": [
|
|
467
|
+
"root",
|
|
468
|
+
"trigger",
|
|
469
|
+
"popover"
|
|
470
|
+
]
|
|
471
|
+
}
|
|
156
472
|
},
|
|
157
473
|
"behavior": {
|
|
158
|
-
"closesOn": [
|
|
474
|
+
"closesOn": [
|
|
475
|
+
"outside click",
|
|
476
|
+
"Escape"
|
|
477
|
+
],
|
|
159
478
|
"childrenTyped": "never — pass via `content` prop"
|
|
160
479
|
}
|
|
161
480
|
},
|
|
162
|
-
"
|
|
163
|
-
"import": "import {
|
|
481
|
+
"Draggable": {
|
|
482
|
+
"import": "import { Draggable } from '@overdoser/react-toolkit'",
|
|
483
|
+
"element": "div wrapping arbitrary children",
|
|
484
|
+
"forwardsRef": true,
|
|
485
|
+
"extendsNativeProps": "div (except onDrag)",
|
|
486
|
+
"compoundComponents": [
|
|
487
|
+
"Draggable.Handle"
|
|
488
|
+
],
|
|
489
|
+
"notes": "Free-move container. Position is a translate(x,y) offset from the element's natural layout position. Add Draggable.Handle to restrict the grab area; without one the whole surface drags. A focused handle is keyboard-movable (arrow keys).",
|
|
490
|
+
"props": {
|
|
491
|
+
"defaultPosition": {
|
|
492
|
+
"type": "{ x: number; y: number }",
|
|
493
|
+
"default": "{ x: 0, y: 0 }",
|
|
494
|
+
"notes": "Uncontrolled initial offset."
|
|
495
|
+
},
|
|
496
|
+
"position": {
|
|
497
|
+
"type": "{ x: number; y: number }",
|
|
498
|
+
"notes": "Controlled offset; pair with onDrag to update it."
|
|
499
|
+
},
|
|
500
|
+
"axis": {
|
|
501
|
+
"type": "'both' | 'x' | 'y'",
|
|
502
|
+
"default": "both"
|
|
503
|
+
},
|
|
504
|
+
"bounds": {
|
|
505
|
+
"type": "'viewport' | 'parent' | 'none'",
|
|
506
|
+
"default": "viewport",
|
|
507
|
+
"notes": "Clamp movement to the viewport / parent element, or leave unconstrained."
|
|
508
|
+
},
|
|
509
|
+
"keyboardStep": {
|
|
510
|
+
"type": "number",
|
|
511
|
+
"default": 10,
|
|
512
|
+
"notes": "Px per arrow-key press on a focused handle."
|
|
513
|
+
},
|
|
514
|
+
"disabled": {
|
|
515
|
+
"type": "boolean",
|
|
516
|
+
"default": false
|
|
517
|
+
},
|
|
518
|
+
"onDragStart": {
|
|
519
|
+
"type": "(position: { x: number; y: number }) => void"
|
|
520
|
+
},
|
|
521
|
+
"onDrag": {
|
|
522
|
+
"type": "(position: { x: number; y: number }) => void",
|
|
523
|
+
"notes": "Required to update a controlled position."
|
|
524
|
+
},
|
|
525
|
+
"onDragEnd": {
|
|
526
|
+
"type": "(position: { x: number; y: number }) => void"
|
|
527
|
+
},
|
|
528
|
+
"classes": {
|
|
529
|
+
"type": "Partial<DraggableClasses>",
|
|
530
|
+
"shape": [
|
|
531
|
+
"root",
|
|
532
|
+
"handle"
|
|
533
|
+
]
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"Toast": {
|
|
538
|
+
"import": "import { ToastProvider, toast, useToast } from '@overdoser/react-toolkit'",
|
|
539
|
+
"element": "portal viewport at document.body",
|
|
540
|
+
"notes": "Imperative notification system backed by a global store. Mount ToastProvider once (it is the renderer; do NOT render toast elements yourself). Trigger via the standalone toast(options) (no hook/context needed; also toast.dismiss(id) / toast.dismissAll()) OR via useToast() which returns the same { toast, dismiss, dismissAll }. useToast does not require the provider and never throws. toast() with no provider mounted warns (dev) and renders nothing. danger/warning use role=alert (assertive); others role=status (polite). Auto-dismiss pauses on hover.",
|
|
541
|
+
"standaloneTrigger": {
|
|
542
|
+
"name": "toast",
|
|
543
|
+
"signature": "toast(options: ToastOptions): string",
|
|
544
|
+
"methods": [
|
|
545
|
+
"toast.dismiss(id: string): void",
|
|
546
|
+
"toast.dismissAll(): void"
|
|
547
|
+
],
|
|
548
|
+
"notes": "Importable; callable anywhere without a hook or context."
|
|
549
|
+
},
|
|
550
|
+
"provider": {
|
|
551
|
+
"name": "ToastProvider",
|
|
552
|
+
"props": {
|
|
553
|
+
"children": {
|
|
554
|
+
"type": "ReactNode",
|
|
555
|
+
"required": true
|
|
556
|
+
},
|
|
557
|
+
"position": {
|
|
558
|
+
"type": "'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'",
|
|
559
|
+
"default": "top-right"
|
|
560
|
+
},
|
|
561
|
+
"duration": {
|
|
562
|
+
"type": "number",
|
|
563
|
+
"default": 5000,
|
|
564
|
+
"notes": "Default auto-dismiss ms."
|
|
565
|
+
},
|
|
566
|
+
"max": {
|
|
567
|
+
"type": "number",
|
|
568
|
+
"default": 5
|
|
569
|
+
},
|
|
570
|
+
"classes": {
|
|
571
|
+
"type": "Partial<ToastClasses>",
|
|
572
|
+
"shape": [
|
|
573
|
+
"viewport",
|
|
574
|
+
"toast",
|
|
575
|
+
"icon",
|
|
576
|
+
"content",
|
|
577
|
+
"title",
|
|
578
|
+
"description",
|
|
579
|
+
"close"
|
|
580
|
+
]
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"hook": {
|
|
585
|
+
"name": "useToast",
|
|
586
|
+
"returns": "ToastApi = { toast(options): string; dismiss(id): void; dismissAll(): void }",
|
|
587
|
+
"throwsWithoutProvider": false,
|
|
588
|
+
"toastOptions": {
|
|
589
|
+
"title": {
|
|
590
|
+
"type": "ReactNode"
|
|
591
|
+
},
|
|
592
|
+
"description": {
|
|
593
|
+
"type": "ReactNode"
|
|
594
|
+
},
|
|
595
|
+
"variant": {
|
|
596
|
+
"type": "'neutral' | 'info' | 'success' | 'warning' | 'danger'",
|
|
597
|
+
"default": "neutral"
|
|
598
|
+
},
|
|
599
|
+
"duration": {
|
|
600
|
+
"type": "number",
|
|
601
|
+
"notes": "Overrides provider default; 0 or Infinity persists until dismissed."
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
"Tabs": {
|
|
607
|
+
"import": "import { Tabs } from '@overdoser/react-toolkit'",
|
|
608
|
+
"element": "div wrapping role=tablist + panels",
|
|
609
|
+
"forwardsRef": true,
|
|
610
|
+
"compoundComponents": [
|
|
611
|
+
"Tabs.List",
|
|
612
|
+
"Tabs.Tab",
|
|
613
|
+
"Tabs.Panel"
|
|
614
|
+
],
|
|
615
|
+
"notes": "A Tab and its Panel are linked by matching value. Keyboard: arrow keys (orientation-aware) + Home/End move and activate; roving tabindex; automatic activation on focus.",
|
|
616
|
+
"props": {
|
|
617
|
+
"value": {
|
|
618
|
+
"type": "string",
|
|
619
|
+
"notes": "Controlled active tab."
|
|
620
|
+
},
|
|
621
|
+
"defaultValue": {
|
|
622
|
+
"type": "string",
|
|
623
|
+
"notes": "Uncontrolled initial active tab."
|
|
624
|
+
},
|
|
625
|
+
"onValueChange": {
|
|
626
|
+
"type": "(value: string) => void"
|
|
627
|
+
},
|
|
628
|
+
"orientation": {
|
|
629
|
+
"type": "'horizontal' | 'vertical'",
|
|
630
|
+
"default": "horizontal"
|
|
631
|
+
},
|
|
632
|
+
"variant": {
|
|
633
|
+
"type": "'line' | 'solid' | 'pill'",
|
|
634
|
+
"default": "line"
|
|
635
|
+
},
|
|
636
|
+
"size": {
|
|
637
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
638
|
+
"default": "md"
|
|
639
|
+
},
|
|
640
|
+
"classes": {
|
|
641
|
+
"type": "Partial<TabsClasses>",
|
|
642
|
+
"shape": [
|
|
643
|
+
"root",
|
|
644
|
+
"list",
|
|
645
|
+
"tab",
|
|
646
|
+
"panel"
|
|
647
|
+
]
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"subComponentProps": {
|
|
651
|
+
"Tabs.Tab": {
|
|
652
|
+
"value": {
|
|
653
|
+
"type": "string",
|
|
654
|
+
"required": true
|
|
655
|
+
},
|
|
656
|
+
"disabled": {
|
|
657
|
+
"type": "boolean",
|
|
658
|
+
"default": false
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
"Tabs.Panel": {
|
|
662
|
+
"value": {
|
|
663
|
+
"type": "string",
|
|
664
|
+
"required": true
|
|
665
|
+
},
|
|
666
|
+
"keepMounted": {
|
|
667
|
+
"type": "boolean",
|
|
668
|
+
"default": false,
|
|
669
|
+
"notes": "Keep inactive panels mounted but hidden."
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
"Alert": {
|
|
675
|
+
"import": "import { Alert } from '@overdoser/react-toolkit'",
|
|
676
|
+
"element": "div[role=alert]",
|
|
677
|
+
"forwardsRef": true,
|
|
678
|
+
"extendsNativeProps": "div (without title)",
|
|
679
|
+
"notes": "Inline, persistent status message. For transient feedback prefer Toast.",
|
|
680
|
+
"props": {
|
|
681
|
+
"variant": {
|
|
682
|
+
"type": "'info' | 'success' | 'warning' | 'danger'",
|
|
683
|
+
"default": "info"
|
|
684
|
+
},
|
|
685
|
+
"title": {
|
|
686
|
+
"type": "ReactNode"
|
|
687
|
+
},
|
|
688
|
+
"icon": {
|
|
689
|
+
"type": "ReactNode | boolean",
|
|
690
|
+
"default": true,
|
|
691
|
+
"notes": "true = variant icon; node = override; false = hide."
|
|
692
|
+
},
|
|
693
|
+
"onClose": {
|
|
694
|
+
"type": "() => void",
|
|
695
|
+
"notes": "When set, renders a dismiss button."
|
|
696
|
+
},
|
|
697
|
+
"closeLabel": {
|
|
698
|
+
"type": "string",
|
|
699
|
+
"default": "Dismiss"
|
|
700
|
+
},
|
|
701
|
+
"classes": {
|
|
702
|
+
"type": "Partial<AlertClasses>",
|
|
703
|
+
"shape": [
|
|
704
|
+
"root",
|
|
705
|
+
"icon",
|
|
706
|
+
"content",
|
|
707
|
+
"title",
|
|
708
|
+
"message",
|
|
709
|
+
"close"
|
|
710
|
+
]
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
"Badge": {
|
|
715
|
+
"import": "import { Badge } from '@overdoser/react-toolkit'",
|
|
716
|
+
"element": "span",
|
|
717
|
+
"forwardsRef": true,
|
|
718
|
+
"extendsNativeProps": "span",
|
|
719
|
+
"props": {
|
|
720
|
+
"variant": {
|
|
721
|
+
"type": "'neutral' | 'primary' | 'success' | 'warning' | 'danger'",
|
|
722
|
+
"default": "neutral"
|
|
723
|
+
},
|
|
724
|
+
"appearance": {
|
|
725
|
+
"type": "'soft' | 'solid' | 'outline'",
|
|
726
|
+
"default": "soft"
|
|
727
|
+
},
|
|
728
|
+
"size": {
|
|
729
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
730
|
+
"default": "md"
|
|
731
|
+
},
|
|
732
|
+
"dot": {
|
|
733
|
+
"type": "boolean",
|
|
734
|
+
"default": false,
|
|
735
|
+
"notes": "Leading status dot."
|
|
736
|
+
},
|
|
737
|
+
"classes": {
|
|
738
|
+
"type": "Partial<BadgeClasses>",
|
|
739
|
+
"shape": [
|
|
740
|
+
"root",
|
|
741
|
+
"dot"
|
|
742
|
+
]
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
"Spinner": {
|
|
747
|
+
"import": "import { Spinner } from '@overdoser/react-toolkit'",
|
|
748
|
+
"element": "span[role=status]",
|
|
749
|
+
"forwardsRef": true,
|
|
750
|
+
"extendsNativeProps": "span",
|
|
751
|
+
"notes": "Indeterminate loading spinner; inherits currentColor.",
|
|
752
|
+
"props": {
|
|
753
|
+
"size": {
|
|
754
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
755
|
+
"default": "md"
|
|
756
|
+
},
|
|
757
|
+
"color": {
|
|
758
|
+
"type": "string",
|
|
759
|
+
"notes": "Overrides currentColor."
|
|
760
|
+
},
|
|
761
|
+
"label": {
|
|
762
|
+
"type": "string",
|
|
763
|
+
"default": "Loading",
|
|
764
|
+
"notes": "Visually-hidden a11y label; pass '' to omit."
|
|
765
|
+
},
|
|
766
|
+
"classes": {
|
|
767
|
+
"type": "Partial<SpinnerClasses>",
|
|
768
|
+
"shape": [
|
|
769
|
+
"root",
|
|
770
|
+
"circle",
|
|
771
|
+
"label"
|
|
772
|
+
]
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
"Skeleton": {
|
|
777
|
+
"import": "import { Skeleton } from '@overdoser/react-toolkit'",
|
|
778
|
+
"element": "div[aria-hidden]",
|
|
779
|
+
"forwardsRef": true,
|
|
780
|
+
"extendsNativeProps": "div (without children)",
|
|
781
|
+
"notes": "Decorative loading placeholder.",
|
|
782
|
+
"props": {
|
|
783
|
+
"variant": {
|
|
784
|
+
"type": "'text' | 'circle' | 'rect'",
|
|
785
|
+
"default": "text"
|
|
786
|
+
},
|
|
787
|
+
"width": {
|
|
788
|
+
"type": "number | string",
|
|
789
|
+
"notes": "number → px; defaults to 100%."
|
|
790
|
+
},
|
|
791
|
+
"height": {
|
|
792
|
+
"type": "number | string",
|
|
793
|
+
"notes": "number → px; defaults per variant."
|
|
794
|
+
},
|
|
795
|
+
"animation": {
|
|
796
|
+
"type": "'pulse' | 'wave' | 'none'",
|
|
797
|
+
"default": "pulse"
|
|
798
|
+
},
|
|
799
|
+
"lines": {
|
|
800
|
+
"type": "number",
|
|
801
|
+
"default": 1,
|
|
802
|
+
"notes": "For variant=text, render N stacked bars (last shorter)."
|
|
803
|
+
},
|
|
804
|
+
"classes": {
|
|
805
|
+
"type": "Partial<SkeletonClasses>",
|
|
806
|
+
"shape": [
|
|
807
|
+
"root",
|
|
808
|
+
"line"
|
|
809
|
+
]
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
"Drawer": {
|
|
814
|
+
"import": "import { Drawer } from '@overdoser/react-toolkit'",
|
|
164
815
|
"element": "div (portal at document.body)",
|
|
165
|
-
"
|
|
816
|
+
"forwardsRef": true,
|
|
817
|
+
"compoundComponents": ["Drawer.Header", "Drawer.Body", "Drawer.Footer"],
|
|
818
|
+
"notes": "Off-canvas panel sliding from a screen edge (left/right = full-height strip, top/bottom = full-width strip). Animates in/out and stays mounted through the close transition.",
|
|
166
819
|
"props": {
|
|
167
820
|
"open": { "type": "boolean", "required": true },
|
|
168
821
|
"onClose": { "type": "() => void", "required": true },
|
|
169
|
-
"
|
|
822
|
+
"side": { "type": "'left' | 'right' | 'top' | 'bottom'", "default": "right" },
|
|
823
|
+
"size": { "type": "'sm' | 'md' | 'lg' | 'full'", "default": "md" },
|
|
824
|
+
"variant": { "type": "'temporary' | 'persistent'", "default": "temporary", "notes": "temporary = scrim + modal (scrim/Escape close); persistent = no scrim, page stays interactive." },
|
|
825
|
+
"closeOnBackdrop": { "type": "boolean", "default": true, "notes": "Temporary only." },
|
|
170
826
|
"closeOnEscape": { "type": "boolean", "default": true },
|
|
171
|
-
"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
827
|
+
"classes": { "type": "Partial<DrawerClasses>", "shape": ["backdrop", "drawer", "header", "closeButton", "body", "footer"] }
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
"Tooltip": {
|
|
831
|
+
"import": "import { Tooltip } from '@overdoser/react-toolkit'",
|
|
832
|
+
"element": "inline span wrapper + portaled bubble (role=tooltip)",
|
|
833
|
+
"notes": "Lightweight hover/focus label with delay. Use Popover for interactive/click content.",
|
|
834
|
+
"props": {
|
|
835
|
+
"content": { "type": "ReactNode", "required": true, "notes": "Nullish/empty → never shows." },
|
|
836
|
+
"children": { "type": "ReactNode", "required": true, "notes": "The trigger." },
|
|
837
|
+
"placement": { "type": "'top' | 'bottom' | 'left' | 'right'", "default": "top", "notes": "Flips on overflow." },
|
|
838
|
+
"delay": { "type": "number", "default": 300, "notes": "Open delay ms." },
|
|
839
|
+
"closeDelay": { "type": "number", "default": 0 },
|
|
840
|
+
"disabled": { "type": "boolean", "default": false },
|
|
841
|
+
"hideArrow": { "type": "boolean", "default": false },
|
|
842
|
+
"classes": { "type": "Partial<TooltipClasses>", "shape": ["wrapper", "tooltip", "arrow"] }
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
"Avatar": {
|
|
846
|
+
"import": "import { Avatar } from '@overdoser/react-toolkit'",
|
|
847
|
+
"element": "span",
|
|
848
|
+
"forwardsRef": true,
|
|
849
|
+
"extendsNativeProps": "span",
|
|
850
|
+
"notes": "Falls back to initials (from name) or a user icon if the image is missing or errors.",
|
|
851
|
+
"props": {
|
|
852
|
+
"src": { "type": "string" },
|
|
853
|
+
"alt": { "type": "string" },
|
|
854
|
+
"name": { "type": "string", "notes": "Used to derive initials." },
|
|
855
|
+
"fallback": { "type": "ReactNode" },
|
|
856
|
+
"size": { "type": "'xs' | 'sm' | 'md' | 'lg' | 'xl'", "default": "md" },
|
|
857
|
+
"shape": { "type": "'circle' | 'square'", "default": "circle" },
|
|
858
|
+
"status": { "type": "'online' | 'offline' | 'away' | 'busy'" },
|
|
859
|
+
"classes": { "type": "Partial<AvatarClasses>", "shape": ["root", "image", "fallback", "status"] }
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
"Divider": {
|
|
863
|
+
"import": "import { Divider } from '@overdoser/react-toolkit'",
|
|
864
|
+
"element": "div[role=separator]",
|
|
865
|
+
"forwardsRef": true,
|
|
866
|
+
"extendsNativeProps": "div (without children)",
|
|
867
|
+
"props": {
|
|
868
|
+
"orientation": { "type": "'horizontal' | 'vertical'", "default": "horizontal" },
|
|
869
|
+
"variant": { "type": "'solid' | 'dashed' | 'dotted'", "default": "solid" },
|
|
870
|
+
"label": { "type": "ReactNode", "notes": "Horizontal only." },
|
|
871
|
+
"labelPosition": { "type": "'start' | 'center' | 'end'", "default": "center" },
|
|
872
|
+
"classes": { "type": "Partial<DividerClasses>", "shape": ["root", "line", "label"] }
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
"Breadcrumbs": {
|
|
876
|
+
"import": "import { Breadcrumbs } from '@overdoser/react-toolkit'",
|
|
877
|
+
"element": "nav > ol",
|
|
878
|
+
"forwardsRef": true,
|
|
879
|
+
"compoundComponents": ["Breadcrumbs.Item"],
|
|
880
|
+
"notes": "Separators auto-inserted; the last item defaults to current (aria-current=page, no link).",
|
|
881
|
+
"props": {
|
|
882
|
+
"separator": { "type": "ReactNode", "default": "/" },
|
|
883
|
+
"label": { "type": "string", "default": "Breadcrumb" },
|
|
884
|
+
"classes": { "type": "Partial<BreadcrumbsClasses>", "shape": ["root", "list", "item", "link", "current", "separator"] }
|
|
885
|
+
},
|
|
886
|
+
"subComponentProps": {
|
|
887
|
+
"Breadcrumbs.Item": {
|
|
888
|
+
"href": { "type": "string", "notes": "Omit for a plain (non-link) crumb." },
|
|
889
|
+
"current": { "type": "boolean", "notes": "Renders as text with aria-current=page." }
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
"Pagination": {
|
|
894
|
+
"import": "import { Pagination } from '@overdoser/react-toolkit'",
|
|
895
|
+
"element": "nav > ul",
|
|
896
|
+
"forwardsRef": true,
|
|
897
|
+
"notes": "Windowed page list with ellipses, e.g. 1 … 6 7 8 9 10 … 99. Also exports paginationRange(page, count, boundaryCount?, siblingCount?). Table has its own pagination — use this for non-table lists.",
|
|
898
|
+
"props": {
|
|
899
|
+
"count": { "type": "number", "notes": "Total pages. Or use total + pageSize." },
|
|
900
|
+
"total": { "type": "number", "notes": "With pageSize, derives count." },
|
|
901
|
+
"pageSize": { "type": "number", "default": 10 },
|
|
902
|
+
"page": { "type": "number", "notes": "Controlled, 1-based." },
|
|
903
|
+
"defaultPage": { "type": "number", "default": 1 },
|
|
904
|
+
"onChange": { "type": "(page: number) => void" },
|
|
905
|
+
"boundaryCount": { "type": "number", "default": 1 },
|
|
906
|
+
"siblingCount": { "type": "number", "default": 2, "notes": "Defaults give at most 9 chips." },
|
|
907
|
+
"showPrevNext": { "type": "boolean", "default": true },
|
|
908
|
+
"showFirstLast": { "type": "boolean", "default": false },
|
|
909
|
+
"size": { "type": "'sm' | 'md' | 'lg'", "default": "md" },
|
|
910
|
+
"disabled": { "type": "boolean", "default": false },
|
|
911
|
+
"classes": { "type": "Partial<PaginationClasses>", "shape": ["root", "list", "item", "active", "ellipsis", "control"] }
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
"Slider": {
|
|
915
|
+
"import": "import { Slider } from '@overdoser/react-toolkit'",
|
|
916
|
+
"element": "div containing role=slider thumb(s)",
|
|
917
|
+
"forwardsRef": true,
|
|
918
|
+
"notes": "A tuple value makes it a range (two thumbs). Pointer drag + keyboard (arrows, Home/End, PageUp/Down).",
|
|
919
|
+
"props": {
|
|
920
|
+
"value": { "type": "number | [number, number]", "notes": "Tuple → range slider." },
|
|
921
|
+
"defaultValue": { "type": "number | [number, number]" },
|
|
922
|
+
"onChange": { "type": "(value: number | [number, number]) => void" },
|
|
923
|
+
"onChangeEnd": { "type": "(value: number | [number, number]) => void" },
|
|
924
|
+
"min": { "type": "number", "default": 0 },
|
|
925
|
+
"max": { "type": "number", "default": 100 },
|
|
926
|
+
"step": { "type": "number", "default": 1 },
|
|
927
|
+
"disabled": { "type": "boolean", "default": false },
|
|
928
|
+
"formatValue": { "type": "(value: number) => string", "notes": "For aria-valuetext." },
|
|
929
|
+
"classes": { "type": "Partial<SliderClasses>", "shape": ["root", "track", "range", "thumb"] }
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
"NumberInput": {
|
|
933
|
+
"import": "import { NumberInput } from '@overdoser/react-toolkit'",
|
|
934
|
+
"element": "div wrapping input + stepper buttons",
|
|
935
|
+
"forwardsRef": true,
|
|
936
|
+
"notes": "Emits onChange(value: number | null), so it binds directly inside FormField. Arrow keys step; clamps on blur.",
|
|
937
|
+
"props": {
|
|
938
|
+
"value": { "type": "number | null", "notes": "Controlled." },
|
|
939
|
+
"defaultValue": { "type": "number | null" },
|
|
940
|
+
"onChange": { "type": "(value: number | null) => void" },
|
|
941
|
+
"min": { "type": "number" },
|
|
942
|
+
"max": { "type": "number" },
|
|
943
|
+
"step": { "type": "number", "default": 1 },
|
|
944
|
+
"precision": { "type": "number", "notes": "Decimal places to round to." },
|
|
945
|
+
"inputSize": { "type": "'sm' | 'md' | 'lg'", "default": "md" },
|
|
946
|
+
"error": { "type": "boolean", "default": false },
|
|
947
|
+
"hideControls": { "type": "boolean", "default": false },
|
|
948
|
+
"classes": { "type": "Partial<NumberInputClasses>", "shape": ["root", "input", "controls", "increment", "decrement"] }
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
"DatePicker": {
|
|
952
|
+
"import": "import { DatePicker } from '@overdoser/react-toolkit'",
|
|
953
|
+
"element": "div wrapping a read-only input + calendar popover",
|
|
954
|
+
"forwardsRef": true,
|
|
955
|
+
"notes": "Single date with a pop-up calendar. Binds in FormField (value: Date | null). Keyboard: arrows move days, PageUp/Down change month, Home/End week ends, Enter selects, Esc closes.",
|
|
956
|
+
"props": {
|
|
957
|
+
"value": { "type": "Date | null", "notes": "Controlled." },
|
|
958
|
+
"defaultValue": { "type": "Date | null" },
|
|
959
|
+
"onChange": { "type": "(date: Date | null) => void" },
|
|
960
|
+
"min": { "type": "Date" },
|
|
961
|
+
"max": { "type": "Date" },
|
|
962
|
+
"disabledDate": { "type": "(date: Date) => boolean" },
|
|
963
|
+
"weekStartsOn": { "type": "number", "default": 0, "notes": "0 = Sunday." },
|
|
964
|
+
"locale": { "type": "string", "notes": "BCP-47 for month/weekday names." },
|
|
965
|
+
"format": { "type": "(date: Date) => string" },
|
|
966
|
+
"placeholder": { "type": "string", "default": "Select date" },
|
|
967
|
+
"inputSize": { "type": "'sm' | 'md' | 'lg'", "default": "md" },
|
|
968
|
+
"error": { "type": "boolean", "default": false },
|
|
969
|
+
"disabled": { "type": "boolean", "default": false },
|
|
970
|
+
"portal": { "type": "boolean", "default": true },
|
|
971
|
+
"classes": { "type": "Partial<DatePickerClasses>", "shape": ["root", "input", "icon", "popover", "header", "nav", "grid", "day", "daySelected", "dayToday", "dayOutside"] }
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
"Dropzone": {
|
|
975
|
+
"import": "import { Dropzone } from '@overdoser/react-toolkit'",
|
|
976
|
+
"element": "div[role=button] + hidden file input",
|
|
977
|
+
"forwardsRef": true,
|
|
978
|
+
"notes": "Drag-drop or click to browse. Emits accepted/rejected files; file-list UI is left to the consumer.",
|
|
979
|
+
"props": {
|
|
980
|
+
"onFiles": { "type": "(files: File[]) => void" },
|
|
981
|
+
"onReject": { "type": "(rejections: { file: File; reason: 'type' | 'size' | 'multiple' }[]) => void" },
|
|
982
|
+
"accept": { "type": "string", "notes": "Comma list of extensions and/or MIME patterns (e.g. '.png,image/*')." },
|
|
983
|
+
"multiple": { "type": "boolean", "default": false },
|
|
984
|
+
"maxSize": { "type": "number", "notes": "Max bytes per file." },
|
|
985
|
+
"disabled": { "type": "boolean", "default": false },
|
|
986
|
+
"label": { "type": "ReactNode" },
|
|
987
|
+
"hint": { "type": "ReactNode" },
|
|
988
|
+
"children": { "type": "ReactNode | ((state: { isDragging: boolean }) => ReactNode)", "notes": "Custom content; replaces the default UI." },
|
|
989
|
+
"classes": { "type": "Partial<DropzoneClasses>", "shape": ["root", "input", "content", "icon", "label", "hint"] }
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
"Timer": {
|
|
993
|
+
"import": "import { Timer } from '@overdoser/react-toolkit'",
|
|
994
|
+
"element": "div[role=timer]",
|
|
995
|
+
"forwardsRef": true,
|
|
996
|
+
"refHandle": "TimerHandle = { start(); pause(); reset(); restart(); getTime(): number; isRunning }",
|
|
997
|
+
"notes": "Countdown or stopwatch; digital, ring, or segments (one boxed cell per unit with the label below). Uncontrolled with autoStart + imperative ref, or display-only via value. Time values are in seconds; interval is ms.",
|
|
998
|
+
"props": {
|
|
999
|
+
"mode": { "type": "'countdown' | 'stopwatch'", "default": "countdown" },
|
|
1000
|
+
"duration": { "type": "number", "notes": "Seconds; countdown length / stopwatch cap; drives ring progress." },
|
|
1001
|
+
"to": { "type": "Date | number", "notes": "Absolute countdown target (overrides duration/pause)." },
|
|
1002
|
+
"value": { "type": "number", "notes": "Controlled seconds → display-only (no internal clock)." },
|
|
1003
|
+
"autoStart": { "type": "boolean", "default": true },
|
|
1004
|
+
"running": { "type": "boolean", "notes": "Controlled run state." },
|
|
1005
|
+
"interval": { "type": "number", "default": 1000, "notes": "Tick ms." },
|
|
1006
|
+
"variant": { "type": "'digital' | 'ring' | 'segments'", "default": "digital" },
|
|
1007
|
+
"size": { "type": "'sm' | 'md' | 'lg'", "default": "md" },
|
|
1008
|
+
"format": { "type": "(seconds: number) => ReactNode", "notes": "digital/ring only." },
|
|
1009
|
+
"units": { "type": "('days' | 'hours' | 'minutes' | 'seconds')[]", "notes": "segments variant; default = smallest set that fits the duration; leading unit absorbs overflow." },
|
|
1010
|
+
"unitFormat": { "type": "'long' | 'short'", "default": "short", "notes": "short → d/h/m/s; long → days/hours/minutes/seconds (fixed, no singular/plural)." },
|
|
1011
|
+
"unitLabels": { "type": "Partial<Record<TimerUnit, ReactNode | ((value: number) => ReactNode)>>", "notes": "Override unit labels." },
|
|
1012
|
+
"segmentVariant": { "type": "'boxed' | 'plain'", "default": "boxed", "notes": "boxed = square with number, unit below." },
|
|
1013
|
+
"renderSegment": { "type": "(segment: TimerSegment, index: number) => ReactNode", "notes": "Custom per-cell rendering; TimerSegment = { unit, value, text, label }." },
|
|
1014
|
+
"segmentSeparator": { "type": "ReactNode", "notes": "Content between cells, e.g. ':'." },
|
|
1015
|
+
"label": { "type": "ReactNode" },
|
|
1016
|
+
"labelPlacement": { "type": "'top' | 'bottom' | 'left' | 'right'", "default": "bottom" },
|
|
1017
|
+
"onComplete": { "type": "() => void", "notes": "Countdown reaches zero." },
|
|
1018
|
+
"onTick": { "type": "(seconds: number) => void" },
|
|
1019
|
+
"classes": { "type": "Partial<TimerClasses>", "shape": ["root", "display", "label", "ringTrack", "ringProgress", "segments", "segment", "segmentValue", "segmentLabel"] }
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
"Modal": {
|
|
1023
|
+
"import": "import { Modal } from '@overdoser/react-toolkit'",
|
|
1024
|
+
"element": "div (portal at document.body)",
|
|
1025
|
+
"compoundComponents": [
|
|
1026
|
+
"Modal.Header",
|
|
1027
|
+
"Modal.Body",
|
|
1028
|
+
"Modal.Footer"
|
|
1029
|
+
],
|
|
1030
|
+
"props": {
|
|
1031
|
+
"open": {
|
|
1032
|
+
"type": "boolean",
|
|
1033
|
+
"required": true
|
|
1034
|
+
},
|
|
1035
|
+
"onClose": {
|
|
1036
|
+
"type": "() => void",
|
|
1037
|
+
"required": true
|
|
1038
|
+
},
|
|
1039
|
+
"closeOnBackdrop": {
|
|
1040
|
+
"type": "boolean",
|
|
1041
|
+
"default": true
|
|
1042
|
+
},
|
|
1043
|
+
"closeOnEscape": {
|
|
1044
|
+
"type": "boolean",
|
|
1045
|
+
"default": true
|
|
1046
|
+
},
|
|
1047
|
+
"size": {
|
|
1048
|
+
"type": "enum",
|
|
1049
|
+
"values": [
|
|
1050
|
+
"sm",
|
|
1051
|
+
"md",
|
|
1052
|
+
"lg",
|
|
1053
|
+
"fullscreen"
|
|
1054
|
+
],
|
|
1055
|
+
"default": "md"
|
|
1056
|
+
},
|
|
1057
|
+
"aria-label": {
|
|
1058
|
+
"type": "string"
|
|
1059
|
+
},
|
|
1060
|
+
"aria-labelledby": {
|
|
1061
|
+
"type": "string"
|
|
1062
|
+
},
|
|
1063
|
+
"classes": {
|
|
1064
|
+
"type": "Partial<ModalClasses>",
|
|
1065
|
+
"shape": [
|
|
1066
|
+
"backdrop",
|
|
1067
|
+
"modal",
|
|
1068
|
+
"header",
|
|
1069
|
+
"closeButton",
|
|
1070
|
+
"body",
|
|
1071
|
+
"footer"
|
|
1072
|
+
]
|
|
1073
|
+
}
|
|
175
1074
|
},
|
|
176
1075
|
"subComponents": {
|
|
177
1076
|
"Modal.Header": {
|
|
178
1077
|
"props": {
|
|
179
|
-
"children": {
|
|
180
|
-
|
|
1078
|
+
"children": {
|
|
1079
|
+
"type": "ReactNode",
|
|
1080
|
+
"required": true
|
|
1081
|
+
},
|
|
1082
|
+
"onClose": {
|
|
1083
|
+
"type": "() => void",
|
|
1084
|
+
"notes": "When set, renders an × close button."
|
|
1085
|
+
}
|
|
181
1086
|
}
|
|
182
1087
|
},
|
|
183
|
-
"Modal.Body": {
|
|
184
|
-
|
|
1088
|
+
"Modal.Body": {
|
|
1089
|
+
"props": {
|
|
1090
|
+
"children": {
|
|
1091
|
+
"type": "ReactNode",
|
|
1092
|
+
"required": true
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
"Modal.Footer": {
|
|
1097
|
+
"props": {
|
|
1098
|
+
"children": {
|
|
1099
|
+
"type": "ReactNode",
|
|
1100
|
+
"required": true
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
185
1104
|
},
|
|
186
|
-
"behavior": [
|
|
1105
|
+
"behavior": [
|
|
1106
|
+
"body scroll lock",
|
|
1107
|
+
"focus trap",
|
|
1108
|
+
"restores prior focus on close"
|
|
1109
|
+
]
|
|
187
1110
|
},
|
|
188
1111
|
"Form": {
|
|
189
1112
|
"import": "import { Form } from '@overdoser/react-toolkit'",
|
|
190
1113
|
"requires": "react-hook-form",
|
|
191
1114
|
"generic": "T extends FieldValues",
|
|
192
1115
|
"props": {
|
|
193
|
-
"form": {
|
|
194
|
-
|
|
195
|
-
|
|
1116
|
+
"form": {
|
|
1117
|
+
"type": "UseFormReturn<T>",
|
|
1118
|
+
"required": true,
|
|
1119
|
+
"notes": "The result of useForm()."
|
|
1120
|
+
},
|
|
1121
|
+
"onSubmit": {
|
|
1122
|
+
"type": "SubmitHandler<T>",
|
|
1123
|
+
"required": true
|
|
1124
|
+
},
|
|
1125
|
+
"errors": {
|
|
1126
|
+
"type": "ReactNode[]",
|
|
1127
|
+
"notes": "Top-of-form errors rendered above children with role=alert."
|
|
1128
|
+
},
|
|
1129
|
+
"reserveErrorSpace": {
|
|
1130
|
+
"type": "boolean | number | string",
|
|
1131
|
+
"default": true,
|
|
1132
|
+
"notes": "Form-wide default for every FormField reserveErrorSpace (fields can override). Same values as the field prop."
|
|
1133
|
+
},
|
|
1134
|
+
"fieldClasses": {
|
|
1135
|
+
"type": "Partial<FormFieldClasses>",
|
|
1136
|
+
"notes": "Default classes applied to every FormField, merged with each field own classes (both apply; fields add not replace). Keys: field, label, message, error, helperText."
|
|
1137
|
+
}
|
|
196
1138
|
}
|
|
197
1139
|
},
|
|
198
1140
|
"FormField": {
|
|
199
1141
|
"import": "import { FormField } from '@overdoser/react-toolkit'",
|
|
200
1142
|
"requires": "react-hook-form (must be inside <Form>)",
|
|
201
1143
|
"props": {
|
|
202
|
-
"name": {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
"
|
|
207
|
-
|
|
208
|
-
|
|
1144
|
+
"name": {
|
|
1145
|
+
"type": "string",
|
|
1146
|
+
"required": true
|
|
1147
|
+
},
|
|
1148
|
+
"label": {
|
|
1149
|
+
"type": "ReactNode"
|
|
1150
|
+
},
|
|
1151
|
+
"helperText": {
|
|
1152
|
+
"type": "ReactNode",
|
|
1153
|
+
"notes": "Description below the input. Stays visible on error; the error appears above it (between input and description), not replacing it."
|
|
1154
|
+
},
|
|
1155
|
+
"required": {
|
|
1156
|
+
"type": "boolean",
|
|
1157
|
+
"notes": "Adds a * indicator next to the label."
|
|
1158
|
+
},
|
|
1159
|
+
"rules": {
|
|
1160
|
+
"type": "Record<string, unknown>",
|
|
1161
|
+
"notes": "Passed to react-hook-form's useController."
|
|
1162
|
+
},
|
|
1163
|
+
"reserveErrorSpace": {
|
|
1164
|
+
"type": "boolean | number | string",
|
|
1165
|
+
"default": true,
|
|
1166
|
+
"notes": "Reserves a line AFTER the description so the field outer height stays constant when an error toggles. The error appears between input and description; the reserved spacer collapses 1:1, so fields below do not reflow (only the description shifts down). true=one line (--crk-field-error-min-height); false=no reservation; number=px; string=any CSS length."
|
|
1167
|
+
},
|
|
1168
|
+
"children": {
|
|
1169
|
+
"type": "ReactElement",
|
|
1170
|
+
"required": true,
|
|
1171
|
+
"notes": "Exactly one input element. FormField clones it to inject value/onChange/id/name/error/aria-*."
|
|
1172
|
+
},
|
|
1173
|
+
"classes": {
|
|
1174
|
+
"type": "Partial<FormFieldClasses>",
|
|
1175
|
+
"shape": [
|
|
1176
|
+
"field",
|
|
1177
|
+
"label",
|
|
1178
|
+
"message",
|
|
1179
|
+
"error",
|
|
1180
|
+
"helperText"
|
|
1181
|
+
]
|
|
1182
|
+
}
|
|
209
1183
|
},
|
|
210
1184
|
"behavior": {
|
|
211
|
-
"supportedChildren": [
|
|
1185
|
+
"supportedChildren": [
|
|
1186
|
+
"Input",
|
|
1187
|
+
"Textarea",
|
|
1188
|
+
"Select",
|
|
1189
|
+
"Dropdown (select-mode)",
|
|
1190
|
+
"Checkbox",
|
|
1191
|
+
"Radio",
|
|
1192
|
+
"RadioGroup",
|
|
1193
|
+
"CheckboxGroup"
|
|
1194
|
+
],
|
|
212
1195
|
"bridges": {
|
|
213
1196
|
"onValueChange": "Bridged to react-hook-form onChange (Select single, Dropdown).",
|
|
214
1197
|
"onValuesChange": "Bridged to react-hook-form onChange (Select multi).",
|
|
215
|
-
"checked": "Auto-set from value when value is boolean (Checkbox)."
|
|
1198
|
+
"checked": "Auto-set from value when value is boolean (Checkbox).",
|
|
1199
|
+
"values": "CheckboxGroup binds value:string[]/onChange(values) directly to the field — no bridge needed."
|
|
216
1200
|
}
|
|
217
1201
|
}
|
|
218
1202
|
},
|
|
219
1203
|
"FormRow": {
|
|
220
1204
|
"import": "import { FormRow } from '@overdoser/react-toolkit'",
|
|
221
|
-
"props": {
|
|
1205
|
+
"props": {
|
|
1206
|
+
"children": {
|
|
1207
|
+
"type": "ReactNode",
|
|
1208
|
+
"required": true
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
222
1211
|
},
|
|
223
1212
|
"Input": {
|
|
224
1213
|
"import": "import { Input } from '@overdoser/react-toolkit'",
|
|
@@ -226,11 +1215,35 @@
|
|
|
226
1215
|
"extendsNativeProps": "input (without prefix)",
|
|
227
1216
|
"forwardsRef": true,
|
|
228
1217
|
"props": {
|
|
229
|
-
"inputSize": {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
1218
|
+
"inputSize": {
|
|
1219
|
+
"type": "enum",
|
|
1220
|
+
"values": [
|
|
1221
|
+
"sm",
|
|
1222
|
+
"md",
|
|
1223
|
+
"lg"
|
|
1224
|
+
],
|
|
1225
|
+
"default": "md",
|
|
1226
|
+
"notes": "Toolkit size scale; independent of the native `size` HTML attribute."
|
|
1227
|
+
},
|
|
1228
|
+
"error": {
|
|
1229
|
+
"type": "boolean",
|
|
1230
|
+
"default": false
|
|
1231
|
+
},
|
|
1232
|
+
"prefix": {
|
|
1233
|
+
"type": "ReactNode"
|
|
1234
|
+
},
|
|
1235
|
+
"suffix": {
|
|
1236
|
+
"type": "ReactNode"
|
|
1237
|
+
},
|
|
1238
|
+
"classes": {
|
|
1239
|
+
"type": "Partial<InputClasses>",
|
|
1240
|
+
"shape": [
|
|
1241
|
+
"root",
|
|
1242
|
+
"wrapper",
|
|
1243
|
+
"prefix",
|
|
1244
|
+
"suffix"
|
|
1245
|
+
]
|
|
1246
|
+
}
|
|
234
1247
|
}
|
|
235
1248
|
},
|
|
236
1249
|
"Select": {
|
|
@@ -244,24 +1257,95 @@
|
|
|
244
1257
|
"multi": "When `multiple=true`. Chip-based multi with text filter."
|
|
245
1258
|
},
|
|
246
1259
|
"props": {
|
|
247
|
-
"inputSize": {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
"
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
"
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
"
|
|
264
|
-
|
|
1260
|
+
"inputSize": {
|
|
1261
|
+
"type": "enum",
|
|
1262
|
+
"values": [
|
|
1263
|
+
"sm",
|
|
1264
|
+
"md",
|
|
1265
|
+
"lg"
|
|
1266
|
+
],
|
|
1267
|
+
"default": "md"
|
|
1268
|
+
},
|
|
1269
|
+
"error": {
|
|
1270
|
+
"type": "boolean",
|
|
1271
|
+
"default": false
|
|
1272
|
+
},
|
|
1273
|
+
"options": {
|
|
1274
|
+
"type": "{ value: string; label: string; content?: ReactNode; disabled?: boolean }[]"
|
|
1275
|
+
},
|
|
1276
|
+
"placeholder": {
|
|
1277
|
+
"type": "string",
|
|
1278
|
+
"default": "Select..."
|
|
1279
|
+
},
|
|
1280
|
+
"searchable": {
|
|
1281
|
+
"type": "boolean",
|
|
1282
|
+
"default": false
|
|
1283
|
+
},
|
|
1284
|
+
"searchPlaceholder": {
|
|
1285
|
+
"type": "string",
|
|
1286
|
+
"default": "Search..."
|
|
1287
|
+
},
|
|
1288
|
+
"multiple": {
|
|
1289
|
+
"type": "boolean",
|
|
1290
|
+
"default": false
|
|
1291
|
+
},
|
|
1292
|
+
"value": {
|
|
1293
|
+
"type": "string | string[]",
|
|
1294
|
+
"notes": "string for single-mode, string[] for multi."
|
|
1295
|
+
},
|
|
1296
|
+
"onChange": {
|
|
1297
|
+
"type": "(e: ChangeEvent<HTMLSelectElement>) => void",
|
|
1298
|
+
"notes": "Native + searchable (synthetic for searchable)."
|
|
1299
|
+
},
|
|
1300
|
+
"onValueChange": {
|
|
1301
|
+
"type": "(value: string) => void",
|
|
1302
|
+
"notes": "Single-mode value-only callback."
|
|
1303
|
+
},
|
|
1304
|
+
"onValuesChange": {
|
|
1305
|
+
"type": "(values: string[]) => void",
|
|
1306
|
+
"notes": "Multi-mode callback."
|
|
1307
|
+
},
|
|
1308
|
+
"clearSearchOnSelect": {
|
|
1309
|
+
"type": "boolean",
|
|
1310
|
+
"default": true,
|
|
1311
|
+
"notes": "Multi-mode only."
|
|
1312
|
+
},
|
|
1313
|
+
"closeOnSelect": {
|
|
1314
|
+
"type": "boolean",
|
|
1315
|
+
"default": true,
|
|
1316
|
+
"notes": "Multi-mode only. Menu closes after each add/remove/create. Set false for the stay-open pattern."
|
|
1317
|
+
},
|
|
1318
|
+
"allowCreate": {
|
|
1319
|
+
"type": "boolean",
|
|
1320
|
+
"default": false,
|
|
1321
|
+
"notes": "Multi-mode only. Adds a 'Create <query>' row when the query doesn't match an existing option; pressing Enter (or clicking it) pushes the trimmed query into onValuesChange and fires onCreate."
|
|
1322
|
+
},
|
|
1323
|
+
"onCreate": {
|
|
1324
|
+
"type": "(value: string) => void",
|
|
1325
|
+
"notes": "Multi-mode only. Paired with allowCreate."
|
|
1326
|
+
},
|
|
1327
|
+
"createLabel": {
|
|
1328
|
+
"type": "(query: string) => ReactNode",
|
|
1329
|
+
"notes": "Multi-mode only. Custom render for the Create row."
|
|
1330
|
+
},
|
|
1331
|
+
"portal": {
|
|
1332
|
+
"type": "boolean",
|
|
1333
|
+
"default": true,
|
|
1334
|
+
"notes": "Applies to searchable + multiple modes. Renders the open menu in a portal at document.body using --crk-z-floating (1060) — escapes overflow:hidden ancestors and sits above modals. Set false to keep the menu in the trigger's subtree."
|
|
1335
|
+
},
|
|
1336
|
+
"classes": {
|
|
1337
|
+
"type": "Partial<SelectClasses>",
|
|
1338
|
+
"shape": [
|
|
1339
|
+
"wrapper",
|
|
1340
|
+
"root",
|
|
1341
|
+
"arrow",
|
|
1342
|
+
"search",
|
|
1343
|
+
"menu",
|
|
1344
|
+
"item",
|
|
1345
|
+
"chip",
|
|
1346
|
+
"chipRemove"
|
|
1347
|
+
]
|
|
1348
|
+
}
|
|
265
1349
|
}
|
|
266
1350
|
},
|
|
267
1351
|
"Checkbox": {
|
|
@@ -270,9 +1354,107 @@
|
|
|
270
1354
|
"extendsNativeProps": "input",
|
|
271
1355
|
"forwardsRef": true,
|
|
272
1356
|
"props": {
|
|
273
|
-
"label": {
|
|
274
|
-
|
|
275
|
-
|
|
1357
|
+
"label": {
|
|
1358
|
+
"type": "ReactNode"
|
|
1359
|
+
},
|
|
1360
|
+
"variant": {
|
|
1361
|
+
"type": "'checkbox' | 'switch'",
|
|
1362
|
+
"default": "checkbox",
|
|
1363
|
+
"notes": "switch renders a sliding toggle; the underlying input[type=checkbox] is identical."
|
|
1364
|
+
},
|
|
1365
|
+
"indeterminate": {
|
|
1366
|
+
"type": "boolean",
|
|
1367
|
+
"default": false,
|
|
1368
|
+
"notes": "Ignored when variant=switch."
|
|
1369
|
+
},
|
|
1370
|
+
"classes": {
|
|
1371
|
+
"type": "Partial<CheckboxClasses>",
|
|
1372
|
+
"shape": [
|
|
1373
|
+
"root",
|
|
1374
|
+
"input",
|
|
1375
|
+
"label"
|
|
1376
|
+
]
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
},
|
|
1380
|
+
"CheckboxGroup": {
|
|
1381
|
+
"import": "import { CheckboxGroup } from '@overdoser/react-toolkit'",
|
|
1382
|
+
"element": "div[role=group]",
|
|
1383
|
+
"forwardsRef": true,
|
|
1384
|
+
"props": {
|
|
1385
|
+
"options": {
|
|
1386
|
+
"type": "{ value: string; label: ReactNode; disabled?: boolean }[]",
|
|
1387
|
+
"required": true
|
|
1388
|
+
},
|
|
1389
|
+
"value": {
|
|
1390
|
+
"type": "string[]",
|
|
1391
|
+
"default": [],
|
|
1392
|
+
"notes": "Controlled selected values."
|
|
1393
|
+
},
|
|
1394
|
+
"onChange": {
|
|
1395
|
+
"type": "(values: string[]) => void",
|
|
1396
|
+
"notes": "Fires with the next array on each toggle."
|
|
1397
|
+
},
|
|
1398
|
+
"variant": {
|
|
1399
|
+
"type": "enum",
|
|
1400
|
+
"values": [
|
|
1401
|
+
"checkbox",
|
|
1402
|
+
"chips"
|
|
1403
|
+
],
|
|
1404
|
+
"default": "checkbox",
|
|
1405
|
+
"notes": "chips renders toggleable buttons (role=checkbox, aria-checked)."
|
|
1406
|
+
},
|
|
1407
|
+
"chipShape": {
|
|
1408
|
+
"type": "enum",
|
|
1409
|
+
"values": [
|
|
1410
|
+
"pill",
|
|
1411
|
+
"rounded",
|
|
1412
|
+
"square"
|
|
1413
|
+
],
|
|
1414
|
+
"default": "pill",
|
|
1415
|
+
"notes": "Chip corner style (chips only); square is the most rectangular."
|
|
1416
|
+
},
|
|
1417
|
+
"chipCheckmark": {
|
|
1418
|
+
"type": "boolean",
|
|
1419
|
+
"default": true,
|
|
1420
|
+
"notes": "Leading checkmark on selected chips (chips only). Chip total width stays constant: when checked, horizontal padding shrinks on both sides by half the mark+gap, so the freed space fits the mark and the centered content does not jump."
|
|
1421
|
+
},
|
|
1422
|
+
"orientation": {
|
|
1423
|
+
"type": "enum",
|
|
1424
|
+
"values": [
|
|
1425
|
+
"vertical",
|
|
1426
|
+
"horizontal"
|
|
1427
|
+
],
|
|
1428
|
+
"notes": "Defaults to vertical for checkbox, horizontal (wrapping) for chips."
|
|
1429
|
+
},
|
|
1430
|
+
"disabled": {
|
|
1431
|
+
"type": "boolean",
|
|
1432
|
+
"default": false,
|
|
1433
|
+
"notes": "Disables every option; per-option via options[].disabled."
|
|
1434
|
+
},
|
|
1435
|
+
"error": {
|
|
1436
|
+
"type": "boolean",
|
|
1437
|
+
"default": false
|
|
1438
|
+
},
|
|
1439
|
+
"name": {
|
|
1440
|
+
"type": "string"
|
|
1441
|
+
},
|
|
1442
|
+
"required": {
|
|
1443
|
+
"type": "boolean",
|
|
1444
|
+
"notes": "Sets aria-required on the group."
|
|
1445
|
+
},
|
|
1446
|
+
"classes": {
|
|
1447
|
+
"type": "Partial<CheckboxGroupClasses>",
|
|
1448
|
+
"shape": [
|
|
1449
|
+
"group",
|
|
1450
|
+
"option",
|
|
1451
|
+
"chip",
|
|
1452
|
+
"chipSelected"
|
|
1453
|
+
]
|
|
1454
|
+
}
|
|
1455
|
+
},
|
|
1456
|
+
"behavior": {
|
|
1457
|
+
"formField": "Works inside <FormField> directly (value:string[]/onChange(values) bind to the field)."
|
|
276
1458
|
}
|
|
277
1459
|
},
|
|
278
1460
|
"Radio": {
|
|
@@ -281,9 +1463,21 @@
|
|
|
281
1463
|
"extendsNativeProps": "input (without type)",
|
|
282
1464
|
"forwardsRef": true,
|
|
283
1465
|
"props": {
|
|
284
|
-
"value": {
|
|
285
|
-
|
|
286
|
-
|
|
1466
|
+
"value": {
|
|
1467
|
+
"type": "string",
|
|
1468
|
+
"required": true
|
|
1469
|
+
},
|
|
1470
|
+
"label": {
|
|
1471
|
+
"type": "ReactNode"
|
|
1472
|
+
},
|
|
1473
|
+
"classes": {
|
|
1474
|
+
"type": "Partial<RadioClasses>",
|
|
1475
|
+
"shape": [
|
|
1476
|
+
"root",
|
|
1477
|
+
"input",
|
|
1478
|
+
"label"
|
|
1479
|
+
]
|
|
1480
|
+
}
|
|
287
1481
|
},
|
|
288
1482
|
"behavior": "Inside a <RadioGroup>, name/checked/onChange come from context — do not pass them on Radio."
|
|
289
1483
|
},
|
|
@@ -291,13 +1485,29 @@
|
|
|
291
1485
|
"import": "import { RadioGroup } from '@overdoser/react-toolkit'",
|
|
292
1486
|
"element": "div[role=radiogroup]",
|
|
293
1487
|
"props": {
|
|
294
|
-
"name": {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
"
|
|
299
|
-
|
|
300
|
-
|
|
1488
|
+
"name": {
|
|
1489
|
+
"type": "string",
|
|
1490
|
+
"required": true
|
|
1491
|
+
},
|
|
1492
|
+
"value": {
|
|
1493
|
+
"type": "string",
|
|
1494
|
+
"notes": "Controlled selected value."
|
|
1495
|
+
},
|
|
1496
|
+
"onChange": {
|
|
1497
|
+
"type": "(value: string) => void"
|
|
1498
|
+
},
|
|
1499
|
+
"id": {
|
|
1500
|
+
"type": "string"
|
|
1501
|
+
},
|
|
1502
|
+
"aria-label": {
|
|
1503
|
+
"type": "string"
|
|
1504
|
+
},
|
|
1505
|
+
"aria-labelledby": {
|
|
1506
|
+
"type": "string"
|
|
1507
|
+
},
|
|
1508
|
+
"required": {
|
|
1509
|
+
"type": "boolean"
|
|
1510
|
+
}
|
|
301
1511
|
}
|
|
302
1512
|
},
|
|
303
1513
|
"Textarea": {
|
|
@@ -306,17 +1516,53 @@
|
|
|
306
1516
|
"extendsNativeProps": "textarea",
|
|
307
1517
|
"forwardsRef": true,
|
|
308
1518
|
"props": {
|
|
309
|
-
"inputSize": {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
1519
|
+
"inputSize": {
|
|
1520
|
+
"type": "enum",
|
|
1521
|
+
"values": [
|
|
1522
|
+
"sm",
|
|
1523
|
+
"md",
|
|
1524
|
+
"lg"
|
|
1525
|
+
],
|
|
1526
|
+
"default": "md"
|
|
1527
|
+
},
|
|
1528
|
+
"error": {
|
|
1529
|
+
"type": "boolean",
|
|
1530
|
+
"default": false
|
|
1531
|
+
},
|
|
1532
|
+
"resize": {
|
|
1533
|
+
"type": "enum",
|
|
1534
|
+
"values": [
|
|
1535
|
+
"none",
|
|
1536
|
+
"vertical",
|
|
1537
|
+
"horizontal",
|
|
1538
|
+
"both"
|
|
1539
|
+
],
|
|
1540
|
+
"default": "vertical",
|
|
1541
|
+
"notes": "Ignored when autoExpand=true."
|
|
1542
|
+
},
|
|
1543
|
+
"autoExpand": {
|
|
1544
|
+
"type": "boolean",
|
|
1545
|
+
"default": true,
|
|
1546
|
+
"notes": "When true, auto-grows height to fit content."
|
|
1547
|
+
}
|
|
313
1548
|
}
|
|
314
1549
|
},
|
|
315
1550
|
"LineChart": {
|
|
316
1551
|
"import": "import { LineChart, type ChartConfig } from '@overdoser/react-toolkit'",
|
|
317
1552
|
"element": "div containing responsive SVG",
|
|
318
1553
|
"generic": "T extends Record<string, unknown>",
|
|
319
|
-
"themeTokens": [
|
|
1554
|
+
"themeTokens": [
|
|
1555
|
+
"--crk-chart-1",
|
|
1556
|
+
"--crk-chart-2",
|
|
1557
|
+
"--crk-chart-3",
|
|
1558
|
+
"--crk-chart-4",
|
|
1559
|
+
"--crk-chart-5",
|
|
1560
|
+
"--crk-chart-grid",
|
|
1561
|
+
"--crk-chart-axis",
|
|
1562
|
+
"--crk-chart-label-inside",
|
|
1563
|
+
"--crk-chart-tooltip-bg",
|
|
1564
|
+
"--crk-chart-tooltip-text"
|
|
1565
|
+
],
|
|
320
1566
|
"shadcnVariantMapping": {
|
|
321
1567
|
"default": "no extra props",
|
|
322
1568
|
"multiple": "no extra props (multiple keys in config)",
|
|
@@ -330,31 +1576,123 @@
|
|
|
330
1576
|
"interactive": "Series-toggle pattern: keep multiple series in `data` but pass only the active series in `config` (`{ [active]: fullConfig[active] }`). Consumer-side selector — tiles, prev/next navigator, or <Dropdown> (see recipes/interactive-line-chart.tsx)."
|
|
331
1577
|
},
|
|
332
1578
|
"props": {
|
|
333
|
-
"data": {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
"
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
"
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
"
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
"
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
"
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
1579
|
+
"data": {
|
|
1580
|
+
"type": "T[]",
|
|
1581
|
+
"required": true
|
|
1582
|
+
},
|
|
1583
|
+
"xKey": {
|
|
1584
|
+
"type": "keyof T & string",
|
|
1585
|
+
"required": true
|
|
1586
|
+
},
|
|
1587
|
+
"config": {
|
|
1588
|
+
"type": "ChartConfig",
|
|
1589
|
+
"required": true,
|
|
1590
|
+
"notes": "Record<string, { label, color }> keyed by data-field names."
|
|
1591
|
+
},
|
|
1592
|
+
"aspectRatio": {
|
|
1593
|
+
"type": "number",
|
|
1594
|
+
"default": "16/9"
|
|
1595
|
+
},
|
|
1596
|
+
"height": {
|
|
1597
|
+
"type": "number",
|
|
1598
|
+
"notes": "Fixed pixel height. Overrides aspectRatio."
|
|
1599
|
+
},
|
|
1600
|
+
"curve": {
|
|
1601
|
+
"type": "enum",
|
|
1602
|
+
"values": [
|
|
1603
|
+
"linear",
|
|
1604
|
+
"monotone",
|
|
1605
|
+
"step"
|
|
1606
|
+
],
|
|
1607
|
+
"default": "monotone",
|
|
1608
|
+
"notes": "'step' is step-after — value holds until the next x."
|
|
1609
|
+
},
|
|
1610
|
+
"showPoints": {
|
|
1611
|
+
"type": "boolean",
|
|
1612
|
+
"default": true
|
|
1613
|
+
},
|
|
1614
|
+
"dotColorKey": {
|
|
1615
|
+
"type": "keyof T & string",
|
|
1616
|
+
"notes": "Each dot's fill = row[dotColorKey]. Line keeps the series color. Tooltip swatch follows the dot color."
|
|
1617
|
+
},
|
|
1618
|
+
"renderDot": {
|
|
1619
|
+
"type": "(args: { row, value, seriesKey, index, x, y, color, active }) => ReactNode",
|
|
1620
|
+
"notes": "Replaces the default circle with custom SVG per point."
|
|
1621
|
+
},
|
|
1622
|
+
"showValues": {
|
|
1623
|
+
"type": "boolean",
|
|
1624
|
+
"default": false
|
|
1625
|
+
},
|
|
1626
|
+
"valuePosition": {
|
|
1627
|
+
"type": "enum",
|
|
1628
|
+
"values": [
|
|
1629
|
+
"top",
|
|
1630
|
+
"bottom"
|
|
1631
|
+
],
|
|
1632
|
+
"default": "top"
|
|
1633
|
+
},
|
|
1634
|
+
"renderLabel": {
|
|
1635
|
+
"type": "(args: { row, value, seriesKey, index }) => ReactNode",
|
|
1636
|
+
"notes": "Custom label content. Overrides valueFormat for labels. Return null to skip."
|
|
1637
|
+
},
|
|
1638
|
+
"activeIndex": {
|
|
1639
|
+
"type": "number",
|
|
1640
|
+
"notes": "Highlight a specific point index; other points fade."
|
|
1641
|
+
},
|
|
1642
|
+
"onPointClick": {
|
|
1643
|
+
"type": "(args: { row, value, seriesKey, index }) => void"
|
|
1644
|
+
},
|
|
1645
|
+
"showGrid": {
|
|
1646
|
+
"type": "boolean",
|
|
1647
|
+
"default": true
|
|
1648
|
+
},
|
|
1649
|
+
"showLegend": {
|
|
1650
|
+
"type": "boolean",
|
|
1651
|
+
"default": true
|
|
1652
|
+
},
|
|
1653
|
+
"showTooltip": {
|
|
1654
|
+
"type": "boolean",
|
|
1655
|
+
"default": true
|
|
1656
|
+
},
|
|
1657
|
+
"yTickCount": {
|
|
1658
|
+
"type": "number",
|
|
1659
|
+
"default": 5
|
|
1660
|
+
},
|
|
1661
|
+
"yFormat": {
|
|
1662
|
+
"type": "(v: number) => string"
|
|
1663
|
+
},
|
|
1664
|
+
"xFormat": {
|
|
1665
|
+
"type": "(v: string) => string"
|
|
1666
|
+
},
|
|
1667
|
+
"valueFormat": {
|
|
1668
|
+
"type": "(v: number) => string"
|
|
1669
|
+
},
|
|
1670
|
+
"renderTooltip": {
|
|
1671
|
+
"type": "(row: T) => ReactNode"
|
|
1672
|
+
},
|
|
1673
|
+
"margin": {
|
|
1674
|
+
"type": "Partial<ChartMargin>",
|
|
1675
|
+
"default": "{ top: 12, right: 16, bottom: 28, left: 48 }"
|
|
1676
|
+
},
|
|
1677
|
+
"emptyMessage": {
|
|
1678
|
+
"type": "ReactNode",
|
|
1679
|
+
"default": "No data"
|
|
1680
|
+
},
|
|
1681
|
+
"classes": {
|
|
1682
|
+
"type": "Partial<ChartClasses>",
|
|
1683
|
+
"shape": [
|
|
1684
|
+
"root",
|
|
1685
|
+
"svg",
|
|
1686
|
+
"grid",
|
|
1687
|
+
"axis",
|
|
1688
|
+
"axisLabel",
|
|
1689
|
+
"series",
|
|
1690
|
+
"point",
|
|
1691
|
+
"legend",
|
|
1692
|
+
"legendItem",
|
|
1693
|
+
"tooltip"
|
|
1694
|
+
]
|
|
1695
|
+
}
|
|
358
1696
|
}
|
|
359
1697
|
},
|
|
360
1698
|
"AreaChart": {
|
|
@@ -374,28 +1712,100 @@
|
|
|
374
1712
|
"interactive": "Data-range filter: all series stay rendered (typically stacked + fillGradient); the selector swaps the slice of `data` shown (e.g. last 7d/14d/30d). Not a series toggle. Consumer-side selector — tiles, prev/next navigator, or <Dropdown>. See recipes/interactive-area-chart.tsx."
|
|
375
1713
|
},
|
|
376
1714
|
"props": {
|
|
377
|
-
"data": {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
"
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
"
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
"
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
"
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
"
|
|
398
|
-
|
|
1715
|
+
"data": {
|
|
1716
|
+
"type": "T[]",
|
|
1717
|
+
"required": true
|
|
1718
|
+
},
|
|
1719
|
+
"xKey": {
|
|
1720
|
+
"type": "keyof T & string",
|
|
1721
|
+
"required": true
|
|
1722
|
+
},
|
|
1723
|
+
"config": {
|
|
1724
|
+
"type": "ChartConfig",
|
|
1725
|
+
"required": true,
|
|
1726
|
+
"notes": "Each SeriesConfig may also include `icon?: ReactNode` to override the legend swatch."
|
|
1727
|
+
},
|
|
1728
|
+
"aspectRatio": {
|
|
1729
|
+
"type": "number",
|
|
1730
|
+
"default": "16/9"
|
|
1731
|
+
},
|
|
1732
|
+
"height": {
|
|
1733
|
+
"type": "number"
|
|
1734
|
+
},
|
|
1735
|
+
"curve": {
|
|
1736
|
+
"type": "enum",
|
|
1737
|
+
"values": [
|
|
1738
|
+
"linear",
|
|
1739
|
+
"monotone",
|
|
1740
|
+
"step"
|
|
1741
|
+
],
|
|
1742
|
+
"default": "monotone"
|
|
1743
|
+
},
|
|
1744
|
+
"stacked": {
|
|
1745
|
+
"type": "boolean",
|
|
1746
|
+
"default": false,
|
|
1747
|
+
"notes": "Stacks series bottom-up in config-key order."
|
|
1748
|
+
},
|
|
1749
|
+
"stackOffset": {
|
|
1750
|
+
"type": "enum",
|
|
1751
|
+
"values": [
|
|
1752
|
+
"none",
|
|
1753
|
+
"expand"
|
|
1754
|
+
],
|
|
1755
|
+
"default": "none",
|
|
1756
|
+
"notes": "`'expand'` normalizes each row to 100%. Requires stacked=true."
|
|
1757
|
+
},
|
|
1758
|
+
"fillGradient": {
|
|
1759
|
+
"type": "boolean",
|
|
1760
|
+
"default": false,
|
|
1761
|
+
"notes": "Per-series vertical linear gradient (opaque top → transparent bottom)."
|
|
1762
|
+
},
|
|
1763
|
+
"showGrid": {
|
|
1764
|
+
"type": "boolean",
|
|
1765
|
+
"default": true
|
|
1766
|
+
},
|
|
1767
|
+
"showXAxis": {
|
|
1768
|
+
"type": "boolean",
|
|
1769
|
+
"default": true
|
|
1770
|
+
},
|
|
1771
|
+
"showYAxis": {
|
|
1772
|
+
"type": "boolean",
|
|
1773
|
+
"default": true
|
|
1774
|
+
},
|
|
1775
|
+
"showLegend": {
|
|
1776
|
+
"type": "boolean",
|
|
1777
|
+
"default": true
|
|
1778
|
+
},
|
|
1779
|
+
"showTooltip": {
|
|
1780
|
+
"type": "boolean",
|
|
1781
|
+
"default": true
|
|
1782
|
+
},
|
|
1783
|
+
"yTickCount": {
|
|
1784
|
+
"type": "number",
|
|
1785
|
+
"default": 5
|
|
1786
|
+
},
|
|
1787
|
+
"yFormat": {
|
|
1788
|
+
"type": "(v: number) => string"
|
|
1789
|
+
},
|
|
1790
|
+
"xFormat": {
|
|
1791
|
+
"type": "(v: string) => string"
|
|
1792
|
+
},
|
|
1793
|
+
"valueFormat": {
|
|
1794
|
+
"type": "(v: number) => string"
|
|
1795
|
+
},
|
|
1796
|
+
"renderTooltip": {
|
|
1797
|
+
"type": "(row: T) => ReactNode"
|
|
1798
|
+
},
|
|
1799
|
+
"margin": {
|
|
1800
|
+
"type": "Partial<ChartMargin>"
|
|
1801
|
+
},
|
|
1802
|
+
"emptyMessage": {
|
|
1803
|
+
"type": "ReactNode",
|
|
1804
|
+
"default": "No data"
|
|
1805
|
+
},
|
|
1806
|
+
"classes": {
|
|
1807
|
+
"type": "Partial<ChartClasses>"
|
|
1808
|
+
}
|
|
399
1809
|
}
|
|
400
1810
|
},
|
|
401
1811
|
"BarChart": {
|
|
@@ -416,35 +1826,134 @@
|
|
|
416
1826
|
"interactive": "Series-toggle pattern: keep multiple series in `data` but pass only the active series in `config` (`{ [active]: fullConfig[active] }`). Consumer-side selector — tiles, prev/next navigator, or <Dropdown> (see recipes/interactive-bar-chart.tsx)."
|
|
417
1827
|
},
|
|
418
1828
|
"props": {
|
|
419
|
-
"data": {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
"
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
"
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
"
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
"
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
"
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
1829
|
+
"data": {
|
|
1830
|
+
"type": "T[]",
|
|
1831
|
+
"required": true
|
|
1832
|
+
},
|
|
1833
|
+
"xKey": {
|
|
1834
|
+
"type": "keyof T & string",
|
|
1835
|
+
"required": true
|
|
1836
|
+
},
|
|
1837
|
+
"config": {
|
|
1838
|
+
"type": "ChartConfig",
|
|
1839
|
+
"required": true
|
|
1840
|
+
},
|
|
1841
|
+
"orientation": {
|
|
1842
|
+
"type": "enum",
|
|
1843
|
+
"values": [
|
|
1844
|
+
"vertical",
|
|
1845
|
+
"horizontal"
|
|
1846
|
+
],
|
|
1847
|
+
"default": "vertical"
|
|
1848
|
+
},
|
|
1849
|
+
"stacked": {
|
|
1850
|
+
"type": "boolean",
|
|
1851
|
+
"default": false,
|
|
1852
|
+
"notes": "Stack series within each category. Ignored with a single series."
|
|
1853
|
+
},
|
|
1854
|
+
"aspectRatio": {
|
|
1855
|
+
"type": "number",
|
|
1856
|
+
"default": "16/9"
|
|
1857
|
+
},
|
|
1858
|
+
"height": {
|
|
1859
|
+
"type": "number"
|
|
1860
|
+
},
|
|
1861
|
+
"groupPadding": {
|
|
1862
|
+
"type": "number",
|
|
1863
|
+
"default": 0.2,
|
|
1864
|
+
"notes": "Inner padding between category groups, fraction of band width."
|
|
1865
|
+
},
|
|
1866
|
+
"barPadding": {
|
|
1867
|
+
"type": "number",
|
|
1868
|
+
"default": 0.1,
|
|
1869
|
+
"notes": "Inner padding between bars within a grouped group, fraction of bar width. Ignored when stacked."
|
|
1870
|
+
},
|
|
1871
|
+
"barRadius": {
|
|
1872
|
+
"type": "number",
|
|
1873
|
+
"default": 4
|
|
1874
|
+
},
|
|
1875
|
+
"showGrid": {
|
|
1876
|
+
"type": "boolean",
|
|
1877
|
+
"default": true
|
|
1878
|
+
},
|
|
1879
|
+
"showLegend": {
|
|
1880
|
+
"type": "boolean",
|
|
1881
|
+
"default": true
|
|
1882
|
+
},
|
|
1883
|
+
"showTooltip": {
|
|
1884
|
+
"type": "boolean",
|
|
1885
|
+
"default": true
|
|
1886
|
+
},
|
|
1887
|
+
"showValues": {
|
|
1888
|
+
"type": "boolean",
|
|
1889
|
+
"default": false,
|
|
1890
|
+
"notes": "Render a numeric label on every bar."
|
|
1891
|
+
},
|
|
1892
|
+
"valuePosition": {
|
|
1893
|
+
"type": "enum",
|
|
1894
|
+
"values": [
|
|
1895
|
+
"outside",
|
|
1896
|
+
"inside",
|
|
1897
|
+
"inside-start"
|
|
1898
|
+
],
|
|
1899
|
+
"default": "outside",
|
|
1900
|
+
"notes": "'inside-start' anchors at the baseline edge of the bar; on vertical bars the text rotates ±90° to read along the bar's length."
|
|
1901
|
+
},
|
|
1902
|
+
"renderLabel": {
|
|
1903
|
+
"type": "(args: { row, value, seriesKey, index }) => ReactNode",
|
|
1904
|
+
"notes": "Custom label content. Return null to skip. Overrides valueFormat for labels."
|
|
1905
|
+
},
|
|
1906
|
+
"colorBy": {
|
|
1907
|
+
"type": "enum",
|
|
1908
|
+
"values": [
|
|
1909
|
+
"series",
|
|
1910
|
+
"index"
|
|
1911
|
+
],
|
|
1912
|
+
"default": "series",
|
|
1913
|
+
"notes": "'index' picks color per row from `colors` (config colors are ignored)."
|
|
1914
|
+
},
|
|
1915
|
+
"colors": {
|
|
1916
|
+
"type": "string[]",
|
|
1917
|
+
"default": "the five --crk-chart-N tokens",
|
|
1918
|
+
"notes": "Palette used when colorBy='index'."
|
|
1919
|
+
},
|
|
1920
|
+
"negativeColor": {
|
|
1921
|
+
"type": "string",
|
|
1922
|
+
"notes": "Override fill applied to bars whose value is negative."
|
|
1923
|
+
},
|
|
1924
|
+
"activeIndex": {
|
|
1925
|
+
"type": "number",
|
|
1926
|
+
"notes": "Highlight one category index; other groups fade."
|
|
1927
|
+
},
|
|
1928
|
+
"onBarClick": {
|
|
1929
|
+
"type": "(args: { row, value, seriesKey, index }) => void"
|
|
1930
|
+
},
|
|
1931
|
+
"yTickCount": {
|
|
1932
|
+
"type": "number",
|
|
1933
|
+
"default": 5
|
|
1934
|
+
},
|
|
1935
|
+
"yFormat": {
|
|
1936
|
+
"type": "(v: number) => string"
|
|
1937
|
+
},
|
|
1938
|
+
"xFormat": {
|
|
1939
|
+
"type": "(v: string) => string"
|
|
1940
|
+
},
|
|
1941
|
+
"valueFormat": {
|
|
1942
|
+
"type": "(v: number) => string"
|
|
1943
|
+
},
|
|
1944
|
+
"renderTooltip": {
|
|
1945
|
+
"type": "(row: T) => ReactNode"
|
|
1946
|
+
},
|
|
1947
|
+
"margin": {
|
|
1948
|
+
"type": "Partial<ChartMargin>"
|
|
1949
|
+
},
|
|
1950
|
+
"emptyMessage": {
|
|
1951
|
+
"type": "ReactNode",
|
|
1952
|
+
"default": "No data"
|
|
1953
|
+
},
|
|
1954
|
+
"classes": {
|
|
1955
|
+
"type": "Partial<ChartClasses>"
|
|
1956
|
+
}
|
|
448
1957
|
}
|
|
449
1958
|
},
|
|
450
1959
|
"PieChart": {
|
|
@@ -465,31 +1974,109 @@
|
|
|
465
1974
|
"stacked": "Not currently supported (nested rings)."
|
|
466
1975
|
},
|
|
467
1976
|
"props": {
|
|
468
|
-
"data": {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
"
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
"
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
"
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
"
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
"
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
"
|
|
1977
|
+
"data": {
|
|
1978
|
+
"type": "T[]",
|
|
1979
|
+
"required": true
|
|
1980
|
+
},
|
|
1981
|
+
"valueKey": {
|
|
1982
|
+
"type": "keyof T & string",
|
|
1983
|
+
"required": true
|
|
1984
|
+
},
|
|
1985
|
+
"nameKey": {
|
|
1986
|
+
"type": "keyof T & string",
|
|
1987
|
+
"required": true
|
|
1988
|
+
},
|
|
1989
|
+
"colorKey": {
|
|
1990
|
+
"type": "keyof T & string",
|
|
1991
|
+
"notes": "Per-row fill from data; falls back to `colors` palette."
|
|
1992
|
+
},
|
|
1993
|
+
"colors": {
|
|
1994
|
+
"type": "string[]",
|
|
1995
|
+
"default": "the five --crk-chart-N tokens"
|
|
1996
|
+
},
|
|
1997
|
+
"aspectRatio": {
|
|
1998
|
+
"type": "number",
|
|
1999
|
+
"default": 1
|
|
2000
|
+
},
|
|
2001
|
+
"height": {
|
|
2002
|
+
"type": "number"
|
|
2003
|
+
},
|
|
2004
|
+
"innerRadius": {
|
|
2005
|
+
"type": "number | string",
|
|
2006
|
+
"default": 0,
|
|
2007
|
+
"notes": "0 = pie, >0 = donut. Number = pixels, string = 'NN%' of half the minimum chart side."
|
|
2008
|
+
},
|
|
2009
|
+
"outerRadius": {
|
|
2010
|
+
"type": "number | string",
|
|
2011
|
+
"default": "'90%'"
|
|
2012
|
+
},
|
|
2013
|
+
"strokeWidth": {
|
|
2014
|
+
"type": "number",
|
|
2015
|
+
"default": 2,
|
|
2016
|
+
"notes": "Slice separator stroke width. 0 = 'separator-none'."
|
|
2017
|
+
},
|
|
2018
|
+
"strokeColor": {
|
|
2019
|
+
"type": "string",
|
|
2020
|
+
"default": "var(--crk-color-bg)"
|
|
2021
|
+
},
|
|
2022
|
+
"padAngle": {
|
|
2023
|
+
"type": "number",
|
|
2024
|
+
"default": 0,
|
|
2025
|
+
"notes": "Degrees of visual gap between slices."
|
|
2026
|
+
},
|
|
2027
|
+
"showLabels": {
|
|
2028
|
+
"type": "boolean",
|
|
2029
|
+
"default": false
|
|
2030
|
+
},
|
|
2031
|
+
"valuePosition": {
|
|
2032
|
+
"type": "enum",
|
|
2033
|
+
"values": [
|
|
2034
|
+
"outside",
|
|
2035
|
+
"inside"
|
|
2036
|
+
],
|
|
2037
|
+
"default": "outside"
|
|
2038
|
+
},
|
|
2039
|
+
"showLabelLines": {
|
|
2040
|
+
"type": "boolean",
|
|
2041
|
+
"default": true,
|
|
2042
|
+
"notes": "Thin slice-colored leader line from the slice edge to each outside label. No effect for inside labels."
|
|
2043
|
+
},
|
|
2044
|
+
"renderLabel": {
|
|
2045
|
+
"type": "(args: { row, value, fraction, index }) => ReactNode",
|
|
2046
|
+
"notes": "Overrides showLabels default content. Return null to skip a slice."
|
|
2047
|
+
},
|
|
2048
|
+
"centerLabel": {
|
|
2049
|
+
"type": "ReactNode",
|
|
2050
|
+
"notes": "Rendered via foreignObject in the centre of the chart (only useful with innerRadius > 0)."
|
|
2051
|
+
},
|
|
2052
|
+
"activeIndex": {
|
|
2053
|
+
"type": "number",
|
|
2054
|
+
"notes": "Pulls the slice outward; other slices fade."
|
|
2055
|
+
},
|
|
2056
|
+
"onSliceClick": {
|
|
2057
|
+
"type": "(args: { row, value, index }) => void"
|
|
2058
|
+
},
|
|
2059
|
+
"showLegend": {
|
|
2060
|
+
"type": "boolean",
|
|
2061
|
+
"default": true
|
|
2062
|
+
},
|
|
2063
|
+
"showTooltip": {
|
|
2064
|
+
"type": "boolean",
|
|
2065
|
+
"default": true
|
|
2066
|
+
},
|
|
2067
|
+
"valueFormat": {
|
|
2068
|
+
"type": "(v: number) => string"
|
|
2069
|
+
},
|
|
2070
|
+
"renderTooltip": {
|
|
2071
|
+
"type": "(row: T) => ReactNode"
|
|
2072
|
+
},
|
|
2073
|
+
"emptyMessage": {
|
|
2074
|
+
"type": "ReactNode",
|
|
2075
|
+
"default": "No data"
|
|
2076
|
+
},
|
|
2077
|
+
"classes": {
|
|
2078
|
+
"type": "Partial<ChartClasses>"
|
|
2079
|
+
}
|
|
493
2080
|
}
|
|
494
2081
|
},
|
|
495
2082
|
"RadarChart": {
|
|
@@ -513,28 +2100,95 @@
|
|
|
513
2100
|
"radius": "showRadiusAxis"
|
|
514
2101
|
},
|
|
515
2102
|
"props": {
|
|
516
|
-
"data": {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
"
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
"
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
"
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
"
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
"
|
|
537
|
-
|
|
2103
|
+
"data": {
|
|
2104
|
+
"type": "T[]",
|
|
2105
|
+
"required": true
|
|
2106
|
+
},
|
|
2107
|
+
"axisKey": {
|
|
2108
|
+
"type": "keyof T & string",
|
|
2109
|
+
"required": true
|
|
2110
|
+
},
|
|
2111
|
+
"config": {
|
|
2112
|
+
"type": "ChartConfig",
|
|
2113
|
+
"required": true,
|
|
2114
|
+
"notes": "SeriesConfig may include `icon` for the icons variant."
|
|
2115
|
+
},
|
|
2116
|
+
"aspectRatio": {
|
|
2117
|
+
"type": "number",
|
|
2118
|
+
"default": 1
|
|
2119
|
+
},
|
|
2120
|
+
"height": {
|
|
2121
|
+
"type": "number"
|
|
2122
|
+
},
|
|
2123
|
+
"gridType": {
|
|
2124
|
+
"type": "enum",
|
|
2125
|
+
"values": [
|
|
2126
|
+
"polygon",
|
|
2127
|
+
"circle"
|
|
2128
|
+
],
|
|
2129
|
+
"default": "polygon"
|
|
2130
|
+
},
|
|
2131
|
+
"showGrid": {
|
|
2132
|
+
"type": "boolean",
|
|
2133
|
+
"default": true
|
|
2134
|
+
},
|
|
2135
|
+
"showRadialLines": {
|
|
2136
|
+
"type": "boolean",
|
|
2137
|
+
"default": true
|
|
2138
|
+
},
|
|
2139
|
+
"showAxisLabels": {
|
|
2140
|
+
"type": "boolean",
|
|
2141
|
+
"default": true
|
|
2142
|
+
},
|
|
2143
|
+
"showRadiusAxis": {
|
|
2144
|
+
"type": "boolean",
|
|
2145
|
+
"default": false
|
|
2146
|
+
},
|
|
2147
|
+
"levels": {
|
|
2148
|
+
"type": "number",
|
|
2149
|
+
"default": 5
|
|
2150
|
+
},
|
|
2151
|
+
"showPoints": {
|
|
2152
|
+
"type": "boolean",
|
|
2153
|
+
"default": true
|
|
2154
|
+
},
|
|
2155
|
+
"fillOpacity": {
|
|
2156
|
+
"type": "number",
|
|
2157
|
+
"default": 0.4,
|
|
2158
|
+
"notes": "0 = 'lines-only' variant."
|
|
2159
|
+
},
|
|
2160
|
+
"strokeWidth": {
|
|
2161
|
+
"type": "number",
|
|
2162
|
+
"default": 2
|
|
2163
|
+
},
|
|
2164
|
+
"renderAxisLabel": {
|
|
2165
|
+
"type": "(args: { row, index, angle, x, y, textAnchor }) => ReactNode",
|
|
2166
|
+
"notes": "Return null to skip a vertex."
|
|
2167
|
+
},
|
|
2168
|
+
"axisFormat": {
|
|
2169
|
+
"type": "(label: string) => string"
|
|
2170
|
+
},
|
|
2171
|
+
"valueFormat": {
|
|
2172
|
+
"type": "(v: number) => string"
|
|
2173
|
+
},
|
|
2174
|
+
"renderTooltip": {
|
|
2175
|
+
"type": "(row: T) => ReactNode"
|
|
2176
|
+
},
|
|
2177
|
+
"showLegend": {
|
|
2178
|
+
"type": "boolean",
|
|
2179
|
+
"default": true
|
|
2180
|
+
},
|
|
2181
|
+
"showTooltip": {
|
|
2182
|
+
"type": "boolean",
|
|
2183
|
+
"default": true
|
|
2184
|
+
},
|
|
2185
|
+
"emptyMessage": {
|
|
2186
|
+
"type": "ReactNode",
|
|
2187
|
+
"default": "No data"
|
|
2188
|
+
},
|
|
2189
|
+
"classes": {
|
|
2190
|
+
"type": "Partial<ChartClasses>"
|
|
2191
|
+
}
|
|
538
2192
|
}
|
|
539
2193
|
},
|
|
540
2194
|
"TradingChart": {
|
|
@@ -555,27 +2209,99 @@
|
|
|
555
2209
|
"volume": "{ type: 'volume', upColor?, downColor? } — sub-pane (histogram)"
|
|
556
2210
|
},
|
|
557
2211
|
"props": {
|
|
558
|
-
"datafeed": {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
"
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
"
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
"
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
"
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
2212
|
+
"datafeed": {
|
|
2213
|
+
"type": "Datafeed",
|
|
2214
|
+
"required": true
|
|
2215
|
+
},
|
|
2216
|
+
"symbol": {
|
|
2217
|
+
"type": "string",
|
|
2218
|
+
"required": true
|
|
2219
|
+
},
|
|
2220
|
+
"resolution": {
|
|
2221
|
+
"type": "Resolution",
|
|
2222
|
+
"required": true,
|
|
2223
|
+
"notes": "Bar size (the 'tick interval'). TradingView-style: numeric minutes ('1', '5', '60') or 'D'/'W'/'M'. Any other string passes through to the datafeed."
|
|
2224
|
+
},
|
|
2225
|
+
"period": {
|
|
2226
|
+
"type": "Period",
|
|
2227
|
+
"notes": "Visible time-range window (the 'chart interval'): '1D' | '5D' | '1M' | '3M' | '6M' | '1Y' | '5Y' | '10Y' | '20Y' | 'MAX' or a `<n><unit>` string. Overrides initialLookback when set. 'MAX' fetches from epoch and renders whatever the datafeed returns — pair with a coarse resolution. The chart does not auto-adjust resolution; pair with suggestResolutionForPeriod() / suggestPeriodForResolution() to couple the two."
|
|
2228
|
+
},
|
|
2229
|
+
"seriesType": {
|
|
2230
|
+
"type": "enum",
|
|
2231
|
+
"values": [
|
|
2232
|
+
"candle",
|
|
2233
|
+
"bar",
|
|
2234
|
+
"line",
|
|
2235
|
+
"area"
|
|
2236
|
+
],
|
|
2237
|
+
"default": "candle",
|
|
2238
|
+
"notes": "'bar' = OHLC bars (vertical high-low line, left tick at open, right tick at close)."
|
|
2239
|
+
},
|
|
2240
|
+
"timezone": {
|
|
2241
|
+
"type": "Timezone",
|
|
2242
|
+
"notes": "Controlled timezone for the crosshair time label. 'local' | 'utc' | IANA name. Pair with onTimezoneChange."
|
|
2243
|
+
},
|
|
2244
|
+
"defaultTimezone": {
|
|
2245
|
+
"type": "Timezone",
|
|
2246
|
+
"default": "local",
|
|
2247
|
+
"notes": "Initial timezone when uncontrolled."
|
|
2248
|
+
},
|
|
2249
|
+
"onTimezoneChange": {
|
|
2250
|
+
"type": "(tz: Timezone) => void"
|
|
2251
|
+
},
|
|
2252
|
+
"showConfigPanel": {
|
|
2253
|
+
"type": "boolean",
|
|
2254
|
+
"default": true,
|
|
2255
|
+
"notes": "Gear button in the header that opens a Popover with a Timezone dropdown (Local / UTC / common IANA zones)."
|
|
2256
|
+
},
|
|
2257
|
+
"priceBadgeColorByDirection": {
|
|
2258
|
+
"type": "boolean",
|
|
2259
|
+
"default": false,
|
|
2260
|
+
"notes": "Tint the top cursor-value badge by bar direction (up/down) instead of the neutral palette."
|
|
2261
|
+
},
|
|
2262
|
+
"priceBadgeShowTime": {
|
|
2263
|
+
"type": "boolean",
|
|
2264
|
+
"default": false,
|
|
2265
|
+
"notes": "Append a compact date (D/W/M: '17 Sep 2025') or weekday+date+time (intraday: 'Wed 17 Sep 14:30') AFTER the price in the top cursor-value badge. Honours `timezone`."
|
|
2266
|
+
},
|
|
2267
|
+
"priceBadgeTimeFormat": {
|
|
2268
|
+
"type": "(unixSec: number, resolution: Resolution, timezone: Timezone) => string",
|
|
2269
|
+
"notes": "Optional override for the time portion when priceBadgeShowTime is on. Return any string; empty string suppresses the suffix."
|
|
2270
|
+
},
|
|
2271
|
+
"indicators": {
|
|
2272
|
+
"type": "IndicatorConfig[]"
|
|
2273
|
+
},
|
|
2274
|
+
"precision": {
|
|
2275
|
+
"type": "number",
|
|
2276
|
+
"default": 2
|
|
2277
|
+
},
|
|
2278
|
+
"initialLookback": {
|
|
2279
|
+
"type": "number",
|
|
2280
|
+
"default": 500,
|
|
2281
|
+
"notes": "Used only when `period` is not set."
|
|
2282
|
+
},
|
|
2283
|
+
"height": {
|
|
2284
|
+
"type": "number",
|
|
2285
|
+
"default": 420
|
|
2286
|
+
},
|
|
2287
|
+
"upColor": {
|
|
2288
|
+
"type": "string",
|
|
2289
|
+
"default": "var(--crk-color-success)"
|
|
2290
|
+
},
|
|
2291
|
+
"downColor": {
|
|
2292
|
+
"type": "string",
|
|
2293
|
+
"default": "var(--crk-color-danger)"
|
|
2294
|
+
},
|
|
2295
|
+
"lineColor": {
|
|
2296
|
+
"type": "string",
|
|
2297
|
+
"default": "var(--crk-chart-1)"
|
|
2298
|
+
},
|
|
2299
|
+
"onCrosshair": {
|
|
2300
|
+
"type": "(info: CrosshairInfo | null) => void"
|
|
2301
|
+
},
|
|
2302
|
+
"onVisibleRangeChange": {
|
|
2303
|
+
"type": "(range: VisibleRange, bars: Bar[]) => void"
|
|
2304
|
+
}
|
|
579
2305
|
},
|
|
580
2306
|
"interactions": {
|
|
581
2307
|
"drag": "pan",
|
|
@@ -583,8 +2309,19 @@
|
|
|
583
2309
|
"arrow-keys": "nudge pan",
|
|
584
2310
|
"hover": "full crosshair — dashed horizontal + vertical lines, price badge on the right Y axis at the cursor's price, and a time badge under the X axis showing `YYYY-MM-DD HH:MM:SS <tz>` at the cursor's snapped bar (timezone configurable via the gear panel or props). OHLC readout in the chart header."
|
|
585
2311
|
},
|
|
586
|
-
"exportedHelpers": [
|
|
587
|
-
|
|
2312
|
+
"exportedHelpers": [
|
|
2313
|
+
"periodToSeconds",
|
|
2314
|
+
"suggestResolutionForPeriod",
|
|
2315
|
+
"suggestPeriodForResolution",
|
|
2316
|
+
"formatCrosshairTime"
|
|
2317
|
+
],
|
|
2318
|
+
"exportedIndicatorMath": [
|
|
2319
|
+
"sma",
|
|
2320
|
+
"ema",
|
|
2321
|
+
"bollinger",
|
|
2322
|
+
"rsi",
|
|
2323
|
+
"volumeSeries"
|
|
2324
|
+
],
|
|
588
2325
|
"outOfScope": [
|
|
589
2326
|
"Drawing tools (trend lines, fibonacci, shapes)",
|
|
590
2327
|
"Custom indicator settings dialog",
|
|
@@ -599,15 +2336,46 @@
|
|
|
599
2336
|
"forwardsRef": true,
|
|
600
2337
|
"behavior": "Inline trend line, fixed pixel size, no axes/legend/tooltip — for table cells and KPI tiles.",
|
|
601
2338
|
"props": {
|
|
602
|
-
"data": {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
"
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
"
|
|
2339
|
+
"data": {
|
|
2340
|
+
"type": "number[]",
|
|
2341
|
+
"required": true
|
|
2342
|
+
},
|
|
2343
|
+
"width": {
|
|
2344
|
+
"type": "number",
|
|
2345
|
+
"default": 80
|
|
2346
|
+
},
|
|
2347
|
+
"height": {
|
|
2348
|
+
"type": "number",
|
|
2349
|
+
"default": 24
|
|
2350
|
+
},
|
|
2351
|
+
"color": {
|
|
2352
|
+
"type": "string",
|
|
2353
|
+
"default": "var(--crk-chart-1)"
|
|
2354
|
+
},
|
|
2355
|
+
"strokeWidth": {
|
|
2356
|
+
"type": "number",
|
|
2357
|
+
"default": 1.5
|
|
2358
|
+
},
|
|
2359
|
+
"curve": {
|
|
2360
|
+
"type": "enum",
|
|
2361
|
+
"values": [
|
|
2362
|
+
"linear",
|
|
2363
|
+
"monotone"
|
|
2364
|
+
],
|
|
2365
|
+
"default": "monotone"
|
|
2366
|
+
},
|
|
2367
|
+
"fill": {
|
|
2368
|
+
"type": "boolean",
|
|
2369
|
+
"default": false,
|
|
2370
|
+
"notes": "Render a low-opacity area under the line."
|
|
2371
|
+
},
|
|
2372
|
+
"showLastPoint": {
|
|
2373
|
+
"type": "boolean",
|
|
2374
|
+
"default": false
|
|
2375
|
+
},
|
|
2376
|
+
"aria-label": {
|
|
2377
|
+
"type": "string"
|
|
2378
|
+
}
|
|
611
2379
|
}
|
|
612
2380
|
}
|
|
613
2381
|
},
|