funda-ui 4.5.766 → 4.5.777

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.
@@ -0,0 +1,413 @@
1
+ /*=================== Chatbox (Loading) =================*/
2
+ .custom-chatbox-loader-container {
3
+ width: 130px;
4
+ text-align: start;
5
+ }
6
+ .custom-chatbox-loader-container .custom-chatbox-loader {
7
+ height: 4px;
8
+ width: 100%;
9
+ --c: no-repeat linear-gradient(var(--bs-primary) 0 0);
10
+ background: var(--c), var(--c), #b9caf7;
11
+ background-size: 60% 100%;
12
+ animation: cssAnim--loadermove 3s infinite;
13
+ }
14
+
15
+ .dark-mode .custom-chatbox-loader-container .custom-chatbox-loader,
16
+ [data-bs-theme=dark] .custom-chatbox-loader-container .custom-chatbox-loader {
17
+ --c: no-repeat linear-gradient(var(--bs-primary) 0 0);
18
+ background: var(--c), var(--c), #8692b5;
19
+ }
20
+
21
+ @keyframes cssAnim--loadermove {
22
+ 0% {
23
+ background-position: -150% 0, -150% 0;
24
+ }
25
+ 66% {
26
+ background-position: 250% 0, -150% 0;
27
+ }
28
+ 100% {
29
+ background-position: 250% 0, 250% 0;
30
+ }
31
+ }
32
+ /*=================== Chatbox (Core) =================*/
33
+ .custom-chatbox-circle {
34
+ --custom-chatbox-circle-color: #5A5EB9;
35
+ --custom-chatbox-circle-text: #fff;
36
+ position: fixed;
37
+ bottom: 30px;
38
+ right: 30px;
39
+ background: var(--custom-chatbox-circle-color);
40
+ width: 50px;
41
+ height: 50px;
42
+ border-radius: 50%;
43
+ color: var(--custom-chatbox-circle-text);
44
+ cursor: pointer;
45
+ box-shadow: 0px 3px 16px 0px rgba(0, 0, 0, 0.6), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
46
+ z-index: 1030;
47
+ text-align: center;
48
+ vertical-align: middle;
49
+ transition: 0.1s ease-in-out;
50
+ }
51
+ .custom-chatbox-circle > span {
52
+ display: inline-block;
53
+ margin-top: 25%;
54
+ }
55
+ .custom-chatbox-circle:hover {
56
+ transform: scale(1.2);
57
+ }
58
+ .custom-chatbox-circle svg {
59
+ width: 30px;
60
+ height: 30px;
61
+ }
62
+ .custom-chatbox-circle svg path {
63
+ stroke: #fff;
64
+ }
65
+
66
+ .custom-chatbox-close {
67
+ --custom-chatbox-close-color: #333;
68
+ padding: 20px;
69
+ position: fixed;
70
+ bottom: calc(100vh - 55px);
71
+ z-index: 1032;
72
+ right: -15px;
73
+ cursor: pointer;
74
+ border: none;
75
+ outline: none;
76
+ background: none;
77
+ transition-delay: 0.05s; /* Prevent real-time update of store displacement */
78
+ }
79
+ .custom-chatbox-close path {
80
+ fill: var(--custom-chatbox-close-color);
81
+ }
82
+ .custom-chatbox-close:hover {
83
+ transform: scale(1.2);
84
+ }
85
+ .custom-chatbox-close:hover path {
86
+ fill: #f00;
87
+ }
88
+
89
+ .custom-chatbox-container {
90
+ --custom-chatbox-w: 600px;
91
+ --custom-chatbox-h: 100vh;
92
+ --custom-chatbox-bg: #fff;
93
+ --custom-chatbox-input-bg: #fff;
94
+ --custom-chatbox-default-txt-color: #333;
95
+ --custom-chatbox-default-btn-color: #fff;
96
+ --custom-chatbox-msg-bg: #eaeaea;
97
+ --custom-chatbox-msg-bg2: #d1e6f8;
98
+ --custom-chatbox-msg-border: #ddd;
99
+ --custom-chatbox-primary-color: #5A5EB9;
100
+ --custom-chatbox-gray-color: #adadad;
101
+ --custom-chatbox-primary-text: #333;
102
+ --custom-chatbox-disable-color: #ccc;
103
+ --custom-chatbox-stop-color: #f00;
104
+ --custom-chatbox-time-color: #96a2c1;
105
+ --custom-chatbox-msg-dotted-loader-size: 15px;
106
+ --custom-chatbox-content-w: calc(100% - 50px);
107
+ --custom-chatbox-toolkit-btn-color: #f8f9fa;
108
+ --custom-chatbox-toolkit-btn-border-color: #e9ecef;
109
+ --custom-chatbox-toolkit-btn-active-color: #c2dfff;
110
+ --custom-chatbox-newchat-btn-color: #f8f9fa;
111
+ --custom-chatbox-newchat-btn-border-color: #e9ecef;
112
+ min-width: var(--custom-chatbox-w);
113
+ max-width: var(--custom-chatbox-w);
114
+ margin: auto;
115
+ background: var(--custom-chatbox-bg);
116
+ border-radius: 8px;
117
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
118
+ padding: 20px;
119
+ position: fixed;
120
+ bottom: 0;
121
+ right: 0;
122
+ z-index: 1031;
123
+ height: var(--custom-chatbox-h);
124
+ /* message list */
125
+ /* dot loading */
126
+ /* control area */
127
+ /* loading */
128
+ /* new chat button */
129
+ /* toolkit buttons */
130
+ }
131
+ .custom-chatbox-container details {
132
+ font-style: italic;
133
+ margin: 0;
134
+ padding: 0;
135
+ font-size: 0.75rem;
136
+ margin-bottom: 0.5rem;
137
+ }
138
+ .custom-chatbox-container summary {
139
+ cursor: pointer;
140
+ font-weight: bold;
141
+ color: var(--custom-chatbox-primary-color);
142
+ outline: none;
143
+ }
144
+ .custom-chatbox-container details[open] summary {
145
+ color: var(--custom-chatbox-primary-text);
146
+ }
147
+ .custom-chatbox-container h1 {
148
+ font-size: 1.35rem;
149
+ }
150
+ .custom-chatbox-container h2 {
151
+ font-size: 1.25rem;
152
+ }
153
+ .custom-chatbox-container h3 {
154
+ font-size: 1.125rem;
155
+ }
156
+ .custom-chatbox-container h4 {
157
+ font-size: 1rem;
158
+ }
159
+ .custom-chatbox-container h5 {
160
+ font-size: 0.875rem;
161
+ }
162
+ .custom-chatbox-container h6 {
163
+ font-size: 0.75rem;
164
+ }
165
+ .custom-chatbox-container .messages {
166
+ height: calc(100% - 80px);
167
+ overflow-y: auto;
168
+ margin-bottom: 10px;
169
+ font-size: 13px;
170
+ margin-right: 0;
171
+ }
172
+ .custom-chatbox-container .messages img, .custom-chatbox-container .messages svg, .custom-chatbox-container .messages video, .custom-chatbox-container .messages canvas, .custom-chatbox-container .messages audio, .custom-chatbox-container .messages iframe, .custom-chatbox-container .messages embed, .custom-chatbox-container .messages object {
173
+ display: inline;
174
+ }
175
+ .custom-chatbox-container .messages::-webkit-scrollbar {
176
+ width: 3px;
177
+ }
178
+ .custom-chatbox-container .messages::-webkit-scrollbar-thumb {
179
+ background: rgba(0, 0, 0, 0.2);
180
+ }
181
+ .custom-chatbox-container .messages > div {
182
+ margin: 5px 0;
183
+ padding: 3px 5px;
184
+ border-radius: 0.35rem;
185
+ }
186
+ .custom-chatbox-container .messages p {
187
+ margin: 3px 0;
188
+ }
189
+ .custom-chatbox-container .messages .qa-timestamp {
190
+ font-size: 0.75rem;
191
+ color: var(--custom-chatbox-time-color);
192
+ font-style: italic;
193
+ font-weight: normal;
194
+ display: block;
195
+ text-align: right;
196
+ }
197
+ .custom-chatbox-container .messages .qa-name {
198
+ font-weight: bold;
199
+ color: var(--custom-chatbox-primary-color);
200
+ }
201
+ .custom-chatbox-container .messages .qa-name svg, .custom-chatbox-container .messages .qa-name img {
202
+ max-height: 15px;
203
+ }
204
+ .custom-chatbox-container .messages .qa-content {
205
+ background: var(--custom-chatbox-msg-bg);
206
+ padding: 0.5rem;
207
+ border-radius: 0.35rem;
208
+ margin-top: 0.3rem;
209
+ display: inline-block;
210
+ text-align: start;
211
+ }
212
+ .custom-chatbox-container .messages .request {
213
+ text-align: end;
214
+ }
215
+ .custom-chatbox-container .messages .request .qa-content {
216
+ max-width: var(--custom-chatbox-content-w);
217
+ background: var(--custom-chatbox-msg-bg2);
218
+ }
219
+ .custom-chatbox-container .messages .reply {
220
+ text-align: start;
221
+ }
222
+ .custom-chatbox-container .messages .reply .qa-name {
223
+ display: flex;
224
+ }
225
+ .custom-chatbox-container .messages .reply .qa-content {
226
+ width: var(--custom-chatbox-content-w);
227
+ }
228
+ .custom-chatbox-container .msg-dotted-loader-container {
229
+ font-weight: normal;
230
+ transform: translateY(-5px);
231
+ display: flex;
232
+ align-items: center;
233
+ margin-top: 0.4rem;
234
+ margin-left: 0.3rem;
235
+ color: var(--custom-chatbox-gray-color);
236
+ }
237
+ .custom-chatbox-container .msg-dotted-loader-text {
238
+ transform: translateY(-10%);
239
+ }
240
+ .custom-chatbox-container .msg-dotted-loader {
241
+ position: relative;
242
+ text-align: center;
243
+ display: inline-block;
244
+ width: calc(var(--custom-chatbox-msg-dotted-loader-size) * 1.5);
245
+ height: calc(var(--custom-chatbox-msg-dotted-loader-size) * 1.5);
246
+ margin-right: 0.1rem;
247
+ }
248
+ .custom-chatbox-container .msg-dotted-loader::after,
249
+ .custom-chatbox-container .msg-dotted-loader::before {
250
+ content: "";
251
+ position: absolute;
252
+ top: 0;
253
+ left: 0;
254
+ width: var(--custom-chatbox-msg-dotted-loader-size);
255
+ height: var(--custom-chatbox-msg-dotted-loader-size);
256
+ border-radius: 50%;
257
+ border: 2px var(--custom-chatbox-gray-color);
258
+ border-style: dotted solid dotted solid;
259
+ animation: turn-left 1.5s linear infinite;
260
+ }
261
+ .custom-chatbox-container .msg-dotted-loader::before {
262
+ left: calc(var(--custom-chatbox-msg-dotted-loader-size) / 2 / 2 * -1);
263
+ top: calc(var(--custom-chatbox-msg-dotted-loader-size) / 2 / 2 * -1);
264
+ width: calc(var(--custom-chatbox-msg-dotted-loader-size) + var(--custom-chatbox-msg-dotted-loader-size) / 2);
265
+ height: calc(var(--custom-chatbox-msg-dotted-loader-size) + var(--custom-chatbox-msg-dotted-loader-size) / 2);
266
+ border-style: dotted dotted solid solid;
267
+ animation: msg-dotted-loader-anim--turn-right 1.5s linear infinite;
268
+ }
269
+ @keyframes msg-dotted-loader-anim--turn-right {
270
+ 0% {
271
+ transform: rotate(0deg);
272
+ }
273
+ 100% {
274
+ transform: rotate(360deg);
275
+ }
276
+ }
277
+ @keyframes turn-left {
278
+ 0% {
279
+ transform: rotate(0deg);
280
+ }
281
+ 100% {
282
+ transform: rotate(-360deg);
283
+ }
284
+ }
285
+ .custom-chatbox-container .msgcontrol {
286
+ display: flex;
287
+ position: absolute;
288
+ bottom: 10px;
289
+ z-index: 1;
290
+ width: calc(100% - 40px);
291
+ }
292
+ .custom-chatbox-container .msgcontrol img, .custom-chatbox-container .msgcontrol svg, .custom-chatbox-container .msgcontrol video, .custom-chatbox-container .msgcontrol canvas, .custom-chatbox-container .msgcontrol audio, .custom-chatbox-container .msgcontrol iframe, .custom-chatbox-container .msgcontrol embed, .custom-chatbox-container .msgcontrol object {
293
+ display: inline;
294
+ }
295
+ .custom-chatbox-container .msgcontrol .messageInput {
296
+ width: 100%;
297
+ border: 1px solid var(--custom-chatbox-msg-border);
298
+ border-radius: 4px;
299
+ font-size: 0.875rem;
300
+ border: none;
301
+ outline: none;
302
+ }
303
+ .custom-chatbox-container .msgcontrol .messageInput:focus, .custom-chatbox-container .msgcontrol .messageInput:focus-visible {
304
+ outline: none;
305
+ }
306
+ .custom-chatbox-container .msgcontrol .messageInput .messageInput-control {
307
+ background: var(--custom-chatbox-input-bg);
308
+ padding: 0.5rem;
309
+ border-radius: 0.35rem;
310
+ width: 100%;
311
+ color: var(--custom-chatbox-default-txt-color);
312
+ resize: none;
313
+ max-height: 50vh;
314
+ border: 1px solid var(--custom-chatbox-gray-color);
315
+ }
316
+ .custom-chatbox-container .msgcontrol .messageInput .messageInput-control::-webkit-scrollbar {
317
+ width: 3px;
318
+ }
319
+ .custom-chatbox-container .msgcontrol .messageInput .messageInput-control::-webkit-scrollbar-thumb {
320
+ background: rgba(0, 0, 0, 0.2);
321
+ }
322
+ .custom-chatbox-container .msgcontrol .messageInput .messageInput-control:focus, .custom-chatbox-container .msgcontrol .messageInput .messageInput-control:focus-visible {
323
+ border-color: transparent;
324
+ outline: 1px solid var(--custom-chatbox-primary-color);
325
+ }
326
+ .custom-chatbox-container .msgcontrol button {
327
+ padding: 6px;
328
+ border: none;
329
+ position: absolute;
330
+ background-color: var(--custom-chatbox-primary-color);
331
+ color: var(--custom-chatbox-default-btn-color);
332
+ border: 1px solid var(--custom-chatbox-primary-color);
333
+ border-radius: 50%;
334
+ cursor: pointer;
335
+ margin-left: 0.5rem;
336
+ min-width: 30px;
337
+ font-size: 0.875rem;
338
+ z-index: 2;
339
+ right: 0.4rem;
340
+ bottom: 0.7rem;
341
+ width: 40px;
342
+ height: 40px;
343
+ padding: 0;
344
+ }
345
+ .custom-chatbox-container .msgcontrol button path {
346
+ fill: var(--custom-chatbox-default-btn-color);
347
+ }
348
+ .custom-chatbox-container .msgcontrol button:hover {
349
+ transform: scale(1.1);
350
+ }
351
+ .custom-chatbox-container .msgcontrol button:disabled {
352
+ opacity: 0.7;
353
+ }
354
+ .custom-chatbox-container .msgcontrol button.is-suspended {
355
+ background-color: var(--custom-chatbox-stop-color);
356
+ border-color: var(--custom-chatbox-stop-color);
357
+ }
358
+ .custom-chatbox-container .loading {
359
+ margin-top: 0;
360
+ height: 5px;
361
+ position: absolute;
362
+ bottom: 5px;
363
+ width: calc(100% - 40px);
364
+ z-index: 1;
365
+ }
366
+ .custom-chatbox-container .newchat-btn {
367
+ text-align: center;
368
+ }
369
+ .custom-chatbox-container .newchat-btn > button {
370
+ padding: 3px 6px;
371
+ background-color: var(--custom-chatbox-newchat-btn-color);
372
+ border: 1px solid var(--custom-chatbox-newchat-btn-border-color);
373
+ border-radius: 20px;
374
+ cursor: pointer;
375
+ transition: all 0.3s ease;
376
+ font-size: 0.8125rem;
377
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
378
+ }
379
+ .custom-chatbox-container .newchat-btn > button img, .custom-chatbox-container .newchat-btn > button svg, .custom-chatbox-container .newchat-btn > button video, .custom-chatbox-container .newchat-btn > button canvas, .custom-chatbox-container .newchat-btn > button audio, .custom-chatbox-container .newchat-btn > button iframe, .custom-chatbox-container .newchat-btn > button embed, .custom-chatbox-container .newchat-btn > button object {
380
+ display: inline;
381
+ }
382
+ .custom-chatbox-container .newchat-btn > button:hover {
383
+ transform: translateY(-2px);
384
+ }
385
+ .custom-chatbox-container .toolkit-btns {
386
+ display: flex;
387
+ position: absolute;
388
+ bottom: 20px;
389
+ margin-left: 5px;
390
+ z-index: 1;
391
+ flex-wrap: wrap;
392
+ gap: 8px;
393
+ justify-content: center;
394
+ }
395
+ .custom-chatbox-container .toolkit-btns > button {
396
+ padding: 3px 6px;
397
+ background-color: var(--custom-chatbox-toolkit-btn-color);
398
+ border: 1px solid var(--custom-chatbox-toolkit-btn-border-color);
399
+ border-radius: 20px;
400
+ cursor: pointer;
401
+ transition: all 0.3s ease;
402
+ font-size: 0.75rem;
403
+ }
404
+ .custom-chatbox-container .toolkit-btns > button img, .custom-chatbox-container .toolkit-btns > button svg, .custom-chatbox-container .toolkit-btns > button video, .custom-chatbox-container .toolkit-btns > button canvas, .custom-chatbox-container .toolkit-btns > button audio, .custom-chatbox-container .toolkit-btns > button iframe, .custom-chatbox-container .toolkit-btns > button embed, .custom-chatbox-container .toolkit-btns > button object {
405
+ display: inline;
406
+ }
407
+ .custom-chatbox-container .toolkit-btns > button:hover {
408
+ background-color: var(--custom-chatbox-toolkit-btn-border-color);
409
+ transform: translateY(-2px);
410
+ }
411
+ .custom-chatbox-container .toolkit-btns > button.active {
412
+ background-color: var(--custom-chatbox-toolkit-btn-active-color);
413
+ }
package/Chatbox/index.js CHANGED
@@ -3846,6 +3846,9 @@ var Chatbox = function Chatbox(props) {
3846
3846
  setVal: function setVal(v) {
3847
3847
  if (inputContentRef.current) inputContentRef.current.set(v);
3848
3848
  },
3849
+ getContextData: function getContextData() {
3850
+ return contextDataRef.current;
3851
+ },
3849
3852
  setContextData: function setContextData(v) {
3850
3853
  contextDataRef.current = v;
3851
3854
  }
@@ -3846,6 +3846,9 @@ var Chatbox = function Chatbox(props) {
3846
3846
  setVal: function setVal(v) {
3847
3847
  if (inputContentRef.current) inputContentRef.current.set(v);
3848
3848
  },
3849
+ getContextData: function getContextData() {
3850
+ return contextDataRef.current;
3851
+ },
3849
3852
  setContextData: function setContextData(v) {
3850
3853
  contextDataRef.current = v;
3851
3854
  }
@@ -0,0 +1,413 @@
1
+ /*=================== Chatbox (Loading) =================*/
2
+ .custom-chatbox-loader-container {
3
+ width: 130px;
4
+ text-align: start;
5
+ }
6
+ .custom-chatbox-loader-container .custom-chatbox-loader {
7
+ height: 4px;
8
+ width: 100%;
9
+ --c: no-repeat linear-gradient(var(--bs-primary) 0 0);
10
+ background: var(--c), var(--c), #b9caf7;
11
+ background-size: 60% 100%;
12
+ animation: cssAnim--loadermove 3s infinite;
13
+ }
14
+
15
+ .dark-mode .custom-chatbox-loader-container .custom-chatbox-loader,
16
+ [data-bs-theme=dark] .custom-chatbox-loader-container .custom-chatbox-loader {
17
+ --c: no-repeat linear-gradient(var(--bs-primary) 0 0);
18
+ background: var(--c), var(--c), #8692b5;
19
+ }
20
+
21
+ @keyframes cssAnim--loadermove {
22
+ 0% {
23
+ background-position: -150% 0, -150% 0;
24
+ }
25
+ 66% {
26
+ background-position: 250% 0, -150% 0;
27
+ }
28
+ 100% {
29
+ background-position: 250% 0, 250% 0;
30
+ }
31
+ }
32
+ /*=================== Chatbox (Core) =================*/
33
+ .custom-chatbox-circle {
34
+ --custom-chatbox-circle-color: #5A5EB9;
35
+ --custom-chatbox-circle-text: #fff;
36
+ position: fixed;
37
+ bottom: 30px;
38
+ right: 30px;
39
+ background: var(--custom-chatbox-circle-color);
40
+ width: 50px;
41
+ height: 50px;
42
+ border-radius: 50%;
43
+ color: var(--custom-chatbox-circle-text);
44
+ cursor: pointer;
45
+ box-shadow: 0px 3px 16px 0px rgba(0, 0, 0, 0.6), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
46
+ z-index: 1030;
47
+ text-align: center;
48
+ vertical-align: middle;
49
+ transition: 0.1s ease-in-out;
50
+ }
51
+ .custom-chatbox-circle > span {
52
+ display: inline-block;
53
+ margin-top: 25%;
54
+ }
55
+ .custom-chatbox-circle:hover {
56
+ transform: scale(1.2);
57
+ }
58
+ .custom-chatbox-circle svg {
59
+ width: 30px;
60
+ height: 30px;
61
+ }
62
+ .custom-chatbox-circle svg path {
63
+ stroke: #fff;
64
+ }
65
+
66
+ .custom-chatbox-close {
67
+ --custom-chatbox-close-color: #333;
68
+ padding: 20px;
69
+ position: fixed;
70
+ bottom: calc(100vh - 55px);
71
+ z-index: 1032;
72
+ right: -15px;
73
+ cursor: pointer;
74
+ border: none;
75
+ outline: none;
76
+ background: none;
77
+ transition-delay: 0.05s; /* Prevent real-time update of store displacement */
78
+ }
79
+ .custom-chatbox-close path {
80
+ fill: var(--custom-chatbox-close-color);
81
+ }
82
+ .custom-chatbox-close:hover {
83
+ transform: scale(1.2);
84
+ }
85
+ .custom-chatbox-close:hover path {
86
+ fill: #f00;
87
+ }
88
+
89
+ .custom-chatbox-container {
90
+ --custom-chatbox-w: 600px;
91
+ --custom-chatbox-h: 100vh;
92
+ --custom-chatbox-bg: #fff;
93
+ --custom-chatbox-input-bg: #fff;
94
+ --custom-chatbox-default-txt-color: #333;
95
+ --custom-chatbox-default-btn-color: #fff;
96
+ --custom-chatbox-msg-bg: #eaeaea;
97
+ --custom-chatbox-msg-bg2: #d1e6f8;
98
+ --custom-chatbox-msg-border: #ddd;
99
+ --custom-chatbox-primary-color: #5A5EB9;
100
+ --custom-chatbox-gray-color: #adadad;
101
+ --custom-chatbox-primary-text: #333;
102
+ --custom-chatbox-disable-color: #ccc;
103
+ --custom-chatbox-stop-color: #f00;
104
+ --custom-chatbox-time-color: #96a2c1;
105
+ --custom-chatbox-msg-dotted-loader-size: 15px;
106
+ --custom-chatbox-content-w: calc(100% - 50px);
107
+ --custom-chatbox-toolkit-btn-color: #f8f9fa;
108
+ --custom-chatbox-toolkit-btn-border-color: #e9ecef;
109
+ --custom-chatbox-toolkit-btn-active-color: #c2dfff;
110
+ --custom-chatbox-newchat-btn-color: #f8f9fa;
111
+ --custom-chatbox-newchat-btn-border-color: #e9ecef;
112
+ min-width: var(--custom-chatbox-w);
113
+ max-width: var(--custom-chatbox-w);
114
+ margin: auto;
115
+ background: var(--custom-chatbox-bg);
116
+ border-radius: 8px;
117
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
118
+ padding: 20px;
119
+ position: fixed;
120
+ bottom: 0;
121
+ right: 0;
122
+ z-index: 1031;
123
+ height: var(--custom-chatbox-h);
124
+ /* message list */
125
+ /* dot loading */
126
+ /* control area */
127
+ /* loading */
128
+ /* new chat button */
129
+ /* toolkit buttons */
130
+ }
131
+ .custom-chatbox-container details {
132
+ font-style: italic;
133
+ margin: 0;
134
+ padding: 0;
135
+ font-size: 0.75rem;
136
+ margin-bottom: 0.5rem;
137
+ }
138
+ .custom-chatbox-container summary {
139
+ cursor: pointer;
140
+ font-weight: bold;
141
+ color: var(--custom-chatbox-primary-color);
142
+ outline: none;
143
+ }
144
+ .custom-chatbox-container details[open] summary {
145
+ color: var(--custom-chatbox-primary-text);
146
+ }
147
+ .custom-chatbox-container h1 {
148
+ font-size: 1.35rem;
149
+ }
150
+ .custom-chatbox-container h2 {
151
+ font-size: 1.25rem;
152
+ }
153
+ .custom-chatbox-container h3 {
154
+ font-size: 1.125rem;
155
+ }
156
+ .custom-chatbox-container h4 {
157
+ font-size: 1rem;
158
+ }
159
+ .custom-chatbox-container h5 {
160
+ font-size: 0.875rem;
161
+ }
162
+ .custom-chatbox-container h6 {
163
+ font-size: 0.75rem;
164
+ }
165
+ .custom-chatbox-container .messages {
166
+ height: calc(100% - 80px);
167
+ overflow-y: auto;
168
+ margin-bottom: 10px;
169
+ font-size: 13px;
170
+ margin-right: 0;
171
+ }
172
+ .custom-chatbox-container .messages img, .custom-chatbox-container .messages svg, .custom-chatbox-container .messages video, .custom-chatbox-container .messages canvas, .custom-chatbox-container .messages audio, .custom-chatbox-container .messages iframe, .custom-chatbox-container .messages embed, .custom-chatbox-container .messages object {
173
+ display: inline;
174
+ }
175
+ .custom-chatbox-container .messages::-webkit-scrollbar {
176
+ width: 3px;
177
+ }
178
+ .custom-chatbox-container .messages::-webkit-scrollbar-thumb {
179
+ background: rgba(0, 0, 0, 0.2);
180
+ }
181
+ .custom-chatbox-container .messages > div {
182
+ margin: 5px 0;
183
+ padding: 3px 5px;
184
+ border-radius: 0.35rem;
185
+ }
186
+ .custom-chatbox-container .messages p {
187
+ margin: 3px 0;
188
+ }
189
+ .custom-chatbox-container .messages .qa-timestamp {
190
+ font-size: 0.75rem;
191
+ color: var(--custom-chatbox-time-color);
192
+ font-style: italic;
193
+ font-weight: normal;
194
+ display: block;
195
+ text-align: right;
196
+ }
197
+ .custom-chatbox-container .messages .qa-name {
198
+ font-weight: bold;
199
+ color: var(--custom-chatbox-primary-color);
200
+ }
201
+ .custom-chatbox-container .messages .qa-name svg, .custom-chatbox-container .messages .qa-name img {
202
+ max-height: 15px;
203
+ }
204
+ .custom-chatbox-container .messages .qa-content {
205
+ background: var(--custom-chatbox-msg-bg);
206
+ padding: 0.5rem;
207
+ border-radius: 0.35rem;
208
+ margin-top: 0.3rem;
209
+ display: inline-block;
210
+ text-align: start;
211
+ }
212
+ .custom-chatbox-container .messages .request {
213
+ text-align: end;
214
+ }
215
+ .custom-chatbox-container .messages .request .qa-content {
216
+ max-width: var(--custom-chatbox-content-w);
217
+ background: var(--custom-chatbox-msg-bg2);
218
+ }
219
+ .custom-chatbox-container .messages .reply {
220
+ text-align: start;
221
+ }
222
+ .custom-chatbox-container .messages .reply .qa-name {
223
+ display: flex;
224
+ }
225
+ .custom-chatbox-container .messages .reply .qa-content {
226
+ width: var(--custom-chatbox-content-w);
227
+ }
228
+ .custom-chatbox-container .msg-dotted-loader-container {
229
+ font-weight: normal;
230
+ transform: translateY(-5px);
231
+ display: flex;
232
+ align-items: center;
233
+ margin-top: 0.4rem;
234
+ margin-left: 0.3rem;
235
+ color: var(--custom-chatbox-gray-color);
236
+ }
237
+ .custom-chatbox-container .msg-dotted-loader-text {
238
+ transform: translateY(-10%);
239
+ }
240
+ .custom-chatbox-container .msg-dotted-loader {
241
+ position: relative;
242
+ text-align: center;
243
+ display: inline-block;
244
+ width: calc(var(--custom-chatbox-msg-dotted-loader-size) * 1.5);
245
+ height: calc(var(--custom-chatbox-msg-dotted-loader-size) * 1.5);
246
+ margin-right: 0.1rem;
247
+ }
248
+ .custom-chatbox-container .msg-dotted-loader::after,
249
+ .custom-chatbox-container .msg-dotted-loader::before {
250
+ content: "";
251
+ position: absolute;
252
+ top: 0;
253
+ left: 0;
254
+ width: var(--custom-chatbox-msg-dotted-loader-size);
255
+ height: var(--custom-chatbox-msg-dotted-loader-size);
256
+ border-radius: 50%;
257
+ border: 2px var(--custom-chatbox-gray-color);
258
+ border-style: dotted solid dotted solid;
259
+ animation: turn-left 1.5s linear infinite;
260
+ }
261
+ .custom-chatbox-container .msg-dotted-loader::before {
262
+ left: calc(var(--custom-chatbox-msg-dotted-loader-size) / 2 / 2 * -1);
263
+ top: calc(var(--custom-chatbox-msg-dotted-loader-size) / 2 / 2 * -1);
264
+ width: calc(var(--custom-chatbox-msg-dotted-loader-size) + var(--custom-chatbox-msg-dotted-loader-size) / 2);
265
+ height: calc(var(--custom-chatbox-msg-dotted-loader-size) + var(--custom-chatbox-msg-dotted-loader-size) / 2);
266
+ border-style: dotted dotted solid solid;
267
+ animation: msg-dotted-loader-anim--turn-right 1.5s linear infinite;
268
+ }
269
+ @keyframes msg-dotted-loader-anim--turn-right {
270
+ 0% {
271
+ transform: rotate(0deg);
272
+ }
273
+ 100% {
274
+ transform: rotate(360deg);
275
+ }
276
+ }
277
+ @keyframes turn-left {
278
+ 0% {
279
+ transform: rotate(0deg);
280
+ }
281
+ 100% {
282
+ transform: rotate(-360deg);
283
+ }
284
+ }
285
+ .custom-chatbox-container .msgcontrol {
286
+ display: flex;
287
+ position: absolute;
288
+ bottom: 10px;
289
+ z-index: 1;
290
+ width: calc(100% - 40px);
291
+ }
292
+ .custom-chatbox-container .msgcontrol img, .custom-chatbox-container .msgcontrol svg, .custom-chatbox-container .msgcontrol video, .custom-chatbox-container .msgcontrol canvas, .custom-chatbox-container .msgcontrol audio, .custom-chatbox-container .msgcontrol iframe, .custom-chatbox-container .msgcontrol embed, .custom-chatbox-container .msgcontrol object {
293
+ display: inline;
294
+ }
295
+ .custom-chatbox-container .msgcontrol .messageInput {
296
+ width: 100%;
297
+ border: 1px solid var(--custom-chatbox-msg-border);
298
+ border-radius: 4px;
299
+ font-size: 0.875rem;
300
+ border: none;
301
+ outline: none;
302
+ }
303
+ .custom-chatbox-container .msgcontrol .messageInput:focus, .custom-chatbox-container .msgcontrol .messageInput:focus-visible {
304
+ outline: none;
305
+ }
306
+ .custom-chatbox-container .msgcontrol .messageInput .messageInput-control {
307
+ background: var(--custom-chatbox-input-bg);
308
+ padding: 0.5rem;
309
+ border-radius: 0.35rem;
310
+ width: 100%;
311
+ color: var(--custom-chatbox-default-txt-color);
312
+ resize: none;
313
+ max-height: 50vh;
314
+ border: 1px solid var(--custom-chatbox-gray-color);
315
+ }
316
+ .custom-chatbox-container .msgcontrol .messageInput .messageInput-control::-webkit-scrollbar {
317
+ width: 3px;
318
+ }
319
+ .custom-chatbox-container .msgcontrol .messageInput .messageInput-control::-webkit-scrollbar-thumb {
320
+ background: rgba(0, 0, 0, 0.2);
321
+ }
322
+ .custom-chatbox-container .msgcontrol .messageInput .messageInput-control:focus, .custom-chatbox-container .msgcontrol .messageInput .messageInput-control:focus-visible {
323
+ border-color: transparent;
324
+ outline: 1px solid var(--custom-chatbox-primary-color);
325
+ }
326
+ .custom-chatbox-container .msgcontrol button {
327
+ padding: 6px;
328
+ border: none;
329
+ position: absolute;
330
+ background-color: var(--custom-chatbox-primary-color);
331
+ color: var(--custom-chatbox-default-btn-color);
332
+ border: 1px solid var(--custom-chatbox-primary-color);
333
+ border-radius: 50%;
334
+ cursor: pointer;
335
+ margin-left: 0.5rem;
336
+ min-width: 30px;
337
+ font-size: 0.875rem;
338
+ z-index: 2;
339
+ right: 0.4rem;
340
+ bottom: 0.7rem;
341
+ width: 40px;
342
+ height: 40px;
343
+ padding: 0;
344
+ }
345
+ .custom-chatbox-container .msgcontrol button path {
346
+ fill: var(--custom-chatbox-default-btn-color);
347
+ }
348
+ .custom-chatbox-container .msgcontrol button:hover {
349
+ transform: scale(1.1);
350
+ }
351
+ .custom-chatbox-container .msgcontrol button:disabled {
352
+ opacity: 0.7;
353
+ }
354
+ .custom-chatbox-container .msgcontrol button.is-suspended {
355
+ background-color: var(--custom-chatbox-stop-color);
356
+ border-color: var(--custom-chatbox-stop-color);
357
+ }
358
+ .custom-chatbox-container .loading {
359
+ margin-top: 0;
360
+ height: 5px;
361
+ position: absolute;
362
+ bottom: 5px;
363
+ width: calc(100% - 40px);
364
+ z-index: 1;
365
+ }
366
+ .custom-chatbox-container .newchat-btn {
367
+ text-align: center;
368
+ }
369
+ .custom-chatbox-container .newchat-btn > button {
370
+ padding: 3px 6px;
371
+ background-color: var(--custom-chatbox-newchat-btn-color);
372
+ border: 1px solid var(--custom-chatbox-newchat-btn-border-color);
373
+ border-radius: 20px;
374
+ cursor: pointer;
375
+ transition: all 0.3s ease;
376
+ font-size: 0.8125rem;
377
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
378
+ }
379
+ .custom-chatbox-container .newchat-btn > button img, .custom-chatbox-container .newchat-btn > button svg, .custom-chatbox-container .newchat-btn > button video, .custom-chatbox-container .newchat-btn > button canvas, .custom-chatbox-container .newchat-btn > button audio, .custom-chatbox-container .newchat-btn > button iframe, .custom-chatbox-container .newchat-btn > button embed, .custom-chatbox-container .newchat-btn > button object {
380
+ display: inline;
381
+ }
382
+ .custom-chatbox-container .newchat-btn > button:hover {
383
+ transform: translateY(-2px);
384
+ }
385
+ .custom-chatbox-container .toolkit-btns {
386
+ display: flex;
387
+ position: absolute;
388
+ bottom: 20px;
389
+ margin-left: 5px;
390
+ z-index: 1;
391
+ flex-wrap: wrap;
392
+ gap: 8px;
393
+ justify-content: center;
394
+ }
395
+ .custom-chatbox-container .toolkit-btns > button {
396
+ padding: 3px 6px;
397
+ background-color: var(--custom-chatbox-toolkit-btn-color);
398
+ border: 1px solid var(--custom-chatbox-toolkit-btn-border-color);
399
+ border-radius: 20px;
400
+ cursor: pointer;
401
+ transition: all 0.3s ease;
402
+ font-size: 0.75rem;
403
+ }
404
+ .custom-chatbox-container .toolkit-btns > button img, .custom-chatbox-container .toolkit-btns > button svg, .custom-chatbox-container .toolkit-btns > button video, .custom-chatbox-container .toolkit-btns > button canvas, .custom-chatbox-container .toolkit-btns > button audio, .custom-chatbox-container .toolkit-btns > button iframe, .custom-chatbox-container .toolkit-btns > button embed, .custom-chatbox-container .toolkit-btns > button object {
405
+ display: inline;
406
+ }
407
+ .custom-chatbox-container .toolkit-btns > button:hover {
408
+ background-color: var(--custom-chatbox-toolkit-btn-border-color);
409
+ transform: translateY(-2px);
410
+ }
411
+ .custom-chatbox-container .toolkit-btns > button.active {
412
+ background-color: var(--custom-chatbox-toolkit-btn-active-color);
413
+ }
@@ -201,7 +201,10 @@
201
201
  font-size: 13px;
202
202
  margin-right: 0;
203
203
 
204
-
204
+ img, svg, video, canvas, audio, iframe, embed, object {
205
+ display: inline;
206
+ }
207
+
205
208
  &::-webkit-scrollbar {
206
209
  width: 3px;
207
210
  }
@@ -344,6 +347,10 @@
344
347
  z-index: 1;
345
348
  width: calc(100% - 40px);
346
349
 
350
+ img, svg, video, canvas, audio, iframe, embed, object {
351
+ display: inline;
352
+ }
353
+
347
354
  .messageInput {
348
355
  width: 100%;
349
356
  border: 1px solid var(--custom-chatbox-msg-border);
@@ -366,7 +373,7 @@
366
373
  color: var(--custom-chatbox-default-txt-color);
367
374
  resize: none;
368
375
  max-height: 50vh;
369
- border-color: var(--custom-chatbox-gray-color);
376
+ border: 1px solid var(--custom-chatbox-gray-color);
370
377
 
371
378
  &::-webkit-scrollbar {
372
379
  width: 3px;
@@ -453,6 +460,10 @@
453
460
  font-size: 0.8125rem;
454
461
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
455
462
 
463
+ img, svg, video, canvas, audio, iframe, embed, object {
464
+ display: inline;
465
+ }
466
+
456
467
  &:hover {
457
468
  transform: translateY(-2px);
458
469
  }
@@ -483,6 +494,11 @@
483
494
  transition: all 0.3s ease;
484
495
  font-size: 0.75rem;
485
496
 
497
+
498
+ img, svg, video, canvas, audio, iframe, embed, object {
499
+ display: inline;
500
+ }
501
+
486
502
  &:hover {
487
503
  background-color: var(--custom-chatbox-toolkit-btn-border-color);
488
504
  transform: translateY(-2px);
@@ -154,6 +154,9 @@ const Chatbox = (props: ChatboxProps) => {
154
154
  setVal: (v: string) => {
155
155
  if (inputContentRef.current) inputContentRef.current.set(v);
156
156
  },
157
+ getContextData: () => {
158
+ return contextDataRef.current;
159
+ },
157
160
  setContextData: (v: Record<string, any>) => {
158
161
  contextDataRef.current = v;
159
162
  },
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "UIUX Lab",
3
3
  "email": "uiuxlab@gmail.com",
4
4
  "name": "funda-ui",
5
- "version": "4.5.766",
5
+ "version": "4.5.777",
6
6
  "description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
7
7
  "repository": {
8
8
  "type": "git",