@nickle/chatbot-react 0.1.0

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/src/styles.css ADDED
@@ -0,0 +1,257 @@
1
+ @tailwind components;
2
+ @tailwind utilities;
3
+
4
+ [data-chatbot-root] {
5
+ font-family: var(--cb-font-family);
6
+ }
7
+
8
+ [data-chatbot-root] * {
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ [data-chatbot-root] button,
13
+ [data-chatbot-root] input,
14
+ [data-chatbot-root] textarea,
15
+ [data-chatbot-root] select {
16
+ -webkit-appearance: none;
17
+ appearance: none;
18
+ border: 0;
19
+ box-shadow: none;
20
+ font: inherit;
21
+ }
22
+
23
+ [data-chatbot-root] input,
24
+ [data-chatbot-root] textarea,
25
+ [data-chatbot-root] select {
26
+ background: none;
27
+ color: inherit;
28
+ }
29
+
30
+ [data-chatbot-root] button {
31
+ cursor: pointer;
32
+ pointer-events: auto;
33
+ }
34
+
35
+ [data-chatbot-root] button:disabled {
36
+ cursor: not-allowed;
37
+ }
38
+
39
+ [data-chatbot-root] textarea::placeholder {
40
+ color: var(--cb-muted-foreground);
41
+ opacity: 1;
42
+ font: inherit;
43
+ }
44
+
45
+ .cb-message-text {
46
+ word-break: normal;
47
+ overflow-wrap: break-word;
48
+ hyphens: auto;
49
+ }
50
+
51
+ .cb-message-text pre,
52
+ .cb-message-text code {
53
+ word-break: normal;
54
+ overflow-wrap: normal;
55
+ hyphens: manual;
56
+ }
57
+
58
+ .cb-composer-input {
59
+ scrollbar-width: thin;
60
+ scrollbar-color: color-mix(in srgb, var(--cb-border) 85%, #000000 15%) transparent;
61
+ }
62
+
63
+ .cb-composer-input::-webkit-scrollbar {
64
+ width: 10px;
65
+ }
66
+
67
+ .cb-composer-input::-webkit-scrollbar-track {
68
+ background: transparent;
69
+ }
70
+
71
+ .cb-composer-input::-webkit-scrollbar-thumb {
72
+ background: color-mix(in srgb, var(--cb-border) 85%, #000000 15%);
73
+ border: 2px solid transparent;
74
+ background-clip: content-box;
75
+ border-radius: 999px;
76
+ }
77
+
78
+ .cb-composer-input::-webkit-scrollbar-thumb:hover {
79
+ background: color-mix(in srgb, var(--cb-muted-foreground) 65%, #000000 35%);
80
+ }
81
+
82
+ .cb-chat-scroll {
83
+ scrollbar-width: thin;
84
+ scrollbar-color: color-mix(in srgb, var(--cb-border) 85%, #000000 15%) transparent;
85
+ scrollbar-gutter: stable;
86
+ }
87
+
88
+ .cb-chat-scroll::-webkit-scrollbar {
89
+ width: 10px;
90
+ }
91
+
92
+ .cb-chat-scroll::-webkit-scrollbar-track {
93
+ background: transparent;
94
+ }
95
+
96
+ .cb-chat-scroll::-webkit-scrollbar-thumb {
97
+ background: color-mix(in srgb, var(--cb-border) 85%, #000000 15%);
98
+ border: 3px solid transparent;
99
+ background-clip: content-box;
100
+ border-radius: 999px;
101
+ }
102
+
103
+ .cb-chat-scroll::-webkit-scrollbar-thumb:hover {
104
+ background: color-mix(in srgb, var(--cb-muted-foreground) 65%, #000000 35%);
105
+ }
106
+
107
+ .cb-markdown p,
108
+ .cb-markdown ul,
109
+ .cb-markdown ol,
110
+ .cb-markdown pre,
111
+ .cb-markdown blockquote,
112
+ .cb-markdown table {
113
+ margin: 0.2rem 0;
114
+ }
115
+
116
+ .cb-markdown h1,
117
+ .cb-markdown h2,
118
+ .cb-markdown h3,
119
+ .cb-markdown h4,
120
+ .cb-markdown h5,
121
+ .cb-markdown h6 {
122
+ font-weight: 600;
123
+ margin: 0.3rem 0;
124
+ line-height: 1.35;
125
+ }
126
+
127
+ .cb-markdown > :first-child {
128
+ margin-top: 0;
129
+ }
130
+
131
+ .cb-markdown > :last-child {
132
+ margin-bottom: 0;
133
+ }
134
+
135
+ .cb-markdown h1 {
136
+ font-size: 1.1rem;
137
+ }
138
+
139
+ .cb-markdown h2 {
140
+ font-size: 1rem;
141
+ }
142
+
143
+ .cb-markdown h3,
144
+ .cb-markdown h4,
145
+ .cb-markdown h5,
146
+ .cb-markdown h6 {
147
+ font-size: 0.95rem;
148
+ }
149
+
150
+ .cb-markdown ul,
151
+ .cb-markdown ol {
152
+ padding-left: 1.2rem;
153
+ }
154
+
155
+ .cb-markdown a {
156
+ text-decoration: underline;
157
+ color: var(--cb-primary);
158
+ }
159
+
160
+ .cb-markdown code {
161
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
162
+ background-color: color-mix(in srgb, var(--cb-muted) 70%, transparent);
163
+ border-radius: 0.35rem;
164
+ padding: 0.1rem 0.3rem;
165
+ font-size: 0.85em;
166
+ }
167
+
168
+ .cb-markdown pre {
169
+ overflow-x: auto;
170
+ border-radius: 0.8rem;
171
+ border: 1px solid var(--cb-border);
172
+ background: color-mix(in srgb, var(--cb-muted) 60%, transparent);
173
+ padding: 0.65rem 0.75rem;
174
+ }
175
+
176
+ .cb-markdown pre code {
177
+ background: transparent;
178
+ padding: 0;
179
+ }
180
+
181
+ .cb-markdown blockquote {
182
+ border-left: 2px solid var(--cb-border);
183
+ padding-left: 0.75rem;
184
+ color: var(--cb-muted-foreground);
185
+ }
186
+
187
+ .cb-markdown table {
188
+ width: 100%;
189
+ border-collapse: collapse;
190
+ font-size: 0.875rem;
191
+ }
192
+
193
+ .cb-markdown th,
194
+ .cb-markdown td {
195
+ border: 1px solid var(--cb-border);
196
+ padding: 0.35rem 0.45rem;
197
+ text-align: left;
198
+ }
199
+
200
+ @keyframes cb-slide-fade-in-left {
201
+ from {
202
+ opacity: 0;
203
+ transform: translate3d(-14px, 8px, 0) scale(0.985);
204
+ }
205
+
206
+ to {
207
+ opacity: 1;
208
+ transform: translate3d(0, 0, 0) scale(1);
209
+ }
210
+ }
211
+
212
+ @keyframes cb-slide-fade-in-right {
213
+ from {
214
+ opacity: 0;
215
+ transform: translate3d(14px, 8px, 0) scale(0.985);
216
+ }
217
+
218
+ to {
219
+ opacity: 1;
220
+ transform: translate3d(0, 0, 0) scale(1);
221
+ }
222
+ }
223
+
224
+ @keyframes cb-dots {
225
+ 0%,
226
+ 80%,
227
+ 100% {
228
+ transform: translateY(0);
229
+ opacity: 0.35;
230
+ }
231
+
232
+ 40% {
233
+ transform: translateY(-2px);
234
+ opacity: 0.9;
235
+ }
236
+ }
237
+
238
+ .cb-animate-cb-slide-fade-in-left {
239
+ animation: cb-slide-fade-in-left 300ms cubic-bezier(0.22, 1, 0.36, 1);
240
+ }
241
+
242
+ .cb-animate-cb-slide-fade-in-right {
243
+ animation: cb-slide-fade-in-right 300ms cubic-bezier(0.22, 1, 0.36, 1);
244
+ }
245
+
246
+ .cb-animate-cb-dots {
247
+ animation: cb-dots 1s infinite ease-in-out;
248
+ }
249
+
250
+ @media (prefers-reduced-motion: reduce) {
251
+ [data-chatbot-root] * {
252
+ animation-duration: 0.01ms !important;
253
+ animation-iteration-count: 1 !important;
254
+ transition-duration: 0.01ms !important;
255
+ scroll-behavior: auto !important;
256
+ }
257
+ }