code7-leia 0.1.44 → 0.1.46

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.
Files changed (30) hide show
  1. package/dist/code7-leia.cjs.development.js +241 -50
  2. package/dist/code7-leia.cjs.development.js.map +1 -1
  3. package/dist/code7-leia.cjs.production.min.js +1 -1
  4. package/dist/code7-leia.cjs.production.min.js.map +1 -1
  5. package/dist/code7-leia.esm.js +242 -51
  6. package/dist/code7-leia.esm.js.map +1 -1
  7. package/dist/components/FileArea/components/Modal/ModalButtonClose.d.ts +6 -0
  8. package/dist/components/FileArea/components/Modal/ModalContent.d.ts +8 -0
  9. package/dist/components/FileArea/components/Modal/ModalFooter.d.ts +6 -0
  10. package/dist/components/FileArea/components/Modal/ModalHeader.d.ts +6 -0
  11. package/dist/components/FileArea/components/Modal/ModalTitle.d.ts +6 -0
  12. package/dist/components/FileArea/components/Modal/index.d.ts +22 -0
  13. package/dist/components/FileArea/components/Modal/styles.d.ts +26 -0
  14. package/dist/interface/Language.d.ts +1 -0
  15. package/package.json +1 -1
  16. package/src/components/FileArea/components/Modal/ModalButtonClose.tsx +23 -0
  17. package/src/components/FileArea/components/Modal/ModalContent.tsx +26 -0
  18. package/src/components/FileArea/components/Modal/ModalFooter.tsx +18 -0
  19. package/src/components/FileArea/components/Modal/ModalHeader.tsx +18 -0
  20. package/src/components/FileArea/components/Modal/ModalTitle.tsx +18 -0
  21. package/src/components/FileArea/components/Modal/index.tsx +131 -0
  22. package/src/components/FileArea/components/Modal/styles.tsx +121 -0
  23. package/src/components/FileArea/index.tsx +50 -3
  24. package/src/components/TestArea/index.tsx +1 -1
  25. package/src/interface/Language.ts +1 -0
  26. package/src/utils/getLanguage.tsx +2 -0
  27. /package/dist/components/{TestArea/components/Select → Select}/index.d.ts +0 -0
  28. /package/dist/components/{TestArea/components/Select → Select}/styles.d.ts +0 -0
  29. /package/src/components/{TestArea/components/Select → Select}/index.tsx +0 -0
  30. /package/src/components/{TestArea/components/Select → Select}/styles.tsx +0 -0
@@ -1,12 +1,12 @@
1
- import React, { forwardRef, useState, useEffect, useMemo, Suspense } from 'react';
1
+ import React, { forwardRef, useRef, useCallback, useEffect, useState, useMemo, Suspense } from 'react';
2
2
  import { useLocation, useRouteMatch, useHistory, Switch, Route } from 'react-router-dom';
3
3
  import PropTypes from 'prop-types';
4
4
  import cc from 'classcat';
5
5
  import styled from 'styled-components';
6
6
  import { FaSearch, FaUpload, FaList, FaPlus, FaMicrophone } from 'react-icons/fa';
7
7
  import unorm from 'unorm';
8
+ import { MdClose, MdPerson2 } from 'react-icons/md';
8
9
  import { PiWaveformBold } from 'react-icons/pi';
9
- import { MdPerson2 } from 'react-icons/md';
10
10
 
11
11
  function _extends() {
12
12
  _extends = Object.assign ? Object.assign.bind() : function (target) {
@@ -119,7 +119,8 @@ var defaultLanguage = {
119
119
  },
120
120
  modal: {
121
121
  descriptionUpload: 'Drag and drop files here or',
122
- chooseFile: 'Choose a file'
122
+ chooseFile: 'Choose a file',
123
+ uploadFile: 'Upload a file'
123
124
  }
124
125
  },
125
126
  buttons: {
@@ -156,7 +157,8 @@ var getLanguage = function getLanguage(language) {
156
157
  }),
157
158
  modal: _extends({}, defaultLanguage.fileArea.modal, {
158
159
  descriptionUpload: 'Arraste e solte os arquivos aqui ou',
159
- chooseFile: 'Escolha um arquivo'
160
+ chooseFile: 'Escolha um arquivo',
161
+ uploadFile: 'Enviar um arquivo'
160
162
  })
161
163
  }),
162
164
  buttons: _extends({}, defaultLanguage.buttons, {
@@ -305,8 +307,158 @@ var SearchInput = function SearchInput(_ref) {
305
307
  }, React.createElement(FaSearch, null)));
306
308
  };
307
309
 
308
- var _templateObject$4;
309
- var Container$1 = /*#__PURE__*/styled.div(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n justify-content: center;\n padding: 24px 0;\n height: 193px;\n\n background: ", ";\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 40px 1px, 1px 40px;\n background-color: ", ";\n\n & .content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n & > .icon {\n background-color: ", ";\n border-radius: 16px;\n width: 145px;\n height: 145px;\n\n display: flex;\n justify-content: center;\n\n & svg {\n width: 100%;\n height: 70%;\n margin: 20px;\n }\n }\n\n & .description {\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 8px 0 8px 24px;\n\n .button-add {\n cursor: pointer;\n }\n\n .start-icon {\n display: flex;\n align-items: center;\n }\n }\n }\n"])), function (_ref) {
310
+ var _templateObject$4, _templateObject2$3, _templateObject3$1, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
311
+ var FullScreen = /*#__PURE__*/styled.div(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: ", ";\n cursor: ", ";\n\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n justify-content: center;\n align-items: center;\n z-index: ", ";\n animation: fadeIn 380ms ease-in-out 1;\n background-color: #2f3845b8;\n backdrop-filter: blur(2px);\n\n @keyframes fadeIn {\n from {\n background-color: #2f384521;\n }\n to {\n background-color: #2f3845b8;\n }\n }\n"])), function (_ref) {
312
+ var isOpen = _ref.isOpen;
313
+ return isOpen === 1 ? 'flex' : 'none';
314
+ }, function (_ref2) {
315
+ var isFixed = _ref2.isFixed;
316
+ return isFixed === 0 ? 'pointer' : 'default';
317
+ }, function (_ref3) {
318
+ var zIndex = _ref3.zIndex;
319
+ return zIndex;
320
+ });
321
+ var Modal = /*#__PURE__*/styled.div(_templateObject2$3 || (_templateObject2$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: #fff;\n border-radius: 3px;\n position: relative;\n cursor: default;\n width: 100%;\n max-width: ", ";\n animation: slideIn 350ms cubic-bezier(0.42, 0, 0.21, 1) 1;\n\n @keyframes slideIn {\n from {\n transform: translateY(-120px);\n opacity: 0;\n }\n\n 20% {\n opacity: 0;\n }\n\n to {\n transform: translateY(0);\n opacity: 1;\n }\n }\n"])), function (_ref4) {
322
+ var maxWidth = _ref4.maxWidth;
323
+ return maxWidth;
324
+ });
325
+ var ModalContainer = /*#__PURE__*/styled.div(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n overflow-y: auto;\n max-height: ", ";\n"])), function (_ref5) {
326
+ var maxHeight = _ref5.maxHeight;
327
+ return maxHeight;
328
+ });
329
+ var ModalHeader = /*#__PURE__*/styled.header(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid #dadce3;\n padding: var(--spacement-medium);\n"])));
330
+ var ModalTitle = /*#__PURE__*/styled.div(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-style: normal;\n font-weight: normal;\n font-size: 20px;\n line-height: 150%;\n letter-spacing: 0.0075em;\n color: var(--neutral-4);\n"])));
331
+ var ModalButtonClose = /*#__PURE__*/styled.button(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n outline: none;\n cursor: pointer;\n\n :hover {\n opacity: 0.7;\n }\n"])));
332
+ var ModalContentWrapper = /*#__PURE__*/styled.div(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n overflow-y: ", ";\n max-height: ", ";\n padding: var(--spacement-medium);\n"])), function (_ref6) {
333
+ var overflowY = _ref6.overflowY;
334
+ return overflowY;
335
+ }, function (_ref7) {
336
+ var maxHeight = _ref7.maxHeight;
337
+ return maxHeight;
338
+ });
339
+ var ModalFooterWrapper = /*#__PURE__*/styled.div(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: var(--spacement-medium);\n background: var(--neutral-0);\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--spacement-medium);\n"])));
340
+
341
+ var _excluded$2 = ["children"];
342
+ var ModalFooter = function ModalFooter(_ref) {
343
+ var children = _ref.children,
344
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
345
+ return React.createElement(ModalFooterWrapper, Object.assign({}, rest), children);
346
+ };
347
+ ModalFooter.propTypes = {
348
+ children: PropTypes.node.isRequired
349
+ };
350
+
351
+ var _excluded$3 = ["children", "maxHeight", "overflowY"];
352
+ var ModalContent = function ModalContent(_ref) {
353
+ var children = _ref.children,
354
+ _ref$maxHeight = _ref.maxHeight,
355
+ maxHeight = _ref$maxHeight === void 0 ? 'max-content' : _ref$maxHeight,
356
+ _ref$overflowY = _ref.overflowY,
357
+ overflowY = _ref$overflowY === void 0 ? 'initial' : _ref$overflowY,
358
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
359
+ return React.createElement(ModalContentWrapper, Object.assign({
360
+ maxHeight: maxHeight,
361
+ overflowY: overflowY
362
+ }, rest), children);
363
+ };
364
+ ModalContent.propTypes = {
365
+ children: PropTypes.node.isRequired,
366
+ maxHeight: PropTypes.string,
367
+ overflowY: PropTypes.string
368
+ };
369
+
370
+ var Modal$1 = function Modal$1(_ref) {
371
+ var isOpen = _ref.isOpen,
372
+ style = _ref.style,
373
+ maxWidth = _ref.maxWidth,
374
+ maxHeight = _ref.maxHeight,
375
+ className = _ref.className,
376
+ title = _ref.title,
377
+ children = _ref.children,
378
+ onClose = _ref.onClose,
379
+ contentStyle = _ref.contentStyle,
380
+ isFixed = _ref.isFixed,
381
+ zIndex = _ref.zIndex;
382
+ var modalRef = useRef(null);
383
+ var handleKeyUp = useCallback(function (e) {
384
+ var keys = {
385
+ // ESC Key
386
+ 27: function _() {
387
+ e.preventDefault();
388
+ if (!isFixed && onClose) {
389
+ onClose();
390
+ }
391
+ window.removeEventListener('keyup', handleKeyUp, false);
392
+ }
393
+ };
394
+ if (keys[e.keyCode] && isOpen) {
395
+ keys[e.keyCode]();
396
+ }
397
+ }, [onClose, isOpen, isFixed]);
398
+ var handleOutsideClick = useCallback(function (e) {
399
+ if (modalRef.current && modalRef.current.parentNode === e.target) {
400
+ if (!isFixed && onClose) {
401
+ onClose();
402
+ }
403
+ document.removeEventListener('click', handleOutsideClick, false);
404
+ }
405
+ }, [onClose, isFixed]);
406
+ useEffect(function () {
407
+ window.addEventListener('keyup', handleKeyUp, false);
408
+ document.addEventListener('click', handleOutsideClick, false);
409
+ return function () {
410
+ window.removeEventListener('keyup', handleKeyUp, false);
411
+ document.removeEventListener('click', handleOutsideClick, false);
412
+ };
413
+ }, [handleKeyUp, handleOutsideClick]);
414
+ return React.createElement(FullScreen, {
415
+ isFixed: isFixed ? 1 : 0,
416
+ isOpen: isOpen ? 1 : 0,
417
+ zIndex: zIndex != null ? zIndex : 0
418
+ }, React.createElement(Modal, {
419
+ ref: modalRef,
420
+ style: style,
421
+ maxWidth: maxWidth,
422
+ className: className
423
+ }, React.createElement(ModalContainer, {
424
+ className: "styleOverlay",
425
+ maxHeight: maxHeight,
426
+ style: contentStyle
427
+ }, React.createElement(ModalHeader, null, React.createElement(ModalTitle, null, String(title)), React.createElement(ModalButtonClose, {
428
+ type: "button",
429
+ onClick: onClose
430
+ }, React.createElement(MdClose, {
431
+ color: "#5A5D68",
432
+ size: 16
433
+ }))), children)));
434
+ };
435
+ Modal$1.propTypes = {
436
+ isOpen: PropTypes.bool.isRequired,
437
+ title: /*#__PURE__*/PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.func]),
438
+ children: PropTypes.node.isRequired,
439
+ onClose: PropTypes.func,
440
+ style: /*#__PURE__*/PropTypes.objectOf(PropTypes.any),
441
+ contentStyle: /*#__PURE__*/PropTypes.objectOf(PropTypes.any),
442
+ className: PropTypes.string,
443
+ maxWidth: PropTypes.string,
444
+ maxHeight: PropTypes.string,
445
+ isFixed: PropTypes.bool,
446
+ zIndex: PropTypes.number
447
+ };
448
+ Modal$1.defaultProps = {
449
+ title: '',
450
+ style: {},
451
+ contentStyle: {},
452
+ className: '',
453
+ maxWidth: '360px',
454
+ maxHeight: 'max-content',
455
+ isFixed: false,
456
+ onClose: function onClose() {},
457
+ zIndex: 9999
458
+ };
459
+
460
+ var _templateObject$5;
461
+ var Container$1 = /*#__PURE__*/styled.div(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n justify-content: center;\n padding: 24px 0;\n height: 193px;\n\n background: ", ";\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 40px 1px, 1px 40px;\n background-color: ", ";\n\n & .content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n & > .icon {\n background-color: ", ";\n border-radius: 16px;\n width: 145px;\n height: 145px;\n\n display: flex;\n justify-content: center;\n\n & svg {\n width: 100%;\n height: 70%;\n margin: 20px;\n }\n }\n\n & .description {\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 8px 0 8px 24px;\n\n .button-add {\n cursor: pointer;\n }\n\n .start-icon {\n display: flex;\n align-items: center;\n }\n }\n }\n"])), function (_ref) {
310
462
  var hasBorder = _ref.hasBorder;
311
463
  return hasBorder && "linear-gradient(\n to right,\n #dadce3 50%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, #dadce3 50%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%)";
312
464
  }, function (_ref2) {
@@ -317,7 +469,7 @@ var Container$1 = /*#__PURE__*/styled.div(_templateObject$4 || (_templateObject$
317
469
  return backgroundIcon;
318
470
  });
319
471
 
320
- var _excluded$2 = ["icon", "title", "description", "activeButton", "iconButton", "descriptionButton", "widthButton", "button", "backgroundIcon", "backgroundColor", "hasBorder"];
472
+ var _excluded$4 = ["icon", "title", "description", "activeButton", "iconButton", "descriptionButton", "widthButton", "button", "backgroundIcon", "backgroundColor", "hasBorder"];
321
473
  var EmptyState = function EmptyState(_ref) {
322
474
  var icon = _ref.icon,
323
475
  title = _ref.title,
@@ -328,7 +480,7 @@ var EmptyState = function EmptyState(_ref) {
328
480
  backgroundIcon = _ref.backgroundIcon,
329
481
  backgroundColor = _ref.backgroundColor,
330
482
  hasBorder = _ref.hasBorder,
331
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
483
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
332
484
  return React.createElement(Container$1, Object.assign({
333
485
  backgroundIcon: backgroundIcon,
334
486
  backgroundColor: backgroundColor,
@@ -366,6 +518,36 @@ EmptyState.defaultProps = {
366
518
  hasBorder: true
367
519
  };
368
520
 
521
+ var _templateObject$6;
522
+ var Container$2 = /*#__PURE__*/styled.div(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: 50%;\n margin-right: 5px;\n select {\n padding: 12px;\n border-radius: 4px;\n border: 1px solid #979AA5;\n width: 100%;\n height: 40px;\n \n &:focus {\n outline: none;\n box-shadow: 0 0 0 3px #6690ff;\n }\n\n option {\n background: white;\n font-size: 14px;\n color: #5a5d68;\n }\n\n option:checked, option:hover {\n background: #6690ff;\n font-size: 14px;\n color: white;\n }\n }\n"])));
523
+
524
+ var Select = function Select(_ref) {
525
+ var options = _ref.options,
526
+ onSelect = _ref.onSelect,
527
+ placeholder = _ref.placeholder;
528
+ var _useState = useState(''),
529
+ selectedValue = _useState[0],
530
+ setSelectedValue = _useState[1];
531
+ var handleSelectChange = function handleSelectChange(event) {
532
+ var selectedOption = event.target.value;
533
+ setSelectedValue(selectedOption);
534
+ onSelect(selectedOption);
535
+ };
536
+ return React.createElement(Container$2, null, React.createElement("select", {
537
+ value: selectedValue,
538
+ onChange: handleSelectChange
539
+ }, React.createElement("option", {
540
+ value: "",
541
+ disabled: true,
542
+ hidden: true
543
+ }, placeholder), options.map(function (option) {
544
+ return React.createElement("option", {
545
+ key: option.value,
546
+ value: option.value
547
+ }, option.label);
548
+ })));
549
+ };
550
+
369
551
  var FileArea = function FileArea() {
370
552
  var _useState = useState([]),
371
553
  files = _useState[0],
@@ -375,8 +557,12 @@ var FileArea = function FileArea() {
375
557
  setInitialFiles = _useState2[1];
376
558
  var _useLocation = useLocation(),
377
559
  pathname = _useLocation.pathname;
560
+ var _useState3 = useState(false),
561
+ modal = _useState3[0],
562
+ setModal = _useState3[1];
378
563
  var id = pathname.split('/')[4];
379
564
  var t = getLanguage('pt-br');
565
+ var tags = ["pae", "boteria", "vr", "code7", "vidalink"];
380
566
  useEffect(function () {
381
567
  setFiles([{
382
568
  "name": "Documentação conceitual Code7_v3",
@@ -408,6 +594,12 @@ var FileArea = function FileArea() {
408
594
  useEffect(function () {
409
595
  console.log('files, id, t: ', files, id, t);
410
596
  }, [files]);
597
+ var optionsPresset = tags.map(function (tag) {
598
+ return {
599
+ label: tag,
600
+ value: tag
601
+ };
602
+ });
411
603
  var presset = function presset(tags) {
412
604
  var tagsSplit = tags.split(',');
413
605
  var html = '';
@@ -416,6 +608,12 @@ var FileArea = function FileArea() {
416
608
  }).join('');
417
609
  return html;
418
610
  };
611
+ var handleOpenModal = function handleOpenModal() {
612
+ setModal(!modal);
613
+ };
614
+ var handleSelect = function handleSelect(value) {
615
+ console.log(value);
616
+ };
419
617
  var renderFiles = function renderFiles() {
420
618
  return React.createElement(Container, null, React.createElement(Header, null, React.createElement("div", {
421
619
  className: 'infos'
@@ -425,7 +623,9 @@ var FileArea = function FileArea() {
425
623
  placeholder: t.fileArea.search,
426
624
  setFiles: setFiles,
427
625
  initialFiles: initialFiles
428
- }), React.createElement("button", null, React.createElement(FaUpload, null), " ", t.fileArea.fileUpload))), files.length === 0 ? React.createElement(EmptyState, {
626
+ }), React.createElement("button", {
627
+ onClick: handleOpenModal
628
+ }, React.createElement(FaUpload, null), " ", t.fileArea.fileUpload))), files.length === 0 ? React.createElement(EmptyState, {
429
629
  icon: React.createElement(FaList, null),
430
630
  title: t.fileArea.emptyState.title,
431
631
  description: t.fileArea.emptyState.description,
@@ -455,52 +655,43 @@ var FileArea = function FileArea() {
455
655
  }, React.createElement("button", {
456
656
  className: 'buttonDelete'
457
657
  }, t.buttons["delete"]))));
458
- }))));
658
+ }))), React.createElement(Modal$1, {
659
+ isOpen: modal,
660
+ maxWidth: "1100px",
661
+ maxHeight: "max-content",
662
+ onClose: handleOpenModal,
663
+ title: t.fileArea.modal.uploadFile
664
+ }, React.createElement(ModalContent, null, React.createElement("div", null, React.createElement("input", {
665
+ type: "file",
666
+ id: "file",
667
+ name: "file"
668
+ }), React.createElement("label", {
669
+ htmlFor: "file"
670
+ }, t.fileArea.modal.chooseFile), React.createElement(Select, {
671
+ placeholder: t.testArea.selectPresset,
672
+ options: optionsPresset,
673
+ onSelect: handleSelect
674
+ }))), React.createElement(ModalFooter, null, React.createElement("button", {
675
+ onClick: handleOpenModal
676
+ }, t.buttons.cancel), React.createElement("button", {
677
+ type: "submit",
678
+ form: "form-tts"
679
+ }, t.buttons.send))));
459
680
  };
460
681
  return React.createElement(Container, null, renderFiles());
461
682
  };
462
683
 
463
- var _templateObject$5, _templateObject2$3, _templateObject3$1, _templateObject4;
464
- var Container$2 = /*#__PURE__*/styled.div(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\n"])));
465
- var Header$1 = /*#__PURE__*/styled.div(_templateObject2$3 || (_templateObject2$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n .infos {\n display: flex;\n flex-direction: column;\n padding: 14px 0;\n\n h2 {\n font-size: 20px\n }\n\n p {\n font-size: 14px\n }\n }\n"])));
466
- var Inputs = /*#__PURE__*/styled.div(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n margin-bottom: 10px;\n\n button {\n background: #102693;\n padding: 10px 20px;\n color: white;\n border-radius: 4px;\n width: 190px;\n height: 40px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n svg {\n width: 23px;\n height: 23px;\n }\n }\n"])));
467
- var Result = /*#__PURE__*/styled.div(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: left;\n background: #F3F5F9;\n padding: 15px;\n border-radius: 5px;\n margin-top: 15px;\n\n .text{\n margin-left: 5px;\n font-size: 14px;\n }\n\n .icon {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 5px;\n\n svg {\n width: 35px;\n height: 35px;\n }\n }\n\n"])));
468
-
469
- var _templateObject$6;
470
- var Container$3 = /*#__PURE__*/styled.div(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: 50%;\n margin-right: 5px;\n select {\n padding: 12px;\n border-radius: 4px;\n border: 1px solid #979AA5;\n width: 100%;\n height: 40px;\n \n &:focus {\n outline: none;\n box-shadow: 0 0 0 3px #6690ff;\n }\n\n option {\n background: white;\n font-size: 14px;\n color: #5a5d68;\n }\n\n option:checked, option:hover {\n background: #6690ff;\n font-size: 14px;\n color: white;\n }\n }\n"])));
471
-
472
- var Select = function Select(_ref) {
473
- var options = _ref.options,
474
- onSelect = _ref.onSelect,
475
- placeholder = _ref.placeholder;
476
- var _useState = useState(''),
477
- selectedValue = _useState[0],
478
- setSelectedValue = _useState[1];
479
- var handleSelectChange = function handleSelectChange(event) {
480
- var selectedOption = event.target.value;
481
- setSelectedValue(selectedOption);
482
- onSelect(selectedOption);
483
- };
484
- return React.createElement(Container$3, null, React.createElement("select", {
485
- value: selectedValue,
486
- onChange: handleSelectChange
487
- }, React.createElement("option", {
488
- value: "",
489
- disabled: true,
490
- hidden: true
491
- }, placeholder), options.map(function (option) {
492
- return React.createElement("option", {
493
- key: option.value,
494
- value: option.value
495
- }, option.label);
496
- })));
497
- };
498
-
499
684
  var _templateObject$7, _templateObject2$4, _templateObject3$2, _templateObject4$1;
500
- var Container$4 = /*#__PURE__*/styled.div(_templateObject$7 || (_templateObject$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: 100%;\n margin-right: 5px;\n"])));
501
- var StyledInput = /*#__PURE__*/styled.input(_templateObject2$4 || (_templateObject2$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding-left: 10px;\n padding-right: 40px;\n border-radius: 5px;\n border: 1px solid #ccc;\n height: 40px;\n width: 100%;\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 3px #6690ff;\n }\n"])));
502
- var RecordAudioButton = /*#__PURE__*/styled.div(_templateObject3$2 || (_templateObject3$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n top: 10px;\n right: 10px;\n cursor: pointer;\n"])));
503
- var StyledMicrophoneIcon = /*#__PURE__*/styled(FaMicrophone)(_templateObject4$1 || (_templateObject4$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n pointer-events: none;\n"])));
685
+ var Container$3 = /*#__PURE__*/styled.div(_templateObject$7 || (_templateObject$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\n"])));
686
+ var Header$1 = /*#__PURE__*/styled.div(_templateObject2$4 || (_templateObject2$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n .infos {\n display: flex;\n flex-direction: column;\n padding: 14px 0;\n\n h2 {\n font-size: 20px\n }\n\n p {\n font-size: 14px\n }\n }\n"])));
687
+ var Inputs = /*#__PURE__*/styled.div(_templateObject3$2 || (_templateObject3$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n margin-bottom: 10px;\n\n button {\n background: #102693;\n padding: 10px 20px;\n color: white;\n border-radius: 4px;\n width: 190px;\n height: 40px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n svg {\n width: 23px;\n height: 23px;\n }\n }\n"])));
688
+ var Result = /*#__PURE__*/styled.div(_templateObject4$1 || (_templateObject4$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: left;\n background: #F3F5F9;\n padding: 15px;\n border-radius: 5px;\n margin-top: 15px;\n\n .text{\n margin-left: 5px;\n font-size: 14px;\n }\n\n .icon {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 5px;\n\n svg {\n width: 35px;\n height: 35px;\n }\n }\n\n"])));
689
+
690
+ var _templateObject$8, _templateObject2$5, _templateObject3$3, _templateObject4$2;
691
+ var Container$4 = /*#__PURE__*/styled.div(_templateObject$8 || (_templateObject$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: 100%;\n margin-right: 5px;\n"])));
692
+ var StyledInput = /*#__PURE__*/styled.input(_templateObject2$5 || (_templateObject2$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding-left: 10px;\n padding-right: 40px;\n border-radius: 5px;\n border: 1px solid #ccc;\n height: 40px;\n width: 100%;\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 3px #6690ff;\n }\n"])));
693
+ var RecordAudioButton = /*#__PURE__*/styled.div(_templateObject3$3 || (_templateObject3$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n top: 10px;\n right: 10px;\n cursor: pointer;\n"])));
694
+ var StyledMicrophoneIcon = /*#__PURE__*/styled(FaMicrophone)(_templateObject4$2 || (_templateObject4$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n pointer-events: none;\n"])));
504
695
 
505
696
  var InputTest = function InputTest(_ref) {
506
697
  var placeholder = _ref.placeholder,
@@ -571,7 +762,7 @@ var TestArea = function TestArea() {
571
762
  "message": "Você precisa seguir algumas etapas importantes para ter um chatbot perfeito. Primeiro, defina claramente o objetivo do seu chatbot. Em seguida, crie uma mensagem de saudação cativante para atrair a atenção dos usuários. Não se esqueça de pedir feedbacks para melhorar constantemente o desempenho do seu chatbot. Além disso, construa um fluxo de conversa simples e utilize respostas curtas para manter a interação rápida e eficiente. Também é importante incorporar inteligência artificial para tornar o seu chatbot especialista em determinado assunto. Teste o seu bot antes de lançá-lo e personalize-o de acordo com as necessidades dos usuários. Por fim, direcione os usuários para um atendimento humano quando necessário. Seguindo essas dicas, você estará no caminho certo para ter um chatbot perfeito!"
572
763
  });
573
764
  };
574
- return React.createElement(Container$2, null, React.createElement(Header$1, null, React.createElement("div", {
765
+ return React.createElement(Container$3, null, React.createElement(Header$1, null, React.createElement("div", {
575
766
  className: 'infos'
576
767
  }, React.createElement("h2", null, t.test), React.createElement("p", null, t.testArea.description))), React.createElement(Inputs, null, React.createElement(InputTest, {
577
768
  placeholder: t.testArea.typeSentence,