@firecms/ui 3.0.0-canary.16 → 3.0.0-canary.160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -150
- package/dist/components/Avatar.d.ts +1 -0
- package/dist/components/BooleanSwitch.d.ts +1 -1
- package/dist/components/BooleanSwitchWithLabel.d.ts +4 -1
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/CenteredView.d.ts +4 -2
- package/dist/components/Checkbox.d.ts +3 -2
- package/dist/components/Chip.d.ts +3 -2
- package/dist/components/DateTimeField.d.ts +5 -7
- package/dist/components/Dialog.d.ts +4 -1
- package/dist/components/DialogContent.d.ts +2 -1
- package/dist/components/DialogTitle.d.ts +10 -0
- package/dist/components/ExpandablePanel.d.ts +2 -1
- package/dist/components/FileUpload.d.ts +2 -2
- package/dist/components/InputLabel.d.ts +2 -2
- package/dist/components/Label.d.ts +4 -1
- package/dist/components/Markdown.d.ts +1 -0
- package/dist/components/Menu.d.ts +6 -2
- package/dist/components/Menubar.d.ts +79 -0
- package/dist/components/MultiSelect.d.ts +32 -16
- package/dist/components/Popover.d.ts +2 -1
- package/dist/components/RadioGroup.d.ts +26 -3
- package/dist/components/Select.d.ts +8 -11
- package/dist/components/Separator.d.ts +2 -1
- package/dist/components/Sheet.d.ts +6 -0
- package/dist/components/Slider.d.ts +21 -0
- package/dist/components/Table.d.ts +10 -10
- package/dist/components/Tabs.d.ts +4 -2
- package/dist/components/TextField.d.ts +1 -1
- package/dist/components/TextareaAutosize.d.ts +3 -34
- package/dist/components/Tooltip.d.ts +6 -2
- package/dist/components/Typography.d.ts +5 -4
- package/dist/components/index.d.ts +3 -1
- package/dist/hooks/index.d.ts +3 -0
- package/dist/icons/Icon.d.ts +3 -3
- package/dist/index.css +73 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +50174 -20590
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +50441 -857
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.d.ts +9 -9
- package/dist/util/{cn.d.ts → cls.d.ts} +4 -0
- package/dist/util/index.d.ts +1 -3
- package/package.json +119 -118
- package/src/components/Alert.tsx +4 -4
- package/src/components/Autocomplete.tsx +7 -5
- package/src/components/Avatar.tsx +41 -26
- package/src/components/Badge.tsx +2 -2
- package/src/components/BooleanSwitch.tsx +14 -13
- package/src/components/BooleanSwitchWithLabel.tsx +17 -8
- package/src/components/Button.tsx +31 -23
- package/src/components/Card.tsx +4 -3
- package/src/components/CenteredView.tsx +26 -15
- package/src/components/Checkbox.tsx +16 -14
- package/src/components/Chip.tsx +13 -10
- package/src/components/CircularProgress.tsx +3 -3
- package/src/components/Collapse.tsx +4 -2
- package/src/components/Container.tsx +3 -2
- package/src/components/DateTimeField.tsx +144 -921
- package/src/components/DebouncedTextField.tsx +1 -0
- package/src/components/Dialog.tsx +17 -7
- package/src/components/DialogActions.tsx +3 -3
- package/src/components/DialogContent.tsx +7 -3
- package/src/components/DialogTitle.tsx +41 -0
- package/src/components/ExpandablePanel.tsx +20 -12
- package/src/components/FileUpload.tsx +11 -13
- package/src/components/IconButton.tsx +7 -11
- package/src/components/InfoLabel.tsx +2 -2
- package/src/components/InputLabel.tsx +12 -9
- package/src/components/Label.tsx +18 -4
- package/src/components/Markdown.tsx +15 -3
- package/src/components/Menu.tsx +50 -31
- package/src/components/Menubar.tsx +322 -0
- package/src/components/MultiSelect.tsx +341 -167
- package/src/components/Paper.tsx +2 -2
- package/src/components/Popover.tsx +19 -15
- package/src/components/RadioGroup.tsx +42 -9
- package/src/components/SearchBar.tsx +12 -11
- package/src/components/Select.tsx +142 -130
- package/src/components/Separator.tsx +10 -4
- package/src/components/Sheet.tsx +53 -31
- package/src/components/Skeleton.tsx +9 -6
- package/src/components/Slider.tsx +110 -0
- package/src/components/Table.tsx +54 -35
- package/src/components/Tabs.tsx +17 -15
- package/src/components/TextField.tsx +25 -23
- package/src/components/TextareaAutosize.tsx +4 -3
- package/src/components/Tooltip.tsx +33 -16
- package/src/components/Typography.tsx +42 -26
- package/src/components/common/SelectInputLabel.tsx +3 -3
- package/src/components/index.tsx +3 -1
- package/src/hooks/index.ts +3 -0
- package/src/{util → hooks}/useDebounceValue.tsx +2 -0
- package/src/{util → hooks}/useInjectStyles.tsx +1 -0
- package/src/{util → hooks}/useOutsideAlerter.tsx +2 -0
- package/src/icons/Icon.tsx +48 -43
- package/src/icons/icon_keys.ts +114 -1301
- package/src/index.css +73 -0
- package/src/index.ts +1 -0
- package/src/scripts/generateIconKeys.ts +20 -11
- package/src/styles.ts +9 -9
- package/src/util/cls.ts +14 -0
- package/src/util/index.ts +1 -3
- package/tailwind.config.js +42 -26
- package/dist/components/Spinner.d.ts +0 -1
- package/src/components/Spinner.tsx +0 -18
- package/src/util/cn.ts +0 -6
- /package/dist/{util → hooks}/useDebounceValue.d.ts +0 -0
- /package/dist/{util → hooks}/useInjectStyles.d.ts +0 -0
- /package/dist/{util → hooks}/useOutsideAlerter.d.ts +0 -0
package/README.md
CHANGED
@@ -1,174 +1,84 @@
|
|
1
|
-
|
2
|
-
<img src="https://firecms.co/img/dark_mode.webp" alt="Intro video" style="max-width: 100%;"/>
|
3
|
-
</p>
|
1
|
+
## FireCMS UI
|
4
2
|
|
5
|
-
<p align="center">
|
6
|
-
<a href="https://firecms.co">
|
7
|
-
<img src="https://firecms.co/img/logo_small.png" width="240px" alt="FireCMS logo" />
|
8
|
-
</a>
|
9
|
-
</p>
|
10
3
|
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
**FireCMS 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 FireCMS views, or in any other React application. You just need to install
|
6
|
+
`tailwindcss` and the `@firecms/ui` package.
|
14
7
|
|
15
|
-
|
8
|
+
### Why build this UI kit?
|
9
|
+
FireCMS 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 FireCMS.
|
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.
|
16
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
17
|
|
18
|
-
|
18
|
+
See the full list of components in https://firecms.co/docs/components
|
19
19
|
|
20
|
-
Designed by developers for developers, FireCMS is a headless CMS and admin panel
|
21
|
-
that seamlessly integrates with **Firebase and Firestore** by default, but is
|
22
|
-
also
|
23
|
-
compatible with any backend.
|
24
20
|
|
25
|
-
|
26
|
-
simple
|
27
|
-
to set up for standard cases and easy to extend and customize for more specific
|
28
|
-
needs.
|
21
|
+
> All the components are exported from the `@firecms/ui` package. These are the same components used internally in **FireCMS**.
|
29
22
|
|
30
|
-
Built to produce collection and form views that naturally align with the
|
31
|
-
collection/document model, FireCMS covers a wide range of basic and advanced use
|
32
|
-
cases. With extensibility in mind, it's easy to create your own views or modify
|
33
|
-
existing ones.
|
34
23
|
|
35
|
-
|
36
|
-
out-of-the-box experience for any project.
|
24
|
+
## Installation
|
37
25
|
|
38
|
-
|
26
|
+
If you are using FireCMS, you don't need to install this package, as it is already included, and
|
27
|
+
configured for you.
|
39
28
|
|
40
|
-
|
29
|
+
To use the components in your own project, you need to install the `@firecms/ui` package:
|
41
30
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
31
|
+
```bash
|
32
|
+
yarn add @firecms/ui
|
33
|
+
```
|
34
|
+
or
|
35
|
+
```bash
|
36
|
+
npm install @firecms/ui
|
37
|
+
```
|
46
38
|
|
47
|
-
|
39
|
+
You also need to install `tailwindcss`:
|
48
40
|
|
49
|
-
|
50
|
-
|
41
|
+
```bash
|
42
|
+
yarn add tailwindcss @tailwindcss/typography
|
43
|
+
```
|
51
44
|
|
52
|
-
|
45
|
+
And initialize it in your project:
|
53
46
|
|
54
|
-
|
47
|
+
```bash
|
48
|
+
npx tailwindcss init
|
49
|
+
```
|
55
50
|
|
56
|
-
|
51
|
+
And add then add the fireCMS preset in your `tailwind.config.js`:
|
57
52
|
|
58
|
-
|
53
|
+
```javascript
|
54
|
+
import fireCMSConfig from "@firecms/ui/tailwind.config.js";
|
59
55
|
|
60
|
-
|
56
|
+
export default {
|
57
|
+
presets: [fireCMSConfig],
|
58
|
+
content: [
|
59
|
+
"./index.html",
|
60
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
61
|
+
"./node_modules/firecms/src/**/*.{js,ts,jsx,tsx}",
|
62
|
+
"./node_modules/@firecms/**/src/**/*.{js,ts,jsx,tsx}"
|
63
|
+
]
|
64
|
+
};
|
65
|
+
```
|
66
|
+
(You might need to adjust the paths in the `content` array to match your project structure)
|
61
67
|
|
62
|
-
|
68
|
+
Finally, you need to define your primary and secondary colors in your `index.css` file:
|
63
69
|
|
64
|
-
|
70
|
+
```css
|
71
|
+
@import "@firecms/ui/index.css";
|
65
72
|
|
66
|
-
|
73
|
+
@tailwind base;
|
74
|
+
@tailwind components;
|
75
|
+
@tailwind utilities;
|
67
76
|
|
68
|
-
|
69
|
-
|
70
|
-
|
77
|
+
:root {
|
78
|
+
--fcms-primary: #0070F4;
|
79
|
+
--fcms-primary-dark: #0061e6;
|
80
|
+
--fcms-primary-bg: #0061e610;
|
81
|
+
--fcms-secondary: #FF5B79;
|
82
|
+
}
|
83
|
+
```
|
71
84
|
|
72
|
-
### 🏓 Exceptional Spreadsheet View
|
73
|
-
|
74
|
-
We've developed a highly efficient windowed **spreadsheet view** for
|
75
|
-
collections, allowing inline editing for most common fields, as well as popup
|
76
|
-
views for other cases and your custom field implementations.
|
77
|
-
|
78
|
-
Featuring **real-time** support, FireCMS is perfect for apps that require
|
79
|
-
constant updates. It also supports **text search** (through an external provider
|
80
|
-
like Algolia, if using Firestore), **filtering and sorting**, and **exporting**
|
81
|
-
data.
|
82
|
-
|
83
|
-
### ✨ Robust Forms
|
84
|
-
|
85
|
-

|
86
|
-
|
87
|
-
When editing an entity, FireCMS offers a nested system of side dialogs for
|
88
|
-
navigating through **subcollections** and accessing custom views (such as custom
|
89
|
-
forms or blog previews). This functionality can also be accessed
|
90
|
-
programmatically using the `useSideEntityController` hook.
|
91
|
-
|
92
|
-
FireCMS includes **over 15 built-in fields** with numerous customization and
|
93
|
-
validation options. The components have been carefully designed for an
|
94
|
-
outstanding user experience, including advanced features like **references** to
|
95
|
-
other collections, **markdown**, and **array reordering**.
|
96
|
-
|
97
|
-
For unsupported use cases, create your own **custom field** as a React
|
98
|
-
component.
|
99
|
-
|
100
|
-
FireCMS also supports **conditional fields** in forms, allowing you to define
|
101
|
-
rules for active fields based on your logic.
|
102
|
-
|
103
|
-
### 👮 Authentication, Permissions, and Role System
|
104
|
-
|
105
|
-
Define which navigation views users can see and the operations (create, edit,
|
106
|
-
delete) they can perform based on your role system. You can even configure this
|
107
|
-
on a per-entity or collection level.
|
108
|
-
|
109
|
-
By default, FireCMS supports all Firebase authorization mechanisms, but you can
|
110
|
-
implement your own.
|
111
|
-
|
112
|
-
### 🏹 Relational Support
|
113
|
-
|
114
|
-
Define references to entities in other collections and benefit from the
|
115
|
-
integrated reference fields and shortcuts.
|
116
|
-
|
117
|
-
You can also define subcollections at the entity level for nesting data in a
|
118
|
-
collection/document/collection model.
|
119
|
-
|
120
|
-
### 🆒 Real-Time Data
|
121
|
-
|
122
|
-
Every view in the CMS supports real-time data, making it suitable for displaying
|
123
|
-
constantly updated information.
|
124
|
-
|
125
|
-
Forms also support this feature, with any modified value in the database being
|
126
|
-
updated in any open form view as long as it hasn't been touched by the user.
|
127
|
-
This enables advanced cases where a Cloud Function is triggered after saving an
|
128
|
-
entity, modifying some values, and requiring real-time updates.
|
129
|
-
|
130
|
-
### 🗂️ File Storage
|
131
|
-
|
132
|
-
FireCMS supports uploading files to Firebase Storage out of the box and provides
|
133
|
-
specific fields for handling single and multiple file uploads, as well as
|
134
|
-
reordering.
|
135
|
-
|
136
|
-
You can replace the Firebase Storage implementation with your own.
|
137
|
-
|
138
|
-
## Included example
|
139
|
-
|
140
|
-
You can access the code for the demo project under
|
141
|
-
[`example`](https://github.com/FireCMSco/firecms/tree/master/example). It includes
|
142
|
-
every feature provided by this CMS.
|
143
|
-
|
144
|
-
Keep in mind you need to update the dependencies in that project if you want to
|
145
|
-
use it as it is, without linking it to the library source code. More details in
|
146
|
-
its README
|
147
|
-
|
148
|
-
## Contact and support
|
149
|
-
|
150
|
-
If you need general support, you can open a GitHub issue.
|
151
|
-
|
152
|
-
Do you need consulting setting up your Firestore-based CMS in no time? We are
|
153
|
-
happy to help!
|
154
|
-
`hello@firecms.co`
|
155
|
-
|
156
|
-
## Development
|
157
|
-
|
158
|
-
If you would like to make changes to the source, feel free to submit a PR!
|
159
|
-
|
160
|
-
When developing, the core library can be found under `lib`.
|
161
|
-
There is an example project in the folder `example`.
|
162
|
-
|
163
|
-
In order to run the project, you need to create a file
|
164
|
-
called `firebase_config.ts`
|
165
|
-
in `example/src`.
|
166
|
-
|
167
|
-
That file needs to export a valid Firebase config, that you can get
|
168
|
-
from your Firebase console when creating a webapp for your project.
|
169
|
-
|
170
|
-
Then simply run `yarn` and `yarn dev`
|
171
|
-
|
172
|
-
## License
|
173
|
-
|
174
|
-
MIT © [FireCMS](https://github.com/FireCMSco)
|
@@ -4,6 +4,7 @@ export interface AvatarProps {
|
|
4
4
|
alt?: string;
|
5
5
|
children?: React.ReactNode;
|
6
6
|
className?: string;
|
7
|
+
outerClassName?: string;
|
7
8
|
style?: React.CSSProperties;
|
8
9
|
}
|
9
10
|
export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLButtonElement>>;
|
@@ -6,9 +6,12 @@ export type BooleanSwitchWithLabelProps = BooleanSwitchProps & {
|
|
6
6
|
label?: React.ReactNode;
|
7
7
|
error?: boolean;
|
8
8
|
autoFocus?: boolean;
|
9
|
+
fullWidth?: boolean;
|
10
|
+
className?: string;
|
11
|
+
inputClassName?: string;
|
9
12
|
};
|
10
13
|
/**
|
11
14
|
* Simple boolean switch.
|
12
15
|
*
|
13
16
|
*/
|
14
|
-
export declare const BooleanSwitchWithLabel: ({ value, position, invisible, onValueChange, error, label, autoFocus, disabled, size, ...props }: BooleanSwitchWithLabelProps) => import("react/jsx-runtime").JSX.Element;
|
17
|
+
export declare const BooleanSwitchWithLabel: ({ value, position, invisible, onValueChange, error, label, autoFocus, disabled, size, className, fullWidth, inputClassName, ...props }: BooleanSwitchWithLabelProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from "react";
|
2
2
|
export type ButtonProps<P extends React.ElementType> = Omit<(P extends "button" ? React.ButtonHTMLAttributes<HTMLButtonElement> : React.ComponentProps<P>), "onClick"> & {
|
3
|
-
variant?: "filled" | "outlined" | "text";
|
3
|
+
variant?: "filled" | "neutral" | "outlined" | "text";
|
4
4
|
disabled?: boolean;
|
5
5
|
color?: "primary" | "secondary" | "text" | "error";
|
6
6
|
size?: "small" | "medium" | "large" | "xl" | "2xl";
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import React from "react";
|
2
|
-
export
|
2
|
+
export type CenteredViewProps = {
|
3
3
|
children: React.ReactNode;
|
4
4
|
maxWidth?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
|
5
|
+
outerClassName?: string;
|
5
6
|
className?: string;
|
6
7
|
fullScreen?: boolean;
|
7
|
-
}
|
8
|
+
};
|
9
|
+
export declare const CenteredView: React.ForwardRefExoticComponent<CenteredViewProps & React.RefAttributes<HTMLDivElement>>;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
export interface CheckboxProps {
|
2
2
|
checked: boolean;
|
3
|
+
id?: string;
|
3
4
|
disabled?: boolean;
|
4
5
|
indeterminate?: boolean;
|
5
6
|
onCheckedChange?: (checked: boolean) => void;
|
6
7
|
padding?: boolean;
|
7
|
-
size?: "
|
8
|
+
size?: "smallest" | "small" | "medium" | "large";
|
8
9
|
color?: "primary" | "secondary";
|
9
10
|
}
|
10
|
-
export declare const Checkbox: ({ checked, indeterminate, padding, disabled, size, onCheckedChange, color }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
11
|
+
export declare const Checkbox: ({ id, checked, indeterminate, padding, disabled, size, onCheckedChange, color }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -8,14 +8,15 @@ export type ChipColorKey = keyof typeof CHIP_COLORS;
|
|
8
8
|
export interface ChipProps {
|
9
9
|
className?: string;
|
10
10
|
children: React.ReactNode;
|
11
|
-
size?: "
|
11
|
+
size?: "small" | "medium" | "large";
|
12
12
|
colorScheme?: ChipColorScheme | ChipColorKey;
|
13
13
|
error?: boolean;
|
14
14
|
outlined?: boolean;
|
15
15
|
onClick?: () => void;
|
16
16
|
icon?: React.ReactNode;
|
17
|
+
style?: React.CSSProperties;
|
17
18
|
}
|
18
19
|
/**
|
19
20
|
* @group Preview components
|
20
21
|
*/
|
21
|
-
export declare function Chip({ children, colorScheme, error, outlined, onClick, icon, size, className }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
22
|
+
export declare function Chip({ children, colorScheme, error, outlined, onClick, icon, size, className, style }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
@@ -1,19 +1,17 @@
|
|
1
1
|
import React from "react";
|
2
|
-
|
3
|
-
value?: Date;
|
4
|
-
onChange
|
2
|
+
export type DateTimeFieldProps = {
|
3
|
+
value?: Date | null;
|
4
|
+
onChange?: (date: Date | null) => void;
|
5
5
|
mode?: "date" | "date_time";
|
6
6
|
disabled?: boolean;
|
7
7
|
clearable?: boolean;
|
8
8
|
error?: boolean;
|
9
|
-
size
|
9
|
+
size?: "medium" | "large";
|
10
10
|
label?: React.ReactNode;
|
11
11
|
className?: string;
|
12
12
|
style?: React.CSSProperties;
|
13
13
|
inputClassName?: string;
|
14
14
|
invisible?: boolean;
|
15
|
-
preventOpenOnFocus?: boolean;
|
16
15
|
locale?: string;
|
17
|
-
}
|
16
|
+
};
|
18
17
|
export declare const DateTimeField: React.FC<DateTimeFieldProps>;
|
19
|
-
export {};
|
@@ -11,6 +11,9 @@ export type DialogProps = {
|
|
11
11
|
maxWidth?: keyof typeof widthClasses;
|
12
12
|
modal?: boolean;
|
13
13
|
onOpenAutoFocus?: (e: Event) => void;
|
14
|
+
onEscapeKeyDown?: (e: KeyboardEvent) => void;
|
15
|
+
onPointerDownOutside?: (e: Event) => void;
|
16
|
+
onInteractOutside?: (e: Event) => void;
|
14
17
|
};
|
15
18
|
declare const widthClasses: {
|
16
19
|
xs: string;
|
@@ -26,5 +29,5 @@ declare const widthClasses: {
|
|
26
29
|
"7xl": string;
|
27
30
|
full: string;
|
28
31
|
};
|
29
|
-
export declare const Dialog: ({ open, onOpenChange, children, className, fullWidth, fullHeight, fullScreen, scrollable, maxWidth, modal, onOpenAutoFocus }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
32
|
+
export declare const Dialog: ({ open, onOpenChange, children, className, fullWidth, fullHeight, fullScreen, scrollable, maxWidth, modal, onOpenAutoFocus, onEscapeKeyDown, onPointerDownOutside, onInteractOutside }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
30
33
|
export {};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
|
-
export declare function DialogContent({ children, className, fullHeight }: {
|
2
|
+
export declare function DialogContent({ children, className, fullHeight, includeMargin }: {
|
3
3
|
children: React.ReactNode;
|
4
|
+
includeMargin?: boolean;
|
4
5
|
fullHeight?: boolean;
|
5
6
|
className?: string;
|
6
7
|
}): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { TypographyProps, TypographyVariant } from "./Typography";
|
3
|
+
export type DialogContentProps = TypographyProps & {
|
4
|
+
children: React.ReactNode;
|
5
|
+
hidden?: boolean;
|
6
|
+
className?: string;
|
7
|
+
includeMargin?: boolean;
|
8
|
+
variant?: TypographyVariant;
|
9
|
+
};
|
10
|
+
export declare function DialogTitle({ children, hidden, className, variant, gutterBottom, includeMargin, ...props }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { PropsWithChildren } from "react";
|
2
|
-
export declare function ExpandablePanel({ title, children, invisible, expanded, onExpandedChange, initiallyExpanded, titleClassName, asField, className }: PropsWithChildren<{
|
2
|
+
export declare function ExpandablePanel({ title, children, invisible, expanded, onExpandedChange, initiallyExpanded, titleClassName, asField, className, innerClassName }: PropsWithChildren<{
|
3
3
|
title: React.ReactNode;
|
4
4
|
invisible?: boolean;
|
5
5
|
initiallyExpanded?: boolean;
|
@@ -8,4 +8,5 @@ export declare function ExpandablePanel({ title, children, invisible, expanded,
|
|
8
8
|
titleClassName?: string;
|
9
9
|
asField?: boolean;
|
10
10
|
className?: string;
|
11
|
+
innerClassName?: string;
|
11
12
|
}>): import("react/jsx-runtime").JSX.Element;
|
@@ -5,7 +5,7 @@ export interface FileUploadError {
|
|
5
5
|
}
|
6
6
|
export type OnFileUploadRejected = (fileRejections: {
|
7
7
|
file: File;
|
8
|
-
errors: FileUploadError[];
|
8
|
+
errors: readonly FileUploadError[];
|
9
9
|
}[], event: object) => void;
|
10
10
|
export type OnFilesUploadAdded = (files: File[]) => void;
|
11
11
|
export type FileUploadProps = {
|
@@ -18,6 +18,6 @@ export type FileUploadProps = {
|
|
18
18
|
title?: React.ReactNode;
|
19
19
|
uploadDescription?: React.ReactNode;
|
20
20
|
preventDropOnDocument?: boolean;
|
21
|
-
size?: "
|
21
|
+
size?: "medium" | "large";
|
22
22
|
};
|
23
23
|
export declare function FileUpload({ accept, onFilesAdded, onFilesRejected, maxSize, disabled, maxFiles, title, uploadDescription, children, preventDropOnDocument, size }: React.PropsWithChildren<FileUploadProps>): import("react/jsx-runtime").JSX.Element;
|
@@ -6,6 +6,6 @@ export type InputLabelProps = {
|
|
6
6
|
} & React.LabelHTMLAttributes<HTMLLabelElement>;
|
7
7
|
export declare const InputLabel: React.ForwardRefExoticComponent<{
|
8
8
|
children?: React.ReactNode;
|
9
|
-
className?: string
|
10
|
-
shrink?: boolean
|
9
|
+
className?: string;
|
10
|
+
shrink?: boolean;
|
11
11
|
} & React.LabelHTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLLabelElement>>;
|
@@ -1,4 +1,7 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
3
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> &
|
3
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & {
|
4
|
+
border?: boolean;
|
5
|
+
onClick?: React.MouseEventHandler<HTMLLabelElement>;
|
6
|
+
} & React.RefAttributes<HTMLLabelElement>>;
|
4
7
|
export { Label };
|
@@ -6,11 +6,15 @@ export type MenuProps = {
|
|
6
6
|
defaultOpen?: boolean;
|
7
7
|
onOpenChange?(open: boolean): void;
|
8
8
|
portalContainer?: HTMLElement | null;
|
9
|
+
side?: "top" | "right" | "bottom" | "left";
|
10
|
+
align?: "start" | "center" | "end";
|
9
11
|
};
|
10
|
-
|
12
|
+
declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLButtonElement>>;
|
13
|
+
export { Menu };
|
11
14
|
export type MenuItemProps = {
|
12
15
|
children: React.ReactNode;
|
13
16
|
dense?: boolean;
|
14
17
|
onClick?: (event: React.MouseEvent) => void;
|
15
18
|
};
|
16
|
-
export declare function MenuItem({ children, dense,
|
19
|
+
export declare function MenuItem({ children, dense, // Default value is false if not provided
|
20
|
+
onClick }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,79 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
export declare function Menubar({ children, onSelect, className }: {
|
3
|
+
children: React.ReactNode;
|
4
|
+
onSelect?: (event: React.SyntheticEvent) => void;
|
5
|
+
className?: string;
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
7
|
+
export declare function MenubarMenu({ children, }: {
|
8
|
+
children: React.ReactNode;
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
10
|
+
export declare function MenubarTrigger({ children, onSelect, className }: {
|
11
|
+
children: React.ReactNode;
|
12
|
+
onSelect?: (event: React.SyntheticEvent) => void;
|
13
|
+
className?: string;
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
15
|
+
export declare function MenubarPortal({ children, }: {
|
16
|
+
children: React.ReactNode;
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
18
|
+
export declare function MenubarContent({ children, className, align, sideOffset, alignOffset, onSelect, ...rest }: {
|
19
|
+
children: React.ReactNode;
|
20
|
+
className?: string;
|
21
|
+
onSelect?: (event: React.SyntheticEvent) => void;
|
22
|
+
align?: "start" | "center" | "end";
|
23
|
+
sideOffset?: number;
|
24
|
+
alignOffset?: number;
|
25
|
+
}): import("react/jsx-runtime").JSX.Element;
|
26
|
+
export declare function MenubarItem({ children, leftPadding, className, disabled, onSelect, ...rest }: {
|
27
|
+
children: React.ReactNode;
|
28
|
+
onSelect?: (event: Event) => void;
|
29
|
+
leftPadding?: boolean;
|
30
|
+
className?: string;
|
31
|
+
disabled?: boolean;
|
32
|
+
}): import("react/jsx-runtime").JSX.Element;
|
33
|
+
export declare function MenubarSeparator({ children, className, ...rest }: {
|
34
|
+
children?: React.ReactNode;
|
35
|
+
className?: string;
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
37
|
+
export declare function MenubarSub({ children, ...rest }: {
|
38
|
+
children?: React.ReactNode;
|
39
|
+
}): import("react/jsx-runtime").JSX.Element;
|
40
|
+
export declare function MenubarSubTrigger({ children, className, onSelect, ...rest }: {
|
41
|
+
children?: React.ReactNode;
|
42
|
+
onSelect?: (event: React.SyntheticEvent) => void;
|
43
|
+
className?: string;
|
44
|
+
}): import("react/jsx-runtime").JSX.Element;
|
45
|
+
export declare function MenubarSubContent({ children, alignOffset, className, onSelect, ...rest }: {
|
46
|
+
children?: React.ReactNode;
|
47
|
+
onSelect?: (event: React.SyntheticEvent) => void;
|
48
|
+
alignOffset?: number;
|
49
|
+
className?: string;
|
50
|
+
}): import("react/jsx-runtime").JSX.Element;
|
51
|
+
export declare function MenubarCheckboxItem({ children, checked, onCheckedChange, className, onSelect, ...rest }: {
|
52
|
+
children?: React.ReactNode;
|
53
|
+
onSelect?: (event: Event) => void;
|
54
|
+
checked?: boolean;
|
55
|
+
onCheckedChange?: () => void;
|
56
|
+
className?: string;
|
57
|
+
}): import("react/jsx-runtime").JSX.Element;
|
58
|
+
export declare function MenubarItemIndicator({ children, className, ...rest }: {
|
59
|
+
children?: React.ReactNode;
|
60
|
+
className?: string;
|
61
|
+
}): import("react/jsx-runtime").JSX.Element;
|
62
|
+
export declare function MenubarRadioGroup({ children, className, value, onValueChange, onSelect, ...rest }: {
|
63
|
+
children?: React.ReactNode;
|
64
|
+
onSelect?: (event: React.SyntheticEvent) => void;
|
65
|
+
value?: string;
|
66
|
+
onValueChange?: (value: string) => void;
|
67
|
+
className?: string;
|
68
|
+
}): import("react/jsx-runtime").JSX.Element;
|
69
|
+
export declare function MenubarRadioItem({ children, className, value, onSelect, ...rest }: {
|
70
|
+
children?: React.ReactNode;
|
71
|
+
onSelect?: (event: Event) => void;
|
72
|
+
value: string;
|
73
|
+
className?: string;
|
74
|
+
}): import("react/jsx-runtime").JSX.Element;
|
75
|
+
export declare function MenubarShortcut({ children, className, ...rest }: {
|
76
|
+
children?: React.ReactNode;
|
77
|
+
className?: string;
|
78
|
+
}): import("react/jsx-runtime").JSX.Element;
|
79
|
+
export declare function MenubarSubTriggerIndicator(): import("react/jsx-runtime").JSX.Element;
|
@@ -1,35 +1,51 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
|
2
|
+
import { ChangeEvent } from "react";
|
3
|
+
interface MultiSelectContextProps {
|
4
|
+
fieldValue?: string[];
|
5
|
+
onItemClick: (v: string) => void;
|
6
|
+
}
|
7
|
+
export declare const MultiSelectContext: React.Context<MultiSelectContextProps>;
|
8
|
+
/**
|
9
|
+
* Props for MultiSelect component
|
10
|
+
*/
|
11
|
+
interface MultiSelectProps {
|
12
|
+
/**
|
13
|
+
* The modality of the popover. When set to true, interaction with outside elements
|
14
|
+
* will be disabled and only popover content will be visible to screen readers.
|
15
|
+
* Optional, defaults to false.
|
16
|
+
*/
|
17
|
+
modalPopover?: boolean;
|
18
|
+
/**
|
19
|
+
* Additional class names to apply custom styles to the multi-select component.
|
20
|
+
* Optional, can be used to add custom styles.
|
21
|
+
*/
|
22
|
+
className?: string;
|
3
23
|
open?: boolean;
|
4
24
|
name?: string;
|
5
25
|
id?: string;
|
6
26
|
onOpenChange?: (open: boolean) => void;
|
7
27
|
value?: string[];
|
8
|
-
containerClassName?: string;
|
9
|
-
className?: string;
|
10
28
|
inputClassName?: string;
|
11
|
-
|
29
|
+
onChange?: React.EventHandler<ChangeEvent<HTMLSelectElement>>;
|
30
|
+
onValueChange?: (updatedValue: string[]) => void;
|
12
31
|
placeholder?: React.ReactNode;
|
13
|
-
renderValue?: (values: string, index: number) => React.ReactNode;
|
14
|
-
renderValues?: (values: string[]) => React.ReactNode;
|
15
32
|
size?: "small" | "medium";
|
16
|
-
|
33
|
+
useChips?: boolean;
|
34
|
+
label?: React.ReactNode | string;
|
17
35
|
disabled?: boolean;
|
18
36
|
error?: boolean;
|
19
37
|
position?: "item-aligned" | "popper";
|
20
38
|
endAdornment?: React.ReactNode;
|
39
|
+
multiple?: boolean;
|
40
|
+
includeSelectAll?: boolean;
|
41
|
+
includeClear?: boolean;
|
21
42
|
inputRef?: React.RefObject<HTMLButtonElement>;
|
22
43
|
padding?: boolean;
|
23
|
-
|
24
|
-
children
|
25
|
-
|
26
|
-
interface MultiSelectContextProps {
|
27
|
-
fieldValue?: string[];
|
28
|
-
setInputValue: (v: string) => void;
|
29
|
-
onValueChangeInternal: (v: string) => void;
|
44
|
+
invisible?: boolean;
|
45
|
+
children: React.ReactNode;
|
46
|
+
renderValues?: (values: string[]) => React.ReactNode;
|
30
47
|
}
|
31
|
-
export declare const
|
32
|
-
export declare function MultiSelect({ value, open, onMultiValueChange, size, label, disabled, renderValue, renderValues, includeFocusOutline, containerClassName, className, children, error }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
48
|
+
export declare const MultiSelect: React.ForwardRefExoticComponent<MultiSelectProps & React.RefAttributes<HTMLButtonElement>>;
|
33
49
|
export interface MultiSelectItemProps {
|
34
50
|
value: string;
|
35
51
|
children?: React.ReactNode;
|
@@ -17,5 +17,6 @@ export interface PopoverProps {
|
|
17
17
|
enabled?: boolean;
|
18
18
|
modal?: boolean;
|
19
19
|
className?: string;
|
20
|
+
portalContainer?: HTMLElement | null;
|
20
21
|
}
|
21
|
-
export declare function Popover({ trigger, children, open, onOpenChange, side, sideOffset, align, alignOffset, arrowPadding, sticky, hideWhenDetached, avoidCollisions, enabled, modal, className }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
22
|
+
export declare function Popover({ trigger, children, open, onOpenChange, side, sideOffset, align, alignOffset, arrowPadding, sticky, hideWhenDetached, avoidCollisions, enabled, modal, portalContainer, className }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|