UNPKG

@botonic/react

Version:

Build Chatbots using React

288 lines (270 loc) 7.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StyledUrlSourceValue = exports.StyledFileSourceValue = exports.StyledSourceValue = exports.StyledGuardrailValue = exports.StyledGuardrailLabel = exports.StyledDebugContentWrapper = exports.StyledGuardrailItem = exports.StyledSeeChunksButton = exports.StyledDebugMetadata = exports.StyledDebugItemWithIcon = exports.StyledDebugValue = exports.StyledDebugLabel = exports.StyledDebugDetail = exports.StyledDebugContent = exports.StyledDebugTitle = exports.StyledDebugIcon = exports.StyledDebugArrow = exports.StyledDebugHeader = exports.StyledDebugContainer = void 0; const tslib_1 = require("tslib"); const styled_components_1 = tslib_1.__importDefault(require("styled-components")); const constants_1 = require("../../constants"); exports.StyledDebugContainer = styled_components_1.default.div ` display: flex; flex-direction: column; align-items: start; justify-content: space-between; gap: 12px; background-color: ${constants_1.COLORS.SOLID_WHITE}; border-radius: 6px; font-family: 'Inter', sans-serif; box-sizing: border-box; margin: 0px 8px; max-width: calc(100% - 16px); width: 100%; /* When collapsible (expanded or collapsed), entire container is hoverable and clickable */ &.collapsible { cursor: pointer; &:hover { background-color: ${constants_1.COLORS.N50}; } } `; exports.StyledDebugHeader = styled_components_1.default.div ` display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; user-select: none; border-radius: 6px; padding: 8px 12px; width: 100%; `; exports.StyledDebugArrow = styled_components_1.default.span ` display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex-shrink: 0; svg { width: 100%; height: 100%; } `; exports.StyledDebugIcon = styled_components_1.default.span ` display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; margin-right: 8px; flex-shrink: 0; svg { width: 100%; height: 100%; } `; exports.StyledDebugTitle = styled_components_1.default.span ` flex: 1; display: flex; align-items: center; font-weight: 600; font-size: 12px; color: ${constants_1.COLORS.N700}; line-height: 1.5; white-space: nowrap; gap: 4px; span { font-weight: 400; } `; exports.StyledDebugContent = styled_components_1.default.div ` display: flex; flex-direction: column; position: relative; width: 100%; min-width: 0; overflow: hidden; font-size: 12px; line-height: 1.5; color: ${constants_1.COLORS.N700}; `; exports.StyledDebugDetail = styled_components_1.default.div ` display: flex; flex-direction: column; gap: 4px; padding: 0 28px; line-height: 1.5; width: 100%; min-width: 0; overflow: hidden; box-sizing: border-box; `; exports.StyledDebugLabel = styled_components_1.default.strong ` color: ${constants_1.COLORS.N700}; font-weight: 400; font-size: 12px; line-height: 1.5; `; exports.StyledDebugValue = styled_components_1.default.div ` font-weight: 600; font-size: 12px; color: ${constants_1.COLORS.N700}; line-height: 1.5; width: 100%; overflow-wrap: break-word; word-break: break-word; white-space: pre-wrap; > svg { width: 14px; height: 14px; min-width: 14px; min-height: 14px; flex-shrink: 0; display: inline-block; vertical-align: middle; margin-right: 8px; } `; exports.StyledDebugItemWithIcon = styled_components_1.default.div ` display: flex; align-items: center; gap: 8px; padding: 0; font-weight: 600; font-size: 12px; color: ${constants_1.COLORS.N700}; line-height: 1.5; min-width: 0; width: 100%; &:not(:last-child) { margin-bottom: 4px; } > svg { width: 14px; height: 14px; min-width: 14px; min-height: 14px; flex-shrink: 0; display: block; } `; exports.StyledDebugMetadata = styled_components_1.default.div ` margin-top: 8px; padding-top: 12px; border-top: 1px solid ${constants_1.COLORS.N100}; color: ${constants_1.COLORS.N700}; font-size: 12px; padding-left: 28px; > div { margin-top: 6px; font-weight: 400; } `; exports.StyledSeeChunksButton = styled_components_1.default.button ` border: 1px solid #c4c6d0; border-radius: 6px; padding: 8px; height: 28px; background-color: transparent; color: #413f48; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500; line-height: 1.5; cursor: pointer; margin-left: 0; margin-top: 4px; display: flex; align-items: center; justify-content: center; width: fit-content; &:hover { background-color: ${constants_1.COLORS.N100}; } `; exports.StyledGuardrailItem = styled_components_1.default.div ` display: flex; align-items: center; gap: 8px; padding-left: 28px; margin-bottom: ${({ $isLastItem }) => ($isLastItem ? '0' : '8px')}; font-size: 12px; line-height: 1.5; color: ${constants_1.COLORS.N700}; svg { width: 14px; height: 14px; flex-shrink: 0; } `; exports.StyledDebugContentWrapper = styled_components_1.default.div ` display: flex; flex-direction: column; gap: 8px; position: relative; width: 100%; min-width: 0; overflow: hidden; margin-bottom: 8px; /* Create line from first label to last label */ &::before { content: ''; position: absolute; left: 13px; width: 1px; background-color: ${constants_1.COLORS.N100}; top: 0; /* Height ends at last label's bottom position */ height: var(--last-label-bottom, 100%); } /* Change line color to N200 when collapsible event is hovered */ .collapsible:hover & { &::before { background-color: ${constants_1.COLORS.N200}; } } `; exports.StyledGuardrailLabel = styled_components_1.default.span ` font-weight: 600; font-size: 12px; line-height: 1.5; color: ${constants_1.COLORS.N700}; `; exports.StyledGuardrailValue = styled_components_1.default.span ` font-weight: 400; font-size: 12px; line-height: 1.5; color: ${constants_1.COLORS.N700}; `; exports.StyledSourceValue = styled_components_1.default.span ` font-weight: 600; font-size: 12px; line-height: 1.5; color: ${constants_1.COLORS.N700}; `; exports.StyledFileSourceValue = (0, styled_components_1.default)(exports.StyledSourceValue) ` display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; `; exports.StyledUrlSourceValue = styled_components_1.default.a ` font-weight: 600; font-size: 12px; line-height: 1.5; color: ${constants_1.COLORS.N700}; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; width: 0; flex: 1 1 0%; &:hover { text-decoration: underline; color: ${constants_1.COLORS.BOTONIC_BLUE}; } &:visited { color: ${constants_1.COLORS.N700}; } `; //# sourceMappingURL=styles.js.map