@rebasepro/ui 0.0.1-canary.eae7889 → 0.0.1-canary.eb08332
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/LICENSE +1 -1
- package/README.md +124 -66
- package/dist/components/Autocomplete.d.ts +2 -2
- package/dist/components/BooleanSwitchWithLabel.d.ts +1 -1
- package/dist/components/Button.d.ts +2 -2
- package/dist/components/Card.d.ts +2 -3
- package/dist/components/Checkbox.d.ts +1 -1
- package/dist/components/Chip.d.ts +1 -1
- package/dist/components/CircularProgress.d.ts +2 -1
- package/dist/components/CircularProgressCenter.d.ts +2 -1
- package/dist/components/Collapse.d.ts +1 -1
- package/dist/components/ColorPicker.d.ts +2 -1
- package/dist/components/DebouncedTextField.d.ts +2 -1
- package/dist/components/Dialog.d.ts +2 -1
- package/dist/components/DialogActions.d.ts +1 -1
- package/dist/components/DialogContent.d.ts +1 -1
- package/dist/components/DialogTitle.d.ts +1 -1
- package/dist/components/ErrorBoundary.d.ts +26 -4
- package/dist/components/ExpandablePanel.d.ts +1 -1
- package/dist/components/FileUpload.d.ts +2 -2
- package/dist/components/FilterChip.d.ts +34 -0
- package/dist/components/InfoLabel.d.ts +1 -1
- package/dist/components/LoadingButton.d.ts +1 -1
- package/dist/components/Menu.d.ts +1 -1
- package/dist/components/Menubar.d.ts +16 -16
- package/dist/components/MultiSelect.d.ts +1 -1
- package/dist/components/Paper.d.ts +1 -1
- package/dist/components/Popover.d.ts +1 -1
- package/dist/components/ResizablePanels.d.ts +1 -1
- package/dist/components/SearchBar.d.ts +5 -1
- package/dist/components/Select.d.ts +2 -2
- package/dist/components/Separator.d.ts +1 -1
- package/dist/components/Skeleton.d.ts +2 -1
- package/dist/components/Table.d.ts +5 -5
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/TextField.d.ts +2 -2
- package/dist/components/ToggleButtonGroup.d.ts +1 -1
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/Typography.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTable.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTableCell.d.ts +6 -6
- package/dist/components/VirtualTable/VirtualTableHeader.d.ts +8 -8
- package/dist/components/VirtualTable/VirtualTableHeaderRow.d.ts +2 -1
- package/dist/components/VirtualTable/VirtualTableProps.d.ts +18 -12
- package/dist/components/VirtualTable/VirtualTableRow.d.ts +1 -1
- package/dist/components/VirtualTable/fields/VirtualTableDateField.d.ts +13 -0
- package/dist/components/VirtualTable/fields/VirtualTableInput.d.ts +10 -0
- package/dist/components/VirtualTable/fields/VirtualTableNumberInput.d.ts +9 -0
- package/dist/components/VirtualTable/fields/VirtualTableSelect.d.ts +17 -0
- package/dist/components/VirtualTable/fields/VirtualTableSwitch.d.ts +8 -0
- package/dist/components/VirtualTable/index.d.ts +7 -0
- package/dist/components/VirtualTable/selection/SelectionContext.d.ts +11 -0
- package/dist/components/VirtualTable/selection/SelectionStore.d.ts +14 -0
- package/dist/components/VirtualTable/types.d.ts +9 -9
- package/dist/components/common/SelectInputLabel.d.ts +1 -1
- package/dist/components/index.d.ts +5 -0
- package/dist/hooks/PortalContainerContext.d.ts +1 -1
- package/dist/hooks/useDebounceCallback.d.ts +1 -1
- package/dist/icons/GitHubIcon.d.ts +2 -1
- package/dist/icons/HandleIcon.d.ts +1 -1
- package/dist/icons/index.d.ts +2 -0
- package/dist/index.css +25 -14
- package/dist/index.d.ts +13 -3
- package/dist/index.es.js +8034 -8338
- package/dist/index.es.js.map +1 -1
- package/dist/src/index.css +136 -0
- package/dist/styles.d.ts +9 -9
- package/dist/util/debounce.d.ts +1 -1
- package/dist/views/CardView.d.ts +32 -0
- package/dist/views/CollectionView/CollectionCardView.d.ts +30 -0
- package/dist/views/CollectionView/CollectionKanbanView.d.ts +31 -0
- package/dist/views/CollectionView/CollectionListView.d.ts +30 -0
- package/dist/views/CollectionView/CollectionTableView.d.ts +37 -0
- package/dist/views/CollectionView/CollectionView.d.ts +121 -0
- package/dist/views/CollectionView/CollectionViewToolbar.d.ts +31 -0
- package/dist/views/CollectionView/CollectionViewTypes.d.ts +106 -0
- package/dist/views/CollectionView/DefaultCellRenderer.d.ts +9 -0
- package/dist/views/CollectionView/index.d.ts +24 -0
- package/dist/views/CollectionView/utils.d.ts +5 -0
- package/dist/views/Kanban/Board.d.ts +3 -0
- package/dist/views/Kanban/BoardColumn.d.ts +20 -0
- package/dist/views/Kanban/BoardColumnTitle.d.ts +8 -0
- package/dist/views/Kanban/BoardSortableList.d.ts +14 -0
- package/dist/views/Kanban/board_types.d.ts +61 -0
- package/dist/views/Kanban/index.d.ts +5 -0
- package/dist/views/KanbanView.d.ts +24 -0
- package/dist/views/ListView.d.ts +40 -0
- package/dist/views/TableView.d.ts +6 -0
- package/dist/views/index.d.ts +5 -0
- package/package.json +41 -41
- package/src/components/Alert.tsx +6 -6
- package/src/components/BooleanSwitch.tsx +3 -3
- package/src/components/BooleanSwitchWithLabel.tsx +5 -4
- package/src/components/Button.tsx +13 -13
- package/src/components/Card.tsx +1 -1
- package/src/components/Checkbox.tsx +1 -1
- package/src/components/Chip.tsx +55 -20
- package/src/components/DateTimeField.tsx +3 -3
- package/src/components/DebouncedTextField.tsx +60 -17
- package/src/components/Dialog.tsx +8 -5
- package/src/components/ErrorBoundary.tsx +173 -18
- package/src/components/ExpandablePanel.tsx +2 -2
- package/src/components/FileUpload.tsx +2 -2
- package/src/components/FilterChip.tsx +79 -0
- package/src/components/IconButton.tsx +2 -2
- package/src/components/Markdown.tsx +1 -2
- package/src/components/MultiSelect.tsx +7 -7
- package/src/components/SearchBar.tsx +8 -3
- package/src/components/Select.tsx +4 -4
- package/src/components/Separator.tsx +2 -2
- package/src/components/Sheet.tsx +8 -4
- package/src/components/Skeleton.tsx +2 -2
- package/src/components/Table.tsx +23 -15
- package/src/components/Tabs.tsx +2 -2
- package/src/components/TextField.tsx +8 -7
- package/src/components/TextareaAutosize.tsx +1 -1
- package/src/components/ToggleButtonGroup.tsx +1 -1
- package/src/components/Tooltip.tsx +2 -1
- package/src/components/VirtualTable/VirtualTable.performance.test.tsx +1 -1
- package/src/components/VirtualTable/VirtualTable.tsx +19 -17
- package/src/components/VirtualTable/VirtualTableCell.tsx +6 -6
- package/src/components/VirtualTable/VirtualTableHeader.tsx +51 -38
- package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +10 -9
- package/src/components/VirtualTable/VirtualTableProps.tsx +37 -22
- package/src/components/VirtualTable/VirtualTableRow.tsx +4 -4
- package/src/components/VirtualTable/fields/VirtualTableDateField.tsx +32 -0
- package/src/components/VirtualTable/fields/VirtualTableInput.tsx +82 -0
- package/src/components/VirtualTable/fields/VirtualTableNumberInput.tsx +71 -0
- package/src/components/VirtualTable/fields/VirtualTableSelect.tsx +107 -0
- package/src/components/VirtualTable/fields/VirtualTableSwitch.tsx +28 -0
- package/src/components/VirtualTable/index.tsx +7 -0
- package/src/components/VirtualTable/selection/SelectionContext.tsx +36 -0
- package/src/components/VirtualTable/selection/SelectionStore.ts +54 -0
- package/src/components/VirtualTable/types.tsx +9 -9
- package/src/components/index.tsx +8 -0
- package/src/hooks/useDebounceCallback.tsx +2 -1
- package/src/icons/Icon.tsx +1 -1
- package/src/icons/icon_keys.ts +1 -1
- package/src/icons/index.ts +126 -0
- package/src/index.css +25 -14
- package/src/index.ts +43 -3
- package/src/scripts/fixIconSizes.cjs +7 -7
- package/src/scripts/fixIconSizesToConst.cjs +2 -2
- package/src/scripts/generateIconKeys.ts +7 -7
- package/src/scripts/saveIconFiles.ts +1 -1
- package/src/styles.ts +9 -9
- package/src/util/debounce.ts +3 -3
- package/src/views/CardView.tsx +281 -0
- package/src/views/CollectionView/CollectionCardView.tsx +270 -0
- package/src/views/CollectionView/CollectionKanbanView.tsx +251 -0
- package/src/views/CollectionView/CollectionListView.tsx +245 -0
- package/src/views/CollectionView/CollectionTableView.tsx +229 -0
- package/src/views/CollectionView/CollectionView.tsx +388 -0
- package/src/views/CollectionView/CollectionViewToolbar.tsx +229 -0
- package/src/views/CollectionView/CollectionViewTypes.ts +137 -0
- package/src/views/CollectionView/DefaultCellRenderer.tsx +404 -0
- package/src/views/CollectionView/index.ts +44 -0
- package/src/views/CollectionView/utils.ts +14 -0
- package/src/views/Kanban/Board.tsx +421 -0
- package/src/views/Kanban/BoardColumn.tsx +135 -0
- package/src/views/Kanban/BoardColumnTitle.tsx +47 -0
- package/src/views/Kanban/BoardSortableList.tsx +170 -0
- package/src/views/Kanban/board_types.ts +70 -0
- package/src/views/Kanban/index.tsx +5 -0
- package/src/views/KanbanView.tsx +32 -0
- package/src/views/ListView.tsx +281 -0
- package/src/views/TableView.tsx +7 -0
- package/src/views/index.ts +5 -0
- package/dist/index.umd.js +0 -8703
- package/dist/index.umd.js.map +0 -1
- package/src/scripts/migrateIconImports.ts +0 -108
- package/src/scripts/test.ts +0 -6
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,84 +1,142 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
**Rebase UI** is a high quality set of components that you can use to build your own custom views. You can
|
|
5
|
-
use these components to build your own Rebase views, or in any other React application. You just need to install
|
|
6
|
-
`tailwindcss` and the `@rebasepro/ui` package.
|
|
7
|
-
|
|
8
|
-
### Why build this UI kit?
|
|
9
|
-
Rebase was using MUI until version 3.0. MUI provides ready to use components with intuitive APIs, but it also
|
|
10
|
-
comes with a lot of complexity and overhead. We wanted to build a simpler and more flexible UI kit that could be used
|
|
11
|
-
in any React project, not just in Rebase.
|
|
12
|
-
We also wanted to make it easy to transition from MUI to our new UI kit, so we kept the API as similar as possible.
|
|
13
|
-
The result it a set of components that are easy to use, easy to customize, **much more performant** and with a smaller bundle size.
|
|
14
|
-
|
|
15
|
-
The components are primarily built using **Radix UI** primitives and **tailwindcss**. This means that you can easily customize them
|
|
16
|
-
using tailwindcss classes or override the styles using CSS.
|
|
17
|
-
|
|
18
|
-
See the full list of components in https://rebase.pro/docs/components
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
> All the components are exported from the `@rebasepro/ui` package. These are the same components used internally in **Rebase**.
|
|
1
|
+
# @rebasepro/ui
|
|
22
2
|
|
|
3
|
+
React component library and design system for the Rebase ecosystem. Built on Radix UI primitives, Tailwind CSS, and lucide-react icons.
|
|
23
4
|
|
|
24
5
|
## Installation
|
|
25
6
|
|
|
26
|
-
If you are using Rebase, you don't need to install this package, as it is already included, and
|
|
27
|
-
configured for you.
|
|
28
|
-
|
|
29
|
-
To use the components in your own project, you need to install the `@rebasepro/ui` package:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
yarn add @rebasepro/ui
|
|
33
|
-
```
|
|
34
|
-
or
|
|
35
7
|
```bash
|
|
36
|
-
|
|
8
|
+
pnpm add @rebasepro/ui
|
|
37
9
|
```
|
|
38
10
|
|
|
39
|
-
|
|
11
|
+
### Peer Dependencies
|
|
40
12
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
And initialize it in your project:
|
|
13
|
+
- `react` >= 19.0.0
|
|
14
|
+
- `react-dom` >= 19.0.0
|
|
46
15
|
|
|
47
|
-
|
|
48
|
-
npx tailwindcss init
|
|
49
|
-
```
|
|
16
|
+
## What This Package Does
|
|
50
17
|
|
|
51
|
-
|
|
18
|
+
`@rebasepro/ui` provides all the shared UI primitives used across Rebase packages (`@rebasepro/studio`, `@rebasepro/admin`, etc.). It wraps Radix UI components with Rebase's design tokens and Tailwind styling, and re-exports lucide-react icons so other packages don't need direct icon dependencies.
|
|
52
19
|
|
|
53
|
-
|
|
54
|
-
import rebaseConfig from "@rebasepro/ui/tailwind.config.js";
|
|
20
|
+
Import the stylesheet in your app:
|
|
55
21
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
content: [
|
|
59
|
-
"./index.html",
|
|
60
|
-
"./src/**/*.{js,ts,jsx,tsx}",
|
|
61
|
-
"./node_modules/@rebasepro/**/src/**/*.{js,ts,jsx,tsx}"
|
|
62
|
-
]
|
|
63
|
-
};
|
|
22
|
+
```typescript
|
|
23
|
+
import "@rebasepro/ui/index.css";
|
|
64
24
|
```
|
|
65
|
-
(You might need to adjust the paths in the `content` array to match your project structure)
|
|
66
25
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
26
|
+
## Key Exports
|
|
27
|
+
|
|
28
|
+
### Components
|
|
29
|
+
|
|
30
|
+
| Component | Description |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `Alert` | Status messages and notifications |
|
|
33
|
+
| `Autocomplete` | Text input with suggestions |
|
|
34
|
+
| `Avatar` | User avatar display |
|
|
35
|
+
| `Badge` | Small status indicator |
|
|
36
|
+
| `BooleanSwitch` / `BooleanSwitchWithLabel` | Toggle switch |
|
|
37
|
+
| `Button` / `IconButton` / `LoadingButton` | Action buttons |
|
|
38
|
+
| `Card` | Content container card |
|
|
39
|
+
| `CenteredView` | Horizontally/vertically centered layout |
|
|
40
|
+
| `Checkbox` | Checkbox input (Radix) |
|
|
41
|
+
| `Chip` / `FilterChip` | Tag-like chips |
|
|
42
|
+
| `CircularProgress` / `CircularProgressCenter` | Loading spinners |
|
|
43
|
+
| `Collapse` | Collapsible content (Radix) |
|
|
44
|
+
| `ColorPicker` | Color selection input |
|
|
45
|
+
| `Container` | Max-width content wrapper |
|
|
46
|
+
| `DateTimeField` | Date/time picker input |
|
|
47
|
+
| `DebouncedTextField` | Text field with debounced onChange |
|
|
48
|
+
| `Dialog` / `DialogTitle` / `DialogContent` / `DialogActions` | Modal dialogs (Radix) |
|
|
49
|
+
| `ErrorBoundary` | React error boundary |
|
|
50
|
+
| `ExpandablePanel` | Expandable/collapsible panel |
|
|
51
|
+
| `FileUpload` | Drag-and-drop file upload (react-dropzone) |
|
|
52
|
+
| `InputLabel` / `InfoLabel` / `Label` | Form labels |
|
|
53
|
+
| `Markdown` | Markdown renderer (markdown-it) |
|
|
54
|
+
| `Menu` / `Menubar` | Dropdown and menu bar (Radix) |
|
|
55
|
+
| `MultiSelect` | Multi-value select input |
|
|
56
|
+
| `Paper` | Elevated surface |
|
|
57
|
+
| `Popover` | Popover overlay (Radix) |
|
|
58
|
+
| `RadioGroup` | Radio button group (Radix) |
|
|
59
|
+
| `ResizablePanels` | Resizable split panes |
|
|
60
|
+
| `SearchBar` | Search input with icon |
|
|
61
|
+
| `Select` | Single-value select (Radix) |
|
|
62
|
+
| `Separator` | Visual divider (Radix) |
|
|
63
|
+
| `Sheet` | Slide-out panel |
|
|
64
|
+
| `Skeleton` | Loading placeholder |
|
|
65
|
+
| `Slider` | Range slider (Radix) |
|
|
66
|
+
| `Table` / `VirtualTable` | Data tables (VirtualTable uses react-window) |
|
|
67
|
+
| `Tabs` | Tab navigation (Radix) |
|
|
68
|
+
| `TextareaAutosize` | Auto-resizing textarea |
|
|
69
|
+
| `TextField` | Text input field |
|
|
70
|
+
| `ToggleButtonGroup` | Segmented toggle buttons |
|
|
71
|
+
| `Tooltip` | Hover tooltip (Radix) |
|
|
72
|
+
| `Typography` | Text with variant styling |
|
|
73
|
+
|
|
74
|
+
### Re-exported Radix Primitives
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
import { Portal, PopoverPrimitive, Slot } from "@rebasepro/ui";
|
|
78
|
+
```
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
### Style Mixins
|
|
81
|
+
|
|
82
|
+
Tailwind class-string constants for consistent styling:
|
|
83
|
+
|
|
84
|
+
| Export | Description |
|
|
85
|
+
|---|---|
|
|
86
|
+
| `focusedClasses` | Ring styles for focused elements |
|
|
87
|
+
| `fieldBackgroundMixin` | Standard field background |
|
|
88
|
+
| `fieldBackgroundHoverMixin` | Hover state for fields |
|
|
89
|
+
| `defaultBorderMixin` | Default border color |
|
|
90
|
+
| `paperMixin` | Paper/card surface style |
|
|
91
|
+
| `cardMixin` / `cardClickableMixin` / `cardSelectedMixin` | Card variants |
|
|
92
|
+
|
|
93
|
+
### Utilities
|
|
94
|
+
|
|
95
|
+
| Export | Description |
|
|
96
|
+
|---|---|
|
|
97
|
+
| `cls(...)` | Class name merge utility (wraps `clsx`) |
|
|
98
|
+
| `debounce` | Debounce function |
|
|
99
|
+
| `chipColors` | Color palette for chips |
|
|
100
|
+
| `keyToIconComponent` | Map icon string key to lucide component |
|
|
101
|
+
|
|
102
|
+
### Hooks
|
|
103
|
+
|
|
104
|
+
| Hook | Description |
|
|
105
|
+
|---|---|
|
|
106
|
+
| `useInjectStyles` | Inject CSS into the document head |
|
|
107
|
+
| `useOutsideAlerter` | Detect clicks outside a ref |
|
|
108
|
+
| `useDebouncedCallback` | Debounced callback hook |
|
|
109
|
+
| `useDebounceCallback` | Callback debounce variant |
|
|
110
|
+
| `useDebounceValue` | Debounced value hook |
|
|
111
|
+
| `PortalContainerContext` | Context for portal target container |
|
|
112
|
+
|
|
113
|
+
### Icons
|
|
114
|
+
|
|
115
|
+
Re-exports ~100 individual lucide-react icon components (e.g. `ArrowRightIcon`, `SearchIcon`, `PlusIcon`), the full `lucideIcons` map, the `Icon` component, `GitHubIcon`, `HandleIcon`, `iconKeys`, and `coolIconKeys`.
|
|
116
|
+
|
|
117
|
+
## Quick Start
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
import { Button, TextField, Typography, cls } from "@rebasepro/ui";
|
|
121
|
+
import { SearchIcon } from "@rebasepro/ui";
|
|
122
|
+
import "@rebasepro/ui/index.css";
|
|
123
|
+
|
|
124
|
+
function MyForm() {
|
|
125
|
+
return (
|
|
126
|
+
<div className={cls("flex flex-col gap-4 p-4")}>
|
|
127
|
+
<Typography variant="h6">Search</Typography>
|
|
128
|
+
<TextField placeholder="Type to search..." />
|
|
129
|
+
<Button variant="filled">
|
|
130
|
+
<SearchIcon size={16} />
|
|
131
|
+
Search
|
|
132
|
+
</Button>
|
|
133
|
+
</div>
|
|
134
|
+
);
|
|
82
135
|
}
|
|
83
136
|
```
|
|
84
137
|
|
|
138
|
+
## Related Packages
|
|
139
|
+
|
|
140
|
+
- `@rebasepro/studio` — Dev tools layer (depends on this package)
|
|
141
|
+
- `@rebasepro/admin` — CMS layer (depends on this package)
|
|
142
|
+
- `@rebasepro/app` — Core framework (uses this for shared UI)
|
|
@@ -12,10 +12,10 @@ export declare const useAutoComplete: ({ ref }: {
|
|
|
12
12
|
autoCompleteOpen: boolean;
|
|
13
13
|
setAutoCompleteOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
14
14
|
};
|
|
15
|
-
export declare function Autocomplete({ children, open, setOpen, className }: AutocompleteProps):
|
|
15
|
+
export declare function Autocomplete({ children, open, setOpen, className }: AutocompleteProps): React.JSX.Element;
|
|
16
16
|
export type AutocompleteItemProps = {
|
|
17
17
|
children: React.ReactNode;
|
|
18
18
|
onClick?: () => void;
|
|
19
19
|
className?: string;
|
|
20
20
|
};
|
|
21
|
-
export declare const AutocompleteItem: React.
|
|
21
|
+
export declare const AutocompleteItem: React.MemoExoticComponent<({ children, onClick, className }: AutocompleteItemProps) => React.JSX.Element>;
|
|
@@ -14,4 +14,4 @@ export type BooleanSwitchWithLabelProps = BooleanSwitchProps & {
|
|
|
14
14
|
* Simple boolean switch.
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
|
-
export declare const BooleanSwitchWithLabel: ({ value, position, size, invisible, onValueChange, error, label, autoFocus, disabled, className, fullWidth, inputClassName, ...props }: BooleanSwitchWithLabelProps) =>
|
|
17
|
+
export declare const BooleanSwitchWithLabel: ({ value, position, size, invisible, onValueChange, error, label, autoFocus, disabled, className, fullWidth, inputClassName, ...props }: BooleanSwitchWithLabelProps) => React.JSX.Element;
|
|
@@ -9,6 +9,6 @@ export type ButtonProps<C extends React.ElementType = "button"> = {
|
|
|
9
9
|
fullWidth?: boolean;
|
|
10
10
|
className?: string;
|
|
11
11
|
component?: C;
|
|
12
|
-
onClick?: React.MouseEventHandler<
|
|
12
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
13
13
|
} & React.ComponentPropsWithoutRef<C>;
|
|
14
|
-
export declare const Button: React.FC<ButtonProps<
|
|
14
|
+
export declare const Button: React.FC<ButtonProps<React.ElementType>>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<{
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
style?: React.CSSProperties;
|
|
5
5
|
onClick?: (e?: React.MouseEvent) => void;
|
|
6
6
|
className?: string;
|
|
7
|
-
}
|
|
8
|
-
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
9
8
|
export { Card };
|
|
@@ -10,4 +10,4 @@ export interface CheckboxProps {
|
|
|
10
10
|
color?: "primary" | "secondary";
|
|
11
11
|
"aria-label"?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare const Checkbox: React.MemoExoticComponent<({ id, checked, indeterminate, padding, disabled, size, onCheckedChange, color, "aria-label": ariaLabel }: CheckboxProps) =>
|
|
13
|
+
export declare const Checkbox: React.MemoExoticComponent<({ id, checked, indeterminate, padding, disabled, size, onCheckedChange, color, "aria-label": ariaLabel }: CheckboxProps) => React.JSX.Element>;
|
|
@@ -23,4 +23,4 @@ export interface ChipProps {
|
|
|
23
23
|
/**
|
|
24
24
|
* @group Preview components
|
|
25
25
|
*/
|
|
26
|
-
export declare function Chip({ children, colorScheme, error, outlined, onClick, icon, size, className, style }: ChipProps):
|
|
26
|
+
export declare function Chip({ children, colorScheme, error, outlined, onClick, icon, size, className, style }: ChipProps): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export type CircularProgressProps = {
|
|
2
3
|
size?: "smallest" | "small" | "medium" | "large";
|
|
3
4
|
className?: string;
|
|
4
5
|
};
|
|
5
|
-
export declare function CircularProgress({ size, className }: CircularProgressProps):
|
|
6
|
+
export declare function CircularProgress({ size, className }: CircularProgressProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { CircularProgressProps } from "./CircularProgress";
|
|
2
3
|
/**
|
|
3
4
|
*
|
|
@@ -8,4 +9,4 @@ import { CircularProgressProps } from "./CircularProgress";
|
|
|
8
9
|
*/
|
|
9
10
|
export declare function CircularProgressCenter({ text, ...props }: CircularProgressProps & {
|
|
10
11
|
text?: string;
|
|
11
|
-
}):
|
|
12
|
+
}): React.JSX.Element;
|
|
@@ -5,5 +5,5 @@ interface CollapseProps {
|
|
|
5
5
|
in?: boolean;
|
|
6
6
|
duration?: number;
|
|
7
7
|
}
|
|
8
|
-
export declare const Collapse: React.MemoExoticComponent<({ children, className, in: isOpen, duration }: CollapseProps) =>
|
|
8
|
+
export declare const Collapse: React.MemoExoticComponent<({ children, className, in: isOpen, duration }: CollapseProps) => React.JSX.Element>;
|
|
9
9
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { ChipColorKey } from "./Chip";
|
|
2
3
|
export interface ColorPickerProps {
|
|
3
4
|
/**
|
|
@@ -27,4 +28,4 @@ export interface ColorPickerProps {
|
|
|
27
28
|
*
|
|
28
29
|
* @group Form components
|
|
29
30
|
*/
|
|
30
|
-
export declare function ColorPicker({ value, onChange, size, allowClear, disabled }: ColorPickerProps):
|
|
31
|
+
export declare function ColorPicker({ value, onChange, size, allowClear, disabled }: ColorPickerProps): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { TextFieldProps } from "./index";
|
|
2
|
-
export declare function DebouncedTextField<T extends string | number>(props: TextFieldProps<T>):
|
|
3
|
+
export declare function DebouncedTextField<T extends string | number>(props: TextFieldProps<T>): React.JSX.Element;
|
|
@@ -20,6 +20,7 @@ export type DialogProps = {
|
|
|
20
20
|
*/
|
|
21
21
|
disableInitialFocus?: boolean;
|
|
22
22
|
portalContainer?: HTMLElement | null;
|
|
23
|
+
"aria-describedby"?: string;
|
|
23
24
|
};
|
|
24
25
|
declare const widthClasses: {
|
|
25
26
|
xs: string;
|
|
@@ -35,5 +36,5 @@ declare const widthClasses: {
|
|
|
35
36
|
"7xl": string;
|
|
36
37
|
full: string;
|
|
37
38
|
};
|
|
38
|
-
export declare const Dialog: ({ open, onOpenChange, children, className, containerClassName, fullWidth, fullHeight, fullScreen, scrollable, maxWidth, modal, onOpenAutoFocus, onEscapeKeyDown, onPointerDownOutside, onInteractOutside, disableInitialFocus, portalContainer }: DialogProps) =>
|
|
39
|
+
export declare const Dialog: ({ open, onOpenChange, children, className, containerClassName, fullWidth, fullHeight, fullScreen, scrollable, maxWidth, modal, onOpenAutoFocus, onEscapeKeyDown, onPointerDownOutside, onInteractOutside, disableInitialFocus, portalContainer, "aria-describedby": ariaDescribedby }: DialogProps) => React.JSX.Element;
|
|
39
40
|
export {};
|
|
@@ -7,4 +7,4 @@ export type DialogContentProps = TypographyProps & {
|
|
|
7
7
|
includeMargin?: boolean;
|
|
8
8
|
variant?: TypographyVariant;
|
|
9
9
|
};
|
|
10
|
-
export declare function DialogTitle({ children, hidden, className, variant, gutterBottom, includeMargin, ...props }: DialogContentProps):
|
|
10
|
+
export declare function DialogTitle({ children, hidden, className, variant, gutterBottom, includeMargin, ...props }: DialogContentProps): React.JSX.Element;
|
|
@@ -1,11 +1,33 @@
|
|
|
1
1
|
import React, { ErrorInfo, PropsWithChildren } from "react";
|
|
2
|
-
export
|
|
2
|
+
export interface ErrorBoundaryProps {
|
|
3
|
+
/**
|
|
4
|
+
* When true, renders a full-page centered error screen instead of the
|
|
5
|
+
* compact inline error. Intended for wrapping top-level app roots or
|
|
6
|
+
* major route sections.
|
|
7
|
+
*/
|
|
8
|
+
fullPage?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Optional callback invoked when the user clicks "Try again". If provided,
|
|
11
|
+
* the boundary resets its error state and calls this handler. If omitted,
|
|
12
|
+
* the "Try again" button resets the boundary state, re-mounting children.
|
|
13
|
+
*/
|
|
14
|
+
onReset?: () => void;
|
|
15
|
+
}
|
|
16
|
+
interface ErrorBoundaryState {
|
|
3
17
|
error: Error | null;
|
|
4
|
-
|
|
5
|
-
|
|
18
|
+
showDetails: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare class ErrorBoundary extends React.Component<PropsWithChildren<ErrorBoundaryProps>, ErrorBoundaryState> {
|
|
21
|
+
constructor(props: PropsWithChildren<ErrorBoundaryProps>);
|
|
6
22
|
static getDerivedStateFromError(error: Error): {
|
|
7
23
|
error: Error;
|
|
8
24
|
};
|
|
9
25
|
componentDidCatch(error: Error, _errorInfo: ErrorInfo): void;
|
|
10
|
-
|
|
26
|
+
private handleReset;
|
|
27
|
+
private handleReload;
|
|
28
|
+
private toggleDetails;
|
|
29
|
+
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
30
|
+
private renderInline;
|
|
31
|
+
private renderFullPage;
|
|
11
32
|
}
|
|
33
|
+
export {};
|
|
@@ -9,7 +9,7 @@ export type OnFileUploadRejected = (fileRejections: {
|
|
|
9
9
|
}[], event: object) => void;
|
|
10
10
|
export type OnFilesUploadAdded = (files: File[]) => void;
|
|
11
11
|
export type FileUploadProps = {
|
|
12
|
-
accept
|
|
12
|
+
accept?: Record<string, string[]>;
|
|
13
13
|
onFilesAdded: OnFilesUploadAdded;
|
|
14
14
|
onFilesRejected?: OnFileUploadRejected;
|
|
15
15
|
maxSize?: number;
|
|
@@ -20,4 +20,4 @@ export type FileUploadProps = {
|
|
|
20
20
|
preventDropOnDocument?: boolean;
|
|
21
21
|
size?: "small" | "medium" | "large";
|
|
22
22
|
};
|
|
23
|
-
export declare function FileUpload({ accept, onFilesAdded, onFilesRejected, maxSize, disabled, maxFiles, title, uploadDescription, children, preventDropOnDocument, size }: React.PropsWithChildren<FileUploadProps>):
|
|
23
|
+
export declare function FileUpload({ accept, onFilesAdded, onFilesRejected, maxSize, disabled, maxFiles, title, uploadDescription, children, preventDropOnDocument, size }: React.PropsWithChildren<FileUploadProps>): React.JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface FilterChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
3
|
+
/**
|
|
4
|
+
* The text label displayed on the chip.
|
|
5
|
+
*/
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the chip is currently in an active/selected state.
|
|
9
|
+
*/
|
|
10
|
+
active?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Optional icon rendered before the label.
|
|
13
|
+
*/
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Size variant.
|
|
17
|
+
* @default "medium"
|
|
18
|
+
*/
|
|
19
|
+
size?: "small" | "medium";
|
|
20
|
+
/**
|
|
21
|
+
* Whether the chip is disabled.
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A toggle chip used for filter presets and similar multi-select controls.
|
|
27
|
+
*
|
|
28
|
+
* Uses an inset box-shadow for the active ring instead of `border` so the
|
|
29
|
+
* chip size stays stable across states and the ring cannot be clipped by
|
|
30
|
+
* parent `overflow-hidden` containers.
|
|
31
|
+
*
|
|
32
|
+
* @group Interactive components
|
|
33
|
+
*/
|
|
34
|
+
export declare const FilterChip: React.ForwardRefExoticComponent<FilterChipProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -4,4 +4,4 @@ export type LoadingButtonProps<P extends React.ElementType> = ButtonProps<P> & {
|
|
|
4
4
|
startIcon?: React.ReactNode;
|
|
5
5
|
loading?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare function LoadingButton<P extends React.ElementType = "button">({ children, loading, disabled, onClick, startIcon, ...props }: LoadingButtonProps<P>):
|
|
7
|
+
export declare function LoadingButton<P extends React.ElementType = "button">({ children, loading, disabled, onClick, startIcon, ...props }: LoadingButtonProps<P>): React.JSX.Element;
|
|
@@ -20,4 +20,4 @@ export type MenuItemProps = {
|
|
|
20
20
|
onClick?: (event: React.MouseEvent) => void;
|
|
21
21
|
className?: string;
|
|
22
22
|
};
|
|
23
|
-
export declare const MenuItem: React.MemoExoticComponent<({ children, dense, disabled, onClick, className }: MenuItemProps) =>
|
|
23
|
+
export declare const MenuItem: React.MemoExoticComponent<({ children, dense, disabled, onClick, className }: MenuItemProps) => React.JSX.Element>;
|
|
@@ -3,19 +3,19 @@ export declare function Menubar({ children, onSelect, className }: {
|
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
onSelect?: (event: React.SyntheticEvent) => void;
|
|
5
5
|
className?: string;
|
|
6
|
-
}):
|
|
6
|
+
}): React.JSX.Element;
|
|
7
7
|
export declare function MenubarMenu({ children }: {
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
-
}):
|
|
9
|
+
}): React.JSX.Element;
|
|
10
10
|
export declare function MenubarTrigger({ children, onSelect, className }: {
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
onSelect?: (event: React.SyntheticEvent) => void;
|
|
13
13
|
className?: string;
|
|
14
|
-
}):
|
|
14
|
+
}): React.JSX.Element;
|
|
15
15
|
export declare function MenubarPortal({ children, portalContainer }: {
|
|
16
16
|
children: React.ReactNode;
|
|
17
17
|
portalContainer?: HTMLElement | null;
|
|
18
|
-
}):
|
|
18
|
+
}): React.JSX.Element;
|
|
19
19
|
export declare function MenubarContent({ children, className, align, sideOffset, alignOffset, onSelect, ...rest }: {
|
|
20
20
|
children: React.ReactNode;
|
|
21
21
|
className?: string;
|
|
@@ -23,58 +23,58 @@ export declare function MenubarContent({ children, className, align, sideOffset,
|
|
|
23
23
|
align?: "start" | "center" | "end";
|
|
24
24
|
sideOffset?: number;
|
|
25
25
|
alignOffset?: number;
|
|
26
|
-
}):
|
|
26
|
+
}): React.JSX.Element;
|
|
27
27
|
export declare function MenubarItem({ children, leftPadding, className, disabled, onSelect, ...rest }: {
|
|
28
28
|
children: React.ReactNode;
|
|
29
29
|
onSelect?: (event: Event) => void;
|
|
30
30
|
leftPadding?: boolean;
|
|
31
31
|
className?: string;
|
|
32
32
|
disabled?: boolean;
|
|
33
|
-
}):
|
|
33
|
+
}): React.JSX.Element;
|
|
34
34
|
export declare function MenubarSeparator({ children, className, ...rest }: {
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
className?: string;
|
|
37
|
-
}):
|
|
37
|
+
}): React.JSX.Element;
|
|
38
38
|
export declare function MenubarSub({ children, ...rest }: {
|
|
39
39
|
children?: React.ReactNode;
|
|
40
|
-
}):
|
|
40
|
+
}): React.JSX.Element;
|
|
41
41
|
export declare function MenubarSubTrigger({ children, className, onSelect, ...rest }: {
|
|
42
42
|
children?: React.ReactNode;
|
|
43
43
|
onSelect?: (event: React.SyntheticEvent) => void;
|
|
44
44
|
className?: string;
|
|
45
|
-
}):
|
|
45
|
+
}): React.JSX.Element;
|
|
46
46
|
export declare function MenubarSubContent({ children, alignOffset, className, onSelect, ...rest }: {
|
|
47
47
|
children?: React.ReactNode;
|
|
48
48
|
onSelect?: (event: React.SyntheticEvent) => void;
|
|
49
49
|
alignOffset?: number;
|
|
50
50
|
className?: string;
|
|
51
|
-
}):
|
|
51
|
+
}): React.JSX.Element;
|
|
52
52
|
export declare function MenubarCheckboxItem({ children, checked, onCheckedChange, className, onSelect, ...rest }: {
|
|
53
53
|
children?: React.ReactNode;
|
|
54
54
|
onSelect?: (event: Event) => void;
|
|
55
55
|
checked?: boolean;
|
|
56
56
|
onCheckedChange?: () => void;
|
|
57
57
|
className?: string;
|
|
58
|
-
}):
|
|
58
|
+
}): React.JSX.Element;
|
|
59
59
|
export declare function MenubarItemIndicator({ children, className, ...rest }: {
|
|
60
60
|
children?: React.ReactNode;
|
|
61
61
|
className?: string;
|
|
62
|
-
}):
|
|
62
|
+
}): React.JSX.Element;
|
|
63
63
|
export declare function MenubarRadioGroup({ children, className, value, onValueChange, onSelect, ...rest }: {
|
|
64
64
|
children?: React.ReactNode;
|
|
65
65
|
onSelect?: (event: React.SyntheticEvent) => void;
|
|
66
66
|
value?: string;
|
|
67
67
|
onValueChange?: (value: string) => void;
|
|
68
68
|
className?: string;
|
|
69
|
-
}):
|
|
69
|
+
}): React.JSX.Element;
|
|
70
70
|
export declare function MenubarRadioItem({ children, className, value, onSelect, ...rest }: {
|
|
71
71
|
children?: React.ReactNode;
|
|
72
72
|
onSelect?: (event: Event) => void;
|
|
73
73
|
value: string;
|
|
74
74
|
className?: string;
|
|
75
|
-
}):
|
|
75
|
+
}): React.JSX.Element;
|
|
76
76
|
export declare function MenubarShortcut({ children, className, ...rest }: {
|
|
77
77
|
children?: React.ReactNode;
|
|
78
78
|
className?: string;
|
|
79
|
-
}):
|
|
80
|
-
export declare function MenubarSubTriggerIndicator():
|
|
79
|
+
}): React.JSX.Element;
|
|
80
|
+
export declare function MenubarSubTriggerIndicator(): React.JSX.Element;
|
|
@@ -44,5 +44,5 @@ export interface MultiSelectItemProps<T extends MultiSelectValue = string> {
|
|
|
44
44
|
children?: React.ReactNode;
|
|
45
45
|
className?: string;
|
|
46
46
|
}
|
|
47
|
-
export declare const MultiSelectItem: React.MemoExoticComponent<(<T extends MultiSelectValue = string>({ children, value, className }: MultiSelectItemProps<T>) =>
|
|
47
|
+
export declare const MultiSelectItem: React.MemoExoticComponent<(<T extends MultiSelectValue = string>({ children, value, className }: MultiSelectItemProps<T>) => React.JSX.Element)>;
|
|
48
48
|
export {};
|
|
@@ -21,4 +21,4 @@ export interface PopoverProps {
|
|
|
21
21
|
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
|
22
22
|
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
|
23
23
|
}
|
|
24
|
-
export declare function Popover({ trigger, children, open, onOpenChange, side, sideOffset, align, alignOffset, arrowPadding, sticky, hideWhenDetached, avoidCollisions, enabled, modal, portalContainer, className, onMouseEnter, onMouseLeave }: PopoverProps):
|
|
24
|
+
export declare function Popover({ trigger, children, open, onOpenChange, side, sideOffset, align, alignOffset, arrowPadding, sticky, hideWhenDetached, avoidCollisions, enabled, modal, portalContainer, className, onMouseEnter, onMouseLeave }: PopoverProps): React.JSX.Element;
|
|
@@ -15,4 +15,4 @@ export type ResizablePanelsProps = {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
stacked?: boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare function ResizablePanels({ firstPanel, secondPanel, showFirstPanel, showSecondPanel, panelSizePercent, onPanelSizeChange, minPanelSizePx, orientation, animateLayout, className, stacked }: ResizablePanelsProps):
|
|
18
|
+
export declare function ResizablePanels({ firstPanel, secondPanel, showFirstPanel, showSecondPanel, panelSizePercent, onPanelSizeChange, minPanelSizePx, orientation, animateLayout, className, stacked }: ResizablePanelsProps): React.JSX.Element;
|
|
@@ -17,6 +17,10 @@ interface SearchBarProps {
|
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
loading?: boolean;
|
|
19
19
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
20
|
+
/**
|
|
21
|
+
* Optional initial value for the search input, e.g. from URL params.
|
|
22
|
+
*/
|
|
23
|
+
initialValue?: string;
|
|
20
24
|
}
|
|
21
|
-
export declare function SearchBar({ onClick, onTextSearch, placeholder, expandable, size, innerClassName, className, autoFocus, disabled, loading, inputRef }: SearchBarProps):
|
|
25
|
+
export declare function SearchBar({ onClick, onTextSearch, placeholder, expandable, size, innerClassName, className, autoFocus, disabled, loading, inputRef, initialValue }: SearchBarProps): React.JSX.Element;
|
|
22
26
|
export {};
|
|
@@ -34,10 +34,10 @@ export type SelectItemProps<T extends SelectValue = string> = {
|
|
|
34
34
|
disabled?: boolean;
|
|
35
35
|
className?: string;
|
|
36
36
|
};
|
|
37
|
-
export declare const SelectItem: React.MemoExoticComponent<(<T extends SelectValue = string>({ value, children, disabled, className }: SelectItemProps<T>) =>
|
|
37
|
+
export declare const SelectItem: React.MemoExoticComponent<(<T extends SelectValue = string>({ value, children, disabled, className }: SelectItemProps<T>) => React.JSX.Element)>;
|
|
38
38
|
export type SelectGroupProps = {
|
|
39
39
|
label: React.ReactNode;
|
|
40
40
|
children: React.ReactNode;
|
|
41
41
|
className?: string;
|
|
42
42
|
};
|
|
43
|
-
export declare const SelectGroup: React.
|
|
43
|
+
export declare const SelectGroup: React.MemoExoticComponent<({ label, children, className }: SelectGroupProps) => React.JSX.Element>;
|