UNPKG

chatbot-test-william

Version:

A flexible and customizable React chat component that supports context-aware conversations and document processing

1 lines 7.09 kB
{"version":3,"sources":["../src/App.css","../src/index.css"],"sourcesContent":["@import url(\"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap\");\r\n\r\nbody {\r\n font-family: \"Poppins\", sans-serif;\r\n}\r\n\r\n.App {\r\n text-align: center;\r\n display: flex;\r\n}\r\n\r\n.App-logo {\r\n height: 40vmin;\r\n pointer-events: none;\r\n}\r\n\r\n@media (prefers-reduced-motion: no-preference) {\r\n .App-logo {\r\n animation: App-logo-spin infinite 20s linear;\r\n }\r\n}\r\n\r\n.App-header {\r\n background-color: #282c34;\r\n min-height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: calc(10px + 2vmin);\r\n color: white;\r\n}\r\n\r\n.App-link {\r\n color: #61dafb;\r\n}\r\n\r\n@keyframes App-logo-spin {\r\n from {\r\n transform: rotate(0deg);\r\n }\r\n to {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n\r\n.message-bubble {\r\n display: flex;\r\n border-radius: 0.25rem;\r\n padding: 0.5rem 1rem;\r\n max-width: 80%;\r\n margin-bottom: 2rem;\r\n}\r\n\r\n.message-bubble-user {\r\n background-color: #033E7D;\r\n margin-left: auto;\r\n color: #f7f8fa;\r\n}\r\n\r\n.message-bubble-ai {\r\n background-color: white;\r\n margin-right: auto;\r\n color: #000;\r\n}\r\n\r\n.message-prefix {\r\n margin-right: 0.5rem;\r\n}\r\n\r\n.message-content {\r\n white-space: pre-wrap;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.chat-window {\r\n flex: 1;\r\n flex-direction: column;\r\n overflow: hidden;\r\n position: absolute;\r\n bottom: 80px;\r\n right: 20px;\r\n border-radius: 10px;\r\n width: 400px;\r\n}\r\n\r\n.chat-window.light-theme {\r\n background-color: #fff;\r\n color: #000;\r\n}\r\n\r\n.chat-window.dark-theme {\r\n background-color: #000;\r\n color: #fff;\r\n}\r\n\r\n.chat-button {\r\n position: fixed;\r\n bottom: 20px;\r\n right: 20px;\r\n background-color: #033E7D;\r\n border-radius: 50%;\r\n margin: 10px;\r\n border: none;\r\n cursor: pointer;\r\n font-size: 48px;\r\n color: white;\r\n}\r\n\r\n.form-container {\r\n display: flex;\r\n flex-direction: column;\r\n background-color: #033E7D;\r\n}\r\n\r\n.input-field {\r\n flex: 1;\r\n padding: 8px 12px;\r\n border: 1px solid #ccc;\r\n border-radius: 4px;\r\n font-size: 14px;\r\n resize: none;\r\n height: 32px !important;\r\n min-height: 32px !important;\r\n max-height: 96px;\r\n overflow-y: auto;\r\n line-height: 1.5;\r\n width: 100%;\r\n margin: 0;\r\n}\r\n\r\n.input-field:focus {\r\n height: 32px !important;\r\n min-height: 32px !important;\r\n}\r\n\r\n.submit-button {\r\n flex-shrink: 0;\r\n padding: 0.5rem 2rem;\r\n border-radius: 0.25rem;\r\n border: none;\r\n font-weight: 600;\r\n background-color: white;\r\n height: fit-content;\r\n align-self: center;\r\n color: #033E7D;\r\n}\r\n\r\n.chat-input {\r\n display: flex;\r\n gap: 8px;\r\n padding: 10px;\r\n align-items: center;\r\n}\r\n\r\n.chat-container {\r\n height: 400px;\r\n overflow: auto;\r\n margin: 10px;\r\n display: flex;\r\n flex-direction: column-reverse;\r\n}\r\n\r\n.chat-container::-webkit-scrollbar {\r\n display: none;\r\n}\r\n\r\n.chat-header {\r\n background-color: #033E7D;\r\n padding: 10px 20px;\r\n color: #fff;\r\n font-weight: bold;\r\n margin-bottom: 20px;\r\n}\r\n\r\n.theme-toggle-button {\r\n border: none;\r\n background: none;\r\n padding: 0;\r\n cursor: pointer;\r\n color: #033E7D;\r\n}\r\n\r\n.icon-wrapper {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n border-radius: 50%;\r\n padding: 5px;\r\n background-color: #f0f0f0;\r\n}\r\n\r\n.icon-wrapper.dark-mode {\r\n background-color: #000;\r\n color: white;\r\n}\r\n\r\n.upload-button {\r\n padding: 4px 8px !important;\r\n font-size: 12px !important;\r\n cursor: pointer;\r\n}\r\n\r\n.upload-button:disabled {\r\n opacity: 0.6;\r\n cursor: not-allowed;\r\n}\r\n\r\n.uploaded-file-name {\r\n padding: 4px 8px;\r\n border-radius: 4px;\r\n max-width: 150px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.dark-theme .uploaded-file-name {\r\n background-color: #374151;\r\n color: #fff;\r\n}\r\n","body {\r\n margin: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\",\r\n \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\",\r\n \"Helvetica Neue\", sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\ncode {\r\n font-family: source-code-pro, Menlo, Monaco, Consolas, \"Courier New\",\r\n monospace;\r\n}\r\n"],"mappings":";;;AAEA;AACE,eAAa,SAAS,EAAE;AAC1B;AAEA,CAAC;AACC,cAAY;AACZ,WAAS;AACX;AAEA,CAAC;AACC,UAAQ;AACR,kBAAgB;AAClB;AAEA,OAAO,CAAC,sBAAsB,EAAE;AAC9B,GAND;AAOG,eAAW,cAAc,SAAS,IAAI;AACxC;AACF;AAEA,CAAC;AACC,oBAAkB;AAClB,cAAY;AACZ,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,mBAAiB;AACjB,aAAW,KAAK,KAAK,EAAE;AACvB,SAAO;AACT;AAEA,CAAC;AACC,SAAO;AACT;AAEA,WAnBe;AAoBb;AACE,eAAW,OAAO;AACpB;AACA;AACE,eAAW,OAAO;AACpB;AACF;AAEA,CAAC;AACC,WAAS;AACT,iBAAe;AACf,WAAS,OAAO;AAChB,aAAW;AACX,iBA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