@indigoai/indigo-design-system 0.10.3
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 +77 -0
- package/dist/components/accordion/accordion.d.ts +14 -0
- package/dist/components/accordion/accordion.stories.d.ts +8 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion/types.d.ts +8 -0
- package/dist/components/ai-chat/ai-chat.d.ts +6 -0
- package/dist/components/ai-chat/ai-chat.stories.d.ts +7 -0
- package/dist/components/ai-chat/chat-content/chat-content.d.ts +6 -0
- package/dist/components/ai-chat/chat-header/chat-header.d.ts +11 -0
- package/dist/components/ai-chat/chat-input/chat-input.d.ts +11 -0
- package/dist/components/ai-chat/chat-item/chat-item.d.ts +12 -0
- package/dist/components/ai-chat/constants.d.ts +1 -0
- package/dist/components/ai-chat/hooks/useAutoResizeTextArea.d.ts +1 -0
- package/dist/components/ai-chat/index.d.ts +4 -0
- package/dist/components/ai-chat/types.d.ts +99 -0
- package/dist/components/avatar-bot/avatar-bot.d.ts +6 -0
- package/dist/components/avatar-bot/avatar-bot.stories.d.ts +12 -0
- package/dist/components/avatar-bot/index.d.ts +2 -0
- package/dist/components/avatar-bot/types.d.ts +20 -0
- package/dist/components/avatar-default/avatar.d.ts +6 -0
- package/dist/components/avatar-default/avatar.stories.d.ts +10 -0
- package/dist/components/avatar-default/constants.d.ts +1 -0
- package/dist/components/avatar-default/index.d.ts +3 -0
- package/dist/components/avatar-default/types.d.ts +19 -0
- package/dist/components/avatar-workspace/avatar-workspace.d.ts +6 -0
- package/dist/components/avatar-workspace/avatar-workspace.stories.d.ts +9 -0
- package/dist/components/avatar-workspace/constants.d.ts +2 -0
- package/dist/components/avatar-workspace/index.d.ts +3 -0
- package/dist/components/avatar-workspace/types.d.ts +13 -0
- package/dist/components/badge/badge.d.ts +6 -0
- package/dist/components/badge/badge.stories.d.ts +9 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/types.d.ts +7 -0
- package/dist/components/block-builders/atom-top-modulo/atom-top-modulo.d.ts +7 -0
- package/dist/components/block-builders/atom-top-modulo/atom-top_modulo.stories.d.ts +9 -0
- package/dist/components/block-builders/atom-top-modulo/index.d.ts +2 -0
- package/dist/components/block-builders/atom-top-modulo/types.d.ts +13 -0
- package/dist/components/block-builders/block/block.d.ts +7 -0
- package/dist/components/block-builders/block/block.stories.d.ts +9 -0
- package/dist/components/block-builders/block/constants.d.ts +1 -0
- package/dist/components/block-builders/block/index.d.ts +2 -0
- package/dist/components/block-builders/block/types.d.ts +10 -0
- package/dist/components/block-builders/empty-state/constants.d.ts +1 -0
- package/dist/components/block-builders/empty-state/empty-state-image/empty-state-image.d.ts +6 -0
- package/dist/components/block-builders/empty-state/empty-state-image/types.d.ts +7 -0
- package/dist/components/block-builders/empty-state/empty-state.d.ts +3 -0
- package/dist/components/block-builders/empty-state/empty-state.stories.d.ts +8 -0
- package/dist/components/block-builders/empty-state/index.d.ts +3 -0
- package/dist/components/block-builders/empty-state/types.d.ts +8 -0
- package/dist/components/block-builders/image-uploader/image-uploader.d.ts +12 -0
- package/dist/components/block-builders/image-uploader/index.d.ts +2 -0
- package/dist/components/block-builders/image-uploader/types.d.ts +7 -0
- package/dist/components/block-builders/title-block-module/index.d.ts +2 -0
- package/dist/components/block-builders/title-block-module/title-block-module.d.ts +4 -0
- package/dist/components/block-builders/title-block-module/title-block-module.stories.d.ts +8 -0
- package/dist/components/block-builders/title-block-module/types.d.ts +7 -0
- package/dist/components/block-builders/toolbar-icon/constants.d.ts +1 -0
- package/dist/components/block-builders/toolbar-icon/index.d.ts +4 -0
- package/dist/components/block-builders/toolbar-icon/toolbar-icon.d.ts +3 -0
- package/dist/components/block-builders/toolbar-icon/toolbar-icon.stories.d.ts +8 -0
- package/dist/components/block-builders/toolbar-icon/types.d.ts +9 -0
- package/dist/components/blocks/image-block/image-block.d.ts +6 -0
- package/dist/components/blocks/image-block/image-block.stories.d.ts +7 -0
- package/dist/components/blocks/image-block/index.d.ts +2 -0
- package/dist/components/blocks/image-block/types.d.ts +15 -0
- package/dist/components/blocks/reroute-block/index.d.ts +2 -0
- package/dist/components/blocks/reroute-block/reroute-block.d.ts +7 -0
- package/dist/components/blocks/reroute-block/reroute-block.stories.d.ts +8 -0
- package/dist/components/blocks/reroute-block/types.d.ts +6 -0
- package/dist/components/blocks/text-block/index.d.ts +2 -0
- package/dist/components/blocks/text-block/text-block.d.ts +7 -0
- package/dist/components/blocks/text-block/text-block.stories.d.ts +8 -0
- package/dist/components/blocks/text-block/types.d.ts +12 -0
- package/dist/components/blocks/video-block/index.d.ts +2 -0
- package/dist/components/blocks/video-block/types.d.ts +11 -0
- package/dist/components/blocks/video-block/video-block.d.ts +6 -0
- package/dist/components/blocks/video-block/video-block.stories.d.ts +7 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +6 -0
- package/dist/components/breadcrumb/breadcrumb.stories.d.ts +9 -0
- package/dist/components/breadcrumb/constants.d.ts +0 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/types.d.ts +11 -0
- package/dist/components/builder-block-toolbar/builder-block-toolbar.d.ts +9 -0
- package/dist/components/builder-block-toolbar/builder-block-toolbar.stories.d.ts +8 -0
- package/dist/components/builder-block-toolbar/constants.d.ts +2 -0
- package/dist/components/builder-block-toolbar/index.d.ts +2 -0
- package/dist/components/builder-block-toolbar/types.d.ts +29 -0
- package/dist/components/button/button.d.ts +6 -0
- package/dist/components/button/button.stories.d.ts +15 -0
- package/dist/components/button/constants.d.ts +4 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/types.d.ts +19 -0
- package/dist/components/caption/caption.d.ts +6 -0
- package/dist/components/caption/caption.stories.d.ts +8 -0
- package/dist/components/caption/constants.d.ts +2 -0
- package/dist/components/caption/index.d.ts +3 -0
- package/dist/components/caption/types.d.ts +12 -0
- package/dist/components/divider/constants.d.ts +2 -0
- package/dist/components/divider/divider.d.ts +6 -0
- package/dist/components/divider/divider.stories.d.ts +8 -0
- package/dist/components/divider/index.d.ts +3 -0
- package/dist/components/divider/types.d.ts +12 -0
- package/dist/components/dropdown/ai-dropdown/ai-dropdown/ai-dropdown.d.ts +43 -0
- package/dist/components/dropdown/ai-dropdown/ai-dropdown/ai-dropdown.stories.d.ts +53 -0
- package/dist/components/dropdown/ai-dropdown/ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/ai-dropdown/types.d.ts +42 -0
- package/dist/components/dropdown/ai-dropdown/atom-head-item-ai-dropdown/atom-head-item-ai-dropdown.d.ts +3 -0
- package/dist/components/dropdown/ai-dropdown/atom-head-item-ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/atom-head-item-ai-dropdown/types.d.ts +4 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-ai-dropdown/atom-item-ai-dropdown.d.ts +31 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-ai-dropdown/constants.d.ts +1 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-ai-dropdown/types.d.ts +25 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-tag-ai-dropdown/atom-item-tag-ai-dropdown.d.ts +6 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-tag-ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-tag-ai-dropdown/types.d.ts +9 -0
- package/dist/components/dropdown/ai-dropdown/atom-sub-ai-dropdown/atom-sub-ai-dropdown.d.ts +14 -0
- package/dist/components/dropdown/ai-dropdown/atom-sub-ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/atom-sub-ai-dropdown/types.d.ts +7 -0
- package/dist/components/dropdown/ai-dropdown/atom-top-ai-dropdown/atom-top-ai-dropdown.d.ts +3 -0
- package/dist/components/dropdown/ai-dropdown/atom-top-ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/atom-top-ai-dropdown/types.d.ts +20 -0
- package/dist/components/heading/constants.d.ts +2 -0
- package/dist/components/heading/heading.d.ts +6 -0
- package/dist/components/heading/heading.stories.d.ts +8 -0
- package/dist/components/heading/index.d.ts +3 -0
- package/dist/components/heading/types.d.ts +11 -0
- package/dist/components/icon-button/constants.d.ts +3 -0
- package/dist/components/icon-button/icon-button.d.ts +6 -0
- package/dist/components/icon-button/icon-button.stories.d.ts +12 -0
- package/dist/components/icon-button/index.d.ts +3 -0
- package/dist/components/icon-button/types.d.ts +11 -0
- package/dist/components/input/atom-name-div-block-module/atom-name-div-block-module.d.ts +6 -0
- package/dist/components/input/atom-name-div-block-module/atom-name-div-block-module.stories.d.ts +7 -0
- package/dist/components/input/atom-name-div-block-module/index.d.ts +2 -0
- package/dist/components/input/atom-name-div-block-module/types.d.ts +6 -0
- package/dist/components/input/checkbox/checkbox.d.ts +13 -0
- package/dist/components/input/checkbox/checkbox.stories.d.ts +20 -0
- package/dist/components/input/checkbox/constants.d.ts +1 -0
- package/dist/components/input/checkbox/index.d.ts +2 -0
- package/dist/components/input/checkbox/types.d.ts +19 -0
- package/dist/components/input/multiple-values/index.d.ts +2 -0
- package/dist/components/input/multiple-values/multiple-values.d.ts +5 -0
- package/dist/components/input/multiple-values/multiple-values.stories.d.ts +23 -0
- package/dist/components/input/multiple-values/types.d.ts +17 -0
- package/dist/components/input/radio/index.d.ts +3 -0
- package/dist/components/input/radio/radio-group.d.ts +9 -0
- package/dist/components/input/radio/radio.d.ts +7 -0
- package/dist/components/input/radio/radio.stories.d.ts +12 -0
- package/dist/components/input/radio/types.d.ts +13 -0
- package/dist/components/input/select/components/index.d.ts +1 -0
- package/dist/components/input/select/components/select-item.d.ts +7 -0
- package/dist/components/input/select/constants.d.ts +3 -0
- package/dist/components/input/select/index.d.ts +2 -0
- package/dist/components/input/select/select.d.ts +7 -0
- package/dist/components/input/select/select.stories.d.ts +12 -0
- package/dist/components/input/select/types.d.ts +32 -0
- package/dist/components/input/text-field/constants.d.ts +2 -0
- package/dist/components/input/text-field/field-sizing-content.d.ts +23 -0
- package/dist/components/input/text-field/index.d.ts +3 -0
- package/dist/components/input/text-field/text-field.d.ts +6 -0
- package/dist/components/input/text-field/text-field.stories.d.ts +11 -0
- package/dist/components/input/text-field/types.d.ts +21 -0
- package/dist/components/input/text-field-multiline/index.d.ts +2 -0
- package/dist/components/input/text-field-multiline/text-field-multiline.d.ts +6 -0
- package/dist/components/input/text-field-multiline/text-field-multiline.stories.d.ts +11 -0
- package/dist/components/input/text-field-multiline/types.d.ts +33 -0
- package/dist/components/input/toggle/constants.d.ts +1 -0
- package/dist/components/input/toggle/index.d.ts +3 -0
- package/dist/components/input/toggle/toggle.d.ts +7 -0
- package/dist/components/input/toggle/toggle.stories.d.ts +11 -0
- package/dist/components/input/toggle/types.d.ts +18 -0
- package/dist/components/label/constants.d.ts +2 -0
- package/dist/components/label/index.d.ts +3 -0
- package/dist/components/label/label.d.ts +6 -0
- package/dist/components/label/label.stories.d.ts +8 -0
- package/dist/components/label/types.d.ts +11 -0
- package/dist/components/logo/constants.d.ts +2 -0
- package/dist/components/logo/index.d.ts +1 -0
- package/dist/components/logo/logo.d.ts +6 -0
- package/dist/components/logo/logo.stories.d.ts +9 -0
- package/dist/components/logo/types.d.ts +6 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/modal.d.ts +15 -0
- package/dist/components/modal/modal.stories.d.ts +15 -0
- package/dist/components/modal/types.d.ts +12 -0
- package/dist/components/pagination/hooks/useControlled.d.ts +1 -0
- package/dist/components/pagination/hooks/usePagination.d.ts +74 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/pagination.d.ts +7 -0
- package/dist/components/pagination/pagination.stories.d.ts +11 -0
- package/dist/components/pagination/types.d.ts +17 -0
- package/dist/components/progress-bar/constants.d.ts +1 -0
- package/dist/components/progress-bar/index.d.ts +2 -0
- package/dist/components/progress-bar/progress-bar.d.ts +6 -0
- package/dist/components/progress-bar/progress-bar.stories.d.ts +12 -0
- package/dist/components/progress-bar/types.d.ts +11 -0
- package/dist/components/quality-metric-icon/index.d.ts +2 -0
- package/dist/components/quality-metric-icon/quality-metric-icon.d.ts +6 -0
- package/dist/components/quality-metric-icon/quality-metric-icon.stories.d.ts +14 -0
- package/dist/components/quality-metric-icon/types.d.ts +9 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.d.ts +23 -0
- package/dist/components/tabs/tabs.stories.d.ts +8 -0
- package/dist/components/tabs/types.d.ts +7 -0
- package/dist/components/tag/constants.d.ts +4 -0
- package/dist/components/tag/index.d.ts +2 -0
- package/dist/components/tag/tag.d.ts +6 -0
- package/dist/components/tag/tag.stories.d.ts +8 -0
- package/dist/components/tag/types.d.ts +16 -0
- package/dist/components/tag-quality-metric/index.d.ts +2 -0
- package/dist/components/tag-quality-metric/tag-quality-metric.d.ts +6 -0
- package/dist/components/tag-quality-metric/tag-quality-metric.stories.d.ts +8 -0
- package/dist/components/tag-quality-metric/types.d.ts +11 -0
- package/dist/components/text/constants.d.ts +2 -0
- package/dist/components/text/index.d.ts +3 -0
- package/dist/components/text/text.d.ts +6 -0
- package/dist/components/text/text.stories.d.ts +8 -0
- package/dist/components/text/types.d.ts +11 -0
- package/dist/components/toast/constants.d.ts +2 -0
- package/dist/components/toast/hooks/use-toast.d.ts +41 -0
- package/dist/components/toast/index.d.ts +5 -0
- package/dist/components/toast/toast.d.ts +17 -0
- package/dist/components/toast/toast.stories.d.ts +17 -0
- package/dist/components/toast/toaster.d.ts +1 -0
- package/dist/components/toast/types.d.ts +14 -0
- package/dist/components/toast/utils.d.ts +9 -0
- package/dist/components/tooltip/constants.d.ts +0 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/tooltip.d.ts +25 -0
- package/dist/components/tooltip/tooltip.stories.d.ts +22 -0
- package/dist/components/tooltip/types.d.ts +20 -0
- package/dist/components/tooltip-quality-metric/constants.d.ts +0 -0
- package/dist/components/tooltip-quality-metric/index.d.ts +2 -0
- package/dist/components/tooltip-quality-metric/tooltip-quality-metric.d.ts +29 -0
- package/dist/components/tooltip-quality-metric/tooltip-quality-metric.stories.d.ts +31 -0
- package/dist/components/tooltip-quality-metric/types.d.ts +15 -0
- package/dist/components/vertical-tab-chat/index.d.ts +2 -0
- package/dist/components/vertical-tab-chat/types.d.ts +15 -0
- package/dist/components/vertical-tab-chat/vertical-tab-chat.d.ts +31 -0
- package/dist/components/vertical-tab-chat/vertical-tab-chat.stories.d.ts +19 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/index.d.ts +90 -0
- package/dist/indigo-design-system.js +27285 -0
- package/dist/indigo-design-system.js.map +1 -0
- package/dist/indigo-design-system.umd.cjs +157 -0
- package/dist/indigo-design-system.umd.cjs.map +1 -0
- package/dist/style.css +5 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/utils/index.d.ts +18 -0
- package/package.json +84 -0
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Indigo Design System
|
|
2
|
+
|
|
3
|
+
## Usage
|
|
4
|
+
|
|
5
|
+
All you need to do is install the package `@indigoai/indigo-design-system` from [npm](https://www.npmjs.com/package/@indigoai/indigo-design-system)
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
$ yarn add @indigoai/indigo-design-system
|
|
9
|
+
# or
|
|
10
|
+
$ npm install --save @indigoai/indigo-design-system
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
And import `style.css` in your global stylesheet file or in App.tsx:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
import "@indigoai/indigo-design-system/style.css"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If you need to import some icons, you can add this package `@indigoai/indigo-icons` from [npm](https://www.npmjs.com/package/@indigoai/indigo-icons)
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
import { YourSolidIcon } from '@indigoai/indigo-icons/dist/solid';
|
|
23
|
+
import { YourOutlineIcon } from '@indigoai/indigo-icons/dist/outline';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Dev environment
|
|
27
|
+
|
|
28
|
+
This package uses a Docker container as a local development environment.\
|
|
29
|
+
Yalc can be used to publish the package locally and test it in a different project.
|
|
30
|
+
|
|
31
|
+
You can start the development environment by running:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
docker compose up
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
You can update the dependencies by running:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
docker compose exec frontend yarn
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
You can publish the package locally by running:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
docker compose exec frontend ./publish_local.sh
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Using a local version of the icons
|
|
50
|
+
|
|
51
|
+
You can use yalc to publish a local version of the icons package and try it out in the design system
|
|
52
|
+
before publishing it to npm.\
|
|
53
|
+
To install it without modifying the package.json file, run:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
docker compose exec frontend yalc link @indigoai/indigo-icons
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Due to how Storybook works, you will need to delete the cache and restart the container:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
docker compose exec frontend rm -rf /app/node_modules/.cache/storybook
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Publishing the package to NPM
|
|
66
|
+
|
|
67
|
+
You should have an NPM account and be logged in to publish the package.
|
|
68
|
+
|
|
69
|
+
Bump the package version, manually or using one of the npm commands: npm version patch, npm version minor, npm
|
|
70
|
+
version major. Then run:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
docker compose exec frontend ./publish.sh
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**warning**: after running this command, the package.json file will be reverted to its previous state.\
|
|
77
|
+
Remember to commit the changes to it before running the command.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AccordionProps } from '.';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An accordion component.
|
|
5
|
+
*/
|
|
6
|
+
export declare const Accordion: import('react').ForwardRefExoticComponent<AccordionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
/**
|
|
8
|
+
* An individual panel within an accordion
|
|
9
|
+
*/
|
|
10
|
+
export declare const AccordionPanel: import('react').ForwardRefExoticComponent<{
|
|
11
|
+
label: import('react').ReactNode;
|
|
12
|
+
children: import('react').ReactNode;
|
|
13
|
+
contentClassName?: string | undefined;
|
|
14
|
+
} & import('@radix-ui/react-accordion').AccordionItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AccordionProps } from '.';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Template: {
|
|
7
|
+
render: (args: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AccordionItemProps, AccordionSingleProps } from '@radix-ui/react-accordion';
|
|
2
|
+
|
|
3
|
+
export type AccordionProps = Omit<AccordionSingleProps, 'type'>;
|
|
4
|
+
export type AccordionPanelProps = {
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
contentClassName?: string;
|
|
8
|
+
} & AccordionItemProps;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChatContainerProps, ChatTriggerProps } from './types';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
4
|
+
export declare const ChatRoot: import('react').FC<PopoverPrimitive.PopoverProps>;
|
|
5
|
+
export declare const ChatTrigger: import('react').ForwardRefExoticComponent<ChatTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export declare const ChatContainer: import('react').ForwardRefExoticComponent<ChatContainerProps & import('react').RefAttributes<never>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChatContentProps } from '.';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, ChatContentProps>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Template: {
|
|
6
|
+
render: (args: ChatContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AvatarProps } from '../../avatar-default';
|
|
2
|
+
import { HeaderTypes } from '../types';
|
|
3
|
+
|
|
4
|
+
interface ChatHeaderProps {
|
|
5
|
+
botName: string;
|
|
6
|
+
repliesInstantlyLabel?: string;
|
|
7
|
+
avatar: AvatarProps;
|
|
8
|
+
type?: HeaderTypes;
|
|
9
|
+
}
|
|
10
|
+
export declare const ChatHeader: ({ botName, avatar, repliesInstantlyLabel, type }: ChatHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ChatInputProps {
|
|
4
|
+
placeholder: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const ChatInput: import('react').ForwardRefExoticComponent<ChatInputProps & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AvatarProps } from '../../avatar-default';
|
|
2
|
+
import { FeedbackRequest, Message } from '../types';
|
|
3
|
+
|
|
4
|
+
interface ChatItemProp {
|
|
5
|
+
avatar: AvatarProps;
|
|
6
|
+
message: Message;
|
|
7
|
+
feedbackRequested?: FeedbackRequest;
|
|
8
|
+
onMessageButtonClicked?: (label: string) => void;
|
|
9
|
+
onFeedbackClicked?: (isPositive: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const ChatItem: (props: ChatItemProp) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HEADER_TYPES: readonly ["purple", "white"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useAutosizeTextArea: (textAreaRef: HTMLTextAreaElement | null, value?: string) => void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ChatContainer, ChatRoot, ChatTrigger } from './ai-chat';
|
|
2
|
+
export { ChatHeader } from './chat-header/chat-header';
|
|
3
|
+
export { ChatContent } from './chat-content/chat-content';
|
|
4
|
+
export type { ChatContainerProps, ChatTriggerProps, ChatContentProps, HeaderTypes, Message, BotCardMessage, BotCarouselMessage, BotImageMessage, BotTextMessage, BotTypingMessage, BotVideoMessage, FeedbackRequest, UserButtonMessage, UserTextMessage, } from './types';
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { HEADER_TYPES } from './constants';
|
|
3
|
+
import { ButtonProps } from '../button';
|
|
4
|
+
|
|
5
|
+
type AvatarProps = {
|
|
6
|
+
name?: string;
|
|
7
|
+
badge?: boolean;
|
|
8
|
+
image: {
|
|
9
|
+
url: string;
|
|
10
|
+
alt: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type HeaderTypes = (typeof HEADER_TYPES)[number];
|
|
14
|
+
export type ChatTriggerProps = {
|
|
15
|
+
active: boolean;
|
|
16
|
+
avatarBot: AvatarProps;
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
};
|
|
19
|
+
export type ChatContainerProps = {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
};
|
|
22
|
+
export interface ChatContentProps {
|
|
23
|
+
avatar: AvatarProps;
|
|
24
|
+
messages: Message[];
|
|
25
|
+
isTyping?: boolean;
|
|
26
|
+
feedbackRequested?: FeedbackRequest[];
|
|
27
|
+
onMessageButtonClicked?: (label: string) => void;
|
|
28
|
+
onInputChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
29
|
+
onFeedbackClicked?: (message: Message, isPositive: boolean) => void;
|
|
30
|
+
}
|
|
31
|
+
export type BotImageMessage = {
|
|
32
|
+
whoSent: 'bot';
|
|
33
|
+
type: 'jpg';
|
|
34
|
+
imageUrl: string;
|
|
35
|
+
imageAlt: string;
|
|
36
|
+
caption?: string;
|
|
37
|
+
feedbackRequest?: boolean;
|
|
38
|
+
feedbackRequestLabel?: string;
|
|
39
|
+
};
|
|
40
|
+
export type BotVideoMessage = {
|
|
41
|
+
whoSent: 'bot';
|
|
42
|
+
type: 'mp4';
|
|
43
|
+
videoPreviewUrl: string;
|
|
44
|
+
caption?: string;
|
|
45
|
+
feedbackRequest?: boolean;
|
|
46
|
+
feedbackRequestLabel?: string;
|
|
47
|
+
};
|
|
48
|
+
export type UserButtonMessage = {
|
|
49
|
+
whoSent: 'user';
|
|
50
|
+
type: 'button';
|
|
51
|
+
buttons: readonly [ButtonProps?, ButtonProps?, ButtonProps?, ButtonProps?];
|
|
52
|
+
};
|
|
53
|
+
export type UserTextMessage = {
|
|
54
|
+
whoSent: 'user';
|
|
55
|
+
type: 'chat';
|
|
56
|
+
text: ReactNode;
|
|
57
|
+
};
|
|
58
|
+
export type BotTextMessage = {
|
|
59
|
+
whoSent: 'bot';
|
|
60
|
+
type: 'chat';
|
|
61
|
+
text: ReactNode;
|
|
62
|
+
caption?: string;
|
|
63
|
+
feedbackRequest?: boolean;
|
|
64
|
+
feedbackRequestLabel?: string;
|
|
65
|
+
};
|
|
66
|
+
export type BotTypingMessage = {
|
|
67
|
+
whoSent: 'bot';
|
|
68
|
+
type: 'typing';
|
|
69
|
+
typingLabel?: string;
|
|
70
|
+
};
|
|
71
|
+
export type BotCardMessage = {
|
|
72
|
+
whoSent: 'bot';
|
|
73
|
+
type: 'card';
|
|
74
|
+
buttons?: readonly [ButtonProps?, ButtonProps?];
|
|
75
|
+
imageUrl?: string;
|
|
76
|
+
imageAlt?: string;
|
|
77
|
+
title: string;
|
|
78
|
+
description: string;
|
|
79
|
+
};
|
|
80
|
+
export type BotCarouselMessage = {
|
|
81
|
+
whoSent: 'bot';
|
|
82
|
+
type: 'cards';
|
|
83
|
+
cards: {
|
|
84
|
+
cardId: string;
|
|
85
|
+
buttons?: readonly [ButtonProps?, ButtonProps?];
|
|
86
|
+
imageUrl?: string;
|
|
87
|
+
imageAlt?: string;
|
|
88
|
+
title: string;
|
|
89
|
+
description: string;
|
|
90
|
+
}[];
|
|
91
|
+
};
|
|
92
|
+
export type Message = {
|
|
93
|
+
id: string;
|
|
94
|
+
} & (BotImageMessage | BotVideoMessage | UserButtonMessage | UserTextMessage | BotTextMessage | BotTypingMessage | BotCarouselMessage);
|
|
95
|
+
export type FeedbackRequest = {
|
|
96
|
+
id: string;
|
|
97
|
+
isPositive: boolean;
|
|
98
|
+
};
|
|
99
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { AvatarBot, AvatarBotProps } from '.';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, AvatarBotProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof AvatarBot>;
|
|
8
|
+
export declare const Template: {
|
|
9
|
+
render: (args: AvatarBotProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export declare const Image: Story;
|
|
12
|
+
export declare const Icon: Story;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface BaseAvatarBot {
|
|
3
|
+
active?: boolean;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface AvatarBotImage extends BaseAvatarBot {
|
|
7
|
+
image: {
|
|
8
|
+
url: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
};
|
|
11
|
+
icon?: never;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AvatarBotIcon extends BaseAvatarBot {
|
|
15
|
+
image?: never;
|
|
16
|
+
icon: React.ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export type AvatarBotProps = AvatarBotImage | AvatarBotIcon;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { Avatar } from '.';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, import('.').AvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof Avatar>;
|
|
8
|
+
export declare const Name: Story;
|
|
9
|
+
export declare const Icon: Story;
|
|
10
|
+
export declare const Image: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AVATAR_SIZES: readonly ["md", "sm", "xs", "xxs"];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AVATAR_SIZES } from './constants';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export type AvatarSize = (typeof AVATAR_SIZES)[number];
|
|
5
|
+
export interface AvatarProps {
|
|
6
|
+
name?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
icon?: boolean;
|
|
9
|
+
size?: AvatarSize;
|
|
10
|
+
status?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
badge?: boolean;
|
|
13
|
+
image?: {
|
|
14
|
+
url: string;
|
|
15
|
+
alt: string;
|
|
16
|
+
};
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { AvatarWorkspace } from '.';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, import('.').AvatarWorkspaceProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof AvatarWorkspace>;
|
|
8
|
+
export declare const Name: Story;
|
|
9
|
+
export declare const Icon: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AVATAR_WORKSPACE_COLORS, AVATAR_WORKSPACE_SIZES } from './constants';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export type AvatarWorkspaceSize = (typeof AVATAR_WORKSPACE_SIZES)[number];
|
|
5
|
+
export type AvatarWorkspaceColor = (typeof AVATAR_WORKSPACE_COLORS)[number];
|
|
6
|
+
export interface AvatarWorkspaceProps {
|
|
7
|
+
name: string;
|
|
8
|
+
icon?: boolean;
|
|
9
|
+
size?: AvatarWorkspaceSize;
|
|
10
|
+
color?: AvatarWorkspaceColor;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { Badge, BadgeProps } from '.';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, BadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof Badge>;
|
|
8
|
+
export declare const Green: Story;
|
|
9
|
+
export declare const Red: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { AtomTopModulo } from './atom-top-modulo';
|
|
3
|
+
import { AtomTopModuloProps } from './types';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<AtomTopModuloProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof AtomTopModulo>;
|
|
8
|
+
export declare const Template: Story;
|
|
9
|
+
export declare const Dragged: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, MouseEventHandler, RefAttributes } from 'react';
|
|
2
|
+
import { BlockType } from '../block/types';
|
|
3
|
+
|
|
4
|
+
export type AtomTopModuloProps = {
|
|
5
|
+
block?: BlockType;
|
|
6
|
+
dragHandlerProps?: RefAttributes<SVGSVGElement>;
|
|
7
|
+
isDragging?: boolean;
|
|
8
|
+
isCollapse?: boolean;
|
|
9
|
+
onCopy?: MouseEventHandler<HTMLButtonElement>;
|
|
10
|
+
onDelete?: () => void;
|
|
11
|
+
onCollapse?: () => void;
|
|
12
|
+
showCopy?: boolean;
|
|
13
|
+
} & ComponentPropsWithRef<'div'>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { Block } from './block';
|
|
4
|
+
import { BlockProps } from './types';
|
|
5
|
+
|
|
6
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<BlockProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type Story = StoryObj<typeof Block>;
|
|
9
|
+
export declare const Template: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BLOCKS: readonly ["text", "image", "video", "agent", "card", "handover", "contact_request", "quick_reply", "reroute", "api", "capture", "set_values", "condition", "notes"];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, MouseEventHandler } from 'react';
|
|
2
|
+
import { BLOCKS } from './constants';
|
|
3
|
+
|
|
4
|
+
export type BlockType = (typeof BLOCKS)[number];
|
|
5
|
+
export type BlockProps = {
|
|
6
|
+
block?: BlockType;
|
|
7
|
+
bodyClassName?: string;
|
|
8
|
+
onCopy?: MouseEventHandler<HTMLButtonElement>;
|
|
9
|
+
headerClassName?: string;
|
|
10
|
+
} & ComponentPropsWithRef<'div'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EMPTY_STATE_STATUSES: readonly ["text", "drop", "image", "video"];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { EmptyState, EmptyStateProps } from '.';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<EmptyStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof EmptyState>;
|
|
8
|
+
export declare const Template: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ImageUploaderProps {
|
|
4
|
+
onAddFile: (fileInfo: File) => void;
|
|
5
|
+
onError: (error: string) => void;
|
|
6
|
+
acceptedFormats: string[];
|
|
7
|
+
maxFileSize: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ImageUploaderRef {
|
|
10
|
+
browse: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const ImageUploader: React.ForwardRefExoticComponent<ImageUploaderProps & React.RefAttributes<ImageUploaderRef>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { TitleBlockModule, TitleBlockModuleProps } from '.';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<TitleBlockModuleProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof TitleBlockModule>;
|
|
8
|
+
export declare const Template: Story;
|