@juspay/blend-design-system 0.0.22 → 0.0.23
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/dist/assets/main.css +1 -1
- package/dist/components/ChatInput/ChatInput.d.ts +5 -0
- package/dist/components/ChatInput/chatInput.tokens.d.ts +147 -0
- package/dist/components/ChatInput/index.d.ts +2 -0
- package/dist/components/ChatInput/types.d.ts +101 -0
- package/dist/components/ChatInput/utils.d.ts +26 -0
- package/dist/components/Drawer/components/DrawerBase.d.ts +4 -1
- package/dist/components/Drawer/types.d.ts +4 -0
- package/dist/components/Sidebar/sidebar.tokens.d.ts +5 -0
- package/dist/global-utils/GlobalUtils.d.ts +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +17747 -16471
- package/dist/tokens/unit.tokens.d.ts +1 -0
- package/package.json +1 -1
package/dist/assets/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{display:none}.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.blend-workflow-canvas .react-flow__node{cursor:pointer;padding:0;border:none;background:transparent;border-radius:0;box-shadow:none}.blend-workflow-canvas .react-flow__node:hover,.blend-workflow-canvas .react-flow__node.selected,.blend-workflow-canvas .react-flow__node.selectable:hover{padding:0;border:none;background:transparent;box-shadow:none}.blend-workflow-canvas .react-flow__edge{cursor:pointer}.blend-workflow-canvas .react-flow__attribution{display:none}
|
|
1
|
+
[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{display:none}.drawer-content>.drawer-body:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}[data-vaul-drawer-direction=top] .drawer-content>.drawer-body:last-child{border-top-left-radius:inherit;border-top-right-radius:inherit}[data-vaul-drawer-direction=left] .drawer-content>.drawer-body:last-child{border-bottom-left-radius:inherit}[data-vaul-drawer-direction=right] .drawer-content>.drawer-body:last-child{border-bottom-right-radius:inherit}.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.blend-workflow-canvas .react-flow__node{cursor:pointer;padding:0;border:none;background:transparent;border-radius:0;box-shadow:none}.blend-workflow-canvas .react-flow__node:hover,.blend-workflow-canvas .react-flow__node.selected,.blend-workflow-canvas .react-flow__node.selectable:hover{padding:0;border:none;background:transparent;box-shadow:none}.blend-workflow-canvas .react-flow__edge{cursor:pointer}.blend-workflow-canvas .react-flow__attribution{display:none}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ChatInputProps, AttachedFile } from './types';
|
|
3
|
+
export declare const getDocIcon: (fileType: AttachedFile["type"]) => React.ReactNode;
|
|
4
|
+
declare const ChatInput: React.ForwardRefExoticComponent<ChatInputProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
5
|
+
export default ChatInput;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
3
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
/**
|
|
5
|
+
* ChatInput Tokens following the pattern: [target].property.[state]
|
|
6
|
+
*
|
|
7
|
+
* Structure:
|
|
8
|
+
* - container: Main chat input container
|
|
9
|
+
* - textarea: Text input area
|
|
10
|
+
* - filesContainer: File attachment display area
|
|
11
|
+
* - bottomActions: Action buttons container
|
|
12
|
+
* - overflowTag: "+X more" files button
|
|
13
|
+
* - topQueries: Top queries section with header and items
|
|
14
|
+
*/
|
|
15
|
+
export type ChatInputTokensType = Readonly<{
|
|
16
|
+
container: {
|
|
17
|
+
backgroundColor: {
|
|
18
|
+
default: CSSObject['backgroundColor'];
|
|
19
|
+
hover: CSSObject['backgroundColor'];
|
|
20
|
+
disabled: CSSObject['backgroundColor'];
|
|
21
|
+
};
|
|
22
|
+
border: {
|
|
23
|
+
default: CSSObject['border'];
|
|
24
|
+
focus: CSSObject['border'];
|
|
25
|
+
};
|
|
26
|
+
borderRadius: CSSObject['borderRadius'];
|
|
27
|
+
paddingTop: CSSObject['paddingTop'];
|
|
28
|
+
paddingRight: CSSObject['paddingRight'];
|
|
29
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
30
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
31
|
+
gap: CSSObject['gap'];
|
|
32
|
+
minHeight: CSSObject['minHeight'];
|
|
33
|
+
transition: CSSObject['transition'];
|
|
34
|
+
boxShadow: {
|
|
35
|
+
default: CSSObject['boxShadow'];
|
|
36
|
+
hover: CSSObject['boxShadow'];
|
|
37
|
+
focus: CSSObject['boxShadow'];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
attachmentContainer: {
|
|
41
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
42
|
+
borderRadius: CSSObject['borderRadius'];
|
|
43
|
+
padding: CSSObject['padding'];
|
|
44
|
+
};
|
|
45
|
+
textarea: {
|
|
46
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
47
|
+
color: CSSObject['color'];
|
|
48
|
+
fontSize: CSSObject['fontSize'];
|
|
49
|
+
lineHeight: CSSObject['lineHeight'];
|
|
50
|
+
paddingX: CSSObject['padding'];
|
|
51
|
+
paddingY: CSSObject['padding'];
|
|
52
|
+
border: CSSObject['border'];
|
|
53
|
+
borderRadius: CSSObject['borderRadius'];
|
|
54
|
+
placeholder: {
|
|
55
|
+
color: CSSObject['color'];
|
|
56
|
+
};
|
|
57
|
+
resize: CSSObject['resize'];
|
|
58
|
+
fontFamily: CSSObject['fontFamily'];
|
|
59
|
+
minHeight: CSSObject['minHeight'];
|
|
60
|
+
maxHeight: CSSObject['maxHeight'];
|
|
61
|
+
overflowY: CSSObject['overflowY'];
|
|
62
|
+
};
|
|
63
|
+
filesContainer: {
|
|
64
|
+
gap: CSSObject['gap'];
|
|
65
|
+
paddingX: CSSObject['padding'];
|
|
66
|
+
paddingY: CSSObject['padding'];
|
|
67
|
+
maxHeight: CSSObject['maxHeight'];
|
|
68
|
+
overflowY: CSSObject['overflowY'];
|
|
69
|
+
};
|
|
70
|
+
bottomActions: {
|
|
71
|
+
paddingX: CSSObject['padding'];
|
|
72
|
+
paddingY: CSSObject['padding'];
|
|
73
|
+
gap: CSSObject['gap'];
|
|
74
|
+
justifyContent: CSSObject['justifyContent'];
|
|
75
|
+
};
|
|
76
|
+
overflowTag: {
|
|
77
|
+
backgroundColor: {
|
|
78
|
+
default: CSSObject['backgroundColor'];
|
|
79
|
+
hover: CSSObject['backgroundColor'];
|
|
80
|
+
active: CSSObject['backgroundColor'];
|
|
81
|
+
};
|
|
82
|
+
color: {
|
|
83
|
+
default: CSSObject['color'];
|
|
84
|
+
hover: CSSObject['color'];
|
|
85
|
+
active: CSSObject['color'];
|
|
86
|
+
};
|
|
87
|
+
border: CSSObject['border'];
|
|
88
|
+
borderRadius: CSSObject['borderRadius'];
|
|
89
|
+
paddingX: CSSObject['padding'];
|
|
90
|
+
paddingY: CSSObject['padding'];
|
|
91
|
+
fontSize: CSSObject['fontSize'];
|
|
92
|
+
fontWeight: CSSObject['fontWeight'];
|
|
93
|
+
gap: CSSObject['gap'];
|
|
94
|
+
transition: CSSObject['transition'];
|
|
95
|
+
cursor: CSSObject['cursor'];
|
|
96
|
+
};
|
|
97
|
+
topQueries: {
|
|
98
|
+
container: {
|
|
99
|
+
borderTop: CSSObject['borderTop'];
|
|
100
|
+
paddingTop: CSSObject['paddingTop'];
|
|
101
|
+
};
|
|
102
|
+
header: {
|
|
103
|
+
color: CSSObject['color'];
|
|
104
|
+
fontSize: CSSObject['fontSize'];
|
|
105
|
+
fontWeight: CSSObject['fontWeight'];
|
|
106
|
+
paddingX: CSSObject['padding'];
|
|
107
|
+
paddingY: CSSObject['padding'];
|
|
108
|
+
textTransform: CSSObject['textTransform'];
|
|
109
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
110
|
+
flexShrink: CSSObject['flexShrink'];
|
|
111
|
+
};
|
|
112
|
+
scrollContainer: {
|
|
113
|
+
overflowY: CSSObject['overflowY'];
|
|
114
|
+
maxHeightOffset: number;
|
|
115
|
+
};
|
|
116
|
+
item: {
|
|
117
|
+
backgroundColor: {
|
|
118
|
+
default: CSSObject['backgroundColor'];
|
|
119
|
+
hover: CSSObject['backgroundColor'];
|
|
120
|
+
active: CSSObject['backgroundColor'];
|
|
121
|
+
disabled: CSSObject['backgroundColor'];
|
|
122
|
+
};
|
|
123
|
+
color: {
|
|
124
|
+
default: CSSObject['color'];
|
|
125
|
+
hover: CSSObject['color'];
|
|
126
|
+
active: CSSObject['color'];
|
|
127
|
+
disabled: CSSObject['color'];
|
|
128
|
+
};
|
|
129
|
+
fontSize: CSSObject['fontSize'];
|
|
130
|
+
fontWeight: CSSObject['fontWeight'];
|
|
131
|
+
paddingX: CSSObject['padding'];
|
|
132
|
+
paddingY: CSSObject['padding'];
|
|
133
|
+
border: CSSObject['border'];
|
|
134
|
+
transition: CSSObject['transition'];
|
|
135
|
+
cursor: CSSObject['cursor'];
|
|
136
|
+
opacity: {
|
|
137
|
+
default: CSSObject['opacity'];
|
|
138
|
+
disabled: CSSObject['opacity'];
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
}>;
|
|
143
|
+
export type ResponsiveChatInputTokensType = {
|
|
144
|
+
[key in keyof BreakpointType]: ChatInputTokensType;
|
|
145
|
+
};
|
|
146
|
+
export declare const getChatInputTokens: (foundationToken: FoundationTokenType) => ResponsiveChatInputTokensType;
|
|
147
|
+
export default getChatInputTokens;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MenuProps } from '../Menu/types';
|
|
3
|
+
export type AttachedFile = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: 'image' | 'pdf' | 'csv' | 'text' | 'other';
|
|
7
|
+
size?: number;
|
|
8
|
+
url?: string;
|
|
9
|
+
preview?: string;
|
|
10
|
+
};
|
|
11
|
+
export type TopQuery = {
|
|
12
|
+
id: string;
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
export type ChatInputProps = {
|
|
16
|
+
value?: string;
|
|
17
|
+
onChange?: (value: string) => void;
|
|
18
|
+
onSend?: (message: string, files: AttachedFile[]) => void;
|
|
19
|
+
onAttachFiles?: (files: File[]) => void;
|
|
20
|
+
onVoiceRecord?: () => void;
|
|
21
|
+
onFileRemove?: (fileId: string) => void;
|
|
22
|
+
onFileClick?: (file: AttachedFile) => void;
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
maxLength?: number;
|
|
26
|
+
autoResize?: boolean;
|
|
27
|
+
attachedFiles?: AttachedFile[];
|
|
28
|
+
topQueries?: TopQuery[];
|
|
29
|
+
onTopQuerySelect?: (query: TopQuery) => void;
|
|
30
|
+
topQueriesMaxHeight?: number;
|
|
31
|
+
attachButtonIcon?: ReactNode;
|
|
32
|
+
voiceButtonIcon?: ReactNode;
|
|
33
|
+
sendButtonIcon?: ReactNode;
|
|
34
|
+
overflowMenuProps?: Partial<MenuProps>;
|
|
35
|
+
'aria-label'?: string;
|
|
36
|
+
'aria-describedby'?: string;
|
|
37
|
+
};
|
|
38
|
+
export type ChatInputTokens = {
|
|
39
|
+
container: {
|
|
40
|
+
backgroundColor: string;
|
|
41
|
+
border: string;
|
|
42
|
+
borderRadius: string;
|
|
43
|
+
padding: string;
|
|
44
|
+
gap: string;
|
|
45
|
+
minHeight: string;
|
|
46
|
+
maxHeight: string;
|
|
47
|
+
};
|
|
48
|
+
textarea: {
|
|
49
|
+
backgroundColor: string;
|
|
50
|
+
color: string;
|
|
51
|
+
fontSize: string;
|
|
52
|
+
lineHeight: string;
|
|
53
|
+
padding: string;
|
|
54
|
+
border: string;
|
|
55
|
+
borderRadius: string;
|
|
56
|
+
placeholder: {
|
|
57
|
+
color: string;
|
|
58
|
+
};
|
|
59
|
+
resize: string;
|
|
60
|
+
fontFamily: string;
|
|
61
|
+
};
|
|
62
|
+
filesContainer: {
|
|
63
|
+
gap: string;
|
|
64
|
+
padding: string;
|
|
65
|
+
maxHeight: string;
|
|
66
|
+
overflowBehavior: string;
|
|
67
|
+
};
|
|
68
|
+
bottomActions: {
|
|
69
|
+
padding: string;
|
|
70
|
+
gap: string;
|
|
71
|
+
justifyContent: string;
|
|
72
|
+
};
|
|
73
|
+
actionButton: {
|
|
74
|
+
size: string;
|
|
75
|
+
padding: string;
|
|
76
|
+
borderRadius: string;
|
|
77
|
+
backgroundColor: {
|
|
78
|
+
default: string;
|
|
79
|
+
hover: string;
|
|
80
|
+
active: string;
|
|
81
|
+
disabled: string;
|
|
82
|
+
};
|
|
83
|
+
color: {
|
|
84
|
+
default: string;
|
|
85
|
+
hover: string;
|
|
86
|
+
active: string;
|
|
87
|
+
disabled: string;
|
|
88
|
+
};
|
|
89
|
+
border: string;
|
|
90
|
+
};
|
|
91
|
+
overflowTag: {
|
|
92
|
+
backgroundColor: string;
|
|
93
|
+
color: string;
|
|
94
|
+
border: string;
|
|
95
|
+
borderRadius: string;
|
|
96
|
+
padding: string;
|
|
97
|
+
fontSize: string;
|
|
98
|
+
fontWeight: string;
|
|
99
|
+
cursor: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AttachedFile } from './types';
|
|
2
|
+
import { MenuItemType } from '../Menu/types';
|
|
3
|
+
/**
|
|
4
|
+
* Determine the file type from a File object
|
|
5
|
+
*/
|
|
6
|
+
export declare const getFileType: (file: File) => AttachedFile["type"];
|
|
7
|
+
/**
|
|
8
|
+
* Create menu items for overflow files
|
|
9
|
+
*/
|
|
10
|
+
export declare const createOverflowMenuItems: (hiddenFiles: AttachedFile[], onFileRemove: (fileId: string) => void, onFileClick: (file: AttachedFile) => void) => MenuItemType[];
|
|
11
|
+
/**
|
|
12
|
+
* Handle textarea auto-resize functionality
|
|
13
|
+
*/
|
|
14
|
+
export declare const handleAutoResize: (element: HTMLTextAreaElement | null, autoResize: boolean) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Check if Enter key should trigger send
|
|
17
|
+
*/
|
|
18
|
+
export declare const shouldSendOnEnter: (key: string, shiftKey: boolean, metaKey: boolean, ctrlKey: boolean) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Validate message length against maxLength
|
|
21
|
+
*/
|
|
22
|
+
export declare const isValidMessageLength: (message: string, maxLength?: number) => boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Convert File objects to AttachedFile objects
|
|
25
|
+
*/
|
|
26
|
+
export declare const convertFilesToAttachedFiles: (files: File[]) => AttachedFile[];
|
|
@@ -30,6 +30,9 @@ export declare const DrawerBody: React.ForwardRefExoticComponent<{
|
|
|
30
30
|
overflowY?: "auto" | "hidden" | "scroll" | "visible";
|
|
31
31
|
noPadding?: boolean;
|
|
32
32
|
hasFooter?: boolean;
|
|
33
|
+
direction?: "top" | "bottom" | "left" | "right";
|
|
34
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
export declare const DrawerFooter: React.ForwardRefExoticComponent<DrawerFooterProps & {
|
|
36
|
+
direction?: "top" | "bottom" | "left" | "right";
|
|
33
37
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
-
export declare const DrawerFooter: React.ForwardRefExoticComponent<DrawerFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
38
|
export declare const DrawerClose: React.ForwardRefExoticComponent<DrawerCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -145,6 +145,10 @@ export type DrawerFooterProps = {
|
|
|
145
145
|
* Custom class name
|
|
146
146
|
*/
|
|
147
147
|
className?: string;
|
|
148
|
+
/**
|
|
149
|
+
* The direction of the drawer (used to apply appropriate border radius)
|
|
150
|
+
*/
|
|
151
|
+
direction?: 'top' | 'bottom' | 'left' | 'right';
|
|
148
152
|
};
|
|
149
153
|
export type DrawerCloseProps = {
|
|
150
154
|
/**
|
package/dist/main.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export * from './components/KeyValuePair';
|
|
|
35
35
|
export * from './components/VirtualList';
|
|
36
36
|
export * from './components/Upload';
|
|
37
37
|
export * from './components/WorkflowCanvas';
|
|
38
|
+
export * from './components/ChatInput';
|
|
39
|
+
export * from './components/CodeBlock';
|
|
38
40
|
export * from './components/ButtonGroup';
|
|
39
41
|
export * from './components/Button';
|
|
40
42
|
export * from './context';
|