@overdoser/react-toolkit 0.17.0 → 0.19.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 +51 -7
- package/CHANGELOG.md +149 -0
- package/components/Accordion/Accordion.d.ts +94 -0
- package/components/Accordion/Accordion.js +180 -0
- package/components/Accordion/Accordion.module.scss.js +36 -0
- package/components/Accordion/index.d.ts +2 -0
- package/components/Alert/Alert.d.ts +29 -1
- package/components/Alert/Alert.js +44 -30
- package/components/Alert/Alert.module.scss.js +24 -16
- package/components/Alert/index.d.ts +1 -1
- package/components/Card/Card.d.ts +86 -0
- package/components/Card/Card.js +132 -0
- package/components/Card/Card.module.scss.js +60 -0
- package/components/Card/index.d.ts +2 -0
- package/components/Chip/Chip.d.ts +86 -0
- package/components/Chip/Chip.js +141 -0
- package/components/Chip/Chip.module.scss.js +59 -0
- package/components/Chip/index.d.ts +2 -0
- package/components/CodeBlock/CodeBlock.d.ts +78 -0
- package/components/CodeBlock/CodeBlock.js +120 -0
- package/components/CodeBlock/CodeBlock.module.scss.js +43 -0
- package/components/CodeBlock/index.d.ts +2 -0
- package/components/CommandPalette/CommandPalette.d.ts +141 -0
- package/components/CommandPalette/CommandPalette.js +397 -0
- package/components/CommandPalette/CommandPalette.module.scss.js +49 -0
- package/components/CommandPalette/index.d.ts +2 -0
- package/components/ConfirmDialog/ConfirmDialog.d.ts +119 -0
- package/components/ConfirmDialog/ConfirmDialog.js +201 -0
- package/components/ConfirmDialog/ConfirmDialog.module.scss.js +21 -0
- package/components/ConfirmDialog/index.d.ts +2 -0
- package/components/Drawer/Drawer.d.ts +1 -0
- package/components/Drawer/Drawer.js +35 -36
- package/components/Drawer/Drawer.module.scss.js +20 -18
- package/components/Dropdown/Dropdown.d.ts +47 -7
- package/components/Dropdown/Dropdown.js +174 -81
- package/components/Dropdown/Dropdown.module.scss.js +40 -22
- package/components/Dropdown/DropdownItem.d.ts +31 -2
- package/components/Dropdown/DropdownItem.js +54 -27
- package/components/Dropdown/DropdownLabel.d.ts +11 -0
- package/components/Dropdown/DropdownLabel.js +11 -0
- package/components/Dropdown/DropdownSeparator.d.ts +12 -0
- package/components/Dropdown/DropdownSeparator.js +11 -0
- package/components/Dropdown/dropdownContext.d.ts +6 -0
- package/components/Dropdown/dropdownContext.js +5 -0
- package/components/Dropdown/index.d.ts +8 -2
- package/components/Dropdown/useContextMenu.d.ts +32 -0
- package/components/Dropdown/useContextMenu.js +18 -0
- package/components/EmptyState/EmptyState.d.ts +53 -0
- package/components/EmptyState/EmptyState.js +55 -0
- package/components/EmptyState/EmptyState.module.scss.js +25 -0
- package/components/EmptyState/index.d.ts +2 -0
- package/components/Form/FormField.js +25 -24
- package/components/ImageViewer/ImageViewer.d.ts +105 -0
- package/components/ImageViewer/ImageViewer.js +201 -0
- package/components/ImageViewer/ImageViewer.module.scss.js +47 -0
- package/components/ImageViewer/index.d.ts +4 -0
- package/components/ImageViewer/useZoomPan.d.ts +94 -0
- package/components/ImageViewer/useZoomPan.js +141 -0
- package/components/Kbd/Kbd.d.ts +26 -0
- package/components/Kbd/Kbd.js +22 -0
- package/components/Kbd/Kbd.module.scss.js +17 -0
- package/components/Kbd/index.d.ts +2 -0
- package/components/KeyValueList/KeyValueList.d.ts +84 -0
- package/components/KeyValueList/KeyValueList.js +127 -0
- package/components/KeyValueList/KeyValueList.module.scss.js +43 -0
- package/components/KeyValueList/index.d.ts +2 -0
- package/components/Loader/Loader.d.ts +104 -0
- package/components/Loader/Loader.js +186 -0
- package/components/Loader/Loader.module.scss.js +70 -0
- package/components/Loader/index.d.ts +2 -0
- package/components/Modal/Modal.d.ts +1 -0
- package/components/Modal/Modal.js +40 -41
- package/components/Modal/Modal.module.scss.js +18 -16
- package/components/PageHeader/PageHeader.d.ts +61 -0
- package/components/PageHeader/PageHeader.js +73 -0
- package/components/PageHeader/PageHeader.module.scss.js +43 -0
- package/components/PageHeader/index.d.ts +2 -0
- package/components/ProgressBar/ProgressBar.d.ts +74 -0
- package/components/ProgressBar/ProgressBar.js +90 -0
- package/components/ProgressBar/ProgressBar.module.scss.js +51 -0
- package/components/ProgressBar/index.d.ts +2 -0
- package/components/RelativeTime/RelativeTime.d.ts +45 -0
- package/components/RelativeTime/RelativeTime.js +43 -0
- package/components/RelativeTime/RelativeTime.module.scss.js +7 -0
- package/components/RelativeTime/index.d.ts +2 -0
- package/components/SegmentedControl/SegmentedControl.d.ts +84 -0
- package/components/SegmentedControl/SegmentedControl.js +131 -0
- package/components/SegmentedControl/SegmentedControl.module.scss.js +39 -0
- package/components/SegmentedControl/index.d.ts +2 -0
- package/components/SplitPane/SplitPane.d.ts +61 -0
- package/components/SplitPane/SplitPane.js +171 -0
- package/components/SplitPane/SplitPane.module.scss.js +25 -0
- package/components/SplitPane/index.d.ts +2 -0
- package/components/StatCard/StatCard.d.ts +105 -0
- package/components/StatCard/StatCard.js +127 -0
- package/components/StatCard/StatCard.module.scss.js +72 -0
- package/components/StatCard/index.d.ts +2 -0
- package/components/StatusDot/StatusDot.d.ts +33 -0
- package/components/StatusDot/StatusDot.js +39 -0
- package/components/StatusDot/StatusDot.module.scss.js +32 -0
- package/components/StatusDot/index.d.ts +2 -0
- package/components/Table/Table.d.ts +100 -2
- package/components/Table/Table.js +371 -210
- package/components/Table/Table.module.scss.js +68 -46
- package/components/Table/index.d.ts +1 -1
- package/components/ThemeToggle/ThemeToggle.d.ts +38 -0
- package/components/ThemeToggle/ThemeToggle.js +97 -0
- package/components/ThemeToggle/ThemeToggle.module.scss.js +23 -0
- package/components/ThemeToggle/index.d.ts +2 -0
- package/components/inputs/Checkbox/Checkbox.d.ts +2 -0
- package/components/inputs/Checkbox/Checkbox.js +29 -28
- package/components/inputs/Checkbox/Checkbox.module.scss.js +8 -6
- package/components/inputs/Input/Input.d.ts +33 -1
- package/components/inputs/Input/Input.js +94 -35
- package/components/inputs/Input/Input.module.scss.js +14 -12
- package/components/inputs/Radio/Radio.d.ts +5 -4
- package/components/inputs/Radio/Radio.js +55 -50
- package/components/inputs/Radio/Radio.module.scss.js +12 -10
- package/components/inputs/SearchInput/SearchInput.d.ts +57 -0
- package/components/inputs/SearchInput/SearchInput.js +116 -0
- package/components/inputs/SearchInput/SearchInput.module.scss.js +13 -0
- package/components/inputs/SearchInput/index.d.ts +2 -0
- package/components/inputs/Select/Select.d.ts +52 -0
- package/components/inputs/Select/Select.js +494 -385
- package/components/inputs/Select/Select.module.scss.js +34 -30
- package/components/inputs/Switch/Switch.d.ts +15 -0
- package/components/inputs/Switch/Switch.js +8 -0
- package/components/inputs/Switch/index.d.ts +2 -0
- package/hooks/useDebouncedValue.d.ts +15 -0
- package/hooks/useDebouncedValue.js +15 -0
- package/hooks/useElementSize.d.ts +20 -0
- package/hooks/useElementSize.js +23 -0
- package/hooks/useKeyboard.d.ts +49 -5
- package/hooks/useKeyboard.js +66 -16
- package/hooks/useMediaQuery.d.ts +14 -0
- package/hooks/useMediaQuery.js +16 -0
- package/hooks/useNow.d.ts +14 -0
- package/hooks/useNow.js +35 -0
- package/hooks/usePersistedState.d.ts +30 -0
- package/hooks/usePersistedState.js +96 -0
- package/hooks/useResizable.d.ts +66 -0
- package/hooks/useResizable.js +105 -0
- package/hooks/useTheme.d.ts +33 -0
- package/hooks/useTheme.js +27 -0
- package/index.css +1 -1
- package/index.d.ts +60 -4
- package/index.js +208 -130
- package/index.layered.css +1 -1
- package/llms.txt +659 -25
- package/manifest.json +1797 -76
- package/package.json +1 -1
- package/recipes/confirm-modal.tsx +65 -53
- package/recipes/floating-copy-button.tsx +32 -28
- package/utils/formatBytes.d.ts +21 -0
- package/utils/formatBytes.js +14 -0
- package/utils/index.d.ts +6 -0
- package/utils/themeScript.d.ts +17 -0
- package/utils/themeScript.js +9 -0
- package/utils/timeAgo.d.ts +33 -0
- package/utils/timeAgo.js +37 -0
package/manifest.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
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
7
|
"themeCssLayeredImport": "@overdoser/react-toolkit/theme.layered.css",
|
|
8
|
-
"stylingNotes": "className/classes.* overrides are plain CSS classes
|
|
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.",
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"required": [
|
|
11
11
|
"react",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"iconOnly": {
|
|
64
64
|
"type": "boolean",
|
|
65
65
|
"default": false,
|
|
66
|
-
"notes": "Squares the button and renders content larger/bolder. For single-glyph buttons (
|
|
66
|
+
"notes": "Squares the button and renders content larger/bolder. For single-glyph buttons (‹, ›, ×, +). Always pair with aria-label."
|
|
67
67
|
},
|
|
68
68
|
"classes": {
|
|
69
69
|
"type": "Partial<ButtonClasses>",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"element": "button",
|
|
83
83
|
"extendsNativeProps": "button (except children)",
|
|
84
84
|
"forwardsRef": true,
|
|
85
|
-
"notes": "Stateful action button with morphing icon/label layers: idle
|
|
85
|
+
"notes": "Stateful action button with morphing icon/label layers: idle → (armed) → (pending) → success → idle. Async onAction shows a pending spinner; confirmLabel adds a two-step confirm. Phase exposed as data-phase on the root; transitions/colors themeable via --crk-action-* custom properties; respects prefers-reduced-motion.",
|
|
86
86
|
"props": {
|
|
87
87
|
"icon": {
|
|
88
88
|
"type": "ReactNode",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
},
|
|
121
121
|
"onAction": {
|
|
122
122
|
"type": "(context: { setProgress: (percent: number | null) => void }) => void | Promise<unknown>",
|
|
123
|
-
"notes": "Return a promise for a pending phase; rejection returns to idle and calls onError. Call context.setProgress(0
|
|
123
|
+
"notes": "Return a promise for a pending phase; rejection returns to idle and calls onError. Call context.setProgress(0–100) during the promise for a determinate pending state (% label + accent fill bar); null falls back to the spinner."
|
|
124
124
|
},
|
|
125
125
|
"progressLabel": {
|
|
126
126
|
"type": "(percent: number) => ReactNode",
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
"element": "button",
|
|
249
249
|
"extendsNativeProps": "button (except children)",
|
|
250
250
|
"forwardsRef": true,
|
|
251
|
-
"notes": "Preconfigured ActionButton for copy-to-clipboard: clipboard icon morphs into a check, label swaps Copy
|
|
251
|
+
"notes": "Preconfigured ActionButton for copy-to-clipboard: clipboard icon morphs into a check, label swaps Copy → Copied, success tint, auto-reset. All ActionButton props apply. Falls back to execCommand('copy') without the Clipboard API. Floating over content (e.g. a code snippet): secondary/ghost are transparent at rest, so give a wrapper a solid --crk-color-bg fill + the button's radius — see recipes/floating-copy-button.tsx.",
|
|
252
252
|
"props": {
|
|
253
253
|
"value": {
|
|
254
254
|
"type": "string | (() => string | Promise<string>)",
|
|
@@ -290,12 +290,12 @@
|
|
|
290
290
|
"external": {
|
|
291
291
|
"type": "boolean",
|
|
292
292
|
"default": false,
|
|
293
|
-
"notes": "Adds target=_blank, rel=noopener noreferrer, an inline
|
|
293
|
+
"notes": "Adds target=_blank, rel=noopener noreferrer, an inline ↗ icon, and an sr-only 'opens in a new tab' suffix."
|
|
294
294
|
},
|
|
295
295
|
"hideExternalIcon": {
|
|
296
296
|
"type": "boolean",
|
|
297
297
|
"default": false,
|
|
298
|
-
"notes": "Hide the inline
|
|
298
|
+
"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."
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
},
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
},
|
|
407
407
|
"onSort": {
|
|
408
408
|
"type": "(config: SortConfig[]) => void",
|
|
409
|
-
"notes": "When set, Table is fully controlled
|
|
409
|
+
"notes": "When set, Table is fully controlled — does not sort or paginate data internally."
|
|
410
410
|
},
|
|
411
411
|
"multiSort": {
|
|
412
412
|
"type": "boolean",
|
|
@@ -463,8 +463,65 @@
|
|
|
463
463
|
"cell",
|
|
464
464
|
"emptyCell",
|
|
465
465
|
"paginator",
|
|
466
|
-
"pageButton"
|
|
466
|
+
"pageButton",
|
|
467
|
+
"rowClickable",
|
|
468
|
+
"rowSelected",
|
|
469
|
+
"selectCell",
|
|
470
|
+
"selectHeaderCell",
|
|
471
|
+
"bulkBar",
|
|
472
|
+
"bulkLabel",
|
|
473
|
+
"bulkClear",
|
|
474
|
+
"bulkActions",
|
|
475
|
+
"loadingRow"
|
|
467
476
|
]
|
|
477
|
+
},
|
|
478
|
+
"loading": {
|
|
479
|
+
"type": "boolean",
|
|
480
|
+
"default": false,
|
|
481
|
+
"notes": "Loader overlay (150ms delay), rows keep height, aria-busy. Skeleton rows when data is empty."
|
|
482
|
+
},
|
|
483
|
+
"loadingRows": {
|
|
484
|
+
"type": "number",
|
|
485
|
+
"default": 3
|
|
486
|
+
},
|
|
487
|
+
"onRowClick": {
|
|
488
|
+
"type": "(row: T, index: number, event: MouseEvent<HTMLTableRowElement>) => void",
|
|
489
|
+
"notes": "Rows get tabIndex=0, pointer/hover, Enter/Space. Clicks on interactive descendants are ignored."
|
|
490
|
+
},
|
|
491
|
+
"selectable": {
|
|
492
|
+
"type": "boolean",
|
|
493
|
+
"default": false,
|
|
494
|
+
"notes": "Leading checkbox column; requires rowKey."
|
|
495
|
+
},
|
|
496
|
+
"selectedKeys": {
|
|
497
|
+
"type": "TableRowKey[]",
|
|
498
|
+
"notes": "Controlled selection."
|
|
499
|
+
},
|
|
500
|
+
"defaultSelectedKeys": {
|
|
501
|
+
"type": "TableRowKey[]",
|
|
502
|
+
"default": []
|
|
503
|
+
},
|
|
504
|
+
"onSelectionChange": {
|
|
505
|
+
"type": "(keys: TableRowKey[], rows: T[]) => void"
|
|
506
|
+
},
|
|
507
|
+
"isRowSelectable": {
|
|
508
|
+
"type": "(row: T) => boolean"
|
|
509
|
+
},
|
|
510
|
+
"bulkActions": {
|
|
511
|
+
"type": "ReactNode | ((ctx: { selectedKeys; selectedRows: T[]; clear: () => void }) => ReactNode)",
|
|
512
|
+
"notes": "Bar above the table while something is selected."
|
|
513
|
+
},
|
|
514
|
+
"selectionLabel": {
|
|
515
|
+
"type": "(count: number) => ReactNode",
|
|
516
|
+
"default": "`${n} selected`"
|
|
517
|
+
},
|
|
518
|
+
"columnVisibility": {
|
|
519
|
+
"type": "Record<string, boolean>",
|
|
520
|
+
"notes": "false hides that column; no picker UI."
|
|
521
|
+
},
|
|
522
|
+
"layout": {
|
|
523
|
+
"type": "'auto' | 'fixed'",
|
|
524
|
+
"default": "auto"
|
|
468
525
|
}
|
|
469
526
|
},
|
|
470
527
|
"subTypes": {
|
|
@@ -562,16 +619,18 @@
|
|
|
562
619
|
}
|
|
563
620
|
},
|
|
564
621
|
"behavior": {
|
|
565
|
-
"sortCycle": "none
|
|
566
|
-
"controlledMode": "Activated when onSort is provided. Table renders data as-is and does not slice for pagination."
|
|
622
|
+
"sortCycle": "none → asc → desc → none",
|
|
623
|
+
"controlledMode": "Activated when onSort is provided. Table renders data as-is and does not slice for pagination.",
|
|
624
|
+
"selection": "Select-all covers the current page only (checked/indeterminate); Shift-click selects a range; selections on other pages are kept."
|
|
567
625
|
}
|
|
568
626
|
},
|
|
569
627
|
"Dropdown": {
|
|
570
|
-
"import": "import { Dropdown, DropdownItem } from '@overdoser/react-toolkit'",
|
|
628
|
+
"import": "import { Dropdown, DropdownItem, DropdownSeparator, DropdownLabel, useContextMenu } from '@overdoser/react-toolkit'",
|
|
571
629
|
"element": "div",
|
|
572
630
|
"modes": {
|
|
573
631
|
"menu": "Pass `trigger` plus <DropdownItem> children.",
|
|
574
|
-
"select": "Pass `options` + `value` + `onChange`. Trigger label shows the selected option."
|
|
632
|
+
"select": "Pass `options` + `value` + `onChange`. Trigger label shows the selected option.",
|
|
633
|
+
"context": "Pass `anchor={{ x, y }}` (+ open/onOpenChange) and no trigger: menu opens at that viewport point. `useContextMenu()` wires it from a right-click."
|
|
575
634
|
},
|
|
576
635
|
"props": {
|
|
577
636
|
"trigger": {
|
|
@@ -631,10 +690,29 @@
|
|
|
631
690
|
"triggerLabel",
|
|
632
691
|
"chevron",
|
|
633
692
|
"menu",
|
|
634
|
-
"item"
|
|
693
|
+
"item",
|
|
694
|
+
"itemIcon",
|
|
695
|
+
"itemLabel",
|
|
696
|
+
"itemDescription",
|
|
697
|
+
"itemShortcut",
|
|
698
|
+
"itemCheck",
|
|
699
|
+
"separator",
|
|
700
|
+
"label"
|
|
635
701
|
]
|
|
702
|
+
},
|
|
703
|
+
"open": {
|
|
704
|
+
"type": "boolean",
|
|
705
|
+
"notes": "Controlled open state (any mode)."
|
|
706
|
+
},
|
|
707
|
+
"onOpenChange": {
|
|
708
|
+
"type": "(open: boolean) => void"
|
|
709
|
+
},
|
|
710
|
+
"anchor": {
|
|
711
|
+
"type": "{ x: number; y: number } | null",
|
|
712
|
+
"notes": "Context-menu mode. Clamped to the viewport, flips on overflow."
|
|
636
713
|
}
|
|
637
|
-
}
|
|
714
|
+
},
|
|
715
|
+
"keyboard": "ArrowUp/Down wrap over enabled items (labels, separators, disabled skipped), Home/End, typeahead, Enter/Space."
|
|
638
716
|
},
|
|
639
717
|
"DropdownItem": {
|
|
640
718
|
"import": "import { DropdownItem } from '@overdoser/react-toolkit'",
|
|
@@ -645,9 +723,51 @@
|
|
|
645
723
|
"disabled": {
|
|
646
724
|
"type": "boolean",
|
|
647
725
|
"default": false
|
|
726
|
+
},
|
|
727
|
+
"danger": {
|
|
728
|
+
"type": "boolean",
|
|
729
|
+
"default": false
|
|
730
|
+
},
|
|
731
|
+
"icon": {
|
|
732
|
+
"type": "ReactNode",
|
|
733
|
+
"notes": "Leading slot, aria-hidden."
|
|
734
|
+
},
|
|
735
|
+
"shortcut": {
|
|
736
|
+
"type": "ReactNode",
|
|
737
|
+
"notes": "Trailing hint, aria-hidden; pass <Kbd>."
|
|
738
|
+
},
|
|
739
|
+
"description": {
|
|
740
|
+
"type": "ReactNode",
|
|
741
|
+
"notes": "Muted second line."
|
|
742
|
+
},
|
|
743
|
+
"checked": {
|
|
744
|
+
"type": "boolean",
|
|
745
|
+
"notes": "When defined: role=menuitemcheckbox + aria-checked + check slot."
|
|
746
|
+
},
|
|
747
|
+
"closeOnSelect": {
|
|
748
|
+
"type": "boolean",
|
|
749
|
+
"notes": "Default true for action items, false for checkable ones."
|
|
750
|
+
},
|
|
751
|
+
"classes": {
|
|
752
|
+
"type": "Partial<Pick<DropdownClasses, 'item' | 'itemIcon' | 'itemLabel' | 'itemDescription' | 'itemShortcut' | 'itemCheck'>>"
|
|
648
753
|
}
|
|
649
754
|
}
|
|
650
755
|
},
|
|
756
|
+
"DropdownSeparator": {
|
|
757
|
+
"import": "import { DropdownSeparator } from '@overdoser/react-toolkit'",
|
|
758
|
+
"element": "div[role=separator]",
|
|
759
|
+
"forwardsRef": true,
|
|
760
|
+
"extendsNativeProps": "div",
|
|
761
|
+
"props": {}
|
|
762
|
+
},
|
|
763
|
+
"DropdownLabel": {
|
|
764
|
+
"import": "import { DropdownLabel } from '@overdoser/react-toolkit'",
|
|
765
|
+
"element": "div[role=presentation]",
|
|
766
|
+
"forwardsRef": true,
|
|
767
|
+
"extendsNativeProps": "div",
|
|
768
|
+
"props": {},
|
|
769
|
+
"behavior": "Non-interactive section heading inside a menu."
|
|
770
|
+
},
|
|
651
771
|
"SplitButton": {
|
|
652
772
|
"import": "import { SplitButton, type SplitButtonAction } from '@overdoser/react-toolkit'",
|
|
653
773
|
"element": "div",
|
|
@@ -786,7 +906,7 @@
|
|
|
786
906
|
"outside click",
|
|
787
907
|
"Escape"
|
|
788
908
|
],
|
|
789
|
-
"childrenTyped": "never
|
|
909
|
+
"childrenTyped": "never — pass via `content` prop"
|
|
790
910
|
}
|
|
791
911
|
},
|
|
792
912
|
"Draggable": {
|
|
@@ -845,10 +965,180 @@
|
|
|
845
965
|
}
|
|
846
966
|
}
|
|
847
967
|
},
|
|
968
|
+
"SplitPane": {
|
|
969
|
+
"import": "import { SplitPane } from '@overdoser/react-toolkit'",
|
|
970
|
+
"element": "div with two panes and a div[role=separator] handle",
|
|
971
|
+
"forwardsRef": true,
|
|
972
|
+
"extendsNativeProps": "div (without children)",
|
|
973
|
+
"props": {
|
|
974
|
+
"children": {
|
|
975
|
+
"type": "[ReactNode, ReactNode]",
|
|
976
|
+
"required": true
|
|
977
|
+
},
|
|
978
|
+
"direction": {
|
|
979
|
+
"type": "'horizontal' | 'vertical'",
|
|
980
|
+
"default": "horizontal"
|
|
981
|
+
},
|
|
982
|
+
"primary": {
|
|
983
|
+
"type": "'first' | 'second'",
|
|
984
|
+
"default": "first"
|
|
985
|
+
},
|
|
986
|
+
"size": {
|
|
987
|
+
"type": "number | string",
|
|
988
|
+
"notes": "Controlled px or '30%'."
|
|
989
|
+
},
|
|
990
|
+
"defaultSize": {
|
|
991
|
+
"type": "number | string",
|
|
992
|
+
"default": "50%"
|
|
993
|
+
},
|
|
994
|
+
"onSizeChange": {
|
|
995
|
+
"type": "(px: number) => void"
|
|
996
|
+
},
|
|
997
|
+
"minSize": {
|
|
998
|
+
"type": "number",
|
|
999
|
+
"default": 100
|
|
1000
|
+
},
|
|
1001
|
+
"maxSize": {
|
|
1002
|
+
"type": "number",
|
|
1003
|
+
"notes": "Default container − minSecondarySize − handle."
|
|
1004
|
+
},
|
|
1005
|
+
"minSecondarySize": {
|
|
1006
|
+
"type": "number",
|
|
1007
|
+
"default": 100
|
|
1008
|
+
},
|
|
1009
|
+
"collapsible": {
|
|
1010
|
+
"type": "boolean",
|
|
1011
|
+
"default": false
|
|
1012
|
+
},
|
|
1013
|
+
"collapsed": {
|
|
1014
|
+
"type": "boolean"
|
|
1015
|
+
},
|
|
1016
|
+
"defaultCollapsed": {
|
|
1017
|
+
"type": "boolean",
|
|
1018
|
+
"default": false
|
|
1019
|
+
},
|
|
1020
|
+
"onCollapsedChange": {
|
|
1021
|
+
"type": "(collapsed: boolean) => void"
|
|
1022
|
+
},
|
|
1023
|
+
"persistKey": {
|
|
1024
|
+
"type": "string",
|
|
1025
|
+
"notes": "localStorage via usePersistedState."
|
|
1026
|
+
},
|
|
1027
|
+
"handleSize": {
|
|
1028
|
+
"type": "number",
|
|
1029
|
+
"default": 6
|
|
1030
|
+
},
|
|
1031
|
+
"handleLabel": {
|
|
1032
|
+
"type": "string",
|
|
1033
|
+
"default": "Resize"
|
|
1034
|
+
},
|
|
1035
|
+
"disabled": {
|
|
1036
|
+
"type": "boolean",
|
|
1037
|
+
"default": false
|
|
1038
|
+
},
|
|
1039
|
+
"classes": {
|
|
1040
|
+
"type": "Partial<SplitPaneClasses>",
|
|
1041
|
+
"shape": [
|
|
1042
|
+
"root",
|
|
1043
|
+
"pane",
|
|
1044
|
+
"primary",
|
|
1045
|
+
"secondary",
|
|
1046
|
+
"handle",
|
|
1047
|
+
"handleActive",
|
|
1048
|
+
"collapsed"
|
|
1049
|
+
]
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
"keyboard": "Arrows ±16px (Shift ×10), Home/End, double-click resets / toggles collapse."
|
|
1053
|
+
},
|
|
1054
|
+
"ImageViewer": {
|
|
1055
|
+
"import": "import { ImageViewer, useZoomPan } from '@overdoser/react-toolkit'",
|
|
1056
|
+
"element": "portaled div[role=dialog][aria-modal]",
|
|
1057
|
+
"forwardsRef": true,
|
|
1058
|
+
"props": {
|
|
1059
|
+
"open": {
|
|
1060
|
+
"type": "boolean",
|
|
1061
|
+
"required": true
|
|
1062
|
+
},
|
|
1063
|
+
"onClose": {
|
|
1064
|
+
"type": "() => void",
|
|
1065
|
+
"required": true
|
|
1066
|
+
},
|
|
1067
|
+
"items": {
|
|
1068
|
+
"type": "{ src: string; alt?: string; thumbnail?: string; caption?: ReactNode; download?: string | boolean }[]",
|
|
1069
|
+
"required": true
|
|
1070
|
+
},
|
|
1071
|
+
"index": {
|
|
1072
|
+
"type": "number",
|
|
1073
|
+
"notes": "Controlled."
|
|
1074
|
+
},
|
|
1075
|
+
"defaultIndex": {
|
|
1076
|
+
"type": "number",
|
|
1077
|
+
"default": 0
|
|
1078
|
+
},
|
|
1079
|
+
"onIndexChange": {
|
|
1080
|
+
"type": "(index: number) => void"
|
|
1081
|
+
},
|
|
1082
|
+
"loop": {
|
|
1083
|
+
"type": "boolean",
|
|
1084
|
+
"default": true
|
|
1085
|
+
},
|
|
1086
|
+
"showCounter": {
|
|
1087
|
+
"type": "boolean",
|
|
1088
|
+
"default": true
|
|
1089
|
+
},
|
|
1090
|
+
"showThumbnails": {
|
|
1091
|
+
"type": "boolean",
|
|
1092
|
+
"default": false
|
|
1093
|
+
},
|
|
1094
|
+
"showZoomControls": {
|
|
1095
|
+
"type": "boolean",
|
|
1096
|
+
"default": true
|
|
1097
|
+
},
|
|
1098
|
+
"showDownload": {
|
|
1099
|
+
"type": "boolean",
|
|
1100
|
+
"notes": "Default: when the item has download."
|
|
1101
|
+
},
|
|
1102
|
+
"renderSlide": {
|
|
1103
|
+
"type": "(item, { index, active }) => ReactNode"
|
|
1104
|
+
},
|
|
1105
|
+
"closeOnBackdrop": {
|
|
1106
|
+
"type": "boolean",
|
|
1107
|
+
"default": true
|
|
1108
|
+
},
|
|
1109
|
+
"zoom": {
|
|
1110
|
+
"type": "Partial<UseZoomPanOptions>",
|
|
1111
|
+
"notes": "{ minScale 1, maxScale 8, step 0.5, wheel true, doubleClickToggle true }"
|
|
1112
|
+
},
|
|
1113
|
+
"labels": {
|
|
1114
|
+
"type": "Partial<ImageViewerLabels>"
|
|
1115
|
+
},
|
|
1116
|
+
"classes": {
|
|
1117
|
+
"type": "Partial<ImageViewerClasses>",
|
|
1118
|
+
"shape": [
|
|
1119
|
+
"root",
|
|
1120
|
+
"backdrop",
|
|
1121
|
+
"toolbar",
|
|
1122
|
+
"counter",
|
|
1123
|
+
"stage",
|
|
1124
|
+
"image",
|
|
1125
|
+
"caption",
|
|
1126
|
+
"nav",
|
|
1127
|
+
"navPrev",
|
|
1128
|
+
"navNext",
|
|
1129
|
+
"thumbnails",
|
|
1130
|
+
"thumbnail",
|
|
1131
|
+
"thumbnailActive",
|
|
1132
|
+
"zoomControls"
|
|
1133
|
+
]
|
|
1134
|
+
}
|
|
1135
|
+
},
|
|
1136
|
+
"keyboard": "Escape, ArrowLeft/Right, + / - / 0; swipe at scale 1; wheel/pinch/double-click zoom."
|
|
1137
|
+
},
|
|
848
1138
|
"Toast": {
|
|
849
1139
|
"import": "import { ToastProvider, toast, useToast } from '@overdoser/react-toolkit'",
|
|
850
1140
|
"element": "portal viewport at document.body",
|
|
851
|
-
"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. SSR/Next.js safe: mount ToastProvider normally
|
|
1141
|
+
"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. SSR/Next.js safe: mount ToastProvider normally — it renders no viewport on the server or the first client render, then attaches its document.body portal after hydration, so there is no hydration mismatch and no mounted-flag workaround is needed.",
|
|
852
1142
|
"standaloneTrigger": {
|
|
853
1143
|
"name": "toast",
|
|
854
1144
|
"signature": "toast(options: ToastOptions): string",
|
|
@@ -1017,8 +1307,113 @@
|
|
|
1017
1307
|
"content",
|
|
1018
1308
|
"title",
|
|
1019
1309
|
"message",
|
|
1310
|
+
"action",
|
|
1020
1311
|
"close"
|
|
1021
1312
|
]
|
|
1313
|
+
},
|
|
1314
|
+
"action": {
|
|
1315
|
+
"type": "ReactNode",
|
|
1316
|
+
"notes": "Slot after the message (Retry/Undo). Right edge in banner layout."
|
|
1317
|
+
},
|
|
1318
|
+
"layout": {
|
|
1319
|
+
"type": "'inline' | 'banner'",
|
|
1320
|
+
"default": "inline",
|
|
1321
|
+
"notes": "banner = full-width strip, one row."
|
|
1322
|
+
},
|
|
1323
|
+
"size": {
|
|
1324
|
+
"type": "'sm' | 'md'",
|
|
1325
|
+
"default": "md"
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
},
|
|
1329
|
+
"CodeBlock": {
|
|
1330
|
+
"import": "import { CodeBlock, Code } from '@overdoser/react-toolkit'",
|
|
1331
|
+
"element": "div > pre > code",
|
|
1332
|
+
"forwardsRef": true,
|
|
1333
|
+
"extendsNativeProps": "div (without children/title)",
|
|
1334
|
+
"props": {
|
|
1335
|
+
"code": {
|
|
1336
|
+
"type": "string",
|
|
1337
|
+
"notes": "Source; exactly what is copied. children (string) is an alias."
|
|
1338
|
+
},
|
|
1339
|
+
"language": {
|
|
1340
|
+
"type": "string",
|
|
1341
|
+
"notes": "Header label + data-language + language-<x> class."
|
|
1342
|
+
},
|
|
1343
|
+
"title": {
|
|
1344
|
+
"type": "ReactNode"
|
|
1345
|
+
},
|
|
1346
|
+
"showCopy": {
|
|
1347
|
+
"type": "boolean",
|
|
1348
|
+
"default": true
|
|
1349
|
+
},
|
|
1350
|
+
"copyPlacement": {
|
|
1351
|
+
"type": "'floating' | 'header'",
|
|
1352
|
+
"default": "floating"
|
|
1353
|
+
},
|
|
1354
|
+
"onCopied": {
|
|
1355
|
+
"type": "(text: string) => void"
|
|
1356
|
+
},
|
|
1357
|
+
"wrap": {
|
|
1358
|
+
"type": "boolean",
|
|
1359
|
+
"default": false
|
|
1360
|
+
},
|
|
1361
|
+
"showWrapToggle": {
|
|
1362
|
+
"type": "boolean",
|
|
1363
|
+
"default": false
|
|
1364
|
+
},
|
|
1365
|
+
"lineNumbers": {
|
|
1366
|
+
"type": "boolean",
|
|
1367
|
+
"default": false
|
|
1368
|
+
},
|
|
1369
|
+
"startLine": {
|
|
1370
|
+
"type": "number",
|
|
1371
|
+
"default": 1
|
|
1372
|
+
},
|
|
1373
|
+
"highlightLines": {
|
|
1374
|
+
"type": "number[]"
|
|
1375
|
+
},
|
|
1376
|
+
"maxHeight": {
|
|
1377
|
+
"type": "number | string"
|
|
1378
|
+
},
|
|
1379
|
+
"size": {
|
|
1380
|
+
"type": "'sm' | 'md'",
|
|
1381
|
+
"default": "md"
|
|
1382
|
+
},
|
|
1383
|
+
"highlight": {
|
|
1384
|
+
"type": "(code: string) => ReactNode",
|
|
1385
|
+
"notes": "Plug-in highlighter."
|
|
1386
|
+
},
|
|
1387
|
+
"classes": {
|
|
1388
|
+
"type": "Partial<CodeBlockClasses>",
|
|
1389
|
+
"shape": [
|
|
1390
|
+
"root",
|
|
1391
|
+
"header",
|
|
1392
|
+
"title",
|
|
1393
|
+
"language",
|
|
1394
|
+
"actions",
|
|
1395
|
+
"pre",
|
|
1396
|
+
"code",
|
|
1397
|
+
"line",
|
|
1398
|
+
"lineNumber",
|
|
1399
|
+
"lineHighlight",
|
|
1400
|
+
"copy",
|
|
1401
|
+
"wrapToggle"
|
|
1402
|
+
]
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
"Code": {
|
|
1407
|
+
"import": "import { Code } from '@overdoser/react-toolkit'",
|
|
1408
|
+
"element": "code",
|
|
1409
|
+
"forwardsRef": true,
|
|
1410
|
+
"extendsNativeProps": "code",
|
|
1411
|
+
"props": {
|
|
1412
|
+
"classes": {
|
|
1413
|
+
"type": "Partial<CodeClasses>",
|
|
1414
|
+
"shape": [
|
|
1415
|
+
"root"
|
|
1416
|
+
]
|
|
1022
1417
|
}
|
|
1023
1418
|
}
|
|
1024
1419
|
},
|
|
@@ -1054,31 +1449,908 @@
|
|
|
1054
1449
|
}
|
|
1055
1450
|
}
|
|
1056
1451
|
},
|
|
1057
|
-
"
|
|
1058
|
-
"import": "import {
|
|
1059
|
-
"element": "span
|
|
1452
|
+
"StatusDot": {
|
|
1453
|
+
"import": "import { StatusDot } from '@overdoser/react-toolkit'",
|
|
1454
|
+
"element": "span",
|
|
1060
1455
|
"forwardsRef": true,
|
|
1061
|
-
"extendsNativeProps": "span",
|
|
1062
|
-
"
|
|
1456
|
+
"extendsNativeProps": "span (color retyped)",
|
|
1457
|
+
"props": {
|
|
1458
|
+
"status": {
|
|
1459
|
+
"type": "'success' | 'warning' | 'danger' | 'info' | 'neutral'",
|
|
1460
|
+
"default": "neutral"
|
|
1461
|
+
},
|
|
1462
|
+
"pulse": {
|
|
1463
|
+
"type": "boolean",
|
|
1464
|
+
"default": false,
|
|
1465
|
+
"notes": "Expanding ring animation; off under prefers-reduced-motion."
|
|
1466
|
+
},
|
|
1467
|
+
"label": {
|
|
1468
|
+
"type": "ReactNode",
|
|
1469
|
+
"notes": "Text after the dot. Without it pass aria-label (sets role=img)."
|
|
1470
|
+
},
|
|
1471
|
+
"size": {
|
|
1472
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
1473
|
+
"default": "md"
|
|
1474
|
+
},
|
|
1475
|
+
"color": {
|
|
1476
|
+
"type": "string",
|
|
1477
|
+
"notes": "Any CSS colour; overrides the status colour."
|
|
1478
|
+
},
|
|
1479
|
+
"classes": {
|
|
1480
|
+
"type": "Partial<StatusDotClasses>",
|
|
1481
|
+
"shape": [
|
|
1482
|
+
"root",
|
|
1483
|
+
"dot",
|
|
1484
|
+
"label"
|
|
1485
|
+
]
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1489
|
+
"ThemeToggle": {
|
|
1490
|
+
"import": "import { ThemeToggle } from '@overdoser/react-toolkit'",
|
|
1491
|
+
"element": "button (icon) or div[role=radiogroup] (segmented)",
|
|
1492
|
+
"forwardsRef": true,
|
|
1493
|
+
"extendsNativeProps": "button",
|
|
1063
1494
|
"props": {
|
|
1495
|
+
"variant": {
|
|
1496
|
+
"type": "'icon' | 'segmented'",
|
|
1497
|
+
"default": "icon"
|
|
1498
|
+
},
|
|
1499
|
+
"allowSystem": {
|
|
1500
|
+
"type": "boolean",
|
|
1501
|
+
"default": true
|
|
1502
|
+
},
|
|
1503
|
+
"size": {
|
|
1504
|
+
"type": "'sm' | 'md'",
|
|
1505
|
+
"default": "md"
|
|
1506
|
+
},
|
|
1507
|
+
"showLabel": {
|
|
1508
|
+
"type": "boolean",
|
|
1509
|
+
"default": false
|
|
1510
|
+
},
|
|
1511
|
+
"labels": {
|
|
1512
|
+
"type": "Partial<Record<'light' | 'dark' | 'system', string>>"
|
|
1513
|
+
},
|
|
1514
|
+
"storageKey": {
|
|
1515
|
+
"type": "string",
|
|
1516
|
+
"default": "crk-theme"
|
|
1517
|
+
},
|
|
1518
|
+
"classes": {
|
|
1519
|
+
"type": "Partial<ThemeToggleClasses>",
|
|
1520
|
+
"shape": [
|
|
1521
|
+
"root",
|
|
1522
|
+
"icon",
|
|
1523
|
+
"label",
|
|
1524
|
+
"option",
|
|
1525
|
+
"optionSelected"
|
|
1526
|
+
]
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
},
|
|
1530
|
+
"Kbd": {
|
|
1531
|
+
"import": "import { Kbd } from '@overdoser/react-toolkit'",
|
|
1532
|
+
"element": "kbd",
|
|
1533
|
+
"forwardsRef": true,
|
|
1534
|
+
"extendsNativeProps": "kbd",
|
|
1535
|
+
"props": {
|
|
1536
|
+
"size": {
|
|
1537
|
+
"type": "'sm' | 'md'",
|
|
1538
|
+
"default": "md"
|
|
1539
|
+
},
|
|
1540
|
+
"keys": {
|
|
1541
|
+
"type": "string[]",
|
|
1542
|
+
"notes": "Combination: each key in its own inner <kbd>, joined by an aria-hidden '+'. Overrides children."
|
|
1543
|
+
},
|
|
1544
|
+
"classes": {
|
|
1545
|
+
"type": "Partial<KbdClasses>",
|
|
1546
|
+
"shape": [
|
|
1547
|
+
"root",
|
|
1548
|
+
"key",
|
|
1549
|
+
"separator"
|
|
1550
|
+
]
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
},
|
|
1554
|
+
"EmptyState": {
|
|
1555
|
+
"import": "import { EmptyState } from '@overdoser/react-toolkit'",
|
|
1556
|
+
"element": "div (role=alert when variant=error)",
|
|
1557
|
+
"forwardsRef": true,
|
|
1558
|
+
"extendsNativeProps": "div (without title)",
|
|
1559
|
+
"props": {
|
|
1560
|
+
"variant": {
|
|
1561
|
+
"type": "'empty' | 'error'",
|
|
1562
|
+
"default": "empty"
|
|
1563
|
+
},
|
|
1564
|
+
"icon": {
|
|
1565
|
+
"type": "ReactNode | false",
|
|
1566
|
+
"notes": "Default: built-in SVG per variant. false hides it."
|
|
1567
|
+
},
|
|
1568
|
+
"title": {
|
|
1569
|
+
"type": "ReactNode"
|
|
1570
|
+
},
|
|
1571
|
+
"description": {
|
|
1572
|
+
"type": "ReactNode"
|
|
1573
|
+
},
|
|
1574
|
+
"action": {
|
|
1575
|
+
"type": "ReactNode",
|
|
1576
|
+
"notes": "Slot under the description — pass a Button."
|
|
1577
|
+
},
|
|
1578
|
+
"children": {
|
|
1579
|
+
"type": "ReactNode",
|
|
1580
|
+
"notes": "Extra content between description and action."
|
|
1581
|
+
},
|
|
1582
|
+
"size": {
|
|
1583
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
1584
|
+
"default": "md"
|
|
1585
|
+
},
|
|
1586
|
+
"bordered": {
|
|
1587
|
+
"type": "boolean",
|
|
1588
|
+
"default": false,
|
|
1589
|
+
"notes": "Dashed frame with subtle background."
|
|
1590
|
+
},
|
|
1591
|
+
"classes": {
|
|
1592
|
+
"type": "Partial<EmptyStateClasses>",
|
|
1593
|
+
"shape": [
|
|
1594
|
+
"root",
|
|
1595
|
+
"icon",
|
|
1596
|
+
"title",
|
|
1597
|
+
"description",
|
|
1598
|
+
"action"
|
|
1599
|
+
]
|
|
1600
|
+
}
|
|
1601
|
+
},
|
|
1602
|
+
"behavior": "Use as Table emptyMessage too."
|
|
1603
|
+
},
|
|
1604
|
+
"ProgressBar": {
|
|
1605
|
+
"import": "import { ProgressBar } from '@overdoser/react-toolkit'",
|
|
1606
|
+
"element": "div root; inner track is role=progressbar",
|
|
1607
|
+
"forwardsRef": true,
|
|
1608
|
+
"extendsNativeProps": "div (without children)",
|
|
1609
|
+
"props": {
|
|
1610
|
+
"value": {
|
|
1611
|
+
"type": "number",
|
|
1612
|
+
"notes": "Clamped to [0, max]. Omit for indeterminate."
|
|
1613
|
+
},
|
|
1614
|
+
"max": {
|
|
1615
|
+
"type": "number",
|
|
1616
|
+
"default": 100
|
|
1617
|
+
},
|
|
1618
|
+
"label": {
|
|
1619
|
+
"type": "ReactNode",
|
|
1620
|
+
"notes": "Above the bar, left. A string also becomes the track aria-label."
|
|
1621
|
+
},
|
|
1622
|
+
"showValue": {
|
|
1623
|
+
"type": "boolean",
|
|
1624
|
+
"default": false
|
|
1625
|
+
},
|
|
1626
|
+
"formatValue": {
|
|
1627
|
+
"type": "(value: number, max: number) => ReactNode",
|
|
1628
|
+
"notes": "Default '42%'."
|
|
1629
|
+
},
|
|
1630
|
+
"size": {
|
|
1631
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
1632
|
+
"default": "md"
|
|
1633
|
+
},
|
|
1634
|
+
"variant": {
|
|
1635
|
+
"type": "'primary' | 'success' | 'warning' | 'danger' | 'neutral'",
|
|
1636
|
+
"default": "primary"
|
|
1637
|
+
},
|
|
1638
|
+
"thresholds": {
|
|
1639
|
+
"type": "{ value: number; variant: ProgressBarVariant }[]",
|
|
1640
|
+
"notes": "Highest threshold value <= current wins; below all, `variant` applies."
|
|
1641
|
+
},
|
|
1642
|
+
"segments": {
|
|
1643
|
+
"type": "number",
|
|
1644
|
+
"notes": "> 1 renders N discrete blocks filled from the left."
|
|
1645
|
+
},
|
|
1646
|
+
"classes": {
|
|
1647
|
+
"type": "Partial<ProgressBarClasses>",
|
|
1648
|
+
"shape": [
|
|
1649
|
+
"root",
|
|
1650
|
+
"header",
|
|
1651
|
+
"label",
|
|
1652
|
+
"value",
|
|
1653
|
+
"track",
|
|
1654
|
+
"fill",
|
|
1655
|
+
"segment",
|
|
1656
|
+
"segmentFilled",
|
|
1657
|
+
"segmentCurrent"
|
|
1658
|
+
]
|
|
1659
|
+
},
|
|
1660
|
+
"showCurrent": {
|
|
1661
|
+
"type": "boolean",
|
|
1662
|
+
"default": false,
|
|
1663
|
+
"notes": "Segmented only: segment after the last filled one gets a mid shade (done / current / remaining)."
|
|
1664
|
+
},
|
|
1665
|
+
"shape": {
|
|
1666
|
+
"type": "'rounded' | 'square'",
|
|
1667
|
+
"default": "rounded"
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
},
|
|
1671
|
+
"Card": {
|
|
1672
|
+
"import": "import { Card } from '@overdoser/react-toolkit'",
|
|
1673
|
+
"element": "div, or a when href",
|
|
1674
|
+
"forwardsRef": true,
|
|
1675
|
+
"extendsNativeProps": "div (+ href/target/rel)",
|
|
1676
|
+
"props": {
|
|
1677
|
+
"variant": {
|
|
1678
|
+
"type": "'outlined' | 'elevated' | 'filled'",
|
|
1679
|
+
"default": "outlined"
|
|
1680
|
+
},
|
|
1681
|
+
"padding": {
|
|
1682
|
+
"type": "'none' | 'sm' | 'md' | 'lg'",
|
|
1683
|
+
"default": "md",
|
|
1684
|
+
"notes": "Sets --crk-card-padding used by the slots."
|
|
1685
|
+
},
|
|
1686
|
+
"interactive": {
|
|
1687
|
+
"type": "boolean",
|
|
1688
|
+
"default": false,
|
|
1689
|
+
"notes": "Hover lift + focus ring; with onClick and no href the card is a keyboard-operable role=button. Implied by href."
|
|
1690
|
+
},
|
|
1691
|
+
"selected": {
|
|
1692
|
+
"type": "boolean",
|
|
1693
|
+
"default": false
|
|
1694
|
+
},
|
|
1695
|
+
"accent": {
|
|
1696
|
+
"type": "string",
|
|
1697
|
+
"notes": "3px left stripe in that CSS colour."
|
|
1698
|
+
},
|
|
1699
|
+
"href": {
|
|
1700
|
+
"type": "string",
|
|
1701
|
+
"notes": "Render as an anchor."
|
|
1702
|
+
},
|
|
1703
|
+
"classes": {
|
|
1704
|
+
"type": "Partial<CardClasses>",
|
|
1705
|
+
"shape": [
|
|
1706
|
+
"root",
|
|
1707
|
+
"header",
|
|
1708
|
+
"title",
|
|
1709
|
+
"subtitle",
|
|
1710
|
+
"actions",
|
|
1711
|
+
"body",
|
|
1712
|
+
"footer"
|
|
1713
|
+
]
|
|
1714
|
+
}
|
|
1715
|
+
},
|
|
1716
|
+
"compound": {
|
|
1717
|
+
"Card.Header": {
|
|
1718
|
+
"title": "ReactNode",
|
|
1719
|
+
"subtitle": "ReactNode",
|
|
1720
|
+
"actions": "ReactNode (right-aligned slot)",
|
|
1721
|
+
"divider": "boolean (default false)"
|
|
1722
|
+
},
|
|
1723
|
+
"Card.Title": {
|
|
1724
|
+
"as": "'h2' | 'h3' | 'h4' | 'div' (default h3)"
|
|
1725
|
+
},
|
|
1726
|
+
"Card.Body": {},
|
|
1727
|
+
"Card.Footer": {
|
|
1728
|
+
"align": "'start' | 'end' | 'between' (default end)",
|
|
1729
|
+
"divider": "boolean (default false)"
|
|
1730
|
+
}
|
|
1731
|
+
},
|
|
1732
|
+
"behavior": "A Body after a Header (or a Footer after a Body/Header) drops its top padding unless the preceding slot has divider."
|
|
1733
|
+
},
|
|
1734
|
+
"RelativeTime": {
|
|
1735
|
+
"import": "import { RelativeTime } from '@overdoser/react-toolkit'",
|
|
1736
|
+
"element": "time (dateTime set; absolute time as title)",
|
|
1737
|
+
"forwardsRef": true,
|
|
1738
|
+
"extendsNativeProps": "time (without children/title)",
|
|
1739
|
+
"props": {
|
|
1740
|
+
"value": {
|
|
1741
|
+
"type": "Date | number | string",
|
|
1742
|
+
"required": true
|
|
1743
|
+
},
|
|
1744
|
+
"format": {
|
|
1745
|
+
"type": "'long' | 'short' | 'narrow'",
|
|
1746
|
+
"default": "long"
|
|
1747
|
+
},
|
|
1748
|
+
"numeric": {
|
|
1749
|
+
"type": "'always' | 'auto'",
|
|
1750
|
+
"default": "auto"
|
|
1751
|
+
},
|
|
1752
|
+
"locale": {
|
|
1753
|
+
"type": "string"
|
|
1754
|
+
},
|
|
1755
|
+
"live": {
|
|
1756
|
+
"type": "boolean",
|
|
1757
|
+
"default": true,
|
|
1758
|
+
"notes": "1s under a minute, 30s under an hour, then 1min; one shared timer per period."
|
|
1759
|
+
},
|
|
1760
|
+
"now": {
|
|
1761
|
+
"type": "number",
|
|
1762
|
+
"notes": "Fixed reference instant; disables ticking."
|
|
1763
|
+
},
|
|
1764
|
+
"maxAge": {
|
|
1765
|
+
"type": "number",
|
|
1766
|
+
"notes": "Past this many ms, show the absolute date."
|
|
1767
|
+
},
|
|
1768
|
+
"absoluteFormat": {
|
|
1769
|
+
"type": "Intl.DateTimeFormatOptions",
|
|
1770
|
+
"default": "{ dateStyle: 'medium', timeStyle: 'short' }"
|
|
1771
|
+
},
|
|
1772
|
+
"title": {
|
|
1773
|
+
"type": "boolean | string",
|
|
1774
|
+
"default": true
|
|
1775
|
+
},
|
|
1776
|
+
"fallback": {
|
|
1777
|
+
"type": "ReactNode",
|
|
1778
|
+
"default": "—"
|
|
1779
|
+
},
|
|
1780
|
+
"classes": {
|
|
1781
|
+
"type": "Partial<RelativeTimeClasses>",
|
|
1782
|
+
"shape": [
|
|
1783
|
+
"root"
|
|
1784
|
+
]
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
},
|
|
1788
|
+
"SegmentedControl": {
|
|
1789
|
+
"import": "import { SegmentedControl } from '@overdoser/react-toolkit'",
|
|
1790
|
+
"element": "div[role=radiogroup] of button[role=radio]; div[role=group] of anchors when options have href",
|
|
1791
|
+
"forwardsRef": true,
|
|
1792
|
+
"props": {
|
|
1793
|
+
"options": {
|
|
1794
|
+
"type": "{ value: T; label?: ReactNode; icon?: ReactNode; disabled?: boolean; tooltip?: ReactNode; count?: number | string; href?: string; 'aria-label'?: string }[]",
|
|
1795
|
+
"required": true
|
|
1796
|
+
},
|
|
1797
|
+
"value": {
|
|
1798
|
+
"type": "T",
|
|
1799
|
+
"notes": "Controlled."
|
|
1800
|
+
},
|
|
1801
|
+
"defaultValue": {
|
|
1802
|
+
"type": "T"
|
|
1803
|
+
},
|
|
1804
|
+
"onChange": {
|
|
1805
|
+
"type": "(value: T) => void"
|
|
1806
|
+
},
|
|
1807
|
+
"size": {
|
|
1808
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
1809
|
+
"default": "md"
|
|
1810
|
+
},
|
|
1811
|
+
"shape": {
|
|
1812
|
+
"type": "'pill' | 'rounded' | 'square'",
|
|
1813
|
+
"default": "rounded"
|
|
1814
|
+
},
|
|
1815
|
+
"variant": {
|
|
1816
|
+
"type": "'filled' | 'outlined'",
|
|
1817
|
+
"default": "filled"
|
|
1818
|
+
},
|
|
1819
|
+
"fullWidth": {
|
|
1820
|
+
"type": "boolean",
|
|
1821
|
+
"default": false
|
|
1822
|
+
},
|
|
1823
|
+
"disabled": {
|
|
1824
|
+
"type": "boolean",
|
|
1825
|
+
"default": false
|
|
1826
|
+
},
|
|
1827
|
+
"classes": {
|
|
1828
|
+
"type": "Partial<SegmentedControlClasses>",
|
|
1829
|
+
"shape": [
|
|
1830
|
+
"root",
|
|
1831
|
+
"item",
|
|
1832
|
+
"itemSelected",
|
|
1833
|
+
"icon",
|
|
1834
|
+
"label",
|
|
1835
|
+
"count"
|
|
1836
|
+
]
|
|
1837
|
+
}
|
|
1838
|
+
},
|
|
1839
|
+
"keyboard": "Arrows move selection + focus (wrap, skip disabled); Home/End.",
|
|
1840
|
+
"behavior": "Single-select only; multi-select = CheckboxGroup variant=chips."
|
|
1841
|
+
},
|
|
1842
|
+
"Chip": {
|
|
1843
|
+
"import": "import { Chip } from '@overdoser/react-toolkit'",
|
|
1844
|
+
"element": "button, or span[role=button] when clickable + removable, or span",
|
|
1845
|
+
"forwardsRef": true,
|
|
1846
|
+
"extendsNativeProps": "button (without color/type)",
|
|
1847
|
+
"props": {
|
|
1848
|
+
"icon": {
|
|
1849
|
+
"type": "ReactNode"
|
|
1850
|
+
},
|
|
1851
|
+
"avatar": {
|
|
1852
|
+
"type": "ReactNode"
|
|
1853
|
+
},
|
|
1854
|
+
"onRemove": {
|
|
1855
|
+
"type": "() => void",
|
|
1856
|
+
"notes": "Trailing × button; Backspace/Delete on the focused chip."
|
|
1857
|
+
},
|
|
1858
|
+
"removeLabel": {
|
|
1859
|
+
"type": "string",
|
|
1860
|
+
"default": "Remove"
|
|
1861
|
+
},
|
|
1862
|
+
"selected": {
|
|
1863
|
+
"type": "boolean",
|
|
1864
|
+
"notes": "When defined the chip is a toggle (aria-pressed)."
|
|
1865
|
+
},
|
|
1866
|
+
"onSelectedChange": {
|
|
1867
|
+
"type": "(next: boolean) => void"
|
|
1868
|
+
},
|
|
1869
|
+
"disabled": {
|
|
1870
|
+
"type": "boolean",
|
|
1871
|
+
"default": false
|
|
1872
|
+
},
|
|
1873
|
+
"color": {
|
|
1874
|
+
"type": "'neutral' | 'primary' | 'success' | 'warning' | 'danger'",
|
|
1875
|
+
"default": "neutral"
|
|
1876
|
+
},
|
|
1877
|
+
"appearance": {
|
|
1878
|
+
"type": "'soft' | 'outline'",
|
|
1879
|
+
"default": "soft"
|
|
1880
|
+
},
|
|
1881
|
+
"size": {
|
|
1882
|
+
"type": "'sm' | 'md'",
|
|
1883
|
+
"default": "md"
|
|
1884
|
+
},
|
|
1885
|
+
"shape": {
|
|
1886
|
+
"type": "'pill' | 'rounded'",
|
|
1887
|
+
"default": "pill"
|
|
1888
|
+
},
|
|
1889
|
+
"classes": {
|
|
1890
|
+
"type": "Partial<ChipClasses>",
|
|
1891
|
+
"shape": [
|
|
1892
|
+
"root",
|
|
1893
|
+
"icon",
|
|
1894
|
+
"avatar",
|
|
1895
|
+
"label",
|
|
1896
|
+
"remove"
|
|
1897
|
+
]
|
|
1898
|
+
}
|
|
1899
|
+
},
|
|
1900
|
+
"behavior": "Interactive tag; Badge is the read-only pill."
|
|
1901
|
+
},
|
|
1902
|
+
"ChipGroup": {
|
|
1903
|
+
"import": "import { ChipGroup } from '@overdoser/react-toolkit'",
|
|
1904
|
+
"element": "div[role=group]",
|
|
1905
|
+
"forwardsRef": true,
|
|
1906
|
+
"extendsNativeProps": "div",
|
|
1907
|
+
"props": {
|
|
1908
|
+
"max": {
|
|
1909
|
+
"type": "number",
|
|
1910
|
+
"notes": "Show at most N chips, then a +N overflow chip."
|
|
1911
|
+
},
|
|
1912
|
+
"overflowLabel": {
|
|
1913
|
+
"type": "(hidden: number) => ReactNode",
|
|
1914
|
+
"default": "+N"
|
|
1915
|
+
},
|
|
1916
|
+
"onOverflowClick": {
|
|
1917
|
+
"type": "() => void"
|
|
1918
|
+
},
|
|
1919
|
+
"expandable": {
|
|
1920
|
+
"type": "boolean",
|
|
1921
|
+
"default": false
|
|
1922
|
+
},
|
|
1923
|
+
"collapseLabel": {
|
|
1924
|
+
"type": "ReactNode",
|
|
1925
|
+
"default": "Show less"
|
|
1926
|
+
},
|
|
1927
|
+
"gap": {
|
|
1928
|
+
"type": "'sm' | 'md'",
|
|
1929
|
+
"default": "sm"
|
|
1930
|
+
},
|
|
1931
|
+
"wrap": {
|
|
1932
|
+
"type": "boolean",
|
|
1933
|
+
"default": true
|
|
1934
|
+
},
|
|
1935
|
+
"classes": {
|
|
1936
|
+
"type": "Partial<ChipGroupClasses>",
|
|
1937
|
+
"shape": [
|
|
1938
|
+
"root",
|
|
1939
|
+
"overflow"
|
|
1940
|
+
]
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
},
|
|
1944
|
+
"PageHeader": {
|
|
1945
|
+
"import": "import { PageHeader } from '@overdoser/react-toolkit'",
|
|
1946
|
+
"element": "header",
|
|
1947
|
+
"forwardsRef": true,
|
|
1948
|
+
"extendsNativeProps": "header (without title)",
|
|
1949
|
+
"props": {
|
|
1950
|
+
"title": {
|
|
1951
|
+
"type": "ReactNode",
|
|
1952
|
+
"required": true
|
|
1953
|
+
},
|
|
1954
|
+
"as": {
|
|
1955
|
+
"type": "'h1' | 'h2' | 'h3' | 'div'",
|
|
1956
|
+
"default": "h1"
|
|
1957
|
+
},
|
|
1958
|
+
"subtitle": {
|
|
1959
|
+
"type": "ReactNode"
|
|
1960
|
+
},
|
|
1961
|
+
"description": {
|
|
1962
|
+
"type": "ReactNode"
|
|
1963
|
+
},
|
|
1964
|
+
"meta": {
|
|
1965
|
+
"type": "ReactNode"
|
|
1966
|
+
},
|
|
1967
|
+
"badge": {
|
|
1968
|
+
"type": "ReactNode"
|
|
1969
|
+
},
|
|
1970
|
+
"actions": {
|
|
1971
|
+
"type": "ReactNode",
|
|
1972
|
+
"notes": "Right-aligned slot."
|
|
1973
|
+
},
|
|
1974
|
+
"breadcrumbs": {
|
|
1975
|
+
"type": "ReactNode"
|
|
1976
|
+
},
|
|
1977
|
+
"backHref": {
|
|
1978
|
+
"type": "string"
|
|
1979
|
+
},
|
|
1980
|
+
"onBack": {
|
|
1981
|
+
"type": "() => void"
|
|
1982
|
+
},
|
|
1983
|
+
"backLabel": {
|
|
1984
|
+
"type": "string",
|
|
1985
|
+
"default": "Back"
|
|
1986
|
+
},
|
|
1987
|
+
"tabs": {
|
|
1988
|
+
"type": "ReactNode",
|
|
1989
|
+
"notes": "Bottom slot flush with the border, for Tabs.List."
|
|
1990
|
+
},
|
|
1991
|
+
"divider": {
|
|
1992
|
+
"type": "boolean",
|
|
1993
|
+
"default": true
|
|
1994
|
+
},
|
|
1995
|
+
"size": {
|
|
1996
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
1997
|
+
"default": "md"
|
|
1998
|
+
},
|
|
1999
|
+
"sticky": {
|
|
2000
|
+
"type": "boolean",
|
|
2001
|
+
"default": false
|
|
2002
|
+
},
|
|
2003
|
+
"classes": {
|
|
2004
|
+
"type": "Partial<PageHeaderClasses>",
|
|
2005
|
+
"shape": [
|
|
2006
|
+
"root",
|
|
2007
|
+
"breadcrumbs",
|
|
2008
|
+
"back",
|
|
2009
|
+
"titleRow",
|
|
2010
|
+
"title",
|
|
2011
|
+
"badge",
|
|
2012
|
+
"subtitle",
|
|
2013
|
+
"description",
|
|
2014
|
+
"meta",
|
|
2015
|
+
"actions",
|
|
2016
|
+
"tabs"
|
|
2017
|
+
]
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
"Accordion": {
|
|
2022
|
+
"import": "import { Accordion } from '@overdoser/react-toolkit'",
|
|
2023
|
+
"element": "div; triggers are button[aria-expanded] in headings; content is div[role=region]",
|
|
2024
|
+
"forwardsRef": true,
|
|
2025
|
+
"extendsNativeProps": "div (without onChange)",
|
|
2026
|
+
"props": {
|
|
2027
|
+
"type": {
|
|
2028
|
+
"type": "'single' | 'multiple'",
|
|
2029
|
+
"default": "single"
|
|
2030
|
+
},
|
|
2031
|
+
"value": {
|
|
2032
|
+
"type": "string | string[]",
|
|
2033
|
+
"notes": "Controlled: string (single) or string[] (multiple)."
|
|
2034
|
+
},
|
|
2035
|
+
"defaultValue": {
|
|
2036
|
+
"type": "string | string[]"
|
|
2037
|
+
},
|
|
2038
|
+
"onValueChange": {
|
|
2039
|
+
"type": "(value: string | string[]) => void"
|
|
2040
|
+
},
|
|
2041
|
+
"collapsible": {
|
|
2042
|
+
"type": "boolean",
|
|
2043
|
+
"default": true
|
|
2044
|
+
},
|
|
2045
|
+
"keepMounted": {
|
|
2046
|
+
"type": "boolean",
|
|
2047
|
+
"default": false
|
|
2048
|
+
},
|
|
2049
|
+
"variant": {
|
|
2050
|
+
"type": "'default' | 'bordered' | 'separated'",
|
|
2051
|
+
"default": "default"
|
|
2052
|
+
},
|
|
2053
|
+
"size": {
|
|
2054
|
+
"type": "'sm' | 'md'",
|
|
2055
|
+
"default": "md"
|
|
2056
|
+
},
|
|
2057
|
+
"disabled": {
|
|
2058
|
+
"type": "boolean",
|
|
2059
|
+
"default": false
|
|
2060
|
+
},
|
|
2061
|
+
"headingLevel": {
|
|
2062
|
+
"type": "2 | 3 | 4",
|
|
2063
|
+
"default": 3
|
|
2064
|
+
},
|
|
2065
|
+
"items": {
|
|
2066
|
+
"type": "{ value: string; title: ReactNode; content: ReactNode; disabled?: boolean }[]",
|
|
2067
|
+
"notes": "Data shorthand instead of children."
|
|
2068
|
+
},
|
|
2069
|
+
"classes": {
|
|
2070
|
+
"type": "Partial<AccordionClasses>",
|
|
2071
|
+
"shape": [
|
|
2072
|
+
"root",
|
|
2073
|
+
"item",
|
|
2074
|
+
"itemOpen",
|
|
2075
|
+
"header",
|
|
2076
|
+
"trigger",
|
|
2077
|
+
"icon",
|
|
2078
|
+
"content",
|
|
2079
|
+
"contentInner"
|
|
2080
|
+
]
|
|
2081
|
+
}
|
|
2082
|
+
},
|
|
2083
|
+
"compound": {
|
|
2084
|
+
"Accordion.Item": {
|
|
2085
|
+
"value": "string (required)",
|
|
2086
|
+
"disabled": "boolean"
|
|
2087
|
+
},
|
|
2088
|
+
"Accordion.Trigger": {
|
|
2089
|
+
"icon": "ReactNode | false (default chevron)",
|
|
2090
|
+
"iconPosition": "'start' | 'end' (default end)"
|
|
2091
|
+
},
|
|
2092
|
+
"Accordion.Content": {}
|
|
2093
|
+
},
|
|
2094
|
+
"keyboard": "ArrowUp/Down wrap over triggers (skip disabled), Home/End, Enter/Space toggle."
|
|
2095
|
+
},
|
|
2096
|
+
"KeyValueList": {
|
|
2097
|
+
"import": "import { KeyValueList } from '@overdoser/react-toolkit'",
|
|
2098
|
+
"element": "dl > div > dt + dd",
|
|
2099
|
+
"forwardsRef": true,
|
|
2100
|
+
"extendsNativeProps": "dl (without children)",
|
|
2101
|
+
"props": {
|
|
2102
|
+
"items": {
|
|
2103
|
+
"type": "{ key?: string; label: ReactNode; value: ReactNode; copyable?: boolean | string; mono?: boolean; masked?: boolean; href?: string; hint?: ReactNode; empty?: ReactNode }[]",
|
|
2104
|
+
"required": true
|
|
2105
|
+
},
|
|
2106
|
+
"layout": {
|
|
2107
|
+
"type": "'rows' | 'grid' | 'inline'",
|
|
2108
|
+
"default": "rows"
|
|
2109
|
+
},
|
|
2110
|
+
"columns": {
|
|
2111
|
+
"type": "number",
|
|
2112
|
+
"default": 2,
|
|
2113
|
+
"notes": "grid only"
|
|
2114
|
+
},
|
|
2115
|
+
"labelWidth": {
|
|
2116
|
+
"type": "number | string",
|
|
2117
|
+
"default": "10rem",
|
|
2118
|
+
"notes": "rows only"
|
|
2119
|
+
},
|
|
2120
|
+
"size": {
|
|
2121
|
+
"type": "'sm' | 'md'",
|
|
2122
|
+
"default": "md"
|
|
2123
|
+
},
|
|
2124
|
+
"dividers": {
|
|
2125
|
+
"type": "boolean",
|
|
2126
|
+
"default": true
|
|
2127
|
+
},
|
|
2128
|
+
"emptyValue": {
|
|
2129
|
+
"type": "ReactNode",
|
|
2130
|
+
"default": "—"
|
|
2131
|
+
},
|
|
2132
|
+
"copyLabel": {
|
|
2133
|
+
"type": "string",
|
|
2134
|
+
"default": "Copy"
|
|
2135
|
+
},
|
|
2136
|
+
"revealLabels": {
|
|
2137
|
+
"type": "{ show: string; hide: string }",
|
|
2138
|
+
"default": "{ show: 'Show', hide: 'Hide' }"
|
|
2139
|
+
},
|
|
2140
|
+
"classes": {
|
|
2141
|
+
"type": "Partial<KeyValueListClasses>",
|
|
2142
|
+
"shape": [
|
|
2143
|
+
"root",
|
|
2144
|
+
"item",
|
|
2145
|
+
"label",
|
|
2146
|
+
"value",
|
|
2147
|
+
"hint",
|
|
2148
|
+
"actions",
|
|
2149
|
+
"copy",
|
|
2150
|
+
"reveal",
|
|
2151
|
+
"mono",
|
|
2152
|
+
"masked"
|
|
2153
|
+
]
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
},
|
|
2157
|
+
"StatCard": {
|
|
2158
|
+
"import": "import { StatCard } from '@overdoser/react-toolkit'",
|
|
2159
|
+
"element": "div, or a with href; role=button with onClick",
|
|
2160
|
+
"forwardsRef": true,
|
|
2161
|
+
"extendsNativeProps": "div (without title)",
|
|
2162
|
+
"props": {
|
|
2163
|
+
"label": {
|
|
2164
|
+
"type": "ReactNode",
|
|
2165
|
+
"required": true
|
|
2166
|
+
},
|
|
2167
|
+
"value": {
|
|
2168
|
+
"type": "ReactNode",
|
|
2169
|
+
"required": true
|
|
2170
|
+
},
|
|
2171
|
+
"unit": {
|
|
2172
|
+
"type": "ReactNode"
|
|
2173
|
+
},
|
|
2174
|
+
"delta": {
|
|
2175
|
+
"type": "number | { value: ReactNode; trend?: 'up' | 'down' | 'flat' }",
|
|
2176
|
+
"notes": "Number → ▲/▼ + formatted %, trend from sign."
|
|
2177
|
+
},
|
|
2178
|
+
"deltaFormat": {
|
|
2179
|
+
"type": "(n: number) => ReactNode"
|
|
2180
|
+
},
|
|
2181
|
+
"trendColor": {
|
|
2182
|
+
"type": "'auto' | 'positive-up' | 'positive-down' | 'none'",
|
|
2183
|
+
"default": "auto"
|
|
2184
|
+
},
|
|
2185
|
+
"deltaLabel": {
|
|
2186
|
+
"type": "ReactNode"
|
|
2187
|
+
},
|
|
2188
|
+
"icon": {
|
|
2189
|
+
"type": "ReactNode"
|
|
2190
|
+
},
|
|
2191
|
+
"chart": {
|
|
2192
|
+
"type": "ReactNode",
|
|
2193
|
+
"notes": "Pass <Sparkline>."
|
|
2194
|
+
},
|
|
2195
|
+
"footer": {
|
|
2196
|
+
"type": "ReactNode"
|
|
2197
|
+
},
|
|
2198
|
+
"href": {
|
|
2199
|
+
"type": "string"
|
|
2200
|
+
},
|
|
2201
|
+
"loading": {
|
|
2202
|
+
"type": "boolean",
|
|
2203
|
+
"default": false
|
|
2204
|
+
},
|
|
2205
|
+
"variant": {
|
|
2206
|
+
"type": "'outlined' | 'elevated' | 'filled'",
|
|
2207
|
+
"default": "outlined"
|
|
2208
|
+
},
|
|
2209
|
+
"size": {
|
|
2210
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
2211
|
+
"default": "md"
|
|
2212
|
+
},
|
|
2213
|
+
"accent": {
|
|
2214
|
+
"type": "string"
|
|
2215
|
+
},
|
|
2216
|
+
"classes": {
|
|
2217
|
+
"type": "Partial<StatCardClasses>",
|
|
2218
|
+
"shape": [
|
|
2219
|
+
"root",
|
|
2220
|
+
"header",
|
|
2221
|
+
"label",
|
|
2222
|
+
"icon",
|
|
2223
|
+
"value",
|
|
2224
|
+
"unit",
|
|
2225
|
+
"delta",
|
|
2226
|
+
"deltaLabel",
|
|
2227
|
+
"chart",
|
|
2228
|
+
"footer"
|
|
2229
|
+
]
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
},
|
|
2233
|
+
"StatGrid": {
|
|
2234
|
+
"import": "import { StatGrid } from '@overdoser/react-toolkit'",
|
|
2235
|
+
"element": "div",
|
|
2236
|
+
"forwardsRef": true,
|
|
2237
|
+
"extendsNativeProps": "div",
|
|
2238
|
+
"props": {
|
|
2239
|
+
"columns": {
|
|
2240
|
+
"type": "number | { sm?: number; md?: number; lg?: number }",
|
|
2241
|
+
"default": "{ sm: 1, md: 2, lg: 4 }",
|
|
2242
|
+
"notes": "Breakpoints 640 / 1024px."
|
|
2243
|
+
},
|
|
2244
|
+
"gap": {
|
|
2245
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
2246
|
+
"default": "md"
|
|
2247
|
+
},
|
|
2248
|
+
"classes": {
|
|
2249
|
+
"type": "Partial<StatGridClasses>",
|
|
2250
|
+
"shape": [
|
|
2251
|
+
"root"
|
|
2252
|
+
]
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
},
|
|
2256
|
+
"Spinner": {
|
|
2257
|
+
"import": "import { Spinner } from '@overdoser/react-toolkit'",
|
|
2258
|
+
"element": "span[role=status]",
|
|
2259
|
+
"forwardsRef": true,
|
|
2260
|
+
"extendsNativeProps": "span",
|
|
2261
|
+
"notes": "Indeterminate loading spinner; inherits currentColor.",
|
|
2262
|
+
"props": {
|
|
2263
|
+
"size": {
|
|
2264
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
2265
|
+
"default": "md"
|
|
2266
|
+
},
|
|
2267
|
+
"color": {
|
|
2268
|
+
"type": "string",
|
|
2269
|
+
"notes": "Overrides currentColor."
|
|
2270
|
+
},
|
|
2271
|
+
"label": {
|
|
2272
|
+
"type": "string",
|
|
2273
|
+
"default": "Loading",
|
|
2274
|
+
"notes": "Visually-hidden a11y label; pass '' to omit."
|
|
2275
|
+
},
|
|
2276
|
+
"classes": {
|
|
2277
|
+
"type": "Partial<SpinnerClasses>",
|
|
2278
|
+
"shape": [
|
|
2279
|
+
"root",
|
|
2280
|
+
"circle",
|
|
2281
|
+
"label"
|
|
2282
|
+
]
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
},
|
|
2286
|
+
"Loader": {
|
|
2287
|
+
"import": "import { Loader } from '@overdoser/react-toolkit'",
|
|
2288
|
+
"element": "div (inner span[role=status])",
|
|
2289
|
+
"forwardsRef": true,
|
|
2290
|
+
"extendsNativeProps": "div (color retyped)",
|
|
2291
|
+
"notes": "Page/container loading indicator. No children: inline block (default), mode=overlay covers the parent it is rendered into (positions a static parent itself), mode=fullscreen portals over the viewport. With children: wraps them and overlays while loading, content keeps its height. CSS vars: --crk-loader-size, --crk-loader-color, --crk-loader-speed, --crk-loader-dot-size, --crk-loader-dot-gap, --crk-loader-dot-bounce, --crk-loader-dot-pulse, --crk-loader-backdrop, --crk-loader-blur, --crk-loader-label-color, --crk-loader-min-height.",
|
|
2292
|
+
"props": {
|
|
2293
|
+
"variant": {
|
|
2294
|
+
"type": "'dots' | 'pulse' | 'spinner' | 'grid' | 'morph'",
|
|
2295
|
+
"default": "dots"
|
|
2296
|
+
},
|
|
1064
2297
|
"size": {
|
|
1065
2298
|
"type": "'sm' | 'md' | 'lg'",
|
|
1066
2299
|
"default": "md"
|
|
1067
2300
|
},
|
|
2301
|
+
"mode": {
|
|
2302
|
+
"type": "'inline' | 'overlay' | 'fullscreen'",
|
|
2303
|
+
"default": "inline",
|
|
2304
|
+
"notes": "Placement when there are no children; with children, 'fullscreen' covers the viewport instead of the wrapper."
|
|
2305
|
+
},
|
|
2306
|
+
"loading": {
|
|
2307
|
+
"type": "boolean",
|
|
2308
|
+
"default": true,
|
|
2309
|
+
"notes": "Without children, false renders nothing."
|
|
2310
|
+
},
|
|
2311
|
+
"children": {
|
|
2312
|
+
"type": "ReactNode",
|
|
2313
|
+
"notes": "Content to cover while loading; stays mounted and keeps its size."
|
|
2314
|
+
},
|
|
2315
|
+
"delay": {
|
|
2316
|
+
"type": "number",
|
|
2317
|
+
"default": 0,
|
|
2318
|
+
"notes": "ms before showing, so fast responses never flash a loader."
|
|
2319
|
+
},
|
|
2320
|
+
"backdrop": {
|
|
2321
|
+
"type": "'dim' | 'blur' | 'none'",
|
|
2322
|
+
"default": "dim"
|
|
2323
|
+
},
|
|
2324
|
+
"interactive": {
|
|
2325
|
+
"type": "boolean",
|
|
2326
|
+
"default": false,
|
|
2327
|
+
"notes": "Keep covered content usable instead of inert."
|
|
2328
|
+
},
|
|
1068
2329
|
"color": {
|
|
1069
2330
|
"type": "string",
|
|
1070
|
-
"notes": "
|
|
2331
|
+
"notes": "Defaults to --crk-color-primary."
|
|
1071
2332
|
},
|
|
1072
2333
|
"label": {
|
|
1073
2334
|
"type": "string",
|
|
1074
2335
|
"default": "Loading",
|
|
1075
|
-
"notes": "Visually
|
|
2336
|
+
"notes": "Visually hidden unless showLabel."
|
|
2337
|
+
},
|
|
2338
|
+
"showLabel": {
|
|
2339
|
+
"type": "boolean",
|
|
2340
|
+
"default": false
|
|
2341
|
+
},
|
|
2342
|
+
"minHeight": {
|
|
2343
|
+
"type": "number | string",
|
|
2344
|
+
"notes": "Inline block height, or wrapper min-height while loading. number -> px."
|
|
1076
2345
|
},
|
|
1077
2346
|
"classes": {
|
|
1078
|
-
"type": "Partial<
|
|
2347
|
+
"type": "Partial<LoaderClasses>",
|
|
1079
2348
|
"shape": [
|
|
1080
2349
|
"root",
|
|
1081
|
-
"
|
|
2350
|
+
"content",
|
|
2351
|
+
"overlay",
|
|
2352
|
+
"indicator",
|
|
2353
|
+
"glyph",
|
|
1082
2354
|
"label"
|
|
1083
2355
|
]
|
|
1084
2356
|
}
|
|
@@ -1097,11 +2369,11 @@
|
|
|
1097
2369
|
},
|
|
1098
2370
|
"width": {
|
|
1099
2371
|
"type": "number | string",
|
|
1100
|
-
"notes": "number
|
|
2372
|
+
"notes": "number → px; defaults to 100%."
|
|
1101
2373
|
},
|
|
1102
2374
|
"height": {
|
|
1103
2375
|
"type": "number | string",
|
|
1104
|
-
"notes": "number
|
|
2376
|
+
"notes": "number → px; defaults per variant."
|
|
1105
2377
|
},
|
|
1106
2378
|
"animation": {
|
|
1107
2379
|
"type": "'pulse' | 'wave' | 'none'",
|
|
@@ -1168,6 +2440,7 @@
|
|
|
1168
2440
|
"backdrop",
|
|
1169
2441
|
"drawer",
|
|
1170
2442
|
"header",
|
|
2443
|
+
"headerTitle",
|
|
1171
2444
|
"closeButton",
|
|
1172
2445
|
"body",
|
|
1173
2446
|
"footer"
|
|
@@ -1183,7 +2456,7 @@
|
|
|
1183
2456
|
"content": {
|
|
1184
2457
|
"type": "ReactNode",
|
|
1185
2458
|
"required": true,
|
|
1186
|
-
"notes": "Nullish/empty
|
|
2459
|
+
"notes": "Nullish/empty → never shows."
|
|
1187
2460
|
},
|
|
1188
2461
|
"children": {
|
|
1189
2462
|
"type": "ReactNode",
|
|
@@ -1342,7 +2615,7 @@
|
|
|
1342
2615
|
"import": "import { Pagination } from '@overdoser/react-toolkit'",
|
|
1343
2616
|
"element": "nav > ul",
|
|
1344
2617
|
"forwardsRef": true,
|
|
1345
|
-
"notes": "Windowed page list with ellipses, e.g. 1
|
|
2618
|
+
"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.",
|
|
1346
2619
|
"props": {
|
|
1347
2620
|
"count": {
|
|
1348
2621
|
"type": "number",
|
|
@@ -1413,7 +2686,7 @@
|
|
|
1413
2686
|
"props": {
|
|
1414
2687
|
"value": {
|
|
1415
2688
|
"type": "number | [number, number]",
|
|
1416
|
-
"notes": "Tuple
|
|
2689
|
+
"notes": "Tuple → range slider."
|
|
1417
2690
|
},
|
|
1418
2691
|
"defaultValue": {
|
|
1419
2692
|
"type": "number | [number, number]"
|
|
@@ -1588,7 +2861,7 @@
|
|
|
1588
2861
|
"import": "import { DateTimePicker } from '@overdoser/react-toolkit'",
|
|
1589
2862
|
"element": "div (ref) holding editable segment row (group of spinbuttons) + icon button + popover (calendar beside scrollable time columns)",
|
|
1590
2863
|
"forwardsRef": true,
|
|
1591
|
-
"notes": "Date + time in one field. The field is a row of segments, YYYY-MM-DD HH:mm:ss / 24h / UTC by default (fieldFormat='locale' for locale order, timeZone='system' for local): click one, Up/Down steps it, Left/Right moves, digits type with auto-advance, Backspace clears, Alt+ArrowDown opens the popover; empty field starts from now on first edit. The calendar icon opens the MUI-desktop-style popover: calendar left, hours/minutes(/seconds/AM-PM) listbox columns right; picking a day keeps the time and leaves it open; edits commit immediately; Done/Esc/click-outside closes. Binds in FormField (value: Date | null). The value is an absolute instant; timeZone chooses the wall clock it is shown/edited in (UTC by default, 'system' = local), the zone is labelled inline after the time (showTimeZone={false} hides it). Ref
|
|
2864
|
+
"notes": "Date + time in one field. The field is a row of segments, YYYY-MM-DD HH:mm:ss / 24h / UTC by default (fieldFormat='locale' for locale order, timeZone='system' for local): click one, Up/Down steps it, Left/Right moves, digits type with auto-advance, Backspace clears, Alt+ArrowDown opens the popover; empty field starts from now on first edit. The calendar icon opens the MUI-desktop-style popover: calendar left, hours/minutes(/seconds/AM-PM) listbox columns right; picking a day keeps the time and leaves it open; edits commit immediately; Done/Esc/click-outside closes. Binds in FormField (value: Date | null). The value is an absolute instant; timeZone chooses the wall clock it is shown/edited in (UTC by default, 'system' = local), the zone is labelled inline after the time (showTimeZone={false} hides it). Ref → root div.",
|
|
1592
2865
|
"props": {
|
|
1593
2866
|
"value": {
|
|
1594
2867
|
"type": "Date | null",
|
|
@@ -1625,7 +2898,7 @@
|
|
|
1625
2898
|
"timeZone": {
|
|
1626
2899
|
"type": "string",
|
|
1627
2900
|
"default": "UTC",
|
|
1628
|
-
"notes": "IANA zone, 'UTC', or 'system' (local). Unknown
|
|
2901
|
+
"notes": "IANA zone, 'UTC', or 'system' (local). Unknown → warning + UTC."
|
|
1629
2902
|
},
|
|
1630
2903
|
"showTimeZone": {
|
|
1631
2904
|
"type": "boolean",
|
|
@@ -1782,7 +3055,7 @@
|
|
|
1782
3055
|
},
|
|
1783
3056
|
"value": {
|
|
1784
3057
|
"type": "number",
|
|
1785
|
-
"notes": "Controlled seconds
|
|
3058
|
+
"notes": "Controlled seconds → display-only (no internal clock)."
|
|
1786
3059
|
},
|
|
1787
3060
|
"autoStart": {
|
|
1788
3061
|
"type": "boolean",
|
|
@@ -1816,7 +3089,7 @@
|
|
|
1816
3089
|
"unitFormat": {
|
|
1817
3090
|
"type": "'long' | 'short'",
|
|
1818
3091
|
"default": "short",
|
|
1819
|
-
"notes": "short
|
|
3092
|
+
"notes": "short → d/h/m/s; long → days/hours/minutes/seconds (fixed, no singular/plural)."
|
|
1820
3093
|
},
|
|
1821
3094
|
"unitLabels": {
|
|
1822
3095
|
"type": "Partial<Record<TimerUnit, ReactNode | ((value: number) => ReactNode)>>",
|
|
@@ -1912,6 +3185,7 @@
|
|
|
1912
3185
|
"backdrop",
|
|
1913
3186
|
"modal",
|
|
1914
3187
|
"header",
|
|
3188
|
+
"headerTitle",
|
|
1915
3189
|
"closeButton",
|
|
1916
3190
|
"body",
|
|
1917
3191
|
"footer"
|
|
@@ -1927,7 +3201,7 @@
|
|
|
1927
3201
|
},
|
|
1928
3202
|
"onClose": {
|
|
1929
3203
|
"type": "() => void",
|
|
1930
|
-
"notes": "When set, renders an
|
|
3204
|
+
"notes": "When set, renders an × close button."
|
|
1931
3205
|
}
|
|
1932
3206
|
}
|
|
1933
3207
|
},
|
|
@@ -1954,6 +3228,199 @@
|
|
|
1954
3228
|
"restores prior focus on close"
|
|
1955
3229
|
]
|
|
1956
3230
|
},
|
|
3231
|
+
"ConfirmDialog": {
|
|
3232
|
+
"import": "import { ConfirmDialog, ConfirmProvider, useConfirm } from '@overdoser/react-toolkit'",
|
|
3233
|
+
"element": "Modal size=sm (div[role=dialog])",
|
|
3234
|
+
"forwardsRef": true,
|
|
3235
|
+
"props": {
|
|
3236
|
+
"open": {
|
|
3237
|
+
"type": "boolean",
|
|
3238
|
+
"required": true
|
|
3239
|
+
},
|
|
3240
|
+
"onConfirm": {
|
|
3241
|
+
"type": "() => void | Promise<void>",
|
|
3242
|
+
"required": true,
|
|
3243
|
+
"notes": "Promise → loading + locked; rejection shows the error and keeps it open. Never closes itself."
|
|
3244
|
+
},
|
|
3245
|
+
"onCancel": {
|
|
3246
|
+
"type": "() => void",
|
|
3247
|
+
"required": true
|
|
3248
|
+
},
|
|
3249
|
+
"title": {
|
|
3250
|
+
"type": "ReactNode",
|
|
3251
|
+
"default": "Are you sure?"
|
|
3252
|
+
},
|
|
3253
|
+
"description": {
|
|
3254
|
+
"type": "ReactNode"
|
|
3255
|
+
},
|
|
3256
|
+
"confirmLabel": {
|
|
3257
|
+
"type": "ReactNode",
|
|
3258
|
+
"default": "Confirm"
|
|
3259
|
+
},
|
|
3260
|
+
"cancelLabel": {
|
|
3261
|
+
"type": "ReactNode",
|
|
3262
|
+
"default": "Cancel"
|
|
3263
|
+
},
|
|
3264
|
+
"danger": {
|
|
3265
|
+
"type": "boolean",
|
|
3266
|
+
"default": false,
|
|
3267
|
+
"notes": "Danger confirm button, warning icon, focus on Cancel."
|
|
3268
|
+
},
|
|
3269
|
+
"requireText": {
|
|
3270
|
+
"type": "string",
|
|
3271
|
+
"notes": "Type-to-confirm gate."
|
|
3272
|
+
},
|
|
3273
|
+
"icon": {
|
|
3274
|
+
"type": "ReactNode | false",
|
|
3275
|
+
"notes": "Default: warning triangle when danger."
|
|
3276
|
+
},
|
|
3277
|
+
"autoFocus": {
|
|
3278
|
+
"type": "'confirm' | 'cancel'",
|
|
3279
|
+
"notes": "Default cancel when danger, else confirm."
|
|
3280
|
+
},
|
|
3281
|
+
"closeOnBackdrop": {
|
|
3282
|
+
"type": "boolean",
|
|
3283
|
+
"default": true
|
|
3284
|
+
},
|
|
3285
|
+
"errorMessage": {
|
|
3286
|
+
"type": "(err: unknown) => ReactNode"
|
|
3287
|
+
},
|
|
3288
|
+
"classes": {
|
|
3289
|
+
"type": "Partial<ConfirmDialogClasses>",
|
|
3290
|
+
"shape": [
|
|
3291
|
+
"modal",
|
|
3292
|
+
"header",
|
|
3293
|
+
"body",
|
|
3294
|
+
"description",
|
|
3295
|
+
"icon",
|
|
3296
|
+
"input",
|
|
3297
|
+
"error",
|
|
3298
|
+
"footer",
|
|
3299
|
+
"cancel",
|
|
3300
|
+
"confirm"
|
|
3301
|
+
]
|
|
3302
|
+
}
|
|
3303
|
+
},
|
|
3304
|
+
"promiseApi": {
|
|
3305
|
+
"ConfirmProvider": "Mount once near the root; props children, defaults?: Partial<ConfirmOptions>.",
|
|
3306
|
+
"useConfirm": "() => (options?: ConfirmOptions) => Promise<boolean>. true after confirm (async onConfirm awaited, then closes), false on cancel/Escape/backdrop. Throws outside a provider.",
|
|
3307
|
+
"ConfirmOptions": "Omit<ConfirmDialogProps, 'open' | 'onConfirm' | 'onCancel' | 'children'> & { body?: ReactNode; onConfirm?: () => void | Promise<void> }"
|
|
3308
|
+
}
|
|
3309
|
+
},
|
|
3310
|
+
"CommandPalette": {
|
|
3311
|
+
"import": "import { CommandPalette, useCommandPalette } from '@overdoser/react-toolkit'",
|
|
3312
|
+
"element": "portaled div[role=dialog] with input[role=combobox] + div[role=listbox]",
|
|
3313
|
+
"forwardsRef": true,
|
|
3314
|
+
"itemShape": "{ id; label; keywords?; description?; icon?; shortcut?: string | string[]; group?; disabled?; onSelect?; href?; children?: CommandItem[] }",
|
|
3315
|
+
"props": {
|
|
3316
|
+
"open": {
|
|
3317
|
+
"type": "boolean",
|
|
3318
|
+
"required": true
|
|
3319
|
+
},
|
|
3320
|
+
"onOpenChange": {
|
|
3321
|
+
"type": "(open: boolean) => void",
|
|
3322
|
+
"required": true
|
|
3323
|
+
},
|
|
3324
|
+
"items": {
|
|
3325
|
+
"type": "CommandItem[]",
|
|
3326
|
+
"required": true
|
|
3327
|
+
},
|
|
3328
|
+
"onSelect": {
|
|
3329
|
+
"type": "(item: CommandItem) => void"
|
|
3330
|
+
},
|
|
3331
|
+
"closeOnSelect": {
|
|
3332
|
+
"type": "boolean",
|
|
3333
|
+
"default": true
|
|
3334
|
+
},
|
|
3335
|
+
"query": {
|
|
3336
|
+
"type": "string"
|
|
3337
|
+
},
|
|
3338
|
+
"defaultQuery": {
|
|
3339
|
+
"type": "string",
|
|
3340
|
+
"default": ""
|
|
3341
|
+
},
|
|
3342
|
+
"onQueryChange": {
|
|
3343
|
+
"type": "(query: string) => void"
|
|
3344
|
+
},
|
|
3345
|
+
"filter": {
|
|
3346
|
+
"type": "((item, query) => boolean | number) | null",
|
|
3347
|
+
"notes": "Default fuzzy; null = remote mode."
|
|
3348
|
+
},
|
|
3349
|
+
"loading": {
|
|
3350
|
+
"type": "boolean",
|
|
3351
|
+
"default": false
|
|
3352
|
+
},
|
|
3353
|
+
"loadingMessage": {
|
|
3354
|
+
"type": "ReactNode",
|
|
3355
|
+
"default": "Searching…"
|
|
3356
|
+
},
|
|
3357
|
+
"emptyMessage": {
|
|
3358
|
+
"type": "ReactNode",
|
|
3359
|
+
"default": "No results"
|
|
3360
|
+
},
|
|
3361
|
+
"placeholder": {
|
|
3362
|
+
"type": "string",
|
|
3363
|
+
"default": "Type a command or search…"
|
|
3364
|
+
},
|
|
3365
|
+
"hotkey": {
|
|
3366
|
+
"type": "string | false",
|
|
3367
|
+
"default": "mod+k"
|
|
3368
|
+
},
|
|
3369
|
+
"recentIds": {
|
|
3370
|
+
"type": "string[]"
|
|
3371
|
+
},
|
|
3372
|
+
"recentLabel": {
|
|
3373
|
+
"type": "ReactNode",
|
|
3374
|
+
"default": "Recent"
|
|
3375
|
+
},
|
|
3376
|
+
"maxResults": {
|
|
3377
|
+
"type": "number",
|
|
3378
|
+
"default": 50
|
|
3379
|
+
},
|
|
3380
|
+
"groupOrder": {
|
|
3381
|
+
"type": "string[]"
|
|
3382
|
+
},
|
|
3383
|
+
"footer": {
|
|
3384
|
+
"type": "ReactNode | null",
|
|
3385
|
+
"notes": "Default Kbd hints; null hides."
|
|
3386
|
+
},
|
|
3387
|
+
"escapeClearsQuery": {
|
|
3388
|
+
"type": "boolean",
|
|
3389
|
+
"default": false
|
|
3390
|
+
},
|
|
3391
|
+
"highlightMatches": {
|
|
3392
|
+
"type": "boolean",
|
|
3393
|
+
"default": true
|
|
3394
|
+
},
|
|
3395
|
+
"renderItem": {
|
|
3396
|
+
"type": "(item, { active, query }) => ReactNode"
|
|
3397
|
+
},
|
|
3398
|
+
"classes": {
|
|
3399
|
+
"type": "Partial<CommandPaletteClasses>",
|
|
3400
|
+
"shape": [
|
|
3401
|
+
"backdrop",
|
|
3402
|
+
"panel",
|
|
3403
|
+
"header",
|
|
3404
|
+
"breadcrumb",
|
|
3405
|
+
"input",
|
|
3406
|
+
"list",
|
|
3407
|
+
"group",
|
|
3408
|
+
"groupLabel",
|
|
3409
|
+
"item",
|
|
3410
|
+
"itemActive",
|
|
3411
|
+
"itemIcon",
|
|
3412
|
+
"itemLabel",
|
|
3413
|
+
"itemDescription",
|
|
3414
|
+
"itemShortcut",
|
|
3415
|
+
"empty",
|
|
3416
|
+
"loading",
|
|
3417
|
+
"footer",
|
|
3418
|
+
"match"
|
|
3419
|
+
]
|
|
3420
|
+
}
|
|
3421
|
+
},
|
|
3422
|
+
"keyboard": "ArrowUp/Down wrap, Home/End, PageUp/Down ±10, Enter selects, Backspace on empty query pops a nested page, Escape closes."
|
|
3423
|
+
},
|
|
1957
3424
|
"Form": {
|
|
1958
3425
|
"import": "import { Form } from '@overdoser/react-toolkit'",
|
|
1959
3426
|
"requires": "react-hook-form",
|
|
@@ -2042,7 +3509,7 @@
|
|
|
2042
3509
|
"onValueChange": "Bridged to react-hook-form onChange (Select single, Dropdown).",
|
|
2043
3510
|
"onValuesChange": "Bridged to react-hook-form onChange (Select multi).",
|
|
2044
3511
|
"checked": "Auto-set from value when value is boolean (Checkbox).",
|
|
2045
|
-
"values": "CheckboxGroup binds value:string[]/onChange(values) directly to the field
|
|
3512
|
+
"values": "CheckboxGroup binds value:string[]/onChange(values) directly to the field — no bridge needed."
|
|
2046
3513
|
}
|
|
2047
3514
|
}
|
|
2048
3515
|
},
|
|
@@ -2087,9 +3554,97 @@
|
|
|
2087
3554
|
"root",
|
|
2088
3555
|
"wrapper",
|
|
2089
3556
|
"prefix",
|
|
2090
|
-
"suffix"
|
|
3557
|
+
"suffix",
|
|
3558
|
+
"reveal",
|
|
3559
|
+
"clear"
|
|
3560
|
+
]
|
|
3561
|
+
},
|
|
3562
|
+
"revealable": {
|
|
3563
|
+
"type": "boolean",
|
|
3564
|
+
"default": false,
|
|
3565
|
+
"notes": "type=password only: eye toggle switches password/text; focus stays in the field."
|
|
3566
|
+
},
|
|
3567
|
+
"revealed": {
|
|
3568
|
+
"type": "boolean",
|
|
3569
|
+
"notes": "Controlled reveal."
|
|
3570
|
+
},
|
|
3571
|
+
"onRevealedChange": {
|
|
3572
|
+
"type": "(revealed: boolean) => void"
|
|
3573
|
+
},
|
|
3574
|
+
"revealLabels": {
|
|
3575
|
+
"type": "{ show: string; hide: string }",
|
|
3576
|
+
"default": "{ show: 'Show password', hide: 'Hide password' }"
|
|
3577
|
+
},
|
|
3578
|
+
"clearable": {
|
|
3579
|
+
"type": "boolean",
|
|
3580
|
+
"default": false,
|
|
3581
|
+
"notes": "× button while there is a value; fires onChange with '' then onClear; hidden when disabled/readOnly."
|
|
3582
|
+
},
|
|
3583
|
+
"clearLabel": {
|
|
3584
|
+
"type": "string",
|
|
3585
|
+
"default": "Clear"
|
|
3586
|
+
},
|
|
3587
|
+
"onClear": {
|
|
3588
|
+
"type": "() => void"
|
|
3589
|
+
}
|
|
3590
|
+
}
|
|
3591
|
+
},
|
|
3592
|
+
"SearchInput": {
|
|
3593
|
+
"import": "import { SearchInput, formatHotkey } from '@overdoser/react-toolkit'",
|
|
3594
|
+
"element": "Input type=search (ref is the input)",
|
|
3595
|
+
"forwardsRef": true,
|
|
3596
|
+
"extendsNativeProps": "InputProps minus prefix/type/clearable",
|
|
3597
|
+
"props": {
|
|
3598
|
+
"onValueChange": {
|
|
3599
|
+
"type": "(value: string) => void",
|
|
3600
|
+
"notes": "Every keystroke; '' on clear."
|
|
3601
|
+
},
|
|
3602
|
+
"onSearch": {
|
|
3603
|
+
"type": "(value: string) => void",
|
|
3604
|
+
"notes": "Debounced; immediate on Enter; '' on clear; never on mount or twice with the same value."
|
|
3605
|
+
},
|
|
3606
|
+
"debounce": {
|
|
3607
|
+
"type": "number",
|
|
3608
|
+
"default": 300
|
|
3609
|
+
},
|
|
3610
|
+
"loading": {
|
|
3611
|
+
"type": "boolean",
|
|
3612
|
+
"default": false
|
|
3613
|
+
},
|
|
3614
|
+
"hotkey": {
|
|
3615
|
+
"type": "string | false",
|
|
3616
|
+
"default": false,
|
|
3617
|
+
"notes": "useKeyboard chord that focuses the field; Kbd hint while empty + unfocused."
|
|
3618
|
+
},
|
|
3619
|
+
"showHotkeyHint": {
|
|
3620
|
+
"type": "boolean",
|
|
3621
|
+
"default": true
|
|
3622
|
+
},
|
|
3623
|
+
"onEscape": {
|
|
3624
|
+
"type": "'clear' | 'blur' | 'none'",
|
|
3625
|
+
"default": "clear"
|
|
3626
|
+
},
|
|
3627
|
+
"searchLabel": {
|
|
3628
|
+
"type": "string",
|
|
3629
|
+
"default": "Search"
|
|
3630
|
+
},
|
|
3631
|
+
"classes": {
|
|
3632
|
+
"type": "Partial<SearchInputClasses>",
|
|
3633
|
+
"shape": [
|
|
3634
|
+
"root",
|
|
3635
|
+
"wrapper",
|
|
3636
|
+
"prefix",
|
|
3637
|
+
"suffix",
|
|
3638
|
+
"reveal",
|
|
3639
|
+
"clear",
|
|
3640
|
+
"icon",
|
|
3641
|
+
"spinner",
|
|
3642
|
+
"hint"
|
|
2091
3643
|
]
|
|
2092
3644
|
}
|
|
3645
|
+
},
|
|
3646
|
+
"utils": {
|
|
3647
|
+
"formatHotkey": "(chord: string) => string — 'mod+k' → '⌘K' on macOS / 'Ctrl K' elsewhere."
|
|
2093
3648
|
}
|
|
2094
3649
|
},
|
|
2095
3650
|
"Select": {
|
|
@@ -2098,7 +3653,7 @@
|
|
|
2098
3653
|
"extendsNativeProps": "select (without value/onChange)",
|
|
2099
3654
|
"forwardsRef": true,
|
|
2100
3655
|
"modes": {
|
|
2101
|
-
"native": "Default
|
|
3656
|
+
"native": "Default — wraps a native <select>.",
|
|
2102
3657
|
"searchable": "When `searchable=true`. Custom dropdown with text filter.",
|
|
2103
3658
|
"multi": "When `multiple=true`. Chip-based multi with text filter."
|
|
2104
3659
|
},
|
|
@@ -2177,7 +3732,7 @@
|
|
|
2177
3732
|
"portal": {
|
|
2178
3733
|
"type": "boolean",
|
|
2179
3734
|
"default": true,
|
|
2180
|
-
"notes": "Applies to searchable + multiple modes. Renders the open menu in a portal at document.body using --crk-z-floating (1060)
|
|
3735
|
+
"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."
|
|
2181
3736
|
},
|
|
2182
3737
|
"classes": {
|
|
2183
3738
|
"type": "Partial<SelectClasses>",
|
|
@@ -2189,8 +3744,48 @@
|
|
|
2189
3744
|
"menu",
|
|
2190
3745
|
"item",
|
|
2191
3746
|
"chip",
|
|
2192
|
-
"chipRemove"
|
|
3747
|
+
"chipRemove",
|
|
3748
|
+
"spinner",
|
|
3749
|
+
"match",
|
|
3750
|
+
"message"
|
|
2193
3751
|
]
|
|
3752
|
+
},
|
|
3753
|
+
"onSearch": {
|
|
3754
|
+
"type": "(query: string) => void",
|
|
3755
|
+
"notes": "Remote mode (searchable/multi): no local filtering; debounced query, '' on open/clear, no duplicates."
|
|
3756
|
+
},
|
|
3757
|
+
"searchDebounce": {
|
|
3758
|
+
"type": "number",
|
|
3759
|
+
"default": 250
|
|
3760
|
+
},
|
|
3761
|
+
"minSearchLength": {
|
|
3762
|
+
"type": "number",
|
|
3763
|
+
"default": 0
|
|
3764
|
+
},
|
|
3765
|
+
"searchPrompt": {
|
|
3766
|
+
"type": "ReactNode",
|
|
3767
|
+
"default": "Type to search"
|
|
3768
|
+
},
|
|
3769
|
+
"loading": {
|
|
3770
|
+
"type": "boolean",
|
|
3771
|
+
"default": false
|
|
3772
|
+
},
|
|
3773
|
+
"loadingMessage": {
|
|
3774
|
+
"type": "ReactNode",
|
|
3775
|
+
"default": "Loading…"
|
|
3776
|
+
},
|
|
3777
|
+
"noResultsMessage": {
|
|
3778
|
+
"type": "ReactNode",
|
|
3779
|
+
"default": "No results"
|
|
3780
|
+
},
|
|
3781
|
+
"highlightMatches": {
|
|
3782
|
+
"type": "boolean",
|
|
3783
|
+
"default": false,
|
|
3784
|
+
"notes": "Local mode: matched substring wrapped in <mark>."
|
|
3785
|
+
},
|
|
3786
|
+
"selectedLabels": {
|
|
3787
|
+
"type": "Record<string, ReactNode>",
|
|
3788
|
+
"notes": "Fallback label per value when its option is absent from options."
|
|
2194
3789
|
}
|
|
2195
3790
|
}
|
|
2196
3791
|
},
|
|
@@ -2213,6 +3808,11 @@
|
|
|
2213
3808
|
"default": false,
|
|
2214
3809
|
"notes": "Ignored when variant=switch."
|
|
2215
3810
|
},
|
|
3811
|
+
"error": {
|
|
3812
|
+
"type": "boolean",
|
|
3813
|
+
"default": false,
|
|
3814
|
+
"notes": "Danger border. Set automatically by FormField when the field is invalid."
|
|
3815
|
+
},
|
|
2216
3816
|
"classes": {
|
|
2217
3817
|
"type": "Partial<CheckboxClasses>",
|
|
2218
3818
|
"shape": [
|
|
@@ -2223,6 +3823,30 @@
|
|
|
2223
3823
|
}
|
|
2224
3824
|
}
|
|
2225
3825
|
},
|
|
3826
|
+
"Switch": {
|
|
3827
|
+
"import": "import { Switch } from '@overdoser/react-toolkit'",
|
|
3828
|
+
"element": "input[type=checkbox] inside label",
|
|
3829
|
+
"extendsNativeProps": "input",
|
|
3830
|
+
"forwardsRef": true,
|
|
3831
|
+
"props": {
|
|
3832
|
+
"label": {
|
|
3833
|
+
"type": "ReactNode"
|
|
3834
|
+
},
|
|
3835
|
+
"error": {
|
|
3836
|
+
"type": "boolean",
|
|
3837
|
+
"default": false
|
|
3838
|
+
},
|
|
3839
|
+
"classes": {
|
|
3840
|
+
"type": "Partial<SwitchClasses>",
|
|
3841
|
+
"shape": [
|
|
3842
|
+
"root",
|
|
3843
|
+
"input",
|
|
3844
|
+
"label"
|
|
3845
|
+
]
|
|
3846
|
+
}
|
|
3847
|
+
},
|
|
3848
|
+
"behavior": "Alias of <Checkbox variant='switch'>. Same a11y/form behaviour; binds in FormField for a boolean field."
|
|
3849
|
+
},
|
|
2226
3850
|
"CheckboxGroup": {
|
|
2227
3851
|
"import": "import { CheckboxGroup } from '@overdoser/react-toolkit'",
|
|
2228
3852
|
"element": "div[role=group]",
|
|
@@ -2316,6 +3940,11 @@
|
|
|
2316
3940
|
"label": {
|
|
2317
3941
|
"type": "ReactNode"
|
|
2318
3942
|
},
|
|
3943
|
+
"error": {
|
|
3944
|
+
"type": "boolean",
|
|
3945
|
+
"default": false,
|
|
3946
|
+
"notes": "Danger border. Also inherited from RadioGroup error."
|
|
3947
|
+
},
|
|
2319
3948
|
"classes": {
|
|
2320
3949
|
"type": "Partial<RadioClasses>",
|
|
2321
3950
|
"shape": [
|
|
@@ -2325,11 +3954,12 @@
|
|
|
2325
3954
|
]
|
|
2326
3955
|
}
|
|
2327
3956
|
},
|
|
2328
|
-
"behavior": "Inside a <RadioGroup>, name/checked/onChange come from context
|
|
3957
|
+
"behavior": "Inside a <RadioGroup>, name/checked/onChange come from context — do not pass them on Radio."
|
|
2329
3958
|
},
|
|
2330
3959
|
"RadioGroup": {
|
|
2331
3960
|
"import": "import { RadioGroup } from '@overdoser/react-toolkit'",
|
|
2332
3961
|
"element": "div[role=radiogroup]",
|
|
3962
|
+
"forwardsRef": true,
|
|
2333
3963
|
"props": {
|
|
2334
3964
|
"name": {
|
|
2335
3965
|
"type": "string",
|
|
@@ -2353,6 +3983,11 @@
|
|
|
2353
3983
|
},
|
|
2354
3984
|
"required": {
|
|
2355
3985
|
"type": "boolean"
|
|
3986
|
+
},
|
|
3987
|
+
"error": {
|
|
3988
|
+
"type": "boolean",
|
|
3989
|
+
"default": false,
|
|
3990
|
+
"notes": "Applies error styling to every Radio inside. Set automatically by FormField."
|
|
2356
3991
|
}
|
|
2357
3992
|
}
|
|
2358
3993
|
},
|
|
@@ -2419,7 +4054,7 @@
|
|
|
2419
4054
|
"dots-colors": "dotColorKey (each row holds its own dot color)",
|
|
2420
4055
|
"label": "showValues + valuePosition",
|
|
2421
4056
|
"label-custom": "renderLabel",
|
|
2422
|
-
"interactive": "Series-toggle pattern: keep multiple series in `data` but pass only the active series in `config` (`{ [active]: fullConfig[active] }`). Consumer-side selector
|
|
4057
|
+
"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)."
|
|
2423
4058
|
},
|
|
2424
4059
|
"props": {
|
|
2425
4060
|
"data": {
|
|
@@ -2451,7 +4086,7 @@
|
|
|
2451
4086
|
"step"
|
|
2452
4087
|
],
|
|
2453
4088
|
"default": "monotone",
|
|
2454
|
-
"notes": "'step' is step-after
|
|
4089
|
+
"notes": "'step' is step-after — value holds until the next x."
|
|
2455
4090
|
},
|
|
2456
4091
|
"showPoints": {
|
|
2457
4092
|
"type": "boolean",
|
|
@@ -2555,7 +4190,7 @@
|
|
|
2555
4190
|
"stacked-expand": "stacked + stackOffset='expand' (normalizes each row to 100%)",
|
|
2556
4191
|
"gradient": "fillGradient",
|
|
2557
4192
|
"icons": "set `icon` on each entry in `config` (rendered in legend in place of the swatch)",
|
|
2558
|
-
"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
|
|
4193
|
+
"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."
|
|
2559
4194
|
},
|
|
2560
4195
|
"props": {
|
|
2561
4196
|
"data": {
|
|
@@ -2604,7 +4239,7 @@
|
|
|
2604
4239
|
"fillGradient": {
|
|
2605
4240
|
"type": "boolean",
|
|
2606
4241
|
"default": false,
|
|
2607
|
-
"notes": "Per-series vertical linear gradient (opaque top
|
|
4242
|
+
"notes": "Per-series vertical linear gradient (opaque top → transparent bottom)."
|
|
2608
4243
|
},
|
|
2609
4244
|
"showGrid": {
|
|
2610
4245
|
"type": "boolean",
|
|
@@ -2669,7 +4304,7 @@
|
|
|
2669
4304
|
"mixed": "colorBy='index' (+ optional colors)",
|
|
2670
4305
|
"negative": "numeric values spanning zero; pair with negativeColor",
|
|
2671
4306
|
"active": "activeIndex={n}",
|
|
2672
|
-
"interactive": "Series-toggle pattern: keep multiple series in `data` but pass only the active series in `config` (`{ [active]: fullConfig[active] }`). Consumer-side selector
|
|
4307
|
+
"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)."
|
|
2673
4308
|
},
|
|
2674
4309
|
"props": {
|
|
2675
4310
|
"data": {
|
|
@@ -2743,7 +4378,7 @@
|
|
|
2743
4378
|
"inside-start"
|
|
2744
4379
|
],
|
|
2745
4380
|
"default": "outside",
|
|
2746
|
-
"notes": "'inside-start' anchors at the baseline edge of the bar; on vertical bars the text rotates
|
|
4381
|
+
"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."
|
|
2747
4382
|
},
|
|
2748
4383
|
"renderLabel": {
|
|
2749
4384
|
"type": "(args: { row, value, seriesKey, index }) => ReactNode",
|
|
@@ -2811,7 +4446,7 @@
|
|
|
2811
4446
|
"donut": "innerRadius (number or 'NN%')",
|
|
2812
4447
|
"legend": "showLegend (on by default)",
|
|
2813
4448
|
"separator-none": "strokeWidth={0}",
|
|
2814
|
-
"label": "showLabels (default content: name + percent). Outside labels get a leader line from slice
|
|
4449
|
+
"label": "showLabels (default content: name + percent). Outside labels get a leader line from slice → label by default; disable with showLabelLines=false.",
|
|
2815
4450
|
"label-custom": "renderLabel (leader line still drawn unless showLabelLines=false)",
|
|
2816
4451
|
"label-list": "valuePosition='inside' + renderLabel returning the row name. Each slice carries its category name on its colored surface (background-colored text for contrast).",
|
|
2817
4452
|
"donut-text": "innerRadius + centerLabel",
|
|
@@ -2939,7 +4574,7 @@
|
|
|
2939
4574
|
"grid-circle-fill": "gridType='circle' (+ fillOpacity for the 'fill')",
|
|
2940
4575
|
"grid-circle-no-lines": "gridType='circle' + showRadialLines={false}",
|
|
2941
4576
|
"grid-fill": "defaults (filled polygon grid)",
|
|
2942
|
-
"grid-custom": "override the grid via classes={{ grid: '
|
|
4577
|
+
"grid-custom": "override the grid via classes={{ grid: '…' }} or theme tokens",
|
|
2943
4578
|
"grid-none": "showGrid={false} (+ usually showRadialLines={false})",
|
|
2944
4579
|
"icons": "set `icon` on each entry in `config`",
|
|
2945
4580
|
"label-custom": "renderAxisLabel",
|
|
@@ -3048,11 +4683,11 @@
|
|
|
3048
4683
|
"unsubscribeBars": "(handle) => void"
|
|
3049
4684
|
},
|
|
3050
4685
|
"indicators": {
|
|
3051
|
-
"sma": "{ type: 'sma', period, color? }
|
|
3052
|
-
"ema": "{ type: 'ema', period, color? }
|
|
3053
|
-
"bollinger": "{ type: 'bollinger', period, stdDev?, color?, fillOpacity? }
|
|
3054
|
-
"rsi": "{ type: 'rsi', period?, color?, overbought?, oversold? }
|
|
3055
|
-
"volume": "{ type: 'volume', upColor?, downColor? }
|
|
4686
|
+
"sma": "{ type: 'sma', period, color? } — overlay",
|
|
4687
|
+
"ema": "{ type: 'ema', period, color? } — overlay",
|
|
4688
|
+
"bollinger": "{ type: 'bollinger', period, stdDev?, color?, fillOpacity? } — overlay (filled band)",
|
|
4689
|
+
"rsi": "{ type: 'rsi', period?, color?, overbought?, oversold? } — sub-pane",
|
|
4690
|
+
"volume": "{ type: 'volume', upColor?, downColor? } — sub-pane (histogram)"
|
|
3056
4691
|
},
|
|
3057
4692
|
"props": {
|
|
3058
4693
|
"datafeed": {
|
|
@@ -3070,7 +4705,7 @@
|
|
|
3070
4705
|
},
|
|
3071
4706
|
"period": {
|
|
3072
4707
|
"type": "Period",
|
|
3073
|
-
"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
|
|
4708
|
+
"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."
|
|
3074
4709
|
},
|
|
3075
4710
|
"seriesType": {
|
|
3076
4711
|
"type": "enum",
|
|
@@ -3153,7 +4788,7 @@
|
|
|
3153
4788
|
"drag": "pan",
|
|
3154
4789
|
"wheel": "zoom (cursor-anchored)",
|
|
3155
4790
|
"arrow-keys": "nudge pan",
|
|
3156
|
-
"hover": "full crosshair
|
|
4791
|
+
"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."
|
|
3157
4792
|
},
|
|
3158
4793
|
"exportedHelpers": [
|
|
3159
4794
|
"periodToSeconds",
|
|
@@ -3180,7 +4815,7 @@
|
|
|
3180
4815
|
"import": "import { Sparkline } from '@overdoser/react-toolkit'",
|
|
3181
4816
|
"element": "svg",
|
|
3182
4817
|
"forwardsRef": true,
|
|
3183
|
-
"behavior": "Inline trend line, fixed pixel size, no axes/legend/tooltip
|
|
4818
|
+
"behavior": "Inline trend line, fixed pixel size, no axes/legend/tooltip — for table cells and KPI tiles.",
|
|
3184
4819
|
"props": {
|
|
3185
4820
|
"data": {
|
|
3186
4821
|
"type": "number[]",
|
|
@@ -3228,19 +4863,19 @@
|
|
|
3228
4863
|
"import": "import { TraceTimeline } from '@overdoser/react-toolkit'",
|
|
3229
4864
|
"element": "div",
|
|
3230
4865
|
"forwardsRef": true,
|
|
3231
|
-
"behavior": "Trace of one correlated flow on a single proportional UTC time band
|
|
4866
|
+
"behavior": "Trace of one correlated flow on a single proportional UTC time band — HTTP calls, plain domain events, or both. Overlapping bars pack into sub-rows; description chips are placed collision-free (3-pass nudging). Ctrl/Cmd-wheel zoom (wheelZoom prop: 'ctrl' default | 'free' | 'none'), drag-pan, Fit, keyword highlight, hover tooltip. A right-side icon rail (default on) docks one drawer at a time: Event details (opened by clicking an event, empty state until then; every value rendered under its own label — Started/Ended/Duration stacked one per row — and only the sections the event actually has: Message/Payload/Details for plain events, Request/Response for requests, unknown keys under Other fields) or Full log (every event vertically with message, details fields and the payloads it has + copy buttons; kept in sync with timeline clicks both ways — timeline click scrolls/flashes the log entry, log click selects and centers the timeline). Drawers dock into the card row flush against the timeline (full card height, no gap); the divider strip between card and drawer drags to resize drawer vs timeline. An events-summary bubble (default on) sits bottom-left and expands into a draggable panel, dockable from its header as a full-height column flush beside the card (the timeline shrinks to make room) with the same resizable divider. Fully controlled data: pass the pre-filtered array; the component does no filtering/grouping. Items with an unset end render live (dashed/pulsing) and grow on an internal ticker until an update supplies end.",
|
|
3232
4867
|
"props": {
|
|
3233
4868
|
"events": {
|
|
3234
4869
|
"type": "TraceTimelineEvent[]",
|
|
3235
4870
|
"required": true,
|
|
3236
|
-
"notes": "TraceTimelineEvent = { id, service, start, end?: number|null, source?, op?, kind?: 'request'|'event', level?: 'debug'|'info'|'success'|'warning'|'error', message?, payload?, details?: { label, value, mono?, copy? }[], requestId?, method?, url?, label?, query?, reqHeaders?, reqBody?, status?, resHeaders?, resBody? }. end unset = in flight (requests) / ongoing (plain events). kind is inferred when omitted: 'request' as soon as any of method/url/status/query/reqHeaders/reqBody/resHeaders/resBody is set, else 'event'
|
|
4871
|
+
"notes": "TraceTimelineEvent = { id, service, start, end?: number|null, source?, op?, kind?: 'request'|'event', level?: 'debug'|'info'|'success'|'warning'|'error', message?, payload?, details?: { label, value, mono?, copy? }[], requestId?, method?, url?, label?, query?, reqHeaders?, reqBody?, status?, resHeaders?, resBody? }. end unset = in flight (requests) / ongoing (plain events). kind is inferred when omitted: 'request' as soon as any of method/url/status/query/reqHeaders/reqBody/resHeaders/resBody is set, else 'event' — which drives which detail sections render. payload is the generic body for non-request events (counterpart of reqBody/resBody; an event may carry nothing but payload). details adds arbitrary labeled values (objects render as copyable JSON blocks). Extra keys are allowed, are searched by highlight and are listed under Other fields."
|
|
3237
4872
|
},
|
|
3238
4873
|
"title": {
|
|
3239
4874
|
"type": "ReactNode"
|
|
3240
4875
|
},
|
|
3241
4876
|
"meta": {
|
|
3242
4877
|
"type": "ReactNode",
|
|
3243
|
-
"notes": "Defaults to 'N events
|
|
4878
|
+
"notes": "Defaults to 'N events · span · times in UTC'."
|
|
3244
4879
|
},
|
|
3245
4880
|
"highlight": {
|
|
3246
4881
|
"type": "string",
|
|
@@ -3248,7 +4883,7 @@
|
|
|
3248
4883
|
},
|
|
3249
4884
|
"services": {
|
|
3250
4885
|
"type": "string[]",
|
|
3251
|
-
"notes": "Seeds service
|
|
4886
|
+
"notes": "Seeds service→color assignment order for stable colors across traces."
|
|
3252
4887
|
},
|
|
3253
4888
|
"serviceColors": {
|
|
3254
4889
|
"type": "Record<string, string>"
|
|
@@ -3300,12 +4935,12 @@
|
|
|
3300
4935
|
"floating"
|
|
3301
4936
|
],
|
|
3302
4937
|
"default": "bubble",
|
|
3303
|
-
"notes": "bubble = collapsed pill anchored bottom-left of the timeline, expanding in place into a draggable panel (collapse snaps it back to its corner; a header toggle docks it as a full-height column flush beside the timeline card, shrinking the timeline; the divider strip between them drags to resize both; undock floats it again
|
|
4938
|
+
"notes": "bubble = collapsed pill anchored bottom-left of the timeline, expanding in place into a draggable panel (collapse snaps it back to its corner; a header toggle docks it as a full-height column flush beside the timeline card, shrinking the timeline; the divider strip between them drags to resize both; undock floats it again — dockedness survives collapse). Or dock beside the timeline, render full-width above/below (rows flow into responsive columns), or float as a draggable palette grabbed by its header. summaryDefaultPosition?: { x, y } sets the floating start offset."
|
|
3304
4939
|
},
|
|
3305
4940
|
"showDock": {
|
|
3306
4941
|
"type": "boolean",
|
|
3307
4942
|
"default": true,
|
|
3308
|
-
"notes": "Sticky 44px icon rail on the far right toggling one docked drawer at a time: Event details or Full log. Nothing docked initially; clicking an event opens details. false removes the rail and full log
|
|
4943
|
+
"notes": "Sticky 44px icon rail on the far right toggling one docked drawer at a time: Event details or Full log. Nothing docked initially; clicking an event opens details. false removes the rail and full log — the details panel then opens/closes with the selection."
|
|
3309
4944
|
},
|
|
3310
4945
|
"defaultDock": {
|
|
3311
4946
|
"type": "'details' | 'log' | null",
|
|
@@ -3376,7 +5011,7 @@
|
|
|
3376
5011
|
"import": "import { TraceEventDetails } from '@overdoser/react-toolkit'",
|
|
3377
5012
|
"element": "div",
|
|
3378
5013
|
"forwardsRef": true,
|
|
3379
|
-
"behavior": "Standalone event inspector
|
|
5014
|
+
"behavior": "Standalone event inspector — the panel behind TraceTimeline's Event details drawer, usable in any drawer/modal/split view. Adapts to the event instead of assuming an HTTP call: every value is rendered under its own label (identity, URL, request id and Started / Ended / Duration, each stacked on its own row) and only the sections the event has are shown — Request/Response (query parameters, headers, bodies, 'Awaiting response…' while in flight) for request-like events, Message/Payload/Details for plain events, Other fields for unrecognized keys. Ships no shell (no surface/border/scrolling) — wrap it in your own panel. The inference helpers behind it are exported too: isRequestEvent(ev) (the request/event decision), badgeOf(ev, pending) (the status/level badge as { text, tone: TraceBadgeTone } | null), extraFieldsOf(ev, hidden?) (unknown keys as TraceTimelineField[], minus hidden names).",
|
|
3380
5015
|
"props": {
|
|
3381
5016
|
"event": {
|
|
3382
5017
|
"type": "TraceTimelineEvent",
|
|
@@ -3447,7 +5082,7 @@
|
|
|
3447
5082
|
},
|
|
3448
5083
|
"tagColors": {
|
|
3449
5084
|
"type": "Record<string, string>",
|
|
3450
|
-
"notes": "Tag
|
|
5085
|
+
"notes": "Tag→color overrides; unknown tags cycle the palette."
|
|
3451
5086
|
},
|
|
3452
5087
|
"showControls": {
|
|
3453
5088
|
"type": "boolean",
|
|
@@ -3548,7 +5183,7 @@
|
|
|
3548
5183
|
},
|
|
3549
5184
|
"meta": {
|
|
3550
5185
|
"type": "ReactNode",
|
|
3551
|
-
"notes": "Defaults to 'N tasks
|
|
5186
|
+
"notes": "Defaults to 'N tasks · span · K running'."
|
|
3552
5187
|
},
|
|
3553
5188
|
"highlight": {
|
|
3554
5189
|
"type": "string"
|
|
@@ -3664,11 +5299,12 @@
|
|
|
3664
5299
|
},
|
|
3665
5300
|
"useKeyboard": {
|
|
3666
5301
|
"import": "import { useKeyboard } from '@overdoser/react-toolkit'",
|
|
3667
|
-
"signature": "useKeyboard(handlers: Record<string, (e: KeyboardEvent) => void>,
|
|
5302
|
+
"signature": "useKeyboard(handlers: Record<string, (e: KeyboardEvent) => void>, options?: boolean | UseKeyboardOptions): void",
|
|
3668
5303
|
"params": {
|
|
3669
|
-
"handlers": "Map keyed by
|
|
3670
|
-
"
|
|
3671
|
-
}
|
|
5304
|
+
"handlers": "Map keyed by key name or chord: 'Escape', 'k', '?', 'mod+k', 'ctrl+shift+z', 'alt+ArrowUp'. mod = Meta on macOS, Ctrl elsewhere.",
|
|
5305
|
+
"options": "boolean = { active }. { active?, ignoreEditable? (default true: printable keys skipped while typing in inputs), preventDefault? (default: only for modifier chords), target?: RefObject }"
|
|
5306
|
+
},
|
|
5307
|
+
"behavior": "Handlers read through a ref — inline objects don't re-subscribe."
|
|
3672
5308
|
},
|
|
3673
5309
|
"useTableSort": {
|
|
3674
5310
|
"import": "import { useTableSort } from '@overdoser/react-toolkit'",
|
|
@@ -3676,11 +5312,61 @@
|
|
|
3676
5312
|
"returns": {
|
|
3677
5313
|
"sortedData": "T[]",
|
|
3678
5314
|
"sortConfig": "SortConfig[]",
|
|
3679
|
-
"requestSort": "(key) => void
|
|
3680
|
-
"requestMultiSort": "(key) => void
|
|
5315
|
+
"requestSort": "(key) => void — single-column; cycles asc → desc → cleared.",
|
|
5316
|
+
"requestMultiSort": "(key) => void — adds/toggles a column in multi-sort.",
|
|
3681
5317
|
"resetSort": "() => void"
|
|
3682
5318
|
},
|
|
3683
5319
|
"notes": "Only needed if you want to manage sort state outside <Table>."
|
|
5320
|
+
},
|
|
5321
|
+
"usePersistedState": {
|
|
5322
|
+
"import": "import { usePersistedState } from '@overdoser/react-toolkit'",
|
|
5323
|
+
"signature": "usePersistedState<T>(key: string, initialValue: T | (() => T), options?: { storage?: 'local' | 'session'; serialize?; deserialize?; sync?: boolean }): [T, (next: T | ((prev: T) => T)) => void, () => void]",
|
|
5324
|
+
"behavior": "localStorage-backed useState. SSR-safe, private-mode safe, in-tab + cross-tab sync, useSyncExternalStore."
|
|
5325
|
+
},
|
|
5326
|
+
"useDebouncedValue": {
|
|
5327
|
+
"import": "import { useDebouncedValue } from '@overdoser/react-toolkit'",
|
|
5328
|
+
"signature": "useDebouncedValue<T>(value: T, delay = 300): T"
|
|
5329
|
+
},
|
|
5330
|
+
"useMediaQuery": {
|
|
5331
|
+
"import": "import { useMediaQuery } from '@overdoser/react-toolkit'",
|
|
5332
|
+
"signature": "useMediaQuery(query: string, serverValue = false): boolean"
|
|
5333
|
+
},
|
|
5334
|
+
"useElementSize": {
|
|
5335
|
+
"import": "import { useElementSize } from '@overdoser/react-toolkit'",
|
|
5336
|
+
"signature": "useElementSize(ref: RefObject<HTMLElement | null>, box?: 'content-box' | 'border-box'): { width: number; height: number }"
|
|
5337
|
+
},
|
|
5338
|
+
"useNow": {
|
|
5339
|
+
"import": "import { useNow } from '@overdoser/react-toolkit'",
|
|
5340
|
+
"signature": "useNow(interval = 1000, active = true): number",
|
|
5341
|
+
"behavior": "Shared timer per interval."
|
|
5342
|
+
},
|
|
5343
|
+
"useContextMenu": {
|
|
5344
|
+
"import": "import { useContextMenu } from '@overdoser/react-toolkit'",
|
|
5345
|
+
"signature": "useContextMenu(): { anchor, open, onOpenChange, onContextMenu, openAt(point), close }",
|
|
5346
|
+
"behavior": "Put onContextMenu on the area; pass anchor/open/onOpenChange to <Dropdown>."
|
|
5347
|
+
},
|
|
5348
|
+
"useConfirm": {
|
|
5349
|
+
"import": "import { useConfirm } from '@overdoser/react-toolkit'",
|
|
5350
|
+
"signature": "useConfirm(): (options?: ConfirmOptions) => Promise<boolean>",
|
|
5351
|
+
"behavior": "Needs <ConfirmProvider>. See components.ConfirmDialog.promiseApi."
|
|
5352
|
+
},
|
|
5353
|
+
"useResizable": {
|
|
5354
|
+
"import": "import { useResizable } from '@overdoser/react-toolkit'",
|
|
5355
|
+
"signature": "useResizable({ size?, defaultSize?, min?, max?: number | (() => number), axis?: 'x' | 'y', invert?, step?, onResize?, onResizeStart?, onResizeEnd?, disabled? }): { size, setSize, isResizing, reset, handleProps }",
|
|
5356
|
+
"behavior": "Spread handleProps on your handle element (pointer capture, keyboard, role=separator + aria values)."
|
|
5357
|
+
},
|
|
5358
|
+
"useZoomPan": {
|
|
5359
|
+
"import": "import { useZoomPan } from '@overdoser/react-toolkit'",
|
|
5360
|
+
"signature": "useZoomPan({ minScale?, maxScale?, step?, wheel?, doubleClickToggle?, onChange? }): { scale, x, y, isPanning, stageProps, contentRef, contentStyle, zoomIn, zoomOut, zoomTo, reset, fit }",
|
|
5361
|
+
"behavior": "Spread stageProps on a relative/overflow-hidden stage, contentStyle on the zoomed element."
|
|
5362
|
+
},
|
|
5363
|
+
"useTheme": {
|
|
5364
|
+
"import": "import { useTheme } from '@overdoser/react-toolkit'",
|
|
5365
|
+
"signature": "useTheme({ storageKey?, attribute?, defaultTheme? }?): { theme: 'light' | 'dark' | 'system'; resolved: 'light' | 'dark'; setTheme; toggle }"
|
|
5366
|
+
},
|
|
5367
|
+
"useCommandPalette": {
|
|
5368
|
+
"import": "import { useCommandPalette } from '@overdoser/react-toolkit'",
|
|
5369
|
+
"signature": "useCommandPalette(initialOpen = false): { open, setOpen, toggle, paletteProps: { open, onOpenChange } }"
|
|
3684
5370
|
}
|
|
3685
5371
|
},
|
|
3686
5372
|
"conventions": [
|
|
@@ -3689,10 +5375,10 @@
|
|
|
3689
5375
|
"Dropdown has two modes: with `options` + `value` + `onChange` it acts as a select input (the `trigger` prop is unused); without `options`, pass `trigger` and `<DropdownItem>` children.",
|
|
3690
5376
|
"Popover content goes through the `content` prop.",
|
|
3691
5377
|
"Modal content lives in Modal.Header / Modal.Body / Modal.Footer compound components.",
|
|
3692
|
-
"FormField clones a single child element to inject form props
|
|
5378
|
+
"FormField clones a single child element to inject form props — pass exactly one input element.",
|
|
3693
5379
|
"Server-side Table mode (when `onSort` is provided): the consumer is responsible for sorting and slicing `data` server-side.",
|
|
3694
5380
|
"Theme stylesheet is imported separately: '@overdoser/react-toolkit/theme.css'.",
|
|
3695
|
-
"Charts use `--crk-chart-1`
|
|
5381
|
+
"Charts use `--crk-chart-1` … `--crk-chart-5` color tokens (overridable on `:root`). Each chart is responsive via ResizeObserver; ship no external chart library."
|
|
3696
5382
|
],
|
|
3697
5383
|
"recipes": [
|
|
3698
5384
|
"recipes/login-form.tsx",
|
|
@@ -3712,5 +5398,40 @@
|
|
|
3712
5398
|
"recipes/comparison-table.tsx",
|
|
3713
5399
|
"recipes/live-timeline-feed.tsx",
|
|
3714
5400
|
"recipes/floating-copy-button.tsx"
|
|
3715
|
-
]
|
|
5401
|
+
],
|
|
5402
|
+
"utils": {
|
|
5403
|
+
"formatBytes": {
|
|
5404
|
+
"import": "import { formatBytes } from '@overdoser/react-toolkit'",
|
|
5405
|
+
"signature": "formatBytes(bytes: number, { decimals?, base?: 1000 | 1024, iec?, locale? }?): string",
|
|
5406
|
+
"example": "formatBytes(1536) → '1.5 KB'"
|
|
5407
|
+
},
|
|
5408
|
+
"timeAgo": {
|
|
5409
|
+
"import": "import { timeAgo } from '@overdoser/react-toolkit'",
|
|
5410
|
+
"signature": "timeAgo(value: Date | number | string, { now?, locale?, format?, numeric?, maxAge? }?): string | null",
|
|
5411
|
+
"example": "'3 minutes ago' / 'in 2 hours' / 'yesterday'"
|
|
5412
|
+
},
|
|
5413
|
+
"THEME_INIT_SCRIPT": {
|
|
5414
|
+
"import": "import { THEME_INIT_SCRIPT, getThemeInitScript } from '@overdoser/react-toolkit'",
|
|
5415
|
+
"signature": "THEME_INIT_SCRIPT: string; getThemeInitScript({ storageKey?, attribute? }?): string",
|
|
5416
|
+
"notes": "Inline in <head> before first paint."
|
|
5417
|
+
}
|
|
5418
|
+
},
|
|
5419
|
+
"darkMode": {
|
|
5420
|
+
"contract": "No attribute = follows prefers-color-scheme. data-theme=\"light\"|\"dark\" on <html> forces a theme; on any element forces it for that subtree.",
|
|
5421
|
+
"storageKey": "crk-theme",
|
|
5422
|
+
"headScript": "THEME_INIT_SCRIPT (inline in <head> before first paint)",
|
|
5423
|
+
"toggle": "<ThemeToggle />",
|
|
5424
|
+
"hook": "useTheme()",
|
|
5425
|
+
"tokens": [
|
|
5426
|
+
"--crk-color-primary-text",
|
|
5427
|
+
"--crk-color-info-text",
|
|
5428
|
+
"--crk-color-success-text",
|
|
5429
|
+
"--crk-color-warning-text",
|
|
5430
|
+
"--crk-color-danger-text",
|
|
5431
|
+
"--crk-color-primary-selected",
|
|
5432
|
+
"--crk-color-overlay-hover",
|
|
5433
|
+
"--crk-color-backdrop",
|
|
5434
|
+
"--crk-color-backdrop-soft"
|
|
5435
|
+
]
|
|
5436
|
+
}
|
|
3716
5437
|
}
|