@memori.ai/ui 1.0.0-alpha
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 +105 -0
- package/dist/components/Alert/Alert.d.ts +18 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +27 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/ButtonBase/ButtonBase.d.ts +28 -0
- package/dist/components/ButtonBase/index.d.ts +3 -0
- package/dist/components/Card/Card.d.ts +13 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +11 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +12 -0
- package/dist/components/ConfirmDialog/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.d.ts +32 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.d.ts +11 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Expandable/Expandable.d.ts +15 -0
- package/dist/components/Expandable/helpers.d.ts +3 -0
- package/dist/components/Expandable/index.d.ts +2 -0
- package/dist/components/InputBase/InputBase.d.ts +49 -0
- package/dist/components/InputBase/index.d.ts +3 -0
- package/dist/components/Modal/Modal.d.ts +16 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Slider/Slider.d.ts +12 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Spin/Spin.d.ts +9 -0
- package/dist/components/Spin/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +11 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/i18n/I18nWrapper.d.ts +6 -0
- package/dist/icons/AI.d.ts +5 -0
- package/dist/icons/Alert.d.ts +5 -0
- package/dist/icons/ArrowUp.d.ts +5 -0
- package/dist/icons/Bug.d.ts +5 -0
- package/dist/icons/Chat.d.ts +5 -0
- package/dist/icons/ChevronDown.d.ts +5 -0
- package/dist/icons/ChevronLeft.d.ts +5 -0
- package/dist/icons/ChevronRight.d.ts +5 -0
- package/dist/icons/ChevronUp.d.ts +5 -0
- package/dist/icons/Clear.d.ts +5 -0
- package/dist/icons/Close.d.ts +6 -0
- package/dist/icons/Code.d.ts +5 -0
- package/dist/icons/Copy.d.ts +5 -0
- package/dist/icons/DeepThought.d.ts +5 -0
- package/dist/icons/Delete.d.ts +5 -0
- package/dist/icons/Document.d.ts +5 -0
- package/dist/icons/Download.d.ts +5 -0
- package/dist/icons/Edit.d.ts +5 -0
- package/dist/icons/Expand.d.ts +5 -0
- package/dist/icons/Eye.d.ts +5 -0
- package/dist/icons/EyeInvisible.d.ts +5 -0
- package/dist/icons/Facebook.d.ts +5 -0
- package/dist/icons/Feedback.d.ts +5 -0
- package/dist/icons/File.d.ts +5 -0
- package/dist/icons/FileExcel.d.ts +5 -0
- package/dist/icons/FilePdf.d.ts +5 -0
- package/dist/icons/FileWord.d.ts +5 -0
- package/dist/icons/Fullscreen.d.ts +5 -0
- package/dist/icons/FullscreenExit.d.ts +5 -0
- package/dist/icons/Group.d.ts +5 -0
- package/dist/icons/History.d.ts +6 -0
- package/dist/icons/Image.d.ts +4 -0
- package/dist/icons/Info.d.ts +5 -0
- package/dist/icons/Link.d.ts +5 -0
- package/dist/icons/Linkedin.d.ts +5 -0
- package/dist/icons/Loading.d.ts +6 -0
- package/dist/icons/Logout.d.ts +5 -0
- package/dist/icons/Mail.d.ts +5 -0
- package/dist/icons/MapMarker.d.ts +5 -0
- package/dist/icons/MenuHorizontal.d.ts +6 -0
- package/dist/icons/MenuVertical.d.ts +6 -0
- package/dist/icons/Message.d.ts +5 -0
- package/dist/icons/Microphone.d.ts +5 -0
- package/dist/icons/Minus.d.ts +5 -0
- package/dist/icons/MinusCircle.d.ts +5 -0
- package/dist/icons/PaperClip.d.ts +5 -0
- package/dist/icons/Picture.d.ts +5 -0
- package/dist/icons/Plus.d.ts +5 -0
- package/dist/icons/Preview.d.ts +4 -0
- package/dist/icons/Print.d.ts +6 -0
- package/dist/icons/QuestionHelp.d.ts +5 -0
- package/dist/icons/Refresh.d.ts +5 -0
- package/dist/icons/SelectIcon.d.ts +5 -0
- package/dist/icons/Send.d.ts +5 -0
- package/dist/icons/Setting.d.ts +5 -0
- package/dist/icons/Share.d.ts +5 -0
- package/dist/icons/Sound.d.ts +5 -0
- package/dist/icons/SoundDeactivated.d.ts +5 -0
- package/dist/icons/Telegram.d.ts +5 -0
- package/dist/icons/ThumbDown.d.ts +5 -0
- package/dist/icons/ThumbUp.d.ts +5 -0
- package/dist/icons/Translation.d.ts +5 -0
- package/dist/icons/Twitter.d.ts +5 -0
- package/dist/icons/Upload.d.ts +4 -0
- package/dist/icons/User.d.ts +5 -0
- package/dist/icons/Warning.d.ts +5 -0
- package/dist/icons/WhatsApp.d.ts +5 -0
- package/dist/index.d.ts +13 -0
- package/dist/memori-ai-ui.css +2 -0
- package/dist/memori-ai-ui.es.js +6400 -0
- package/dist/memori-ai-ui.umd.js +23 -0
- package/package.json +97 -0
- package/src/components/Alert/Alert.css +95 -0
- package/src/components/Alert/Alert.stories.tsx +156 -0
- package/src/components/Alert/Alert.test.tsx +122 -0
- package/src/components/Alert/Alert.tsx +124 -0
- package/src/components/Alert/__snapshots__/Alert.test.tsx.snap +67 -0
- package/src/components/Alert/index.tsx +2 -0
- package/src/components/Button/Button.css +173 -0
- package/src/components/Button/Button.stories.tsx +173 -0
- package/src/components/Button/Button.test.tsx +80 -0
- package/src/components/Button/Button.tsx +104 -0
- package/src/components/Button/__snapshots__/Button.test.tsx.snap +204 -0
- package/src/components/Button/index.tsx +2 -0
- package/src/components/ButtonBase/ButtonBase.stories.tsx +194 -0
- package/src/components/ButtonBase/ButtonBase.tsx +84 -0
- package/src/components/ButtonBase/index.tsx +3 -0
- package/src/components/ButtonBase/styles.module.css +135 -0
- package/src/components/Card/Card.css +67 -0
- package/src/components/Card/Card.stories.tsx +104 -0
- package/src/components/Card/Card.test.tsx +67 -0
- package/src/components/Card/Card.tsx +58 -0
- package/src/components/Card/__snapshots__/Card.test.tsx.snap +321 -0
- package/src/components/Card/index.tsx +2 -0
- package/src/components/Checkbox/Checkbox.css +114 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +77 -0
- package/src/components/Checkbox/Checkbox.test.tsx +50 -0
- package/src/components/Checkbox/Checkbox.tsx +61 -0
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +131 -0
- package/src/components/Checkbox/index.tsx +2 -0
- package/src/components/ConfirmDialog/ConfirmDialog.css +44 -0
- package/src/components/ConfirmDialog/ConfirmDialog.stories.tsx +235 -0
- package/src/components/ConfirmDialog/ConfirmDialog.test.tsx +129 -0
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +73 -0
- package/src/components/ConfirmDialog/__snapshots__/ConfirmDialog.test.tsx.snap +11 -0
- package/src/components/ConfirmDialog/index.tsx +2 -0
- package/src/components/Details/Details.css +66 -0
- package/src/components/Details/Details.stories.tsx +67 -0
- package/src/components/Drawer/Drawer.css +210 -0
- package/src/components/Drawer/Drawer.stories.tsx +275 -0
- package/src/components/Drawer/Drawer.test.tsx +158 -0
- package/src/components/Drawer/Drawer.tsx +242 -0
- package/src/components/Drawer/__snapshots__/Drawer.test.tsx.snap +21 -0
- package/src/components/Drawer/index.tsx +2 -0
- package/src/components/Dropdown/Dropdown.css +177 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +73 -0
- package/src/components/Dropdown/Dropdown.test.tsx +88 -0
- package/src/components/Dropdown/Dropdown.tsx +88 -0
- package/src/components/Dropdown/__snapshots__/Dropdown.test.tsx.snap +141 -0
- package/src/components/Dropdown/index.tsx +2 -0
- package/src/components/Expandable/Expandable.css +15 -0
- package/src/components/Expandable/Expandable.stories.tsx +196 -0
- package/src/components/Expandable/Expandable.test.tsx +143 -0
- package/src/components/Expandable/Expandable.tsx +122 -0
- package/src/components/Expandable/__snapshots__/Expandable.test.tsx.snap +199 -0
- package/src/components/Expandable/helpers.ts +16 -0
- package/src/components/Expandable/index.tsx +2 -0
- package/src/components/InputBase/InputBase.stories.tsx +237 -0
- package/src/components/InputBase/InputBase.tsx +105 -0
- package/src/components/InputBase/index.tsx +3 -0
- package/src/components/InputBase/styles.module.css +96 -0
- package/src/components/Modal/Modal.css +95 -0
- package/src/components/Modal/Modal.stories.tsx +184 -0
- package/src/components/Modal/Modal.test.tsx +129 -0
- package/src/components/Modal/Modal.tsx +124 -0
- package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +17 -0
- package/src/components/Modal/index.tsx +2 -0
- package/src/components/Select/Select.css +134 -0
- package/src/components/Select/Select.stories.tsx +85 -0
- package/src/components/Select/Select.test.tsx +85 -0
- package/src/components/Select/Select.tsx +84 -0
- package/src/components/Select/__snapshots__/Select.test.tsx.snap +261 -0
- package/src/components/Select/index.tsx +2 -0
- package/src/components/Slider/Slider.css +194 -0
- package/src/components/Slider/Slider.stories.tsx +85 -0
- package/src/components/Slider/Slider.test.tsx +55 -0
- package/src/components/Slider/Slider.tsx +157 -0
- package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +419 -0
- package/src/components/Slider/index.tsx +2 -0
- package/src/components/Spin/Spin.css +31 -0
- package/src/components/Spin/Spin.stories.tsx +65 -0
- package/src/components/Spin/Spin.test.tsx +47 -0
- package/src/components/Spin/Spin.tsx +34 -0
- package/src/components/Spin/__snapshots__/Spin.test.tsx.snap +193 -0
- package/src/components/Spin/index.tsx +2 -0
- package/src/components/Table/Table.css +130 -0
- package/src/components/Table/Table.stories.tsx +274 -0
- package/src/components/Tooltip/Tooltip.css +160 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +136 -0
- package/src/components/Tooltip/Tooltip.test.tsx +110 -0
- package/src/components/Tooltip/Tooltip.tsx +46 -0
- package/src/components/Tooltip/__snapshots__/Tooltip.test.tsx.snap +163 -0
- package/src/components/Tooltip/index.tsx +2 -0
- package/src/components/definitions.stories.tsx +150 -0
- package/src/i18n/I18nWrapper.tsx +13 -0
- package/src/i18n/i18n.ts +34 -0
- package/src/icons/AI.tsx +38 -0
- package/src/icons/Alert.tsx +31 -0
- package/src/icons/ArrowUp.tsx +28 -0
- package/src/icons/Bug.tsx +81 -0
- package/src/icons/Chat.tsx +30 -0
- package/src/icons/ChevronDown.tsx +26 -0
- package/src/icons/ChevronLeft.tsx +28 -0
- package/src/icons/ChevronRight.tsx +28 -0
- package/src/icons/ChevronUp.tsx +24 -0
- package/src/icons/Clear.tsx +23 -0
- package/src/icons/Close.tsx +30 -0
- package/src/icons/Code.tsx +30 -0
- package/src/icons/Copy.tsx +30 -0
- package/src/icons/DeepThought.tsx +38 -0
- package/src/icons/Delete.tsx +23 -0
- package/src/icons/Document.tsx +52 -0
- package/src/icons/Download.tsx +23 -0
- package/src/icons/Edit.tsx +17 -0
- package/src/icons/Expand.tsx +23 -0
- package/src/icons/Eye.tsx +17 -0
- package/src/icons/EyeInvisible.tsx +24 -0
- package/src/icons/Facebook.tsx +23 -0
- package/src/icons/Feedback.tsx +27 -0
- package/src/icons/File.tsx +17 -0
- package/src/icons/FileExcel.tsx +23 -0
- package/src/icons/FilePdf.tsx +23 -0
- package/src/icons/FileWord.tsx +23 -0
- package/src/icons/Fullscreen.tsx +23 -0
- package/src/icons/FullscreenExit.tsx +23 -0
- package/src/icons/Group.tsx +30 -0
- package/src/icons/History.tsx +33 -0
- package/src/icons/Image.tsx +37 -0
- package/src/icons/Info.tsx +37 -0
- package/src/icons/Link.tsx +17 -0
- package/src/icons/Linkedin.tsx +23 -0
- package/src/icons/Loading.tsx +28 -0
- package/src/icons/Logout.tsx +33 -0
- package/src/icons/Mail.tsx +17 -0
- package/src/icons/MapMarker.tsx +26 -0
- package/src/icons/MenuHorizontal.tsx +29 -0
- package/src/icons/MenuVertical.tsx +29 -0
- package/src/icons/Message.tsx +23 -0
- package/src/icons/Microphone.tsx +23 -0
- package/src/icons/Minus.tsx +23 -0
- package/src/icons/MinusCircle.tsx +24 -0
- package/src/icons/PaperClip.tsx +23 -0
- package/src/icons/Picture.tsx +23 -0
- package/src/icons/Plus.tsx +18 -0
- package/src/icons/Preview.tsx +31 -0
- package/src/icons/Print.tsx +37 -0
- package/src/icons/QuestionHelp.tsx +34 -0
- package/src/icons/Refresh.tsx +30 -0
- package/src/icons/SelectIcon.tsx +28 -0
- package/src/icons/Send.tsx +17 -0
- package/src/icons/Setting.tsx +23 -0
- package/src/icons/Share.tsx +23 -0
- package/src/icons/Sound.tsx +23 -0
- package/src/icons/SoundDeactivated.tsx +27 -0
- package/src/icons/Telegram.tsx +26 -0
- package/src/icons/ThumbDown.tsx +29 -0
- package/src/icons/ThumbUp.tsx +29 -0
- package/src/icons/Translation.tsx +24 -0
- package/src/icons/Twitter.tsx +23 -0
- package/src/icons/Upload.tsx +34 -0
- package/src/icons/User.tsx +17 -0
- package/src/icons/Warning.tsx +27 -0
- package/src/icons/WhatsApp.tsx +24 -0
- package/src/icons/icons.stories.css +5 -0
- package/src/icons/icons.stories.tsx +110 -0
- package/src/icons/loading.css +14 -0
- package/src/index.ts +15 -0
- package/src/styles/utils.css +17 -0
- package/src/styles.css +4 -0
- package/src/theme/variables.css +110 -0
- package/src/vite-env.d.ts +6 -0
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# MemoriAI UI
|
|
2
|
+
|
|
3
|
+
This is the UI library for Memori AI and [AIsuru](https://www.aisuru.com).
|
|
4
|
+
|
|
5
|
+
Used by AIsuru platform and [Client](https://github.com/memori-ai/memori-client) components.
|
|
6
|
+
|
|
7
|
+
See [Storybook](https://memori-ai.github.io/ui/) for a showcase of all components and their usage.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun add @memori.ai/ui
|
|
13
|
+
# npm install @memori.ai/ui
|
|
14
|
+
# or yarn or pnpm
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Example usage for the Button component:
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { Button } from '@memori.ai/ui'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<Button>Click me</Button>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
To see all components, visit our [Storybook](https://memori-ai.github.io/ui/).
|
|
30
|
+
|
|
31
|
+
## Development
|
|
32
|
+
|
|
33
|
+
To install dependencies:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
bun install
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To run Storybook:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bun run storybook # or bun sb
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
To run tests (in watch mode):
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
bun run test
|
|
49
|
+
# this is not the same as `bun test`
|
|
50
|
+
# `bun test` runs the tests using Bun test runner and it's not compatible with our setup
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Linting:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
bun lint
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Linting CSS:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
bun lint:css
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Formatting:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
bun format
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Formatting check:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
bun format:check
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Type checking:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
bun typecheck
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Building:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
bun run build
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Release:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
bun run release
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Tech stack
|
|
96
|
+
|
|
97
|
+
- [Bun](https://bun.com)
|
|
98
|
+
- [React](https://react.dev)
|
|
99
|
+
- [React Aria](https://react-spectrum.adobe.com/react-aria/index.html)
|
|
100
|
+
- [Storybook](https://storybook.js.org)
|
|
101
|
+
- [Vite](https://vitejs.dev)
|
|
102
|
+
- [Vitest](https://vitest.dev)
|
|
103
|
+
- [Playwright](https://playwright.dev)
|
|
104
|
+
- [React Testing Library](https://testing-library.com/react)
|
|
105
|
+
- [React I18next](https://react.i18next.com)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC, JSX, default as React } from 'react';
|
|
2
|
+
export type AlertType = 'success' | 'warning' | 'error' | 'info';
|
|
3
|
+
export interface Props {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
onClose: (value: boolean) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
title?: string | JSX.Element | React.ReactNode;
|
|
8
|
+
description?: string | JSX.Element | React.ReactNode;
|
|
9
|
+
children?: JSX.Element | React.ReactNode;
|
|
10
|
+
type?: AlertType;
|
|
11
|
+
icon?: JSX.Element | React.ReactNode;
|
|
12
|
+
closable?: boolean;
|
|
13
|
+
duration?: number | null;
|
|
14
|
+
action?: JSX.Element | React.ReactNode;
|
|
15
|
+
width?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const Alert: FC<Props>;
|
|
18
|
+
export default Alert;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FC, default as React } from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
primary?: boolean;
|
|
5
|
+
outlined?: boolean;
|
|
6
|
+
ghost?: boolean;
|
|
7
|
+
padded?: boolean;
|
|
8
|
+
block?: boolean;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
shape?: 'square' | 'rounded' | 'circle';
|
|
11
|
+
danger?: boolean;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
isActive?: boolean;
|
|
18
|
+
htmlType?: 'button' | 'submit' | 'reset';
|
|
19
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
20
|
+
onMouseDown?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
21
|
+
onMouseUp?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
22
|
+
onMouseLeave?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
23
|
+
onTouchStart?: (event: React.TouchEvent<HTMLButtonElement> | React.MouseEvent) => void;
|
|
24
|
+
onTouchEnd?: (event: React.TouchEvent<HTMLButtonElement> | React.MouseEvent) => void;
|
|
25
|
+
}
|
|
26
|
+
declare const Button: FC<Props>;
|
|
27
|
+
export default Button;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonProps as BaseButtonProps } from '@base-ui/react/button';
|
|
3
|
+
export interface ButtonProps extends Omit<BaseButtonProps, 'className'> {
|
|
4
|
+
/**
|
|
5
|
+
* Button variant
|
|
6
|
+
* @default 'primary'
|
|
7
|
+
*/
|
|
8
|
+
variant?: 'primary' | 'secondary' | 'outline';
|
|
9
|
+
/**
|
|
10
|
+
* Button size
|
|
11
|
+
* @default 'md'
|
|
12
|
+
*/
|
|
13
|
+
size?: 'sm' | 'md' | 'lg';
|
|
14
|
+
/**
|
|
15
|
+
* Whether the button should take full width
|
|
16
|
+
*/
|
|
17
|
+
fullWidth?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Additional CSS class name
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Button content
|
|
24
|
+
*/
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export declare const ButtonBase: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
export default ButtonBase;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC, JSX, default as React } from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
cover?: JSX.Element | React.ReactNode | string;
|
|
9
|
+
hoverable?: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const Card: FC<Props>;
|
|
13
|
+
export default Card;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface Props extends React.HTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
indeterminate?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const Checkbox: FC<Props>;
|
|
11
|
+
export default Checkbox;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onConfirm: () => void;
|
|
6
|
+
title: string;
|
|
7
|
+
message: string;
|
|
8
|
+
confirmText: string;
|
|
9
|
+
cancelText: string;
|
|
10
|
+
}
|
|
11
|
+
declare const ConfirmDialog: React.FC<Props>;
|
|
12
|
+
export default ConfirmDialog;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FC, JSX, default as React } from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
title?: string | React.ReactNode;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
data?: any;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
width?: number | string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
footer?: {
|
|
10
|
+
leftAction?: React.ReactNode;
|
|
11
|
+
leftActionClassName?: string;
|
|
12
|
+
onSubmit?: () => void;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
};
|
|
15
|
+
extra?: React.ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
placement?: 'left' | 'right';
|
|
18
|
+
description?: string | JSX.Element | React.ReactNode;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
animated?: boolean;
|
|
21
|
+
closable?: boolean;
|
|
22
|
+
widthMd?: string;
|
|
23
|
+
widthLg?: string;
|
|
24
|
+
confirmDialogTitle?: string;
|
|
25
|
+
confirmDialogMessage?: string;
|
|
26
|
+
showBackdrop?: boolean;
|
|
27
|
+
preventBackdropClose?: boolean;
|
|
28
|
+
enterDuration?: string;
|
|
29
|
+
leaveDuration?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const Drawer: FC<Props>;
|
|
32
|
+
export default Drawer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
trigger?: React.ReactNode;
|
|
8
|
+
placement?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
9
|
+
}
|
|
10
|
+
declare const Dropdown: React.FC<Props>;
|
|
11
|
+
export default Dropdown;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
rows?: number;
|
|
4
|
+
className?: string;
|
|
5
|
+
innerClassName?: string;
|
|
6
|
+
btnClassName?: string;
|
|
7
|
+
lineHeightMultiplier?: number;
|
|
8
|
+
defaultExpanded?: boolean;
|
|
9
|
+
expandSymbol?: (lang: string) => React.ReactNode;
|
|
10
|
+
collapseSymbol?: (lang: string) => React.ReactNode;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
mode?: 'rows' | 'characters';
|
|
13
|
+
}
|
|
14
|
+
declare const Expandable: ({ rows, className, innerClassName, btnClassName, lineHeightMultiplier, defaultExpanded, expandSymbol, collapseSymbol, children, mode, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default Expandable;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputProps as BaseInputProps } from '@base-ui/react/input';
|
|
3
|
+
export interface InputBaseProps extends Omit<BaseInputProps, 'className' | 'size'> {
|
|
4
|
+
/**
|
|
5
|
+
* Input variant
|
|
6
|
+
* @default 'default'
|
|
7
|
+
*/
|
|
8
|
+
variant?: 'default' | 'error' | 'disabled';
|
|
9
|
+
/**
|
|
10
|
+
* Input size
|
|
11
|
+
* @default 'md'
|
|
12
|
+
*/
|
|
13
|
+
size?: 'sm' | 'md' | 'lg';
|
|
14
|
+
/**
|
|
15
|
+
* Whether the input should take full width
|
|
16
|
+
*/
|
|
17
|
+
fullWidth?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Additional CSS class name
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Placeholder text
|
|
24
|
+
*/
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Input value
|
|
28
|
+
*/
|
|
29
|
+
value?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Default value for uncontrolled input
|
|
32
|
+
*/
|
|
33
|
+
defaultValue?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Callback fired when the value changes
|
|
36
|
+
*/
|
|
37
|
+
onValueChange?: (value: string) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the input is disabled
|
|
40
|
+
*/
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Input type
|
|
44
|
+
* @default 'text'
|
|
45
|
+
*/
|
|
46
|
+
type?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare const InputBase: React.ForwardRefExoticComponent<InputBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
49
|
+
export default InputBase;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC, JSX, default as React } from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
onClose: (value: boolean) => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
title?: string | JSX.Element | React.ReactNode;
|
|
7
|
+
description?: string | JSX.Element | React.ReactNode;
|
|
8
|
+
children?: JSX.Element | React.ReactNode;
|
|
9
|
+
footer?: JSX.Element | React.ReactNode;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
closable?: boolean;
|
|
12
|
+
width?: string;
|
|
13
|
+
widthMd?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const Modal: FC<Props>;
|
|
16
|
+
export default Modal;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Props<T = any> {
|
|
2
|
+
className?: string;
|
|
3
|
+
value?: T;
|
|
4
|
+
name?: string;
|
|
5
|
+
displayValue?: string;
|
|
6
|
+
onChange: (value: T) => void;
|
|
7
|
+
options: {
|
|
8
|
+
value: T;
|
|
9
|
+
label: any;
|
|
10
|
+
}[];
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const Select: ({ className, value, name, displayValue, options, onChange, disabled, label, placeholder, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default Select;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
step?: number;
|
|
6
|
+
defaultValue?: number;
|
|
7
|
+
label?: string | React.ReactNode;
|
|
8
|
+
onChange?: (value: number) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const CustomSlider: ({ min, max, step, defaultValue, label, onChange, disabled, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default CustomSlider;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, JSX, default as React } from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
content: string | JSX.Element | React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
align?: 'left' | 'right' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
visible?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Tooltip: FC<Props>;
|
|
11
|
+
export default Tooltip;
|